This video features about half an hour of a guy doing nothing but walking up and down stairs in Final Fantasy for the NES. Donât say I didnât warn you.
Speedrunner gyre_, who set a new âany%â world record on Sunday by âcompletingâ Final Fantasy in 59 minutes and 10 seconds, used a save-corrupting glitch to make his game think that A) heâd already gotten all four orbs of light; and B) his characters were over level 99, therefore leading enemies to run away. To do this, he entered specific commands as his character names and then overloaded the gameâs memoryâby walking up and down stairsâuntil wonky things started happening.
âThis glitch has been known about for a while,â he says, âbut people didnât understand how to take advantage of it until quite recently.â
You can watch the whole video here (skip to 27:38 if you donât want to watch stairs):
https://player.twitch.tv/?parent=kotaku.com&video=6120792
So whatâs with all the stairs? Allow gyre_ to explain:
Your party names are stored in somescratch memory when you enter them on the character select screen. As long as you soft reset, itâll still be there when you start up another game. What I did was a stack smash attack where by walking up and down the stairs 70 times it would start executing code nearby that scratched memory. I had to pick a couple things correctly, like my character classes and so on, for it to actually reach my character names, but itâll execute my second characterâs name.
When you saw me enter two codes what I was actually doing was jumping from the second character to the fourth character to get a couple more bytes of space, since I only have four bytes of executable code in these character names. You really canât do much, youâre extremely limited in CPU instructions cause thereâs only a handful of characters. And then thereâs all these instructions, which take two or three or four bytes to encode. So that becomes an issueâhow do you actually input those in the game. A lot of itâs trying to chain to other parts of memory where you actually can do useful things by taking advantage of code thatâs sitting around.
In other words: magic.
You can reach the author of this post at [email protected] or on Twitter at @jasonschreier