OK, I tried to make an Weather Modifier (Pokemon Battle Revolution PAL) assembly or pointer Code, but I failed.
Wiird always gave me wrong pointers that my game froze.
4A000000 92000000
14513EE0 XXXXXXXX
E0000000 80008000
This would be the code, but the adress is always moving, that´s why I can forget the actual code!
Now I try assembly!
I breakpoint wrote the adress (92513EE2)
CR : 84000000 XER : 00000000 CTR : 803CC880 DSIS: 02400000
DAR : 92513EE0 SRR0: 803CC890 SRR1: 00009032 LR : 803CC820
r0 : 00000000 r1 : 80FBB538 r2 : 80648600 r3 : 92513EE0
r4 : 00000010 r5 : 00000007 r6 : 803D6EF8 r7 : 00000001
r8 : 00000020 r9 : 91C9A1D0 r10 : 91C9AA94 r11 : 80FBB558
r12 : 803CC7C4 r13 : 806452C0 r14 : 00000008 r15 : 00000002
r16 : 00000000 r17 : 00000004 r18 : 00000000 r19 : 00000004
r20 : 0000F100 r21 : 00000010 r22 : 00000003 r23 : 00010000
r24 : 91C8D4C0 r25 : 00000000 r26 : 8048CDB4 r27 : 924CF1E0
r28 : 92513D60 r29 : 00000007 r30 : 92513EE0 r31 : 000080FF
f0 : 419FFBE7 f1 : 4734E3AE f2 : 447A0000 f3 : 59800000
f4 : 00000000 f5 : 00000000 f6 : 3F826165 f7 : 3F7C54EA
f8 : 3D433F9A f9 : BE3AE7D4 f10 : BF7BB313 f11 : 00000000
f12 : 00000000 f13 : 3F800000 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 : 00000000 f30 : 00000000 f31 : 00000000
803CC888: 7FE00278 xor r0,r31,r0
803CC88C: 7C800038 and r0,r4,r0
803CC890: 90030000 stw r0,0(r3)
803CC894: 480000BC b 0x803cc950
803CC898: 80030000 lwz r0,0(r3)
803CC89C: 7C00F9D6 mullw r0,r0,r31
803CC8A0: 90030000 stw r0,0(r3)
803CC8A4: 480000AC b 0x803cc950
803CC8A8: 80030000 lwz r0,0(r3)
803CC8AC: 7C00FBD6 divw r0,r0,r31
803CC8B0: 90030000 stw r0,0(r3)
803CC8B4: 4800009C b 0x803cc950
803CC8B8: 80030000 lwz r0,0(r3)
803CC8BC: 7C00F830 slw r0,r0,r31
803CC8C0: 90030000 stw r0,0(r3)
803CC8C4: 4800008C b 0x803cc950
803CC8C8: 80030000 lwz r0,0(r3)
803CC8CC: 7C00FE30 sraw r0,r0,r31
Notes:
- r3 = the adress where the Weather Value is stored (Inoticed)
- r4 = Weather Value before the "change"
- I want to make a Weather Switch Code with Button Activators and it must be assembly.
- Tell me, if you need more info or if I breakpointed wrong (maybe)
- 803CC890: 90030000 stw r0,0(r3) this was going to be executed next
- I made it rainy, the value from it is 00000001. Before it was sun, 00000010.
-----------------
Nobody could help me till now, I hope you will be able to find it out guys :p
Please help, greeeets...! >.<
What exactly do you want the code to do?
Quote from: Romaap on July 04, 2010, 10:15:17 PM
What exactly do you want the code to do?
It should be able to modify the weather, like if someone uses a move to change it.
I breakpoint wrote the adress and when I selected the move (Rain Dance changes weather to rain) then the game froze and showed me this registers. But I couldn´t see the instruction of the changing weather in the breakpoints/disassembler tab.
MAYBE it was the wrong breakpoint... I should try another action to make it break.
Edit:
I found a better breakpoint that shows up the weather in r1 if you change the battler.
Now it works, can be closed pls :confused:
...there should never be anything in r1. r1 is a very important register, the stack pointer, and you should never ever mess with it unless you know how to use the stack really well.