About ASM HP Coding

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

Previous topic - Next topic

Apache81

Ok guys, I need some help: I want to make an ASM code for infinite HP but if I make it also the enemy will be immortal.
I just told to Romaap by PM and he says that I need to check if the HP value is from the player and not from enemy.
Could someone be so kind to explain me how to do? I mean I need an idea in how to make such control because I tried to make the cheat with pointers but it seems that in some cases (and I really cannot figured what and why) some people couldn't make it works (for me works perfectly).

THANKS guys !!!   :)


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

Panda On Smack

Set a breakpoint on the asm that handles health (the asm you have hijacked) and look at the other registers when you get hit and when an enemy does, hopefully it might have a 0 / 1 scenario where 1 of the other egisters changes based on who is hit so you cna use that as a basis as to whether the damage occurs

Apache81

#2
Thanks man... I'll give it a try and let you know if I was able to do it !!!   ;)

Post Merge: November 21, 2009, 10:34:25 PM

It seems to be more difficult as it sounds !!!   :(


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

Apache81

I was not able to find a flag that could make a difference between the entity that calls the HP function so my enemyes are always invincible.
Is there any other try I can make?


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

Panda On Smack

Can you screengrab a breakpoint of the register when you get hit and when your enemy gets hit please?

Apache81

Sure, here they are !!!
Sorry for the dimensions and the quality but the upload limit is really low... I hope you can read them.

Thanks for your efforts !!!  :)









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

Panda On Smack

#6
Thanks, bit hard to read

Can you use imageshack? A little slow but does the job

http://imageshack.us/


After squinting I noticed r31 is different. Can you test that please? Is it 0 for you being hit but always has a value for an enemey?

Apache81

#7
Wow !!!  I'm really blind !!!

I'll check this when I'll return from work this evening and let you know.

THANKS AGAIN !!!   :)

Post Merge: November 26, 2009, 06:57:42 PM

Well it seems that the r31 register is zero only if the function was called by the player so here we are.

My question now is how can I make in assembler something like:
if (r31 != 0) {
   ... do something to replenish health
} // if

I need to say that I'm able to write the "... do something to replenish health" but I'm a bit confusing in how to translate the if statement.
I tried
   cmpwi r31,0
   bne return
   ...the something to replenish health

return:
   blr

but it doesn't seems to work.


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

Almas

Make sure you write the command you are replacing when you perform the branch, and that said command executes regardless of how the ASM insert branches out. Provided it's not the command you're trying to change in the first place.

It's sufficient to find the command that writes your "new" health to a RAM location (stw (newhealth, healthlocation)). Branch over the top of that.

cmpwi r31,0
bne +0x8
stw (newhealth, healthlocation)

Then, if it would be writing to the player's health, it won't write at all. If it's writing to a bad guy's health, it will.

I can't see what your screenshot says too well, but it looks like your code should be:

C2041864 00000002
2C1F0000 40820008
907E0008 00000000

Apache81

That is too simple that I was not able to think it by myself !!!   :P
Thanks man !!!!   :)


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

goemon_guy

I've tried to follow this thread to make an ASM Infinite HP code, but it just wont work. Any suggestions?
-Currently hacking the following game(s):
...
Request a code via PM, if you wish.

Apache81

You need to pay attention to all the value you will get in the breakpoint ASM window when the instruction called to decrement the health is called; for sure you will find a value that change if you hit an enemy or an enemy hit you.
It's only matter of patience.
Think that is not only a matter of zero or 1 value they must be also 2 different values or memory regions to check.


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

goemon_guy

#12
hmm, I'll give it another try. If I can't find it, would someone be able to help me if I shared the registers?

I found the changing register, it's r25.
-Currently hacking the following game(s):
...
Request a code via PM, if you wish.

Apache81

Yeha, I could take a look but you need to post me the screenshots as I do: 2 screenshots for the enemy hitting the player (rxx and fxx values) and 2 screenshots for the player hitting the enemy (rxx and fxx values).


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

goemon_guy

#14
Hitting Me:




Them hitting me:


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