Nintendo GameCube · Matching Decompilation

Sonic Heroes

A work-in-progress, non-commercial study and preservation decompilation. Hand-written source that rebuilds the retail binary byte for byte. No game code, no assets, no extracted assembly.

Target: G9SE8P · NTSC-U · rev 0
Build status Code progress Data progress Discord
Live status

Decompilation progress

Pulled live from decomp.dev on every visit. Nothing is marked as matching unless it reproduces the original binary exactly.

Code matched
0.05%
... of total code bytes
Data matched
0.00%
... of total data bytes
Functions
0.27%
... functions matched
Complete units
0%
... translation units done
Fetching live data... Latest commit: ...
Scope

What this project is, and what it is not

It is

  • Hand-written C, C++ and inline assembly source
  • Verified byte-for-byte against the retail main.dol
  • A non-commercial study & preservation effort
  • CI-checked: every push verifies the built DOL's SHA-1
  • Free and open, under its repository license

It is not

  • A playable game, a port, or a download of the game
  • Shipping any ROM, disc image, or game asset
  • Shipping original binary code or assembly extracted from the disc
  • Affiliated with or endorsed by SEGA
  • Monetized. No ads, donations, or paid builds

You need your own legally obtained copy of the game to build anything. A build is only useful to somebody who already owns it.

Method

How a matching decompilation works

The goal is not "code that runs like the game". The goal is source that, compiled with the original toolchain, produces the exact same bytes as the disc.

Byte-for-byte

Each function is rewritten until its compiled output is identical to the original, checked in objdiff. Anything less does not count as matched.

Original toolchain

The retail CodeWarrior compilers are downloaded at build time and run via wibo on Linux/macOS. No compiler binaries live in the repo.

CI-verified

The disc ships no .map, so symbols and unit boundaries are worked out by hand. Every push rebuilds and checks the DOL's SHA-1.

objdiff showing a matched object: original and recompiled disassembly side by side, fully green
objdiff: dolphin/base/PPCArch matching the original, instruction for instruction.
Reproduce it

Build it yourself

You supply the game. The toolchain and configuration are in the repo.

# 1. clone
git clone https://github.com/Jovinull/sonicheroes.git
cd sonicheroes

# 2. enable the safety hook (refuses commits that stage game data)
git config core.hooksPath .githooks

# 3. drop YOUR dumped copy in orig/G9SE8P/ , then
python configure.py
ninja

Need Python and ninja on your PATH. Full guide: docs/getting_started.md · Contributing: CONTRIBUTING.md