macintosh.world | Log In | Register

Today | News | Books | Recipes
Notes | QuickTake | Wiki | Browse
Maps | Reference | Reddit | YouTube
Chat | Games | About

GitHub - adonis-singh/re4: Resident Evil 4 (GameCube, G4BE08 debug build) - complete byte-identical decompilation to C/C++ · GitHub

Open Original Page

GitHub - adonis-singh/re4: Resident Evil 4 (GameCube, G4BE08 debug build) - complete byte-identical decompilation to C/C++ · GitHub

Sign in Appearance settings

Platform AI CODE CREATION GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

MCP RegistryIntegrate external tools

DEVELOPER WORKFLOWS ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

APPLICATION SECURITY GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

Solutions BY COMPANY SIZEEnterprises

Small and medium teams

BY USE CASEApp Modernization

BY INDUSTRYHealthcare

Resources EXPLORE BY TOPICAI

Software Development

EXPLORE BY TYPECustomer stories

SUPPORT & SERVICESDocumentation

Open Source COMMUNITY GitHub SponsorsFund open source developers

PROGRAMSSecurity Lab

Maintainer Community

Enterprise ENTERPRISE SOLUTIONS Enterprise platformAI-powered developer platform

AVAILABLE ADD-ONS GitHub Advanced SecurityEnterprise-grade security features

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Sign up Appearance settings




You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on another tab or window. Reload to refresh your session.








adonis-singh

/

re4


Notifications
You must be signed in to change notification settings





Security and quality
0




Additional navigation options










Security and quality

Code Open more actions menu

NameNameLast commit message

.github/ISSUE_TEMPLATE

.github/ISSUE_TEMPLATE

Repository files navigation

Resident Evil 4 (GameCube) - decompilation

A complete, byte-identical decompilation of Resident Evil 4 for the Nintendo GameCube: the
G4BE08 debug build (the "Nov 25 2004" prototype, both discs), whose Bio4.sym files name every
function. Building the repository reproduces main.dol and all 114 REL overlays exactly
(config/G4BE08/build.sha1, checked on every build).

Objects
1083 (675 in the DOL, 408 across the 114 RELs), all byte-identical; 15641 functions

Source
~555k lines of C/C++ (src/), ~33k lines of headers (include/); no assembly files

Game code
SN Systems ProDG 3.9.3 - GCC 2.95.3 "SN BUILD v1.79", built natively from SN's GPL source drop

CRI middleware (src/lib/adx_*, sfd_*, mpv_*, ...)
Metrowerks CodeWarrior 2.4.7 (GC/2.7), the compiler CRI shipped the libraries with

Nintendo SDK (src/lib/OS*, GX*, ...)
Metrowerks CodeWarrior GC/1.2.5n, sources from dolsdk2004

The repository contains no game assets and no code or data copied from the discs. You need your
own images of the debug discs to build (disc 1 for main.dol and most RELs, disc 2 for the four
island-stage RELs); the original files are read from them at configure time.

Linux, Python 3, ninja. Compilers and tools (decomp-toolkit, objdiff,
wibo, the CodeWarrior builds) are downloaded by the first configure run, except the native SN GCC:

# 1. the native cc1/cc1plus (once): needs SN's GPL source drop, see tools/sn-gcc/build.sh
SN_GCC_SRC=/path/to/NGC_GNU_SRC/NGC tools/sn-gcc/build.sh

# 2. your disc images (disc 1: main.dol + 110 RELs; disc 2: the four island-stage RELs st3_0..st3_3)
cp re4_debug_disc1.iso re4_debug_disc2.gcm orig/G4BE08/

# 3. build and verify
python3 configure.py && ninja

ninja ends with the progress report (100% matched and linked for the DOL and the REL modules);
build/tools/dtk shasum -c config/G4BE08/build.sha1 prints 115 OK lines. To work on a unit, python3 tools/bytecmp.py game/foo compares its object with
the original word by word and python3 tools/fdiff.py game/foo <symbol> shows one function.

src/game/ - the game (C++; a few newlib C units). src/em*/ enemies, src/wep*/ weapons,
src/pl*/ player characters, src/st*/ rooms (one REL per room), src/t_*/, src/Tools/,
src/tools/ the in-game debug editors, src/Sscrn/ the sub-screens, src/lib/ SDK, CRI and runtime.

include/ - headers, including the reconstructed struct layouts.

config/G4BE08/ - unit lists (objects.py, modules.py), symbols.txt, splits.txt, linker
scripts, per-module REL data (modules/<mod>/), build.sha1.

tools/ - build generator (project.py), the ProDG driver (ngccc.py), REL rebuild (make_rel.py,
link_rel.py), the compare tools, sn-gcc/ (native compiler build), research/ (compiler-analysis kit),
motion_export.py + motion/ (animation export to glTF/BVH, evaluated with the game's own code and
verified against the game running in Dolphin).

docs/overview.md - how the engine is put together: a reading guide to src/ by subsystem.

docs/matching.md - how the matching was done: compiler provenance, the catalogue of compiler
mechanisms and the source shapes that reproduce them, rules of thumb for both compilers.
docs/unit-notes.md - per-unit notes. docs/research/ - the pass-by-pass research log.

What "matching" means here

Links

Open - Skip to content
Open - Sign in
Open - GitHub CopilotWrite better code with AI
Open - GitHub Copilot appDirect agents from issue to merge
Open - MCP RegistryIntegrate external tools
Open - ActionsAutomate any workflow
Open - CodespacesInstant dev environments
Open - IssuesPlan and track work
Open - Code ReviewManage code changes
Open - Code QualityEnforce quality at merge

Browse another page:

URL