The pipeline at a glance

Going top-to-bottom: a PSX disc image, then the ISO filesystem, then the project's archive (PROT.DAT), then per-entry containers, then individual sub-assets. Each layer is owned by exactly one crate.

The five runtime VMs

Legaia's runtime is driven by five independent VMs that talk to one shared actor model. Four are clean bytecode dispatchers (actor / move-table / motion / field-event); the fifth (effect) is a per-slot state machine - different shape, same architectural role. Click each card to read the dedicated subsystem page.

How they wire together: field-VM op 0x22 EXEC_MOVE calls FUN_800204F8 to stage a move record into the actor; the per-frame actor tick (FUN_80021DF4) calls FUN_80023070 to step the move VM; move-VM opcode 0x2F escapes to FUN_801D362C, an overlay-resident extension dispatcher (the same 61-sub-opcode dispatcher is loaded by town, world-map, dialog, and cutscene overlays; each supplies its own JT contents). The motion VM (FUN_8003774C) runs independently per actor for NPC pathing and camera-follow paths. The effect VM is on a different track - battle-only - but shares the same actor model: every effect is bound to a master-slot actor that the script-VM and battle-action SM can reference.

Runtime VM call graph Per-frame scene tick Field / event VM FUN_801DE840 - 43 opcodes (town overlay) drives NPC movement, dialog, story flags op 0x22 EXEC_MOVE → FUN_800204F8 stages a move record Per-actor frame tick Actor tick FUN_80021DF4 - physics + anim per actor steps the move VM each frame step move VM for active actor Per-actor opcode dispatch Move-table VM FUN_80023070 - 71 opcodes (SCUS) JT 0x80010778 - drives Tactical Arts Move VM extension FUN_801D362C - 61 sub-ops (overlay) JT 0x801CE868 - reached via op 0x2F Independent per-actor / per-slot drivers Actor / sprite VM FUN_801D6628 - 13 opcodes title-screen overlay (0971) Motion VM FUN_8003774C - 6 opcodes NPC pathing, camera follow Effect VM FUN_801E0088 walker (battle) 32 master + 128 child slots share actor model
Field VM drives the scene; per-actor ticks step the move VM; the move VM jumps into an overlay extension via op 0x2F. Actor / motion / effect VMs run independently but bind to the same actor records.