{
  "added_at": "2026-10-18",
  "additional_evidence_urls": [
    "https://github.com/SMGCommunity/Petari/blob/86ae7a3d3241adf07d5d3f9949e0462cccc583c1/configure.py",
    "https://github.com/SMGCommunity/Petari/blob/86ae7a3d3241adf07d5d3f9949e0462cccc583c1/CONTRIBUTING.md",
    "https://github.com/SMGCommunity/Petari/blob/86ae7a3d3241adf07d5d3f9949e0462cccc583c1/config/RMGK01/config.yml",
    "https://github.com/SMGCommunity/Petari/blob/86ae7a3d3241adf07d5d3f9949e0462cccc583c1/config/RMGK01/build.sha1",
    "https://github.com/SMGCommunity/Petari/blob/86ae7a3d3241adf07d5d3f9949e0462cccc583c1/.github/workflows/build.yml",
    "https://github.com/SMGCommunity/Petari/blob/86ae7a3d3241adf07d5d3f9949e0462cccc583c1/LICENSE",
    "https://decomp.dev/SMGCommunity/Petari",
    "https://web.archive.org/web/20261020041620/https://decomp.dev/SMGCommunity/Petari/RMGK01/86ae7a3d3241adf07d5d3f9949e0462cccc583c1.json",
    "https://web.archive.org/web/20261020041653/https://decomp.dev/SMGCommunity/Petari/RMGJ01/86ae7a3d3241adf07d5d3f9949e0462cccc583c1.json",
    "https://web.archive.org/web/20261020041719/https://decomp.dev/SMGCommunity/Petari/RMGE01/86ae7a3d3241adf07d5d3f9949e0462cccc583c1.json",
    "https://web.archive.org/web/20261020041726/https://decomp.dev/SMGCommunity/Petari/RMGP01/86ae7a3d3241adf07d5d3f9949e0462cccc583c1.json"
  ],
  "category": "reconstruction-cases",
  "description_en": "Reconstructs Super Mario Galaxy’s Wii code as C++ that rebuilds, object by object, against main.dol files extracted from the user’s own Japanese, North American, PAL or Korean disc. Matched objects are linked from source and checked with objdiff and a target hash. The project describes itself as a work in progress, separate from any PC port, and says it does not accept AI-generated decompilation.",
  "description_zh": "将 Super Mario Galaxy 的 Wii 代码重建为 C++，并以使用者从自有日版、北美版、PAL 版或韩版光盘中提取的 main.dol 为目标，逐个目标文件重建。已匹配的目标文件由源码链接，并通过 objdiff 和目标哈希检查。项目自称仍在进行中，与任何 PC 移植无关，并表示不接受 AI 生成的反编译代码。",
  "entry_url": "https://awesomerea.org/resources/petari-smg-decomp-case/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/petari-smg-decomp-case/",
  "evidence_url": "https://github.com/SMGCommunity/Petari/blob/86ae7a3d3241adf07d5d3f9949e0462cccc583c1/README.md",
  "group": "cases",
  "id": "petari-smg-decomp-case",
  "json_url": "https://awesomerea.org/resources/petari-smg-decomp-case/record.json",
  "kind": "case-study",
  "markdown_url": "https://awesomerea.org/resources/petari-smg-decomp-case/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/petari-smg-decomp-case/index.md",
  "name": "Petari: a matching Super Mario Galaxy decompilation",
  "name_zh": "Petari：Super Mario Galaxy 一致性反编译重建",
  "reconstruction_method": "matching-decompilation",
  "record_type": "resource",
  "relationship": "independent-reconstruction",
  "requirement_facets": [
    "scope",
    "prerequisites",
    "prerequisites",
    "testing",
    "attribution"
  ],
  "requirements": [
    "configure.py targets RMGJ01, RMGE01, RMGP01 and RMGK01, defaulting to the Korean RMGK01 build. Only objects marked Matching are linked unless --non-matching is used. For the reviewed commit, decomp.dev reported 100.00% of RMGK01 code decompiled with 68.75% fully linked, and 99.70% decompiled for the other three versions, with 55.61–58.17% linked. These figures are project-tracker results.",
    "Extract your own copy of the game for the chosen region with Dolphin into orig/RMG<region>01; only sys/main.dol is needed. The repository says it contains no game assets or assembly. Each version’s config records the expected DOL SHA-1 in config.yml and build.sha1.",
    "Builds need Python and Ninja on Windows, macOS or Linux; wibo runs the Windows tools on macOS and Linux. configure.py pins Metrowerks compiler packages from the GC 2.7–3.0a5.2 and Wii 1.0 families. The GitHub Actions workflow builds all four versions in a build container its comments call private.",
    "CONTRIBUTING.md requires 1:1 matching for objects marked as decompiled, objdiff checks and a successful link. Every non-matching function in a pull request must link a decomp.me scratch, and decompiler output must not be copied directly. The README credits doldecomp bte, zeldaret tp (JSystem) and ogws as sources of code and headers.",
    "The README states that AI or LLMs played no role in the decompilation and limits permitted AI use to cleanup, formatting, documentation and naming. That is a project statement. The repository declares CC0-1.0, while Nintendo content, extracted files and toolchains keep separate rights. The separate AstroCore PC port mentioned in the README has no public source here."
  ],
  "requirements_zh": [
    "configure.py 支持 RMGJ01、RMGE01、RMGP01 和 RMGK01，默认构建韩版 RMGK01。除非使用 --non-matching，否则只链接标记为 Matching 的目标文件。在所审阅的提交上，decomp.dev 报告 RMGK01 代码已反编译 100.00%、完全链接 68.75%；其余三个版本反编译 99.70%，链接比例为 55.61%–58.17%。这些是项目进度追踪结果。",
    "需用 Dolphin 将自有游戏中所选地区的版本提取到 orig/RMG<地区>01，只需要 sys/main.dol。仓库声明不包含任何游戏素材或汇编。各版本配置在 config.yml 和 build.sha1 中记录预期的 DOL SHA-1。",
    "构建需在 Windows、macOS 或 Linux 上安装 Python 和 Ninja；在 macOS 和 Linux 上通过 wibo 运行 Windows 工具。configure.py 固定使用 GC 2.7–3.0a5.2 与 Wii 1.0 系列的 Metrowerks 编译器包。GitHub Actions 工作流在注释所称的私有构建容器中构建全部四个版本。",
    "CONTRIBUTING.md 要求标记为已反编译的目标文件必须 1:1 匹配，须通过 objdiff 检查并成功链接。拉取请求中的每个非一致函数都必须附上 decomp.me 草稿链接，且不得直接复制反编译器输出。README 注明部分代码和头文件来自 doldecomp bte、zeldaret tp（JSystem）及 ogws。",
    "README 声明 AI／LLM 未参与反编译，并将允许的 AI 用途限于代码清理、格式化、文档和命名。这是项目自述。仓库声明采用 CC0-1.0，任天堂内容、提取的文件及工具链另有权利约束。README 提到的独立 PC 移植 AstroCore 在此没有公开源码。"
  ],
  "targets": [
    "game"
  ],
  "url": "https://github.com/SMGCommunity/Petari",
  "verification": "source-reviewed",
  "verified_at": "2026-10-18"
}
