{
  "added_at": "2026-10-18",
  "additional_evidence_urls": [
    "https://github.com/n64decomp/perfect_dark/blob/169ed48bdcbfb3b568b028bd5bebb27680073514/Makefile",
    "https://github.com/n64decomp/perfect_dark/blob/169ed48bdcbfb3b568b028bd5bebb27680073514/LICENSE",
    "https://github.com/n64decomp/perfect_dark/blob/169ed48bdcbfb3b568b028bd5bebb27680073514/.gitmodules",
    "https://github.com/n64decomp/perfect_dark/blob/169ed48bdcbfb3b568b028bd5bebb27680073514/tools/extract",
    "https://github.com/n64decomp/perfect_dark/blob/169ed48bdcbfb3b568b028bd5bebb27680073514/checksums.ntsc-final.md5",
    "https://github.com/n64decomp/perfect_dark/blob/169ed48bdcbfb3b568b028bd5bebb27680073514/checksums.ntsc-beta.md5",
    "https://github.com/n64decomp/perfect_dark/blob/169ed48bdcbfb3b568b028bd5bebb27680073514/checksums.ntsc-1.0.md5",
    "https://github.com/n64decomp/perfect_dark/blob/169ed48bdcbfb3b568b028bd5bebb27680073514/checksums.pal-beta.md5",
    "https://github.com/n64decomp/perfect_dark/blob/169ed48bdcbfb3b568b028bd5bebb27680073514/checksums.pal-final.md5",
    "https://github.com/n64decomp/perfect_dark/blob/169ed48bdcbfb3b568b028bd5bebb27680073514/checksums.jpn-final.md5",
    "https://github.com/Emill/ido-static-recomp/blob/421e546956ceae984927e609b083195e9e81659e/README.md",
    "https://github.com/Emill/ido-static-recomp/blob/421e546956ceae984927e609b083195e9e81659e/ido/5.3/LICENSE.md",
    "https://ryandwyer.gitlab.io/pdstatus/",
    "https://gitlab.com/ryandwyer/perfect-dark/-/tree/46d3393bed1a3d5fbefbdba6df7237579b5c66e0"
  ],
  "category": "reconstruction-cases",
  "description_en": "Reconstructs Perfect Dark’s Nintendo 64 code with a documented matching-ROM build. The project combines reconstructed source with assets from a user-supplied original ROM, then checks version-specific artifact hashes. It is a reproducible-build research case, distinct from the separate native PC port; matching results remain project-reported here.",
  "description_zh": "重建 Perfect Dark 的 Nintendo 64 代码，并提供生成一致 ROM 的构建流程。项目将重建源码与使用者自备原 ROM 中的素材结合，再检查各版本产物的哈希。这是可复现构建研究案例，与独立的原生 PC 移植不同；此处的一致性结果仍为项目报告。",
  "entry_url": "https://awesomerea.org/resources/perfect-dark-matching-decomp-case/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/perfect-dark-matching-decomp-case/",
  "evidence_url": "https://github.com/n64decomp/perfect_dark/blob/169ed48bdcbfb3b568b028bd5bebb27680073514/README.md",
  "group": "cases",
  "id": "perfect-dark-matching-decomp-case",
  "json_url": "https://awesomerea.org/resources/perfect-dark-matching-decomp-case/record.json",
  "kind": "case-study",
  "markdown_url": "https://awesomerea.org/resources/perfect-dark-matching-decomp-case/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/perfect-dark-matching-decomp-case/index.md",
  "name": "Perfect Dark: matching Nintendo 64 decompilation",
  "name_zh": "Perfect Dark：生成一致 ROM 的 Nintendo 64 反编译重建",
  "reconstruction_method": "matching-decompilation",
  "record_type": "resource",
  "relationship": "independent-reconstruction",
  "requirement_facets": [
    "scope",
    "prerequisites",
    "prerequisites",
    "testing",
    "license"
  ],
  "requirements": [
    "The reviewed GitHub repository mirrors Ryan Dwyer’s GitLab project. README describes a complete matching decompilation; six build targets cover NTSC beta, NTSC 1.0/final, PAL beta/final and Japanese final, with ntsc-final as default. This reconstructs an N64 ROM, not a Windows/Linux/macOS game executable or the separate Perfect Dark PC port.",
    "Supply an independently authorized original ROM in non-byteswapped .z64 form, with header 0x80371240, named for the selected ROMID. make extract reads assets and comparison segments from that ROM; final builds also reuse extracted boot code. Existing extracted files are not overwritten, so modified inputs can invalidate matching results.",
    "The documented host setup is Linux: GNU Make, host C/C++ tools, Python 3, MIPS binutils/GCC, armips, Capstone development files and the listed 32-bit libc headers. Initialize the pinned ido-static-recomp submodule. Matching mode reconstructs IDO 5.3 and 7.1 compiler tools from its IRIX inputs; optional GCC builds are nonmatching and limited to ntsc-1.0/ntsc-final.",
    "After building, make test runs quiet MD5 verification against the selected version’s checksum manifest, including the final ROM and intermediate artifacts. The README also documents comparing base/built ROM hashes. The mutable status page reports all six versions complete/matching.",
    "The repository declares MIT for source; original ROMs and extracted game assets retain separate rights. Compiler components have their own terms, including the submodule’s SGI notice for IDO 5.3; the project’s MIT declaration does not replace them."
  ],
  "requirements_zh": [
    "所审阅的 GitHub 仓库是 Ryan Dwyer 的 GitLab 项目的镜像。README 将其描述为完整的一致性反编译重建；六个构建目标涵盖 NTSC 测试版、NTSC 1.0／最终版、PAL 测试版／最终版及日版最终版，默认 ntsc-final。产物为 N64 ROM，不是 Windows／Linux／macOS 游戏可执行文件，也不是独立的 Perfect Dark PC 移植。",
    "需自行取得获授权的原始 ROM，采用未交换字节序的 .z64 格式，文件头为 0x80371240，并按所选 ROMID 命名。make extract 从该 ROM 读取素材及用于比较的代码段；最终构建也复用提取的启动代码。已有提取文件不会被覆盖，因此修改后的输入可能破坏一致性结果。",
    "文档说明的构建宿主为 Linux：需 GNU Make、宿主 C／C++ 工具、Python 3、MIPS binutils／GCC、armips、Capstone 开发文件及列明的 32 位 libc 头文件。还需初始化固定版本的 ido-static-recomp 子模块。一致性模式使用其中的 IRIX 输入重建 IDO 5.3 和 7.1 编译器工具；可选 GCC 构建不保证匹配，且仅支持 ntsc-1.0／ntsc-final。",
    "构建后，make test 依据所选版本的校验清单，静默执行 MD5 校验，覆盖最终 ROM 及中间产物。README 也说明如何比较原 ROM 与构建 ROM 的哈希。可变的项目状态页报告六个版本均已完成且匹配。",
    "仓库声明源码采用 MIT；原 ROM 和提取的游戏素材仍有各自权利约束。编译器组件另有条款，包括子模块为 IDO 5.3 附带的 SGI 声明，项目的 MIT 声明不能替代这些条款。"
  ],
  "targets": [
    "game"
  ],
  "url": "https://github.com/n64decomp/perfect_dark",
  "verification": "source-reviewed",
  "verified_at": "2026-10-18"
}
