A decompilation project for the PlayStation 1 game Legend of Mana, targeting MIPS assembly.
- Git - For cloning the repository
- Docker Desktop - Required for the build environment (Download here)
- Legend of Mana ROM - Your legally obtained copy of
SLUS_010.13
Open a terminal (PowerShell or Command Prompt on Windows) and run:
git clone https://github.com/celophi/lom-decomp.git
cd lom-decomp
git submodule update --init --recursiveThis downloads the project and all its dependencies.
Copy your SLUS_010.13 file into the disc folder in the project directory.
The project uses an old PlayStation compiler (gcc-2.8.0) that runs in Docker. Build it with:
docker build -t old-gcc/gcc-2.8.0-psx -f tools/old-gcc/gcc-2.8.0-psx.Dockerfile tools/old-gccThis step may take several minutes.
Build the main development container:
docker build -t lom-dev .Launch the container with your project files mounted:
docker run --rm -ti -v "${PWD}:/lom" lom-devYou should now be inside the container at a Linux terminal prompt.
Inside the container, run the splat tool to extract the game binary into assembly files:
splat split config/SLUS_010.13.yamlCompile the decompiled code:
make clean
make
make binThe compiled output will be in the build directory as both an ELF executable and a BIN file.
After initial setup, your typical workflow is:
- Start the container:
docker run --rm -ti -v "${PWD}:/lom" lom-dev - Make your code changes (outside the container, in your editor)
- Build inside the container:
make clean && make && make bin - Test the output from the
builddirectory
- If Docker commands fail, ensure Docker Desktop is running
- On Windows, use PowerShell or Command Prompt, not Git Bash, for the
docker runcommand - The
${PWD}variable should automatically expand to your current directory path
You can use spimdisasm to help with matching after producing a binary:
spimdisasm elfObjDisasm build/slus_010.13.elf output/Current esearch points to a Psy-Q SDK version of 4.6 while game functions match somewhere around GCC 2.8.0.