---
title: "dungeonremaster2"
url: https://manvsmidi.com/projects/dungeonremaster2/
category: game
status: wip
date: 2026-10-07
tags: [decompilation, remake, rust, rpg]
related: [exhumed-prince, hyrule3d, mario3d, rob]
---

# 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.

Game · In progress · 2026-10-07

- [Source](https://github.com/sadovsky/dungeonremaster2)

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.

![A gnarled tree with a face beside a stone fountain in the outdoor forest, rendered by the remake](https://manvsmidi.com/_astro/forest.BQHD3MUh.png)
*The forest outside Skullkeep, rendered headless by the remake from the original GRAPHICS.DAT and DUNGEON.DAT.*

## Connected projects

- [Prince of Persia Apple II: Modern Port Experiments](https://manvsmidi.com/projects/exhumed-prince/index.md): linked
- [Hyrule 3D](https://manvsmidi.com/projects/hyrule3d/index.md): shared tags: remake
- [mario3d](https://manvsmidi.com/projects/mario3d/index.md): shared tags: decompilation
- [R.O.B. (Reverse-engineering Opcode Buddy)](https://manvsmidi.com/projects/rob/index.md): shared tags: decompilation
