Lord of the Rings R8JPWR Hacking help

Started by Patedj, June 09, 2011, 05:08:36 AM

Previous topic - Next topic

Patedj

While I was adjusting the y axis I found this
Avatars become invisible and can walk through walls
2861F69A F3FF0C00
04404480 60000000
CC000000 00000000
04404480 D0030044
E0000000 80008000
(AB to activate on/off condition)
You can pm me, I've got time for your troubles.

Patedj

#16
I was successfull in finding a discriminator for attack!!

address:800F4674
lis r14, 0x8154
ori r14, r14, 0x8AC4
cmpw r31,r14
bne- _NOHERO
fsubs f30,f31,f1
b _END
_NOHERO:
fadds f30,f31,f1
_END:
nop

which means that each time they attack the hero, it replenishes the hero and not the contrary! EXCELLENT!

[spoiler]C20F4674 00000005
3DC08154 61CE8AC4
7C1F7000 4082000C
EFDF0828 48000008
EFDF082A 60000000
60000000 00000000[/spoiler]

I'm going to have to do a slight adjustment. Healing properties (food) decreases hp.

So perhaps a button activator!
2861F69A FCFF0200
C20F4674 00000005
3DC08154 61CE8AC4
7C1F7000 4082000C
EFDF0828 48000008
EFDF082A 60000000
60000000 00000000
CC000000 00000000
040F4674 EFDF082A
E0000000 80008000
YAY if you press 2 it unlocks the code!
You can pm me, I've got time for your troubles.

Patedj

#17
Edit1:I've noticed that Each hero avatar has it's own address and at different parts of the story.
Hook address:800F4674
lis r11,0x8154
ori r11,r11,0x8AC4 #load frodos 1st address
cmpw r31,r11 #compare frodo
beq-  _REPLENISH
b _ARAGORN

_ARAGORN:
lis r11, 0x8155
ori r11,r11,0x9DC8 #load aragorn's address
cmpw r31,r11 #compare aragorn
beq-  _REPLENISH
b _FRODO2

_FRODO2:
lis r11, 0x814E
ori r11,r11,0x88C4 #load aragorn's address
cmpw r31,r11 #compare aragorn
beq-  _REPLENISH
b _ENEMY
_REPLENISH:
fsubs f30,f31,f1 #enemies replenish
b _END

_ENEMY:
fadds f30,f31,f1 #heros damage
_END:
nop

