1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
|
omments: 1
A Compendium of GameCube Action Replay Code Types
Note: This is note 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.
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.
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, 800067503.
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 and kill your cat (R.I.P. Snowball).
---Signed & Unsigned Numbers---
Unsigned means :
For 8-bits : 0x00 -> 0xFF = 0 to 255.
For 16-bits: 0x0000 -> 0xFFFF = 0 to 65535.
For 32-bits: 0x00000000 -> 0xFFFFFFFF = 0 to 4294967295.
Signed means :
For 8-bits : 0x00 -> 0x7F = 0 to 127.
0x80 -> 0xFF = -127 to -1.
For 16-bits: 0x0000 -> 0x7FFF = 0 to 32767.
0x8000 -> 0xFFFF = -32768 to -1.
For 32-bits: 0x00000000 -> 0x7FFFFFFF = 0 to 2147483647.
0x80000000 -> 0xFFFFFFFF = -2147483648 to -1.
|