Super Mario Land 2: 6 Golden Coins is one of the more popular Game Boy games, as many have "played that as a kid," and has an active speedrunning community. However, the TAS which this aimed to beat by defeating all bosses and Wario, is 9 years old, and is due to be obsoleted by many new strategies.
This TAS notably improves upon the previously published TAS by 3,911 frames (BIOS not included), thanks to out of bounds being used in four additional levels, a power-up change, and improved movement.
I want to thank MUGG upfront for his contributions. All of his work and suggestions, plus reviewing my WIPs, resulted in a significant time save compared to my initial TAS of this category.

Objectives

  • Emulator used: BizHawk 2.3.1
  • Core used: Gambatte SVN 344
  • Genre: Platform
  • Heavy glitch abuse
  • Uses death to save time
  • Takes damage to save time
  • Forgoes major skip glitch
  • Forgoes final boss skip glitch
  • Forgoes memory corruption

Differences from published TAS

The original changes from the published TAS include using death to initiate the pipe glitch in Mushroom House (to then clear the Mushroom House) and Macro Zone 1 (to then clear Pumpkin Zone 1), and using the carryover glitch to take a bubble into Wario's Castle and manipulate lag to go out of bounds and start the Wario fight early. Both of these implementations resulted in a different route, where Space Zone is saved until the end. More changes from the published TAS are explained in the next section.

Differences from cancelled TAS

My first submitted TAS was approximately 2,582 frames faster than the original TAS (excluding the BIOS and unnecessary music glitch), but MUGG had many suggestions that lead to more improvements. First, the better pixel trick (explained below) was used as much as possible, rather than just when it is convenient. Second, there were slight adjustments, such as scrolling the screen up before the death+pipe glitch and better level clears when out of bounds. Third, there was an alternative method to completing Space Zone 1 by manipulating lag. Fourth, instead of keeping fire from Macro through Tree, the carrot is grabbed in Macro Zone 4, which loses some frames, but even more is saved in Tree Zone 4 and 5 with it. In total, an additional 1,329 frames were saved.

Carryover Glitch

