;;; $DFA2..E9AE: Creepy crawlies ;;; { ;;; $DFA2: Palette - enemy $DC3F (Wrecked Ship orange zoomer) ;;; { $A3:DFA2 dw 3800, 7F5A, 3BE0, 2680, 0920, 4F5A, 36B5, 2610, 1DCE, 5294, 39CE, 2108, 1084, 033B, 0216, 0113 } ;;; $DFC2: Instruction - enemy function = [[Y]] ;;; { $A3:DFC2 B9 00 00 LDA $0000,y[$A3:E021] $A3:DFC5 9D B2 0F STA $0FB2,x[$7E:0FB2] $A3:DFC8 C8 INY $A3:DFC9 C8 INY $A3:DFCA 6B RTL } ;;; $DFCB: Instruction list - Wrecked Ship orange zoomer - on right facing wall ;;; { $A3:DFCB dx DFC2,E091, ; Enemy function = $E091 0003,E50E, 0003,E524, 0003,E53A, 0003,E550, 0003,E566, 80ED,DFCF ; Go to $DFCF } ;;; $DFE7: Instruction list - Wrecked Ship orange zoomer - on left facing wall ;;; { $A3:DFE7 dx DFC2,E091, ; Enemy function = $E091 0003,E3C4, 0003,E3DA, 0003,E3F0, 0003,E406, 0003,E41C, 80ED,DFEB ; Go to $DFEB } ;;; $E003: Instruction list - Wrecked Ship orange zoomer - on ceiling ;;; { $A3:E003 dx DFC2,E168, ; Enemy function = $E168 0003,E432, 0003,E448, 0003,E45E, 0003,E474, 0003,E48A, 80ED,E007 ; Go to $E007 } ;;; $E01F: Instruction list - Wrecked Ship orange zoomer - on floor ;;; { $A3:E01F dx DFC2,E168, ; Enemy function = $E168 0003,E2E8, 0003,E2FE, 0003,E314, 0003,E32A, 0003,E340, 80ED,E023 ; Go to $E023 } ;;; $E03B: Wrecked Ship orange zoomer instruction list pointers ;;; { $A3:E03B dw DFCB, DFE7, E003, E01F } ;;; $E043: Initialisation AI - enemy $DC3F (Wrecked Ship orange zoomer) ;;; { $A3:E043 AE 54 0E LDX $0E54 [$7E:0E54] $A3:E046 BD 92 0F LDA $0F92,x[$7E:0F92] ;\ $A3:E049 29 03 00 AND #$0003 ;| $A3:E04C 0A ASL A ;| $A3:E04D A8 TAY ;} Enemy instruction list pointer = [$E03B + ([enemy initialisation parameter] & 3) * 2] $A3:E04E B9 3B E0 LDA $E03B,y[$A3:E041] ;| $A3:E051 9D 92 0F STA $0F92,x[$7E:0F92] ;/ $A3:E054 A9 8A E0 LDA #$E08A ;\ $A3:E057 9D B2 0F STA $0FB2,x[$7E:0FB2] ;} Enemy function = RTL $A3:E05A BD B4 0F LDA $0FB4,x[$7E:0FB4] ;\ $A3:E05D 0A ASL A ;| $A3:E05E A8 TAY ;| $A3:E05F B9 F0 E5 LDA $E5F0,y[$A3:E5F2] ;} Enemy X velocity = enemy Y velocity = [$E5F0 + [enemy parameter 1] * 2] $A3:E062 9D A8 0F STA $0FA8,x[$7E:0FA8] ;| $A3:E065 9D AA 0F STA $0FAA,x[$7E:0FAA] ;/ $A3:E068 BD 86 0F LDA $0F86,x[$7E:0F86] ;\ $A3:E06B 29 03 00 AND #$0003 ;} If [enemy properties] & 3 = 0: $A3:E06E D0 0B BNE $0B [$E07B] ;/ $A3:E070 BD A8 0F LDA $0FA8,x ;\ $A3:E073 49 FF FF EOR #$FFFF ;| $A3:E076 1A INC A ;} Negate enemy X velocity $A3:E077 9D A8 0F STA $0FA8,x ;/ $A3:E07A 6B RTL ; Return $A3:E07B C9 02 00 CMP #$0002 ;\ $A3:E07E D0 0A BNE $0A [$E08A] ;} If [enemy properties] & 3 = 2: $A3:E080 BD AA 0F LDA $0FAA,x ;\ $A3:E083 49 FF FF EOR #$FFFF ;| $A3:E086 1A INC A ;} Negate enemy Y velocity $A3:E087 9D AA 0F STA $0FAA,x ;/ $A3:E08A 6B RTL } ;;; $E08B: Main AI - enemy $DC3F (Wrecked Ship orange zoomer) ;;; { $A3:E08B AE 54 0E LDX $0E54 [$7E:0E54] $A3:E08E 7C B2 0F JMP ($0FB2,x)[$A3:E08A] } ;;; $E091: Wrecked Ship orange zoomer function - moving vertically ;;; { $A3:E091 AD 40 18 LDA $1840 [$7E:1840] $A3:E094 C9 1E 00 CMP #$001E $A3:E097 D0 15 BNE $15 [$E0AE] $A3:E099 AD 3E 18 LDA $183E [$7E:183E] $A3:E09C C9 14 00 CMP #$0014 $A3:E09F D0 0D BNE $0D [$E0AE] $A3:E0A1 BD B2 0F LDA $0FB2,x $A3:E0A4 9F 06 78 7E STA $7E7806,x $A3:E0A8 A9 85 E7 LDA #$E785 $A3:E0AB 9D B2 0F STA $0FB2,x $A3:E0AE 64 12 STZ $12 [$7E:0012] ;\ $A3:E0B0 64 14 STZ $14 [$7E:0014] ;| $A3:E0B2 BD A8 0F LDA $0FA8,x ;| $A3:E0B5 10 02 BPL $02 [$E0B9] ;} $14.$12 = [enemy X velocity] / 100h $A3:E0B7 C6 14 DEC $14 [$7E:0014] ;| ;| $A3:E0B9 85 13 STA $13 [$7E:0013] ;/ $A3:E0BB A5 14 LDA $14 [$7E:0014] ;\ $A3:E0BD 10 03 BPL $03 [$E0C2] ;} If [$14] < 0: $A3:E0BF 3A DEC A ; $14 -= 1 $A3:E0C0 80 01 BRA $01 [$E0C3] ; Else ([$14] >= 0): $A3:E0C2 1A INC A ; $14 += 1 $A3:E0C3 85 14 STA $14 [$7E:0014] $A3:E0C5 22 A4 C6 A0 JSL $A0C6A4[$A0:C6A4] ; Move enemy right by [$14].[$12], process slopes $A3:E0C9 90 61 BCC $61 [$E12C] ; If not collided with wall: go to BRANCH_NO_COLLISION $A3:E0CB A9 00 00 LDA #$0000 $A3:E0CE 9F 08 78 7E STA $7E7808,x $A3:E0D2 22 AD C8 A0 JSL $A0C8AD[$A0:C8AD] ; Align enemy Y position with non-square slope $A3:E0D6 64 12 STZ $12 [$7E:0012] ;\ $A3:E0D8 64 14 STZ $14 [$7E:0014] ;| $A3:E0DA BD AA 0F LDA $0FAA,x ;| $A3:E0DD 10 02 BPL $02 [$E0E1] ;} $14.$12 = [enemy Y velocity] / 100h $A3:E0DF C6 14 DEC $14 [$7E:0014] ;| ;| $A3:E0E1 85 13 STA $13 [$7E:0013] ;/ $A3:E0E3 22 86 C7 A0 JSL $A0C786[$A0:C786] ; Move enemy down by [$14].[$12] $A3:E0E7 B0 20 BCS $20 [$E109] ; If collided with block: go to BRANCH_COLLIDED_VERTICALLY $A3:E0E9 AE 54 0E LDX $0E54 [$7E:0E54] $A3:E0EC AD FA 0A LDA $0AFA [$7E:0AFA] $A3:E0EF 38 SEC $A3:E0F0 FD 7E 0F SBC $0F7E,x $A3:E0F3 10 07 BPL $07 [$E0FC] $A3:E0F5 BD AA 0F LDA $0FAA,x $A3:E0F8 30 0B BMI $0B [$E105] $A3:E0FA 80 05 BRA $05 [$E101] $A3:E0FC BD AA 0F LDA $0FAA,x $A3:E0FF 10 04 BPL $04 [$E105] $A3:E101 49 FF FF EOR #$FFFF $A3:E104 1A INC A $A3:E105 9D AA 0F STA $0FAA,x $A3:E108 6B RTL ; BRANCH_COLLIDED_VERTICALLY $A3:E109 BD A8 0F LDA $0FA8,x $A3:E10C 49 FF FF EOR #$FFFF $A3:E10F 1A INC A $A3:E110 9D A8 0F STA $0FA8,x $A3:E113 A0 1F E0 LDY #$E01F $A3:E116 A0 1F E0 LDY #$E01F $A3:E119 BD AA 0F LDA $0FAA,x $A3:E11C 10 03 BPL $03 [$E121] $A3:E11E A0 03 E0 LDY #$E003 $A3:E121 98 TYA $A3:E122 9D 92 0F STA $0F92,x $A3:E125 A9 01 00 LDA #$0001 $A3:E128 9D 94 0F STA $0F94,x $A3:E12B 6B RTL ; BRANCH_NO_COLLISION $A3:E12C BF 08 78 7E LDA $7E7808,x $A3:E130 1A INC A $A3:E131 9F 08 78 7E STA $7E7808,x $A3:E135 C9 04 00 CMP #$0004 $A3:E138 30 0E BMI $0E [$E148] $A3:E13A BD B2 0F LDA $0FB2,x $A3:E13D 9F 06 78 7E STA $7E7806,x $A3:E141 A9 85 E7 LDA #$E785 $A3:E144 9D B2 0F STA $0FB2,x $A3:E147 6B RTL $A3:E148 BD AA 0F LDA $0FAA,x $A3:E14B 49 FF FF EOR #$FFFF $A3:E14E 1A INC A $A3:E14F 9D AA 0F STA $0FAA,x $A3:E152 A0 1F E0 LDY #$E01F $A3:E155 BD AA 0F LDA $0FAA,x $A3:E158 10 03 BPL $03 [$E15D] $A3:E15A A0 03 E0 LDY #$E003 $A3:E15D 98 TYA $A3:E15E 9D 92 0F STA $0F92,x $A3:E161 A9 01 00 LDA #$0001 $A3:E164 9D 94 0F STA $0F94,x $A3:E167 6B RTL } ;;; $E168: Wrecked Ship orange zoomer function - moving horizontally ;;; { $A3:E168 AD 40 18 LDA $1840 [$7E:1840] $A3:E16B C9 1E 00 CMP #$001E $A3:E16E D0 15 BNE $15 [$E185] $A3:E170 AD 3E 18 LDA $183E [$7E:183E] $A3:E173 C9 14 00 CMP #$0014 $A3:E176 D0 0D BNE $0D [$E185] $A3:E178 BD B2 0F LDA $0FB2,x $A3:E17B 9F 06 78 7E STA $7E7806,x $A3:E17F A9 85 E7 LDA #$E785 $A3:E182 9D B2 0F STA $0FB2,x $A3:E185 64 12 STZ $12 [$7E:0012] ;\ $A3:E187 64 14 STZ $14 [$7E:0014] ;| $A3:E189 BD AA 0F LDA $0FAA,x[$7E:0FAA] ;| $A3:E18C 10 02 BPL $02 [$E190] ;} $14.$12 = [enemy Y velocity] / 100h $A3:E18E C6 14 DEC $14 [$7E:0014] ;| ;| $A3:E190 85 13 STA $13 [$7E:0013] ;/ $A3:E192 A5 14 LDA $14 [$7E:0014] ;\ $A3:E194 10 03 BPL $03 [$E199] ;} If [$14] < 0: $A3:E196 3A DEC A ; $14 -= 1 $A3:E197 80 01 BRA $01 [$E19A] ; Else ([$14] >= 0): $A3:E199 1A INC A ; $14 += 1 $A3:E19A 85 14 STA $14 [$7E:0014] $A3:E19C 22 86 C7 A0 JSL $A0C786[$A0:C786] ; Move enemy down by [$14].[$12] $A3:E1A0 90 5E BCC $5E [$E200] ; If not collided with block: go to BRANCH_NO_COLLISION $A3:E1A2 A9 00 00 LDA #$0000 $A3:E1A5 9F 08 78 7E STA $7E7808,x[$7E:7808] $A3:E1A9 64 12 STZ $12 [$7E:0012] ;\ $A3:E1AB 64 14 STZ $14 [$7E:0014] ;| $A3:E1AD BD A8 0F LDA $0FA8,x[$7E:0FA8] ;| $A3:E1B0 10 02 BPL $02 [$E1B4] ;} $14.$12 = [enemy X velocity] / 100h $A3:E1B2 C6 14 DEC $14 [$7E:0014] ;| ;| $A3:E1B4 85 13 STA $13 [$7E:0013] ;/ $A3:E1B6 22 A4 C6 A0 JSL $A0C6A4[$A0:C6A4] ; Move enemy right by [$14].[$12], process slopes $A3:E1BA B0 24 BCS $24 [$E1E0] ; If collided with wall: go to BRANCH_COLLIDED_HORIZONTALLY $A3:E1BC 22 AD C8 A0 JSL $A0C8AD[$A0:C8AD] ; Align enemy Y position with non-square slope $A3:E1C0 AE 54 0E LDX $0E54 [$7E:0E54] $A3:E1C3 AD F6 0A LDA $0AF6 [$7E:0AF6] $A3:E1C6 38 SEC $A3:E1C7 FD 7A 0F SBC $0F7A,x[$7E:0F7A] $A3:E1CA 10 07 BPL $07 [$E1D3] $A3:E1CC BD A8 0F LDA $0FA8,x[$7E:0FA8] $A3:E1CF 30 0B BMI $0B [$E1DC] $A3:E1D1 80 05 BRA $05 [$E1D8] $A3:E1D3 BD A8 0F LDA $0FA8,x[$7E:0FA8] $A3:E1D6 10 04 BPL $04 [$E1DC] $A3:E1D8 49 FF FF EOR #$FFFF $A3:E1DB 1A INC A $A3:E1DC 9D A8 0F STA $0FA8,x[$7E:0FA8] $A3:E1DF 6B RTL ; BRANCH_COLLIDED_HORIZONTALLY $A3:E1E0 BD AA 0F LDA $0FAA,x $A3:E1E3 49 FF FF EOR #$FFFF $A3:E1E6 1A INC A $A3:E1E7 9D AA 0F STA $0FAA,x $A3:E1EA A0 E7 DF LDY #$DFE7 $A3:E1ED BD A8 0F LDA $0FA8,x $A3:E1F0 10 03 BPL $03 [$E1F5] $A3:E1F2 A0 CB DF LDY #$DFCB $A3:E1F5 98 TYA $A3:E1F6 9D 92 0F STA $0F92,x $A3:E1F9 A9 01 00 LDA #$0001 $A3:E1FC 9D 94 0F STA $0F94,x $A3:E1FF 6B RTL ; BRANCH_NO_COLLISION $A3:E200 BF 08 78 7E LDA $7E7808,x $A3:E204 1A INC A $A3:E205 9F 08 78 7E STA $7E7808,x $A3:E209 C9 04 00 CMP #$0004 $A3:E20C 30 0E BMI $0E [$E21C] $A3:E20E BD B2 0F LDA $0FB2,x $A3:E211 9F 06 78 7E STA $7E7806,x $A3:E215 A9 85 E7 LDA #$E785 $A3:E218 9D B2 0F STA $0FB2,x $A3:E21B 6B RTL $A3:E21C BD A8 0F LDA $0FA8,x $A3:E21F 49 FF FF EOR #$FFFF $A3:E222 1A INC A $A3:E223 9D A8 0F STA $0FA8,x $A3:E226 A0 E7 DF LDY #$DFE7 $A3:E229 BD A8 0F LDA $0FA8,x $A3:E22C 10 03 BPL $03 [$E231] $A3:E22E A0 CB DF LDY #$DFCB $A3:E231 98 TYA $A3:E232 9D 92 0F STA $0F92,x $A3:E235 A9 01 00 LDA #$0001 $A3:E238 9D 94 0F STA $0F94,x $A3:E23B 6B RTL } ;;; $E23C: Palette - enemy $DC7F (big eye bugs) ;;; { $A3:E23C dw 3800, 3F5A, 2E50, 00E5, 0063, 3AB3, 220E, 1169, 0927, 03FF, 02F7, 0210, 0108, 7FFF, 0299, 0170 } ;;; $E25C: Instruction list - creepy crawly - on right facing wall ;;; { $A3:E25C dx E660,E6C8, ; Enemy function = $E6C8 0003,E50E, 0003,E524, 0003,E53A, 0003,E550, 0003,E566, 80ED,E260 ; Go to $E260 } ;;; $E278: Instruction list - creepy crawly - on left facing wall ;;; { $A3:E278 dx E660,E6C8, ; Enemy function = $E6C8 0003,E3C4, 0003,E3DA, 0003,E3F0, 0003,E406, 0003,E41C, 80ED,E27C ; Go to $E27C } ;;; $E294: Instruction list - creepy crawly - on ceiling ;;; { $A3:E294 dx E660,E7F2, ; Enemy function = $E7F2 0003,E432, 0003,E448, 0003,E45E, 0003,E474, 0003,E48A, 80ED,E298 ; Go to $E298 } ;;; $E2B0: Instruction list - creepy crawly - on floor ;;; { $A3:E2B0 dx E660,E7F2, ; Enemy function = $E7F2 0003,E2E8, 0003,E2FE, 0003,E314, 0003,E32A, 0003,E340, 80ED,E2B4 ; Go to $E2B4 } ;;; $E2CC: Creepy crawly instruction list pointers ;;; { ; Indexed by [enemy initialisation parameter] * 2 $A3:E2CC dw E25C, E278, E294, E2B0 } ;;; $E2D4: Initialisation AI - enemy $DC7F (big eye bugs) ;;; { $A3:E2D4 AE 54 0E LDX $0E54 [$7E:0E54] $A3:E2D7 BD 92 0F LDA $0F92,x[$7E:0FD2] ;\ $A3:E2DA 29 03 00 AND #$0003 ;| $A3:E2DD 0A ASL A ;| $A3:E2DE A8 TAY ;} Enemy instruction list pointer = [$E2CC + ([enemy initialisation parameter] & 3) * 2] $A3:E2DF B9 CC E2 LDA $E2CC,y[$A3:E2CE] ;| $A3:E2E2 9D 92 0F STA $0F92,x[$7E:0FD2] ;/ $A3:E2E5 4C 7A E6 JMP $E67A [$A3:E67A] ; Go to creepy crawly common initialisation AI } ;;; $E2E8: Spritemaps ;;; { $A3:E2E8 dx 0004, 0002,00,2121, 01F6,00,2120, 8000,F8,2102, 81F0,F8,2100 $A3:E2FE dx 0004, 0002,00,2123, 01F6,00,2122, 8000,F7,2102, 81F0,F7,2100 $A3:E314 dx 0004, 0002,00,2125, 01F6,00,2124, 81F0,F7,6102, 8000,F7,6100 $A3:E32A dx 0004, 0002,00,2127, 01F6,00,2126, 81F0,F7,6102, 8000,F7,6100 $A3:E340 dx 0004, 0002,00,2129, 01F6,00,2128, 8000,F8,2102, 81F0,F8,2100 $A3:E356 dx 0004, 01F5,00,6121, 0001,00,6120, 81EF,F8,6102, 81FF,F8,6100 $A3:E36C dx 0004, 01F5,00,6123, 0001,00,6122, 81EF,F7,6102, 81FF,F7,6100 $A3:E382 dx 0004, 01F5,00,6125, 0001,00,6124, 81FF,F7,2102, 81EF,F7,2100 $A3:E398 dx 0004, 01F5,00,6127, 0001,00,6126, 81FF,F7,2102, 81EF,F7,2100 $A3:E3AE dx 0004, 01F5,00,6129, 0001,00,6128, 81EF,F8,6102, 81FF,F8,6100 $A3:E3C4 dx 0004, 0000,F6,2108, 0000,02,2118, 81F8,00,2106, 81F8,F0,2104 $A3:E3DA dx 0004, 0000,F6,2109, 0000,02,2119, 81F7,00,2106, 81F7,F0,2104 $A3:E3F0 dx 0004, 0000,F6,210A, 0000,02,211A, 81F7,F0,A106, 81F7,00,A104 $A3:E406 dx 0004, 0000,F6,210B, 0000,02,211B, 81F7,F0,A106, 81F7,00,A104 $A3:E41C dx 0004, 0000,F6,210C, 0000,02,211C, 81F8,00,2106, 81F8,F0,2104 $A3:E432 dx 0004, 0002,F8,A121, 01F6,F8,A120, 8000,F8,A102, 81F0,F8,A100 $A3:E448 dx 0004, 0002,F7,A123, 01F6,F7,A122, 8000,F9,A102, 81F0,F9,A100 $A3:E45E dx 0004, 0002,F7,A125, 01F6,F7,A124, 81F0,F9,E102, 8000,F9,E100 $A3:E474 dx 0004, 0002,F7,A127, 01F6,F7,A126, 81F0,F9,E102, 8000,F9,E100 $A3:E48A dx 0004, 0002,F8,A129, 01F6,F8,A128, 8000,F8,A102, 81F0,F8,A100 $A3:E4A0 dx 0004, 01F5,F8,E121, 0001,F8,E120, 81EF,F8,E102, 81FF,F8,E100 $A3:E4B6 dx 0004, 01F5,F7,E123, 0001,F7,E122, 81EF,F9,E102, 81FF,F9,E100 $A3:E4CC dx 0004, 01F5,F7,E125, 0001,F7,E124, 81FF,F9,A102, 81EF,F9,A100 $A3:E4E2 dx 0004, 01F5,F7,E127, 0001,F7,E126, 81FF,F9,A102, 81EF,F9,A100 $A3:E4F8 dx 0004, 01F5,F8,E129, 0001,F8,E128, 81EF,F8,E102, 81FF,F8,E100 $A3:E50E dx 0004, 01F8,F6,6108, 01F8,02,6118, 81F8,00,6106, 81F8,F0,6104 $A3:E524 dx 0004, 01F7,F6,6109, 01F7,02,6119, 81F9,00,6106, 81F9,F0,6104 $A3:E53A dx 0004, 01F7,F6,610A, 01F7,02,611A, 81F9,F0,E106, 81F9,00,E104 $A3:E550 dx 0004, 01F7,F6,610B, 01F7,02,611B, 81F9,F0,E106, 81F9,00,E104 $A3:E566 dx 0004, 01F8,F6,610C, 01F8,02,611C, 81F8,00,6106, 81F8,F0,6104 } ;;; $E57C: Palette - enemy $DCBF (fire zoomer) ;;; { $A3:E57C dw 3800, 02FF, 01BF, 000F, 0008, 01BF, 011B, 00BA, 0011, 7FFF, 039C, 0237, 00D1, 3BE0, 2680, 1580 } ;;; $E59C: Initialisation AI - enemy $DCBF (fire zoomer) ;;; { $A3:E59C AE 54 0E LDX $0E54 [$7E:0E54] $A3:E59F BD 92 0F LDA $0F92,x[$7E:0FD2] ;\ $A3:E5A2 29 03 00 AND #$0003 ;| $A3:E5A5 0A ASL A ;| $A3:E5A6 A8 TAY ;} Enemy instruction list pointer = [$E2CC + ([enemy initialisation parameter] & 3) * 2] $A3:E5A7 B9 CC E2 LDA $E2CC,y[$A3:E2D2] ;| $A3:E5AA 9D 92 0F STA $0F92,x[$7E:0FD2] ;/ $A3:E5AD 4C 7A E6 JMP $E67A [$A3:E67A] ; Go to creepy crawly common initialisation AI } ;;; $E5B0: Palette - enemy $DCFF (zoomer) ;;; { $A3:E5B0 dw 3800, 72FA, 55B0, 2845, 1801, 6210, 496B, 38C6, 2C63, 7FE0, 7DA0, 48E0, 30A0, 03FF, 0237, 00D1 } ;;; $E5D0: Palette - enemy $DD3F (stone zoomer) ;;; { $A3:E5D0 dw 3800, 7FFF, 4ED3, 1926, 0481, 5F57, 4691, 360D, 2DCB, 6BBA, 56B2, 2947, 18C3, 7FFF, 4ED3, 1926 } ;;; $E5F0: ;;; { ; Speed. Unit is 1/100h px/frame. Indexed by [enemy parameter 1] * 2 $A3:E5F0 dw 0040, 0080, 00C0, 0100, 0140, 0180, 01C0, 0200, 0240, 0280, 02C0, 0300, 0340, 0380, 0400, 0440, 0540, 0580, 05C0, 0600, 0640, 0680, 06C0, 0700, 0740, 0780, 07C0, 0800, 0840, 0880, 0800, 0000 ; Instruction list pointers $A3:E630 dw E294, E294, E294, B5D3, 96AB, 98AB ; On ceiling $A3:E63C dw E2B0, E2B0, E2B0, B5DB, 96C3, 990B ; On floor $A3:E648 dw E25C, E25C, E25C, B5E3, 967B, 984B ; On right facing wall $A3:E654 dw E278, E278, E278, B5EB, 9693, 988B ; On left facing wall } ;;; $E660: Instruction - enemy function = [[Y]] ;;; { $A3:E660 B9 00 00 LDA $0000,y[$A3:E2B2] $A3:E663 9D B2 0F STA $0FB2,x[$7E:0FB2] $A3:E666 C8 INY $A3:E667 C8 INY $A3:E668 6B RTL } ;;; $E669: Initialisation AI - enemy $DCFF/$DD3F (zoomer / stone zoomer) ;;; { $A3:E669 AE 54 0E LDX $0E54 [$7E:0E54] $A3:E66C BD 92 0F LDA $0F92,x[$7E:0F92] ;\ $A3:E66F 29 03 00 AND #$0003 ;| $A3:E672 0A ASL A ;| $A3:E673 A8 TAY ;} Enemy instruction list pointer = [$E2CC + ([enemy initialisation parameter] & 3) * 2] $A3:E674 B9 CC E2 LDA $E2CC,y[$A3:E2D2] ;| $A3:E677 9D 92 0F STA $0F92,x[$7E:0F92] ;/ } ;;; $E67A: Creepy crawly common initialisation AI ;;; { ; Crab / slug / Norfair slow fireball / Maridia snail / big eye bugs / zoomer $A3:E67A A9 4D 80 LDA #$804D ;\ $A3:E67D 9D 8E 0F STA $0F8E,x[$7E:0F8E] ;} Enemy spritemap pointer = $804D (nothing) $A3:E680 A9 01 00 LDA #$0001 ;\ $A3:E683 9D 94 0F STA $0F94,x[$7E:0F94] ;} Enemy instruction timer = 1 $A3:E686 A9 C1 E6 LDA #$E6C1 ;\ $A3:E689 9D B2 0F STA $0FB2,x[$7E:0FB2] ;} Enemy function = RTL $A3:E68C BD B4 0F LDA $0FB4,x[$7E:0FB4] ;\ $A3:E68F C9 FF 00 CMP #$00FF ;} If [enemy parameter 1] != FFh: $A3:E692 F0 0B BEQ $0B [$E69F] ;/ $A3:E694 0A ASL A ;\ $A3:E695 A8 TAY ;| $A3:E696 B9 F0 E5 LDA $E5F0,y[$A3:E5F4] ;} Enemy X velocity = enemy Y velocity = [$E5F0 + [enemy parameter 1] * 2] $A3:E699 9D A8 0F STA $0FA8,x[$7E:0FA8] ;| $A3:E69C 9D AA 0F STA $0FAA,x[$7E:0FAA] ;/ $A3:E69F BD 86 0F LDA $0F86,x[$7E:0F86] ;\ $A3:E6A2 29 03 00 AND #$0003 ;} If [enemy properties] & 3 = 0: $A3:E6A5 D0 0B BNE $0B [$E6B2] ;/ $A3:E6A7 BD A8 0F LDA $0FA8,x[$7E:0FA8] ;\ $A3:E6AA 49 FF FF EOR #$FFFF ;| $A3:E6AD 1A INC A ;} Negate [enemy X velocity] $A3:E6AE 9D A8 0F STA $0FA8,x[$7E:0FA8] ;/ $A3:E6B1 6B RTL ; Return $A3:E6B2 C9 02 00 CMP #$0002 ;\ $A3:E6B5 D0 0A BNE $0A [$E6C1] ;} If [enemy properties] & 3 = 2: $A3:E6B7 BD AA 0F LDA $0FAA,x[$7E:126A] ;\ $A3:E6BA 49 FF FF EOR #$FFFF ;| $A3:E6BD 1A INC A ;} Negate [enemy Y velocity] $A3:E6BE 9D AA 0F STA $0FAA,x[$7E:126A] ;/ $A3:E6C1 6B RTL } ;;; $E6C2: Main AI - enemy $D77F/$D7BF/$DABF/$DC7F/$DCBF/$DCFF/$DD3F (crab / slug / Norfair slow fireball / big eye bugs / zoomer) ;;; { $A3:E6C2 AE 54 0E LDX $0E54 [$7E:0E54] ;\ $A3:E6C5 7C B2 0F JMP ($0FB2,x)[$A3:E6C1];} Go to [enemy function] } ;;; $E6C8: Creepy crawly function - crawling vertically ;;; { $A3:E6C8 AD 40 18 LDA $1840 [$7E:1840] ;\ $A3:E6CB C9 1E 00 CMP #$001E ;} If [earthquake timer] = 1Eh: $A3:E6CE D0 15 BNE $15 [$E6E5] ;/ $A3:E6D0 AD 3E 18 LDA $183E [$7E:183E] ;\ $A3:E6D3 C9 14 00 CMP #$0014 ;} If [earthquake type] = 14h: $A3:E6D6 D0 0D BNE $0D [$E6E5] ;/ $A3:E6D8 BD B2 0F LDA $0FB2,x[$7E:0FF2] ;\ $A3:E6DB 9F 06 78 7E STA $7E7806,x[$7E:7846];} Enemy $7E7806 = $E6C8 (crawling vertically) $A3:E6DF A9 85 E7 LDA #$E785 ;\ $A3:E6E2 9D B2 0F STA $0FB2,x[$7E:0FF2] ;} Enemy function = $0FB2 (falling) $A3:E6E5 64 12 STZ $12 [$7E:0012] ;\ $A3:E6E7 64 14 STZ $14 [$7E:0014] ;| $A3:E6E9 BD A8 0F LDA $0FA8,x[$7E:0FE8] ;| $A3:E6EC 10 02 BPL $02 [$E6F0] ;} $14.$12 = [enemy X velocity] / 100h $A3:E6EE C6 14 DEC $14 [$7E:0014] ;| ;| $A3:E6F0 85 13 STA $13 [$7E:0013] ;/ $A3:E6F2 A5 14 LDA $14 [$7E:0014] ;\ $A3:E6F4 10 03 BPL $03 [$E6F9] ;} If [$14] < 0: $A3:E6F6 3A DEC A ; $14 -= 1 $A3:E6F7 80 01 BRA $01 [$E6FA] ; Else ([$14] >= 0): $A3:E6F9 1A INC A ; $14 += 1 $A3:E6FA 85 14 STA $14 [$7E:0014] $A3:E6FC 22 AB C6 A0 JSL $A0C6AB[$A0:C6AB] ; Move enemy right by [$14].[$12] $A3:E700 90 43 BCC $43 [$E745] ; If not collided with wall: go to BRANCH_NO_COLLISION $A3:E702 A9 00 00 LDA #$0000 ;\ $A3:E705 9F 08 78 7E STA $7E7808,x[$7E:7848];} Enemy fall timer = 0 $A3:E709 22 AD C8 A0 JSL $A0C8AD[$A0:C8AD] ; Align enemy Y position with non-square slope $A3:E70D 64 12 STZ $12 [$7E:0012] ;\ $A3:E70F 64 14 STZ $14 [$7E:0014] ;| $A3:E711 BD AA 0F LDA $0FAA,x[$7E:0FEA] ;| $A3:E714 10 02 BPL $02 [$E718] ;} $14.$12 = [enemy Y velocity] / 100h $A3:E716 C6 14 DEC $14 [$7E:0014] ;| ;| $A3:E718 85 13 STA $13 [$7E:0013] ;/ $A3:E71A 22 86 C7 A0 JSL $A0C786[$A0:C786] ; Move enemy down by [$14].[$12] $A3:E71E B0 01 BCS $01 [$E721] ; If not collided with block: $A3:E720 6B RTL ; Return ; Handles inside corners $A3:E721 BD A8 0F LDA $0FA8,x[$7E:0FA8] ;\ $A3:E724 49 FF FF EOR #$FFFF ;| $A3:E727 1A INC A ;} Negate [enemy X velocity] $A3:E728 9D A8 0F STA $0FA8,x[$7E:0FA8] ;/ $A3:E72B BC B6 0F LDY $0FB6,x[$7E:0FB6] ; Y = [enemy parameter 2] $A3:E72E BD AA 0F LDA $0FAA,x[$7E:0FAA] ;\ $A3:E731 10 05 BPL $05 [$E738] ;} If [enemy Y velocity] < 0: $A3:E733 B9 30 E6 LDA $E630,y[$A3:E630] ; Enemy instruction list pointer = [$E630 + [Y]] (on ceiling) $A3:E736 80 03 BRA $03 [$E73B] $A3:E738 B9 3C E6 LDA $E63C,y[$A3:E63C] ; Else: enemy instruction list pointer = [$E63C + [Y]] (on floor) $A3:E73B 9D 92 0F STA $0F92,x[$7E:0F92] $A3:E73E A9 01 00 LDA #$0001 ;\ $A3:E741 9D 94 0F STA $0F94,x[$7E:0F94] ;} Enemy instruction timer = 1 $A3:E744 6B RTL ; BRANCH_NO_COLLISION $A3:E745 BF 08 78 7E LDA $7E7808,x[$7E:7848];\ $A3:E749 1A INC A ;} Enemy fall timer += 1 $A3:E74A 9F 08 78 7E STA $7E7808,x[$7E:7848];/ $A3:E74E C9 04 00 CMP #$0004 ;\ $A3:E751 30 0E BMI $0E [$E761] ;} If [enemy fall timer] >= 4: $A3:E753 BD B2 0F LDA $0FB2,x[$7E:10F2] ;\ $A3:E756 9F 06 78 7E STA $7E7806,x[$7E:7946];} Enemy $7E7806 = $E6C8 (crawling vertically) $A3:E75A A9 85 E7 LDA #$E785 ;\ $A3:E75D 9D B2 0F STA $0FB2,x[$7E:10F2] ;} Enemy function = $0FB2 (falling) $A3:E760 6B RTL ; Handles outside corners $A3:E761 BD AA 0F LDA $0FAA,x[$7E:0FEA] ;\ $A3:E764 49 FF FF EOR #$FFFF ;| $A3:E767 1A INC A ;} Negate [enemy Y velocity] $A3:E768 9D AA 0F STA $0FAA,x[$7E:0FEA] ;/ $A3:E76B BC B6 0F LDY $0FB6,x[$7E:0FF6] ; Y = [enemy parameter 2] $A3:E76E BD AA 0F LDA $0FAA,x[$7E:0FEA] ;\ $A3:E771 10 05 BPL $05 [$E778] ;} If [enemy Y velocity] < 0: $A3:E773 B9 30 E6 LDA $E630,y[$A3:E630] ; Enemy instruction list pointer = [$E630 + [Y]] (on ceiling) $A3:E776 80 03 BRA $03 [$E77B] $A3:E778 B9 3C E6 LDA $E63C,y[$A3:E63C] ; Else: enemy instruction list pointer = [$E63C + [Y]] (on floor) $A3:E77B 9D 92 0F STA $0F92,x[$7E:0FD2] $A3:E77E A9 01 00 LDA #$0001 ;\ $A3:E781 9D 94 0F STA $0F94,x[$7E:0FD4] ;} Enemy instruction timer = 1 $A3:E784 6B RTL } ;;; $E785: Creepy crawly function - falling ;;; { $A3:E785 BF 02 78 7E LDA $7E7802,x[$7E:7A02];\ $A3:E789 85 12 STA $12 [$7E:0012] ;| $A3:E78B BF 04 78 7E LDA $7E7804,x[$7E:7A04];} Move enemy down by [enemy fall Y velocity] $A3:E78F 85 14 STA $14 [$7E:0014] ;| $A3:E791 22 86 C7 A0 JSL $A0C786[$A0:C786] ;/ $A3:E795 90 28 BCC $28 [$E7BF] ; If not collided with block: go to BRANCH_NO_COLLISION $A3:E797 BD B4 0F LDA $0FB4,x[$7E:11B4] ;\ $A3:E79A C9 FF 00 CMP #$00FF ;} If [enemy parameter 1] = FFh: $A3:E79D D0 09 BNE $09 [$E7A8] ;/ $A3:E79F A9 80 00 LDA #$0080 ;\ $A3:E7A2 9D A8 0F STA $0FA8,x[$7E:1068] ;} Enemy X velocity = enemy Y velocity = 0.8h $A3:E7A5 9D AA 0F STA $0FAA,x[$7E:106A] ;/ $A3:E7A8 A9 00 00 LDA #$0000 ;\ $A3:E7AB 9F 02 78 7E STA $7E7802,x[$7E:7A02];} Enemy fall Y velocity = 0 $A3:E7AF 9F 04 78 7E STA $7E7804,x[$7E:7A04];/ $A3:E7B3 9F 08 78 7E STA $7E7808,x[$7E:7A08]; Enemy fall timer = 0 $A3:E7B7 BF 06 78 7E LDA $7E7806,x[$7E:7A06];\ $A3:E7BB 9D B2 0F STA $0FB2,x[$7E:11B2] ;} Enemy function = [enemy $7E7806] $A3:E7BE 6B RTL ; BRANCH_NO_COLLISION $A3:E7BF BF 04 78 7E LDA $7E7804,x[$7E:7A04];\ $A3:E7C3 C9 04 00 CMP #$0004 ;} If [enemy fall Y velocity] < 4: $A3:E7C6 10 17 BPL $17 [$E7DF] ;/ $A3:E7C8 BF 02 78 7E LDA $7E7802,x[$7E:7A02];\ $A3:E7CC 18 CLC ;| $A3:E7CD 69 00 80 ADC #$8000 ;| $A3:E7D0 9F 02 78 7E STA $7E7802,x[$7E:7A02];} Enemy fall Y velocity += 0.8h $A3:E7D4 BF 04 78 7E LDA $7E7804,x[$7E:7A04];| $A3:E7D8 69 00 00 ADC #$0000 ;| $A3:E7DB 9F 04 78 7E STA $7E7804,x[$7E:7A04];/ $A3:E7DF BF 02 78 7E LDA $7E7802,x[$7E:7A02];\ $A3:E7E3 D0 0C BNE $0C [$E7F1] ;| $A3:E7E5 BF 04 78 7E LDA $7E7804,x[$7E:7A04];| $A3:E7E9 D0 06 BNE $06 [$E7F1] ;} >_<; $A3:E7EB A9 C8 E6 LDA #$E6C8 ;| $A3:E7EE 9D B2 0F STA $0FB2,x ;/ $A3:E7F1 6B RTL } ;;; $E7F2: Creepy crawly function - crawling horizontally ;;; { $A3:E7F2 AD 40 18 LDA $1840 [$7E:1840] ;\ $A3:E7F5 C9 1E 00 CMP #$001E ;} If [earthquake timer] = 1Eh: $A3:E7F8 D0 15 BNE $15 [$E80F] ;/ $A3:E7FA AD 3E 18 LDA $183E [$7E:183E] ;\ $A3:E7FD C9 14 00 CMP #$0014 ;} If [earthquake type] = 14h: $A3:E800 D0 0D BNE $0D [$E80F] ;/ $A3:E802 BD B2 0F LDA $0FB2,x[$7E:10B2] $A3:E805 9F 06 78 7E STA $7E7806,x[$7E:7906];} Enemy $7E7806 = $E7F2 (crawling horizontally) $A3:E809 A9 85 E7 LDA #$E785 ;\ $A3:E80C 9D B2 0F STA $0FB2,x[$7E:10B2] ;} Enemy function = $0FB2 (falling) $A3:E80F 64 12 STZ $12 [$7E:0012] ;\ $A3:E811 64 14 STZ $14 [$7E:0014] ;| $A3:E813 BD AA 0F LDA $0FAA,x[$7E:0FAA] ;| $A3:E816 10 02 BPL $02 [$E81A] ;} $14.$12 = [enemy Y velocity] / 100h $A3:E818 C6 14 DEC $14 [$7E:0014] ;| ;| $A3:E81A 85 13 STA $13 [$7E:0013] ;/ $A3:E81C A5 14 LDA $14 [$7E:0014] ;\ $A3:E81E 10 03 BPL $03 [$E823] ;} If [$14] < 0: $A3:E820 3A DEC A ; $14 -= 1 $A3:E821 80 01 BRA $01 [$E824] ; Else ([$14] >= 0): $A3:E823 1A INC A ; $14 += 1 $A3:E824 85 14 STA $14 [$7E:0014] $A3:E826 22 86 C7 A0 JSL $A0C786[$A0:C786] ; Move enemy down by [$14].[$12] $A3:E82A 90 39 BCC $39 [$E865] ; If not collided with block: go to BRANCH_NO_COLLISION $A3:E82C A9 00 00 LDA #$0000 ;\ $A3:E82F 9F 08 78 7E STA $7E7808,x[$7E:7808];} Enemy fall timer = 0 $A3:E833 20 A5 E8 JSR $E8A5 [$A3:E8A5] ; Determine creepy crawly horizontal speed $A3:E836 22 AB C6 A0 JSL $A0C6AB[$A0:C6AB] ; Move enemy right by [$14].[$12] $A3:E83A B0 05 BCS $05 [$E841] ; If not collided with wall: $A3:E83C 22 AD C8 A0 JSL $A0C8AD[$A0:C8AD] ; Align enemy Y position with non-square slope $A3:E840 6B RTL ; Handles inside corners $A3:E841 BD AA 0F LDA $0FAA,x[$7E:0FAA] ;\ $A3:E844 49 FF FF EOR #$FFFF ;| $A3:E847 1A INC A ;} Negate [enemy Y velocity] $A3:E848 9D AA 0F STA $0FAA,x[$7E:0FAA] ;/ $A3:E84B BC B6 0F LDY $0FB6,x[$7E:0FB6] ; Y = [enemy parameter 2] $A3:E84E BD A8 0F LDA $0FA8,x[$7E:0FA8] ;\ $A3:E851 10 05 BPL $05 [$E858] ;} If [enemy X velocity] < 0: $A3:E853 B9 48 E6 LDA $E648,y[$A3:E648] ; Enemy instruction list pointer = [$E648 + [Y]] (on right facing wall) $A3:E856 80 03 BRA $03 [$E85B] $A3:E858 B9 54 E6 LDA $E654,y[$A3:E654] ; Else: enemy instruction list pointer = [$E654 + [Y]] (on left facing wall) $A3:E85B 9D 92 0F STA $0F92,x[$7E:0F92] $A3:E85E A9 01 00 LDA #$0001 ;\ $A3:E861 9D 94 0F STA $0F94,x[$7E:0F94] ;} Enemy instruction timer = 1 $A3:E864 6B RTL ; BRANCH_NO_COLLISION $A3:E865 BF 08 78 7E LDA $7E7808,x[$7E:7848];\ $A3:E869 1A INC A ;} Enemy fall timer += 1 $A3:E86A 9F 08 78 7E STA $7E7808,x[$7E:7848];/ $A3:E86E C9 04 00 CMP #$0004 ;\ $A3:E871 30 0E BMI $0E [$E881] ;} If [enemy fall timer] >= 4: $A3:E873 BD B2 0F LDA $0FB2,x[$7E:11B2] ;\ $A3:E876 9F 06 78 7E STA $7E7806,x[$7E:7A06];} Enemy $7E7806 = $E7F2 (crawling horizontally) $A3:E87A A9 85 E7 LDA #$E785 ;\ $A3:E87D 9D B2 0F STA $0FB2,x[$7E:11B2] ;} Enemy function = $0FB2 (falling) $A3:E880 6B RTL ; Handles outside corners $A3:E881 BD A8 0F LDA $0FA8,x[$7E:0FE8] ;\ $A3:E884 49 FF FF EOR #$FFFF ;| $A3:E887 1A INC A ;} Negate [enemy X velocity] $A3:E888 9D A8 0F STA $0FA8,x[$7E:0FE8] ;/ $A3:E88B BC B6 0F LDY $0FB6,x[$7E:0FF6] ; Y = [enemy parameter 2] $A3:E88E BD A8 0F LDA $0FA8,x[$7E:0FE8] ;\ $A3:E891 10 05 BPL $05 [$E898] ;} If [enemy X velocity] < 0: $A3:E893 B9 48 E6 LDA $E648,y[$A3:E648] ; Enemy instruction list pointer = [$E648 + [Y]] (on right facing wall) $A3:E896 80 03 BRA $03 [$E89B] $A3:E898 B9 54 E6 LDA $E654,y[$A3:E654] ; Else: enemy instruction list pointer = [$E654 + [Y]] (on left facing wall) $A3:E89B 9D 92 0F STA $0F92,x[$7E:0FD2] $A3:E89E A9 01 00 LDA #$0001 ;\ $A3:E8A1 9D 94 0F STA $0F94,x[$7E:0FD4] ;} Enemy instruction timer = 1 $A3:E8A4 6B RTL } ;;; $E8A5: Determine creepy crawly horizontal speed ;;; { ; Adjusts horizontal speed according to current slope being traversed $A3:E8A5 BD 7A 0F LDA $0F7A,x[$7E:0F7A] $A3:E8A8 48 PHA $A3:E8A9 BD 7E 0F LDA $0F7E,x[$7E:0F7E] $A3:E8AC 3C AA 0F BIT $0FAA,x[$7E:0FAA] ;\ $A3:E8AF 10 06 BPL $06 [$E8B7] ;} If [enemy $0FAA] < 0: $A3:E8B1 38 SEC ;\ $A3:E8B2 FD 84 0F SBC $0F84,x[$7E:0FC4] ;} A = (enemy top boundary) $A3:E8B5 80 05 BRA $05 [$E8BC] $A3:E8B7 18 CLC ;\ Else ([enemy $0FAA] >= 0): $A3:E8B8 7D 84 0F ADC $0F84,x[$7E:0F84] ;} A = (enemy bottom boundary) $A3:E8BB 3A DEC A ;/ $A3:E8BC 48 PHA ;\ $A3:E8BD 22 70 BB A0 JSL $A0BB70[$A0:BB70] ;} Calculate the block containing ([enemy X position], [A]) $A3:E8C1 AD C4 0D LDA $0DC4 [$7E:0DC4] ;\ $A3:E8C4 0A ASL A ;| $A3:E8C5 AA TAX ;| $A3:E8C6 BF 02 00 7F LDA $7F0002,x[$7F:00EC];} If (block type) != slope: go to BRANCH_NORMAL_SPEED $A3:E8CA 29 00 F0 AND #$F000 ;| $A3:E8CD C9 00 10 CMP #$1000 ;| $A3:E8D0 D0 4C BNE $4C [$E91E] ;/ $A3:E8D2 AE C4 0D LDX $0DC4 [$7E:0DC4] ;\ $A3:E8D5 BF 02 64 7F LDA $7F6402,x[$7F:6A6C];| $A3:E8D9 29 1F 00 AND #$001F ;} If [block BTS] & 1Fh < 5 (square slope): go to BRANCH_NORMAL_SPEED $A3:E8DC C9 05 00 CMP #$0005 ;| $A3:E8DF 90 3D BCC $3D [$E91E] ;/ $A3:E8E1 0A ASL A ;\ $A3:E8E2 0A ASL A ;| $A3:E8E3 AA TAX ;| $A3:E8E4 BC 31 E9 LDY $E931,x[$A3:E979] ;| $A3:E8E7 AE 54 0E LDX $0E54 [$7E:0E54] ;| $A3:E8EA BD A8 0F LDA $0FA8,x[$7E:0FA8] ;| $A3:E8ED 10 20 BPL $20 [$E90F] ;| $A3:E8EF 49 FF FF EOR #$FFFF ;| $A3:E8F2 1A INC A ;| $A3:E8F3 22 D6 82 80 JSL $8082D6[$80:82D6] ;| $A3:E8F7 AD F1 05 LDA $05F1 [$7E:05F1] ;| $A3:E8FA 49 FF FF EOR #$FFFF ;| $A3:E8FD 18 CLC ;} $14.$12 = [enemy X velocity] * [$E931 + ([block BTS] & 1Fh) * 4] $A3:E8FE 69 01 00 ADC #$0001 ;| $A3:E901 85 12 STA $12 [$7E:0012] ;| $A3:E903 AD F3 05 LDA $05F3 [$7E:05F3] ;| $A3:E906 49 FF FF EOR #$FFFF ;| $A3:E909 69 00 00 ADC #$0000 ;| $A3:E90C 85 14 STA $14 [$7E:0014] ;| $A3:E90E 60 RTS ;| $A3:E90F 22 D6 82 80 JSL $8082D6[$80:82D6] ;| $A3:E913 AD F1 05 LDA $05F1 [$7E:05F1] ;| $A3:E916 85 12 STA $12 [$7E:0012] ;| $A3:E918 AD F3 05 LDA $05F3 [$7E:05F3] ;| $A3:E91B 85 14 STA $14 [$7E:0014] ;/ $A3:E91D 60 RTS ; BRANCH_NORMAL_SPEED $A3:E91E AE 54 0E LDX $0E54 [$7E:0E54] ;\ $A3:E921 64 12 STZ $12 [$7E:0012] ;| $A3:E923 64 14 STZ $14 [$7E:0014] ;| $A3:E925 BD A8 0F LDA $0FA8,x[$7E:0FA8] ;} $14.$12 = [enemy X velocity] / 100h $A3:E928 10 02 BPL $02 [$E92C] ;| $A3:E92A C6 14 DEC $14 [$7E:0014] ;| $A3:E92C 85 13 STA $13 [$7E:0013] ;/ $A3:E92E 60 RTS ; _________ Unused ; | ___ Creepy crawly slope speed multipliers ; | | $A3:E92F dw 0000, 0100, 0000, 0100, 0000, 0100, 0000, 0100, 0000, 0100, 0000, 0100, ; 5: Unused. Half height isosceles triangle 0000, 0100, ; 6: Unused. Isosceles triangle 0000, 0100, ; 7: Half height rectangle 0000, 0100, ; 8: Unused. Rectangle 0000, 0100, ; 9: Unused. Rectangle 0000, 0100, ; Ah: Unused. Rectangle 0000, 0100, ; Bh: Unused. Rectangle 0000, 0100, ; Ch: Unused. Rectangle 0000, 0100, ; Dh: Unused. Rectangle 1000, 00B0, ; Eh: Unused. Very bumpy triangle 1000, 00B0, ; Fh: Bumpy triangle 0000, 0100, ; 10h: Unused 0000, 0100, ; 11h: Unused 1000, 00C0, ; 12h: Triangle 0000, 0100, ; 13h: Rectangle 1000, 00C0, ; 14h: Quarter triangle 1000, 00C0, ; 15h: Three quarter triangle 0800, 00D8, ; 16h: Lower half-height triangle 0800, 00D8, ; 17h: Upper half-height triangle 0600, 00F0, ; 18h: Unused. Lower third-height triangle 0600, 00F0, ; 19h: Unused. Middle third-height triangle 0600, 00F0, ; 1Ah: Unused. Upper third-height triangle 4000, 0080, ; 1Bh: Upper half-width triangle 4000, 0080, ; 1Ch: Lower half-width triangle 6000, 0050, ; 1Dh: Unused. Upper third-width triangle 6000, 0050, ; 1Eh: Unused. Middle third-width triangle 6000, 0050 ; 1Fh: Unused. Lower third-width triangle } }