View Full Version : AR code triggers
dslite4000
Apr 14th, 2009, 11:50 AM
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.
Greencat
Apr 14th, 2009, 10:21 PM
That's pretty interesting. I'm guessing you can switch them around to get things like the Secret Key by pressing Start.
dslite4000
Apr 15th, 2009, 08:25 AM
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.
Arceus010
Apr 15th, 2009, 06:53 PM
Are these code for platinum or Diamond Pearl?
damio
Apr 15th, 2009, 08:17 PM
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.
evandixon
Apr 17th, 2009, 05:43 PM
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:
http://www.uniquegeeks.net/images/DS HEX BTN VALS.png (http://us.codejunkies.com/support_downloads/Trainer-Toolkit-for-Nintendo-DS-User-Manual.pdf)
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.
mjplanet
Apr 18th, 2009, 09:59 AM
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
Concorde105
Apr 18th, 2009, 10:20 AM
That stinks, mjplayer. And this is a really interesting topic... :) Thanks for teh infoz. :p
Jiggy-Ninja
Apr 18th, 2009, 03:06 PM
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:
http://www.uniquegeeks.net/images/DS HEX BTN VALS.png (http://us.codejunkies.com/support_downloads/Trainer-Toolkit-for-Nintendo-DS-User-Manual.pdf)
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.
derrick
Apr 29th, 2009, 04:30 PM
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
matthewbauer
May 3rd, 2009, 10:27 PM
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
matthewbauer
May 4th, 2009, 05:41 PM
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.
Jiggy-Ninja
May 8th, 2009, 11:34 PM
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.
PowerlessSoul
May 10th, 2009, 11:51 AM
that would be nice....
matthewbauer
May 16th, 2009, 06:01 PM
It looks like you can log in to the wiki now, I'd suggest if you did make a guide you should put it on that, so it's easier to get to than navigating through the forum.
Tsubasa
May 17th, 2009, 07:39 AM
awsome my l+r button got shatter and when I try to do it , I need my sister ds T_T
evandixon
May 29th, 2009, 06:52 PM
The one for checking Y is:
9237211c f7ff0800
I would post the one for X, but my Trainer Toolkit broke long abo, so I can't search for it.
Jiggy-Ninja
May 29th, 2009, 07:10 PM
The one for checking Y is:
9237211c f7ff0800
I would post the one for X, but my Trainer Toolkit broke long abo, so I can't search for it.
It's probably 9237211C FBFF0400.
matthewbauer
May 30th, 2009, 12:02 AM
I've added this to the wiki (http://projectpokemon.org/wiki/Nintendo_DS_Button_Mappings).
Narwhal
Jun 12th, 2009, 09:05 PM
This was very helpful! *thumbs up* My AR codes feel more "code-like" now! :D
Narwhal
Oct 19th, 2009, 08:08 PM
Wow, this thread is quiet. :\
YuzuruHitokiri
Oct 20th, 2009, 08:14 AM
Probably, because code triggers is a very limited topic (and a basic one too)...
Pingouin7
Nov 13th, 2009, 05:42 PM
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?
matthewbauer
Nov 13th, 2009, 05:55 PM
I just used this website as a source: http://doc.kodewerx.org/hacking_nds.html#ar_activators
matthewbauer
Dec 13th, 2009, 11:32 PM
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.
Pingouin7
Dec 14th, 2009, 08:47 PM
Yeah, cool!
Now I can have codes to activate once I fold the DS screen.
matthewbauer
Dec 14th, 2009, 11:00 PM
It should work, but I haven't tested it so...
Soldjermon
Dec 19th, 2009, 11:03 AM
although that this is a limited topic to discuss, but the debug button.. I wonder where that is located on the DS.. hmm.. o.o I've always been curious about that one, because I love debug stuff.
- Soldjermon
Powered by vBulletin™ Version 4.0.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.