At a glance

Controller
FUN_801D01B0 in the field overlay (PROT 0897), shared by towns, dungeons and the overworld walk. Not the tile-board puzzle mode that shares the overlay.
Collision grid
Per scene, one byte per 128-unit tile: high nibble = four sub-cell wall bits, low nibble = floor tier. Streamed from the scene's .MAP file at load; scripts paint story-conditional changes on top.
Speed
480 units (3.75 tiles) per second walking, 720 running - counted in vsyncs, so the same on a busy frame as an empty one.
Height
A second controller after the walk: floor sampled from the grid's low nibble, or from per-tile ramp records; ledges trigger a scripted hop.
In the port
World::step_field_locomotion (engine-core); collision is retail by default, precise free-angle movement is an opt-in enhancement (below).
Confidence
Confirmed - runtime write-watchpoints on the player position, wall-press captures, disassembly (how we know).

How walking works

One pass of the controller, in order. Everything below the second step is about one question: may the player move two more units this way?

  1. GateSkip everything while the player is held: an encounter queued, a cutscene or talk owns him (flag 0x80000). This also blocks the pause menu.
  2. Camera remapRotate the held d-pad by the camera's eighth-turn so "up" means "away from the camera"; snap the heading to one of eight angles.
  3. Wall slideIf the wanted direction is blocked, probe along the wall and add a perpendicular direction, so the player skids instead of sticking.
  4. SpeedBase step (8 walk, 12 run, 5 on the world maps) × the actor's multiplier × the frame scalar; halved on slow terrain, trimmed by a quarter on a diagonal when the camera's mode nibble is 4 (any other camera mode walks a diagonal at full speed on each axis).
  5. Step loopSpend the speed 2 units at a time, Z then X; each axis moves only if its collision probe is clear.
  6. SettleRe-sample the floor height under the new position; hop a ledge if the floor ahead rises a step.
  7. TriggersEntering a new tile checks the trigger block: teleports, door records, story beats, encounters.
top down, held: up-right = Z+ and X+ wall:dir 3blocked start X skipped, Z stillcommits: the slide Z, then X,2 units each X+ Z+ speed budget(base step x +0x72 >> 12) x frame step Z first: dir 2 (Z+) or 0 (Z-)probe clear -> commit Z +-2 then X: dir 3 (X+) or 1 (X-)probe clear -> commit X +-2 touch / interact dispatch 2 units an iteration, until the budget is spent a blocked axis skips only its own move; the other still steps, and the player slides
The step loop, the last leg of a walk frame. The probe is FUN_801CFE4C (walls and actors); the last committed direction per axis goes to 0x8007BDE0 (X) / 0x8007BDE4 (Z) for the settle and the camera follow, and the loop plays no sound. The port runs the same per-axis stepper over the same tables.

A walkability tile

The world is cut into 128-unit tiles, and each tile is split again into four 64-unit sub-cells. One byte per tile carries both a wall bit for each sub-cell and the tile's floor height.

tile byte 0xA3 X: columns of 64-unit sub-cells Z: rows of sub-cells 0x10even col, even row 0x20 wallodd col, even row 0x40even col, odd row 0x80 wallodd col, odd row low nibble 3 = floor tier (height LUT index) open sub-cells wall P leading edge: 3 probes, 48 ahead, ±16 actor probes (small): 64 ahead, ±32
Left: the high nibble of one grid byte, one bit per sub-cell (the sampled bit is 1 << ((row & 1) × 2 + (col & 1))). Right: what a step tests. The footprint, not the centre, is checked, and one probe in a wall sub-cell is enough to refuse that axis. Probe distances are drawn to scale.
bits 7..4wall bits, one per sub-cellread by collision
bits 3..0floor tier 0..15read by the floor sampler

How fast is a frame?

