Code Types (Game Boy Advance)

From Wiki - GameHacking.org
Jump to: navigation, search

Codebreaker Advance



Type & Format Description Other Limitations
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
-- --
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 = ?
-- --
16-bit OR

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

3XXXXXXX 00YY
Writes YY to address XXXXXXX. -- --
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 -- --
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) --
16-bit AND

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

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

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

9YYYYYYY YYYY
Details not researched. -- --
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. --
If Greater Than

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

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

D0000020 YYYY
Activates next code if YYYY is equal to the button currently being pressed. -- --
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. -- --
16-bit If (AND) TRUE

FXXXXXXX YYYY
Details not researched. -- --


Pad Values


0002 - B
0040 - Up
0080 - Down
0020 - Left
0010 - Right
0200 - L
0100 - R
0004 - Select
0008 - Start 


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