100 Coin Star: Difference between revisions
(→No Joystick Challenge: Grammar) Tags: Mobile edit Mobile web edit |
Tags: Mobile edit Mobile web edit |
||
(11 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
'''100 Coin Stars''' are [[Star|stars]] that appear after collecting 100 coins in all 15 [[List of Courses|main courses]]. They differ from all other stars in the main courses in that they appear directly above Mario instead of at fixed location. 100 Coin Stars appear in no other courses, even if the player manages to collect 100 coins. 100 Coin Stars are unique in that when Mario collects one, he is not ejected from the current course back to the castle. Instead, a [[Textbox|textbox]] appears, and Mario is allowed to continue exploring the course. | '''100 Coin Stars''' are [[Star|stars]] that appear after collecting 100 coins in all 15 [[List of Courses|main courses]]. They differ from all other stars in the main courses in that they appear directly above Mario instead of at fixed location. 100 Coin Stars appear in no other courses, even if the player manages to collect 100 coins. 100 Coin Stars are unique in that when Mario collects one, he is not ejected from the current course back to the castle. Instead, a [[Textbox|textbox]] appears, and Mario is allowed to continue exploring the course. | ||
==Phenomena== | ==Phenomena== | ||
{{Merge|Coin Limit|type=section|reason=duplicated information|date=December 2018}} | {{Merge|Coin Limit|type=section|reason=duplicated information|date=December 2018}} | ||
====Coin Count vs. Coin Display==== | ====Coin Count vs. Coin Display==== | ||
The game uses two different variables to track Mario's coins: the ''coin count'' and the ''coin display''. The former is updated the instant Mario collects a coin, while the latter is used to display the coin count on-screen. | The game uses two different variables to track Mario's coins: the ''coin count'' and the ''coin display''. The former is updated the instant Mario collects a coin, while the latter is used to display the coin count on-screen. | ||
Line 10: | Line 8: | ||
The coin display will increment by 1 until it catches up with the coin count. In particular, the coin display only increments when it is less than the coin count and the [[Global Timer|global timer]] is odd. Using this method, the programmers intended the coin display to update once every two frames. However, by manipulating the global timer through [[Pause Buffering|pause buffering]], one can prevent the coin display from updating altogether<ref>https://youtu.be/T-YtojVHfKc</ref>. | The coin display will increment by 1 until it catches up with the coin count. In particular, the coin display only increments when it is less than the coin count and the [[Global Timer|global timer]] is odd. Using this method, the programmers intended the coin display to update once every two frames. However, by manipulating the global timer through [[Pause Buffering|pause buffering]], one can prevent the coin display from updating altogether<ref>https://youtu.be/T-YtojVHfKc</ref>. | ||
====Coin Overflow==== | ====Coin Overflow==== | ||
Both the coin count and the coin display are stored as 16-bit signed shorts, so their values can range between -32768 and 32767 inclusive. In all versions of the game after the original Japanese N64 version, the coin count is capped at 999 on every frame. However, in the Japanese version, a bug is present in the game's code that sets the life counter to 999 when the coin counter exceeds 999: | Both the coin count and the coin display are stored as 16-bit signed shorts, so their values can range between -32768 and 32767 inclusive. In all versions of the game after the original Japanese N64 version, the coin count is capped at 999 on every frame. However, in the Japanese version, a bug is present in the game's code that sets the life counter to 999 when the coin counter exceeds 999: | ||
// On every frame... | // On every frame... | ||
if (lives > 100) | if (lives > 100) | ||
Line 20: | Line 15: | ||
if (coins > 999) | if (coins > 999) | ||
lives = 999; //! this should use "coins" instead of "lives" | lives = 999; //! this should use "coins" instead of "lives" | ||
The effects of this bug are twofold: the coin count can exceed 999, and the lives count is erroneously set to 999. | The effects of this bug are twofold: the coin count can exceed 999, and the lives count is erroneously set to 999. | ||
Because the coin count can exceed 999, using [[Infinite Coin Glitches|infinite coin glitches]], it can reach 32767. Due to signed integer overflow, if one more coin is collected, the coin counter would become -32768. Collecting coins will continue to increase this value. Note that the coin display would remain 32767, for it only updates when it is less than the coin count. If one collects 32868 more coins, or 65636 coins in total, the coin counter will equal 100, spawning another 100 Coin Star. Although this star will appear yellow, collecting it will not increase the game's star count from 120 to 121 or more. This is because each star is represented in memory by 1 bit, and when a star is collected, the game uses the bitwise OR operator to store this information. | Because the coin count can exceed 999, using [[Infinite Coin Glitches|infinite coin glitches]], it can reach 32767. Due to signed integer overflow, if one more coin is collected, the coin counter would become -32768. Collecting coins will continue to increase this value. Note that the coin display would remain 32767, for it only updates when it is less than the coin count. If one collects 32868 more coins, or 65636 coins in total, the coin counter will equal 100, spawning another 100 Coin Star. Although this star will appear yellow, collecting it will not increase the game's star count from 120 to 121 or more. This is because each star is represented in memory by 1 bit, and when a star is collected, the game uses the bitwise OR operator to store this information. | ||
Since Mario's life count is stored as an 8-bit signed byte, when it is set to 999, the upper byte is discarded and the number that is stored is -25. Since the above code runs every frame, Mario's life count is constantly set to -25. This means collecting [[1-Up Mushroom | Since Mario's life count is stored as an 8-bit signed byte, when it is set to 999, the upper byte is discarded and the number that is stored is -25. Since the above code runs every frame, Mario's life count is constantly set to -25. This means collecting [[1-Up Mushroom|1-Ups]] will not change this value. Since Mario's coin count is not reset when he exits a level, losing a life will also not change the life count until another main course is entered. However, once Mario's coin count becomes negative, the life counter can be modified again. | ||
==Uses== | ==Uses== | ||
Because 100 coin stars can spawn anywhere you can collect a coin, they are useful for various challenges. | Because 100 coin stars can spawn anywhere you can collect a coin, they are useful for various challenges. | ||
===A Button Challenge=== | ===A Button Challenge=== | ||
When Mario is in freefall, if he is close enough to an edge, he will perform a ledge-grab. In doing so, his height will be updated to the height of the ledge above him, awarding him a small height bonus. Since Mario cannot ledge-grab after dive recovering, dive recovering near a ledge in the A Button Challenge forfeits this height bonus. In certain scenarios, one can use the [[Star Dance Clip]] (SDC) to gain this height bonus without pressing A. When Mario collects a star, his action is set to one that allows him to perform a ledge-grab, regardless of his previous action. If he is close enough to a ledge, he is placed on top of it before doing his star dance animation. Since 100 Coin Stars do not eject Mario from the course, players can use this height bonus to collect stars without pressing A. The Star Dance Clip can be used in combination with [[Vertical Speed Conservation]], which puts Mario into a free-fall state, by ground-pounding to gain height before collecting a 100 Coin Star. | When Mario is in freefall, if he is close enough to an edge, he will perform a ledge-grab. In doing so, his height will be updated to the height of the ledge above him, awarding him a small height bonus. Since Mario cannot ledge-grab after dive recovering, dive recovering near a ledge in the A Button Challenge forfeits this height bonus. In certain scenarios, one can use the [[Star Dance Clip]] (SDC) to gain this height bonus without pressing A. When Mario collects a star, his action is set to one that allows him to perform a ledge-grab, regardless of his previous action. If he is close enough to a ledge, he is placed on top of it before doing his star dance animation. Since 100 Coin Stars do not eject Mario from the course, players can use this height bonus to collect stars without pressing A. The Star Dance Clip can be used in combination with [[Vertical Speed Conservation]], which puts Mario into a free-fall state, by ground-pounding to gain height before collecting a 100 Coin Star. | ||
In the A Button Challenge, the SDC is used: | In the A Button Challenge, the SDC is used: | ||
* | *to get on the [[Bullet Bill Block]] in [[To the Top of the Fortress]] 0x<ref>https://www.youtube.com/watch?v=iVbBjf5s2ag</ref> | ||
* to | *along with a [[Crazy box]] and three [[Scuttlebugs]] to reach the mansion roof in [[Big Boo's Balcony]] 0x<ref>https://www.youtube.com/watch?v=CLksdecIacA</ref> | ||
* to get to the | *to get to the highest walkway 0x in [[Stomp on the Thwomp]]<ref>https://www.youtube.com/watch?v=98EpPsaAF_k</ref> | ||
among other A press saves. | among other A press saves. | ||
Going to [[Hazy Maze Cave]] 0x<ref>https://youtu.be/uDtInisrqqM</ref> also uses a star dance clip, although this is not from a 100 coin star (but from a MIPS star instead). But the star dance clip works the same way. | |||
===No Joystick Allowed=== | |||
The 100 coin star is currently used to reset Mario's ascent of steep slopes, which is useful near the top of the pyramid in [[Shifting Sand Land]] to collect the stars [[Inside the Ancient Pyramid]] and [[Pyramid Puzzle]].<ref>https://www.youtube.com/watch?v=I1XgaxgpEHA</ref> | The 100 coin star is currently used to reset Mario's ascent of steep slopes, which is useful near the top of the pyramid in [[Shifting Sand Land]] to collect the stars [[Inside the Ancient Pyramid]] and [[Pyramid Puzzle]].<ref>https://www.youtube.com/watch?v=I1XgaxgpEHA</ref> | ||
==References== | ==References== | ||
<references /> | <references /> | ||
{{star_nav}} | {{star_nav}} |
Latest revision as of 18:15, 15 August 2023
100 Coin Stars are stars that appear after collecting 100 coins in all 15 main courses. They differ from all other stars in the main courses in that they appear directly above Mario instead of at fixed location. 100 Coin Stars appear in no other courses, even if the player manages to collect 100 coins. 100 Coin Stars are unique in that when Mario collects one, he is not ejected from the current course back to the castle. Instead, a textbox appears, and Mario is allowed to continue exploring the course.
Phenomena
Coin Count vs. Coin Display
The game uses two different variables to track Mario's coins: the coin count and the coin display. The former is updated the instant Mario collects a coin, while the latter is used to display the coin count on-screen.
The coin count is set to 0 when the game starts and when entering a level. When exiting a level, the coin count is not reset, and examining the game's memory reveals that it continues to be updated when coins are collected. A 100 Coin Star appears when this variable equals 100, so long as Mario is in a main course.
The coin display will increment by 1 until it catches up with the coin count. In particular, the coin display only increments when it is less than the coin count and the global timer is odd. Using this method, the programmers intended the coin display to update once every two frames. However, by manipulating the global timer through pause buffering, one can prevent the coin display from updating altogether[1].
Coin Overflow
Both the coin count and the coin display are stored as 16-bit signed shorts, so their values can range between -32768 and 32767 inclusive. In all versions of the game after the original Japanese N64 version, the coin count is capped at 999 on every frame. However, in the Japanese version, a bug is present in the game's code that sets the life counter to 999 when the coin counter exceeds 999:
// On every frame... if (lives > 100) lives = 100; if (coins > 999) lives = 999; //! this should use "coins" instead of "lives"
The effects of this bug are twofold: the coin count can exceed 999, and the lives count is erroneously set to 999.
Because the coin count can exceed 999, using infinite coin glitches, it can reach 32767. Due to signed integer overflow, if one more coin is collected, the coin counter would become -32768. Collecting coins will continue to increase this value. Note that the coin display would remain 32767, for it only updates when it is less than the coin count. If one collects 32868 more coins, or 65636 coins in total, the coin counter will equal 100, spawning another 100 Coin Star. Although this star will appear yellow, collecting it will not increase the game's star count from 120 to 121 or more. This is because each star is represented in memory by 1 bit, and when a star is collected, the game uses the bitwise OR operator to store this information.
Since Mario's life count is stored as an 8-bit signed byte, when it is set to 999, the upper byte is discarded and the number that is stored is -25. Since the above code runs every frame, Mario's life count is constantly set to -25. This means collecting 1-Ups will not change this value. Since Mario's coin count is not reset when he exits a level, losing a life will also not change the life count until another main course is entered. However, once Mario's coin count becomes negative, the life counter can be modified again.
Uses
Because 100 coin stars can spawn anywhere you can collect a coin, they are useful for various challenges.
A Button Challenge
When Mario is in freefall, if he is close enough to an edge, he will perform a ledge-grab. In doing so, his height will be updated to the height of the ledge above him, awarding him a small height bonus. Since Mario cannot ledge-grab after dive recovering, dive recovering near a ledge in the A Button Challenge forfeits this height bonus. In certain scenarios, one can use the Star Dance Clip (SDC) to gain this height bonus without pressing A. When Mario collects a star, his action is set to one that allows him to perform a ledge-grab, regardless of his previous action. If he is close enough to a ledge, he is placed on top of it before doing his star dance animation. Since 100 Coin Stars do not eject Mario from the course, players can use this height bonus to collect stars without pressing A. The Star Dance Clip can be used in combination with Vertical Speed Conservation, which puts Mario into a free-fall state, by ground-pounding to gain height before collecting a 100 Coin Star.
In the A Button Challenge, the SDC is used:
- to get on the Bullet Bill Block in To the Top of the Fortress 0x[2]
- along with a Crazy box and three Scuttlebugs to reach the mansion roof in Big Boo's Balcony 0x[3]
- to get to the highest walkway 0x in Stomp on the Thwomp[4]
among other A press saves.
Going to Hazy Maze Cave 0x[5] also uses a star dance clip, although this is not from a 100 coin star (but from a MIPS star instead). But the star dance clip works the same way.
No Joystick Allowed
The 100 coin star is currently used to reset Mario's ascent of steep slopes, which is useful near the top of the pyramid in Shifting Sand Land to collect the stars Inside the Ancient Pyramid and Pyramid Puzzle.[6]
References
|