Delta Blast Burn Posted July 13, 2013 Share Posted July 13, 2013 So i'm trying create a code to fix the fact that my R button no longer works. What i've got is below. Basically what trying to accomplish is when I press Start the game thinks I'm pressing R as well. If anyone has, or can think of a better implementation, please let me know. 94000130 FFF70000 24000131 000000fe D2000000 00000000 Link to comment Share on other sites More sharing options...
evandixon Posted July 13, 2013 Share Posted July 13, 2013 If it works, a side effect of that code would be that a few other buttons will be nonfunctional when start is pressed. I don't know how to do a single bit write to fix that though. Link to comment Share on other sites More sharing options...
Kaphotics Posted July 13, 2013 Share Posted July 13, 2013 I don't think I've ever used the R button besides switching boxes quickly... and even then you can just hover over the box name and press right. If you need the R for AR codes, just change the activators before hand to use start instead of R. Link to comment Share on other sites More sharing options...
Delta Blast Burn Posted July 13, 2013 Author Share Posted July 13, 2013 I'm not not actually using it on a pokemon game, but I didn't think I should post for help with an ar code in general gaming. Link to comment Share on other sites More sharing options...
Demonic722 Posted July 13, 2013 Share Posted July 13, 2013 You can't write to that address (0x04000130); you can only read from it. If it works, a side effect of that code would be that a few other buttons will be nonfunctional when start is pressed. I think I know a way around this, but it isn't efficient. Delta Blast Burn: Do you have any knowledge of Assembly? 1. Set a breakpoint read on 0x04000130. 2. Alter the register that's being loaded into 0x04000130. 3. Create the AR Code (and add your checks, of course...). Here's an example (Animal Crossing: Wild World): 020E7E44 E59F1074 ldr r1,=0x04000130 020E7E48 E59F0074 ldr r0,=0x2FFF [color=green]020E7E4C E1D120B0 ldrh r2,[r1][/color] ;@this loads r2 (some button(s) that we're pressing/holding) into r1 ([color=green]0x04000130[/color]) -- change this! [color=blue]020E7E4C E3E02C01 mvn r2,#0x100[/color] ;@changed 020E7E50 E1D310B0 ldrh r1,[r3] AR Code: ::Start=R 520E7E44 E59F1074 ;@my check... 020E7E4C E1D120B0 ;@the original value (this keeps the rest of the buttons unaltered) 94000130 FFF70000 ;@are we pressing start? 020E7E4C E3E02C01 ;@if we are, now we're pressing R D2000000 00000000 ;@end Note: Other buttons are nonfunctional when Start is pressed. ::Start=R 520E7E44 E59F1074 ;@my check... 020E7E4C E1D120B0 ;@the original value (this keeps the rest of the buttons unaltered) 94000130 FFF70000 ;@are we pressing start? 020E7E4C EBFC606B ;@if we are, jump to [color=green]0x02000000[/color] (my sub is here) 02000000 E1D120B0 ;@ldrh r2,[r1] 02000004 E2222F42 ;@eor r2,r2,#0x108 (performs an XOR; 0x108 = Start+R) 02000008 E12FFF1E ;@bx lr; return D2000000 00000000 ;@end This code works fine when you're holding the Start button, but not so much for pressing it consecutively. In the end, it's just tedious. Link to comment Share on other sites More sharing options...
Delta Blast Burn Posted July 13, 2013 Author Share Posted July 13, 2013 (edited) Thanks Demonic, I'll post within the next day or two wether it works for my purpose. EDIT: It doesn't seem to work, but that might be because i have to have B pressed at that point. Edited July 16, 2013 by Delta Blast Burn Link to comment Share on other sites More sharing options...
Demonic722 Posted July 17, 2013 Share Posted July 17, 2013 EDIT: It doesn't seem to work, but that might be because i have to have B pressed at that point. What's the title of the game? Link to comment Share on other sites More sharing options...
Delta Blast Burn Posted July 17, 2013 Author Share Posted July 17, 2013 (edited) Solatorobo: Red the Hunter EDIT: Also it's probably worth mentioning i'm on a SuperCard DSTwo, not a retail cart, because it's more convenient than carrying around all my games. I'm currently in Connecticut, and all my games are in California. Edited July 17, 2013 by Delta Blast Burn Link to comment Share on other sites More sharing options...
Delta Blast Burn Posted July 17, 2013 Author Share Posted July 17, 2013 So I poked around in the RAM, via desmume, and, at the location you're hosting your script it appears there's already some code. Albiet, I'm looking there shortly after boot, because i can't get desmume to load my save. I'll look for some free space in the ram, and let you know if i find any. Link to comment Share on other sites More sharing options...
Delta Blast Burn Posted July 17, 2013 Author Share Posted July 17, 2013 It appears there's a small chunk of free space at 0x02091830 through 0x029192f. Link to comment Share on other sites More sharing options...
Demonic722 Posted July 18, 2013 Share Posted July 18, 2013 That Animal Crossing: Wild World code that I wrote in my other post is nasty. Here is a better one that should work flawlessly: ::Start = R E2000000 00000010 E1D120B0 E3120008 02222F42 E12FFF1E 520E7E4C E1D120B0 020E7E4C EBFC606B D2000000 00000000 If one of my codes is using 'R' as the activator, instead of reading from 0x04000130, find where the button mask is stored in the memory and read from it like this: 92030B6A 00002F00 12030B6C 0000D005 [color=green]921F4254 FEFF0100[/color] 12030B6C 0000E005 D2000000 00000000 I already do that in some of my codes and it's a good technique to pick up. This code has been tested and it works. Hold Start (as R) to Walk Anywhere. Here's your request: ::Start = R E2000000 00000010 E1D230B0 E3130008 02233F42 E12FFF1E 5203D2FC E1D230B0 0203D2FC EBFF0B3F D2000000 00000000 It seems like 'R' isn't needed in the beginning of the game so to test this, I remapped the buttons on my Walk Anywhere code: ::Walk Anywhere 52198A30 E3580000 02198A34 0A000006 9221B240 FEFF0100 02198A34 EA000006 D2000000 00000000 Hold Start (as R) to walk anywhere. A few more things to note: * This works when holding and pressing consecutively. * Other buttons are functional as well. Link to comment Share on other sites More sharing options...
Demonic722 Posted July 23, 2013 Share Posted July 23, 2013 Can you give me some feedback on this? Link to comment Share on other sites More sharing options...
Delta Blast Burn Posted July 23, 2013 Author Share Posted July 23, 2013 My bad, I still haven't tried it yet, i'll be sure to post an update by midnight est. Link to comment Share on other sites More sharing options...
Delta Blast Burn Posted July 24, 2013 Author Share Posted July 24, 2013 Sorry for the late reply, But it doesn't work but I think my problem may be that I'm in a flashcart, although I cant't recall wether or not other asm codes work. As previously mentioned I'm on a supercard dstwo with the latest os and firmware. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now