At a glance

Placement table
SCUS_942.54 0x80076C10, 24-byte records, 103 initialised; parser legaia_ui_formats::screen_elements
Widget-class table
SCUS_942.54 0x800732A4, 12-byte records, 0x9D of them; parser legaia_ui_formats::ui_widgets
Sub-draw script
Fifty steps in the battle overlay's rodata (PTR_DAT_801F4D34): which records are up in which phase
Element raiser
FUN_801D8DE8(record, mode) (PROT 0898)
Text actors
Spawner FUN_8003541C; retained handle list ctx[+0x1074], forty handles
Art
The resident system-UI sheet at VRAM page (896, 256), palette row 511; text from the menu-glyph atlas at (896, 0), row 510
Port
Model engine-battle-hud, draw builder engine-ui::battle_hud; both hosts draw one shared surface

Screen layout

display window 320 × 228 (drawn at 2.5×) message banner (8, 4) 296 × 28 shares its seat with the actor-name plaque at (8, 8) Item Attack magic Spirit D-pad glyph, centre (228, 70) Begin Run round prompt, centre (160, 92) intro enemy-name labels, pen y = 48 move name, y = 150, centred on x = 160 target plaque, y = 162, x = 232 roster panelx = 7, y = 164, 102 × 48 roster panelx = 109 roster panelx = 211 active-actor bar (8, 188) 304 × 20 replaces the roster panels during an action; combo cluster at (168, 170), AP plate at (208, 172)
Seats are plate origins. The plaque and the message banner share one seat, and the roster panels and the active-actor bar are mutually exclusive (the bar is drawn below the frame here only to keep both visible). Elements park just below the visible window, at rows 230 to 236.

How an element reaches the screen

Retail’s battle HUD is a list of retained text actors - ctx[+0x1074], forty handles - that the two battle state machines rebuild at every transition. Three pieces of disc data decide everything the list holds and how it looks.

Menu SM edgeFUN_801D0748, ctx+0x06 Sub-draw script step(record, mode) pairs Action SMseed opens, 0x51 closes Raise FUN_801D8DE8spawn at one seat Placement record0x80076C10 + id * 24 Glide to other seat16 vsyncs, linear Text actor, per framedraw dispatcher Widget-class recordsprites, CLUT, seat bias reads frame style
A step flagged to reset first clears the handle list, so after it the live elements are exactly the pairs it lists. The placement record supplies the seats, content box, frame style and string; the frame style indexes the widget-class table.

Who holds the screen in each phase

The menu state machine runs one sub-draw step per state edge. The steps decide which of the four HUD surfaces is up - and because they are disc data, the table below is read straight off them and agrees, element for element, with the handle lists of the catalogued save states.

TransitionRoster panelsActive-actor barBreadcrumb tab + plaqueAP plate
round prompt opensup---
command ring opensparkupboth slide inslides in
item / magic windowback upparksnapleaves
item / magic target stepparkup, pointed membersnap-
attack-mode prompt (Auto / Command)-snapsnapsnap
target cursor cancelled back to the prompt-upsnapslides in
attack target cursor-parksnapleaves
arts entry-park (the AP bar takes the seat)snapsnap
all members committed--tab onlyleaves

The roster panels belong to the round prompt and the browsed windows; the full-width bar to the ring, the attack-mode prompt and the target steps; the AP plate to the ring, the attack-mode prompt and the arts entry. The attack-mode prompt is the ring with its arms swapped: its step opens the Auto and Command chips on the left and right arm seats, sends the other three arms off and keeps everything else where it stands.

Parked is below the screen, not gone. When the bar takes over, retail moves the whole panel cluster to y = 230, just under the 228-line display window. The port’s stage is 240 lines tall, so it simply emits no panel draws while retail parks them. Inside an action the panels come back for a party-wide target, and a cast module can raise them itself - Orb’s heal glides them up so its HP readout counts up in them.

