Thank you Thomas,
I did actually use SRAM Plus to add the bonus stars to the save file before.
I'm gonna try this $009E4B NOP#3.
How do you know this is the place where bonus stars are reset?? I can't see it from the SMW ROM Map on here 0_0
Oh, because it's listed in SRAM Plus patch?
It only has one NOP there,
so, doing NOP #3 will cancel some extra lines that reset the bonus lives at game over?
EDIT:
So I have tried this $009E4B NOP#3 now: bonus stars still get reset to 0 after a game over, when the player selects "Continue". [My saves do save bonus star counts]
The thing is, when Mario game overs and you choose continue, it doesn't reload the last save point, it lets you continue from where you are while resetting all values to default like you're starting a new game there : lives at 5, score at 0, bonus stars at 0, etc.
I would like to make it so that the bonus stars aren't reset to 0 when this happens, to prevent a player getting to "continue" after uncovering levels on the overworld and resetting their bonus star counter to 0 allowing him to effectively start the time limited game at any point on the map, taking advantage of levels that have more coins in them to start from etc. (cause in my hack game ends when you are at 100 bonus stars and you get +2 bonus stars for finishing a level and +1 bonus star for losing a life)
Worst case scenario, I can add a few moons in the first levels so that the best play is still to play from the beginning and grab the moons from the early levels. But it would be much nicer to just make sure you can't reset your bonus star counter by doing game over > continue after uncovering however many levels on the map.
Can you help me ? 0_0
I think I may have a alternate solution actually, I have this patch made by Technius which I will use and have tested before (it works) :
Codeheader : lorom ; > Are these even necessary anymore?
org $00F60A ; \ Hijack
autoclean JML DeathHijack ; /
freecode
DeathHijack: PHX ; > Preserve X
LDX $0DB3 ; \
LDA $0F48,x ; | Increase the current player's bonus stars
INC A ; |
STA $0F48,x ; /
CMP #$64 ; \ If greater than #100, branch
BCS HasBonusStars ; /
LDA #$09 ; \
STA $1DFB ; | Change music
LDA #$FF ; |
STA $0DDA ; /
PLX ; > Pull X
JML $00F614 ; Continue the death
HasBonusStars: LDX $95 ; \
LDA $5B ; |
LSR ; |
BCC + ; | Teleport
LDX $97 ; |
+ STZ $19B8,x ; |
LDA #$06 ; |
STA $71 ; /
STZ $19 ; > Remove power-up
PLX ; \ Pull X and return
RTL ; /
This causes a bonus star to be added on death, and teleports to level 0 which player gets stuck in for end of game if bonus stars are 100 or more. If I'll just add an extra branch condition in there to check for 0 lives, I can make it go to teleport to level 0 as well and this would end the game for the player (they can't get out to hit a game over > continue and keep playing a resetted game from whatever overworld status, and even get to save game after that :/). If needed, I could make it add one life if for some reason it causes a game over before teleporting to level 0. Sounds reasonable no?
I made the hacks
Tsunami Island and
Super Mario Archipelago
Check them out !