Code Types (Game Boy Advance)

From Wiki - GameHacking.org
Revision as of 15:13, 24 November 2008 by Ace (talk | contribs) (New page: ==='''Codebreaker Advance'''=== ---- {| style="border:1px solid #000000; margin: 0; padding:0;" width="100%" cellspacing="2" cellpadding="5"" ! Type !! Description !! Example !! Other |-...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Codebreaker Advance


Type Description Example Other
0 Master Code 1

0000XXXX YYYY
XXXX is the CRC value (the "Game ID" converted to hex)
Flags ("YYYY"):
0008 - CRC Exists (CRC is used to autodetect the inserted game)
0002 - Disable Interupts
--
1 Master Code 2

1XXXXXXX YYYZ
'Z' is the CBA Code Handler Store Address (0-7) [address = ((d << 0x16) + 0x08000100)]
YYY:
100 - 32-bit Long-Branch Type (Thumb)
200 - 32-bit Long-Branch Type (ARM)
300 - 8-bit(?) Long-Branch Type (Thumb)
400 - 8-bit(?) Long-Branch Type (ARM)
002 - Unknown (Odd Effect)
XXXXXXX = ?
--
2 16-bit OR

2XXXXXXX YYYY
OR's value at address XXXXXXX with YYYY. Tested on VBA, not tested on hardware
3 8-bit RAM Write

3XXXXXXX 00YY
Writes YY to address XXXXXXX. --
4 Serial Repeater

4ZZZZZZZ YYYY
AAAAXXXX VVVV
ZZZZZZZ is the address to start at and YYYY is the starting value. AAAA is the value to increment with. XXXX is the number of address iterations. And finally, VVVV is the amount added to each address iteration -
5 Super Code/Memwrite

5XXXXXXX YYYY
ZZZZZZZZ ZZZZ
........
ZZZZZZZZ ZZZZ
XXXXXXX is the address where the writing begins, YYYY is the number of halfwords to write and ZZZZZZZZ ZZZZ are the halfwords.

Note that halfwords are byte flipped, so the value of 1122 would become 2211.
Each address is automatically incremented by 2. (Non-changeable)
6 16-bit AND

6XXXXXXX YYYY
AND's value at address XXXXXXX with YYYY. --
7 16-bit If Equal To

7XXXXXXX YYYY
Activates next code if value at address XXXXXXX is equal to YYYY. --
8 16-bit RAM Write

8XXXXXXX YYYY
Writes YYYY to address XXXXXXX. --
9 Change Encryption Seeds (if used as first code)

9YYYYYYY YYYY
Details not researched. --
A 16-bit If Not Equal To

AXXXXXXX YYYY
Activates next code if value at address XXXXXXX is NOT equal to YYYY Must be an even address.
B If Greater Than

BXXXXXXX YYYY
If address XXXXXXX's value is Greater Than YYYY, then activate the next code. --
C If Lesser Than

CXXXXXXX YYYY
If address XXXXXXX's value is Lesser Than YYYY, then activate the next code. --
D Pad Read/Button Activator

D0000020 YYYY
Activates next code if YYYY is equal to the button currently being pressed. --
E Increment/Decrement

EXXXXXXX YYYY
Increase or Decrease the value of XXXXXXX by YYYY. This code type uses value ranges to determine whether to do an increment or decrement. Incremental ranges are: 0000 - 7FFF. Decremental ranges are: 8000 - FFFF. --
F 16-bit If (AND) TRUE

FXXXXXXX YYYY
If value at address XXXXXXX AND YYYY == 1 (TRUE), then enable the next code. --


Code Types
Consoles
Playstation - Sega Saturn - Dreamcast - Playstation 2 - Game Cube
Portables
Game Boy Advance - Nintendo DS