WTF = What The Function free · open source · runs on your computer
Your AI agent decompiles your N64 games. Byte for byte.
Pick a ROM you own, connect the agent you already use, and watch it turn the game back into C, one function at a time. Every function is compiled with the game's original compiler and has to reproduce your ROM exactly.
curl -fsSL https://decomp.wtf/install.sh | bashirm https://decomp.wtf/install.ps1 | iexPaste into Terminal. Installs everything and opens the app. Read the script
Paste into PowerShell. Installs everything and opens the app. Read the script
How it works
Three steps. Then you watch.
-
1
Drop in your ROM
decomp.wtf finds every function and every piece of data in the game's code, and works out which compiler built it (IDO or KMC GCC). The ROM stays on your computer.
-
2
Pick your agent
Claude Code, Codex, Gemini CLI, opencode, or any model with an API key. Run several at once: each one takes a different function, and they share what they learn.
-
3
Watch it match
A live map of the whole game fills in green. You see the C each agent writes, the score dropping to zero, the names it gives things. Export the source whenever you want.
The rule
A match means identical. Not similar.
An AI that explains code can be confidently wrong. This can't. Each attempt is compiled with the game's own 1990s compiler, linked at the function's real address, and compared with your ROM, byte by byte. Strings, tables and constants the code defines are checked too.
- Score 0 means the C compiles to exactly the bytes in the cartridge. Only then does a function count.
- Every score above zero comes with an instruction diff, so the agent knows what to fix next.
- Shared knowledge (struct layouts, prototypes, names) is only accepted if every function matched so far still matches.
800007D0 slt $v0, $a0, $a1 800007D4 bnez $v0, .L800007EC 800007D8 addu $v0, $a1, $zero 800007DC addu $v0, $a2, $zero 800007E0 slt $v1, $v0, $a0 800007E4 beql $v1, $zero, .L800007EC 800007E8 addu $v0, $a0, $zero .L800007EC: 800007EC jr $ra 800007F0 nop
s32 clamp_s32(s32 v, s32 lo, s32 hi) {
if (v < lo) {
return lo;
}
if (v > hi) {
return hi;
}
return v;
}
Agents
Bring the agent you already pay for.
decomp.wtf is free. Agents run on your own subscription or API credits. In our tests a small function cost Claude Code about 8 cents; DeepSeek costs a fraction of that.
Agents work only through decomp.wtf's tools: no shell, no access to your files. The app installs missing agents for you and tells you how to sign in.
What every agent gets
The tools and know-how decomp veterans use, wired in.
- The game's compilerKMC GCC 2.7.2 and IDO 5.3 / 7.1, pinned and checksum-verified
- A first draftm2c turns each function's assembly into rough C to start from
- A shared headerstructs and prototypes, regression-tested before they're accepted
- Renames that can't breakmatching works by address, so naming things is always safe
- Data inspectorstrings, tables, floats and pointers read straight from the ROM
- Call graphwho calls what, and which data each function touches
- Notes and handoffsa stuck agent leaves notes; the next one starts from its best attempt
- Built-in guidesMIPS, IDO and GCC matching tricks, structs, N64 memory map
Your ROM, your computer
Nothing leaves your machine. Nothing is provided.
Runs locally
No account, no telemetry. decomp.wtf never sends your ROM or your results to us or anyone else.
Your agent sees the code
Whichever AI you connect receives the assembly and C it works on, like any code you ask it about. Pick a provider you're comfortable with.
Bring your own game
Use it with games you own, for example dumped from your own cartridge. decomp.wtf doesn't supply, find or download ROMs, and doesn't touch copy protection.
Keep it for yourself
Decompiled code of a commercial game still belongs to its rights holder. Study it, enjoy it, don't publish it. Try everything first with the included demo ROM.
Download
One line. It sets up everything.
The installer gets the app, the compilers and the decompiler, adds decomp.wtf to your apps and opens it. Your agent is the only thing you bring.
macOS & Linux
curl -fsSL https://decomp.wtf/install.sh | bashmacOS 12 or later (Apple Silicon and Intel), Linux x86-64. Read install.sh
Windows
irm https://decomp.wtf/install.ps1 | iexWindows 10 or 11, in PowerShell. IDO games work natively; KMC GCC has no Windows build yet. Read install.ps1
What exactly does the installer do?
- Installs uv, Astral's Python tool manager, if you don't have it.
- Installs decomp.wtf (MIT licensed) with uv, in its own environment.
- Downloads the free compilers and m2c, each verified against a pinned checksum. IDO is proprietary: the app asks before installing it.
- Adds decomp.wtf to your apps and opens it in your browser, served from your own computer.
Remove it with uv tool uninstall decompnet. Your projects are in the Decomp folder in your home folder.
Questions
Good to know
Which games work?
N64 games whose main code isn't compressed, built with KMC GCC 2.7.2 or IDO 5.3 / 7.1, which covers most of the library. Code loaded later (overlays) and compressed code come in a later version, and so do other consoles.
Is this legal?
decomp.wtf is a tool, like a disassembler: it runs on your computer and contains no game code. How you use it is up to you and the law where you live. In the EU, decompiling software is only allowed in narrow cases (Directive 2009/24/EC, Article 6), and publishing decompiled code of a commercial game is not. Use games you own, keep the results to yourself. This is not legal advice.
Do I need to know anything about decompilation?
No. The agent does the work, and the app explains what you're looking at. If you do know MIPS, you can follow every attempt live and jump in.
Can I use a local model?
Yes: point the built-in agent at Ollama or LM Studio. Matching is hard, so small local models get fewer functions than the big ones, but it costs nothing and nothing leaves your machine.
Why insist on byte-for-byte?
Because it's checkable. Code that "looks right" can hide mistakes; code that compiles to the identical bytes is, by definition, a faithful version of the original. It's the standard the decompilation community uses.
Why "decomp.wtf"?
WTF stands for What The Function: what everyone says the first time they stare at a page of MIPS assembly. decomp.wtf answers it, one function at a time, with C that compiles back to the exact same bytes.
What does it build on?
splat and spimdisasm to split ROMs, m2c for first drafts, the community's recompiled period compilers, and ideas from asm-differ, decomp.me and decomp-permuter. decomp.wtf is not affiliated with any of them.