Kodewerx

Our culture has advanced beyond all that you could possibly comprehend with one hundred percent of your brain.
It is currently Thu Feb 12, 2026 2:01 am

All times are UTC - 8 hours [ DST ]


Forum rules





Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Wed Oct 03, 2007 11:54 am 
Offline
Kommunist
Kommunist

Joined: Sat May 12, 2007 3:26 am
Posts: 6
Hi there.

About a week ago, my DS accidentally took a bath (don't ask). Surprisingly, it still works.
However, I have a serious problem - the L button is constantly detected as 'pressed' (although, when I opened the console up, everything seemed fine ...). Not only does this me disable to play my fresh copy of The Legend of Zelda (I picked up a boomerang and it's constantly equipped now), I can't even play my favourite series, Phoenix Wright (pressing doesn't work). My warranty ran out already and I can't send it for repairs, since the store won't take it and there's no Nintendo offices in my country. :(

The thing is, I'm completely broke, and won't be able to afford a new DS for ~2 months.
Only disabling the L button would, however, make it possible for me to play most of the games, as usually the functions mapped on the L button can also be accessed from somewhere else (X in Mario Kart, touchscreen in TLZ and PW, Bomberman doesn't even use it).

So, if this kind of code is possible, could any good soul help me out?
Thanks a bunch.


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 03, 2007 1:12 pm 
I probably screwed this up and someone smart like kenobi will have to come by and fix this, but here's what I got:

D5000000 FFFF0200
023FE424 E0033004
D4000000 04000130

Here's what I did. The GBA buttons are stored at 0x04000130, like they are on the GBA. This includes L. When no buttons are pressed, the 16-bit value there is 0x03FF. When L is pressed, it is 0x01FF. To make the NDS think L is never pressed, we would need a constant AND value there of 0x200.

So I used the D5 code type to load 0x200 into the data register. Now, the AR DS provides no constant AND code type; however, kenobi made a hack, which is what that second line does; it makes the D4 code type act like a constant AND. So the third line takes the data register (0x200) reads the value at 0x04000130 and ANDS it.

The reason why the value for the first line is actually 0xFFFF0200 is because my guess is that the D4 code takes a 32-bit value, and we don't want to change the 16-bits that would be at 0x04000132. Since the GBA/NDS is little-endian, the FFFF goes in the upper-half of the value.


Top
  
Reply with quote  
PostPosted: Thu Oct 04, 2007 6:00 am 
Offline
Kommunist
Kommunist

Joined: Sat May 12, 2007 3:26 am
Posts: 6
No, it doesn't work ... :(
Thanks for trying, though. Hmm ...


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 04, 2007 11:02 am 
Offline
Kommunist
Kommunist

Joined: Tue Oct 10, 2006 9:32 am
Posts: 445
You'll need a different hack for each game you're playing.

For exemple, this should make Zelda US think the L button is always unpressed :
5202AE4C 00002FFF
0202AE4C 00002DFF
D2000000 00000000

(didn't tried it yet, but it should work).

If that works, here is what you can try :
If you have no$gba debugger version, and a rom of your game, put a bpr on 0x04000130. Then, you might see a 'ldr r0,=2FFFh' close to the break address. Now scroll down to find when the '0x00002FFF' value lies (for zelda it's at 0202AE4C), and update the code I made with the address you found.

If you have the TT, make a full ram dump and search for '04000130' with an hex editor (might have to byteswap, ie. look for '30010004'). Look around it to see if you have a 0x00002FFF (0xFF2F0000). If yes, convert the position in the file of 0x00002FFF to an address (by adding 0x02000000 to it ; if the position in the file is 0x02AE1C, the address would be 0x0202AE1C), and use that address you created to update my code.

It should also be possible to create a tool that could find the address to patch using a rom file, but that would be a bit hard/long to do - at least for me (would have to decompress the NDS executables, find their address in memory...). But that could be interessing.

However, that would not be good enought for all games. For exemple, Pokémons games' pad reading routines are not in ARM, but in THUMB (and I'm not sure the 0x00002FFF is used in THUMB).

Of course, if you don't have neither no$gba debugger version, nor the TT, you'll have to ask for codes to be made for each of your game.

Edit : I made my hack based on the japanese games, so the address for the code was wrong. It's corrected now (code is for the US game). I also tested the code, and it works (for exemple, if I press Start+Select+L+R with the code on, the game won't reboot, hence it thinks the L key is not pressed).


Last edited by kenobi on Thu Oct 04, 2007 12:54 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 04, 2007 12:48 pm 
Offline
Kommunist
Kommunist
User avatar

Joined: Sun May 27, 2007 7:43 pm
Posts: 775
Location: Makai
Title: The HENTAI M@ster
kenobi wrote:
You'll need a different hack for each game you're playing.

For exemple, this should make Zelda US think the L button is always unpressed :
5202AE4C 00002FFF
0202AE4C 00002DFF
D2000000 00000000

(didn't tried it yet, but it should work).

If that works, here is what you can try :
If you have no$gba debugger version, and a rom of your game, put a bpr on 0x04000130. Then, you might see a 'ldr r0,=2FFFh' close to the break address. Now scroll down to find when the '0x00002FFF' value lies (for zelda it's at 0202AE4C), and update the code I made with the address you found.

If you have the TT, make a full ram dump and search for '04000130' with an hex editor (might have to byteswap, ie. look for '30010004'). Look around it to see if you have a 0x00002FFF (0xFF020000). If yes, convert the position in the file of 0x00002FFF to an address (by adding 0x02000000 to it ; if the position in the file is 0x02AE1C, the address would be 0x0202AE1C), and use that address you created to update my code.

It should also be possible to create a tool that could find the address to patch using a rom file, but that would be a bit hard/long to do - at least for me (would have to decompress the NDS executables, find their address in memory...). But that could be interessing.

However, that would not be good enought for all games. For exemple, Pokémons games' pad reading routines are not in ARM, but in THUMB (and I'm not sure the 0x00002FFF is used in THUMB).

Of course, if you don't have neither no$gba debugger version, nor the TT, you'll have to ask for codes to be made for each of your game.

Edit : I made my hack based on the japanese games, so the address for the code was wrong. It's corrected now (code is for the US game). I also tested the code, and it works (for exemple, if I press Start+Select+L+R with the code on, the game won't reboot, hence it thinks the L key is not pressed).



bpr? isn't that a breakpoint? heh, i guess you have the debugger version.

edit: err. it's really the debugger XD i didn't read the other part lol

_________________
Image
DO NOT send me code requests/conversions via pm. I DON'T GIVE PERMISSION, READ THE FUCKING RULES.
I Hate You So Much!!! Fuck & Peace!

Everyone has AIDS!
My grandma and my dog 'ol blue
My father
My sister
My uncle and my cousin and her best friend
The pope has got it and so do you.


My SITE

My Official Code Breaker DS Codes


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 05, 2007 8:01 am 
Offline
Kommunist
Kommunist

Joined: Sat May 12, 2007 3:26 am
Posts: 6
kenobi, it works beautifully. Thanks a lot.
Although I see the method is a bit complicated (as I don't have either the TT or no$gba),
I'm currently satisfied with it. I'll just have to stop being a cheapskate and buy myself a new DS. :)


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 05, 2007 8:42 am 
Offline
Kommunist
Kommunist

Joined: Tue Oct 10, 2006 9:32 am
Posts: 445
Glad to hear it worked properly. If you need another code while waiting for a new DS, for Phoenix Wright for exemple, don't hesitate to ask.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 112 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group