A decompilation project of New Super Mario Bros. Wii, based on the PALv1 binaries.
The build essentially consists of 3 steps:
All source files get compiled and the corresponding object files placed in bin/compiled/
.
Since most of the binary does not have a corresponding decompiled source file, in order to produce a 1:1 match for the generated binaries, these parts must be extracted from the original files. The slices generates object files in bin/sliced/
from the slice information files in slices/
.
All compiled object files and the remaining sliced object files are linked together to form the final object file, which is then converted into .dol
or .rel
.
alias_db.txt
: Contains relocation helpers for rebuilding the .rel
files.
syms.txt
: Contains known symbol names for main.dol
. Will eventually be replaced by a proper symbol map.
- Obtain
main.dol
and the four.rel.LZ
files from a dumped PALv1 disc of NSMBW. - Use
tools/uncompress_lz.py
to decompress the.rel.LZ
files to.rel
. - Rename
main.dol
towiimj2d.dol
, then place it and the four.rel
files inoriginal/
. - Ensure that the checksums match:
$ md5sum original/*
17096d0ed441d44a0c31039138a8d7f8 original/d_basesNP.rel
f8cffd634edbec6c1bc210dab02c1e32 original/d_en_bossNP.rel
458f1aa94706dde1a8f2f9d97ff1f35c original/d_enemiesNP.rel
393bf12ef4254dd1ea1366d5b06fbebb original/d_profileNP.rel
ddab9e5dca53d8c18bf4051b927e822e original/wiimj2d.dol
- Obtain the CodeWarrior for Embedded PowerPC binaries from here and place them in
compilers/
. - Run
./build.py
to compile the sources and generate the output binaries.