HeadlinesBriefing favicon HeadlinesBriefing.com

Resident Evil 4 GameCube Debug Build Fully Decompiled

Hacker News •
×

A complete, byte-identical decompilation of Resident Evil 4 for the Nintendo GameCube has been achieved for the G4BE08 debug build (the "Nov 25 2004" prototype, both discs). The project reproduces main.dol and all 114 REL overlays exactly, verified by SHA1 hashes on every build. It comprises 1,083 objects (675 in the DOL, 408 across RELs) and 15,641 functions, all byte-identical. Source code totals ~555k lines of C/C++ (~33k lines of headers) with no assembly files.

The game was compiled with SN Systems Pro DG 3.9.3 — GCC 2.95.3, Metrowerks CodeWarrior 2.4.7, and CodeWarrior GC/1.2.5n. It includes CRI middleware (ADX, SFD, MPV) and Nintendo SDK libraries. The repository contains no game assets; users must provide their own debug disc images (disc 1 for main.dol and 110 RELs, disc 2 for four island-stage RELs). Building requires Linux, Python 3, and ninja; compilers and tools are downloaded automatically except the native SN GCC.

Matching means every unit compiles to original bytes with original compilers. Where specific source shapes were needed to reproduce register choices or scheduling, constructs are marked with `// COMPILER-DIFF:` comments (644 total). An automated check confirms only 231 hardware kernel instructions come from asm templates. Documentation covers engine architecture, matching methodology, per-unit notes, and compiler research logs.