Klonoa: Empire of Dreams (GBA) · Partial · Source available

Started a decompilation from zero: Claude Code and 51% of a 2001 GBA game

Can I play it?
Partial
Original game
Game Boy Advance
You need
Your own copy of the game. I never link game files.
What it is
Decompilation
View JSON
Klonoa: Empire of Dreams (GBA): A GBA decompilation started from zero, now past halfway.
Image: gambiconf.substack.com

Who did what

194 of 313 commits credit an AI: 102 Claude Opus 4.6, 44 Claude Opus 4.8, 39 Claude Opus 4.7, 8 Claude Opus 5. They were made on 23 separate days between 15 Mar 2026 and 5 Oct 2026.

Counted from the public git history on 16 Nov 2026. How

When stuck, the agent forked the compiler and used register pins to force matches; the author first accepted one such fork before a later PR showed it was unnecessary, and experienced decompers rejected the cheats. The author built asmlift, Transmuter and gba-kit, wrote the loop prompt and reads every report.

What was done

With custom tooling around it, Claude Code did most of the decompiling of Klonoa: Empire of Dreams, reaching 51% of code bytes.

Macabeus started a matching decompilation of Klonoa: Empire of Dreams, a Game Boy Advance game from July 2001, and had Claude Code do most of the work, with custom tooling around the agent. The write-up, dated 17 August 2026, says the project reached 51% of the game's code bytes decompiled (51 percent) and 663 identified functions; the README links a decomp.dev progress page for the live figure. The AI commit census counts 194 of 313 commits with AI credit (mostly Claude Opus 4.6, 4.8 and 4.7), from 15 March to 5 October 2026.

Scaffolding and the loop

Claude Code wrote the scaffolding: a generate_asm.py script, the Makefile and the linker script. No ROM-derived assets go into Git, and function splits, names and data regions live in TOML files that the generator reads. The Luvdis disassembler found 93 functions, Ghidra added about 300, and further AI-assisted searching brought the total to 663 after false positives were removed. The compiler is agbcc, a GCC 2.95 fork.

The decompilation loop, whose prompt is linked from the asmlift repository, works like this: Claude Code picks a batch of functions, asmlift (the author's programmatic decompiler) attempts them, Transmuter helps when a match fails, the gba-kit emulator is used to improve names, adversarial subagents review the code, and the batch is merged as one PR with a report. objdiff measures how closely the C matches the original assembly. Cleaner functions from testyourmine's earlier kleod work were imported to set a quality bar.

What came out

Along the way Claude Code found a hidden minigame on the "Clear Save Data" screen that had gone unnoticed for 25 years. Open problems include fragmented functions from a splitting bug, jump tables mistaken for code, and AI-written C that is messier and more verbose than hand-written matches. The author names cognitive debt as the main risk and plans a cleanup phase next.

To build, you need your own copy of the USA ROM as baserom.gba, the ARM GNU toolchain, GNU Make, Python 3.13 or newer and a host C compiler, which setup.sh uses to build the agbcc fork. A successful build prints klonoa-eod.gba: OK, which confirms a byte-identical match against the original ROM. Mizuchi is optional, for browsing and decompiling functions automatically.

Sources:

  • https://github.com/Dream-Atelier/kl-eod-decomp
  • https://gambiconf.substack.com/p/starting-a-decompilation-project

Discussion

Your library

Sources

Sources reviewed · Added

An AI model drafted this entry from the sources above. Checked against the sources on 13 Oct 2026. The figures are the author's. How entries are checked. Something wrong? Tell me.

The weekly dump: new projects, once a week