At a glance

Overlay
PROT 0976, 0xE000 bytes at base 0x801CE818; init FUN_801CF00C
Cabinet state machine
FUN_801CF388, state word DAT_801DBF44, 37 states
Round state machine
FUN_801D3468, phase DAT_801DBF78
Exchange resolver
FUN_801D3A14
Damage / critical
FUN_801D3B18 / FUN_801D6660
CPU move pick
FUN_801D487C
Fighter data
Roster table 0x801D769C, 17 records, stride 0x6C
Art
Party pack PROT 1204 / 1205; ladder fighters 1206..=1219; HUD + stage 1203
Pot
Prize accumulator _DAT_80084440, banked into the coin bank 0x800845A4
Port
engine-minigames: baka_fighter, baka_cabinet; 3D duel engine-minigame-scenes::baka_duel_scene

Getting there

The door is the mode-24 minigame warp: field-VM op 0x3E with op0 = 104 (sub-id 4) 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.

The three casino cabinets are interchangeable doors behind an entry gate and a one-coin fee. A fourth site on an overworld map is dev residue: a bare record with nothing but the warp, in a slot no reachable script spawns.

The seat is choreographed by the cabinet’s own script. The interaction walks the player onto the stool tile, turns them to the machine, plays the sit clip, takes the fee and washes the screen to black (a subtractive white held at full) before the warp. A second pass after the warp clears the wash and stands the player up; the scene’s system script starts it once the field is back, off a per-cabinet flag the seat raised. The port runs both passes on both play hosts, and draws no field wash over the duel itself.

The exchange and the round

type 1 attack type 2 attack type 3 attack 2 beats 1 1 beats 3 3 beats 2 type 4 special: wins Setup HP 0xC80, seated Banners READY / FIGHT Open cooldowns decay Committed waits for the keyframe Finisher one HP at 0: auto special Round over hold 0xB5 ticks both HP at 0 match open: next round
An exchange is undecided until both fighters have committed a type, and a committed exchange returns to Open once its damage is booked. A special is an immediate win for whoever throws it, with the player checked first. A round does not end when HP reaches zero: the standing fighter then auto-commits the special, and its last keyframe is what credits the round.
P1 \ P201234
0 idleundecidedundecidedundecidedundecidedP2
1undecideddrawP2P1P2
2undecidedP1drawP2P2
3undecidedP2P1drawP2
4 specialP1P1P1P1P1

The resolver’s settle timer is vestigial: nothing in the overlay ever stores a positive value to it. Exchange pacing comes from the two per-fighter cooldowns.

Damage

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
  • ATK is the winner’s and DEF the loser’s, each picked from three values by that fighter’s HP tier (above 0x8C0, above 0x3C0, below).
  • combo is the loser’s count of consecutive hits taken; winning an exchange clears it.
  • A critical is rolled only while a fighter’s own HP is above zero and below 0x280 - a comeback mechanic.
  • The special’s HP delta is zero by construction. Its power is 0 for all seventeen fighters, and it only ever runs against a foe already at 0 HP. Its whole payoff is the round win, credited on its final keyframe.

How the CPU picks

Each opponent mixes random throws with a canned sequence. With no pattern running, a roll of rand() % 6 gives a three-in-six chance of one uniformly random attack and a three-in-six chance of starting the opponent’s pattern. Once started, the pattern is consumed back to front to exhaustion regardless of later rolls. The result is always one of the three attacks; the CPU never opens with a special.

The ladder, the pot and the secret rungs

  • A match is best of three. The stage counter is seeded to 2 and maps to roster ids stage + 3, so the twelve rungs served first are roster ids 5 to 16, with prize gold strictly rising across them.
  • The two secret opponents are score-gated, not lap-gated. Clearing stage 5 with a running high score above 250,000, or stage 13 above 700,000, arms an override that inserts one of them without advancing the stage. A score exactly on the threshold does not qualify.
  • Only the score tally adds to the pot. A mid-run loss forfeits it: the game-over state zeroes the accumulator before its banner spawns.
  • Every exit pays the accumulator into the casino coin bank, not party gold. A shutout pays a 30,000-point first tally row instead of 20,000.

The duel HUD

One renderer draws it every frame of the duel: the two VITAL bars in their three-cell frames, the round-win pips, the attack-icon columns, the "HIT!" counters, and the top strip with the STAGE number and the blinking PRESS SELECT TO MENU prompt. Its own pieces sort one layer under the round banners, so a ROUND or FIGHT! card always draws over it.

  • The bars are textured. Each samples a tiny grey patch of a system texture page, so its red comes out a shade darker than its vertex colour: 160 for a vertex red of 188, as a retail capture measures.
  • The counters are crossed. Each side shows the other fighter's hits-taken count, which is the streak that side is landing.
  • The lit icon flashes. The row of the attack a fighter just chose brightens, dims for three frames, then brightens again, off a timer the combat tick runs from the commit.

Both play hosts draw this layer through one shared builder, whether the duel opened from a Sol Tower 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.

Shared with the Muscle Dome

The 24-instruction tally drain scaler 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.

See also

The 37 cabinet states, the fighter packs and action tables, the strike clock, the arena camera, the effect pair and the whole HUD are in docs/subsystems/minigame-baka-fighter.md.