Family Basic cart-swap arbitrary code execution (Famicom (NES) games)
Posted by: Torchickens
Date: 2019-06-06 10:50:56
https://legendsoflocalization.com/super-mario-bros/misc/
Basically for Famicom owners, this could be a free GameShark.
Fans quickly discovered another way to do this 256 Worlds trick: use Family BASIC to alter memory addresses directly. The trick for this was:
Connect the Famicom and the Famicom BASIC
Insert the backup cartridge and turn the power on
Bring up the menu screen using the keyboard, then press 1 on the keyboard to start BASIC
Enter the code written below
Press F8 to run the program
Where it says WORLD=?, type the number of the world you want to play and hit Return
Once it says OK on the screen, eject the backup cartridge with the system still on
Insert the Super Mario Bros. cartridge
Reset the game
Use the continue code at the title screen hold A and press Start
Youre now at the world you selected!
The BASIC code is this:
10 FOR I=&H7D3 TO &H7DC:POKE I,0:NEXT
20 POKE &H7FF,&HA5
30 INPUT "WORLD=";A
40 POKE &H7FD,A+255AND255"
Thoughts?