Petari is a community-driven effort to reverse-engineer Super Mario Galaxy 1 back into readable, compilable C++ source code. The project targets the Korean game versions (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/SMGCommunity/Petari/llms.txt
Use this file to discover all available pages before exploring further.
RMGK01 and RMGK02) and uses CodeWarrior 3.0a3 to produce output that is binary-identical to the original game executable. No game assets are included — you need an existing copy of the game.
Set up your environment
Install the required tools on Windows, macOS, or Linux before building.
Build the project
Clone the repo, extract your game disc, configure, and run your first build.
Verify matches with objdiff
Use the objdiff tool to check that your decompiled functions match the original binary.
Start contributing
Learn the code style rules, naming conventions, and submission requirements.
What is Petari?
Game decompilation is the process of reading a compiled binary and writing equivalent C++ source code that, when compiled with the same compiler and flags, produces a byte-for-byte identical binary. Petari does this for Super Mario Galaxy 1. The project is not a PC port. It is purely a research and preservation effort to understand how the game was originally written.You must own a legitimate copy of Super Mario Galaxy 1 (Korean version
RMGK01 or RMGK02) to build the project. The repository contains no game assets.Project structure
Configuration files
splits.txt and symbols.txt define how the binary is divided into source files and how symbols are mapped to addresses.Code reference
Browse the reconstructed C++ class hierarchy — from the base
LiveActor through enemies, bosses, and game subsystems.CI / GitHub Actions
Set up automated builds and progress tracking with the included GitHub Actions workflow.
Contributing guide
Understand the full contribution workflow: disassemble, write C++, verify with objdiff, and submit a pull request.
Supported versions
| Version ID | Description |
|---|---|
RMGK01 | Rev 0 (Korea) |
RMGK02 | Rev 1 (Korea) |
Quick start
Install dependencies
Install Python, Ninja, and (on non-Windows) Wine. See Dependencies for platform-specific instructions.
Clone and extract
Clone the repository, then use Dolphin Emulator to extract
sys/main.dol from your game disc into orig/RMGK01/.Configure and build
Run
python configure.py to generate the build files, then ninja to perform the initial analysis and build.