@MrCheeze
  @MrCheeze
MrCheeze | Unlocking Super Mario Bros world select and a glitch world, using Legend of Zelda! @MrCheeze | Uploaded August 2023 | Updated October 2024, 3 days ago.
There's a famous trick on the NES where you can access glitch worlds in SMB1 by booting up Mario, quickly swapping cartridges to NES Tennis and playing for a few seconds, and then swapping back to Mario again. The reason this works is explained in this excellent Retro Game Mechanics Explained video: youtube.com/watch?v=hrFHNgJlJSg

In short, SMB1 checks certain memory locations on startup. If it sees certain values that are normally present during SMB1 gameplay ($07D7-$07DC all less than 0A, and $07FF=A5), then it assumes that you just pressed the reset button (or got a game over/beat the game), instead of cold booting. If so, it then looks at two other memory addresses, and unlocks certain features based on their values:
- If $07FC is nonzero then world select is unlocked (PUSH BUTTON B TO SELECT A WORLD). This is normally set on completing the game, and lets you choose from worlds 1-8.
- If you press A+Start instead of just Start on the title screen, you will continue from whatever world number is stored in $07FD. This is normally stored on getting a game over.
So, the reason why Tennis works is that it doesn't modify any of the precondition addresses, but DOES write to the "continue world" address at $07FD.

An open question, then, is: Are there any games on the NES that can be used to set the SMB1 world select flag? And are there any besides Tennis that can be used to store glitched worlds into the Continue World address? I searched the NES library for such games, and it turns out the answer to both questions is yes! Not only that, the game I found that can do it is one of the most famous: NES Legend of Zelda!

It seems surprising that this would stay undiscovered for decades, but there's a good reason. LoZ needs to be in a specific state in order to trigger anything in SMB1. You need to have visited certain rooms in level 8, but AVOIDED some other rooms in level 7 and 8, in order to meet the memory conditions described above. For details, see this diagram:
https://i.imgur.com/4tpDBhe.png

On the bright side, it only takes a couple minutes from a fresh file to visit those rooms. Not only that, the fact that you have visited them saves to the cartridge. Which means that after doing the one-time setup, it only takes a few seconds to boot SMB1, swap to LoZ and load your save file, then swap back to SMB1 and make use of the world select or glitched continue world number.

In this video, I demonstrate the full process - setting up the LoZ save file, and then what it can do in Mario:

0:00 - The first step is to acquire the Candle, which is needed to enter Level 8. This needs 60 rupees, which can be found at the northeast corner of the map.
2:54 - Entering the first room of Level 8, sets $07FD to 0x20. This corresponds in SMB1 to setting the continue world to "World X".
3:00 - Entering the room to the left, sets $07FC to 0x20. This corresponds in SMB1 to enabling the world select flag. Then, I save the game in order to permanently store these two RAM values to the cartridge save file.

If you like, the previous setup only needs to be done once. The following steps can then be repeated whenever you want.

3:11 - Start by loading SMB1. The sole purpose of doing this is to set $07FF to 0xA5, which is a value it will look for when we swap back to it later.
3:17 - Cartridge swap to Legend of Zelda. Note that LoZ does not use or initialize memory address $07FF at all, so the value is retained. Then, I load the file that was set up earlier, to put the saved room visitation flags into $07FC and $07FD.
3:27 - Stop 'n' swop back to Mario. We can now do one of two things: Either push button B to choose one of worlds 1-8 to start in, or press a+start to start in glitch World X (this is the only glitch world that Zelda can unlock, at least without ACE).
3:34 - Let's explore World X! As it turns out, this world is a clone of 8-4, except it functions as just one long room. (The pipes don't lead anywhere, but the "loopbacks" that normally prevent you from just walking straight forward to Bowser don't exist either.)
5:00 - Grab the axe to beat the game, well sorta. A princess does appear in this glitch level, and reaching her does set the "game complete" flag and return you to the title screen... nevertheless, she is very clear in saying that our princess is actually in another castle. Your speculations are as good as mine as to what this means.

To me, the reason why this is so cool is not so much the ability to start in world 1-8 and a single glitch world. Rather, it's the fact that two of the biggest titles on the NES happen to interact perfectly with each other for this to work, and - unlike the interaction between Tennis and SMB1 - this interaction was never discovered before.



Supplementary material for nerds:
pastebin.com/bFeZEKeY
github.com/MrCheeze/BizHawk/commit/e9d6f8d692a30e5c13bcfd7fc73a976193efa148
Unlocking Super Mario Bros world select and a glitch world, using Legend of Zelda!MEGALOVANIA - All Versions Layered (Earthbound, Homestuck, Undertale)Ocarina of Time Better NSR Idea - Get every item/upgrade from a rockOcarina of Time - Age Change SRM without Goron BraceletOcarina of Time - Credits Warp ACE ideaOcarina of Time - turn master sword into light arrows SRMOcarina of Time - Grotto SRM[S] Collide - Single Character Edits - The Jack-Off (Homestuck)Hiveswap Prerelease OST - STRIFE! x3OoT - Grotto SRM setup for stealing the horseBeatdown ULTRA DX (Round 1+2+DX) - Homestuck Vol. 3/3/10Paper Mario - Undocumented Koopa Koot Give Up feature

Unlocking Super Mario Bros world select and a glitch world, using Legend of Zelda! @MrCheeze

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER