Metroid Fusion: speed Speed caps and accelerations 08068F48 4F09 ldr r7,=30000C0h 08068FB0 8838 ldrh r0,[r7] Load 30000C0 to r0 (always 0 as far as I can tell) 08068FB2 0400 lsl r0,r0,10h Shift r0 left by 16 08068FB4 8879 ldrh r1,[r7,2h] Load 30000C2 to r1 (is 1 when completely underwater, otherwise 0 as far as I can tell) 08068FB6 4308 orr r0,r1 OR r1 to r0 08068FB8 B003 add sp,0Ch Add 12 to the stack pointer 08068FBA BC08 pop r3 Pop to r3 08068FBC 4698 mov r8,r3 Make r8 r3 08068FBE BCF0 pop r4-r7 Pop to r4-r7 08068FC0 BC02 pop r1 Pop to r1 08068FC2 4708 bx r1 Branch to r1 08004E80 1C01 mov r1,r0 Make r1 r0 08004E82 20FF mov r0,0FFh Make r0 0xFF 08004E84 4001 and r1,r0 AND r0 to r1 08004E86 2901 cmp r1,1h If r1 is 1 08004E88 D00A beq 8004EA0h Go to 8004EA0 08004E8A 2901 cmp r1,1h If r1 is less than 1 08004E8C DB18 blt 8004EC0h Go to 8004EC0 08004E8E 2903 cmp r1,3h If r1 is greater than 3 08004E90 DC16 bgt 8004EC0h Go to 8004EC0 08004E92 E008 b 8004EA6h Go to 8004EA6 08004EA0 7820 ldrb r0,[r4] Load underwater switch to r0 08004EA2 3001 add r0,1h Add 1 to r0 08004EA4 7020 strb r0,[r4] Store r0 to underwater switch 08004EA6 4A04 ldr r2,=3001310h 08004EA8 7B11 ldrb r1,[r2,0Ch] Load suit + misc. status to r1 08004EAA 20A0 mov r0,0A0h Make r0 0xA0 08004EAC 4008 and r0,r1 AND r1 to r0 08004EAE 1C14 mov r4,r2 Make r4 r2 08004EB0 4B02 ldr r3,=3001330h 08004EB2 2800 cmp r0,0h If r0 is not 0 08004EB4 D10D bne 8004ED2h Go to 8004ED2 08004EB6 E00B b 8004ED0h Go to 8004ED0 08004EB8 03001310 08004EBC 03001330 08004EC0 4A10 ldr r2,=3001330h 08004EC2 7811 ldrb r1,[r2] Load slow speed switch to r1 08004EC4 2080 mov r0,80h Make r0 0x80 08004EC6 4008 and r0,r1 AND r1 to r0 08004EC8 4C0F ldr r4,=3001310h 08004ECA 1C13 mov r3,r2 Make r3 r2 08004ECC 2800 cmp r0,0h If r0 is 0 08004ECE D000 beq 8004ED2h Go to 8004ED2 08004ED0 3501 add r5,1h Add 1 to r5 08004ED2 2D00 cmp r5,0h If r5 is 0 08004ED4 D01C beq 8004F10h Go to 8004F10 08004ED6 7818 ldrb r0,[r3] Load slow speed switch to r0 08004ED8 2880 cmp r0,80h If r0 is 0x80 08004EDA D001 beq 8004EE0h Go to 8004EE0 08004EDC 2001 mov r0,1h Make r0 1 08004EDE 7018 strb r0,[r3] Store r0 to slow speed switch 08004EE0 2200 mov r2,0h Make r2 0 08004EE2 2004 mov r0,4h Make r0 4 08004EE4 8058 strh r0,[r3,2h] Store r0 to vertical acceleration 08004EE6 2130 mov r1,30h Make r1 48 08004EE8 8099 strh r1,[r3,4h] Store r1 to maximum vertical speed 08004EEA 80D8 strh r0,[r3,6h] Store r0 to horizontal in-air acceleration 08004EEC 2018 mov r0,18h Make r0 24 08004EEE 8118 strh r0,[r3,8h] Store r0 to maximum horizontal in-air speed 08004EF0 2014 mov r0,14h Make r0 20 08004EF2 8158 strh r0,[r3,0Ah] Store r0 to maximum horizontal in-air morphball speed 08004EF4 2003 mov r0,3h Make r0 3 08004EF6 8198 strh r0,[r3,0Ch] Store r0 to horizontal acceleration 08004EF8 81D9 strh r1,[r3,0Eh] Store r1 to maximum horizontal speed 08004EFA 4804 ldr r0,=3001244h 08004EFC 7182 strb r2,[r0,6h] Store r2 to speed boosting switch 08004EFE 1C05 mov r5,r0 Make r5 r0 08004F00 E01E b 8004F40h Go to 8004F40 08004F02 0000 08004F04 03001330 08004F08 03001310 08004F0C 03001244 08004F10 701D strb r5,[r3] Store r5 to slow speed switch 08004F12 2106 mov r1,6h Make r1 6 08004F14 8059 strh r1,[r3,2h] Store r1 to vertical acceleration 08004F16 2080 mov r0,80h Make r0 128 08004F18 8098 strh r0,[r3,4h] Store r0 to maximum vertical speed 08004F1A 2008 mov r0,8h Make r0 8 08004F1C 80D8 strh r0,[r3,6h] Store r0 to horizontal in-air acceleration 08004F1E 2028 mov r0,28h Make r0 40 08004F20 8158 strh r0,[r3,0Ah] Store r0 to maximum horizontal in-air morphball speed 08004F22 8199 strh r1,[r3,0Ch] Store r1 to horizontal acceleration 08004F24 4803 ldr r0,=3001244h 08004F26 7981 ldrb r1,[r0,6h] Load speed boosting switch to r1 08004F28 1C05 mov r5,r0 Make r5 r0 08004F2A 2900 cmp r1,0h If r1 is 0 08004F2C D004 beq 8004F38h Go to 8004F38 08004F2E 20A0 mov r0,0A0h Make r0 160 08004F30 8118 strh r0,[r3,8h] Store r0 to maximum horizontal in-air speed 08004F32 E004 b 8004F3Eh Go to 8004F3E 08004F34 03001244 08004F38 2030 mov r0,30h Make r0 48 08004F3A 8118 strh r0,[r3,8h] Store r0 to maximum horizontal in-air speed 08004F3C 2060 mov r0,60h Make r0 96 08004F3E 81D8 strh r0,[r3,0Eh] Store r1 to maximum horizontal speed Fixed speeds 08009CE4 20C0 mov r0,0C0h Rightwards sparking speed 08009CE8 4802 ldr r0,=0FF40h Leftwards sparking speed 080092E8 2040 mov r0,40h Rightwards wall-jump speed 080092F8 4805 ldr r0,=0FFC0h Leftwards wall-jump speed 08008776 2520 mov r5,20h Rightwards ladder speed 08008782 4D01 ldr r5,=0FFE0h Leftwards ladder speed Acceleration 08006926 480A ldr r0,=30011E8h 08006928 4908 ldr r1,=3001244h 0800692A 8803 ldrh r3,[r0] Load button input to r3 0800692C 8A4A ldrh r2,[r1,12h] Load direction to r2 08006930 4010 and r3,r2 AND r2 to r3 08006932 2800 cmp r3,0h If r3 is 0 08006934 D010 beq 8006958h Go to 8006958h 08006936 4807 ldr r0,=3001330h 08006938 210C mov r1,0Ch Make r1 12 0800693A 5E40 ldsh r0,[r0,r1] Load 300133C to r0 0800693C 0421 lsl r1,r4,10h Shift r4 left by 16 to r1 0800693E 1409 asr r1,r1,10h Arithmetic shift r1 right by 16 08006940 F7FFFC7E bl 8006240h Go to 8006240h 08006958 7988 ldrb r0,[r1,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,1Fh 08006960 E00F b 8006982h Go to 8006982 08006240 B510 push r4,r14 Push r4 and r14 08006242 0400 lsl r0,r0,10h Shift r0 left by 16 08006244 0C04 lsr r4,r0,10h Shift r0 right by 16 to r4 08006246 0409 lsl r1,r1,10h Shift r1 left by 16 08006248 0C0B lsr r3,r1,10h Shift r1 right by 16 to r3 0800624A 4A08 ldr r2,=3001244h 0800624C 8A51 ldrh r1,[r2,12h] Load direction to r1 0800624E 2010 mov r0,10h Make r0 0x10 08006250 4008 and r0,r1 AND r1 to r0 08006252 2800 cmp r0,0h If r0 is 0 08006254 D00C beq 8006270h Go to 8006270 08006256 0420 lsl r0,r4,10h Shift r4 left by 16 to r0 08006258 1400 asr r0,r0,10h Arithmetic shift r0 right by 16 0800625A 8B51 ldrh r1,[r2,1Ah] Load horizontal momentum to r1 0800625C 1840 add r0,r0,r1 Add r1 to r0 0800625E 8350 strh r0,[r2,1Ah] Store r0 to horizontal momentum 08006260 0400 lsl r0,r0,10h Shift r0 left by 16 08006262 0419 lsl r1,r3,10h Shift r3 left by 16 to r1 08006264 4288 cmp r0,r1 If r0 is less than r1 08006266 DD10 ble 800628Ah Go to 800628A 08006268 8353 strh r3,[r2,1Ah] Store r3 to horizontal momentum 0800626A E00E b 800628Ah Go to 800628A 0800626C 03001244 08006270 8B51 ldrh r1,[r2,1Ah] Load horizontal momentum to r1 08006272 0420 lsl r0,r4,10h Shift r4 left by 16 to r0 08006274 1400 asr r0,r0,10h Arithmetic shift r0 right by 16 08006276 1A09 sub r1,r1,r0 Subtract r0 from r1 08006278 8351 strh r1,[r2,1Ah] Store r1 to horizontal momentum 0800627A 201A mov r0,1Ah Make r0 26 0800627C 5E11 ldsh r1,[r2,r0] Load horizontal momentum to r1 0800627E 0418 lsl r0,r3,10h Shift r3 left by 16 to r0 08006280 1400 asr r0,r0,10h Arithmetic shift r0 right by 16 08006282 4240 neg r0,r0 Negate r0 08006284 4281 cmp r1,r0 If r1 is greater than r0 08006286 DA00 bge 800628Ah Go to 800628A 08006288 8350 strh r0,[r2,1Ah] Store r0 to horizontal momentum