Super Mario Land 2 is easily one of the greatest games for the game boy. The game takes place immediately after super Mario land, where Wario has taken over Mario land and brainwashed the inhabitants. Wario's reign is short lived, as only 21 minutes later, Mario has regained full control over the entire island. Sucks to be Wario today I guess.
Normally I would put my thanks at the very end of my comments, but this time, I think MUGG deserves thanks right at the top. without him, none of this would be really possible. He invented the basis for the pixel trick, he watched all of my WIPs and critiqued them, and was my main motivational drive to finish this run.

A note about improvements

The improvements in this movie were largely due to two tricks. The pixel trick, and the pipe glitch. Both saved enormous amounts of time during the run.

The timer

There is a timer in this game which increments by one every frame, whether you are on the map screen, or playing a level. The only times that it does not increase, are the frames where there is lag. The timer controls how Mario accelerates, and determines which frames Mario can use the pixel trick It also controls enemy movement/acceleration, spin jumping graphics, and I wouldn’t be surprised if it controlled Mario’s running animations as well. Since it rolls over levels, and is so intrinsically linked to Mario’s speed, this makes things like hex editing virtually impossible, unless you happen to enter a level on the same frame (mod 8).

The pixel trick

This little gem, originally discovered by MUGG allows for an 8.3% increase in speed on average in ideal situations. Originally, it was performed by repeatedly ducking, however, later experimentation proved that ducking was not required to perform the trick. After some more experimentation it was discovered that the pixel trick could be done in the air as well as on land, and some further improvements were made which meant that on land, the pixel trick could be accomplished absolutely invisibly. The glitch works because it abuses the weird speed calculation method in Super Mario Land 2.
Super Mario Land 2 does not have subpixels, So if the programmers wanted to have a speed of 1.5 pixels per second, then they would need to oscillate between two pixels per second and one pixel per second. Alternatively, more complicated speeds such as 1.125 pixels per second, an 0.75 pixels per second can also be achieved through various different oscillations for example speeds of (1,2,1,1,1,1,1,1) and (1,0,1,1,1,0,1,1) are on average 1.125 pixels per frame and 0.75 pixels per frame. Basically Super Mario land 2 uses different 8 frame oscillations for all of the different speeds required in the game. (A200 is the memory address you want to watch for this, A202 is Mario's speed)
The aim of the pixel trick is to increase Mario’s speed over this regular top speed of (1,2,1,2,1,2,1,2) pixels per frame. You will notice that all the 2's are in even positions (i.e. the 2nd, 4th, 6th and 8th numbers are all 2), and all the 1's are in odd positions. The pixel trick is a way of inserting a 2 into an odd position every 8 frames, this is done by craftily switching between the oscillation (1,1,2,2,1,2,1,2) and (1,2,1,2,1,2,1,2) with perfect timing. The only limitation it seemed was that I would have to jump and land on even numbered frames. (For those wanting to TAS this game, this is an oversimplification of reality, and you should study my TAS to see how the pixel trick works and why.)

Moonwalking

Much like the Apollo missions to the moon, it turns out that it's faster for Mario to jump repeatedly while in space. This is based on Mario's funny oscillating speeds again. You can gain a pixel every time you jump using this trick. Normally, on land, Mario's speed is (1,2,1,1,1,1,1,1), but in the air, it's possible to change it to (1,1,1,1,1,1,2,1). By switching between these two oscillations every time Mario jumps or lands, you are able to save 1 pixel per jump.

The "new" pixel trick

This idea came about when I was trying to prove that the maximum time possibly saved using the pixel trick would be 1 pixel every 8 frames. The problem boiled down to whether or not you could change the number at A200 from D0 to CC in exactly four "moves" using only +4, -4 and -C, OR +8, -8 and +0. This is quite obviously impossible, as no matter how many times you apply +8, -8 and +0, you will never change D0 to CC, and if using +4, -4 and -C, you can only reach CC from D0 in odd moves. This seemed like case closed to me until I realise that if I could use all of +4, -4, -C +8, -8 and +0, the problem was gone.
Although the above paragraph makes little sense, let me try to explain. D0 and CC represent different 8 frame oscillations. If I were to be able to change between D0 and CC in exactly 4 frames, then I could save 2 pixels per 8 frames. On land, I can add or subtract 4, or subtract C from D0 once per frame. In the air, I can add or subtract 8, or keep the value the same once per frame depending on what buttons I had pressed. Normally, It would be a fair assumption that it would be impossible to be on land and in the air at the same time, so it would be fair to say that I couldn't use +4, -4, or -C along with any of +8, -8 or +0. This is of course false. If I decide to jump during the period of time where I am changing between D0 and CC, then I have the opportunity to use all of +-4, +-8, -C, and +0 within that window of time. Similarly, landing on the ground presents a similar opportunity. This would mean that I could save an entire pixel every time I jumped, much like the moonwalking technique described above.
This would logically mean that I would necessarily be jumping around as much as possible all the time. Perhaps in the future a run with this technique can be used, but for now, I enjoy the relative freedom of using a slightly outmoded version.
I must admit, I use this trick ONCE in the run: in pumpkin zone 1 near the end, it allows me to land on an odd numbered frame. However, this was just luck, and I had no real idea what had happened. I actually discovered that it could save time much later on.

The pipe glitch

If you exit a level while going down a pipe, the next time you start a level, Mario will go through the floor as if going down the pipe. Some of the time, Mario can reach some "garbage" blocks. These can be any type of blocks, and some of them can be manipulated to be exits. This can be a quick way of completing some levels.
This glitch was originally controversial, and many TASers still have it in their heads that the pipe glitch in it's entirety is an emulator bug, and not a glitch in the actual game. I assure you, the pipe glitch is very possible on a real gameboy, and the results of using the pipe glitch on the gameboy have been replicated in this movie. Later VBA versions have fixed the error that meant the pipe glitch was illegitimate. The reason that the pipe glitch was an emulator bug before was the echo RAM (E000-FDFF) was being treated as separate memory addresses to the part of RAM it was copied from (C000-DDFF). Basically what this meant before was that by default, E000-FDFF was filled entirely with 00's, which meant that when the pipe glitch was performed, Mario would encounter a wall of breakable blocks. In later versions of VBA where this bug has been fixed, Mario encounters the lower two thirds of the same level, except with no objects or enemies, and the last two lines of level are filled with garbage. Due to the layout of some levels, the pipe glitch cannot be done in those levels.

Corner boosting

Jumping so that Mario just misses the block means that you will be pushed forwards an extra pixel. However, with the pixel trick, many corner boosts cannot be done. There are three main reasons for this. The first is that because of Mario’s higher speed, sometimes he will miss the corner completely. The second reason is that sometimes, Mario will get a corner boost, but because he does, he cannot save a pixel by using the pixel trick. The third reason is that because of the limitations brought by due to the pixel trick, i.e., that you have to land and jump on even numbered frames only, that the level design sometimes prohibits Mario getting a corner boost.

Swimming

I’m assuming that this is why a lot of time was lost in previous runs of SML2. Sometimes, the top speed in water is (1,2,1,1,1,1,1,1). Sometimes it is (1,1,1,1,1,l,1,1). This is completely dependant on what frame you start accelerating in water. It is ALWAYS favourable to get the (1,2,1,1,1,1,1,1) oscillation over the other one, and sometimes frames need to be sacrificed in order to get that oscillation in water.

The bell glitch.

This is only used in space world to skip an autoscroller. Basically, if you exit a level using start/select on the same frame that you get an object, the object will activate itself on the next level. So by activating a bell on space world 1, and then entering space world 2, I activate the bell in space world 2. As soon as I die, I then start from the halfway point.

Accelerating faster

You can accelerate faster in the air compared to on land. That’s why I usually do a small jump at the start of each level. I don’t do a jump right at the start, since you can’t get running speed in the air. You need to get to a certain speed on the ground before you can jump.

Decelerating faster

Instead of just pressing the opposite direction, it’s faster to stop if you press forwards without pressing B for one frame before pressing the other direction. Pressing a direction without B will instantly slow Mario down to walking speed.

The route

The route was initially made by MUGG. I tested a number of different routes around the overworld but none of them that I found were faster. Initially I was planning to do macro zone before tree zone at the end, so I could initiate the pipe glitch in macro zone, instead of trekking back to pumpkin zone. This would have been a few hundred frames faster. Unfortunately, I found that completing the secret exit in macro zone does not count as a level completion, and you need to have a level completion in order to exit a level prematurely, which is required for the pipe glitch. This meant that the route logically came back to MUGG’s original plan.
Another "improvement" to MUGG’s route would have been to use the pipe in Mario zone in order to skip the levels in turtle zone. Unfortunately, this was slower as well.

ROM version

I use the US version of the game. This will make a lot of people happy. For some reason, Soulrivers thought that the glitch that made bosses disappear off screen quicker was exclusive to the J versionn. This is not the case. Not only that, Soulriver’s V1 and V2 synch on the US version as well as the J version.

99 kills

As soon as Mario kills 100 enemies, a starman powerup will appear. This is useful in wario’s castle when you need to quickly dispose of the weird ball things.

The score

I don’t know about you, but although I like the tune of SML2, I also like variety. The same song, or variants of it are played in every single level without fail. I think after SMB1, Nintendo decided that they would be in this for the long haul, and so they decided to conserve music, and only use one track per game.
Well, anyway, enjoy the run!

klmz: Hi, I am aderikato. I have replaced the movie with a new one 27 frames faster by the same author.

Nach: Fantastic job. Good usage of bugs in the game. Much more polished than the last TAS of this game. Accepting.

Flygon: Processing with my über dial-up powers.


TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15580
Location: 127.0.0.1
This topic is for the purpose of discussing #2728: andymac's GB Super Mario Land 2 - 6 Golden Coins in 21:43.52
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2178
Location: A little to the left of nowhere (Sweden)
Quite entertaining and a very nice improvement to the published TAS. Yes vote.
Joined: 6/4/2009
Posts: 570
Location: 33°07'41"S, 160°42'04"W
I divided this video in 3 parts on Youtube: 1: http://www.youtube.com/watch?v=Z7ZfaGreZ_4 2: http://www.youtube.com/watch?v=vWZ-2x3Lx6U 3: http://www.youtube.com/watch?v=coc496YIGRU The YES vote here is big. I love this work. edit: these videos DO NOT cover the variation suggested by MUGG below.
Editor, Expert player (2329)
Joined: 5/15/2007
Posts: 3933
Location: Germany
Well, I was really looking forward to this. Really great run and I'm glad that I could help.
Unfortunately, I found that completing the secret exit in macro zone does not count as a level completion, and you need to have a level completion in order to exit a level prematurely, which is required for the pipe glitch. This meant that the route logically came back to MUGG’s original plan.
Ah, I completely forgot about that but yeah, Macro Zone 1 can't be used for pipe-glitching...
For some reason, Soulrivers thought that the glitch that made bosses disappear off screen quicker was exclusive to the J version
Yeah, Soulrivers asked me for information when he did his run and I provided him ISM's TAS. And somehow we both ended up believing this trick was Japanese-exlusive. I really liked your retro-style pixel trick in Wario's castle. :) Here is a possible improvement: http://dehacked.2y.net/microstorage.php/info/934170463/Super%20Mario%20Land%202%20-%206%20Golden%20Coins%20%28UE%29%20%28V1.0%29%20%5B!%5D%20-%20Kopie.vbm This saves 21 frames over your first Wario battle.
Joined: 11/4/2007
Posts: 1772
Location: Australia, Victoria
Yes voted and encoding in SD... though, the above post might have put a dent in the encode. Edit: Due to post below, processing off-holded.
Experienced player (623)
Joined: 11/30/2008
Posts: 650
Location: a little city in the middle of nowhere
I won't be able to view the above movie or TAS until the saturday coming, so if all publishers could hold off processing until next week, thank you. I'm assuming that the above movie shows hitting wario beneath the chair. I tried this but I erroneously discarded it because I didn't get hurt, which is required for the next part of the battle. MUGG's post got me thinking that I could just walk straight into Wario if I wanted to.
Measure once. Cut twice.
Editor, Expert player (2329)
Joined: 5/15/2007
Posts: 3933
Location: Germany
I'm assuming that the above movie shows hitting wario beneath the chair. I tried this but I erroneously discarded it because I didn't get hurt, which is required for the next part of the battle. MUGG's post got me thinking that I could just walk straight into Wario if I wanted to.
Oh...right. Couldn't you get hit beforehand the Wario battle?
Experienced player (623)
Joined: 11/30/2008
Posts: 650
Location: a little city in the middle of nowhere
Yeah, I probably could. Anyway, I think the next (the middle part) part of the battle is based on a frame rule, wich is why I lost time there compared to Soulrivers. If that 21 frame savings is legitimate, then it could add up to more, or make the second part of the battle even worse. Anyway, I still think that 21 frames saved is more than enough to compensate for any possible losses in the second part of the battle. And yes, I could get hit before the battle, I would just have to jump into one of those spiky things that falls down.
Measure once. Cut twice.
Experienced player (623)
Joined: 11/30/2008
Posts: 650
Location: a little city in the middle of nowhere
Here is my updated input file. It should be 27 frames faster. If the movie file linked is not 78211 frames long, beat me over the head, because I've uplodaed the wrong file. Could someone (Nach or Adelikat) please change the input file for me? I'm having trouble logging on... http://dehacked.2y.net/microstorage.php/info/960723671/SMLimproved.vbm
Measure once. Cut twice.
Joined: 11/4/2007
Posts: 1772
Location: Australia, Victoria
Finally, encoding once again.
Editor, Emulator Coder, Expert player (2156)
Joined: 5/22/2007
Posts: 1134
Location: Glitchvania
andymac wrote:
Here is my updated input file. It should be 27 frames faster. If the movie file linked is not 78211 frames long, beat me over the head, because I've uplodaed the wrong file. Could someone (Nach or Adelikat) please change the input file for me? I'm having trouble logging on... http://dehacked.2y.net/microstorage.php/info/960723671/SMLimproved.vbm
The movie file linked is named SMLimproved.vbm. Are you sure it is an improvement on the appropriate submission? EDIT: Alright, I'll impersonate adelikat.
<klmz> it reminds me of that people used to keep quoting adelikat's IRC statements in the old good days <adelikat> no doubt <adelikat> klmz, they still do
Joined: 11/4/2007
Posts: 1772
Location: Australia, Victoria
klmz, it syncs correctly, it's the correct submission. It's undeniable that this is the correct input file.
Experienced player (623)
Joined: 11/30/2008
Posts: 650
Location: a little city in the middle of nowhere
klmz wrote:
andymac wrote:
Here is my updated input file. It should be 27 frames faster. If the movie file linked is not 78211 frames long, beat me over the head, because I've uplodaed the wrong file. Could someone (Nach or Adelikat) please change the input file for me? I'm having trouble logging on... http://dehacked.2y.net/microstorage.php/info/960723671/SMLimproved.vbm
The movie file linked is named SMLimproved.vbm. Are you sure it is an improvement on the appropriate submission?
anything past the info// is free to be changed. http://dehacked.2y.net/microstorage.php/info/960723671/SMLimproved.vbm http://dehacked.2y.net/microstorage.php/info/960723671/SML2.vbm http://dehacked.2y.net/microstorage.php/info/960723671/blahblah.vbm http://dehacked.2y.net/microstorage.php/info/960723671/marioland2,super.vbm http://dehacked.2y.net/microstorage.php/info/960723671/something.vbm http://dehacked.2y.net/microstorage.php/info/960723671/SMLig.vbm all link to the same file
Measure once. Cut twice.
Joined: 11/4/2007
Posts: 1772
Location: Australia, Victoria
Joined: 9/12/2009
Posts: 60
Location: None of Your Business, USA
YAYZ! a pixel trick was finally used. A YES you get. And random I am speaking.
Post subject: Movie published
TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15580
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. ---- [1564] GB Super Mario Land 2: 6 Golden Coins by andymac in 21:43.52
Joined: 5/19/2010
Posts: 259
Location: California
I'm confused about the timing. The publication says 21:43.xx, yet the last hit on Wario in the video is at 22:04.xx or so. What accounts for this discrepancy?
#3201
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2178
Location: A little to the left of nowhere (Sweden)
sameasusual wrote:
I'm confused about the timing. The publication says 21:43.xx, yet the last hit on Wario in the video is at 22:04.xx or so. What accounts for this discrepancy?
21:43.52 is the timestamp of the last button press required to beat the game.
Joined: 6/4/2009
Posts: 570
Location: 33°07'41"S, 160°42'04"W
Warepire wrote:
21:43.52 is the timestamp of the last button press required to beat the game.
Yes: Which happens at: 21:43:52 is accurate, because it's 78211 / 60 = 1303.51(6) = 21:43:51.(6) Probably something it's not at 60 frames per second. EDIT: I just remember, the video contains a logo. It adds two seconds to the total. And still doesn't explain the difference.
Experienced player (623)
Joined: 11/30/2008
Posts: 650
Location: a little city in the middle of nowhere
The gameboy runs at 59.something FPS. Plus the fact that there is an introductory sequence at the beginnisg of the encode, I am not surprised there is such a discrepancy. 21:43 is calculated assuming the GB runs at 60 FPS, which is far from true.
Measure once. Cut twice.
Joined: 6/4/2009
Posts: 570
Location: 33°07'41"S, 160°42'04"W
You're somehow right, I looked on the wikipedia and it says 59.7: http://en.wikipedia.org/wiki/Game_Boy#Technical_specifications It surprises me, I thought Game Boy and Game Gear used 60 real frames per seconds instead of weird values like the big consoles. However 59.7 still makes it wrong, as 78211 / 59.7 = 1310.07[...] = 21:50:07 This is a mistery! Post it in the VBA forum, there might be an error.
Joined: 11/4/2007
Posts: 1772
Location: Australia, Victoria
I am massively confused. I have no idea what could possibly account for the time difference. It's official, I am set out flabbergasted... the emulator dumps at 60fps, and the encode itself runs at 60fps. So unless the emulator and website calculate the movie at the wrong frame rate... or the players we are using are going at the wrong frame rate, I am stumped.
Experienced player (623)
Joined: 11/30/2008
Posts: 650
Location: a little city in the middle of nowhere
In super mario land 2, when you exit a level, there is a pause of approximately a second. This registers on the emulator and movie file as only one frame (and surprisingly no lag!), yet it renders on the encode as many. I beleive there may be other pauses as well, which register as only one frame but render as many in the encode. EDIT: not sure if this is correct, but the pause may be a result of switching a ROM bank, which requires the complete rewrite of 4000-7FFF
Measure once. Cut twice.
Joined: 11/4/2007
Posts: 1772
Location: Australia, Victoria
What the heck is causing these pauses... I wish I didn't delete my raw dump. I'll make a quickie to see if these issues exist in the raw dump, and hope it's not a deldup issue. IMPORTANT EDIT! VISUAL BOY ADVANCES DUMPING IS INDEED BROKEN! I've just tested a raw AVI myself with the frame counter dumped along... and the symptoms described exist. What, the, hell. Good thing the number 5 avatar is called punish because that's what it's set to.
Experienced player (623)
Joined: 11/30/2008
Posts: 650
Location: a little city in the middle of nowhere
The pauses are most definitely there when you play back the vbm file in VBA. After exiting a level, watch the frame count closely, and there will be a pause. EDIT: I don't think it's a dumping issue, I think it's a timing issue. Probably because during these "pauses" the traditional maning of a "frame" is useless. and it's VISUAL BOY ADVANCE not VIRTUAL BOY ADVANCES
Measure once. Cut twice.