Status · Roadmap · Build · Controls · How it works · Dev log
Diablo II: Lord of Destruction 1.14d, running natively on the PlayStation 2. It isn't emulated, streamed or remade: it's the game's own code, compiled for the PS2's Emotion Engine, with everything a PS2 needs underneath it. That means a fake Windows, a GS renderer, DualShock 2 input, and a build tuned for the EE.
| Where it stands | |
|---|---|
| ✅ | Boots to the LoD main menu on an emulated PS2 (PCSX2) |
| ✅ | In game: new character, Rogue Encampment, walking, inventory, at a steady 25 FPS (the game's own cap) |
| ✅ | DualShock 2 as a virtual mouse plus D2's hotkeys (controller layer 0) |
| 🚧 | Fit a retail PS2's 32 MB: for now it needs PCSX2's Extended RAM (#5) |
| 🚧 | Sound (#1) |
| 🚧 | Naming a character with the pad (#2) |
| ⏳ | Real hardware (#8) |
Playable on PCSX2: from start to Act 1 with sound and the pad alone.
- Sound on audsrv (#1)
- Name entry with the pad (#2)
- Walk with the stick, soft targeting, skill slots (#3)
Retail PS2: stock 32 MB, data from USB, on real hardware.
- Fit in 32 MB (#5)
- Data from USB storage (#6) and saves (#7)
- Real hardware (#8)
- NTSC, 480p and letterboxing (#9)
- Panels by d-pad (#4)
Everything else is on the issue list.
Important
This repository holds no game data and never will. You need your own Diablo II and Lord of Destruction, patched to 1.14d, and a BIOS dumped from your own PS2.
Put these files in a folder (default ~/d2data, or point $D2DATA at it):
d2char.mpq d2data.mpq d2exp.mpq d2music.mpq d2sfx.mpq d2speech.mpq
d2video.mpq d2xmusic.mpq d2xtalk.mpq d2xvideo.mpq patch_d2.mpq
You'll need macOS on Apple Silicon, with Docker and PCSX2. The PS2 toolchain runs in the
ps2dev/ps2dev container, which tools/port/ps2.sh wraps.
git config core.hooksPath tools/hooks # once: keeps game data and binaries out of git
tools/port/ps2.sh cmake -S . -B build-ps2 -G Ninja -DREDIVIVUS_PORT=ON \
-DCMAKE_TOOLCHAIN_FILE=cmake/ps2-ee.cmake -DHS_PS2_EXTENDED_RAM=ON
tools/port/ps2.sh cmake --build build-ps2
tools/port/run-pcsx2.sh --extra-ram --seconds 5run-pcsx2.sh stages the ELF next to your game folder, turns on the PCSX2 settings the port needs
(host file access, Extended RAM), and starts it. Add --script tools/port/scripts/town-walk.txt to
watch a scripted run make a Barbarian and walk around the Rogue Encampment.
Other targets
The port also builds for 32-bit Linux with SDL2 (the debugging target), and the stock Windows build is kept working. Both are covered in AGENTS.md.
| DualShock 2 | Does |
|---|---|
| Left stick / right stick | Cursor, fast / precise |
| ✕ or R2 | Left click |
| ○ or L2 | Right click |
| Start | Game menu (Esc) |
| △ / □ / R1 | Inventory / skill tree / character sheet |
| Select | Automap |
| L1 (hold) | Stand still (Shift) |
| L3 / R3 | Toggle run / show items |
| D-pad | Belt slots 1–4 |
This is layer 0: the pad acts as a mouse. Walking with the stick, auto-targeting and pad-driven panels are designed in docs/port/controller.md.
- No game code is edited. Everything PS2-specific sits beside the decompiled tree: a
forced-include prelude, a Win32 shim (
Redivivus/port/win32/), link-time overrides, and the backends (Redivivus/port/backend/). - Rendering uses the game's own software renderer. Each 8-bit frame goes to the GS as a paletted texture with its colour table.
- Files are read straight from your MPQs through the
host:device (PCSX2's host file system, for now). - The bugs are the fun part, and they're all in the dev log. For example,
NPCs used to teleport mid-walk because PCSX2's EE recompiler mishandles one unaligned-load
instruction (
LWR). The build now compensates, and a report for PCSX2 is drafted.
- Redivivus by jaenster and the Redivivus contributors:
the reverse-engineered 1.14d this is built on, imported as a snapshot (the first commit here, the
revision in
UPSTREAM). HellStation wouldn't exist without it. Fixes that belong to Redivivus go back there. - ps2dev: the PS2 toolchain, ps2sdk and gsKit.
- PCSX2: the emulator used for bring-up.
- The controller design was informed by d2decomped, D2Vita, DevilutionX and D2R. None of their code is used.
MIT, see LICENSE. The imported Redivivus code keeps its own copyright notice there, and
its .cpp.map files are used under its terms: credit to Redivivus, linked above.
Diablo and Blizzard Entertainment are trademarks of Blizzard Entertainment, Inc. PlayStation is a trademark of Sony Interactive Entertainment. HellStation is not affiliated with or endorsed by either.