Coin limit

Revision as of 16:23, 6 May 2019 by ChouxZi3 (talk | contribs) (update the table)

Note: Code shown in this section is recreated and may not be the exact code used by the game

A coin limit is the maximum number of coins that can be collected or saved in a given area. Some courses allow infinite coins to be collected. However, in the NTSC (American) version, the coin counter is programmed to stay at the maximum of 999.

There are two types of coin limits - the 999 coin limit within the course (except Japanese version), and the 255 coin limit that is saved in the save-able records.

The 999 coin limit

The limit is intentionally put in by the programmers to prevent the game to count up coins greater than 999:

if(coin_counter > 999) {
coin_counter := 999;
}

The 255 coin limit

Separately, there is an unintentional coin limit involving the saved coin score. This value overflows and is set to 0 if the number of coins Mario collected in the course is a multiple of 256. (Not within the course, but when recording the saved coin score after Mario exits the course.) Thus, the easiest way to obtain the highest possible saved coin score in a level is to simply collect 255 coins. 511 and 767 also produce a saved coin score of 255, but collecting more than 255 coins is not as efficient as collecting a star when 255 coins have been collected. 1,023, 1,279, etc. also save as 255, but these coin scores cannot be obtained in the NTSC version.

Coin limit for each course

Normally, the number of available coins in the course prevents the player from getting an excess number of coins to reach either of the coin limits. Nonetheless, there are ways for a player to perform infinite coin glitches such as moneybag duplication, cloning or utilizing certain exploits of the game, allowing infinite coin glitches in certain courses.

Some courses have only a finite number of coins; in these courses, cloning is impossible and there are no infinite coin glitches. The three courses that don't fall into either of these categories, namely Tick Tock Clock, Rainbow Ride, and Bowser in the Fire Sea, allow for clones to be created, but due to a lack of loading zones, the clones fill up the game's object slots. Due to this, there is a limitation on the number of coins that can be collected within these three courses.

In the table below, 999 coins represent stages with infinite coin glitches available that does not have clones occupy object slots making the game crash.

