Skip to content

About

Matching decompilation of Lemmings Paintball (1996, Windows 95)

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Repository files navigation

Lemmings Paintball Decompilation

Build Status Effective Match Exact Match Fuzzy Match

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.

Reconstruction

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.

Building

Requires Python 3.10+ and Git. Run commands from the repository root in PowerShell.

Setup

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 msvc400

Build

Activate the environment in each new shell, then build:

.\.decomp-venv\Scripts\Activate.ps1
python tools/make_binary.py

Pass --disable-startup-checks to make_binary.py to bypass the CD-ROM and installation checks.

Matching

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.

Prerequisites

Matching requires the built executable in build-msvc400 and the original LEMBALL.EXE placed in data.

SHA-256: d6337b58ccaf98df728b1490812cad0f927802d2e2c5fc932d00961f97027f63

Workflow

  1. Find target: python tools/triage_targets.py
  2. Rebuild and diff: python tools/make_binary.py && python tools/check_function.py 0xADDR
  3. Check source: python tools/check_source.py
  4. Update report: python tools/make_report.py (writes to build-msvc400/report.json)

AI Disclosure

This project uses AI for tooling, research, and code reconstruction. All code is manually reviewed.

References

Resources

Inspirations

Legal

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.

About

Matching decompilation of Lemmings Paintball (1996, Windows 95)

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Contributors

Languages