Super Mario Bros 3 Speedrun 2 Seconds

Super Mario Bros. 3 was officially conquered in two seconds during the Summer Games Done Quick event. Seriously. The GIF above, by way of Kotaku, is the entire speedrun.

You might be familiar with standard speedruns, but then there are the TAS ones. Those are tool-assisted speedruns, and they make use of special coding to take advantage of glitches in rapid succession.

Speedrunner ais523 discovered a glitch that requires players to rapidly pressing buttons in order to, very basically, freak the game out in such a way that it displays the win screen. ais523 described the whole thing on Reddit.

if you're reading the controller repeatedly until you get two values the same (in order to work around the DPCM/controller conflict), then if the controller reads a different output each time (because you're mashing the controller really fast), it's going to get stuck in a loop, potentially allowing for the code that handles the start of a frame running recursively. If the game isn't designed to expect that to happen (and if the code in question isn't really laggy, why would it?), bad things happen, and it was a case of finding a game in which the bad things in question would happen to let us win instantly.

total_ did a lot of work in getting the glitch in question to work on SMB3; I had no idea which games it would work in, and was happy to see it working in such a well-known game. I'm not that clear on the details of how it works in the exact case of SMB3, except that the game somehow naturally starts running the controller ports, so you can hold a combination of inputs that (when interpreted as code) jump to the credits.

ais523 even admits some level of confusion regarding how, exactly, it works.

The run itself was done by TASBot, a literal R.O.B. robot made by dwangoAC to run these scripts. The whole thing is amazing, really.

How long until a TAS beats 2 seconds to clear Super Mario Bros. 3?