Course Maximum Coins without coin duplication Maximum Coins with duplication (Save-able) Maximum Coins with duplication (within course) Strategies
Save-able courses
Bob-omb Battlefield 146 255 999 (32767 on JP 1.0) Breaking-Disappearing Cork Box Glitch[1] and Ride Cancel[2] (bob-omb cloning is possible, but limited due to object slots)[3]
Whomp’s Fortress 141 255 999 (32767 on JP 1.0) Breaking-Disappearing Cork Box Glitch[4] (cork box cloning is possible, but limited due to object slots)[5]
Jolly Roger Bay 104 104 104[6] No infinite coin glitches are available in this course
Cool, Cool Mountain 154 154 154[7] No infinite coin glitches are available in this course
Big Boo's Haunt 151 151 151[8] No infinite coin glitches are available in this course
Hazy Maze Cave 139 139 139[9] No infinite coin glitches are available in this course
Lethal Lava Land 133 133 133[10] No infinite coin glitches are available in this course
Shifting Sand Land 136 255 999 (32767 on JP 1.0) Breaking-Disappearing Cork Box Glitch[11] (bob-omb and cork box cloning is possible, but limited due to object slots)[12]
Dire, Dire Docks 106 255 999 (32767 on JP 1.0) Water shell cloning (going through the loading point unloads all coin clones)[13][14] and cloning coin spawners[15]
Snowman's Land 127 255 999 (32767 on JP 1.0) Money-bag duplication[16][17] and collecting a coin and enter an igloo during Time Stop on JP 1.0[18]
Wet-Dry World 152 255 999 (32767 on JP 1.0) Chuckya cloning[19][20] (going through the loading point unloads all coin clones) and cloning coin spawners
Tall, Tall Mountain 137 255 999 (32767 on JP 1.0) Bob-omb cloning (entering and exiting the slide unloads all coin clones)[21][22] and collecting a coin and enter slide during Time Stop on JP 1.0[23]
Tiny-Huge Island 192 255 999 (32767 on JP 1.0) Piranha Plant glitch[24][25], collecting a coin and enter a pipe/Wiggler's cave during Time Stop on JP 1.0[26], Chuckya cloning and Ride Cancel
Tick Tock Clock 128 255 279[27] No other infinite coin glitches are available, apart from bob-omb cloning, so 279 coins is the maximum coins due to object slots
Rainbow Ride 146 255 290[28] No other infinite coin glitches are available, apart from bob-omb cloning, so 290 coins is the maximum coins due to object slots
Non-saveable courses
Tower of the Wing Cap 63 N/A 63[29] No infinite coin glitches are available in this course
Vanish Cap under the Moat 27 N/A 27[30] No infinite coin glitches are available in this course
Cavern of the Metal Cap 47 N/A 47[31] No infinite coin glitches are available in this course
The Princess's Secret Slide 80 N/A 80[32] No infinite coin glitches are available in this course
The Secret Aquarium 56 N/A 56[33] No infinite coin glitches are available in this course
Wing Mario over the Rainbow 56 N/A 56[34] No infinite coin glitches are available in this course
Bowser in the Dark World 80 N/A 999 (32767 on JP 1.0) Whenever Bowser blows fire, there's a chance that some of the flames will spawn a yellow coin. Since he does this attack infinitely, you have the chance to collect infinite coins[35]
Bowser in the Fire Sea 80 N/A 250[36] No other infinite coin glitches are available, apart from bob-omb cloning, so 250 coins is the maximum coins due to object slots (this Bowser doesn't blow fire that makes yellow coins)
Bowser in the Sky 76 N/A 999 (32767 on JP 1.0) Same strategy as Bowser in the Dark World[37]

Unbounded Coin Limit Glitch (Japanese version)

In the Japanese version, there is no coin limit within the courses. When the coin counter reaches a value of 1,000, the game runs a few lines of code wherein there is a typo:

if(coin_counter > 999) {
lives_counter := 999;
}

This should be the following:

if(coin_counter > 999) {
coin_counter := 999;
}

Because the lives counter is a signed short, the value of 999 overflows to -25. This is displayed in the HUD as "M25." (The "M" presumably means "minus.")

After reaching a value of 32,767, the coin display remains at that value. After that, only the hidden coin count keeps incrementing. That is because the coin count is a signed short, so if the player collects more coins, the coin counter will overflow to -32,768. Since -32768 is not greater than 32,767, the coin display will not increment any further. If one were to collect a 65,636th coin (65,536 for the overflow and 100 for the star), a second 100 coin star would spawn. This was a part of a strategy that could have been applied to collect "To the Top of the Fortress" in 0x A presses[38], but it wasn't because a faster 0xA strategy was discovered for that star[39].

References

  1. "SM64 - The 255 Coin Limit" by pannenkoek2012 (BoB 999 Coins)
  2. "Infinite Coins via Fake Shell" by bad_boot
  3. "SM64 - Bob-omb Battlefield - 255 Coins" by pannenkoek2012
  4. "SM64 - The 255 Coin Limit" by pannenkoek2012 (WF 999 Coins)
  5. "SM64 - Whomp's Fortress - 255 Coins" by pannenkoek2012
  6. "SM64 - Jolly Roger Bay - 104 Coins" by pannenkoek2012
  7. "SM64 - Cool, Cool Mountain - 154 Coins" by pannenkoek2012
  8. "SM64 - Big Boo's Haunt - 151 Coins" by pannenkoek2012
  9. "SM64 - Hazy Maze Cave - 139 Coins" by pannenkoek2012
  10. "SM64 - Lethal Lava Land - 133 Coins" by pannenkoek2012
  11. "SM64 - The 255 Coin Limit" by pannenkoek2012 (SSL 999 Coins)
  12. "SM64 - Shifting Sand Land - 255 Coins" by pannenkoek2012
  13. "SM64 - The 255 Coin Limit" by pannenkoek2012 (DDD 999 Coins)
  14. "SM64 - Dire, Dire Docks - 255 Coins" by pannenkoek2012
  15. "SM64 - Spawning Point Clone" by pannenkoek2012
  16. "SM64 - The 255 Coin Limit" by pannenkoek2012 (SL 999 Coins)
  17. "SM64 - Snowman's Land - 255 Coins" by pannenkoek2012
  18. "SM64 - SL Infinite Coins via Timestop" by Ethan White
  19. "SM64 - The 255 Coin Limit" by pannenkoek2012 (WDW 999 Coins)
  20. "SM64 - Wet-Dry World - 255 Coins" by pannenkoek2012
  21. "SM64 - The 255 Coin Limit" by pannenkoek2012 (TTM 999 Coins)
  22. "SM64 - Tall, Tall Mountain - 255 Coins" by pannenkoek2012
  23. "New Infinite Coin Glitch (JP only)" by 1ted59
  24. "SM64 - The 255 Coin Limit" by pannenkoek2012 (THI 999 Coins)
  25. "SM64 - Tiny-Huge Island - 255 Coins" by pannenkoek2012
  26. "Time Stop Infinite Coins in THI" by 1ted59
  27. "SM64 - The 255 Coin Limit" by pannenkoek2012 (TTC 279 Coins)
  28. "SM64 - The 255 Coin Limit" by pannenkoek2012 (RR 290 Coins)
  29. "SM64 - Tower of the Wing Cap - 63 Coins" by pannenkoek2012
  30. "SM64 - Vanish Cap Under the Moat - 27 Coins" by pannenkoek2012
  31. "SM64 - Cavern of the Metal Cap - 47 Coins" by pannenkoek2012
  32. "SM64 - The Princess's Secret Slide - 80 Coins" by pannenkoek2012
  33. "SM64 - The Secret Aquarium - 56 Coins" by pannenkoek2012
  34. "SM64 - Wing Mario over the Rainbow - 56 Coins" by pannenkoek2012
  35. "SM64 - Bowser in the Dark World - 999 Coins" by pannenkoek2012
  36. "SM64 - Bowser in the Fire Sea - 250 Coins" by pannenkoek2012
  37. "SM64 - Bowser in the Sky - 999 Coins" by pannenkoek2012
  38. https://youtu.be/GMOxYVtJhOI
  39. https://youtu.be/M4M_OyUorRQ