Jump to content

Recommended Posts

Posted

As the title suggests, I have a problem.

My problem is that my L button does not work, and I would really like to be able to. use a AR code to choose what wild Pokemon I encounter, for Platinum, HeartGold, SoulSilver, Black and White. I would therefore appreciate it if someone could make codes for those games so that I could to that.

Posted

x/y/touchscreen don't run off of 4000130. they run off of 2FFFFA8. keep that in mind if you're going to use one of them. gonna fix that wiki article, too...

e: for further clarification, 4000130 was also used in the gba for input. it retains the classic(gba) button map, but doesn't handle the new(nds-only) map.

e: article partially fixed.

Posted (edited)
x/y/touchscreen don't run off of 4000130. they run off of 2FFFFA8. keep that in mind if you're going to use one of them. gonna fix that wiki article, too...

e: for further clarification, 4000130 was also used in the gba for input. it retains the classic(gba) button map, but doesn't handle the new(nds-only) map.

e: article partially fixed.

They also "run off of" 0x04000136. X button read being "94000136 FFFE0000" and the Y button read being "94000136 FFFD0000". It's sort of like saying the "X" button uses the same value as the "A" button (0x1), and Y button uses the same value as the "B" button (0x2) in that format. Those, of course, are the values when you "NOT" 0xFFFE and 0xFFFD. :)

Edited by Demonic722
Posted

change The trigger. What to do is locate the line that say's 94000130 FCFF0000

Then change the trigger to Start by Replacing the line up there to: 94000130 FFF70000.

hope this helps P.S this will not work for platinum because it use's L R Select but thats to complicated to change

Posted
change The trigger. What to do is locate the line that say's 94000130 FCFF0000

Then change the trigger to Start by Replacing the line up there to: 94000130 FFF70000.

hope this helps P.S this will not work for platinum because it use's L R Select but thats to complicated to change

Are you referring to this code(?):

94000130 FDFF0000 //check if L  is pressed
B2101D40 00000000
D9000000 00111D10
C0000000 0000000C
DC000000 00000004
D6000000 000233E8
D1000000 00000000
C0000000 0000000A
D6000000 000233E8
D2000000 00000000
94000130 FEFF0000 //check if R is pressed
B2101D40 00000000
D9000000 00111D10
C0000000 0000000C
D6000000 000233E8
DC000000 00000004
D2000000 00000000
94000130 FFFB0000 //check if select is pressed
B2101D40 00000000
DA000000 00111D10
D4000000 00002400
D3000000 00000000
D7000000 0207404C
D2000000 00000000

Edit:

Instructions: This code uses the Poketech Calculator. First, you input the National Pokedex Number of the Pokemon you want, in this case, Charmander, which is 4. You then hit your [L] trigger button, then clear. Next, put in the level you want, in this case, 10, then hit the [R] trigger button, then clear. Finally, input in the nature you want, in this case, Adamant [3], then press select. You will then run into a level 10 Charmander with Adamant nature. Note, when using this code with Shiny Pokemon Code, the nature part will not work.

Corresponding Nature and Number List:

0) Hardy

1) Lonely

2) Brave

3) Adamant

4) Naughty

5) Bold

6) Docile

7) Relaxed

Impish

9) Lax

10) Timid

11) Hasty

12) Serious

13) Jolly

14) Naive

15) Modest

16) Mild

17) Quiet

1 Bashful

19) Rash

20) Calm

21) Gentle

22) Sassy

23) Careful

24) Quirky

Posted
They also "run off of" 0x04000136. X button read being "94000136 FFFE0000" and the Y button read being "94000136 FFFD0000".

Sorta like saying the "X" button uses the same value as the "A" button (0x1), and Y button uses the same value as the "B" button (0x2) in that format.

Those of course are the values when you "NOT" 0xFFFE and 0xFFFD. :)

i just checked, no they don't. every bit of documentation i've ever read says that 2FFFFA8 is the x/y input location.

Posted (edited)

