Yet another GameCube/Wii decompilation toolkit.
decomp-toolkit functions both as a command-line tool for developers, and as a replacement for various parts of a decompilation project's build system.
- Automate as much as possible, allowing developers to focus on matching code rather than months-long tedious setup.
- Provide highly accurate and performant analysis and tooling.
- Provide everything in a single portable binary. This simplifies project setup: a script can simply fetch the binary from GitHub.
- Replace common usages of msys2 and GNU assembler, eliminating the need to depend on devkitPro.
- Integrate well with other decompilation tooling like objdiff and decomp.me.
The goal of a matching decompilation project is to write C/C++ code that compiles back to the exact same binary as the original game. This often requires using the same compiler as the original game. (For GameCube and Wii, Metrowerks CodeWarrior)
When compiling C/C++ code, the compiler (in our case, mwcceppc
) generates an object file (.o
) for every source file.
This object file contains the compiled machine code, as well as information that the linker (mwldeppc
) uses to
generate the final executable.
One way to verify that our code is a match is by taking any code that has been decompiled, and
linking it alongside portions of the original binary that have not been decompiled yet. First, we create relocatable
objects from the original binary: