⬆️ ⬇️

How to get Super Mario Bros. 3 in less than a second?





Speedran - a way to quickly pass games. Usually this does not use normal cheats or codes. But it is allowed to use glitches of games like the ability to get out of the main screen and go over all levels. Adherents of this way of passing games sometimes show amazing results. For example, Doom 2 some craftsmen pass in a couple of tens of minutes.



The special love of speedrunners is for Super Mario. A person can go Super Mario for an 8-bit console in about 6 minutes. Two years ago, a new direction appeared - speedran with a robot. Here, the secrets of the game are almost not used, it is about passing through all levels with a special computer system. She does not press the buttons, but connects directly to the port of the game controller. The other day such a system set a new record for passing the game - all levels managed to be completed in less than a second.



What is the secret of the robot? The new system operates a differential pulse-code modulation NES. A one-bit data stream is used to play elementary audio samples from some games, including Super Mario Bros. 3

')





As it turned out, there is a small bug in the NES hardware, which leads to the fact that reading the data of such a channel leads to the fact that the CPU sometimes performs an additional read operation from one of the data input channels (controllers). The result - clicking on the button is registered, although there was no pressing. In the current game, the developers forced their system to interrogate the controller's data entry channel several times per game frame.



The robot needs to make sure that the game does not register two identical keystrokes per frame. Otherwise, the game falls out into an infinite loop, constantly tracking the input data channel until it receives a loop interruption request for the next frame. In this case, the system will start reading instructions from the very beginning of the memory.



After a few frames, the game moves to the area of ​​memory where data is saved by pressing the buttons of the controller. The speedrunner enters the transition code to the final game screensaver in this area. And all this in less than a second.



The system in question, called micro500. She is able to emulate pressing the controller button at a speed of 7984 operations per second. It is clear that man is not capable of this. So far, this is only about using micro500 for Super Mario Bros. 3. Another game, for example, Zelda II: the Adventures of Link already contains instructions in the code for exiting the loop.







The most interesting thing is that this record is official. The creators of a computer system that uses a bug in the hardware of the console do not directly modify the memory of the console. All that they do is exploit the hardware feature, which allows to execute third-party code. And they do all this using only the controller - or rather, its hardware emulation in the form of a system of its own design. True, the speedrunners community is divided. Some believe that everything is correct. The latter, in general, agree with this, but argue that this is not interesting, since a computer system of this type spoils all the pleasure.

Source: https://habr.com/ru/post/372483/



All Articles