Makes links from other routines not break 0800733C 4B0D ldr r3,=3001244h 08007342 F7FEFF7D bl 8006240h Go to 8006240 0800777C 4B17 ldr r3,=3001244h 080078A4 4BB0 ldr r3,=3001244h Check whether to accelerate or not 08006926 480A ldr r0,=30011E8h 08006928 8800 ldrh r0,[r0] Load button input to r0 0800692A 8A5A ldrh r1,[r3,12h] Load direction to r1 0800692C 4210 tst r0,r2 Test r0 to r2 0800692E D013 beq 8006958h Go to 8006958 08006930 46C0 nop 08006932 46C0 nop 08006934 46C0 nop 08006936 46C0 nop 08006938 46C0 nop 0800693A 46C0 nop 0800693C 46C0 nop 0800693E 46C0 nop 08006940 F7FFFC7E bl 8006240h Go to 8006240 Acceleration routine 08006240 B510 push r4,r14 Push r4 and r14 08006242 220C mov r2,0Ch Make r2 12 08006244 7998 ldrb r0,[r3,6h] Load speed boosting switch to r0 08006246 2800 cmp r0,0h If r0 is not 0 08006248 D109 bne 800625Eh Go to 800625E 0800624A 4925 ldr r1,=3001310h 0800624C 7B08 ldrb r0,[r1,0Ch] Load suit + misc. status to r0 0800624E 2102 mov r1,2h Make r1 2 08006250 4008 and r0,r1 AND r1 to r0 08006252 4680 mov r8,r0 Make r8 r0 (used for speed boosting code later) 08006254 2800 cmp r0,0h If r0 is 0 08006256 D001 beq 800625Ch Go to 800625C 08006258 2206 mov r2,6h Make r2 6 0800625A E000 b 800625Eh Go to 800625E 0800625C 2203 mov r2,3h Make r2 3 0800625E 8B59 ldrh r1,[r3,1Ah] Load horizontal momentum to r1 08006260 8B98 ldrh r0,[r3,1Ch] Load vertical momentum to r0 08006262 2800 cmp r0,0h If vertical momentum is 0 08006264 D005 beq 8006272h Go to 8006272 08006266 20C0 mov r0,0C0h Make r0 192 08006268 180C add r4,r1,r0 Add r0 and r1 to r4 0800626A 0424 lsl r4,r4,10h Shift r4 left by 16 0800626C 0440 lsl r0,r0,11h Shift r0 left by 17 0800626E 4284 cmp r4,r0 If r4 is greater than r0 08006270 D20B bcs 800628Ah Go to 800628A 08006272 7C98 ldrb r0,[r3,12h] Load direction to r0 08006274 2820 cmp r0,20h If r0 is 0x20 08006276 D002 beq 800627Eh Go to 800627E 08006278 1889 add r1,r1,r2 Add r2 to r1 0800627A 8359 strh r1,[r3,1Ah] Store r0 to horizontal momentum 0800627C E005 b 800628Ah Go to 800628A 0800627E 1A89 sub r1,r1,r2 Subtract r2 from r1 08006280 8359 strh r1,[r3,1Ah] Store r1 to horizontal momentum 08006282 46C0 nop 08006284 46C0 nop 08006286 46C0 nop 08006288 46C0 nop Remove speed boosting cap 08004E08 46C0 nop 08004E14 46C0 nop Remove camera speed cap 08069C10 46C0 nop 08069C34 46C0 nop 0806A0AE 46C0 nop 0806A0C8 46C0 nop Horizontal spark speed 08009CDC 2210 mov r2,10h Make r2 0x10 08009CDE 400A and r2,r1 And r1 to r2 08009CE0 4804 ldr r0,=240h Load 576 to r0 08009CE2 2A00 cmp r2,0h If r2 is 0 08009CE4 D000 beq 8009CE8h Go to 8009CE8 08009CE6 E000 b 8009CEAh Go to 8009CEA 08009CE8 4240 neg r0,r0 Negate r0 08009CEA 8358 strh r0,[r3,1Ah] Store r0 to horizontal momentum 08009CF4 00000240 Diagonal spark speed 08009CCA 2210 mov r2,10h Make r2 0x10 08009CCC 400A and r2,r1 And r1 to r2 08009CCE 4809 ldr r0,=240h Load 576 to r0 08009CD0 2A00 cmp r2,0h If r2 is 0 08009CD2 D0E7 beq 8009CA4h Go to 8009CA4 08009CD4 E7E7 b 8009CA6h Go to 8009CA6 08009CA4 4240 neg r0,r0 Negate r0 (08009CB0 is now free for me to change for 08009CA8) 08009CA6 8358 strh r0,[r3,1Ah] Store r0 to horizontal momentum 08009CF4 00000240 Wall-jump speed 080092E8 20C0 mov r0,0C0h Make r0 192 080092F8 4805 ldr r0,=0FF40h Load -192 to r0 08009310 0000FF40 Ladder speed 08008776 2560 mov r5,60h Make r5 96 08008782 4D01 ldr r5,=0FFA0h Load -96 to r5 08008788 0000FFA0 Prevent speed boosting without speed booster 080064FA 8B60 ldrh r0,[r4,1Ah] Load horizontal momentum to r0 080064FC 22C0 mov r2,0C0h Make r2 192 080064FE 0052 lsl r2,r2,1h Shift r2 left by 1 08006500 1880 add r0,r0,r2 Add r2 to r0 08006502 0400 lsl r0,r0,10h Shift r0 left by 16 08006504 0452 lsl r2,r2,11h Shift r2 left by 17 08006506 4290 cmp r0,r2 If r0 is less than r2 08006508 D305 bcc 8006516h Go to 8006516 0800650A 4588 cmp r8,r1 If r8 is not equal to r1 (r1=2) 0800650C D103 bne 8006516h Go to 8006516 0800650E 71A1 strb r1,[r4,6h] Store r1 to speed boosting switch 08006510 46C0 nop 08006512 46C0 nop 08006514 46C0 nop Deceleration 08006958 7998 ldrb r0,[r3,6h] Load speed boosting switch to r0 0800695A 2800 cmp r0,0h If r0 is 0 0800695C D001 beq 8006962h Go to 8006962 0800695E 201F mov r0,1Fh Make r0 31 08006960 E00F b 8006982h Go to 8006282 08006962 1C08 mov r0,r1 Make r0 r1 08006964 3023 add r0,23h Add 36 to r0 08006966 7800 ldrb r0,[r0] Load upper byte of vertical acceleration to r0 08006968 2800 cmp r0,0h If r0 is 0 0800696A D001 beq 8006970h Go to 8006970 0800696C 2002 mov r0,2h Make r0 2 0800696E E008 b 8006982h Go to 8006982 08006970 2030 mov r0,30h Make r0 0x30 08006972 4050 eor r0,r2 XOR r2 to r0 08006974 4018 and r0,r3 AND r3 to r0 08006976 0400 lsl r0,r0,10h Shift r0 left by 16 08006978 2800 cmp r0,0h If r0 is 0 0800697A D001 beq 8006980h Go to 8006980 0800697C 2001 mov r0,1h Make r0 1 0800697E E000 b 8006982h Go to 8006982 08006980 2000 mov r0,0h Make r0 0 08006982 BC10 pop r4 Pop to r4 08006984 BC02 pop r1 Pop to r1 08006986 4708 bx r1 Go to r1