Many games offer ways to program new code that allows players to skip to the credits. It’s a complicated process that’s allowed people to leap to the end of Super Mario World and skip over most of Castlevania: Symphony of the Night. So why not jump right to the end of The Legend of Zelda?
Arbitrary code execution allows players to take in game actions to overwrite bits of memory to achieve devious ends. Long time glitch hunter Sockfolder discovered a complex way of leaping right to Zelda and the end of the game in the 1.1 Famicom release. (Sorry, NES owners.) A new video from MagicScrumpy explains the glitch in great detail.
A major factor in the glitch is taking advantage of how The Legend of Zelda loads sprites. The game usually only allows 11 sprites on screen but an oversight with the magic flute item allows the game to hold one more. The game scrambles to find a valid place to load the sprite in memory and this causes the player to jump right to the end of the game.
It’s a lot more complicated than just loading a bunch of sprites and using the flute though. A host of conditions must be met including a specific heart count and even waiting until the game’s music has reached a certain point. Unique file names must also be used to write certain values in the game’s code. Only then will using the flute skip you to the end. It’s incredibly impressive stuff and I highly recommend watching the video for the full breakdown.