It has been a full two-and-a-half years now since we first saw the game-playing TASBot (short for tool-assisted speedrun robot) take full control of a Super Mario World cartridge. In that time, you would think we would have gotten tired of seeing the machine mangle classic games using nothing but data sent through the controller ports on actual gaming hardware.
Then last week’s Summer Games Done Quick speedrunning marathon came along, and on Saturday, TASBot showed off its newfound ability to beat Super Mario Bros. 3 in less than a second (the marathon run had some padding, so it’s actually visible to the audience). Our jaws were on the floor once again. There must be some sort of trick. How in the world is this possible?
Exploiting a decades-old hardware bug
TASBot’s newest bit of game-breaking magic relies on the vagaries of the NES’ DPCM (differential pulse code modulation) sound channel. This one-bit data stream was used to play extremely basic audio samples in select games, including Super Mario Bros. 3.
As it turns out, the NES hardware itself has a small bug, such that reading sound data from this channel results in the CPU sometimes making an extra “read” request from one of the controller inputs. Uncorrected, this hardware vagary would lead to a lot of “phantom inputs,” where a button press would register when none had occurred.
For Super Mario Bros. 3, the developers accounted for this problem by simply polling the controller input multiple times per frame, until the system sees the same input twice in a row. At that point, it figures the repeated input is a “true input” rather than a phantom from the DPCM glitch and passes that along as the real button being pressed for that frame.
All TASBot has to do, then, is ensure that the game never sees the same input twice in a row when polling the controller within a frame. If that happens, the game will go into an idle loop, constantly polling for input until it sees a non-maskable interrupt call asking for the next frame. At that point, an issue with the game’s screen-splitting raster interrupt causes it to start reading instructions from the very beginning of the RAM.




Loading comments...