0 GameCube Action Replay Code Types (Simple Version)
Oliver Bevan edited this page 2023-12-19 19:45:28 +00:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Note: This is not a complete code type list.

The purpose of this document is to catalogue and explain the effects of different AR code types in a clear, concise, and easy to read format. Please note that this document is not intended to explain EVERY code type, only those of interest to the amateur hacker.

Kenobi's documentation is recommended reading as it is very complete, precise, and exact in it's explanations. However, that is also it's main flaw, it's TOO complex and technical for the casual or newbie hacker to understand. If "Address = ((0x0wXXXXXXX) AND 0x01FFFFFF) OR 0x80000000)" makes any sense to you, then I implore you to read Kenobi's guide instead. The intended audience for this document is people who'd rather have things explained in plain English.

It should be noted that every decrypted AR code has a basic two-part format that is universal to every code. The first half contains the code type and address to be written to. The second half contains the value to be written.

The GameCube has a memory range of 80000000 - 817FFFFF (cached), or C0000000 - C17FFFFF (uncached). However for the sake of simplicity, the AR uses an offset number in the range of 00000000 - 017FFFFF. The code type identifier is an 8-bit value that is applied to the first two digits of the offset. For example, if your offset is 00012345, and you wish to perform a 32-bit write (04), you simply add (04000000) + (00012345) = 04012345.

In order to conserve space and simplicity, only the 8-bit code type identifier and particulars of the second half of the code will be explained below, as the method for procuring the first half has already been described above ;)

Terms

  • 8-bit - Byte - 0x12
  • 16-bit - Halfword - 0x1234
  • 32-bit - Word - 0x12345678

Writes

  • (00) NNNNNNXX
    • 8-bit write. X is the value, N is the number of times to repeat.
  • (02) NNNNXXXX
    • 16-bit write. X is the value, N is the number of times to repeat.
  • (04) XXXXXXXX
    • 32-bit write. X is the value.

Examples

  • 00006500 00000312
    • Will write byte 0x12 to 80006500, 80006501, 80006502, 80006503.
  • 02006500 00011234
    • Will write halfword 0x1234 to 80006500, 80006502.
  • 05006500 12345678
    • Will write word 0x12345678 to 81006500.

Addition

  • (80) 000000XX
    • 8-bit Addition. Load the byte at the address, add X to it, and save resulting byte.
  • (82) 0000XXXX
    • 16-bit Addition. Load the halfword at the address, add X to it, and save resulting halfword.
  • (84) XXXXXXXX
    • 32-bit Addition. Load the word at the address, add X to it, and save resulting word.

Single Line Activators

Equal

  • (08) 000000XX
    • 8-bit Equal activator.
  • (0A) 0000XXXX
    • 16-bit Equal activator.
  • (0C) XXXXXXXX
    • 32-bit Equal activator.

X is the value the address must equal to activate the next line of code.

NOT Equal

  • (10) 000000XX
    • 8-bit NOT Equal activator.
  • (12) 0000XXXX
    • 16-bit NOT Equal activator.
  • (14) XXXXXXXX
    • 32-bit NOT Equal activator.

If the value stored at the address is not equal to X, activate the next line of code.

If Lower (signed)

  • (18) 000000XX
    • 8-bit If Lower (signed) activator.
  • (1A) 0000XXXX
    • 16-bit If Lower (signed) activator.
  • (1C) XXXXXXXX
    • 32-bit If Lower (signed) activator.

If the value stored at the address is lower than X, activate the next line of code.

If Higher (signed)

  • (20) 000000XX
    • 8-bit If Higher (signed) activator.
  • (22) 0000XXXX
    • 16-bit If Higher (signed) activator.
  • (24) XXXXXXXX
    • 32-bit If Higher (signed) activator.

If the value stored at the address is higher than X, activate the next line of code.

If Lower (unsigned)

  • (28) 000000XX
    • 8-bit If Lower (unsigned) activator.
  • (2A) 0000XXXX
    • 16-bit If Lower (unsigned) activator.
  • (2C) XXXXXXXX
    • 32-bit If Lower (unsigned) activator.

If the value stored at the address is lower than X, activate the next line of code.

If Higher (unsigned)

  • (30) 000000XX
    • 8-bit If Higher (unsigned) activator.
  • (32) 0000XXXX
    • 16-bit If Higher (unsigned) activator.
  • (34) XXXXXXXX
    • 32-bit If Higher (unsigned) activator.

If the value stored at the address is higher than X, activate the next line of code.

Double Line Activators

Equal

  • (48) 000000XX
    • 8-bit activator.
  • (4A) 0000XXXX
    • 16-bit activator.
  • (4C) XXXXXXXX
    • 32-bit activator.

X is the value the address must equal to activate the next two lines of code.

