WiiRd forum

Wii & Gamecube Hacking => Wii Game hacking help => Topic started by: Igglyboo on October 10, 2008, 01:50:01 AM

Title: Code Types
Post by: Igglyboo on October 10, 2008, 01:50:01 AM
Why are there no 8bit If codes?
Could somebody explain Serial Codes?
Title: Re: Code Types
Post by: spunit262 on October 10, 2008, 03:22:29 AM
Because the lsb (least significant bit) of the address is used to put an endif before if codes, and because you can use the bit mask feature of the 16 bit ifs to fake one.
If the address is even use FF0000XX as the second half (the value half) of the code, with XX being what your comparing against.
If the address is odd use 00FFXX00 as the second half (the value half) of the code, with XX being what your comparing against.
I haven't actual test it, but that should work.
Title: Re: Code Types
Post by: Igglyboo on October 10, 2008, 11:35:58 AM
Can you explain what a serial code is and when to use it?
Title: Re: Code Types
Post by: Link on October 10, 2008, 02:57:24 PM
Serial code is easy:

I'll take an example:


32bits serial code (ba)

08______ XXXXXXXX :
2NNNZZZZ VVVVVVVV

Writes NNN+1 words (XXXXXXXX) at ba+address, then makes XXXX+=VVVVVVVV, address+=ZZZZ


Standard case: ba=80000000.. now I'll want to do the following row

80100000 00001000
80100010 00003000
80100020 00005000
80100030 00007000
80100040 00009000

These are 5 codes.. so NNN is 4 (NNN+1!)... XXXXXXXX starts out with 00001000 and always raises by 00002000 - my first address is 80100000 (ba+100000) and the address always raises by 10:

so the code is:

08100000 00001000
20040010 00002000

--> Explanation:
Initialize serial code at ba+100000 --> 80100000
Value at 80100000 is 00001000
2 identifies: 32 bit serial (0 would be 8 bit, 1 would be 16 bit)
4+1 --> 5 lines normally
Address always raises by 0010
Value always raises by 00002000
Title: Re: Code Types
Post by: Igglyboo on October 10, 2008, 07:48:20 PM
So i would use this if i say had
i.e
80000001
80000002
80000003
80000004
80000005
80000006
and i wanted to write 1 value to all of those?
Title: Re: Code Types
Post by: spunit262 on October 10, 2008, 09:25:38 PM
Yes, and here's a practical example.
http://wiird.l0nk.org/forum/index.php?topic=1446.0 (http://wiird.l0nk.org/forum/index.php?topic=1446.0)