3 A Compendium of Gamecube Action Replay Code Types
5 Note: This is note a Complete code type list.
7 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.
9 It would not have been possible to write this document without Kenobi's "GCN AR CODES TYPES EXPLANATION", found at www.GSCentral.com, so a big thank-you goes to Kenobi and Parasyte for their contributions to the GCN hacking scene.
11 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.
13 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.
15 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.
17 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 ;)
22 16-bit - Halfword - 0x1234
23 32-bit - Word - 0x12345678
28 8-bit write. X is the value, N is the number of times to repeat.
31 16-bit write. X is the value, N is the number of times to repeat.
34 32-bit write. X is the value.
39 Will write byte 0x12 to 80006500, 80006501, 80006502, 800067503.
42 Will write halfword 0x1234 to 80006500, 80006502.
45 Will write word 0x12345678 to 81006500.
51 8-bit Addition. Load the byte at the address, add X to it, and save resulting byte.
54 16-bit Addition. Load the halfword at the address, add X to it, and save resulting halfword.
57 32-bit Addition. Load the word at the address, add X to it, and save resulting word.
59 ---Single Line Activators---
63 8-bit Equal activator.
66 16-bit Equal activator.
69 32-bit Equal activator.
71 X is the value the address must equal to activate the next line of code.
75 8-bit NOT Equal activator.
78 16-bit NOT Equal activator.
81 32-bit NOT Equal activator.
83 If the value stored at the address is not equal to X, activate the next line of code.
85 ***If Lower (signed)***
87 8-bit If Lower (signed) activator.
90 16-bit If Lower (signed) activator.
93 32-bit If Lower (signed) activator.
95 If the value stored at the address is lower than X, activate the next line of code.
97 ***If Higher (signed)***
99 8-bit If Higher (signed) activator.
102 16-bit If Higher (signed) activator.
105 32-bit If Higher (signed) activator.
107 If the value stored at the address is higher than X, activate the next line of code.
109 ***If Lower (unsigned)***
111 8-bit If Lower (unsigned) activator.
114 16-bit If Lower (unsigned) activator.
117 32-bit If Lower (unsigned) activator.
119 If the value stored at the address is lower than X, activate the next line of code.
121 ***If Higher (unsigned)***
123 8-bit If Higher (unsigned) activator.
126 16-bit If Higher (unsigned) activator.
129 32-bit If Higher (unsigned) activator.
131 If the value stored at the address is higher than X, activate the next line of code.
133 ---Double Line Activators---
145 X is the value the address must equal to activate the next two lines of code.
149 8-bit NOT Equal activator.
152 16-bit NOT Equal activator.
155 32-bit NOT Equal activator.
157 If the value stored at the address is not equal to X, activate the next two lines of code.
159 ***If Lower (signed)***
161 8-bit If Lower (signed) activator.
164 16-bit If Lower (signed) activator.
167 32-bit If Lower (signed) activator.
169 If the value stored at the address is lower than X, activate the next two lines of code.
171 ***If Higher (signed)***
173 8-bit If Higher (signed) activator.
176 16-bit If Higher (signed) activator.
179 32-bit If Higher (signed) activator.
181 If the value stored at the address is higher than X, activate the next two lines of code.
183 ***If Lower (unsigned)***
185 8-bit If Lower (unsigned) activator.
188 16-bit If Lower (unsigned) activator.
191 32-bit If Lower (unsigned) activator.
193 If the value stored at the address is lower than X, activate the next two lines of code.
195 ***If Higher (unsigned)***
197 8-bit If Higher (unsigned) activator.
200 16-bit If Higher (unsigned) activator.
203 32-bit If Higher (unsigned) activator.
205 If the value stored at the address is higher than X, activate the next two lines of code.
207 ---Multi-Line Activators---
209 Note that all multi-line codes must end with the line 00000000 40000000.
221 X is the value the address must equal to activate the next lines of code.
225 8-bit NOT Equal activator.
228 16-bit NOT Equal activator.
231 32-bit NOT Equal activator.
233 If the value stored at the address is not equal to X, activate the next lines of code.
235 ***If Lower (signed)***
237 8-bit If Lower (signed) activator.
240 16-bit If Lower (signed) activator.
243 32-bit If Lower (signed) activator.
245 If the value stored at the address is lower than X, activate the next lines of code.
247 ***If Higher (signed)***
249 8-bit If Higher (signed) activator.
252 16-bit If Higher (signed) activator.
255 32-bit If Higher (signed) activator.
257 If the value stored at the address is higher than X, activate the next lines of code.
259 ***If Lower (unsigned)***
261 8-bit If Lower (unsigned) activator.
264 16-bit If Lower (unsigned) activator.
267 32-bit If Lower (unsigned) activator.
269 If the value stored at the address is lower than X, activate the next lines of code.
271 ***If Higher (unsigned)***
273 8-bit If Higher (unsigned) activator.
276 16-bit If Higher (unsigned) activator.
279 32-bit If Higher (unsigned) activator.
281 If the value stored at the address is higher than X, activate the next lines of code.
285 Codes must be properly aligned depending on the type of code.
286 8-bit codes can be used on ANY address.
287 16-bit codes must have an address that is a multiple of 2: 0,2,4,6,8,A,C,E.
288 32-bit codes must have an address that is a multiple of 4:0,4,8,C.
289 If codes aren't aligned, they may not work, or may cause your AR to spaz out and kill your cat (R.I.P. Snowball).
291 ---Signed & Unsigned Numbers---
294 For 8-bits : 0x00 -> 0xFF = 0 to 255.
295 For 16-bits: 0x0000 -> 0xFFFF = 0 to 65535.
296 For 32-bits: 0x00000000 -> 0xFFFFFFFF = 0 to 4294967295.
299 For 8-bits : 0x00 -> 0x7F = 0 to 127.
300 0x80 -> 0xFF = -127 to -1.
301 For 16-bits: 0x0000 -> 0x7FFF = 0 to 32767.
302 0x8000 -> 0xFFFF = -32768 to -1.
303 For 32-bits: 0x00000000 -> 0x7FFFFFFF = 0 to 2147483647.
304 0x80000000 -> 0xFFFFFFFF = -2147483648 to -1.