The map

Almost all of the game happens in the field - walking a town, talking to people, opening doors. Everything else is a place the field hands you off to and gets you back from: a battle, the world map, a movie, a minigame, a menu. Under all of it sit three services that every mode uses: the asset loader, the renderer and the sound stack.

menu overlay (PROT 0899) Bootdisc to mode machine Title screenNew Game / Continue Minigamesfishing, casino, dance CutscenesSTR movies + XA audio World mapoverworld walk + fog Field / townsscript VM, walking, NPCs Battlecommand ring + arts Inna scripted dialogue Pause menustatus, equip, options Shopbuy / sell / quantity Level-upEXP split + stat growth Save screenmemory-card flow Inventoryone 256-slot bag underneath every mode Asset loaderscene name to VRAM + RAM RendererTMD meshes via the GTE Shading + palettestexel to screen colour Audiomusic, effects, voices New Game door warp script cue exit / enter encounter innkeeper Start merchant victory
The field is the hub. Every arrow out of it is a hand-off the scene's own script or the pad makes, and each round trip ends with the field scene reloaded or resumed. The world map can start battles too (its regions roll encounters the same way a town floor does). Shops and the save screen are drawn by the menu overlay; an inn is not - it is an ordinary conversation in the town's script.

Where the code lives

The game shipped without symbols, so a routine's RAM address is its name: FUN_8002735C is one specific traced function in the project's dumps. Half the runtime lives in the main executable SCUS_942.54 and is always in memory: boot, disc reads, the asset router, two of the bytecode VMs, the audio and rendering libraries. The other half is overlays - chunks of code streamed off the disc into one shared RAM window when a mode starts. Only one of them is resident at a time, which is why the world map, save, shop and level-up screens are parts of the field, menu and battle overlays rather than overlays of their own.

slot A at 0x801CE818 - exactly one of these at a time Field / town - 0897field VM, world map Battle - 0898action SM, effect VM Menu + title - 0899pause, save, shop, title Cutscene - 0970STR / MDEC movies Minigames - 0972..0980one overlay per warp sub-id World-map head - 0981swapped over 0897's first 16 KB Debug menu - 0971dev only, unreachable in retail slot B: summon-render pair 0900 / 0901, plus the battle side-band streams SCUS_942.54, always resident: boot, disc I/O, asset router, move + motion VMs, battle setup, libsnd / libspu / libgpu
Battle loads over the field overlay and the menu over either, so the game never holds two of them at once. The title screen is the tail of PROT entry 0899 (boot); the world map keeps 0897 and swaps only its first 0x4000 bytes for 0981. "Zero callers in the executable" therefore never means dead code - the caller is usually in an overlay.

How this section is organised

The pages follow a player's path through the game: power on, walk a town, the interpreters that script it, a fight, the overworld, the menus and the side games, then the picture and sound under all of it. Pages about the Rust port and the site's own viewers sit apart in the last group, so every group before it describes only the shipped game. The sidebar uses the same groups in the same order.

  1. Startup and loadingdisc to title screen; door to loaded room
  2. Fieldwalking, ambient motion, grid mode
  3. Script enginesthe bytecode interpreters
  4. Battle: rulesencounter to level-up
  5. Battle: on screenstage, actors, HUD
  6. World map and cutscenesthe overworld, movies, the opening
  7. Menus and town servicespause menu, bag, save, shop, inn
  8. Minigamesfishing, casino, dance, dome
  9. Sound and picturerenderer, shading, audio
  10. The portthe Rust engine and the site's hosts

A large subsystem has a readable tour page plus companion pages: internals for the reference tables a tour leaves out, and capture notes for the measurements behind its claims. Companions are indented under their tour in the sidebar and marked below; read the tour first.

Startup and loading

From the disc spinning up to the title screen, and what every later mode leans on to get its assets into memory.

Boot path
From disc spin-up to NEW GAME: the archive directory into RAM, the 14-mode state machine, the title screen, and the scripted opening it launches.
Companion to Boot path
Boot path: internals
The init sequence stage by stage, the full mode table, the CD-read stack, the title overlay's state and pad masks, the name-entry grid and the boot-screen textures.
Asset loader
What "walk through a door" loads: scene name → PROT entries → LZS → typed handlers, and why palettes come from other entries than their meshes.

Field: towns and dungeons

Almost all of the game is spent here: walking a map that moves around you. The scripts that drive NPCs, doors and story beats are in the next group.

