US Final Progress
Summary at decomp.dev
- The SPPS SLUS_201.99 or SLPM_651.98 elf binary.
- Linux or WSL
- Python3 interpreter
- 7Zip
- Optional: venv
This repository includes a VS Code Dev Container config at .devcontainer/.
To open the project in a dev container:
- Install Docker and the VS Code Remote Development extension pack (including Dev Containers).
- Open the repo in VS Code.
- Run
Remote-Containers: Reopen in Containerfrom the Command Palette.
The container is built from .devcontainer/Dockerfile and mounts the repo at /workspace.
It also creates a Python virtual environment at /opt/venv and installs requirements.txt automatically.
To install the required python modules and other dependencies, run at the root directory:
make install
And for development only dependencies, run:
python3 -m pip install -r requirements-dev.txt or make install-dev
To clone the Mwccgap submodule (if not cloned in with the git repo):
git submodule update --init --recursive
To run splat for the US version of the game, run at the root directory:
python3 -m splat split ./config/SLUS_20199/SLUS_201.99.yaml
Or with Make:
make splat-us
To run splat, compile and link the resulting elf file, run:
make rebuild
For your python environment, it is is highly recommended to configure a virtual environment. Here are the steps for Ubuntu:
sudo apt install python3-venv
python3 -m venv venv
source venv/bin/activate
# Clone with submodules
git clone --recurse-submodule https://github.com/Daniel-McCarthy/SPPS.git
# Install and configure venv
sudo apt install python3-pip
sudo apt install python3-venv
make setup-venv
source venv/bin/activate
# Install dependencies
sudo apt install 7zip
make install
make install-dev # optional, for development work only
# Copy your ISO file to iso/SLUS_20199.iso
# Extract the elf file (or run make extract-iso) and copy it to /config/SLUS_20199/SLUS_201.99
Note: instead of using the standard mipsel-gnu-linux-binutils the Decompals binutils is downloaded and used. It is statically linked against Glibc therefore an up-to-date glibc may be required.
A huge thanks is due to @ethteck, @mkst, @encounter, @Decompals, and @chaoticgd for the excellent and foundational tooling that has paved the way for huge improvements in way decompilation is done. Without them and their hard work (and to the contributors to these projects), this project would not exist.
- splat - Used for splitting the elf binaries and managing (alongside spimdisasm) and generating MIPS assembly out of the binary.
- decomp.me - A vital platform making the process of matching functions significantly easier and smoother.
- mwccgap - A tool adding support for
#INCLUDE_ASMto MWCC allowing matching to the function level rather than TU level. - decomp-toolkit - A great project assisting decompilation - for this project the DWARF symbol support was of great use.
- decompals binutils - A project maintaining an EE supporting set of the
binutilsincluding patches to improve them. - ghidra-emotionengine-reloaded - A Ghidra plugin supporting PS2 EE cpu MIPS instruction set support and handling of symbols.
And a big thanks to @Mc-muffin, @1superchip, and @benoitren for huge amounts of help on matching functions, and all sorts of help along the way. And thanks to pool7 for his tireless archival of the MW compilers among other tools greatly relied on by the community.