This project is a matching decompilation of Lemmings Paintball, an action video game from the Lemmings franchise developed by Visual Sciences and published by Psygnosis in 1996 for Windows 95.
The goal is to reconstruct the game's codebase using idiomatic, maintainable C++ that preserves the original behavior and matches the original machine code as closely as possible. The resulting codebase will serve as a faithful reference and foundation for future ports.
Note
This reconstruction exclusively targets 32-bit Windows and uses Microsoft Visual C++ 4.0.
For a modern, cross-platform version, see lemball-portable.
The original function and class names were recovered from the Macintosh 68000 version, which preserved debugging symbols from Metrowerks and MacsBug. These provided over 2,800 original function names and revealed C++ class hierarchies throughout the game and engine.
Since the Windows executable had its symbols removed, functions were matched between the two versions using strings, constants, algorithms, virtual tables, object layouts, and call relationships.
Requires Python 3.10+ and Git. Run commands from the repository root in PowerShell.
Create the Python environment, install dependencies, and download the MSVC 4.00 toolchain once:
python -m venv .decomp-venv
.\.decomp-venv\Scripts\Activate.ps1
python -m pip install -r requirements.txt
git clone https://github.com/vonhoff/MSVC400 msvc400Activate the environment in each new shell, then build:
.\.decomp-venv\Scripts\Activate.ps1
python tools/make_binary.pyPass --disable-startup-checks to make_binary.py to bypass the CD-ROM and installation checks.
Each function is compared against the original executable using reccmp.
- Exact: Non-stub functions with a raw 100% assembly comparison score.
- Fuzzy: Raw assembly similarity, including equivalent functions with lower scores.
- Effective: Non-stub raw 100% matches and reccmp's own equivalence results.
The decomp.dev report only includes exact and fuzzy matches.
Matching requires the built executable in build-msvc400 and the original LEMBALL.EXE placed in data.
SHA-256: d6337b58ccaf98df728b1490812cad0f927802d2e2c5fc932d00961f97027f63
- Find target:
python tools/triage_targets.py - Rebuild and diff:
python tools/make_binary.py && python tools/check_function.py 0xADDR - Check source:
python tools/check_source.py - Update report:
python tools/make_report.py(writes tobuild-msvc400/report.json)
This project uses AI for tooling, research, and code reconstruction. All code is manually reviewed.
- The Cutting Room Floor - Lemmings Paintball
- Game Data Digs - Lemmings Paintball
- Reverse Engineering a DOS Game with Ghidra and Codex
This is an unofficial reverse-engineering project not affiliated with or endorsed by the original rights holders. Original game assets are not included in this repository.
No license is granted for the reconstructed game code. Independent code is released under the Unlicense.