Function:
[spoiler]800F462C:  9421FFC0   stwu   r1,-64(r1)
800F4630:  7C0802A6   mflr   r0
800F4634:  FC400A10   fabs   f2,f1
800F4638:  C00296A8   lfs   f0,-26968(r2)
800F463C:  90010044   stw   r0,68(r1)
800F4640:  DBE10030   stfd   f31,48(r1)
800F4644:  FC020040   fcmpo   cr0,f2,f0
800F4648:  F3E10038   psq_st   f31,56(r1),0,0
800F464C:  DBC10020   stfd   f30,32(r1)
800F4650:  F3C10028   psq_st   f30,40(r1),0,0
800F4654:  93E1001C   stw   r31,28(r1)
800F4658:  7C7F1B78   mr   r31,r3
800F465C:  4080000C   bge-   0x800f4668
800F4660:  C0229690   lfs   f1,-26992(r2)
800F4664:  48000084   b   0x800f46e8
800F4668:  81830000   lwz   r12,0(r3)
800F466C:  C3E30008   lfs   f31,8(r3)
800F4670:  818C0014   lwz   r12,20(r12)
800F4674:  EFDF082A   fadds   f30,f31,f1This is where I'm hooking at
800F4678:  7D8903A6   mtctr   r12
800F467C:  4E800421   bctrl   
800F4680:  5463043E   rlwinm   r3,r3,0,16,31
800F4684:  3C004330   lis   r0,17200
800F4688:  90010008   stw   r0,8(r1)
800F468C:  C84296A0   lfd   f2,-26976(r2)
800F4690:  9061000C   stw   r3,12(r1)
800F4694:  881F000D   lbz   r0,13(r31)
800F4698:  C8010008   lfd   f0,8(r1)
800F469C:  C0229690   lfs   f1,-26992(r2)
800F46A0:  2C000000   cmpwi   r0,0
800F46A4:  EC001028   fsubs   f0,f0,f2
800F46A8:  EC40F028   fsubs   f2,f0,f30
800F46AC:  FC0207AE   fsel   f0,f2,f30,f0
800F46B0:  EC400828   fsubs   f2,f0,f1
800F46B4:  FC02082E   fsel   f0,f2,f0,f1
800F46B8:  D01F0008   stfs   f0,8(r31)
800F46BC:  41820024   beq-   0x800f46e0
800F46C0:  FC000018   frsp   f0,f0
800F46C4:  FC000840   fcmpo   cr0,f0,f1
800F46C8:  4C401382   cror   2,0,2
800F46CC:  40820014   bne-   0x800f46e0
800F46D0:  C002968C   lfs   f0,-26996(r2)
800F46D4:  FC20F850   fneg   f1,f31
800F46D8:  D01F0008   stfs   f0,8(r31)this is where it writes
800F46DC:  4800000C   b   0x800f46e8
800F46E0:  C01F0008   lfs   f0,8(r31)
800F46E4:  EC20F828   fsubs   f1,f0,f31
800F46E8:  80010044   lwz   r0,68(r1)
800F46EC:  E3E10038   psq_l   f31,56(r1),0,0
800F46F0:  CBE10030   lfd   f31,48(r1)
800F46F4:  E3C10028   psq_l   f30,40(r1),0,0
800F46F8:  CBC10020   lfd   f30,32(r1)
800F46FC:  83E1001C   lwz   r31,28(r1)
800F4700:  7C0803A6   mtlr   r0
800F4704:  38210040   addi   r1,r1,64
800F4708:  4E800020   blr   
[/spoiler]
You can pm me, I've got time for your troubles.

dcx2

#18
Congrats, you found one of the very few hooks where r12 is not safe.

800F4668:  81830000   lwz   r12,0(r3)
800F466C:  C3E30008   lfs   f31,8(r3)
800F4670:  818C0014   lwz   r12,20(r12)
800F4674:  EFDF082A   fadds   f30,f31,f1This is where I'm hooking at
800F4678:  7D8903A6   mtctr   r12
800F467C:  4E800421   bctrl   

r12 is most definitely not safe in regions like this. (load r12/mtctr r12/bctrl) You can find a different hook, or use registers other than r12.  r11-r5 are probably safe; prefer larger registers, so use r11 and then r10.

Specify addresses in hex.  Frodo's address is in decimal and that hurts the eyes. 

You can use just r11.  Load Frodo into r11, cmpwi, beq- _HERO.  After the beq-, you know that you aren't testing Frodo, so load Aragorn into r11, cmpwi, beq- _HERO.  After that beq-, you must be an _ENEMY.

Anarion

#19
i remember when i tried doing the same thing. like you, i just found an address that placed frodo gamgee way high in the sky. he'd then just drop down, sometimes out of bounds. so i gave up further attempt. btw. great work on the invisibility code!! i hope you don't mind me using it. i can now try to enjoy exploring middle earth without seeing all of the little things that annoyed me about it like those two kids that follow you everywhere and begin dancing when you stop moving :)
I'm not here much. If you have a problem with any of my codes, let me know through my youtube account and I'll help you.
¦}

Patedj

I love the fact that you are using the codes! I'll work more on the jump asm. Did you find the prairie beside Gamgee's place? It's quite nice! If you are looking at the map, it's the top left corner.
You can pm me, I've got time for your troubles.

Anarion

good luck with the moon jump. i may actually try giving this game another chance now, perhaps create some different hacks for it or simply just enjoy it. its amazing what some hacks allow the player to do. that little prairie near bag end is quite nice. sad how without these hacks, little nice places like that can't ever be seen. btw, did you go further northeast? i was surprised to find sam alone in a house!
I'm not here much. If you have a problem with any of my codes, let me know through my youtube account and I'll help you.
¦}

Patedj

You can pm me, I've got time for your troubles.

Patedj

hehe, neat! An open house used for camera purposes. Don't move him though, he stays moved hehe. *Sits in the air.
You can pm me, I've got time for your troubles.