;;; Enemy ;;; ;;; Clears some enemy RAM ;;; { $A08000 22 6D 9F A0 JSL $A09F6D[$A0:9F6D] $A08004 6B RTL } ;;; ;;; { ; Grapple reaction (enemy freeze) $A08005 22 7D 9F A0 JSL $A09F7D[$A0:9F7D] $A08009 6B RTL } ;;; ;;; { ; Grapple reaction (enemy die) $A0800A 22 C4 9F A0 JSL $A09FC4[$A0:9FC4] $A0800E 6B RTL } ;;; Switch enemy AI to frozen AI ;;; { $A0800F 22 DF 9F A0 JSL $A09FDF[$A0:9FDF] $A08013 6B RTL } ;;; ;;; { ; Grapple reaction (enemy freeze + other stuffs) $A08014 22 E9 9F A0 JSL $A09FE9[$A0:9FE9] $A08018 6B RTL } ;;; ;;; { ; Grapple reaction (enemy unresponsive?) $A08019 22 3E A0 A0 JSL $A0A03E[$A0:A03E] $A0801D 6B RTL } ;;; Switch enemy AI to frozen AI ;;; { $A0801E 22 70 A0 A0 JSL $A0A070[$A0:A070] $A08022 6B RTL } ;;; Normal enemy touch AI ;;; { $A08023 22 77 A4 A0 JSL $A0A477[$A0:A477] $A08027 6B RTL } ;;; Normal touch AI, but skips death animation ;;; { $A08028 22 97 A4 A0 JSL $A0A497[$A0:A497] $A0802C 6B RTL } ;;; Normal enemy shot AI ;;; { $A0802D 22 3D A6 A0 JSL $A0A63D[$A0:A63D] $A08031 6B RTL } ;;; Handles beam damage, freezing, and sound. Clears enemy hit flag ;;; { $A08032 22 A7 A6 A0 JSL $A0A6A7[$A0:A6A7] $A08036 6B RTL } ;;; ;;; { ; An enemy power bomb AI ; Used by Metroid $A08037 22 97 A5 A0 JSL $A0A597[$A0:A597] $A0803B 6B RTL } ;;; Normal enemy power bomb AI ;;; { $A0803C 22 B7 A5 A0 JSL $A0A5B7[$A0:A5B7] $A08040 6B RTL } ;;; Normal enemy ice AI ;;; { $A08041 22 7E 95 A0 JSL $A0957E[$A0:957E] $A08045 6B RTL } ;;; Creates a dud shot ;;; { $A08046 22 BC A8 A0 JSL $A0A8BC[$A0:A8BC] $A0804A 6B RTL } ;;; RTS ;;; $A0804B 60 RTS ;;; RTL ;;; $A0804C 6B RTL ;;; 0000 ;;; $A0804D dw 0000 ;;; Standard OAM / hitbox ;;; { ; The entry $A0804F dw 0001, 0000,0000,804D,8059 ; The hitbox $A08059 dw 0001, 0000,0000,0000,0000,8023,802D } ;;; Enemy instruction list: Delete enemy ;;; { $A08067 dw 807C } ;;; Two NOP's ;;; $A08069 NOP $A0806A NOP ;;; Enemy instruction ;;; { ; Set $0FB2,X to parameter $A0806B B9 00 00 LDA $0000,y $A0806E 9D B2 0F STA $0FB2,x $A08071 C8 INY $A08072 C8 INY $A08073 6B RTL } ;;; Enemy instruction ;;; { ; Set $0FB2,X to RTS $A08074 A9 7B 80 LDA #$807B $A08077 9D B2 0F STA $0FB2,x $A0807A 6B RTL } ;;; RTS ;;; $A0807B 60 RTS ;;; Enemy instruction: Delete enemy ;;; { $A0807C BD 86 0F LDA $0F86,x $A0807F 09 00 02 ORA #$0200 $A08082 9D 86 0F STA $0F86,x $A08085 68 PLA $A08086 F4 AE C2 PEA $C2AE $A08089 6B RTL } ;;; Enemy instruction: Execute parameter ;;; { $A0808A B9 00 00 LDA $0000,y $A0808D 85 12 STA $12 [$7E:0012] $A0808F 5A PHY $A08090 DA PHX $A08091 F4 96 80 PEA $8096 $A08094 6C 12 00 JMP ($0012) $A08097 FA PLX $A08098 7A PLY $A08099 C8 INY $A0809A C8 INY $A0809B 6B RTL } ;;; Enemy instruction: Execute parameter with parameter ;;; { $A0809C B9 00 00 LDA $0000,y $A0809F 85 12 STA $12 [$7E:0012] $A080A1 B9 02 00 LDA $0002,y $A080A4 5A PHY $A080A5 DA PHX $A080A6 F4 AB 80 PEA $80AB $A080A9 6C 12 00 JMP ($0012) $A080AC FA PLX $A080AD 7A PLY $A080AE 98 TYA $A080AF 18 CLC $A080B0 69 04 00 ADC #$0004 $A080B3 A8 TAY $A080B4 6B RTL } ;;; Enemy instruction: Execute long parameter ;;; { $A080B5 B9 00 00 LDA $0000,y $A080B8 85 12 STA $12 [$7E:0012] $A080BA B9 01 00 LDA $0001,y $A080BD 85 13 STA $13 [$7E:0013] $A080BF DA PHX $A080C0 5A PHY $A080C1 22 CB 80 A0 JSL $A080CB[$A0:80CB] $A080C5 7A PLY $A080C6 FA PLX $A080C7 C8 INY $A080C8 C8 INY $A080C9 C8 INY $A080CA 6B RTL } ;;; JML [$0012] ;;; { $A080CB DC 12 00 JML [$0012] } ;;; Enemy instruction: Execute long parameter with parameter ;;; { $A080CE B9 00 00 LDA $0000,y $A080D1 85 12 STA $12 [$7E:0012] $A080D3 B9 01 00 LDA $0001,y $A080D6 85 13 STA $13 [$7E:0013] $A080D8 B9 03 00 LDA $0003,y $A080DB DA PHX $A080DC 5A PHY $A080DD 22 EA 80 A0 JSL $A080EA[$A0:80EA] $A080E1 7A PLY $A080E2 FA PLX $A080E3 98 TYA $A080E4 18 CLC $A080E5 69 05 00 ADC #$0005 $A080E8 A8 TAY $A080E9 6B RTL } ;;; JML [$0012] ;;; { $A080EA DC 12 00 JML [$0012] } ;;; Enemy instruction: Jump to parameter ;;; { $A080ED B9 00 00 LDA $0000,y $A080F0 A8 TAY $A080F1 6B RTL } ;;; Enemy instruction: Branch to parameter ;;; { $A080F2 84 12 STY $12 [$7E:0012] $A080F4 88 DEY $A080F5 B9 00 00 LDA $0000,y $A080F8 EB XBA $A080F9 30 05 BMI $05 [$8100] $A080FB 29 FF 00 AND #$00FF $A080FE 80 03 BRA $03 [$8103] $A08100 09 00 FF ORA #$FF00 $A08103 18 CLC $A08104 65 12 ADC $12 [$7E:0012] $A08106 A8 TAY $A08107 6B RTL } ;;; Enemy instruction: Decrement timer. If non-zero: jump to parameter ;;; { $A08108 DE 90 0F DEC $0F90,x $A0810B D0 E0 BNE $E0 [$80ED] $A0810D C8 INY $A0810E C8 INY $A0810F 6B RTL } ;;; Enemy instruction: Decrement timer. If non-zero: jump to parameter ;;; { $A08110 DE 90 0F DEC $0F90,x $A08113 D0 D8 BNE $D8 [$80ED] $A08115 C8 INY $A08116 C8 INY $A08117 6B RTL } ;;; Enemy instruction: Decrement timer. If non-zero: branch to parameter ;;; { $A08118 E2 20 SEP #$20 $A0811A DE 90 0F DEC $0F90,x $A0811D C2 20 REP #$20 $A0811F D0 D1 BNE $D1 [$80F2] $A08121 C8 INY $A08122 6B RTL } ;;; Enemy instruction: Set timer ;;; { $A08123 B9 00 00 LDA $0000,y $A08126 9D 90 0F STA $0F90,x $A08129 C8 INY $A0812A C8 INY $A0812B 6B RTL } ;;; Enemy instruction: Skip next instruction ;;; { $A0812C C8 INY $A0812D C8 INY $A0812E 6B RTL } ;;; Enemy instruction: Wait ;;; { $A0812F 88 DEY $A08130 88 DEY $A08131 98 TYA $A08132 9D 92 0F STA $0F92,x $A08135 68 PLA $A08136 F4 AE C2 PEA $C2AE $A08139 6B RTL } ;;; Enemy instruction: Wait parameter frames ;;; { $A0813A B9 00 00 LDA $0000,y $A0813D 9D 94 0F STA $0F94,x $A08140 C8 INY $A08141 C8 INY $A08142 98 TYA $A08143 9D 92 0F STA $0F92,x $A08146 68 PLA $A08147 F4 AE C2 PEA $C2AE $A0814A 6B RTL } ;;; Enemy instruction: Set up DMA ;;; { $A0814B DA PHX $A0814C AE 30 03 LDX $0330 [$7E:0330] $A0814F B9 00 00 LDA $0000,y $A08152 95 D0 STA $D0,x $A08154 B9 02 00 LDA $0002,y $A08157 95 D2 STA $D2,x $A08159 B9 03 00 LDA $0003,y $A0815C 95 D3 STA $D3,x $A0815E B9 05 00 LDA $0005,y $A08161 95 D5 STA $D5,x $A08163 8A TXA $A08164 18 CLC $A08165 69 07 00 ADC #$0007 $A08168 8D 30 03 STA $0330 [$7E:0330] $A0816B 98 TYA $A0816C 18 CLC $A0816D 69 07 00 ADC #$0007 $A08170 A8 TAY $A08171 FA PLX $A08172 6B RTL } ;;; Set enemy to process whilst offscreen ;;; { $A08173 BD 86 0F LDA $0F86,x $A08176 09 00 08 ORA #$0800 $A08179 9D 86 0F STA $0F86,x $A0817C 6B RTL } ;;; Set enemy not to process whilst offscreen ;;; { $A0817D BD 86 0F LDA $0F86,x $A08180 29 FF F7 AND #$F7FF $A08183 9D 86 0F STA $0F86,x $A08186 6B RTL } ;;; ;;; { $A08187 dw 0000,0000,0000,0000, 0000,1000,FFFF,F000, 0000,2000,FFFF,E000, 0000,3000,FFFF,D000, 0000,4000,FFFF,C000, 0000,5000,FFFF,B000, 0000,6000,FFFF,A000, 0000,7000,FFFF,9000, 0000,8000,FFFF,8000, 0000,9000,FFFF,7000, 0000,A000,FFFF,6000, 0000,B000,FFFF,5000, 0000,C000,FFFF,4000, 0000,D000,FFFF,3000, 0000,E000,FFFF,2000, 0000,F000,FFFF,1000, 0001,0000,FFFF,0000, 0001,1000,FFFE,F000, 0001,2000,FFFE,E000, 0001,3000,FFFE,D000, 0001,4000,FFFE,C000, 0001,5000,FFFE,B000, 0001,6000,FFFE,A000, 0001,7000,FFFE,9000, 0001,8000,FFFE,8000, 0001,9000,FFFE,7000, 0001,A000,FFFE,6000, 0001,B000,FFFE,5000, 0001,C000,FFFE,4000, 0001,D000,FFFE,3000, 0001,E000,FFFE,2000, 0001,F000,FFFE,1000, 0002,0000,FFFE,0000, 0002,1000,FFFD,F000, 0002,2000,FFFD,E000, 0002,3000,FFFD,D000, 0002,4000,FFFD,C000, 0002,5000,FFFD,B000, 0002,6000,FFFD,A000, 0002,7000,FFFD,9000, 0002,8000,FFFD,8000, 0002,9000,FFFD,7000, 0002,A000,FFFD,6000, 0002,B000,FFFD,5000, 0002,C000,FFFD,4000, 0002,D000,FFFD,3000, 0002,E000,FFFD,2000, 0002,F000,FFFD,1000, 0003,0000,FFFD,0000, 0003,1000,FFFC,F000, 0003,2000,FFFC,E000, 0003,3000,FFFC,D000, 0003,4000,FFFC,C000, 0003,5000,FFFC,B000, 0003,6000,FFFC,A000, 0003,7000,FFFC,9000, 0003,8000,FFFC,8000, 0003,9000,FFFC,7000, 0003,A000,FFFC,6000, 0003,B000,FFFC,5000, 0003,C000,FFFC,4000, 0003,D000,FFFC,3000, 0003,E000,FFFC,2000, 0003,F000,FFFC,1000, 0004,0000,FFFC,0000, 0000,0000,0000,0000, 0109,0000,FEF7,FFFF, 031B,0000,FCE5,FFFF, 0636,0000,F9CA,FFFF, 0A5A,0000,F5A6,FFFF, 0F87,0000,F079,FFFF, 15BD,0000,EA43,FFFF, 1CFC,0000,E304,FFFF, 2544,0000,DABC,FFFF, 2E95,0000,D16B,FFFF, 38EF,0000,C711,FFFF, 4452,0000,BBAE,FFFF, 50BE,0000,AF42,FFFF, 5E33,0000,A1CD,FFFF, 6CB1,0000,934F,FFFF, 7C38,0000,83C8,FFFF, 8CC8,0000,7338,FFFF, 9E61,0000,619F,FFFF, B103,0000,4EFD,FFFF, C4AE,0000,3B52,FFFF, D962,0000,269E,FFFF, EF1F,0000,10E1,FFFF, 05E5,0000,FA1B,FFFF, 14B4,0001,EB4C,FFFE, 2D8C,0001,D274,FFFE, 476D,0001,B893,FFFE, 6257,0001,9DA9,FFFE, 7E4A,0001,81B6,FFFE, 9B46,0001,64BA,FFFE, B94B,0001,46B5,FFFE, D859,0001,27A7,FFFE, F870,0001,0790,FFFE, 1090,0002,EF70,FFFD, 32B9,0002,CD47,FFFD, 55EB,0002,AA15,FFFD, 7A26,0002,85DA,FFFD, 9F6A,0002,6096,FFFD, C5B7,0002,3A49,FFFD, ED0D,0002,12F3,FFFD, 0C6C,0003,F394,FFFC, 35D4,0003,CA2C,FFFC, 6045,0003,9FBB,FFFC, 8BBF,0003,7441,FFFC, B842,0003,47BE,FFFC, E5CE,0003,1A32,FFFC, 0B63,0004,F49D,FFFB, 3B01,0004,C4FF,FFFB, 6BA8,0004,9458,FFFB, 9D58,0004,62A8,FFFB, D011,0004,2FEF,FFFB, 03D3,0004,FC2D,FFFB, 2F9E,0005,D062,FFFA, 6572,0005,9A8E,FFFA, 9C4F,0005,63B1,FFFA, D435,0005,2BCB,FFFA, 0424,0006,FBDC,FFF9, 3E1C,0006,C1E4,FFF9, 791D,0006,86E3,FFF9, B527,0006,4AD9,FFF9, F23A,0006,0DC6,FFF9, 2756,0007,D8AA,FFF8, 667B,0007,9985,FFF8, A6A9,0007,5957,FFF8, E7E0,0007,1820,FFF8, 2120,0008,DEE0,FFF7, 6469,0008,9B97,FFF7, A8BB,0008,5745,FFF7, EE16,0008,11EA,FFF7, 2B7A,0009,D486,FFF6, 72E7,0009,8D19,FFF6, BB5D,0009,44A3,FFF6, 04DC,0009,FB24,FFF6, 4664,000A,B99C,FFF5, 91F5,000A,6E0B,FFF5, DE8F,000A,2171,FFF5, 2332,000B,DCCE,FFF4, 71DE,000B,8E22,FFF4, C193,000B,3E6D,FFF4, 0951,000C,F6AF,FFF3, 5B18,000C,A4E8,FFF3, ADE8,000C,5218,FFF3, 01C1,000C,FE3F,FFF3, 4DA3,000D,B25D,FFF2, A38E,000D,5C72,FFF2, FA82,000D,057E,FFF2, 497F,000E,B681,FFF1, A285,000E,5D7B,FFF1, FC94,000E,036C,FFF1, 4EAC,000F,B154,FFF0, AACD,000F,5533,FFF0, 07F7,000F,F809,FFF0, 5D2A,0010,A2D6,FFEF, BC66,0010,439A,FFEF, 13AB,0011,EC55,FFEE, 74F9,0011,8B07,FFEE } ;;; Handle room shaking ;;; { ; 183E contains shake type, looks up displacement in table at A0:872D (2 byte values in pixels: BG1 X, BG1 Y, BG2 X, BG2 Y) $A08687 8B PHB $A08688 F4 00 A0 PEA $A000 $A0868B AB PLB $A0868C AB PLB $A0868D C2 30 REP #$30 $A0868F AD 40 18 LDA $1840 [$7E:1840] $A08692 F0 79 BEQ $79 [$870D] $A08694 AD 78 0A LDA $0A78 [$7E:0A78] $A08697 D0 74 BNE $74 [$870D] $A08699 AD 3E 18 LDA $183E [$7E:183E] $A0869C C9 24 00 CMP #$0024 $A0869F 10 6C BPL $6C [$870D] $A086A1 0A ASL A $A086A2 0A ASL A $A086A3 0A ASL A $A086A4 AA TAX $A086A5 AD 40 18 LDA $1840 [$7E:1840] $A086A8 89 02 00 BIT #$0002 $A086AB F0 32 BEQ $32 [$86DF] $A086AD BD 2D 87 LDA $872D,x[$A0:8845] $A086B0 49 FF FF EOR #$FFFF $A086B3 1A INC A $A086B4 18 CLC $A086B5 65 B1 ADC $B1 [$7E:00B1] $A086B7 85 B1 STA $B1 [$7E:00B1] $A086B9 BD 2F 87 LDA $872F,x[$A0:8847] $A086BC 49 FF FF EOR #$FFFF $A086BF 1A INC A $A086C0 18 CLC $A086C1 65 B3 ADC $B3 [$7E:00B3] $A086C3 85 B3 STA $B3 [$7E:00B3] $A086C5 BD 31 87 LDA $8731,x[$A0:8849] $A086C8 49 FF FF EOR #$FFFF $A086CB 1A INC A $A086CC 18 CLC $A086CD 65 B5 ADC $B5 [$7E:00B5] $A086CF 85 B5 STA $B5 [$7E:00B5] $A086D1 BD 33 87 LDA $8733,x[$A0:884B] $A086D4 49 FF FF EOR #$FFFF $A086D7 1A INC A $A086D8 18 CLC $A086D9 65 B7 ADC $B7 [$7E:00B7] $A086DB 85 B7 STA $B7 [$7E:00B7] $A086DD 80 20 BRA $20 [$86FF] $A086DF A5 B1 LDA $B1 [$7E:00B1] $A086E1 18 CLC $A086E2 7D 2D 87 ADC $872D,x[$A0:8845] $A086E5 85 B1 STA $B1 [$7E:00B1] $A086E7 A5 B3 LDA $B3 [$7E:00B3] $A086E9 18 CLC $A086EA 7D 2F 87 ADC $872F,x[$A0:8847] $A086ED 85 B3 STA $B3 [$7E:00B3] $A086EF A5 B5 LDA $B5 [$7E:00B5] $A086F1 18 CLC $A086F2 7D 31 87 ADC $8731,x[$A0:8849] $A086F5 85 B5 STA $B5 [$7E:00B5] $A086F7 A5 B7 LDA $B7 [$7E:00B7] $A086F9 18 CLC $A086FA 7D 33 87 ADC $8733,x[$A0:884B] $A086FD 85 B7 STA $B7 [$7E:00B7] $A086FF CE 40 18 DEC $1840 [$7E:1840] $A08702 AD 3E 18 LDA $183E [$7E:183E] $A08705 C9 12 00 CMP #$0012 $A08708 30 03 BMI $03 [$870D] $A0870A 20 12 87 JSR $8712 [$A0:8712] $A0870D EE 42 18 INC $1842 [$7E:1842] $A08710 AB PLB $A08711 6B RTL } ;;; Set enemies to shake ;;; { $A08712 5A PHY $A08713 DA PHX $A08714 A0 00 00 LDY #$0000 $A08717 B9 AC 17 LDA $17AC,y[$7E:17AC] $A0871A C9 FF FF CMP #$FFFF $A0871D F0 0B BEQ $0B [$872A] $A0871F AA TAX $A08720 A9 02 00 LDA #$0002 $A08723 9D A2 0F STA $0FA2,x[$7E:0FA2] $A08726 C8 INY $A08727 C8 INY $A08728 80 ED BRA $ED [$8717] $A0872A FA PLX $A0872B 7A PLY $A0872C 60 RTS } ;;; BG shake displacements ;;; { ; /----horizontal---\ /-----vertical----\ /-----diagonal----\ ; BG1X BG1Y BG2X BG2Y $A0872D dw 0001,0000,0000,0000, 0000,0001,0000,0000, 0001,0001,0000,0000, ;\ 0002,0000,0000,0000, 0000,0002,0000,0000, 0002,0002,0000,0000, ;} BG1 only 0003,0000,0000,0000, 0000,0003,0000,0000, 0003,0003,0000,0000, ;/ 0001,0000,0001,0000, 0000,0001,0000,0001, 0001,0001,0001,0001, ;\ 0002,0000,0002,0000, 0000,0002,0000,0002, 0002,0002,0002,0002, ;| 0003,0000,0003,0000, 0000,0003,0000,0003, 0003,0003,0003,0003, ;| 0001,0000,0001,0000, 0000,0001,0000,0001, 0001,0001,0001,0001, ;} BG1 and BG2 (...twice) 0002,0000,0002,0000, 0000,0002,0000,0002, 0002,0002,0002,0002, ;| 0003,0000,0003,0000, 0000,0003,0000,0003, 0003,0003,0003,0003, ;/ 0000,0000,0001,0000, 0000,0000,0000,0001, 0000,0000,0001,0001, ;\ 0000,0000,0002,0000, 0000,0000,0000,0002, 0000,0000,0002,0002, ;} BG2 only 0000,0000,0003,0000, 0000,0000,0000,0003, 0000,0000,0003,0003 ;/ } ;;; Something for sprites and sounds ;;; { $A0884D 8B PHB $A0884E F4 00 A0 PEA $A000 $A08851 AB PLB $A08852 AB PLB $A08853 C2 30 REP #$30 $A08855 22 32 BD B4 JSL $B4BD32[$B4:BD32] $A08859 22 4D 83 93 JSL $93834D[$93:834D] $A0885D 22 90 83 86 JSL $868390[$86:8390] $A08861 9C 32 0E STZ $0E32 [$7E:0E32] $A08864 AD 32 0E LDA $0E32 [$7E:0E32] $A08867 C9 08 00 CMP #$0008 $A0886A F0 50 BEQ $50 [$88BC] $A0886C C9 03 00 CMP #$0003 $A0886F D0 06 BNE $06 [$8877] $A08871 22 35 EB 90 JSL $90EB35[$90:EB35] $A08875 80 09 BRA $09 [$8880] $A08877 C9 06 00 CMP #$0006 $A0887A D0 04 BNE $04 [$8880] $A0887C 22 B2 83 86 JSL $8683B2[$86:83B2] $A08880 AD 32 0E LDA $0E32 [$7E:0E32] $A08883 0A ASL A $A08884 A8 TAY $A08885 B9 68 0F LDA $0F68,y[$7E:0F68] $A08888 F0 2D BEQ $2D [$88B7] $A0888A 8D 36 0E STA $0E36 [$7E:0E36] $A0888D B9 33 B1 LDA $B133,y[$A0:B137] $A08890 8D 3A 0E STA $0E3A [$7E:0E3A] $A08893 A9 00 00 LDA #$0000 $A08896 99 68 0F STA $0F68,y[$7E:0F6C] $A08899 8D 38 0E STA $0E38 [$7E:0E38] $A0889C 18 CLC $A0889D 6D 3A 0E ADC $0E3A [$7E:0E3A] $A088A0 AA TAX $A088A1 BD 00 00 LDA $0000,x[$7E:0EA6] $A088A4 9E 00 00 STZ $0000,x[$7E:0EA6] $A088A7 8D 54 0E STA $0E54 [$7E:0E54] $A088AA 20 4A 94 JSR $944A [$A0:944A] $A088AD AD 38 0E LDA $0E38 [$7E:0E38] $A088B0 1A INC A $A088B1 1A INC A $A088B2 CD 36 0E CMP $0E36 [$7E:0E36] $A088B5 D0 E2 BNE $E2 [$8899] $A088B7 EE 32 0E INC $0E32 [$7E:0E32] $A088BA 80 A8 BRA $A8 [$8864] $A088BC 8B PHB $A088BD 22 C4 88 A0 JSL $A088C4[$A0:88C4] $A088C1 AB PLB $A088C2 80 0A BRA $0A [$88CE] } ;;; Execute $178C ;;; { $A088C4 AD 8E 17 LDA $178E [$7E:178E] $A088C7 EB XBA $A088C8 48 PHA $A088C9 AB PLB $A088CA AB PLB $A088CB DC 8C 17 JML [$178C][$A0:804C] $A088CE AB PLB $A088CF 6B RTL } ;;; Load $7E701E enemy data ;;; { $A088D0 DA PHX $A088D1 5A PHY $A088D2 BB TYX $A088D3 BD 78 0F LDA $0F78,x[$7E:0F78] ;\ $A088D6 9F 1E 70 7E STA $7E701E,x[$7E:701E] ;} $7E701E,X = Enemy ID $A088DA BD 7A 0F LDA $0F7A,x[$7E:0F7A] ;\ $A088DD 9F 20 70 7E STA $7E7020,x[$7E:7020] ;} $7E7020,X = Enemy X position $A088E1 BD 7E 0F LDA $0F7E,x[$7E:0F7E] ;\ $A088E4 9F 22 70 7E STA $7E7022,x[$7E:7022] ;} $7E7022,X = Enemy Y position $A088E8 BD 92 0F LDA $0F92,x[$7E:0F92] ;\ $A088EB 9F 24 70 7E STA $7E7024,x[$7E:7024] ;} $7E7024,X = Enemy instruction $A088EF BD 86 0F LDA $0F86,x[$7E:0F86] ;\ $A088F2 9F 26 70 7E STA $7E7026,x[$7E:7026] ;} $7E7026,X = Enemy properties $A088F6 BD 88 0F LDA $0F88,x[$7E:0F88] ;\ $A088F9 9F 28 70 7E STA $7E7028,x[$7E:7028] ;} $7E7028,X = Enemy extra properties $A088FD BD B4 0F LDA $0FB4,x[$7E:0FB4] ;\ $A08900 9F 2A 70 7E STA $7E702A,x[$7E:702A] ;} $7E702A,X = Enemy Speed $A08904 BD B6 0F LDA $0FB6,x[$7E:0FB6] ;\ $A08907 9F 2C 70 7E STA $7E702C,x[$7E:702C] ;} $7E702C,X = Enemy Speed2 $A0890B 64 12 STZ $12 [$7E:0012] ;\ $A0890D 64 14 STZ $14 [$7E:0014] ;| $A0890F 64 16 STZ $16 [$7E:0016] ;| $A08911 64 18 STZ $18 [$7E:0018] ;| $A08913 64 1A STZ $1A [$7E:001A] ;| $A08915 64 1C STZ $1C [$7E:001C] ;| $A08917 DA PHX ;| $A08918 BD 78 0F LDA $0F78,x[$7E:0F78] ;| $A0891B AA TAX ;| $A0891C BF 3E 00 A0 LDA $A0003E,x[$A0:E27D] ;| $A08920 F0 25 BEQ $25 [$8947] ;| $A08922 AA TAX ;| $A08923 BF 00 00 B4 LDA $B40000,x[$B4:E0D1] ;| $A08927 85 12 STA $12 [$7E:0012] ;| $A08929 BF 02 00 B4 LDA $B40002,x[$B4:E0D3] ;| $A0892D 85 14 STA $14 [$7E:0014] ;| $A0892F BF 04 00 B4 LDA $B40004,x[$B4:E0D5] ;| $A08933 85 16 STA $16 [$7E:0016] ;| $A08935 BF 06 00 B4 LDA $B40006,x[$B4:E0D7] ;| $A08939 85 18 STA $18 [$7E:0018] ;} $7E702E+X..39+X = Enemy name $A0893B BF 08 00 B4 LDA $B40008,x[$B4:E0D9] ;| $A0893F 85 1A STA $1A [$7E:001A] ;| $A08941 BF 0C 00 B4 LDA $B4000C,x[$B4:E0DD] ;| $A08945 85 1C STA $1C [$7E:001C] ;| ;| $A08947 FA PLX ;| $A08948 A5 12 LDA $12 [$7E:0012] ;| $A0894A 9F 2E 70 7E STA $7E702E,x[$7E:702E] ;| $A0894E A5 14 LDA $14 [$7E:0014] ;| $A08950 9F 30 70 7E STA $7E7030,x[$7E:7030] ;| $A08954 A5 16 LDA $16 [$7E:0016] ;| $A08956 9F 32 70 7E STA $7E7032,x[$7E:7032] ;| $A0895A A5 18 LDA $18 [$7E:0018] ;| $A0895C 9F 34 70 7E STA $7E7034,x[$7E:7034] ;| $A08960 A5 1A LDA $1A [$7E:001A] ;| $A08962 9F 36 70 7E STA $7E7036,x[$7E:7036] ;| $A08966 A5 1C LDA $1C [$7E:001C] ;| $A08968 9F 38 70 7E STA $7E7038,x[$7E:7038] ;/ $A0896C 7A PLY $A0896D FA PLX $A0896E 6B RTL } ;;; Populate name of enemies allowed list ;;; { $A0896F A9 00 00 LDA #$0000 $A08972 A2 00 00 LDX #$0000 $A08975 A0 A0 00 LDY #$00A0 $A08978 9F 52 D5 7E STA $7ED552,x[$7E:D552] ;\ $A0897C E8 INX ;| $A0897D E8 INX ;| $A0897E 88 DEY ;} Clear $7E:D552..D5F2 $A0897F 88 DEY ;| $A08980 D0 F6 BNE $F6 [$8978] ;/ $A08982 AD D1 07 LDA $07D1 [$7E:07D1] ;\ $A08985 38 SEC ;| $A08986 E9 07 00 SBC #$0007 ;} X = Enemies allowed pointer - 7 $A08989 AA TAX ;/ $A0898A BF 00 00 B4 LDA $B40000,x[$B4:9211] ;\ $A0898E 8F 52 D5 7E STA $7ED552[$7E:D552] ;| $A08992 BF 02 00 B4 LDA $B40002,x[$B4:9213] ;| $A08996 8F 54 D5 7E STA $7ED554[$7E:D554] ;| $A0899A BF 04 00 B4 LDA $B40004,x[$B4:9215] ;} $7E:D552..D559 = [X]..[X+7] $A0899E 8F 56 D5 7E STA $7ED556[$7E:D556] ;| $A089A2 BF 06 00 B4 LDA $B40006,x[$B4:9217] ;| $A089A6 8F 58 D5 7E STA $7ED558[$7E:D558] ;/ $A089AA A0 07 00 LDY #$0007 ; Y = 7 $A089AD AD D1 07 LDA $07D1 [$7E:07D1] ;\ $A089B0 AA TAX ;} X = name of allowed enemies in the room $A089B1 BF 00 00 B4 LDA $B40000,x[$B4:9218] ; A = [$B4:X] $A089B5 C9 FF FF CMP #$FFFF ;\ $A089B8 F0 63 BEQ $63 [$8A1D] ;} If A == FFFFh: return $A089BA DA PHX $A089BB AA TAX ;\ $A089BC BF 3E 00 A0 LDA $A0003E,x[$A0:E27D] ;} A = [$A0:003E+A] $A089C0 D0 03 BNE $03 [$89C5] ; If A == 0: $A089C2 A9 89 DD LDA #$DD89 ; A = $DD89 $A089C5 AA TAX ;\ $A089C6 BF 00 00 B4 LDA $B40000,x[$B4:DD89] ;| $A089CA 85 12 STA $12 [$7E:0012] ;| $A089CC BF 02 00 B4 LDA $B40002,x[$B4:DD8B] ;| $A089D0 85 14 STA $14 [$7E:0014] ;| $A089D2 BF 04 00 B4 LDA $B40004,x[$B4:DD8D] ;| $A089D6 85 16 STA $16 [$7E:0016] ;| $A089D8 BF 06 00 B4 LDA $B40006,x[$B4:DD8F] ;| $A089DC 85 18 STA $18 [$7E:0018] ;| $A089DE BF 08 00 B4 LDA $B40008,x[$B4:DD91] ;| $A089E2 85 1A STA $1A [$7E:001A] ;| $A089E4 BB TYX ;} $7E:DD52..5B = [$B4:A..A+9] $A089E5 A5 12 LDA $12 [$7E:0012] ;| $A089E7 9F 52 D5 7E STA $7ED552,x[$7E:D559] ;| $A089EB A5 14 LDA $14 [$7E:0014] ;| $A089ED 9F 54 D5 7E STA $7ED554,x[$7E:D55B] ;| $A089F1 A5 16 LDA $16 [$7E:0016] ;| $A089F3 9F 56 D5 7E STA $7ED556,x[$7E:D55D] ;| $A089F7 A5 18 LDA $18 [$7E:0018] ;| $A089F9 9F 58 D5 7E STA $7ED558,x[$7E:D55F] ;| $A089FD A5 1A LDA $1A [$7E:001A] ;| $A089FF 9F 5A D5 7E STA $7ED55A,x[$7E:D561] ;/ $A08A03 FA PLX ;\ $A08A04 DA PHX ;} $A08A05 BF 02 00 B4 LDA $B40002,x[$B4:921A] ;\ $A08A09 BB TYX ;} $7E:D55C+A = [$B4:002+X] $A08A0A 9F 5C D5 7E STA $7ED55C,x[$7E:D563] ;/ $A08A0E FA PLX $A08A0F 98 TYA ;\ $A08A10 18 CLC ;| $A08A11 69 0C 00 ADC #$000C ;} Y += 0Ch $A08A14 A8 TAY ;/ $A08A15 8A TXA ;\ $A08A16 18 CLC ;| $A08A17 69 04 00 ADC #$0004 ;} X += 4 $A08A1A AA TAX ;/ $A08A1B 80 94 BRA $94 [$89B1] ; Next! $A08A1D 6B RTL } ;;; ;;; { $A08A1E 08 PHP $A08A1F 8B PHB $A08A20 F4 00 A0 PEA $A000 $A08A23 AB PLB $A08A24 AB PLB $A08A25 C2 30 REP #$30 $A08A27 22 6F 89 A0 JSL $A0896F[$A0:896F] $A08A2B 9C 5E 18 STZ $185E [$7E:185E] $A08A2E 9C 9C 17 STZ $179C [$7E:179C] $A08A31 A9 A0 00 LDA #$00A0 $A08A34 8D 8E 17 STA $178E [$7E:178E] $A08A37 A9 4C 80 LDA #$804C $A08A3A 8D 8C 17 STA $178C [$7E:178C] $A08A3D A9 A0 00 LDA #$00A0 $A08A40 8D 92 17 STA $1792 [$7E:1792] $A08A43 A9 4C 80 LDA #$804C $A08A46 8D 90 17 STA $1790 [$7E:1790] $A08A49 A9 00 08 LDA #$0800 $A08A4C 8D 9A 17 STA $179A [$7E:179A] $A08A4F 9C 9E 17 STZ $179E [$7E:179E] $A08A52 9C A0 17 STZ $17A0 [$7E:17A0] $A08A55 9C 9C 17 STZ $179C [$7E:179C] $A08A58 22 6D 8A A0 JSL $A08A6D[$A0:8A6D] $A08A5C 22 6C 8C A0 JSL $A08C6C[$A0:8C6C] $A08A60 9C 7C 0E STZ $0E7C [$7E:0E7C] $A08A63 9C AE 18 STZ $18AE [$7E:18AE] $A08A66 22 97 BD B4 JSL $B4BD97[$B4:BD97] $A08A6A AB PLB $A08A6B 28 PLP $A08A6C 6B RTL } ;;; ;;; { $A08A6D 08 PHP $A08A6E 8B PHB $A08A6F F4 00 A0 PEA $A000 $A08A72 AB PLB $A08A73 AB PLB $A08A74 C2 30 REP #$30 $A08A76 A9 00 00 LDA #$0000 $A08A79 A0 00 08 LDY #$0800 $A08A7C A2 00 00 LDX #$0000 $A08A7F 9F 78 0F 00 STA $000F78,x[$7E:0F78] $A08A83 E8 INX $A08A84 88 DEY $A08A85 E8 INX $A08A86 88 DEY $A08A87 D0 F6 BNE $F6 [$8A7F] $A08A89 AE CF 07 LDX $07CF [$7E:07CF] $A08A8C BF 00 00 A1 LDA $A10000,x[$A1:E88A] $A08A90 C9 FF FF CMP #$FFFF $A08A93 D0 03 BNE $03 [$8A98] $A08A95 4C 9B 8A JMP $8A9B [$A0:8A9B] $A08A98 20 64 8D JSR $8D64 [$A0:8D64] $A08A9B AB PLB $A08A9C 28 PLP $A08A9D 6B RTL } ;;; ;;; { $A08A9E 08 PHP $A08A9F 8B PHB $A08AA0 A0 00 14 LDY #$1400 $A08AA3 A2 00 00 LDX #$0000 $A08AA6 A9 00 00 LDA #$0000 $A08AA9 9F 00 70 7E STA $7E7000,x[$7E:7000] $A08AAD E8 INX $A08AAE E8 INX $A08AAF 88 DEY $A08AB0 D0 F7 BNE $F7 [$8AA9] $A08AB2 F4 00 A0 PEA $A000 $A08AB5 AB PLB $A08AB6 AB PLB $A08AB7 C2 30 REP #$30 $A08AB9 9C 4E 0E STZ $0E4E [$7E:0E4E] $A08ABC 9C 50 0E STZ $0E50 [$7E:0E50] $A08ABF 9C 3C 18 STZ $183C [$7E:183C] $A08AC2 A2 1E 01 LDX #$011E $A08AC5 A9 00 00 LDA #$0000 $A08AC8 9F 80 F3 7E STA $7EF380,x[$7E:F49E] $A08ACC CA DEX $A08ACD CA DEX $A08ACE 10 F8 BPL $F8 [$8AC8] $A08AD0 A2 22 00 LDX #$0022 $A08AD3 A9 FF FF LDA #$FFFF $A08AD6 9F 10 F4 7E STA $7EF410,x[$7E:F432] $A08ADA CA DEX $A08ADB CA DEX $A08ADC 10 F8 BPL $F8 [$8AD6] $A08ADE AE CF 07 LDX $07CF [$7E:07CF] $A08AE1 BF 00 00 A1 LDA $A10000,x[$A1:E88A] $A08AE5 C9 FF FF CMP #$FFFF $A08AE8 D0 03 BNE $03 [$8AED] $A08AEA 4C E6 8B JMP $8BE6 [$A0:8BE6] $A08AED 9C 48 0E STZ $0E48 [$7E:0E48] $A08AF0 A0 00 00 LDY #$0000 $A08AF3 20 F3 8B JSR $8BF3 [$A0:8BF3] $A08AF6 DA PHX $A08AF7 BF 00 00 A1 LDA $A10000,x[$A1:E88A] $A08AFB AA TAX $A08AFC BD 08 00 LDA $0008,x[$A0:E247] $A08AFF 99 82 0F STA $0F82,y[$7E:0F82] $A08B02 BD 0A 00 LDA $000A,x[$A0:E249] $A08B05 99 84 0F STA $0F84,y[$7E:0F84] $A08B08 BD 04 00 LDA $0004,x[$A0:E243] $A08B0B 99 8C 0F STA $0F8C,y[$7E:0F8C] $A08B0E BD 39 00 LDA $0039,x[$A0:E278] $A08B11 29 FF 00 AND #$00FF $A08B14 99 9A 0F STA $0F9A,y[$7E:0F9A] $A08B17 BD 0C 00 LDA $000C,x[$A0:E24B] $A08B1A 99 A6 0F STA $0FA6,y[$7E:0FA6] $A08B1D BD 10 00 LDA $0010,x[$A0:E24F] $A08B20 F0 03 BEQ $03 [$8B25] $A08B22 8D 9C 17 STA $179C [$7E:179C] $A08B25 FA PLX $A08B26 BF 00 00 A1 LDA $A10000,x[$A1:E88A] $A08B2A 99 78 0F STA $0F78,y[$7E:0F78] $A08B2D BF 02 00 A1 LDA $A10002,x[$A1:E88C] $A08B31 99 7A 0F STA $0F7A,y[$7E:0F7A] $A08B34 BF 04 00 A1 LDA $A10004,x[$A1:E88E] $A08B38 99 7E 0F STA $0F7E,y[$7E:0F7E] $A08B3B BF 06 00 A1 LDA $A10006,x[$A1:E890] $A08B3F 99 92 0F STA $0F92,y[$7E:0F92] $A08B42 BF 08 00 A1 LDA $A10008,x[$A1:E892] $A08B46 99 86 0F STA $0F86,y[$7E:0F86] $A08B49 BF 0A 00 A1 LDA $A1000A,x[$A1:E894] $A08B4D 99 88 0F STA $0F88,y[$7E:0F88] $A08B50 BF 0C 00 A1 LDA $A1000C,x[$A1:E896] $A08B54 99 B4 0F STA $0FB4,y[$7E:0FB4] $A08B57 BF 0E 00 A1 LDA $A1000E,x[$A1:E898] $A08B5B 99 B6 0F STA $0FB6,y[$7E:0FB6] $A08B5E A9 00 00 LDA #$0000 $A08B61 99 A4 0F STA $0FA4,y[$7E:0FA4] $A08B64 99 90 0F STA $0F90,y[$7E:0F90] $A08B67 A9 01 00 LDA #$0001 $A08B6A 99 94 0F STA $0F94,y[$7E:0F94] $A08B6D A9 00 00 LDA #$0000 $A08B70 99 A4 0F STA $0FA4,y[$7E:0FA4] $A08B73 22 D0 88 A0 JSL $A088D0[$A0:88D0] $A08B77 DA PHX $A08B78 5A PHY $A08B79 8C 54 0E STY $0E54 [$7E:0E54] $A08B7C BE 78 0F LDX $0F78,y[$7E:0F78] $A08B7F BD 12 00 LDA $0012,x[$A0:E251] $A08B82 8D 84 17 STA $1784 [$7E:1784] $A08B85 BD 0C 00 LDA $000C,x[$A0:E24B] $A08B88 8D 86 17 STA $1786 [$7E:1786] $A08B8B 8B PHB $A08B8C 22 E9 8B A0 JSL $A08BE9[$A0:8BE9] $A08B90 AB PLB $A08B91 7A PLY $A08B92 FA PLX $A08B93 A9 00 00 LDA #$0000 $A08B96 99 8E 0F STA $0F8E,y[$7E:0F8E] $A08B99 B9 86 0F LDA $0F86,y[$7E:0F86] $A08B9C 89 00 20 BIT #$2000 $A08B9F F0 16 BEQ $16 [$8BB7] $A08BA1 DA PHX $A08BA2 5A PHY $A08BA3 A2 4D 80 LDX #$804D $A08BA6 B9 88 0F LDA $0F88,y[$7E:0F88] $A08BA9 89 04 00 BIT #$0004 $A08BAC F0 03 BEQ $03 [$8BB1] $A08BAE A2 4F 80 LDX #$804F $A08BB1 8A TXA $A08BB2 99 8E 0F STA $0F8E,y[$7E:0F8E] $A08BB5 7A PLY $A08BB6 FA PLX $A08BB7 98 TYA $A08BB8 18 CLC $A08BB9 69 40 00 ADC #$0040 $A08BBC A8 TAY $A08BBD 8A TXA $A08BBE 18 CLC $A08BBF 69 10 00 ADC #$0010 $A08BC2 AA TAX $A08BC3 BF 00 00 A1 LDA $A10000,x[$A1:E89A] $A08BC7 C9 FF FF CMP #$FFFF $A08BCA F0 03 BEQ $03 [$8BCF] $A08BCC 4C F3 8A JMP $8AF3 [$A0:8AF3] $A08BCF 8C 4C 0E STY $0E4C [$7E:0E4C] $A08BD2 98 TYA $A08BD3 4A LSR A $A08BD4 4A LSR A $A08BD5 4A LSR A $A08BD6 4A LSR A $A08BD7 4A LSR A $A08BD8 4A LSR A $A08BD9 8D 4E 0E STA $0E4E [$7E:0E4E] $A08BDC BF 02 00 A1 LDA $A10002,x[$A1:E8AC] $A08BE0 29 FF 00 AND #$00FF $A08BE3 8D 52 0E STA $0E52 [$7E:0E52] $A08BE6 AB PLB $A08BE7 28 PLP $A08BE8 6B RTL } ;;; Execute $1784 ;;; { ; Executes initiation AI $A08BE9 B9 A6 0F LDA $0FA6,y[$7E:0FA6] $A08BEC EB XBA $A08BED 48 PHA $A08BEE AB PLB $A08BEF AB PLB $A08BF0 DC 84 17 JML [$1784][$A6:F6C5] } ;;; ;;; { $A08BF3 DA PHX $A08BF4 5A PHY $A08BF5 86 12 STX $12 [$7E:0012] $A08BF7 84 14 STY $14 [$7E:0014] $A08BF9 AD D1 07 LDA $07D1 [$7E:07D1] $A08BFC 85 1C STA $1C [$7E:001C] $A08BFE 64 1E STZ $1E [$7E:001E] $A08C00 A6 12 LDX $12 [$7E:0012] $A08C02 BF 00 00 A1 LDA $A10000,x[$A1:E88A] $A08C06 A6 1C LDX $1C [$7E:001C] $A08C08 DF 00 00 B4 CMP $B40000,x[$B4:9218] $A08C0C F0 3E BEQ $3E [$8C4C] $A08C0E BF 00 00 B4 LDA $B40000,x[$B4:925E] $A08C12 C9 FF FF CMP #$FFFF $A08C15 F0 1C BEQ $1C [$8C33] $A08C17 BF 00 00 B4 LDA $B40000,x[$B4:925E] $A08C1B AA TAX $A08C1C BD 00 00 LDA $0000,x[$A0:E13F] $A08C1F 4A LSR A $A08C20 4A LSR A $A08C21 4A LSR A $A08C22 4A LSR A $A08C23 4A LSR A $A08C24 18 CLC $A08C25 65 1E ADC $1E [$7E:001E] $A08C27 85 1E STA $1E [$7E:001E] $A08C29 A5 1C LDA $1C [$7E:001C] $A08C2B 18 CLC $A08C2C 69 04 00 ADC #$0004 $A08C2F 85 1C STA $1C [$7E:001C] $A08C31 80 CD BRA $CD [$8C00] $A08C33 A6 14 LDX $14 [$7E:0014] $A08C35 9E 98 0F STZ $0F98,x[$7E:1018] $A08C38 A9 00 00 LDA #$0000 $A08C3B 9F 06 70 7E STA $7E7006,x[$7E:7086] $A08C3F A9 00 0A LDA #$0A00 $A08C42 9D 96 0F STA $0F96,x[$7E:1016] $A08C45 9F 08 70 7E STA $7E7008,x[$7E:7088] $A08C49 7A PLY $A08C4A FA PLX $A08C4B 60 RTS $A08C4C A6 1C LDX $1C [$7E:001C] $A08C4E BF 02 00 B4 LDA $B40002,x[$B4:921A] $A08C52 29 0F 00 AND #$000F $A08C55 EB XBA $A08C56 0A ASL A $A08C57 A6 14 LDX $14 [$7E:0014] $A08C59 9D 96 0F STA $0F96,x[$7E:0F96] $A08C5C 9F 08 70 7E STA $7E7008,x[$7E:7008] $A08C60 A5 1E LDA $1E [$7E:001E] $A08C62 9D 98 0F STA $0F98,x[$7E:0F98] $A08C65 9F 06 70 7E STA $7E7006,x[$7E:7006] $A08C69 7A PLY $A08C6A FA PLX $A08C6B 60 RTS } ;;; ;;; { $A08C6C C2 30 REP #$30 $A08C6E A2 FE 01 LDX #$01FE $A08C71 BF 00 EA 9A LDA $9AEA00,x[$9A:EBFE] $A08C75 9F 00 70 7E STA $7E7000,x[$7E:71FE] $A08C79 CA DEX $A08C7A CA DEX $A08C7B 10 F4 BPL $F4 [$8C71] $A08C7D AD 7A 0E LDA $0E7A [$7E:0E7A] $A08C80 F0 54 BEQ $54 [$8CD6] $A08C82 A2 00 00 LDX #$0000 $A08C85 8B PHB $A08C86 BD 5C 0E LDA $0E5C,x[$7E:0E5C] $A08C89 A8 TAY $A08C8A 18 CLC $A08C8B 7D 5A 0E ADC $0E5A,x[$7E:0E5A] $A08C8E 85 12 STA $12 [$7E:0012] $A08C90 BD 5D 0E LDA $0E5D,x[$7E:0E5D] $A08C93 48 PHA $A08C94 AB PLB $A08C95 AB PLB $A08C96 8A TXA $A08C97 18 CLC $A08C98 69 07 00 ADC #$0007 $A08C9B 48 PHA $A08C9C BD 5F 0E LDA $0E5F,x[$7E:0E5F] $A08C9F AA TAX $A08CA0 B9 00 00 LDA $0000,y[$B0:BA00] $A08CA3 9F 00 70 7E STA $7E7000,x[$7E:7200] $A08CA7 B9 02 00 LDA $0002,y[$B0:BA02] $A08CAA 9F 02 70 7E STA $7E7002,x[$7E:7202] $A08CAE B9 04 00 LDA $0004,y[$B0:BA04] $A08CB1 9F 04 70 7E STA $7E7004,x[$7E:7204] $A08CB5 B9 06 00 LDA $0006,y[$B0:BA06] $A08CB8 9F 06 70 7E STA $7E7006,x[$7E:7206] $A08CBC 8A TXA $A08CBD 18 CLC $A08CBE 69 08 00 ADC #$0008 $A08CC1 AA TAX $A08CC2 98 TYA $A08CC3 18 CLC $A08CC4 69 08 00 ADC #$0008 $A08CC7 A8 TAY $A08CC8 C4 12 CPY $12 [$7E:0012] $A08CCA D0 D4 BNE $D4 [$8CA0] $A08CCC FA PLX $A08CCD EC 7A 0E CPX $0E7A [$7E:0E7A] $A08CD0 D0 B4 BNE $B4 [$8C86] $A08CD2 9C 7A 0E STZ $0E7A [$7E:0E7A] $A08CD5 AB PLB $A08CD6 6B RTL } ;;; ;;; { $A08CD7 C2 30 REP #$30 $A08CD9 AD 7C 0E LDA $0E7C [$7E:0E7C] $A08CDC D0 0C BNE $0C [$8CEA] $A08CDE A9 00 70 LDA #$7000 $A08CE1 8D 7C 0E STA $0E7C [$7E:0E7C] $A08CE4 A2 00 6C LDX #$6C00 $A08CE7 8E 7E 0E STX $0E7E [$7E:0E7E] $A08CEA C9 FF FF CMP #$FFFF $A08CED D0 01 BNE $01 [$8CF0] $A08CEF 6B RTL $A08CF0 C9 FE FF CMP #$FFFE $A08CF3 D0 0B BNE $0B [$8D00] $A08CF5 22 9E 8A A0 JSL $A08A9E[$A0:8A9E] $A08CF9 A9 FF FF LDA #$FFFF $A08CFC 8D 7C 0E STA $0E7C [$7E:0E7C] $A08CFF 6B RTL $A08D00 C9 00 98 CMP #$9800 $A08D03 F0 2E BEQ $2E [$8D33] $A08D05 AE 30 03 LDX $0330 [$7E:0330] $A08D08 A9 00 08 LDA #$0800 $A08D0B 95 D0 STA $D0,x [$7E:00D7] $A08D0D AD 7C 0E LDA $0E7C [$7E:0E7C] $A08D10 95 D2 STA $D2,x [$7E:00D9] $A08D12 18 CLC $A08D13 69 00 08 ADC #$0800 $A08D16 8D 7C 0E STA $0E7C [$7E:0E7C] $A08D19 A9 7E 00 LDA #$007E $A08D1C 95 D4 STA $D4,x [$7E:00DB] $A08D1E AD 7E 0E LDA $0E7E [$7E:0E7E] $A08D21 95 D5 STA $D5,x [$7E:00DC] $A08D23 18 CLC $A08D24 69 00 04 ADC #$0400 $A08D27 8D 7E 0E STA $0E7E [$7E:0E7E] $A08D2A 8A TXA $A08D2B 18 CLC $A08D2C 69 07 00 ADC #$0007 $A08D2F 8D 30 03 STA $0330 [$7E:0330] $A08D32 6B RTL $A08D33 A9 FE FF LDA #$FFFE $A08D36 8D 7C 0E STA $0E7C [$7E:0E7C] $A08D39 6B RTL } ;;; ;;; { $A08D3A DA PHX $A08D3B 5A PHY $A08D3C BD 00 00 LDA $0000,x $A08D3F AA TAX $A08D40 BD 08 00 LDA $0008,x $A08D43 99 82 0F STA $0F82,y $A08D46 BD 0A 00 LDA $000A,x $A08D49 99 84 0F STA $0F84,y $A08D4C BD 04 00 LDA $0004,x $A08D4F 99 8C 0F STA $0F8C,y $A08D52 BD 39 00 LDA $0039,x $A08D55 29 FF 00 AND #$00FF $A08D58 99 9A 0F STA $0F9A,y $A08D5B BD 0C 00 LDA $000C,x $A08D5E 99 A6 0F STA $0FA6,y $A08D61 7A PLY $A08D62 FA PLX $A08D63 6B RTL } ;;; ;;; { $A08D64 DA PHX $A08D65 5A PHY $A08D66 9C 7A 0E STZ $0E7A [$7E:0E7A] $A08D69 A9 00 08 LDA #$0800 $A08D6C 85 1E STA $1E [$7E:001E] $A08D6E A9 00 00 LDA #$0000 $A08D71 8F 5C EF 7E STA $7EEF5C[$7E:EF5C] $A08D75 8F 5E EF 7E STA $7EEF5E[$7E:EF5E] $A08D79 8F 60 EF 7E STA $7EEF60[$7E:EF60] $A08D7D 8F 62 EF 7E STA $7EEF62[$7E:EF62] $A08D81 8F 64 EF 7E STA $7EEF64[$7E:EF64] $A08D85 8F 66 EF 7E STA $7EEF66[$7E:EF66] $A08D89 8F 68 EF 7E STA $7EEF68[$7E:EF68] $A08D8D 8F 6A EF 7E STA $7EEF6A[$7E:EF6A] $A08D91 8F 6C EF 7E STA $7EEF6C[$7E:EF6C] $A08D95 8F 6E EF 7E STA $7EEF6E[$7E:EF6E] $A08D99 8F 70 EF 7E STA $7EEF70[$7E:EF70] $A08D9D 8F 72 EF 7E STA $7EEF72[$7E:EF72] $A08DA1 8F 74 EF 7E STA $7EEF74[$7E:EF74] $A08DA5 8F 76 EF 7E STA $7EEF76[$7E:EF76] $A08DA9 AD D1 07 LDA $07D1 [$7E:07D1] $A08DAC 85 1C STA $1C [$7E:001C] $A08DAE AA TAX $A08DAF BF 00 00 B4 LDA $B40000,x[$B4:9218] $A08DB3 C9 FF FF CMP #$FFFF $A08DB6 D0 03 BNE $03 [$8DBB] $A08DB8 4C B3 8E JMP $8EB3 [$A0:8EB3] $A08DBB AA TAX $A08DBC BD 00 00 LDA $0000,x[$A0:E23F] $A08DBF 85 12 STA $12 [$7E:0012] $A08DC1 BD 02 00 LDA $0002,x[$A0:E241] $A08DC4 85 14 STA $14 [$7E:0014] $A08DC6 BD 0C 00 LDA $000C,x[$A0:E24B] $A08DC9 8D 20 0E STA $0E20 [$7E:0E20] $A08DCC A6 1C LDX $1C [$7E:001C] $A08DCE BF 02 00 B4 LDA $B40002,x[$B4:921A] $A08DD2 29 FF 00 AND #$00FF $A08DD5 18 CLC $A08DD6 69 08 00 ADC #$0008 $A08DD9 22 02 B0 A0 JSL $A0B002[$A0:B002] $A08DDD 18 CLC $A08DDE 69 00 C2 ADC #$C200 $A08DE1 85 16 STA $16 [$7E:0016] $A08DE3 8B PHB $A08DE4 AD 20 0E LDA $0E20 [$7E:0E20] $A08DE7 EB XBA $A08DE8 48 PHA $A08DE9 AB PLB $A08DEA AB PLB $A08DEB A9 10 00 LDA #$0010 $A08DEE 8D 2E 0E STA $0E2E [$7E:0E2E] $A08DF1 A6 16 LDX $16 [$7E:0016] $A08DF3 A4 14 LDY $14 [$7E:0014] $A08DF5 B9 00 00 LDA $0000,y[$A6:F4EC] $A08DF8 9F 00 00 7E STA $7E0000,x[$7E:C340] $A08DFC E8 INX $A08DFD E8 INX $A08DFE C8 INY $A08DFF C8 INY $A08E00 CE 2E 0E DEC $0E2E [$7E:0E2E] $A08E03 D0 F0 BNE $F0 [$8DF5] $A08E05 AB PLB $A08E06 A6 1C LDX $1C [$7E:001C] $A08E08 BF 00 00 B4 LDA $B40000,x[$B4:9218] $A08E0C AA TAX $A08E0D BD 36 00 LDA $0036,x[$A0:E275] $A08E10 85 16 STA $16 [$7E:0016] $A08E12 BD 38 00 LDA $0038,x[$A0:E277] $A08E15 29 FF 00 AND #$00FF $A08E18 85 1A STA $1A [$7E:001A] $A08E1A AE 7A 0E LDX $0E7A [$7E:0E7A] $A08E1D A5 12 LDA $12 [$7E:0012] $A08E1F 29 FF 7F AND #$7FFF $A08E22 9D 5A 0E STA $0E5A,x[$7E:0E5A] $A08E25 A5 16 LDA $16 [$7E:0016] $A08E27 9D 5C 0E STA $0E5C,x[$7E:0E5C] $A08E2A A5 1E LDA $1E [$7E:001E] $A08E2C 24 12 BIT $12 [$7E:0012] $A08E2E 10 0E BPL $0E [$8E3E] $A08E30 DA PHX $A08E31 A6 1C LDX $1C [$7E:001C] $A08E33 BF 02 00 B4 LDA $B40002,x[$B4:921A] $A08E37 29 00 30 AND #$3000 $A08E3A 4A LSR A $A08E3B 4A LSR A $A08E3C 4A LSR A $A08E3D FA PLX $A08E3E 9D 5F 0E STA $0E5F,x[$7E:0E5F] $A08E41 E2 20 SEP #$20 $A08E43 A5 1A LDA $1A [$7E:001A] $A08E45 9D 5E 0E STA $0E5E,x[$7E:0E5E] $A08E48 C2 20 REP #$20 $A08E4A AD 7A 0E LDA $0E7A [$7E:0E7A] $A08E4D 18 CLC $A08E4E 69 07 00 ADC #$0007 $A08E51 8D 7A 0E STA $0E7A [$7E:0E7A] $A08E54 DA PHX $A08E55 5A PHY $A08E56 AF 74 EF 7E LDA $7EEF74[$7E:EF74] $A08E5A AA TAX $A08E5B AF 76 EF 7E LDA $7EEF76[$7E:EF76] $A08E5F 9F 64 EF 7E STA $7EEF64,x[$7E:EF64] $A08E63 DA PHX $A08E64 A6 1C LDX $1C [$7E:001C] $A08E66 BF 00 00 B4 LDA $B40000,x[$B4:9218] $A08E6A FA PLX $A08E6B 9F 5C EF 7E STA $7EEF5C,x[$7E:EF5C] $A08E6F DA PHX $A08E70 A6 1C LDX $1C [$7E:001C] $A08E72 BF 02 00 B4 LDA $B40002,x[$B4:921A] $A08E76 FA PLX $A08E77 9F 6C EF 7E STA $7EEF6C,x[$7E:EF6C] $A08E7B AF 74 EF 7E LDA $7EEF74[$7E:EF74] $A08E7F 18 CLC $A08E80 69 02 00 ADC #$0002 $A08E83 8F 74 EF 7E STA $7EEF74[$7E:EF74] $A08E87 7A PLY $A08E88 FA PLX $A08E89 A5 12 LDA $12 [$7E:0012] $A08E8B 4A LSR A $A08E8C 4A LSR A $A08E8D 4A LSR A $A08E8E 4A LSR A $A08E8F 4A LSR A $A08E90 18 CLC $A08E91 6F 76 EF 7E ADC $7EEF76[$7E:EF76] $A08E95 8F 76 EF 7E STA $7EEF76[$7E:EF76] $A08E99 A6 1C LDX $1C [$7E:001C] $A08E9B BF 00 00 B4 LDA $B40000,x[$B4:9218] $A08E9F AA TAX $A08EA0 BD 00 00 LDA $0000,x[$A0:E23F] $A08EA3 18 CLC $A08EA4 65 1E ADC $1E [$7E:001E] $A08EA6 85 1E STA $1E [$7E:001E] $A08EA8 A5 1C LDA $1C [$7E:001C] $A08EAA 18 CLC $A08EAB 69 04 00 ADC #$0004 $A08EAE 85 1C STA $1C [$7E:001C] $A08EB0 4C AE 8D JMP $8DAE [$A0:8DAE] $A08EB3 7A PLY $A08EB4 FA PLX $A08EB5 60 RTS } ;;; Determine which enemies to process ;;; { $A08EB6 8B PHB $A08EB7 F4 00 A0 PEA $A000 $A08EBA AB PLB $A08EBB AB PLB $A08EBC C2 30 REP #$30 $A08EBE EE 46 0E INC $0E46 [$7E:0E46] $A08EC1 9C 54 0E STZ $0E54 [$7E:0E54] $A08EC4 9C A4 17 STZ $17A4 [$7E:17A4] $A08EC7 9C A6 17 STZ $17A6 [$7E:17A6] $A08ECA AD 3C 18 LDA $183C [$7E:183C] $A08ECD F0 03 BEQ $03 [$8ED2] $A08ECF 4C 77 8F JMP $8F77 [$A0:8F77] $A08ED2 A2 00 00 LDX #$0000 $A08ED5 A0 00 00 LDY #$0000 $A08ED8 AE 54 0E LDX $0E54 [$7E:0E54] $A08EDB BD 78 0F LDA $0F78,x[$7E:0F78] $A08EDE F0 74 BEQ $74 [$8F54] $A08EE0 C9 FF DA CMP #$DAFF $A08EE3 F0 6F BEQ $6F [$8F54] $A08EE5 BD 86 0F LDA $0F86,x[$7E:0F86] $A08EE8 89 00 02 BIT #$0200 $A08EEB F0 06 BEQ $06 [$8EF3] $A08EED 9E 78 0F STZ $0F78,x[$7E:0FF8] $A08EF0 4C 54 8F JMP $8F54 [$A0:8F54] $A08EF3 89 00 08 BIT #$0800 $A08EF6 D0 3C BNE $3C [$8F34] $A08EF8 BD 8A 0F LDA $0F8A,x[$7E:100A] $A08EFB 89 04 00 BIT #$0004 $A08EFE D0 34 BNE $34 [$8F34] $A08F00 BD 7A 0F LDA $0F7A,x[$7E:0FFA] $A08F03 18 CLC $A08F04 7D 82 0F ADC $0F82,x[$7E:1002] $A08F07 CD 11 09 CMP $0911 [$7E:0911] $A08F0A 30 48 BMI $48 [$8F54] $A08F0C AD 11 09 LDA $0911 [$7E:0911] $A08F0F 18 CLC $A08F10 69 00 01 ADC #$0100 $A08F13 18 CLC $A08F14 7D 82 0F ADC $0F82,x[$7E:1002] $A08F17 DD 7A 0F CMP $0F7A,x[$7E:0FFA] $A08F1A 30 38 BMI $38 [$8F54] $A08F1C BD 7E 0F LDA $0F7E,x[$7E:0FFE] $A08F1F 18 CLC $A08F20 69 08 00 ADC #$0008 $A08F23 CD 15 09 CMP $0915 [$7E:0915] $A08F26 30 2C BMI $2C [$8F54] $A08F28 AD 15 09 LDA $0915 [$7E:0915] $A08F2B 18 CLC $A08F2C 69 F8 00 ADC #$00F8 $A08F2F DD 7E 0F CMP $0F7E,x[$7E:107E] $A08F32 30 20 BMI $20 [$8F54] $A08F34 8A TXA $A08F35 AC A4 17 LDY $17A4 [$7E:17A4] $A08F38 99 AC 17 STA $17AC,y[$7E:17AC] $A08F3B C8 INY $A08F3C C8 INY $A08F3D 8C A4 17 STY $17A4 [$7E:17A4] $A08F40 BD 86 0F LDA $0F86,x[$7E:0F86] $A08F43 89 00 04 BIT #$0400 $A08F46 D0 0C BNE $0C [$8F54] $A08F48 8A TXA $A08F49 AC A6 17 LDY $17A6 [$7E:17A6] $A08F4C 99 EC 17 STA $17EC,y[$7E:17EC] $A08F4F C8 INY $A08F50 C8 INY $A08F51 8C A6 17 STY $17A6 [$7E:17A6] $A08F54 AD 54 0E LDA $0E54 [$7E:0E54] $A08F57 18 CLC $A08F58 69 40 00 ADC #$0040 $A08F5B 8D 54 0E STA $0E54 [$7E:0E54] $A08F5E C9 00 08 CMP #$0800 $A08F61 10 03 BPL $03 [$8F66] $A08F63 4C D8 8E JMP $8ED8 [$A0:8ED8] $A08F66 A9 FF FF LDA #$FFFF $A08F69 AC A4 17 LDY $17A4 [$7E:17A4] $A08F6C 99 AC 17 STA $17AC,y[$7E:17B0] $A08F6F AC A6 17 LDY $17A6 [$7E:17A6] $A08F72 99 EC 17 STA $17EC,y[$7E:17F0] $A08F75 AB PLB $A08F76 6B RTL $A08F77 AE 54 0E LDX $0E54 [$7E:0E54] $A08F7A BD 78 0F LDA $0F78,x[$7E:0F78] $A08F7D F0 35 BEQ $35 [$8FB4] $A08F7F C9 FF DA CMP #$DAFF $A08F82 F0 30 BEQ $30 [$8FB4] $A08F84 BD 86 0F LDA $0F86,x[$7E:0F86] $A08F87 89 00 02 BIT #$0200 $A08F8A F0 05 BEQ $05 [$8F91] $A08F8C 9E 78 0F STZ $0F78,x[$7E:0FF8] $A08F8F 80 23 BRA $23 [$8FB4] $A08F91 8A TXA $A08F92 AC A4 17 LDY $17A4 [$7E:17A4] $A08F95 99 AC 17 STA $17AC,y[$7E:17AC] $A08F98 99 EC 17 STA $17EC,y[$7E:17EC] $A08F9B C8 INY $A08F9C C8 INY $A08F9D 8C A4 17 STY $17A4 [$7E:17A4] $A08FA0 BD 86 0F LDA $0F86,x[$7E:0F86] $A08FA3 89 00 04 BIT #$0400 $A08FA6 D0 0C BNE $0C [$8FB4] $A08FA8 8A TXA $A08FA9 AC A6 17 LDY $17A6 [$7E:17A6] $A08FAC 99 EC 17 STA $17EC,y[$7E:17EC] $A08FAF C8 INY $A08FB0 C8 INY $A08FB1 8C A6 17 STY $17A6 [$7E:17A6] $A08FB4 AD 54 0E LDA $0E54 [$7E:0E54] $A08FB7 18 CLC $A08FB8 69 40 00 ADC #$0040 $A08FBB 8D 54 0E STA $0E54 [$7E:0E54] $A08FBE C9 00 08 CMP #$0800 $A08FC1 30 B4 BMI $B4 [$8F77] $A08FC3 A9 FF FF LDA #$FFFF $A08FC6 AC A4 17 LDY $17A4 [$7E:17A4] $A08FC9 99 AC 17 STA $17AC,y[$7E:17B4] $A08FCC AC A6 17 LDY $17A6 [$7E:17A6] $A08FCF 99 EC 17 STA $17EC,y[$7E:17EE] $A08FD2 AB PLB $A08FD3 6B RTL } ;;; Main enemy routine ;;; { $A08FD4 8B PHB $A08FD5 F4 00 A0 PEA $A000 $A08FD8 AB PLB $A08FD9 AB PLB $A08FDA C2 30 REP #$30 $A08FDC AD 4C 0E LDA $0E4C [$7E:0E4C] ; Checks to see if there are any enemies. If not, JMP to end $A08FDF D0 03 BNE $03 [$8FE4] $A08FE1 4C 45 91 JMP $9145 [$A0:9145] $A08FE4 AD 1C 0E LDA $0E1C [$7E:0E1C] $A08FE7 C9 FF FF CMP #$FFFF $A08FEA F0 0D BEQ $0D [$8FF9] $A08FEC AA TAX $A08FED A9 40 00 LDA #$0040 $A08FF0 9D A2 0F STA $0FA2,x[$7E:0FA2] $A08FF3 A9 FF FF LDA #$FFFF $A08FF6 8D 1C 0E STA $0E1C [$7E:0E1C] $A08FF9 9C AA 17 STZ $17AA [$7E:17AA] ; Index of enemy indexes to process $A08FFC 9C A8 17 STZ $17A8 [$7E:17A8] ; Index of enemy indexes that might interact with Samus $A08FFF AC A8 17 LDY $17A8 [$7E:17A8] $A09002 B9 AC 17 LDA $17AC,y[$7E:17AC] $A09005 C9 FF FF CMP #$FFFF ; JMP to end when there are no more enemy indexes $A09008 D0 03 BNE $03 [$900D] $A0900A 4C 45 91 JMP $9145 [$A0:9145] $A0900D 8D 54 0E STA $0E54 [$7E:0E54] ; Current enemy index $A09010 AA TAX $A09011 18 CLC $A09012 69 78 0F ADC #$0F78 $A09015 8D 58 0E STA $0E58 [$7E:0E58] ; Pointer to start of current enemy's memory $A09018 BD A6 0F LDA $0FA6,x[$7E:0FA6] ; Enemy data bank $A0901B 8D 86 17 STA $1786 [$7E:1786] $A0901E BD 86 0F LDA $0F86,x[$7E:0F86] ; Enemy property bits $A09021 89 00 04 BIT #$0400 $A09024 D0 31 BNE $31 [$9057] ; This branch shouldn't ever happen, I think $A09026 BD A0 0F LDA $0FA0,x[$7E:0FA0] $A09029 F0 06 BEQ $06 [$9031] $A0902B DE A0 0F DEC $0FA0,x[$7E:1020] $A0902E 4C 57 90 JMP $9057 [$A0:9057] $A09031 AD 12 0E LDA $0E12 [$7E:0E12] ; Debug only $A09034 D0 21 BNE $21 [$9057] $A09036 AD 78 0A LDA $0A78 [$7E:0A78] ; If gameplay is paused with x-ray or reserve tanks $A09039 0D 5E 18 ORA $185E [$7E:185E] ; Debug only $A0903C D0 0E BNE $0E [$904C] $A0903E 20 58 97 JSR $9758 [$A0:9758] ; Interaction with Samus's projectiles, bombs, and herself $A09041 AE 54 0E LDX $0E54 [$7E:0E54] $A09044 BD 78 0F LDA $0F78,x[$7E:0F78] ; Enemy ID $A09047 D0 03 BNE $03 [$904C] ; I think this should always happen $A09049 4C 18 91 JMP $9118 [$A0:9118] $A0904C AE 54 0E LDX $0E54 [$7E:0E54] $A0904F BD 88 0F LDA $0F88,x[$7E:0F88] ; Extra property bits $A09052 89 01 00 BIT #$0001 ; Check whether or not to display $A09055 D0 6F BNE $6F [$90C6] $A09057 9C A2 17 STZ $17A2 [$7E:17A2] $A0905A AD 78 0A LDA $0A78 [$7E:0A78] ; If game is paused ala x-ray or reserve tank $A0905D 0D 5E 18 ORA $185E [$7E:185E] $A09060 F0 0E BEQ $0E [$9070] $A09062 BD 78 0F LDA $0F78,x[$7E:1078] $A09065 A8 TAY $A09066 B9 20 00 LDA $0020,y[$A0:D29F] $A09069 F0 5B BEQ $5B [$90C6] $A0906B 8D 84 17 STA $1784 [$7E:1784] ; Set x-ray/Reserve tank AI to run. Skipped if #$0000 $A0906E 80 1E BRA $1E [$A0:908E] $A09070 A2 00 00 LDX #$0000 $A09073 AC 54 0E LDY $0E54 [$7E:0E54] $A09076 B9 8A 0F LDA $0F8A,y[$7E:0F8A] ; AI Index $A09079 F0 06 BEQ $06 [$9081] $A0907B E8 INX $A0907C 4A LSR A $A0907D B0 02 BCS $02 [$9081] $A0907F 80 FA BRA $FA [$907B] $A09081 8A TXA $A09082 0A ASL A $A09083 18 CLC ; So A = 2*(lowest bit set in 0F8A) at this point, or 0 if none are set $A09084 79 78 0F ADC $0F78,y[$7E:0F78] $A09087 AA TAX $A09088 BD 18 00 LDA $0018,x[$A0:E257] $A0908B 8D 84 17 STA $1784 [$7E:1784] ; Long pointer to stuff in the enemy's bank $A0908E 8B PHB $A0908F 22 96 90 A0 JSL $A09096[$A0:9096] $A09093 AB PLB $A09094 80 10 BRA $10 [$90A6] } ;;; Execute $1784 ;;; { ; Executes graph AI $A09096 AE 54 0E LDX $0E54 [$7E:0E54] $A09099 BD A6 0F LDA $0FA6,x[$7E:0FA6] $A0909C 8D 86 17 STA $1786 [$7E:1786] $A0909F EB XBA $A090A0 48 PHA $A090A1 AB PLB $A090A2 AB PLB $A090A3 DC 84 17 JML [$1784][$A6:F765] } ;;; ;;; { $A090A6 AD 78 0A LDA $0A78 [$7E:0A78] $A090A9 0D 5E 18 ORA $185E [$7E:185E] $A090AC D0 18 BNE $18 [$90C6] $A090AE AE 54 0E LDX $0E54 [$7E:0E54] $A090B1 FE A4 0F INC $0FA4,x[$7E:0FA4] $A090B4 BD 86 0F LDA $0F86,x[$7E:0F86] $A090B7 89 00 20 BIT #$2000 ; Check if enemy should be processed $A090BA F0 0A BEQ $0A [$90C6] $A090BC A9 02 00 LDA #$0002 $A090BF 8F 78 F3 7E STA $7EF378[$7E:F378] $A090C3 20 6A C2 JSR $C26A [$A0:C26A] ; Processes enemy instructions (similar to PLM stuff) $A090C6 AE 54 0E LDX $0E54 [$7E:0E54] $A090C9 BD 88 0F LDA $0F88,x[$7E:0F88] $A090CC 89 01 00 BIT #$0001 ; Check whether or not to run movement AI? $A090CF F0 1E BEQ $1E [$90EF] $A090D1 BD 9C 0F LDA $0F9C,x[$7E:0F9C] $A090D4 C9 01 00 CMP #$0001 $A090D7 F0 08 BEQ $08 [$90E1] $A090D9 BD 9E 0F LDA $0F9E,x[$7E:0F9E] $A090DC C9 01 00 CMP #$0001 $A090DF D0 0E BNE $0E [$90EF] $A090E1 A9 00 00 LDA #$0000 $A090E4 9F 02 70 7E STA $7E7002,x[$7E:7002] $A090E8 A9 00 00 LDA #$0000 $A090EB 22 AF A3 A0 JSL $A0A3AF[$A0:A3AF] $A090EF AE 54 0E LDX $0E54 [$7E:0E54] $A090F2 BD 88 0F LDA $0F88,x[$7E:0F88] $A090F5 89 04 00 BIT #$0004 $A090F8 D0 08 BNE $08 [$9102] $A090FA 22 E7 AD A0 JSL $A0ADE7[$A0:ADE7] $A090FE F0 02 BEQ $02 [$9102] $A09100 80 16 BRA $16 [$9118] $A09102 AE 54 0E LDX $0E54 [$7E:0E54] $A09105 BD 86 0F LDA $0F86,x[$7E:0F86] $A09108 89 00 03 BIT #$0300 $A0910B D0 0B BNE $0B [$9118] $A0910D AD A2 17 LDA $17A2 [$7E:17A2] $A09110 89 01 00 BIT #$0001 $A09113 D0 03 BNE $03 [$9118] $A09115 20 23 94 JSR $9423 [$A0:9423] $A09118 AE 54 0E LDX $0E54 [$7E:0E54] $A0911B BD 9C 0F LDA $0F9C,x[$7E:0F9C] $A0911E F0 1C BEQ $1C [$913C] $A09120 AD 78 0A LDA $0A78 [$7E:0A78] $A09123 0D 5E 18 ORA $185E [$7E:185E] $A09126 D0 14 BNE $14 [$913C] $A09128 DE 9C 0F DEC $0F9C,x[$7E:109C] $A0912B BD 9C 0F LDA $0F9C,x[$7E:109C] $A0912E C9 08 00 CMP #$0008 $A09131 10 09 BPL $09 [$913C] $A09133 BD 8A 0F LDA $0F8A,x[$7E:108A] $A09136 29 FD FF AND #$FFFD $A09139 9D 8A 0F STA $0F8A,x[$7E:108A] $A0913C EE A8 17 INC $17A8 [$7E:17A8] $A0913F EE A8 17 INC $17A8 [$7E:17A8] $A09142 4C FF 8F JMP $8FFF [$A0:8FFF] ; Loops to next enemy $A09145 22 82 BC B4 JSL $B4BC82[$B4:BC82] $A09149 EE 44 0E INC $0E44 [$7E:0E44] $A0914C A9 FF FF LDA #$FFFF $A0914F 8D 2C 18 STA $182C [$7E:182C] $A09152 8D 2E 18 STA $182E [$7E:182E] $A09155 8D 30 18 STA $1830 [$7E:1830] $A09158 8D 32 18 STA $1832 [$7E:1832] $A0915B 9C 34 18 STZ $1834 [$7E:1834] $A0915E 9C 36 18 STZ $1836 [$7E:1836] $A09161 9C 38 18 STZ $1838 [$7E:1838] $A09164 9C 3A 18 STZ $183A [$7E:183A] $A09167 AB PLB $A09168 6B RTL } ;;; Handles Samus getting hurt? ;;; { $A09169 AD A8 18 LDA $18A8 [$7E:18A8] $A0916C F0 03 BEQ $03 [$9171] $A0916E CE A8 18 DEC $18A8 [$7E:18A8] $A09171 AD AA 18 LDA $18AA [$7E:18AA] $A09174 F0 03 BEQ $03 [$9179] $A09176 CE AA 18 DEC $18AA [$7E:18AA] $A09179 AD AC 18 LDA $18AC [$7E:18AC] $A0917C F0 03 BEQ $03 [$9181] $A0917E CE AC 18 DEC $18AC [$7E:18AC] $A09181 A9 FF FF LDA #$FFFF $A09184 8D EC 17 STA $17EC [$7E:17EC] $A09187 8D AC 17 STA $17AC [$7E:17AC] $A0918A 6B RTL } ;;; ;;; { $A0918B 8B PHB $A0918C AD 48 18 LDA $1848 [$7E:1848] $A0918F D0 03 BNE $03 [$9194] $A09191 A9 00 90 LDA #$9000 $A09194 AA TAX $A09195 AD 44 0E LDA $0E44 [$7E:0E44] $A09198 9F 00 00 7E STA $7E0000,x $A0919C AD FE 0F LDA $0FFE [$7E:0FFE] $A0919F 9F 02 00 7E STA $7E0002,x $A091A3 AD 00 10 LDA $1000 [$7E:1000] $A091A6 9F 04 00 7E STA $7E0004,x $A091AA AD 5C 0B LDA $0B5C [$7E:0B5C] $A091AD 9F 06 00 7E STA $7E0006,x $A091B1 AD 5A 0B LDA $0B5A [$7E:0B5A] $A091B4 9F 08 00 7E STA $7E0008,x $A091B8 AD FA 0A LDA $0AFA [$7E:0AFA] $A091BB 9F 0A 00 7E STA $7E000A,x $A091BF AD FC 0A LDA $0AFC [$7E:0AFC] $A091C2 9F 0C 00 7E STA $7E000C,x $A091C6 AD 2E 0B LDA $0B2E [$7E:0B2E] $A091C9 9F 0E 00 7E STA $7E000E,x $A091CD AD 2C 0B LDA $0B2C [$7E:0B2C] $A091D0 9F 10 00 7E STA $7E0010,x $A091D4 AD 00 0B LDA $0B00 [$7E:0B00] $A091D7 9F 12 00 7E STA $7E0012,x $A091DB AD 1C 0A LDA $0A1C [$7E:0A1C] $A091DE 9F 14 00 7E STA $7E0014,x $A091E2 AD 1E 0A LDA $0A1E [$7E:0A1E] $A091E5 9F 16 00 7E STA $7E0016,x $A091E9 A9 00 00 LDA #$0000 $A091EC 9F 18 00 7E STA $7E0018,x $A091F0 9F 1A 00 7E STA $7E001A,x $A091F4 9F 1C 00 7E STA $7E001C,x $A091F8 9F 1E 00 7E STA $7E001E,x $A091FC 8A TXA $A091FD 18 CLC $A091FE 69 20 00 ADC #$0020 $A09201 C9 00 98 CMP #$9800 $A09204 30 03 BMI $03 [$9209] $A09206 A9 00 00 LDA #$0000 $A09209 8D 48 18 STA $1848 [$7E:1848] $A0920C AB PLB $A0920D 60 RTS } ;;; Spawn enemy drops ;;; { ; $12 and $14 are X/Y. A contains enemy header (to check drop rates) $A0920E 08 PHP $A0920F 8B PHB $A09210 DA PHX $A09211 5A PHY $A09212 8D 24 0E STA $0E24 [$7E:0E24] $A09215 F4 00 A0 PEA $A000 $A09218 AB PLB $A09219 AB PLB $A0921A C2 30 REP #$30 $A0921C A0 37 F3 LDY #$F337 $A0921F AD 20 0E LDA $0E20 [$7E:0E20] $A09222 22 27 80 86 JSL $868027[$86:8027] $A09226 FA PLX $A09227 7A PLY $A09228 AB PLB $A09229 28 PLP $A0922A 6B RTL } ;;; Delete enemy and any connected enemies ;;; { $A0922B 8B PHB $A0922C AE 54 0E LDX $0E54 [$7E:0E54] $A0922F DA PHX $A09230 BD 78 0F LDA $0F78,x $A09233 AA TAX $A09234 BF 14 00 A0 LDA $A00014,x $A09238 D0 01 BNE $01 [$923B] $A0923A 1A INC A $A0923B A8 TAY $A0923C FA PLX $A0923D 9E 78 0F STZ $0F78,x $A09240 8A TXA $A09241 18 CLC $A09242 69 40 00 ADC #$0040 $A09245 AA TAX $A09246 88 DEY $A09247 D0 F4 BNE $F4 [$923D] $A09249 AB PLB $A0924A 6B RTL } ;;; ;;; { $A0924B 8B PHB $A0924C 8E 20 0E STX $0E20 [$7E:0E20] $A0924F 8C 4A 0E STY $0E4A [$7E:0E4A] $A09252 AD 54 0E LDA $0E54 [$7E:0E54] $A09255 8D 56 0E STA $0E56 [$7E:0E56] $A09258 AD 84 17 LDA $1784 [$7E:1784] $A0925B 8D 88 17 STA $1788 [$7E:1788] $A0925E AD 86 17 LDA $1786 [$7E:1786] $A09261 8D 8A 17 STA $178A [$7E:178A] $A09264 BD 00 00 LDA $0000,x $A09267 AA TAX $A09268 BF 14 00 A0 LDA $A00014,x $A0926C 29 FF 00 AND #$00FF $A0926F 8D 26 0E STA $0E26 [$7E:0E26] $A09272 4C DB 92 JMP $92DB [$A0:92DB] } ;;; ;;; { $A09275 8B PHB $A09276 8E 20 0E STX $0E20 [$7E:0E20] $A09279 AD 54 0E LDA $0E54 [$7E:0E54] $A0927C 8D 56 0E STA $0E56 [$7E:0E56] $A0927F AD 84 17 LDA $1784 [$7E:1784] $A09282 8D 88 17 STA $1788 [$7E:1788] $A09285 AD 86 17 LDA $1786 [$7E:1786] $A09288 8D 8A 17 STA $178A [$7E:178A] $A0928B BD 00 00 LDA $0000,x[$A6:AA2F] $A0928E A8 TAY $A0928F DA PHX $A09290 AA TAX $A09291 BF 14 00 A0 LDA $A00014,x[$A0:E253] $A09295 FA PLX $A09296 3A DEC A $A09297 10 03 BPL $03 [$929C] $A09299 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A0929C 8D 22 0E STA $0E22 [$7E:0E22] $A0929F 8D 26 0E STA $0E26 [$7E:0E26] $A092A2 9C 4A 0E STZ $0E4A [$7E:0E4A] $A092A5 AE 4A 0E LDX $0E4A [$7E:0E4A] $A092A8 BD 78 0F LDA $0F78,x[$7E:0F78] $A092AB D0 1A BNE $1A [$92C7] $A092AD BD 78 0F LDA $0F78,x[$7E:0FF8] $A092B0 D0 15 BNE $15 [$92C7] $A092B2 AD 22 0E LDA $0E22 [$7E:0E22] $A092B5 F0 24 BEQ $24 [$92DB] $A092B7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A092C7 AD 4A 0E LDA $0E4A [$7E:0E4A] $A092CA 18 CLC $A092CB 69 40 00 ADC #$0040 $A092CE 8D 4A 0E STA $0E4A [$7E:0E4A] $A092D1 C9 00 08 CMP #$0800 $A092D4 30 CF BMI $CF [$92A5] $A092DB AC 4A 0E LDY $0E4A [$7E:0E4A] $A092DE AE 20 0E LDX $0E20 [$7E:0E20] $A092E1 BD 00 00 LDA $0000,x[$A6:AA2F] $A092E4 A2 00 00 LDX #$0000 $A092E7 CF 5C EF 7E CMP $7EEF5C[$7E:EF5C] $A092EB F0 26 BEQ $26 [$9313] $A092ED A2 02 00 LDX #$0002 $A092F0 CF 5E EF 7E CMP $7EEF5E[$7E:EF5E] $A092F4 F0 1D BEQ $1D [$9313] $A092F6 A2 04 00 LDX #$0004 $A092F9 CF 60 EF 7E CMP $7EEF60[$7E:EF60] $A092FD F0 14 BEQ $14 [$9313] $A092FF A2 06 00 LDX #$0006 $A09302 CF 62 EF 7E CMP $7EEF62[$7E:EF62] $A09306 F0 0B BEQ $0B [$9313] $A09308 A9 00 00 LDA #$0000 $A0930B 99 98 0F STA $0F98,y[$7E:1018] $A0930E 99 96 0F STA $0F96,y[$7E:1016] $A09311 80 10 BRA $10 [$9323] $A09313 BF 64 EF 7E LDA $7EEF64,x[$7E:EF66] $A09317 99 98 0F STA $0F98,y[$7E:1018] $A0931A BF 6C EF 7E LDA $7EEF6C,x[$7E:EF6E] $A0931E EB XBA $A0931F 0A ASL A $A09320 99 96 0F STA $0F96,y[$7E:1016] $A09323 AE 20 0E LDX $0E20 [$7E:0E20] $A09326 BD 00 00 LDA $0000,x[$A6:AA2F] $A09329 AA TAX $A0932A BF 08 00 A0 LDA $A00008,x[$A0:E247] $A0932E 99 82 0F STA $0F82,y[$7E:1002] $A09331 BF 0A 00 A0 LDA $A0000A,x[$A0:E249] $A09335 99 84 0F STA $0F84,y[$7E:1004] $A09338 BF 04 00 A0 LDA $A00004,x[$A0:E243] $A0933C 99 8C 0F STA $0F8C,y[$7E:100C] $A0933F BF 39 00 A0 LDA $A00039,x[$A0:E278] $A09343 29 FF 00 AND #$00FF $A09346 99 9A 0F STA $0F9A,y[$7E:101A] $A09349 BF 0C 00 A0 LDA $A0000C,x[$A0:E24B] $A0934D 99 A6 0F STA $0FA6,y[$7E:1026] $A09350 AE 20 0E LDX $0E20 [$7E:0E20] $A09353 BD 00 00 LDA $0000,x[$A6:AA2F] $A09356 99 78 0F STA $0F78,y[$7E:0FF8] $A09359 BD 02 00 LDA $0002,x[$A6:AA31] $A0935C 99 7A 0F STA $0F7A,y[$7E:0FFA] $A0935F BD 04 00 LDA $0004,x[$A6:AA33] $A09362 99 7E 0F STA $0F7E,y[$7E:0FFE] $A09365 BD 06 00 LDA $0006,x[$A6:AA35] $A09368 99 92 0F STA $0F92,y[$7E:1012] $A0936B BD 08 00 LDA $0008,x[$A6:AA37] $A0936E 99 86 0F STA $0F86,y[$7E:1006] $A09371 BD 0A 00 LDA $000A,x[$A6:AA39] $A09374 99 88 0F STA $0F88,y[$7E:1008] $A09377 BD 0C 00 LDA $000C,x[$A6:AA3B] $A0937A 99 B4 0F STA $0FB4,y[$7E:1034] $A0937D BD 0E 00 LDA $000E,x[$A6:AA3D] $A09380 99 B6 0F STA $0FB6,y[$7E:1036] $A09383 A9 00 00 LDA #$0000 $A09386 99 A4 0F STA $0FA4,y[$7E:1024] $A09389 99 90 0F STA $0F90,y[$7E:1010] $A0938C 99 A8 0F STA $0FA8,y[$7E:1028] $A0938F 99 AA 0F STA $0FAA,y[$7E:102A] $A09392 99 AC 0F STA $0FAC,y[$7E:102C] $A09395 99 AE 0F STA $0FAE,y[$7E:102E] $A09398 99 B0 0F STA $0FB0,y[$7E:1030] $A0939B 99 B2 0F STA $0FB2,y[$7E:1032] $A0939E A9 01 00 LDA #$0001 $A093A1 99 94 0F STA $0F94,y[$7E:1014] $A093A4 A9 00 00 LDA #$0000 $A093A7 99 A4 0F STA $0FA4,y[$7E:1024] $A093AA 22 D0 88 A0 JSL $A088D0[$A0:88D0] $A093AE DA PHX $A093AF 5A PHY $A093B0 8C 54 0E STY $0E54 [$7E:0E54] $A093B3 BE 78 0F LDX $0F78,y[$7E:0FF8] $A093B6 BF 12 00 A0 LDA $A00012,x[$A0:E251] $A093BA C9 00 80 CMP #$8000 $A093BD 30 10 BMI $10 [$93CF] $A093BF 8D 84 17 STA $1784 [$7E:1784] $A093C2 BF 0C 00 A0 LDA $A0000C,x[$A0:E24B] $A093C6 8D 86 17 STA $1786 [$7E:1786] $A093C9 8B PHB $A093CA 22 1A 94 A0 JSL $A0941A[$A0:941A] $A093CE AB PLB $A093CF 7A PLY $A093D0 FA PLX $A093D1 B9 86 0F LDA $0F86,y[$7E:1006] $A093D4 89 00 20 BIT #$2000 $A093D7 F0 06 BEQ $06 [$93DF] $A093D9 A9 4D 80 LDA #$804D $A093DC 99 8E 0F STA $0F8E,y[$7E:100E] $A093DF AD 26 0E LDA $0E26 [$7E:0E26] $A093E2 F0 1C BEQ $1C [$9400] $A093E4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A09400 AD 88 17 LDA $1788 [$7E:1788] $A09403 8D 84 17 STA $1784 [$7E:1784] $A09406 AD 8A 17 LDA $178A [$7E:178A] $A09409 8D 86 17 STA $1786 [$7E:1786] $A0940C AD 56 0E LDA $0E56 [$7E:0E56] $A0940F 8D 54 0E STA $0E54 [$7E:0E54] $A09412 AE 4A 0E LDX $0E4A [$7E:0E4A] $A09415 A9 00 00 LDA #$0000 $A09418 AB PLB $A09419 6B RTL } ;;; Execute $1784 ;;; { ; Executes initiation AI $A0941A B9 A5 0F LDA $0FA5,y[$7E:1025] $A0941D 48 PHA $A0941E AB PLB $A0941F AB PLB $A09420 DC 84 17 JML [$1784][$A6:F6C5] } ;;; Draws enemies, 1 at a time ;;; { $A09423 DA PHX $A09424 5A PHY $A09425 AE 54 0E LDX $0E54 [$7E:0E54] $A09428 BD 9A 0F LDA $0F9A,x[$7E:0F9A] $A0942B 0A ASL A $A0942C 8D 34 0E STA $0E34 [$7E:0E34] $A0942F A8 TAY $A09430 B9 33 B1 LDA $B133,y[$A0:B137] $A09433 18 CLC $A09434 79 68 0F ADC $0F68,y[$7E:0F6C] $A09437 A8 TAY $A09438 AD 54 0E LDA $0E54 [$7E:0E54] $A0943B 99 00 00 STA $0000,y[$7E:0EA6] $A0943E AE 34 0E LDX $0E34 [$7E:0E34] $A09441 FE 68 0F INC $0F68,x[$7E:0F6C] $A09444 FE 68 0F INC $0F68,x[$7E:0F6C] $A09447 7A PLY $A09448 FA PLX $A09449 60 RTS } ;;; ;;; { $A0944A 8B PHB $A0944B AE 54 0E LDX $0E54 [$7E:0E54] $A0944E BD A5 0F LDA $0FA5,x[$7E:0FA5] $A09451 48 PHA $A09452 AB PLB $A09453 AB PLB $A09454 C2 30 REP #$30 $A09456 AE 54 0E LDX $0E54 [$7E:0E54] $A09459 BD 7A 0F LDA $0F7A,x[$7E:0F7A] $A0945C 38 SEC $A0945D ED 11 09 SBC $0911 [$7E:0911] $A09460 18 CLC $A09461 7F 10 70 7E ADC $7E7010,x[$7E:7010] $A09465 8D 22 0E STA $0E22 [$7E:0E22] $A09468 85 14 STA $14 [$7E:0014] $A0946A BD 7E 0F LDA $0F7E,x[$7E:0F7E] $A0946D 38 SEC $A0946E ED 15 09 SBC $0915 [$7E:0915] $A09471 18 CLC $A09472 7F 12 70 7E ADC $7E7012,x[$7E:7012] $A09476 8D 20 0E STA $0E20 [$7E:0E20] $A09479 85 12 STA $12 [$7E:0012] $A0947B BD A2 0F LDA $0FA2,x[$7E:0FA2] $A0947E F0 17 BEQ $17 [$9497] $A09480 BD A4 0F LDA $0FA4,x[$7E:1024] $A09483 29 02 00 AND #$0002 $A09486 F0 07 BEQ $07 [$948F] $A09488 C6 14 DEC $14 [$7E:0014] $A0948A CE 22 0E DEC $0E22 [$7E:0E22] $A0948D 80 05 BRA $05 [$9494] $A0948F E6 14 INC $14 [$7E:0014] $A09491 EE 22 0E INC $0E22 [$7E:0E22] $A09494 DE A2 0F DEC $0FA2,x[$7E:1022] $A09497 BD 9C 0F LDA $0F9C,x[$7E:0F9C] $A0949A F0 0D BEQ $0D [$94A9] $A0949C AD 44 0E LDA $0E44 [$7E:0E44] $A0949F 29 02 00 AND #$0002 $A094A2 F0 05 BEQ $05 [$94A9] $A094A4 A9 00 00 LDA #$0000 $A094A7 80 17 BRA $17 [$94C0] $A094A9 BD 9E 0F LDA $0F9E,x[$7E:0F9E] $A094AC F0 0F BEQ $0F [$94BD] $A094AE C9 5A 00 CMP #$005A $A094B1 B0 05 BCS $05 [$94B8] $A094B3 89 02 00 BIT #$0002 $A094B6 F0 05 BEQ $05 [$94BD] $A094B8 A9 00 0C LDA #$0C00 $A094BB 80 03 BRA $03 [$94C0] $A094BD BD 96 0F LDA $0F96,x[$7E:0F96] $A094C0 85 03 STA $03 [$7E:0003] $A094C2 BD 98 0F LDA $0F98,x[$7E:0F98] $A094C5 85 00 STA $00 [$7E:0000] $A094C7 BD 88 0F LDA $0F88,x[$7E:0F88] $A094CA 89 04 00 BIT #$0004 $A094CD D0 25 BNE $25 [$94F4] $A094CF BD 78 0F LDA $0F78,x[$7E:0F78] $A094D2 8F 7E F3 7E STA $7EF37E[$7E:F37E] $A094D6 BD 92 0F LDA $0F92,x[$7E:0F92] $A094D9 8F 7A F3 7E STA $7EF37A[$7E:F37A] $A094DD AD 54 0E LDA $0E54 [$7E:0E54] $A094E0 8F 7C F3 7E STA $7EF37C[$7E:F37C] $A094E4 A9 01 00 LDA #$0001 $A094E7 8F 78 F3 7E STA $7EF378[$7E:F378] $A094EB BC 8E 0F LDY $0F8E,x[$7E:0F8E] $A094EE 22 B8 8A 81 JSL $818AB8[$81:8AB8] $A094F2 AB PLB $A094F3 60 RTS $A094F4 BD 8E 0F LDA $0F8E,x[$7E:0F8E] $A094F7 C9 00 80 CMP #$8000 $A094FA 30 FE BMI $FE [$94FA] $A094FC A8 TAY $A094FD B9 00 00 LDA $0000,y[$A6:E983] $A09500 29 FF 00 AND #$00FF $A09503 8D 0B 06 STA $060B [$7E:060B] $A09506 C8 INY $A09507 C8 INY $A09508 B9 04 00 LDA $0004,y[$A6:E989] $A0950B 85 16 STA $16 [$7E:0016] $A0950D AA TAX $A0950E BD 00 00 LDA $0000,x[$A6:ED29] $A09511 C9 FE FF CMP #$FFFE $A09514 D0 22 BNE $22 [$9538] $A09516 B9 00 00 LDA $0000,y[$A4:C30E] $A09519 18 CLC $A0951A 6D 22 0E ADC $0E22 [$7E:0E22] $A0951D 85 14 STA $14 [$7E:0014] $A0951F B9 02 00 LDA $0002,y[$A4:C310] $A09522 18 CLC $A09523 6D 20 0E ADC $0E20 [$7E:0E20] $A09526 85 12 STA $12 [$7E:0012] $A09528 AE 54 0E LDX $0E54 [$7E:0E54] $A0952B BD 88 0F LDA $0F88,x[$7E:0F88] $A0952E 29 00 80 AND #$8000 $A09531 F0 3E BEQ $3E [$9571] $A09533 20 CA 96 JSR $96CA [$A0:96CA] $A09536 80 39 BRA $39 [$9571] $A09538 B9 00 00 LDA $0000,y[$A6:E985] $A0953B 18 CLC $A0953C 6D 22 0E ADC $0E22 [$7E:0E22] $A0953F 85 14 STA $14 [$7E:0014] $A09541 69 80 00 ADC #$0080 $A09544 89 00 FE BIT #$FE00 $A09547 D0 28 BNE $28 [$9571] $A09549 B9 02 00 LDA $0002,y[$A6:E987] $A0954C 18 CLC $A0954D 6D 20 0E ADC $0E20 [$7E:0E20] $A09550 85 12 STA $12 [$7E:0012] $A09552 69 80 00 ADC #$0080 $A09555 89 00 FE BIT #$FE00 $A09558 D0 17 BNE $17 [$9571] $A0955A 5A PHY $A0955B A5 12 LDA $12 [$7E:0012] $A0955D 89 00 FF BIT #$FF00 $A09560 D0 08 BNE $08 [$956A] $A09562 A4 16 LDY $16 [$7E:0016] $A09564 22 22 8B 81 JSL $818B22[$81:8B22] $A09568 80 06 BRA $06 [$9570] $A0956A A4 16 LDY $16 [$7E:0016] $A0956C 22 96 8B 81 JSL $818B96[$81:8B96] $A09570 7A PLY $A09571 98 TYA $A09572 18 CLC $A09573 69 08 00 ADC #$0008 $A09576 A8 TAY $A09577 CE 0B 06 DEC $060B [$7E:060B] $A0957A D0 8C BNE $8C [$9508] $A0957C AB PLB $A0957D 60 RTS } ;;; Normal enemy ice AI ;;; { ; Decrements frozen timer, checks if ice beam is equipped $A0957E DA PHX $A0957F 5A PHY $A09580 AE 54 0E LDX $0E54 [$7E:0E54] $A09583 9E 9C 0F STZ $0F9C,x[$7E:0FDC] $A09586 BD 9E 0F LDA $0F9E,x[$7E:0FDE] $A09589 F0 10 BEQ $10 [$959B] $A0958B DE 9E 0F DEC $0F9E,x[$7E:0FDE] $A0958E AD A6 09 LDA $09A6 [$7E:09A6] $A09591 29 02 00 AND #$0002 $A09594 F0 05 BEQ $05 [$959B] $A09596 A9 01 00 LDA #$0001 $A09599 80 0F BRA $0F [$95AA] $A0959B BD 8A 0F LDA $0F8A,x[$7E:104A] $A0959E 29 FB FF AND #$FFFB $A095A1 9D 8A 0F STA $0F8A,x[$7E:104A] $A095A4 9D 9E 0F STA $0F9E,x[$7E:105E] $A095A7 A9 00 00 LDA #$0000 $A095AA 7A PLY $A095AB FA PLX $A095AC 6B RTL } ;;; ;;; { $A095AD 8B PHB $A095AE 08 PHP $A095AF F4 00 A0 PEA $A000 $A095B2 AB PLB $A095B3 AB PLB $A095B4 C2 30 REP #$30 $A095B6 A2 00 00 LDX #$0000 $A095B9 AC 54 0E LDY $0E54 [$7E:0E54] $A095BC B9 8A 0F LDA $0F8A,y $A095BF F0 06 BEQ $06 [$95C7] $A095C1 E8 INX $A095C2 4A LSR A $A095C3 B0 02 BCS $02 [$95C7] $A095C5 80 FA BRA $FA [$95C1] $A095C7 8A TXA $A095C8 0A ASL A $A095C9 18 CLC $A095CA 79 78 0F ADC $0F78,y $A095CD AA TAX $A095CE BD 18 00 LDA $0018,x $A095D1 8D 84 17 STA $1784 [$7E:1784] $A095D4 B9 A6 0F LDA $0FA6,y $A095D7 8D 86 17 STA $1786 [$7E:1786] $A095DA 22 E1 95 A0 JSL $A095E1[$A0:95E1] $A095DE 28 PLP $A095DF AB PLB $A095E0 6B RTL } ;;; ;;; { $A095E1 AE 54 0E LDX $0E54 [$7E:0E54] $A095E4 BD A6 0F LDA $0FA6,x $A095E7 8D 86 17 STA $1786 [$7E:1786] $A095EA EB XBA $A095EB 48 PHA $A095EC AB PLB $A095ED AB PLB $A095EE DC 84 17 JML [$1784] } ;;; ;;; { $A095F1 8B PHB $A095F2 F4 00 A0 PEA $A000 $A095F5 AB PLB $A095F6 AB PLB $A095F7 C2 30 REP #$30 $A095F9 AD 54 0E LDA $0E54 [$7E:0E54] $A095FC 4A LSR A $A095FD 4A LSR A $A095FE 85 12 STA $12 [$7E:0012] $A09600 AD CF 07 LDA $07CF [$7E:07CF] $A09603 18 CLC $A09604 65 12 ADC $12 [$7E:0012] $A09606 AA TAX $A09607 AC 54 0E LDY $0E54 [$7E:0E54] $A0960A BF 00 00 A1 LDA $A10000,x $A0960E 99 78 0F STA $0F78,y $A09611 BF 02 00 A1 LDA $A10002,x $A09615 99 7A 0F STA $0F7A,y $A09618 BF 04 00 A1 LDA $A10004,x $A0961C 99 7E 0F STA $0F7E,y $A0961F BF 06 00 A1 LDA $A10006,x $A09623 99 92 0F STA $0F92,y $A09626 BF 08 00 A1 LDA $A10008,x $A0962A 99 86 0F STA $0F86,y $A0962D BF 0A 00 A1 LDA $A1000A,x $A09631 99 88 0F STA $0F88,y $A09634 BF 0C 00 A1 LDA $A1000C,x $A09638 99 B4 0F STA $0FB4,y $A0963B BF 0E 00 A1 LDA $A1000E,x $A0963F 99 B6 0F STA $0FB6,y $A09642 DA PHX $A09643 BB TYX $A09644 BF 06 70 7E LDA $7E7006,x $A09648 29 00 0E AND #$0E00 $A0964B 9D 96 0F STA $0F96,x $A0964E BF 06 70 7E LDA $7E7006,x $A09652 29 FF 01 AND #$01FF $A09655 9D 98 0F STA $0F98,x $A09658 FA PLX $A09659 A9 00 00 LDA #$0000 $A0965C 99 9E 0F STA $0F9E,y $A0965F 99 9C 0F STA $0F9C,y $A09662 99 A0 0F STA $0FA0,y $A09665 99 90 0F STA $0F90,y $A09668 99 A4 0F STA $0FA4,y $A0966B 99 A8 0F STA $0FA8,y $A0966E 99 AA 0F STA $0FAA,y $A09671 99 AC 0F STA $0FAC,y $A09674 99 AE 0F STA $0FAE,y $A09677 99 B0 0F STA $0FB0,y $A0967A 99 B2 0F STA $0FB2,y $A0967D A9 01 00 LDA #$0001 $A09680 99 94 0F STA $0F94,y $A09683 AE 54 0E LDX $0E54 [$7E:0E54] $A09686 BD 78 0F LDA $0F78,x $A09689 AA TAX $A0968A BD 12 00 LDA $0012,x $A0968D 8D 84 17 STA $1784 [$7E:1784] $A09690 BD 08 00 LDA $0008,x $A09693 99 82 0F STA $0F82,y $A09696 BD 0A 00 LDA $000A,x $A09699 99 84 0F STA $0F84,y $A0969C BD 04 00 LDA $0004,x $A0969F 99 8C 0F STA $0F8C,y $A096A2 BD 39 00 LDA $0039,x $A096A5 29 FF 00 AND #$00FF $A096A8 99 9A 0F STA $0F9A,y $A096AB BD 0C 00 LDA $000C,x $A096AE 99 A6 0F STA $0FA6,y $A096B1 8D 86 17 STA $1786 [$7E:1786] $A096B4 22 BA 96 A0 JSL $A096BA[$A0:96BA] $A096B8 AB PLB $A096B9 6B RTL } ;;; ;;; { $A096BA AE 54 0E LDX $0E54 [$7E:0E54] $A096BD BD A6 0F LDA $0FA6,x $A096C0 8D 86 17 STA $1786 [$7E:1786] $A096C3 EB XBA $A096C4 48 PHA $A096C5 AB PLB $A096C6 AB PLB $A096C7 DC 84 17 JML [$1784] } ;;; ;;; { $A096CA 5A PHY $A096CB A4 16 LDY $16 [$7E:0016] $A096CD C8 INY $A096CE C8 INY $A096CF B9 00 00 LDA $0000,y[$A4:D6DC] $A096D2 C9 FF FF CMP #$FFFF $A096D5 F0 4A BEQ $4A [$9721] $A096D7 AA TAX $A096D8 B9 02 00 LDA $0002,y[$A4:D6DE] $A096DB 8D 0D 06 STA $060D [$7E:060D] $A096DE C8 INY $A096DF C8 INY $A096E0 C8 INY $A096E1 C8 INY $A096E2 4A LSR A $A096E3 90 13 BCC $13 [$96F8] $A096E5 B9 00 00 LDA $0000,y[$A4:D6F4] $A096E8 9F 00 00 7E STA $7E0000,x[$7E:2040] $A096EC E8 INX $A096ED E8 INX $A096EE C8 INY $A096EF C8 INY $A096F0 CE 0D 06 DEC $060D [$7E:060D] $A096F3 D0 F0 BNE $F0 [$96E5] $A096F5 4C CF 96 JMP $96CF [$A0:96CF] $A096F8 B9 00 00 LDA $0000,y[$A4:D6E0] $A096FB 9F 00 00 7E STA $7E0000,x[$7E:2000] $A096FF B9 02 00 LDA $0002,y[$A4:D6E2] $A09702 9F 02 00 7E STA $7E0002,x[$7E:2002] $A09706 E8 INX $A09707 E8 INX $A09708 E8 INX $A09709 E8 INX $A0970A C8 INY $A0970B C8 INY $A0970C C8 INY $A0970D C8 INY $A0970E E0 00 28 CPX #$2800 $A09711 10 FE BPL $FE [$9711] $A09713 CE 0D 06 DEC $060D [$7E:060D] $A09716 CE 0D 06 DEC $060D [$7E:060D] $A09719 AD 0D 06 LDA $060D [$7E:060D] $A0971C D0 DA BNE $DA [$96F8] $A0971E 4C CF 96 JMP $96CF [$A0:96CF] $A09721 EE 1E 0E INC $0E1E [$7E:0E1E] $A09724 7A PLY $A09725 60 RTS } ;;; Something for the graphic update table ;;; { $A09726 AD 1E 0E LDA $0E1E [$7E:0E1E] $A09729 F0 29 BEQ $29 [$9754] $A0972B AD 78 0A LDA $0A78 [$7E:0A78] $A0972E 0D 5E 18 ORA $185E [$7E:185E] $A09731 D0 21 BNE $21 [$9754] $A09733 AE 30 03 LDX $0330 [$7E:0330] $A09736 AD 9A 17 LDA $179A [$7E:179A] $A09739 95 D0 STA $D0,x [$7E:00D0] $A0973B A9 00 20 LDA #$2000 $A0973E 95 D2 STA $D2,x [$7E:00D2] $A09740 A9 7E 00 LDA #$007E $A09743 95 D4 STA $D4,x [$7E:00D4] $A09745 A9 00 48 LDA #$4800 $A09748 95 D5 STA $D5,x [$7E:00D5] $A0974A AD 30 03 LDA $0330 [$7E:0330] $A0974D 18 CLC $A0974E 69 07 00 ADC #$0007 $A09751 8D 30 03 STA $0330 [$7E:0330] $A09754 9C 1E 0E STZ $0E1E [$7E:0E1E] $A09757 6B RTL } ;;; Interaction with Samus ;;; { ; Depends on $0F88,X's 2 bit ; If set: projectiles: JSR $9B7F, bombs: JSR $9D23, Samus: JSR $9A5A ; Not set: projectiles: JSR $A143, bombs: JSR $A236, Samus: JSR $A07A $A09758 08 PHP $A09759 8B PHB $A0975A F4 00 A0 PEA $A000 $A0975D AB PLB $A0975E AB PLB $A0975F C2 30 REP #$30 $A09761 AE 54 0E LDX $0E54 [$7E:0E54] $A09764 BD 88 0F LDA $0F88,x[$7E:0F88] $A09767 89 04 00 BIT #$0004 $A0976A F0 0C BEQ $0C [$9778] $A0976C 20 7F 9B JSR $9B7F [$A0:9B7F] $A0976F 20 23 9D JSR $9D23 [$A0:9D23] $A09772 20 5A 9A JSR $9A5A [$A0:9A5A] $A09775 AB PLB $A09776 28 PLP $A09777 60 RTS $A09778 20 43 A1 JSR $A143 [$A0:A143] $A0977B 20 36 A2 JSR $A236 [$A0:A236] $A0977E 20 7A A0 JSR $A07A [$A0:A07A] $A09781 AB PLB $A09782 28 PLP $A09783 60 RTS } $A09784 6B RTL ;;; Detects/sets up bomb jumping ;;; { $A09785 8B PHB $A09786 F4 00 A0 PEA $A000 $A09789 AB PLB $A0978A AB PLB $A0978B C2 30 REP #$30 $A0978D A9 0A 00 LDA #$000A $A09790 8F 78 F3 7E STA $7EF378[$7E:F378] $A09794 AD AE 18 LDA $18AE [$7E:18AE] $A09797 D0 10 BNE $10 [$97A9] $A09799 A9 05 00 LDA #$0005 $A0979C 8D 7C 18 STA $187C [$7E:187C] $A0979F AD D2 0C LDA $0CD2 [$7E:0CD2] $A097A2 D0 07 BNE $07 [$97AB] $A097A4 AD CE 0C LDA $0CCE [$7E:0CCE] $A097A7 D0 08 BNE $08 [$97B1] $A097A9 AB PLB $A097AA 6B RTL $A097AB A9 0A 00 LDA #$000A $A097AE 8D 7C 18 STA $187C [$7E:187C] $A097B1 AD AC 18 LDA $18AC [$7E:18AC] $A097B4 F0 02 BEQ $02 [$97B8] $A097B6 AB PLB $A097B7 6B RTL $A097B8 AD 6E 0A LDA $0A6E [$7E:0A6E] $A097BB F0 02 BEQ $02 [$97BF] $A097BD AB PLB $A097BE 6B RTL $A097BF 9C A6 18 STZ $18A6 [$7E:18A6] $A097C2 AD A6 18 LDA $18A6 [$7E:18A6] $A097C5 0A ASL A $A097C6 A8 TAY $A097C7 B9 2C 0C LDA $0C2C,y[$7E:0C2C] $A097CA D0 03 BNE $03 [$97CF] $A097CC 4C 84 98 JMP $9884 [$A0:9884] $A097CF B9 18 0C LDA $0C18,y[$7E:0C18] $A097D2 89 00 80 BIT #$8000 $A097D5 D0 08 BNE $08 [$97DF] $A097D7 29 00 0F AND #$0F00 $A097DA C9 00 07 CMP #$0700 $A097DD 30 03 BMI $03 [$97E2] $A097DF 4C 84 98 JMP $9884 [$A0:9884] $A097E2 B9 04 0C LDA $0C04,y[$7E:0C0E] $A097E5 29 10 00 AND #$0010 $A097E8 D0 F5 BNE $F5 [$97DF] $A097EA B9 64 0B LDA $0B64,y[$7E:0B6E] $A097ED 38 SEC $A097EE ED F6 0A SBC $0AF6 [$7E:0AF6] $A097F1 10 04 BPL $04 [$97F7] $A097F3 49 FF FF EOR #$FFFF $A097F6 1A INC A $A097F7 38 SEC $A097F8 F9 B4 0B SBC $0BB4,y[$7E:0BBE] $A097FB 90 05 BCC $05 [$9802] $A097FD CD FE 0A CMP $0AFE [$7E:0AFE] $A09800 B0 DD BCS $DD [$97DF] $A09802 B9 78 0B LDA $0B78,y[$7E:0B82] $A09805 38 SEC $A09806 ED FA 0A SBC $0AFA [$7E:0AFA] $A09809 10 04 BPL $04 [$980F] $A0980B 49 FF FF EOR #$FFFF $A0980E 1A INC A $A0980F 38 SEC $A09810 F9 C8 0B SBC $0BC8,y[$7E:0BD2] $A09813 90 07 BCC $07 [$981C] $A09815 CD 00 0B CMP $0B00 [$7E:0B00] $A09818 90 02 BCC $02 [$981C] $A0981A 80 68 BRA $68 [$9884] $A0981C B9 18 0C LDA $0C18,y[$7E:0C22] $A0981F 29 00 FF AND #$FF00 $A09822 C9 00 03 CMP #$0300 $A09825 F0 05 BEQ $05 [$982C] $A09827 C9 00 05 CMP #$0500 $A0982A D0 24 BNE $24 [$9850] $A0982C B9 7C 0C LDA $0C7C,y[$7E:0C86] $A0982F C9 08 00 CMP #$0008 $A09832 D0 50 BNE $50 [$9884] $A09834 AD F6 0A LDA $0AF6 [$7E:0AF6] $A09837 D9 64 0B CMP $0B64,y[$7E:0B6E] $A0983A F0 0C BEQ $0C [$9848] $A0983C 30 05 BMI $05 [$9843] $A0983E A9 03 00 LDA #$0003 $A09841 80 08 BRA $08 [$984B] $A09843 A9 01 00 LDA #$0001 $A09846 80 03 BRA $03 [$984B] $A09848 A9 02 00 LDA #$0002 $A0984B 8D 56 0A STA $0A56 [$7E:0A56] $A0984E 80 34 BRA $34 [$9884] $A09850 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A09884 EE A6 18 INC $18A6 [$7E:18A6] $A09887 AD A6 18 LDA $18A6 [$7E:18A6] $A0988A CD 7C 18 CMP $187C [$7E:187C] $A0988D F0 03 BEQ $03 [$9892] $A0988F 4C C2 97 JMP $97C2 [$A0:97C2] $A09892 AB PLB $A09893 6B RTL } ;;; ER projectile collision with Samus ;;; { $A09894 08 PHP $A09895 8B PHB $A09896 F4 00 A0 PEA $A000 $A09899 AB PLB $A0989A AB PLB $A0989B C2 30 REP #$30 $A0989D A9 0B 00 LDA #$000B $A098A0 8F 78 F3 7E STA $7EF378[$7E:F378] $A098A4 AD A8 18 LDA $18A8 [$7E:18A8] $A098A7 F0 03 BEQ $03 [$98AC] $A098A9 AB PLB $A098AA 28 PLP $A098AB 6B RTL $A098AC AD 6E 0A LDA $0A6E [$7E:0A6E] $A098AF D0 6F BNE $6F [$9920] $A098B1 A9 22 00 LDA #$0022 $A098B4 8D A6 18 STA $18A6 [$7E:18A6] $A098B7 AE A6 18 LDX $18A6 [$7E:18A6] $A098BA BD 97 19 LDA $1997,x[$7E:19B9] $A098BD F0 56 BEQ $56 [$9915] $A098BF BD D7 1B LDA $1BD7,x[$7E:1BF9] $A098C2 89 00 20 BIT #$2000 $A098C5 D0 4E BNE $4E [$9915] $A098C7 BD B3 1B LDA $1BB3,x[$7E:1BD5] $A098CA 29 FF 00 AND #$00FF $A098CD D0 03 BNE $03 [$98D2] $A098CF 4C 15 99 JMP $9915 [$A0:9915] $A098D2 8D 20 0E STA $0E20 [$7E:0E20] $A098D5 BD B4 1B LDA $1BB4,x[$7E:1BD6] $A098D8 29 FF 00 AND #$00FF $A098DB F0 38 BEQ $38 [$9915] $A098DD 8D 22 0E STA $0E22 [$7E:0E22] $A098E0 AD F6 0A LDA $0AF6 [$7E:0AF6] $A098E3 38 SEC $A098E4 FD 4B 1A SBC $1A4B,x[$7E:1A6D] $A098E7 10 04 BPL $04 [$98ED] $A098E9 49 FF FF EOR #$FFFF $A098EC 1A INC A $A098ED 38 SEC $A098EE ED FE 0A SBC $0AFE [$7E:0AFE] $A098F1 90 05 BCC $05 [$98F8] $A098F3 CD 20 0E CMP $0E20 [$7E:0E20] $A098F6 B0 1D BCS $1D [$9915] $A098F8 AD FA 0A LDA $0AFA [$7E:0AFA] $A098FB 38 SEC $A098FC FD 93 1A SBC $1A93,x[$7E:1AB5] $A098FF 10 04 BPL $04 [$9905] $A09901 49 FF FF EOR #$FFFF $A09904 1A INC A $A09905 38 SEC $A09906 ED 00 0B SBC $0B00 [$7E:0B00] $A09909 90 07 BCC $07 [$9912] $A0990B CD 22 0E CMP $0E22 [$7E:0E22] $A0990E 90 02 BCC $02 [$9912] $A09910 80 03 BRA $03 [$9915] $A09912 20 23 99 JSR $9923 [$A0:9923] $A09915 CE A6 18 DEC $18A6 [$7E:18A6] $A09918 CE A6 18 DEC $18A6 [$7E:18A6] $A0991B AD A6 18 LDA $18A6 [$7E:18A6] $A0991E 10 97 BPL $97 [$98B7] $A09920 AB PLB $A09921 28 PLP $A09922 6B RTL } ;;; ;;; { $A09923 A9 60 00 LDA #$0060 $A09926 8D A8 18 STA $18A8 [$7E:18A8] $A09929 A9 05 00 LDA #$0005 $A0992C 8D AA 18 STA $18AA [$7E:18AA] $A0992F 9B TXY $A09930 BE 97 19 LDX $1997,y[$7E:19B9] $A09933 BF 0A 00 86 LDA $86000A,x[$86:973E] $A09937 F0 09 BEQ $09 [$9942] $A09939 99 47 1B STA $1B47,y[$7E:1B69] $A0993C A9 01 00 LDA #$0001 $A0993F 99 8F 1B STA $1B8F,y[$7E:1BB1] $A09942 BB TYX $A09943 3C D7 1B BIT $1BD7,x[$7E:1BF9] $A09946 70 03 BVS $03 [$994B] $A09948 9E 97 19 STZ $1997,x[$7E:19B7] $A0994B BD D7 1B LDA $1BD7,x[$7E:1BF9] $A0994E 29 FF 0F AND #$0FFF $A09951 22 5E A4 A0 JSL $A0A45E[$A0:A45E] $A09955 22 51 DF 91 JSL $91DF51[$91:DF51] $A09959 A0 00 00 LDY #$0000 $A0995C AD F6 0A LDA $0AF6 [$7E:0AF6] $A0995F 38 SEC $A09960 FD 4B 1A SBC $1A4B,x[$7E:1A6D] $A09963 30 03 BMI $03 [$9968] $A09965 A0 01 00 LDY #$0001 $A09968 8C 54 0A STY $0A54 [$7E:0A54] $A0996B 60 RTS } ;;; ER projectile collision with Samus projectile ;;; { $A0996C 08 PHP $A0996D 8B PHB $A0996E F4 00 A0 PEA $A000 $A09971 AB PLB $A09972 AB PLB $A09973 C2 30 REP #$30 $A09975 A9 0C 00 LDA #$000C $A09978 8F 78 F3 7E STA $7EF378[$7E:F378] $A0997C AD CE 0C LDA $0CCE [$7E:0CCE] $A0997F D0 03 BNE $03 [$9984] $A09981 AB PLB $A09982 28 PLP $A09983 6B RTL $A09984 A9 22 00 LDA #$0022 $A09987 8D A6 18 STA $18A6 [$7E:18A6] $A0998A AE A6 18 LDX $18A6 [$7E:18A6] $A0998D BD 97 19 LDA $1997,x[$7E:19B9] $A09990 F0 56 BEQ $56 [$99E8] $A09992 BD D7 1B LDA $1BD7,x[$7E:1BF9] $A09995 10 51 BPL $51 [$99E8] $A09997 A0 00 00 LDY #$0000 $A0999A BF 80 F3 7E LDA $7EF380,x[$7E:F3A2] $A0999E C9 02 00 CMP #$0002 $A099A1 F0 45 BEQ $45 [$99E8] $A099A3 B9 18 0C LDA $0C18,y[$7E:0C18] $A099A6 F0 39 BEQ $39 [$99E1] $A099A8 29 00 0F AND #$0F00 $A099AB C9 00 03 CMP #$0300 $A099AE F0 31 BEQ $31 [$99E1] $A099B0 C9 00 05 CMP #$0500 $A099B3 F0 2C BEQ $2C [$99E1] $A099B5 C9 00 07 CMP #$0700 $A099B8 10 27 BPL $27 [$99E1] $A099BA B9 64 0B LDA $0B64,y[$7E:0B64] $A099BD 29 E0 FF AND #$FFE0 $A099C0 85 12 STA $12 [$7E:0012] $A099C2 BD 4B 1A LDA $1A4B,x[$7E:1A6D] $A099C5 29 E0 FF AND #$FFE0 $A099C8 C5 12 CMP $12 [$7E:0012] $A099CA D0 15 BNE $15 [$99E1] $A099CC B9 78 0B LDA $0B78,y[$7E:0B7A] $A099CF 29 E0 FF AND #$FFE0 $A099D2 85 12 STA $12 [$7E:0012] $A099D4 BD 93 1A LDA $1A93,x[$7E:1AB5] $A099D7 29 E0 FF AND #$FFE0 $A099DA C5 12 CMP $12 [$7E:0012] $A099DC D0 03 BNE $03 [$99E1] $A099DE 20 F9 99 JSR $99F9 [$A0:99F9] $A099E1 C8 INY $A099E2 C8 INY $A099E3 C0 0A 00 CPY #$000A $A099E6 30 B2 BMI $B2 [$999A] $A099E8 CE A6 18 DEC $18A6 [$7E:18A6] $A099EB CE A6 18 DEC $18A6 [$7E:18A6] $A099EE AD A6 18 LDA $18A6 [$7E:18A6] $A099F1 30 03 BMI $03 [$99F6] $A099F3 4C 8A 99 JMP $998A [$A0:998A] $A099F6 AB PLB $A099F7 28 PLP $A099F8 6B RTL } ;;; ;;; { $A099F9 B9 18 0C LDA $0C18,y[$7E:0C18] $A099FC 89 08 00 BIT #$0008 $A099FF D0 09 BNE $09 [$9A0A] $A09A01 B9 04 0C LDA $0C04,y[$7E:0C04] $A09A04 09 10 00 ORA #$0010 $A09A07 99 04 0C STA $0C04,y[$7E:0C04] $A09A0A BF 80 F3 7E LDA $7EF380,x[$7E:F396] $A09A0E C9 01 00 CMP #$0001 $A09A11 F0 2A BEQ $2A [$9A3D] $A09A13 B9 18 0C LDA $0C18,y[$7E:0C18] $A09A16 5A PHY $A09A17 9B TXY $A09A18 99 FB 1B STA $1BFB,y[$7E:1C11] $A09A1B BE 97 19 LDX $1997,y[$7E:19AD] $A09A1E BF 0C 00 86 LDA $86000C,x[$86:AD6A] $A09A22 99 47 1B STA $1B47,y[$7E:1B5D] $A09A25 A9 01 00 LDA #$0001 $A09A28 99 8F 1B STA $1B8F,y[$7E:1BA5] $A09A2B A9 FB 84 LDA #$84FB $A09A2E 99 03 1A STA $1A03,y[$7E:1A19] $A09A31 B9 D7 1B LDA $1BD7,y[$7E:1BED] $A09A34 29 FF 0F AND #$0FFF $A09A37 99 D7 1B STA $1BD7,y[$7E:1BED] $A09A3A BB TYX $A09A3B 7A PLY $A09A3C 60 RTS $A09A3D BD 64 0B LDA $0B64,x[$7E:0B86] $A09A40 85 12 STA $12 [$7E:0012] $A09A42 BD 78 0B LDA $0B78,x[$7E:0B9A] $A09A45 85 14 STA $14 [$7E:0014] $A09A47 A9 06 00 LDA #$0006 $A09A4A 85 16 STA $16 [$7E:0016] $A09A4C 64 18 STZ $18 [$7E:0018] $A09A4E 22 26 BC B4 JSL $B4BC26[$B4:BC26] $A09A52 A9 3D 00 LDA #$003D $A09A55 22 49 90 80 JSL $809049[$80:9049] $A09A59 60 RTS } ;;; Check for collision with Samus ;;; { ; If they collide, JSL to that hitbox's 0Ath byte (Samus collision code). ; This routine disables Samus's invincibility if she is using blue suit or screw attack; ; if there are no enemies she'll get invincibility time with them $A09A5A 8B PHB $A09A5B AE 54 0E LDX $0E54 [$7E:0E54] $A09A5E BD A6 0F LDA $0FA6,x[$7E:0FA6] $A09A61 8D 86 17 STA $1786 [$7E:1786] $A09A64 EB XBA $A09A65 48 PHA $A09A66 AB PLB $A09A67 AB PLB $A09A68 A9 06 00 LDA #$0006 $A09A6B 8F 78 F3 7E STA $7EF378[$7E:F378] $A09A6F AC 54 0E LDY $0E54 [$7E:0E54] $A09A72 B9 8E 0F LDA $0F8E,y[$7E:0F8E] $A09A75 F0 12 BEQ $12 [$9A89] $A09A77 BD 78 0F LDA $0F78,x[$7E:0F78] $A09A7A AA TAX $A09A7B BF 30 00 A0 LDA $A00030,x[$A0:E16F] $A09A7F C9 4C 80 CMP #$804C $A09A82 F0 05 BEQ $05 [$9A89] $A09A84 C9 4B 80 CMP #$804B $A09A87 D0 02 BNE $02 [$9A8B] $A09A89 AB PLB $A09A8A 60 RTS $A09A8B AD 6E 0A LDA $0A6E [$7E:0A6E] $A09A8E F0 05 BEQ $05 [$9A95] $A09A90 9C A8 18 STZ $18A8 [$7E:18A8] $A09A93 80 05 BRA $05 [$9A9A] $A09A95 AD A8 18 LDA $18A8 [$7E:18A8] $A09A98 D0 EF BNE $EF [$9A89] $A09A9A AE 54 0E LDX $0E54 [$7E:0E54] $A09A9D BD 8E 0F LDA $0F8E,x[$7E:0F8E] $A09AA0 C9 00 80 CMP #$8000 $A09AA3 30 E4 BMI $E4 [$9A89] } ;;; ;;; { $A09AA5 AD F6 0A LDA $0AF6 [$7E:0AF6] $A09AA8 18 CLC $A09AA9 6D FE 0A ADC $0AFE [$7E:0AFE] $A09AAC 8D 7E 18 STA $187E [$7E:187E] $A09AAF AD F6 0A LDA $0AF6 [$7E:0AF6] $A09AB2 38 SEC $A09AB3 ED FE 0A SBC $0AFE [$7E:0AFE] $A09AB6 8D 80 18 STA $1880 [$7E:1880] $A09AB9 AD FA 0A LDA $0AFA [$7E:0AFA] $A09ABC 18 CLC $A09ABD 6D 00 0B ADC $0B00 [$7E:0B00] $A09AC0 8D 82 18 STA $1882 [$7E:1882] $A09AC3 AD FA 0A LDA $0AFA [$7E:0AFA] $A09AC6 38 SEC $A09AC7 ED 00 0B SBC $0B00 [$7E:0B00] $A09ACA 8D 84 18 STA $1884 [$7E:1884] $A09ACD BD 8E 0F LDA $0F8E,x[$7E:0F8E] $A09AD0 AA TAX $A09AD1 BD 00 00 LDA $0000,x[$A6:E983] $A09AD4 29 FF 00 AND #$00FF $A09AD7 8D 0B 06 STA $060B [$7E:060B] $A09ADA E8 INX $A09ADB E8 INX $A09ADC 8E 6E 18 STX $186E [$7E:186E] $A09ADF AE 6E 18 LDX $186E [$7E:186E] $A09AE2 AC 54 0E LDY $0E54 [$7E:0E54] $A09AE5 B9 7A 0F LDA $0F7A,y[$7E:0F7A] $A09AE8 18 CLC $A09AE9 7D 00 00 ADC $0000,x[$A6:E985] $A09AEC 8D 7A 18 STA $187A [$7E:187A] $A09AEF B9 7E 0F LDA $0F7E,y[$7E:0F7E] $A09AF2 18 CLC $A09AF3 7D 02 00 ADC $0002,x[$A6:E987] $A09AF6 8D 7C 18 STA $187C [$7E:187C] $A09AF9 BD 06 00 LDA $0006,x[$A6:E98B] $A09AFC AA TAX $A09AFD BD 00 00 LDA $0000,x[$A6:EB2F] $A09B00 F0 64 BEQ $64 [$9B66] $A09B02 8D 0D 06 STA $060D [$7E:060D] $A09B05 E8 INX $A09B06 E8 INX $A09B07 8E 78 18 STX $1878 [$7E:1878] $A09B0A AE 78 18 LDX $1878 [$7E:1878] $A09B0D AD 7A 18 LDA $187A [$7E:187A] $A09B10 18 CLC $A09B11 7D 00 00 ADC $0000,x[$A6:EB31] $A09B14 CD 7E 18 CMP $187E [$7E:187E] $A09B17 10 36 BPL $36 [$9B4F] $A09B19 AD 7A 18 LDA $187A [$7E:187A] $A09B1C 18 CLC $A09B1D 7D 04 00 ADC $0004,x[$A6:EB35] $A09B20 CD 80 18 CMP $1880 [$7E:1880] $A09B23 30 2A BMI $2A [$9B4F] $A09B25 AD 7C 18 LDA $187C [$7E:187C] $A09B28 18 CLC $A09B29 7D 02 00 ADC $0002,x[$A6:F298] $A09B2C CD 82 18 CMP $1882 [$7E:1882] $A09B2F 10 1E BPL $1E [$9B4F] $A09B31 AD 7C 18 LDA $187C [$7E:187C] $A09B34 18 CLC $A09B35 7D 06 00 ADC $0006,x[$A6:F29C] $A09B38 CD 84 18 CMP $1884 [$7E:1884] $A09B3B 30 12 BMI $12 [$9B4F] $A09B3D 22 43 9B A0 JSL $A09B43[$A0:9B43] $A09B41 80 3A BRA $3A [$9B7D] $A09B43 AE 78 18 LDX $1878 [$7E:1878] $A09B46 BD 08 00 LDA $0008,x[$A6:F29E] $A09B49 8D 84 17 STA $1784 [$7E:1784] $A09B4C DC 84 17 JML [$1784][$A6:F03F] $A09B4F AD 78 18 LDA $1878 [$7E:1878] $A09B52 18 CLC $A09B53 69 0C 00 ADC #$000C $A09B56 8D 78 18 STA $1878 [$7E:1878] $A09B59 CE 0D 06 DEC $060D [$7E:060D] $A09B5C AD 0D 06 LDA $060D [$7E:060D] $A09B5F F0 05 BEQ $05 [$9B66] $A09B61 30 03 BMI $03 [$9B66] $A09B63 4C 0A 9B JMP $9B0A [$A0:9B0A] $A09B66 AD 6E 18 LDA $186E [$7E:186E] $A09B69 18 CLC $A09B6A 69 08 00 ADC #$0008 $A09B6D 8D 6E 18 STA $186E [$7E:186E] $A09B70 CE 0B 06 DEC $060B [$7E:060B] $A09B73 AD 0B 06 LDA $060B [$7E:060B] $A09B76 F0 05 BEQ $05 [$9B7D] $A09B78 30 03 BMI $03 [$9B7D] $A09B7A 4C DF 9A JMP $9ADF [$A0:9ADF] $A09B7D AB PLB $A09B7E 60 RTS } ;;; Check for collisions of all of the enemy's sprites/hitboxes in $0F8E with all projectiles ;;; { ; If there's a collision, JSL $A09D17 then RTS. $A09B7F 8B PHB $A09B80 AE 54 0E LDX $0E54 [$7E:0E54] $A09B83 BD A6 0F LDA $0FA6,x[$7E:0FA6] $A09B86 8D 86 17 STA $1786 [$7E:1786] $A09B89 EB XBA $A09B8A 48 PHA $A09B8B AB PLB $A09B8C AB PLB $A09B8D A9 03 00 LDA #$0003 $A09B90 8F 78 F3 7E STA $7EF378[$7E:F378] $A09B94 AD CE 0C LDA $0CCE [$7E:0CCE] $A09B97 D0 02 BNE $02 [$9B9B] $A09B99 AB PLB $A09B9A 60 RTS $A09B9B 8D 0F 06 STA $060F [$7E:060F] $A09B9E AC 54 0E LDY $0E54 [$7E:0E54] $A09BA1 B9 8E 0F LDA $0F8E,y[$7E:0F8E] $A09BA4 F0 16 BEQ $16 [$9BBC] $A09BA6 C9 4F 80 CMP #$804F $A09BA9 F0 11 BEQ $11 [$9BBC] $A09BAB BE 78 0F LDX $0F78,y[$7E:0F78] $A09BAE BF 32 00 A0 LDA $A00032,x[$A0:F685] $A09BB2 C9 4C 80 CMP #$804C $A09BB5 F0 05 BEQ $05 [$9BBC] $A09BB7 C9 4B 80 CMP #$804B $A09BBA D0 02 BNE $02 [$9BBE] $A09BBC AB PLB $A09BBD 60 RTS $A09BBE AE 54 0E LDX $0E54 [$7E:0E54] $A09BC1 BD 86 0F LDA $0F86,x[$7E:0F86] $A09BC4 89 00 04 BIT #$0400 $A09BC7 D0 F3 BNE $F3 [$9BBC] $A09BC9 BD A0 0F LDA $0FA0,x[$7E:0FA0] $A09BCC D0 EE BNE $EE [$9BBC] $A09BCE BD 78 0F LDA $0F78,x[$7E:0F78] $A09BD1 C9 FF DA CMP #$DAFF $A09BD4 F0 E6 BEQ $E6 [$9BBC] $A09BD6 9C A6 18 STZ $18A6 [$7E:18A6] $A09BD9 AE 54 0E LDX $0E54 [$7E:0E54] $A09BDC AD A6 18 LDA $18A6 [$7E:18A6] $A09BDF 0A ASL A $A09BE0 A8 TAY $A09BE1 B9 18 0C LDA $0C18,y[$7E:0C18] $A09BE4 F0 12 BEQ $12 [$9BF8] $A09BE6 29 00 0F AND #$0F00 $A09BE9 C9 00 03 CMP #$0300 $A09BEC F0 0A BEQ $0A [$9BF8] $A09BEE C9 00 05 CMP #$0500 $A09BF1 F0 05 BEQ $05 [$9BF8] $A09BF3 C9 00 07 CMP #$0700 $A09BF6 30 03 BMI $03 [$9BFB] $A09BF8 4C 07 9D JMP $9D07 [$A0:9D07] } ;;; ;;; { $A09BFB AE 54 0E LDX $0E54 [$7E:0E54] $A09BFE BD 8E 0F LDA $0F8E,x[$7E:0F8E] $A09C01 C9 00 80 CMP #$8000 $A09C04 30 FE BMI $FE [$9C04] $A09C06 AA TAX $A09C07 BD 00 00 LDA $0000,x[$B2:8B1A] $A09C0A 29 FF 00 AND #$00FF $A09C0D 8D 0B 06 STA $060B [$7E:060B] $A09C10 E8 INX $A09C11 E8 INX $A09C12 8E 6E 18 STX $186E [$7E:186E] $A09C15 AE 6E 18 LDX $186E [$7E:186E] $A09C18 AC 54 0E LDY $0E54 [$7E:0E54] $A09C1B B9 7A 0F LDA $0F7A,y[$7E:0F7A] $A09C1E 18 CLC $A09C1F 7D 00 00 ADC $0000,x[$B2:8B1C] $A09C22 8D 7A 18 STA $187A [$7E:187A] $A09C25 B9 7E 0F LDA $0F7E,y[$7E:0F7E] $A09C28 18 CLC $A09C29 7D 02 00 ADC $0002,x[$B2:8B1E] $A09C2C 8D 7C 18 STA $187C [$7E:187C] $A09C2F BD 06 00 LDA $0006,x[$B2:8B22] $A09C32 AA TAX $A09C33 BD 00 00 LDA $0000,x[$B2:9D88] $A09C36 D0 03 BNE $03 [$9C3B] $A09C38 4C F3 9C JMP $9CF3 [$A0:9CF3] $A09C3B 8D 0D 06 STA $060D [$7E:060D] $A09C3E E8 INX $A09C3F E8 INX $A09C40 8E 78 18 STX $1878 [$7E:1878] $A09C43 AE 78 18 LDX $1878 [$7E:1878] $A09C46 AD A6 18 LDA $18A6 [$7E:18A6] $A09C49 0A ASL A $A09C4A A8 TAY $A09C4B BD 00 00 LDA $0000,x[$B2:9D8A] $A09C4E 18 CLC $A09C4F 6D 7A 18 ADC $187A [$7E:187A] $A09C52 8D 70 18 STA $1870 [$7E:1870] $A09C55 B9 64 0B LDA $0B64,y[$7E:0B64] $A09C58 18 CLC $A09C59 79 B4 0B ADC $0BB4,y[$7E:0BB4] $A09C5C CD 70 18 CMP $1870 [$7E:1870] $A09C5F 10 03 BPL $03 [$9C64] $A09C61 4C DF 9C JMP $9CDF [$A0:9CDF] $A09C64 BD 04 00 LDA $0004,x[$B2:9D8E] $A09C67 18 CLC $A09C68 6D 7A 18 ADC $187A [$7E:187A] $A09C6B 8D 74 18 STA $1874 [$7E:1874] $A09C6E B9 64 0B LDA $0B64,y[$7E:0B64] $A09C71 38 SEC $A09C72 F9 B4 0B SBC $0BB4,y[$7E:0BB4] $A09C75 CD 74 18 CMP $1874 [$7E:1874] $A09C78 10 65 BPL $65 [$9CDF] $A09C7A BD 02 00 LDA $0002,x[$B2:97C8] $A09C7D 18 CLC $A09C7E 6D 7C 18 ADC $187C [$7E:187C] $A09C81 8D 72 18 STA $1872 [$7E:1872] $A09C84 B9 78 0B LDA $0B78,y[$7E:0B78] $A09C87 18 CLC $A09C88 79 C8 0B ADC $0BC8,y[$7E:0BC8] $A09C8B CD 72 18 CMP $1872 [$7E:1872] $A09C8E 30 4F BMI $4F [$9CDF] $A09C90 BD 06 00 LDA $0006,x[$B2:97CC] $A09C93 18 CLC $A09C94 6D 7C 18 ADC $187C [$7E:187C] $A09C97 8D 76 18 STA $1876 [$7E:1876] $A09C9A B9 78 0B LDA $0B78,y[$7E:0B78] $A09C9D 38 SEC $A09C9E F9 C8 0B SBC $0BC8,y[$7E:0BC8] $A09CA1 CD 76 18 CMP $1876 [$7E:1876] $A09CA4 10 39 BPL $39 [$9CDF] $A09CA6 B9 18 0C LDA $0C18,y[$7E:0C18] $A09CA9 29 00 0F AND #$0F00 $A09CAC C9 00 02 CMP #$0200 $A09CAF D0 0C BNE $0C [$9CBD] $A09CB1 A9 1E 00 LDA #$001E $A09CB4 8D 40 18 STA $1840 [$7E:1840] $A09CB7 A9 12 00 LDA #$0012 $A09CBA 8D 3E 18 STA $183E [$7E:183E] $A09CBD AE 54 0E LDX $0E54 [$7E:0E54] $A09CC0 BD 86 0F LDA $0F86,x[$7E:0FC6] $A09CC3 89 00 10 BIT #$1000 $A09CC6 D0 08 BNE $08 [$9CD0] $A09CC8 B9 18 0C LDA $0C18,y[$7E:0C18] $A09CCB 29 08 00 AND #$0008 $A09CCE D0 09 BNE $09 [$9CD9] $A09CD0 B9 04 0C LDA $0C04,y[$7E:0C04] $A09CD3 09 10 00 ORA #$0010 $A09CD6 99 04 0C STA $0C04,y[$7E:0C04] $A09CD9 22 17 9D A0 JSL $A09D17[$A0:9D17] $A09CDD 80 36 BRA $36 [$9D15] $A09CDF AD 78 18 LDA $1878 [$7E:1878] $A09CE2 18 CLC $A09CE3 69 0C 00 ADC #$000C $A09CE6 8D 78 18 STA $1878 [$7E:1878] $A09CE9 CE 0D 06 DEC $060D [$7E:060D] $A09CEC F0 05 BEQ $05 [$9CF3] $A09CEE 30 03 BMI $03 [$9CF3] $A09CF0 4C 43 9C JMP $9C43 [$A0:9C43] $A09CF3 AD 6E 18 LDA $186E [$7E:186E] $A09CF6 18 CLC $A09CF7 69 08 00 ADC #$0008 $A09CFA 8D 6E 18 STA $186E [$7E:186E] $A09CFD CE 0B 06 DEC $060B [$7E:060B] $A09D00 F0 05 BEQ $05 [$9D07] $A09D02 30 03 BMI $03 [$9D07] $A09D04 4C 15 9C JMP $9C15 [$A0:9C15] $A09D07 EE A6 18 INC $18A6 [$7E:18A6] $A09D0A AD A6 18 LDA $18A6 [$7E:18A6] $A09D0D C9 05 00 CMP #$0005 $A09D10 10 03 BPL $03 [$9D15] $A09D12 4C D9 9B JMP $9BD9 [$A0:9BD9] $A09D15 AB PLB $A09D16 60 RTS } ;;; JML to code for enemy/projectile detection ;;; { ; Address used is at (($0F8E,X),(8*n1)),(C*n2). n1 = sprite number, n2 = hitbox number $A09D17 AE 78 18 LDX $1878 [$7E:1878] $A09D1A BD 0A 00 LDA $000A,x[$B2:97C2] $A09D1D 8D 84 17 STA $1784 [$7E:1784] $A09D20 DC 84 17 JML [$1784][$B2:8779] } ;;; ;;; { $A09D23 8B PHB $A09D24 AE 54 0E LDX $0E54 [$7E:0E54] $A09D27 BD A6 0F LDA $0FA6,x[$7E:0FA6] $A09D2A 8D 86 17 STA $1786 [$7E:1786] $A09D2D EB XBA $A09D2E 48 PHA $A09D2F AB PLB $A09D30 AB PLB $A09D31 A9 04 00 LDA #$0004 $A09D34 8F 78 F3 7E STA $7EF378[$7E:F378] $A09D38 AC 54 0E LDY $0E54 [$7E:0E54] $A09D3B B9 8E 0F LDA $0F8E,y[$7E:0F8E] $A09D3E F0 24 BEQ $24 [$9D64] $A09D40 AE 54 0E LDX $0E54 [$7E:0E54] $A09D43 BD 86 0F LDA $0F86,x[$7E:0F86] $A09D46 89 00 04 BIT #$0400 $A09D49 D0 19 BNE $19 [$9D64] $A09D4B BD A0 0F LDA $0FA0,x[$7E:0FA0] $A09D4E D0 14 BNE $14 [$9D64] $A09D50 AC 54 0E LDY $0E54 [$7E:0E54] $A09D53 BE 78 0F LDX $0F78,y[$7E:0F78] $A09D56 BF 32 00 A0 LDA $A00032,x[$A0:E171] $A09D5A C9 4C 80 CMP #$804C $A09D5D F0 05 BEQ $05 [$9D64] $A09D5F C9 4B 80 CMP #$804B $A09D62 D0 02 BNE $02 [$9D66] $A09D64 AB PLB $A09D65 60 RTS $A09D66 AD D2 0C LDA $0CD2 [$7E:0CD2] $A09D69 F0 F9 BEQ $F9 [$9D64] $A09D6B A9 05 00 LDA #$0005 $A09D6E 8D A6 18 STA $18A6 [$7E:18A6] $A09D71 AE 54 0E LDX $0E54 [$7E:0E54] $A09D74 AD A6 18 LDA $18A6 [$7E:18A6] $A09D77 0A ASL A $A09D78 A8 TAY $A09D79 B9 64 0B LDA $0B64,y[$7E:0B6E] $A09D7C D0 03 BNE $03 [$9D81] $A09D7E 4C 7E 9E JMP $9E7E [$A0:9E7E] $A09D81 B9 18 0C LDA $0C18,y[$7E:0C22] $A09D84 F0 08 BEQ $08 [$9D8E] $A09D86 29 00 0F AND #$0F00 $A09D89 C9 00 05 CMP #$0500 $A09D8C F0 03 BEQ $03 [$9D91] $A09D8E 4C 7E 9E JMP $9E7E [$A0:9E7E] $A09D91 B9 7C 0C LDA $0C7C,y[$7E:0C86] $A09D94 F0 03 BEQ $03 [$9D99] $A09D96 4C 7E 9E JMP $9E7E [$A0:9E7E] $A09D99 BD 8E 0F LDA $0F8E,x[$7E:114E] $A09D9C C9 00 80 CMP #$8000 $A09D9F 30 FE BMI $FE [$9D9F] $A09DA1 AA TAX $A09DA2 BD 00 00 LDA $0000,x[$B2:88D6] $A09DA5 29 FF 00 AND #$00FF $A09DA8 8D 0B 06 STA $060B [$7E:060B] $A09DAB E8 INX $A09DAC E8 INX $A09DAD 8E 6E 18 STX $186E [$7E:186E] $A09DB0 AE 6E 18 LDX $186E [$7E:186E] $A09DB3 AC 54 0E LDY $0E54 [$7E:0E54] $A09DB6 B9 7A 0F LDA $0F7A,y[$7E:113A] $A09DB9 18 CLC $A09DBA 7D 00 00 ADC $0000,x[$B2:88D8] $A09DBD 8D 7A 18 STA $187A [$7E:187A] $A09DC0 B9 7E 0F LDA $0F7E,y[$7E:113E] $A09DC3 18 CLC $A09DC4 7D 02 00 ADC $0002,x[$B2:88DA] $A09DC7 8D 7C 18 STA $187C [$7E:187C] $A09DCA BD 06 00 LDA $0006,x[$B2:88DE] $A09DCD AA TAX $A09DCE BD 00 00 LDA $0000,x[$B2:96BA] $A09DD1 D0 03 BNE $03 [$9DD6] $A09DD3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A09DD6 8D 0D 06 STA $060D [$7E:060D] $A09DD9 E8 INX $A09DDA E8 INX $A09DDB 8E 78 18 STX $1878 [$7E:1878] $A09DDE AE 78 18 LDX $1878 [$7E:1878] $A09DE1 AD A6 18 LDA $18A6 [$7E:18A6] $A09DE4 0A ASL A $A09DE5 A8 TAY $A09DE6 BD 00 00 LDA $0000,x[$B2:96BC] $A09DE9 18 CLC $A09DEA 6D 7A 18 ADC $187A [$7E:187A] $A09DED 8D 70 18 STA $1870 [$7E:1870] $A09DF0 B9 64 0B LDA $0B64,y[$7E:0B6E] $A09DF3 18 CLC $A09DF4 79 B4 0B ADC $0BB4,y[$7E:0BBE] $A09DF7 CD 70 18 CMP $1870 [$7E:1870] $A09DFA 10 03 BPL $03 [$9DFF] $A09DFC ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A09DFF BD 04 00 LDA $0004,x[$B2:96C0] $A09E02 18 CLC $A09E03 6D 7A 18 ADC $187A [$7E:187A] $A09E06 8D 74 18 STA $1874 [$7E:1874] $A09E09 B9 64 0B LDA $0B64,y[$7E:0B6E] $A09E0C 38 SEC $A09E0D F9 B4 0B SBC $0BB4,y[$7E:0BBE] $A09E10 CD 74 18 CMP $1874 [$7E:1874] $A09E13 10 3B BPL $3B [$9E50] $A09E15 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A09E50 AD 78 18 LDA $1878 [$7E:1878] $A09E53 18 CLC $A09E54 69 0C 00 ADC #$000C $A09E57 8D 78 18 STA $1878 [$7E:1878] $A09E5A CE 0D 06 DEC $060D [$7E:060D] $A09E5D AD 0D 06 LDA $060D [$7E:060D] $A09E60 F0 05 BEQ $05 [$9E67] $A09E62 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A09E67 AD 6E 18 LDA $186E [$7E:186E] $A09E6A 18 CLC $A09E6B 69 08 00 ADC #$0008 $A09E6E 8D 6E 18 STA $186E [$7E:186E] $A09E71 CE 0B 06 DEC $060B [$7E:060B] $A09E74 AD 0B 06 LDA $060B [$7E:060B] $A09E77 F0 05 BEQ $05 [$9E7E] $A09E79 30 03 BMI $03 [$9E7E] $A09E7B 4C B0 9D JMP $9DB0 [$A0:9DB0] $A09E7E EE A6 18 INC $18A6 [$7E:18A6] $A09E81 AD A6 18 LDA $18A6 [$7E:18A6] $A09E84 C9 0A 00 CMP #$000A $A09E87 F0 03 BEQ $03 [$9E8C] $A09E89 4C 71 9D JMP $9D71 [$A0:9D71] $A09E8C AB PLB $A09E8D 60 RTS } ;;; ;;; { $A09E8E AE 78 18 LDX $1878 [$7E:1878] $A09E91 BD 0A 00 LDA $000A,x $A09E94 8D 84 17 STA $1784 [$7E:1784] $A09E97 DC 84 17 JML [$1784] } ;;; ;;; { $A09E9A 8B PHB $A09E9B DA PHX $A09E9C 5A PHY $A09E9D A9 0D 00 LDA #$000D $A09EA0 22 84 F0 90 JSL $90F084[$90:F084] $A09EA4 D0 03 BNE $03 [$9EA9] $A09EA6 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A09EA9 9C A6 18 STZ $18A6 [$7E:18A6] $A09EAC 9C AA 17 STZ $17AA [$7E:17AA] $A09EAF AC AA 17 LDY $17AA [$7E:17AA] $A09EB2 B9 EC 17 LDA $17EC,y[$7E:17EC] $A09EB5 8D 54 0E STA $0E54 [$7E:0E54] $A09EB8 C9 FF FF CMP #$FFFF $A09EBB D0 09 BNE $09 [$9EC6] $A09EBD 64 12 STZ $12 [$7E:0012] $A09EBF A9 00 00 LDA #$0000 $A09EC2 7A PLY $A09EC3 FA PLX $A09EC4 AB PLB $A09EC5 6B RTL $A09EC6 AA TAX $A09EC7 BD A0 0F LDA $0FA0,x[$7E:0FA0] $A09ECA D0 30 BNE $30 [$9EFC] $A09ECC BD 7A 0F LDA $0F7A,x[$7E:0F7A] $A09ECF 38 SEC $A09ED0 ED 08 0D SBC $0D08 [$7E:0D08] $A09ED3 10 04 BPL $04 [$9ED9] $A09ED5 49 FF FF EOR #$FFFF $A09ED8 1A INC A $A09ED9 38 SEC $A09EDA FD 82 0F SBC $0F82,x[$7E:0F82] $A09EDD 90 05 BCC $05 [$9EE4] $A09EDF C9 08 00 CMP #$0008 $A09EE2 B0 18 BCS $18 [$9EFC] $A09EE4 BD 7E 0F LDA $0F7E,x[$7E:0F7E] $A09EE7 38 SEC $A09EE8 ED 0C 0D SBC $0D0C [$7E:0D0C] $A09EEB 10 04 BPL $04 [$9EF1] $A09EED 49 FF FF EOR #$FFFF $A09EF0 1A INC A $A09EF1 38 SEC $A09EF2 FD 84 0F SBC $0F84,x[$7E:0F84] $A09EF5 90 0E BCC $0E [$9F05] $A09EF7 C9 08 00 CMP #$0008 $A09EFA 90 09 BCC $09 [$9F05] $A09EFC EE AA 17 INC $17AA [$7E:17AA] $A09EFF EE AA 17 INC $17AA [$7E:17AA] $A09F02 4C AF 9E JMP $9EAF [$A0:9EAF] $A09F05 A9 01 00 LDA #$0001 $A09F08 9D 8A 0F STA $0F8A,x[$7E:10CA] $A09F0B A0 00 00 LDY #$0000 $A09F0E BD 78 0F LDA $0F78,x[$7E:10B8] $A09F11 AA TAX $A09F12 BF 1A 00 A0 LDA $A0001A,x[$A0:D659] $A09F16 C9 00 80 CMP #$8000 $A09F19 F0 29 BEQ $29 [$9F44] $A09F1B A0 01 00 LDY #$0001 $A09F1E C9 05 80 CMP #$8005 $A09F21 F0 21 BEQ $21 [$9F44] $A09F23 C8 INY $A09F24 C9 0A 80 CMP #$800A $A09F27 F0 1B BEQ $1B [$9F44] $A09F29 C8 INY $A09F2A C9 0F 80 CMP #$800F $A09F2D F0 15 BEQ $15 [$9F44] $A09F2F C8 INY $A09F30 C9 14 80 CMP #$8014 $A09F33 F0 0F BEQ $0F [$9F44] $A09F44 86 12 STX $12 [$7E:0012] $A09F46 98 TYA $A09F47 C9 01 00 CMP #$0001 $A09F4A F0 0E BEQ $0E [$9F5A] $A09F4C C9 04 00 CMP #$0004 $A09F4F F0 09 BEQ $09 [$9F5A] $A09F51 C9 05 00 CMP #$0005 $A09F54 F0 04 BEQ $04 [$9F5A] $A09F56 7A PLY $A09F57 FA PLX $A09F58 AB PLB $A09F59 6B RTL $A09F5A 48 PHA $A09F5B AE 54 0E LDX $0E54 [$7E:0E54] $A09F5E BD 7A 0F LDA $0F7A,x[$7E:103A] $A09F61 8D 08 0D STA $0D08 [$7E:0D08] $A09F64 BD 7E 0F LDA $0F7E,x[$7E:103E] $A09F67 8D 0C 0D STA $0D0C [$7E:0D0C] $A09F6A 68 PLA $A09F6B 80 E9 BRA $E9 [$9F56] } ;;; Clears some enemy RAM ;;; { $A09F6D AE 54 0E LDX $0E54 [$7E:0E54] $A09F70 9E 8A 0F STZ $0F8A,x[$7E:0F8A] $A09F73 9E A0 0F STZ $0FA0,x[$7E:0FA0] $A09F76 9E 9E 0F STZ $0F9E,x[$7E:0F9E] $A09F79 9E A2 0F STZ $0FA2,x[$7E:0FA2] $A09F7C 6B RTL } ;;; ;;; { ; Grapple reaction (enemy freeze) $A09F7D AE 54 0E LDX $0E54 [$7E:0E54] $A09F80 AE 54 0E LDX $0E54 [$7E:0E54] $A09F83 BD 7A 0F LDA $0F7A,x $A09F86 8D 08 0D STA $0D08 [$7E:0D08] $A09F89 BD 7E 0F LDA $0F7E,x $A09F8C 8D 0C 0D STA $0D0C [$7E:0D0C] $A09F8F AE 54 0E LDX $0E54 [$7E:0E54] $A09F92 BD 9E 0F LDA $0F9E,x $A09F95 D0 23 BNE $23 [$9FBA] $A09F97 AE 54 0E LDX $0E54 [$7E:0E54] $A09F9A BD 78 0F LDA $0F78,x $A09F9D AA TAX $A09F9E BF 0D 00 A0 LDA $A0000D,x $A09FA2 29 FF 00 AND #$00FF $A09FA5 D0 03 BNE $03 [$9FAA] $A09FA7 A9 04 00 LDA #$0004 $A09FAA AE 54 0E LDX $0E54 [$7E:0E54] $A09FAD 9D 9C 0F STA $0F9C,x $A09FB0 AE 54 0E LDX $0E54 [$7E:0E54] $A09FB3 AE 54 0E LDX $0E54 [$7E:0E54] $A09FB6 9E 8A 0F STZ $0F8A,x $A09FB9 6B RTL $A09FBA AE 54 0E LDX $0E54 [$7E:0E54] $A09FBD A9 04 00 LDA #$0004 $A09FC0 9D 8A 0F STA $0F8A,x $A09FC3 6B RTL } ;;; ;;; { ; Grapple reaction (enemy die) $A09FC4 AE 54 0E LDX $0E54 [$7E:0E54] $A09FC7 AE 54 0E LDX $0E54 [$7E:0E54] $A09FCA A9 04 00 LDA #$0004 $A09FCD 9F 02 70 7E STA $7E7002,x[$7E:7142] $A09FD1 A9 00 00 LDA #$0000 $A09FD4 22 AF A3 A0 JSL $A0A3AF[$A0:A3AF] $A09FD8 AE 54 0E LDX $0E54 [$7E:0E54] $A09FDB 9E 8A 0F STZ $0F8A,x[$7E:10CA] $A09FDE 6B RTL } ;;; Switch enemy AI to frozen AI ;;; { $A09FDF AE 54 0E LDX $0E54 [$7E:0E54] $A09FE2 A9 04 00 LDA #$0004 $A09FE5 9D 8A 0F STA $0F8A,x[$7E:0F8A] $A09FE8 6B RTL } ;;; ;;; { ; Grapple reaction (enemy freeze + other stuffs) $A09FE9 AE 54 0E LDX $0E54 [$7E:0E54] $A09FEC BD 9E 0F LDA $0F9E,x[$7E:105E] ;\ $A09FEF D0 37 BNE $37 [$A028] ;} If enemy frozen: branch to $A028 $A09FF1 AE 54 0E LDX $0E54 [$7E:0E54] $A09FF4 BD 78 0F LDA $0F78,x[$7E:1038] ;\ $A09FF7 AA TAX ;| $A09FF8 BF 18 00 A0 LDA $A00018,x[$A0:E8D7] ;| $A09FFC 8D 84 17 STA $1784 [$7E:1784] ;} Set and execute graph AI $A09FFF 8B PHB ;| $A0A000 22 18 A0 A0 JSL $A0A018[$A0:A018] ;| $A0A004 AB PLB ;/ $A0A005 AE 54 0E LDX $0E54 [$7E:0E54] $A0A008 BD 7A 0F LDA $0F7A,x[$7E:103A] ;\ $A0A00B 8D 08 0D STA $0D08 [$7E:0D08] ;} Grapple point X = enemy X $A0A00E BD 7E 0F LDA $0F7E,x[$7E:103E] ;\ $A0A011 8D 0C 0D STA $0D0C [$7E:0D0C] ;} Grapple point Y = enemy Y $A0A014 9E 8A 0F STZ $0F8A,x[$7E:104A] ; Enemy AI handler = graph AI $A0A017 6B RTL } ;;; Set enemy AI bank and execute enemy AI ;;; { $A0A018 AE 54 0E LDX $0E54 [$7E:0E54] $A0A01B BD A6 0F LDA $0FA6,x[$7E:1066] $A0A01E 8D 86 17 STA $1786 [$7E:1786] $A0A021 EB XBA $A0A022 48 PHA $A0A023 AB PLB $A0A024 AB PLB $A0A025 DC 84 17 JML [$1784][$A8:C21C] } ;;; Frozen branch of $9FE9 ;;; { $A0A028 AE 54 0E LDX $0E54 [$7E:0E54] $A0A02B BD 7A 0F LDA $0F7A,x ;\ $A0A02E 8D 08 0D STA $0D08 [$7E:0D08] ;} Grapple point X = enemy X $A0A031 BD 7E 0F LDA $0F7E,x ;\ $A0A034 8D 0C 0D STA $0D0C [$7E:0D0C] ;} Grapple point Y = enemy Y $A0A037 A9 04 00 LDA #$0004 ;\ $A0A03A 9D 8A 0F STA $0F8A,x ;} Enemy AI handler = frozen AI $A0A03D 6B RTL } ;;; ;;; { ; Grapple reaction (enemy unresponsive?) $A0A03E AE 54 0E LDX $0E54 [$7E:0E54] $A0A041 AE 54 0E LDX $0E54 [$7E:0E54] $A0A044 BD 78 0F LDA $0F78,x $A0A047 AA TAX $A0A048 BF 0D 00 A0 LDA $A0000D,x $A0A04C 29 FF 00 AND #$00FF $A0A04F D0 03 BNE $03 [$A054] $A0A051 A9 04 00 LDA #$0004 $A0A054 AE 54 0E LDX $0E54 [$7E:0E54] $A0A057 9D 9C 0F STA $0F9C,x $A0A05A AE 54 0E LDX $0E54 [$7E:0E54] $A0A05D AE 54 0E LDX $0E54 [$7E:0E54] $A0A060 9E 8A 0F STZ $0F8A,x $A0A063 AE 54 0E LDX $0E54 [$7E:0E54] $A0A066 BD 88 0F LDA $0F88,x $A0A069 09 01 00 ORA #$0001 $A0A06C 9D 88 0F STA $0F88,x $A0A06F 6B RTL } ;;; Switch enemy AI to frozen AI ;;; { ; Exact clone of $9FDF $A0A070 AE 54 0E LDX $0E54 [$7E:0E54] $A0A073 A9 04 00 LDA #$0004 $A0A076 9D 8A 0F STA $0F8A,x $A0A079 6B RTL } ;;; ;;; { $A0A07A 8B PHB $A0A07B C2 30 REP #$30 $A0A07D F4 00 A0 PEA $A000 $A0A080 AB PLB $A0A081 AB PLB $A0A082 A9 09 00 LDA #$0009 $A0A085 8F 78 F3 7E STA $7EF378[$7E:F378] $A0A089 AC 54 0E LDY $0E54 [$7E:0E54] $A0A08C B9 8E 0F LDA $0F8E,y[$7E:0F8E] $A0A08F F0 25 BEQ $25 [$A0B6] $A0A091 AD 6E 0A LDA $0A6E [$7E:0A6E] ;\ $A0A094 F0 05 BEQ $05 [$A09B] ;} The cause of screw attack cancelling invincibility $A0A096 9C A8 18 STZ $18A8 [$7E:18A8] ;} Not the cause of crystal flash insta-death $A0A099 80 1D BRA $1D [$A0B8] $A0A09B AD A8 18 LDA $18A8 [$7E:18A8] $A0A09E F0 18 BEQ $18 [$A0B8] $A0A0A0 AE 54 0E LDX $0E54 [$7E:0E54] $A0A0A3 BD 78 0F LDA $0F78,x[$7E:0FB8] $A0A0A6 C9 FF DA CMP #$DAFF $A0A0A9 D0 0B BNE $0B [$A0B6] $A0A0AB ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A0A0B6 AB PLB $A0A0B7 60 RTS $A0A0B8 AE 54 0E LDX $0E54 [$7E:0E54] $A0A0BB BC 78 0F LDY $0F78,x[$7E:0F78] $A0A0BE B9 30 00 LDA $0030,y[$A0:E26F] $A0A0C1 C9 4C 80 CMP #$804C $A0A0C4 F0 05 BEQ $05 [$A0CB] $A0A0C6 C9 4B 80 CMP #$804B $A0A0C9 D0 02 BNE $02 [$A0CD] $A0A0CB AB PLB $A0A0CC 60 RTS $A0A0CD AE 54 0E LDX $0E54 [$7E:0E54] $A0A0D0 AD F6 0A LDA $0AF6 [$7E:0AF6] $A0A0D3 38 SEC $A0A0D4 FD 7A 0F SBC $0F7A,x[$7E:0F7A] $A0A0D7 10 04 BPL $04 [$A0DD] $A0A0D9 49 FF FF EOR #$FFFF $A0A0DC 1A INC A $A0A0DD 38 SEC $A0A0DE ED FE 0A SBC $0AFE [$7E:0AFE] $A0A0E1 90 05 BCC $05 [$A0E8] $A0A0E3 DD 82 0F CMP $0F82,x[$7E:0F82] $A0A0E6 B0 18 BCS $18 [$A100] $A0A0E8 AD FA 0A LDA $0AFA [$7E:0AFA] $A0A0EB 38 SEC $A0A0EC FD 7E 0F SBC $0F7E,x[$7E:0F7E] $A0A0EF 10 04 BPL $04 [$A0F5] $A0A0F1 49 FF FF EOR #$FFFF $A0A0F4 1A INC A $A0A0F5 38 SEC $A0A0F6 ED 00 0B SBC $0B00 [$7E:0B00] $A0A0F9 90 07 BCC $07 [$A102] $A0A0FB DD 84 0F CMP $0F84,x[$7E:0FC4] $A0A0FE 90 02 BCC $02 [$A102] $A0A100 AB PLB $A0A101 60 RTS $A0A102 AE 54 0E LDX $0E54 [$7E:0E54] $A0A105 BD 8E 0F LDA $0F8E,x[$7E:0F8E] $A0A108 0A ASL A $A0A109 85 14 STA $14 [$7E:0014] $A0A10B AE 54 0E LDX $0E54 [$7E:0E54] $A0A10E BD 78 0F LDA $0F78,x[$7E:0F78] $A0A111 C9 FF DA CMP #$DAFF $A0A114 F0 0A BEQ $0A [$A120] $A0A116 AC 54 0E LDY $0E54 [$7E:0E54] $A0A119 B9 9E 0F LDA $0F9E,y[$7E:0F9E] $A0A11C F0 02 BEQ $02 [$A120] $A0A11E AB PLB $A0A11F 60 RTS $A0A120 22 26 A1 A0 JSL $A0A126[$A0:A126] $A0A124 AB PLB $A0A125 60 RTS } ;;; ;;; { $A0A126 AC 54 0E LDY $0E54 [$7E:0E54] $A0A129 B9 A6 0F LDA $0FA6,y[$7E:0FA6] $A0A12C EB XBA $A0A12D 48 PHA $A0A12E AB PLB $A0A12F AB PLB $A0A130 BE 78 0F LDX $0F78,y[$7E:0F78] $A0A133 BF 30 00 A0 LDA $A00030,x[$A0:E26F] $A0A137 8D 84 17 STA $1784 [$7E:1784] $A0A13A B9 A6 0F LDA $0FA6,y[$7E:0FA6] $A0A13D 8D 86 17 STA $1786 [$7E:1786] $A0A140 DC 84 17 JML [$1784][$A6:F920] } ;;; ;;; { ; Check for collisions of main hitbox with all projectiles. If there's a collision, JSL $A0A226 then RTS $A0A143 8B PHB $A0A144 AE 54 0E LDX $0E54 [$7E:0E54] $A0A147 BD A6 0F LDA $0FA6,x[$7E:0FA6] $A0A14A 8D 86 17 STA $1786 [$7E:1786] $A0A14D EB XBA $A0A14E 48 PHA $A0A14F AB PLB $A0A150 AB PLB $A0A151 A9 07 00 LDA #$0007 $A0A154 8F 78 F3 7E STA $7EF378[$7E:F378] $A0A158 AD CE 0C LDA $0CCE [$7E:0CCE] $A0A15B D0 02 BNE $02 [$A15F] $A0A15D AB PLB $A0A15E 60 RTS $A0A15F AC 54 0E LDY $0E54 [$7E:0E54] $A0A162 B9 8E 0F LDA $0F8E,y[$7E:10CE] $A0A165 F0 F6 BEQ $F6 [$A15D] $A0A167 C9 4D 80 CMP #$804D $A0A16A F0 F1 BEQ $F1 [$A15D] $A0A16C B9 86 0F LDA $0F86,y[$7E:10C6] $A0A16F 89 00 04 BIT #$0400 $A0A172 D0 E9 BNE $E9 [$A15D] $A0A174 B9 78 0F LDA $0F78,y[$7E:10B8] $A0A177 C9 FF DA CMP #$DAFF $A0A17A F0 E1 BEQ $E1 [$A15D] $A0A17C B9 A0 0F LDA $0FA0,y[$7E:10E0] $A0A17F D0 DC BNE $DC [$A15D] $A0A181 9C A6 18 STZ $18A6 [$7E:18A6] $A0A184 AE 54 0E LDX $0E54 [$7E:0E54] $A0A187 AD A6 18 LDA $18A6 [$7E:18A6] $A0A18A 0A ASL A $A0A18B A8 TAY $A0A18C B9 18 0C LDA $0C18,y[$7E:0C18] $A0A18F F0 12 BEQ $12 [$A1A3] $A0A191 29 00 0F AND #$0F00 $A0A194 C9 00 03 CMP #$0300 $A0A197 F0 0A BEQ $0A [$A1A3] $A0A199 C9 00 05 CMP #$0500 $A0A19C F0 05 BEQ $05 [$A1A3] $A0A19E C9 00 07 CMP #$0700 $A0A1A1 30 03 BMI $03 [$A1A6] $A0A1A3 4C 16 A2 JMP $A216 [$A0:A216] $A0A1A6 B9 64 0B LDA $0B64,y[$7E:0B64] $A0A1A9 38 SEC $A0A1AA FD 7A 0F SBC $0F7A,x[$7E:11FA] $A0A1AD 10 04 BPL $04 [$A1B3] $A0A1AF 49 FF FF EOR #$FFFF $A0A1B2 1A INC A $A0A1B3 38 SEC $A0A1B4 F9 B4 0B SBC $0BB4,y[$7E:0BB4] $A0A1B7 90 05 BCC $05 [$A1BE] $A0A1B9 DD 82 0F CMP $0F82,x[$7E:1202] $A0A1BC B0 58 BCS $58 [$A216] $A0A1BE B9 78 0B LDA $0B78,y[$7E:0B78] $A0A1C1 38 SEC $A0A1C2 FD 7E 0F SBC $0F7E,x[$7E:11FE] $A0A1C5 10 04 BPL $04 [$A1CB] $A0A1C7 49 FF FF EOR #$FFFF $A0A1CA 1A INC A $A0A1CB 38 SEC $A0A1CC F9 C8 0B SBC $0BC8,y[$7E:0BC8] $A0A1CF 90 07 BCC $07 [$A1D8] $A0A1D1 DD 84 0F CMP $0F84,x[$7E:1204] $A0A1D4 90 02 BCC $02 [$A1D8] $A0A1D6 80 3E BRA $3E [$A216] $A0A1D8 B9 18 0C LDA $0C18,y[$7E:0C18] $A0A1DB 29 00 0F AND #$0F00 $A0A1DE C9 00 02 CMP #$0200 $A0A1E1 D0 0C BNE $0C [$A1EF] $A0A1E3 A9 1E 00 LDA #$001E $A0A1E6 8D 40 18 STA $1840 [$7E:1840] $A0A1E9 A9 12 00 LDA #$0012 $A0A1EC 8D 3E 18 STA $183E [$7E:183E] $A0A1EF AD A6 18 LDA $18A6 [$7E:18A6] $A0A1F2 0A ASL A $A0A1F3 A8 TAY $A0A1F4 AE 54 0E LDX $0E54 [$7E:0E54] $A0A1F7 BD 86 0F LDA $0F86,x[$7E:1246] $A0A1FA 89 00 10 BIT #$1000 $A0A1FD D0 08 BNE $08 [$A207] $A0A1FF B9 18 0C LDA $0C18,y[$7E:0C18] $A0A202 89 08 00 BIT #$0008 $A0A205 D0 09 BNE $09 [$A210] $A0A207 B9 04 0C LDA $0C04,y[$7E:0C04] $A0A20A 09 10 00 ORA #$0010 $A0A20D 99 04 0C STA $0C04,y[$7E:0C04] $A0A210 22 26 A2 A0 JSL $A0A226[$A0:A226] $A0A214 80 0E BRA $0E [$A224] $A0A216 EE A6 18 INC $18A6 [$7E:18A6] $A0A219 AD A6 18 LDA $18A6 [$7E:18A6] $A0A21C C9 05 00 CMP #$0005 $A0A21F F0 03 BEQ $03 [$A224] $A0A221 4C 84 A1 JMP $A184 [$A0:A184] $A0A224 AB PLB $A0A225 60 RTS } ;;; JML to code for enemy/projectile detection ;;; { $A0A226 AC 54 0E LDY $0E54 [$7E:0E54] $A0A229 BE 78 0F LDX $0F78,y[$7E:1238] $A0A22C BF 32 00 A0 LDA $A00032,x[$A0:EAB1] $A0A230 8D 84 17 STA $1784 [$7E:1784] $A0A233 DC 84 17 JML [$1784][$A8:E91D] } ;;; ;;; { $A0A236 8B PHB $A0A237 AE 54 0E LDX $0E54 [$7E:0E54] $A0A23A BD A6 0F LDA $0FA6,x[$7E:0FA6] $A0A23D 8D 86 17 STA $1786 [$7E:1786] $A0A240 EB XBA $A0A241 48 PHA $A0A242 AB PLB $A0A243 AB PLB $A0A244 A9 08 00 LDA #$0008 $A0A247 8F 78 F3 7E STA $7EF378[$7E:F378] $A0A24B AD D2 0C LDA $0CD2 [$7E:0CD2] $A0A24E D0 02 BNE $02 [$A252] $A0A250 AB PLB $A0A251 60 RTS $A0A252 AC 54 0E LDY $0E54 [$7E:0E54] $A0A255 B9 8E 0F LDA $0F8E,y[$7E:0F8E] $A0A258 F0 F6 BEQ $F6 [$A250] $A0A25A AC 54 0E LDY $0E54 [$7E:0E54] $A0A25D B9 A0 0F LDA $0FA0,y[$7E:0FA0] $A0A260 D0 EE BNE $EE [$A250] $A0A262 B9 78 0F LDA $0F78,y[$7E:0F78] $A0A265 C9 FF DA CMP #$DAFF $A0A268 F0 E6 BEQ $E6 [$A250] $A0A26A A9 05 00 LDA #$0005 $A0A26D 8D A6 18 STA $18A6 [$7E:18A6] $A0A270 AE 54 0E LDX $0E54 [$7E:0E54] $A0A273 AD A6 18 LDA $18A6 [$7E:18A6] $A0A276 0A ASL A $A0A277 A8 TAY $A0A278 B9 18 0C LDA $0C18,y[$7E:0C22] $A0A27B D0 03 BNE $03 [$A280] $A0A27D 4C E6 A2 JMP $A2E6 [$A0:A2E6] $A0A280 B9 7C 0C LDA $0C7C,y[$7E:0C86] $A0A283 D0 61 BNE $61 [$A2E6] $A0A285 B9 18 0C LDA $0C18,y[$7E:0C22] $A0A288 29 00 0F AND #$0F00 $A0A28B C9 00 05 CMP #$0500 $A0A28E F0 0B BEQ $0B [$A29B] $A0A290 B9 18 0C LDA $0C18,y[$7E:0C22] $A0A293 89 00 80 BIT #$8000 $A0A296 D0 03 BNE $03 [$A29B] $A0A298 4C E6 A2 JMP $A2E6 [$A0:A2E6] $A0A29B B9 64 0B LDA $0B64,y[$7E:0B6E] $A0A29E 38 SEC $A0A29F FD 7A 0F SBC $0F7A,x[$7E:0F7A] $A0A2A2 10 04 BPL $04 [$A2A8] $A0A2A4 49 FF FF EOR #$FFFF $A0A2A7 1A INC A $A0A2A8 38 SEC $A0A2A9 F9 B4 0B SBC $0BB4,y[$7E:0BBE] $A0A2AC 90 05 BCC $05 [$A2B3] $A0A2AE DD 82 0F CMP $0F82,x[$7E:0F82] $A0A2B1 B0 33 BCS $33 [$A2E6] $A0A2B3 B9 78 0B LDA $0B78,y[$7E:0B82] $A0A2B6 38 SEC $A0A2B7 FD 7E 0F SBC $0F7E,x[$7E:0F7E] $A0A2BA 10 04 BPL $04 [$A2C0] $A0A2BC 49 FF FF EOR #$FFFF $A0A2BF 1A INC A $A0A2C0 38 SEC $A0A2C1 F9 C8 0B SBC $0BC8,y[$7E:0BD2] $A0A2C4 90 07 BCC $07 [$A2CD] $A0A2C6 DD 84 0F CMP $0F84,x[$7E:0F84] $A0A2C9 90 02 BCC $02 [$A2CD] $A0A2CB 80 19 BRA $19 [$A2E6] $A0A2CD AD A6 18 LDA $18A6 [$7E:18A6] $A0A2D0 0A ASL A $A0A2D1 A8 TAY $A0A2D2 B9 7C 0C LDA $0C7C,y[$7E:0C86] $A0A2D5 D0 0F BNE $0F [$A2E6] $A0A2D7 B9 04 0C LDA $0C04,y[$7E:0C0E] $A0A2DA 09 10 00 ORA #$0010 $A0A2DD 99 04 0C STA $0C04,y[$7E:0C0E] $A0A2E0 22 F6 A2 A0 JSL $A0A2F6[$A0:A2F6] $A0A2E4 80 0E BRA $0E [$A2F4] $A0A2E6 EE A6 18 INC $18A6 [$7E:18A6] $A0A2E9 AD A6 18 LDA $18A6 [$7E:18A6] $A0A2EC C9 0A 00 CMP #$000A $A0A2EF F0 03 BEQ $03 [$A2F4] $A0A2F1 4C 70 A2 JMP $A270 [$A0:A270] $A0A2F4 AB PLB $A0A2F5 60 RTS } ;;; ;;; { $A0A2F6 AC 54 0E LDY $0E54 [$7E:0E54] $A0A2F9 BE 78 0F LDX $0F78,y[$7E:0F78] $A0A2FC BF 32 00 A0 LDA $A00032,x[$A0:D571] $A0A300 8D 84 17 STA $1784 [$7E:1784] $A0A303 DC 84 17 JML [$1784][$A2:F0A2] } ;;; Process enemy power bomb interaction ;;; { $A0A306 8B PHB $A0A307 A9 05 00 LDA #$0005 ;\ $A0A30A 8F 78 F3 7E STA $7EF378[$7E:F378] ;} Stage of enemy processing = 5 $A0A30E AD EB 0C LDA $0CEB [$7E:0CEB] ;\ $A0A311 29 FF 00 AND #$00FF ;} $12 = Power bomb radius / 100h $A0A314 85 12 STA $12 [$7E:0012] ;/ $A0A316 D0 02 BNE $02 [$A31A] ;\ $A0A318 AB PLB ;} If Power bomb radius < 100h: Return $A0A319 6B RTL ;/ $A0A31A 4A LSR A ;\ $A0A31B 65 12 ADC $12 [$7E:0012] ;| $A0A31D 4A LSR A ;} $14 = [$12] * 3/4 $A0A31E 85 14 STA $14 [$7E:0014] ;/ $A0A320 A9 C0 07 LDA #$07C0 ;\ $A0A323 8D 54 0E STA $0E54 [$7E:0E54] ;} Enemy index = slot 1Fh $A0A326 AE 54 0E LDX $0E54 [$7E:0E54] ; X = Enemy index $A0A329 BD A0 0F LDA $0FA0,x[$7E:1760] ;\ $A0A32C D0 63 BNE $63 [$A391] ;} If [$0FA0,X] != 0: next! $A0A32E BD 78 0F LDA $0F78,x[$7E:1738] ;\ $A0A331 F0 5E BEQ $5E [$A391] ;} If enemy pointer == 0: next! $A0A333 C9 FF DA CMP #$DAFF ;\ $A0A336 F0 59 BEQ $59 [$A391] ;} If enemy pointer == $DAFF: next! (Metroid shell?) $A0A338 AA TAX ;\ $A0A339 BF 3C 00 A0 LDA $A0003C,x[$A0:CEFB] ;| $A0A33D D0 03 BNE $03 [$A342] ;| $A0A33F A9 1C EC LDA #$EC1C ;| ;} If not vulnerable to power bombs: next! $A0A342 AA TAX ;| $A0A343 BF 0F 00 B4 LDA $B4000F,x[$B4:EDB7] ;| $A0A347 29 7F 00 AND #$007F ;| $A0A34A F0 45 BEQ $45 [$A391] ;/ $A0A34C AE 54 0E LDX $0E54 [$7E:0E54] $A0A34F AD E2 0C LDA $0CE2 [$7E:0CE2] ;\ $A0A352 38 SEC ;| $A0A353 FD 7A 0F SBC $0F7A,x[$7E:103A] ;| $A0A356 10 04 BPL $04 [$A35C] ;| $A0A358 49 FF FF EOR #$FFFF ;} If |power bomb X - enemy X| >= [$12]: next! $A0A35B 1A INC A ;| ;| $A0A35C C5 12 CMP $12 [$7E:0012] ;| $A0A35E B0 31 BCS $31 [$A391] ;/ $A0A360 AD E4 0C LDA $0CE4 [$7E:0CE4] ;\ $A0A363 38 SEC ;| $A0A364 FD 7E 0F SBC $0F7E,x[$7E:0FFE] ;| $A0A367 10 04 BPL $04 [$A36D] ;| $A0A369 49 FF FF EOR #$FFFF ;} If |power bomb Y - enemy Y| >= [$14]: next! $A0A36C 1A INC A ;| ;| $A0A36D C5 14 CMP $14 [$7E:0014] ;| $A0A36F B0 20 BCS $20 [$A391] ;/ $A0A371 BD 78 0F LDA $0F78,x[$7E:0FF8] ;\ $A0A374 AA TAX ;} A = enemy power bomb reaction $A0A375 BF 28 00 A0 LDA $A00028,x[$A0:CEE7] ;/ $A0A379 D0 03 BNE $03 [$A37E] ;\ $A0A37B A9 37 80 LDA #$8037 ;} If A == 0: A = $8037 $A0A37E 8D 84 17 STA $1784 [$7E:1784] ; Enemy AI = A $A0A381 22 9F A3 A0 JSL $A0A39F[$A0:A39F] ; Set enemy AI bank and execute enemy AI $A0A385 AE 54 0E LDX $0E54 [$7E:0E54] $A0A388 BD 86 0F LDA $0F86,x[$7E:1006] ;\ $A0A38B 09 00 08 ORA #$0800 ;} Set enemy to process whilst offscreen $A0A38E 9D 86 0F STA $0F86,x[$7E:1006] ;/ $A0A391 AD 54 0E LDA $0E54 [$7E:0E54] ;\ $A0A394 38 SEC ;| $A0A395 E9 40 00 SBC #$0040 ;} Enemy index -= 1 slot $A0A398 8D 54 0E STA $0E54 [$7E:0E54] ;/ $A0A39B 10 89 BPL $89 [$A326] ; Repeat until enemy index < 0 $A0A39D AB PLB $A0A39E 6B RTL } ;;; Set enemy AI bank and execute enemy AI ;;; { $A0A39F AE 54 0E LDX $0E54 [$7E:0E54] $A0A3A2 BD A6 0F LDA $0FA6,x[$7E:1026] $A0A3A5 8D 86 17 STA $1786 [$7E:1786] $A0A3A8 EB XBA $A0A3A9 48 PHA $A0A3AA AB PLB $A0A3AB AB PLB $A0A3AC DC 84 17 JML [$1784][$A2:8037] } ;;; Death animation ;;; { $A0A3AF 08 PHP $A0A3B0 8B PHB $A0A3B1 F4 00 A0 PEA $A000 $A0A3B4 AB PLB $A0A3B5 AB PLB $A0A3B6 C2 30 REP #$30 $A0A3B8 48 PHA $A0A3B9 BD 8A 0F LDA $0F8A,x[$7E:02DD] $A0A3BC C9 01 00 CMP #$0001 $A0A3BF D0 06 BNE $06 [$A3C7] $A0A3C1 A9 C5 C8 LDA #$C8C5 $A0A3C4 8D 32 0D STA $0D32 [$7E:0D32] $A0A3C7 68 PLA $A0A3C8 C9 05 00 CMP #$0005 $A0A3CB 30 03 BMI $03 [$A3D0] $A0A3CD A9 00 00 LDA #$0000 $A0A3D0 8D 20 0E STA $0E20 [$7E:0E20] $A0A3D3 AE 54 0E LDX $0E54 [$7E:0E54] $A0A3D6 A0 45 F3 LDY #$F345 $A0A3D9 AD 20 0E LDA $0E20 [$7E:0E20] $A0A3DC 22 27 80 86 JSL $868027[$86:8027] $A0A3E0 BD 86 0F LDA $0F86,x[$7E:0FC6] $A0A3E3 29 00 40 AND #$4000 $A0A3E6 85 12 STA $12 [$7E:0012] $A0A3E8 A0 3E 00 LDY #$003E $A0A3EB AE 54 0E LDX $0E54 [$7E:0E54] $A0A3EE 9E 78 0F STZ $0F78,x[$7E:0FB8] $A0A3F1 E8 INX $A0A3F2 E8 INX $A0A3F3 88 DEY $A0A3F4 88 DEY $A0A3F5 10 F7 BPL $F7 [$A3EE] $A0A3F7 A5 12 LDA $12 [$7E:0012] $A0A3F9 F0 0F BEQ $0F [$A40A] $A0A3FB AE 54 0E LDX $0E54 [$7E:0E54] $A0A3FE A9 FF DA LDA #$DAFF $A0A401 9D 78 0F STA $0F78,x[$7E:11B8] $A0A404 A9 A3 00 LDA #$00A3 $A0A407 9D A6 0F STA $0FA6,x[$7E:11E6] $A0A40A EE 50 0E INC $0E50 [$7E:0E50] $A0A40D AB PLB $A0A40E 28 PLP $A0A40F 6B RTL } ;;; ;;; { $A0A410 08 PHP $A0A411 8B PHB $A0A412 F4 00 A0 PEA $A000 $A0A415 AB PLB $A0A416 AB PLB $A0A417 C2 30 REP #$30 $A0A419 C9 03 00 CMP #$0003 $A0A41C 30 03 BMI $03 [$A421] $A0A41E ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A0A421 8D 20 0E STA $0E20 [$7E:0E20] $A0A424 AE 54 0E LDX $0E54 [$7E:0E54] $A0A427 A0 45 F3 LDY #$F345 $A0A42A AD 20 0E LDA $0E20 [$7E:0E20] $A0A42D 22 27 80 86 JSL $868027[$86:8027] $A0A431 BD 86 0F LDA $0F86,x[$7E:10C6] $A0A434 29 00 40 AND #$4000 $A0A437 85 12 STA $12 [$7E:0012] $A0A439 A0 3E 00 LDY #$003E $A0A43C AE 54 0E LDX $0E54 [$7E:0E54] $A0A43F 9E 78 0F STZ $0F78,x[$7E:10B8] $A0A442 E8 INX $A0A443 E8 INX $A0A444 88 DEY $A0A445 88 DEY $A0A446 10 F7 BPL $F7 [$A43F] $A0A448 A5 12 LDA $12 [$7E:0012] $A0A44A F0 0F BEQ $0F [$A45B] $A0A44C AE 54 0E LDX $0E54 [$7E:0E54] $A0A44F A9 FF DA LDA #$DAFF $A0A452 9D 78 0F STA $0F78,x[$7E:10B8] $A0A455 A9 A3 00 LDA #$00A3 $A0A458 9D A6 0F STA $0FA6,x[$7E:10E6] $A0A45B AB PLB $A0A45C 28 PLP $A0A45D 6B RTL } ;;; Suit damage division ;;; { ; Divide damage (A) by 4 for Gravity, or 2 for Varia. Nothing if neither suit. ; Result in A and $12 $A0A45E 85 12 STA $12 [$7E:0012] $A0A460 AD A2 09 LDA $09A2 [$7E:09A2] $A0A463 89 20 00 BIT #$0020 $A0A466 D0 08 BNE $08 [$A470] $A0A468 4A LSR A $A0A469 90 02 BCC $02 [$A46D] $A0A46B 46 12 LSR $12 [$7E:0012] $A0A46D A5 12 LDA $12 [$7E:0012] $A0A46F 6B RTL $A0A470 46 12 LSR $12 [$7E:0012] $A0A472 46 12 LSR $12 [$7E:0012] $A0A474 A5 12 LDA $12 [$7E:0012] $A0A476 6B RTL } ;;; Normal enemy touch AI ;;; { $A0A477 AE 54 0E LDX $0E54 [$7E:0E54] $A0A47A 20 A1 A4 JSR $A4A1 [$A0:A4A1] $A0A47D AE 54 0E LDX $0E54 [$7E:0E54] $A0A480 BD 8C 0F LDA $0F8C,x[$7E:108C] $A0A483 D0 0E BNE $0E [$A493] $A0A485 A9 06 00 LDA #$0006 $A0A488 9F 02 70 7E STA $7E7002,x[$7E:7142] $A0A48C A9 01 00 LDA #$0001 $A0A48F 22 AF A3 A0 JSL $A0A3AF[$A0:A3AF] $A0A493 AE 54 0E LDX $0E54 [$7E:0E54] $A0A496 6B RTL } ;;; Normal touch AI, but skips death animation ;;; { $A0A497 AE 54 0E LDX $0E54 [$7E:0E54] $A0A49A 20 A1 A4 JSR $A4A1 [$A0:A4A1] $A0A49D AE 54 0E LDX $0E54 [$7E:0E54] $A0A4A0 6B RTL } ;;; ;;; { $A0A4A1 AD 6E 0A LDA $0A6E [$7E:0A6E] $A0A4A4 D0 03 BNE $03 [$A4A9] $A0A4A6 4C 62 A5 JMP $A562 [$A0:A562] $A0A4A9 18 CLC $A0A4AA 69 0F 00 ADC #$000F $A0A4AD 85 14 STA $14 [$7E:0014] $A0A4AF A0 F4 01 LDY #$01F4 $A0A4B2 AD 6E 0A LDA $0A6E [$7E:0A6E] $A0A4B5 C9 01 00 CMP #$0001 $A0A4B8 F0 26 BEQ $26 [$A4E0] $A0A4BA A0 2C 01 LDY #$012C $A0A4BD C9 02 00 CMP #$0002 $A0A4C0 F0 1E BEQ $1E [$A4E0] $A0A4C2 A0 D0 07 LDY #$07D0 $A0A4C5 C9 03 00 CMP #$0003 $A0A4C8 F0 16 BEQ $16 [$A4E0] $A0A4CA E6 14 INC $14 [$7E:0014] $A0A4CC A0 C8 00 LDY #$00C8 $A0A4CF C9 04 00 CMP #$0004 $A0A4D2 D0 09 BNE $09 [$A4DD] $A0A4D4 A9 04 00 LDA #$0004 $A0A4D7 22 84 F0 90 JSL $90F084[$90:F084] $A0A4DB 80 03 BRA $03 [$A4E0] $A0A4DD A0 C8 00 LDY #$00C8 $A0A4E0 84 16 STY $16 [$7E:0016] $A0A4E2 AE 54 0E LDX $0E54 [$7E:0E54] $A0A4E5 BD 78 0F LDA $0F78,x[$7E:10B8] $A0A4E8 AA TAX $A0A4E9 BF 3C 00 A0 LDA $A0003C,x[$A0:E8BB] $A0A4ED D0 03 BNE $03 [$A4F2] $A0A4EF A9 1C EC LDA #$EC1C $A0A4F2 18 CLC $A0A4F3 65 14 ADC $14 [$7E:0014] $A0A4F5 AA TAX $A0A4F6 BF 00 00 B4 LDA $B40000,x[$B4:EF9C] $A0A4FA 8D 40 0E STA $0E40 [$7E:0E40] $A0A4FD 29 7F 00 AND #$007F $A0A500 8D 32 0E STA $0E32 [$7E:0E32] $A0A503 F0 1B BEQ $1B [$A520] $A0A505 C9 FF 00 CMP #$00FF $A0A508 F0 16 BEQ $16 [$A520] $A0A50A AD 32 0E LDA $0E32 [$7E:0E32] $A0A50D 85 28 STA $28 [$7E:0028] $A0A50F A5 16 LDA $16 [$7E:0016] $A0A511 4A LSR A $A0A512 85 26 STA $26 [$7E:0026] $A0A514 22 FF B6 A0 JSL $A0B6FF[$A0:B6FF] $A0A518 A5 2A LDA $2A [$7E:002A] $A0A51A F0 04 BEQ $04 [$A520] $A0A51C 85 12 STA $12 [$7E:0012] $A0A51E 80 01 BRA $01 [$A521] $A0A520 60 RTS $A0A521 AE 54 0E LDX $0E54 [$7E:0E54] $A0A524 AE 54 0E LDX $0E54 [$7E:0E54] $A0A527 BD 78 0F LDA $0F78,x[$7E:10B8] $A0A52A AA TAX $A0A52B BF 0D 00 A0 LDA $A0000D,x[$A0:E88C] $A0A52F 29 FF 00 AND #$00FF $A0A532 D0 03 BNE $03 [$A537] $A0A534 A9 04 00 LDA #$0004 $A0A537 AE 54 0E LDX $0E54 [$7E:0E54] $A0A53A 9D 9C 0F STA $0F9C,x[$7E:10DC] $A0A53D BD 8A 0F LDA $0F8A,x[$7E:10CA] $A0A540 09 02 00 ORA #$0002 $A0A543 9D 8A 0F STA $0F8A,x[$7E:10CA] $A0A546 9C A8 18 STZ $18A8 [$7E:18A8] $A0A549 9C AA 18 STZ $18AA [$7E:18AA] $A0A54C BD 8C 0F LDA $0F8C,x[$7E:10CC] $A0A54F 38 SEC $A0A550 E5 12 SBC $12 [$7E:0012] $A0A552 10 03 BPL $03 [$A557] $A0A554 A9 00 00 LDA #$0000 $A0A557 9D 8C 0F STA $0F8C,x[$7E:10CC] $A0A55A A9 0B 00 LDA #$000B $A0A55D 22 C1 90 80 JSL $8090C1[$80:90C1] $A0A561 60 RTS $A0A562 AE 54 0E LDX $0E54 [$7E:0E54] $A0A565 BD 78 0F LDA $0F78,x[$7E:1078] $A0A568 AA TAX $A0A569 BF 06 00 A0 LDA $A00006,x[$A0:E205] $A0A56D 22 5E A4 A0 JSL $A0A45E[$A0:A45E] $A0A571 22 51 DF 91 JSL $91DF51[$91:DF51] $A0A575 A9 60 00 LDA #$0060 $A0A578 8D A8 18 STA $18A8 [$7E:18A8] $A0A57B A9 05 00 LDA #$0005 $A0A57E 8D AA 18 STA $18AA [$7E:18AA] $A0A581 A0 00 00 LDY #$0000 $A0A584 AE 54 0E LDX $0E54 [$7E:0E54] $A0A587 AD F6 0A LDA $0AF6 [$7E:0AF6] $A0A58A 38 SEC $A0A58B FD 7A 0F SBC $0F7A,x[$7E:107A] $A0A58E 30 03 BMI $03 [$A593] $A0A590 A0 01 00 LDY #$0001 $A0A593 8C 54 0A STY $0A54 [$7E:0A54] $A0A596 60 RTS } ;;; ;;; { ; An enemy power bomb AI ; Used by Metroid $A0A597 AE 54 0E LDX $0E54 [$7E:0E54] $A0A59A 20 C1 A5 JSR $A5C1 [$A0:A5C1] $A0A59D AE 54 0E LDX $0E54 [$7E:0E54] $A0A5A0 BD 8C 0F LDA $0F8C,x[$7E:100C] $A0A5A3 D0 0E BNE $0E [$A5B3] $A0A5A5 A9 03 00 LDA #$0003 $A0A5A8 9F 02 70 7E STA $7E7002,x[$7E:7142] $A0A5AC A9 00 00 LDA #$0000 $A0A5AF 22 AF A3 A0 JSL $A0A3AF[$A0:A3AF] $A0A5B3 AE 54 0E LDX $0E54 [$7E:0E54] $A0A5B6 6B RTL } ;;; Normal enemy power bomb AI ;;; { $A0A5B7 AE 54 0E LDX $0E54 [$7E:0E54] $A0A5BA 20 C1 A5 JSR $A5C1 [$A0:A5C1] $A0A5BD AE 54 0E LDX $0E54 [$7E:0E54] $A0A5C0 6B RTL } ;;; Normal enemy power bomb AI ;;; { $A0A5C1 AE 54 0E LDX $0E54 [$7E:0E54] ;\ $A0A5C4 BD 78 0F LDA $0F78,x[$7E:0FF8] ;| $A0A5C7 AA TAX ;| $A0A5C8 BF 3C 00 A0 LDA $A0003C,x[$A0:CEFB] ;| $A0A5CC D0 03 BNE $03 [$A5D1] ;| $A0A5CE A9 1C EC LDA #$EC1C ;| ;} If power bomb vulnerability == FFh (freeze but not kill): return $A0A5D1 AA TAX ;| $A0A5D2 BF 0F 00 B4 LDA $B4000F,x[$B4:EDB7] ;| $A0A5D6 29 FF 00 AND #$00FF ;| $A0A5D9 C9 FF 00 CMP #$00FF ;| $A0A5DC F0 5E BEQ $5E [$A63C] ;/ $A0A5DE 29 7F 00 AND #$007F ;\ $A0A5E1 8D 32 0E STA $0E32 [$7E:0E32] ;} Write enemy damage multiplier $A0A5E4 F0 56 BEQ $56 [$A63C] ; If zero: return $A0A5E6 A9 C8 00 LDA #$00C8 ;\ $A0A5E9 4A LSR A ;| $A0A5EA 85 26 STA $26 [$7E:0026] ;| $A0A5EC AD 32 0E LDA $0E32 [$7E:0E32] ;| $A0A5EF 85 28 STA $28 [$7E:0028] ;} Calculate power bomb damage $A0A5F1 22 FF B6 A0 JSL $A0B6FF[$A0:B6FF] ;| $A0A5F5 A5 2A LDA $2A [$7E:002A] ;| $A0A5F7 8D 7A 18 STA $187A [$7E:187A] ;/ $A0A5FA F0 40 BEQ $40 [$A63C] ; If damage is zero: return $A0A5FC AE 54 0E LDX $0E54 [$7E:0E54] $A0A5FF A9 30 00 LDA #$0030 ;\ $A0A602 9D A0 0F STA $0FA0,x[$7E:1020] ;} Enemy counter = 30h $A0A605 AE 54 0E LDX $0E54 [$7E:0E54] $A0A608 BD 78 0F LDA $0F78,x[$7E:0FF8] ;\ $A0A60B AA TAX ;| $A0A60C BF 0D 00 A0 LDA $A0000D,x[$A0:CECC] ;| $A0A610 29 FF 00 AND #$00FF ;| $A0A613 D0 03 BNE $03 [$A618] ;| $A0A615 A9 04 00 LDA #$0004 ;} Set hurt AI time ;| $A0A618 18 CLC ;| $A0A619 69 08 00 ADC #$0008 ;| $A0A61C AE 54 0E LDX $0E54 [$7E:0E54] ;| $A0A61F 9D 9C 0F STA $0F9C,x[$7E:101C] ;/ $A0A622 BD 8A 0F LDA $0F8A,x[$7E:100A] ;\ $A0A625 09 02 00 ORA #$0002 ;} Set hurt AI $A0A628 9D 8A 0F STA $0F8A,x[$7E:100A] ;/ $A0A62B BD 8C 0F LDA $0F8C,x[$7E:100C] ;\ $A0A62E 38 SEC ;| $A0A62F ED 7A 18 SBC $187A [$7E:187A] ;| $A0A632 F0 02 BEQ $02 [$A636] ;| $A0A634 B0 03 BCS $03 [$A639] ;} Subtract damage from enemy health ;| $A0A636 A9 00 00 LDA #$0000 ;| $A0A639 9D 8C 0F STA $0F8C,x[$7E:100C] ;/ $A0A63C 60 RTS } ;;; Normal enemy shot AI ;;; { ; JSR $A6DE, display the 'hit' graphic if applicable. ; If enemy is at 0 health, set 7E:7002,X to the projectile type ($0C18,Y, AND #$0F00), ; and play the death animation (JSL $A0A3AF) $A0A63D 9C 2E 0E STZ $0E2E [$7E:0E2E] $A0A640 AE 54 0E LDX $0E54 [$7E:0E54] $A0A643 20 DE A6 JSR $A6DE [$A0:A6DE] $A0A646 AE 54 0E LDX $0E54 [$7E:0E54] $A0A649 AD 2E 0E LDA $0E2E [$7E:0E2E] $A0A64C F0 18 BEQ $18 [$A666] $A0A64E AE 54 0E LDX $0E54 [$7E:0E54] $A0A651 BD 7A 0F LDA $0F7A,x[$7E:0FBA] $A0A654 85 12 STA $12 [$7E:0012] $A0A656 BD 7E 0F LDA $0F7E,x[$7E:0FBE] $A0A659 85 14 STA $14 [$7E:0014] $A0A65B A9 37 00 LDA #$0037 $A0A65E 85 16 STA $16 [$7E:0016] $A0A660 64 18 STZ $18 [$7E:0018] $A0A662 22 26 BC B4 JSL $B4BC26[$B4:BC26] $A0A666 BD 8C 0F LDA $0F8C,x[$7E:0FCC] $A0A669 D0 38 BNE $38 [$A6A3] $A0A66B AD A6 18 LDA $18A6 [$7E:18A6] $A0A66E 0A ASL A $A0A66F A8 TAY $A0A670 B9 18 0C LDA $0C18,y[$7E:0C18] $A0A673 EB XBA $A0A674 29 0F 00 AND #$000F $A0A677 9F 02 70 7E STA $7E7002,x[$7E:7042] $A0A67B A0 02 00 LDY #$0002 $A0A67E C9 02 00 CMP #$0002 $A0A681 F0 0D BEQ $0D [$A690] $A0A683 BD 78 0F LDA $0F78,x[$7E:0FB8] $A0A686 AA TAX $A0A687 BF 22 00 A0 LDA $A00022,x[$A0:F375] $A0A68B F0 00 BEQ $00 [$A68D] $A0A68D A8 TAY $A0A68E 80 0E BRA $0E [$A69E] $A0A690 BD 78 0F LDA $0F78,x[$7E:0FB8] $A0A693 AA TAX $A0A694 BF 22 00 A0 LDA $A00022,x[$A0:D061] $A0A698 C9 03 00 CMP #$0003 $A0A69B 30 01 BMI $01 [$A69E] $A0A69D ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A0A69E 98 TYA $A0A69F 22 AF A3 A0 JSL $A0A3AF[$A0:A3AF] $A0A6A3 AE 54 0E LDX $0E54 [$7E:0E54] $A0A6A6 6B RTL } ;;; Handles beam damage, freezing, and sound. Clears enemy hit flag ;;; { $A0A6A7 9C 2E 0E STZ $0E2E [$7E:0E2E] ; Clear enemy hit flag $A0A6AA AE 54 0E LDX $0E54 [$7E:0E54] $A0A6AD 20 DE A6 JSR $A6DE [$A0:A6DE] ; Handles beam damage, freezing, and sound $A0A6B0 AE 54 0E LDX $0E54 [$7E:0E54] $A0A6B3 6B RTL } ;;; ;;; { $A0A6B4 9C 2E 0E STZ $0E2E [$7E:0E2E] $A0A6B7 AE 54 0E LDX $0E54 [$7E:0E54] $A0A6BA 20 DE A6 JSR $A6DE [$A0:A6DE] $A0A6BD AD 2E 0E LDA $0E2E [$7E:0E2E] $A0A6C0 F0 18 BEQ $18 [$A6DA] $A0A6C2 AE 54 0E LDX $0E54 [$7E:0E54] $A0A6C5 BD 7A 0F LDA $0F7A,x[$7E:0F7A] $A0A6C8 85 12 STA $12 [$7E:0012] $A0A6CA BD 7E 0F LDA $0F7E,x[$7E:0F7E] $A0A6CD 85 14 STA $14 [$7E:0014] $A0A6CF A9 37 00 LDA #$0037 $A0A6D2 85 16 STA $16 [$7E:0016] $A0A6D4 64 18 STZ $18 [$7E:0018] $A0A6D6 22 26 BC B4 JSL $B4BC26[$B4:BC26] $A0A6DA AE 54 0E LDX $0E54 [$7E:0E54] $A0A6DD 6B RTL } ;;; Handles beam damage, freezing, and sound ;;; { $A0A6DE 8B PHB $A0A6DF AD A6 18 LDA $18A6 [$7E:18A6] $A0A6E2 0A ASL A $A0A6E3 AA TAX $A0A6E4 BD 2C 0C LDA $0C2C,x[$7E:0C2C] $A0A6E7 8D 7A 18 STA $187A [$7E:187A] $A0A6EA BD 18 0C LDA $0C18,x[$7E:0C18] $A0A6ED 85 12 STA $12 [$7E:0012] $A0A6EF DA PHX $A0A6F0 AE 54 0E LDX $0E54 [$7E:0E54] $A0A6F3 BD 78 0F LDA $0F78,x[$7E:0FB8] $A0A6F6 AA TAX $A0A6F7 BF 3C 00 A0 LDA $A0003C,x[$A0:F38F] $A0A6FB D0 03 BNE $03 [$A700] $A0A6FD ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A0A700 85 14 STA $14 [$7E:0014] $A0A702 A5 12 LDA $12 [$7E:0012] $A0A704 89 00 0F BIT #$0F00 $A0A707 D0 5A BNE $5A [$A763] $A0A709 A5 12 LDA $12 [$7E:0012] $A0A70B 29 0F 00 AND #$000F $A0A70E 18 CLC $A0A70F 65 14 ADC $14 [$7E:0014] $A0A711 AA TAX $A0A712 BF 00 00 B4 LDA $B40000,x[$B4:ECCC] $A0A716 29 FF 00 AND #$00FF $A0A719 8D 40 0E STA $0E40 [$7E:0E40] $A0A71C 29 7F 00 AND #$007F $A0A71F 8D 32 0E STA $0E32 [$7E:0E32] $A0A722 AD 40 0E LDA $0E40 [$7E:0E40] $A0A725 C9 FF 00 CMP #$00FF $A0A728 D0 03 BNE $03 [$A72D] $A0A72A 4C D5 A7 JMP $A7D5 [$A0:A7D5] $A0A72D A5 12 LDA $12 [$7E:0012] $A0A72F 89 10 00 BIT #$0010 $A0A732 F0 16 BEQ $16 [$A74A] $A0A734 A6 14 LDX $14 [$7E:0014] $A0A736 BF 13 00 B4 LDA $B40013,x[$B4:ED79] $A0A73A 29 FF 00 AND #$00FF $A0A73D C9 FF 00 CMP #$00FF $A0A740 F0 66 BEQ $66 [$A7A8] $A0A742 29 0F 00 AND #$000F $A0A745 F0 61 BEQ $61 [$A7A8] $A0A747 8D 32 0E STA $0E32 [$7E:0E32] $A0A74A AD 7A 18 LDA $187A [$7E:187A] $A0A74D 4A LSR A $A0A74E 85 26 STA $26 [$7E:0026] $A0A750 AD 32 0E LDA $0E32 [$7E:0E32] $A0A753 85 28 STA $28 [$7E:0028] $A0A755 22 FF B6 A0 JSL $A0B6FF[$A0:B6FF] $A0A759 A5 2A LDA $2A [$7E:002A] $A0A75B F0 4B BEQ $4B [$A7A8] $A0A75D 8D 7A 18 STA $187A [$7E:187A] $A0A760 4C 08 A8 JMP $A808 [$A0:A808] $A0A763 29 00 0F AND #$0F00 $A0A766 C9 00 01 CMP #$0100 $A0A769 F0 05 BEQ $05 [$A770] $A0A76B C9 00 02 CMP #$0200 $A0A76E D0 11 BNE $11 [$A781] $A0A770 EB XBA $A0A771 18 CLC $A0A772 65 14 ADC $14 [$7E:0014] $A0A774 AA TAX $A0A775 BF 0B 00 B4 LDA $B4000B,x[$B4:F0CC] $A0A779 29 7F 00 AND #$007F $A0A77C 8D 32 0E STA $0E32 [$7E:0E32] $A0A77F 80 C9 BRA $C9 [$A74A] $A0A781 C9 00 05 CMP #$0500 $A0A784 D0 0E BNE $0E [$A794] $A0A786 A6 14 LDX $14 [$7E:0014] $A0A788 BF 0E 00 B4 LDA $B4000E,x[$B4:EF84] $A0A78C 29 7F 00 AND #$007F $A0A78F 8D 32 0E STA $0E32 [$7E:0E32] $A0A792 80 B6 BRA $B6 [$A74A] $A0A794 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A0A7A8 AD A6 18 LDA $18A6 [$7E:18A6] $A0A7AB 0A ASL A $A0A7AC AA TAX $A0A7AD BD 04 0C LDA $0C04,x[$7E:0C06] $A0A7B0 09 10 00 ORA #$0010 $A0A7B3 9D 04 0C STA $0C04,x[$7E:0C06] $A0A7B6 BD 64 0B LDA $0B64,x[$7E:0B66] $A0A7B9 85 12 STA $12 [$7E:0012] $A0A7BB BD 78 0B LDA $0B78,x[$7E:0B7A] $A0A7BE 85 14 STA $14 [$7E:0014] $A0A7C0 A9 06 00 LDA #$0006 $A0A7C3 85 16 STA $16 [$7E:0016] $A0A7C5 64 18 STZ $18 [$7E:0018] $A0A7C7 22 26 BC B4 JSL $B4BC26[$B4:BC26] $A0A7CB A9 3D 00 LDA #$003D $A0A7CE 22 35 90 80 JSL $809035[$80:9035] $A0A7D2 FA PLX $A0A7D3 AB PLB $A0A7D4 60 RTS $A0A7D5 AE 54 0E LDX $0E54 [$7E:0E54] $A0A7D8 BD 9E 0F LDA $0F9E,x[$7E:105E] $A0A7DB D0 07 BNE $07 [$A7E4] $A0A7DD A9 0A 00 LDA #$000A $A0A7E0 22 39 91 80 JSL $809139[$80:9139] $A0A7E4 A0 90 01 LDY #$0190 $A0A7E7 AD 9F 07 LDA $079F [$7E:079F] $A0A7EA C9 02 00 CMP #$0002 $A0A7ED D0 03 BNE $03 [$A7F2] $A0A7EF A0 2C 01 LDY #$012C $A0A7F2 98 TYA $A0A7F3 9D 9E 0F STA $0F9E,x[$7E:105E] $A0A7F6 BD 8A 0F LDA $0F8A,x[$7E:104A] $A0A7F9 09 04 00 ORA #$0004 $A0A7FC 9D 8A 0F STA $0F8A,x[$7E:104A] $A0A7FF A9 0A 00 LDA #$000A $A0A802 9D A0 0F STA $0FA0,x[$7E:1060] $A0A805 FA PLX $A0A806 AB PLB $A0A807 60 RTS $A0A808 FA PLX $A0A809 AE 54 0E LDX $0E54 [$7E:0E54] $A0A80C AE 54 0E LDX $0E54 [$7E:0E54] $A0A80F BD 78 0F LDA $0F78,x[$7E:0FB8] $A0A812 AA TAX $A0A813 BF 0D 00 A0 LDA $A0000D,x[$A0:F360] $A0A817 29 FF 00 AND #$00FF $A0A81A D0 03 BNE $03 [$A81F] $A0A81C A9 04 00 LDA #$0004 $A0A81F 18 CLC $A0A820 69 08 00 ADC #$0008 $A0A823 AE 54 0E LDX $0E54 [$7E:0E54] $A0A826 9D 9C 0F STA $0F9C,x[$7E:0FDC] $A0A829 BD 8A 0F LDA $0F8A,x[$7E:0FCA] $A0A82C 09 02 00 ORA #$0002 $A0A82F 9D 8A 0F STA $0F8A,x[$7E:0FCA] $A0A832 BD 9E 0F LDA $0F9E,x[$7E:0FDE] $A0A835 D0 15 BNE $15 [$A84C] $A0A837 DA PHX $A0A838 5A PHY $A0A839 BD 78 0F LDA $0F78,x[$7E:0FB8] $A0A83C AA TAX $A0A83D BF 0E 00 A0 LDA $A0000E,x[$A0:F361] $A0A841 F0 04 BEQ $04 [$A847] $A0A843 22 B7 90 80 JSL $8090B7[$80:90B7] $A0A847 7A PLY $A0A848 FA PLX $A0A849 EE 2E 0E INC $0E2E [$7E:0E2E] $A0A84C AE 54 0E LDX $0E54 [$7E:0E54] $A0A84F AD A6 18 LDA $18A6 [$7E:18A6] $A0A852 0A ASL A $A0A853 A8 TAY $A0A854 B9 18 0C LDA $0C18,y[$7E:0C18] $A0A857 89 08 00 BIT #$0008 $A0A85A F0 06 BEQ $06 [$A862] $A0A85C A9 10 00 LDA #$0010 $A0A85F 9D A0 0F STA $0FA0,x[$7E:0FA0] $A0A862 BD 8C 0F LDA $0F8C,x[$7E:0FCC] $A0A865 38 SEC $A0A866 ED 7A 18 SBC $187A [$7E:187A] $A0A869 F0 02 BEQ $02 [$A86D] $A0A86B B0 4A BCS $4A [$A8B7] $A0A86D AD A6 18 LDA $18A6 [$7E:18A6] $A0A870 0A ASL A $A0A871 A8 TAY $A0A872 B9 18 0C LDA $0C18,y[$7E:0C18] $A0A875 29 02 00 AND #$0002 $A0A878 F0 3A BEQ $3A [$A8B4] $A0A87A AD 40 0E LDA $0E40 [$7E:0E40] $A0A87D 29 F0 00 AND #$00F0 $A0A880 C9 80 00 CMP #$0080 $A0A883 F0 2F BEQ $2F [$A8B4] $A0A885 BD 9E 0F LDA $0F9E,x[$7E:0FDE] $A0A888 D0 2A BNE $2A [$A8B4] $A0A88A A0 90 01 LDY #$0190 $A0A88D AD 9F 07 LDA $079F [$7E:079F] $A0A890 C9 02 00 CMP #$0002 $A0A893 D0 03 BNE $03 [$A898] $A0A895 A0 2C 01 LDY #$012C $A0A898 98 TYA $A0A899 9D 9E 0F STA $0F9E,x[$7E:0FDE] $A0A89C BD 8A 0F LDA $0F8A,x[$7E:0FCA] $A0A89F 09 04 00 ORA #$0004 $A0A8A2 9D 8A 0F STA $0F8A,x[$7E:0FCA] $A0A8A5 A9 0A 00 LDA #$000A $A0A8A8 9D A0 0F STA $0FA0,x[$7E:0FE0] $A0A8AB A9 0A 00 LDA #$000A $A0A8AE 22 39 91 80 JSL $809139[$80:9139] $A0A8B2 AB PLB $A0A8B3 60 RTS $A0A8B4 A9 00 00 LDA #$0000 $A0A8B7 9D 8C 0F STA $0F8C,x[$7E:0FCC] $A0A8BA AB PLB $A0A8BB 60 RTS } ;;; Creates a dud shot ;;; { ; (graphic and kills projectile) $A0A8BC DA PHX $A0A8BD 5A PHY $A0A8BE AD A6 18 LDA $18A6 [$7E:18A6] $A0A8C1 0A ASL A $A0A8C2 AA TAX $A0A8C3 BD 64 0B LDA $0B64,x[$7E:0B66] $A0A8C6 85 12 STA $12 [$7E:0012] $A0A8C8 BD 78 0B LDA $0B78,x[$7E:0B7A] $A0A8CB 85 14 STA $14 [$7E:0014] $A0A8CD A9 06 00 LDA #$0006 $A0A8D0 85 16 STA $16 [$7E:0016] $A0A8D2 64 18 STZ $18 [$7E:0018] $A0A8D4 22 26 BC B4 JSL $B4BC26[$B4:BC26] $A0A8D8 A9 3D 00 LDA #$003D $A0A8DB 22 35 90 80 JSL $809035[$80:9035] $A0A8DF AD A6 18 LDA $18A6 [$7E:18A6] $A0A8E2 0A ASL A $A0A8E3 AA TAX $A0A8E4 BD 04 0C LDA $0C04,x[$7E:0C06] $A0A8E7 09 10 00 ORA #$0010 $A0A8EA 9D 04 0C STA $0C04,x[$7E:0C06] $A0A8ED 7A PLY $A0A8EE FA PLX $A0A8EF 6B RTL } ;;; ;;; { ; Checks for collisions with (active) enemies, and puts something in A depending on the collisions. ; 0000 means no collisions, FFFF means yes collision(s). ; Sets 7E:182C,X and 7E:1834,X, 7E:184A - 7E:185B (see RAMMap.txt) $A0A8F0 08 PHP $A0A8F1 8B PHB $A0A8F2 F4 00 A0 PEA $A000 $A0A8F5 AB PLB $A0A8F6 AB PLB $A0A8F7 C2 30 REP #$30 $A0A8F9 AD A6 17 LDA $17A6 [$7E:17A6] $A0A8FC F0 02 BEQ $02 [$A900] $A0A8FE 80 06 BRA $06 [$A906] $A0A900 A9 00 00 LDA #$0000 $A0A903 AB PLB $A0A904 28 PLP $A0A905 6B RTL $A0A906 AD 02 0B LDA $0B02 [$7E:0B02] $A0A909 29 03 00 AND #$0003 $A0A90C 0A ASL A $A0A90D AA TAX $A0A90E 7C 11 A9 JMP ($A911,x)[$A0:A945] $A0A911 dw A919, A945, A96C, A993 } ;;; ;;; { $A0A919 A5 12 LDA $12 [$7E:0012] $A0A91B 49 FF FF EOR #$FFFF $A0A91E 1A INC A $A0A91F 18 CLC $A0A920 6D F6 0A ADC $0AF6 [$7E:0AF6] $A0A923 8D 9A 18 STA $189A [$7E:189A] $A0A926 AD F8 0A LDA $0AF8 [$7E:0AF8] $A0A929 38 SEC $A0A92A E5 14 SBC $14 [$7E:0014] $A0A92C B0 03 BCS $03 [$A931] $A0A92E CE 9A 18 DEC $189A [$7E:189A] $A0A931 F0 03 BEQ $03 [$A936] $A0A933 CE 9A 18 DEC $189A [$7E:189A] $A0A936 AD FA 0A LDA $0AFA [$7E:0AFA] $A0A939 8D 9E 18 STA $189E [$7E:189E] $A0A93C AD FC 0A LDA $0AFC [$7E:0AFC] $A0A93F 8D A0 18 STA $18A0 [$7E:18A0] $A0A942 4C B8 A9 JMP $A9B8 [$A0:A9B8] } ;;; ;;; { $A0A945 A5 12 LDA $12 [$7E:0012] $A0A947 18 CLC $A0A948 6D F6 0A ADC $0AF6 [$7E:0AF6] $A0A94B 8D 9A 18 STA $189A [$7E:189A] $A0A94E A5 14 LDA $14 [$7E:0014] $A0A950 18 CLC $A0A951 6D F8 0A ADC $0AF8 [$7E:0AF8] $A0A954 90 03 BCC $03 [$A959] $A0A956 EE 9A 18 INC $189A [$7E:189A] $A0A959 F0 03 BEQ $03 [$A95E] $A0A95B EE 9A 18 INC $189A [$7E:189A] $A0A95E AD FA 0A LDA $0AFA [$7E:0AFA] $A0A961 8D 9E 18 STA $189E [$7E:189E] $A0A964 AD FC 0A LDA $0AFC [$7E:0AFC] $A0A967 8D A0 18 STA $18A0 [$7E:18A0] $A0A96A 80 4C BRA $4C [$A9B8] } ;;; ;;; { $A0A96C AD FA 0A LDA $0AFA [$7E:0AFA] $A0A96F 38 SEC $A0A970 E5 12 SBC $12 [$7E:0012] $A0A972 8D 9E 18 STA $189E [$7E:189E] $A0A975 AD FC 0A LDA $0AFC [$7E:0AFC] $A0A978 38 SEC $A0A979 E5 14 SBC $14 [$7E:0014] $A0A97B B0 03 BCS $03 [$A980] $A0A97D CE 9E 18 DEC $189E [$7E:189E] $A0A980 F0 03 BEQ $03 [$A985] $A0A982 CE 9E 18 DEC $189E [$7E:189E] $A0A985 AD F6 0A LDA $0AF6 [$7E:0AF6] $A0A988 8D 9A 18 STA $189A [$7E:189A] $A0A98B AD F8 0A LDA $0AF8 [$7E:0AF8] $A0A98E 8D 9C 18 STA $189C [$7E:189C] $A0A991 80 25 BRA $25 [$A9B8] } ;;; ;;; { $A0A993 A5 12 LDA $12 [$7E:0012] $A0A995 18 CLC $A0A996 6D FA 0A ADC $0AFA [$7E:0AFA] $A0A999 8D 9E 18 STA $189E [$7E:189E] $A0A99C A5 14 LDA $14 [$7E:0014] $A0A99E 18 CLC $A0A99F 6D FC 0A ADC $0AFC [$7E:0AFC] $A0A9A2 90 03 BCC $03 [$A9A7] $A0A9A4 EE 9E 18 INC $189E [$7E:189E] $A0A9A7 F0 03 BEQ $03 [$A9AC] $A0A9A9 EE 9E 18 INC $189E [$7E:189E] $A0A9AC AD F6 0A LDA $0AF6 [$7E:0AF6] $A0A9AF 8D 9A 18 STA $189A [$7E:189A] $A0A9B2 AD F8 0A LDA $0AF8 [$7E:0AF8] $A0A9B5 8D 9C 18 STA $189C [$7E:189C] } ;;; ;;; { $A0A9B8 AD FE 0A LDA $0AFE [$7E:0AFE] $A0A9BB 8D A2 18 STA $18A2 [$7E:18A2] $A0A9BE AD 00 0B LDA $0B00 [$7E:0B00] $A0A9C1 8D A4 18 STA $18A4 [$7E:18A4] $A0A9C4 9C A6 18 STZ $18A6 [$7E:18A6] $A0A9C7 9C AA 17 STZ $17AA [$7E:17AA] $A0A9CA AC AA 17 LDY $17AA [$7E:17AA] $A0A9CD B9 EC 17 LDA $17EC,y[$7E:17EC] $A0A9D0 C9 FF FF CMP #$FFFF $A0A9D3 D0 03 BNE $03 [$A9D8] $A0A9D5 4C 7B AB JMP $AB7B [$A0:AB7B] $A0A9D8 8D A6 18 STA $18A6 [$7E:18A6] $A0A9DB AA TAX $A0A9DC BD 9E 0F LDA $0F9E,x[$7E:0FDE] $A0A9DF D0 0B BNE $0B [$A9EC] $A0A9E1 BD 86 0F LDA $0F86,x[$7E:0FC6] $A0A9E4 89 00 80 BIT #$8000 $A0A9E7 D0 03 BNE $03 [$A9EC] $A0A9E9 4C BF AA JMP $AABF [$A0:AABF] $A0A9EC 8A TXA $A0A9ED 18 CLC $A0A9EE 69 7A 0F ADC #$0F7A $A0A9F1 AA TAX $A0A9F2 A0 9A 18 LDY #$189A $A0A9F5 B5 00 LDA $00,x [$7E:0FBA] $A0A9F7 38 SEC $A0A9F8 F9 00 00 SBC $0000,y[$7E:189A] $A0A9FB 10 04 BPL $04 [$AA01] $A0A9FD 49 FF FF EOR #$FFFF $A0AA00 1A INC A $A0AA01 38 SEC $A0AA02 F5 08 SBC $08,x [$7E:0FC2] $A0AA04 90 05 BCC $05 [$AA0B] $A0AA06 D9 08 00 CMP $0008,y[$7E:18A2] $A0AA09 B0 16 BCS $16 [$AA21] $A0AA0B B5 04 LDA $04,x [$7E:0FBE] $A0AA0D 38 SEC $A0AA0E F9 04 00 SBC $0004,y[$7E:189E] $A0AA11 10 04 BPL $04 [$AA17] $A0AA13 49 FF FF EOR #$FFFF $A0AA16 1A INC A $A0AA17 38 SEC $A0AA18 F5 0A SBC $0A,x [$7E:0FC4] $A0AA1A 90 08 BCC $08 [$AA24] $A0AA1C D9 0A 00 CMP $000A,y[$7E:18A4] $A0AA1F 90 03 BCC $03 [$AA24] $A0AA21 4C BF AA JMP $AABF [$A0:AABF] $A0AA24 AD 02 0B LDA $0B02 [$7E:0B02] $A0AA27 29 03 00 AND #$0003 $A0AA2A 0A ASL A $A0AA2B AA TAX $A0AA2C 7C 2F AA JMP ($AA2F,x)[$A0:AA5C] $A0AA2F dw AA37, AA5C, AA7E, AAA0 } ;;; ;;; { $A0AA37 AE A6 18 LDX $18A6 [$7E:18A6] $A0AA3A BD 7A 0F LDA $0F7A,x[$7E:0F7A] $A0AA3D 18 CLC $A0AA3E 7D 82 0F ADC $0F82,x[$7E:0F82] $A0AA41 8D 32 0E STA $0E32 [$7E:0E32] $A0AA44 AD F6 0A LDA $0AF6 [$7E:0AF6] $A0AA47 38 SEC $A0AA48 ED FE 0A SBC $0AFE [$7E:0AFE] $A0AA4B 38 SEC $A0AA4C ED 32 0E SBC $0E32 [$7E:0E32] $A0AA4F F0 08 BEQ $08 [$AA59] $A0AA51 10 03 BPL $03 [$AA56] $A0AA53 4C 81 AB JMP $AB81 [$A0:AB81] $A0AA56 4C 22 AB JMP $AB22 [$A0:AB22] $A0AA59 4C C8 AA JMP $AAC8 [$A0:AAC8] } ;;; ;;; { $A0AA5C AE A6 18 LDX $18A6 [$7E:18A6] $A0AA5F AD F6 0A LDA $0AF6 [$7E:0AF6] $A0AA62 18 CLC $A0AA63 6D FE 0A ADC $0AFE [$7E:0AFE] $A0AA66 8D 32 0E STA $0E32 [$7E:0E32] $A0AA69 BD 7A 0F LDA $0F7A,x[$7E:0FBA] $A0AA6C 38 SEC $A0AA6D FD 82 0F SBC $0F82,x[$7E:0FC2] $A0AA70 38 SEC $A0AA71 ED 32 0E SBC $0E32 [$7E:0E32] $A0AA74 F0 52 BEQ $52 [$AAC8] $A0AA76 10 03 BPL $03 [$AA7B] $A0AA78 4C 81 AB JMP $AB81 [$A0:AB81] $A0AA7B 4C 22 AB JMP $AB22 [$A0:AB22] } ;;; ;;; { $A0AA7E AE A6 18 LDX $18A6 [$7E:18A6] $A0AA81 BD 7E 0F LDA $0F7E,x[$7E:123E] $A0AA84 18 CLC $A0AA85 7D 84 0F ADC $0F84,x[$7E:1244] $A0AA88 8D 32 0E STA $0E32 [$7E:0E32] $A0AA8B AD FA 0A LDA $0AFA [$7E:0AFA] $A0AA8E 38 SEC $A0AA8F ED 00 0B SBC $0B00 [$7E:0B00] $A0AA92 38 SEC $A0AA93 ED 32 0E SBC $0E32 [$7E:0E32] $A0AA96 F0 30 BEQ $30 [$AAC8] $A0AA98 10 03 BPL $03 [$AA9D] $A0AA9A 4C 81 AB JMP $AB81 [$A0:AB81] $A0AA9D 4C 22 AB JMP $AB22 [$A0:AB22] } ;;; ;;; { $A0AAA0 AE A6 18 LDX $18A6 [$7E:18A6] $A0AAA3 AD FA 0A LDA $0AFA [$7E:0AFA] $A0AAA6 18 CLC $A0AAA7 6D 00 0B ADC $0B00 [$7E:0B00] $A0AAAA 8D 32 0E STA $0E32 [$7E:0E32] $A0AAAD BD 7E 0F LDA $0F7E,x[$7E:0FBE] $A0AAB0 38 SEC $A0AAB1 FD 84 0F SBC $0F84,x[$7E:0FC4] $A0AAB4 38 SEC $A0AAB5 ED 32 0E SBC $0E32 [$7E:0E32] $A0AAB8 F0 0E BEQ $0E [$AAC8] $A0AABA 10 66 BPL $66 [$AB22] $A0AABC 4C 81 AB JMP $AB81 [$A0:AB81] } ;;; ;;; { $A0AABF EE AA 17 INC $17AA [$7E:17AA] $A0AAC2 EE AA 17 INC $17AA [$7E:17AA] $A0AAC5 4C CA A9 JMP $A9CA [$A0:A9CA] } ;;; ;;; { $A0AAC8 9C FC 0A STZ $0AFC [$7E:0AFC] $A0AACB AE A6 18 LDX $18A6 [$7E:18A6] $A0AACE AD F6 0A LDA $0AF6 [$7E:0AF6] $A0AAD1 8D 4A 18 STA $184A [$7E:184A] $A0AAD4 AD F8 0A LDA $0AF8 [$7E:0AF8] $A0AAD7 8D 4C 18 STA $184C [$7E:184C] $A0AADA BD 7A 0F LDA $0F7A,x[$7E:0FBA] $A0AADD 8D 4E 18 STA $184E [$7E:184E] $A0AAE0 BD 7C 0F LDA $0F7C,x[$7E:0FBC] $A0AAE3 8D 50 18 STA $1850 [$7E:1850] $A0AAE6 A5 12 LDA $12 [$7E:0012] $A0AAE8 8D 52 18 STA $1852 [$7E:1852] $A0AAEB A5 14 LDA $14 [$7E:0014] $A0AAED 8D 54 18 STA $1854 [$7E:1854] $A0AAF0 AD FA 0A LDA $0AFA [$7E:0AFA] $A0AAF3 8D 56 18 STA $1856 [$7E:1856] $A0AAF6 AD FC 0A LDA $0AFC [$7E:0AFC] $A0AAF9 8D 58 18 STA $1858 [$7E:1858] $A0AAFC A9 01 00 LDA #$0001 $A0AAFF 8D 5A 18 STA $185A [$7E:185A] $A0AB02 64 12 STZ $12 [$7E:0012] $A0AB04 64 14 STZ $14 [$7E:0014] $A0AB06 AD A6 18 LDA $18A6 [$7E:18A6] $A0AB09 85 16 STA $16 [$7E:0016] $A0AB0B AD 02 0B LDA $0B02 [$7E:0B02] $A0AB0E 29 03 00 AND #$0003 $A0AB11 0A ASL A $A0AB12 AA TAX $A0AB13 AD A6 18 LDA $18A6 [$7E:18A6] $A0AB16 9D 2C 18 STA $182C,x[$7E:182E] $A0AB19 9E 34 18 STZ $1834,x[$7E:1836] $A0AB1C A9 FF FF LDA #$FFFF $A0AB1F AB PLB $A0AB20 28 PLP $A0AB21 6B RTL } ;;; ;;; { $A0AB22 48 PHA $A0AB23 AE A6 18 LDX $18A6 [$7E:18A6] $A0AB26 AD F6 0A LDA $0AF6 [$7E:0AF6] $A0AB29 8D 4A 18 STA $184A [$7E:184A] $A0AB2C AD F8 0A LDA $0AF8 [$7E:0AF8] $A0AB2F 8D 4C 18 STA $184C [$7E:184C] $A0AB32 BD 7A 0F LDA $0F7A,x[$7E:0FBA] $A0AB35 8D 4E 18 STA $184E [$7E:184E] $A0AB38 BD 7C 0F LDA $0F7C,x[$7E:0FBC] $A0AB3B 8D 50 18 STA $1850 [$7E:1850] $A0AB3E A5 12 LDA $12 [$7E:0012] $A0AB40 8D 52 18 STA $1852 [$7E:1852] $A0AB43 A5 14 LDA $14 [$7E:0014] $A0AB45 8D 54 18 STA $1854 [$7E:1854] $A0AB48 AD FA 0A LDA $0AFA [$7E:0AFA] $A0AB4B 8D 56 18 STA $1856 [$7E:1856] $A0AB4E AD FC 0A LDA $0AFC [$7E:0AFC] $A0AB51 8D 58 18 STA $1858 [$7E:1858] $A0AB54 A9 02 00 LDA #$0002 $A0AB57 8D 5A 18 STA $185A [$7E:185A] $A0AB5A AD 02 0B LDA $0B02 [$7E:0B02] $A0AB5D 29 03 00 AND #$0003 $A0AB60 0A ASL A $A0AB61 AA TAX $A0AB62 68 PLA $A0AB63 85 12 STA $12 [$7E:0012] $A0AB65 9D 34 18 STA $1834,x[$7E:1836] $A0AB68 64 14 STZ $14 [$7E:0014] $A0AB6A AD A6 18 LDA $18A6 [$7E:18A6] $A0AB6D 85 16 STA $16 [$7E:0016] $A0AB6F AD A6 18 LDA $18A6 [$7E:18A6] $A0AB72 9D 2C 18 STA $182C,x[$7E:182E] $A0AB75 A9 FF FF LDA #$FFFF $A0AB78 AB PLB $A0AB79 28 PLP $A0AB7A 6B RTL } ;;; ;;; { $A0AB7B A9 00 00 LDA #$0000 $A0AB7E AB PLB $A0AB7F 28 PLP $A0AB80 6B RTL } ;;; ;;; { $A0AB81 4C BF AA JMP $AABF [$A0:AABF] } ;;; ;;; { $A0AB84 48 PHA $A0AB85 AE A6 18 LDX $18A6 [$7E:18A6] $A0AB88 AD F6 0A LDA $0AF6 [$7E:0AF6] $A0AB8B 8D 4A 18 STA $184A [$7E:184A] $A0AB8E AD F8 0A LDA $0AF8 [$7E:0AF8] $A0AB91 8D 4C 18 STA $184C [$7E:184C] $A0AB94 BD 7A 0F LDA $0F7A,x $A0AB97 8D 4E 18 STA $184E [$7E:184E] $A0AB9A BD 7C 0F LDA $0F7C,x $A0AB9D 8D 50 18 STA $1850 [$7E:1850] $A0ABA0 A5 12 LDA $12 [$7E:0012] $A0ABA2 8D 52 18 STA $1852 [$7E:1852] $A0ABA5 A5 14 LDA $14 [$7E:0014] $A0ABA7 8D 54 18 STA $1854 [$7E:1854] $A0ABAA AD FA 0A LDA $0AFA [$7E:0AFA] $A0ABAD 8D 56 18 STA $1856 [$7E:1856] $A0ABB0 AD FC 0A LDA $0AFC [$7E:0AFC] $A0ABB3 8D 58 18 STA $1858 [$7E:1858] $A0ABB6 A9 03 00 LDA #$0003 $A0ABB9 8D 5A 18 STA $185A [$7E:185A] $A0ABBC AD 02 0B LDA $0B02 [$7E:0B02] $A0ABBF 29 03 00 AND #$0003 $A0ABC2 0A ASL A $A0ABC3 AA TAX $A0ABC4 68 PLA $A0ABC5 49 FF FF EOR #$FFFF $A0ABC8 1A INC A $A0ABC9 85 12 STA $12 [$7E:0012] $A0ABCB 9D 34 18 STA $1834,x $A0ABCE 64 14 STZ $14 [$7E:0014] $A0ABD0 AD A6 18 LDA $18A6 [$7E:18A6] $A0ABD3 85 16 STA $16 [$7E:0016] $A0ABD5 AD A6 18 LDA $18A6 [$7E:18A6] $A0ABD8 9D 2C 18 STA $182C,x $A0ABDB A9 FF FF LDA #$FFFF $A0ABDE AB PLB $A0ABDF 28 PLP $A0ABE0 6B RTL } ;;; ;;; { $A0ABE1 A9 00 00 LDA #$0000 $A0ABE4 AB PLB $A0ABE5 28 PLP $A0ABE6 6B RTL } ;;; Check if Samus is touching an enemy ;;; { ; X = Enemy index ; Returns A=0000 if not touching the enemy, A=-0001h if touching the enemy $A0ABE7 AD F6 0A LDA $0AF6 [$7E:0AF6] ;\ $A0ABEA 38 SEC ;| $A0ABEB FD 7A 0F SBC $0F7A,x[$7E:0F7A] ;| $A0ABEE 10 04 BPL $04 [$ABF4] ;} X distance from enemy $A0ABF0 49 FF FF EOR #$FFFF ;| $A0ABF3 1A INC A ;/ $A0ABF4 38 SEC ;\ $A0ABF5 ED FE 0A SBC $0AFE [$7E:0AFE] ;| $A0ABF8 90 09 BCC $09 [$AC03] ;} If X distance from enemy > both X-radius and enemy X-radius: $A0ABFA DD 82 0F CMP $0F82,x[$7E:0F82] ;| $A0ABFD 90 04 BCC $04 [$AC03] ;/ $A0ABFF A9 00 00 LDA #$0000 ;\ $A0AC02 6B RTL ;} Return A=0000 $A0AC03 AD FA 0A LDA $0AFA [$7E:0AFA] ;\ $A0AC06 18 CLC ;| $A0AC07 69 03 00 ADC #$0003 ;| $A0AC0A 38 SEC ;} If Y position+3 > enemy Y position: Return A=0000 $A0AC0B FD 7E 0F SBC $0F7E,x[$7E:0F7E] ;| $A0AC0E 10 11 BPL $11 [$AC21] ;/ $A0AC10 49 FF FF EOR #$FFFF ;\ $A0AC13 1A INC A ;} Y distance above enemy - 3 $A0AC14 38 SEC ;\ $A0AC15 ED 00 0B SBC $0B00 [$7E:0B00] ;| $A0AC18 90 0B BCC $0B [$AC25] ;| $A0AC1A DD 84 0F CMP $0F84,x[$7E:0F84] ;} If Y distance above enemy > both Y-radius and enemy Y-radius: $A0AC1D F0 06 BEQ $06 [$AC25] ;| ~sigh~ $A0AC1F 90 04 BCC $04 [$AC25] ;/ $A0AC21 A9 00 00 LDA #$0000 ;\ $A0AC24 6B RTL ;} Return A=0000 $A0AC25 A9 FF FF LDA #$FFFF ;\ $A0AC28 6B RTL ;} Else return A=-0001h } ;;; ;;; { $A0AC29 AD F6 0A LDA $0AF6 [$7E:0AF6] $A0AC2C 38 SEC $A0AC2D FD 7A 0F SBC $0F7A,x $A0AC30 10 04 BPL $04 [$AC36] $A0AC32 49 FF FF EOR #$FFFF $A0AC35 1A INC A $A0AC36 38 SEC $A0AC37 ED FE 0A SBC $0AFE [$7E:0AFE] $A0AC3A 90 09 BCC $09 [$AC45] $A0AC3C DD 82 0F CMP $0F82,x $A0AC3F 90 04 BCC $04 [$AC45] $A0AC41 A9 00 00 LDA #$0000 $A0AC44 6B RTL $A0AC45 AD FA 0A LDA $0AFA [$7E:0AFA] $A0AC48 38 SEC $A0AC49 FD 7E 0F SBC $0F7E,x $A0AC4C 10 11 BPL $11 [$AC5F] $A0AC4E 49 FF FF EOR #$FFFF $A0AC51 1A INC A $A0AC52 38 SEC $A0AC53 ED 00 0B SBC $0B00 [$7E:0B00] $A0AC56 90 0B BCC $0B [$AC63] $A0AC58 DD 84 0F CMP $0F84,x $A0AC5B F0 06 BEQ $06 [$AC63] $A0AC5D 90 04 BCC $04 [$AC63] $A0AC5F A9 00 00 LDA #$0000 $A0AC62 6B RTL $A0AC63 A9 FF FF LDA #$FFFF $A0AC66 6B RTL } ;;; ;;; { $A0AC67 AD F6 0A LDA $0AF6 [$7E:0AF6] $A0AC6A 38 SEC $A0AC6B FD 7A 0F SBC $0F7A,x $A0AC6E 10 04 BPL $04 [$AC74] $A0AC70 49 FF FF EOR #$FFFF $A0AC73 1A INC A $A0AC74 38 SEC $A0AC75 ED FE 0A SBC $0AFE [$7E:0AFE] $A0AC78 90 0E BCC $0E [$AC88] $A0AC7A DD 82 0F CMP $0F82,x $A0AC7D 90 09 BCC $09 [$AC88] $A0AC7F C9 08 00 CMP #$0008 $A0AC82 90 04 BCC $04 [$AC88] $A0AC84 A9 00 00 LDA #$0000 $A0AC87 6B RTL $A0AC88 AD FA 0A LDA $0AFA [$7E:0AFA] $A0AC8B 38 SEC $A0AC8C FD 7E 0F SBC $0F7E,x $A0AC8F 10 04 BPL $04 [$AC95] $A0AC91 49 FF FF EOR #$FFFF $A0AC94 1A INC A $A0AC95 38 SEC $A0AC96 ED 00 0B SBC $0B00 [$7E:0B00] $A0AC99 90 09 BCC $09 [$ACA4] $A0AC9B DD 84 0F CMP $0F84,x $A0AC9E 90 04 BCC $04 [$ACA4] $A0ACA0 A9 00 00 LDA #$0000 $A0ACA3 6B RTL $A0ACA4 A9 FF FF LDA #$FFFF $A0ACA7 6B RTL } ;;; ;;; { $A0ACA8 DA PHX $A0ACA9 5A PHY $A0ACAA AD 36 0E LDA $0E36 [$7E:0E36] $A0ACAD 38 SEC $A0ACAE ED 32 0E SBC $0E32 [$7E:0E32] $A0ACB1 8D 3C 0E STA $0E3C [$7E:0E3C] $A0ACB4 10 04 BPL $04 [$ACBA] $A0ACB6 49 FF FF EOR #$FFFF $A0ACB9 1A INC A $A0ACBA C9 FF 00 CMP #$00FF $A0ACBD 10 70 BPL $70 [$AD2F] $A0ACBF 85 12 STA $12 [$7E:0012] $A0ACC1 8D 20 0E STA $0E20 [$7E:0E20] $A0ACC4 AD 38 0E LDA $0E38 [$7E:0E38] $A0ACC7 38 SEC $A0ACC8 ED 34 0E SBC $0E34 [$7E:0E34] $A0ACCB 8D 3E 0E STA $0E3E [$7E:0E3E] $A0ACCE 10 04 BPL $04 [$ACD4] $A0ACD0 49 FF FF EOR #$FFFF $A0ACD3 1A INC A $A0ACD4 C9 FF 00 CMP #$00FF $A0ACD7 10 56 BPL $56 [$AD2F] $A0ACD9 85 14 STA $14 [$7E:0014] $A0ACDB 8D 22 0E STA $0E22 [$7E:0E22] $A0ACDE 22 AE C0 A0 JSL $A0C0AE[$A0:C0AE] $A0ACE2 8D 24 0E STA $0E24 [$7E:0E24] $A0ACE5 AD 20 0E LDA $0E20 [$7E:0E20] $A0ACE8 8D 32 0E STA $0E32 [$7E:0E32] $A0ACEB AD 24 0E LDA $0E24 [$7E:0E24] $A0ACEE 22 C6 B0 A0 JSL $A0B0C6[$A0:B0C6] $A0ACF2 89 00 80 BIT #$8000 $A0ACF5 F0 04 BEQ $04 [$ACFB] $A0ACF7 49 FF FF EOR #$FFFF $A0ACFA 1A INC A $A0ACFB 8D 26 0E STA $0E26 [$7E:0E26] $A0ACFE AD 22 0E LDA $0E22 [$7E:0E22] $A0AD01 8D 32 0E STA $0E32 [$7E:0E32] $A0AD04 AD 24 0E LDA $0E24 [$7E:0E24] $A0AD07 22 B2 B0 A0 JSL $A0B0B2[$A0:B0B2] $A0AD0B 89 00 80 BIT #$8000 $A0AD0E F0 04 BEQ $04 [$AD14] $A0AD10 49 FF FF EOR #$FFFF $A0AD13 1A INC A $A0AD14 18 CLC $A0AD15 6D 26 0E ADC $0E26 [$7E:0E26] $A0AD18 48 PHA $A0AD19 AD 3C 0E LDA $0E3C [$7E:0E3C] $A0AD1C 85 12 STA $12 [$7E:0012] $A0AD1E AD 3E 0E LDA $0E3E [$7E:0E3E] $A0AD21 85 14 STA $14 [$7E:0014] $A0AD23 22 AE C0 A0 JSL $A0C0AE[$A0:C0AE] $A0AD27 8D 3A 0E STA $0E3A [$7E:0E3A] $A0AD2A 68 PLA $A0AD2B 7A PLY $A0AD2C FA PLX $A0AD2D 18 CLC $A0AD2E 6B RTL $A0AD2F ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; } ;;; Determines if enemy is on screen or not ;;; { $A0AD70 AE 54 0E LDX $0E54 [$7E:0E54] $A0AD73 BD 7A 0F LDA $0F7A,x[$7E:107A] $A0AD76 CD 11 09 CMP $0911 [$7E:0911] $A0AD79 30 24 BMI $24 [$AD9F] $A0AD7B AD 11 09 LDA $0911 [$7E:0911] $A0AD7E 18 CLC $A0AD7F 69 00 01 ADC #$0100 $A0AD82 DD 7A 0F CMP $0F7A,x[$7E:107A] $A0AD85 30 18 BMI $18 [$AD9F] $A0AD87 BD 7E 0F LDA $0F7E,x[$7E:107E] $A0AD8A CD 15 09 CMP $0915 [$7E:0915] $A0AD8D 30 10 BMI $10 [$AD9F] $A0AD8F AD 15 09 LDA $0915 [$7E:0915] $A0AD92 18 CLC $A0AD93 69 00 01 ADC #$0100 $A0AD96 DD 7E 0F CMP $0F7E,x[$7E:107E] $A0AD99 30 04 BMI $04 [$AD9F] $A0AD9B A9 00 00 LDA #$0000 $A0AD9E 6B RTL $A0AD9F A9 01 00 LDA #$0001 $A0ADA2 6B RTL } ;;; ;;; { $A0ADA3 DA PHX $A0ADA4 85 12 STA $12 [$7E:0012] $A0ADA6 AE 54 0E LDX $0E54 [$7E:0E54] $A0ADA9 BD 7A 0F LDA $0F7A,x[$7E:0FFA] $A0ADAC 18 CLC $A0ADAD 65 12 ADC $12 [$7E:0012] $A0ADAF CD 11 09 CMP $0911 [$7E:0911] $A0ADB2 30 2E BMI $2E [$ADE2] $A0ADB4 AD 11 09 LDA $0911 [$7E:0911] $A0ADB7 18 CLC $A0ADB8 69 00 01 ADC #$0100 $A0ADBB 18 CLC $A0ADBC 65 12 ADC $12 [$7E:0012] $A0ADBE DD 7A 0F CMP $0F7A,x[$7E:0FFA] $A0ADC1 30 1F BMI $1F [$ADE2] $A0ADC3 BD 7E 0F LDA $0F7E,x[$7E:0FFE] $A0ADC6 18 CLC $A0ADC7 65 12 ADC $12 [$7E:0012] $A0ADC9 CD 15 09 CMP $0915 [$7E:0915] $A0ADCC 30 14 BMI $14 [$ADE2] $A0ADCE AD 15 09 LDA $0915 [$7E:0915] $A0ADD1 18 CLC $A0ADD2 69 00 01 ADC #$0100 $A0ADD5 18 CLC $A0ADD6 65 12 ADC $12 [$7E:0012] $A0ADD8 DD 7E 0F CMP $0F7E,x[$7E:0FFE] $A0ADDB 30 05 BMI $05 [$ADE2] $A0ADDD FA PLX $A0ADDE A9 00 00 LDA #$0000 $A0ADE1 6B RTL $A0ADE2 FA PLX $A0ADE3 A9 01 00 LDA #$0001 $A0ADE6 6B RTL } ;;; Determines if enemies with normal sprites are off screen ;;; { ; I guess. 1 at a time $A0ADE7 DA PHX $A0ADE8 AE 54 0E LDX $0E54 [$7E:0E54] $A0ADEB BD 7A 0F LDA $0F7A,x[$7E:0F7A] $A0ADEE 18 CLC $A0ADEF 7D 82 0F ADC $0F82,x[$7E:0F82] $A0ADF2 CD 11 09 CMP $0911 [$7E:0911] $A0ADF5 30 2D BMI $2D [$AE24] $A0ADF7 AD 11 09 LDA $0911 [$7E:0911] $A0ADFA 18 CLC $A0ADFB 69 00 01 ADC #$0100 $A0ADFE 18 CLC $A0ADFF 7D 82 0F ADC $0F82,x[$7E:0F82] $A0AE02 DD 7A 0F CMP $0F7A,x[$7E:0F7A] $A0AE05 30 1D BMI $1D [$AE24] $A0AE07 BD 7E 0F LDA $0F7E,x[$7E:0F7E] $A0AE0A 18 CLC $A0AE0B 69 08 00 ADC #$0008 $A0AE0E CD 15 09 CMP $0915 [$7E:0915] $A0AE11 30 11 BMI $11 [$AE24] $A0AE13 AD 15 09 LDA $0915 [$7E:0915] $A0AE16 18 CLC $A0AE17 69 F8 00 ADC #$00F8 $A0AE1A DD 7E 0F CMP $0F7E,x[$7E:0F7E] $A0AE1D 30 05 BMI $05 [$AE24] $A0AE1F FA PLX $A0AE20 A9 00 00 LDA #$0000 $A0AE23 6B RTL $A0AE24 FA PLX $A0AE25 A9 01 00 LDA #$0001 $A0AE28 6B RTL } ;;; ;;; { $A0AE29 AE 54 0E LDX $0E54 [$7E:0E54] $A0AE2C A9 20 00 LDA #$0020 $A0AE2F 22 ED AE A0 JSL $A0AEED[$A0:AEED] $A0AE33 F0 0E BEQ $0E [$AE43] $A0AE35 A0 02 00 LDY #$0002 $A0AE38 22 E5 AE A0 JSL $A0AEE5[$A0:AEE5] $A0AE3C 10 03 BPL $03 [$AE41] $A0AE3E A0 07 00 LDY #$0007 $A0AE41 98 TYA $A0AE42 6B RTL $A0AE43 A9 20 00 LDA #$0020 $A0AE46 22 0B AF A0 JSL $A0AF0B[$A0:AF0B] $A0AE4A F0 0E BEQ $0E [$AE5A] $A0AE4C A0 04 00 LDY #$0004 $A0AE4F 22 DD AE A0 JSL $A0AEDD[$A0:AEDD] $A0AE53 10 03 BPL $03 [$AE58] $A0AE58 98 TYA $A0AE59 6B RTL $A0AE5A 22 E5 AE A0 JSL $A0AEE5[$A0:AEE5] $A0AE5E 30 0E BMI $0E [$AE6E] $A0AE60 A0 03 00 LDY #$0003 $A0AE63 22 DD AE A0 JSL $A0AEDD[$A0:AEDD] $A0AE67 10 03 BPL $03 [$AE6C] $A0AE69 A0 01 00 LDY #$0001 $A0AE6C 98 TYA $A0AE6D 6B RTL $A0AE6E A0 06 00 LDY #$0006 $A0AE71 22 DD AE A0 JSL $A0AEDD[$A0:AEDD] $A0AE75 10 03 BPL $03 [$AE7A] $A0AE7A 98 TYA $A0AE7B 6B RTL } ;;; ;;; { $A0AE7C AE 54 0E LDX $0E54 [$7E:0E54] $A0AE7F BD 78 0F LDA $0F78,x $A0AE82 AA TAX $A0AE83 BF 2A 00 A0 LDA $A0002A,x $A0AE87 8D 20 0E STA $0E20 [$7E:0E20] $A0AE8A AE 54 0E LDX $0E54 [$7E:0E54] $A0AE8D BD 92 0F LDA $0F92,x $A0AE90 0A ASL A $A0AE91 18 CLC $A0AE92 6D 20 0E ADC $0E20 [$7E:0E20] $A0AE95 A8 TAY $A0AE96 BE 00 00 LDX $0000,y $A0AE99 9B TXY $A0AE9A AE 54 0E LDX $0E54 [$7E:0E54] $A0AE9D BD 94 0F LDA $0F94,x $A0AEA0 F0 0C BEQ $0C [$AEAE] $A0AEA2 C9 01 00 CMP #$0001 $A0AEA5 F0 07 BEQ $07 [$AEAE] $A0AEA7 DE 94 0F DEC $0F94,x $A0AEAA A9 00 00 LDA #$0000 $A0AEAD 6B RTL $A0AEAE 84 00 STY $00 [$7E:0000] $A0AEB0 BC 90 0F LDY $0F90,x $A0AEB3 B1 00 LDA ($00),y $A0AEB5 C9 FF FF CMP #$FFFF $A0AEB8 F0 1F BEQ $1F [$AED9] $A0AEBA C9 FE FF CMP #$FFFE $A0AEBD D0 06 BNE $06 [$AEC5] $A0AEBF A0 00 00 LDY #$0000 $A0AEC2 4C B3 AE JMP $AEB3 [$A0:AEB3] $A0AEC5 9D 8E 0F STA $0F8E,x $A0AEC8 C8 INY $A0AEC9 C8 INY $A0AECA B1 00 LDA ($00),y $A0AECC 9D 94 0F STA $0F94,x $A0AECF C8 INY $A0AED0 C8 INY $A0AED1 98 TYA $A0AED2 9D 90 0F STA $0F90,x $A0AED5 A9 00 00 LDA #$0000 $A0AED8 6B RTL $A0AED9 A9 01 00 LDA #$0001 $A0AEDC 6B RTL } ;;; Samus Y position - enemy Y position ;;; { $A0AEDD AD FA 0A LDA $0AFA [$7E:0AFA] $A0AEE0 38 SEC $A0AEE1 FD 7E 0F SBC $0F7E,x[$7E:10BE] $A0AEE4 6B RTL } ;;; Samus X position - enemy X position ;;; { $A0AEE5 AD F6 0A LDA $0AF6 [$7E:0AF6] $A0AEE8 38 SEC $A0AEE9 FD 7A 0F SBC $0F7A,x[$7E:10BA] $A0AEEC 6B RTL } ;;; ;;; { ; Samus/enemy collision detection (boundary calculations) $A0AEED 8D 20 0E STA $0E20 [$7E:0E20] $A0AEF0 AC FA 0A LDY $0AFA [$7E:0AFA] $A0AEF3 BD 7E 0F LDA $0F7E,x[$7E:0F7E] $A0AEF6 AA TAX $A0AEF7 22 7D B0 A0 JSL $A0B07D[$A0:B07D] $A0AEFB AE 54 0E LDX $0E54 [$7E:0E54] $A0AEFE CD 20 0E CMP $0E20 [$7E:0E20] $A0AF01 10 04 BPL $04 [$AF07] $A0AF03 A9 01 00 LDA #$0001 $A0AF06 6B RTL $A0AF07 A9 00 00 LDA #$0000 $A0AF0A 6B RTL } ;;; ;;; { ; Checks if enemy is in proximity to Samus $A0AF0B 8D 20 0E STA $0E20 [$7E:0E20] $A0AF0E AC F6 0A LDY $0AF6 [$7E:0AF6] $A0AF11 BD 7A 0F LDA $0F7A,x[$7E:0F7A] $A0AF14 AA TAX $A0AF15 22 7D B0 A0 JSL $A0B07D[$A0:B07D] $A0AF19 AE 54 0E LDX $0E54 [$7E:0E54] $A0AF1C CD 20 0E CMP $0E20 [$7E:0E20] $A0AF1F 10 04 BPL $04 [$AF25] $A0AF21 A9 01 00 LDA #$0001 $A0AF24 6B RTL $A0AF25 A9 00 00 LDA #$0000 $A0AF28 6B RTL } ;;; Enemy X += [$14].[$12] ;;; { ; Unused. Clone of $A0:AF6C $A0AF29 BD 7C 0F LDA $0F7C,x $A0AF2C 18 CLC $A0AF2D 65 12 ADC $12 [$7E:0012] $A0AF2F 9D 7C 0F STA $0F7C,x $A0AF32 BD 7A 0F LDA $0F7A,x $A0AF35 65 14 ADC $14 [$7E:0014] $A0AF37 9D 7A 0F STA $0F7A,x $A0AF3A 6B RTL } ;;; Enemy Y += [$14].[$12] ;;; { ; Unused. Clone of $A0:AF90 $A0AF3B BD 80 0F LDA $0F80,x $A0AF3E 18 CLC $A0AF3F 65 12 ADC $12 [$7E:0012] $A0AF41 9D 80 0F STA $0F80,x $A0AF44 BD 7E 0F LDA $0F7E,x $A0AF47 65 14 ADC $14 [$7E:0014] $A0AF49 9D 7E 0F STA $0F7E,x $A0AF4C 6B RTL } ;;; Move enemy left/right/up/down by [$14].[$12] ;;; { $A0AF4D 0A ASL A $A0AF4E AA TAX $A0AF4F 7C 52 AF JMP ($AF52,x) $A0AF52 dw AF5A, AF6C, AF7E, AF90 } ;;; Enemy X -= [$14].[$12] ;;; { $A0AF5A BD 7C 0F LDA $0F7C,x[$7E:0FBC] $A0AF5D 38 SEC $A0AF5E E5 12 SBC $12 [$7E:0012] $A0AF60 9D 7C 0F STA $0F7C,x[$7E:0FBC] $A0AF63 BD 7A 0F LDA $0F7A,x[$7E:0FBA] $A0AF66 E5 14 SBC $14 [$7E:0014] $A0AF68 9D 7A 0F STA $0F7A,x[$7E:0FBA] $A0AF6B 6B RTL } ;;; Enemy X += [$14].[$12] ;;; { $A0AF6C BD 7C 0F LDA $0F7C,x[$7E:0FBC] $A0AF6F 18 CLC $A0AF70 65 12 ADC $12 [$7E:0012] $A0AF72 9D 7C 0F STA $0F7C,x[$7E:0FBC] $A0AF75 BD 7A 0F LDA $0F7A,x[$7E:0FBA] $A0AF78 65 14 ADC $14 [$7E:0014] $A0AF7A 9D 7A 0F STA $0F7A,x[$7E:0FBA] $A0AF7D 6B RTL } ;;; Enemy Y -= [$14].[$12] ;;; { $A0AF7E BD 80 0F LDA $0F80,x[$7E:12C0] $A0AF81 38 SEC $A0AF82 E5 12 SBC $12 [$7E:0012] $A0AF84 9D 80 0F STA $0F80,x[$7E:12C0] $A0AF87 BD 7E 0F LDA $0F7E,x[$7E:12BE] $A0AF8A E5 14 SBC $14 [$7E:0014] $A0AF8C 9D 7E 0F STA $0F7E,x[$7E:12BE] $A0AF8F 6B RTL } ;;; Enemy Y += [$14].[$12] ;;; { $A0AF90 BD 80 0F LDA $0F80,x[$7E:1240] $A0AF93 18 CLC $A0AF94 65 12 ADC $12 [$7E:0012] $A0AF96 9D 80 0F STA $0F80,x[$7E:1240] $A0AF99 BD 7E 0F LDA $0F7E,x[$7E:123E] $A0AF9C 65 14 ADC $14 [$7E:0014] $A0AF9E 9D 7E 0F STA $0F7E,x[$7E:123E] $A0AFA1 6B RTL } ;;; Samus X -= [$14].[$12] ;;; { $A0AFA2 AD F8 0A LDA $0AF8 [$7E:0AF8] $A0AFA5 38 SEC $A0AFA6 E5 12 SBC $12 [$7E:0012] $A0AFA8 8D 56 0B STA $0B56 [$7E:0B56] $A0AFAB AD F6 0A LDA $0AF6 [$7E:0AF6] $A0AFAE E5 14 SBC $14 [$7E:0014] $A0AFB0 8D 58 0B STA $0B58 [$7E:0B58] $A0AFB3 6B RTL } ;;; Samus X += [$14].[$12] ;;; { $A0AFB4 AD F8 0A LDA $0AF8 [$7E:0AF8] $A0AFB7 18 CLC $A0AFB8 65 12 ADC $12 [$7E:0012] $A0AFBA 8D 56 0B STA $0B56 [$7E:0B56] $A0AFBD AD F6 0A LDA $0AF6 [$7E:0AF6] $A0AFC0 65 14 ADC $14 [$7E:0014] $A0AFC2 8D 58 0B STA $0B58 [$7E:0B58] $A0AFC5 6B RTL } ;;; Samus Y -= [$14].[$12] ;;; { $A0AFC6 AD FC 0A LDA $0AFC [$7E:0AFC] $A0AFC9 38 SEC $A0AFCA E5 12 SBC $12 [$7E:0012] $A0AFCC 8D 5A 0B STA $0B5A [$7E:0B5A] $A0AFCF AD FA 0A LDA $0AFA [$7E:0AFA] $A0AFD2 E5 14 SBC $14 [$7E:0014] $A0AFD4 8D 5C 0B STA $0B5C [$7E:0B5C] $A0AFD7 6B RTL } ;;; Samus Y += [$14].[$12] ;;; { $A0AFD8 AD FC 0A LDA $0AFC [$7E:0AFC] $A0AFDB 18 CLC $A0AFDC 65 12 ADC $12 [$7E:0012] $A0AFDE 8D 5A 0B STA $0B5A [$7E:0B5A] $A0AFE1 AD FA 0A LDA $0AFA [$7E:0AFA] $A0AFE4 65 14 ADC $14 [$7E:0014] $A0AFE6 8D 5C 0B STA $0B5C [$7E:0B5C] $A0AFE9 6B RTL } ;;; Sign extend A ;;; { $A0AFEA 8D 32 0E STA $0E32 [$7E:0E32] $A0AFED 29 80 00 AND #$0080 $A0AFF0 F0 07 BEQ $07 [$AFF9] $A0AFF2 AD 32 0E LDA $0E32 [$7E:0E32] $A0AFF5 09 00 FF ORA #$FF00 $A0AFF8 6B RTL $A0AFF9 AD 32 0E LDA $0E32 [$7E:0E32] $A0AFFC 6B RTL } ;;; A *= 16 ;;; { $A0AFFD 0A ASL A $A0AFFE 0A ASL A $A0AFFF 0A ASL A $A0B000 0A ASL A $A0B001 6B RTL } ;;; A *= 32 ;;; { $A0B002 0A ASL A $A0B003 0A ASL A $A0B004 0A ASL A $A0B005 0A ASL A $A0B006 0A ASL A $A0B007 6B RTL } ;;; A *= 48 ;;; { $A0B008 0A ASL A $A0B009 0A ASL A $A0B00A 0A ASL A $A0B00B 0A ASL A $A0B00C 8D 32 0E STA $0E32 [$7E:0E32] $A0B00F 18 CLC $A0B010 6D 32 0E ADC $0E32 [$7E:0E32] $A0B013 18 CLC $A0B014 6D 32 0E ADC $0E32 [$7E:0E32] $A0B017 6B RTL } ;;; A *= 64 ;;; { $A0B018 0A ASL A $A0B019 0A ASL A $A0B01A 0A ASL A $A0B01B 0A ASL A $A0B01C 0A ASL A $A0B01D 0A ASL A $A0B01E 6B RTL } ;;; A = xxyz -> A = xxzy ;;; { $A0B01F 48 PHA $A0B020 29 00 FF AND #$FF00 $A0B023 8D 34 0E STA $0E34 [$7E:0E34] $A0B026 68 PLA $A0B027 29 FF 00 AND #$00FF $A0B02A 8D 32 0E STA $0E32 [$7E:0E32] $A0B02D E2 20 SEP #$20 $A0B02F EB XBA $A0B030 C2 20 REP #$20 $A0B032 0D 32 0E ORA $0E32 [$7E:0E32] $A0B035 4A LSR A $A0B036 4A LSR A $A0B037 4A LSR A $A0B038 4A LSR A $A0B039 29 FF 00 AND #$00FF $A0B03C 0D 34 0E ORA $0E34 [$7E:0E34] $A0B03F 6B RTL } ;;; A = xyzz -> A = yxzz ;;; { $A0B040 48 PHA $A0B041 29 FF 00 AND #$00FF $A0B044 8D 34 0E STA $0E34 [$7E:0E34] $A0B047 68 PLA $A0B048 29 00 FF AND #$FF00 $A0B04B 8D 32 0E STA $0E32 [$7E:0E32] $A0B04E E2 20 SEP #$20 $A0B050 EB XBA $A0B051 C2 20 REP #$20 $A0B053 0D 32 0E ORA $0E32 [$7E:0E32] $A0B056 0A ASL A $A0B057 0A ASL A $A0B058 0A ASL A $A0B059 0A ASL A $A0B05A 29 00 FF AND #$FF00 $A0B05D 0D 34 0E ORA $0E34 [$7E:0E34] $A0B060 6B RTL } ;;; A = xxyy -> A = yyxx ;;; { $A0B061 E2 20 SEP #$20 $A0B063 EB XBA $A0B064 C2 20 REP #$20 $A0B066 6B RTL } ;;; A = |A| ;;; { ; Also into $0E32 $A0B067 8D 32 0E STA $0E32 [$7E:0E32] $A0B06A 29 00 80 AND #$8000 $A0B06D F0 0A BEQ $0A [$B079] $A0B06F AD 32 0E LDA $0E32 [$7E:0E32] $A0B072 49 FF FF EOR #$FFFF $A0B075 1A INC A $A0B076 8D 32 0E STA $0E32 [$7E:0E32] $A0B079 AD 32 0E LDA $0E32 [$7E:0E32] $A0B07C 6B RTL } ;;; A = |Y - X| ;;; { ; Also into $0E34 $A0B07D DA PHX $A0B07E 5A PHY $A0B07F 8A TXA $A0B080 8D 32 0E STA $0E32 [$7E:0E32] $A0B083 98 TYA $A0B084 38 SEC $A0B085 ED 32 0E SBC $0E32 [$7E:0E32] $A0B088 8D 34 0E STA $0E34 [$7E:0E34] $A0B08B 29 00 80 AND #$8000 $A0B08E F0 0A BEQ $0A [$B09A] $A0B090 AD 34 0E LDA $0E34 [$7E:0E34] $A0B093 49 FF FF EOR #$FFFF $A0B096 1A INC A $A0B097 8D 34 0E STA $0E34 [$7E:0E34] $A0B09A AD 34 0E LDA $0E34 [$7E:0E34] $A0B09D 7A PLY $A0B09E FA PLX $A0B09F 6B RTL } ;;; A = -A ;;; { $A0B0A0 49 FF FF EOR #$FFFF $A0B0A3 1A INC A $A0B0A4 6B RTL } ;;; A = sgn(A) ;;; { $A0B0A5 29 00 80 AND #$8000 $A0B0A8 F0 04 BEQ $04 [$B0AE] $A0B0AA A9 FF FF LDA #$FFFF $A0B0AD 6B RTL $A0B0AE A9 01 00 LDA #$0001 $A0B0B1 6B RTL } ;;; 8-bit cosine multiplication ;;; { ; (cos (A * 128/pi) * 0E32) --> 0E36.0E39 $A0B0B2 18 CLC $A0B0B3 69 40 00 ADC #$0040 $A0B0B6 29 FF 00 AND #$00FF $A0B0B9 8D 34 0E STA $0E34 [$7E:0E34] $A0B0BC DA PHX $A0B0BD 5A PHY $A0B0BE 8B PHB $A0B0BF 20 DA B0 JSR $B0DA [$A0:B0DA] $A0B0C2 AB PLB $A0B0C3 7A PLY $A0B0C4 FA PLX $A0B0C5 6B RTL } ;;; 8-bit sine multiplication ;;; { ; (-sin (A * 128/pi) * 0E32) --> 0E36.0E39 ; Called by Wavers $A0B0C6 18 CLC $A0B0C7 69 80 00 ADC #$0080 $A0B0CA 29 FF 00 AND #$00FF $A0B0CD 8D 34 0E STA $0E34 [$7E:0E34] $A0B0D0 DA PHX $A0B0D1 5A PHY $A0B0D2 8B PHB $A0B0D3 20 DA B0 JSR $B0DA [$A0:B0DA] $A0B0D6 AB PLB $A0B0D7 7A PLY $A0B0D8 FA PLX $A0B0D9 6B RTL } ;;; 8-bit trigonometric multiplication ;;; { ; $0E36.$0E39 = sin([$0E34] * 128/pi) * [$0E32] $A0B0DA E2 20 SEP #$20 $A0B0DC A9 A0 LDA #$A0 ;\ $A0B0DE 48 PHA ;} DB = $A0 $A0B0DF AB PLB ;/ $A0B0E0 C2 30 REP #$30 $A0B0E2 AD 34 0E LDA $0E34 [$7E:0E34] ;\ $A0B0E5 29 7F 00 AND #$007F ;| $A0B0E8 A8 TAY ;| $A0B0E9 B9 43 B1 LDA $B143,y[$A0:B18D] ;| $A0B0EC 29 FF 00 AND #$00FF ;| $A0B0EF E2 20 SEP #$20 ;| $A0B0F1 8D 02 42 STA $4202 [$7E:4202] ;| $A0B0F4 AD 32 0E LDA $0E32 [$7E:0E32] ;| $A0B0F7 8D 03 42 STA $4203 [$7E:4203] ;} A = [$B143 + [$0E34]] * [$0E32] $A0B0FA EA NOP ;| $A0B0FB EA NOP ;| $A0B0FC EA NOP ;| $A0B0FD EA NOP ;| $A0B0FE EA NOP ;| $A0B0FF C2 20 REP #$20 ;| $A0B101 AD 16 42 LDA $4216 [$7E:4216] ;/ $A0B104 EB XBA $A0B105 48 PHA $A0B106 29 FF 00 AND #$00FF ;\ $A0B109 8D 36 0E STA $0E36 [$7E:0E36] ;} $0E36 = A / 100h $A0B10C 68 PLA $A0B10D 29 00 FF AND #$FF00 ;\ $A0B110 8D 38 0E STA $0E38 [$7E:0E38] ;} $0E38 = A * 100h $A0B113 AD 34 0E LDA $0E34 [$7E:0E34] ;\ $A0B116 29 80 00 AND #$0080 ;} If [$0E34] is negative: $A0B119 F0 14 BEQ $14 [$B12F] ;/ $A0B11B AD 36 0E LDA $0E36 [$7E:0E36] ;\ $A0B11E 49 FF FF EOR #$FFFF ;| $A0B121 1A INC A ;} Negate $0E36 $A0B122 8D 36 0E STA $0E36 [$7E:0E36] ;/ $A0B125 AD 38 0E LDA $0E38 [$7E:0E38] ;\ $A0B128 49 FF FF EOR #$FFFF ;| $A0B12B 1A INC A ;} Negate $0E38 $A0B12C 8D 38 0E STA $0E38 [$7E:0E38] ;/ $A0B12F AD 36 0E LDA $0E36 [$7E:0E36] ; Return A = [$0E36] $A0B132 60 RTS } ;;; ;;; { $A0B133 dw 0E84, 0EA4, 0EA6, 0EC6, 0EC8, 0EE8, 0F28, 0F48 } ;;; Sine/cosine constants ;;; { ; 8-bit sine $A0B143 db 00, 06, 0C, 12, 19, 1F, 25, 2B, 31, 38, 3E, 44, 4A, 50, 56, 5C, 61, 67, 6D, 73, 78, 7E, 83, 88, 8E, 93, 98, 9D, A2, A7, AB, B0, B5, B9, BD, C1, C5, C9, CD, D1, D4, D8, DB, DE, E1, E4, E7, EA, EC, EE, F1, F3, F4, F6, F8, F9, FB, FC, FD, FE, FE, FF, FF, FF ; 8-bit cosine $A0B183 db FF, FF, FF, FF, FE, FE, FD, FC, FB, F9, F8, F6, F4, F3, F1, EE, EC, EA, E7, E4, E1, DE, DB, D8, D4, D1, CD, C9, C5, C1, BD, B9, B5, B0, AB, A7, A2, 9D, 98, 93, 8E, 88, 83, 7E, 78, 73, 6D, 67, 61, 5C, 56, 50, 4A, 44, 3E, 38, 31, 2B, 25, 1F, 19, 12, 0C, 06 ; 16-bit sine $A0B1C3 dw 0000, 0324, 0647, 096A, 0C8B, 0FAB, 12C7, 15E1, 18F8, 1C0B, 1F19, 2223, 2527, 2826, 2B1F, 2E10, 30FB, 33DE, 36B9, 398C, 3C56, 3F17, 41CD, 447A, 471C, 49B3, 4C3F, 4EBF, 5133, 539A, 55F5, 5842, 5A82, 5CB3, 5ED7, 60EB, 62F1, 64E8, 66CF, 68A6, 6A6D, 6C23, 6DC9, 6F5E, 70E2, 7254, 73B5, 7504, 7641, 776B, 7884, 7989, 7A7C, 7B5C, 7C29, 7CE3, 7D89, 7E1D, 7E9C, 7F09, 7F61, 7FA6, 7FD8, 7FF5 ; 16-bit cosine $A0B243 dw 7FFF, 7FF5, 7FD8, 7FA6, 7F61, 7F09, 7E9C, 7E1D, 7D89, 7CE3, 7C29, 7B5C, 7A7C, 7989, 7884, 776B, 7641, 7504, 73B5, 7254, 70E2, 6F5E, 6DC9, 6C23, 6A6D, 68A6, 66CF, 64E8, 62F1, 60EB, 5ED7, 5CB3, 5A82, 5842, 55F5, 539A, 5133, 4EBF, 4C3F, 49B3, 471C, 447A, 41CD, 3F17, 3C56, 398C, 36B9, 33DE, 30FB, 2E10, 2B1F, 2826, 2527, 2223, 1F19, 1C0B, 18F8, 15E1, 12C7, 0FAB, 0C8B, 096A, 0647, 0324 ; 16-bit negative sine $A0B2C3 dw 0000, FCDC, F9B9, F696, F375, F055, ED39, EA1F, E708, E3F5, E0E7, DDDD, DAD9, D7DA, D4E1, D1F0, CF05, CC22, C947, C674, C3AA, C0E9, BE33, BB86, B8E4, B64D, B3C1, B141, AECD, AC66, AA0B, A7BE, A57E, A34D, A129, 9F15, 9D0F, 9B18, 9931, 975A, 9593, 93DD, 9237, 90A2, 8F1E, 8DAC, 8C4B, 8AFC, 89BF, 8895, 877C, 8677, 8584, 84A4, 83D7, 831D, 8277, 81E3, 8164, 80F7, 809F, 805A, 8028, 800B ; 16-bit negative cosine $A0B343 dw 8001, 800B, 8028, 805A, 809F, 80F7, 8164, 81E3, 8277, 831D, 83D7, 84A4, 8584, 8677, 877C, 8895, 89BF, 8AFC, 8C4B, 8DAC, 8F1E, 90A2, 9237, 93DD, 9593, 975A, 9931, 9B18, 9D0F, 9F15, A129, A34D, A57E, A7BE, AA0B, AC66, AECD, B141, B3C1, B64D, B8E4, BB86, BE33, C0E9, C3AA, C674, C947, CC22, CF05, D1F0, D4E1, D7DA, DAD9, DDDD, E0E7, E3F5, E708, EA1F, ED39, F055, F375, F696, F9B9, FCDC ; 8-bit negative cosine $A0B3C3 dw FF00, FF01, FF01, FF01, FF02, FF02, FF03, FF04, FF05, FF07, FF08, FF0A, FF0C, FF0D, FF0F, FF12, FF14, FF16, FF19, FF1C, FF1F, FF22, FF25, FF28, FF2C, FF2F, FF33, FF37, FF3B, FF3F, FF43, FF47, FF4B, FF50, FF55, FF59, FF5E, FF63, FF68, FF6D, FF72, FF78, FF7D, FF82, FF88, FF8D, FF93, FF99, FF9F, FFA4, FFAA, FFB0, FFB6, FFBC, FFC2, FFC8, FFCF, FFD5, FFDB, FFE1, FFE7, FFEE, FFF4, FFFA ; 8-bit sine, sign-extended $A0B443 dw 0000, 0006, 000C, 0012, 0019, 001F, 0025, 002B, 0031, 0038, 003E, 0044, 004A, 0050, 0056, 005C, 0061, 0067, 006D, 0073, 0078, 007E, 0083, 0088, 008E, 0093, 0098, 009D, 00A2, 00A7, 00AB, 00B0, 00B5, 00B9, 00BD, 00C1, 00C5, 00C9, 00CD, 00D1, 00D4, 00D8, 00DB, 00DE, 00E1, 00E4, 00E7, 00EA, 00EC, 00EE, 00F1, 00F3, 00F4, 00F6, 00F8, 00F9, 00FB, 00FC, 00FD, 00FE, 00FE, 00FF, 00FF, 00FF ; 8-bit cosine, sign-extended $A0B4C3 dw 0100, 00FF, 00FF, 00FF, 00FE, 00FE, 00FD, 00FC, 00FB, 00F9, 00F8, 00F6, 00F4, 00F3, 00F1, 00EE, 00EC, 00EA, 00E7, 00E4, 00E1, 00DE, 00DB, 00D8, 00D4, 00D1, 00CD, 00C9, 00C5, 00C1, 00BD, 00B9, 00B5, 00B0, 00AB, 00A7, 00A2, 009D, 0098, 0093, 008E, 0088, 0083, 007E, 0078, 0073, 006D, 0067, 0061, 005C, 0056, 0050, 004A, 0044, 003E, 0038, 0031, 002B, 0025, 001F, 0019, 0012, 000C, 0006 ; 8-bit negative sine, sign-extended $A0B543 dw 0000, FFFA, FFF4, FFEE, FFE7, FFE1, FFDB, FFD5, FFCF, FFC8, FFC2, FFBC, FFB6, FFB0, FFAA, FFA4, FF9F, FF99, FF93, FF8D, FF88, FF82, FF7D, FF78, FF72, FF6D, FF68, FF63, FF5E, FF59, FF55, FF50, FF4B, FF47, FF43, FF3F, FF3B, FF37, FF33, FF2F, FF2C, FF28, FF25, FF22, FF1F, FF1C, FF19, FF16, FF14, FF12, FF0F, FF0D, FF0C, FF0A, FF08, FF07, FF05, FF04, FF03, FF02, FF02, FF01, FF01, FF01 ; 8-bit negative cosine, sign-extended $A0B5C3 dw FF00, FF01, FF01, FF01, FF02, FF02, FF03, FF04, FF05, FF07, FF08, FF0A, FF0C, FF0D, FF0F, FF12, FF14, FF16, FF19, FF1C, FF1F, FF22, FF25, FF28, FF2C, FF2F, FF33, FF37, FF3B, FF3F, FF43, FF47, FF4B, FF50, FF55, FF59, FF5E, FF63, FF68, FF6D, FF72, FF78, FF7D, FF82, FF88, FF8D, FF93, FF99, FF9F, FFA4, FFAA, FFB0, FFB6, FFBC, FFC2, FFC8, FFCF, FFD5, FFDB, FFE1, FFE7, FFEE, FFF4, FFFA } ;;; ;;; { $A0B643 8B PHB $A0B644 DA PHX $A0B645 F4 00 A0 PEA $A000 $A0B648 AB PLB $A0B649 AB PLB $A0B64A C2 30 REP #$30 $A0B64C A5 12 LDA $12 [$7E:0012] $A0B64E 18 CLC $A0B64F 69 80 00 ADC #$0080 $A0B652 29 7F 00 AND #$007F $A0B655 0A ASL A $A0B656 AA TAX $A0B657 BF EE B7 A0 LDA $A0B7EE,x[$A0:B842] $A0B65B 85 26 STA $26 [$7E:0026] $A0B65D A5 14 LDA $14 [$7E:0014] $A0B65F 85 28 STA $28 [$7E:0028] $A0B661 22 FF B6 A0 JSL $A0B6FF[$A0:B6FF] $A0B665 A5 2C LDA $2C [$7E:002C] $A0B667 85 1A STA $1A [$7E:001A] $A0B669 A5 2A LDA $2A [$7E:002A] $A0B66B 85 1C STA $1C [$7E:001C] $A0B66D A5 12 LDA $12 [$7E:0012] $A0B66F 18 CLC $A0B670 69 40 00 ADC #$0040 $A0B673 29 7F 00 AND #$007F $A0B676 0A ASL A $A0B677 AA TAX $A0B678 BF EE B7 A0 LDA $A0B7EE,x[$A0:B8C2] $A0B67C 85 26 STA $26 [$7E:0026] $A0B67E A5 14 LDA $14 [$7E:0014] $A0B680 85 28 STA $28 [$7E:0028] $A0B682 22 FF B6 A0 JSL $A0B6FF[$A0:B6FF] $A0B686 A5 2C LDA $2C [$7E:002C] $A0B688 85 16 STA $16 [$7E:0016] $A0B68A A5 2A LDA $2A [$7E:002A] $A0B68C 85 18 STA $18 [$7E:0018] $A0B68E FA PLX $A0B68F AB PLB $A0B690 6B RTL } ;;; { $A0B691 DA PHX $A0B692 AE 54 0E LDX $0E54 [$7E:0E54] $A0B695 AD 20 0E LDA $0E20 [$7E:0E20] $A0B698 18 CLC $A0B699 69 40 00 ADC #$0040 $A0B69C 89 80 00 BIT #$0080 $A0B69F D0 15 BNE $15 [$B6B6] $A0B6A1 BD 7C 0F LDA $0F7C,x[$7E:0FFC] $A0B6A4 18 CLC $A0B6A5 6D 26 0E ADC $0E26 [$7E:0E26] $A0B6A8 9D 7C 0F STA $0F7C,x[$7E:0FFC] $A0B6AB BD 7A 0F LDA $0F7A,x[$7E:0FFA] $A0B6AE 6D 24 0E ADC $0E24 [$7E:0E24] $A0B6B1 9D 7A 0F STA $0F7A,x[$7E:0FFA] $A0B6B4 80 13 BRA $13 [$B6C9] $A0B6B6 BD 7C 0F LDA $0F7C,x[$7E:0F7C] $A0B6B9 38 SEC $A0B6BA ED 26 0E SBC $0E26 [$7E:0E26] $A0B6BD 9D 7C 0F STA $0F7C,x[$7E:0F7C] $A0B6C0 BD 7A 0F LDA $0F7A,x[$7E:0F7A] $A0B6C3 ED 24 0E SBC $0E24 [$7E:0E24] $A0B6C6 9D 7A 0F STA $0F7A,x[$7E:0F7A] $A0B6C9 AD 20 0E LDA $0E20 [$7E:0E20] $A0B6CC 18 CLC $A0B6CD 69 80 00 ADC #$0080 $A0B6D0 89 80 00 BIT #$0080 $A0B6D3 D0 15 BNE $15 [$B6EA] $A0B6D5 BD 80 0F LDA $0F80,x[$7E:0F80] $A0B6D8 18 CLC $A0B6D9 6D 2A 0E ADC $0E2A [$7E:0E2A] $A0B6DC 9D 80 0F STA $0F80,x[$7E:0F80] $A0B6DF BD 7E 0F LDA $0F7E,x[$7E:0F7E] $A0B6E2 6D 28 0E ADC $0E28 [$7E:0E28] $A0B6E5 9D 7E 0F STA $0F7E,x[$7E:0F7E] $A0B6E8 80 13 BRA $13 [$B6FD] $A0B6EA BD 80 0F LDA $0F80,x[$7E:1040] $A0B6ED 38 SEC $A0B6EE ED 2A 0E SBC $0E2A [$7E:0E2A] $A0B6F1 9D 80 0F STA $0F80,x[$7E:1040] $A0B6F4 BD 7E 0F LDA $0F7E,x[$7E:103E] $A0B6F7 ED 28 0E SBC $0E28 [$7E:0E28] $A0B6FA 9D 7E 0F STA $0F7E,x[$7E:103E] $A0B6FD FA PLX $A0B6FE 6B RTL } ;;; 16bit ($26) * 16bit ($28) = 32bit ($2A) ;;; { $A0B6FF DA PHX $A0B700 5A PHY $A0B701 08 PHP $A0B702 C2 20 REP #$20 $A0B704 E2 10 SEP #$10 $A0B706 A6 26 LDX $26 [$7E:0026] $A0B708 8E 02 42 STX $4202 [$7E:4202] $A0B70B A6 28 LDX $28 [$7E:0028] $A0B70D 8E 03 42 STX $4203 [$7E:4203] $A0B710 EA NOP $A0B711 EA NOP $A0B712 EA NOP $A0B713 AD 16 42 LDA $4216 [$7E:4216] $A0B716 85 2A STA $2A [$7E:002A] $A0B718 A6 27 LDX $27 [$7E:0027] $A0B71A 8E 02 42 STX $4202 [$7E:4202] $A0B71D A6 29 LDX $29 [$7E:0029] $A0B71F 8E 03 42 STX $4203 [$7E:4203] $A0B722 EA NOP $A0B723 EA NOP $A0B724 EA NOP $A0B725 AE 16 42 LDX $4216 [$7E:4216] $A0B728 86 2C STX $2C [$7E:002C] $A0B72A AC 17 42 LDY $4217 [$7E:4217] $A0B72D A6 27 LDX $27 [$7E:0027] $A0B72F 8E 02 42 STX $4202 [$7E:4202] $A0B732 A6 28 LDX $28 [$7E:0028] $A0B734 8E 03 42 STX $4203 [$7E:4203] $A0B737 EA NOP $A0B738 EA NOP $A0B739 A5 2B LDA $2B [$7E:002B] $A0B73B 18 CLC $A0B73C 6D 16 42 ADC $4216 [$7E:4216] $A0B73F 85 2B STA $2B [$7E:002B] $A0B741 90 01 BCC $01 [$B744] $A0B743 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A0B744 A6 26 LDX $26 [$7E:0026] $A0B746 8E 02 42 STX $4202 [$7E:4202] $A0B749 A6 29 LDX $29 [$7E:0029] $A0B74B 8E 03 42 STX $4203 [$7E:4203] $A0B74E EA NOP $A0B74F EA NOP $A0B750 A5 2B LDA $2B [$7E:002B] $A0B752 18 CLC $A0B753 6D 16 42 ADC $4216 [$7E:4216] $A0B756 85 2B STA $2B [$7E:002B] $A0B758 90 01 BCC $01 [$B75B] $A0B75A ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A0B75B 84 2D STY $2D [$7E:002D] $A0B75D 28 PLP $A0B75E 7A PLY $A0B75F FA PLX $A0B760 6B RTL } ;;; ;;; { $A0B761 08 PHP $A0B762 8B PHB $A0B763 4B PHK $A0B764 AB PLB $A0B765 C2 30 REP #$30 $A0B767 64 28 STZ $28 [$7E:0028] $A0B769 64 26 STZ $26 [$7E:0026] $A0B76B A5 30 LDA $30 [$7E:0030] $A0B76D 05 2E ORA $2E [$7E:002E] $A0B76F D0 06 BNE $06 [$B777] $A0B771 64 2C STZ $2C [$7E:002C] $A0B773 64 2A STZ $2A [$7E:002A] $A0B775 80 27 BRA $27 [$B79E] $A0B777 A2 21 00 LDX #$0021 $A0B77A 18 CLC $A0B77B 26 2A ROL $2A [$7E:002A] $A0B77D 26 2C ROL $2C [$7E:002C] $A0B77F CA DEX $A0B780 F0 1C BEQ $1C [$B79E] $A0B782 26 26 ROL $26 [$7E:0026] $A0B784 26 28 ROL $28 [$7E:0028] $A0B786 A5 28 LDA $28 [$7E:0028] $A0B788 05 26 ORA $26 [$7E:0026] $A0B78A F0 EF BEQ $EF [$B77B] $A0B78C A5 26 LDA $26 [$7E:0026] $A0B78E 38 SEC $A0B78F E5 2E SBC $2E [$7E:002E] $A0B791 A8 TAY $A0B792 A5 28 LDA $28 [$7E:0028] $A0B794 E5 30 SBC $30 [$7E:0030] $A0B796 90 E3 BCC $E3 [$B77B] $A0B798 85 28 STA $28 [$7E:0028] $A0B79A 84 26 STY $26 [$7E:0026] $A0B79C 80 DD BRA $DD [$B77B] $A0B79E AB PLB $A0B79F 28 PLP $A0B7A0 6B RTL } ;;; ;;; { $A0B7A1 DA PHX $A0B7A2 5A PHY $A0B7A3 AD FA 0A LDA $0AFA [$7E:0AFA] $A0B7A6 38 SEC $A0B7A7 ED 14 0B SBC $0B14 [$7E:0B14] $A0B7AA 85 12 STA $12 [$7E:0012] $A0B7AC 22 67 B0 A0 JSL $A0B067[$A0:B067] $A0B7B0 C9 0C 00 CMP #$000C $A0B7B3 30 12 BMI $12 [$B7C7] $A0B7B5 A0 F4 FF LDY #$FFF4 $A0B7B8 A5 12 LDA $12 [$7E:0012] $A0B7BA 30 03 BMI $03 [$B7BF] $A0B7BC A0 0C 00 LDY #$000C $A0B7BF 98 TYA $A0B7C0 18 CLC $A0B7C1 6D FA 0A ADC $0AFA [$7E:0AFA] $A0B7C4 8D 14 0B STA $0B14 [$7E:0B14] $A0B7C7 AD F6 0A LDA $0AF6 [$7E:0AF6] $A0B7CA 38 SEC $A0B7CB ED 10 0B SBC $0B10 [$7E:0B10] $A0B7CE 85 12 STA $12 [$7E:0012] $A0B7D0 22 67 B0 A0 JSL $A0B067[$A0:B067] $A0B7D4 C9 0C 00 CMP #$000C $A0B7D7 30 12 BMI $12 [$B7EB] $A0B7D9 A0 F4 FF LDY #$FFF4 $A0B7DC A5 12 LDA $12 [$7E:0012] $A0B7DE 30 03 BMI $03 [$B7E3] $A0B7E0 A0 0C 00 LDY #$000C $A0B7E3 98 TYA $A0B7E4 18 CLC $A0B7E5 6D F6 0A ADC $0AF6 [$7E:0AF6] $A0B7E8 8D 10 0B STA $0B10 [$7E:0B10] $A0B7EB 7A PLY $A0B7EC FA PLX $A0B7ED 6B RTL } ;;; ;;; { $A0B7EE dw 0000, 0648, 0C8F, 12D5, 1917, 1F56, 258F, 2BC3, 31F1, 3816, 3E33, 4447, 4A4F, 504D, 563E, 5C21, 61F7, 67BD, 6D73, 7319, 78AC, 7E2E, 839B, 88F5, 8E39, 9367, 987F, 9D7F, A266, A735, ABEA, B085, B504, B967, BDAE, C1D7, C5E3, C9D0, CD9E, D14C, D4DA, D847, DB93, DEBD, E1C4, E4A9, E76A, EA08, EC82, EED7, F108, F313, F4F9, F6B9, F852, F9C6, FB13, FC3A, FD39, FE12, FEC3, FF4D, FFB0, FFEB, FFFF, FFEB, FFB0, FF4D, FEC3, FE12, FD39, FC3A, FB13, F9C6, F852, F6B9, F4F9, F313, F108, EED7, EC82, EA08, E76A, E4A9, E1C4, DEBD, DB93, D847, D4DA, D14C, CD9E, C9D0, C5E3, C1D7, BDAE, B967, B504, B085, ABEA, A735, A266, 9D7F, 987F, 9367, 8E39, 88F5, 839B, 7E2E, 78AC, 7319, 6D73, 67BD, 61F7, 5C21, 563E, 504D, 4A4F, 4447, 3E33, 3816, 31F1, 2BC3, 258F, 1F56, 1917, 12D5, 0C8F, 0648 } ;;; Mini-Kraid death item drop routine ;;; { $A0B8EE DA PHX $A0B8EF 5A PHY $A0B8F0 08 PHP $A0B8F1 A9 04 00 LDA #$0004 $A0B8F4 8D 0B 06 STA $060B [$7E:060B] $A0B8F7 22 11 81 80 JSL $808111[$80:8111] $A0B8FB 29 1F 00 AND #$001F $A0B8FE 38 SEC $A0B8FF E9 10 00 SBC #$0010 $A0B902 18 CLC $A0B903 6F 34 F4 7E ADC $7EF434[$7E:F434] $A0B907 85 12 STA $12 [$7E:0012] $A0B909 AD E5 05 LDA $05E5 [$7E:05E5] $A0B90C 29 00 1F AND #$1F00 $A0B90F EB XBA $A0B910 38 SEC $A0B911 E9 10 00 SBC #$0010 $A0B914 18 CLC $A0B915 6F 36 F4 7E ADC $7EF436[$7E:F436] $A0B919 85 14 STA $14 [$7E:0014] $A0B91B A9 FF E0 LDA #$E0FF $A0B91E 22 0E 92 A0 JSL $A0920E[$A0:920E] $A0B922 CE 0B 06 DEC $060B [$7E:060B] $A0B925 D0 D0 BNE $D0 [$B8F7] $A0B927 28 PLP $A0B928 7A PLY $A0B929 FA PLX $A0B92A 6B RTL } ;;; Lower Norfair Ninja Space Pirate death item drop routine ;;; { $A0B92B DA PHX $A0B92C 5A PHY $A0B92D 08 PHP $A0B92E A9 05 00 LDA #$0005 $A0B931 8D 0B 06 STA $060B [$7E:060B] $A0B934 22 11 81 80 JSL $808111[$80:8111] $A0B938 29 1F 00 AND #$001F $A0B93B 38 SEC $A0B93C E9 10 00 SBC #$0010 $A0B93F 18 CLC $A0B940 6F 34 F4 7E ADC $7EF434[$7E:F434] $A0B944 85 12 STA $12 [$7E:0012] $A0B946 AD E5 05 LDA $05E5 [$7E:05E5] $A0B949 29 00 1F AND #$1F00 $A0B94C EB XBA $A0B94D 38 SEC $A0B94E E9 10 00 SBC #$0010 $A0B951 18 CLC $A0B952 6F 36 F4 7E ADC $7EF436[$7E:F436] $A0B956 85 14 STA $14 [$7E:0014] $A0B958 A9 93 F5 LDA #$F593 $A0B95B 22 0E 92 A0 JSL $A0920E[$A0:920E] $A0B95F CE 0B 06 DEC $060B [$7E:060B] $A0B962 D0 D0 BNE $D0 [$B934] $A0B964 28 PLP $A0B965 7A PLY $A0B966 FA PLX $A0B967 6B RTL } ;;; Metroid death item drop routine ;;; { $A0B968 DA PHX $A0B969 5A PHY $A0B96A 08 PHP $A0B96B A9 05 00 LDA #$0005 $A0B96E 8D 0B 06 STA $060B [$7E:060B] $A0B971 22 11 81 80 JSL $808111[$80:8111] $A0B975 29 1F 00 AND #$001F $A0B978 38 SEC $A0B979 E9 10 00 SBC #$0010 $A0B97C 18 CLC $A0B97D 6F 34 F4 7E ADC $7EF434[$7E:F434] $A0B981 85 12 STA $12 [$7E:0012] $A0B983 AD E5 05 LDA $05E5 [$7E:05E5] $A0B986 29 00 1F AND #$1F00 $A0B989 EB XBA $A0B98A 38 SEC $A0B98B E9 10 00 SBC #$0010 $A0B98E 18 CLC $A0B98F 6F 36 F4 7E ADC $7EF436[$7E:F436] $A0B993 85 14 STA $14 [$7E:0014] $A0B995 A9 7F DD LDA #$DD7F $A0B998 22 0E 92 A0 JSL $A0920E[$A0:920E] $A0B99C CE 0B 06 DEC $060B [$7E:060B] $A0B99F D0 D0 BNE $D0 [$B971] $A0B9A1 28 PLP $A0B9A2 7A PLY $A0B9A3 FA PLX $A0B9A4 6B RTL } ;;; Ridley death item drop routine ;;; { $A0B9A5 DA PHX $A0B9A6 5A PHY $A0B9A7 08 PHP $A0B9A8 A9 10 00 LDA #$0010 $A0B9AB 8D 0B 06 STA $060B [$7E:060B] $A0B9AE 22 11 81 80 JSL $808111[$80:8111] $A0B9B2 29 7F 00 AND #$007F $A0B9B5 18 CLC $A0B9B6 69 40 00 ADC #$0040 $A0B9B9 85 12 STA $12 [$7E:0012] $A0B9BB AD E5 05 LDA $05E5 [$7E:05E5] $A0B9BE 29 00 3F AND #$3F00 $A0B9C1 EB XBA $A0B9C2 18 CLC $A0B9C3 69 40 01 ADC #$0140 $A0B9C6 85 14 STA $14 [$7E:0014] $A0B9C8 A9 7F E1 LDA #$E17F $A0B9CB 22 0E 92 A0 JSL $A0920E[$A0:920E] $A0B9CF CE 0B 06 DEC $060B [$7E:060B] $A0B9D2 D0 DA BNE $DA [$B9AE] $A0B9D4 28 PLP $A0B9D5 7A PLY $A0B9D6 FA PLX $A0B9D7 6B RTL } ;;; Crocomire death item drop routine ;;; { $A0B9D8 DA PHX $A0B9D9 5A PHY $A0B9DA 08 PHP $A0B9DB A9 10 00 LDA #$0010 $A0B9DE 8D 0B 06 STA $060B [$7E:060B] $A0B9E1 22 11 81 80 JSL $808111[$80:8111] $A0B9E5 29 7F 00 AND #$007F $A0B9E8 18 CLC $A0B9E9 69 40 02 ADC #$0240 $A0B9EC 85 12 STA $12 [$7E:0012] $A0B9EE AD E5 05 LDA $05E5 [$7E:05E5] $A0B9F1 29 00 3F AND #$3F00 $A0B9F4 EB XBA $A0B9F5 18 CLC $A0B9F6 69 60 00 ADC #$0060 $A0B9F9 85 14 STA $14 [$7E:0014] $A0B9FB A9 BF DD LDA #$DDBF $A0B9FE 22 0E 92 A0 JSL $A0920E[$A0:920E] $A0BA02 CE 0B 06 DEC $060B [$7E:060B] $A0BA05 D0 DA BNE $DA [$B9E1] $A0BA07 28 PLP $A0BA08 7A PLY $A0BA09 FA PLX $A0BA0A 6B RTL } ;;; Phantoon death item drop routine ;;; { $A0BA0B DA PHX $A0BA0C 5A PHY $A0BA0D 08 PHP $A0BA0E A9 10 00 LDA #$0010 $A0BA11 8D 0B 06 STA $060B [$7E:060B] $A0BA14 22 11 81 80 JSL $808111[$80:8111] $A0BA18 29 7F 00 AND #$007F $A0BA1B 18 CLC $A0BA1C 69 40 00 ADC #$0040 $A0BA1F 85 12 STA $12 [$7E:0012] $A0BA21 AD E5 05 LDA $05E5 [$7E:05E5] $A0BA24 29 00 3F AND #$3F00 $A0BA27 EB XBA $A0BA28 18 CLC $A0BA29 69 60 00 ADC #$0060 $A0BA2C 85 14 STA $14 [$7E:0014] $A0BA2E A9 BF E4 LDA #$E4BF $A0BA31 22 0E 92 A0 JSL $A0920E[$A0:920E] $A0BA35 CE 0B 06 DEC $060B [$7E:060B] $A0BA38 D0 DA BNE $DA [$BA14] $A0BA3A 28 PLP $A0BA3B 7A PLY $A0BA3C FA PLX $A0BA3D 6B RTL } ;;; Botwoon death item drop routine ;;; { $A0BA3E DA PHX $A0BA3F 5A PHY $A0BA40 08 PHP $A0BA41 A9 10 00 LDA #$0010 $A0BA44 8D 0B 06 STA $060B [$7E:060B] $A0BA47 22 11 81 80 JSL $808111[$80:8111] $A0BA4B 29 7F 00 AND #$007F $A0BA4E 18 CLC $A0BA4F 69 40 00 ADC #$0040 $A0BA52 85 12 STA $12 [$7E:0012] $A0BA54 AD E5 05 LDA $05E5 [$7E:05E5] $A0BA57 29 00 3F AND #$3F00 $A0BA5A EB XBA $A0BA5B 18 CLC $A0BA5C 69 80 00 ADC #$0080 $A0BA5F 85 14 STA $14 [$7E:0014] $A0BA61 A9 93 F2 LDA #$F293 $A0BA64 22 0E 92 A0 JSL $A0920E[$A0:920E] $A0BA68 CE 0B 06 DEC $060B [$7E:060B] $A0BA6B D0 DA BNE $DA [$BA47] $A0BA6D 28 PLP $A0BA6E 7A PLY $A0BA6F FA PLX $A0BA70 6B RTL } ;;; Kraid death item drop routine ;;; { $A0BA71 DA PHX $A0BA72 5A PHY $A0BA73 08 PHP $A0BA74 A9 10 00 LDA #$0010 $A0BA77 8D 0B 06 STA $060B [$7E:060B] $A0BA7A 22 11 81 80 JSL $808111[$80:8111] $A0BA7E 29 FF 00 AND #$00FF $A0BA81 18 CLC $A0BA82 69 80 00 ADC #$0080 $A0BA85 85 12 STA $12 [$7E:0012] $A0BA87 AD E5 05 LDA $05E5 [$7E:05E5] $A0BA8A 29 00 3F AND #$3F00 $A0BA8D EB XBA $A0BA8E 18 CLC $A0BA8F 69 60 01 ADC #$0160 $A0BA92 85 14 STA $14 [$7E:0014] $A0BA94 A9 BF E2 LDA #$E2BF $A0BA97 22 0E 92 A0 JSL $A0920E[$A0:920E] $A0BA9B CE 0B 06 DEC $060B [$7E:060B] $A0BA9E D0 DA BNE $DA [$BA7A] $A0BAA0 28 PLP $A0BAA1 7A PLY $A0BAA2 FA PLX $A0BAA3 6B RTL } ;;; Bomb Torizo death item drop routine ;;; { $A0BAA4 DA PHX $A0BAA5 5A PHY $A0BAA6 08 PHP $A0BAA7 A9 10 00 LDA #$0010 ;\ $A0BAAA 8D 0B 06 STA $060B [$7E:060B] ;} Number of item drops $A0BAAD 22 11 81 80 JSL $808111[$80:8111] ;\ $A0BAB1 29 7F 00 AND #$007F ;| $A0BAB4 18 CLC ;} Item drop X position = 40h..BFh randomly $A0BAB5 69 40 00 ADC #$0040 ;| $A0BAB8 85 12 STA $12 [$7E:0012] ;/ $A0BABA AD E5 05 LDA $05E5 [$7E:05E5] ;\ $A0BABD 29 00 3F AND #$3F00 ;| $A0BAC0 EB XBA ;| $A0BAC1 18 CLC ;} Item drop Y position = 60h..9Fh randomly $A0BAC2 69 60 00 ADC #$0060 ;| $A0BAC5 85 14 STA $14 [$7E:0014] ;/ $A0BAC7 A9 FF EE LDA #$EEFF ;\ $A0BACA 22 0E 92 A0 JSL $A0920E[$A0:920E] ;} Spawn item drop with Bomb Torizo's drop chances $A0BACE CE 0B 06 DEC $060B [$7E:060B] ;\ $A0BAD1 D0 DA BNE $DA [$BAAD] ;} Next! $A0BAD3 28 PLP $A0BAD4 7A PLY $A0BAD5 FA PLX $A0BAD6 6B RTL } ;;; Golden Torizo death item drop routine ;;; { $A0BAD7 DA PHX $A0BAD8 5A PHY $A0BAD9 08 PHP $A0BADA A9 10 00 LDA #$0010 ;\ $A0BADD 8D 0B 06 STA $060B [$7E:060B] ;} Number of item drops $A0BAE0 22 11 81 80 JSL $808111[$80:8111] ;\ $A0BAE4 29 FF 00 AND #$00FF ;| $A0BAE7 18 CLC ;} Item drop X position = 80h..17Fh randomly $A0BAE8 69 80 00 ADC #$0080 ;| $A0BAEB 85 12 STA $12 [$7E:0012] ;/ $A0BAED AD E5 05 LDA $05E5 [$7E:05E5] ;\ $A0BAF0 29 00 3F AND #$3F00 ;| $A0BAF3 EB XBA ;| $A0BAF4 18 CLC ;} Item drop Y position = 120h..15Fh randomly $A0BAF5 69 20 01 ADC #$0120 ;| $A0BAF8 85 14 STA $14 [$7E:0014] ;/ $A0BAFA A9 FF EE LDA #$EEFF ;\ $A0BAFD 22 0E 92 A0 JSL $A0920E[$A0:920E] ;} Spawn item drop with Bomb Torizo's drop chances $A0BB01 CE 0B 06 DEC $060B [$7E:060B] ;\ $A0BB04 D0 DA BNE $DA [$BAE0] ;} Next! $A0BB06 28 PLP $A0BB07 7A PLY $A0BB08 FA PLX $A0BB09 6B RTL } ;;; Spore Spawn death item drop routine ;;; { $A0BB0A DA PHX $A0BB0B 5A PHY $A0BB0C 08 PHP $A0BB0D A9 10 00 LDA #$0010 ;\ $A0BB10 8D 0B 06 STA $060B [$7E:060B] ;} Number of item drops $A0BB13 22 11 81 80 JSL $808111[$80:8111] ;\ $A0BB17 29 7F 00 AND #$007F ;| $A0BB1A 18 CLC ;} Item drop X position = 40h..CFh randomly $A0BB1B 69 40 00 ADC #$0040 ;| $A0BB1E 85 12 STA $12 [$7E:0012] ;/ $A0BB20 AD E5 05 LDA $05E5 [$7E:05E5] ;\ $A0BB23 29 00 3F AND #$3F00 ;| $A0BB26 EB XBA ;| $A0BB27 18 CLC ;} Item drop Y position = 210h..24Fh randomly $A0BB28 69 10 02 ADC #$0210 ;| $A0BB2B 85 14 STA $14 [$7E:0014] ;/ $A0BB2D A9 3F DF LDA #$DF3F ;\ $A0BB30 22 0E 92 A0 JSL $A0920E[$A0:920E] ;} Spawn item drop with Spore Spawn's drop chances $A0BB34 CE 0B 06 DEC $060B [$7E:060B] ;\ $A0BB37 D0 DA BNE $DA [$BB13] ;} Next! $A0BB39 28 PLP $A0BB3A 7A PLY $A0BB3B FA PLX $A0BB3C 6B RTL } ;;; Draygon death item drop routine ;;; { $A0BB3D DA PHX $A0BB3E 5A PHY $A0BB3F 08 PHP $A0BB40 A9 10 00 LDA #$0010 ;\ $A0BB43 8D 0B 06 STA $060B [$7E:060B] ;} Number of item drops $A0BB46 22 11 81 80 JSL $808111[$80:8111] ;\ $A0BB4A 29 FF 00 AND #$00FF ;| $A0BB4D 18 CLC ;} Item drop X position = 80h..17Fh randomly $A0BB4E 69 80 00 ADC #$0080 ;| $A0BB51 85 12 STA $12 [$7E:0012] ;/ $A0BB53 AD E5 05 LDA $05E5 [$7E:05E5] ;\ $A0BB56 29 00 3F AND #$3F00 ;| $A0BB59 EB XBA ;| $A0BB5A 18 CLC ;} Item drop Y position = 120h..15Fh randomly $A0BB5B 69 60 01 ADC #$0160 ;| $A0BB5E 85 14 STA $14 [$7E:0014] ;/ $A0BB60 A9 3F DE LDA #$DE3F ;\ $A0BB63 22 0E 92 A0 JSL $A0920E[$A0:920E] ;} Spawn item drop with BT's drop chances $A0BB67 CE 0B 06 DEC $060B [$7E:060B] ;\ $A0BB6A D0 DA BNE $DA [$BB46] ;} Next! $A0BB6C 28 PLP $A0BB6D 7A PLY $A0BB6E FA PLX $A0BB6F 6B RTL } ;;; ;;; { ; Call after pushing a X then Y pixel position onto the stack (2 bytes each). ; 0DC4 is set with block #, and stack is also cleaned up (do not try to pull Y and X position from stack) $A0BB70 A3 04 LDA $04,s [$7E:1FEB] $A0BB72 4A LSR A $A0BB73 4A LSR A $A0BB74 4A LSR A $A0BB75 4A LSR A $A0BB76 E2 20 SEP #$20 $A0BB78 8D 02 42 STA $4202 [$7E:4202] $A0BB7B AD A5 07 LDA $07A5 [$7E:07A5] $A0BB7E 8D 03 42 STA $4203 [$7E:4203] $A0BB81 C2 20 REP #$20 $A0BB83 A3 06 LDA $06,s [$7E:1FED] $A0BB85 4A LSR A $A0BB86 4A LSR A $A0BB87 4A LSR A $A0BB88 4A LSR A $A0BB89 18 CLC $A0BB8A 6D 16 42 ADC $4216 [$7E:4216] $A0BB8D 8D C4 0D STA $0DC4 [$7E:0DC4] $A0BB90 A3 02 LDA $02,s [$7E:1FE9] $A0BB92 83 06 STA $06,s [$7E:1FED] $A0BB94 A3 01 LDA $01,s [$7E:1FE8] $A0BB96 83 05 STA $05,s [$7E:1FEC] $A0BB98 68 PLA $A0BB99 68 PLA $A0BB9A 6B RTL } ;;; ;;; { $A0BB9B 48 PHA $A0BB9C AD F6 0A LDA $0AF6 [$7E:0AF6] $A0BB9F 38 SEC $A0BBA0 FD 7A 0F SBC $0F7A,x[$7E:107A] $A0BBA3 10 04 BPL $04 [$BBA9] $A0BBA5 49 FF FF EOR #$FFFF $A0BBA8 1A INC A $A0BBA9 C3 01 CMP $01,s [$7E:1FEF] $A0BBAB 68 PLA $A0BBAC 6B RTL } ;;; ;;; { $A0BBAD 48 PHA $A0BBAE AD FA 0A LDA $0AFA [$7E:0AFA] $A0BBB1 38 SEC $A0BBB2 FD 7E 0F SBC $0F7E,x $A0BBB5 10 04 BPL $04 [$BBBB] $A0BBB7 49 FF FF EOR #$FFFF $A0BBBA 1A INC A $A0BBBB C3 01 CMP $01,s $A0BBBD 68 PLA $A0BBBE 6B RTL } ;;; ;;; { ; Lots of enemy boundary calculations ; (seems to be trying to find it's location in room, possibly calculating x distance movement). ; Used by walking pirates, looks like it's vertical collision routine to stop it from falling? ; NOP'd with no observable effects... (only runs when walking left) $A0BBBF 8B PHB $A0BBC0 E2 20 SEP #$20 $A0BBC2 A9 A0 LDA #$A0 $A0BBC4 48 PHA $A0BBC5 AB PLB $A0BBC6 C2 30 REP #$30 $A0BBC8 DA PHX $A0BBC9 BD 7E 0F LDA $0F7E,x[$7E:0FFE] $A0BBCC 38 SEC $A0BBCD FD 84 0F SBC $0F84,x[$7E:1004] $A0BBD0 29 F0 FF AND #$FFF0 $A0BBD3 85 1A STA $1A [$7E:001A] $A0BBD5 BD 7E 0F LDA $0F7E,x[$7E:0FFE] $A0BBD8 18 CLC $A0BBD9 7D 84 0F ADC $0F84,x[$7E:1004] $A0BBDC 3A DEC A $A0BBDD 38 SEC $A0BBDE E5 1A SBC $1A [$7E:001A] $A0BBE0 4A LSR A $A0BBE1 4A LSR A $A0BBE2 4A LSR A $A0BBE3 4A LSR A $A0BBE4 85 1A STA $1A [$7E:001A] $A0BBE6 BD 7E 0F LDA $0F7E,x[$7E:0FFE] $A0BBE9 38 SEC $A0BBEA FD 84 0F SBC $0F84,x[$7E:1004] $A0BBED 4A LSR A $A0BBEE 4A LSR A $A0BBEF 4A LSR A $A0BBF0 4A LSR A $A0BBF1 E2 20 SEP #$20 $A0BBF3 8D 02 42 STA $4202 [$7E:4202] $A0BBF6 AD A5 07 LDA $07A5 [$7E:07A5] $A0BBF9 8D 03 42 STA $4203 [$7E:4203] $A0BBFC C2 20 REP #$20 $A0BBFE BD 7C 0F LDA $0F7C,x[$7E:0FFC] $A0BC01 18 CLC $A0BC02 65 12 ADC $12 [$7E:0012] $A0BC04 85 16 STA $16 [$7E:0016] $A0BC06 BD 7A 0F LDA $0F7A,x[$7E:0FFA] $A0BC09 65 14 ADC $14 [$7E:0014] $A0BC0B 85 18 STA $18 [$7E:0018] $A0BC0D 24 14 BIT $14 [$7E:0014] $A0BC0F 30 07 BMI $07 [$BC18] $A0BC11 18 CLC $A0BC12 7D 82 0F ADC $0F82,x[$7E:1182] $A0BC15 3A DEC A $A0BC16 80 04 BRA $04 [$BC1C] $A0BC18 38 SEC $A0BC19 FD 82 0F SBC $0F82,x[$7E:1002] $A0BC1C 85 22 STA $22 [$7E:0022] $A0BC1E 4A LSR A $A0BC1F 4A LSR A $A0BC20 4A LSR A $A0BC21 4A LSR A $A0BC22 18 CLC $A0BC23 6D 16 42 ADC $4216 [$7E:4216] $A0BC26 0A ASL A $A0BC27 AA TAX $A0BC28 BF 02 00 7F LDA $7F0002,x[$7F:021E] $A0BC2C 30 11 BMI $11 [$BC3F] $A0BC2E 8A TXA $A0BC2F 18 CLC $A0BC30 6D A5 07 ADC $07A5 [$7E:07A5] $A0BC33 6D A5 07 ADC $07A5 [$7E:07A5] $A0BC36 AA TAX $A0BC37 C6 1A DEC $1A [$7E:001A] $A0BC39 10 ED BPL $ED [$BC28] $A0BC3B FA PLX $A0BC3C 18 CLC $A0BC3D AB PLB $A0BC3E 6B RTL $A0BC3F FA PLX $A0BC40 64 12 STZ $12 [$7E:0012] $A0BC42 A5 22 LDA $22 [$7E:0022] $A0BC44 24 14 BIT $14 [$7E:0014] $A0BC46 30 15 BMI $15 [$BC5D] $A0BC48 29 F0 FF AND #$FFF0 $A0BC4B 38 SEC $A0BC4C FD 82 0F SBC $0F82,x[$7E:1182] $A0BC4F 38 SEC $A0BC50 FD 7A 0F SBC $0F7A,x[$7E:117A] $A0BC53 10 03 BPL $03 [$BC58] $A0BC58 85 14 STA $14 [$7E:0014] $A0BC5A 38 SEC $A0BC5B AB PLB $A0BC5C 6B RTL $A0BC5D 09 0F 00 ORA #$000F $A0BC60 38 SEC $A0BC61 7D 82 0F ADC $0F82,x[$7E:0FC2] $A0BC64 38 SEC $A0BC65 FD 7A 0F SBC $0F7A,x[$7E:0FBA] $A0BC68 30 03 BMI $03 [$BC6D] $A0BC6A A9 00 00 LDA #$0000 $A0BC6D 49 FF FF EOR #$FFFF $A0BC70 1A INC A $A0BC71 85 14 STA $14 [$7E:0014] $A0BC73 38 SEC $A0BC74 AB PLB $A0BC75 6B RTL } ;;; ;;; { $A0BC76 8B PHB $A0BC77 E2 20 SEP #$20 $A0BC79 A9 A0 LDA #$A0 $A0BC7B 48 PHA $A0BC7C AB PLB $A0BC7D C2 30 REP #$30 $A0BC7F DA PHX $A0BC80 BD 7A 0F LDA $0F7A,x[$7E:107A] $A0BC83 38 SEC $A0BC84 FD 82 0F SBC $0F82,x[$7E:1082] $A0BC87 29 F0 FF AND #$FFF0 $A0BC8A 85 1A STA $1A [$7E:001A] $A0BC8C BD 7A 0F LDA $0F7A,x[$7E:107A] $A0BC8F 18 CLC $A0BC90 7D 82 0F ADC $0F82,x[$7E:1082] $A0BC93 3A DEC A $A0BC94 38 SEC $A0BC95 E5 1A SBC $1A [$7E:001A] $A0BC97 4A LSR A $A0BC98 4A LSR A $A0BC99 4A LSR A $A0BC9A 4A LSR A $A0BC9B 85 1A STA $1A [$7E:001A] $A0BC9D BD 80 0F LDA $0F80,x[$7E:1080] $A0BCA0 18 CLC $A0BCA1 65 12 ADC $12 [$7E:0012] $A0BCA3 85 16 STA $16 [$7E:0016] $A0BCA5 BD 7E 0F LDA $0F7E,x[$7E:107E] $A0BCA8 65 14 ADC $14 [$7E:0014] $A0BCAA 85 18 STA $18 [$7E:0018] $A0BCAC 24 14 BIT $14 [$7E:0014] $A0BCAE 30 07 BMI $07 [$BCB7] $A0BCB0 18 CLC $A0BCB1 7D 84 0F ADC $0F84,x[$7E:1084] $A0BCB4 3A DEC A $A0BCB5 80 04 BRA $04 [$BCBB] $A0BCB7 38 SEC $A0BCB8 FD 84 0F SBC $0F84,x[$7E:1044] $A0BCBB 85 22 STA $22 [$7E:0022] $A0BCBD 4A LSR A $A0BCBE 4A LSR A $A0BCBF 4A LSR A $A0BCC0 4A LSR A $A0BCC1 E2 20 SEP #$20 $A0BCC3 8D 02 42 STA $4202 [$7E:4202] $A0BCC6 AD A5 07 LDA $07A5 [$7E:07A5] $A0BCC9 8D 03 42 STA $4203 [$7E:4203] $A0BCCC C2 20 REP #$20 $A0BCCE BD 7A 0F LDA $0F7A,x[$7E:107A] $A0BCD1 38 SEC $A0BCD2 FD 82 0F SBC $0F82,x[$7E:1082] $A0BCD5 4A LSR A $A0BCD6 4A LSR A $A0BCD7 4A LSR A $A0BCD8 4A LSR A $A0BCD9 18 CLC $A0BCDA 6D 16 42 ADC $4216 [$7E:4216] $A0BCDD 0A ASL A $A0BCDE AA TAX $A0BCDF BF 02 00 7F LDA $7F0002,x[$7F:232A] $A0BCE3 30 0A BMI $0A [$BCEF] $A0BCE5 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A0BCEF FA PLX $A0BCF0 64 12 STZ $12 [$7E:0012] $A0BCF2 A5 22 LDA $22 [$7E:0022] $A0BCF4 24 14 BIT $14 [$7E:0014] $A0BCF6 30 15 BMI $15 [$BD0D] $A0BCF8 29 F0 FF AND #$FFF0 $A0BCFB 38 SEC $A0BCFC FD 84 0F SBC $0F84,x[$7E:1084] $A0BCFF 38 SEC $A0BD00 FD 7E 0F SBC $0F7E,x[$7E:107E] $A0BD03 10 03 BPL $03 [$BD08] $A0BD05 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A0BD08 85 14 STA $14 [$7E:0014] $A0BD0A 38 SEC $A0BD0B AB PLB $A0BD0C 6B RTL $A0BD0D 09 0F 00 ORA #$000F $A0BD10 38 SEC $A0BD11 7D 84 0F ADC $0F84,x[$7E:1044] $A0BD14 38 SEC $A0BD15 FD 7E 0F SBC $0F7E,x[$7E:103E] $A0BD18 30 03 BMI $03 [$BD1D] $A0BD1A A9 00 00 LDA #$0000 $A0BD1D 49 FF FF EOR #$FFFF $A0BD20 1A INC A $A0BD21 85 14 STA $14 [$7E:0014] $A0BD23 38 SEC $A0BD24 AB PLB $A0BD25 6B RTL } ;;; ;;; { $A0BD26 8B PHB $A0BD27 E2 20 SEP #$20 $A0BD29 A9 A0 LDA #$A0 $A0BD2B 48 PHA $A0BD2C AB PLB $A0BD2D C2 30 REP #$30 $A0BD2F DA PHX $A0BD30 85 1C STA $1C [$7E:001C] $A0BD32 BD 7E 0F LDA $0F7E,x $A0BD35 38 SEC $A0BD36 FD 84 0F SBC $0F84,x $A0BD39 29 F0 FF AND #$FFF0 $A0BD3C 85 1A STA $1A [$7E:001A] $A0BD3E BD 7E 0F LDA $0F7E,x $A0BD41 18 CLC $A0BD42 7D 84 0F ADC $0F84,x $A0BD45 3A DEC A $A0BD46 38 SEC $A0BD47 E5 1A SBC $1A [$7E:001A] $A0BD49 4A LSR A $A0BD4A 4A LSR A $A0BD4B 4A LSR A $A0BD4C 4A LSR A $A0BD4D 85 1A STA $1A [$7E:001A] $A0BD4F BD 7E 0F LDA $0F7E,x $A0BD52 38 SEC $A0BD53 FD 84 0F SBC $0F84,x $A0BD56 4A LSR A $A0BD57 4A LSR A $A0BD58 4A LSR A $A0BD59 4A LSR A $A0BD5A E2 20 SEP #$20 $A0BD5C 8D 02 42 STA $4202 [$7E:4202] $A0BD5F AD A5 07 LDA $07A5 [$7E:07A5] $A0BD62 8D 03 42 STA $4203 [$7E:4203] $A0BD65 C2 20 REP #$20 $A0BD67 A5 1C LDA $1C [$7E:001C] $A0BD69 4A LSR A $A0BD6A 90 16 BCC $16 [$BD82] $A0BD6C BD 7C 0F LDA $0F7C,x $A0BD6F 18 CLC $A0BD70 65 12 ADC $12 [$7E:0012] $A0BD72 85 16 STA $16 [$7E:0016] $A0BD74 BD 7A 0F LDA $0F7A,x $A0BD77 65 14 ADC $14 [$7E:0014] $A0BD79 85 18 STA $18 [$7E:0018] $A0BD7B 18 CLC $A0BD7C 7D 82 0F ADC $0F82,x $A0BD7F 3A DEC A $A0BD80 80 13 BRA $13 [$BD95] $A0BD82 BD 7C 0F LDA $0F7C,x $A0BD85 38 SEC $A0BD86 E5 12 SBC $12 [$7E:0012] $A0BD88 85 16 STA $16 [$7E:0016] } ;;; ;;; { ; There are JSL to here $A0BF8A 85 1C STA $1C [$7E:001C] $A0BF8C 8B PHB $A0BF8D E2 20 SEP #$20 $A0BF8F A9 A0 LDA #$A0 $A0BF91 48 PHA $A0BF92 AB PLB $A0BF93 C2 30 REP #$30 $A0BF95 DA PHX $A0BF96 BD 7A 0F LDA $0F7A,x[$7E:0FFA] $A0BF99 38 SEC $A0BF9A FD 82 0F SBC $0F82,x[$7E:1002] $A0BF9D 29 F0 FF AND #$FFF0 $A0BFA0 85 1A STA $1A [$7E:001A] $A0BFA2 BD 7A 0F LDA $0F7A,x[$7E:0FFA] $A0BFA5 18 CLC $A0BFA6 7D 82 0F ADC $0F82,x[$7E:1002] $A0BFA9 3A DEC A $A0BFAA 38 SEC $A0BFAB E5 1A SBC $1A [$7E:001A] $A0BFAD 4A LSR A $A0BFAE 4A LSR A $A0BFAF 4A LSR A $A0BFB0 4A LSR A $A0BFB1 85 1A STA $1A [$7E:001A] $A0BFB3 A5 1C LDA $1C [$7E:001C] $A0BFB5 4A LSR A $A0BFB6 90 16 BCC $16 [$BFCE] $A0BFB8 BD 80 0F LDA $0F80,x[$7E:1000] $A0BFBB 18 CLC $A0BFBC 65 12 ADC $12 [$7E:0012] $A0BFBE 85 16 STA $16 [$7E:0016] $A0BFC0 BD 7E 0F LDA $0F7E,x[$7E:0FFE] $A0BFC3 65 14 ADC $14 [$7E:0014] $A0BFC5 85 18 STA $18 [$7E:0018] $A0BFC7 18 CLC $A0BFC8 7D 84 0F ADC $0F84,x[$7E:1004] $A0BFCB 3A DEC A $A0BFCC 80 13 BRA $13 [$BFE1] $A0BDCE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A0BFE1 85 22 STA $22 [$7E:0022] $A0BFE3 4A LSR A $A0BFE4 4A LSR A $A0BFE5 4A LSR A $A0BFE6 4A LSR A $A0BFE7 E2 20 SEP #$20 $A0BFE9 8D 02 42 STA $4202 [$7E:4202] $A0BFEC AD A5 07 LDA $07A5 [$7E:07A5] $A0BFEF 8D 03 42 STA $4203 [$7E:4203] $A0BFF2 C2 20 REP #$20 $A0BFF4 BD 7A 0F LDA $0F7A,x[$7E:0FFA] $A0BFF7 38 SEC $A0BFF8 FD 82 0F SBC $0F82,x[$7E:1002] $A0BFFB 4A LSR A $A0BFFC 4A LSR A $A0BFFD 4A LSR A $A0BFFE 4A LSR A $A0BFFF 18 CLC $A0C000 6D 16 42 ADC $4216 [$7E:4216] $A0C003 0A ASL A $A0C004 AA TAX $A0C005 BF 02 00 7F LDA $7F0002,x[$7F:0DFC] $A0C009 30 0A BMI $0A [$C015] $A0C00B E8 INX $A0C00C E8 INX $A0C00D C6 1A DEC $1A [$7E:001A] $A0C00F 10 F4 BPL $F4 [$C005] $A0C011 FA PLX $A0C012 18 CLC $A0C013 AB PLB $A0C014 6B RTL $A0C015 FA PLX $A0C016 64 12 STZ $12 [$7E:0012] $A0C018 A5 1C LDA $1C [$7E:001C] $A0C01A 4A LSR A $A0C01B 90 16 BCC $16 [$C033] $A0C01D A5 22 LDA $22 [$7E:0022] $A0C01F 29 F0 FF AND #$FFF0 $A0C022 38 SEC $A0C023 FD 84 0F SBC $0F84,x[$7E:1004] $A0C026 FD 7E 0F SBC $0F7E,x[$7E:0FFE] $A0C029 10 03 BPL $03 [$C02E] $A0C02B ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A0C02E 85 14 STA $14 [$7E:0014] $A0C030 38 SEC $A0C031 AB PLB $A0C032 6B RTL $A0C033 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; } ;;; ;;; { $A0C066 08 PHP $A0C067 C2 30 REP #$30 $A0C069 AD F6 0A LDA $0AF6 [$7E:0AF6] $A0C06C 38 SEC $A0C06D FD 7A 0F SBC $0F7A,x[$7E:0FBA] $A0C070 85 12 STA $12 [$7E:0012] $A0C072 AD FA 0A LDA $0AFA [$7E:0AFA] $A0C075 38 SEC $A0C076 FD 7E 0F SBC $0F7E,x[$7E:0FBE] $A0C079 85 14 STA $14 [$7E:0014] $A0C07B 4C B1 C0 JMP $C0B1 [$A0:C0B1] } ;;; ;;; { $A0C096 08 PHP $A0C097 C2 30 REP #$30 $A0C099 BD 7A 0F LDA $0F7A,x[$7E:10FA] $A0C09C 38 SEC $A0C09D F9 7A 0F SBC $0F7A,y[$7E:0F7A] $A0C0A0 85 12 STA $12 [$7E:0012] $A0C0A2 BD 7E 0F LDA $0F7E,x[$7E:10FE] $A0C0A5 38 SEC $A0C0A6 F9 7E 0F SBC $0F7E,y[$7E:0F7E] $A0C0A9 85 14 STA $14 [$7E:0014] $A0C0AB 4C B1 C0 JMP $C0B1 [$A0:C0B1] } ;;; ;;; { ; Rough angle calculation given X (in $12) and Y (in $14). ; Angle 0 = up (-Y), 40 = right (X), 80 = down (Y), C0 = left (-X) $A0C0AE 08 PHP $A0C0AF C2 30 REP #$30 $A0C0B1 DA PHX $A0C0B2 A2 00 00 LDX #$0000 $A0C0B5 A5 12 LDA $12 [$7E:0012] $A0C0B7 10 07 BPL $07 [$C0C0] $A0C0B9 A2 04 00 LDX #$0004 $A0C0BC 49 FF FF EOR #$FFFF $A0C0BF 1A INC A $A0C0C0 85 12 STA $12 [$7E:0012] $A0C0C2 A5 14 LDA $14 [$7E:0014] $A0C0C4 10 06 BPL $06 [$C0CC] $A0C0C6 E8 INX $A0C0C7 E8 INX $A0C0C8 49 FF FF EOR #$FFFF $A0C0CB 1A INC A $A0C0CC 85 14 STA $14 [$7E:0014] $A0C0CE C5 12 CMP $12 [$7E:0012] $A0C0D0 90 20 BCC $20 [$C0F2] $A0C0D2 E2 20 SEP #$20 $A0C0D4 9C 04 42 STZ $4204 [$7E:4204] $A0C0D7 A5 12 LDA $12 [$7E:0012] $A0C0D9 8D 05 42 STA $4205 [$7E:4205] $A0C0DC A5 14 LDA $14 [$7E:0014] $A0C0DE 8D 06 42 STA $4206 [$7E:4206] $A0C0E1 EA NOP $A0C0E2 C2 20 REP #$20 $A0C0E4 FC EA C0 JSR ($C0EA,x)[$A0:C120] $A0C0E7 FA PLX $A0C0E8 28 PLP $A0C0E9 6B RTL $A0C0EA dw C120, C132, C14E, C17C $A0C0F2 E2 20 SEP #$20 $A0C0F4 9C 04 42 STZ $4204 [$7E:4204] $A0C0F7 A5 14 LDA $14 [$7E:0014] $A0C0F9 8D 05 42 STA $4205 [$7E:4205] $A0C0FC A5 12 LDA $12 [$7E:0012] $A0C0FE 8D 06 42 STA $4206 [$7E:4206] $A0C101 EA NOP $A0C102 C2 20 REP #$20 $A0C104 FC 0A C1 JSR ($C10A,x)[$A0:C112] $A0C107 FA PLX $A0C108 28 PLP $A0C109 6B RTL $A0C10A dw C112, C13C, C15C, C16E } ;;; ;;; { ; A = 40h + quotient / 8 $A0C112 AD 14 42 LDA $4214 [$7E:4214] $A0C115 4A LSR A $A0C116 4A LSR A $A0C117 4A LSR A $A0C118 18 CLC $A0C119 69 40 00 ADC #$0040 $A0C11C 29 FF 00 AND #$00FF $A0C11F 60 RTS } ;;; ;;; { ; A = 80h - quotient / 8 $A0C120 AD 14 42 LDA $4214 [$7E:4214] $A0C123 4A LSR A $A0C124 4A LSR A $A0C125 4A LSR A $A0C126 85 12 STA $12 [$7E:0012] $A0C128 A9 80 00 LDA #$0080 $A0C12B 38 SEC $A0C12C E5 12 SBC $12 [$7E:0012] $A0C12E 29 FF 00 AND #$00FF $A0C131 60 RTS } ;;; ;;; { ; A = Quotient / 8 $A0C132 AD 14 42 LDA $4214 [$7E:4214] $A0C135 4A LSR A $A0C136 4A LSR A $A0C137 4A LSR A $A0C138 29 FF 00 AND #$00FF $A0C13B 60 RTS } ;;; ;;; { ; A = 40h - quotient / 8 $A0C13C AD 14 42 LDA $4214 [$7E:4214] $A0C13F 4A LSR A $A0C140 4A LSR A $A0C141 4A LSR A $A0C142 85 12 STA $12 [$7E:0012] $A0C144 A9 40 00 LDA #$0040 $A0C147 38 SEC $A0C148 E5 12 SBC $12 [$7E:0012] $A0C14A 29 FF 00 AND #$00FF $A0C14D 60 RTS } ;;; ;;; { ; A = 80h + quotient / 8 $A0C14E AD 14 42 LDA $4214 [$7E:4214] $A0C151 4A LSR A $A0C152 4A LSR A $A0C153 4A LSR A $A0C154 18 CLC $A0C155 69 80 00 ADC #$0080 $A0C158 29 FF 00 AND #$00FF $A0C15B 60 RTS } ;;; ;;; { ; A = C0h - quotient / 8 $A0C15C AD 14 42 LDA $4214 [$7E:4214] $A0C15F 4A LSR A $A0C160 4A LSR A $A0C161 4A LSR A $A0C162 85 12 STA $12 [$7E:0012] $A0C164 A9 C0 00 LDA #$00C0 $A0C167 38 SEC $A0C168 E5 12 SBC $12 [$7E:0012] $A0C16A 29 FF 00 AND #$00FF $A0C16D 60 RTS } ;;; ;;; { ; A = C0h + quotient / 8 $A0C16E AD 14 42 LDA $4214 [$7E:4214] $A0C171 4A LSR A $A0C172 4A LSR A $A0C173 4A LSR A $A0C174 18 CLC $A0C175 69 C0 00 ADC #$00C0 $A0C178 29 FF 00 AND #$00FF $A0C17B 60 RTS } ;;; ;;; { ; A = 100h - quotient / 8 $A0C17C AD 14 42 LDA $4214 [$7E:4214] $A0C17F 4A LSR A $A0C180 4A LSR A $A0C181 4A LSR A $A0C182 85 12 STA $12 [$7E:0012] $A0C184 A9 00 01 LDA #$0100 $A0C187 38 SEC $A0C188 E5 12 SBC $12 [$7E:0012] $A0C18A 29 FF 00 AND #$00FF $A0C18D 60 RTS } ;;; ;;; { ; Determines if enemy is leaving screen $A0C18E BD 7A 0F LDA $0F7A,x[$7E:11BA] $A0C191 30 19 BMI $19 [$C1AC] $A0C193 18 CLC $A0C194 7D 82 0F ADC $0F82,x[$7E:11C2] $A0C197 38 SEC $A0C198 ED 11 09 SBC $0911 [$7E:0911] $A0C19B 30 0F BMI $0F [$C1AC] $A0C19D 38 SEC $A0C19E E9 00 01 SBC #$0100 $A0C1A1 38 SEC $A0C1A2 FD 82 0F SBC $0F82,x[$7E:11C2] $A0C1A5 10 05 BPL $05 [$C1AC] $A0C1A7 A9 00 00 LDA #$0000 $A0C1AA 18 CLC $A0C1AB 6B RTL $A0C1AC A9 01 00 LDA #$0001 $A0C1AF 38 SEC $A0C1B0 6B RTL } ;;; ;;; { $A0C1B1 BD 7E 0F LDA $0F7E,x $A0C1B4 30 19 BMI $19 [$C1CF] $A0C1B6 18 CLC $A0C1B7 7D 84 0F ADC $0F84,x $A0C1BA 38 SEC $A0C1BB ED 15 09 SBC $0915 [$7E:0915] $A0C1BE 30 0F BMI $0F [$C1CF] $A0C1C0 38 SEC $A0C1C1 E9 00 01 SBC #$0100 $A0C1C4 38 SEC $A0C1C5 FD 84 0F SBC $0F84,x $A0C1C8 10 05 BPL $05 [$C1CF] $A0C1CA A9 00 00 LDA #$0000 $A0C1CD 18 CLC $A0C1CE 6B RTL $A0C1CF A9 01 00 LDA #$0001 $A0C1D2 38 SEC $A0C1D3 6B RTL } ;;; ;;; { $A0C1D4 AD C4 09 LDA $09C4 [$7E:09C4] $A0C1D7 8D 04 42 STA $4204 [$7E:4204] $A0C1DA E2 20 SEP #$20 $A0C1DC A9 03 LDA #$03 $A0C1DE 8D 06 42 STA $4206 [$7E:4206] $A0C1E1 C2 20 REP #$20 $A0C1E3 EA NOP $A0C1E4 EA NOP $A0C1E5 EA NOP $A0C1E6 AD 14 42 LDA $4214 [$7E:4214] $A0C1E9 CD C2 09 CMP $09C2 [$7E:09C2] $A0C1EC 90 05 BCC $05 [$C1F3] $A0C1EE A9 01 00 LDA #$0001 $A0C1F1 80 0E BRA $0E [$C201] $A0C1F3 0A ASL A $A0C1F4 CD C2 09 CMP $09C2 [$7E:09C2] $A0C1F7 90 05 BCC $05 [$C1FE] $A0C1F9 A9 02 00 LDA #$0002 $A0C1FC 80 03 BRA $03 [$C201] $A0C1FE A9 03 00 LDA #$0003 $A0C201 85 12 STA $12 [$7E:0012] $A0C203 AD A8 09 LDA $09A8 [$7E:09A8] $A0C206 29 0F 00 AND #$000F $A0C209 49 FF FF EOR #$FFFF $A0C20C 85 16 STA $16 [$7E:0016] $A0C20E AD A4 09 LDA $09A4 [$7E:09A4] $A0C211 49 FF FF EOR #$FFFF $A0C214 85 18 STA $18 [$7E:0018] $A0C216 A9 00 00 LDA #$0000 $A0C219 46 16 LSR $16 [$7E:0016] $A0C21B B0 03 BCS $03 [$C220] $A0C21D 69 02 00 ADC #$0002 $A0C220 46 16 LSR $16 [$7E:0016] $A0C222 B0 03 BCS $03 [$C227] $A0C224 69 01 00 ADC #$0001 $A0C227 46 16 LSR $16 [$7E:0016] $A0C229 B0 03 BCS $03 [$C22E] $A0C22B 69 03 00 ADC #$0003 $A0C22E 46 16 LSR $16 [$7E:0016] $A0C230 B0 03 BCS $03 [$C235] $A0C232 69 03 00 ADC #$0003 $A0C235 46 18 LSR $18 [$7E:0018] $A0C237 B0 03 BCS $03 [$C23C] $A0C239 69 00 00 ADC #$0000 $A0C23C 46 18 LSR $18 [$7E:0018] $A0C23E B0 03 BCS $03 [$C243] $A0C240 69 00 00 ADC #$0000 $A0C243 46 18 LSR $18 [$7E:0018] $A0C245 B0 03 BCS $03 [$C24A] $A0C247 69 00 00 ADC #$0000 $A0C24A 46 18 LSR $18 [$7E:0018] $A0C24C B0 03 BCS $03 [$C251] $A0C24E 69 03 00 ADC #$0003 $A0C251 18 CLC $A0C252 6D CA 09 ADC $09CA [$7E:09CA] $A0C255 18 CLC $A0C256 6D CE 09 ADC $09CE [$7E:09CE] $A0C259 85 14 STA $14 [$7E:0014] $A0C25B C9 0B 00 CMP #$000B $A0C25E 90 09 BCC $09 [$C269] $A0C260 E6 12 INC $12 [$7E:0012] $A0C262 C9 1E 00 CMP #$001E $A0C265 90 02 BCC $02 [$C269] $A0C267 E6 12 INC $12 [$7E:0012] $A0C269 6B RTL } ;;; Enemy instruction AI loop (uses $0F92) ;;; { $A0C26A 8B PHB $A0C26B AE 54 0E LDX $0E54 [$7E:0E54] $A0C26E BD 8A 0F LDA $0F8A,x[$7E:0F8A] ;\ $A0C271 29 04 00 AND #$0004 ;} If doing ice AI: return $A0C274 D0 39 BNE $39 [$C2AF] ;/ $A0C276 DE 94 0F DEC $0F94,x[$7E:0F94] ; Decrement enemy instruction delay $A0C279 D0 36 BNE $36 [$C2B1] ; If not zero: return with enemy graphic update flag cleared $A0C27B BD A5 0F LDA $0FA5,x[$7E:0FA5] ;\ $A0C27E 48 PHA ;| $A0C27F AB PLB ;} DB = enemy bank $A0C280 AB PLB ;/ $A0C281 BC 92 0F LDY $0F92,x[$7E:0F92] ; Y = enemy instruction pointer $A0C284 B9 00 00 LDA $0000,y[$A6:F610] ;\ $A0C287 10 0C BPL $0C [$C295] ;} If negative: $A0C289 8D 84 17 STA $1784 [$7E:1784] ;\ $A0C28C C8 INY ;| $A0C28D C8 INY ;| $A0C28E 4B PHK ;} Execute instruction with Y = pointer to parameter and loop $A0C28F F4 83 C2 PEA $C283 ;| $A0C292 DC 84 17 JML [$1784][$A6:F68B] ;/ $A0C295 9D 94 0F STA $0F94,x[$7E:0F94] ; Set delay for enemy graphic update $A0C298 B9 02 00 LDA $0002,y[$A6:F614] ;\ $A0C29B 9D 8E 0F STA $0F8E,x[$7E:0F8E] ;} Set enemy OAM / hitbox pointer $A0C29E 98 TYA ;\ $A0C29F 18 CLC ;| $A0C2A0 69 04 00 ADC #$0004 ;} Increment enemy instruction pointer $A0C2A3 9D 92 0F STA $0F92,x[$7E:0F92] ;/ $A0C2A6 BD 88 0F LDA $0F88,x[$7E:0F88] ;\ $A0C2A9 09 00 80 ORA #$8000 ;} Set enemy graphic updated flag $A0C2AC 9D 88 0F STA $0F88,x[$7E:0F88] ;/ ; Where enemy instruction: kill returns too $A0C2AF AB PLB $A0C2B0 60 RTS $A0C2B1 BD 88 0F LDA $0F88,x[$7E:0FC8] $A0C2B4 29 FF 7F AND #$7FFF $A0C2B7 9D 88 0F STA $0F88,x[$7E:0FC8] $A0C2BA AB PLB $A0C2BB 60 RTS } ;;; Clear carry ;;; { $A0C2BC 18 CLC $A0C2BD 60 RTS } ;;; Set carry ;;; { $A0C2BE 38 SEC $A0C2BF 60 RTS } ;;; Enemy block collision reaction - spike ;;; { ; Load ($A0C2DA,X), X = 2*(BTS & 7F). ; If 0000, act as solid, else make a PLM with it and act as passable. ; BTS == 0F: Break this block $A0C2C0 AE C4 0D LDX $0DC4 [$7E:0DC4] $A0C2C3 BF 02 64 7F LDA $7F6402,x[$7F:65E4] $A0C2C7 29 7F 00 AND #$007F $A0C2CA 0A ASL A $A0C2CB AA TAX $A0C2CC BF DA C2 A0 LDA $A0C2DA,x[$A0:C2DA] $A0C2D0 F0 06 BEQ $06 [$C2D8] $A0C2D2 22 E7 84 84 JSL $8484E7[$84:84E7] $A0C2D6 18 CLC $A0C2D7 60 RTS $A0C2D8 38 SEC $A0C2D9 60 RTS $A0C2DA dw 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, D094 } ;;; Enemy block collision horizontal reaction - slope ;;; { $A0C2FA AE C4 0D LDX $0DC4 [$7E:0DC4] $A0C2FD BF 02 64 7F LDA $7F6402,x[$7F:6A6C] $A0C301 29 1F 00 AND #$001F $A0C304 C9 05 00 CMP #$0005 $A0C307 B0 03 BCS $03 [$C30C] $A0C309 4C 2E C3 JMP $C32E [$A0:C32E] $A0C30C BF 02 64 7F LDA $7F6402,x[$7F:6A6C] $A0C310 29 FF 00 AND #$00FF $A0C313 8D 77 1E STA $1E77 [$7E:1E77] $A0C316 4C 49 C4 JMP $C449 [$A0:C449] } ;;; Enemy block collision vertical reaction - slope ;;; { $A0C319 AE C4 0D LDX $0DC4 [$7E:0DC4] $A0C31C BF 02 64 7F LDA $7F6402,x[$7F:65D7] $A0C320 29 1F 00 AND #$001F $A0C323 C9 05 00 CMP #$0005 $A0C326 B0 03 BCS $03 [$C32B] $A0C328 4C B2 C3 JMP $C3B2 [$A0:C3B2] $A0C32B 4C 1F C5 JMP $C51F [$A0:C51F] } ;;; Enemy block collision horizontal reaction - slope - square ;;; { $A0C32E 0A ASL A $A0C32F 0A ASL A $A0C330 8D D4 0D STA $0DD4 [$7E:0DD4] $A0C333 BF 01 64 7F LDA $7F6401,x[$7F:6BB7] $A0C337 2A ROL A $A0C338 2A ROL A $A0C339 2A ROL A $A0C33A 29 03 00 AND #$0003 $A0C33D 8D D6 0D STA $0DD6 [$7E:0DD6] $A0C340 A5 1A LDA $1A [$7E:001A] $A0C342 29 08 00 AND #$0008 $A0C345 4A LSR A $A0C346 4A LSR A $A0C347 4A LSR A $A0C348 4D D6 0D EOR $0DD6 [$7E:0DD6] $A0C34B 6D D4 0D ADC $0DD4 [$7E:0DD4] $A0C34E AA TAX $A0C34F AC 54 0E LDY $0E54 [$7E:0E54] $A0C352 A5 1C LDA $1C [$7E:001C] $A0C354 D0 15 BNE $15 [$C36B] $A0C356 B9 7E 0F LDA $0F7E,y[$7E:103E] $A0C359 18 CLC $A0C35A 79 84 0F ADC $0F84,y[$7E:1044] $A0C35D 3A DEC A $A0C35E 29 08 00 AND #$0008 $A0C361 D0 18 BNE $18 [$C37B] $A0C363 BF 34 C4 A0 LDA $A0C434,x[$A0:C442] $A0C367 30 25 BMI $25 [$C38E] $A0C369 80 21 BRA $21 [$C38C] $A0C36B C5 1E CMP $1E [$7E:001E] $A0C36D D0 0C BNE $0C [$C37B] $A0C36F B9 7E 0F LDA $0F7E,y[$7E:0FFE] $A0C372 38 SEC $A0C373 F9 84 0F SBC $0F84,y[$7E:1004] $A0C376 29 08 00 AND #$0008 $A0C379 D0 06 BNE $06 [$C381] $A0C37B BF 34 C4 A0 LDA $A0C434,x[$A0:C442] $A0C37F 30 0D BMI $0D [$C38E] $A0C381 8A TXA $A0C382 49 02 00 EOR #$0002 $A0C385 AA TAX $A0C386 BF 34 C4 A0 LDA $A0C434,x[$A0:C440] $A0C38A 30 02 BMI $02 [$C38E] $A0C38C 18 CLC $A0C38D 60 RTS $A0C38E 38 SEC $A0C38F 60 RTS } ;;; ;;; { $A0C390 BB TYX $A0C391 9E 7C 0F STZ $0F7C,x $A0C394 A5 1A LDA $1A [$7E:001A] $A0C396 24 14 BIT $14 [$7E:0014] $A0C398 30 0C BMI $0C [$C3A6] $A0C39A 29 F8 FF AND #$FFF8 $A0C39D 38 SEC $A0C39E FD 82 0F SBC $0F82,x $A0C3A1 9D 7A 0F STA $0F7A,x $A0C3A4 38 SEC $A0C3A5 60 RTS $A0C3A6 09 07 00 ORA #$0007 $A0C3A9 38 SEC $A0C3AA 7D 82 0F ADC $0F82,x $A0C3AD 9D 7A 0F STA $0F7A,x $A0C3B0 38 SEC $A0C3B1 60 RTS } ;;; Enemy block collision vertical reaction - slope - square ;;; { $A0C3B2 0A ASL A $A0C3B3 0A ASL A $A0C3B4 8D D4 0D STA $0DD4 [$7E:0DD4] $A0C3B7 BF 01 64 7F LDA $7F6401,x[$7F:65D6] $A0C3BB 2A ROL A $A0C3BC 2A ROL A $A0C3BD 2A ROL A $A0C3BE 29 03 00 AND #$0003 $A0C3C1 8D D6 0D STA $0DD6 [$7E:0DD6] $A0C3C4 A5 1A LDA $1A [$7E:001A] $A0C3C6 29 08 00 AND #$0008 $A0C3C9 4A LSR A $A0C3CA 4A LSR A $A0C3CB 4D D6 0D EOR $0DD6 [$7E:0DD6] $A0C3CE 6D D4 0D ADC $0DD4 [$7E:0DD4] $A0C3D1 AA TAX $A0C3D2 AC 54 0E LDY $0E54 [$7E:0E54] $A0C3D5 A5 1C LDA $1C [$7E:001C] $A0C3D7 D0 15 BNE $15 [$C3EE] $A0C3D9 B9 7A 0F LDA $0F7A,y[$7E:0FFA] $A0C3DC 18 CLC $A0C3DD 79 82 0F ADC $0F82,y[$7E:1002] $A0C3E0 3A DEC A $A0C3E1 29 08 00 AND #$0008 $A0C3E4 D0 18 BNE $18 [$C3FE] $A0C3E6 BF 34 C4 A0 LDA $A0C434,x[$A0:C442] $A0C3EA 30 25 BMI $25 [$C411] $A0C3EC 80 21 BRA $21 [$C40F] $A0C3EE C5 1E CMP $1E [$7E:001E] $A0C3F0 D0 0C BNE $0C [$C3FE] $A0C3F2 B9 7A 0F LDA $0F7A,y[$7E:0F7A] $A0C3F5 38 SEC $A0C3F6 F9 82 0F SBC $0F82,y[$7E:0F82] $A0C3F9 29 08 00 AND #$0008 $A0C3FC D0 06 BNE $06 [$C404] $A0C3FE BF 34 C4 A0 LDA $A0C434,x[$A0:C436] $A0C402 30 0D BMI $0D [$C411] $A0C404 8A TXA $A0C405 49 01 00 EOR #$0001 $A0C408 AA TAX $A0C409 BF 34 C4 A0 LDA $A0C434,x[$A0:C43F] $A0C40D 30 02 BMI $02 [$C411] $A0C40F 18 CLC $A0C410 60 RTS $A0C411 38 SEC $A0C412 60 RTS } ;;; ;;; { $A0C413 BB TYX $A0C414 9E 80 0F STZ $0F80,x $A0C417 A5 1A LDA $1A [$7E:001A] $A0C419 24 14 BIT $14 [$7E:0014] $A0C41B 30 0C BMI $0C [$C429] $A0C41D 29 F8 FF AND #$FFF8 $A0C420 38 SEC $A0C421 FD 84 0F SBC $0F84,x $A0C424 9D 7E 0F STA $0F7E,x $A0C427 38 SEC $A0C428 60 RTS $A0C429 09 07 00 ORA #$0007 $A0C42C 38 SEC $A0C42D 7D 84 0F ADC $0F84,x $A0C430 9D 7E 0F STA $0F7E,x $A0C433 38 SEC $A0C434 60 RTS } ;;; ;;; { $A0C435 db 00, 01, 82, 83, 00, 81, 02, 83, 00, 01, 02, 83, 00, 81, 82, 83, 80, 81, 82, 83 } ;;; Enemy block collision horizontal reaction - slope - non-square ;;; { $A0C449 24 20 BIT $20 [$7E:0020] $A0C44B 30 06 BMI $06 [$C453] $A0C44D 70 02 BVS $02 [$C451] $A0C44F 18 CLC $A0C450 60 RTS $A0C451 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A0C453 AD 77 1E LDA $1E77 [$7E:1E77] $A0C456 29 1F 00 AND #$001F $A0C459 0A ASL A $A0C45A 0A ASL A $A0C45B AA TAX $A0C45C A5 14 LDA $14 [$7E:0014] $A0C45E 10 28 BPL $28 [$C488] $A0C460 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $A0C488 BF A1 C4 A0 LDA $A0C4A1,x[$A0:C4E9] $A0C48C A8 TAY $A0C48D A5 13 LDA $13 [$7E:0013] $A0C48F 22 D6 82 80 JSL $8082D6[$80:82D6] $A0C493 AD F1 05 LDA $05F1 [$7E:05F1] $A0C496 85 12 STA $12 [$7E:0012] $A0C498 AD F3 05 LDA $05F3 [$7E:05F3] $A0C49B 85 14 STA $14 [$7E:0014] $A0C49D 18 CLC $A0C49E 60 RTS } ;;; ;;; { $A0C49F dw 0000, 0100, 0000, 0100, 0000, 0100, 0000, 0100, 0000, 0100, 0000, 0100, 0000, 0100, 0000, 0100, 0000, 0100, 0000, 0100, 0000, 0100, 0000, 0100, 0000, 0100, 0000, 0100, 1000, 00B0, 1000, 00B0, 0000, 0100, 0000, 0100, 1000, 00C0, 0000, 0100, 1000, 00C0, 1000, 00C0, 0800, 00D8, 0800, 00D8, 0600, 00F0, 0600, 00F0, 0600, 00F0, 4000, 0080, 4000, 0080, 6000, 0050, 6000, 0050, 6000, 0050 } ;;; Enemy block collision vertical reaction - slope - non-square ;;; { $A0C51F AC 54 0E LDY $0E54 [$7E:0E54] $A0C522 A5 14 LDA $14 [$7E:0014] $A0C524 10 03 BPL $03 [$C529] $A0C526 4C 9E C5 JMP $C59E [$A0:C59E] $A0C529 AE C4 0D LDX $0DC4 [$7E:0DC4] $A0C52C 8E 04 42 STX $4204 [$7E:4204] $A0C52F E2 20 SEP #$20 $A0C531 AD A5 07 LDA $07A5 [$7E:07A5] $A0C534 8D 06 42 STA $4206 [$7E:4206] $A0C537 C2 20 REP #$20 $A0C539 B9 7A 0F LDA $0F7A,y[$7E:107A] $A0C53C 4A LSR A $A0C53D 4A LSR A $A0C53E 4A LSR A $A0C53F 4A LSR A $A0C540 CD 16 42 CMP $4216 [$7E:4216] $A0C543 F0 02 BEQ $02 [$C547] $A0C545 18 CLC $A0C546 60 RTS $A0C547 A5 18 LDA $18 [$7E:0018] $A0C549 18 CLC $A0C54A 79 84 0F ADC $0F84,y[$7E:0FC4] $A0C54D 3A DEC A $A0C54E 29 0F 00 AND #$000F $A0C551 8D D4 0D STA $0DD4 [$7E:0DD4] $A0C554 BF 02 64 7F LDA $7F6402,x[$7F:6713] $A0C558 29 1F 00 AND #$001F $A0C55B 0A ASL A $A0C55C 0A ASL A $A0C55D 0A ASL A $A0C55E 0A ASL A $A0C55F 8D D6 0D STA $0DD6 [$7E:0DD6] $A0C562 BF 01 64 7F LDA $7F6401,x[$7F:6712] $A0C566 30 34 BMI $34 [$C59C] $A0C568 0A ASL A $A0C569 30 05 BMI $05 [$C570] $A0C56B B9 7A 0F LDA $0F7A,y[$7E:0FBA] $A0C56E 80 06 BRA $06 [$C576] $A0C570 B9 7A 0F LDA $0F7A,y[$7E:0FBA] $A0C573 49 0F 00 EOR #$000F $A0C576 29 0F 00 AND #$000F $A0C579 18 CLC $A0C57A 6D D6 0D ADC $0DD6 [$7E:0DD6] $A0C57D AA TAX $A0C57E BF 2B 8B 94 LDA $948B2B,x[$94:8C6A] $A0C582 29 1F 00 AND #$001F $A0C585 38 SEC $A0C586 ED D4 0D SBC $0DD4 [$7E:0DD4] $A0C589 3A DEC A $A0C58A F0 02 BEQ $02 [$C58E] $A0C58C 10 0E BPL $0E [$C59C] $A0C58E 18 CLC $A0C58F 65 18 ADC $18 [$7E:0018] $A0C591 99 7E 0F STA $0F7E,y[$7E:0FBE] $A0C594 A9 FF FF LDA #$FFFF $A0C597 99 80 0F STA $0F80,y[$7E:0FC0] $A0C59A 38 SEC $A0C59B 60 RTS $A0C59C 18 CLC $A0C59D 60 RTS $A0C59E AE C4 0D LDX $0DC4 [$7E:0DC4] $A0C5A1 8E 04 42 STX $4204 [$7E:4204] $A0C5A4 E2 20 SEP #$20 $A0C5A6 AD A5 07 LDA $07A5 [$7E:07A5] $A0C5A9 8D 06 42 STA $4206 [$7E:4206] $A0C5AC C2 20 REP #$20 $A0C5AE B9 7A 0F LDA $0F7A,y[$7E:0F7A] $A0C5B1 4A LSR A $A0C5B2 4A LSR A $A0C5B3 4A LSR A $A0C5B4 4A LSR A $A0C5B5 CD 16 42 CMP $4216 [$7E:4216] $A0C5B8 F0 02 BEQ $02 [$C5BC] $A0C5BA 18 CLC $A0C5BB 60 RTS $A0C5BC A5 18 LDA $18 [$7E:0018] $A0C5BE 38 SEC $A0C5BF F9 84 0F SBC $0F84,y[$7E:0F84] $A0C5C2 29 0F 00 AND #$000F $A0C5C5 49 0F 00 EOR #$000F $A0C5C8 8D D4 0D STA $0DD4 [$7E:0DD4] $A0C5CB BF 02 64 7F LDA $7F6402,x[$7F:6A6C] $A0C5CF 29 1F 00 AND #$001F $A0C5D2 0A ASL A $A0C5D3 0A ASL A $A0C5D4 0A ASL A $A0C5D5 0A ASL A $A0C5D6 8D D6 0D STA $0DD6 [$7E:0DD6] $A0C5D9 BF 01 64 7F LDA $7F6401,x[$7F:6A6B] $A0C5DD 10 38 BPL $38 [$C617] $A0C5DF 0A ASL A $A0C5E0 30 05 BMI $05 [$C5E7] $A0C5E2 B9 7A 0F LDA $0F7A,y[$7E:0F7A] $A0C5E5 80 06 BRA $06 [$C5ED] $A0C5E7 B9 7A 0F LDA $0F7A,y[$7E:0F7A] $A0C5EA 49 0F 00 EOR #$000F $A0C5ED 29 0F 00 AND #$000F $A0C5F0 18 CLC $A0C5F1 6D D6 0D ADC $0DD6 [$7E:0DD6] $A0C5F4 AA TAX $A0C5F5 BF 2B 8B 94 LDA $948B2B,x[$94:8C4D] $A0C5F9 29 1F 00 AND #$001F $A0C5FC 38 SEC $A0C5FD ED D4 0D SBC $0DD4 [$7E:0DD4] $A0C600 3A DEC A $A0C601 F0 02 BEQ $02 [$C605] $A0C603 10 12 BPL $12 [$C617] $A0C605 49 FF FF EOR #$FFFF $A0C608 1A INC A $A0C609 18 CLC $A0C60A 65 18 ADC $18 [$7E:0018] $A0C60C 99 7E 0F STA $0F7E,y[$7E:0F7E] $A0C60F A9 00 00 LDA #$0000 $A0C612 99 80 0F STA $0F80,y[$7E:0F80] $A0C615 38 SEC $A0C616 60 RTS $A0C617 18 CLC $A0C618 60 RTS } ;;; Enemy block collision reaction - horizontal extension ;;; { ; Adjust horizontal position according to BTS and go to the pointed-to block's code $A0C619 AE C4 0D LDX $0DC4 [$7E:0DC4] $A0C61C BF 02 64 7F LDA $7F6402,x[$7F:6642] $A0C620 29 FF 00 AND #$00FF $A0C623 F0 28 BEQ $28 [$C64D] $A0C625 89 80 00 BIT #$0080 $A0C628 D0 05 BNE $05 [$C62F] $A0C62A 29 FF 00 AND #$00FF $A0C62D 80 03 BRA $03 [$C632] $A0C62F 09 00 FF ORA #$FF00 $A0C632 18 CLC $A0C633 6D C4 0D ADC $0DC4 [$7E:0DC4] $A0C636 8D C4 0D STA $0DC4 [$7E:0DC4] $A0C639 0A ASL A $A0C63A AA TAX $A0C63B BF 02 00 7F LDA $7F0002,x[$7F:0480] $A0C63F 29 00 F0 AND #$F000 $A0C642 EB XBA $A0C643 4A LSR A $A0C644 4A LSR A $A0C645 4A LSR A $A0C646 AA TAX $A0C647 68 PLA $A0C648 38 SEC $A0C649 E9 03 00 SBC #$0003 $A0C64C 48 PHA $A0C64D 18 CLC $A0C64E 60 RTS } ;;; Enemy block collision reaction - vertical extension ;;; { ; Adjust vertical position according to BTS and go to the pointed-to block's code $A0C64F AE C4 0D LDX $0DC4 [$7E:0DC4] $A0C652 BF 02 64 7F LDA $7F6402,x[$7F:6BB3] $A0C656 29 FF 00 AND #$00FF $A0C659 F0 40 BEQ $40 [$C69B] $A0C65B 89 80 00 BIT #$0080 $A0C65E D0 12 BNE $12 [$C672] $A0C660 8D D4 0D STA $0DD4 [$7E:0DD4] $A0C663 AD C4 0D LDA $0DC4 [$7E:0DC4] $A0C666 18 CLC $A0C667 6D A5 07 ADC $07A5 [$7E:07A5] $A0C66A CE D4 0D DEC $0DD4 [$7E:0DD4] $A0C66D D0 F7 BNE $F7 [$C666] $A0C66F 4C 84 C6 JMP $C684 [$A0:C684] $A0C672 09 00 FF ORA #$FF00 $A0C675 8D D4 0D STA $0DD4 [$7E:0DD4] $A0C678 AD C4 0D LDA $0DC4 [$7E:0DC4] $A0C67B 38 SEC $A0C67C ED A5 07 SBC $07A5 [$7E:07A5] $A0C67F EE D4 0D INC $0DD4 [$7E:0DD4] $A0C682 D0 F7 BNE $F7 [$C67B] $A0C684 8D C4 0D STA $0DC4 [$7E:0DC4] $A0C687 0A ASL A $A0C688 AA TAX $A0C689 BF 02 00 7F LDA $7F0002,x[$7F:0E44] $A0C68D 29 00 F0 AND #$F000 $A0C690 EB XBA $A0C691 4A LSR A $A0C692 4A LSR A $A0C693 4A LSR A $A0C694 AA TAX $A0C695 68 PLA $A0C696 38 SEC $A0C697 E9 03 00 SBC #$0003 $A0C69A 48 PHA $A0C69B 18 CLC $A0C69C 60 RTS } ;;; ;;; { $A0C69D A9 00 40 LDA #$4000 $A0C6A0 85 20 STA $20 [$7E:0020] $A0C6A2 80 09 BRA $09 [$C6AD] } ;;; ;;; { $A0C6A4 A9 00 80 LDA #$8000 $A0C6A7 85 20 STA $20 [$7E:0020] $A0C6A9 80 02 BRA $02 [$C6AD] } ;;; Common horizontal movement routine, moves by $14.$12 ;;; { $A0C6AB 64 20 STZ $20 [$7E:0020] $A0C6AD A5 12 LDA $12 [$7E:0012] $A0C6AF 05 14 ORA $14 [$7E:0014] $A0C6B1 D0 02 BNE $02 [$C6B5] $A0C6B3 18 CLC $A0C6B4 6B RTL $A0C6B5 DA PHX $A0C6B6 BD 7E 0F LDA $0F7E,x[$7E:0F7E] $A0C6B9 38 SEC $A0C6BA FD 84 0F SBC $0F84,x[$7E:0F84] $A0C6BD 29 F0 FF AND #$FFF0 $A0C6C0 85 1C STA $1C [$7E:001C] $A0C6C2 BD 7E 0F LDA $0F7E,x[$7E:0F7E] $A0C6C5 18 CLC $A0C6C6 7D 84 0F ADC $0F84,x[$7E:0F84] $A0C6C9 3A DEC A $A0C6CA 38 SEC $A0C6CB E5 1C SBC $1C [$7E:001C] $A0C6CD 4A LSR A $A0C6CE 4A LSR A $A0C6CF 4A LSR A $A0C6D0 4A LSR A $A0C6D1 85 1C STA $1C [$7E:001C] $A0C6D3 85 1E STA $1E [$7E:001E] $A0C6D5 BD 7E 0F LDA $0F7E,x[$7E:0F7E] $A0C6D8 38 SEC $A0C6D9 FD 84 0F SBC $0F84,x[$7E:0F84] $A0C6DC 4A LSR A $A0C6DD 4A LSR A $A0C6DE 4A LSR A $A0C6DF 4A LSR A $A0C6E0 E2 20 SEP #$20 $A0C6E2 8D 02 42 STA $4202 [$7E:4202] $A0C6E5 AD A5 07 LDA $07A5 [$7E:07A5] $A0C6E8 8D 03 42 STA $4203 [$7E:4203] $A0C6EB C2 20 REP #$20 $A0C6ED BD 7C 0F LDA $0F7C,x[$7E:0F7C] $A0C6F0 18 CLC $A0C6F1 65 12 ADC $12 [$7E:0012] $A0C6F3 85 16 STA $16 [$7E:0016] $A0C6F5 BD 7A 0F LDA $0F7A,x[$7E:0F7A] $A0C6F8 65 14 ADC $14 [$7E:0014] $A0C6FA 85 18 STA $18 [$7E:0018] $A0C6FC 24 14 BIT $14 [$7E:0014] $A0C6FE 30 07 BMI $07 [$C707] $A0C700 18 CLC $A0C701 7D 82 0F ADC $0F82,x[$7E:0F82] $A0C704 3A DEC A $A0C705 80 04 BRA $04 [$C70B] $A0C707 38 SEC $A0C708 FD 82 0F SBC $0F82,x[$7E:1002] $A0C70B 85 1A STA $1A [$7E:001A] $A0C70D 4A LSR A $A0C70E 4A LSR A $A0C70F 4A LSR A $A0C710 4A LSR A $A0C711 18 CLC $A0C712 6D 16 42 ADC $4216 [$7E:4216] $A0C715 0A ASL A $A0C716 AA TAX $A0C717 BF 02 00 7F LDA $7F0002,x[$7F:0230] $A0C71B 20 45 C8 JSR $C845 [$A0:C845] $A0C71E B0 24 BCS $24 [$C744] $A0C720 8A TXA $A0C721 18 CLC $A0C722 6D A5 07 ADC $07A5 [$7E:07A5] $A0C725 6D A5 07 ADC $07A5 [$7E:07A5] $A0C728 AA TAX $A0C729 C6 1C DEC $1C [$7E:001C] $A0C72B 10 EA BPL $EA [$C717] $A0C72D FA PLX $A0C72E A5 12 LDA $12 [$7E:0012] $A0C730 18 CLC $A0C731 7D 7C 0F ADC $0F7C,x[$7E:0F7C] $A0C734 9D 7C 0F STA $0F7C,x[$7E:0F7C] $A0C737 A5 14 LDA $14 [$7E:0014] $A0C739 7D 7A 0F ADC $0F7A,x[$7E:0F7A] $A0C73C 9D 7A 0F STA $0F7A,x[$7E:0F7A] $A0C73F 18 CLC $A0C740 6B RTL $A0C744 FA PLX $A0C745 A5 1A LDA $1A [$7E:001A] $A0C747 24 14 BIT $14 [$7E:0014] $A0C749 30 17 BMI $17 [$C762] $A0C74B 29 F0 FF AND #$FFF0 $A0C74E 38 SEC $A0C74F FD 82 0F SBC $0F82,x[$7E:0FC2] $A0C752 DD 7A 0F CMP $0F7A,x[$7E:0FBA] $A0C755 90 03 BCC $03 [$C75A] $A0C757 9D 7A 0F STA $0F7A,x[$7E:0FBA] $A0C75A A9 FF FF LDA #$FFFF $A0C75D 9D 7C 0F STA $0F7C,x[$7E:0FBC] $A0C760 38 SEC $A0C761 6B RTL $A0C762 09 0F 00 ORA #$000F $A0C765 38 SEC $A0C766 7D 82 0F ADC $0F82,x[$7E:0FC2] $A0C769 DD 7A 0F CMP $0F7A,x[$7E:0FBA] $A0C76C F0 02 BEQ $02 [$C770] $A0C76E B0 03 BCS $03 [$C773] $A0C770 9D 7A 0F STA $0F7A,x[$7E:0FBA] $A0C773 9E 7C 0F STZ $0F7C,x[$7E:0FBC] $A0C776 38 SEC $A0C777 6B RTL } ;;; ;;; { $A0C778 A9 00 40 LDA #$4000 $A0C77B 85 20 STA $20 [$7E:0020] $A0C77D 80 09 BRA $09 [$C788] } ;;; ;;; { $A0C77F A9 00 80 LDA #$8000 $A0C782 85 20 STA $20 [$7E:0020] $A0C784 80 02 BRA $02 [$C788] } ;;; Common vertical movement routine, moves by $14.$12 ;;; { $A0C786 64 20 STZ $20 [$7E:0020] $A0C788 A5 12 LDA $12 [$7E:0012] $A0C78A 05 14 ORA $14 [$7E:0014] $A0C78C D0 02 BNE $02 [$C790] $A0C78E 18 CLC $A0C78F 6B RTL $A0C790 DA PHX $A0C791 BD 7A 0F LDA $0F7A,x[$7E:0F7A] $A0C794 38 SEC $A0C795 FD 82 0F SBC $0F82,x[$7E:0F82] $A0C798 29 F0 FF AND #$FFF0 $A0C79B 85 1C STA $1C [$7E:001C] $A0C79D BD 7A 0F LDA $0F7A,x[$7E:0F7A] $A0C7A0 18 CLC $A0C7A1 7D 82 0F ADC $0F82,x[$7E:0F82] $A0C7A4 3A DEC A $A0C7A5 38 SEC $A0C7A6 E5 1C SBC $1C [$7E:001C] $A0C7A8 4A LSR A $A0C7A9 4A LSR A $A0C7AA 4A LSR A $A0C7AB 4A LSR A $A0C7AC 85 1C STA $1C [$7E:001C] $A0C7AE 85 1E STA $1E [$7E:001E] $A0C7B0 BD 80 0F LDA $0F80,x[$7E:0F80] $A0C7B3 18 CLC $A0C7B4 65 12 ADC $12 [$7E:0012] $A0C7B6 85 16 STA $16 [$7E:0016] $A0C7B8 BD 7E 0F LDA $0F7E,x[$7E:0F7E] $A0C7BB 65 14 ADC $14 [$7E:0014] $A0C7BD 85 18 STA $18 [$7E:0018] $A0C7BF 24 14 BIT $14 [$7E:0014] $A0C7C1 30 07 BMI $07 [$C7CA] $A0C7C3 18 CLC $A0C7C4 7D 84 0F ADC $0F84,x[$7E:0F84] $A0C7C7 3A DEC A $A0C7C8 80 04 BRA $04 [$C7CE] $A0C7CA 38 SEC $A0C7CB FD 84 0F SBC $0F84,x[$7E:0FC4] $A0C7CE 85 1A STA $1A [$7E:001A] $A0C7D0 4A LSR A $A0C7D1 4A LSR A $A0C7D2 4A LSR A $A0C7D3 4A LSR A $A0C7D4 E2 20 SEP #$20 $A0C7D6 8D 02 42 STA $4202 [$7E:4202] $A0C7D9 AD A5 07 LDA $07A5 [$7E:07A5] $A0C7DC 8D 03 42 STA $4203 [$7E:4203] $A0C7DF C2 20 REP #$20 $A0C7E1 BD 7A 0F LDA $0F7A,x[$7E:0F7A] $A0C7E4 38 SEC $A0C7E5 FD 82 0F SBC $0F82,x[$7E:0F82] $A0C7E8 4A LSR A $A0C7E9 4A LSR A $A0C7EA 4A LSR A $A0C7EB 4A LSR A $A0C7EC 18 CLC $A0C7ED 6D 16 42 ADC $4216 [$7E:4216] $A0C7F0 0A ASL A $A0C7F1 AA TAX $A0C7F2 BF 02 00 7F LDA $7F0002,x[$7F:03AC] $A0C7F6 20 79 C8 JSR $C879 [$A0:C879] $A0C7F9 B0 16 BCS $16 [$C811] $A0C7FB E8 INX $A0C7FC E8 INX $A0C7FD C6 1C DEC $1C [$7E:001C] $A0C7FF 10 F1 BPL $F1 [$C7F2] $A0C801 FA PLX $A0C802 A5 16 LDA $16 [$7E:0016] $A0C804 9D 80 0F STA $0F80,x[$7E:0FC0] $A0C807 A5 18 LDA $18 [$7E:0018] $A0C809 9D 7E 0F STA $0F7E,x[$7E:0FBE] $A0C80C 18 CLC $A0C80D 6B RTL $A0C811 FA PLX $A0C812 A5 1A LDA $1A [$7E:001A] $A0C814 24 14 BIT $14 [$7E:0014] $A0C816 30 17 BMI $17 [$C82F] $A0C818 29 F0 FF AND #$FFF0 $A0C81B 38 SEC $A0C81C FD 84 0F SBC $0F84,x[$7E:0F84] $A0C81F DD 7E 0F CMP $0F7E,x[$7E:0F7E] $A0C822 90 03 BCC $03 [$C827] $A0C824 9D 7E 0F STA $0F7E,x[$7E:0F7E] $A0C827 A9 FF FF LDA #$FFFF $A0C82A 9D 80 0F STA $0F80,x[$7E:0F80] $A0C82D 38 SEC $A0C82E 6B RTL $A0C82F 09 0F 00 ORA #$000F $A0C832 38 SEC $A0C833 7D 84 0F ADC $0F84,x[$7E:0FC4] $A0C836 DD 7E 0F CMP $0F7E,x[$7E:0FBE] $A0C839 F0 02 BEQ $02 [$C83D] $A0C83B B0 03 BCS $03 [$C840] $A0C83D 9D 7E 0F STA $0F7E,x[$7E:0FBE] $A0C840 9E 80 0F STZ $0F80,x[$7E:0FC0] $A0C843 38 SEC $A0C844 6B RTL } ;;; ;;; { ; Store X/2 to nth block. Execute code dependant on type of block given in A $A0C845 DA PHX $A0C846 9B TXY $A0C847 29 00 F0 AND #$F000 $A0C84A EB XBA $A0C84B 4A LSR A $A0C84C 4A LSR A $A0C84D 4A LSR A $A0C84E AA TAX $A0C84F 98 TYA $A0C850 4A LSR A $A0C851 8D C4 0D STA $0DC4 [$7E:0DC4] $A0C854 FC 59 C8 JSR ($C859,x)[$A0:C2BC] $A0C857 FA PLX $A0C858 60 RTS $A0C859 dw C2BC, C2FA, C2BC, C2BC, C2BC, C619, C2BC, C2BC, C2BE, C2BE, C2C0, C2BE, C2BE, C64F, C2BE, C2BE } ;;; ;;; { ; Store X/2 to nth block. Execute code dependant on type of block given in A $A0C879 DA PHX $A0C87A 9B TXY $A0C87B 29 00 F0 AND #$F000 $A0C87E EB XBA $A0C87F 4A LSR A $A0C880 4A LSR A $A0C881 4A LSR A $A0C882 AA TAX $A0C883 98 TYA $A0C884 4A LSR A $A0C885 8D C4 0D STA $0DC4 [$7E:0DC4] $A0C888 FC 8D C8 JSR ($C88D,x)[$A0:C319] $A0C88B FA PLX $A0C88C 60 RTS $A0C88D dw C2BC, C319, C2BC, C2BC, C2BC, C619, C2BC, C2BC, C2BE, C2BE, C2C0, C2BE, C2BE, C64F, C2BE, C2BE } ;;; ;;; { ; X must hold enemy pointer. ; Align enemy vertically to slopes if currently in contact with slopes $A0C8AD 5A PHY $A0C8AE DA PHX $A0C8AF 18 CLC $A0C8B0 08 PHP $A0C8B1 9B TXY $A0C8B2 B9 7A 0F LDA $0F7A,y[$7E:0F7A] $A0C8B5 48 PHA $A0C8B6 B9 7E 0F LDA $0F7E,y[$7E:0F7E] $A0C8B9 18 CLC $A0C8BA 79 84 0F ADC $0F84,y[$7E:0F84] $A0C8BD 3A DEC A $A0C8BE 48 PHA $A0C8BF 22 70 BB A0 JSL $A0BB70[$A0:BB70] $A0C8C3 AD C4 0D LDA $0DC4 [$7E:0DC4] $A0C8C6 0A ASL A $A0C8C7 AA TAX $A0C8C8 BF 02 00 7F LDA $7F0002,x[$7F:00EC] $A0C8CC 29 00 F0 AND #$F000 $A0C8CF C9 00 10 CMP #$1000 $A0C8D2 D0 5F BNE $5F [$C933] $A0C8D4 AE C4 0D LDX $0DC4 [$7E:0DC4] $A0C8D7 BF 02 64 7F LDA $7F6402,x[$7F:6A6C] $A0C8DB 29 1F 00 AND #$001F $A0C8DE C9 05 00 CMP #$0005 $A0C8E1 90 50 BCC $50 [$C933] $A0C8E3 28 PLP $A0C8E4 38 SEC $A0C8E5 08 PHP $A0C8E6 B9 7E 0F LDA $0F7E,y[$7E:0F7E] $A0C8E9 18 CLC $A0C8EA 79 84 0F ADC $0F84,y[$7E:0F84] $A0C8ED 3A DEC A $A0C8EE 29 0F 00 AND #$000F $A0C8F1 8D D4 0D STA $0DD4 [$7E:0DD4] $A0C8F4 BF 02 64 7F LDA $7F6402,x[$7F:6A6C] $A0C8F8 29 1F 00 AND #$001F $A0C8FB 0A ASL A $A0C8FC 0A ASL A $A0C8FD 0A ASL A $A0C8FE 0A ASL A $A0C8FF 8D D6 0D STA $0DD6 [$7E:0DD6] $A0C902 BF 01 64 7F LDA $7F6401,x[$7F:6A6B] $A0C906 30 2B BMI $2B [$C933] $A0C908 0A ASL A $A0C909 30 05 BMI $05 [$C910] $A0C90B B9 7A 0F LDA $0F7A,y[$7E:0FBA] $A0C90E 80 06 BRA $06 [$C916] $A0C910 B9 7A 0F LDA $0F7A,y[$7E:0FBA] $A0C913 49 0F 00 EOR #$000F $A0C916 29 0F 00 AND #$000F $A0C919 18 CLC $A0C91A 6D D6 0D ADC $0DD6 [$7E:0DD6] $A0C91D AA TAX $A0C91E BF 2B 8B 94 LDA $948B2B,x[$94:8C5A] $A0C922 29 1F 00 AND #$001F $A0C925 38 SEC $A0C926 ED D4 0D SBC $0DD4 [$7E:0DD4] $A0C929 3A DEC A $A0C92A 10 07 BPL $07 [$C933] $A0C92C 18 CLC $A0C92D 79 7E 0F ADC $0F7E,y[$7E:117E] $A0C930 99 7E 0F STA $0F7E,y[$7E:117E] $A0C933 B9 7A 0F LDA $0F7A,y[$7E:0F7A] $A0C936 48 PHA $A0C937 B9 7E 0F LDA $0F7E,y[$7E:0F7E] $A0C93A 38 SEC $A0C93B F9 84 0F SBC $0F84,y[$7E:0F84] $A0C93E 48 PHA $A0C93F 22 70 BB A0 JSL $A0BB70[$A0:BB70] $A0C943 AD C4 0D LDA $0DC4 [$7E:0DC4] $A0C946 0A ASL A $A0C947 AA TAX $A0C948 BF 02 00 7F LDA $7F0002,x[$7F:00EC] $A0C94C 29 00 F0 AND #$F000 $A0C94F C9 00 10 CMP #$1000 $A0C952 D0 67 BNE $67 [$C9BB] $A0C954 AE C4 0D LDX $0DC4 [$7E:0DC4] $A0C957 BF 02 64 7F LDA $7F6402,x[$7F:6A6C] $A0C95B 29 1F 00 AND #$001F $A0C95E C9 05 00 CMP #$0005 $A0C961 90 58 BCC $58 [$C9BB] $A0C963 28 PLP $A0C964 38 SEC $A0C965 08 PHP $A0C966 B9 7E 0F LDA $0F7E,y[$7E:0F7E] $A0C969 38 SEC $A0C96A F9 84 0F SBC $0F84,y[$7E:0F84] $A0C96D 29 0F 00 AND #$000F $A0C970 49 0F 00 EOR #$000F $A0C973 8D D4 0D STA $0DD4 [$7E:0DD4] $A0C976 BF 02 64 7F LDA $7F6402,x[$7F:6A6C] $A0C97A 29 1F 00 AND #$001F $A0C97D 0A ASL A $A0C97E 0A ASL A $A0C97F 0A ASL A $A0C980 0A ASL A $A0C981 8D D6 0D STA $0DD6 [$7E:0DD6] $A0C984 BF 01 64 7F LDA $7F6401,x[$7F:6A6B] $A0C988 10 31 BPL $31 [$C9BB] $A0C98A 0A ASL A $A0C98B 30 05 BMI $05 [$C992] $A0C98D B9 7A 0F LDA $0F7A,y[$7E:0F7A] $A0C990 80 06 BRA $06 [$C998] $A0C992 B9 7A 0F LDA $0F7A,y[$7E:0F7A] $A0C995 49 0F 00 EOR #$000F $A0C998 29 0F 00 AND #$000F $A0C99B 18 CLC $A0C99C 6D D6 0D ADC $0DD6 [$7E:0DD6] $A0C99F AA TAX $A0C9A0 BF 2B 8B 94 LDA $948B2B,x[$94:8C4B] $A0C9A4 29 1F 00 AND #$001F $A0C9A7 38 SEC $A0C9A8 ED D4 0D SBC $0DD4 [$7E:0DD4] $A0C9AB 3A DEC A $A0C9AC F0 02 BEQ $02 [$C9B0] $A0C9AE 10 0B BPL $0B [$C9BB] $A0C9B0 49 FF FF EOR #$FFFF $A0C9B3 1A INC A $A0C9B4 18 CLC $A0C9B5 79 7E 0F ADC $0F7E,y[$7E:0F7E] $A0C9B8 99 7E 0F STA $0F7E,y[$7E:0F7E] $A0C9BB 28 PLP $A0C9BC FA PLX $A0C9BD 7A PLY $A0C9BE 6B RTL } ;;; Some table ;;; { $A0C9BF dw 0000,0000, 0000,0000, 0000,1000, FFFF,F000, 0000,2000, FFFF,E000, 0000,3000, FFFF,D000, 0000,4000, FFFF,C000, 0000,5000, FFFF,B000, 0000,6000, FFFF,A000, 0000,7000, FFFF,9000, 0000,8000, FFFF,8000, 0000,9000, FFFF,7000, 0000,A000, FFFF,6000, 0000,B000, FFFF,5000, 0000,C000, FFFF,4000, 0000,D000, FFFF,3000, 0000,E000, FFFF,2000, 0000,F000, FFFF,1000, 0001,0000, FFFF,0000, 0001,1000, FFFE,F000, 0001,2000, FFFE,E000, 0001,3000, FFFE,D000, 0001,4000, FFFE,C000, 0001,5000, FFFE,B000, 0001,6000, FFFE,A000, 0001,7000, FFFE,9000, 0001,8000, FFFE,8000, 0001,9000, FFFE,7000, 0001,A000, FFFE,6000, 0001,B000, FFFE,5000, 0001,C000, FFFE,4000, 0001,D000, FFFE,3000, 0001,E000, FFFE,2000, 0001,F000, FFFE,1000, 0002,0000, FFFE,0000, 0002,1000, FFFD,F000, 0002,2000, FFFD,E000, 0002,3000, FFFD,D000, 0002,4000, FFFD,C000, 0002,5000, FFFD,B000, 0002,6000, FFFD,A000, 0002,7000, FFFD,9000, 0002,8000, FFFD,8000, 0002,9000, FFFD,7000, 0002,A000, FFFD,6000, 0002,B000, FFFD,5000, 0002,C000, FFFD,4000, 0002,D000, FFFD,3000, 0002,E000, FFFD,2000, 0002,F000, FFFD,1000, 0003,0000, FFFD,0000, 0003,1000, FFFC,F000, 0003,2000, FFFC,E000, 0003,3000, FFFC,D000, 0003,4000, FFFC,C000, 0003,5000, FFFC,B000, 0003,6000, FFFC,A000, 0003,7000, FFFC,9000, 0003,8000, FFFC,8000, 0003,9000, FFFC,7000, 0003,A000, FFFC,6000, 0003,B000, FFFC,5000, 0003,C000, FFFC,4000, 0003,D000, FFFC,3000, 0003,E000, FFFC,2000, 0003,F000, FFFC,1000, 0004,0000, FFFC,0000 } ;;; Some speed table ;;; { ; Used by bank $86, indexed by $1ADB $A0CBC7 dw 0000,0000, 0000,0000, 0109,0000, FEF7,FFFF, 031B,0000, FCE5,FFFF, 0636,0000, F9CA,FFFF, 0A5A,0000, F5A6,FFFF, 0F87,0000, F079,FFFF, 15BD,0000, EA43,FFFF, 1CFC,0000, E304,FFFF, 2544,0000, DABC,FFFF, 2E95,0000, D16B,FFFF, 38EF,0000, C711,FFFF, 4452,0000, BBAE,FFFF, 50BE,0000, AF42,FFFF, 5E33,0000, A1CD,FFFF, 6CB1,0000, 934F,FFFF, 7C38,0000, 83C8,FFFF, 8CC8,0000, 7338,FFFF, 9E61,0000, 619F,FFFF, B103,0000, 4EFD,FFFF, C4AE,0000, 3B52,FFFF, D962,0000, 269E,FFFF, EF1F,0000, 10E1,FFFF, 05E5,0000, FA1B,FFFF, 14B4,0001, EB4C,FFFE, 2D8C,0001, D274,FFFE, 476D,0001, B893,FFFE, 6257,0001, 9DA9,FFFE, 7E4A,0001, 81B6,FFFE, 9B46,0001, 64BA,FFFE, B94B,0001, 46B5,FFFE, D859,0001, 27A7,FFFE, F870,0001, 0790,FFFE, 1090,0002, EF70,FFFD, 32B9,0002, CD47,FFFD, 55EB,0002, AA15,FFFD, 7A26,0002, 85DA,FFFD, 9F6A,0002, 6096,FFFD, C5B7,0002, 3A49,FFFD, ED0D,0002, 12F3,FFFD, 0C6C,0003, F394,FFFC, 35D4,0003, CA2C,FFFC, 6045,0003, 9FBB,FFFC, 8BBF,0003, 7441,FFFC, B842,0003, 47BE,FFFC, E5CE,0003, 1A32,FFFC, 0B63,0004, F49D,FFFB, 3B01,0004, C4FF,FFFB, 6BA8,0004, 9458,FFFB, 9D58,0004, 62A8,FFFB, D011,0004, 2FEF,FFFB, 03D3,0004, FC2D,FFFB, 2F9E,0005, D062,FFFA, 6572,0005, 9A8E,FFFA, 9C4F,0005, 63B1,FFFA, D435,0005, 2BCB,FFFA, 0424,0006, FBDC,FFF9, 3E1C,0006, C1E4,FFF9, 791D,0006, 86E3,FFF9, B527,0006, 4AD9,FFF9, F23A,0006, 0DC6,FFF9, 2756,0007, D8AA,FFF8, 667B,0007, 9985,FFF8, A6A9,0007, 5957,FFF8, E7E0,0007, 1820,FFF8, 2120,0008, DEE0,FFF7, 6469,0008, 9B97,FFF7, A8BB,0008, 5745,FFF7, EE16,0008, 11EA,FFF7, 2B7A,0009, D486,FFF6, 72E7,0009, 8D19,FFF6, BB5D,0009, 44A3,FFF6, 04DC,0009, FB24,FFF6, 4664,000A, B99C,FFF5, 91F5,000A, 6E0B,FFF5, DE8F,000A, 2171,FFF5, 2332,000B, DCCE,FFF4, 71DE,000B, 8E22,FFF4, C193,000B, 3E6D,FFF4, 0951,000C, F6AF,FFF3, 5B18,000C, A4E8,FFF3, ADE8,000C, 5218,FFF3, 01C1,000C, FE3F,FFF3, 4DA3,000D, B25D,FFF2, A38E,000D, 5C72,FFF2, FA82,000D, 057E,FFF2, 497F,000E, B681,FFF1, A285,000E, 5D7B,FFF1, FC94,000E, 036C,FFF1, 4EAC,000F, B154,FFF0, AACD,000F, 5533,FFF0, 07F7,000F, F809,FFF0, 5D2A,0010, A2D6,FFEF, BC66,0010, 439A,FFEF, 13AB,0011, EC55,FFEE, 74F9,0011, 8B07,FFEE } ;;; Enemy headers ;;; { $A0CEBF dx 0400, 8687, 03E8, 000A, 0008, 0008, A2, 00, 0000, 0000, 871C, 0001, 0000, 879C, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, ACB600, 05, F320, EDA8, DDEB $A0CEFF dx 0400, 8912, 0014, 0028, 0008, 0008, A2, 00, 0053, 0000, 89AD, 0001, 0000, 89F0, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, ACD000, 05, F3B6, EC1C, E15D $A0CF3F dx 0C00, 8B60, 4E20, 00C8, 0014, 0010, A2, 00, 0000, 0000, 8D6C, 0005, 0000, 8DD2, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 0000, 0000, 0000, 0000, 9281, 802D, 0000, ACD400, 05, F3BC, EEC6, DF11 $A0CF7F dx 0C00, 8B60, 4E20, 0000, 0008, 0005, A2, 00, 0000, 0000, 8D9D, 0001, 0000, 912E, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 929F, 930F, 0000, ACD400, 05, F3BC, EEC6, 0000 $A0CFBF dx 0200, 998D, 0064, 003C, 0008, 0004, A2, 00, 0000, 0000, 9A3F, 0001, 0000, 9A7D, 800A, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, ACE400, 05, F20C, EC1C, E053 $A0CFFF dx 0400, 9E6A, 003C, 0014, 0008, 0008, A2, 00, 0000, 0000, 9F48, 0001, 0000, 9FB3, 800A, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, ACE600, 05, F2BA, EC1C, E0C3 $A0D03F dx 0400, A38B, 0014, 0064, 0008, 0008, A2, 00, 003E, 0000, A3F9, 0001, 0000, A47E, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, A579, 0000, ACEA00, 05, F34A, EE84, E16B $A0D07F dx 1000, A59E, 0014, 0028, 005C, 0028, A2, 00, 0000, 0000, A644, 0001, 0000, A759, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 804C, 0000, 0000, 0000, 804C, 804C, 0000, ADB600, 02, F3C2, EC1C, 0000 $A0D0BF dx 0200, A59E, 0014, 0028, 0060, 0028, A2, 00, 0000, 0000, A6D2, 0001, 0000, 804C, 800F, 804C, 804C, 0000, 0000, 0000, 0000, 804C, 0000, 0000, 0000, 804C, 804C, 0000, ADB600, 02, F3C2, EC1C, 0000 $A0D0FF dx 0400, AFF3, 0009, 0008, 0008, 0004, A2, 00, 0020, 0000, B06B, 0001, 0000, B11F, 800A, 804C, 8041, 0000, 0000, 0000, 0000, 0000, B013, 0000, 0000, 8023, 802D, B204, AEA600, 05, F236, EC1C, DF81 $A0D13F dx 0400, B20C, 001E, 0010, 0008, 0004, A2, 00, 0020, 0000, B06B, 0001, 0000, B11F, 800A, 804C, 8041, 0000, 0000, 0000, 0000, 0000, B22C, 0000, 0000, 8023, 802D, B25C, AEC920, 05, F23C, EE00, DF65 $A0D17F dx 0400, B264, 0064, 003C, 0008, 0008, A2, 00, 0020, 0000, B06B, 0001, 0000, B11F, 800A, 804C, 8041, 0000, 0000, 0000, 0000, 0000, B284, 0000, 0000, 8023, 802D, B2B4, AECD20, 05, F242, EC1C, DF73 $A0D1BF dx 0400, B2BC, 005A, 0032, 0008, 0008, A2, 00, 003E, 0000, B3E0, 0001, 0000, B40F, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, B2DC, 0000, 0000, 8023, 802D, 0000, AEB400, 05, F362, EE6E, DFB9 $A0D1FF dx 0600, BA5B, 0001, 0004, 0004, 0004, A2, 00, 0000, 0000, B570, 0001, 0000, B58F, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AEB800, 05, F48E, EEC6, E029 $A0D23F dx 0600, BA5B, 000A, 0028, 0008, 0008, A2, 00, 0000, 0000, B602, 0001, 0000, B7C4, 800F, 804C, B929, 0000, 0000, 0000, 0000, B953, 0000, 0000, 0000, B947, B94D, 0000, AEB800, 02, F374, EC1C, E06F $A0D27F dx 0400, BA7B, 002D, 000F, 0010, 0007, A2, 00, 0036, 0000, BBCD, 0001, 0000, BBE3, 800F, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AEB000, 05, F1FA, EC1C, E07D $A0D2BF dx 0400, BE1C, 012C, 0032, 0008, 000C, A2, 00, 0036, 0000, BE99, 0002, 0000, BED2, 800F, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AEBD20, 05, F35C, EDEA, E141 $A0D2FF dx 0600, C0D1, 0078, 003C, 0010, 0009, A2, 00, 0036, 0000, C242, 0002, 0000, C277, 800F, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AED520, 05, F1F4, EE42, DE85 $A0D33F dx 0800, C5FA, 0384, 0078, 0010, 000A, A2, 00, 005F, 0000, C6F3, 0002, 0000, C724, 800F, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AED920, 05, F356, EE58, DED9 $A0D37F dx 0800, CA2B, 012C, 0064, 0010, 0010, A2, 00, 0000, 0000, CCD4, 0001, 0000, CD13, 800F, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, D38C, D3B4, 0000, AF8000, 05, F338, EEC6, DFFF $A0D3BF dx 0400, D80C, 0064, 0050, 0010, 0005, A2, 00, 0022, 0000, DF76, 0001, 0000, E02E, 800A, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, ACE000, 05, F21E, EC1C, DECB $A0D3FF dx 0400, E17B, 00C8, 000A, 0008, 0008, A2, 00, 003E, 0000, E1D3, 0001, 0000, E221, 8005, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, E3A9, 0000, AEC520, 05, F2C6, EF4A, E099 $A0D43F dx 0400, E2C0, 00C8, 000A, 0008, 0004, A2, 00, 003E, 0000, E318, 0001, 0000, E353, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, E477, 0000, 0000, 8023, E3A9, 0000, AEC520, 05, F2C6, EDEA, E099 $A0D47F dx 0400, E457, 00C8, 0005, 0008, 0004, A2, 00, 003E, 0000, E49F, 0001, 0000, E4DA, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, E477, 0000, 0000, 8023, 802D, E56F, AEC520, 05, F308, EDEA, E08B $A0D4BF dx 0600, E57B, 012C, 0018, 0008, 001C, A2, 00, 0036, 0000, E606, 0002, 0000, E64E, 800F, 804C, 8041, 0000, 0004, 0000, 0000, E7D4, 0000, 0000, 0000, E7C8, E7CE, 0000, AEA000, 05, F368, EE16, DE15 $A0D4FF dx 0400, E978, 0014, 0028, 0008, 0008, A2, 00, 0000, 0000, E9DA, 0001, 0000, EAB6, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 804C, 0000, 0000, 0000, 804C, 802D, 0000, ACBA00, 05, F4A0, EF08, E0FB $A0D53F dx 0400, E978, 0014, 0028, 0008, 0020, A2, 00, 0000, 0000, EE12, 0001, 0000, EED1, 800F, 804C, 8041, 0000, 0000, 0000, 0000, F0B6, 0000, 0000, 0000, F09D, F0A2, 0000, ACBA00, 05, F4A0, EF08, E109 $A0D57F dx 0400, E978, 0014, 0028, 0020, 0008, A2, 00, 0000, 0000, F111, 0001, 0000, F1DE, 800F, 804C, 8041, 0000, 0000, 0000, 0000, F41A, 0000, 0000, 0000, F3D8, F40E, 0000, ACBA00, 05, F4A0, EF08, E109 $A0D5BF dx 0400, E978, 0014, 0028, 0008, 0020, A2, 00, 0000, 0000, EE12, 0001, 0000, EED1, 800F, 804C, 8041, 0000, 0000, 0000, 0000, F0B6, 0000, 0000, 0000, F09D, F0AA, 0000, ACBA00, 05, F4A0, EFB8, E109 $A0D5FF dx 0400, EDC7, 0014, 0028, 0010, 0008, A2, 00, 0000, 0000, EE05, 0001, 0000, EED1, 800F, 804C, 8041, 0000, 0000, 0000, 0000, F0B6, 0000, 0000, 0000, F09D, F0A2, 0000, B18000, 05, F4A0, EF08, E109 $A0D63F dx 0600, 8687, 001E, 000A, 0008, 0008, A3, 00, 0047, 0000, 86ED, 0001, 0000, 874C, 800A, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AE8600, 05, F200, EC1C, E187 $A0D67F dx 0600, 88F0, 0032, 0032, 0008, 000C, A3, 00, 0021, 0000, 8960, 0001, 0000, 8979, 800F, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 8B0F, 0000, AF9200, 05, F314, EDBE, DF8F $A0D6BF dx 0600, 8C0F, 0014, 0004, 0008, 0008, A3, 00, 0020, 0000, 8D2D, 0001, 0000, 8DEE, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 8E83, 0000, 0000, 0000, 8E6B, 8E89, 0000, AFA800, 05, F2E4, EC1C, DEE7 $A0D6FF dx 0600, 900A, 012C, 0050, 000D, 000B, A3, 00, 0049, 0000, 90B5, 0001, 0000, 912B, 8000, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 94AA, AFBC00, 05, F332, EC1C, DE4D $A0D73F dx 0000, 0000, 0028, 000F, 0010, 0008, A3, 00, 0059, 0000, 94E6, 0001, 0000, 952A, 952A, 804C, 952A, 0000, 0000, 0000, 0000, 804C, 0000, 0000, 0000, 804C, 804C, 0000, 000000, 05, 0000, 0000, 0000 $A0D77F dx 0400, 965B, 00C8, 0078, 0008, 0008, A3, 00, 0049, 0000, 96E3, 0001, 0000, E6C2, 800A, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, B1B600, 05, F2D8, EF76, DF2D $A0D7BF dx 0400, 980B, 0032, 0028, 0008, 0008, A3, 00, 0023, 0000, 993B, 0001, 0000, E6C2, 800A, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, B1C800, 05, F2F0, EF76, E00D $A0D7FF dx 0400, 9B7B, 0014, 0028, 0010, 0008, A3, 00, 003E, 0000, 9CBA, 0001, 0000, 9D16, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 9F07, 9F08, 0000, AC9800, 05, F30E, EDEA, DF1F $A0D83F dx 0400, 9B9B, 0014, 0028, 0010, 0008, A3, 00, 003E, 0000, 9C9F, 0001, 0000, 9D16, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 9F07, 802D, 0000, B18000, 05, F30E, EEC6, DF1F $A0D87F dx 0200, A051, 0014, 0028, 0004, 0004, A3, 00, 0000, 0000, A14D, 0001, 0000, A2D0, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AC8000, 05, F47C, EEC6, E0D1 $A0D8BF dx 8200, A051, 0014, 0028, 0004, 0004, A3, 00, 0000, 0000, A14D, 0001, 0000, A2D0, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AC8000, 05, F47C, EEC6, E0D1 $A0D8FF dx 0400, A725, 0064, 005A, 000A, 000C, A3, 00, 0058, 0000, A77D, 0001, 0000, A790, 800A, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, A953, A9A8, 0000, AC9400, 05, F218, EC1C, DF9D $A0D93F dx 0400, AA48, 003C, 0014, 0010, 000D, A3, 00, 0023, 0000, AB09, 0001, 0000, ABCF, 800F, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, ABAC00, 05, F326, EC1C, E14F $A0D97F dx 0400, AF85, 0078, 0050, 0010, 000D, A3, 00, 005F, 0000, AB09, 0001, 0000, ABCF, 800F, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0003, 0000, 0000, 8023, 802D, 0000, ABB000, 05, F2DE, EC1C, E0ED $A0D9BF dx 0600, B085, 0140, 0050, 0018, 0014, A3, 00, 0023, 0000, AB09, 0001, 0000, ABCF, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 0000, 0001, 0000, 0000, 8023, 802D, 0000, AEAA00, 05, F32C, EC1C, E117 $A0D9FF dx 0600, B0A5, 05DC, 0078, 0018, 0014, A3, 00, 0023, 0000, AB09, 0001, 0000, ABCF, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 0000, 0001, 0000, 0000, 8023, 802D, 0000, AEAA00, 05, F32C, F07E, E117 $A0DA3F dx 0400, B217, 0320, 00A0, 0018, 0014, A3, 00, 0030, 0000, AB09, 0001, 0000, ABCF, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 0000, 0002, 0000, 0000, 8023, 802D, 0000, AED120, 05, F28A, EC32, DDF9 $A0DA7F dx 0400, B3A1, 0028, 000F, 0008, 0008, A3, 00, 0049, 0000, B44A, 0001, 0000, B47C, 800A, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AFE800, 05, F260, EC1C, E1CD $A0DABF dx 0400, B5B3, 001E, 000F, 0008, 0008, A3, 00, 005F, 0000, B66F, 0001, 0000, E6C2, 800A, 804C, 8041, 0000, 0000, 0000, 0000, 0000, B5D3, 0000, 0000, 8023, 802D, 0000, AEF920, 05, F2CC, EC48, E179 $A0DAFF dx 0000, 8069, 0000, 0000, 0008, 0008, A3, 00, 0059, 0000, 804C, 0001, 0000, 804C, 800F, 804C, 804C, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 804C, 804C, 0000, AE9000, 00, 0000, 0000, 0000 $A0DB3F dx 1000, B702, 000A, 0004, 0010, 0010, A3, 00, 0056, 0000, BAB3, 0003, 0000, BB25, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 0000, 0000, 0000, 0000, 8023, BEFD, 0000, AF9800, 05, F380, F010, DDA5 $A0DB7F dx 0400, C63E, 000F, 000A, 0008, 000C, A3, 00, 0021, 0000, C6AE, 0001, 0000, C6C7, 800A, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, C7F5, 0000, AE8C00, 05, F206, EC1C, E125 $A0DBBF dx 0800, C8A6, 000A, 0064, 0008, 0008, A3, 00, 003E, 0000, CDE2, 0001, 0000, CE64, 800F, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, D3B0, D469, 0000, AFB400, 05, F33E, EC48, E195 $A0DBFF dx 0600, DA9C, 00C8, 001E, 0010, 0010, A3, 00, 0057, 0000, DBD3, 0001, 0000, DC1B, 800F, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, 804C, DC1C, 0000, AFAE00, 05, F31A, EEC6, E061 $A0DC3F dx 0600, DFA2, 000F, 0005, 0008, 0008, A3, 00, 0023, 0000, E043, 0001, 0000, E08B, 800A, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AE8000, 05, F2FC, EC48, DEF5 $A0DC7F dx 0600, E23C, 001E, 000A, 0008, 0008, A3, 00, 0023, 0000, E2D4, 0001, 0000, E6C2, 800A, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AEED20, 05, F22A, EC48, E1BF $A0DCBF dx 0600, E57C, 0028, 0014, 0008, 0008, A3, 00, 0023, 0000, E59C, 0001, 0000, E6C2, 800A, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AEF320, 05, F230, EC48, DFF1 $A0DCFF dx 0600, E5B0, 000F, 0005, 0008, 0008, A3, 00, 0023, 0000, E669, 0001, 0001, E6C2, 800A, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AE8000, 05, F224, EC48, E1DB $A0DD3F dx 0600, E5D0, 000F, 0005, 0008, 0008, A3, 00, 0023, 0000, E669, 0001, 0001, E6C2, 800A, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AE8000, 05, F302, EDD4, DFC7 $A0DD7F dx 1000, E9AF, 01F4, 0078, 000A, 000A, A3, 00, 005A, 0000, EA4F, 0001, 0000, EB98, 800F, EB33, EAE6, 0000, 0004, 0000, 0000, F042, 0000, 0000, 0000, EDEB, EF07, 0000, AE9000, 05, F36E, EF60, DFAB $A0DDBF dx A600, B87D, 7FFF, 0028, 0030, 0038, A4, 00, 0005, 0006, 8A5A, 0001, 0000, 8C04, 8005, 8687, 8041, 0000, 0000, 0000, 0000, B992, 0000, 0000, 0000, B950, 0000, 0000, AD8000, 05, F42E, F102, 0000 $A0DDFF dx 2000, B87D, 7FFF, 0028, 0008, 0008, A4, 00, 0000, 0006, F67A, 0001, 0000, F6BB, 8005, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AD8000, 05, F428, F102, 0000 $A0DE3F dx 2000, A1F7, 1770, 00A0, 0040, 0040, A5, 04, 0000, 0008, 8687, 0001, 0000, 86FC, 8000, 954D, 8041, 0000, 0000, 0000, 0000, 9607, 0000, 0000, 0000, 95EA, 95F0, 0000, B0C800, 05, F440, F144, 0000 $A0DE7F dx 1800, 8069, 1770, 00A0, 0002, 0002, A5, 00, 0000, 0000, C46B, 0001, 0000, C486, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 804C, 0000, 0000, 0000, 804C, 804C, 0000, B0C800, 05, F446, F144, 0000 $A0DEBF dx 1800, A1F7, 1770, 00A0, 0010, 0020, A5, 00, 0000, 0000, C599, 0001, 0000, C5AA, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 804C, 0000, 0000, 0000, 8023, 802D, 0000, B0C800, 05, F440, F144, 0000 $A0DEFF dx 1800, A1F7, 1770, 00A0, 0018, 0018, A5, 00, 0000, 0000, C5AD, 0001, 0000, C5C4, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 804C, 0000, 0000, 0000, 804C, 804C, 0000, B0C800, 05, F440, F144, 0000 $A0DF3F dx 0E00, E359, 03C0, 000C, 0030, 0020, A5, 04, 002C, 0004, EA2A, 0001, 0000, EB13, 800F, 804C, 8041, 0000, 0000, 0000, 0000, EDF2, 0000, 0000, 0000, EDEC, ED5A, 0000, AC9C00, 02, F410, F094, 0000 $A0DF7F dx 0E00, E359, 03C0, 000C, 0013, 0013, A5, 08, 0000, 0004, EA2A, 0001, 0000, EB13, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, EDEC, ED5A, 0000, AC9C00, 05, F416, F094, 0000 $A0DFBF dx 1000, 8687, 0014, 0028, 0010, 0010, A6, 00, 0000, 0000, 86F5, 0001, 0000, 8793, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AB9C00, 05, F46A, EEDC, E0B5 $A0DFFF dx 0400, 8B09, 01F4, 00C8, 0010, 000C, A6, 00, 0000, 0000, 8B2F, 0002, 0000, 8BAD, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 804C, 0000, AB9800, 05, F470, EEC6, DF49 $A0E03F dx 0200, 8B09, 01F4, 00C8, 0010, 0002, A6, 00, 0000, 0000, 8B85, 0001, 0000, 8B99, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 804C, 0000, AB9800, 05, F470, EEC6, 0000 $A0E07F dx 0800, 8CFB, 0014, 001E, 0008, 0008, A6, 00, 0000, 0000, 8FFC, 0002, 0000, 9023, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 804C, 0000, AB9000, 05, F476, EEC6, DEBD $A0E0BF dx 0800, 9470, 0028, 0032, 0008, 0008, A6, 00, 0000, 0000, 94C4, 0001, 0000, 960E, 8000, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 804C, 0000, AB9000, 05, F464, EEC6, E037 $A0E0FF dx 1000, 998C, 0190, 0064, 0020, 0018, A6, 00, 0000, 0000, 9A58, 0001, 0000, 9AC2, 800F, 804C, 8041, 0000, 0003, 0000, 0000, 9C39, 0000, 0000, 0000, 9C22, 9C39, 0000, AB8000, 05, F2C0, EFFA, E0DF $A0E13F dx 2000, E14F, 7FFF, 0005, 0008, 0008, A6, 08, 0000, 0001, A0F5, 0001, 0000, A288, 800F, A2D3, 8041, 0000, 0000, 0000, 0000, DFB2, 0000, 0000, 0000, 8023, DF8A, 0000, B09400, 05, F44C, F1B2, 0000 $A0E17F dx 2000, E14F, 4650, 00A0, 0008, 0008, A6, 08, 0000, 0005, A0F5, 0001, 0000, B227, 800F, B297, 8041, B28A, 0000, 0000, 0000, DFB2, 0000, 0000, 0000, 8023, DF8A, 0000, B09400, 02, F44C, F1B2, 0000 $A0E1BF dx 8400, E1AF, 4650, 00A0, 0008, 0008, A6, 00, 0000, 0000, C696, 0001, 0000, C8D4, 800F, 804C, 804C, 0000, 0000, 0000, 0000, 804C, 0000, 0000, 0000, 804C, 804C, 0000, B0B400, 05, 0000, EEC6, 0000 $A0E1FF dx 0000, E23F, 7FFF, 0000, 0008, 0008, A6, 00, 0000, 0000, EFB1, 0001, 0000, F00D, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, F03F, 804C, 0000, A0E23F, 05, F488, EEC6, 0000 $A0E23F dx 8600, F4EC, 0028, 000F, 0008, 0020, A6, 00, 0059, 0000, F6C5, 0001, 0000, F765, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, F52C, 0000, 0000, F920, F920, FB72, B0BA00, 02, 0000, 0000, 0000 $A0E27F dx 0000, 0000, 03E8, 0000, 0008, 0018, A6, 00, 0000, 0000, FB72, 0001, 0000, FC33, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, FDA7, FDAC, 0000, B78000, 05, 0000, F068, 0000 $A0E2BF dx 1E00, 8687, 03E8, 0014, 0038, 0090, A7, 00, 0000, 0003, A959, 0001, 0000, AC21, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 803C, 0000, 0000, 0000, 949F, 804C, 0000, ABCC00, 05, F41C, F15A, 0000 $A0E2FF dx 1E00, 8687, 03E8, 0014, 0030, 0030, A7, 00, 0000, 0000, AB43, 0001, 0000, B7BD, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 9490, 94B5, 0000, ABCC00, 05, 0000, F170, 0000 $A0E33F dx 1E00, 8687, 03E8, 000A, 0018, 0008, A7, 00, 0000, 0000, AB68, 0001, 0000, B801, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 948F, 802D, 0000, ABCC00, 05, 0000, F186, 0000 $A0E37F dx 1E00, 8687, 03E8, 000A, 0018, 0008, A7, 00, 0000, 0000, AB9C, 0001, 0000, B80D, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 948F, 802D, 0000, ABCC00, 05, 0000, F186, 0000 $A0E3BF dx 1E00, 8687, 03E8, 000A, 0018, 0008, A7, 00, 0000, 0000, ABCA, 0001, 0000, B819, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 948F, 802D, 0000, ABCC00, 05, 0000, F186, 0000 $A0E3FF dx 1E00, 8687, 03E8, 0014, 0008, 0008, A7, 00, 0000, 0000, ABF8, 0001, 0000, B9F6, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 948F, 94B5, 0000, ABCC00, 05, F422, F170, 0000 $A0E43F dx 1E00, 8687, 000A, 000A, 0008, 0008, A7, 00, 0000, 0000, BCEF, 0001, 0000, BD32, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, BCCF, 802D, 0000, ABCC00, 05, F422, F19C, 0000 $A0E47F dx 1E00, 8687, 000A, 000A, 0008, 0008, A7, 00, 0000, 0000, BD2D, 0001, 0000, BD49, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, BCDE, 802D, 0000, ABCC00, 05, 0000, F19C, 0000 $A0E4BF dx 0C00, CA01, 09C4, 0028, 0008, 0008, A7, 08, 0000, 0007, CDF3, 0001, 0000, CEA6, 8000, DD3F, 804C, 0000, 0000, 0000, 0000, DD9A, 0000, 0000, 0000, DD95, DD9B, 0000, ACAA00, 05, F434, F0EC, 0000 $A0E4FF dx 0400, CA01, 09C4, 0028, 0008, 0008, A7, 00, 0000, 0000, CE55, 0001, 0000, 804C, 8000, 804C, 804C, 0000, 0000, 0000, 0000, 804C, 0000, 0000, 0000, 804C, 804C, 0000, ACAA00, 05, F43A, F0EC, 0000 $A0E53F dx 0400, CA01, 09C4, 0028, 0008, 0008, A7, 00, 0000, 0000, CE55, 0001, 0000, E011, 8000, 804C, 804C, 0000, 0000, 0000, 0000, 804C, 0000, 0000, 0000, 804C, 804C, 0000, ACAA00, 05, F434, F0EC, 0000 $A0E57F dx 0400, CA01, 09C4, 0028, 0008, 0008, A7, 00, 0000, 0000, CE55, 0001, 0000, E011, 8000, 804C, 804C, 0000, 0000, 0000, 0000, 804C, 0000, 0000, 0000, 804C, 804C, 0000, ACAA00, 05, F434, F0EC, 0000 $A0E5BF dx 0600, E7FE, 7FFF, 0000, 0006, 0007, A7, 00, 0000, 0000, E912, 0001, 0000, E940, 8000, 804C, 8041, 0000, 0000, 0000, 0000, 804C, 0000, 0000, 0000, 804C, 804C, 0000, AC8200, 05, F482, 0000, 0000 $A0E5FF dx 0C00, F225, 7FFF, 0000, 0008, 0018, A7, 00, 0000, 0000, F4DD, 0001, 0000, F52E, 8000, 804C, 8041, 0000, 0000, 0000, 0000, 804C, 0000, 0000, 0000, 804C, 804C, 0000, AC8800, 05, F488, 0000, 0000 $A0E63F dx 0600, 8687, 012C, 0064, 0010, 0014, A8, 00, 004A, 0000, 87E0, 0003, 0000, 891B, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 8B0C, 0000, 0000, 0000, 8B06, 8B12, 0000, B19400, 05, F350, EFCE, DE23 $A0E67F dx 0600, 8687, 012C, 0064, 0008, 0008, A8, 00, 0000, 0000, 88B0, 0001, 0000, 899E, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 804C, 0000, 0000, 0000, 8023, 804C, 0000, B19400, 05, F350, EFE4, 0000 $A0E6BF dx 0400, 8F8C, 0014, 0000, 0008, 0008, A8, 00, 0000, 0000, 9058, 0002, 0000, 90E2, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 804C, 0000, B19A00, 05, F3CE, EEC6, DE31 $A0E6FF dx 0800, 9379, 0014, 000A, 0010, 0010, A8, 00, 0000, 0000, 96E3, 0001, 0000, 9730, 800F, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, B19E00, 05, F3D4, EEB0, E2BB $A0E73F dx 0800, 959D, 0014, 000A, 0010, 0010, A8, 00, 0000, 0000, 96E3, 0003, 0000, 9730, 800F, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, B19E00, 05, F3DA, EEF2, DE3F $A0E77F dx 0400, 99AC, 012C, 003C, 0010, 0010, A8, 00, 0051, 0000, 9AEE, 0001, 0000, 9B3C, 8000, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, B1A600, 05, F266, EC1C, DE5B $A0E7BF dx 0400, 9F4F, 0014, 001E, 0008, 0008, A8, 00, 003E, 0000, A148, 0001, 0000, A211, 800F, 804C, A835, 0000, 0004, 0000, 0000, 0000, 0000, 0000, 0000, A799, A7BD, 0000, B1AA00, 05, F3E0, EE9A, DEAF $A0E7FF dx 0800, AAFE, 0640, 0000, 0010, 0010, A8, 00, 0000, 0000, AB46, 0009, 0000, AB75, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 0000, 0000, 0000, 0000, 8023, AB83, 0000, B1AE00, 05, F26C, F026, DF03 $A0E83F dx 0600, AC1C, 0014, 0028, 0008, 0008, A8, 00, 0000, 0000, AF8B, 0003, 0000, B10A, 800F, 804C, 8041, 0000, 0004, 0000, 0000, B400, 0000, 0000, 0000, B406, B40C, 0000, B1BC00, 05, F3E6, EEB0, DF57 $A0E87F dx 0600, B65E, 003C, 000A, 0008, 0008, A8, 00, 0055, 0000, B776, 0001, 0000, B80D, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, BE2E, BEAC, 0000, B1C200, 05, F2F6, EF8C, DFE3 $A0E8BF dx 0400, C143, 000A, 0064, 0008, 0010, A8, 00, 006A, 0000, C1C9, 0002, 0000, C21C, 8014, 804C, 8041, 0000, 0002, 0000, 0000, C63F, 0000, 0000, 0000, C5BE, C5EF, 0000, B1CC00, 05, F2B4, EF34, E045 $A0E8FF dx 0C00, C6B3, 0320, 0050, 000C, 0020, A8, 00, 0068, 0000, CB77, 0001, 0000, CC36, 800F, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, D174, D192, 0000, B1D000, 05, F3EC, EEC6, E0A7 $A0E93F dx 0C00, C6B3, 01C2, 0050, 000C, 0020, A8, 00, 0068, 0000, CBCC, 0001, 0000, CC66, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, D174, D18D, 0000, B1D000, 05, F3F2, EEC6, E2E5 $A0E97F dx 0600, D821, 0064, 000A, 0008, 0008, A8, 00, 0000, 0000, D8C9, 0001, 0000, D90B, 800A, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, 8023, DB14, 0000, B1DC00, 05, F2D2, EFA2, E01B $A0E9BF dx 0800, DBC7, 00C8, 0032, 0008, 0018, A8, 00, 005F, 0000, DCCD, 0001, 0000, DD6B, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, B1E200, 05, F2EA, EE2C, DFD5 $A0E9FF dx 0400, E230, 00FA, 0028, 0008, 0008, A8, 00, 003E, 0000, E388, 0001, 0000, E3C3, 800F, 804C, 8041, 0000, 0002, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, B1FC00, 05, F212, EC1C, DD97 $A0EA3F dx 0200, E587, 0050, 001E, 0008, 0008, A8, 00, 0000, 0000, E637, 0001, 0000, E68E, 801E, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, E70E, 0000, B1EA00, 05, F458, EEC6, E133 $A0EA7F dx 0200, E7AC, 0014, 0000, 0008, 0008, A8, 00, 0000, 0000, E82E, 0001, 0000, E8AE, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 804C, E91D, 0000, B1BA00, 02, F45E, EEC6, DF3B $A0EABF dx 1000, E99A, 003C, 0014, 0008, 0012, A8, 00, 0066, 0000, F188, 0002, 0000, F25C, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 0000, 0000, 0000, 0000, 8023, F701, 0000, B1EC00, 05, F272, ED66, DEA1 $A0EAFF dx 0200, E99A, 003C, 0014, 000A, 000A, A8, 00, 0066, 0000, F214, 0001, 0000, F262, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 804C, 0000, 0000, 0000, 804C, 804C, 0000, B1EC00, 05, F272, ED66, 0000 $A0EB3F dx 1000, E9BA, 0168, 003C, 0008, 0012, A8, 00, 0066, 0000, F188, 0002, 0000, F25C, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 0000, 0000, 0000, 0000, 8023, F701, 0000, B1EC00, 05, F278, ED7C, E2C9 $A0EB7F dx 0200, E9BA, 0168, 003C, 000A, 000A, A8, 00, 0066, 0000, F214, 0001, 0000, F262, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 804C, 0000, 0000, 0000, 804C, 804C, 0000, B1EC00, 05, F278, ED7C, 0000 $A0EBBF dx 1000, E9DA, 0708, 00C8, 0008, 0012, A8, 00, 0066, 0000, F188, 0002, 0000, F25C, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 0000, 0000, 0000, 0000, 8023, F701, 0000, B1EC00, 05, F27E, ED92, E2D7 $A0EBFF dx 0200, E9DA, 0708, 00C8, 000A, 000A, A8, 00, 0066, 0000, F214, 0001, 0000, F262, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 804C, 0000, 0000, 0000, 804C, 804C, 0000, B1EC00, 05, F27E, ED92, 0000 $A0EC3F dx 1000, 9472, 4650, 0078, 0010, 0010, A9, 00, 0000, 000A, 8705, 0001, 0000, 878B, 800F, 878B, 8041, 0000, 0000, 0000, 0000, 8787, 0000, 0000, 0000, B5C6, B507, 0000, B78000, 05, F49A, F1C8, 0000 $A0EC7F dx 8600, 9472, 4650, 0078, 0008, 0008, A9, 00, 0000, 0000, 8687, 0001, 0000, 873E, 800F, 873E, 8041, 0000, 0000, 0000, 0000, 8787, 0000, 0000, 0000, B5C5, B503, 0000, B0E800, 05, F3F8, F1DE, 0000 $A0ECBF dx 0000, F8E6, 0C80, 0028, 0024, 0024, A9, 00, 0000, 0000, C710, 0001, 0000, C779, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, CF03, 804C, 0000, B18400, 02, F4A0, EC1C, 0000 $A0ECFF dx 0000, 9472, 03E8, 0000, 0000, 0000, A9, 00, 0000, 0000, 8B35, 0001, 0000, 8B85, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 804C, 804C, 0000, B78000, 05, 0000, EC1C, 0000 $A0ED3F dx 1800, D6BC, 03E8, 0000, 0010, 0028, A9, 00, 0000, 0000, D308, 0001, 0000, D368, 800F, 804C, 8041, 0000, 0000, 0000, 0000, D42A, 0000, 0000, 0000, D433, D433, 0000, B7A800, 05, F4A0, F12E, 0000 $A0ED7F dx 0E00, F8A6, 0140, 0050, 0016, 000C, A9, 00, 0000, 0000, D7B6, 0001, 0000, D8DB, 800F, D8DB, 8041, 0000, 0000, 0000, 0000, D8CC, 0000, 0000, 0000, DD44, DD1D, 0000, B7C000, 05, 0000, F12E, 0000 $A0EDBF dx 0600, EBAC, 0140, 0050, 0016, 000C, A9, 00, 0000, 0000, D7B6, 0001, 0000, D8DB, 800F, 804C, 8041, 0000, 0000, 0000, 0000, DD1D, 0000, 0000, 0000, DD1D, DD1D, 0000, AEAA00, 05, 0000, F12E, 0000 $A0EDFF dx 0000, F8A6, 03E8, 0000, 000A, 0008, A9, 00, 0000, 0000, D849, 0001, 0000, D8DB, 800F, 804C, 8041, 0000, 0000, 0000, 0000, DCED, 0000, 0000, 0000, DCF8, DCF8, 0000, B7C000, 05, 0000, F12E, 0000 $A0EE3F dx 0000, F8A6, 03E8, 0000, 000B, 0006, A9, 00, 0000, 0000, D876, 0001, 0000, D8DB, 800F, 804C, 8041, 0000, 0000, 0000, 0000, DCFD, 0000, 0000, 0000, DD08, DD08, 0000, B7C000, 05, 0000, F12E, 0000 $A0EE7F dx 0000, F8A6, 03E8, 0000, 000C, 0010, A9, 00, 0000, 0000, D89F, 0001, 0000, D8DB, 800F, 804C, 8041, 0000, 0000, 0000, 0000, DD0D, 0000, 0000, 0000, DD18, DD18, 0000, B7C000, 05, 0000, F12E, 0000 $A0EEBF dx 0C00, F8E6, 0C80, 0028, 0028, 0028, A9, 00, 0000, 0000, EF37, 0001, 0000, EFC5, 800F, 804C, 8041, 0000, 0000, 0000, 0000, EFBA, 0000, 0000, 0000, F789, F842, 0000, B18400, 02, 0000, F12E, 0000 $A0EEFF dx 2000, 8687, 0320, 0008, 0012, 0030, AA, 08, 0027, 0002, C87F, 0001, 0000, C6A4, 800F, C67E, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, C977, C97C, 0000, AFC200, 05, F3F8, F0C0, 0000 $A0EF3F dx 2000, 8687, 0320, 0008, 0012, 0030, AA, 08, 0027, 0002, C87F, 0001, 0000, C6A4, 800F, C67E, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, C977, C97C, 0000, AFC200, 05, F3FE, F0C0, 0000 $A0EF7F dx 2000, 8687, 34BC, 00A0, 0012, 0030, AA, 08, 0027, 0002, C87F, 0001, 0000, D369, 800F, D3BA, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, C977, D667, 0000, AFC200, 05, F404, F0D6, 0000 $A0EFBF dx 2000, 8687, 34BC, 00A0, 0012, 0030, AA, 08, 0027, 0002, C87F, 0001, 0000, D369, 800F, D3BA, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, C977, D667, 0000, AFC200, 05, F40A, F0D6, 0000 $A0EFFF dx 1600, D745, 0BB8, 0BB8, 0000, 0000, AA, 00, 0000, 0000, D7C8, 0001, 0000, D7C7, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 804C, 0000, 0000, 0000, 804C, 804C, 0000, 87B364, 06, 0000, EC1C, 0000 $A0F03F dx 8600, D745, 0BB8, 0BB8, 0000, 0000, AA, 00, 0000, 0000, 804C, 0001, 0000, 804C, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 804C, 0000, 0000, 0000, 804C, 804C, 0000, 87AD64, 06, 0000, EC1C, 0000 $A0F07F dx 0400, D911, 012C, 0078, 0006, 0006, AA, 08, 0069, 0000, DE43, 0007, 0000, DCA3, 800F, DCA3, 8041, 0000, 0004, 0000, 0000, 0000, 0000, 0000, 0000, DF2F, DF34, 0000, B19000, 05, F3C8, EF1E, DE07 $A0F0BF dx 1800, E2BD, 0014, 0028, 0000, 0000, AA, 00, 0000, 0000, E716, 0001, 0000, 804C, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 804C, 804C, 0000, ABB400, 05, F452, EC1C, 0000 $A0F0FF dx 1200, E31D, 0014, 0028, 0010, 0024, AA, 00, 0000, 0000, E725, 0001, 0000, E7A7, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, E7DB, E7DC, 0000, ACBE00, 05, F452, EEC6, 0000 ; Random bunch of 02's (20 of them to be exact) $A0F13F db 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02, 02 $A0F153 dx 0200, 8687, 0014, 0028, 0008, 0008, B3, 00, 0000, 0000, 86FB, 0001, 0000, 870E, 800F, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, B7FB00, 05, 0000, 0000, 0000 $A0F193 dx 0400, 878B, 0009, 0006, 0008, 0008, B3, 00, 0022, 0000, 883B, 0001, 0000, 887A, 800A, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AEC120, 05, F248, EC1C, E1A3 $A0F1D3 dx 0400, 89FD, 001E, 0014, 0008, 0008, B3, 00, 0022, 0000, 883B, 0001, 0000, 887A, 800A, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AEE520, 05, F254, EC1C, E1B1 $A0F213 dx 0400, 8AC1, 0014, 0010, 0008, 0008, B3, 00, 0022, 0000, 8B61, 0005, 0000, 8B9E, 800A, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AEE920, 05, F25A, EC1C, DE69 $A0F253 dx 0400, 8EDC, 000A, 000A, 0008, 0008, B3, 00, 0022, 0000, 8F4C, 0001, 0000, 8FAE, 800A, 804C, 8041, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 8023, 802D, 0000, AEE120, 05, F24E, EC1C, DE77 $A0F293 dx 1800, 9319, 0BB8, 0078, 0008, 0008, B3, 00, 005F, 0009, 9583, 0001, 0000, 9668, 800F, 804C, 8041, 0000, 0000, 0000, 0000, A041, 0000, 0000, 0000, 9FFF, A016, 0000, B7E300, 05, F344, F118, DDDD $A0F2D3 dx 0600, E525, 0BB8, 0BB8, 0006, 0008, B3, 00, 0000, 0000, E6CB, 0001, 0000, E655, 8000, 804C, 8041, 0000, 0000, 0000, 0000, 804C, 0000, 0000, 0000, 804C, 804C, 0000, AC8200, 05, F482, 0000, 0000 $A0F313 dx 0C00, E944, 0BB8, 0BB8, 0008, 0018, B3, 00, 0000, 0000, EAE5, 0001, 0000, EB1A, 8000, 804C, 8041, 0000, 0000, 0000, 0000, 804C, 0000, 0000, 0000, 804C, 804C, 0000, AC8800, 05, F488, 0000, 0000 $A0F353 dx 0C00, 8687, 0014, 000F, 0010, 0018, B2, 00, 0021, 0000, EF9F, 0001, 0000, F02D, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 8767, 0000, 0000, 0000, 876C, 8779, 0000, ADC600, 05, F2A8, ECCC, DDB3 $A0F393 dx 0C00, 86A7, 005A, 0014, 0010, 0018, B2, 00, 0021, 0000, EF9F, 0001, 0000, F02D, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 0000, 0000, 0000, 0000, 876C, 8779, 0000, ADC600, 05, F2AE, ECCC, E1E9 $A0F3D3 dx 0C00, 86E7, 00C8, 0050, 0010, 0018, B2, 00, 0021, 0000, EF9F, 0001, 0000, F02D, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 0000, 0000, 0000, 0000, 876C, 8779, 0000, ADC600, 05, F290, ECB6, E1F7 $A0F413 dx 0C00, 8727, 0384, 00C8, 0010, 0018, B2, 00, 0021, 0000, EF9F, 0001, 0000, F02D, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 0000, 0000, 0000, 0000, 876C, 8779, 0000, ADC600, 05, F2A2, ED50, E205 $A0F453 dx 0C00, 86C7, 012C, 00A0, 0010, 0018, B2, 00, 0021, 0000, EF9F, 0001, 0000, F02D, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 0000, 0000, 0000, 0000, 876C, 8779, 0000, ADC600, 05, F3A4, ECE2, E213 $A0F493 dx 0C00, 8707, 01F4, 000F, 0010, 0018, B2, 00, 0021, 0000, EF9F, 0001, 0000, F02D, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 0000, 0000, 0000, 0000, 876C, 8779, 0000, ADC600, 05, F4A6, EC8A, E221 $A0F4D3 dx 1800, 8687, 0014, 000F, 0010, 0020, B2, 00, 0021, 0000, F5DE, 0001, 0000, F6A2, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 8767, 0000, 0000, 0000, 876C, 8779, 0000, ADC600, 05, F386, EC5E, DDC1 $A0F513 dx 1800, 86A7, 005A, 0014, 0010, 0020, B2, 00, 0021, 0000, F5DE, 0001, 0000, F6A2, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 8767, 0000, 0000, 0000, 876C, 8779, 0000, ADC600, 05, F392, EC5E, E22F $A0F553 dx 1800, 86E7, 00C8, 0050, 0010, 0020, B2, 00, 0021, 0000, F5DE, 0001, 0001, F6A2, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 8767, 0000, 0000, 0000, 876C, 8779, 0000, ADC600, 05, F296, EC5E, E23D $A0F593 dx 1800, 8707, 0708, 0064, 0010, 0020, B2, 00, 0021, 0000, F5DE, 0001, 0000, F6A2, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 8767, 0000, 0000, 0000, 876C, 8779, 0000, ADC600, 05, F284, EC74, E24B $A0F5D3 dx 1800, 86C7, 012C, 00A0, 0010, 0020, B2, 00, 0021, 0000, F5DE, 0001, 0000, F6A2, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 8767, 0000, 0000, 0000, 876C, 8779, 0000, ADC600, 05, F3AA, EC5E, E259 $A0F613 dx 1800, 8707, 01F4, 000F, 0010, 0020, B2, 00, 0021, 0000, F5DE, 0001, 0000, F6A2, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 8767, 0000, 0000, 0000, 876C, 8779, 0000, ADC600, 05, F4AC, ECA0, E267 $A0F653 dx 0C00, 8687, 0014, 000F, 0010, 0020, B2, 00, 0066, 0000, FD02, 0001, 0000, FD32, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 8767, 0000, 0000, 0000, 876C, 8779, 0000, ADC600, 05, F38C, ECF8, DDCF $A0F693 dx 0C00, 86A7, 005A, 0014, 0010, 0020, B2, 00, 0066, 0000, FD02, 0001, 0000, FD32, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 8767, 0000, 0000, 0000, 876C, 8779, 0000, ADC600, 05, F398, ED0E, E275 $A0F6D3 dx 0C00, 86E7, 00C8, 0050, 0010, 0020, B2, 00, 0066, 0000, FD02, 0001, 0000, FD32, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 8767, 0000, 0000, 0000, 876C, 8779, 0000, ADC600, 05, F29C, ED24, E283 $A0F713 dx 0C00, 8727, 0384, 00C8, 0010, 0020, B2, 00, 0066, 0000, FD02, 0001, 0000, FD32, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 8767, 0000, 0000, 0000, 876C, 8779, 0000, ADC600, 05, F39E, ED50, E291 $A0F753 dx 0C00, 86C7, 012C, 00A0, 0010, 0020, B2, 00, 0066, 0000, FD02, 0001, 0000, FD32, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 8767, 0000, 0000, 0000, 876C, 8779, 0000, ADC600, 05, F3B0, ED3A, E29F $A0F793 dx 0C00, 8707, 01F4, 000F, 0010, 0020, B2, 00, 0066, 0000, FD02, 0001, 0000, FD32, 800F, 804C, 8041, 0000, 0004, 0000, 0000, 8767, 0000, 0000, 0000, 876C, 8779, 0000, ADC600, 05, F4B2, EC8A, E2AD } ;;; Free space ;;; $A0F9D3 fillto $A18000, $FF ; Free space