NOT Equal

  • (50) 000000XX
    • 8-bit NOT Equal activator.
  • (52) 0000XXXX
    • 16-bit NOT Equal activator.
  • (54) XXXXXXXX
    • 32-bit NOT Equal activator.

If the value stored at the address is not equal to X, activate the next two lines of code.

If Lower (signed)

  • (58) 000000XX
    • 8-bit If Lower (signed) activator.
  • (5A) 0000XXXX
    • 16-bit If Lower (signed) activator.
  • (5C) XXXXXXXX
    • 32-bit If Lower (signed) activator.

If the value stored at the address is lower than X, activate the next two lines of code.

If Higher (signed)

  • (60) 000000XX
    • 8-bit If Higher (signed) activator.
  • (62) 0000XXXX
    • 16-bit If Higher (signed) activator.
  • (64) XXXXXXXX
    • 32-bit If Higher (signed) activator.

If the value stored at the address is higher than X, activate the next two lines of code.

If Lower (unsigned)

  • (68) 000000XX
    • 8-bit If Lower (unsigned) activator.
  • (6A) 0000XXXX
    • 16-bit If Lower (unsigned) activator.
  • (6C) XXXXXXXX
    • 32-bit If Lower (unsigned) activator.

If the value stored at the address is lower than X, activate the next two lines of code.

If Higher (unsigned)

  • (70) 000000XX
    • 8-bit If Higher (unsigned) activator.
  • (72) 0000XXXX
    • 16-bit If Higher (unsigned) activator.
  • (74) XXXXXXXX
    • 32-bit If Higher (unsigned) activator.

If the value stored at the address is higher than X, activate the next two lines of code.

Multi-Line Activators

Note that all multi-line codes must end with the line 00000000 40000000.

Equal

  • (88) 000000XX
    • 8-bit activator.
  • (8A) 0000XXXX
    • 16-bit activator.
  • (8C) XXXXXXXX
    • 32-bit activator.

X is the value the address must equal to activate the next lines of code.

NOT Equal

  • (90) 000000XX
    • 8-bit NOT Equal activator.
  • (92) 0000XXXX
    • 16-bit NOT Equal activator.
  • (94) XXXXXXXX
    • 32-bit NOT Equal activator.

If the value stored at the address is not equal to X, activate the next lines of code.

If Lower (signed)

  • (98) 000000XX
    • 8-bit If Lower (signed) activator.
  • (9A) 0000XXXX
    • 16-bit If Lower (signed) activator.
  • (9C) XXXXXXXX
    • 32-bit If Lower (signed) activator.

If the value stored at the address is lower than X, activate the next lines of code.

If Higher (signed)

  • (A0) 000000XX
    • 8-bit If Higher (signed) activator.
  • (A2) 0000XXXX
    • 16-bit If Higher (signed) activator.
  • (A4) XXXXXXXX
    • 32-bit If Higher (signed) activator.

If the value stored at the address is higher than X, activate the next lines of code.

If Lower (unsigned)

  • (A8) 000000XX
    • 8-bit If Lower (unsigned) activator.
  • (AA) 0000XXXX
    • 16-bit If Lower (unsigned) activator.
  • (AC) XXXXXXXX
    • 32-bit If Lower (unsigned) activator.

If the value stored at the address is lower than X, activate the next lines of code.

If Higher (unsigned)

  • (B0) 000000XX
    • 8-bit If Higher (unsigned) activator.
  • (B2) 0000XXXX
    • 16-bit If Higher (unsigned) activator.
  • (B4) XXXXXXXX
    • 32-bit If Higher (unsigned) activator.

If the value stored at the address is higher than X, activate the next lines of code.

Alignment

Codes must be properly aligned depending on the type of code.

  • 8-bit codes can be used on ANY address.
  • 16-bit codes must have an address that is a multiple of 2: 0,2,4,6,8,A,C,E.
  • 32-bit codes must have an address that is a multiple of 4:0,4,8,C.

If codes aren't aligned, they may not work, or may cause your AR to spaz out.

Signed & Unsigned Numbers

Unsigned means:

  • For 8-bits:
    • 0x000xFF = 0 to 255.
  • For 16-bits:
    • 0x00000xFFFF = 0 to 65535.
  • For 32-bits:
    • 0x000000000xFFFFFFFF = 0 to 4294967295.

Signed means:

  • For 8-bits:
    • 0x000x7F = 0 to 127.
    • 0x800xFF = -127 to -1.
  • For 16-bits:
    • 0x00000x7FFF = 0 to 32767.
    • 0x80000xFFFF = -32768 to -1.
  • For 32-bits:
    • 0x000000000x7FFFFFFF = 0 to 2147483647.
    • 0x800000000xFFFFFFFF = -2147483648 to -1.