A decompilation project for Vagrant Story for PlayStation 1, with a goal of enabling interoperability with modern hardware and fixing bugs in the original game.
This project does not contain any of the original files from the game disk, you must own a copy of the game.
Heavily inspired by and indebted to the incredible work of the sotn-decomp team and the PS1/PS2 decompilation Discord server.
Grateful to the authors of Data Crystal’s Vagrant Story page for their excellent work and insights.
Thanks also to the following amazing projects (and their dependencies):
The following files can be freely edited*, either as source code or by editing the dumped .yaml or .obj formats
data/MENU/
MENU0.PRG
MENU1.PRG
MENU2.PRG
MENU4.PRG
MENU5.PRG
MENU8.PRG
MENUE.PRG
MCMAN.BIN
SPMCIMG.BIN
MAPBG.BIN
ITEMNAME.BIN
ITEMHELP.BIN
MENU12.BIN
data/SMALL/
DUMMY.ARM
SCEN001.ARM - SCEN031.ARM
HELP01.HF0 - HELP14.HF0
HELP01.HF1 - HELP14.HF1
data/TITLE/
TITLE.PRG
(*n.b. until all of the loading code has been decompiled, if a file's sector size changes on disk then bad things will ensue)
- Fork the project
- Install system dependencies and copy disk image (see "Setup" below)
- Run
make -jto perform an initial split & build - Pick a function to decompile, use
make decompmeto create a scratch on decomp.me - Claim and decompile the scratch
- Copy the decompiled code where it belongs
- Optionally use
make permuteif needed - Run
make remake -j, and finallymake formatif the code compiles successfully - Open a PR
The project is mostly self-configuring but requires a minimal amount of setup.
- Make sure the following packages are installed, older versions may also work but this is not tested. This configuration works as-is on Ubuntu 24.04 on WSL; depending on your distro you may need additional packages.
| Package | Minimum Version |
|---|---|
| clang-format | 18.1.3 |
| cmake | 3.28.3 |
| docker-buildx | 28.2.2 |
| g++ | 13.3.0 |
| gcc | 13.3.0 |
| gcc-mipsel-linux-gnu | 12.4.0 |
| make | 4.3 |
| python3 | 3.12.3 |
| python3-pip | 24.0 |
| python3-venv | 3.12.3 |
- If you do not use your own docker configuration, set docker permissions with
sudo usermod -aG docker $USER, then log out and back in again - Dump your original disk to
disks/SLUS-01040.bin - Run
make -jto finish installation and perform an initial build
make -jshould be all that is needed most of the time. The first execution will configure the remaining dependencies in thetoolsdirectory and extract the files from the disk; from then on it will perform a minimal rebuild.make decompme TARGET=path/to/nonmatchings/source.suploads the target function to a new decomp.me scratch.make permute TARGET=path/to/nonmatchings/source.sinvokes the permuter for the target assembly file.make remake -jwill delete and re-split the targets; this can be necessary if the dependency management has failed to identify everything that needs rebuilding (in which case a bug report is appreciated!), or if the configuration has changed enough to be no longer valid (e.g. orphaned .d files). It's good practice to run this before submitting a pull request to make sure everything still works.make formatformats the source files and symbol addresses for consistency. Please run this before submitting a PR.make cleansimply deletes thebuildandnonmatchingsdirectoriesmake clean-allwill completely reset the project, including dropping any source changes and data files (but not the disk image). Use with caution.