Quick start
Everything on this site runs in the browser, but the project is also a set of command-line tools you can run on your own machine: pull the assets off your disc, play the engine natively, patch a copy, or open the game's code in Ghidra. This page gets you from a download to a running tool in a few commands.
At a glance
.bin into folders of PNGs, WAVs and decoded tables.below
3Play or browse nativelyBoot Rim Elm in the engine window; open any asset in the desktop viewer.below
4Mod your copyRandomize, translate, or hand-edit a scratch copy and share a PPF patch.below
5Dig into the codeStand up Ghidra in Docker for static analysis of the executable and overlays.below
One rule shapes everything: the project ships no Sony-owned bytes. Every tool
works on a disc image you supply - a raw Mode 2/2352 .bin dump of the USA release,
SCUS-94254. A .cue sheet is accepted anywhere a disc image is.
0 · No install required
If you only want to explore, stay in the browser. The asset viewer, media browser, play page and ROM patcher are the same Rust code compiled to WebAssembly; they read your disc image locally and never upload it. The steps below are for the native toolchain.
1 · Get the tools
Two ways in. Take the prebuilt binaries if you just want to run the tools; build from source if you intend to change them.
Download a release
Every tagged release publishes one archive per platform on the Releases page, carrying the whole toolset - engine, viewer, extractor and patcher - plus a SHA256SUMS manifest. No Rust toolchain needed.
sha256sum -c SHA256SUMS --ignore-missing
tar -xzf legaia-tools-<version>-x86_64-unknown-linux-gnu.tar.gz
cd legaia-tools-<version>-x86_64-unknown-linux-gnu
./legaia-extract --version
x86_64-unknown-linux-gnu(.tar.gz, glibc 2.28 or newer)aarch64-unknown-linux-gnu(.tar.gz, Linux on ARM)x86_64-pc-windows-gnu(.zip, Windows)
Every binary answers --version and --help. How the archives are produced: tooling/releases.md.
Build from source
The repo is a Cargo workspace, one library plus a binary per crate.
git clone https://github.com/AndrewAltimit/legend-of-legaia-re
cd legend-of-legaia-re
cargo build --release
cargo test --workspace --release
Commands on this page use the release-archive form (./tool). From a source build the same binaries live under target/release/. Tests that need a real disc skip when LEGAIA_DISC_BIN is unset; CI runs the same way.
2 · Extract assets from a disc image
First check that the dump is the one the tools know. A good USA image prints an [ok] line; a PAL or Japanese disc prints [unknown] with its hash and still extracts, but the offsets, fingerprints and patches all target the USA build.
./disc-extract verify "/path/to/Legend of Legaia (USA).bin"
./legaia-extract "/path/to/Legend of Legaia (USA).bin" --out extracted
The second command runs the whole pipeline in about five seconds and writes roughly 1.1 GB:
- Walk the ISO9660 filesystem - the disc's files.
- Split
PROT.DAT, the game's one big archive, into its 1233 entries, named fromCDNAME.TXT. - Work out what format each entry is.
- Pull the sub-assets (models, textures, sound banks, dialog) out of the streaming containers.
- Convert textures to PNG.
- Demux the CD-XA streams (voice and ambience) into per-channel WAVs.
- Write the texture-catalog tables.
- Extract the dialog font.
--skip-verify, --skip-png, --skip-xa, --skip-catalog and --skip-font skip individual stages. For per-asset recipes (a monster to glTF, a music track to WAV, a shop table) see the extracting-assets guide.
3 · Play or browse natively
Nothing needs extracting first: every subcommand accepts the disc directly with --disc.
Boot the engine
./legaia-engine play-window --disc "/path/to/Legend of Legaia (USA).bin"
This opens Rim Elm in a 960×720 window with field rendering, music, NPC scripts, dialog and the gameplay loop: walking rolls the scene's own random encounters, a battle opens the command menu, and a win returns you to the field with XP, gold and drops. Arrows are the D-pad; Z is Cross and Esc quits. The full key table, save/load, the scene list and the enhancement toggles are in the playing-and-viewing guide.
Open the desktop asset viewer
asset-viewer has a subcommand per asset class - prot (archive browser), tim, tmd, stage, vab, seq, field (scene runner), dialog, battle-scene, world. The browser build covers most of the same ground.
./asset-viewer prot extracted/PROT.DAT
./asset-viewer tmd extracted/.../foo.tmd
./asset-viewer vab extracted/.../bank.vab
Inside the PROT browser: N / P = next/prev entry; PgDn / PgUp = jump 10; Esc = quit. It detects the format and shows the first viewable sub-asset.
4 · Mod your copy
The patcher writes a patched copy of your disc and a shareable PPF patch that carries none of the game's bytes. Nothing is randomized unless asked - each family has its own flag (--drops shuffle, chests, steals, arts, doors, shops, monster stats, spell costs, equipment, and code-hook extras), and the same seed over the same disc is byte-deterministic, so two people get identical patches.
./legaia-patcher randomize \
--input "/path/to/Legend of Legaia (USA).bin" \
--seed 12345 --drops shuffle \
--patch legaia-12345.ppf \
--output legaia-12345.bin
The modding-and-translation guide walks each family, plus hand-editing a monster, swapping a texture, and exporting the script for translation; the same randomizer runs with no install on the ROM patcher page.
5 · Stand up Ghidra in Docker
This is the reverse-engineer's step. Static analysis of the executable and the runtime overlays runs through a blacktop/ghidra container; the compose file mounts the extracted disc read-only and the project and scripts directories read-write, so dumps land back on the host.
docker compose build ghidra # one-time, sets UID/GID matching the host user
docker compose up -d ghidra
# import SCUS_942.54 (one-time)
docker compose exec ghidra /ghidra/support/analyzeHeadless \
/projects legaia -import /data/SCUS_942.54
# run an analysis script
docker compose exec ghidra /ghidra/support/analyzeHeadless \
/projects legaia -process SCUS_942.54 \
-postScript dump_funcs.py -noanalysis -scriptPath /scripts
The one-time docker compose build ghidra wraps the base image with a user matching your host UID/GID, so script output lands in ghidra/scripts/ owned by you.
Most of the game's logic is not in the executable at all - it lives in code overlays the game loads into RAM as it runs. Capturing those is its own pipeline: overlay capture (from an emulator save state) and the static overlay pipeline (straight from the disc).