Change Stage on the Fly 2

Started by toonlink444, February 22, 2011, 10:52:47 PM

Previous topic - Next topic

toonlink444

I have found (I hope) the address that loads the stage.
Here's everything I have did to see how to use this address. I did a Read/Write breakpoint when the stage was loading and I got
Address: 815E25DB
Registers
[spoiler]CR:48000028  XER:20000000  CTR:80080A7C DSIS:02400000
DAR:815E25DB SRR0:80004354 SRR1:0000B032   LR:80080AB4
  r0:00000000   r1:805B4220   r2:805A9320   r3:815E0E50
  r4:9169C2FB   r5:00004035   r6:815E25DA   r7:00000000
  r8:81600808   r9:00000010  r10:815E6660  r11:805B41B0
r12:80080A7C  r13:805A4420  r14:916930E0  r15:815EDC80
r16:00000000  r17:00000000  r18:00000000  r19:00000000
r20:00000001  r21:804548A0  r22:80000000  r23:0000000A
r24:00000000  r25:815FEED0  r26:000057C0  r27:815FFEF0
r28:815FECB0  r29:00000002  r30:815FEED0  r31:000057C0
[/spoiler]
Disassembler Tab
[spoiler]80004338:  7C041840   cmplw   r4,r3
8000433C:  41800028   blt-   0x80004364
80004340:  3884FFFF   subi   r4,r4,1
80004344:  38C3FFFF   subi   r6,r3,1
80004348:  38A50001   addi   r5,r5,1
8000434C:  4800000C   b   0x80004358
80004350:  8C040001   lbzu   r0,1(r4)
80004354:  9C060001   stbu   r0,1(r6)
80004358:  34A5FFFF   subic.   r5,r5,1
8000435C:  4082FFF4   bne+   0x80004350
80004360:  4E800020   blr   
[/spoiler]
It broke on: 80004354:  9C060001   stbu   r0,1(r6)
How would I use this info to make it load a stage so I can exit a stage and load one instantly
In the begining there was nothing. Then it exploded
New blog!! Check it out for hacking Smash Bros Brawl!! http://letshackblank.blogspot.com/

Deathwolf

look at your instruction: 80004354:  9C060001   stbu   r0,1(r6)

r0 have the value 00000000 (Stage value)
r6 [815E25DA]  is the address, which is getting the value from r0.
1 = for going 1 byte forward. 815E25DA + 1 = 815E25DB

so your code would be:

stwu r1,-80(r1)         # make space for 18 registers
stmw r14,8(r1)         # push r14-r31 onto the stack
li r14,0xXX                # write your value to r14
stbu r14,1(r6)          # store value from r14 into r6
lmw r14,8(r1)         # pop r14-r31 off the stack
addi r1,r1,80         # release the space

Code:

C2004354 00000004
9421FFB0 BDC10008
39C000XX 9DC60001
B9C10008 38210050
60000000 00000000


lolz

toonlink444

Do you mind explaining it just a little bit more like why you add registers and stuff like that. I'm still learning and hoping to learn power pc to better understand ASM.
In the begining there was nothing. Then it exploded
New blog!! Check it out for hacking Smash Bros Brawl!! http://letshackblank.blogspot.com/

wiiztec

If there's any code at all that you want to be button activated, or even able to toggle on & off, and I have the game, just PM me and I'll make it happen

toonlink444

In the begining there was nothing. Then it exploded
New blog!! Check it out for hacking Smash Bros Brawl!! http://letshackblank.blogspot.com/