# Resident Evil 4 for GameCube has been fully decompiled into byte-identical C/C++

Original title: Resident Evil 4 (GameCube) – complete byte-identical decompilation to C/C++

> Hacker News story 49778022 · language: en · submitted 2026-09-20
> Web version: https://zeli.app/story/49778022
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 132 · by [metrofun](<https://news.ycombinator.com/user?id=metrofun>) · 💬 96
[original](<https://github.com/adonis-singh/re4>) · [HN discussion](<https://news.ycombinator.com/item?id=49778022>)

## Summary

A complete, byte-identical decompilation of Resident Evil 4 for the Nintendo GameCube has been released. The project reconstructs the G4BE08 debug build (the Nov 25 2004 prototype, both discs) into roughly 555,000 lines of C/C++, with no assembly files. Building the repository reproduces main.dol and all 114 REL overlays exactly, verified by SHA-1 checks. The repository contains no game assets and requires the user's own disc images to build.

## Key quote

> Every unit compiles to the original bytes with the original compilers.

## HN discussion (96 comments)

### [groundzeros2015](<https://news.ycombinator.com/item?id=49779177>)

> I opened a file at random. This looks more like emulating the behavior in compilable C syntax rather than recovering the game's programming
>
> void Em1eWeaponSet(cEm10* em)
>
> {
>
> Em10Work* w = EM10_WK(em);
>
> w->mot[41] = 0;
>
> w->mot[42] = 0;
>
> …
>
> w->mot[62] = 0;
>
> w->mot[63] = ARC(0x26C);
>
> w->mot[64] = ARC(0x26D);
>
> w->mot[65] = ARC(0x276);
>
> w->mot[66] = ARC(0x277);
>
> w->mot[67] = 0;
>
> w->mot[68] = 0;
>
> w->mot[69] = ARC(0x26A);
>
> w->mot[70] = ARC(0x26B);
>
> w->mot[71] = ARC(0x270);
>
> w->mot[72] = ARC(0x271);
>
> w->mot[73] = ARC(0x272);
>
> w->mot[74] = ARC(0x273);
>
> w->mot[75] = ARC(0x274);
>
> w->mot[76] = ARC(0x275);
>
> w->mot[77] = 0;
>
> w->mot[78] = 0;
>
> }

### [LaurensBER](<https://news.ycombinator.com/item?id=49778613>)

> Despite all "hate" against AI in the (retro)-gaming scene I'm genuinely excited to see these kind of projects (not sure if this one involved any kind of AI) and emulation.
>
> From a technical perspective emulation is absolutely amazing, it requires deep technical knowledge, an excellent understanding of the source system and the optimisations are on another level.

### [wk_end](<https://news.ycombinator.com/item?id=49778473>)

> From a preservation perspective, this is one of the least useful decomps ever, given how committed Capcom is to making sure RE4 is ported absolutely everywhere (kidding!)
>
> Made using the leaked debug build and its symbols, which shows how meaningful the work the game preservation community that acquires and distributes these things is.
>
> OTOH this is pretty off-putting:
>
> \> Where the compiler needed a particular source shape to reproduce a register choice or a schedule and no natural spelling was found, the construct is marked with a // COMPILER-DIFF: comment (644 of them: dead tests, empty asm("") launders and anchors, register T x asm("rN") pins, padding statements).
>
> To me the value of a decomp isn't reproducing the original bytes per se (we already have the original bytes after all) - it's about reconstructing the understanding of the original game as represented by human-readable source code; getting byte-for-byte is just an indication that you've gotten it right. Needing to add a bunch of slop to force the compiler to match the original output is actually just an indication that you've gotten it wrong - and it's a demonstration of the danger of Goodhart's law, especially as it applies to AI.

### [shakna](<https://news.ycombinator.com/item?id=49779962>)

> CC0, on the decompilation of a copyrighted work? That's... Not the way it works.
>
> You inherit the copyright from the original, as this is derivative.
>
> There's a reason decompilation has always been a grey area of seeing whether or not the copyright holder cares.

### [mikae1](<https://news.ycombinator.com/item?id=49778584>)

> I'm so emotionally torn about all the awesome decompilation work done.
>
> Too bad all the cool decompilation is happening for games on early 3D centric consoles. I say this a Quake fanatic. Low res textures combined with that blurry bilinear style filtering is a look that's not easy to love. It's just a generational thing I guess.

---

## Cite

- Page: https://zeli.app/story/49778022
- Date: 2026-09-20
- Source: github.com (https://github.com/adonis-singh/re4)
- Hacker News: https://news.ycombinator.com/item?id=49778022

## Other languages

- zh: https://zeli.app/zh/story/49778022 · markdown: https://zeli.app/zh/story/49778022.md
- ja: https://zeli.app/ja/story/49778022 · markdown: https://zeli.app/ja/story/49778022.md
- ko: https://zeli.app/ko/story/49778022 · markdown: https://zeli.app/ko/story/49778022.md
- de: https://zeli.app/de/story/49778022 · markdown: https://zeli.app/de/story/49778022.md
- es: https://zeli.app/es/story/49778022 · markdown: https://zeli.app/es/story/49778022.md
- ru: https://zeli.app/ru/story/49778022 · markdown: https://zeli.app/ru/story/49778022.md
