This is unrelated to anything you had planned, but I made a little hack that addresses a common complaint about Zelda II - Losing all your exp when you get game over. This hack will keep your current exp if you game over, and you choose the "continue" option. However, if you choose the "save" option, it will wipe any exp you may have. Works similar to the restart in palace hack.
Info you'll want to know beforehand:
1. In RAM, the player's current exp is at $775 and $776.
2. In RAM, the gained exp counter is at $755 and $756. Gained exp is loaded here first, then added to your current exp.
3. In RAM, the position of the cursor in the game over screen is at $488. 00 is positioned on "continue" and 01 is positioned on "save".
4. The game wipes your exp at 2 different times. Exact moment of game over, and when you choose "continue" in the game over screen.With that knowledge, here is the hack:
At 0x1CA6D you have the following data:
A9 00 8D 75 07 8D 76 07
This bit of data wipes your current exp the exact moment you get a game over. It loads the immediate value of 00 into the high and low byte for current exp, thus reducing it to zero. So our first step is to change this. Let's change it so it loads that 00 into the gained exp counter instead. So change the code to:
A9 00 8D 55 07 8D 56 07
Next, let's go to address 0x1CAC7 to find the following data:
AD 88 04 F0 08 A9 40 8D B0 07 4C 05 CF 8D 75 07 8D 76 07 8D 56 07 8D 55 07
The first 5 bytes is checking RAM address $488 - the position of the cursor in the game over screen. If it's equal to 0, it branches to the code in bold
at 0x1CAD3, which is the code to wipe exp when choosing the "continue" option. If it's not equal, it goes to the underlined
code at 0x1CACC, which is for choosing the "save" option.
So what we wanna do is change how far it branches if the cursor position is on the "continue" option. At 0x1CACB you'll find 08. If the cursor is on "continue", it will branch ahead 08 bytes, skipping over the length of the underlined code. Change this value to 14.
At 0x1CAC7 paste the following code:
AD 88 04 F0 14 A9 00 8D 75 07 8D 76 07 EA EA EA EA A9 40 8D B0 07 4C 05 CF
With this, it branches ahead 14 bytes, to the data in bold CF. The data after this is related to how "continue" option works, but it's not relevant now. The new underlined code will now wipe your exp when you choose the "save" option. And selecting "continue" won't wipe it anymore.
Anyway, that's it. Feel free to use this, or anyone else who is interested.
February 07, 2019, 05:31:10 am - (Auto Merged - Double Posts are not allowed before 7 days.)
As an extension to that hack,
here is an another way to do it.
This way works the same, but in addition, when you get a game over and choose the "continue" option, you will always start on the screen you died on - be it on the world map, caves, towns, dungeons.
I know you have the "restart in palace" hack, but this could be an alternative to that, being able to continue on the screen you died on. (even boss rooms!) Plus, you wouldn't have to go all the way back to Zelda's Palace if you died in a cave somewhere.
At 0x1CA6D paste the following code: (this is explained above)
A9 00 8D 55 07 8D 56 07
Next, at 0x1CAC7 paste the following code:
AD 88 04 F0 10 A9 00 8D 75 07 8D 76 07 A9 40 8D B0 07 4C 05 CF A9 03 8D 00 07 20 30 CF C9 0F F0 07 A9 06 A0 01 4C F0 CA 20 58 C3 EA EA A9 00
This difference here is the code in bold. Your current exp is still saved, but now when you choose "continue" it will set your lives to 03 (with A9 03 8D 00 07), without resetting your location. Resetting lives was needed, because without it, your lives would just keep counting down to 0, then to FF and so on.
With A9 06 (the part that is underlined), it prevents the game state from resetting your location. I'm not sure on how to explain this part, ha ha. You'll basically remain where you are in the world without it sending you back to Zelda's Palace.
I tested all this up though palace 1, and it worked fine. More thorough testing could be done, but I believe it works with no issues.Video:https://youtu.be/-eYl_p-g_Uc