Jump to content

AR code triggers


Recommended Posts

The first line of an AR code can define which buttons activate it.

I have been looking into the structure of the AR codes produced by Pokesav and found out the lines of code that dictate how to activate the code.

The code below, used to get the Secret Key, I made using Pokesav, and by default is activated when you press L and R.

94000130 FCFF0000 <== This line means you press L and R to activate

B2101D40 00000000

0000B5D4 0000000C

D2000000 00000000

Hovever, there are other ways to activate an AR code.

The Run through Walls code is activated when R and B are pressed, but is deactivated when L and B are pressed.

94000130 FCFD0200 <== This line means you press R and B to activate

12060C20 00000200

D2000000 00000000

94000130 FCFD0100 <== This line means you press L and B to activate

12060C20 00001C20

D2000000 00000000

The Restore Health in Battle code is activated when you press Start.

94000130 FFF70000 <== This line means you press Start to activate

62101D40 00000000

B2101D40 00000000

10047604 000003E7

10047608 000003E7

D2000000 00000000

The 1 Hit Kills in Battle code is activated when you press Select.

94000130 FFFB0000 <== This line means you press Select to activate.

621BFB0C 00000000

B21BFB0C 00000000

1000504C 00000001

D2000000 00000000

A code I found online to keep the Wall from crumbling in the Underground is activated when you hold R.

94000130 FEFF0000 <== This line means you hold R to activate

B2101D40 00000000

2012BCE3 000000C4

D2000000 00000000

That is all I have for now.

Edited by dslite4000
incomplete post
Link to comment
Share on other sites

That's pretty interesting. I'm guessing you can switch them around to get things like the Secret Key by pressing Start.

Yes, you can switch around the lines of code to get codes like pressing start to activate the Run through Walls code and select to deactivate it.

Link to comment
Share on other sites

94000130 FCFF0000 L+R
94000130 FEFD0000 R+B
94000130 FCFF0000 Select+L+R
94000130 FFFB0000 Select
94000130 FEBF0000 R+Up
94000130 FFBB0000 Select+Up
94000130 FDBF0000 L+Up
94000130 FD7F0000 L+Down
94000130 fff70000 Start
94000130 fdfb0000 Select+L
94000130 fdff0000 R
94000130 FFFF0000 Select + Start

I have found all of these ones, so you can swap which buttons your press to one of these.

Link to comment
Share on other sites

Now to explain how it works.

94000130 FCFF0000

The 9 is the 16bit "Is Equal" instruction. It checks to see if 0x04000130 is equal to FCFF. 0x04000130 is the location in the DS's RAM (Random Access Memory) that moniters GBA buttons, so X and Y are not monitered in it. When you hold down L+R, then the value in 0x04000130 becomes FCFF.

Confused?

If you are, then you have no hope of creating ARDS codes with a Trainer Toolkit.

-------------------------------------------------------------------------------------------

List of values:

DS HEX BTN VALS.png

When you take the value, you will need to put 2 F's around it, to make sure that it works when there are other buttons pressed.

----------------------------------------------------------------------------------------------

Are these code for platinum or Diamond Pearl?

This works for any DS game.

Link to comment
Share on other sites

When you take the value, you will need to put 2 F's around it, to make sure that it works when there are other buttons pressed.

How do you know if you put the F's before or around the value?

thanks for this. My L and R buttons are broken

Edited by mjplanet
forgot
Link to comment
Share on other sites

Now to explain how it works.

94000130 FCFF0000

The 9 is the 16bit "Is Equal" instruction. It checks to see if 0x04000130 is equal to FCFF. 0x04000130 is the location in the DS's RAM (Random Access Memory) that moniters GBA buttons, so X and Y are not monitered in it. When you hold down L+R, then the value in 0x04000130 becomes FCFF.

Confused?

If you are, then you have no hope of creating ARDS codes with a Trainer Toolkit.

-------------------------------------------------------------------------------------------

List of values:

DS HEX BTN VALS.png

