Introduction
For the last 18 or so years on YouTube, Super Mario Bros. has gathered a cult following for exploring different Game Genie codes; codes that modify the game to create different effects in terms of gameplay or aesthetics. These codes in turn can make the game harder and/or easier depending on the effect.
Among the more popular codes seen in speedruns and TASes alike are AEPLLG, GIIIVY, STAGEO, TEYIUT, and AISSON. There are maybe a couple more out there as well, but these five are the ones that come to mind for me, mostly due to relevancy.
Among the more popular codes seen in speedruns and TASes alike are AEPLLG, GIIIVY, STAGEO, TEYIUT, and AISSON. There are maybe a couple more out there as well, but these five are the ones that come to mind for me, mostly due to relevancy.
This run by me uses the code XZIUYS to beat the game faster than usual, over a minute faster compared to the original cheat-less run.
If you need a refresher on calculating horizontal speed in this game, we can jump into that first.
If you need a refresher on calculating horizontal speed in this game, we can jump into that first.
There's a bit of nerdy information coming up that I covered, but I don't believe it's perfect; if there are any mistakes, feel free to call me out on them.
Mario's horizontal speed is determined by hex address
Just about the same can be said for enemy and sprites (
0057
. As a signed value (or at least how I have it in my RAM Watch), it's a positive integer whenever he goes right (making it rightward speed), and it's negative whenever he goes left (making it leftward speed). The maximum rightward speed for this singular 256-bit address is 127 (or 7F
in hexadecimal) while the maximum leftward speed is -128 (or 80
in hex).Just about the same can be said for enemy and sprites (
0058
to 005D
), Fire Mario's fireballs (005E
and 005F
), broken brick chunks (0060
to 0063
), and other objects (0064
to 006C
), but that's a different story.
Speed translates to how many subpixels/frame Mario is going; for example, a speed of ±1 means going 16 subpixels (
0400
) every frame. For a full pixel (0086
) to be gained, a total of 256 subpixels must be made; this means here, Mario is traveling at 0.0625 pixels per frame, and he will have made a pixel every 16th frame if he maintains that speed of ±1.
The maximum speed for walking (Left or Right without B) is ±24 (
The maximum speed for running (Left or Right with B) is ±40 (
18
in hexadecimal), which translates to 1.5 pixels per frame, or 384 subpixels per frame. This means on every other frame, Mario will advance two pixels.The maximum speed for running (Left or Right with B) is ±40 (
28
in hexadecimal), which translates to 2.5 pixels per frame, or 640 subpixels per frame. This means on every other frame, Mario will advance three pixels.
XZIUYS makes use of two special numbers: a positive 51 and a negative 116.
How fast is 51 speed?
±51 speed (
Here, Mario will advance 19.125 pixels every six frames; this means for every 16 frames, he will have made four pixels in a single frame on the sixth frame, 11th frame, and 16th frame. So this pattern goes like this: 3-3-3-3-3-4-3-3-3-3-4-3-3-3-3-4-(repeat)
33
in hexadecimal) is 3.1875 pixels per frame, or 816 subpixels per frame. This is 48 subpixels-per-frame faster than a kicked Koopa shell (which moves at ±48 speed).Here, Mario will advance 19.125 pixels every six frames; this means for every 16 frames, he will have made four pixels in a single frame on the sixth frame, 11th frame, and 16th frame. So this pattern goes like this: 3-3-3-3-3-4-3-3-3-3-4-3-3-3-3-4-(repeat)
How fast is 116 speed?
±116 speed (
Here, Mario will advance 29 pixels every four frames; this means on every fourth frame, he will have made eight pixels. So this pattern goes like this: 7-7-7-8-(repeat)
74
in hexadecimal) is 7.25 pixels per frame, or 1856 subpixels per frame. This is 832 subpixels-per-frame faster than Fire Mario's fireballs when fired normally (which move at ±64 speed) and, when going left, only 64 subpixels-per-frame slower then Fire Mario's fireballs when fired while pressing Left and Right at the same time (which move at -122 speed).Here, Mario will advance 29 pixels every four frames; this means on every fourth frame, he will have made eight pixels. So this pattern goes like this: 7-7-7-8-(repeat)
According to doppelganger's document of the game's memory map, this code affects one of 316 addresses that determine the routine for Mario's movement physics. The specific address affected is
B55F
and is given the value AA
.
On the ground, if standing still, pressing Left will set Mario's horizontal speed to 51 going right. Any attempts to lose speed while moving right will also lock it at 51. However, as long as Mario's rightward speed is less than 11, you can still bring him to a halt by pressing Down, Up, or B immediately after letting go of Right.
When moving, holding Right will lock Mario's rightward speed to the maximum, determined by whether you are holding B (max will be 24) or not (max will be 40). You are still able transition from walking speed to running speed or vice versa while holding Right like you normally would, which is all dependent on when you hold B and how long you hold (or let go) of B.
Holding Left will allow Mario to move through walls, allowing for full flagpole glitches (FFPG); how long the button must be held for Mario to not immediately be pushed left depends on how far in the wall he is. I aim to minimize holding Left to clip through walls whenever possible.
When moving, holding Right will lock Mario's rightward speed to the maximum, determined by whether you are holding B (max will be 24) or not (max will be 40). You are still able transition from walking speed to running speed or vice versa while holding Right like you normally would, which is all dependent on when you hold B and how long you hold (or let go) of B.
Holding Left will allow Mario to move through walls, allowing for full flagpole glitches (FFPG); how long the button must be held for Mario to not immediately be pushed left depends on how far in the wall he is. I aim to minimize holding Left to clip through walls whenever possible.
In the air, if Mario's rightward speed is 24 or less, then pressing Left for one frame will set it to 51. If it is higher than 24, then holding Left will set it to -116. In this case, pressing Right will shoot it back up to 40, the maximum running speed.
At -116 speed, landing without holding Left will set the rightward speed to 24 for one frame, then back to 51 assuming Right and A are not pressed by then.
At -116 speed, landing without holding Left will set the rightward speed to 24 for one frame, then back to 51 assuming Right and A are not pressed by then.
When bumping into a wall, you can still gather leftward horizontal speed, although up to -2 depending on Mario's facing direction and your horizontal sub-speed (
0705
). You need to press Left for one frame in the air; you also need to avoid landing on the ground for more than two frames in order for that leftward horizontal speed to be granted. Mario can lose that speed on the ground as well.
Pressing/holding Left and Right at the same time does not grant any additional effect, as it still pertains to the same un-intended function.
The Right button functions as intended at all times, while the Left button does not allow for moving left on the ground unless you hold Left and your leftward speed is -116.
The Right button functions as intended at all times, while the Left button does not allow for moving left on the ground unless you hold Left and your leftward speed is -116.
It is possible to go beyond 51 rightward speed. When moving left on the ground and holding Left, B must not be pressed or held, as that will lock the maximum leftward speed to -116 for nine frames. Mario cannot be in the air either, as you cannot gain more leftward speed that way. Attempting to press Left in the air will drop the leftward speed back to -116. Letting go of Left for one frame will propel the rightward speed back to 24 on the next, then back to 51 (again, assuming Right and A are not pressed by then).
Leftward speed can exceed to -128, then once it reaches past that point, this horizontal speed transitions from leftward speed to rightward speed, an astonishing 127 rightward speed. This can be slowed down to 51.
However, this has drawbacks.
Leftward speed can exceed to -128, then once it reaches past that point, this horizontal speed transitions from leftward speed to rightward speed, an astonishing 127 rightward speed. This can be slowed down to 51.
However, this has drawbacks.
- You need at least 107 pixels of leeway to walk so you can gather all the leftward speed, and this is also heavily dependent on your horizontal sub-speed, meaning you could require more pixels should you get a higher sub-speed (higher is better when going right; lower is better when going left).
- Along with that, the game can only fully render screens four pixels per frame. If Mario travels at high rightward speeds*, the game will struggle to catch up; tiles for the next screen will not be rendered entirely, and tiles from previous screens will be used instead. This effect is worsened the higher the rightward speed, so this technique must be used sparingly, and speed must be lowered gradually whenever possible. Such high speeds can otherwise allow for phasing past enemy hitboxes, and - with the proper horizontal pixel - walls and even loop triggers**.
This is not meant to be an expert take, and I have yet to experiment with it a bit more. Please feel free to pitch in if you have explanations of your own.- * I find the high rightward speed of 65 - that's 4.0625 pixels per frame, 5 pixels per 16th frame - to be a dangerous speed to run through in particular.
- ** ...somewhat. Only the level data portion is looped, but enemies on later screens can still appear and the destination area can still change.
- At the end of every level is a flagpole and a castle, but because of the use of this technique, the castle may not always appear. After touching the flagpole, Mario must touch the left side of a block to trigger the next process of the level clear function: the timer drain. For that to occur, there is a mini-flag sprite that needs to be loaded, and that means rendering the castle. Not all of it has to be rendered, only the tiles in the center column (for smaller castles, it's the door below the windows; for bigger castles, it's the middle door - below the bigger door-like windows). If that specific column is not rendered, the in-game timer will not drain, therefore leading to a softlock.
Thus, I must take precautionary measures throughout almost every level to avoid the dreaded softlock and ensure the mini-flag is loaded in time. Even after Mario touches the flag and bumps into a block, the game may still be in the middle of rendering the castle columns, leading to a delay in draining the in-game timer. - One last thing to note here is that this tremendous speed, after Mario gradually loses it, cannot be regained; however, this technique can be re-used multiple times in a single level to maintain it and, if possible, save time as a result.
This (literally) game-breaking technique has not been exploited previously.
Now, all this information that I brought up about this code pertains to non-underwater level cases. What about in an underwater level?
Much of it is the same underwater as it is overworld. However, there are a few differences.
- While not moving, pressing Left on the ground will set Mario's rightward speed to 4. While moving right on the ground, Mario's minimum rightward speed is stuck at 4, not 51. But again, you can press Down, Up, or B not in conjunction with Right to drop his speed down to 0.
- There are no alternate speed acceleration patterns in underwater levels, only one. Therefore, pressing Right on the ground with a rightward speed of 17 or higher will cap the speed to 16.
- In the air, you can gather more rightward speed in the air if it's above 24, the maximum being 40, by holding Right. On the ground, you can gradually lose it all the same.
- You cannot go past 51 rightward speed underwater due to being unable to gather more than -116 leftward speed. Landing with a leftward speed of -116 and not pressing anything will spike Mario's rightward speed to 16. Landing and holding Left will put it at 4.
Initial progress on the TAS began on October 5 of this year. I finished a week from then with a time of 3:54.06 from Power On (or 3:50.78 in RTA timing; when World 1-1's "400" appears), with the initial intention of beating ForksTases's run, which clocked in at 3:55.56 in RTA timing.
After learning about the game-breaking technique of reaching rightward speeds higher than 51, I went back and used it to its fullest potential, saving 26.25 seconds over my initial efforts after three days.
I don't believe there is much to say besides these comments below, so I'd like to highlight some certain parts of the run instead. Hopefully the run will speak for itself otherwise.
Specific comments
World 1-1
Ironically, this was the last level I give a final look-see after realizing that skipping the warp to the underground bonus room is faster.
World 1-2
An intentional one-frame delay is needed here for the first Piranha Plant's hitboxes in the next level to cooperate*. That leaves me with no frames to spare after.
The broken speed technique is performed three times here.
The broken speed technique is performed three times here.
World 4-2
In the heavenly warp zone, I delay three frames for entertainment by collecting a few coins. However, I needed to delay again for another frame to fix the hitboxes in World 8-1*.
The broken speed technique is performed twice in the main underground area.
The broken speed technique is performed twice in the main underground area.
World 8-2
It's faster to clip into the second stairs structure in the beginning than to clip at the bottom or go over the structures, allowing for the broken speed technique to be performed faster.
World 8-3
It's faster to let the game catch up with the scrolling than to leave it behind. I had a hard time forcing the game to render the castle that way.
World 8-4
Room 1
Now, here's when things get interesting. Remember when I talked about how you could almost skip loop triggers with such speed? This is taken into effect here.
I maintain the 127 speed throughout the area. The two-tiles-tall pipe appears four times, the fourth time I warp down to. There, the destination page (
It's unfortunately slower to try and skip the third room as well.
I maintain the 127 speed throughout the area. The two-tiles-tall pipe appears four times, the fourth time I warp down to. There, the destination page (
0751
) for this area changes to 12 (the third portion of the area), and I am warped there, skipping the second room.It's unfortunately slower to try and skip the third room as well.
Room 3
For this wrong warp to work, the camera's horizontal position (
I first make an appropriate-length jump over the Piranha Plant residing in the first available warp pipe. After changing the destination area (
I cannot avoid the warp and skip to Bowser because the level data is still being looped, even as Mario progresses. It does result in strange and crazy effects on the flames and Bowser though.
071D
) must be 16, and its current screen (071A
) must be 13, same as just about every Super Mario Bros. run thus far.I first make an appropriate-length jump over the Piranha Plant residing in the first available warp pipe. After changing the destination area (
0750
), I delay for one frame before pressing Left, so that the Piranha Plant won't hit Mario by the time he lands on the pipe. Then I press Down immediately after landing. Even if it seems like he'll get hit and die, he doesn't. Hitboxes only take effect every other frame.I cannot avoid the warp and skip to Bowser because the level data is still being looped, even as Mario progresses. It does result in strange and crazy effects on the flames and Bowser though.
The technique will not work here because there is no room to perform it. Input for this room has not changed.
Room 4
The broken speed technique will not work here (see tabbed notes above), so no time can be saved here. The input has been changed halfway due to the third Blooper being able to hurt Mario somehow going down.
* The future levels were done previously. The levels that I had to create delays for were done later, if that makes sense.
Possible improvements?
Maybe I can see there being potential improvements here and there, but considering my incomplete knowledge on the game's truly limited nature of scrolling and playing catch-up, I believe the effort put into this run is satisfactory and not worth looking over again for now.
in World 4-1
It's possible to finish with 364 in-game seconds left, but due to how slow the game renders the castle as a result, the timer drain is delayed to the point where it's not enough to save a framerule; I'd be three frames behind the next framerule. So I end with 362 instead so that the game can catch up.
in World 4-2
There is a possible four-frame improvement in the main underground area, but it's not enough to save the next framerule; it's only six frames behind the next framerule.
in World 8-3
It's very close, but I can only make it two frames behind the next framerule. I doubt there's anything that can be done here.
Additional thoughts?
This TAS was made to test the limitations of TASVideos's stance on external cheat codes that modify the game to have it change certain aspects or alter gameplay. Previous runs of various Game Genie codes specifically for Super Mario Bros. have been submitted before and have faced rejection, cancellation, or Playground placement, and possibly many others just weren't even submitted in the first place; none have been published thus far.
I do not expect my run to sucker-punch its way to publication and spark a newly found beginning for Game Genie code-based runs (although that would serve as a nice gesture); I expect the staff to consider the outcomes of these types of runs being published and how to work them into TASVideos. Whatever decision they arrange, I will understand and comply with, like I normally do.
I do not expect my run to sucker-punch its way to publication and spark a newly found beginning for Game Genie code-based runs (although that would serve as a nice gesture); I expect the staff to consider the outcomes of these types of runs being published and how to work them into TASVideos. Whatever decision they arrange, I will understand and comply with, like I normally do.
As a bonus, the input presented in the file (excluding the final frame of input) does not make use of Left + Right for a single frame, citing itself as a "RTA Rules" TAS. Theoretically, a human could be able to recreate the movements as seen on the TAS to achieve the same time, given they have superhuman reflexes or are Niftski, but alas, this is very unlikely and simply a fantasy you can imagine for yourself.
Suggested screenshots?
I don't have any to offer for now, I'll leave that to the publisher. Go wild. :)