Three reels of ten pictographic symbols. Every spin costs a flat three coins and plays all five paylines; a matched line pays a per-symbol amount, and a line of either jackpot symbol opens a bonus round on the same reels, where the three numbers you stop on are multiplied together. Behind the face sits a feature roll that pays back what the machine has taken, a stop that nudges a reel only a few rows, and a press latch that punishes mashing. It is a 3D scene, not a sprite collage: the reels are textured cylinders, the paylines are 3D line segments and the cabinet is a mesh.
1 to 1000; the machine does not steer itProvenance: overlay extraction PROT 975 at base 0x801CE818 (init FUN_801CEC94, reel state machine FUN_801CF0D8, win evaluation FUN_801D13E8). The reel layout, RNG, bet charge, feature odds, payout lookup, entry seed and coin commit are confirmed from the disassembly. The payout values decode from your own disc and are not reproduced here.
Not the prize counter
Trading coins for items is a separate static table and a separate screen at the koin1 / balden prize counters. Buying coins with gold is a third screen, in the field overlay. The slot machine only pays into the coin balance; the exchange spends it.
A disc-wide walk of every scene finds five slot doors: three in the Sol casino (koin1) and the Vidna cabinet, present in both variants of that scene. The three Sol cabinets are interchangeable doors to one machine; the script byte that names the cabinet is never read.
1. With no coins the script jumps to the refusal line and the machine never loads.0x3E with op0 = 103 (minigame sub-id 3) switches to game mode 24 and loads the overlay. It is the ordinary scene-backup / overlay-load / return sequence, so you come back to the exact field state you left.0x6C0A2AF0, the machine’s balance is set equal to the coin bank, and the state word is cleared. A launch outside the casino door path falls back to a 70-coin dev balance.The mechanism behind the warp is on the field / event VM page.
| State | Input | Effect |
|---|---|---|
| Idle | any face button | charge the bet, run the feature roll, start the spin |
| Idle | Triangle or Select | open the cash-out picker |
| Spin-up | any face button | raises the press latch (makes the next spin’s features rarer) |
| Stopping | Square / Cross / Circle | stop reel 0 / 1 / 2 (pad bits 0x80 / 0x40 / 0x20, the glyph each reel’s pedestal carries) |
| Picker | Up / Down, Cross / L1, Circle / L2 | move, take the row, back to play |
The picker cursor wraps with an unsigned remainder: Up on row 0 stays on row 0, Down on row 2 wraps to row 0. Pressing cancel and confirm on the same frame on the rules row lands in a spin-up with no bet charged - a retail collision the port does not reproduce.
Each reel is a 20-slot strip. Init builds two source strips per reel in one interleaved pass: for each slot it draws a random position mod 20 and probes forward to a free one (step 13 for symbols, step 1 for numerals). So every symbol appears exactly twice on every reel, at scattered positions, and so does every bonus numeral. A third strip, the display strip, is the only one the win evaluator and the renderer read.
The display strip is refilled one row per reel per frame, nine rows ahead of the payline, from whichever source the feature mode names. That is how a bonus round swaps numerals onto the reels: they rotate in from off-screen as the reels turn, and rotate back out when the round ends. Because a reel has to travel about nine rows before the swap reaches the payline, the spin-up is forced 24 frames longer on the first spin of a bonus round and on the first spin after one.
Two independent generators feed the machine:
x = x * 5 + 1
x = (x << 16) + (x >> 16) fold the 16-bit halvesrand drives the per-spin feature roll and the landing-line pick - the parts that should not be replayable from the visible reels alone.At every spin start, in this draw order, the roll picks the payline a forced stop will land on (rand % 5), the normal-mode target symbol (rand % 6 + 2, so symbols 2 to 7), and, if no feature is already running, rolls for feature modes 1, 2 and 3:
widen = press_latch ? rand % 100 + 200 : 0
mode 1 if rand % (widen + N1) == 0
mode 2 if rand % (widen + N2) == 0
mode 3 if rand % (widen + 600) == 0
N1 and N2 are bracketed on the machine’s net-take counter, not on your balance. The counter gains 6 per normal spin and 1 per feature spin, and every bonus payout is subtracted from it: the machine pays back what it has taken.
Pressing any face button while the reels are still spinning up raises a latch, and the next spin’s roll reads it and clears it. A raised latch adds rand % 100 + 200 to every feature denominator: in the lowest bracket, mode 1 goes from 1 in 700 to between 1 in 900 and 1 in 999. Mashing through the spin-up makes the reach and hot modes rarer.
| Net take | Mode 1 | Mode 2 | Mode 3 | Mode 1, latch raised |
|---|---|---|---|---|
| < 1000 | 1 in 700 | 1 in 500 | 1 in 600 | 1 in 900..999 |
| 1001..1999 | 1 in 350 | 1 in 250 | 1 in 600 | 1 in 550..649 |
| > 2000 | 1 in 175 | 1 in 125 | 1 in 600 | 1 in 375..474 |
Provenance: feature roll FUN_801D258C, slot generator FUN_801D30CC, press latch DAT_801D3790 (raised in state 2, cleared in state 1 straight after the roll). Confirmed from the disassembly.
A stop never yanks a reel to a result. It searches a short window of rows past where the reel is when you press, for one target symbol; if the target is in the window the reel lands it on the spin’s chosen payline, and otherwise the reel simply stops on its next natural row.
rand % 5 pick, one of the five lines, so a steered spin lines the target up along a random line rather than always the middle row. The search depth and the target depend on the feature mode.| Feature mode | Search depth | Target |
|---|---|---|
0 normal | rand % 3 + 2 rows | the spin’s target, symbols 2..7 |
1 reach | (rand & 3) + 6 rows | symbol 9, the red punch |
2 reach | (rand & 3) + 6 rows | symbol 8, the blue kick |
3 hot | rand % 7 + 10 rows | the spin’s target % 3; a rand % 150 == 0 roll can end the mode |
4 | rand % 10 + 6 rows | symbol 7 (a first landing on the spin’s target is always replaced) |
5 | rand % 10 + 8 rows | symbol 7 |
6 bonus round | 0 | none: a free stop |
Each stop also gives the reel a roll-in budget (19 to 30 frames by mode). The reel creeps two-fifths of a row a frame toward its landing row and snaps there, or wherever it stands when the budget runs out, so a far target can be missed.
Provenance: per-reel stop FUN_801D2114, roll-in FUN_801D0554, landing search FUN_801D2440 over the five-row landing-line table at 0x801D3630. Confirmed from the disassembly.
| Result | Credit | Side effect |
|---|---|---|
three of symbol 0..7 on a line | that symbol’s payout byte | - |
three of symbol 8, the blue kick | its payout byte | feature mode 6, one bonus round |
three of symbol 9, the red punch | its payout byte | feature mode 6, three bonus rounds |
| any bonus-round spin | the product of the three centre numerals, 1..=1000 | subtracted from the net take |
| no matching line | 0 | - |
The payout table is exactly ten bytes, one per symbol, and the byte scales with the symbol’s rarity. The values come off your disc: the machine’s own rules screen shows them as its second page (each symbol’s three faces beside its line payout).
Symbols 0, 1 and 2 are one piece of artwork recoloured three ways, as are 4 and 5; the palette is what tells them apart on the reel.
1 (1×1×1) to 1000 (10×10×10). No match is checked and no payout byte is read; the middle lamp lights.The marquee strip across the top reads 0 x 0 x 0 at the start of a round and fills in each column’s number as its reel is stopped; between spins it shows the rounds still owed as three pips. The number drawn on the reel, the number in the tally and the factor in the product are one byte read through one bias, so the three can never disagree.
While exactly two reels are stopped, a scanner checks every line for an equal pair of punches or kicks among the landed reels. A pair scrolls the reach legend across the marquee and plays the reach sting once per spin. It is presentation only: it sets no payout and changes no odds.
Provenance: win evaluation FUN_801D13E8, payout bytes DAT_801D3598 (PROT 0975 file 0x4D80), reach scanner FUN_801D1AF4, tally composer FUN_801CFFF0. Confirmed structure; the payout values are disc data.
| Event | Balance | Net-take counter |
|---|---|---|
| normal spin (modes 0..3) | −3 | +6 |
| feature spin (modes 4..6) | −1 | +1 |
| line win | +payout byte | - |
| bonus-round spin | +product | −product |
9999999 in the tally path; the HUD displays at most 99999.Coins are bought at a counter, not inside the slot overlay. The counter is a field-overlay screen: field-VM op 0x49 sub-op 6 at the koin1 / balden counters. Its entry panel shows the coin bank, a six-digit entry field, party gold and the total cost; the cost is entry × 100 gold, drawn in the warning pen when party gold is below it or the entry exceeds min(gold / 100, 9999999 − bank). A Yes / No confirm opens over the entry panel, which stays drawn underneath it.
Provenance: submode handler FUN_801F0ADC and entry panel FUN_801E6F70 in PROT 0897. Port engine-field::submode_hub_actors::coin_exchange, drawn on both hosts through one builder.
Following from the traced rules
Every element on the machine’s face is a quad in a 3D scene, projected through the geometry coprocessor and depth-sorted. The overlay carries no coprocessor instruction of its own - it reaches it through shared executable wrappers - which is why a scan for one inside the overlay wrongly calls the machine 2D.
| Element | Kind | Notes |
|---|---|---|
| cabinet body | untextured mesh | 1 object, 65 vertices, 76 primitives; grey body, dark-red reel face, navy marquee backing |
| reels | 8 textured quads per reel | an ellipse of radius 585 in height and 512 in depth: a cylinder, so symbols curl away from the payline |
| paylines | 5 flat semi-transparent lines | neutral grey idle; the winning line is recoloured and stays semi-transparent |
| medallions, lamps, pedestals, marquee panel, mascots | billboards | a reel’s pedestal shows its “press now” button while that stop is still open |
| marquee | 78 × 13 dot matrix | 1014 projected 2×2 sprites, blinking between two palettes every frame |
| paytable board, COIN label, cursor, coin digits | screen space | the only parts not projected |
The reel faces are depth-cued off their distance: the shade peaks (a 1.41× brighten) exactly on the payline face and falls to black within about 48 degrees either side, which caps each reel window top and bottom. The camera faces the machine head-on with a 2:1 horizontal scale, the pixel aspect of the 640-wide video mode the machine runs in.
The captured camera state while the machine draws reduces every path to one mapping on the 640×240 framebuffer:
view = (6x - 1440, 3y + 20, 3z + 24480)
screen = (320 + 1024 * vx / vz, 114 + 1024 * vy / vz)
-z is toward the viewer: the glass (paylines, medallions, lamps, pedestals, marquee) sits at z = -768 / -800, the reel cylinders are centred on z = 0 with the payline symbol at z = -512, behind the glass.
The payline face is the fifth of a reel’s eight faces, not the first; a renderer that indexes the strip straight off the face index draws a payline whose three symbols are not the three that paid. Symbol art is arithmetic: a strip value of 0x10 or more switches that row to the numeral page, which is why one strip can carry both kinds mid-rotation.
The marquee is rebuilt from scratch each frame from a 21-record message bank. One occupant wins each frame, in priority order: the payout caption (sliding down into place over 13 frames, leading zeros suppressed against the whole figure), then the bonus tally or round pips, then the attract legend.
Provenance: reel renderer FUN_801D0FA8, paylines FUN_801D3380, billboards FUN_801D08E4, marquee FUN_801D0E1C, HUD widgets FUN_801D2CC0; camera matrix and offsets read from the minigame_slot_machine capture’s coprocessor registers. That the cabinet’s per-frame draw is the shared mesh renderer is inferred, not traced to a GPU word.
The init loads extraction PROT 1200: a container of five textures, the cabinet mesh and a two-record animation bundle. Each texture’s framebuffer destination is the texture page the renderers sample, and every image block is byte-identical to a retail VRAM dump at the machine.
| Texture | Framebuffer | Holds |
|---|---|---|
| 0 | (768, 0) | reel symbols, coin digit font, payline medallion |
| 1 | (832, 0) | bonus numerals 1..10 |
| 2 | (768, 256) | marquee panel, mascots, reel-stop pedestals, payline lamps |
| 3 | (832, 256) | dot-matrix message bank, lamp swatches, cursor |
| 4 | (640, 0) | the paytable / coin board, sampled 8bpp although its header declares 4bpp |
The two jackpot symbols are told apart by their art cell: blue-dominant for the kick (8), red-dominant for the punch (9). The neighbouring PROT 1198 / 1199 entries are the machine’s sound bank, not backdrop art.
| Event | Cue |
|---|---|
| reel stop, once per stop taken | 0x20A |
| payout tally, once per transfer | 0x209 |
| spin start in reach mode 1 / 2 | 0x201 / 0x202 |
| two landed bonus symbols, once per spin | 0x200 |
| cash-out menu confirm / cursor / cancel | 0x20 / 0x21 / 0x37 |
The reel motor is not a cue: the bet keys a voice directly, the reach scanner re-keys it on a second tone for the reach loop, and the evaluation releases it. The machine’s cues resolve through its own effect bank (PROT 1199) against its VAB (PROT 1198).
The machine starts no music. It inherits the host scene’s track: in Sol, the casino floor’s Sub-game theme (sound-test slot 18, the same track the Baka Fighter cabinet and the Muscle Dome inherit); in Vidna, the town theme, or the mist theme during the mist story state. See music tracks.
The rules engine (engine-minigames::slot_machine) runs on all three hosts: the native play window, the browser play page and the standalone minigames page, where you can play it now with your own disc. Walking up to a cabinet in either play host runs the record’s script through the field VM, including the coin-bank compare that refuses an empty bank. The standalone page racks its own 60 coins.
Where the port differs
rand stream is a deterministic generator, so replays stay bit-identical.For testing, play-window’s O key arms the same door warp without the door gate, and --cheat-coins N (or the play page’s Cheats panel) sets the bank.
| Global | Role |
|---|---|
| DAT_801d3c80 | slot generator state, seeded 0x6C0A2AF0 |
| DAT_801d3c84 | state word |
| DAT_801d3c8c | winning payline index |
| DAT_801d3c90 | spin timer / guaranteed-hit countdown |
| DAT_801d3cac | feature mode (0 normal .. 6 bonus round) |
| DAT_801d3cb0 | bonus rounds owed |
| DAT_801d3cc0 | live reel positions (fixed point, three reels) |
| DAT_801d3d40 | net-take counter, the feature-odds bracket input |
| DAT_801d3d50 | display strip (3 × 20) |
| DAT_801d3790 | spin-up press latch |
| DAT_801d4114 | the machine’s coin balance |
| DAT_801d4134 | this spin’s landing line (rand % 5) |
| _DAT_800845A4 | the global casino coin bank |
| Address | Role |
|---|---|
| FUN_801cec94 | init: generator seed, balance from the bank, asset load, cabinet actor |
| FUN_801cf0d8 | per-frame reel state machine (an actor tick, no direct caller) |
| FUN_801d258c | per-spin feature roll |
| FUN_801d2114 | per-reel stop plan by feature mode |
| FUN_801d2440 | landing search |
| FUN_801d13e8 | win evaluation, payout and bonus trigger |
| FUN_801d1af4 | reach scanner (presentation only) |
| FUN_801d0554 | reel integrator: snaps a stopping reel, latches its claimed value |
| FUN_801cfff0 | HUD and marquee composer |
| FUN_801d30cc | slot generator |
Still open: the identities of the sibling dev modules PROT 973 / 974; the cabinet’s per-frame draw path is inferred rather than traced; the semantics of a cheat-database pointer that lands in this state block; and retail’s spin-up timer and velocity magnitudes.
Every state, the strip builder, the cash-out picker’s draws, the full RAM block and the renderer routine by routine are in docs/subsystems/minigame-slot-machine.md.