WiiRd forum

Wii & Gamecube Hacking => Wii Game hacking help => Topic started by: Deathwolf on August 03, 2010, 02:58:01 PM

Title: C6 branch
Post by: Deathwolf on August 03, 2010, 02:58:01 PM
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?
Title: Re: C6 branch
Post by: dcx2 on August 03, 2010, 05:22:31 PM
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.
Title: Re: C6 branch
Post by: Deathwolf on August 03, 2010, 05:31:36 PM
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?


Title: Re: C6 branch
Post by: dcx2 on August 03, 2010, 05:47:32 PM
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.
Title: Re: C6 branch
Post by: Deathwolf on August 03, 2010, 05:49:00 PM
o,o so it doesn't work with these codes?
Title: Re: C6 branch
Post by: dcx2 on August 03, 2010, 05:55:38 PM
No.  C6 is not used with ASM instructions after it.
Title: Re: C6 branch
Post by: Deathwolf on August 03, 2010, 05:56:57 PM
I don't want to use any ASM instruction.
only a branch between these codes

0423ED60 9ABCDEF1
                                 ] branch
0423EDD0 12345678
Title: Re: C6 branch
Post by: dcx2 on August 03, 2010, 05:59:50 PM
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
Title: Re: C6 branch
Post by: Deathwolf on August 03, 2010, 06:08:57 PM
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?
Title: Re: C6 branch
Post by: dcx2 on August 03, 2010, 06:10:38 PM
C6016338 8003CAE8 will do the same thing
Title: Re: C6 branch
Post by: Deathwolf on August 03, 2010, 06:12:55 PM
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
Title: Re: C6 branch
Post by: dcx2 on August 03, 2010, 06:18:29 PM
I dunno, you tell me...you're the one that wants to branch from 80016338 to 8003CAE8
Title: Re: C6 branch
Post by: Deathwolf on August 03, 2010, 06:20:39 PM
lol fail.

0423ED60 9ABCDEF1
0423EDD0 12345678

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

then I can write my instructions?
Title: Re: C6 branch
Post by: dcx2 on August 03, 2010, 06:23:19 PM
What instructions?  You mean ASM?
Title: Re: C6 branch
Post by: Deathwolf on August 03, 2010, 06:24:08 PM
no ASM, just values
Title: Re: C6 branch
Post by: dcx2 on August 03, 2010, 06:25:01 PM
You can put whatever you want after a C6 code.  It's never more than one line.
Title: Re: C6 branch
Post by: Deathwolf on August 03, 2010, 06:25:49 PM
include a 16 codetype?
Title: Re: C6 branch
Post by: dcx2 on August 03, 2010, 06:27:23 PM
Quote from: dcx2 on August 03, 2010, 06:25:01 PM
You can put whatever you want after a C6 code.  It's never more than one line.
Title: Re: C6 branch
Post by: Deathwolf on August 03, 2010, 06:29:36 PM
lol why never more than one line.

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

does it write 8023EDD0 16000000? lol
Title: Re: C6 branch
Post by: dcx2 on August 03, 2010, 06:34:24 PM
...wtf are you trying to do?  Didn't we just go over what the C6 code does?

Did any of your codes change po?  wtf do you think a 16 is going to do?

You're not trying again.  I don't like helping you if you aren't going to think about whether what you say makes any sense.
Title: Re: C6 branch
Post by: Deathwolf on August 03, 2010, 06:38:56 PM
ok sorry I'll delete all my posts.
if I'm too stupid for you, I'll not ask anything more.
Title: Re: C6 branch
Post by: Deathwolf on August 19, 2010, 08:04:58 PM
ähm yep please help.
I want to branch from 80355114 to 8006066C and then write 60000000.

C6355114 8006066C bx 8006066C
60000000 00000000

doesn't work and makes no sense.
it's the same like:

0406066C 60000000
it just should branch from 80355114 to 8006066C and then write ONE value 60000000.
makes no sense lol.

C6355114 8006066C bx 8006066C
0406066C 60000000 <-- then I can only use 8006066C


should I use full ASM instructions? dcx2 you said it's like 04 on C2.
so dcx2 please help me, maybe I understand some things wrong because my english is not the best.

thanks.