Goomba Smackdown's Code Type Guide
When learning about code types, it is important to know how Action Replay codes actually work.
There are thousands of addresses in the game, and are represented by 7-digit codes. Let’s show an example of an address, from SM64DSv1.1:
2096121
This address shows which character you are in the game.
Values represent items and occurances in the address. In the 2096121 value, if you were Wario, the value would be 02. If you were Yoshi, the value at the address would be 03.
What Action Replay does is it constantly writes a given value to an address. If you wanted to always be Yoshi, you would write the value 04 to the address like this:
2096121 00000003
\ address/ \value/
But wait! Codes have 16 digits, not 15. The first digit (which is not in the above code) shows the code type. The code type is 2 in this case, so the code would look like
22096121 00000003
This guide shows you how to use code types, and what they do.
But first, here’s the key.
xxx= the address
yyy= your value
???= where the digit there doesn’t really matter at all
zzz= Um…you’ll see
nnn= The digits for how many times you want something to be repeated.
Here is the first code type:
0xxxxxxx yyyyyyyy
This writes the value (y) to the address (x) over and over. This is the most common code type.
1xxxxxxx ????yyyy
Like above, y is written to x. But the y value is 4 digits instead of 8
2xxxxxxx ??????yy
This code writes the 2-digit y value to x.
3xxxxxxx yyyyyyyy
Okay, things start to get a little complicated here. When the real value in the game (not generated by AR) is less than the y value you wrote, AR will activate the following codes you wrote after this line.
Example: If you wanted something to only work when you are not Wario and Yoshi, your code would look like this.
32096121 00000002 (because the in-game value would be greater than 02 when you’re Wario or Yoshi)
(your code here)….
4xxxxxxx yyyyyyyyy
This is like the above code, but it will only activate when the in-game-value is greater than the one you wrote.
5xxxxxxx yyyyyyyy
When the in-game-value at x is equal to the value you wrote, the following codes will activate.
If you wanted a code to activate only when you are Yoshi, Your code would look like
52096121 00000003 (your code here)
6xxxxxxx yyyyyyyy
When the in-game value at x is not equal to the y value you wrote, the following codes will be activated. The code “if the value at x not equal to zero then…” is used a lot so the address with your following codes will not be activated at the title screen.
7xxxxxxx zzzz0000
When the in-game value is less-than zzzz, the following codes will be activated.8xxxxxxx zzzz0000
Like above, but is activated when the in-game-value is greater-than zzzz.9xxxxxxx zzzz0000
When the in-game-value is equal-to zzzz, the following codes will be activated.Axxxxxxx zzzz0000
When the in-game-value is not-equal-to zzzz, the next codes will be activatedBxxxxxxx ????????
I will try to explain this as well as I can. In the game, there are pointers, which represent a lot of codes. For an example I will show the Size Code for SM64DSv1.162094a90 00000000 (makes sure the following code won’t work when the pointer is at 0)
b2094a90 00000000 (this somewhat activates the pointer. 2094a90 is the main pointer for SMDS)
10000084 00009000 (this code alters your height. It would do nothing if not for its pointer being activated)
D2000000 00000000 (You’ll see later)
C??????? nnnnnnnn
This line (which is put at the top of the code) shows how much the following codes will be repeated.
D0?????? ????????
This code ends the most recent code.
D1?????? ????????
This does not end the code, it just ends the repeat line (code type C)
D2?????? ????????
This ends the code and everything in it. Codes after the D2 line will act as if they were a completely different code.
D3??????? yyyyyyyy
The offset register (which you’ll learn about later) will be set with the y value.
D4?????? yyyyyyyy
Adds y value to the stored register.
D5?????? yyyyyyyy
Loads y value as the stored register.
D6?????? 0xxxxxxx
The stored value is written to the address x.
D7?????? 1xxxxxxx
Loads the last 4 digits of the stored register to x.
D8?????? 2xxxxxxx
Loads the last 2 digits of the stored register to x.
D9?????? xxxxxxxx
Basically a better D6.
DA?????? xxxxxxxx
A better D7
DB?????? Xxxxxxxx
A better D8
(The E & F code types are way too freakin complicated I don’t even really know how they work.)
Original Forum Topic for Comments and Discussions about this Action Replay DS Code Guide