At a glance

Window table
52 records at menu-overlay VA 0x801E4738 (PROT 0899 file 0x15F20); parser legaia_game_tables::menu_windows
Record
0x10 bytes: content id, park edge, window class (2 tab / 3 standard / 4 list), content rect x,y,w,h, renderer VA
Choreography
Windows slide in / out via the window-widget VM; a closed window parks offscreen at its park edge
Data read
The live 0x414-byte character records at 0x80084708 - the same block the save file copies
In the port
engine-ui draw builders (wgpu-free, shared by native window and browser) over engine-world-views::pause_screens
Confidence
Confirmed - table byte-matched disc-vs-RAM; layouts pinned by GPU-prim scans of menu captures (how we know)
QuestionShort answerSection
Where do the windows come from?One table row per window: rect + content renderer.Window table
How does a screen get picked?A submenu index through the same sub-screen pointer table the save screen uses.Dispatch
How does "Best Equipment" choose?A bag scan with two surprising ranking laws.Equip
Where are the options stored?Straight into the live config words the audio and pad code read.Options

The screen tree

Press Start in the field and the root command list slides in beside a money / play-time box and a party panel. Its seven rows are the whole menu; each opens one screen, and every screen is assembled from the same window table described below.

Pause menuStart in the field Items Use on a target, Throw Out, Arrange Magic spell list; cast on a party target Equip slot rows, candidate list, Best Equipment, stat compare Status status page, Skills, Magic and Moves pages via the pager Options settings rows, each with a value popup Load the card load flow; greyed in one script context Save the card save flow; greyed off the overworld
Two levels: confirming a row suspends the root list and the routed screen owns the pad until it finishes, then the root list resumes. A blocked row still takes the cursor; it draws grey and buzzes on confirm. Click a row for its section.

The menu opens in any scene the field walk controller runs - which includes the three kingdom overworlds, ordinary field scenes as far as the game is concerned - but not while a dialogue is up. While it is open the game is in the CARD mode, whose handler runs no frame driver, so nothing in the world moves (game modes).

Window descriptor table

Press the menu button and a set of bordered gold windows slides in from the screen edges. None is hand-placed in code: each screen is a list of window ids, each id a row in the table giving the window's home rectangle and content renderer. The renderers only ever draw inside; the frame - which extends 8 px past the content rect on every side - is drawn by whoever opened the window.

320 x 240 stage - Status screen id 26 party list id 27 pager id 30 summary id 28 - main panel FUN_801D33D8 rect (90,16,218,188)
One screen = one window-id list. Each id resolves through the 52-record table to a content rect and a renderer; the gold frame is drawn 8 px outside the rect by the caller.
ScreenWindows (draw order)
Top-level pause menu50 command list (24,24,104,94); 49 money / play-time box (24,178,104,24); 51 right party panel (144,24,152,180)
Statustab 3; 26 party list (14,38,60,38); 27 "Condition" pager (14,92,60,10); 30 summary (14,134,60,70); 28 main panel (90,16,218,188)
Equiptab 2; 21 party (14,42,80,38); 23 item list (174,22,132,182) (renderer-less); 22 main (14,96,292,108)
Optionstab 4; 48 settings (24,40,256,148); 47 value popup (170, *, 128, *) - y/h stamped per open

Live windows are doubly-linked structs carrying the descriptor id and an animated copy of the rect: on screen exit a window slides to its park edge and sits offscreen. The top-level windows stay parked in every sub-screen capture - which is how the top-level set was pinned without a top-level capture.

Equip screen and "Best Equipment"

Four windows; the main window draws "Best Equipment" plus seven slot rows (pictogram, equipped name), a stat-compare block when previewing, and the item's description panel when a slot row is focused. The interesting part is the candidate scan behind "Best Equipment": it seeds with what the character wears, walks the bag keeping one winner per armament slot, and obeys two ranking laws the screen never reveals:

An item competes only when its record marks it equipment and its equip-character mask matches the character; the slot it competes for comes from the equipment record's slot bits, permuted weapon-first. Engine port: equip_session::best_equipment_candidates.

The candidate list previews each hovered row the same way: the candidate goes into the record, the stat aggregator runs, the compare block is summed, and the record is restored. Because the aggregator runs, an accessory’s percent boosts show in the preview. Its clamp also runs: a current HP or MP above the previewed maximum is lowered and never raised back when the preview ends, so hovering a candidate that lowers a maximum clips the character’s current value in retail. The port previews on copies and does not.

