C6 branch

Started by Deathwolf, August 03, 2010, 02:58:01 PM

Previous topic - Next topic

Deathwolf

here are 2 different addresses / codes.
I want to branch it with C6.

C2016338 00000003
3D800000 618CFFFF
918D9578 808D9578
60000000 00000000

C203CAE8 00000003
3D800000 618C0BB8
919F0030 807F0030
60000000 00000000

would be:
C2016338 00000003
3D800000 618CFFFF
918D9578 808D9578
C6016338 8003CAE8 <-- branch from 80016338 to 8003CAE8
3D800000 618C0BB8
919F0030 807F0030
60000000 00000000

is it right?
lolz

dcx2

No.  C2 uses ASM.  C6 is a WiiRD code type...not ASM.  That's like using an 04 code in a C2 code.

After the C2 hooks 80016338 to point at the ASM after it, the C6 code will over-write your hook with a branch to 8003CAE8.  None of your ASM is ever executed, and the code handler will probably start screwing things up when it tries to read the WiiRD codes after the C6, since they're not actually WiiRD codes.

Deathwolf

#2
oh again a wiird code.

example on this code.
0423ED60 9ABCDEF1
                                 ] branch
0423EDD0 12345678


but that's not really a codetype!? lol
have to use this with C0?


lolz

dcx2

Nonono.  C0 and C2 codes run ASM instructions.  WiiRD codes are run by Gecko OS.

Branches are usually relative.  If you don't know the origin and destination ahead of time, you can't calculate what branch it should be.  That's what the C6 code is for.  The code handler will calculate the branch for you.

Deathwolf

o,o so it doesn't work with these codes?
lolz

dcx2

No.  C6 is not used with ASM instructions after it.

Deathwolf

I don't want to use any ASM instruction.
only a branch between these codes

0423ED60 9ABCDEF1
                                 ] branch
0423EDD0 12345678
lolz

dcx2

Since those addresses are known ahead of time, you should be able to just over-write the first one with a branch.

Go to 8023ED60 in the disassembler and instead of over-writing it with nop, over-write it with b 0x8023EDD0

Deathwolf

why now disassembler.... :-[

a branch with C6 codetype!
my question is how to write it with a branch (C6)

I know what you mean with  b 0x8023EDD0.
it should branch me from 8023ED60 to 8023EDD0 but it's with disassembler.
C6 have to use.

did I understand something wrong?
lolz

dcx2

C6016338 8003CAE8 will do the same thing

Deathwolf

Quote from: dcx2 on August 03, 2010, 06:10:38 PM
C6016338 8003CAE8 will do the same thing

yes! that is it.

C6016338 8003CAE8 <-- why this address? 80016338 8003CAE8
lolz

dcx2

I dunno, you tell me...you're the one that wants to branch from 80016338 to 8003CAE8

Deathwolf

lol fail.

0423ED60 9ABCDEF1
0423EDD0 12345678

C623ED60 8023EDD0
----------- -----------
----------- -----------
----------- -----------

then I can write my instructions?
lolz

dcx2

What instructions?  You mean ASM?

Deathwolf

lolz