Field locomotion
From "push the stick" to "Vahn moves": camera-relative direction, per-frame speed, 2-unit steps and per-axis collision against the scene's walkability grid.
Field ambient effects
Why a “static” map moves: palette walkers, the scene-entry effect tree, texel scrollers, vertex morphs and the fog pool.
Tile-board grid mode
A step-per-press grid mode inside the field overlay, with procedural boards built from actors - that no shipped scene installs.

Script engines

Most in-game behaviour is authored as data - scripts the designers could change without recompiling - and run by a handful of small interpreters. Four are clean opcode dispatchers; the effect VM is a per-slot state machine with the same role. The VM inventory lists every interpreter-shaped subsystem, including the ones too small for a page of their own.

VMDrivesLives inOps
Field / event VMNPC lines, cutscenes, doors, story flagsField overlay 089743 (+ 0x4C sub-dispatch)
Motion VMsPursue / patrol / face-target; scripted motion + flag writesSCUStwo small dispatchers
Move-table VMPer-actor animation, motion and Tactical ArtsSCUS + an overlay extension71 + 61
Window-widget VMMenu window choreographyMenu overlay 089913
Effect VMBattle effect spawnsBattle overlay 0898state machine
VM inventory
Every interpreter-shaped subsystem in the game, with its dispatcher, its op space and whether the port runs it.
Field / event VM
The interpreter behind every NPC line, cutscene beat, door and story flag: 43 opcodes, plus the sub-dispatchers that open shops and menus.
Companion to Field / event VM
Field VM: internals
The context record, every opcode with its byte width, the sub-op tables, and the traps that catch anyone reading the dump.
Companion to Field / event VM
Field VM: op 0x4C
The grab-bag opcode: sixteen sub-dispatchers that paint walls, steer the camera, heal the party, wobble the floor and schedule escape timers.
Motion VMs
How NPCs wander, follow and turn to face you, and how scripted walks write story flags.
Move-table VM
A tiny per-actor animation engine: party members mid-art, summon parts, doors and torch flames each run a move buffer a few opcodes per frame.
Companion to Move-table VM
Move VM: op 0x2F extension
The 61 field-only sub-opcodes behind every ambient effect tree: player tests, flag branches, self-modifying bytecode.
Window-widget VM
The small interpreter that slides the UI's windows in and out - the shop's entrance is one of its programs.
Effect VM
Spell flashes, hit sparks and item-use animations: a slot pool fed by the effect-script bundle.

Battle: rules

From the encounter flash to the level-up window, in the order a fight runs: the overview, one round end to end, the command menu, the action machine and its byte queue, the summon modules, the arithmetic, and the spoils.

Battle overview
The guided tour: loading a fight, the roster, the round loop, the command ring, and how a battle ends.
Companion to Battle overview
Battle: internals
The roster table and actor struct, the battle context, the records the loader reads, the heap ledger that bounds a formation, and the status bits.
Companion to Battle overview
Battle: capture notes
The save-state diffs and watchpoint captures behind the battle pages' claims, kept for anyone re-deriving one.
Battle round loop
One fight from the outside in: encounter roll or scripted entry, the two bands of a round, initiative, monster AI, the results sequence and what a wipe really does.
Battle command flow
The menu half of a battle: Begin / Run, the D-pad command ring, the commit log and confirm, plus the tutorial and Cort stage overlays that hook it.
Companion to Battle command flow
Arts command gauge
Why one Arts-bar button is wider than the others: the weapon-hand command's AP cost is also its pennant width.
Battle action state machine
The state machine between “picked Attack” and “HP deducted” - swing timing, Arts chains, Magic, Summons, Spirit, Run and capture.
Companion to Battle action state machine
Battle action: helpers
Where a turn’s arithmetic lives: the range metric, damage wrappers, escape roll, AI picks, effect spawns, pose driver and voice cues.
Companion to Battle action state machine
Battle action: exit gates
The two states that wait with no timeout - the HP-readout settle and the attack approach - and exactly how each one parks.
Battle action queue
The byte string every action is: swing bytes, art starters and art constants, how the builder rewrites combos, and how hit events turn it into damage.
A cast, end to end
One Seru spell from the command ring to the HP bar: the command flow, the action bytes, the action state machine's three cast bands, the paged cast module and the Done band.
Cast modules
The 64 small overlay programs behind every summon and capture-class special: how an action reaches one, its phase machine, damage shapes and camera.
Battle formulas
Damage, MP cost, accuracy, escape and the RNG - the exact arithmetic.
Level-up
EXP split among survivors, a closed-form XP curve, and growth curves that land every stat on its level-99 ceiling.

