Case study
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.
Requirements and limitations
- 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, not a complete source-built game.
- 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. This collection did not build or diff the project.
- 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, not something this review can verify. The repository declares CC0-1.0, while Nintendo content, extracted files and toolchains keep separate rights. No REA use is established, and the separate AstroCore PC port mentioned in the README has no public source here.
About this entry
- Type
- Case study
- Category
- Independent reconstruction cases
- Relationship
- Independent reconstruction project
- Targets
- Game
Sources reviewed
The description was reviewed against primary sources. This does not establish runtime testing, security auditing or verified compatibility.
Primary sources
- README.md GitHub · SMGCommunity/Petari · Revision 86ae7a3
- configure.py GitHub · SMGCommunity/Petari · Revision 86ae7a3
- CONTRIBUTING.md GitHub · SMGCommunity/Petari · Revision 86ae7a3
- config/RMGK01/config.yml GitHub · SMGCommunity/Petari · Revision 86ae7a3
- config/RMGK01/build.sha1 GitHub · SMGCommunity/Petari · Revision 86ae7a3
- .github/workflows/build.yml GitHub · SMGCommunity/Petari · Revision 86ae7a3
- LICENSE GitHub · SMGCommunity/Petari · Revision 86ae7a3
- https://decomp.dev/SMGCommunity/Petari