I am trying to get it to write specific value, but seems to be random. When code is applyed I would like to have it write and stick I will have to do this probally a few more times as it has several spots nthis instruction could be used.
C2032B60 00000002
38000063 90030054
60000000 00000000
li r0,99
stw r0,84(r3)
nop
[spoiler=BP instruction]
CR:44000084 XER:20000000 CTR:80028BAC DSIS:02400000
DAR:804A807C SRR0:80032B74 SRR1:0000B032 LR:80028C80
r0:00000003 r1:801B95B8 r2:801AF9E0 r3:804A8028
r4:804ABF4C r5:00000002 r6:00000005 r7:00000002
r8:00000000 r9:00000001 r10:00000000 r11:801B9548
r12:80028BAC r13:801AE980 r14:00000000 r15:00000000
r16:00000000 r17:00000000 r18:00000000 r19:00000000
r20:00000000 r21:00000000 r22:00000000 r23:00000000
r24:00000000 r25:00000000 r26:00000000 r27:00000384
r28:80333650 r29:804A7AE0 r30:00000000 r31:804A7AE0
f0:3F800000 f1:00000000 f2:00000000 f3:00000000
f4:00000000 f5:3BB21644 f6:BF92C859 f7:43710000
f8:3F800000 f9:00000000 f10:00000000 f11:00000000
f12:00000000 f13:3BB21644 f14:00000000 f15:00000000
f16:00000000 f17:00000000 f18:00000000 f19:00000000
f20:00000000 f21:00000000 f22:00000000 f23:00000000
f24:00000000 f25:00000000 f26:00000000 f27:00000000
f28:00000000 f29:59800004 f30:3C8EFA35 f31:40000000
80032B4C: 83A10024 lwz r29,36(r1)
80032B50: 80010064 lwz r0,100(r1)
80032B54: 7C0803A6 mtlr r0
80032B58: 38210060 addi r1,r1,96
80032B5C: 4E800020 blr
80032B60: 80A30054 lwz r5,84(r3)
80032B64: 80040000 lwz r0,0(r4)
80032B68: 80E30058 lwz r7,88(r3)
80032B6C: 7C050214 add r0,r5,r0
80032B70: 80C3005C lwz r6,92(r3)
80032B74: 90030054 stw r0,84(r3)
80032B78: 80A30060 lwz r5,96(r3)
80032B7C: 80040004 lwz r0,4(r4)
80032B80: 7C070214 add r0,r7,r0
80032B84: 90030058 stw r0,88(r3)
80032B88: 80040008 lwz r0,8(r4)
80032B8C: 7C060214 add r0,r6,r0
80032B90: 9003005C stw r0,92(r3)
80032B94: 8004000C lwz r0,12(r4)
80032B98: 7C050214 add r0,r5,r0
80032B9C: 90030060 stw r0,96(r3)
80032BA0: 4E800020 blr
80032BA4: 80030050 lwz r0,80(r3)
80032BA8: 38C0FFFF li r6,-1
80032BAC: 5400103A rlwinm r0,r0,2,0,29
80032BB0: 7CA30214 add r5,r3,r0
80032BB4: 80850054 lwz r4,84(r5)
80032BB8: 2C040000 cmpwi r4,0
80032BBC: 40810010 ble- 0x80032bcc
80032BC0: 3804FFFF subi r0,r4,1
80032BC4: 90050054 stw r0,84(r5)
80032BC8: 80C30050 lwz r6,80(r3)
80032BCC: 7CC33378 mr r3,r6
80032BD0: 4E800020 blr
80032BD4: 9421FFE0 stwu r1,-32(r1)
80032BD8: 7C0802A6 mflr r0
80032BDC: 2C040000 cmpwi r4,0
80032BE0: 90010024 stw r0,36(r1)
80032BE4: 3C004330 lis r0,17200
80032BE8: 93E1001C stw r31,28(r1)
80032BEC: 7C7F1B78 mr r31,r3
80032BF0: 90010008 stw r0,8(r1)
80032BF4: 90010010 stw r0,16(r1)
80032BF8: 41820014 beq- 0x80032c0c
80032BFC: 80830050 lwz r4,80(r3)
80032C00: 3804FFFF subi r0,r4,1
80032C04: 90030050 stw r0,80(r3)
80032C08: 48000010 b 0x80032c18
80032C0C: 80830050 lwz r4,80(r3)
80032C10: 38040001 addi r0,r4,1
80032C14: 90030050 stw r0,80(r3)
80032C18: 80030050 lwz r0,80(r3)
80032C1C: 2C000000 cmpwi r0,0
80032C20: 40800010 bge- 0x80032c30
80032C24: 38000000 li r0,0
80032C28: 90030050 stw r0,80(r3)
80032C2C: 48000014 b 0x80032c40
80032C30: 2C000004 cmpwi r0,4
80032C34: 4180000C blt- 0x80032c40
80032C38: 38000003 li r0,3[/spoiler]
It looks like you meant to use 80032B74 for your hook.
Also, in the future, instead of copy/paste the disasm underneath the regs, if you use Gecko.NET it's better if you go to the disasm tab and right click and Copy Function. It also helps to bold the instruction that the breakpoint hit.
Quote from: The D3mon on October 08, 2011, 03:27:24 PM
C2032B60 00000002
38000063 90030054
60000000 00000000
wrong hook.
that explains why it fails.
The value gets overwritten again later.
Like dcx2 said, it should be 80032B74 according to the that part of the function.
Thanks for the quick reply I believe I tried at suggeted function but will . Try it there as that is the bp hit. But seemed to not to effect state in the game. But will try that when I get back to it tonight.
Edit: Thanks for the help I had many issues with another game then switched to this one and made a few errors on my part.