The project's engine is a from-scratch rewrite of the game that reads your own disc: point legaia-engine at the image and it boots Rim Elm, plays the music, runs the NPC scripts, rolls encounters and fights battles. asset-viewer is its museum-mode sibling for browsing one texture, mesh or sound bank at a time. Both ship in the release archive's command-line-tools folder; commands use the bare ./tool form, run from a terminal in that folder (source builds live at target/release/).
play-window --scene, --battle, --party, cheats.play-str plays an FMV with its XA audio in sync.asset-viewer, asset field-disasm, the browser build.Every subcommand that reads game data accepts the disc directly via --disc - no extraction step required to play. Without --disc, tools read an extracted/ tree (--extracted-root, default extracted, resolved against the current directory) produced by legaia-extract (getting started).
New to the release archive? Desktop apps covers the download, the first start past SmartScreen or Gatekeeper, the controls and the toggles, with screenshots; this page is the full reference.
Started with no subcommand - the archive's Legend of Legaia program (.exe on Windows, .app on macOS), a desktop shortcut, a double-click - legaia-engine opens its launcher instead of printing help:
./legaia-engineOn Linux and Windows a disc image, expansion pack or memory card opened with Legend of Legaia ("Open with", or a file dropped on the program's icon) arrives in the launcher as if it were dropped on its window.
.bin / .cue onto the window, or typing its path, works too.SYSTEM.CNF boots SCUS_942.54, PROT.DAT present. A wrong disc is named, with the fix.launcher.toml; next time it is ready with Play focused. Change disc... switches. The last few discs that passed are kept too (recent_discs, newest first): right-click or Shift+Enter on Choose disc... steps to the next one that still passes, so a retail disc and a randomized copy are both one key away.play-window --disc <bin> --boot-ui; the launcher closes, and comes back with the error if the game fails. legaia-engine launch --disc <bin> starts the same game with no screen; Legaia Explorer's Play runs it.The check reads a few sectors through the same reader the game boots from; it is not the SHA-256 fingerprint disc-extract verify computes. A PAL or Japanese disc is refused with the executable it boots, with the note that a randomized or translated USA disc is accepted, since it still boots the USA executable. A disc that is not a PlayStation game at all is named as such, and an image missing PROT.DAT or with a damaged SCUS_942.54 is called a damaged or partial dump, with the advice to dump the disc again.
Your disc, found. On a first run the launcher looks for a dump before asking for one: first the discs Legaia Explorer opened, whatever the files are called, then its own folder, Downloads, the Desktop, Documents and the home folder (and their direct subfolders): a .bin or .cue named for the game, or in a folder named for it, that passes the check. It is offered on the disc card with Use this disc; Enter adopts it, Ctrl+O or Shift+Enter picks another file.
Recent. The Recent button opens a page listing the discs and memory cards used before, each with its state, and every save on the game's own card and on card 2, longest played first, with its leader, level, place and play time. Enter switches to a disc, mounts a card, or starts the game on a save without the title screen; Delete forgets a disc or card. The discs group ends with Find a disc on this computer..., the disc finder below.
A disc finder for a controller. A controller cannot work the desktop's file dialog, so Cross on Choose disc... opens the launcher's own finder in place of the options: the folder of the disc last used (else Downloads, else the home folder), its subfolders and its .bin / .cue files, then the usual places (home, Downloads, Desktop, Documents, the program's folder and the top of each drive). Cross opens a folder or tries a disc image, and a disc that passes the check is adopted at once; Up one folder (or Backspace) climbs, and Circle or Esc closes it. While a controller was the last thing pressed, the help box's key reminder and the press-to-play lines name its buttons, by the labels its maker prints on them.
Menu colours. The launcher and the game's F12 panel draw in Explorer's two palettes. The Display group's Menu colours row follows your desktop's light or dark preference, or stays light or dark.
Windows reopen where they closed. The launcher and the game window each come back where they last closed (window-placement.toml beside launcher.toml), as Explorer does, unless that spot is no longer on a connected monitor; then the desktop places them. The game window also comes back at the size it was dragged to, held to the monitor it reopens on, or maximized if it closed that way; moving Window size overrides it. A fullscreen game keeps the spot it had before it went fullscreen, and a desktop that does not report window positions (Wayland) leaves placement to the desktop.
A broken settings file is kept. A launcher.toml that does not parse (a hand edit gone wrong, a write cut off by a crash) is never overwritten with the defaults: the launcher renames it to launcher.toml.broken, says so on the disc card and in the help box, and starts as on a first run, so its discs, switches and card can be copied back by hand. Every save goes through a temporary file, so a crash mid-save leaves the previous file whole. Legaia Explorer does the same with its settings.json and says so on its error banner.
Arrow keys move between every control, Tab jumps between the buttons and the options (back to where you were in the other column), Left / Right change an option, Enter presses, Esc quits; the mouse hovers and clicks (right-click, or Shift+Enter, steps an option back). Page Up / Page Down and Home / End move through the option list; Ctrl+V pastes a disc path; after a game stops with an error, Ctrl+C copies its report. While a file is dragged over the window, the help box says what dropping it will do. Delete or a middle-click puts the focused option back on its default; a changed option carries a small gold dot, and the help box names its default. The help box under the buttons explains whatever is focused.
A controller works the launcher as it works the game's menus: the D-pad or left stick moves and steps an option, Cross presses, Triangle is the right-click (an option a value back, the previous disc on Choose disc...), Circle leaves the Controls or Recent page, Start plays a ready disc, and L1 / R1 page the option list. A held direction repeats, as a held arrow key does, and a controller rebinds its own buttons on the Controls page (below).
A memory card from another emulator. Right-click or Shift+Enter on Saves folder (Triangle on a controller), or drop the file on the window, to pick a card image (.mcr, .mcd, .srm, DexDrive .gme, single-save .mcs). The launcher mounts it through the game's own reader, says how many Legend of Legaia saves it holds, remembers it (card in launcher.toml) and starts the game with --card: the card is card 2 on the load and save screens, and saves go back into it - what the browser play page's card import does. Delete on the button removes it. The last few cards are remembered too (recent_cards): the same right-click steps through those that still read, newest first, then offers the file dialog, so moving between two emulators' cards takes no browsing.
A value is drawn green when the original game does not have it - an enhancement, a fix or a tweak in effect - and dim when it is the original’s, whatever the value’s words: PlayStation pixel look: Off reads green, because the original’s picture is the PlayStation’s own, and Smarter monsters: Off reads dim. The help box names the original’s value under a row that departs from it (Not as in the original game (Off).). The window, time-of-day and volume rows have no original counterpart and keep their plain colours; the original values are the ones Original game only plays with.
Controls swaps the option list for the key table: Right or Tab moves into it, Enter or a click on a row waits for the key that button goes on, and Esc calls it off. A key another button was on swaps with it. Keys go to legaia-input.toml, the file the in-game Key Config screen edits. The game window's own shortcuts cannot be taken; the keys that work are an arrow key, Z X C V A S D Q W E, 1, 2, Enter, Space and right Shift.
Each row also shows its controller button after a bar, in the labels printed on the controller pressed last (A / B on an Xbox-style pad, Cross / Circle on a PlayStation one, B / A on a Nintendo one). A row waiting for its key takes a controller button just as well, Circle included, so a controller press never cancels the wait: the button the row already has keeps it, and Esc cancels. The controller table is saved in the same file, under [gamepad], and All keys and buttons back to default resets both.
The list is grouped and scrolls when it is longer than the panel: the selected row stays in view, a bar on the right edge shows where you are, and the mouse wheel, Page Up / Page Down and Home / End move through it.
| Group | Row | Stored in | In game | Default |
|---|---|---|---|---|
| Start here | Look and feel: one switch over every row but the window and the sound levels (Enhanced, Original; Custom once a row moves, Delete restores Enhanced) | both | - | Enhanced |
| Display | Fullscreen (borderless) | legaia-options.toml | F11, Alt+Enter | off |
| Display | Window size (640x480 .. 1920x1440, steps of 320x240) | legaia-options.toml | - | 960x720 |
| Display | Pixel-exact scaling: whole steps of 320x240 only, no shrink-to-fit | legaia-options.toml | - | off |
| Display | Camera distance (retail, far, farther) | legaia-options.toml | T | far |
| Display | PlayStation pixel look (--psx-render): always whole steps of 320x240, on the play page too | launcher.toml | - | off |
| Enhancements | Enhanced lighting | legaia-options.toml | I | on |
| Enhancements | Time of day (auto, day, dusk, night) | legaia-options.toml | F8 | auto |
| Enhancements | Lamp shadows | legaia-options.toml | Y | on |
| Enhancements | Bloom | legaia-options.toml | F10 | off |
| Enhancements | Ambient occlusion | legaia-options.toml | Home | on |
| Enhancements | Ground fog | legaia-options.toml | F9 | off |
| Enhancements | See-through walls | legaia-options.toml | F4 | on |
| Enhancements | Living ground pulse (off = --no-entry-pulse) | launcher.toml | - | on |
| Play | Free-angle movement | legaia-options.toml | R | off |
| Play | Action movement: Square jumps (twice in the air), R2 dashes (--action-movement) | launcher.toml | - | off |
| Play | Smarter monsters (--smart-monsters) | launcher.toml | - | off |
| Play | Saved-chain Arts list: in battle, Arts picks from your saved combos (--arts-saved-list) | launcher.toml | - | off |
| Play | Reduce flashing | legaia-options.toml | - | on |
| Gameplay tweaks | Shiny Seru (off = --no-shiny-seru) | launcher.toml | - | on |
| Gameplay tweaks | Run-away EXP (--flee-exp) | launcher.toml | - | off |
| Gameplay tweaks | Fortress battles fix (off = --no-fortress-encounter-fix) | launcher.toml | - | on |
| Gameplay tweaks | Tetsu spar order fix (off = --no-tetsu-spar-fix) | launcher.toml | - | on |
| Gameplay tweaks | Boss casts respect jewels (--jewel-fix) | launcher.toml | - | off |
| Gameplay tweaks | Battle freeze guard (off = --no-hp-readout-guard) | launcher.toml | - | on |
| Gameplay tweaks | Bonus equipment drops (--equipment-drops) | launcher.toml | - | off |
| Gameplay tweaks | Save anywhere (--save-anywhere) | launcher.toml | - | off |
| Battle tuning | EXP rate (--exp-rate: 1x, 1.5x, 2x, 3x, 5x, 0.5x) | launcher.toml | - | 1x |
| Battle tuning | Enemy strength (--enemy-stat-scale: 1x to 5x, 0.75x, 0.5x) | launcher.toml | - | 1x |
| Battle tuning | Enemy attack count (--enemy-attack-count: 1x to 3x, 0.5x) | launcher.toml | - | 1x |
| Battle tuning | Spirit AP (--spirit-ap: 32 is the original, negative drains) | launcher.toml | - | 32 |
| Battle tuning | AP from damage (--damage-ap: 100 is the original, negative drains) | launcher.toml | - | 100 |
| Battle tuning | Seru catch rate (--seru-catch-rate: Original or 10..100%) | launcher.toml | - | Original |
| Sound | Master volume (overall output level, 0..100%) | legaia-options.toml | - | 25% |
| Sound | Music / sound effects volume (0..10, 8 = the original mix) | legaia-options.toml | - | 8 |
| Sound | Mono output | legaia-options.toml | - | off |
| Original game | Original ground culling | legaia-options.toml | - | on |
| Original game | Original prop culling | legaia-options.toml | - | on |
| Original game | Original game only (--retail) | launcher.toml | - | off |
The legaia-options.toml rows are the game's own options: the launcher and the in-game keys change the same value. The launcher.toml rows are launch switches; the browser play page has a box for each. Original game only starts the game retail-faithful - every enhancement off for that session, your saved options untouched. Controls shows the current key bindings. The Gameplay tweaks and Battle tuning rows are disc-patcher features the engine runs itself, so they need no patched disc; the freeze guard is the engine's own fix for a battle softlock the original can reach. When the game stops with an error or crashes, the launcher comes back and says how it ended and why - or, if the disc has gone missing meanwhile, asks for it again; the whole log is legaia-engine-game.log in the saves folder (Saves folder). LEGAIA_LAUNCHER_DIRECT=1 skips the screen and boots a remembered disc straight away.
Saved-chain Arts list is an addition of the port's; the original has nothing like it. With it on, the battle command ring's Arts opens a list of the chains saved for the acting character instead of the original's entry, where each command is one D-pad press until the AP runs out. The chains are the ones composed and named in the chain editor (Triangle on the pause menu's Status screen). Confirming a row plays that chain's arrows through the same arts queue the entry builds from typed presses, so learning an art by using it, Miracle Arts and Super Arts work from a row as they do from the entry. Two cases still open the press-by-press entry: the sparring tutorial, whose drill checks the presses themselves, and a character with no saved chain. Original game only holds it off.
| Platform | Settings (launcher.toml) | Game data (bindings, options, saves/) |
|---|---|---|
| Linux | ~/.config/legaia-engine | ~/.local/share/legaia-engine |
| Windows | %APPDATA%\legaia-engine | same folder |
| macOS | ~/Library/Application Support/legaia-engine | same folder |
LEGAIA_ENGINE_CONFIG_DIR and LEGAIA_ENGINE_DATA_DIR override the two directories. Every subcommand below behaves exactly as it would without the launcher; the launcher only answers the no-argument case.
Windows. Double-click Legend of Legaia.exe: it starts command-line-tools\legaia-engine.exe with no console window. legaia-engine.exe is a console program so its subcommands behave normally in a terminal; double-clicked directly, it closes the console it was given (a brief flash) unless LEGAIA_KEEP_CONSOLE is set, and run from a command prompt it keeps printing its log there.
When the engine cannot start. If Legend of Legaia cannot start the engine at all (the command-line-tools folder was left behind when the program was moved, or a file in it is missing), it says so in a message box - on Linux too, when it was double-clicked rather than run from a terminal. When the engine ends with an error it did not already report, the box gives how it ended, the reason from the engine's output, and Ctrl+C copies the text.
Linux. The file dialog goes through the desktop's file-chooser portal; where no portal runs, drag-and-drop and the typed path still work.
Wayland. The launcher window opens through XWayland, because the windowing library has no Wayland drag-and-drop; the compositor carries a drag from a Wayland file manager across. Without XWayland (DISPLAY unset), or with LEGAIA_LAUNCHER_WAYLAND=1, the window is native Wayland and only the file dialog and the typed path take a disc. The game itself always opens on the desktop's default backend. Legaia Explorer opens through XWayland for the same reason; LEGAIA_EXPLORER_WAYLAND=1 keeps it native.
./legaia-engine play-window --disc "/path/to/Legend of Legaia (USA).bin"This boots the scene town01 (Rim Elm) straight off the disc: field rendering, BGM, NPC scripts, dialog, and the full gameplay loop - walking rolls the scene's own random encounters, a battle opens the command menu, and victory returns you to the field with XP, gold and drops. --boot-ui starts at the title screen → save-select flow instead.
Arrows are the D-pad; the rest of the desktop defaults:
| Key | Pad button |
|---|---|
| Z | Cross |
| S | Circle |
| A | Triangle |
| X | Square |
| Q / W | L1 / R1 |
| 1 / 2 | L2 / R2 |
| Enter, Space | Start |
| RShift | Select |
Esc twice quits: the first press only shows Press Esc again to quit at the bottom left of the window, and a second press within three seconds closes it, so a stray press never loses unsaved progress. The browser play page ships a different default layout (X is Circle there, C / V carry Triangle / Square, and WASD doubles the arrows), so a key that works in the tab is not necessarily the same button in the window. config show prints the desktop table, including any rebinding.
Gamepads. The native window, the browser play page and the minigames page all read a gamepad. Out of the box it plays by position: bottom / right / left / top face buttons are Cross / Circle / Square / Triangle, bumpers L1 / R1, triggers L2 / R2, back / start Select / Start, and both the d-pad and the left stick drive the d-pad, the stick past the Stick dead zone option (50% by default; a slider in the play page's Controls card).
Every button can be moved: Key Config (Select on the pause menu's Options screen, on both hosts) takes a controller button on a row waiting for its key, and the change is saved with the keys. Plug a controller in at any time: the notice line says Controller connected (and disconnected), and it works at once. Every connected controller drives the one player. A controller the browser does not report with the standard mapping (common for less-known pads in Firefox on Linux) still plays: its buttons are guessed in the standard order and its d-pad is read off its hat; the notice says so, and Key Config with that pad fixes the rest. Once a controller was pressed last, hints that name a key name its button instead, until a key is pressed again.
A controller reaches everything inside the game, the launcher and the window's F12 panel (Select + Start). It does not reach the play page's own boxes beside the picture, its file pickers (a browser opens a file dialog only for a click or a key), or Legaia Explorer.
Touch screens. On a phone or tablet the browser play page draws an on-screen pad over the picture: a D-pad you can roll a thumb around (diagonals included), the four face buttons, L1 / L2 / R1 / R2 and Select / Start. The Touch pad button under the picture shows or hides it on any device, and the choice is remembered. Its presses reach the game as a controller's do; a drag on the picture outside the buttons still turns the camera. On a phone held upright the pad sits under the picture rather than over it, so the HUD and the scene stay clear; turned sideways or in fullscreen it is back over the picture.
Left-mouse drag orbits the camera around your character (horizontal) and tilts it (vertical), the wheel zooms, and a double-click puts the framing back to retail, centred on the party (the browser play page's Reset camera button does the same, and also leaves the F3 debug vantage) - all three, and the T distance preset, sit out while a cutscene has the camera, the ending credits' vignettes included.
| Key | Toggle | Default |
|---|---|---|
| T | Cycle the camera-distance preset: retail, far (1.35x), farther (1.8x) | far, remembered |
| R | Free-angle movement | off (retail 4/8-way movement), remembered |
| I | Enhanced lighting: a time-of-day mood, real lights at the scene's lamps and glowing props, the Genesis Tree glowing. Off is the game's own baked shading. | on, remembered |
| F8 | Time of day for enhanced lighting: auto, day, dusk, night | auto, remembered |
| Y | Shadow-casting point lights (--no-dyn-shadows starts off) | on, remembered |
| F4 | Camera-occlusion fade: walls between the camera and your character dissolve to a dither (--no-occlusion-fade starts off) | on, remembered |
| F9 | Volumetric ground fog (--no-volumetric-fog holds it off) | off, remembered |
| F10 | Bloom: lamps, glowing props, lit windows and bright sky glow softly, stronger at night | off, remembered |
| Home | Ambient occlusion: soft contact shadows where walls meet floors and at characters’ feet (--no-ssao starts off) | on, remembered |
| F1 | Engine diagnostic text rows | off |
| F2 | Mute audio | off, remembered |
| F11, Alt+Enter | Borderless fullscreen (on the play page F11 alone puts the picture full screen, as its Fullscreen button) | off, remembered |
| End | Reload the expansion pack in place (section 11) | - |
| F3 | Wide debug orbit camera instead of the field camera | off |
Screenshots. Print Screen saves the picture on screen as a PNG, menus and text included. The native window writes it into your pictures folder under Legend of Legaia, named for the scene and the time (legaia-town01-1762750000.png), and says where at the bottom left; the browser play page downloads the same picture under the same name. A desktop that keeps Print Screen for its own screenshot tool may not pass the key on.
In the native window each press shows the toggle's new state at the bottom left for a moment (Ground fog: off); holding a key toggles once, not repeatedly. A key that only acts while you walk around (F3, T, R, End) says so when pressed on the title screen or in a menu. F12 (or ?, wherever your keyboard layout puts it, or Select + Start on a controller) opens a panel and holds the game still. Its Settings page lists what the game reads live, in the launcher's words and the same options file: Up / Down pick a row, Left / Right change it, Delete puts it back on its default. It carries every launcher row but the window size: the PlayStation pixel look, the gameplay tweaks, the battle tuning and Original game only among them, each taking effect at once and remembered by the launcher for the next Play, as the play page remembers its boxes. It opens on Look and feel, so one Right press switches to the original game and the next switches back; Delete there puts every enhancement back on its first-start value. A row with a key of its own names the key after its label (Ground fog F9). L1 / R1 (Tab) flip to the Cheats page (below), then to the Scenes page - the play page’s scene list, opened on the scene you stand in: Up / Down pick a town, field area or overworld, Left / Right move a page, Cross or Enter goes there with your party and bag, staged as the play page stages a picked scene (it refuses on the title, in a menu, a fight, a movie or a minigame, and says why) - then to the Keys page: every toggle key with its current state, F11 fullscreen among them, the key each pad button is on (Cross, Circle, Start, ...) and the mouse's camera controls. Esc, F12, Circle or Start close it. Each page's last line names its keys, or, while a controller was the last thing pressed, that controller's buttons by the labels its maker prints. A state the original game does not have is drawn green (Enhanced lighting: on), with the same marking and the same original values as the launcher’s option list.
The browser play page answers the same keys with the canvas focused. Its presentation toggles sit in one Visual enhancements panel under the canvas: each row names its key, says in a line what it does and whether it is a port enhancement or part of the PS1's own drawing, and the panel opens with the desktop’s Look and feel choice (Enhanced, Original, Custom), then the Retail-faithful switch and a Reset to defaults button.
--retail starts a session with every enhancement off and the remembered engine-only options (camera distance, movement mode, the photosensitivity guard) at their retail values, writing nothing back to the options file - the one switch for a retail-faithful run. It also pins the engine's own deviations to retail: the ledge-hop landing guard, smart monsters, overworld markers and the saved-chain Arts list go off and the battle kernels run retail's. The browser play page's Retail-faithful switch applies the same pin.
Window toggles and pad bindings cannot collide: a window key is handled before the pad lookup, so one parked on a bindable key would delete that button from the keyboard. Every toggle therefore lives on an F-key, Home / End or a letter outside the bindable vocabulary (the key table above plus C, V, D, E).
A handful of keys exercise render paths without the script that normally fires them: N opens the name-entry screen for the lead character, and F5, F, G, H and J spawn a debug effect, effect model, summon, battle move effect or field effect at an actor.
--no-live-loop stops random encounters from rolling, leaving field VM + locomotion only - the mode to use when you are inspecting a scene rather than playing it. A battle the engine is already in still resolves.--no-player-battle auto-attacks each party turn instead of opening the command menu.Rim Elm is one of them, and so are most scenes with a shop in them: their encounter regions carry a zero trigger rate, exactly as on the retail disc. The window says so in the corner (no random encounters in this scene) so a quiet walk does not look like a broken engine - step onto the overworld, or --scene map03, to fight.
./legaia-engine list-scenes --disc "/path/to/disc.bin"./legaia-engine play-window --disc "/path/to/disc.bin" --scene town01list-scenes prints every scene name the game's file map exposes with the PROT entry range each covers - the same names feed --scene, and a range start is where that scene's files land in extracted/PROT/.
A scene entered this way - --scene with no save, or a scene picked on the browser play page - starts with the full party: Vahn, Noa and Gala at level 1, each from their own row of the executable's starting-party template, wearing the weakest gear the disc's equipment table lets them wear in each slot. That is an engine convenience, not retail: a true New Game (the title screen's NEW GAME, or --seed-party) starts with Vahn alone.
A picked scene that the game itself only ever passes through plays that passage. Zora's Floating Castle's second form (taiku2) is one: arriving from Sol Tower plays the throne-room scene with Songi and Zora, which ends on the overworld. The disc has no walkable version of it - its rooms other than the throne room ship as bare floors - so the castle to explore is taiku.
Waiting for a step roll is fine for playing and useless for checking something on the battle screen: the retail counter takes several hundred steps to drain. --battle names the fight instead:
./legaia-engine play-window --disc "$DISC" --scene map03 --battle first./legaia-engine play-window --disc "$DISC" --scene rikuroa --battle 17first is the scene's lowest formation row that carries monsters; a number is a specific row of the scene's own MAN encounter table (rikuroa row 17 = the lone Caruban boss) - the same id space the region roll produces, so --battle 12 fights what walking into that region would have. Unregistered rows are refused with the scene's row list logged.
The fight is armed, not injected: the row goes into the encounter transition exactly as a roll does, so the intro, the BGM swap and the battle load are the ordinary ones. It also means the fight opens a beat after boot - allow ~40 ticks when pairing it with a screenshot. --battle turns the live loop on even under --no-live-loop, because the loop is what drains the transition.
./legaia-engine play-window --disc "$DISC" --scene rikuroa --battle 17 --seed-party --screenshot /tmp/battle.png --screenshot-tick 200--seed-party reseeds retail's New Game roster, which is Vahn alone. Add --party and each named member missing from the roster is seeded from its own template row, with real level-1 stats and its own name:
./legaia-engine play-window --disc "$DISC" --scene rikuroa --battle 17 --seed-party --party vahn,noa,galaThe list is in battle order (vahn/noa/gala/terra, or roster indices) and caps at the three on-screen positions. A member whose record already carries stats - a loaded save - is never overwritten.
Native window and browser play page carry the same cheats, and each leaves a state a playthrough could reach. Native flags apply once the scene is entered; F6 and F7 work any time. On the play page they sit in the collapsed Cheats panel under the canvas. In the native window they are also the F12 panel's Cheats page, any time in play: Up / Down pick a cheat, Left / Right choose its level, amount or item (one added per press), Cross or Enter applies it, and the outcome shows under the rows.
| Cheat | Native | Effect |
|---|---|---|
| Level | --cheat-level N | Raising grants the XP that reaches level N, so stat gains are each member's own retail growth. As in retail, current HP / MP stay where they were (add --cheat-restore) and gear is unchanged. Lowering rebuilds from New Game stats plus the kept levels' growth; stat-up items are lost. |
| Restore | --cheat-restore | Refills HP / MP and revives, mid-battle included. |
| Max AP | --cheat-max-ap, F6 | Fills the Spirit gauge to 100; in battle the Spirit / Super Art command opens at once. |
| Grant Seru | --cheat-seru N | Teaches the 21 Seru and the member's own Ra-Seru (Vahn also the Sim-Seru and Evil Seru summons), every spell at level N (1-9). |
| Learn all arts | --cheat-arts | Every art in the member's list, Hyper and Miracle Arts included. |
| Max items | --cheat-max-items | Every held item and usable consumable to 99. Key items and equipment are left alone, so no story gate opens early. |
| No encounters | --no-live-loop, F7 | Random encounters off; story and boss fights still happen. |
| Walk through walls | --cheat-noclip | The field and world-map walk ignores walls, people and props; a door you walk into still opens. |
| Unlock all Travel maps | --cheat-travel | With an expansion pack, the Journal's Travel page lists every map of the pack, not only the ones you have been to. |
| Gold / Coins | --cheat-gold N, --cheat-coins N | Sets the purse / casino coin bank, capped at 9,999,999. |
| Item | --cheat-item ITEM[:QTY] | Adds through the bag's own add helper: stacks cap at 99, a full bag refuses. ITEM is an id or a name (healing-leaf:5). Repeatable. |
| Codes | --cheat-file PATH | GameShark lines or a Mednafen .cht, written through the engine's map of retail RAM cells; a code with no engine cell is reported as unmapped. On the page, paste them into Codes. |
./legaia-engine play-window --disc "/path/to/disc.bin" --scene vell --cheat-level 20 --cheat-gold 50000 --cheat-item "healing leaf:20"--learn-spell and --set-flagTwo screens a parity sweep needs are gated on state no other flag reaches. Both flags are debug affordances, not player surfaces, and neither changes anything when absent.
--learn-spell <ID> (repeatable, decimal or 0x hex) prepends a spell id at level 1 to the lead member's learned list - the battle Magic arm parks on an unlearned id, so without it the cast band is unreachable on a fresh roster. The player Seru-magic block is 0x81..=0x8B (spell table). Pair it with --seed-party. The older LEGAIA_LEARN_SPELLS=0x81,0x9e environment variable still works and applies after.
./legaia-engine play-window --disc "$DISC" --scene rikuroa --battle 17 --seed-party --learn-spell 0x85 --learn-spell 0x88--set-flag <N> (repeatable) raises a bit in the shared system/story-flag bank - the one field-VM op 0x07 writes - before the scene is entered, and again after --seed-party resets the bank. A raised bit is indistinguishable from one a script raised. Worked example: the Muscle Dome seeds its special-battle word from flags 0x536 / 0x537 / 0x538, and 0x538 seeds course 2 plus the bit that crosses the Ra-Seru chip out of the command ring (Muscle Dome).
./legaia-engine play-window --disc "$DISC" --scene town01 --seed-party --set-flag 0x538 --key-script "60:M" --screenshot /tmp/dome-ban.png --screenshot-tick 200./legaia-engine play-str MOV/MV1.STR --disc "/path/to/disc.bin"With --disc, the argument is the movie's path inside the disc image and the interleaved XA audio track plays in sync (the video clock is driven off the audio cursor). Without --disc it plays a raw extracted .STR file (video only). To dump frames as PNGs instead, use mdec (extracting assets).
Every minigame is a mode suspend on the running world, not a separate program: the field scene stays loaded underneath and comes back when you leave, so you start one from wherever you happen to be standing. Each loads that minigame's overlay off the disc, so its rules, tables and scoring come from the disc rather than from hardcoded numbers.
In play-window each is one key, and the same key leaves again:
| Key | Minigame |
|---|---|
| L | Fishing (P while fishing opens the point-exchange prize list: Up / Down move, Left / Right switch venue, Enter buys one) |
| K | Noa's dance |
| U | The how-to dance (the Disco King tutorial) |
| O | Casino slot machine |
| B | Baka Fighter |
| M | Muscle Dome |
While a minigame is up, the port's own status readout and key hints (which button attacks, how to quit) sit outside the game picture, so the game's own chrome never covers them: in the window's title bar in play-window, and in the strip under the canvas on the browser play page, fullscreen included.
On the browser play page fishing starts where the game starts it: a fishing spot's own script hands over through the field VM's minigame warp, as on the console - the page has no launcher button of its own. Circle casts and locks the power meter, Cross reels, Square reels harder (the port's choice; retail casts on Cross or Square). Points bank into the world's persistent pool, so they survive leaving and re-entering, and the prize-exchange rows come off the same overlay with retail availability gating.
The fishing HUD is the venue's own: its plates, digits, gauges and banners are records of the overlay's sprite table drawn out of the venue's HUD texture page, and the lure and count captions are read off your disc.
Several players can share a world: walk the same town and see each other, chat, and sit down together at poker, Grid Duel, golf, a race or prop hunt. One player hosts with a native play window; the others join from a play window or the browser play page.
# Host: runs the room server inside the window, on port 7462 by default.
legaia-engine play-window --disc "$LEGAIA_DISC_BIN" --host --name Vahn
# Join from another machine on the network (address and code from the host's room screen).
legaia-engine play-window --disc "$LEGAIA_DISC_BIN" --join 192.168.1.4:7462 --room K7QX2M --name Noa
Tab opens the room screen: the room code and the address to join at, the players, Ready (guests), the game pick and Start (the host), emotes, quick chat, Leave. T on it types a chat line, Enter sends. Start needs every seated guest ready. Start inside a game asks to leave, which ends the game for the table. Online games grant no coins, gold or cards.
Without the flags, Tab (or the launcher's Play online button) opens the Multiplayer screen, which hosts a room or joins one by address and code from inside the game. Standing in a town, the host can start Prop hunt here: hiders pick one of the scene's own props and hide as it, the hunter tags props with Cross, and a wrong guess costs health. With an expansion pack's card collection, the room screen also trades cards one for one with another player.
On the browser play page, open Online in the tools, enter the relay address as a WebSocket URL (ws://192.168.1.4:7462/), the room code and a name, and press Join. A browser cannot host. A page served over https:// can only reach wss://, so playing from the published site needs the relay behind a TLS proxy. A standalone legaia-relay --bind 0.0.0.0:7462 hosts rooms without a game window.
Everyone in a room runs the same engine build and the same expansion pack (or none). Each player's world is their own: only avatars are shared, so battles, doors and story progress are not. The full walkthrough, with the browser's TLS caveat drawn out: playing online.
Both hosts decode their audio from the disc you supply - no samples ship with the engine or the site. Music is a SEQ played through the from-scratch SPU against the scene's own sound bank; sound effects come from the executable's descriptor table plus the resident program bank, keyed into the same SPU the music uses, so a cue shares the voice pool exactly as it does on hardware.
A cue id is retail's own, at the place retail writes it into its sound ring, and the browser page reports that per event. The port adds two sounds of its own, both on the standalone Minigames page's Baka Fighter, where retail plays nothing: the round start and the match loss; the page marks them site. Walking is silent, because retail's is: the game plays no footstep sound at all.
Run from a terminal, the engine resolves its files against the current directory: key bindings in legaia-input.toml, options (camera preset, movement mode, the bgm_volume / sfx_volume music and sound-effect levels, 0..=10 with 8 the retail mix, master_volume, the overall output level in percent - 25 by default, a quarter of the full mix - and downmix_mono, the full mono downmix for a single speaker - separate from the in-game Monaural setting, which is the original’s own mono mode) in legaia-options.toml, and save slots under saves/. Run from the same directory each time - or pass explicit paths where supported (--save-dir, config set --config-file). A launcher start always runs from the per-user data directory instead, so the files stay in one place however the binary was started.
Rebind keys with config:
./legaia-engine config show./legaia-engine config set --binding Space=Cross./legaia-engine config set --binding Enter=StartKEY=BUTTON uses friendly key names (Z, Up, Enter, RShift) and PSX pad button names (Cross, Circle, Start, L1).
./legaia-engine record --disc "/path/to/disc.bin" --out session.toml./legaia-engine replay --input session.tomlrecord is play-window plus input capture into a small j-replay-v1 TOML file. The file is checkpointed to disk about once a second and finalized on window close (Esc twice, or the window's close button), so an interrupted session still yields a valid file up to the last checkpoint. replay runs it back headless and deterministic - the same file always produces a bit-identical engine trace, and it needs no disc at all.
legaia-engine --help lists many more subcommands; its COMMAND GROUPS footer separates the player-facing ones above from the development diagnostics (parity oracles, synthetic state drivers) you can ignore.
asset-viewer reads the extracted/ tree (there is no --disc here - run legaia-extract first). The field and dialog demos additionally need the dialog font at extracted/font/, which the pipeline writes by default (or font-extract --disc rebuilds).
The field and world demos, and the tmd row below, also read the mesh and texture sweeps extracted/tmd_scan/ and extracted/tim_scan/, which a default extraction does not write. Make them once:
./asset tmd-scan extracted/PROT --out extracted/tmd_scan./asset tim-scan extracted/PROT --out extracted/tim_scan(legaia-extract --all-textures writes the second.) Without tmd_scan/ the field demo opens with no actors and says nothing about why.
| Command | Shows |
|---|---|
./asset-viewer | The archive browser |
./asset-viewer tim extracted/tim_scan/<entry>/<tim-file> | One texture |
./asset-viewer tmd extracted/tmd_scan | Every mesh in a directory, one at a time |
./asset-viewer vab extracted/PROT/<entry>.BIN --sample 0 | One sample from a sound bank |
./asset-viewer field town01 | The playable field demo |
Started with no view named (a double-click), asset-viewer opens the archive browser on the extracted/PROT.DAT in the current folder or beside the program; with none there it says how to make one and points at legaia-explorer. The browser takes entry names from the CDNAME.TXT beside PROT.DAT unless --cdname names another.
The scene name is a positional argument here, not a --scene flag (field, world and dialog all take their subject that way).
In the PROT browser: N / P (or the arrows) = next/prev entry, PgDn / PgUp = jump 10, Home / End = first/last, typing a number and pressing Enter jumps to that PROT index (the window title shows what is typed; Esc cancels it), Esc = quit; each entry's format is auto-detected and the first viewable sub-asset is shown. tmd and stage pointed at a directory walk every file with the same keys, a typed number naming the 1-based position their titles show. The tim subcommand also takes extracted/PROT.DAT itself with --offset/--clut for the system-UI textures that live outside any TOC entry.
Every scene - who says what, which door leads where, what a chest holds - is driven by the field/event VM's bytecode. Its disassembler is a subcommand of the release asset binary:
./asset field-op-census extracted/PROT --only '4C E2' --context./asset field-disasm file <extracted-script-body>field-op-census walks every scene's scripts and counts each opcode, or with --only shows one opcode in place (here the FMV triggers); file walks one raw script linearly. For a specific scene's per-scene scripts (LZS-compressed inside the scene's MAN sub-asset), the engine has the direct path:
./legaia-engine man-scripts --scene town01 --disc "/path/to/disc.bin"The same engine runs in a browser as the static site's play page, sharing the simulation kernels with the native window. That build is not in the clone - site/wasm/ is generated output. Build it once (around nine minutes cold; needs wasm-pack), serve the site, and open /play.html:
scripts/ci/build-wasm.shpython3 -m http.server -d siteNothing is uploaded: the disc image you pick stays in the tab.
Rebuild after changing anything the page compiles - which is most of the workspace, not just the crates/web-* crates (the play page’s bundle is web-play-bundle over web-play and web-minigames, the tool pages’ is web-viewer). To check whether the bundles you built still match your sources:
python3 scripts/ci/check-wasm-freshness.pyWorth running before concluding a change did or didn't work in the browser: a stale bundle looks exactly like a fix that had no effect. Background: tooling/shipped-bundle-freshness.md.
The page runs the window's engine, and the two are compared frame by frame. These are the differences a browser imposes, not ones that are waiting on work:
.bin you pick, kept in browser storage between visits. The window also reads an extracted folder.An expansion pack adds content made for the port - maps, quests, fights, challenges, trading cards, game modes - and plays beside your own disc; it carries no game data of its own. On the desktop, the launcher's Expansion pack... button picks one (or pass --expansion <pack> to play-window); in the browser, the play page's Expansion pack card loads an .lxpack once the disc is up. With a pack loaded, Select on the pause menu opens its Journal.
Step by step: playing an expansion pack. What one is: expansion packs. The example pack: the sample pack.