When you take the value, you will need to put 2 F's around it, to make sure that it works when there are other buttons pressed.

----------------------------------------------------------------------------------------------

This works for any DS game.

Slightly incorrect.

The template for the code is:

9XXXXXXX ZZZZYYYY : 16 bit "Is Equal To" conditional instruction.

XXXXXXX is the address to look at, YYYY is the value to check against, and ZZZZ is a mask. I'll get to that.

Each of the 16 bits at 0x04000130 represents one button. All of the values are 1 by default, and are changed to 0 as long as the button is pressed.

The value for YYYY should always be 0, and the mask singles out specific bits to look at so that the other bits don't affect the value. All the bits that are 1 in the mask "cover up" the real bits in the value and make them look like 0s, while the 0s are like holes in the mask that let the real value through.

FEFF in Binary is 1111 1110 1111 1111

FDFF in Binary is 1111 1101 1111 1111

This means bit 9 refers to the R button, and bit 8 to the L button. In order to make a code that only activates when both are pressed, you need to combine the masks to make:

1111 1100 1111 1111, which is FCFF.

By setting bits in the YYYY value equal to one, you can make codes that activate when a button is pressed as long as another button is not pressed at the same time. For example:

94000130 FCFF0100

(Binary for 0100 is 0000 0001 0000 0000)

This makes a code that will activate when R is pressed and L is not pressed. Try it by holding L, pressing R, then releasing L. The code won't activate that way. This happens because:

1) When neither button is pressed, the masked value is 0300.

2) When L is pressed, the masked value is 0200.

3) When R is pressed while L is held, the masked value is 0000. Since this isn't equal to 0100, it won't trigger the code.

---------- Post added at 03:06 PM ---------- Previous post was at 03:06 PM ----------

How do you know if you put the F's before or around the value?

thanks for this. My L and R buttons are broken

They go before the value.

Link to comment
Share on other sites

  • 2 weeks later...

thats really helpful for people who have broken r or l buttons and you can activate two codes that used to be the same trigger and would activate at the same time (i hated that) and only activate one code at a time so like for rebattle codes you could activate darkrai with l and r the shaymin with start or some thing

Link to comment
Share on other sites

Here's what I've gathered, it's built on other people's work. I'd put it on the Wiki but it seems they aren't accepting new users.

Name Binary Hex

L 1111110111111111 FDFF

R 1111111011111111 FEFF

Down 1111111101111111 FF7F

Up 1111111110111111 FFBF

Right? 1111111111011111 FFDF

Left? 1111111111101111 FFEF

Start 1111111111110111 FFF7

Select 1111111111111011 FFFB

B 1111111111111101 FFFD

A? 1111111111111110 FFFE

? means I'm not sure and just guessing

And for multiple button press

B > A

A & B = Button

B - (A - B) = C

Link to comment
Share on other sites

Also is 9 the universal hexadecimal command for if? or is it ARM specific?

And is 0 the universal hexadecimal command for write?

Because I think I've seen cheats for other consoles (the Wii) that use different numbers for if.

And is there a list of commands on a website? Google didn't help me at all.

Link to comment
Share on other sites

Also is 9 the universal hexadecimal command for if? or is it ARM specific?

And is 0 the universal hexadecimal command for write?

Because I think I've seen cheats for other consoles (the Wii) that use different numbers for if.

And is there a list of commands on a website? Google didn't help me at all.

It's specific to the Action Replay DS.

http://doc.kodewerx.org/hacking_nds.html#arcodetypes

I could write a totally comprehensive guide about this, if anyone wants.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 4 months later...
  • 4 weeks later...
  • 1 month later...
I noticed on the Wiki there's an hex for when the DS is opened.

Is there an hex for when the DS screen is closed?

Well if its closed, then its not not folded, so you could have a code like this:

A4000130 7FFF0000
CODE
D2000000 00000000

Because AXXXXXXX YYYY0000 is the "if not" command in Action Replay.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...