A decompilation of Pikmin 2 (USA) brought to you by fans of the series.
A decompilation of Pikmin 2.
This repository builds the following DOLs:
90d328bf8f190c90472e8c19e7e53c6ad0fe0d1a build/pikmin2.usa/main.dol
3730939092688902af4866be66d4a8404ae752c7 build/pikmin2.usa.demo/main.dol
Note The ROM this repository builds can be shifted. You are able to add and remove code as you see fit, for modding or research purposes.
Clone the repo using git clone https://github.com/projectPiki/pikmin2/
Run configure.py
to automatically download/build any other necessary files for the project.
Enter ninja
(recommended) or make -j
in a command prompt or terminal.
-j
Allows make
to use multiple threads, speeding up the process.ninja
already implicitly uses the max amount of cores available, only use -j
to decrease the thread count.-j
gives errors on your setup, try specifying a set number of threads, e.g. make -j 4
.OPTIONAL STEPS:
baserom.dol
.ninja -m
or make MAPGENFLAG=1 -j
.pikmin2/clang-format.exe
).See this video for a walkthrough of the steps on Windows (thanks Altafen for making this!).
The project is compatible with objdiff, which is highly recommended for local decompilation testing. Objdiff can be built from source, or the latest stable build obtained from GitHub actions (recommended).
To obtain the latest stable build:
Actions
tab of the objdiff repo.main
workflow.stable
release for your platform (Mac, Linux, Windows)..zip
to obtain an executable version.To set up objdiff for this project:
objdiff.exe
./path/to/cloned/pikmin2
.ninja
or make
, depending on what was used to build previously.
PATH
; try an absolute path instead.make
only) Build config: None
.make
only) Select target build dir: /path/to/cloned/pikmin2/build/pikmin2.usa/asm
.make
only) Select base build dir: /path/to/cloned/pikmin2/build/pikmin2.usa/src
.ninja
, an explorer viewer is provided after applying the previous settings.make
, you must explicitly select the object each time (likely from pikmin2/build/pikmin2.usa/asm/LIBRARY/OBJECTFILE.o
).ctx.c
file in the root directory.
python tools/decompctx.py src/DIRECTORY/FILE.cpp