Options screen

The settings rows are data-driven too: a display-layout table joined to 8-byte row descriptors, each naming the live config word the row edits. Confirm opens a value popup positioned under the row; a choice commits directly into the config word - edits are already live, backing out reverts nothing.

RowChoicesConfig word
Battle CameraClose / Normal / Far0x800846C0
Battle Select AttackSelect / Automatic / Command0x800846C4
Battle CommandDirectional Buttons / button glyph0x800846C8
Field MoveWalk / Run0x800846CC
Field HP DisplayImmediate / Gradual / Display Off0x800845C4
SoundStereo / Monaural0x800846BC
Dual Shock: Battles / Events / EncountersVibration On / Off0x800845C8 / 0x800845A8 / 0x800845CC

A hidden "Battle Voices" row (0x800845AC) exists in the descriptor list but not in the layout table. Engine port: engine-menus::options + engine-ui::options_draws_for; the Sound row drives libsnd's per-voice monaural fold (movie and voice audio stay stereo, as on the original); the full downmix is the separate Mono output setting.

Deep dive: popup geometry and the debug flag editor

Popup (window 47): x/w static (170,128); y = settings-window y + 0x16 + Σ advances above the cursor row, h = choices × 13 - 4, flipped up when the bottom would pass 0xB0. Rows advance 14 px, 20 px across the two group separators; labels ink 7 white (ink 5 teal on the indented Dual Shock sub-rows), values ink 6 gold at x+140. Committing Events to Off also zeroes the live rumble state.

The retail debug build's developer menu (overlay 0897) carries a raw EVENT FLAG index/value poke tool - not part of the retail pause menu. Two kernels are ported for completeness: the value step (Up/Down ±0x8, ±0x80 with Triangle, Left/Right ±1, clamped [0, 0xFFF]) and the wrapping list cursor. Engine: engine-dev-menu::dev_menu_flags.

List pages: one kernel

Every class-4 list page - the Items and Magic lists, the Equip candidates, shop rows - is paged by one executable-resident kernel. What a player feels as "fixed 12-row pages" is its navigation law:

The menu overlay builds each row as a packed u16 - class nibble, disabled bit, alt-ink bit, 12-bit payload - and the kernel only reads them; a small global protocol carries mode, selection and scroll between the two. The per-row draw switches on the class nibble: bag rows with counts, equip candidates with slot pictograms, shop rows with prices, plain names. Engine port: engine-menus::pause_screens::list_kernel_navigate + engine-ui::menu::screens.

Holding a direction: the cursor repeat

The list kernel does not read the pad's plain "just pressed" word. It reads a cursor word of its own, built by FUN_80035C24: a chord held unchanged is folded back in as a fresh press after 0x14 vsyncs (a third of a second), and then every 3. The chord is the D-pad plus the four shoulder buttons, or the D-pad alone in battle, so a held face button never repeats.

Down held press: 1 step 0x14 vsyncs: nothing then one step every 3 vsyncs A list that opens while the direction is already down clears the chord (FUN_80030628), so the whole delay runs again from the opening.

The same word drives the shop's quantity steppers and the naming screen's letter grid. Engine port: engine-system::retail_pad::MenuRepeat, folded in where the pause menu, the shop session, the naming grid and the battle spell and item lists take their edges, on both hosts.

Items screen: Use / Throw Out / Arrange

An apply screen outlives its use. Items and Magic stay on the target panel while the stack lasts (or the caster can pay) and somebody would still benefit, then hand back to the list. The panel takes only the list's place: the command, caster and info windows stay up behind it, and an all-party item or group spell puts the hand on every row and waits for one more confirm. The Magic screen's caster picker refuses a character with no spells, or with no Ra-Seru, with a buzz before any list opens; it never looks at HP, so a knocked-out member with MP still casts. Up and Down move the caster and target hands (Left and Right do nothing there), and every return to the spell list opens it on its first row.

The Items screen's info window prints an item's description through the same detail printer the Equip screen uses, so a weapon or armour piece shows its stat line there too, and an item that grants a passive shows a small one-member or whole-party scope icon beside the passive's name.

