I know r4 is what's being stored and I know 0x008A (r3) is where the value is being stored, that is, the current HP address.
I believe this assembler code would accomplish what I want:
li r4, 0
sth r4, 0x008A (r3)
My goal is to make r4 0 to set the HP value to 0 in order to make a one-hit kill code.
Using ASMWiiRD, I get the following code:
I'm also under the assumption the code handler makes a branch to this function and sets a nop and a blr at the end, allowing the function to be passed back to the game.
Problem is this prevents the game from starting. Dolphin says IntCPU = 00000000 at PC = 800018a8 last_PC = 812fffc8 LR = 80002ffc, with several similar areas incrementing the PC addresses after this. I know a one-hit kill code exists already, but I wanted to do something easy to get started with this type of coding. What am I doing wrong and how would I go about doing what I need to do? I already tried placing a blr into the assembler to see if that'd help (if the code handler didn't do it automatically as expected, but that didn't fix anything).