Using Coding Agents to Decompile Nintendo 64 Games (blog.chrislewis.au)

🤖 AI Summary
A developer working on a matching decompilation of Snowboard Kids 2 (an N64 game compiled to MIPS, likely with GCC 2.7.2) documents a human-led workflow augmented by coding agents (Claude, Codex). Matching decompilation here means writing C that, when compiled with the original toolchain/settings, reproduces the exact machine code (register use, delay slots, instruction order). The project uses decomp.me, a build-and-diff loop (./build.sh producing a 0–100% match score), object diffs, disassembly, and line mapping; a helper script spins up per-function agent environments (CLAUDE.md) so agents can iteratively propose base_n.c changes, build, analyse mismatches, and try small incremental fixes. All tooling is available on GitHub. The post highlights what agents do well (spotting high-level patterns, exploring many variations, bootstrapping CLI utilities) and where they fail (fine-grained arithmetic/struct offsets, C89 scoping rules, and reproducing exact compiler control flow in complex functions). Practical lessons: avoid force-feeding disassembly, RAG added little value over classic grep/ctags, and a "permuter" that explores nearby code variants can be useful only when matches are nearly complete. Bottom line: agents accelerate decompilation but are research assistants—not replacements—for human expertise and iterative reasoning.
Loading comments...
loading comments...