# Donkey Kong 64 Hits 100% Byte Match via AI Decompilation Loop

> A Reddit user reports a 100% byte-matching Donkey Kong 64 decompilation built with a self-improving AI loop.

- Published: 2026-11-09T05:31:06Z
- Score: 8/10
- Tags: decomp, n64, ai
- Port / platforms: N64 -> PC (Windows) (Decompilation)
- Web page: https://emu-radar.customfw.xyz/news/donkey-kong-64-ai-decomp/
- Sources: https://www.reddit.com/r/donkeykong/comments/1xri0yw/donkey_kong_64_100_decompile/

Reddit user mjquinlan2000 published a 100% byte-matching decompilation of Donkey Kong 64 (N64, USA, `NDOE`). The code is almost entirely AI-generated, produced by a self-improving decompilation loop. The resulting repository, [Unstripped/decomp_dk64](https://github.com/Unstripped/decomp_dk64), compiles with the original toolchain (IDO 5.3, libultra 2.0J) inside Docker to a ROM matching the retail SHA-1 hash (`cf806ff2603640a748fca5026ded28802f1f4a50`). The percentage counts code only. Textures, models, text, alignment padding and embedded data are excluded. The repo contains no game data, so you need your own USA ROM.

The author admits to little game development experience and weak C skills. The code relies on machine-generated output and hacks like `if (arg1 == 0) {} // FAKE: keeps arg1 in a1` to steer machine code generation. All 4,499 functions across boot, global, and overlay segments match byte-for-byte, and 21,500 of those bytes come from handwritten assembly. Variable and function names remain largely arbitrary.

To try building it, grab a USA ROM and run Docker:

```sh
docker compose build
tools/dk make setup BASEROM=donkey-kong.n64
tools/dk make
```

The build produces a matching ROM. Struct and function names still need cleaning up, and the author plans to work through them over the next couple of days.
