Pick a route

All of them need one thing from you: a disc image of your own copy, a .bin file made from the game disc. Nothing is bundled with any of them.

The numbered steps below are for the command-line tools. You can stop here if you only want to play.

The command-line path

0Nothing to installThe viewer, media browser, play page and ROM patcher run in this tab.below 1Get the toolsDownload a release archive, or build from source with Cargo.below 2Extract the discOne command turns your .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

0 · No install required

If you only want to play or 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. The top of the unpacked folder holds only what you double-click; every command-line program is in its command-line-tools folder.

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/command-line-tools
./legaia-extract --version
  • x86_64-unknown-linux-gnu (.tar.gz, glibc 2.28 or newer, with a Legend of Legaia launcher)
  • aarch64-unknown-linux-gnu (.tar.gz, Linux on ARM, with the same launcher)
  • x86_64-pc-windows-gnu (.zip, Windows, with a Legend of Legaia.exe launcher)
  • universal-apple-darwin (.tar.gz, macOS 11 or newer, Apple silicon and Intel, with a Legend of Legaia.app)

Every binary answers --version and --help. How the archives are produced: tagged releases.

Build from source

The repo is a Cargo workspace: a library per crate, and a command-line binary on the crates that have a tool to run. It needs a current stable Rust toolchain; on Linux also ALSA and udev headers and pkg-config (Debian / Ubuntu: apt install libasound2-dev libudev-dev pkg-config).

git clone https://github.com/AndrewAltimit/legend-of-legaia-re
cd legend-of-legaia-re
cargo build --release
cargo test --workspace --profile release-test

Commands on this page use the release-archive form (./tool, run from command-line-tools). 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 900 MB:

  1. Walk the ISO9660 filesystem - the disc's files.
  2. Split PROT.DAT, the game's one big archive, into its 1233 entries, named from CDNAME.TXT.
  3. Work out what format each entry is.
  4. Pull the sub-assets (models, textures, sound banks, dialog) out of the streaming containers.
  5. Convert textures to PNG.
  6. Demux the CD-XA streams (voice and ambience) into per-channel WAVs.
  7. Write the texture-catalog tables.
  8. 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 to play: every legaia-engine subcommand accepts the disc directly with --disc. The desktop asset viewer below is the exception - it reads an extracted/ tree.

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 pressed twice quits (the first press only asks). Add --boot-ui to start at the title screen and its New Game / save-select flow instead, or --scene <name> to enter any other scene directly. 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, save-icons (the save-slot portrait sheet). 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 (or the arrows) = next/prev entry; PgDn / PgUp = jump 10; Home / End = first/last; type a number and press Enter to jump to that PROT index; 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, encounters, chests, steals, arts, doors, shops, the casino, 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 - the ROM patcher page included, which writes the same image for the same seed and settings.

./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 /scripts/dump/dump_funcs.py -noanalysis

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

What to read next

  • User guides - step-by-step walkthroughs of the release tools: extraction scenarios, playing via the engine, modding and translation.
  • How the layers stack - the conceptual map of the project, from disc sectors to the running engine.
  • Write-ups - the narrative track: how the disc-patching techniques were built, in reading order.
  • Subsystems - pick a part of the running game and see how it works.
  • Formats - byte-level specs for everything on the disc.
  • Key functions - the anchor functions in the game's code, traced in Ghidra.