FYI :
Here is an AR code that will autopatch the game when pressing Start+Select once (it'll replace all 0x04000130 with 0x02000000). Takes like 3~4 seconds to patch all the ram (0x02000000-0x02400000, by scanning 0x40 blocks of 0x00010000), and it lags the game a bit during that time :
source :
Code:
push {r0-r7}
ldr r0,values
ldrh r1,data
ldr r2,values+4
ldrh r3,data+2
cmp r1,#0
ldreqh r4,[r0]
tsteq r4,#4
tsteq r4,#8
cmpeq r1,#0
moveq r1,#1
streq r1,data
cmp r1,#1
bne end
mov r4,#0x02000000
add r5,r4,r3,lsl #0x10
add r3,#0x1
strh r3,data+2
add r6,r4,r3,lsl #0x10
loop:
ldr r7,[r5],#4
cmp r7,r0
streq r4,[r5,#-4]
cmp r5,r6
blt loop
cmp r3,#0x40
moveq r3,#0
streq r3,data
streq r3,data+2
end:
pop {r0-r7}
bx r14
values:
.word 0x04000130
.word 0x02400000
data:
.word 0x00000000
Compiled AR code :
Code:
023FE074 012FFF11
E0000000 00000084
E92D00FF E59F006C
E1DF17B0 E59F2068
E1DF36BA E3510000
01D040B0 03140004
03140008 03510000
03A01001 058F104C
E3510001 1A00000D
E3A04402 E0845803
E2833001 E1CF33B6
E0846803 E4957004
E1570000 05054004
E1550006 BAFFFFFA
E3530040 03A03000
058F3010 058F300E
E8BD00FF E12FFF1E
04000130 02400000
00000000 00000000
023FE074 E3520003
(tested on the hardware and working)
Then, this code should take care of reading the pad and the accelerator, and "join" them together :
source:
Code:
push {r0-r5}
mov r5,#0x04000000
ldr r5,[r5,#0x130]
ldrh r1,counter
add r1,r1,#1
strh r1,counter
mov r2,#0x0A000000
mov r3,#0x02000000
mov r4,#2
tst r1,#2
addne r4,#2
tst r1,#1
ldrneb r0,[r2]
ldreqb r1,[r2,r4]
beq end
tst r1,#2
bne Y
cmp r0,#0x71
biclt r5,#0x010
cmp r0,#0x8f
bicgt r5,#0x020
strh r5,counter+2
b end
Y:
ldrh r5,counter+2
cmp r0,#0x71
biclt r5,#0x040
cmp r0,#0x8f
bicgt r5,#0x080
strh r5,[r3]
end:
pop {r0-r5}
bx r14
counter:
.word 0x00000000
Compiled AR code :
Code:
023FE074 012FFF11
E0000000 00000080
E92D003F E3A05301
E5955130 E1DF16B8
E2811001 E1CF16B0
E3A0240A E3A03402
E3A04002 E3110002
12844002 E3110001
15D20000 07D21004
0A00000D E3110002
1A000005 E3500071
B3C55010 E350008F
C3C55020 E1CF52B2
EA000005 E1DF51BA
E3500071 B3C55040
E350008F C3C55080
E1C350B0 E8BD003F
E12FFF1E 00000000
023FE074 E3520003
(tested on the hardware and working).
(by hardware I mean DS+Trainer Toolkit).
The patcher should be a good think, because some games load some new routines in their memories, and that way the user should always be able to patch them if the accelerator suddently stops working (for exemple, when you enter a minigame, a special level, or things like that). Its danger is that some of the patched 0x04000130 could actually be some in-game values, or could used to access other registers...
Now as I don't have that accelerator thing, I can't test the Y axis (what value for UP, what value for DOWN). But I guess (hope) that for the rest it should work properly.
Also the code might look kinda poor (and maybe not optimized). But it works !
Edit : I've updated one or two things. If you've gotten the code before this message, get it again

Edit2 : Actually a very small lag is created when the game is patched, I guess because the pad values are only updated when the AR code handler has been executed 4 times.
I'll correct that in a couple of hours. (actually I'll look at it later...). Also, is there any sure way to detect if the accelerator is plugged ? I mean, if the user removes it, the asm routine could be able to detect that and then disable the accelerator support (until it has been plugged back).