Happy 2024! After a holiday season hiatus, let's get back into the swing of things.
After the video and article on the Super Mario Bros. 3 roulette game, a few people asked about the Super Mario Bros. 2 slot machine game. So let's take a look at that today! However, let's go back to the original build of the game, Doki Doki Panic.
I just love how plain this screen is by the way, what a lovely shade of green.
So, fittingly, this slot machine is programmed just as simply as its graphical presentation was. There really are no tricks or anything; it's as basic as you can get.
There are three slot reels, each of which has eight different icons. Each icon displays for four frames. Here is the entire meat of the slot machine code:
; $7DDE: routine to process the ticking ; of each of the reels ProcessSlots: LDX #2 ; number of reels minus 1 - LDA ReelState,X BEQ + DEC SlotCounter,X BNE + LDA #4 ; number of frames each icon displays STA SlotCounter,X DEC SlotIcon,X BPL + LDA #7 ; number of icons per reel minus 1 STA SlotIcon,X + DEX BPL - RTS
And there's nothing special about how the slots are stopped either:
; $7DC4: routine to check if a reel should ; be stopped when the A button is pressed CheckStopReels: LDA Buttons BPL + LDX #0 - LDA ReelState,X BNE .stop_slot INX CPX #3 ; number of reels BCC - + RTS .stop_slot: LDA #0 STA ReelState,X LDA #4 STA SoundEffect RTS
Every reel will stop immediately upon the player pressing the A button. Interestingly there is no memory address dedicated to which slot is the "active" reel--that is, which reel will be the next for the player to stop. The game just scans through each reel and looks for the first one that is not already stopped. Nothing bugs out if you poke the memory and stop the reels out of order.
What are the odds for the slot machine? Well here is a full look at each of the three reels:
A pretty even distribution of icons.
If you get a match, you get an extra life. However, the cherries are bonuses. If you match three cherries, you get five lives instead. And even if you only get a single cherry in the first slot, you still get one extra life. If you get cherries in the first two slots, you get two lives. Everything else is a fail and nets you nothing.
So here's a breakdown of the full odds of this slot machine:
| Result | Payout | Calculation | Odds | |
|---|---|---|---|---|
| One Cherry | 1 | 3×7×8 | 168/512 | 32.8% |
| Two Cherries | 2 | 3×1×7 | 21/512 | 4.10% |
| All Cherries | 5 | 3×1×1 | 3/512 | 0.586% |
| All Big Veggies | 1 | 2×2×3 | 12/512 | 2.34% |
| All Small Veggies | 1 | 2×2×2 | 8/512 | 1.56% |
| All Snifits | 1 | 1×3×2 | 6/512 | 1.17% |
| Fail | 0 | 294/512 | 57.4% | |
This results in an expected value of 0.49 lives per attempt, which is honestly not that bad!
Super Mario Bros. 2 didn't change too much about the slot machine game other than just making it look a lot more appealing (even if it did just copy the title screen layout). However there was one small tweak that greatly nerfed the payout:
Big veggies were turned into stars, and the small veggies were turned into a... medium veggie that doesn't show up elsewhere in the game?
Two of the cherries on the first reel were changed into a veggie and Snifit. Considering that getting just a single cherry made up for almost a third of total plays (three quarters of total wins!), this is a massive shift towards the house. The new odds are like so:
| Result | Payout | Calculation | Odds | |
|---|---|---|---|---|
| One Cherry | 1 | 1×7×8 | 56/512 | 10.9% |
| Two Cherries | 2 | 1×1×7 | 7/512 | 1.37% |
| All Cherries | 5 | 1×1×1 | 1/512 | 0.195% |
| All Stars | 1 | 2×2×3 | 12/512 | 2.34% |
| All Veggies | 1 | 3×2×2 | 12/512 | 2.34% |
| All Snifits | 1 | 2×3×2 | 12/512 | 2.34% |
| Fail | 0 | 412/512 | 80.5% | |
This brings the expected value down to just 0.22 lives per attempt, less than half of the original. Which I guess implies that Doki Doki Panic coins were worth about 2.26 times more than Super Mario Bros. 2 coins. Shrinkflation impacting Subcon as well, I see.
Now, these slots aren't exactly random--you can try to time each reel to land on exactly what you want, since the same eight icons appear in order again and again. This means you can probably get a little better than the expected value for each of the slot machines. Still pretty difficult though!
The slot machine got a huge upgrade in Super Mario All-Stars, so we'll have to look at that one another time!
You can support Retro Game Mechanics Explained on Patreon here! Any and all support is greatly appreciated!

