A work-in-progress decompilation of Super Mario Galaxy 1.
This repository does not contain any game assets or assembly whatsoever. An existing copy of the game is required.
This project is not meant to be an effort to create a PC Port. Please do not ask for any information on a PC port on this repository or in the Discord server.
A lot of dicussion and accusations have been made saying we used AI/LLMs to accelerate the decompilation process. We did not.
Although AI was allowed for tasks that did not directly affect progress, such as variable naming, cleanup, and documentation, it never ended up playing a role in this project. The quick acceleration of the project was a result of new collaborators, a ton of motivation, and great community efforts. It was not a result of AI usage or other kind of automated decompilation work.
If you don't trust this statement enough, read the source code yourself and form your own conclusions.
Below are our AI usage guidelines:
Note
AI may be used for code cleanup, formatting, documentation, and naming assistance. AI-generated decompilation work is not allowed. Pull requests containing obvious AI-generated decompilation output or other AI slop will be rejected. Contributors should be able to explain and justify any decompilation work they submit. This also applies to all tool-generated code. We want to keep this project as human as possible.
Supported versions:
RMGK01: Rev 0 (Korea)
On Windows, it's highly recommended to use native tooling. WSL or msys2 are not required.
When running under WSL, objdiff is unable to get filesystem notifications for automatic rebuilds.
- Install Python and add it to
%PATH%.- Also available from the Windows Store.
- Download ninja and add it to
%PATH%.- Quick install via pip:
pip install ninja
- Quick install via pip:
-
Install ninja:
brew install ninja
wibo, a minimal 32-bit Windows binary wrapper, will be automatically downloaded and used.
- Install ninja.
wibo, a minimal 32-bit Windows binary wrapper, will be automatically downloaded and used.
-
Clone the repository:
git clone https://github.com/SMGCommunity/Petari.git
-
Using Dolphin Emulator, extract your game to
orig/RMGK01.
- To save space, the only necessary files are the following. Any others can be deleted.
sys/main.dol
- To save space, the only necessary files are the following. Any others can be deleted.
-
Configure:
python configure.py
To use a version other than
RMGK01(Korea), specify it with--version. -
Build:
ninja
Once the initial build succeeds, an objdiff.json should exist in the project root.
Download the latest release from encounter/objdiff. Under project settings, set Project directory. The configuration should be loaded automatically.
Select an object from the left sidebar to begin diffing. Changes to the project will rebuild automatically: changes to source files, headers, configure.py, splits.txt or symbols.txt.
Big thanks to the doldecomp team for their efforts on bte, tp for JSystem, and ogws, where this repository has sourced code and headers from.
