{
  "added_at": "2026-10-19",
  "additional_evidence_urls": [
    "https://github.com/Mikompilation/Himuro/blob/595b082aef19c329a25dc6926e4ac638d13ed75d/LICENSE",
    "https://github.com/Mikompilation/Himuro/blob/595b082aef19c329a25dc6926e4ac638d13ed75d/configure.py",
    "https://github.com/Mikompilation/Himuro/blob/595b082aef19c329a25dc6926e4ac638d13ed75d/Makefile",
    "https://github.com/Mikompilation/Himuro/blob/595b082aef19c329a25dc6926e4ac638d13ed75d/config/us/checksum.sha1",
    "https://github.com/Mikompilation/Himuro/blob/595b082aef19c329a25dc6926e4ac638d13ed75d/config/us/report.json",
    "https://github.com/Mikompilation/Himuro/blob/595b082aef19c329a25dc6926e4ac638d13ed75d/config/eu/report.json",
    "https://github.com/Mikompilation/Himuro/blob/595b082aef19c329a25dc6926e4ac638d13ed75d/config/jp/report.json",
    "https://github.com/Mikompilation/Himuro/blob/595b082aef19c329a25dc6926e4ac638d13ed75d/config/us/bin_patches.json",
    "https://github.com/Mikompilation/Himuro/blob/595b082aef19c329a25dc6926e4ac638d13ed75d/config/eu/bin_patches.json",
    "https://github.com/Mikompilation/Himuro/blob/595b082aef19c329a25dc6926e4ac638d13ed75d/config/us/asm_patches.json",
    "https://github.com/Mikompilation/Himuro/blob/595b082aef19c329a25dc6926e4ac638d13ed75d/tools/python/fix_bin_matching.py",
    "https://github.com/Mikompilation/Himuro/blob/595b082aef19c329a25dc6926e4ac638d13ed75d/tools/python/fix_report.py",
    "https://github.com/Mikompilation/Himuro/blob/595b082aef19c329a25dc6926e4ac638d13ed75d/.github/workflows/progress.yml"
  ],
  "category": "reconstruction-cases",
  "description_en": "Reconstructs Fatal Frame’s PS2 executable as C for the US, EU and Japanese releases, built with the original EE-GCC 2.9 toolchain and checked by SHA-1 against the user’s own executables. Committed objdiff reports list the US and EU code as fully matched and the Japanese code as partial, and a few routines still rely on assembly or byte patches. Porting to modern hardware is a stated later goal, not part of this repository.",
  "description_zh": "将 Fatal Frame（《零》）PS2 可执行文件的美版、欧版和日版重建为 C，使用原始的 EE-GCC 2.9 工具链构建，并以使用者自备可执行文件的 SHA-1 校验结果。仓库提交的 objdiff 报告显示美版和欧版代码已全部匹配、日版仅部分匹配，少数例程仍依赖汇编或字节补丁。移植到现代硬件是项目声明的后续目标，不在本仓库范围内。",
  "entry_url": "https://awesomerea.org/resources/himuro-fatal-frame-decomp-case/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/himuro-fatal-frame-decomp-case/",
  "evidence_url": "https://github.com/Mikompilation/Himuro/blob/595b082aef19c329a25dc6926e4ac638d13ed75d/README.md",
  "group": "cases",
  "id": "himuro-fatal-frame-decomp-case",
  "json_url": "https://awesomerea.org/resources/himuro-fatal-frame-decomp-case/record.json",
  "kind": "case-study",
  "markdown_url": "https://awesomerea.org/resources/himuro-fatal-frame-decomp-case/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/himuro-fatal-frame-decomp-case/index.md",
  "name": "Himuro: a matching Fatal Frame PS2 decompilation",
  "name_zh": "Himuro：Fatal Frame（《零》）PS2 一致性反编译",
  "reconstruction_method": "matching-decompilation",
  "record_type": "resource",
  "relationship": "independent-reconstruction",
  "requirement_facets": [
    "scope",
    "prerequisites",
    "prerequisites",
    "testing",
    "license"
  ],
  "requirements": [
    "Covers SLUS_203.88 (US), SLES_508.21 (EU) and SLPS_250.74 (JP); the output is a rebuilt PS2 ELF, not a PC port, which the README names only as a later goal. After the project’s own report-adjustment script, the committed objdiff reports list 3,437 of 3,437 US and 3,464 of 3,464 EU functions with all code and data matched, but 2,712 of 3,394 JP functions (73.64% of code). The README’s decomp.dev badges are mutable.",
    "Copy the matching main executable from your own disc or ISO into config/<region>/; the README gives the required SHA-1 for each region. Data extraction, splitting and the expected assembly are generated locally, and no game assets are committed.",
    "Linux is required: Python 3.8+ in a virtual environment, make, i386 libc/libstdc++ for the committed 32-bit EE-GCC 2.9-991111-01 compiler, and the decompals PS2 binutils v0.10 installed separately; objdiff-cli is also committed. Each region is extracted, configured and built separately.",
    "The ninja build runs sha1sum against config/<region>/checksum.sha1, so a successful build reproduces the supplied executable. To reach that hash, the build rewrites selected compiler output from asm_patches.json and copies listed byte ranges from the original executable into the built file (PhotoScoreCount in US and EU, DspSpData in EU). CI only uploads the committed reports and cannot build without the executables.",
    "MIT license for the project; Fatal Frame and its executables retain separate rights, and the committed compiler binaries keep their own terms."
  ],
  "requirements_zh": [
    "涵盖 SLUS_203.88（美版）、SLES_508.21（欧版）和 SLPS_250.74（日版）；产物是重建的 PS2 ELF，而非 PC 移植，README 只把移植列为后续目标。经项目自带的报告调整脚本处理后，已提交的 objdiff 报告显示美版 3,437 个函数、欧版 3,464 个函数全部匹配，代码与数据均为 100%；日版则为 3,394 个函数中匹配 2,712 个（代码 73.64%）。README 中的 decomp.dev 徽章会随时变化。",
    "需从自有光盘或 ISO 将对应的主可执行文件复制到 config/<地区>/ 中，README 给出了各地区所需的 SHA-1。数据提取、代码拆分和预期汇编都在本地生成，仓库不提交游戏素材。",
    "必须使用 Linux：需虚拟环境中的 Python 3.8+、make、供仓库内 32 位 EE-GCC 2.9-991111-01 编译器运行的 i386 libc／libstdc++，以及另行安装的 decompals PS2 binutils v0.10；仓库也提交了 objdiff-cli。各地区版本需分别提取、配置和构建。",
    "ninja 构建会依据 config/<地区>/checksum.sha1 运行 sha1sum，因此构建成功即重现所提供的可执行文件。为达到该哈希，构建会按 asm_patches.json 改写部分编译器输出，并把列出的字节范围从原始可执行文件复制到构建产物中（美版与欧版的 PhotoScoreCount、欧版的 DspSpData）。CI 只上传已提交的报告，没有可执行文件就无法构建。",
    "项目采用 MIT 许可；Fatal Frame 及其可执行文件另有权利约束，仓库中的编译器二进制文件也适用各自条款。"
  ],
  "targets": [
    "game"
  ],
  "url": "https://github.com/Mikompilation/Himuro",
  "verification": "source-reviewed",
  "verified_at": "2026-10-18"
}
