{
  "added_at": "2026-10-19",
  "additional_evidence_urls": [
    "https://github.com/PrimeDecomp/prime/blob/2fd31790998c0486744a6289cac7e2fecc22d143/configure.py",
    "https://github.com/PrimeDecomp/prime/blob/2fd31790998c0486744a6289cac7e2fecc22d143/tools/download_tool.py",
    "https://github.com/PrimeDecomp/prime/blob/2fd31790998c0486744a6289cac7e2fecc22d143/config/GM8E01_00/config.yml",
    "https://github.com/PrimeDecomp/prime/blob/2fd31790998c0486744a6289cac7e2fecc22d143/config/GM8E01_00/build.sha1",
    "https://github.com/PrimeDecomp/prime/blob/2fd31790998c0486744a6289cac7e2fecc22d143/CONTRIBUTING.md",
    "https://github.com/PrimeDecomp/prime/blob/2fd31790998c0486744a6289cac7e2fecc22d143/docs/metaforce.md",
    "https://github.com/PrimeDecomp/prime/blob/2fd31790998c0486744a6289cac7e2fecc22d143/docs/nes-emulator.md",
    "https://github.com/PrimeDecomp/prime/blob/2fd31790998c0486744a6289cac7e2fecc22d143/.gitmodules",
    "https://github.com/PrimeDecomp/prime/blob/2fd31790998c0486744a6289cac7e2fecc22d143/.github/workflows/build.yml",
    "https://github.com/PrimeDecomp/prime/blob/2fd31790998c0486744a6289cac7e2fecc22d143/LICENSE",
    "https://decomp.dev/PrimeDecomp/prime",
    "https://web.archive.org/web/20261020042005/https://decomp.dev/PrimeDecomp/prime/GM8E01_00/2fd31790998c0486744a6289cac7e2fecc22d143.json",
    "https://web.archive.org/web/20261020042012/https://decomp.dev/PrimeDecomp/prime/GM8E01_01/2fd31790998c0486744a6289cac7e2fecc22d143.json",
    "https://web.archive.org/web/20261020042019/https://decomp.dev/PrimeDecomp/prime/GM8E01_02/2fd31790998c0486744a6289cac7e2fecc22d143.json",
    "https://web.archive.org/web/20261020042108/https://decomp.dev/PrimeDecomp/prime/GM8E01_48/2fd31790998c0486744a6289cac7e2fecc22d143.json",
    "https://web.archive.org/web/20261020042116/https://decomp.dev/PrimeDecomp/prime/GM8P01_00/2fd31790998c0486744a6289cac7e2fecc22d143.json",
    "https://web.archive.org/web/20261020042125/https://decomp.dev/PrimeDecomp/prime/GM8J01_00/2fd31790998c0486744a6289cac7e2fecc22d143.json"
  ],
  "category": "reconstruction-cases",
  "description_en": "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.",
  "description_zh": "为《密特罗德 Prime》GameCube 版的可执行文件及其 NES 模拟器模块重建 C++ 源码，使 CodeWarrior 编译结果与原文件一致，涵盖美版、韩版、PAL 版与日版，另有针对体验版光盘和三个 Wii 版本的早期配置。已匹配的单元由源码编译，再与从使用者光盘中拆分出的对象链接，并按各版本的 SHA-1 哈希校验；仓库不含游戏素材或汇编。另行收录的 Metaforce 与 Metroid Prime Port 都在这份代码之上构建原生移植。",
  "entry_url": "https://awesomerea.org/resources/primedecomp-metroid-prime-decomp-case/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/primedecomp-metroid-prime-decomp-case/",
  "evidence_url": "https://github.com/PrimeDecomp/prime/blob/2fd31790998c0486744a6289cac7e2fecc22d143/README.md",
  "group": "cases",
  "id": "primedecomp-metroid-prime-decomp-case",
  "json_url": "https://awesomerea.org/resources/primedecomp-metroid-prime-decomp-case/record.json",
  "kind": "case-study",
  "markdown_url": "https://awesomerea.org/resources/primedecomp-metroid-prime-decomp-case/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/primedecomp-metroid-prime-decomp-case/index.md",
  "name": "Metroid Prime: the PrimeDecomp matching GameCube decompilation",
  "name_zh": "《密特罗德 Prime》：PrimeDecomp 的 GameCube 版一致性反编译",
  "reconstruction_method": "matching-decompilation",
  "record_type": "resource",
  "relationship": "independent-reconstruction",
  "requirement_facets": [
    "scope",
    "prerequisites",
    "prerequisites",
    "testing",
    "license"
  ],
  "requirements": [
    "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.",
    "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.",
    "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.",
    "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.",
    "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."
  ],
  "requirements_zh": [
    "所审阅的 main 分支固定版本日期为 2026 年 10 月 19 日，该提交将 objdiff 更新到 v3.8.2。README 将其描述为进行中的反编译，支持 GM8E01_00（美版 v1.088）、GM8E01_01（美版 v1.093）、GM8E01_48（韩版 v1.097）、GM8P01_00（PAL 版 v1.110）、GM8J01_00（日版 v1.111）和 GM8E01_02（美版 v1.111）；configure.py 与 CI 还涵盖 Multi-Game Demo Disc、一个日本体验版，以及 Wii 上的 New Play Control 版和三部曲合集。产物是原始的 main.dol，以及六个零售 GameCube 版本各自的 NES 模拟器 REL，而非移植；docs/metaforce.md 说明如何把 Metaforce 的代码改写为能一致编译的 C++98。",
    "构建需要把使用者自备的所选版本光盘镜像放入对应的 orig/ 目录，格式可为 ISO（GCM）、RVZ、WIA、WBFS、CISO、NFS、GCZ 或 TGC，首次构建后即可删除。仓库不含游戏素材或汇编；decomp-toolkit 在本地拆分原始可执行文件及其内嵌数据。CONTRIBUTING 为贡献者列出的参考资料包括 Metaforce、一个共享 Ghidra 服务器，以及早期体验版光盘中附带的符号表。",
    "在 Windows 上可直接用 Python 与 ninja 构建；macOS 需要 ninja 和 Wine Crossover；Linux 需要 ninja，在 x86 上会自动下载 wibo 包装器，其他架构则使用 Wine。configure.py 固定 decomp-toolkit v1.8.4、objdiff v3.8.2、binutils 2.42-1、sjiswrap v1.2.2、wibo 1.0.3，以及从 files.decomp.dev 下载的 20251118 编译器包；游戏代码用 CodeWarrior GC/1.3.2 编译，Wii 版本则用 Wii/1.0a。MusyX 音频库来自子模块。",
    "默认构建只对标为 Matching 的单元链接由源码编译的对象，其余单元使用从原文件提取的对象，再按该版本的 build.sha1 校验 main.dol 与 NES REL。decomp.dev 针对该固定提交的报告显示，GM8E01_00 有 93.89% 的代码（16,685 个函数中的 16,478 个）与 98.47% 的数据已匹配，829 个单元中 739 个已完成；其他美版与韩版的代码匹配率为 92.5%–93.83%，PAL 版为 84.37%，日版为 82.91%，体验版与 Wii 版仍处于早期。CI 在提供原始文件的容器中构建全部十一种配置。",
    "仓库采用 CC0-1.0，不涵盖任天堂的游戏、光盘内容或下载的编译器；仓库内附带的 zlib 1.1.3 保留其自身许可，MusyX 则是独立仓库。"
  ],
  "targets": [
    "game"
  ],
  "url": "https://github.com/PrimeDecomp/prime",
  "verification": "source-reviewed",
  "verified_at": "2026-10-19"
}
