WiiRd forum

Wii & Gamecube Hacking => Wii Game hacking help => Topic started by: Romaap on December 05, 2008, 11:14:41 PM

Title: ASM branch to custom instructions?
Post by: Romaap on December 05, 2008, 11:14:41 PM
If I want to multiply something using ASM can I use the following methode?

Example:

If I use breakpoint on a address with the score it gives me:
800020AC:  908C0000   stw   r4,0(r12)

can I replace  stw r4,0(r12) with b 0x(address of a empty space in the RAM).

then I make a ASM instruction  in the address where my b 0x..... points to.
on that address I make a instruction like add or li
and on the next line I  put the stw   r4,0(r12) and the next line b 0x800020B0.

should this work or is there a better/easier way to accomplish this?
Title: Re: ASM branch to custom instructions?
Post by: Maniac on December 05, 2008, 11:45:05 PM
That should work fine..
Title: Re: ASM branch to custom instructions?
Post by: spunit262 on December 14, 2008, 10:40:00 AM
That's exactly what the C2 code type does.
Title: Re: ASM branch to custom instructions?
Post by: brkirch on December 14, 2008, 03:08:49 PM
Well your example isn't the best since 800020AC is part of the code handler (I would recommend you not try to change that) but like spunit262 said, the C2 code type exists to do exactly what you are describing.
Title: Re: ASM branch to custom instructions?
Post by: Romaap on December 14, 2008, 05:31:29 PM
ok, thanks :D