The Sol casino’s one-on-one fighting cabinet. You pick Vahn, Noa or Gala in their battle forms and climb a ladder of CPU opponents in best-of-three matches. Every exchange is rock-paper-scissors between three attacks, damage scales with each fighter’s stats, HP and combo, and a downed opponent is finished by an automatic special. Won rungs build a coin pot you can bank or risk on the next rung. This page is how the cabinet works, with the numbers it uses.
0xC80 (3200) HP.0x40 per extra hit in a streak. Below 0x280 HP a fighter can roll a critical.0xE000 bytes at base 0x801CE818; init FUN_801CF00CFUN_801CF388, state word DAT_801DBF44, 37 statesFUN_801D3468, phase DAT_801DBF78FUN_801D3A14 / FUN_801D3B18 / FUN_801D6660FUN_801D3F44 / FUN_801D487C0x801D769C, 17 records, stride 0x6C; action tables PTR_DAT_801DB8B8[char]_DAT_80084440, banked into the coin bank 0x800845A4engine-minigames (baka_fighter, baka_cabinet, baka_fighter_chrome, baka_impact_fx, baka_duel); 3D duel engine-minigame-scenes::baka_duel_sceneEvery rule on this page is read off the overlay’s disassembly; provenance is ghidra/scripts/funcs/overlay_baka_fighter_<addr>.txt. The two dispatchers are read from the disassembly, not the decompiled C, which renders most of the cabinet’s exits as fake label-calls.
The three Baka Fighter cabinets in the Sol casino (koin1) are interchangeable doors. Each sits behind an entry gate: an inventory compare and a one-coin fee before the fade and the warp. Failing the gate skips the warp. The door is the mode-24 minigame warp, field-VM op 0x3E with op0 = 104 (sub-id 4), which sets game mode 0x18 and loads the overlay. It is the ordinary scene-backup, overlay-load, return-to-field sequence, so the game comes back to the exact field state it left (mechanism on the field / event VM page).
A disc-wide walk of every scene finds a fourth site, on an overworld map. It is dev residue: a bare record with nothing but the warp, in a slot no reachable script spawns.
All six casino cabinet records (three Baka Fighter, three slot machine) share one choreography, written into the cabinet’s own script:
0x433..0x435 for Baka FighterA second pass after the warp walks the wash out, clears it, stands the player up and glides them off the stool. Nothing in the record reaches it on its own: the scene’s system script loops on the six seat flags, clears the one it finds and re-engages that cabinet once the field is back.
The port runs both passes on both play hosts through the field-VM talk runner, and emits no field colour push in a minigame mode, so the wash never draws over the duel.
Above the fight sits the cabinet: one state word with 37 branch targets covering the whole run - attract, player select, per-rung setup, the round bracket, the duel, the win / lose / all-clear sequences, the NEXT GAME / PAY OUT menu, the pause menu and an unreachable developer menu. Only state 0x64 is “a round is live”.
0x1F4, the only state that banks the pot. GAME OVER zeroes the pot on its first frame, before its banner spawns, so a lost match exits with nothing. Not drawn: the secret opponent’s own tally (0x6D), which replaces the ordinary tally exit when a secret rung was armed and also leads to the reload, and the How to Play screen (0xC0) under the pause menu._DAT_8007B938), so a direction held that long steps the cursor every frame, with a cue each step. Confirm is Cross or L1, and reads the press alone.After a won match and its tally, a two-way menu offers NEXT GAME (fight the next rung, keeping the pot on the line) or PAY OUT (bank the pot and leave). The pot shows under it as a GET COIN readout. The menu’s cursor wraps both ways, and the sheet vanishes the frame NEXT GAME is taken.
The cabinet reads the packed Legaia pad word, not the raw PSX layout:
| Mask | Meaning |
|---|---|
| 0x44 | confirm (Cross plus L1) |
| 0x21 | cancel (Circle plus L2) |
| 0x844 | attract “press to start” (Start, Cross or L1) |
| 0xF0 | any of the four face buttons |
| 0x110 | in-duel menu (Select or Triangle) |
| 0x8000 / 0x2000 | cursor left / right |
| 0x1000 / 0x4000 | cursor up / down |
The player-select and NEXT GAME / PAY OUT cursors wrap both ways. The three-row pause menu and the developer menu fold with an unsigned modulo, so they wrap at the bottom and stick at the top: -1 as a u32 is divisible by both 3 and 5.
The epilogue carries two draw flags: the arena pass is off on the attract, the tally, the last all-clear beats and the exit; the duel HUD draws only in 0x36..0x38, 0x64, 0x65, 0x6E, 0x96 and 0x97. So the tally and the NEXT GAME / PAY OUT menu show no duel HUD.
A match is first to two round wins. Inside a round, each fighter commits at most one attack per exchange; the exchange stays undecided until both sides have committed, and is booked on the frame the winner’s strike lands.
0xB5 frames from the deciding exchange; until it is out, fighters, HP and result banners stay as the exchange left them. The pause menu (Select or Triangle) is not drawn.| P1 \ P2 | 0 idle | 1 Square | 2 Circle | 3 Cross | 4 special |
|---|---|---|---|---|---|
0 idle | undecided | undecided | undecided | undecided | P2 |
1 Square | undecided | draw | P2 | P1 | P2 |
2 Circle | undecided | P1 | draw | P2 | P2 |
3 Cross | undecided | P2 | P1 | draw | P2 |
4 special | P1 | P1 | P1 | P1 | P1 |
The resolver tests in a fixed order: a special on either side wins outright (P1 checked first); both idle, or either side still mid-commit, is undecided; equal types draw; otherwise the beats relation. A draw books damage to both fighters. An attack never lands on a fighter who has not thrown. The resolver also has a settle timer, but it is vestigial: nothing in the overlay ever stores a positive value to it, so exchange pacing comes from the clips.
hit = power + power * ATK / 100
dmg = (hit * (200 - (mod + mod * DEF / 100)) * 0x20) / 100 + (combo - 1) * 0x40
critical pending on the winner: dmg = power << 7
| Input | Where it comes from |
|---|---|
power | the winning attack’s action record +0x18 |
ATK | the winner’s roster record, one of three values picked by the winner’s HP tier |
DEF | the loser’s roster record, one of three values picked by the loser’s HP tier |
mod | the loser’s roster damage modifier +0x24 |
combo | the loser’s count of consecutive hits taken; it rises after every hit and clears when that fighter wins an exchange |
0x280, rand() % 100 below its roster record’s +0x34 chance sets a critical-pending flag. The next exchange that fighter wins does power << 7 instead of the formula.0x40 (64) on top: the second hit of a streak gets +0x40, the third +0x80.0x20 world units and plays their hit clip, or the knockdown when the landed keyframe is the special’s last.Damage FUN_801D3B18, critical FUN_801D6660, resolver FUN_801D3A14. The constants (0x20, 0x40, << 7, the HP thresholds) are immediates in the dump; a debug printf labels the +0x38 family atk, which pins ATK against DEF.
| Button | Type | Beats | Loses to |
|---|---|---|---|
| Square | 1 | Cross | Circle |
| Circle | 2 | Square | Cross |
| Cross | 3 | Circle | Square |
| (automatic) | 4 | everything | - |
The player’s throw comes from the edge-triggered pad word, so a throw is a press, not a hold. The special is not a button: it fires automatically for a fighter whose own HP is not zero, whose foe’s HP is zero, in a round not already decided. It plays its clip, spawns the afterimage and drops the duel into slow motion.
An exchange is booked on the frame the winner’s strike keyframe is crossed, not when both fighters have chosen. Every attack and special in the action tables carries at least one strike frame, each in 0..=64 clip frames, in order. Each tick the clip cursor advances by the action’s speed; the range it covered is checked against the strike frames, and a hit arms the booking. So a slower attack lands later even when it wins.
The opponent never leads. It throws only in answer to your throw, on the same frame and blind to what you picked, so the duel stands still until you press, and a player who holds back is never attacked. Its answer pulls it out of its own hit reaction; yours does not. A struck player’s pad stays masked until the reaction clip ends, and a throw lands from the idle or straight after a booked hit, which is how a winning attack chains. The two attacks stand after a booking, so an attack with a second strike frame can hit twice on one exchange.
Each opponent mixes random throws with a canned pattern: a NUL-terminated byte list in its roster record at +0x4C. Every pick:
roll = rand() % 6(pattern[cursor] - 1) % 3 + 1, whatever the rollroll % 3 + 1: one of the three attacks, uniformlySo an idle cursor gives a three-in-six chance of a random attack and a three-in-six chance of starting the pattern, which then plays back to front to exhaustion regardless of later rolls. The CPU never opens with a special; its specials are the same automatic finisher as yours. A developer branch, unreachable on retail, can instead remap the opponent to counter the player’s committed input.
Combat tick FUN_801D3F44 (slot-0 branch for the buttons), keyframe lookup FUN_801D6E5C, CPU pick FUN_801D487C; port BakaFight::ai_pick on a BIOS-rand stream.
0xE raises the all-clear flag and wraps to 0.0xFA..0xFE retire both duel actors and stand roster 4 on the player's mark on its idle (tick FUN_801D6F18), seen only darkened through a full-screen subtractive quad behind "IT'S NOT OVER YET." A run that met both secret opponents ends on the bare arena instead.+0x20) to the tally, which drains it into the pot. The match-won arm itself never touches the pot.The fighters’ names, prizes, stats and patterns decode from the disc (roster parser legaia_minigame_formats::baka_opponents) and are not reproduced here; the minigames page reads them off your disc.
A won match ends on a tally of four counters. Three feed the running high score (which is what the secret-rung gate reads); the fourth is the coin prize, which feeds the pot.
| Row | What it adds | Drains into |
|---|---|---|
| Match bonus | 30,000 when the opponent won no round (a shutout), else 20,000 | high score |
| Combo bonus | per resolved hit, a table cell keyed by the longest streak you have landed, clamped at 0x13 (20 rows) | high score |
| HP clear bonus | per resolved hit, 50,000 at full HP 0xC80, else a table cell keyed by hp / 0x140 (11 rows) | high score |
| Coin prize | the rung’s prize, roster record +0x20 | the pot |
The rows drain strictly in sequence, each starting once the rows before it are empty, with a tick blip every step. A row fades in while the row just above it is empty, so a zero row lets the next one light up early and drain without a pause when its turn comes. A row moves a fifth of what is left per frame while more than 5 remain, half while 3 to 5 remain, and exactly one below that. Pressing any face button snaps the tally to its end: the fast-forward latch short-circuits the step to the whole remainder.
The combo row reads the running maximum of the opponent’s hits-taken counter, which the HUD latches once a frame - so the score’s combo term tracks the longest streak you land.
Tally FUN_801D239C, drain step FUN_801D6710, per-exchange accumulator FUN_801D2A28, combo / HP tables DAT_801D70C4 / DAT_801D711C (overlay rodata, no terminators). The same drain step is linked into the Muscle Dome hub.
Each of these follows from a rule above.
0x40, and the longest streak you land also feeds the combo score row. Losing a single exchange ends it, and so does letting the opponent recover: the counter belongs to the fighter taking the hits and clears when that fighter wins one or a clip of theirs ends.0x280 HP a fighter rolls for a critical at its own roster chance - including the opponent. Finishing a foe who has dropped into that band removes the comeback threat.Everything the duel draws in 3D is placed by immediates in the overlay. The fighters are full battle-form meshes: the party’s are the same high-detail TMDs the turn-based battle uses, and each ladder opponent ships its own mesh, 256x256 atlas and 8-clip animation bank.
X = -(stand_off + 200), the opponent at +(stand_off + 200), where stand_off is the roster record’s +0x44 (0 for the first three ladder rungs, up to 140).0x2710, which drops the one between the camera and the fighters. The floor is the battle ground-grid emitter relocated into this overlay. Its depth cue fades toward black, not toward the far colour the epilogue sets: the warm pool of light is drawn first, and its draw routine leaves its own colour word (black) in the GTE’s far-colour registers.In the port, one 3D surface (engine-minigame-scenes::baka_duel_scene) draws the duel on all three hosts: fighters, ghosts, walls, floor, impact parts and the round-start cameo, plus the cabinet’s front-end lineup. The floor carries the epilogue’s warm pool of light and, in the duel alone, each fighter’s subtractive drop shadow: the combat tick is the only caller that draws one, so the title card and the lineup show none.
When an exchange books, two effects spawn at the winner’s strike offset - the fist, on the frame the strike lands: an additive flip-book flash (eight cells along one row, seven along the next) and a stage-pack mesh that fades in and out, yawed to mirror the flash across the arena. A draw spawns both fighters’ pairs.
The special draws two ghosts of its thrower, three and six frames behind the body. They are translucent: the colour word’s mode byte raises the semi-transparency bit with additive blending, so each ghost is the fighter’s texture at half, then a quarter, of its weight added over the frame. The far ghost is the fainter one - a glow that thins away from the body, not a dark copy.
Held Triangle at a round setup spawns the stage pack’s fourth model, a ring girl: she walks in side-on, turns to the camera, strikes a pose, turns back and walks off. At the pose a VRAM cell blit swaps her eye sprite from open to closed and leaves it swapped - a wink. A capture with and without Triangle held confirms she spawns only in the held run.
Impact pair FUN_801D4DF8, afterimage FUN_801D49E8, cameo FUN_801D6310 + blit FUN_801D65F8; ports in baka_fighter_chrome and baka_impact_fx.
One renderer draws the duel HUD every frame. Its own pieces sort one layer under the round banners, so a ROUND or FIGHT! card always draws over it.
| Round ended with | Banner |
|---|---|
| both HPs down | DRAW |
| player down | YOU LOSE... |
| foe down, player hit | YOU WIN! |
| foe down, player untouched | PERFECT!! |
Each banner comes with an announcer line. The round banner flies two halves together, holds and flies them out; its line is XA32.XA on the channel of the 0-based index of the round about to start, which the round setup has already advanced. The cabinet's banner states 0x33..0x36 drive the banner on their own clock. The title card and the round banner are pure frame-counter timelines. A third timeline long read as a per-round READY / FIGHT countdown is the all-clear announcer: only the five all-clear beats 0xFA..0xFE call it, and run beside the round banner its XA33 line cut the round number off.
Both play hosts draw the duel HUD through one shared builder, whether the duel opened from a casino cabinet seat or from the launcher. Before that builder existed, a seated duel showed a lone round digit: the HUD model was ported and built every frame, but neither host drew it.
HUD renderer FUN_801D2AFC over the 51-record widget table DAT_801D7160; banner draw hook FUN_801D67F0; title card FUN_801D59D4, round banner FUN_801D5C7C, all-clear announcer FUN_801D21FC.
The cabinet uses four sound-effect cues, all static descriptors written straight to the cue ring:
| Event | Cue |
|---|---|
| hit: an exchange’s damage lands | 0x09 |
| confirm / cursor / cancel | 0x20 / 0x21 / 0x37 |
| score-tally tick | 0x21 |
The hit is the only fight sound effect; a draw, which applies damage twice, plays it twice. Everything else you hear in the duel is an announcer voice line streamed as CD-XA: thirteen call sites, ten in the chrome timelines and three in the cabinet itself (the FIGHT! flash, NEXT GAME, GAME OVER). The SFX bank is the shared battle / minigame bank; the BGM is “Sol disco fever” (sound-test #55), see music tracks.
The port is from-scratch Rust: the rules crates carry no world, scene or renderer, and the same cabinet, chrome and 3D duel run on all three hosts. Play it on the minigames page with your own disc.
| Host | How you get in |
|---|---|
| native play window | the casino door warp, or the B key (the same mode-24 warp; B again aborts with no coins) |
| browser play page | the casino door warp |
| minigames page | opens the same cabinet directly; the page keeps the winnings accumulator the play hosts keep on the world |
The play hosts run the real ladder inside one visit: NEXT GAME seats the roster record the rung fold names, the tally drains into the same winnings accumulator retail keeps, and the exit’s return warp pays it into the coin bank. Leaving the duel before the tally finishes banks the remainder.
For modders and anyone reading the dumps. The full tables are in the doc linked below.
3 + n is entry 1206 + n), each a chain of a 256x256 4bpp TIM, a TMD and an 8-record ANM bank. Entry 1220 is not a fighter pack.0x60 bytes each - idle, three attacks, special, hit, knockdown, win flourish - with clip speed at +0x04, power at +0x18 and up to 8 strike keyframes.Roster + | Field |
|---|---|
| 0x00 | fighter name, 32 bytes |
| 0x20 | coin prize |
| 0x24 | damage modifier mod |
| 0x28 / 0x2C / 0x30 | DEF tiers |
| 0x34 | critical chance, percent |
| 0x38 / 0x3C / 0x40 | ATK tiers |
| 0x44 | duel stand-off |
| 0x4C | CPU pattern, NUL-terminated bytes |
The roster table is 0x801D769C, 17 records of 0x6C: ids 0..=2 are Vahn, Noa and Gala, 3..=16 the ladder. Parsers: legaia_minigame_formats::baka_opponents (parse, parse_actions, parse_fighter_pack, parse_baka_hud).
Retail carries a developer menu (0xC8), an in-game action-table keyframe editor (0x190 / 0x191) and an action-table dump to ot5stat.txt. The pause-menu edge routes to the developer menu only when a word that boots to zero and is only ever cleared is non-zero, so none of them opens. The editor is linked, not dead: it is the callback of one of the overlay’s eight actor prototypes.
The developer menu has five rows: resume (or, with a new stage picked, reload onto that rung), reboot the cabinet, a debug-mode word, the stage pick, and the keyframe editor. Circle confirms a row; Cross resumes from any row. Every pause edge seeds the stage pick from the current stage.
All overlay-resident; per-fighter blocks are 0xA8 bytes per slot (0 = player, 1 = opponent) from DAT_801DBFBC.
| Global | Role |
|---|---|
DAT_801DBF44 | cabinet state; 100 is a live round |
DAT_801DBF78 | match phase (0 teardown / 1 paused / 2 active) |
DAT_801DC10C | stage counter (seeded 2, wraps at 0xE) |
DAT_801DBF06 | secret-opponent override (0 / 1 / 2) |
DAT_801DBED0 | round-win target, 2 |
DAT_801DBEE4 | running high score |
DAT_801DBFC4 (block +0x08) | HP |
DAT_801DBFEC (block +0x30) | consecutive hits taken |
DAT_801DC05C (block +0xA0) | critical pending |
_DAT_80084440 | casino prize accumulator (the pot) |
The two state machines have no jal callers: the init spawns an actor whose tick is the cabinet, which spawns the actor whose tick is the round, and both run through the actor pool walk.
The 24-instruction tally drain step here and the one in the Muscle Dome hub are the same routine linked into two overlays; only the pair of instructions that loads its bypass flag differs. Dumps named overlay_baka_fighter_801f.... are a dump-corpus artifact: those addresses hold resident field-overlay code, including the casino coin counter (which credits coins and debits 100 gold per coin) and the op-0x49 submode family.
The 37 cabinet states, the fighter packs and action tables, the strike clock, the arena camera, the effect templates and the whole HUD packet list are in docs/subsystems/minigame-baka-fighter.md.