About ASM HP Coding

Started by Apache81, November 21, 2009, 07:24:24 PM

Previous topic - Next topic

Apache81

#15
For example the r0 register is different and you can try to check if the player has always that value to zero so if that value is different from zero you don't have to change the ASM code for infinite health.

[EDITED]
As I said nothig: the r0 register is the value to store in memory so it's not your target.


However, the r29 register has something strange: if you hit an enemy it has the same value of the r0 one that's to say the value to store.
I noticed also something strange: when they hit you tha ASM saved the value zero in the memory (ro = 00000000)... are you dead after that blow? However if you're the player the r29 register has not the same value of r0 but it could be because of the last blow.

Another thing: are you sure to have get the screenshot without having no codes applied?


All my codes are made to work with Gecko, Coverfloader and WiiFlow... not sure about others !!!

goemon_guy

I am 99% sure that I didnt have any codes applied.
-Currently hacking the following game(s):
...
Request a code via PM, if you wish.

Almas

Can you print the lines of code above the ones displayed? That is stw r0, 108(r3)?

I don't know what game this is but.

Try going to various different stages and letting enemies hit you. Check if the value of r3 is constant - that is, 80A72B88. If it is a single-player game, it is possible that the place where the player's HP is stored is a constant, and so you can check if it is writing to the player's HP location or "not the player's hp location".

goemon_guy

Quote from: Almas on December 12, 2009, 11:35:18 PM
Can you print the lines of code above the ones displayed? That is stw r0, 108(r3)?

I don't know what game this is but.

Try going to various different stages and letting enemies hit you. Check if the value of r3 is constant - that is, 80A72B88. If it is a single-player game, it is possible that the place where the player's HP is stored is a constant, and so you can check if it is writing to the player's HP location or "not the player's hp location".

Do you mean the ASM instructions above stw r0,108(r3)?

The game is Pokemon Rumble.
-Currently hacking the following game(s):
...
Request a code via PM, if you wish.

Almas

No, the game name isn't relevant. Well, whatever.

Somewhere on this site there's a guide to performing a primitive pointer search. Find it.

Use it to find the pointer which points to your character or pokeman'z hp or whatever using the simple (tedious) method shown. Then construct a branch over the top of the stw r0,108(r3) command. It will have roughly the form:

lis r18, 0x8034
ori r18, r18, 0x5464 // Load the pointer address
lwz r18, 0(r18) // Follow the pointer tree once
addi r18, r18, 0x320 // Set r18 to where hp is stored -108 (in dec, which is something like -0xBC in hex)
cmpw r3, r18 // Check to see if the HP update would be done to "your" health
beq +0x8 // If it is, skip the next command
stw r0, 108(r3) // Save the HP update

I use r18 as a free register because it is empty, which implies that it is most probably free (but this is not necessarily the case). It would be safer to follow the blr and see if there are any obvious safe registers.

I hope you understand this.