Retail runs two clocks: the vsync (60/s) and the game tick, one pass of the master frame driver. A scratchpad byte, the frame scalar, says how many vsyncs the last tick spanned (1..4, floored at 2 in field scenes and 3 on the overworld). Every duration and velocity inside the tick is multiplied by it, so a cadence change moves the sample rate, never the speed.

Base stepSelected whenUnits / secondTiles / second
5a kingdom world map (the run test is skipped)300 at multiplier 1.02.34
8plain walk4803.75
0xCrun7205.63
0x18debug turbo (dev flags only)144011.25

The overworld step comes from a per-scene MAN flag set on exactly the three kingdom maps, and each kingdom's entry script also sets the player's multiplier to 0xC00, so the overworld walk is (5 × 0xC00) >> 12 = 3 units per vsync. Reading a per-frame number in the wrong clock is where "the player moves 1.67× too fast" comes from; the port ticks once per vsync with the scalar at 1.

The field buffer: where walls come from

Nothing in a town's script says "this is a wall". The scene loader streams the scene's .MAP file into a per-scene buffer, and the collision grid is one region of it.

+0x0000object records0x20 B each
+0x4000collision + floor grid1 B per tile
+0x8000object mapu16 per tile
+0x10000trigger block4 kinds
+0x12000field pack, efect.datseparate files
RegionContentFilled by
+0x0000Object records: the buildings, fences and props (anchor tile, mesh index, rotation)the .MAP file
+0x4000Collision + floor grid, 0x80-byte rows.MAP; story deltas painted by op 4C 7s
+0x8000Per-tile word: low 9 bits object index, 0x400 object footprint, 0x800 elevation override.MAP; footprint bits stamped at scene init
+0x10000Trigger block: teleports, record triggers, ramp heights, region boxes.MAP
+0x12000Field pack and efect.dat; also the trigger lookup's fallback windowseparate files

The .MAP is the first 0x12000 bytes, streamed by CD-DMA at scene load; a write-watchpoint on the live grid catches only the DMA writer. Scripts then paint story-conditional rectangles on top with 4C 7s - Rim Elm's south gate stays painted shut until the story opens it.

Pressing the action button runs a separate probe: a radius-64 compass point in the facing sector against a ±72 NPC box. A hit engages the NPC's script and turns the player toward it. Props divide into two classes on one authored bit: doors open on body contact, cupboards (which run 31 1E in their spawn prologue) only on the button.

The spawn prologue is a real run of the script, so its class bits land in order: a door may raise the pass-through bit and drop it again on the arm its story flags pick. Biron Monastery’s airtight-chamber door does exactly that until its lever is pulled, and the wing beyond the hall is an airlock: the hall door shuts the wing’s south door as the party walks in, and the wing’s switch opens it and shuts the hall door behind.

Height: two floor models

The walk controller only writes X and Z. After it commits, a second controller re-samples the floor under the new position and glides Y toward it, 12 units a vsync; a third probes ahead along the last step and starts a scripted hop when the floor rises a ledge. The glide runs under a script's movement lock too, so a player a cutscene walks up a stair climbs it the same way.

Tile word bit 0x800ModelUsed for
clearBilinear nibble surface: the four corner tiles' tiers through a 16-entry height LUT, weighted by sub-tile positionflat ground, gentle terrain
setElevation override: flat mean of the four corner tiers plus the tile's kind-2 record (−32 per whole-tile step, −16 per sub-cell step). No interpolationramps and staircases

The kind-2 record replaces the bilinear branch; it is not a fast path on top of it. Rim Elm's shore ramps sit on sea-level nibbles and hold their whole elevation in kind-2 records; interpolating their nibbles walks the player under the drawn stairs.

Triggers: doors, beats and teleports

