I found this code by tracing the invincible address to when samus get hit. so i nop it, and sure enough, one hit to get started and the inv stayed........until i need to destroy something, but couldn't. so then i had to see if there were "conditions" to tell the game that the reference point was samus, i did find that x24 was always 0x68. so, using that as a reference point. i got the game to separate samus from said thing that needed to be destroy in order to proceed. eventually i took over a load invincible state timer for everything, from there i ran the check to see if it was samus, if so, then load a specific value, if not, load the original coded value. once i ran into the high-temp area without the varia suit, i looked into the HP problem. the high-temp area was bypassing the inv state. fortunately, having made static codes for the base version of the game. i knew hp was extremely close to the inv, so i restructured the code into
Code:
check for samus
if no, goto orginial code
jump to inf health
return health - jump to inv
:orginal code - load coded value
return to "the address that called" +4
:inf health
load max
str max -> cur
go back to return health
:inv
load specific value
return to "the address that called" +4
this way if you wanted to disable something, it was easily. especially since some bosses it is required to not have inv state.
i also took the time to explain this so others have more of an understand to why asm codes take so much time. yes, pointer codes (when they work) are much detail specific, but asm codes (when formatted properly) will work everytime. but good asm codes are becoming hard to find, well................for several reasons, and i will leave it at that.