DM2Mac is a native C11 and SDL3 port of Dungeon Master II: The Legend of Skullkeep (PC DOS, 1995) for macOS and Windows. It is a recompilation: Ghidra decompiled the original DOS program to C, the game was rewritten in C11 with SDL3 from that code, and the result runs natively without DOSBox.
Your own copy of the PC DOS version of Dungeon Master II (English): its folder, its ZIP archive, or its CD image
(.iso, .img, .bin). This repository and the release contain no game files. Other versions (Amiga, FM Towns, other
languages) do not work.
- Download the latest release:
DM2Mac-macos-arm64.ziporDM2Mac-windows-x64.zip. Extract it. - Copy your game (the folder, the ZIP archive, or the CD image) into the extracted
DM2Macfolder. - Start the game:
-
macOS: In Terminal, remove the quarantine attribute in the
DM2Macfolder:xattr -dr com.apple.quarantine DM2Mac.app
Then double-click
DM2Mac.appin the Finder. -
Windows: Run
dm2.exe. If SmartScreen warns about an unknown publisher, select "More info", then "Run anyway".
-
On first startup the game checks your files and copies the 10 files it needs into game/ in the DM2Mac folder. If
a file is missing or wrong, a message names it. The game keeps all its files in game/: the game files, your saved
games in game/DATA, the settings, and the messages in dm2.log. To remove the game, delete the DM2Mac folder.
On startup you choose how to play:
- Vanilla: the original game, unchanged.
- Advanced (the default): the original game with a few additions:
- WASD movement and Q/E turning;
- an automap (Tab) of the squares you have seen;
- quick save (F5) and quick load (F9);
- a cheat screen (C);
- a screen filter (Scale2x, Scale3x).
In both modes the mouse and the arrow keys work as in the original game. The keys, the cheats, and the screen filter are in the advanced mode section of the Player manual.
On macOS, a program such as an LLM can play the game turn by turn over a Unix socket. In the turn-based mode the game time stops between requests; each request is one turn, and the reply gives the state and the view as JSON. Build the game first (see Development), then:
build/dm2 --mode turnbased &
uv run dm2-play --brief get_state
uv run dm2-play act move_forwardControl socket has the start, dm2-play, and the protocol;
Turn-based mode has the turns, the actions, and the reply fields. LLM runs
describes playthroughs with a coordinator agent and player agents, and the
LLM playbook is the page the player agent reads.
DM2Mac is a C11 and SDL3 reimplementation of SKULL.EXE, built from its own Ghidra decompilation and checked
against the original in an emulator. Build instructions and tests are in Development; the documentation index is
docs/README.md.
- SDL3: windowing, input, and audio output.
- Nuked-OPL3 by Nuke.YKT: OPL3 emulation for the music.
- tinf by Jørgen Ibsen: ZIP decompression.
- Unicorn: CPU emulation for the differential tests.
- reDM2: an analysis of the same
SKULL.EXE, read for names, formats, and logic.
GPL-3.0-or-later (LICENSE). Nuked-OPL3 in src/third_party/opl3/ is under the LGPL-2.1-or-later license
(opl3-LICENSE); tinf in src/third_party/tinf/ is under the zlib license
(tinf-LICENSE). Dungeon Master II is the property of its rights holders. This
project is not affiliated with or endorsed by them. The game data is not included and is not covered by this license.