The target panel (window 14) draws one block per member; for the permanent-stat Waters it previews the changed maxima or stat rows rather than plain cur / max pairs. Engine: PauseItemsSession, SpecialUseSession, target_panel_model + their engine-ui draw builders.

History: the mode-1 target panel

An earlier reading called the target panel's mode 1 an "HP-restore preview". Restore items use the plain mode-0 panel; the non-zero modes belong to the permanent-stat Waters (Life / Magic / Power / Swift / Wisdom / Guardian).

Record fields consumed

Into the 0x414-stride live record: experience +0x0, next-level threshold +0x4, HP +0x104/+0x106/+0x11C, MP +0x108/+0x10A/+0x11E, persistent AP +0x10E, growth stats +0x122..+0x12C, displayed level +0x130, spells +0x13C/+0x13D/+0x161, equipped ids +0x196.., name +0x2A7. External tables: item names 0x8007436C, spell names 0x800754D0, equipment stats 0x80074F68, accessory passives 0x8007625C, arts 0x80075EC4.

In the port

The engine parses the window table off the player's disc at boot and frames each screen with the same 9-slice chrome. The menu's two-level stack lives on the session (engine-menus::field_menu, pause_screens), so both hosts walk identical screens; every draw builder lives in engine-ui, the wgpu-free leaf, which is what lets the browser play page draw the same menus without linking wgpu. Panels are drawn at the byte-pinned offsets and checked against menu captures pixel by pixel.

Opening and closing are one rule too. A Start press goes through the same engine call on the native window, the browser page and a headless run, so a press that retail refuses (during a conversation, say) is refused everywhere. Retail does not cut straight to the menu: the field fades toward black for a few frames and the first window appears only once the fade is deep enough, and on the way out the fade lifts with the field running again. Both hosts keep drawing the field until the menu exists, send it no input before then, and draw the fade as the same subtractive quad the shop's opening uses.

Deep dive: shared draw primitives and CLUT staging

Three primitives render everything: the proportional string (FUN_80036888, MES control tokens 0x7C/0xCE/0xCF), the UI-icon sprite (FUN_8002C488, UV/CLUT from the 12-byte-stride table at 0x800732A4), and decimal digits (FUN_80034B78). The palette-staging global DAT_8007B454 is read only by the string primitive - icons and numbers carry their own CLUT, so a write before an icon draw is really staging the next string's palette. Staged index N selects the 16-colour CLUT at VRAM (16×(6+N), 510); main ink is entry 15 - 7 white (206,206,206), 5 teal (66,222,222), 6 gold (231,173,0), 9 orange, 2 red.

How we know

Function / dataAddressWhat it proves
Window table0x801E4738 (PROT 0899 0x15F20)52 records, byte-matched disc-vs-resident across six catalogued menu-open save states; only two fields differ at runtime.
Status panel rendererFUN_801D33D8Every position an offset from the caller-supplied window origin; the submenu fold.
SatellitesFUN_801D2094 / FUN_801D30A4 / FUN_801D31ECParty list, pager, summary layouts and sprites.
Top-level windowsFUN_801CFD68 / FUN_801D0148 / FUN_801D030CCommand rows, money / clock box, party panel.
Equip screenFUN_801D21C0 / FUN_801CF88CSlot rows, stat compare; the Best Equipment scan and both ranking laws.
OptionsFUN_801DCEF0 / FUN_801D2910 / FUN_801DA9F8Layout + row-descriptor tables at 0x801E4404 / 0x801E44B8; live config-word commits.
List kernelFUN_80032A44Page-local navigation, packed row entries, the parked-white rule.
Items flowsFUN_801D7C00 / FUN_801D7E50 / FUN_801D8734 / FUN_801D64A8Use routing, Throw Out stack discard, Arrange sort.
Pixel pinsGPU-prim scansFrame = content − 8 px; plaque tiles; cursor sprites; AP-gauge quads - from the menu_status_town capture family.

The full doc also pins the live window structs, every submenu's state machine, the Items / Magic screens in full, the prize-exchange screen, the equip stat-compare panels and the overlay-identity notes: docs/subsystems/field-menu.md. There is no inn screen in this overlay - an inn stay is field-VM script, see inn.

See also

Reference Save screen Actor / sprite VM Inventory Shop Level-up Window scripts Save record New-game table Spell table Item table Equipment table Accessory passives