Have you tried it on a DS rather than an emulator? They both work and actually, the NDS buttons you are referring to are located at 0x027FFFA8.

927FFFA8 FBFF0000 //read X (NOT value 0x0400)
927FFFA8 F7FF0000 //read Y (NOT value 0x0800)

Here's just two simple images to backup that 0x04000136 could be used as well:

Czffi.png

hSf9g.png

0x027FFFA8 is the most common read for the NDS X and Y buttons though.

Edited by Demonic722
Posted

the ds ram is mirrored. 27FFFA8 is not more common than 2FFFFA8. they're the same thing. not to mention, the game uses 2FFFFA8, not 27FFFA8:

RAM:02088180 ; S U B R O U T I N E =======================================
RAM:02088180
RAM:02088180
RAM:02088180 getParams__                             ; CODE XREF: Seed.Create__+14p
RAM:02088180                                         ; sub_20595A0+14p
RAM:02088180                 STMFD   SP!, {R4-R6,LR}
RAM:02088184                 LDR     R1, VCOUNT      ; VCOUNT @ =0x4000006
RAM:02088188                 MOV     R5, R0
RAM:0208818C                 LDRH    R6, [R1]           ; *VCOUNT into R6
RAM:02088190                 LDR     R4, =0x2FFFC00 ; base value used for grabbing loads of values
RAM:02088194                 BL      getTimer0__
RAM:02088198                 ORR     R0, R0, R6,LSL#16 ;(*VCOUNT << 16) | *timer0
RAM:0208819C                 STR     R0, [R5]
RAM:020881A0                 LDR     R0, =0x2151358
RAM:020881A4                 LDRH    R1, [R4,#0xF8]
RAM:020881A8                 LDR     R2, [R0]
RAM:020881AC                 LDR     R3, [R0,#4]
RAM:020881B0                 EOR     R1, R2, R1,LSL#16
RAM:020881B4                 STR     R1, [R5,#4]
RAM:020881B8                 LDR     R2, [R0]
RAM:020881BC                 LDR     R2, GxStat           ; GxStat @ =0x4000600
RAM:020881C0                 LDR     R1, [R0,#4]
RAM:020881C4                 LDR     R0, [R4,#0xF4]
RAM:020881C8                 LDR     R3, [R4,#0x3C]
RAM:020881CC                 EOR     R0, R1, R0
RAM:020881D0                 EOR     R3, R3, R0
RAM:020881D4                 STR     R3, [R5,#8]
RAM:020881D8                 LDR     R1, [R2]
RAM:020881DC                 ADD     R0, R4, #0x300
RAM:020881E0                 EOR     R1, R3, R1
RAM:020881E4                 STR     R1, [R5,#8]
RAM:020881E8                 LDR     R1, [R4,#0x1E8] ; grab the date
RAM:020881EC                 SUB     R2, R2, #0x4D0  ; gxstat(4000600)-4D0 = 4000130(gba-compatible controller input)
RAM:020881F0                 STR     R1, [R5,#0xC]
RAM:020881F4                 LDR     R3, [R4,#0x1EC] ; grab the time
[b][u][i]RAM:020881F8                 ADD     R1, R4, #0x3A8  ; 2FFFFA8 - nds-compatible input[/i][/u][/b]
RAM:020881FC                 STR     R3, [R5,#0x10]
RAM:02088200                 LDRH    R12, [R0,#0x94]
RAM:02088204                 LDR     R3, [R4,#0x390]
RAM:02088208                 EOR     R3, R3, R12,LSL#16
RAM:0208820C                 STR     R3, [R5,#0x14]
RAM:02088210                 LDRH    R4, [R0,#0xAA]
RAM:02088214                 LDRH    R3, [R0,#0xAC]
RAM:02088218                 ORR     R3, R3, R4,LSL#16
RAM:0208821C                 STR     R3, [R5,#0x18]
RAM:02088220                 LDRH    R2, [R2]        ; get gba-compatible input
RAM:02088224                 LDRH    R1, [R1]        ; get nds-only input
RAM:02088228                 LDRH    R3, [R0,#0x98]
RAM:0208822C                 ORR     R0, R2, R1      ; OR the inputs together to make 1 number: (3FF | 2C00) = 2FFF, etc
RAM:02088230                 ORR     R0, R0, R3,LSL#16
RAM:02088234                 STR     R0, [R5,#0x1C]
RAM:02088238                 LDMFD   SP!, {R4-R6,PC}
RAM:02088238 ; End of function getParams__
RAM:02088238
RAM:02088238 ; ---------------------------------------------------------------------------
RAM:0208823C dword_208823C   DCD                     ; DATA XREF: getParams__+4r
RAM:02088240 dword_2088240   DCD 0x2FFFC00           ; DATA XREF: getParams__+10r
RAM:02088244 dword_2088244   DCD 0x2151358           ; DATA XREF: getParams__+20r
RAM:02088248 dword_2088248   DCD                     ; DATA XREF: getParams__+3Cr
RAM:0208824C

also, i did some reading and you seem to have missed the part where 4000136 is only used for nds-compatible input by the arm7, not the arm9. obviously that's why i didn't see it and why it works with the ar. the ar hooks the arm7 by default.

e: and considering that 4000136 is arm7-only, while 2FFFFA8 is the same for both cpus, there's a good reason to stay consistent and use 2FFFFA8 and not 4000136.

Posted (edited)

The reason I say 0x027FFFA8 is more common because in most codes (even in the codejunkies codes), 0x027FFFA8 is more commonly used than 0x02FFFFA8. I honestly have never seen 0x02FFFFA8 being used, but in the end they all are doing the same thing. I normally use 0x027FFFA8 when using X or Y as an activator, but then again, I try to work around using NDS buttons for activators since the game(s) tend to use them for something else. Anyway, thanks for sharing that with me.

questioner, for the broken L button, you could actually trick the game into thinking that the current button you're pressing is actually the "L" button (with a debugger of course). If you just want it changed to something else you could use this:

GBA Button Address: 0x04000130
NDS Button Address: 0x027FFFA8/0x02FFFFA8

GBA Buttons:
0x0001, 0xFFFE @A Button
0x0002, 0xFFFD @B Button
0x0004, 0xFFFB @Select Button
0x0008, 0xFFF7 @Start Button
0x0010, 0xFFEF @Right Button
0x0020, 0xFFDF @Left Button
0x0040, 0xFFBF @Up Button
0x0080, 0xFF7F @Down Button
0x0100, 0xFEFF @R Button
0x0200, 0xFDFF @L Button

NDS Buttons:
0x0400, 0xFBFF @X Button
0x0800, 0xF7FF @Y Button

Select one of those and change all the ones I labeled as "L button," "R button," and "Select Button" in the code.

Edit 1: Looking into another game with a debugger (non-Pokémon game) also sets the NDS buttons to 0x027FFFA8 in r3, while the GBA buttons are in r1. Although showing which registers they're in is relatively irrelevant, what stands out in the picture is 0x027FFFA8.

Edit 2: Next to the first image happens to be Pokémon Platinum using that very same address. Over on Kodewerx, they have this, "All commercial DS games share two universal activators, one used for handling all the buttons the GBA has and another used for the DS-unique buttons. The address for the GBA buttons is at 0x04000130, and the address for DS-specific button address is located at 0x027FFFA8." Anyway, I love learning new things so I really do appreciate your clarification as it was something I wasn't used to seeing.

k1DlQ.pnghbCDF.png

Edited by Demonic722
Posted

i'm wondering if possibly nintendo's sdk has changed default spots, then.

RAM:02035F50 ; =============== S U B R O U T I N E =======================================
RAM:02035F50
RAM:02035F50
RAM:02035F50 keypressHandler__                       ; CODE XREF: sub_20360C0+8p
RAM:02035F50                 STMFD   SP!, {R3-R5,LR}
RAM:02035F54                 MOV     R5, R0
RAM:02035F58                 BL      sub_2035234
RAM:02035F5C                 LDR     R3, =0x2FFFFA8  ; This for new(NDS-only) buttons
RAM:02035F60                 MOV     R4, R0
RAM:02035F64                 LDRH    R0, [R3]
RAM:02035F68                 AND     R0, R0, #0x8000
RAM:02035F6C                 MOVS    R0, R0,ASR#15
RAM:02035F70                 BEQ     keypressGBA__
RAM:02035F74                 MOV     R0, #0
RAM:02035F78                 STR     R0, [R4,#0x1C]
RAM:02035F7C                 STR     R0, [R4,#0x18]
RAM:02035F80                 STR     R0, [R4,#0x20]
RAM:02035F84                 STR     R0, [R4,#0x28]
RAM:02035F88                 STR     R0, [R4,#0x24]
RAM:02035F8C                 STR     R0, [R4,#0x2C]
RAM:02035F90                 LDMFD   SP!, {R3-R5,PC}
RAM:02035F94 ; ---------------------------------------------------------------------------
RAM:02035F94
RAM:02035F94 keypressGBA__                           ; CODE XREF: keypressHandler__+20j
RAM:02035F94                 LDR     R0, =0x4000130  ; This is for all buttons that carried over from the GBA
RAM:02035F98                 LDR     R2, [R4,#0xC]
RAM:02035F9C                 LDRH    R1, [R0]
RAM:02035FA0                 LDRH    R0, [R3]
RAM:02035FA4                 ORR     R0, R1, R0
RAM:02035FA8                 EOR     R0, R0, R3,LSR#12
RAM:02035FAC                 AND     R0, R0, R3,LSR#12

(a piece of)the actual keypress handler from b/w.

or the dsi sdk uses it by default to leave room around 27XXXXX.

Posted

it's probably not a huge deal(because, really, who's using a debug console with an ar? and i doubt most people realize you can throw desmume or no$ into nds debug 8mb mode), but it probably does cut down on a very small percentage of people who can use a given code.

also, i dunno if you're aware of it, but pp has a decent collection of worthwhile breakpoints for dppt/hgss/bw and the gen 3 games. some are pretty useful for making codes or just figuring out how stuff works in general:

http://projectpokemon.org/wiki/Notable_Breakpoints

and i see what you're talking about with plat:

02017B9C B510     push    {r4,r14}                           ;1N+1ND+1SD
02017B9E B084     add     sp,-#0x10                          ;1S
[b]02017BA0 4A39     ldr     r2,=#0x27FFFA8                     ;1S+1ND+1I[/b]
02017BA2 2002     mov     r0,#0x2                            ;1S
02017BA4 8811     ldrh    r1,[r2]                            ;1S+1ND+1I
02017BA6 0380     lsl     r0,r0,#0xE                         ;1S
02017BA8 4008     and     r0,r1                              ;1S
02017BAA 13C0     asr     r0,r0,#0xF                         ;1S
02017BAC D009     beq     #0x2017BC2                         ;1N+2S
02017BAE 4837     ldr     r0,=#0x21BF67C                     ;1S+1ND+1I
02017BB0 2100     mov     r1,#0x0                            ;1S
02017BB2 6481     str     r1,[r0,#0x48]                      ;1N+1ND
02017BB4 6441     str     r1,[r0,#0x44]                      ;1N+1ND
02017BB6 64C1     str     r1,[r0,#0x4C]                      ;1N+1ND
02017BB8 4835     ldr     r0,=#0x21BF6BC                     ;1S+1ND+1I
02017BBA B004     add     sp,#0x10                           ;1S
02017BBC 8401     strh    r1,[r0,#0x20]                      ;1N+1ND
02017BBE 8441     strh    r1,[r0,#0x22]                      ;1N+1ND
02017BC0 BD10     pop     {r4,r15}                           ;1N+2S+1ND+1SD+1I
02017BC2 4834     ldr     r0,=#0x4000130                     ;1S+1ND+1I
02017BC4 8801     ldrh    r1,[r0]                            ;1S+1ND+1I
02017BC6 8810     ldrh    r0,[r2]                            ;1S+1ND+1I
02017BC8 4301     orr     r1,r0                              ;1S
02017BCA 4833     ldr     r0,=#0x2FFF                        ;1S+1ND+1I
02017BCC 4041     eor     r1,r0                              ;1S
02017BCE 4008     and     r0,r1                              ;1S

probably just how the dsi sdk organizes data.

Posted (edited)

Yeah, I just used Pokémon Platinum as a better example since this is a Pokémon forum. Also, you are right. It shouldn't be a big deal unless you're somehow using both in conjunction. That link is helpful as well. I'm glad I've decided to actually become active on this forum!

Edited by Demonic722
Posted (edited)
Ok, now my head REALLY hurts.

Unfortunately, I have no understanding of this sort of thing... sorry.

You'll have to be able to read ARM ASM to understand unless the source is commented out. If you still need the buttons altered on that code, list the button combinations you want them to be changed to and I'll look into it.

Edited by Demonic722
Posted

Well, for the HeartGold/SoulSilver and Black/White I just need the L+R changed to R.

For platinum, I basically need it so I can use R to choose species (calculator thing) and not worry about level.

Posted (edited)

What's your game region? This is for Pokémon Black/White (U/E) with R as the button to get the Master Balls and Select for the encounter (Credit to GBATemp).

::Catch Any Pokemon (R) (Select) v1
:::Press R to get 649 Master Balls and 100 Ultra Balls, Toss to change amounts to Pokemon number and level. Press Select before heading into grass.
94000130 FEFF0000
02233FAC 02890001
02233FB0 00640002
D2000000 00000000
94000130 FFFB0000
DA000000 02233FAE
D3000000 00000000
D7000000 02250010
D3000000 00000000
DA000000 02233FB2
D3000000 00000000
D7000000 02250012
D3000000 00000000
D9000000 02250010
D3000000 00000000
C0000000 0000002F
D6000000 02250010
D2000000 00000000

For platinum, I basically need it so I can use R to choose species (calculator thing) and not worry about level.

I interpreted this as...you want the species and the nature of the Pokémon, but not the level (correct me if I'm wrong).

Here's that Platinum Code as R for the Pokémon you want, and Select as the nature you want that Pokémon to have.

94000130 FEFF0000
B2101D40 00000000
D9000000 00111D10
C0000000 0000000C
DC000000 00000004
D6000000 000233E8
D1000000 00000000
C0000000 0000000A
D6000000 000233E8
D2000000 00000000
94000130 FFFB0000
B2101D40 00000000
DA000000 00111D10
D4000000 00002400
D3000000 00000000
D7000000 0207404C
D2000000 00000000

Edited by Demonic722
Posted

you know, blowing into the space between the L button and the DS can temporarily fix your L button. When it stops working, blow into it again.

Posted

Tried that. I had the problem that it was always pressed down, even when it wasn't, and I got annoyed, and half pulled the button off.

And Demonic722, thanks for the codes. You got the platinum one right, and the B&W one is good...

I'll get back to you with the HG&SS regions.

EDIT: HG&SS regions are both U.

Posted (edited)
And Demonic722, thanks for the codes. You got the platinum one right, and the B&W one is good...

No problem.

HG/SS:

94000130 FEFF0000
B2111880 00000000
00000D14 01ED0001
D2000000 00000000
94000130 FFFB0000
B2111880 00000000
DA000000 00000D16
C0000000 00000027
D7000000 00025A68
D2000000 00000000

Credit to GBATemp. Here's how this works: Press R to get 493 Master Balls and then Hold Select for Encounter. Master Balls==Pokémon Number so discard the quantity to meet that Pokémon number then hold Select for the encounter.

Edited by Demonic722

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...