Noa’s dance contest in the Sol Fever Disco is a rhythm game. A beat counter advances with the music, a step chart says which button to press on each beat, and a press counts only inside a timing window that opens on the beat. Closing a chain of correct presses pays points and fills a groove gauge, which promotes the dancer to a denser, higher-scoring chart row. Two rivals play the same chart through the same judge, so their scores are real runs rather than a scripted curve.
0..2999, never lowered. Each 1000 is a level: the dancer moves to a harder chart row whose chains are longer and pay more.0x50A: set on entry, cleared on a loss. The field script that follows reads it.Overlay: extraction PROT 0980, 0x8000 bytes at 0x801CE818; init FUN_801CEF54, per-frame tick FUN_801CF470, judge FUN_801D1960, award routine FUN_801D1AF4. Parsers legaia_minigame_formats::dance_chart / dance_cast / dance_art; rules port legaia_engine_minigames::dance.
The door is the mode-24 minigame warp: field-VM op 0x3E with op0 = 106 (sub-id 6) sets game mode 0x18 and loads the overlay. It is the ordinary scene-backup, overlay-load, return-to-field sequence, so the game returns to the exact field state it suspended. The mechanism is on the field / event VM page.
This is the one sub-id where the loader’s index arithmetic steps: sub-ids of 6 and above add two, so sub-id 6 resolves to PROT 0980 rather than 0978. A disc-wide walk of every scene puts every dance door in the casino scene koin3; the hall’s own scene module other7 carries no genuine warp.
The hall sits behind a members-only door at the end of the koin3 corridor. Its doorman asks for a Gold Card: answering Yes with the card in the bag raises the flag the door tests, and from then on the door swings open on contact. Without it, walking into the door has the doorman step into the doorway and push the player back; the door does not open. See prop-door rides.
The tick routine has no direct caller: it is the tick word of a static actor template the init spawns, reached every frame through the actor-pool walk.
The hall runs at a frame delta of 3, so every state body runs once per three vsyncs. The count-in is 38 READY runs, 11 GO!-in runs and 11 GO!-out runs. There is no 1 2 3 before the song: the digits belong to the finish countdown, four sprite parts spawned at once whose move programs differ only in their wait and their cue.
| Part | Wait (ticks) | Cue |
|---|---|---|
3 | 0 | 0x209 |
2 | 50 | 0x208 |
1 | 100 | 0x207 |
FINISH! | 150 | 0x206 |
The field script picks the mode by setting a story flag before the warp. Setup tests 0x133 (how-to), 0x134 (qualifier), 0x135 (finals) and 0x428 (free play) in that order, so the last flag set wins; it then clears the first three but not 0x428, the standing free-play state.
| Mode | Floor | Song | How it grades |
|---|---|---|---|
0 qualifier (yosenn) | Noa + two dancers | 92 beats, extraction 1048 | Human score against score slot 2; lower clears the win flag |
1 finals (hosenn) | Mary centre, Noa, one dancer | 92 beats, extraction 1054 | Human score against score slot 1; lower clears the win flag |
2 how-to (setumei) | Noa alone, the Disco King teaching | 60 beats, extraction 1048 | Clears the win flag when the score exceeds 300 |
3 free play (asobi) | six dancers | 92 beats, rotating 1065 / 1048 / 1054 | No branch: sets no win or lose flag; shows a personal-best panel |
The results state copies the three scores into the field script’s counter slots, which is how the Disco King can announce Noa’s points back in the town. The saved best score (0x80084464, save block 0x324) is raised by the tick’s head on every frame of a run outside the how-to whenever the human’s score beats it, and free play draws it on its personal-best panel at the top left; the port carries it in its saves and draws the panel on every host. Free play’s song rotation counter lives in the game-state window the save block is composed from, so it carries across visits and saves. The English glosses of the four mode labels are inferred.
State machine FUN_801CF470 on DAT_801D5334 through a 21-word jump table at 0x801CEE68. A dev shortcut ahead of the switch forces the results with the human score at 999.
Every press is judged against one clock. phase is where the clock sits inside the current beat (0..280), and a press counts only while phase ≤ 0xD2 (210). The window is not centred on the beat: it opens on the beat and closes 210 units later. The 71 units before each beat are a dead zone, so a press made early lands there and misses.
points = base / 2 + (base × w) >> 13 with the weight w = 0x1000 - phase × 0x1000 / 0xD2. A rival takes the flat table value. The frame and second figures here are derived from the doc’s numbers: the clock adds 30 units per game frame at the hall’s delta of 3, so a beat is about 9.4 game frames (28 vsyncs, a little under half a second) and the window about 7.| Quantity | Value |
|---|---|
| Beat period | 0x119 (281) phase units |
| Acceptance window | phase 0..=0xD2 (210) |
| Dead zone | the remaining 71 units |
| Clock step | frame_delta × 10 per frame, so frame-rate compensated |
| Chart cycle | 32 beats (0x2320) |
| Song length | 92 beats (0x64FC), or 60 (0x41DC) in the how-to |
| Press | Result | Score | Gauge | Chain |
|---|---|---|---|---|
| in the dead zone | miss | - | - | unchanged |
| in window, wrong button | miss | - | - | unchanged |
| in window, right button, chain still open | hit | nothing | - | +1 |
| in window, right button, chain closes | chain closed | the bonus points | +250 | reset |
lane + 1 matched notes. One note at level 1, two at level 2, three at level 3.The note to press is the judged cell
The CPU feed can substitute a Triangle on a combo slot, but the judge always reads the raw chart cell. Because lane 0’s notes all sit on combo slots, the two diverge on exactly the beats that carry notes. Anything that draws the chart for a player must draw the judged cell; the port exposes both (DanceGame::judged_symbol and required_symbol), and the site’s playable dance drives its note highway off the former.
Judge FUN_801D1960(player, lane, pressed): returns 0 miss, 1 matched, 2 chain closed. CPU feed FUN_801D1820, symbol to pad bit FUN_801D4040.
The step chart is three rows of 32 bytes, one byte per beat. A dancer’s row is its lane, gauge / 1000, so the three rows are three difficulty tiers and every dancer, human or rival, reads the row its own gauge has promoted it to. All three tables are baked into the overlay image; nothing is loaded per song.
| Symbol | Meaning | Pad bit |
|---|---|---|
0 | rest | none |
1 | Square | 0x80 |
2 | Circle | 0x20 |
3 | Triangle, produced only by the CPU feed | 0x10 |
The lane-0 row puts every one of its steps on a 4-beat boundary (0,0,0,1, 0,0,0,2, ...), so its notes sit exactly on the combo slots, the beats where beat & 3 == 3.
Two scoring tables sit beside the chart, both indexed by the dancer’s kind (the same id that picks its mesh):
k, 2k, 3k: the (lane + 1) scaling is baked into the data. Noa’s row (kind 0) is the richest; the competitor kinds are progressively poorer.n is how many combo slots the dancer must bank before spending its n-th groovy move; a huge value means never. Noa’s row is all zeros, because the human’s Triangles are pressed, not scheduled.Chart 0x801D509C (PROT 0980 file 0x6884), bonus points 0x801D41A4 (0x598C), triangle schedule 0x801D41E4 (0x59CC); shapes pinned by the index arithmetic in the judge and the CPU feed.
One award routine runs once per frame for every dancer on the floor. The human’s input is the live pad; every other dancer’s is a pad word synthesised from the chart. Score has exactly two sources:
| Press | Score | Gauge |
|---|---|---|
| Triangle on a combo slot, in window | (lane + 1) × 25 | +1000 |
| Triangle anywhere else | (lane + 1) × 3 | - |
| Square / Circle closing the lane’s chain | the kind’s bonus (accuracy-weighted for the human) | +250 |
| Square / Circle that matches but does not close | nothing | - |
| Square / Circle that misses | nothing (a miss counter rises) | - |
lane + 1. The how-to script says the same as the code: “the level rises automatically”.[0, 2999]. Every writer of the gauge in the overlay is an award, a clamp, or a run / tutorial reset.The competitors run the same award routine off a pad word synthesised from the same chart. They differ from the human only by kind, which selects their row of the two scoring tables. A rival therefore hits every note its own lane calls for (so its gauge climbs and promotes it), takes the flat table bonus for each closed chain with no accuracy weighting, and throws its groovy moves on the disc’s schedule. Only the press latch and the move clip it is playing hold it, so it presses again as soon as both allow, several times a beat, and so can you: a second press inside one beat’s window counts toward the chain. In free play the rivals ride your gauge.
Triangle matches no chart cell. It has its own branch, taught by the how-to as a wildcard to press with the last command of a combo, three uses a song. The stock is set to 3 per dancer before the song and is never replenished.
(lane + 1) × 25 and a full +1000 on the gauge. Anywhere else: only (lane + 1) × 3.lane + 1 full turns. Nothing it presses is judged until the clip ends.| Lane | On a combo slot | Elsewhere | Finale tier | Banner | Input locked for |
|---|---|---|---|---|---|
| 0 (Lv. 1) | 25 + one level | 3 | 34 | Cool! | 24 game frames, 2.56 beats |
| 1 (Lv. 2) | 50 + one level | 6 | 68 | Great!! | 46 game frames, 4.91 beats |
| 2 (Lv. 3) | 75 + one level | 9 | 102 | Fever!!! | 64 game frames, 6.83 beats |
So the move is worth about 8.3 times an ordinary press plus a level, but only on the combo slot, and it costs the dancer’s input for the length of the clip. It belongs on the last note of a combo, in the lane where lane + 1 is biggest.
The finale tier. In the finish countdown and the result wipe (states 11 and 12) the pad is still read, and the same branch pays (lane + 1) × 17 << 1, the ×34 column above, and raises a per-dancer flag whose reader is not in the dump corpus. It is a timing tier, not a “perfect” one.
Award routine FUN_801D1AF4, 0x10 branch; finale arm 0x801D1CE0..0x801D1D30. Lock figures from the clip lengths at the hall’s frame delta of 3.
Each of these follows from a rule above.
(lane + 1) × 3.The overlay names every dancer through a per-mode spawn table and a five-record kind descriptor table; the bodies and clips come from the dance-hall scene module other7, whose first motion section is a 60-record animation bundle (PROT 1229). The rivals are dedicated dancer NPCs, not party members; the casino scene koin3 places the same NPCs on its own floor.
| Kind | Who | Mesh | Rig bones |
|---|---|---|---|
0 | Noa, her field model, drawn at 1.25× beside the hall’s NPCs | global pool slot 1 | 10 |
1 | Mary, centre stage in the finals | scene TMD 58 | 11 |
2 | dancer NPC | scene TMD 62 | 12 |
3 | dancer recolour | scene TMD 61 | 12 |
4 | Disco King, the how-to teacher | scene TMD 63 | 10 |
Spawner FUN_801D0190, descriptors at 0x801D4E1C, face stamp FUN_801D03C4, per-dancer handler FUN_801D1358. The party-clip-bank bit 0x200 of a descriptor anim word is carried by no clip on the disc.
Mode 2 is driven by the Disco King’s own script, a state machine that prints a line, waits for any face button, and resets the shared run state between segments. In order:
Two countdown holds clear the beat clock before advancing; both seed 0x3C and advance only once the timer goes negative, so they run one frame longer than the seed reads. The port carries the script’s shape only (dance_tutorial): the dialogue is Sony text, so hosts draw placeholder captions at the retail line positions.
Script FUN_801D0750, a 19-slot jump table at 0x801CEEE8, 18 working states.
Lv. plus one digit, with no number run.beat & 7 == 3 (beat & 3 at level 0) inside the first 0x46 phase units. Three stock markers show the Triangles left.| Event | Banner | Sound |
|---|---|---|
| missed note | Miss! | cue 0x210 |
| closed chain | Good! + two stars | a random one of three stings |
| landed groovy move, lane 0 | Cool! + stars | cue 0x202 + the groovy sting |
| landed groovy move, lane 1 | Great!! + stars | cue 0x203 + the groovy sting |
| landed groovy move, lane 2 | Fever!!! | cue 0x205 + the groovy sting |
| count-in / run start | READY... / GO! | cues 0x200 / 0x201 |
A closed chain fires no SFX-ring cue: its sting keys two SPU voices directly out of the dance’s own sample bank, one of three random tone pairs. A groovy move plays its cue and a sting at a fixed variant (r = 5) that the random pick (r = 0..2) never reaches. The Chicken!! art on the HUD page has no widget record and no spawner.
Each mode streams its song once the READY counter reaches 0x6F: extraction 1048 (music_01 #60, “Sol disco final 1”) for the qualifier and the how-to, 1054 (#66, “Sol disco final 2”) for the finals, and a rotation over 1065 / 1048 / 1054 in free play. The songs are short loops of about one 32-beat chart cycle. See music tracks.
HUD driver FUN_801D231C over a 34-record widget table at 0x801D46CC; cues are direct stores into the SFX ring (SFX table), descriptor block PROT 1228, samples PROT 1231; sting FUN_801D3D78.
The dance is an ordinary scene load. The hall - the raised stage, the checkered floor, banners, spotlight cones, smoke columns and fixtures - is the other7 scene module’s own field geometry, staged by the SCUS loaders the init calls. The overlay issues no texture or mesh load of its own; its own loads are all sound. Its art pack (PROT 1230, 31 TIMs) carries the HUD page, the three dancer face strips and the venue textures, and 27 of its 31 images match a live retail VRAM capture byte for byte.
Entry and exit are a save / restore pair. The init saves the walked-in scene’s name and PROT block base and points the block base at other7; the teardown restores both and arms a BGM reload, once the results fade completes.
The camera flies a keyframe track. From the entry pose it eases (a half-cosine) from key to key, one segment per 0x152 frames, wrapping from key 13 back to key 1, so key 0 plays only once and the flight is not locked to the beat. The how-to holds the entry pose throughout. On the far poses the eye passes behind the stage-entrance curtain; back-face rejection and the GPU’s polygon-size limit keep the curtain out of the frame, and the port applies both rules on every host, to the hall, the marker tiles and the animated props alike: the curtain is a prop, and a page that cut only the hall drew it across the whole frame.
The floor reuses the field engine. The floor passes walk the scene’s cell grid, and the step-marker tiles are the scene’s own tile-trigger records with clip 6..=9: ordinary field actors that each run a mesh flipbook, four classes out of step. On other7 ten such tiles land on drawn floor cells. Every other cell spawns a plain actor, and when its record names a clip the actor runs it every pass: the spotlight beams that sweep above the stage, their fixtures and the stage curtain all loop thirty-frame clips on one shared cursor. The port poses them on that clock on every host.
Only the hall stands. The init's step-marker walk covers one rect around the stage and spawns only the cells with a trigger record; the second floor pass is switched off by the flag the door warp leaves raised, so it spawns nothing. Every retail dance state holds exactly the 35 cells of that rect, and the hall's other placed props - those north of it and east of it - are not there. The port's hall draws the same 35.
Init FUN_801CEF54, exit FUN_801D414C; camera block 0x801CF51C..0x801CF7D8; floor passes FUN_801D3A2C / FUN_801D2A10; marker tick FUN_801D0640; floor kernel legaia_engine_field::minigame_floor.
The hall’s light show is palette work, not geometry. The session’s first state spawns two records of the other7 stager bundle at the origin, and they tree out into mode-3 CLUT-cell cyclers over rows 504..=508 (the floor, the walls and the stage lamps) and the scrollers and MoveImage strips of the wall panels. The cyclers follow one leader: the overlay installs its own handler in move-VM op 0x20, whose arm 0 copies the leader’s HSV adds into the caller and zeroes the caller’s rates, and whose arm 1 sets the caller’s V add. Arm 1 with -200 on the leader’s first frames is why the hall opens dark. The tree runs at the hall’s frame step, 3 in every parked dance state.
Port: World::stage_dance_ambient moves the walked-in scene’s ambient seat aside and installs the hall’s, and World::step_dance_ambient repaints the hall’s own VRAM on both hosts. The walked-in scene’s VRAM effects stop for the length of the dance, as they do in retail with that overlay swapped out. The hall’s wall panels and stage screens are step-marker tiles, drawn in place on the hall’s game frames, so their moving art is the tiles’ flipbook.
Spawns FUN_800252EC at 0x801CF9A8, 0x801CF9C0; op 0x20 handler FUN_801D387C, installed at 0x801CF07C. The leader’s rows match retail’s program row for row, but its phase is a clock of game frames, and seating it in a replay means seating every cycler’s phase; the floor’s colour in the two count-in comparison frames is what that leaves.
The hall’s colours depend on when you walked in. Coming through the door, the game does not reload the hall’s art: it keeps the video memory the dance club left, and the light show captures its palettes from there. Those palette cells are themselves strobing in the club, so the hall’s floor is a rotation of whatever colour the club last painted, not of the palette on the disc. The floor’s cells also copy the show’s leader only every other game frame, so on a strobe frame they can be a step behind the walls.
The dance is fully playable in the port on all three surfaces, with the rules, the cast, the HUD, the camera and the sound all running off disc data you supply.
K for a qualifier and U for the how-to.legaia_engine_minigames::dance: the beat clock, the judge, the CPU feed, the award, the count-in and the finish countdown. A press returns the full event (miss, hit, chain with its points, groovy with its landed flag and lock).engine-core, so every host that drains the warp gets them.Per-dancer arrays use a player × 4 stride; index 0 is the human.
| Global | Role |
|---|---|
| DAT_801d5334 | Session state (0..0x14) |
| DAT_801d514c | Mode 0..3 |
| DAT_801d581c | Beat phase counter: % 0x119 phase, / 0x119 beat; wraps at 0x2320 |
| DAT_801d5820 | Song timer; ends at 0x41DC / 0x64FC |
| DAT_801d53cc[] | Score, clamped to 999; [0] is the cheat anchor for dance points |
| DAT_801d544c[] | Groove gauge [0, 2999]; never lowered |
| DAT_801d534c[] | Triangle stock, 3 per song |
| DAT_801d550c[] | Chain cursor; cleared every 8 beats |
| DAT_801d570c[] | Last Triangle landed on a combo slot |
| DAT_801d6090 | Accuracy weight 0..0x1000 |
| Function | Role |
|---|---|
| FUN_801CEF54 | Init: scene staging, entry camera, ease table, face stamps, tick-actor spawn |
| FUN_801CF470 | Per-frame controller: states, camera track, beat clock, song end, grading |
| FUN_801D0190 | Dancer spawner |
| FUN_801D0750 | How-to script (the Disco King) |
| FUN_801D1358 | Per-dancer handler: clips, spin, combo-slot banking |
| FUN_801D1820 | CPU feed: what a rival presses this beat |
| FUN_801D1960 | Judge |
| FUN_801D1AF4 | Award routine: input, Triangles, gauge, score, banners, pose |
| FUN_801D231C | HUD driver |
| FUN_801D414C | Teardown |
Three dumps named overlay_dance_* sit past the image’s end at 0x801D6818; their bytes are the fishing overlay’s, which loads at the same base.
+0x20 has no reader. Two byte scans over SCUS and every mapped overlay find no load at that displacement; “dead data” is an inference.Chicken!! cell has no spawner. No widget record covers it, and the producible widget ids top out at 0x21. A drawer elsewhere stays possible and unevidenced.Every state, table, HUD widget and camera key, with its provenance, is in docs/subsystems/minigame-dance.md.