Skip to main content

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.

Building Petari produces an output binary that is byte-for-byte identical to the original sys/main.dol from your game disc. You will need an existing copy of Super Mario Galaxy 1 (Korean version) and the dependencies installed from the previous page. The process takes about four steps from a clean checkout to a successful build.
Do not use any AI software to assist with decompilation. The project aims to be a clean, human-authored reconstruction of the original source code. AI tools have known legal concerns around training data sourced from SDK leaks and similar material.
1

Clone the repository

Clone Petari from GitHub:
git clone https://github.com/SMGCommunity/Petari.git
Then change into the project directory:
cd Petari
2

Extract the game disc

Open Dolphin Emulator, right-click your Super Mario Galaxy 1 disc image, and choose Extract Entire Disc. Extract the contents into the orig/RMGK01 folder inside your Petari checkout.
Only sys/main.dol is required from the extracted disc. All other extracted files can be deleted to save disk space.
3

Run the configure script

Generate the Ninja build files by running:
python configure.py
By default this targets version RMGK01 (Rev 0, Korea). To build RMGK02 (Rev 1, Korea) instead, pass the --version flag:
python configure.py --version RMGK02
Supported versions:
Version IDDescription
RMGK01Rev 0 (Korea)
RMGK02Rev 1 (Korea)
4

Build with Ninja

Run Ninja to compile the project:
ninja
A successful build verifies that the compiled output matches the original binary. Once complete, an objdiff.json file is created in the project root, which is used for function-level diffing in the next step.

Build docs developers (and LLMs) love