; $F188: Initialisation AI - enemy $EABF/$EB3F/$EBBF (ki-hunter) { $A8:F188 AE 54 0E LDX $0E54 [$7E:0E54] $A8:F18B BD 86 0F LDA $0F86,x[$7E:0F86] ; Properties $A8:F18E 09 00 20 ORA #$2000 $A8:F191 9D 86 0F STA $0F86,x[$7E:0F86] ; Properties $A8:F194 A9 00 00 LDA #$0000 $A8:F197 9F 28 78 7E STA $7E7828,x[$7E:7828] ; X displacement? $A8:F19B A9 01 00 LDA #$0001 $A8:F19E 9D 94 0F STA $0F94,x[$7E:0F94] ; Instruction delay timer $A8:F1A1 9E 90 0F STZ $0F90,x[$7E:0F90] ; Instruction something.. $A8:F1A4 A9 FA E9 LDA #$E9FA $A8:F1A7 9D 92 0F STA $0F92,x[$7E:0F92] ; Instructions $A8:F1AA A9 00 00 LDA #$0000 $A8:F1AD 9D B2 0F STA $0FB2,x[$7E:0FB2] $A8:F1B0 A9 68 F2 LDA #$F268 $A8:F1B3 9D A8 0F STA $0FA8,x[$7E:0FA8] $A8:F1B6 A9 00 00 LDA #$0000 $A8:F1B9 9F 10 78 7E STA $7E7810,x[$7E:7810] ; Y sub offset? $A8:F1BD A9 01 00 LDA #$0001 $A8:F1C0 9F 12 78 7E STA $7E7812,x[$7E:7812] ; Y offset? $A8:F1C4 A9 00 00 LDA #$0000 $A8:F1C7 9F 0C 78 7E STA $7E780C,x[$7E:780C] ; X sub offset? $A8:F1CB A9 FF FF LDA #$FFFF $A8:F1CE 9F 0E 78 7E STA $7E780E,x[$7E:780E] ; X offset? $A8:F1D2 BD 7E 0F LDA $0F7E,x[$7E:0F7E] ; Y position $A8:F1D5 38 SEC $A8:F1D6 E9 10 00 SBC #$0010 $A8:F1D9 9F 14 78 7E STA $7E7814,x[$7E:7814] ; Y upper threshold $A8:F1DD 18 CLC $A8:F1DE 69 20 00 ADC #$0020 $A8:F1E1 9F 16 78 7E STA $7E7816,x[$7E:7816] ; Y lower threshold $A8:F1E5 BD 7A 0F LDA $0F7A,x[$7E:0F7A] ; X position $A8:F1E8 9F 18 78 7E STA $7E7818,x[$7E:7818] ; X position related $A8:F1EC BD 7E 0F LDA $0F7E,x[$7E:0F7E] ; Y position $A8:F1EF 9F 1A 78 7E STA $7E781A,x[$7E:781A] ; Y position related? $A8:F1F3 BD B4 0F LDA $0FB4,x[$7E:0FB4] $A8:F1F6 10 1B BPL $1B [$F213] ; RTL ; If $0FB4,x is positive? { $A8:F1F8 A9 01 00 LDA #$0001 $A8:F1FB 9F 28 78 7E STA $7E7828,x[$7E:7828] ; X displacement? $A8:F1FF A9 5A F5 LDA #$F55A $A8:F202 9D A8 0F STA $0FA8,x[$7E:0FA8] $A8:F205 A9 00 00 LDA #$0000 $A8:F208 9F 10 78 7E STA $7E7810,x[$7E:7810] ; Y sub offset? $A8:F20C A9 01 00 LDA #$0001 $A8:F20F 9F 12 78 7E STA $7E7812,x[$7E:7812] ; Y offset? } $A8:F213 6B RTL } ; $F25C: Main AI - enemy $EABF/$EB3F/$EBBF (ki-hunter) { $A8:F25C AE 54 0E LDX $0E54 [$7E:0E54] $A8:F25F 7C A8 0F JMP ($0FA8,x)[$A8:F268] } ; AI Script (Main / Change AI / turn around?) { ; Move vertically? { $A8:F268 BF 10 78 7E LDA $7E7810,x[$7E:7810] ; Y sub offset? $A8:F26C 85 12 STA $12 [$7E:0012] $A8:F26E BF 12 78 7E LDA $7E7812,x[$7E:7812] ; Y offset? $A8:F272 85 14 STA $14 [$7E:0014] $A8:F274 22 86 C7 A0 JSL $A0C786[$A0:C786] ; Common vertical movement routine, moves by $14.$12 - $12 = 0 $A8:F278 B0 14 BCS $14 [$F28E] } ; Flip Y offset if we collided, or if we hit our upper/lower thresholds { ; If we didn't collide { $A8:F27A BD 7E 0F LDA $0F7E,x[$7E:0F7E] ; Y position $A8:F27D DF 14 78 7E CMP $7E7814,x[$7E:7814] ; Y upper threshold $A8:F281 30 15 BMI $15 [$F298] $A8:F283 DF 16 78 7E CMP $7E7816,x[$7E:7816] ; Y lower threshold $A8:F287 30 16 BMI $16 [$F29F] $A8:F289 A9 FF FF LDA #$FFFF $A8:F28C 80 0D BRA $0D [$F29B] } ; If we collided { $A8:F28E BF 12 78 7E LDA $7E7812,x[$7E:7892] ; Y offset? $A8:F292 49 FF FF EOR #$FFFF $A8:F295 1A INC A $A8:F296 80 03 BRA $03 [$F29B] } $A8:F298 A9 01 00 LDA #$0001 $A8:F29B 9F 12 78 7E STA $7E7812,x[$7E:7812] ; Y offset? } ; Move horizontally { $A8:F29F BF 0C 78 7E LDA $7E780C,x[$7E:780C] ; X sub offset? $A8:F2A3 85 12 STA $12 [$7E:0012] $A8:F2A5 BF 0E 78 7E LDA $7E780E,x[$7E:780E] ; X offset? $A8:F2A9 85 14 STA $14 [$7E:0014] $A8:F2AB 22 AB C6 A0 JSL $A0C6AB[$A0:C6AB] ; Common horizontal movement routine, moves by $14.$12 - $20 = 0 $A8:F2AF 90 29 BCC $29 [$F2DA] } ; If we collided { $A8:F2B1 A0 00 00 LDY #$0000 $A8:F2B4 BF 0E 78 7E LDA $7E780E,x[$7E:798E] ; X offset? $A8:F2B8 49 FF FF EOR #$FFFF $A8:F2BB 1A INC A $A8:F2BC 9F 0E 78 7E STA $7E780E,x[$7E:798E] ; X offset? $A8:F2C0 30 03 BMI $03 [$F2C5] $A8:F2C2 A0 04 00 LDY #$0004 ; Depending on whether we're going left or right, Y is 0 or 4. $A8:F2C5 B9 B0 F3 LDA $F3B0,y[$A8:F3B4] ; [E9FA, EA4E, EA24 , EA5E] $A8:F2C8 9D 92 0F STA $0F92,x[$7E:1112] ; Instructions $A8:F2CB B9 B2 F3 LDA $F3B2,y[$A8:F3B6] $A8:F2CE 9D D2 0F STA $0FD2,x[$7E:1152] $A8:F2D1 A9 01 00 LDA #$0001 $A8:F2D4 9D 94 0F STA $0F94,x[$7E:1114] ; Instruction delay timer $A8:F2D7 9D D4 0F STA $0FD4,x[$7E:1154] } $A8:F2DA 22 AD C8 A0 JSL $A0C8AD[$A0:C8AD] ; Align enemy vertically to slopes if currently in contact with slopes ; $12 = Samus X - Ki X ; $14 = |$12| { $A8:F2DE AD F6 0A LDA $0AF6 [$7E:0AF6] ; Samus' X in pixels $A8:F2E1 38 SEC $A8:F2E2 FD 7A 0F SBC $0F7A,x[$7E:0F7A] ; X position $A8:F2E5 85 12 STA $12 [$7E:0012] $A8:F2E7 10 04 BPL $04 [$F2ED] $A8:F2E9 49 FF FF EOR #$FFFF $A8:F2EC 1A INC A $A8:F2ED 85 14 STA $14 [$7E:0014] } $A8:F2EF CD 80 F1 CMP $F180 [$A8:F180] ; $0060 ? $A8:F2F2 30 01 BMI $01 [$F2F5] ; If we're less than 60 pixels from the kihunter? $A8:F2F4 6B RTL $A8:F2F5 AD FA 0A LDA $0AFA [$7E:0AFA] ; Samus' Y in pixels $A8:F2F8 38 SEC $A8:F2F9 FD 7E 0F SBC $0F7E,x[$7E:0F7E] ; Y position $A8:F2FC C9 20 00 CMP #$0020 $A8:F2FF 10 01 BPL $01 [$F302] $A8:F301 6B RTL ; If the ki hunter is "close" to Samus horizontally & Samus is under the ki hunter $A8:F302 85 18 STA $18 [$7E:0018] $A8:F304 A5 12 LDA $12 [$7E:0012] $A8:F306 30 36 BMI $36 [$F33E] ; If Samus is to the right of the Ki hunter { $A8:F308 A9 02 00 LDA #$0002 $A8:F30B 9F 00 78 7E STA $7E7800,x[$7E:7980] $A8:F30F A9 00 00 LDA #$0000 $A8:F312 9F 04 78 7E STA $7E7804,x[$7E:7984] $A8:F316 9F 06 78 7E STA $7E7806,x[$7E:7986] $A8:F31A 9F 08 78 7E STA $7E7808,x[$7E:7988] $A8:F31E A9 00 20 LDA #$2000 $A8:F321 9F 0A 78 7E STA $7E780A,x[$7E:798A] $A8:F325 A9 80 00 LDA #$0080 $A8:F328 9D B2 0F STA $0FB2,x[$7E:1132] $A8:F32B A9 01 00 LDA #$0001 $A8:F32E 9F 0E 78 7E STA $7E780E,x[$7E:798E] ; X offset? $A8:F332 A9 90 00 LDA #$0090 $A8:F335 9F 1C 78 7E STA $7E781C,x[$7E:799C] $A8:F339 A0 04 00 LDY #$0004 $A8:F33C 80 34 BRA $34 [$F372] } ; If samus is to the left of the Ki hunter { $A8:F33E A9 FE FF LDA #$FFFE $A8:F341 9F 00 78 7E STA $7E7800,x[$7E:7800] $A8:F345 A9 00 00 LDA #$0000 $A8:F348 9F 04 78 7E STA $7E7804,x[$7E:7804] $A8:F34C 9F 06 78 7E STA $7E7806,x[$7E:7806] $A8:F350 A9 FF FF LDA #$FFFF $A8:F353 9F 08 78 7E STA $7E7808,x[$7E:7808] $A8:F357 9F 0E 78 7E STA $7E780E,x[$7E:780E] ; X offset? $A8:F35B A9 00 E0 LDA #$E000 $A8:F35E 9F 0A 78 7E STA $7E780A,x[$7E:780A] $A8:F362 A9 FF 00 LDA #$00FF $A8:F365 9D B2 0F STA $0FB2,x[$7E:0FB2] $A8:F368 A9 F0 00 LDA #$00F0 $A8:F36B 9F 1C 78 7E STA $7E781C,x[$7E:781C] $A8:F36F A0 00 00 LDY #$0000 } ; Set E9FA if Samus is to the left, EA5E if Samus is to the right. { $A8:F372 B9 B0 F3 LDA $F3B0,y[$A8:F3B0] ; [E9FA, EA4E, EA24 , EA5E] $A8:F375 9D 92 0F STA $0F92,x[$7E:0F92] ; Instructions $A8:F378 B9 B2 F3 LDA $F3B2,y[$A8:F3B2] $A8:F37B 9D D2 0F STA $0FD2,x[$7E:0FD2] $A8:F37E A9 01 00 LDA #$0001 $A8:F381 9D 94 0F STA $0F94,x[$7E:0F94] ; Instruction delay timer $A8:F384 9D D4 0F STA $0FD4,x[$7E:0FD4] } $A8:F387 BD 7A 0F LDA $0F7A,x[$7E:0F7A] ; X position $A8:F38A 18 CLC $A8:F38B 65 12 ADC $12 [$7E:0012] $A8:F38D 9D AA 0F STA $0FAA,x[$7E:0FAA] ; Target X when chasing? $A8:F390 BD 7E 0F LDA $0F7E,x[$7E:0F7E] ; Y position $A8:F393 9D AC 0F STA $0FAC,x[$7E:0FAC] ; Target Y when chansing? $A8:F396 A9 B8 F3 LDA #$F3B8 $A8:F399 9D A8 0F STA $0FA8,x[$7E:0FA8] $A8:F39C A5 18 LDA $18 [$7E:0018] $A8:F39E 9F 24 78 7E STA $7E7824,x[$7E:7824] ; |Samus Y - Ki Y| ? $A8:F3A2 A5 14 LDA $14 [$7E:0014] $A8:F3A4 9F 22 78 7E STA $7E7822,x[$7E:7822] ; |Samus X - Ki X| ? $A8:F3A8 A9 00 00 LDA #$0000 $A8:F3AB 9F 20 78 7E STA $7E7820,x[$7E:7820] $A8:F3AF 6B RTL $A8:F3B0 db FA, E9, 4E, EA, 24, EA, 5E, EA } ; AI Script (Main, moving downwards) { $A8:F3B8 BF 08 78 7E LDA $7E7808,x[$7E:7808] $A8:F3BC 10 0B BPL $0B [$F3C9] $A8:F3BE BD B2 0F LDA $0FB2,x[$7E:0FB2] $A8:F3C1 DF 1C 78 7E CMP $7E781C,x[$7E:781C] $A8:F3C5 10 2E BPL $2E [$F3F5] $A8:F3C7 80 09 BRA $09 [$F3D2] $A8:F3C9 BD B2 0F LDA $0FB2,x[$7E:1132] $A8:F3CC DF 1C 78 7E CMP $7E781C,x[$7E:799C] $A8:F3D0 30 23 BMI $23 [$F3F5] $A8:F3D2 BF 20 78 7E LDA $7E7820,x[$7E:7920] $A8:F3D6 D0 1D BNE $1D [$F3F5] $A8:F3D8 A9 01 00 LDA #$0001 $A8:F3DB 9F 20 78 7E STA $7E7820,x[$7E:7920] $A8:F3DF A0 32 EA LDY #$EA32 $A8:F3E2 BF 08 78 7E LDA $7E7808,x[$7E:7908] $A8:F3E6 10 03 BPL $03 [$F3EB] $A8:F3E8 A0 08 EA LDY #$EA08 $A8:F3EB 98 TYA $A8:F3EC 9D 92 0F STA $0F92,x[$7E:1092] ; Instructions $A8:F3EF A9 01 00 LDA #$0001 $A8:F3F2 9D 94 0F STA $0F94,x[$7E:1094] ; Instruction delay timer $A8:F3F5 BF 08 78 7E LDA $7E7808,x[$7E:7808] $A8:F3F9 10 3A BPL $3A [$F435] $A8:F3FB BF 06 78 7E LDA $7E7806,x[$7E:7806] $A8:F3FF 18 CLC $A8:F400 7F 0A 78 7E ADC $7E780A,x[$7E:780A] $A8:F404 9F 06 78 7E STA $7E7806,x[$7E:7806] $A8:F408 BF 04 78 7E LDA $7E7804,x[$7E:7804] $A8:F40C 7F 08 78 7E ADC $7E7808,x[$7E:7808] $A8:F410 DF 00 78 7E CMP $7E7800,x[$7E:7800] $A8:F414 10 04 BPL $04 [$F41A] $A8:F416 BF 00 78 7E LDA $7E7800,x[$7E:7900] $A8:F41A 9F 04 78 7E STA $7E7804,x[$7E:7804] $A8:F41E BD B2 0F LDA $0FB2,x[$7E:0FB2] $A8:F421 18 CLC $A8:F422 7F 04 78 7E ADC $7E7804,x[$7E:7804] $A8:F426 9D B2 0F STA $0FB2,x[$7E:0FB2] $A8:F429 C9 80 00 CMP #$0080 $A8:F42C 10 41 BPL $41 [$F46F] $A8:F42E A9 68 F2 LDA #$F268 $A8:F431 9D A8 0F STA $0FA8,x[$7E:1128] $A8:F434 6B RTL $A8:F435 BF 06 78 7E LDA $7E7806,x[$7E:7986] $A8:F439 18 CLC $A8:F43A 7F 0A 78 7E ADC $7E780A,x[$7E:798A] $A8:F43E 9F 06 78 7E STA $7E7806,x[$7E:7986] $A8:F442 BF 04 78 7E LDA $7E7804,x[$7E:7984] $A8:F446 7F 08 78 7E ADC $7E7808,x[$7E:7988] $A8:F44A DF 00 78 7E CMP $7E7800,x[$7E:7980] $A8:F44E 30 04 BMI $04 [$F454] $A8:F450 BF 00 78 7E LDA $7E7800,x[$7E:7980] $A8:F454 9F 04 78 7E STA $7E7804,x[$7E:7984] $A8:F458 BD B2 0F LDA $0FB2,x[$7E:1132] $A8:F45B 18 CLC $A8:F45C 7F 04 78 7E ADC $7E7804,x[$7E:7984] $A8:F460 9D B2 0F STA $0FB2,x[$7E:1132] $A8:F463 C9 00 01 CMP #$0100 $A8:F466 30 07 BMI $07 [$F46F] $A8:F468 A9 68 F2 LDA #$F268 $A8:F46B 9D A8 0F STA $0FA8,x[$7E:0FA8] $A8:F46E 6B RTL $A8:F46F BF 22 78 7E LDA $7E7822,x[$7E:7822] ; |Samus X - Ki X| ? $A8:F473 8D 32 0E STA $0E32 [$7E:0E32] $A8:F476 BD B2 0F LDA $0FB2,x[$7E:0FB2] $A8:F479 22 B2 B0 A0 JSL $A0B0B2[$A0:B0B2] ; 8-bit cosine multiplication $A8:F47D 18 CLC $A8:F47E 7D AA 0F ADC $0FAA,x[$7E:0FAA] ; Target X when chasing? $A8:F481 38 SEC $A8:F482 FD 7A 0F SBC $0F7A,x[$7E:0F7A] ; X position $A8:F485 85 14 STA $14 [$7E:0014] $A8:F487 64 12 STZ $12 [$7E:0012] $A8:F489 22 AB C6 A0 JSL $A0C6AB[$A0:C6AB] ; Common horizontal movement routine, moves by $14.$12 - $20 = 0 $A8:F48D B0 25 BCS $25 [$F4B4] $A8:F48F 22 AD C8 A0 JSL $A0C8AD[$A0:C8AD] ; Align enemy vertically to slopes if currently in contact with slopes $A8:F493 BF 24 78 7E LDA $7E7824,x[$7E:7824] ; Samus Y - Ki Y? $A8:F497 8D 32 0E STA $0E32 [$7E:0E32] $A8:F49A BD B2 0F LDA $0FB2,x[$7E:0FB2] $A8:F49D 22 C6 B0 A0 JSL $A0B0C6[$A0:B0C6] $A8:F4A1 18 CLC $A8:F4A2 7D AC 0F ADC $0FAC,x[$7E:0FAC] ; Target Y when chansing? $A8:F4A5 38 SEC $A8:F4A6 FD 7E 0F SBC $0F7E,x[$7E:0F7E] ; Y position $A8:F4A9 85 14 STA $14 [$7E:0014] $A8:F4AB 64 12 STZ $12 [$7E:0012] $A8:F4AD 22 86 C7 A0 JSL $A0C786[$A0:C786] ; Common vertical movement routine, moves by $14.$12 - $12 = 0 $A8:F4B1 B0 25 BCS $25 [$F4D8] $A8:F4B3 6B RTL $A8:F4B4 BF 08 78 7E LDA $7E7808,x[$7E:7808] $A8:F4B8 10 10 BPL $10 [$F4CA] $A8:F4BA A9 00 00 LDA #$0000 $A8:F4BD 9F 0C 78 7E STA $7E780C,x[$7E:780C] ; X sub offset? $A8:F4C1 A9 01 00 LDA #$0001 $A8:F4C4 9F 0E 78 7E STA $7E780E,x[$7E:780E] ; X offset? $A8:F4C8 80 0E BRA $0E [$F4D8] $A8:F4CA A9 00 00 LDA #$0000 $A8:F4CD 9F 0C 78 7E STA $7E780C,x[$7E:780C] ; X sub offset? $A8:F4D1 A9 FF FF LDA #$FFFF $A8:F4D4 9F 0E 78 7E STA $7E780E,x[$7E:780E] ; X offset? $A8:F4D8 A9 ED F4 LDA #$F4ED $A8:F4DB 9D A8 0F STA $0FA8,x[$7E:1128] $A8:F4DE A9 00 00 LDA #$0000 $A8:F4E1 9F 10 78 7E STA $7E7810,x[$7E:7990] ; Y sub offset? $A8:F4E5 A9 FF FF LDA #$FFFF $A8:F4E8 9F 12 78 7E STA $7E7812,x[$7E:7992] ; Y offset? $A8:F4EC 6B RTL } ; AI Script (Main, moving upwards) { $A8:F4ED BF 0C 78 7E LDA $7E780C,x[$7E:798C] ; X sub offset? $A8:F4F1 85 12 STA $12 [$7E:0012] $A8:F4F3 BF 0E 78 7E LDA $7E780E,x[$7E:798E] ; X offset? $A8:F4F7 85 14 STA $14 [$7E:0014] $A8:F4F9 22 AB C6 A0 JSL $A0C6AB[$A0:C6AB] ; Common horizontal movement routine, moves by $14.$12 - $20 = 0 $A8:F4FD B0 20 BCS $20 [$F51F] $A8:F4FF 22 AD C8 A0 JSL $A0C8AD[$A0:C8AD] ; Align enemy vertically to slopes if currently in contact with slopes $A8:F503 BF 10 78 7E LDA $7E7810,x[$7E:7990] ; Y sub offset? $A8:F507 85 12 STA $12 [$7E:0012] $A8:F509 BF 12 78 7E LDA $7E7812,x[$7E:7992] ; Y offset? $A8:F50D 85 14 STA $14 [$7E:0014] $A8:F50F 22 86 C7 A0 JSL $A0C786[$A0:C786] ; Common vertical movement routine, moves by $14.$12 - $12 = 0 $A8:F513 B0 0A BCS $0A [$F51F] $A8:F515 BD 7E 0F LDA $0F7E,x[$7E:10FE] ; Y position $A8:F518 DF 1A 78 7E CMP $7E781A,x[$7E:799A] ; Y position related? $A8:F51C 30 01 BMI $01 [$F51F] $A8:F51E 6B RTL $A8:F51F A9 68 F2 LDA #$F268 $A8:F522 9D A8 0F STA $0FA8,x[$7E:1128] $A8:F525 6B RTL } ; AI Script (Main) { $A8:F55A BF 10 78 7E LDA $7E7810,x[$7E:7910] ; Y sub offset? $A8:F55E 85 12 STA $12 [$7E:0012] $A8:F560 BF 12 78 7E LDA $7E7812,x[$7E:7912] ; Y offset? $A8:F564 85 14 STA $14 [$7E:0014] $A8:F566 22 86 C7 A0 JSL $A0C786[$A0:C786] ; Common vertical movement routine, moves by $14.$12 - $12 = 0 $A8:F56A 90 07 BCC $07 [$F573] $A8:F56C A9 8B F5 LDA #$F58B $A8:F56F 9D A8 0F STA $0FA8,x[$7E:10A8] $A8:F572 6B RTL $A8:F573 BF 10 78 7E LDA $7E7810,x[$7E:7910] ; Y sub offset? $A8:F577 18 CLC $A8:F578 6D 82 F1 ADC $F182 [$A8:F182] $A8:F57B 9F 10 78 7E STA $7E7810,x[$7E:7910] ; Y sub offset? $A8:F57F BF 12 78 7E LDA $7E7812,x[$7E:7912] ; Y offset? $A8:F583 6D 84 F1 ADC $F184 [$A8:F184] $A8:F586 9F 12 78 7E STA $7E7812,x[$7E:7912] ; Y offset? $A8:F58A 6B RTL } ; AI Script (Main) { $A8:F58B A9 E3 F5 LDA #$F5E3 $A8:F58E 9D A8 0F STA $0FA8,x[$7E:10A8] $A8:F591 A9 00 00 LDA #$0000 $A8:F594 9F 10 78 7E STA $7E7810,x[$7E:7910] ; Y sub offset? $A8:F598 AD E5 05 LDA $05E5 [$7E:05E5] $A8:F59B 29 01 00 AND #$0001 $A8:F59E 18 CLC $A8:F59F 69 F8 FF ADC #$FFF8 $A8:F5A2 9F 12 78 7E STA $7E7812,x[$7E:7912] ; Y offset? $A8:F5A6 BD 7A 0F LDA $0F7A,x[$7E:107A] ; X position $A8:F5A9 CD F6 0A CMP $0AF6 [$7E:0AF6] ; Samus' X in pixels $A8:F5AC 10 1B BPL $1B [$F5C9] $A8:F5AE A9 00 00 LDA #$0000 $A8:F5B1 9F 0C 78 7E STA $7E780C,x[$7E:798C] ; X sub offset? $A8:F5B5 A9 02 00 LDA #$0002 $A8:F5B8 9F 0E 78 7E STA $7E780E,x[$7E:798E] ; X offset? $A8:F5BC A9 A6 EA LDA #$EAA6 $A8:F5BF 9D 92 0F STA $0F92,x[$7E:1112] ; Instructions $A8:F5C2 A9 01 00 LDA #$0001 $A8:F5C5 9D 94 0F STA $0F94,x[$7E:1114] ; Instruction delay timer $A8:F5C8 6B RTL $A8:F5C9 A9 00 00 LDA #$0000 $A8:F5CC 9F 0C 78 7E STA $7E780C,x[$7E:790C] ; X sub offset? $A8:F5D0 A9 FE FF LDA #$FFFE $A8:F5D3 9F 0E 78 7E STA $7E780E,x[$7E:790E] ; X offset? $A8:F5D7 A9 8A EA LDA #$EA8A $A8:F5DA 9D 92 0F STA $0F92,x[$7E:1092] ; Instructions $A8:F5DD A9 01 00 LDA #$0001 $A8:F5E0 9D 94 0F STA $0F94,x[$7E:1094] ; Instruction delay timer ; AI Script (Main) { $A8:F5E3 6B RTL } } $A8:F5E4 DA PHX $A8:F5E5 AE 54 0E LDX $0E54 [$7E:0E54] $A8:F5E8 A9 F0 F5 LDA #$F5F0 $A8:F5EB 9D A8 0F STA $0FA8,x[$7E:1028] $A8:F5EE FA PLX $A8:F5EF 6B RTL ; AI Script { $A8:F5F0 BF 10 78 7E LDA $7E7810,x[$7E:7890] ; Y sub offset? $A8:F5F4 85 12 STA $12 [$7E:0012] $A8:F5F6 BF 12 78 7E LDA $7E7812,x[$7E:7892] ; Y offset? $A8:F5FA 85 14 STA $14 [$7E:0014] $A8:F5FC 22 86 C7 A0 JSL $A0C786[$A0:C786] ; Common vertical movement routine, moves by $14.$12 - $12 = 0 $A8:F600 B0 3B BCS $3B [$F63D] $A8:F602 BF 0C 78 7E LDA $7E780C,x[$7E:788C] ; X sub offset? $A8:F606 85 12 STA $12 [$7E:0012] $A8:F608 BF 0E 78 7E LDA $7E780E,x[$7E:788E] ; X offset? $A8:F60C 85 14 STA $14 [$7E:0014] $A8:F60E 22 AB C6 A0 JSL $A0C6AB[$A0:C6AB] ; Common horizontal movement routine, moves by $14.$12 - $20 = 0 $A8:F612 B0 1C BCS $1C [$F630] $A8:F614 22 AD C8 A0 JSL $A0C8AD[$A0:C8AD] ; Align enemy vertically to slopes if currently in contact with slopes $A8:F618 BF 10 78 7E LDA $7E7810,x[$7E:7890] ; Y sub offset? $A8:F61C 18 CLC $A8:F61D 6D 82 F1 ADC $F182 [$A8:F182] $A8:F620 9F 10 78 7E STA $7E7810,x[$7E:7890] ; Y sub offset? $A8:F624 BF 12 78 7E LDA $7E7812,x[$7E:7892] ; Y offset? $A8:F628 6D 84 F1 ADC $F184 [$A8:F184] $A8:F62B 9F 12 78 7E STA $7E7812,x[$7E:7892] ; Y offset? $A8:F62F 6B RTL $A8:F63D BF 12 78 7E LDA $7E7812,x[$7E:7892] ; Y offset? $A8:F641 30 34 BMI $34 [$F677] $A8:F643 A9 00 00 LDA #$0000 $A8:F646 9F 10 78 7E STA $7E7810,x[$7E:7890] ; Y sub offset? $A8:F64A A9 FC FF LDA #$FFFC $A8:F64D 9F 12 78 7E STA $7E7812,x[$7E:7892] ; Y offset? $A8:F651 A9 E3 F5 LDA #$F5E3 $A8:F654 9D A8 0F STA $0FA8,x[$7E:1028] $A8:F657 A9 0C 00 LDA #$000C $A8:F65A 9F 1E 78 7E STA $7E781E,x[$7E:789E] $A8:F65E A0 C2 EA LDY #$EAC2 $A8:F661 BD 92 0F LDA $0F92,x[$7E:1012] ; Instructions $A8:F664 C9 A6 EA CMP #$EAA6 $A8:F667 30 03 BMI $03 [$F66C] $A8:F669 A0 DA EA LDY #$EADA $A8:F66C 98 TYA $A8:F66D 9D 92 0F STA $0F92,x[$7E:1012] ; Instructions $A8:F670 A9 01 00 LDA #$0001 $A8:F673 9D 94 0F STA $0F94,x[$7E:1014] ; Instruction delay timer $A8:F676 6B RTL } $A8:F67F DA PHX $A8:F680 AE 54 0E LDX $0E54 [$7E:0E54] $A8:F683 A9 8B F6 LDA #$F68B $A8:F686 9D A8 0F STA $0FA8,x[$7E:0FA8] $A8:F689 FA PLX $A8:F68A 6B RTL ; AI Script { $A8:F68B BF 1E 78 7E LDA $7E781E,x[$7E:781E] $A8:F68F 3A DEC A $A8:F690 9F 1E 78 7E STA $7E781E,x[$7E:781E] $A8:F694 D0 1C BNE $1C [$F6B2] $A8:F696 A0 8B F5 LDY #$F58B $A8:F699 BD 7A 0F LDA $0F7A,x[$7E:0F7A] ; X position $A8:F69C 38 SEC $A8:F69D ED F6 0A SBC $0AF6 [$7E:0AF6] ; Samus' X in pixels $A8:F6A0 10 04 BPL $04 [$F6A6] $A8:F6A2 49 FF FF EOR #$FFFF $A8:F6A5 1A INC A $A8:F6A6 C9 60 00 CMP #$0060 $A8:F6A9 10 03 BPL $03 [$F6AE] $A8:F6AB A0 B3 F6 LDY #$F6B3 $A8:F6AE 98 TYA $A8:F6AF 9D A8 0F STA $0FA8,x[$7E:0FA8] $A8:F6B2 6B RTL } ; AI Script { $A8:F6B3 A0 F2 EA LDY #$EAF2 $A8:F6B6 BD 7A 0F LDA $0F7A,x[$7E:0F7A] ; X position $A8:F6B9 CD F6 0A CMP $0AF6 [$7E:0AF6] ; Samus' X in pixels $A8:F6BC 10 03 BPL $03 [$F6C1] $A8:F6BE A0 10 EB LDY #$EB10 $A8:F6C1 98 TYA $A8:F6C2 9D 92 0F STA $0F92,x[$7E:0F92] ; Instructions $A8:F6C5 A9 01 00 LDA #$0001 $A8:F6C8 9D 94 0F STA $0F94,x[$7E:0F94] ; Instruction delay timer $A8:F6CB A9 E3 F5 LDA #$F5E3 $A8:F6CE 9D A8 0F STA $0FA8,x[$7E:0FA8] $A8:F6D1 6B RTL } $A8:F6D2 5A PHY $A8:F6D3 A0 18 CF LDY #$CF18 $A8:F6D6 80 04 BRA $04 [$F6DC] $A8:F6D8 5A PHY $A8:F6D9 A0 26 CF LDY #$CF26 $A8:F6DC A9 4C 00 LDA #$004C $A8:F6DF 22 CB 90 80 JSL $8090CB[$80:90CB] $A8:F6E3 AE 54 0E LDX $0E54 [$7E:0E54] $A8:F6E6 22 27 80 86 JSL $868027[$86:8027] $A8:F6EA A9 18 00 LDA #$0018 $A8:F6ED 9F 1E 78 7E STA $7E781E,x[$7E:781E] $A8:F6F1 7A PLY $A8:F6F2 6B RTL ; $F701: Enemy shot - enemy $EABF/$EB3F/$EBBF (ki-hunter) { $A8:F701 22 3D A6 A0 JSL $A0A63D[$A0:A63D] $A8:F705 AE 54 0E LDX $0E54 [$7E:0E54] $A8:F708 BD 8C 0F LDA $0F8C,x[$7E:0F8C] $A8:F70B F0 20 BEQ $20 [$F72D] $A8:F70D DD F4 0F CMP $0FF4,x[$7E:10F4] $A8:F710 F0 22 BEQ $22 [$F734] $A8:F712 30 20 BMI $20 [$F734] $A8:F714 BD 8A 0F LDA $0F8A,x[$7E:108A] $A8:F717 9D CA 0F STA $0FCA,x[$7E:10CA] $A8:F71A BD 9E 0F LDA $0F9E,x[$7E:109E] $A8:F71D 9D DE 0F STA $0FDE,x[$7E:10DE] $A8:F720 BD A0 0F LDA $0FA0,x[$7E:10A0] $A8:F723 9D E0 0F STA $0FE0,x[$7E:10E0] $A8:F726 BD 9C 0F LDA $0F9C,x[$7E:109C] $A8:F729 9D DC 0F STA $0FDC,x[$7E:10DC] $A8:F72C 6B RTL $A8:F72D A9 00 02 LDA #$0200 $A8:F730 9D C6 0F STA $0FC6,x[$7E:0FC6] $A8:F733 6B RTL $A8:F734 BF 28 78 7E LDA $7E7828,x[$7E:7928] ; X displacement? $A8:F738 D0 F2 BNE $F2 [$F72C] } $A8:F73A A9 01 00 LDA #$0001 $A8:F73D 9F 28 78 7E STA $7E7828,x[$7E:7928] ; X displacement? $A8:F741 A9 5A F5 LDA #$F55A $A8:F744 9D A8 0F STA $0FA8,x[$7E:10A8] $A8:F747 A9 00 00 LDA #$0000 $A8:F74A 9F 10 78 7E STA $7E7810,x[$7E:7910] ; Y sub offset? $A8:F74E A9 01 00 LDA #$0001 $A8:F751 9F 12 78 7E STA $7E7812,x[$7E:7912] ; Y offset? $A8:F755 DA PHX $A8:F756 8A TXA $A8:F757 18 CLC $A8:F758 69 40 00 ADC #$0040 $A8:F75B 8D 54 0E STA $0E54 [$7E:0E54] $A8:F75E AA TAX $A8:F75F BD A8 0F LDA $0FA8,x[$7E:10E8] $A8:F762 C9 CF F7 CMP #$F7CF $A8:F765 F0 63 BEQ $63 [$F7CA] $A8:F767 BD 7E 0F LDA $0F7E,x[$7E:10BE] ; Y position $A8:F76A 9F 0E 78 7E STA $7E780E,x[$7E:794E] ; X offset? $A8:F76E BD 7A 0F LDA $0F7A,x[$7E:10BA] ; X position $A8:F771 9F 10 78 7E STA $7E7810,x[$7E:7950] ; Y sub offset? $A8:F775 20 8D F9 JSR $F98D [$A8:F98D] $A8:F778 20 51 F8 JSR $F851 [$A8:F851] $A8:F77B 20 7F F8 JSR $F87F [$A8:F87F] $A8:F77E A9 00 E0 LDA #$E000 $A8:F781 9D B2 0F STA $0FB2,x[$7E:10F2] $A8:F784 A9 CF F7 LDA #$F7CF $A8:F787 9D A8 0F STA $0FA8,x[$7E:10E8] $A8:F78A A9 DB F7 LDA #$F7DB $A8:F78D 9F 00 78 7E STA $7E7800,x[$7E:7940] $A8:F791 BF 0E 78 7E LDA $7E780E,x[$7E:794E] ; X offset? $A8:F795 38 SEC $A8:F796 FF 16 78 7E SBC $7E7816,x[$7E:7956] ; Y lower threshold $A8:F79A 9F 0C 78 7E STA $7E780C,x[$7E:794C] ; X sub offset? $A8:F79E BD 7A 0F LDA $0F7A,x[$7E:10BA] ; X position $A8:F7A1 9F 0A 78 7E STA $7E780A,x[$7E:794A] $A8:F7A5 BF 14 78 7E LDA $7E7814,x[$7E:7954] ; Y upper threshold $A8:F7A9 9D AA 0F STA $0FAA,x[$7E:10EA] ; Target X when chasing? $A8:F7AC A9 7E EA LDA #$EA7E $A8:F7AF 9D 92 0F STA $0F92,x[$7E:10D2] ; Instructions $A8:F7B2 A9 4D 80 LDA #$804D $A8:F7B5 9D 8E 0F STA $0F8E,x[$7E:10CE] $A8:F7B8 A9 01 00 LDA #$0001 $A8:F7BB 9D 94 0F STA $0F94,x[$7E:10D4] ; Instruction delay timer $A8:F7BE 9E 90 0F STZ $0F90,x[$7E:10D0] ; Instruction something.. $A8:F7C1 BD 86 0F LDA $0F86,x[$7E:10C6] ; Properties $A8:F7C4 09 00 08 ORA #$0800 $A8:F7C7 9D 86 0F STA $0F86,x[$7E:10C6] ; Properties $A8:F7CA 68 PLA $A8:F7CB 8D 54 0E STA $0E54 [$7E:0E54] $A8:F7CE 6B RTL ; AI Script { $A8:F7CF AE 54 0E LDX $0E54 [$7E:0E54] $A8:F7D2 BF 00 78 7E LDA $7E7800,x[$7E:7940] $A8:F7D6 85 12 STA $12 [$7E:0012] $A8:F7D8 6C 12 00 JMP ($0012)[$A8:F7DB] $A8:F7DB AE 54 0E LDX $0E54 [$7E:0E54] $A8:F7DE BD AA 0F LDA $0FAA,x[$7E:10EA] ; Target X when chasing? $A8:F7E1 29 00 FF AND #$FF00 $A8:F7E4 EB XBA $A8:F7E5 0A ASL A $A8:F7E6 0A ASL A $A8:F7E7 0A ASL A $A8:F7E8 A8 TAY $A8:F7E9 BD B2 0F LDA $0FB2,x[$7E:10F2] $A8:F7EC 18 CLC $A8:F7ED 79 94 83 ADC $8394,y[$A8:84E4] $A8:F7F0 9D B2 0F STA $0FB2,x[$7E:10F2] $A8:F7F3 AD 86 F1 LDA $F186 [$A8:F186] $A8:F7F6 29 FF 00 AND #$00FF $A8:F7F9 8D 32 0E STA $0E32 [$7E:0E32] $A8:F7FC BD B2 0F LDA $0FB2,x[$7E:10F2] $A8:F7FF EB XBA $A8:F800 29 FF 00 AND #$00FF $A8:F803 22 C6 B0 A0 JSL $A0B0C6[$A0:B0C6] $A8:F807 38 SEC $A8:F808 FF 08 78 7E SBC $7E7808,x[$7E:7948] $A8:F80C 18 CLC $A8:F80D 7F 0C 78 7E ADC $7E780C,x[$7E:794C] ; X sub offset? $A8:F811 9D 7E 0F STA $0F7E,x[$7E:10BE] ; Y position $A8:F814 AD 86 F1 LDA $F186 [$A8:F186] $A8:F817 29 FF 00 AND #$00FF $A8:F81A 8D 32 0E STA $0E32 [$7E:0E32] $A8:F81D BD B2 0F LDA $0FB2,x[$7E:10F2] $A8:F820 EB XBA $A8:F821 29 FF 00 AND #$00FF $A8:F824 22 B2 B0 A0 JSL $A0B0B2[$A0:B0B2] ; 8-bit cosine multiplication $A8:F828 38 SEC $A8:F829 FF 06 78 7E SBC $7E7806,x[$7E:7946] $A8:F82D 18 CLC $A8:F82E 7F 0A 78 7E ADC $7E780A,x[$7E:794A] $A8:F832 9D 7A 0F STA $0F7A,x[$7E:10BA] ; X position $A8:F835 BD B2 0F LDA $0FB2,x[$7E:10F2] $A8:F838 C9 00 C0 CMP #$C000 $A8:F83B 10 04 BPL $04 [$F841] $A8:F83D 20 6A F9 JSR $F96A [$A8:F96A] $A8:F840 6B RTL $A8:F841 BD AA 0F LDA $0FAA,x[$7E:10EA] ; Target X when chasing? $A8:F844 38 SEC $A8:F845 E9 80 01 SBC #$0180 $A8:F848 10 03 BPL $03 [$F84D] $A8:F84D 9D AA 0F STA $0FAA,x[$7E:10EA] ; Target X when chasing? $A8:F850 6B RTL } ; Routine { $A8:F851 AE 54 0E LDX $0E54 [$7E:0E54] $A8:F854 AD 86 F1 LDA $F186 [$A8:F186] $A8:F857 29 FF 00 AND #$00FF $A8:F85A 8D 32 0E STA $0E32 [$7E:0E32] $A8:F85D A9 00 E0 LDA #$E000 $A8:F860 EB XBA $A8:F861 22 B2 B0 A0 JSL $A0B0B2[$A0:B0B2] ; 8-bit cosine multiplication $A8:F865 9F 06 78 7E STA $7E7806,x[$7E:7946] $A8:F869 AD 86 F1 LDA $F186 [$A8:F186] $A8:F86C 29 FF 00 AND #$00FF $A8:F86F 8D 32 0E STA $0E32 [$7E:0E32] $A8:F872 A9 00 E0 LDA #$E000 $A8:F875 EB XBA $A8:F876 22 C6 B0 A0 JSL $A0B0C6[$A0:B0C6] $A8:F87A 9F 08 78 7E STA $7E7808,x[$7E:7948] $A8:F87E 60 RTS } ; Routine { $A8:F87F AE 54 0E LDX $0E54 [$7E:0E54] $A8:F882 AD 86 F1 LDA $F186 [$A8:F186] $A8:F885 29 FF 00 AND #$00FF $A8:F888 8D 32 0E STA $0E32 [$7E:0E32] $A8:F88B A9 00 A0 LDA #$A000 $A8:F88E EB XBA $A8:F88F 22 B2 B0 A0 JSL $A0B0B2[$A0:B0B2] ; 8-bit cosine multiplication $A8:F893 9F 02 78 7E STA $7E7802,x[$7E:7942] $A8:F897 AD 86 F1 LDA $F186 [$A8:F186] $A8:F89A 29 FF 00 AND #$00FF $A8:F89D 8D 32 0E STA $0E32 [$7E:0E32] $A8:F8A0 A9 00 A0 LDA #$A000 $A8:F8A3 EB XBA $A8:F8A4 22 C6 B0 A0 JSL $A0B0C6[$A0:B0C6] $A8:F8A8 9F 04 78 7E STA $7E7804,x[$7E:7944] $A8:F8AC 60 RTS } ; Unsure (7E7800,x) { $A8:F8AD AE 54 0E LDX $0E54 [$7E:0E54] $A8:F8B0 BD AA 0F LDA $0FAA,x[$7E:10EA] ; Target X when chasing? $A8:F8B3 29 00 FF AND #$FF00 $A8:F8B6 EB XBA $A8:F8B7 0A ASL A $A8:F8B8 0A ASL A $A8:F8B9 0A ASL A $A8:F8BA A8 TAY $A8:F8BB BD B2 0F LDA $0FB2,x[$7E:10F2] $A8:F8BE 18 CLC $A8:F8BF 79 90 83 ADC $8390,y[$A8:84E0] $A8:F8C2 9D B2 0F STA $0FB2,x[$7E:10F2] $A8:F8C5 AD 86 F1 LDA $F186 [$A8:F186] $A8:F8C8 29 FF 00 AND #$00FF $A8:F8CB 8D 32 0E STA $0E32 [$7E:0E32] $A8:F8CE BD B2 0F LDA $0FB2,x[$7E:10F2] $A8:F8D1 EB XBA $A8:F8D2 29 FF 00 AND #$00FF $A8:F8D5 22 C6 B0 A0 JSL $A0B0C6[$A0:B0C6] $A8:F8D9 38 SEC $A8:F8DA FF 04 78 7E SBC $7E7804,x[$7E:7944] $A8:F8DE 18 CLC $A8:F8DF 7F 0C 78 7E ADC $7E780C,x[$7E:794C] ; X sub offset? $A8:F8E3 38 SEC $A8:F8E4 FD 7E 0F SBC $0F7E,x[$7E:10BE] ; Y position $A8:F8E7 85 14 STA $14 [$7E:0014] $A8:F8E9 64 12 STZ $12 [$7E:0012] $A8:F8EB 22 86 C7 A0 JSL $A0C786[$A0:C786] ; Common vertical movement routine, moves by $14.$12 - $12 = 0 $A8:F8EF B0 3D BCS $3D [$F92E] $A8:F8F1 AD 86 F1 LDA $F186 [$A8:F186] $A8:F8F4 29 FF 00 AND #$00FF $A8:F8F7 8D 32 0E STA $0E32 [$7E:0E32] $A8:F8FA BD B2 0F LDA $0FB2,x[$7E:10F2] $A8:F8FD EB XBA $A8:F8FE 29 FF 00 AND #$00FF $A8:F901 22 B2 B0 A0 JSL $A0B0B2[$A0:B0B2] ; 8-bit cosine multiplication $A8:F905 38 SEC $A8:F906 FF 02 78 7E SBC $7E7802,x[$7E:7942] $A8:F90A 18 CLC $A8:F90B 7F 0A 78 7E ADC $7E780A,x[$7E:794A] $A8:F90F 9D 7A 0F STA $0F7A,x[$7E:10BA] ; X position $A8:F912 BD B2 0F LDA $0FB2,x[$7E:10F2] $A8:F915 C9 00 C0 CMP #$C000 $A8:F918 30 04 BMI $04 [$F91E] $A8:F91E BD AA 0F LDA $0FAA,x[$7E:10EA] ; Target X when chasing? $A8:F921 38 SEC $A8:F922 E9 80 01 SBC #$0180 $A8:F925 10 03 BPL $03 [$F92A] $A8:F92A 9D AA 0F STA $0FAA,x[$7E:10EA] ; Target X when chasing? $A8:F92D 6B RTL $A8:F92E BD 86 0F LDA $0F86,x[$7E:1146] ; Properties $A8:F931 09 00 02 ORA #$0200 $A8:F934 9D 86 0F STA $0F86,x[$7E:1146] ; Properties $A8:F937 BF 10 78 7E LDA $7E7810,x[$7E:79D0] ; Y sub offset? $A8:F93B 9D 7A 0F STA $0F7A,x[$7E:113A] ; X position $A8:F93E BF 0E 78 7E LDA $7E780E,x[$7E:79CE] ; X offset? $A8:F942 9D 7E 0F STA $0F7E,x[$7E:113E] ; Y position $A8:F945 80 E3 BRA $E3 [$F92A] } ; Routine { $A8:F96A A9 AD F8 LDA #$F8AD $A8:F96D 9F 00 78 7E STA $7E7800,x[$7E:7940] $A8:F971 BF 14 78 7E LDA $7E7814,x[$7E:7954] ; Y upper threshold $A8:F975 9D AA 0F STA $0FAA,x[$7E:10EA] ; Target X when chasing? $A8:F978 A9 00 A0 LDA #$A000 $A8:F97B 9D B2 0F STA $0FB2,x[$7E:10F2] $A8:F97E BD 7A 0F LDA $0F7A,x[$7E:10BA] ; X position $A8:F981 9F 0A 78 7E STA $7E780A,x[$7E:794A] $A8:F985 BD 7E 0F LDA $0F7E,x[$7E:10BE] ; Y position $A8:F988 9F 0C 78 7E STA $7E780C,x[$7E:794C] ; X sub offset? $A8:F98C 60 RTS } ; Routine { $A8:F98D AE 54 0E LDX $0E54 [$7E:0E54] $A8:F990 A9 00 00 LDA #$0000 $A8:F993 9F 14 78 7E STA $7E7814,x[$7E:7954] ; Y upper threshold $A8:F997 9D AA 0F STA $0FAA,x[$7E:10EA] ; Target X when chasing? $A8:F99A BF 14 78 7E LDA $7E7814,x[$7E:7954] ; Y upper threshold $A8:F99E 18 CLC $A8:F99F 69 80 01 ADC #$0180 $A8:F9A2 9F 14 78 7E STA $7E7814,x[$7E:7954] ; Y upper threshold $A8:F9A6 29 00 FF AND #$FF00 $A8:F9A9 EB XBA $A8:F9AA 0A ASL A $A8:F9AB 0A ASL A $A8:F9AC 0A ASL A $A8:F9AD A8 TAY $A8:F9AE BD AE 0F LDA $0FAE,x[$7E:10EE] $A8:F9B1 18 CLC $A8:F9B2 79 90 83 ADC $8390,y[$A8:8398] $A8:F9B5 9D AE 0F STA $0FAE,x[$7E:10EE] $A8:F9B8 C9 00 20 CMP #$2000 $A8:F9BB 30 DD BMI $DD [$F99A] $A8:F9BD 60 RTS }