Terra’s numbers are question marks. The readout spawner FUN_801D8DE8 tests each member’s present-party id, and for id 4 - Terra, Noa’s Ra-Seru, fighting beside her - it registers the HP and MP number records as a different type. The per-frame draw renders that type as one ? cell per digit and never reads the value: ??? / ??? for HP, ?? / ?? for MP, on the panel and on the bar alike. Her panel also has no level or status cell, because its frame style (her id plus 0x32) is not one of the three the status element is drawn for. Retail never levels her either: the level-up applier returns at once for her record, so she stays at the template’s 400 HP and 200 MP.

The HP readout counts down a quarter a pass. The number on the bar is the displayed HP +0x172, not the live +0x14C. The head of each actor’s node tick FUN_80047430 moves a quarter of the outstanding damage +0x10 onto it, once per main-loop pass and with no frame-step scaling, so a slow fight running a pass every three vsyncs counts a hit down three times as slowly as a step-1 one. The port runs the ramp with the anim pass on retail’s cadence; a per-vsync ramp had Blade Breath’s readout landing on the final value while retail’s was still rolling.

When the HIT / TOTAL cluster opens

The combo cluster - the 3 HIT / TOTAL 29 pair beside the damage numerals - is not opened by each hit. A melee string banks its hits: each swing’s damage is added to a word on the target and its numeral pops, but live HP is untouched. One arm of the melee kernel then writes the whole bank to HP, and that arm is the kernel’s only store to the readout flag. The readout pass, which runs at the top of every action-machine pass, answers the raised flag by spawning the cluster at its off-screen seat and gliding it in. So the cluster appears once, as the string’s total lands, already reading the full count.

hit 1numeral, banked hit 2numeral, banked hit 3: 15bank 29 written to HP cluster: 3 HIT / TOTAL 29glides 328 to 168 over 16 frames live HP unchanged, readout flag down: no cluster flag raised with the total; the next action pass opens the cluster Cast hits store their own flag. Megaton Press clears it at every hit and raises it once on the barrage's last pass, so its cluster opens already reading 11 HIT. A party-wide monster sweep (Neo Star Slash, Doomsday) never raises the flag, so no cluster opens; a one-hit cast keeps the single DAMAGE readout.
The string’s hits push numerals as they land; only the apply arm that writes the bank opens the cluster. The fade-down band at the end of the action re-spawns it at rest and glides it back out the way it came, when the action landed damage.

Two library states pin both sides. A Somersault capture shows the cluster gliding in beside the third hit’s 15, twelve frames into its sixteen. A Muscle Dome capture holds three swings’ 430 in the Skeleton’s bank at full HP, the total word at zero and no cluster up as the Hyper Art commits. The port counts a melee hit hidden and opens (or restarts) the cluster on the hit event that applies the bank; a cast hit opens it as it lands.

A row-aimed cast opens value rows instead

The action seed lists every living monster in a row table when the target is the every-enemy code 9 and no lone survivor replaced it, and always for spells 0x82, 0x86 and 0x8D. The finisher then adds each hit to its target’s halfword in a value window with the combo flag left down, so the flag pass finds no cluster to open. It opens a pair of records per row instead: the row’s name plate rising from y = 236 to 194, and its value record gliding in at the same x. One row rests at x = 244, four at 16 / 92 / 168 / 244, and the DAMAGE word draws once, over the last row. A hit that keeps the flag down counts without opening: spell 0x8D holds its running total in the window from arm 8 on and shows the rows only at arm 0xD.

A party-wide cast on a lone survivor is the other side of the same seed: the HUD reads the target code before the cast begins, ahead of the rewrite to the survivor’s slot, so the panels stay up through the whole action.

Row walk 0x801E8128.., digits FUN_801E805C, value window 0x801F6980, seed FUN_801E6D84. Port: BattleHud::multi_readout, battle_value_readout::multi_row_cluster.

The placement record

Each record is one element's pair of seats plus a shared content box. The two seats are the element's from and to: which one is the parked seat is per record, so some elements slide in from the right and others from the left or the top.

