Skip to content

ser-pounce/rood-reverse

Repository files navigation

Rood Reverse

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):

Status

Overall progress

Core libraries

SLUS_010.40 progress

Main game engine

BATTLE.PRG progress INITBTL.PRG progress

Menus

Total menu progress

MAINMENU.PRG progress MENU0.PRG progress MENU1.PRG progress MENU2.PRG progress MENU3.PRG progress MENU4.PRG progress MENU5.PRG progress MENU7.PRG progress MENU8.PRG progress MENU9.PRG progress MENUB.PRG progress MENUC.PRG progress MENUD.PRG progress MENUE.PRG progress MENUF.PRG progress

Title and Ending Sequence

TITLE.PRG progress ENDING.PRG progress SCREFF2.PRG progress

Editable content

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)

(Naive) Quickstart

  1. Fork the project
  2. Install system dependencies and copy disk image (see "Setup" below)
  3. Run make -j to perform an initial split & build
  4. Pick a function to decompile, use make decompme to create a scratch on decomp.me
  5. Claim and decompile the scratch
  6. Copy the decompiled code where it belongs
  7. Optionally use make permute if needed
  8. Run make remake -j, and finally make format if the code compiles successfully
  9. Open a PR

Setup

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 -j to finish installation and perform an initial build

Build targets

  • make -j should be all that is needed most of the time. The first execution will configure the remaining dependencies in the tools directory and extract the files from the disk; from then on it will perform a minimal rebuild.
  • make decompme TARGET=path/to/nonmatchings/source.s uploads the target function to a new decomp.me scratch.
  • make permute TARGET=path/to/nonmatchings/source.s invokes the permuter for the target assembly file.
  • make remake -j will 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 format formats the source files and symbol addresses for consistency. Please run this before submitting a PR.
  • make clean simply deletes the build and nonmatchings directories
  • make clean-all will completely reset the project, including dropping any source changes and data files (but not the disk image). Use with caution.

About

a Vagrant Story byte-matching decompilation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages