|
Action Replay ExamplesThis section will demonstrate building a AR2 code from scratch. Example 1: Increment Command Say we want to increase our Cash value if R1 is pressed and held. There are two parts to this command: the Joker for the button-press, and the incrementing of the Cash value. The first part is easy. We'll use the Controller 1 Joker code that we detailed on the Joker Command page.
16-bit Value for R1 : 0800 Complete (encrypted) Joker Command: 0CC70EE6 1456B80C For the second part, we first need to know the actual address for the Cash value. This can be found by decrypting the Tons of Cash code: 1CC88750 17E9C70C decrypts to 20510428 05F5E0FF 0510428 is the address that the Cash value is stored at. (The second line of the code speeds up the counting when the Cash value is modified. Try it with only the first line and you'll see.) We will use this address in an 8-bit Increment Command: 301000nn aaaaaaaa
aaaaaaaa = 00510428 Complete (unencrypted) Increment Command: 30100001 00510428 Now we need to encrypt this code so it can be used with the AR2. 30100001 00510428 encrypts to 2C878329 1485EBBD Putting this together with our Joker Command gives us our completed code:
Press R1 to Increase Cash Example 2: Copy Bytes Command For this example, we'll create a code that will display the model number of Car #1 in your Staunton Island garage using the Clip Ammo value of the Pistol. For this code, we need to get two addresses. For the Car #1 model address, we'll decrypt FNG's Staunton Island Car Spawning code. To get the Pistol Clip Ammo address, we'll decrypt part of the official GameShark.com Infinite Pistol Ammo code.
The line of the Pistol Ammo code that we decrypted is for the Clip Ammo value. The other line is for the Total Ammo value. We'll use that code later. To display the Car #1 model number in the Pistol Clip Ammo, we'll use the Copy Bytes command: 5aaaaaaa nnnnnnnn aaaaaaa = 0677590 This means we are copying one (1) byte from the Car value address to the Clip Ammo address. Putting it together and encrypting the code, we get: 50677590 00000001 encrypts to 8CF2F6B8
1456E7A6 To avoid confusion if this is used in conjuction with the Staunton Car Scroller code, we'll probably want to lock the Pistol Total Ammo value at a constant value. To do this, we'll add the other half of the official GameShark.com Infinite Pistol Ammo code. Staunton Car Identifier Please send any additional information for this section to me at hellion00@comcast.net. |