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 the town overlay extension at FUN_801D362C. The motion VM (FUN_8003774C) runs independently per actor for NPC pathing and camera-follow paths; the engine's Camera ticks it via Camera::tick_script. 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.