Star on GitHubStar1.1k stars

Case study

Metroid Prime: the PrimeDecomp matching GameCube decompilation

Reconstructs C++ source for Metroid Prime’s GameCube executable and its NES-emulator module so that CodeWarrior builds match the originals, across the USA, Korean, PAL and Japanese releases, with early configurations for demo discs and three Wii releases. Matched units are compiled from source and linked with objects split from the user’s disc, then checked against per-version SHA-1 hashes; the repository contains no game assets or assembly. The separately curated Metaforce and Metroid Prime Port build their native ports on this code.

Targets
Game
Category
Independent reconstruction cases
Relationship
Independent reconstruction project
Sources reviewed

Requirements & limits

  • Prerequisites: Building needs the user’s own disc image of the chosen version in its orig/ folder, in ISO (GCM), RVZ, WIA, WBFS, CISO, NFS, GCZ or TGC format, which can be deleted after the first build. The repository contains no game assets or assembly; decomp-toolkit splits the original executable and its embedded data locally. CONTRIBUTING lists Metaforce, a shared Ghidra server and a symbol map from an early demo disc as references for contributors.
  • Prerequisites: Builds run natively on Windows with Python and ninja; macOS needs ninja and Wine Crossover, and Linux uses ninja with the automatically downloaded wibo wrapper on x86 or Wine elsewhere. configure.py pins decomp-toolkit v1.8.4, objdiff v3.8.2, binutils 2.42-1, sjiswrap v1.2.2, wibo 1.0.3 and a 20251118 compiler bundle from files.decomp.dev, compiling game code with CodeWarrior GC/1.3.2, or Wii/1.0a for the Wii releases. The MusyX audio library comes from a submodule.
  • Scope: The reviewed main pin of 2026-10-19 updates objdiff to v3.8.2. README describes a work-in-progress decompilation supporting GM8E01_00 (USA v1.088), GM8E01_01 (USA v1.093), GM8E01_48 (Korea v1.097), GM8P01_00 (PAL v1.110), GM8J01_00 (Japan v1.111) and GM8E01_02 (USA v1.111); configure.py and CI also cover the Multi-Game Demo Disc, a Japanese demo and the Wii New Play Control and Trilogy releases. Output is the original main.dol and, for the six retail GameCube versions, the NES emulator REL, not a port; docs/metaforce.md explains how to convert code from Metaforce into matching C++98.
  • Testing evidence: The default build links source-built objects only for units marked Matching, uses original extracted objects for the rest and checks main.dol and the NES REL against the version’s build.sha1. decomp.dev’s reports for the pinned commit list 93.89% of GM8E01_00 code (16,478 of 16,685 functions) and 98.47% of its data matched, with 739 of 829 units complete; the other USA and Korean releases report 92.5–93.83% of code, PAL 84.37%, Japan 82.91%, and the demo and Wii builds early figures. CI builds all eleven configurations in a container that supplies the original files.
  • License: The repository carries CC0-1.0, which does not cover Nintendo’s game, the disc content or the downloaded compilers; the vendored zlib 1.1.3 keeps its own license and MusyX is a separate repository.

About this entry

The description was reviewed against primary sources.

Report an outdated entry Suggest a translation fix

Primary sources

  1. README.md GitHub · PrimeDecomp/prime · Revision 2fd3179
  2. configure.py GitHub · PrimeDecomp/prime · Revision 2fd3179
  3. tools/download_tool.py GitHub · PrimeDecomp/prime · Revision 2fd3179
  4. config/GM8E01_00/config.yml GitHub · PrimeDecomp/prime · Revision 2fd3179
  5. config/GM8E01_00/build.sha1 GitHub · PrimeDecomp/prime · Revision 2fd3179
  6. CONTRIBUTING.md GitHub · PrimeDecomp/prime · Revision 2fd3179
  7. docs/metaforce.md GitHub · PrimeDecomp/prime · Revision 2fd3179
  8. docs/nes-emulator.md GitHub · PrimeDecomp/prime · Revision 2fd3179
  9. .gitmodules GitHub · PrimeDecomp/prime · Revision 2fd3179
  10. .github/workflows/build.yml GitHub · PrimeDecomp/prime · Revision 2fd3179
  11. LICENSE GitHub · PrimeDecomp/prime · Revision 2fd3179
  12. https://decomp.dev/PrimeDecomp/prime
  13. https://web.archive.org/web/20261020042005/https://decomp.dev/PrimeDecomp/prime/GM8E01_00/2fd31790998c0486744a6289cac7e2fecc22d143.json
  14. https://web.archive.org/web/20261020042012/https://decomp.dev/PrimeDecomp/prime/GM8E01_01/2fd31790998c0486744a6289cac7e2fecc22d143.json
  15. https://web.archive.org/web/20261020042019/https://decomp.dev/PrimeDecomp/prime/GM8E01_02/2fd31790998c0486744a6289cac7e2fecc22d143.json
  16. https://web.archive.org/web/20261020042108/https://decomp.dev/PrimeDecomp/prime/GM8E01_48/2fd31790998c0486744a6289cac7e2fecc22d143.json
  17. https://web.archive.org/web/20261020042116/https://decomp.dev/PrimeDecomp/prime/GM8P01_00/2fd31790998c0486744a6289cac7e2fecc22d143.json
  18. https://web.archive.org/web/20261020042125/https://decomp.dev/PrimeDecomp/prime/GM8J01_00/2fd31790998c0486744a6289cac7e2fecc22d143.json

More in Games

All 318 entries in GamesGames case studies (239)

↑↓ move↵ open⌘↵ new tab