dungeonremaster2
A from-scratch Rust reimplementation of the 1994 DOS game Dungeon Master II, built from my own reverse-engineering notes. Bring your own copy of the game data.

A clean reimplementation of Dungeon Master II: The Legend of Skullkeep (DOS, 1994) in Rust, plus the reverse-engineering notes it was written from. No game data lives in the repo: the engine reads graphics, dungeon, sounds, music and rule tables out of your own copy of the original at runtime.
How it was made
The packed SKULL.EXE is unpacked with a Python LE unpacker, loaded into Ghidra, and read. Findings are written up in the project’s own words in docs/, then implemented in Rust. The notes cover the GRAPHICS.DAT and DUNGEON.DAT formats, the viewport renderer, the timeline and RNG, champions, combat and magic, items, UI, audio, saves, text and cutscenes.
A few of the more interesting parts:
- Creature AI is data-driven in the original: each creature class picks from behaviour programs written in a small bytecode of 7-byte commands, run by an interpreter over a square-search planner. The remake runs the same programs.
- Music is HMP MIDI played through OPL FM patches. The remake has its own two-operator FM voice written from OPL2 datasheet behaviour and an 18-voice MIDI-to-FM driver, with mixer levels fitted to DOSBox recordings.
- Saves are compatible in both directions: DOS saves load in the remake and remake saves load in the original.
Status
All of the game’s systems are implemented. Checked against the original in DOSBox: the 133 ms tick, save files, and pixel-exact title, start, inventory, action-menu, paused and eye-panel screens. The music driver’s exact voice allocation and volume curve are still open.
| Crate | What it is |
|---|---|
dm2-formats |
Parsers for GRAPHICS.DAT and DUNGEON.DAT |
dm2-engine |
The game itself: state, mechanics, AI, rendering, UI, audio, saves |
dm2 |
Windowed frontend (macroquad, cpal) |
Running it
You need the DOS release (SKULL.EXE plus its DATA/ directory and the .BNK files).
cargo run --release -p dm2 -- /path/to/DATA
There’s also a headless mode that renders a screenshot of any map position without opening a window.