Mode bit 0 picks the spawn seat (A for 0, B for 1) and the glide runs to the other; bit 1 suppresses the glide.

Three movers

Three small routines copy geometry and content between records - never the id, the box height or the frame - which is how one row can borrow another's content:

RoutineRole
FUN_801D5718lands an element: both seats become the source's seat B, so nothing is left to glide
FUN_801D57E8adopts a source's whole geometry into a row that keeps its identity
FUN_801D5778launches it: seat B becomes the source's seat B minus 0x140 - one display width, so it glides a screen to the left

The commit log uses all three: each committed member's name, command and target are landed into a row of three records, and earlier rows are launched off as the party commits.

The widget-class table

Every sprite the chrome draws comes out of one array. A placement record's frame-style bytes are indices into it: style 0x01 is the blue plate body, style 0x02 the carved-gold one. The join holds for all 103 placement records.

The table's end is structural: it runs exactly up to the frame tile-set pool the class arms read next.

Chrome facts worth knowing

Message and intro banners

The item and magic windows

State 0x3C opens a list window on the right and a description window below-left, both drawn from the system-UI window skin, with a pointing-hand cursor on a 14-pixel row pitch, eight rows a page and a PAGE n/m header. The breadcrumb trail replaces the actor plaque while it is up.

Both are composed by engine-ui::battle_item_ui through the shared menu-window chrome and drawn by both hosts. The rows, the hand and the description line sit on the pens the list kernel and the placement table give them, in the menu font’s ink 7 (ink 0 for a disabled row); the breadcrumb tabs are the HUD’s own trail, not the window’s, and the magic rows draw each spell’s element or Ra-Seru icon through the same font escape the pause Magic list uses. At target select the pointed member’s name tag is the target-select plaque. That plaque prints the target’s own name buffer, so a monster whose name carries the element escape shows its element badge there as it does on the bottom-right target plaque, and each cursor move slides the new name in from the right while the old one slides out to x = 328, both over sixteen frames. Still not drawn: the camera’s re-frame onto the target and the magic target step’s All plate.

The Arts announcement banner

NEW ARTS!!, HYPER ARTS!!, MIRACLE ARTS!! and SUPER ARTS!! are one banner: two textured quads from the value-readout glyph sheet - a position-selected first word and the shared ARTS!! - whose halves march toward a seam as a slide clock runs. Each live frame draws it four times at four points of its own travel, at 5 / 10 / 20 / 50 percent brightness, so the word arrives trailing ghosts that switch off as it lands.

rsquo;s build loop leaves its mark in the side array
Stage byte ctx[+0x28B]BannerRaised when
1NEWthe queue builderthe queue builder marks a newly learned art
2HYPERthe default: the byte is still zero after the other two writes
3MIRACLEthe queue builder raised the seat’s Miracle flag
4SUPERthe Super tail-replace leaves its mark in the side array
5..=8nonea commit on the running actor retires a live banner

The raises sit in the executable’s anim commit FUN_8004AD80 and fire only for a party actor committing the SpecialStarter clip. The three writes run in sequence and the later one wins - they are not an if / else chain. Each raise restarts the slide and queues the character’s Arts fanfare. Port: engine-battle-vm::battle_action::flash_ramp, stepped once per battle frame and drawn by both hosts.

In the port

engine-battle-hud is the renderer-agnostic model: per-slot HP / MP / AP and status, damage popups and log lines, fed by the world’s strike, status and round events. engine-ui::battle_hud::battle_hud_draws_for turns one frame of it into two draw lists - glyphs off the dialog-font atlas and sprites off the resident system-UI sheet - which both hosts composite in the slot they already use for menu chrome.

See also

The full write-up - each plate's packet-pinned derivation, the opening glides, the badge sheet and per-badge palettes, the commit log, the record-41/42 shift and every capture behind them - is in docs/subsystems/battle-hud.md.

Reference Battle Command flow Action state machine Stage and camera Arts command gauge Field menu Dialog font Save-slot portraits