This page is also available in Portuguese.
Sonic Heroes Decomp
Nintendo GameCube · Matching decompilation

Sonic Heroes Decompilation

A work-in-progress, non-commercial decompilation of Sonic Heroes (SEGA, 2003) for the Nintendo GameCube: C and C++ source that, built with the original compilers, reproduces the retail game byte for byte. No game code, no assets, no download.

G9SE8P · NTSC-U · rev 0main.dol + 17 REL modulesMetrowerks CodeWarriorSHA-1 verified in CI
src/rel/itembaloon_hooks.cpp
extern "C" void itembaloonObjectUnload(void)
{
    endObjItempanel();
    itembaloonResource = NULL;
}

extern "C" void itembaloonObjectLoad(void)
{
    itembaloonResource =
        objPointerReadFromClumpAnim(itembaloonModelName);
    initObjItempanel();
}
✓ objdiff2/2 functions · 100% match
Real source from the repository: the item balloon's unload and load hooks.
Live status

Decompilation progress

Numbers come from the objdiff report of every build on main. A function only counts once it compiles to exactly the same bytes as the original. Full progress and milestones →

Code matched
35.4%
4,618,108 / 13,039,060 bytes
Data matched
9.47%
679,064 / 7,167,586 bytes
Functions matched
52.6%
20,559 / 39,062 functions
Complete units
66.6%
11,012 / 16,538 units
Last published: 2026-10-24 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 and all 17 REL modules
  • A non-commercial study and preservation effort
  • Checked by CI: every change rebuilds the DOL and every REL and compares their SHA-1
  • Open source under the MIT license (our code only)

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, no donations, no 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 merely behaves 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 game was built with Metrowerks CodeWarrior. The same compiler versions are downloaded at build time (and run through wibo on Linux and macOS). No compiler binaries live in the repository.

Verified on every change

The disc ships no .map file, so names and file boundaries are worked out from evidence. Every push rebuilds main.dol and all 17 RELs and checks their SHA-1 against the retail disc.

objdiff showing a fully matching object
objdiff: a matched object, original and recompiled code side by side, fully green.
Why

Why decompile Sonic Heroes?

Preservation

Sonic Heroes was released in 2003 for GameCube, PlayStation 2, Xbox and PC. Readable source is the most durable record of how a game actually works, long after the hardware is gone.

Understanding

Physics, the three-character formation system, stage objects and RenderWare rendering become documented code that anyone can read, instead of guesses.

A foundation

A complete matching decompilation is what fan ports, mods and bug-fix projects are usually built on. This repository only reproduces the original game; what others build on it later is up to them.

Transparency

AI-assisted, verified by bytes

Language models help write parts of this decompilation, and we say so openly. They never decide what counts as done: a function is only marked as matching when its compiled bytes are identical to the original in objdiff, and CI rebuilds and hashes the whole game on every change.

That check cannot be fooled by code that only looks right. Code that does not reproduce the retail instructions, data and relocations exactly is simply not merged as matching.

Milestones

Recent milestones

  1. 61 reconstruction pull requests integrated

    A large batch from Cypress lands in one integration (#612).

  2. 23.7% of code

    Code shared between stages is written once and linked into every module that uses it, sometimes 13 at a time.

  3. decomp.dev closes its public index

    The progress tracker the project used since July stops listing projects. Tracking moves to ByteMatch, which reads the same CI reports.

  4. 35.4% of code, over half of all functions

    20,559 of 39,062 functions match, and every SDK library function is done.

See the full timeline →

Community

Built in the open

Contributors from the GameCube decompilation, Dreamcast homebrew and Sonic modding scenes have helped since day one. Questions, research and claims of work happen on the Discord; code goes through pull requests on GitHub.