A v1.0 exclusive glitch where, when Mario exits a level while changing states, the new state is remembered and implemented in the next level Mario enters. This is how the pipe glitch works, where Mario exits a level (by dying or start+select) while descending in a pipe, then is placed outside the next level where a level clear tile can be found. It is also how the midway glitch (used in Space Zone 1 to bypass most of Space Zone 2) and bubble glitch (used in the Hippo level to have a bubble in Wario's Castle) work.

Out of Bounds

Going out of bounds in SML2 is accomplished either via the pipe glitch or by manipulating lag. When out of bounds, we do one of three things, depending on the circumstances: land in a partial copy of the level, sans sprites, and reach the exit; land in the game's memory (specifically OAM) and find a level clear tile (4A or 4B, depending if you want the normal exit or secret exit); zip vertically to different parts of the level/memory. A lua script created by dotsarecool was used to help navigate the game's OAM memory and find level clear tiles. More details about the out of bounds sections are covered in this video.
It should be noted that not all levels can be completed by going out of bounds, primarily due to the level layout.

Movement

As described in the published TAS, the pixel trick allows for faster movement than humanly possible, thanks to frame-by-frame control. There is also a "better" pixel trick, which is even faster, but was not used in the previously published TAS (or my cancelled TAS) because it is restrictive. I'll attempt to explain both based on my experience.
Mario's speed (which can be seen at memory address A202), at top speed, oscillates between 1 and 2. The oscillation patterns (which can be seen at memory address A200) are 8 frames long and vary. Since at top speed Mario's pattern is {2,1,2,1,2,1,2,1}, the pixel trick is simply manipulating the oscillation patterns so that one of the 1 speeds in the pattern is a 2 speed. This can be done in a number of ways: pressing left and right one frame apart every 8 frames in the air; holding right for 4 frames then continuing to run without holding right for 4 frames; ducking and holding right for 8 frames then holding right without ducking for 8 frames - each of these are dependent on the oscillation patterns and frame you start moving. The patterns are in increments of 4 starting at 80 (which is 0 speed in either direction), and you can increase or decrease them by one pattern (4) at a time on the ground, and by two patterns (8) at a time in the air, with some minor exceptions: you must be on the ground to achieve running speed, and if you run without holding B you immediately go back to walking speed.
SML2 Better Pixel Trick
The "better" pixel trick gets not one additional 2 speed in the pattern, but a second additional 2 speed. However, it can only be done when landing from a jump. A simplified explanation of how to accomplish this is that you jump as much as possible (running is preferred when jumping makes routes impossible, such as obstacles in the way, or when there would be more lag by jumping), pressing left then right on the subsequent frame while in the air (you want to be in pattern D8 and move to pattern D0 for a single frame when it would give you a 2 speed and D8 would not), and landing either 3 or 5 frames after last pressing left.
It is strongly suggested that, if you wanted to replicate this fast movement, the TAS be looked at for specific applications. It should be noted that when jumping on an enemy or onto a platform/ground tile at a different height than where you started, you may not land on a favorable frame; trial and error is advised.
Movement was also made easier when moving left and swimming thanks to a lua script made by MUGG. Corner boosts are used when convenient. Most times it requires deviating from the pixel trick, which means the one pixel boost would not be worth it.

Other Notes

The previous TAS stated that the two swimming speeds were {1,1,1,1,1,1,1,1} and {1,2,1,1,1,1,1,1}, however, I only found the first sequence and a second sequence of {1,0,1,1,1,1,1,1}. Moreover, when reviewing the previous TAS, the swimming speed achieved there was {1,1,1,1,1,1,1,1}. This leads me to believe there was some confusion about the potential speeds, though the faster speed was used in both this TAS and the previously published TAS.
Movement with moon physics (such as in Space Zone 1), space physics (such as in Space Zone 2), and the bubble (such as in the Hippo level) are all identical, with the rather obvious exception that you can float indefinitely with space physics and the bubble. However, the trick of changing oscillation patterns whenever you jump is the same.
If you press pause 83 frames after the final hit on Wario, the ending credits music fails to start, and the Wario fight music continues indefinitely. Nod to pidgezero_one for accidentally finding this. However, it has been excluded from this TAS for a faster completion time.
The pause glitch was considered for use, especially in Space Zone 1, but was ultimately not used due to it being an ACE exploit, and could lead to other consequences. Due to it's nature, there is the potential of loading bosses sooner, or even loading the castle or the Wario fight without defeating any bosses. Basically, including the ACE exploit would lead to any other category being similar in nature to the current game end glitch TAS, which results in homogeneity and arbitrary goals.

Level Details

Mushroom House Using a shell and the pixel trick, Mario dies on the same frame he enters the first pipe, and using the carryover glitch, goes under the level. Moving left reaches the goal on the copy of the level.
Tree Zone 1 This level is completed now to set up the carryover glitch for Tree Zone 2 later in the route.
Pumpkin Zone 1 After stopping at Macro Zone 1 to set up the carryover glitch, Mario goes under the level down to the memory and finds a level clear tile.
Pumpkin Zone 2-4 Lag is reduced as much as possible, and the pixel trick allows for quick completion.
Mario Zone 1 Using Pumpkin Zone 1 to set up the carryover glitch (and get the mushroom), we find a level clear tile in the memory to skip going through this level. It's actually the secret exit tile we find, which is why Mario Zone 1 isn't marked as completed on the overworld, but it's irrelevant since we still proceed forward and don't need to go through Mario Zone 1 again.
Mario Zone 2-4 More lag reduction, as much as possible, and managing power-ups. Damage is taken in a number of spots to move quicker and reduce lag.
Turtle Zone 1-2 Before each of these levels, Pumpkin Zone 1 is used to set up the carryover glitch. It may seem slower to traverse the overworld so much, but it is faster than completing the levels as normal.
Turtle Zone 3 Unavoidable lag when grabbing the fire flower, otherwise movement is optimized.
Macro Zone 1 After again using Pumpkin Zone 1 to set up the carryover glitch, Mario goes to the memory to find a level clear tile corresponding to the secret exit.
Macro Zone Special Autoscroller. Not much to say. Those prone to motion sickness may want to skip the end of it.
Macro Zone 4 There were a couple possibilities to end this level and how to proceed. I considered getting damaged by the Rat, getting damaged at the beginning of Macro Zone 1, and using that pipe to set up the carryover glitch, but the change in power-ups and taking damage during the Rat fight proved too slow. Initially the fire flower was kept and used all through Tree Zone, but instead getting the carrot here, beating the Rat by jumping on it, then switching to fire flower in Tree Zone 5 proved faster (primarily thanks to Tree Zone 4).
Tree Zone 2 Setting up the carryover glitch in Pumpkin Zone 1 for a final time leads to finding a level clear tile in the memory of this level.
Tree Zone 4 As previously mentioned, having the carrot in this level is significantly faster than the fire flower. The pixel trick is abandoned during part of Mario's flying, otherwise he catches up to the enemies too quickly and is unable to jump off of them.
Tree Zone 5 More unavoidable lag when the carrot is lost; Mario grabs the fire flower for the Bird.
Hippo Spend a little time out of the bubble to utilize the better pixel trick and avoid some lag.
Space Zone 1 First, the second pig is spawned off to the right, then Mario moves just enough that the right pig is off-screen while still shooting, but the projectiles do not appear on-screen. When Mario finally moves right to reveal the pig, all of the projectiles appear on-screen at once, creating a lot of lag. Combined with fireballs, Mario is zipped vertically to the memory and near a level clear tile.
Space Zone 2 After first going back to Space Zone 1 to set up the carryover glitch with the midway bell (as opposed to a pipe), Mario dies as soon as possible and is placed at the midway upon re-entering. While the music is cool, the autoscroller is slow, so over half the level is skipped. The mushroom is kept in the Tatanga fight to set up early Wario.
Wario's Castle First, Hippo is re-entered and the carryover glitch is now used on the bubble. In Wario's Castle, the speed of the bubble allows several fireballs to remain on screen when moving backwards. Combined with Mario's fireballs, a spike ball, and the bubble animation, enough lag is generated to zip Mario upwards towards the end of the castle, and the screen scrolling pushes Mario into a loading zone for the final fight. In the first phase of the fight, Mario's speed is preserved during the screen transition (it is not possible after the second phase to repeat this). Additionally, damage is taken in phase one so Mario can be small for phase two, and hit Wario earlier.

Thanks

Special thanks to andymac for creating the first TAS. link_7777 for his RAM watch file. Oh_DeeR for his suggestions and motivation.

Memory: Judging
Memory: The optimization appears very solid, it's an obvious improvement over the published movie that this intends to obsolete.
I really enjoyed most the TAS, the usage of the pixel trick made levels go by really fast. Some of the more extreme glitches I really liked whereas some others I felt actually detracted, namely the pipe glitch. The pipe glitch allows for levels to easily be skipped by dumping you below the level and placing you near a level end trigger. Given that the pipe glitch can easily lead to game end glitch as demonstrated in a now obsoleted publication, my first instinct was that its inclusion felt a little arbitrary and its usage made the movie repetitive, agreeing with the general audience reception. However the published run this movie intends to obsolete also abuses the pipe glitch and similar glitches. It appears the old movie was created before the discovery of the game end glitch. As such this branch could be seen as a valid goal choice for now.
If an all levels (100%) run was made, I believe it would be best to not use any of the carryover glitches in order to best demonstrate the content of all the stages. Said run could either obsolete this branch or be published seperately, depending on audience reception.
Spikestuff: Publishing.


TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15577
Location: 127.0.0.1
Player (105)
Joined: 5/27/2019
Posts: 10
Location: Maryland
Proposing one of the following as the screenshot (my preference is for the space one): Frame 62318 Frame 72047 It took about 6 weeks, but I went back through the entire TAS I originally submitted, with mugg's input along the way. I attached the goal "all bosses" because the TAS it aims to beat does not have a goal. The goal here is to really play through the whole game without using ACE. I didn't want the goal name to be extremely long, but I want to be sure this goal does not include ACE, since it stops looking like the actual game, and looks more like the game end glitch TAS. EDIT: if the judges agree that remaining branchless is preferred, then I defer to their judgment.
Currently projects: Super Mario Land 2: 6 Golden Coins (Beat Wario) & Glitchless Human Theory)
Editor, Expert player (2329)
Joined: 5/15/2007
Posts: 3933
Location: Germany
Oh_Deer actually pointed out that you can jump above the pool of water in Turtle 3 for a bit, which seems to save ~20 frames. We both overlooked this. I'm not sure if you can still implement this in the run. My kudos to dadinfinitum! I have rarely worked with another TASer whose work was consistently good and optimized. Where I would have probably spent weeks and given up midway through, he basicly went through this game in 1 week, with seemingly no trouble implementing each improvement I pointed out. Looking at the WIPs for improvements was very fun and I'm happy about the result.
Player (105)
Joined: 5/27/2019
Posts: 10
Location: Maryland
MUGG wrote:
Oh_Deer actually pointed out that you can jump above the pool of water in Turtle 3 for a bit, which seems to save ~20 frames. We both overlooked this. I'm not sure if you can still implement this in the run.
I messed with it last night, and saw the improvement, however, any adjustments to made in the middle of the TAS subsequently affect everything afterwards. I know mugg already knows this, but I'll explain for everyone else: since movement is based on a global timer, especially the pixel trick, all movement would have to be tweaked from the point of adjustment, which is essentially half of the TAS. Additionally, the two level clears in memory past Turtle Zone 3 would have to be messed with, which is not trivial, plus the two vertical zips, which are very precise. Lag would also change, since we would be jumping at different times, so any instances of lag would have to be messed with. Between all of that, the time saved could actually be less due to these factors. tl;dr the amount of time and work it would take to implement this change offsets the amount of frames that could be saved, especially since it's not a guarantee.
Currently projects: Super Mario Land 2: 6 Golden Coins (Beat Wario) & Glitchless Human Theory)
Joined: 11/14/2016
Posts: 4
I'm happy about how this turned out. Going back to the drawing board after the initial submission and taking Mugg on board who was able to share his decades, if not centuries, of experience in fiddling around with this game, proved to be the right decision. And I can only agree with what Mugg said above: dadinfinitum more or less bulldozed through this project, despite one or two setbacks, which I find truly admirable. Shame about the missed 20 frames, but this is how it goes oh so often with TASing, I suppose. At some point you have to draw a line; and really, this man deserves a break from this marathon.
Joined: 6/4/2009
Posts: 893
yes vote for improving the currently published run BUT the pipe gltich use makes the "all bosses" goal a bit arbitrary : as you don't complete all the levels this run can't be called a 100% and since the PG can be used to trigger the ending (#3299) (the last any% glitched using it), it qualify this run as a "glitched" branch but not an "any%" since it not take the "fastest path to the ending" (aka PG > ending ) still it was entertening to see
Player (105)
Joined: 5/27/2019
Posts: 10
Location: Maryland
Nicos wrote:
yes vote for improving the currently published run BUT the pipe gltich use makes the "all bosses" goal a bit arbitrary : as you don't complete all the levels this run can't be called a 100% and since the PG can be used to trigger the ending (#3299) (the last any% glitched using it), it qualify this run as a "glitched" branch but not an "any%" since it not take the "fastest path to the ending" (aka PG > ending ) still it was entertening to see
This is a fair point. Perhaps remaining branchless is the best option, then. My belief is that a run that triggers the credits and a run that defeats Wario should be different. I also don't like the inclusion of ACE in a run that defeats Wario. I don't think it's arbitrary; one resembles the original game and the other does not.
Currently projects: Super Mario Land 2: 6 Golden Coins (Beat Wario) & Glitchless Human Theory)
Joined: 6/4/2009
Posts: 893
dadinfinitum wrote:
This is a fair point. Perhaps remaining branchless is the best option, then. My belief is that a run that triggers the credits and a run that defeats Wario should be different. I also don't like the inclusion of ACE in a run that defeats Wario. I don't think it's arbitrary; one resembles the original game and the other does not.
that's also kinda why i voted yes there, since there's already a published run; this is pure obseletion. now if someone ever do a 100% run without the GP i think that the said run should obselete and replace this specific branch
Former player
Joined: 6/30/2010
Posts: 1107
Location: Zurich, Switzerland
This wasn't as entertaining as I hoped it would be. There were some good parts, but I really didn't like how much the pipe glitch was used. I kept thinking "please don't go back to Pumpkin Zone, just play the level". I also didn't like the playaround part of the autoscroller too much, I would have preferred if you didn't use the pixel trick movement there (if that was even used, I don't know this game well enough) and synced the gameplay to the music. Meh vote from me, I hope to see a TAS one day that completes all the levels without the pipe glitch.
Current project: Gex 3 any% Paused: Gex 64 any% There are no N64 emulators. Just SM64 emulators with hacky support for all the other games.
Post subject: Movie published
TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15577
Location: 127.0.0.1
This movie has been published. The posts before this message apply to the submission, and posts after this message apply to the published movie. ---- [4042] GB Super Mario Land 2: 6 Golden Coins by dadinfinitum in 20:49.86