logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·31.10.26
← Back to news

Decompiling a Nintendo 64 Game in 84 Days

Original article
blog.chrislewis.au|58 points|17 comments|by knackers|Aug 27, 2026

Decompiling a Nintendo 64 Game in 84 Days

I am thrilled to announce that the original Snowboard Kids has been 100% decompiled!

What does "100% decompiled" actually mean? It signifies that every single function in the game now has a corresponding implementation in C. When this C code is compiled, it generates machine code that is bit-for-bit identical to the original retail game.

Acknowledgments

This achievement was a team effort. I owe a huge debt of gratitude to the following individuals:

  • Primary Contributors: inspectredc, Bl00D4NGEL, and queueRAM.
  • Token Benefactors: iFuzzle, JamesBLewis, and douglasjv.

Why This Matters

The goal of this project is to provide the Snowboard Kids community with a comprehensive resource. Specifically:

  1. Speedrunning: By analyzing the source, runners can understand the mechanics behind CPU pathing\text{CPU pathing}CPU pathing and the specific variables that dictate player velocity.
  2. Modding: A full source allows for more sophisticated modifications.
  3. Preservation: It enables static recompilation for modern platforms.

Project Comparison

The speed of this project was remarkable. While Snowboard Kids 2 took 596 days, this project was finished in just 84.

GameDays to DecompileFunction CountCompiler Used
Snowboard Kids842,145IDO 5.3
Snowboard Kids 25962,995GCC 2.7.2
Pilotwings 6474≈1,800\approx 1,800≈1,800Various

It would be a mistake to say this was solely due to LLMs. While AI helped, several other factors played a role.


The Technical Challenge: IDO vs. GCC

I wasn't starting from zero; I had nearly two years of experience from previous projects. However, I faced a significant hurdle: the compiler.

  • GCC 2.7.2: An open-source compiler that is well-documented and actively studied.
  • IDO 5.3: A proprietary SGI compiler.

Because IDO was closed-source and tied to ancient SGI hardware, the community had to reverse-engineer the toolchain itself to make it run on modern machines. IDO is notoriously "aggressive" with its optimization passes.

The IDO Struggle: Small changes in C code can cause a "ripple effect" through the optimization passes, completely altering the register allocation. This makes matching the original binary more of an art than a science.

The Workflow

The general process for both me and my AI agents followed this logic:


The Role of AI Agents

For this project, I utilized frontier models and a sophisticated agent harness.

1. Low-Hanging Fruit: Library Code

Agents were exceptionally good at identifying standard library functions. Snowboard Kids utilizes:

  • libultra (Nintendo's standard library)
  • libmus (Audio library)

The Strategy: Instead of letting the AI guess the logic from scratch, I instructed the agents to:

  • Identify the function via N64Sym.
  • Reference existing SDK source code.
  • Test various SDK versions and compiler flags.
  • Only attempt a custom implementation if the SDK source failed.

2. Automated Matching

I had an agent develop a script to run m2c (a matching tool) against every unmatched function.

// Conceptual logic of the automation script
for (function in unmatched_functions) {
    if (m2c_check(function) == EXACT_MATCH) {
        integrate_match(function);
    }
}

The success rate was mathematically low: Success Rate=17 matches1,830 functions≈0.93%\text{Success Rate} = \frac{17 \text{ matches}}{1,830 \text{ functions}} \approx 0.93\%Success Rate=1,830 functions17 matches​≈0.93%

Despite the low percentage, this was far more cost-effective than spending expensive agent tokens on every single function.

N64 Hardware Placeholder

The journey of decompiling IDO-compiled games continues to be a challenge, but the tools are getting better.