Battle: on screen

How the same fight is drawn: the arena and its camera, the combatants, and the chrome around them.

A battle frame, end to end
One frame from the action state machine to the framebuffer: the tick order, the cast tick that runs from the draw, the ordering table, and why some frames lose their dither.
Battle stage and camera
A procedural ground grid, a half-bowl backdrop drawn twice, ten camera framings and the field-to-battle transition.
Battle actor rendering
Assembled party meshes, one staged clip byte, the clip-tag ladder, slow motion, tint through the depth cue, and the trails behind a swing.
Battle HUD
Plaques, panels, chips and banners: two static tables and a per-phase script derive every seat, plate and palette on the battle screen.

World map and cutscenes

The two places the field hands you to between towns: the overworld you walk, and the movies and scripted scenes you watch.

World map
The overworld: the walk controller, encounters and location entry, the terrain renderer, the fog, and the palette-walk table behind the shimmering ocean.
Companion to World map
World map: internals
How the carrier installs a formation, the camera's globals, how portals and gates are seeded from the disc, the overlay terrain renderers and the debug tooling.
Companion to World map
World map: chapter-1 sweep
Every overworld leg reachable from Drake Kingdom in chapter 1: which tile enters which scene, which record carries the entrance, and which flags gate it.
Cutscenes and movies
The STR movies (MDEC video + XA audio) and the scripted in-engine scenes like the opening narration crawl.
Companion to Cutscenes and movies
Cutscenes: internals
The movie overlay's sector ring and MDEC feed, one frame's decode step by step, and the opening's timeline, narration roller, camera mover and actor channels.

Minigames

All five are playable on the minigames page and inside the port.

Fishing
Cast, coax a bite with a reel rhythm, then fight the fish on a tension gauge; the band roll, species pick and prize counter.
Slot machine
Three cylinder reels in a 3D scene, five paylines, two random generators and a machine that pays back what it has taken.
Baka Fighter
A rock-paper-scissors duel with stat-scaled damage, a score-gated secret ladder and a pot you can lose.
Dance
A beat clock, a timing window with continuous accuracy, chains that pay only when closed, and the three-use Triangle wildcard.
Muscle Dome
An arena ladder of ordinary battles under a contest hub: the tally that heals, the envelopes, the settlement.

Sound and picture

The two services every mode draws on, as the retail game runs them.

Renderer
How a TMD mesh becomes pixels: the GTE geometry pass, the ordering table, VRAM texture pages and palettes.
Companion to Renderer
Renderer: internals
Which mesh leaf a retail frame really enters, the light-source formula, the per-primitive dispatch table and the routine-by-routine provenance.
Shading and palettes
How a texel becomes a screen colour: palettes read from video memory, the baked mesh colour, depth cue, blending, dither.
Audio
Three roads to the speaker: sequenced music through Sony's sequencer, one-shot effects keyed from a descriptor table, and voices streamed off the CD.
Companion to Audio
Audio: internals
How the sound files are found, the track-swap handshake bit by bit, Sony's sequencer and SPU libraries function by function, and how the port's sound is measured.

The port

The from-scratch Rust engine and the site's own viewers. These pages describe this project's code, not the retail game; each links back to the retail page it reimplements.

Engine reimplementation
Bring your own disc, ScummVM-style. Retail is the measured ground truth; enhancements are toggles that leave it bit-identical when off.
Gameplay tweaks
Which disc-patcher features the engine runs itself as switches, which the port avoids by construction, and which stay disc content.
Expansion game modes
Hold'em, Grid Duel, golf, racing and prop hunt: deterministic rules engines, the trading-card economy, and the seat both hosts run them in.
Run rules
Difficulty presets, New Game+, ironman, an in-engine randomizer and Boss Rush, picked on the New Game rules screen.
Netplay
Host a world: rooms and the relay, lockstep and host-authoritative sessions, roaming avatars, the security posture.
Port renderer (wgpu)
How the port draws a frame: the PlayStation traits that are always on, two-pass semi-transparency, enhancement passes, the screen overlay.
Browser host
What the WebAssembly bundle exports: the play runtime over the native session, the viewer pages, and how two hosts are kept in step.
VR mode (WebXR)
Stand in Rim Elm with a headset: stereo rendering and head tracking over the world overview, the field viewer and the play page.
World-overview viewer
How the site's 3D world overview assembles each kingdom into one browsable scene: terrain layout, distance fog, animated ocean, camera anchors.