At a glance

Overlay
Extraction PROT 975 at base 0x801CE818; init FUN_801CEC94
Reel state machine
FUN_801CF0D8, state word DAT_801D3C84
RNG
The slot generator FUN_801D30CC plus the BIOS rand
Feature roll / stop / landing
FUN_801D258C / FUN_801D2114 / FUN_801D2440
Win evaluation
FUN_801D13E8 over the display strip and the ten payout bytes at DAT_801D3598
Coins
Overlay-local balance DAT_801D4114; global coin bank 0x800845A4
Assets
PROT 1200 (five textures, cabinet mesh, animation), 1198 (sounds), 1199 (effects)
Port
Rules engine-minigames::slot_machine; draws engine-ui::slot_cabinet / slot_paylines

Getting there

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

A disc-wide walk finds five door records: three interchangeable cabinets in the Sol casino, and the Vidna cabinet in both variants of its scene. The door gate is a coin-bank compare, not an item check - a player with no coins never reaches the machine and sees the cabinet’s refusal line instead. The debit before the warp is a fee, and at a slot cabinet it is zero, because the machine charges its own bets from the balance it copies in.

The three Sol cabinets seat the player the way the Baka Fighter cabinets do: a walk onto the stool, a turn to the machine and the sit clip before the fade, and a second pass after the warp that clears the fade and stands the player up. Every exit - the quit row, an empty machine, the port’s Start escape - comes back through that pass.

Reel state machine

0 Init build strips 1 Idle bet 3 coins 2 Spin-up until timer 3 Stopping one press a reel 4 Payout tally the win 0x32 Picker Triangle or Select 0x5A No coins balance under 3 100 Exit bank = balance, return warp
Idle reads the pad in a fixed order: the picker edge first, so the submenu opens even on an empty balance; then the coin gate; then the bet.

Reel strips

Each reel is a 20-slot strip. Init builds two source strips per reel - the ten symbols and the ten bonus numerals - by drawing a random position and probing forward to a free one, so each value lands on two scattered positions. A third strip, the display strip, is the only one the win evaluator and the renderer read. It is refilled one row per frame, and that refill is how the bonus round swaps numerals onto the reels.

A reel position is a fixed-point angle; the on-screen symbol is (pos >> 8) mod 0x14.

The five paylines

reel 0 reel 1 reel 2 row +1 row 0 row -1 line 0 top line 1 middle line 2 bottom line 3 diagonal / line 4 diagonal \
Every spin plays all five lines for one flat charge; there is no bet-line selection. The evaluator keeps the highest-value matching line, and the winning line index doubles as the index of the medallion and lamp that light.
ResultCreditSide effect
three of symbol 0..7 on a linethat symbol’s payout byte-
three of symbol 8, the blue kickits payout byteone bonus round
three of symbol 9, the red punchits payout bytethree bonus rounds
any bonus-round spinthe product of the three centre-row numerals, 1..=1000subtracted from the net take

During a bonus round the product is computed unconditionally - no match is needed and no payout byte is read. A separate scanner lights the “reach” presentation when two stopped reels already hold a jackpot pair; it sets no payout.

Two generators

x = x * 5 + 1
x = (x << 16) + (x >> 16)        fold the halves

The slot generator drives strip construction, reel landing and the feature-stays-on rolls, so reel outcomes are reproducible from its one word. The BIOS rand drives the per-spin feature roll and the landing-line row - the parts that should not be replayable from the visible reels.

The machine pays back what it has taken. Feature odds are bracketed on a net-take counter, not on the balance: the denominators shrink from 700 / 500 to 175 / 125 once the machine is more than 2000 ahead, and each bonus payout is subtracted from the counter. A net take of exactly 1000 or 2000 falls in no bracket.

Coin economy

The machine touches the coin bank in exactly two places: it copies the bank into its own balance on entry and assigns the balance back on exit. It is not debited per spin. A normal spin charges 3 from the local balance and a bonus spin charges 1; the not-enough gate tests for 3 either way.

That is why the well-known infinite-coins code works at the casino but does not make spins free: it pins the bank, and betting decrements the overlay-local balance.

A 3D scene

Each reel emits eight textured quads a frame around an ellipse of radius 585 in height and 512 in depth - a cylinder through the geometry coprocessor, which is why symbols curl away from the payline. The paylines are 3D segments, the medallions, lamps and marquee are billboards, and the marquee is composed as a dot-matrix display. The trig comes from the executable’s shared sine table, whose entries truncate toward zero; that matters because the cylinder multiplies each entry by a radius before shifting back down.

See also

The strip builder, the bonus swap, the cash-out submenu, the RAM state block, every renderer routine and the art pack are in docs/subsystems/minigame-slot-machine.md.