Jump to content

Help with a code


Delta Blast Burn

Recommended Posts

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

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

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

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