the cutting room mirror

Super Mario Bros. 3

This article has a talk page!
view on tcrf.net

This page details bugs of Super Mario Bros. 3.

Glitched 1-up Sound#

Watch on YouTubeAs Raccoon Mario, wagging your tail on the same frame as getting a 1-up causes a corrupted version of the 1-up sound to play.

The reasons for this bug are a bit complex and require some explaining:

  • The game has three queues for the possible sounds that can play during the course of the game. Most of the sounds operate on a priority principle, meaning that if two sounds of the same priority were to play on the same frame, the higher priority sound would cancel out the lower priority sound (for example, if you jump and throw a fireball on the same frame, only the jump sound will play).
  • The 1-up sound, however, is special cased to always play regardless of priority. As a result, if the 1-up sound and another sound in the same sound queue (such as the sound of collecting a coin) are set to play on the same frame, the sound with the higher priority will play for one or two frames before the 1-up sound takes over. (It becomes pretty clear from this that having the 1-up sound always play with highest priority was an afterthought, long after the other sound effects were implemented in code.)
  • Four of the game's sounds (the "poof" when losing a power-up, an unused sound, the sound of putting on/taking off Kuribo's Shoe, and the sound of Raccoon Mario wagging his tail) are specially programmed. If these sounds and the 1-up sound are set to play on the same frame, the 1-up sound will be initialized with the wrong length, and the game will play the notes directly preceding the 1-up sound in the game's code, which is actually part of the sound for collecting a power-up, just interpreted in a different pitch.
  • The programmers tried to avoid this bug by using a special function to catch this case, but because the function writes to the wrong register, the bug will manifest itself.

This bug can be seen in the SMB3 disassembly in PRG bank #28 (search for SndLev1_SuitLost2:).

Card Game RNG Bug#

Watch on YouTubeThe card game (also known as the N-Spade game) was supposed to be completely procedurally generated. However, two bugs ultimately result in there being only eight possible sets of cards, making the card game laughably easy once you've memorized all sets (or looked up a guide):

  • The first function was supposed to swap three random cards of the first 15 cards with one another (the last three cards are hardcoded to always be Mushroom, Flower, and Star in that order), but due to a bug there is no RNG roll implemented here and instead the RNG variable is fixed to always be 0, so only the 1st, 6th, and 11th cards get swapped at all and the function will always run exactly once, even though the code is otherwise functional. This means the routine is guaranteed to only produce one possible outcome.
  • The second function was supposed to shuffle the entire set of 15 cards at random. Unlike the first function, this function does have the RNG roll implemented, but the results of that roll aren't actually saved to the register due to a programming oversight, and as a result the possible outcome of the roll can only ever be 0 or 2. This means there are only two possible outcomes, and since the shuffle happens three times, this means that the game can only generate eight possible patterns for the card game.

This bug can be seen in the SMB3 disassembly in PRG bank #22 (search for Card_Shuffle:).

Score Copying Bug in 2P Mode#

In the Mario Bros. minigame, a player's score can unexpectedly change depending on who challenged the other player, and who wins.

  • Mario Challenges Luigi and Luigi Wins: Nothing happens
  • Mario Challenges Luigi and Mario Wins: Luigi's score becomes a copy of Mario's score
  • Luigi Challenges Mario and Luigi Wins: Mario's score becomes a copy of Luigi's score
  • Luigi Challenges Mario and Mario Wins: Nothing happens

All NES releases of the game are affected. Super Mario All-Stars is not affected.