Code Types (Dreamcast)

From Wiki - GameHacking.org
Revision as of 19:10, 24 November 2008 by Ace (talk | contribs) (New page: ==='''GameShark, Codebreaker and Xploder'''=== ---- {| style="border:1px solid #000000; margin: 0; padding:0;" width="100%" cellspacing="2" cellpadding="5"" ! Type !! Description !! Examp...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

GameShark, Codebreaker and Xploder


Type Description Example Other
00 8-bit Constant Write

00XXXXXX
000000YY
Writes YY to address XXXXXX. --
01 16-bit Constant Write

01XXXXXX
0000YYYY
Writes YYYY to address XXXXXX. --
02 32-bit Constant Write

02XXXXXX
YYYYYYYY
Writes YYYYYYYY to address XXXXXX. --
0300 32-bit Group Write

0300XXXX
YYYYYYYY
VVVVVVVV
........
VVVVVVVV
XXXX is the amount of 32-bit writes to perform, YYYYYYYY is the starting address to write to, VVVVVVVV are the values to write.

Example:
03000002 <- Declares two writes are to be done.
8CD00000 <- The address writes are to begin at.
11111111 <- Value to be used in write #1
22222222 <- Value to be used in write #2

This would write 11111111 to 8CD00000, and 22222222 to 8CD00004.
You must have values defined for each 32-bit write this code type makes.
0301 8-bit Incrementive Write

030100YY
XXXXXXXX
Adds YY to value at address XXXXXXXX. --
0302 8-bit Decrementive Write

030200YY
XXXXXXXX
Subtracts YY from value at address XXXXXXXX. --
0303 16-bit Incrementive Write

0303YYYY
XXXXXXXX
Adds YYYY to value at address XXXXXXXX. --
0304 16-bit Decrementive Write

0304YYYY
XXXXXXXX
Subtracts YYYY from value at address XXXXXXXX. --
0305 32-bit Incrementive Write

03050000
XXXXXXXX
YYYYYYYY
Adds YYYYYYYY to value at address XXXXXXXX. --
0306 32-bit Decrementive Write

03060000
XXXXXXXX
YYYYYYYY
Subtracts YYYYYYYY from value at address XXXXXXXX. --
04 32-bit Serial Repeater

04XXXXXX
WWWWZZZZ
YYYYYYYY
XXXXXX is the starting address, WWWW is the amount of writes, ZZZZ is the number to increment the address by (multiplied by 4 by CB/XP), and YYYYYYYY is the 32-bit value. The address MUST end with 0, 4, 8, or C.
05 Memory Copy

05XXXXXX
YYYYYYYY
ZZZZZZZZ
XXXXXX is the to copy from, YYYYYYYY is to copy to, and ZZZZZZZZ is the number of bytes to copy. --
071 Change Decryption Type

071000XX
XX defines the decryption type. Only 00-07 perform valid changes. --
0B Delay Code

0B0XXXXX
Waits XXXXX cycles before enabling ANY codes. Default wait time is 1000 (0x3E8)
0C 32-bit If Equal To - Enable ALL

0C0XXXXX
YYYYYYYY
If value at address 8CXXXXX is equal to YYYYYYYY - then enable ALL codes. --
0D 16-bit Condition

0DXXXXXX
000ZYYYY
XXXXXX is the address used for the condition, Z is the condition type, YYYY is the 16-bit value used for the condition. Z Values (Condition types):
0 - Equal To
1 - Not Equal To
2 - Less Than
3 - Greater Than
0E 16-bit Condition-Skip Multi Lines

0EWWYYYY
0ZXXXXXX
WW is the number of lines to skip, YYYY is the 16-bit value used for the condition, Z is the condition type, XXXXXX is the address used for the condition. Note: Lines are only skipped if the condition returns false.

Z Values (Condition types):
0 - Equal To
1 - Not Equal To
2 - Less Than
3 - Greater Than
0F 16-bit Write Once, on Bootup.

0FXXXXXX
0000YYYY
Writes YYYY to address XXXXXX ONCE, on bootup. The address must be even.


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