The overworld: the kingdom-sized map you walk between towns and dungeons, where random battles interrupt the trip. Under the hood it is the same field engine as a town - same walk controller, same collision grid, same script VM, same follow camera - plus a small state machine that turns a step into a battle, its own ground and horizon renderers, and the developers' fly-over camera and debug menu, both shipped on the retail disc. This page is the tour; addresses and register detail live on world map internals.
map01 / map02 / map03 (Drake / Sebucus / Karisto). Kingdom bundles PROT 0086 / 0245 / 0392; the walk .MAP is the first entry of each scene block.0x03 - the ordinary field-run mode a town uses, with the field overlay resident. The overworld is recognised by scene name, not by mode..MAP's floor nibbles, textured per cell; landmarks from the bundle's slot-1 mesh pack; the horizon bends through a curvature table; the sea shimmers by palette animation from slot 5.engine-field::world_map_entity (carrier), engine-core’s World (walk, regions, the L1 display), engine-scene-host (scene entry and portals), engine-world-views (camera, markers, sky gate). Both play hosts run it; the static world overview is a separate viewer.On each tile crossing the player's tile selects the first region whose box contains it; the region's rate drains a step counter, and when the counter reaches zero a formation is rolled from the region's slice of rows. The roll does not start the battle itself. It hands the formation to a carrier entity - one script-placed entity per scene, distinct from the player - that runs a five-state machine every frame:
| State | What it does |
|---|---|
| 0 Idle | Polls the BGM poller and the pad. The region roll or a scripted "trigger encounter" op moves it to state 1 and points it at an encounter record. |
| 1 Activating | Clears the four formation cells, copies the record's monster ids in, raises the player's "encounter active" flag, moves to state 2 - and keeps executing. |
| 2 / 3 Transitioning | Writes game mode 8 (battle), sets state 4, clears the encounter-active flag. |
| 4 Terminal | Parked; the battle's return path re-seats the overworld. |
The formation cells are what the battle loader reads. While an Incense window is open the roll is skipped and the step counter does not move; the field walk tick drains the window and shows the wear-off notice, exactly as in a town. Scene and town transitions are not in this machine - they are the field VM's scene-change op (entrances). Install sequence and the scripted arming ops: internals.
Everything on field locomotion applies: the same held-pad remap, the same 2-unit stepping, the same per-axis collision against the walkability grid. The camera is the same follow camera a town has, too - the kingdom MAN's camera-region records, composed per region and eased between them.
map01 / map02 / map03, the eye pulled back along the view axis and its height compensated for the terrain under the player. The 6x scale rides the rotation, so the world scales about the focus; that is the player on a plain walk, and a script that moves the focus off the player (the credits' walk away from Rim Elm) scales about the focus it set.map01's walls split Drake in two. Rim Elm's side never reaches the Ravine (keikoku) mouths; the crossing is a scene - suimon, the sluice-gate puzzle - whose far exit opens only after its own entry script sets flag 0x27B. So the chapter-1 route to the Ravine is map01 → suimon → map01 → keikoku.How does stepping on a tile mean "enter Rim Elm"? The kingdom .MAP holds walk-on tile triggers. Each points at a partition-2 record in the scene MAN, and that record is a small script: a named scene change (op 0x3F), a one-shot cutscene beat, or both, behind two story-flag lists - C1 blocks the record if any listed flag is set, C2 requires all of them.
.MAP's table first, then the .PCH sidecar's.0x3F names the scene and the arrival tile; a two-armed form picks between them on a flag.Drake's hub, map01, as the disc lays it out:
| Destination | Record | Gate | Note |
|---|---|---|---|
town01 (Rim Elm), cave01, vell, vozz, jou | one P2 record each | none | reachable on a fresh arrival |
suimon | P2[18] | arrival tile on flag 0x27B | clear: the dead-end chamber; set: the chamber that crosses to the south side |
dolk / dolk2 | P2[1] / P2[2] | selector on flag 0x142 | same trigger and arrival tile; clear = pre-boss, set = post-boss interior |
keikoku (the Ravine) | P2 portals | C1 = [0x193] | drops out of the portal set once the Ravine is cleared |
| mist-wall bands | P2[34..36] | C1 = [0x482] | force-walk beats, no destination; dispatched as a cutscene timeline |
The interior legs - what each town's exits lead to, which deeper rooms are gated - are on the chapter-1 hub sweep. NPCs, signposts and the two fishing signboards on the map are partition-1 placement records. The action button runs the record of the placement in front of the player through the same talk runner a town uses, so a signboard checks the lake, the rod and the lure and asks before it opens the fishing minigame.
Every scene has two walk-on trigger tables: one inside the .MAP, and a one-sector .PCH sidecar staged just past it in memory, searched second. Five scenes put every door in the sidecar, which made them look one-way to any tool reading the map alone: Uru Mais (uru), its three dream rooms (urudre1..3) and jouine, the deepest Drake Castle room.
| Scene | Exit record | Walk-on band | Ends with | Leads to |
|---|---|---|---|---|
uru | P2[42] | tiles (36..39, 5) | 0x3F scene change | MAP03 (Karisto overworld) |
uru | P2[37] | tiles (37..39, 44) | movie 7 | uru2, after MV5.STR |
urudre1 | P2[2] | tiles (35..37, 22..24) | 0x3F | back to uru |
urudre2 | P2[9] | tiles (26, 14) and (24, 13) | 0x3F | map01 |
urudre3 | P2[0] | tile (51, 90) | 0x3F | back to uru |
jouine | P2[16] | tiles (17, 17..19) | movie 8 | town0e, after MV6.STR |
uru is the hub of that chain, with six sidecar doors - the two above plus one dream entrance per room at tiles (110..112, 35), (10..12, 98) and (80..82, 99). jouine has no named scene change anywhere: its record fires a movie, and the movie player picks the next scene. Why three decoders read these scenes as sealed: internals.
The walk view is four layers over one .MAP object grid. Each grid cell is a 16-bit word: the low nine bits index a 0x20-byte object record, bit 0x1000 says the cell is ground you can stand on, bit 0x2000 says it carries a mesh. The two are independent - a river cell is ground with no mesh, an enterable mountain is a mesh with no ground.
FUN_80019278) bilinearly interpolates the four corner nibbles of the .MAP’s floor grid through a height table, so the continent is a smooth surface; the port builds one quad per cell with the same corner heights.record[+0x10] plus the scene pack’s base index out of the global mesh table; a placed spawn is also gated on the MAN interaction record for its cell.0x1D5 is up and loop while it is down, and every retail Sebucus state holds them still.map03 placement picks one of four seats on the story word, raises the hover bit and sets a height of 900, and its motion stream drifts it across the kingdom. The Karisto cart holds its height the same way. The port runs the same per-tick height pass on the overworld as in a field.The ground, the landmarks, the horizon and the shimmering sea come from four different mechanisms. The frame starts in the always-resident executable and calls into the overlay only for the horizon plane and, in the top view, for the terrain renderers.
FUN_80016444).FUN_8002519C).FUN_8001ADA4).FUN_801D7EA0).| Layer | Source | Mechanism |
|---|---|---|
| Continent ground | .MAP floor nibbles | A smooth heightfield: one quad per object-grid cell, corner heights through the floor-height table. |
| Ground texture | object record +0x14..+0x16 | Per cell: 8×8 atlas tile index, texture page (grass, mountain, water and forest are different pages), palette word. |
| Landmarks | kingdom bundle slot 1 (Drake 40 / Sebucus 36 / Karisto 56 meshes) | Placed by object records; drawn as ordinary mesh actors. |
| Curvature | a 0x2000-entry table built at scene load | Added to every vertex's screen Y by depth, so the continent falls away toward a rounded horizon. |
| Horizon / sky plane | cosine table + three globals | A one-shot emitter behind a self-clearing gate: 224 steps, about 670 primitives, rotating with the camera. |
| Sea shimmer | kingdom bundle slot 5 | Palette animation - see ambient effects. |
Cells with no object record have no ground quad in retail either - an environment mesh covers them, so a hole there means a missing mesh, not a texturing bug. No overworld mesh carries a light-source row, so nothing on the continent is lit; colour is all baked. Slot 4 of the kingdom bundle holds no geometry: it is the scene's animation bank (slot-4 records).
With the world-map overlay paged in, a scratchpad flag swaps the per-primitive dispatcher onto the overlay's own table, whose eight depth-cued slots point at overlay copies of the executable's renderers with one insertion between the projection and the packet write: a depth-cue pass (dpcs / dpct toward the far colour) plus a per-depth screen-Y nudge read from the curvature table. That table is the horizon bend, not a fog ramp. That is why a breakpoint sweep of the executable's own handlers sees nothing on a kingdom overworld. Per-slot table on internals; the world-overview viewer draws its own stand-in for the distance cue.
Nothing moves on the overworld but you, yet the sea glitters. A table in the kingdom bundle's slot 5 tells a walker to copy 16-pixel palette strips onto the water and shoreline palette cells on a fixed cadence, so the same texels cycle through a ring of colours. The ocean head steps every 9 vsyncs and completes its cycle in about 2.7 seconds.
| Family | Source | Animates |
|---|---|---|
| Slot-5 palette-walk table | kingdom bundle slot 5 (type 0x06), identical across the three kingdoms | the ocean head plus seven shoreline / terrain cells |
| Script palette ops | MAN 4C 61 ops (one-shot copy, cross-fade) | only the row-498 one-shots on map01 |
The same type-6 table drives ambient walks in twelve carriers, not only kingdoms. Format and cadence arithmetic: internals.
Press L1 on a kingdom map and the view lifts into a top-down survey with the names of the places you have found. That is not a camera trick inside the walk frame: it is a separate game mode with its own small code image (PROT 0981, a 0x1000-byte module of one function and three leaves) swapped in over the head of the field overlay. While it is up the walk frame does not run - the player, the field VM and the encounter roll all stand still.
0x4000 bytes, and puts them back on the way out. The two never coexist.Two occupants of one slot. The world map has no overlay of its own: the walk is the field overlay (PROT 0897) running a kingdom scene. PROT 0981 holds one framed function - the display tick, a six-arm dispatcher on its own mode word - and three leaves: enter / reset (which snapshots the walk camera into the module’s own block), the place-record stepper and the camera clamp. All four are ported in legaia_engine_field::map_display.
The corner panel is five pieces at fixed screen seats: a subtractive grey backing, the kingdom's own 96×96 mini-map drawn additively, a 48×48 view box that follows the camera, a 3×3 player dot, and four compass letters each on a small plate. The mini-map texture belongs to the kingdom's scene pack and is resident for the whole overworld.
The labels come from one table: 29 fixed-size records trailing every kingdom's scene file, each holding a name, a map cell, a kingdom number and a discovery flag (place names). All three kingdoms carry the whole table and filter it by kingdom. A visible record is projected from its cell, half a tile-height above the plane, and its name is drawn in a window as wide as the text, in the class-0 frame - opaque blue marble under a gold border, the frame the battle message banner and the place-name balloon wear - not the dialogue box's translucent gradient. A marker's label, position and visibility are therefore one record - renaming a place is a same-size overwrite, which the randomizer does in all three kingdoms at once.
Both play hosts open the display on L1 with its labels and panel through one shared module (legaia_engine_field::map_display). The player's pointer is the move-VM part the module seats on the leader from its spawn record at 0x801CF6E8: the last mesh of the kingdom pack, turning steadily, drawn by both hosts through the field part pass. Its colour word asks for an add, but the dispatcher hands a word's blend equation only to textured packets: the pointer's flat red facets carry the semi-transparency bit alone and blend on the draw mode the frame left, an average, which is the dark red retail shows. The port draws the kingdom whole instead of applying the survey's visible tile window. The port's own developer panel chords (single-button installs on Square, L1, L2, R1, R2 and Start) are an explicit dev-menu opt-in on both hosts; a scene picked by name used to arm them, and L1 there whitened the screen and a second press sent the party off on the Riremito travel art instead of opening the map.
Stand still in a town, a dungeon or on the overworld and the party's HP and MP panel fades in at the screen's edge; take a step and it goes. It is not a menu and not a phase machine: FUN_801D0D38 is called from the player's own tick every frame (0x801D1660), and builds the panel once an idle countdown runs out.
0x28 frames after the pad comes back, because every map install leaves the pad hold at 0x28 and the entry arm keeps the countdown full until it drains (the post-load hold).2E 1B, such as town0e and urudre1.In the port. One suppress kernel answers every term for both hosts (world_map_panel_host::field_hud_rearm_held, field_hud_warp_rearm), and FieldPartyHud runs the countdown, its frame-late engaged term and the short-idle marker (tick_marked, raised from EncounterState::hud_short_idle_raises).
Retail's pad remap is not a trigonometric rotation. It looks the held direction up in an eight-entry compass ring, adds a whole number of 45-degree steps for the camera, and writes the ring entry back over the pad's direction bits. With a step count of zero it is the identity: Up walks world Z+, Right walks world X+.
| Ring index | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|---|
| World direction | Z+ | Z+ X+ | X+ | X+ Z− | Z− | Z− X− | X− | X− Z+ |
Z−; the port's is Z+, compensated where the animation sector is looked up.0xC00 where a town holds 0x1000; the same word is the speed multiplier the pad step folds in.Two tests pin the convention, one of which fails on a single-axis sign flip because a reflection and a rotation project differently.
The shipped game carries the tooling the designers used to fly over the map: a top-down camera behind a pad combo, and a scrolling dev menu with entries such as MAP CHANGE, ENCOUNT and BGM CALL. Both need a debug flag retail leaves clear, so no player reaches them, but the code is all there. The top-down view a player does reach is a different thing - the map display on L1, whose image is PROT 0981.
MAP CHANGE and CARD OPTION read CLOSED on a retail flag; CAMERA, ENCOUNT and BGM CALL show live readouts. CAMERA is the follow-camera switch, drawn OFF or ON plus the walk region's centre tile; the port's dev menu carries it on both hosts.FUN_801EA9B0 - live in engine-dev-menu, one crate below both the field kernels and the pause-menu front end that opens it. The panel window system stays in engine-field::world_map_panel. The cheat arms’ global pokes are not modelled.The globals the overworld reads - the debug and view-mode flags, the map-display fade ramp, the per-scene kingdom byte, the camera translation pair, the horizon emitter’s gate and angle - are tabulated with addresses on world map internals. The site’s own 3D world overview, which lays out each kingdom from your disc in WebGL, is documented on the world-overview viewer page.