# Petari: a matching Super Mario Galaxy decompilation

> 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.

- Type: Case study
- Targets: Game
- Category: Independent reconstruction cases
- Relationship: Independent reconstruction project
- Sources reviewed: 2026-10-18
- Added to the catalog: 2026-10-18
- Original resource: <https://github.com/SMGCommunity/Petari>
- Primary source: <https://github.com/SMGCommunity/Petari/blob/86ae7a3d3241adf07d5d3f9949e0462cccc583c1/README.md>
- Catalog page: <https://awesomerea.org/resources/petari-smg-decomp-case/>
- Record JSON: <https://awesomerea.org/resources/petari-smg-decomp-case/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/petari-smg-decomp-case/index.md)

## Requirements & limits

- **Prerequisites:** 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.
- **Prerequisites:** 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.
- **Scope:** 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.
- **Testing evidence:** 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.
- **Attribution:** 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.

## Primary sources

1. <https://github.com/SMGCommunity/Petari/blob/86ae7a3d3241adf07d5d3f9949e0462cccc583c1/README.md>
2. <https://github.com/SMGCommunity/Petari/blob/86ae7a3d3241adf07d5d3f9949e0462cccc583c1/configure.py>
3. <https://github.com/SMGCommunity/Petari/blob/86ae7a3d3241adf07d5d3f9949e0462cccc583c1/CONTRIBUTING.md>
4. <https://github.com/SMGCommunity/Petari/blob/86ae7a3d3241adf07d5d3f9949e0462cccc583c1/config/RMGK01/config.yml>
5. <https://github.com/SMGCommunity/Petari/blob/86ae7a3d3241adf07d5d3f9949e0462cccc583c1/config/RMGK01/build.sha1>
6. <https://github.com/SMGCommunity/Petari/blob/86ae7a3d3241adf07d5d3f9949e0462cccc583c1/.github/workflows/build.yml>
7. <https://github.com/SMGCommunity/Petari/blob/86ae7a3d3241adf07d5d3f9949e0462cccc583c1/LICENSE>
8. <https://decomp.dev/SMGCommunity/Petari>
9. <https://web.archive.org/web/20261020041620/https://decomp.dev/SMGCommunity/Petari/RMGK01/86ae7a3d3241adf07d5d3f9949e0462cccc583c1.json>
10. <https://web.archive.org/web/20261020041653/https://decomp.dev/SMGCommunity/Petari/RMGJ01/86ae7a3d3241adf07d5d3f9949e0462cccc583c1.json>
11. <https://web.archive.org/web/20261020041719/https://decomp.dev/SMGCommunity/Petari/RMGE01/86ae7a3d3241adf07d5d3f9949e0462cccc583c1.json>
12. <https://web.archive.org/web/20261020041726/https://decomp.dev/SMGCommunity/Petari/RMGP01/86ae7a3d3241adf07d5d3f9949e0462cccc583c1.json>

## More in Games

- [Phantom Hourglass: an early-stage matching Nintendo DS decompilation](https://awesomerea.org/resources/phantom-hourglass-ds-decomp-case/index.md) · Case study
- [Pikmin 2: a fully matched GameCube decompilation across five releases](https://awesomerea.org/resources/pikmin-2-matching-decomp-case/index.md) · Case study
- [pokecrystal: a matching Pokémon Crystal disassembly](https://awesomerea.org/resources/pokecrystal-disassembly-case/index.md) · Case study
- [pokered: a matching Pokémon Red and Blue disassembly](https://awesomerea.org/resources/pokered-disassembly-case/index.md) · Case study
- [pokeruby: a matching Pokémon Ruby and Sapphire decompilation](https://awesomerea.org/resources/pokeruby-decomp-case/index.md) · Case study
- [Pokémon Emerald: a matching Game Boy Advance decompilation](https://awesomerea.org/resources/pokemon-emerald-decomp-case/index.md) · Case study

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