Crossing onto a new tile (tile = (world − 0x40) >> 7, compared against last frame's) looks the tile up in the trigger block. Scene entry marks the compare stale, so the arrival tile fires on the first tick.

KindRecordWhat it does
0[x][z][dest_half_x][dest_half_z]Intra-scene teleport - most house exits
1, gate 1[x][z][p2_record][1]Spawn a MAN partition-2 record if its story-flag gates pass: town exits (the record runs the named scene change), walk-on story beats
1, gate 0[x][z][p0_record][0]At scene init, bind a partition-0 record to the object on that tile as its touch script and idle clip - house doors, cupboards
2[x][z][coarse:i8][quads:u8]Ramp / staircase height (above)
3[x0][z0][x1][z1][type], 8 bytesRegion boxes: camera zones, encounter regions

A crossing made while a script holds the player - a cutscene, a conversation, a helper record - is spent, not deferred: the tile is stored and nothing is looked up. Deferring it instead fired the landing pad of rugi's warp pair on the first free frame and bounced the player between the two pads forever.

A beat that should play once self-latches: its script sets the very flag its gate lists, so it runs on the crossing that finds the flag clear and blocks itself afterwards. The gate bitmap is the field VM's own story-flag bank, so a set is visible to the next record immediately.

Walking into a house

A town house is not a scene change: the interior is a sub-area of the same 128×128 grid parked in an unused corner, and the door repositions the player. Two door mechanisms exist, and one house can use one of each.

ClassMechanismLives in
Script doorA gate-0 bind whose record moves the player channel 0xF8 on contact - instant teleport (A3 F8), teleport + move clip (CC F8 51) or an animated walk to a tile (C7 F8)MAN partition 0
Map doorA kind-0 teleport tile: no object, no script, no name.MAP trigger block

Map doors are the larger class, and a MAN-only census cannot see them. Vahn's house is the mixed case: script door in, map door out.

A door teleport re-centres the placed-object window. The sub-area sweep keeps a list of the window-owned placements around the camera’s latched region box, and only a re-centre rebuilds it. A script door’s player arm (0x23 or 4C 51 aimed at the player) calls the re-centre on the landing tile, as do the kind-0 warp landing and the leader swap. Without it, leaving a house keeps the interior’s box and the street’s window-owned scenery stays hidden until something else re-centres. The port re-centres from the same arms: a door’s contact runs the door’s own record, whose jump goes through the player arm.

A map door also cuts the camera. The kind-0 landing loads the camera block of the region the player lands in and copies its shot straight into the camera, under the fade, so the view never eases across the door. On the Sol Tower stairs (kor3) retail lands on the upper flight’s fixed shot the frame the player is seated; the port had kept the lower flight’s block and swung its yaw round after the fade lifted. It now runs the same load and snap on the landing.

The room you landed in, not the tile you stand on

A scene’s system script often picks the current room from the region-type mask (_DAT_8007B8F4, one bit per kind-3 region box over the player): each pass it installs the first room whose bit is set - that room’s floor-height ladder, view window and floor oscillators. Retail writes the mask only when the player lands somewhere: a re-centre (scene entry, a door warp, a scripted player move, the leader swap), a camera-zone query, [4C 3D], or every frame while a script holds scratchpad bit 22. A walk never rewrites it.

That is what keeps overlapping rooms apart. conc’s southern hall shares one open column with the room on each side; a mask rebuilt per tile held both rooms’ bits there, and the selector installed the two ladders on alternate passes - every floor tier jumping hundreds of units a frame, the whole town shaking while the player stood by the wall. The port now latches the mask where retail does.

conc, top down: three region boxes in a row (bit n = region type n) west roomtype 3, bit 0x08 east roomtype 3, bit 0x08 southern halltype 2, bit 0x04 shared column shared column landed: 0x04 walk west mask rebuilt on every tile (the port before the latch) on the shared column: mask = 0x0C (both bits) pass n: hall ladderinstalled pass n+1: west roomladder installed floor tiers jump every pass: the town shakes the mask is a latch (retail) written only where the player lands on the shared column: mask = 0x04, from the landing every pass: hall ladder stays installedthe west room's bit waits for the next landing writers: re-centres, MAN load, zone queries, [4C 3D]
Why conc held still in retail and shook in the port. The selector installs the first room whose bit is set and whose band flag is clear, so a mask holding two rooms’ bits flips between their floor ladders; a latch only ever holds the room of the last landing.

Prop-door rides: lifts and swinging doors

Every door bound to an object rides on its own record: retail’s touch post only marks the touched actor (+0x10 |= 0x100), and that mark is what lets the context runner step the actor’s script, so contact hands the touch to the prop runner, which executes the whole record - both doors, both walks and the jump between them. Sol Tower’s floor lifts show the shape; every pair is the same record with the partner id, the walk tiles and the landing changed.

near door (the touched object) partner door, one floor away 1 · Door opensown clip, collision off 2 · Walk inparks until landed 3 · Door shutshide player, fade 4 · JumpA3 F8 beside partner 5 · Partner opensops aimed at its id 6 · Walk outpartner door shuts
Each cross-object op names its target by id, and a bound object’s id is its flat record index, so step 5 lands on the partner door. The prop runner steps those ops on a context seeded from the target prop and writes the words back.

Two engine shortcuts used to hide both doors: applying the record’s decoded teleport on the first contact frame put the player on the far floor before the near door moved, and stepping the partner ops on the record’s own context swung the near door twice and the partner never. Every object door’s record is now left to the runner; an interact-gated object, such as a lever, waits for the confirm press instead.

A door record that animates someone else writes that actor’s words. Some door records move an NPC standing beside them: the clip ops in the record name the NPC by id, so they set the NPC’s clip and its clip-control bits, and a wait on the clip’s end waits on the NPC’s clip. The dance-hall door in Sol Tower (koin3) is the clearest case. With the Gold Card shown, the door swings open and its doorman steps aside; without it, the doorman steps into the doorway, the player is pushed back a step, and the door stays shut. The block carries no text - the Gold Card exchange is the doorman’s own conversation, which checks the bag for the card and, on Yes, raises the flag the door tests. The port used to run the doorman’s clip ops on the door itself, so without the card the door swung open and kept looping its swing while the doorman stood still. Door and counter records walk, turn and face NPCs the same way: the walk or turn plays on the NPC, the record runs on, and its next command to that NPC waits until the NPC has arrived - the Ancient Wind Cave’s inn counter walks its keeper to the counter before he greets you. Object records drive an NPC’s clip or legs in Drake Castle, the Ancient Wind Cave, Nivora Ravine, the Shadow Gate, Zora Castle, West Voz Forest and Rim Elm.

A doorway with no animated prop is a door too. Rim Elm’s house doors wash the screen white, wait out the wash, jump, and fade back in under a time-of-day tint, all from the door object’s record; the port used to skip straight to the jump. The same cross-object ops drive lifts, gondolas and gates in several other dungeons.

Every placed object takes its mesh from its map record, whatever the record’s number. The port used to treat records 1 to 3 as the party’s own models and draw nothing for them; retail draws them like any other, and five placements on the disc sit on them. The double door in the archway off Conkram’s past plaza is one: the port left the archway open.

One actor per bound object

The scene-init sweep spawns an actor for every bound object, so two objects whose key tiles name the same record are two actors running one script under one id. Almost two objects in five on the disc share a record this way: Mt. Rikuroa’s summit binds 46 props to one record, one Sol Tower stairway 31. An op aimed at that id reaches only the first of them the sweep spawned, and a retired actor leaves the list, so the next op reaches the next one: a summit beat takes six of them away one at a time with six identical retire ops, eight frames apart. The port used to keep one script context per record and draw every object on it from that one context, so the first retire op took all 46 props at once. It now runs one context per object, each seated at its own position and angle, and both play hosts read each placed object’s live position, turn, tint and visibility from its own actor.

Talking through a stand-in

Pressing the action button probes a point ahead of the player against every actor's box, and the hit is a conversation when the actor carries the talk flag. An undrawn placement can stand in for a speaker the probe cannot reach: its record only marks another actor as touched, and the context runner then plays that actor's conversation. Conkram's gate guards (concnow) are spoken to this way. The port reads such stand-ins at scene entry and answers a hit on one with its target.

The ledge hop is its own little machine

When the floor ahead rises a ledge, the walk does not climb it: a setup routine spawns two helper actors, raises the movement lock and hands the player to an arc controller with its own cursor, separate from the clip system.

lower floor upper floor setup lock on, two helpers, take-off clip, jump cue flight cursor 0x10 seated on the landing landing clip cursor 0x16 walk clip, landing cue lock off
The arc seats the player exactly on the landing point before recovery begins, so a hop never leaves a rounding error for the walk to inherit.

Action movement: a platformer body, off by default

Not retail. With WorldToggles::action_movement on, the walk and its settle give way to a fixed-point platformer body from legaia_engine_field::action_movement: momentum, a sprint, a jump and a second jump in the air, a dash, coyote time and a jump buffer, with gravity onto the scene's floor levels. It takes the player only where the walk would have: every pad lock still holds, and doors and touches still fire because the body keeps publishing the position and the pushed direction they read. Off, the walk is byte for byte the retail one.

stair: walked ledge: refused jump (Square) again in the air; land on top drop deeper than a stair walk off, fall, land
A rise of up to 48 units is a stair; a taller one is a ledge that takes a jump. Plain tiles slope their tiers across the tile, so most tier changes are slopes the body walks; the ledges are the stepped ramp tiles.
ButtonUnder action movement
D-pad / left sticksteer, camera-relative, with momentum
Squarejump; press again in the air for the double jump; let go early for a lower jump
R2dash along the stick, or the facing
Cross / R1sprint (inverting the Field Move option); Cross still talks

Touching and talking

Collision asks two questions at once: is there a wall, and is there somebody. Before the wall probes, each step tests three points against every other actor - a wider sweep than the wall edge, 64 units ahead and 32 to either side, because actors block with a body box. The same step then decides whether the contact means anything.

ContactNeeds a press?What happens
Walking into a static prop of the touch classnoThe prop's event is posted on the spot, on every contact step
Anything else - an NPC, a cupboard, a signyes, a fresh press of the interact buttonOne probe at a single point 64 units ahead in the facing's 45-degree sector, box-tested against the whole actor list

Where you stand when a scene starts

The locomotion controller never places the player. The scene initializer does, and it picks between two behaviours from a one-shot word the departing mode leaves behind and the initializer clears on its way out.

Entry wordMeaningReached by
0Cold: a fresh player actor, seated on the destination's entry coordinatesevery door, New Game, movie exits that name a scene
2Warp: the existing actor reused, standing where the party leftthe return from a battle, a minigame or a resumed movie
1transient - renormalised to 2 before the initializer runsthe mode-transition pass on the way out of the field, which also snapshots the player's X and Z

Retail never enters a scene without a door operand, but the port's scene picker can. A picker entry first tries the scene’s door arrivals - where other scenes’ scene-change ops land the party, an overworld’s object-bound town mouths included (engine). An arrival on a door frame or trigger tile steps to the nearest whole standable tile, at its centre, so a picked Zeto’s Dungeon (garmel) starts one tile inside the hall rather than on the path behind its exit. A scene no door seats takes a seat its own scripts give the hero (the ending’s Rim Elm, town0e, seats where its epilogue stands him), and only when none qualifies does it synthesise a seat: retail's own fallback coordinate when it is standable, inside the scene's main walkable region and not on a teleport pad; otherwise a door-arrival anchor, then the region's centroid.

When the pad comes back: holds and fades

A scene does not hand you the controller the frame it appears. Retail has one pad-hold word, _DAT_8007B6B4, that the player's tick drains by the frame step and tests before it reads the pad; while it is non-zero the player stands idle, no encounter is rolled and the party HUD stays in its entry arm. Several routines write it, and two of them are on every route through the field.

Pad held: 0x28, drained by the frame step live Encounter roll skipped while the hold is up steps count down again Entry fade black ramp up to the scene subtract mode: white held, then ramped out HUD, door or load entry arm, held by the hold idle countdown 0x28 readout HUD, after a fight entry arm, short-idle marker set readout on the first live frame 0 12 33 40 80 vsyncs
One map install, read off a retail capture of a vell random encounter left by Run: the hold reads 0x28 from the field-back load and drains by 2 a tick, the screen is black for the first 12 field vsyncs and back at the scene's level by vsync 33, and the short-idle marker clears on the frame the hold reaches zero. The readout times assume the Immediate HP-display option and a player who stands still.

The conversation release hold

Closing a dialogue does not hand the pad straight back either. The script runner raises a yielded latch when a context parks on a text segment; when the last context ends and the modal depth falls to zero, it clears the player's engaged bit and, with the latch up, stores 0x10 into the same hold word. A capture of a town NPC paged with Cross reads 16 on the release frame, draining by 2 a tick; the next talk opens only once it reaches zero.

box open hold word 0; the box itself owns the player release: 0x10 vsyncs pad off, no new talk, no leader swap, escape-timer scheduler sits out pad back on the tick the word reaches 0 (drain, then test)
The release hold is why mashing Cross through the last page of a conversation does not re-open it. The leader swap's suppressor holds only through this window, not under the open box.

In the port. World::seat_map_install_tail seats the post-load hold on every field scene entry and on the way back from a battle, and the overworld's pad step drains and tests it as the field's does. The two entry-fade actors run among the screen effects both hosts composite; before they were seated a scene cut straight in. World::tick_script_release_hold stores the release hold on the frame the engine's dialogue engagement falls; script contexts with no box (cutscene timelines, helper records) do not count, since their release has not been captured.

The camera turn is authored, not computed

The pad remap rotates the held direction by an eighth-turn index. Nothing in retail derives that index from the camera. Its writers across the whole disc are two, and both are content: a field-VM op that sets it to a literal, and the tile-board walker. A scene author picks the octant to match the fixed camera the same script installs; a bare tile crossing never changes it.

The four base steps

StepWhen
5Forced slow: the per-scene flag set on exactly the three kingdom maps. With the overworld's three-quarter scale that is 3 units per vsync, and the player never runs there
12Run
24A debug turbo behind the debug-mode word, a dev word and a pad bit. Retail boots the dev word to zero and only ever clears it, so the turbo is unreachable on a retail disc even with the debug-mode byte poked; the port carries the arm behind the same mirrors
8Plain walk

The walk clip is chosen the same way the step is: no direction held is the idle base, a direction under the plain walk step is the walk base, and any other step is the run base. The run button word is one of four button masks the new-game init seeds into the save block; that init is their only writer anywhere, so retail has no way to rebind them.

NPCs: facing and glide speed

Initial facing

The placement record has no facing byte. At spawn the installer pre-runs the record's leading ops (a 0x24 / 0x25 marker up to the first 0x21), and two of them write the heading from the 8-direction LUT at SCUS 0x80073F04: the NPC move-to-tile op 4C 51 (operand +3, low nibble) and op 0x38's simple path. Town prologues route that leg through story-flag tests, so the fall-through branch is the fresh-game facing. Rim Elm's side-by-side villagers at tiles (29,22) / (30,22) derive indices 6 and 2 - they face each other.

Heading space: retail 0 = Z−, 0x400 = X−, 0x800 = Z+, 0xC00 = X+. After spawn, walking snaps the heading and the rotate ops ramp it; the last writer in the frame draws (motion VM).

Glide speed

An NPC's pace is not the player's walk step - the walk kernel never reads the speed multiplier. Both NPC walk kernels carry the base step in the walk op's own operands, on the ladder numerator >> (2 + bits) units per vsync.

OpWhere bits livesNumerator
0x37 glide(op0 >> 5 & 4) | (op1 >> 6)0x80
0x41 glidesame0x40 - half speed
0x47 walk-to-tileb2 & 7; high nibble = approach mode0x80
motion-stream steps 03 / 19 / 20operand byte 1, low nibble0x80
motion-stream 06 / 184-bit selector over the operands' high bits0x80

Base steps run 32 / 16 / 8 / 4 / 2 / 1 for bits 0..5. There is no synthesised motion bytecode: the field VM parks the op's address on the actor and the walk kernel reads the record bytes in place each frame.

In the port

How we know

Function / dataAddressWhat it provesDump
Locomotion controllerFUN_801D01B0Gate, remap, speed, 2-unit step loop; found by a write-watchpoint on the player X/Z (stores at 0x801D0684 / 06E4 / 0744 / 07B4)autorun_player_pos_watch.lua, field overlay dump
Wall collisionFUN_801CFE4C / FUN_801D56C4Biased sub-cell mapping, quadrant bit select, probe tables DAT_801F21B4 / 2214field overlay dump
Actor collisionFUN_801CFC40Static ±80 / moving ±40 boxes, contact classes, +0x98 linkfield overlay dump
Wall slideFUN_80046494Three-point probe, perpendicular sweep, diagonals untouchedfuncs/80046494.txt
Pad remapFUN_800467E8Eighth-turn rotation over the 8-direction ring DAT_800766FCfuncs/800467e8.txt
Frame scalarFUN_80016B6CDAT_1F800393 picked from a VSync(1) measurement with per-mode floorsfuncs/80016b6c.txt
Floor samplerFUN_80019278Bilinear vs override on cell bit 0x800; LUT at scratchpad 0x1F80035Cfuncs/80019278.txt
Settle / hopFUN_801D1BA0 / FUN_801D1878Step-delta globals 0x8007BDE0 / E4, hop arcfield overlay dump
Walk-on dispatchFUN_801D1EC4 → FUN_801D5630 → FUN_8003BDE0Tile compare, trigger scan with the +0x12000 fallback, gate checkfield overlay dump, funcs/8003bde0.txt
Object spawnFUN_8003A55C / FUN_8003AEB0Object record fields, bind lookup, footprint bit, LUT fillfuncs/8003a55c.txt
Grid sourceFUN_8001F7C0 via CD-DMA FUN_8005D9A0The only writer of the live grid is the DMA load; scripts paint deltasfuncs/8001f7c0.txt
Wall paint0x801E1C64 (op 4C 7s)Rect [col0, col1+1) × [row0+1, row1+2); subs 0/1 six bytes, 2/3 sevenoverlay_0897_801de840.txt
Wall-press capturesPCSX-Redux statesX− press pins the 47-unit edge; Z− press pins the authored Z biascapture states

Full write-up, including the hop-arc controller, the door-swing clip binding, the timed warp and the scripted-scene actor programs: docs/subsystems/field-locomotion.md.

Details

Player actor fields

The player actor pointer is _DAT_8007C364. Read +0x14/16/18 as 16-bit: a 32-bit read of +0x14 folds the next word into X and looks like position drift.

OffsetMeaning
+0x10flags: 0x80000 movement disabled, 0x1000000 interact requested
+0x14 / 16 / 18world X / Y / Z (s16, 128 units per tile); Y is the ground-follow height, not a yaw or tilt
+0x26heading, eight angles
+0x72speed multiplier, 0x1000 = 1.0
+0x94encounter-record pointer
+0x98interaction-target actor
Object records and the two spawners
OffsetTypeMeaning
+0x00u16X sub-tile offset: world_x = col × 128 + this + 0x40
+0x02u16Y offset added to the tile's LUT floor height
+0x04u16Z sub-tile offset: world_z = row × 128 − (this − 0x40)
+0x06 / 07i8Footprint column / row delta to the anchor tile
+0x08..0x0Cu16 × 3Rotation triple, 4096 per turn (+0x0A = yaw)
+0x10u16Mesh index into the scene TMD pack
+0x12u16flags; 0x4 = placed

A placed record becomes an actor through exactly one of two sweeps. The scene-init sweep resolves the record's bind (the gate-0 trigger on its footprint anchor) and skips unbound records; the sub-area window rebuild spawns from the tile words with no bind lookup. The sets are complementary (Rim Elm: 37 bound + 9 unbound = 46), so every placed record draws. A bound record with a clip id is posed by that clip's frame 0 - the cupboard's hinge doors hang through the floor without it. Parser legaia_scene_formats::field_objects.

Scene entry: which .MAP, which script, which encounters
  • The .MAP is the PROT slot at define − 2 from the scene's CDNAME block; its 0x12000 footprint identifies it.
  • The entry script is MAN partition-1 record 0 on channel 0xFB. Its wall paints sit behind story-flag tests: map03 paints tile (66, 102) solid behind flag 0x6C2 and clears three rects behind 0x378.
  • The same MAN carries the random-encounter table; towns have real tables too - Rim Elm declares 7 formations, gated by its region records.
  • On entry the player is seated from the destination-entry pair _DAT_80073EF4 / EF8: the door's operand on a scene change, the saved coordinates on a return from battle, a minigame or an FMV. (0xA40, 0, 0xA40) is where the ambient particle emitter spawns, not Vahn's seat.
The scripted-scene actor

Some field actors are small programs rather than NPCs - the hop-arc controller, door swings, one-shot props. FUN_801D4A60 is a 38-state jump table on the actor's +0x54 whose entry state computes +0x54 = +0x54 + 1 + (+0x50 × 10): +0x50 is a program selector, and the table is four short programs of 5, 5, 6 and 7 states entered at 1 / 11 / 21 / 31. Spawner FUN_801D5A24(program).

The submode return state: a parked word nothing reads

Opening a field sub-screen (op 0x49) parks a state in the scene struct: the pre-enter handler slot, then the submode return constant 7, into scene[+0x40]. Nothing reads it. A disassembly sweep of the executable and every overlay image finds no load of +0x40 through the scene pointer, and a read watch across a field-to-minigame transition sees neither word read while the pointer still names the scene. The return is carried by the driver’s own handler slot, so the port collapses enter and return into one step and keeps no copy of the parked word.

Open: what the port does not model yet
  • Touch counters that keep the engaged flag raised until every overlapping touch is dismissed; the engaged flag, the parked-script resume and the facing save / restore are modelled.
  • Terrain slow - the controller’s half-speed test on a cell flag under one scene control byte.
  • NPC walk clips - a script-walked scene NPC glides in its current pose.
  • Static facing fallback - a placement whose prologue the entry pre-run does not execute takes the fall-through leg’s facing.
  • A prop that seats itself still draws where it stood: the hosts hide placed objects by bind record, and one record binds many placements, so the per-placement seat moves only the collider.
  • Travel-art part stages are counted, not drawn.
History: readings this page replaced

Walls were once thought to be authored entirely by scripts (a static search for CPU stores cannot see the DMA load). The +0x8000 region was read as a terrain-flag grid; it is the object map. The object table was read as NPC spawns rather than buildings. Base step 5 was read as a scripted slow-walk; it is the kingdom overworld's step. The 4C 51 operand was read as a glide speed; it is a facing nibble. See do-not-re-walk.

See also

Reference Field / event VM Motion VMs (NPC walking) World map Cutscenes Field map (.MAP) format Scene bundles Encounter record Scene v12 table Play in the browser