Skip to content

footballhead/pre-ablo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pre-ablo Banner

Download latest release: v0.4.6
Join our Discord: https://discord.gg/2btAntp

View Pre-ablo on Mod DB

In August 1996, Blizzard was hard at work developing Diablo. For promotional purposes, they produced a build to be distributed as shareware called the Pre-Release Demo. Blizzard intended this build to be locked down: players would be restricted to the Warrior class and the first level of the cathedral.

It is well known that these restrictions are easy to bypass. Doing so gives access to a snapshot of the entire game as it existed four months before launch.

However, there are two problems playing with the limitations removed:

  1. Many graphics are missing from the MPQ ranging from player animations to monster animations and entire level tilesets.
  2. Crashes abound at every turn.

This project aims to tackle both these issues while maintaining the spirit of the PR Demo. If it ain't broke then we won't fix it. If something stops the player from getting to level 16 then we will analyze and address.

Bugs are expected since, in August 1996, the game was actively under development. These bugs are left in to be faithful to the state of the game as it was being developed.

Running

  1. Download the latest release from GitLab Releases or ModDB
  2. Extract pre-ablo_XYZ.zip. This should produce a folder called PRE-ABLO.
  3. This is important: Copy the extracted PRE-ABLO folder to C:\PRE-ABLO. After this, you should find the game at C:\PRE-ABLO\DIABLO.exe.
    • This is to work around an issue where the pre-release demo crashes on long pathes (i.e. your Downloads folder).
  4. Run DIABLO.EXE

Patches can be toggled in the Options submenu on the main menu. The game will automatically restart after confirming chosen patches.

Developing

WARNING: This repo uses submodules, please clone recursively!

Pre-ablo is a project that consists of many parts:

dplay.dll

Patches are compiled into a phony dplay.dll and are applied when the DLL is loaded by DIABLO.EXE

Each patch is stored under dplay/src/patches in its own patch_name.cpp.. It has a PATCH_MAIN (void patch_name_main(void)) which is designed to run on DLL load. This is accomplished by calling it from DllMain().

A master list of all patches is in dplay/src/patches.cpp. The patch must be defined and registered there.

Users toggle patches through the Options menu on the main menu. Selections are saved in last_patch.txt. If no last_patch.txt is present then recommendations are applied instead.

The DLL is cross-compiled in Docker with mingw. See dplay/README.md for more details.

mpqadd

We have a custom MPQ packer: diabutil/mpqadd

This CLI is designed to add/replace files in the PR Demo MPQ. It's used by CI to pack the final MPQ.

ddrawwrapper

We have a custom ddraw.dll: https://github.com/footballhead/diablo-ddrawwrapper/tree/prde

Initially created by Strange Bytes, we forked it to add our own modifications.

This implements a subset of DirectDraw (the parts used by Diablo) to use a DirectX 9 backend. This works better on modern Windows than the default DirectDraw implementation. It also allows for window mode and other graphics related customizations.

It runs on its own release schedule. It must be manually compiled (due to needing DirectX SDK and latest MSVC)

CI/CD Pipeline

The CI/CD Pipeline is hosted by GitLab on this repo: https://gitlab.com/moralbacteria/diablo-prdemo-patches/-/pipelines

This is responsible for producing releasable ZIP files. It's a script run on every commit and tag, stored in .gitlab-ci.yml. It has several steps:

  • Build mpqadd, used by packaging
  • Cross-compile DPLAY.DLL
  • Package everything up
    • Downloads a base pre-release demo, treat as release folder
    • Downloads a release of ddraw.dll and puts it into the release folder
    • Copies our custom dplay.dll with the patches
    • Adds all missing graphics to the MPQ
    • Exposes the release as a downloadable artifact

All releases must come from the CI/CD pipeline. Not only is it convenient and it's reproducible, but it also acts as a file host.