Contra Bank 0 0x0000 - 0x3FFF Mapper 2 (21 00) (0010 0001 0000 0000) -------- 0000: 00 Bank Number ---- 0001: Pointer table for Weapon Item Routines (3 * 2 = 6 bytes) 0780 -> 0007 6880 -> 0068 0081 -> 0100 ---- Weapon Item - Pointer 1 0007: A9 80 LDA #$80 ; A = 80 0009: 9D 9805 STA $0598,X 000C: A9 22 LDA #$22 ; A = 22 000E: 9D 8805 STA $0588,X 0011: A9 05 LDA #$05 ; A = 05 0013: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 0016: A5 40 LDA $40 ; Outdoor/Indoor 0018: F0 16 BEQ $0030 001A: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 001D: 9D B805 STA $05B8,X 0020: 20 9DED JSR $ED9D 0023: A9 80 LDA #$80 ; A = 80 0025: 9D E805 STA $05E8,X 0028: A9 FD LDA #$FD ; A = FD 002A: 9D 5805 STA $0558,X 002D: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 0030: A0 00 LDY #$00 ; Y = 00 0032: A5 41 LDA $41 ; Level Scrolling Type 0034: F0 0B BEQ $0041 0036: A0 04 LDY #$04 ; Y = 04 0038: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 003B: C9 80 CMP #$80 003D: 90 02 BCC $0041 003F: A0 08 LDY #$08 ; Y = 08 0041: B9 5C80 LDA $805C,Y 0044: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 0047: B9 5D80 LDA $805D,Y 004A: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 004D: B9 5E80 LDA $805E,Y 0050: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 0053: B9 5F80 LDA $805F,Y 0056: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 0059: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 005C: Table for Weapon Item velocities (C bytes) 00 FD 80 00 00 FD 40 00 00 FD C0 FF 00 = Initial Y Velocity - Low Byte FD = Initial Y Velocity - High Byte 80 = X Velocity - Low Byte 00 = X Velocity - High Byte * completely modifiable and randomizable * ---- Weapon Item - Pointer 2 0068: 20 1C81 JSR $811C ; Set Sprite Attributes 006B: A5 40 LDA $40 ; Outdoor/Indoor 006D: F0 21 BEQ $0090 006F: BD E805 LDA $05E8,X 0072: 18 CLC 0073: 69 12 ADC #$12 0075: 9D E805 STA $05E8,X 0078: BD 5805 LDA $0558,X 007B: 69 00 ADC #$00 007D: 9D 5805 STA $0558,X 0080: 20 66ED JSR $ED66 0083: BD D805 LDA $05D8,X 0086: 30 07 BMI $008F 0088: A9 A4 LDA #$A4 ; A = A4 008A: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 008D: D0 CA BNE $0059 008F: 60 RTS ---- 0090: 20 5BE8 JSR $E85B 0093: 20 C980 JSR $80C9 0096: 90 0B BCC $00A3 0098: A9 0A LDA #$0A ; A = 0A 009A: 20 8AEB JSR $EB8A 009D: 20 CDE8 JSR $E8CD ; Set X/Y Velocities to Zero 00A0: 4C 8EE7 JMP $E78E ---- 00A3: BD 3E03 LDA $033E,X ; Enemy X Position on Screen 00A6: BC 0805 LDY $0508,X ; Enemy X Velocity (high byte) 00A9: 30 0D BMI $00B8 00AB: C9 E8 CMP #$E8 00AD: B0 14 BCS $00C3 00AF: A9 0A LDA #$0A ; A = 0A (10 decimal) 00B1: 20 E380 JSR $80E3 00B4: 30 0D BMI $00C3 00B6: 10 0E BPL $00C6 00B8: C9 18 CMP #$18 00BA: 90 07 BCC $00C3 00BC: A9 F6 LDA #$F6 ; A = F6 (-10 decimal) 00BE: 20 E380 JSR $80E3 00C1: 10 03 BPL $00C6 00C3: 20 1EE9 JSR $E91E 00C6: 4C 40EB JMP $EB40 ---- 00C9: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 00CC: C9 20 CMP #$20 00CE: 90 11 BCC $00E1 00D0: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 00D3: 1D E804 ORA $04E8,X ; Enemy Y Velocity (high byte) 00D6: 30 09 BMI $00E1 00D8: A0 08 LDY #$08 ; Y = 08 00DA: 20 33EC JSR $EC33 00DD: F0 02 BEQ $00E1 00DF: 38 SEC 00E0: 60 RTS ---- 00E1: 18 CLC 00E2: 60 RTS ---- 00E3: 18 CLC 00E4: 7D 3E03 ADC $033E,X ; Enemy X Position On Screen 00E7: 85 08 STA $08 00E9: A5 59 LDA $59 00EB: F0 F4 BEQ $00E1 00ED: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 00F0: D0 07 BNE $00F9 00F2: BC 2403 LDY $0324,X ; Enemy Y Position On Screen 00F5: C0 10 CPY #$10 00F7: B0 02 BCS $00FB 00F9: A0 10 LDY #$10 ; Y = 10 00FB: A5 08 LDA $08 00FD: 4C 87E0 JMP $E087 ---- Weapon Item - Pointer 3 0100: 20 1C81 JSR $811C 0103: A5 40 LDA $40 ; Scrolling (H/V) 0105: F0 07 BEQ $010E 0107: A5 65 LDA $65 ; Scrolling Offset 0109: F0 10 BEQ $011B 010B: 4C 09E8 JMP $E809 ; Remove Enemy ---- 010E: 20 5BE8 JSR $E85B 0111: 20 D080 JSR $80D0 0114: B0 05 BCS $011B 0116: A9 02 LDA #$02 ; A = 02 0118: 4C 1AE8 JMP $E81A ; Set Routine Index to A ---- 011B: 60 RTS ---- 011C: A9 00 LDA #$00 ; A = 00 011E: BC 6805 LDY $0568,X ; Enemy Animation Frame Code 0121: D0 19 BNE $013C 0123: BD A805 LDA $05A8,X ; Enemy Attributes 0126: 29 07 AND #$07 ; keep bits ... .xxx (Weapon Code) 0128: A8 TAY 0129: C9 06 CMP #$06 ; 06 = Eagle Item 012B: D0 0C BNE $0139 012D: A5 1A LDA $1A ; Permanent Frame Counter 012F: 4A LSR 0130: 4A LSR 0131: 4A LSR 0132: 29 03 AND #$03 ; keep bits .... ..xx 0134: 09 04 ORA #$04 ; set bits .... .x.. 0136: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 0139: B9 4081 LDA $8140,Y 013C: 9D 0A03 STA $030A,X ; Enemy Sprite Code 013F: 60 RTS ---- 0140: 33 34 31 2F 32 30 4E Table for Item Sprite Codes (7 bytes) 33 = Tile Mapping Code for R Weapon 34 = Tile Mapping Code for M Weapon 31 = Tile Mapping Code for F Weapon 2F = Tile Mapping Code for S Weapon 32 = Tile Mapping Code for L Weapon 30 = Tile Mapping Code for B Weapon 4E = Tile Mapping Code for Eagle ---- 0147: Pointer table for Enemy Bullet (4 * 2 = 8 bytes) 4F81 -> 014F 6181 -> 0161 E481 -> 01E4 09E8 -> 1E809 Remove Enemy ---- Enemy Bullet - Pointer 1 014F: BC B805 LDY $05B8,X ; Bullet Type 0152: B9 5B81 LDA $815B,Y 0155: 9D 8805 STA $0588,X ; Collision, Explosion Type, Score 0158: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 015B: 01 05 05 01 02 00 Table for ? (6 bytes) Related to bullet collision box ---- Enemy Bullet - Pointer 2 0161: BC B805 LDY $05B8,X ; Bullet Type 0164: D0 08 BNE $016E 0166: A5 30 LDA $30 ; Current Level 0168: C9 04 CMP #$04 ; Check if Level 5 (Snow Field) 016A: D0 02 BNE $016E 016C: A0 05 LDY #$05 ; Y = 05 (for red bullets) 016E: B9 D881 LDA $81D8,Y 0171: 9D 0A03 STA $030A,X ; Enemy Sprite Code 0174: B9 DE81 LDA $81DE,Y 0177: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 017A: 20 37E8 JSR $E837 ; Apply Velocities and Scrolling Adjust 017D: BC B805 LDY $05B8,X ; Bullet Type 0180: D0 0C BNE $018E 0182: A5 59 LDA $59 ; Unknown Header Byte 0184: 10 08 BPL $018E 0186: 20 27EC JSR $EC27 0189: 10 1A BPL $01A5 018B: 4C 09E8 JMP $E809 ; Remove Enemy ---- 018E: 88 DEY 018F: F0 2E BEQ $01BF 0191: 88 DEY 0192: 88 DEY 0193: F0 15 BEQ $01AA 0195: 88 DEY 0196: D0 0D BNE $01A5 0198: A5 1A LDA $1A ; Permanent Frame Counter 019A: 4A LSR 019B: 4A LSR 019C: 29 03 AND #$03 ; keep bits .... ..xx 019E: A8 TAY 019F: B9 A681 LDA $81A6,Y 01A2: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 01A5: 60 RTS ---- 01A6: 01 41 C1 81 Orange Fireballs Palette Code and Mirroring (4 bytes) ---- 01AA: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 01AD: C9 B4 CMP #$B4 01AF: B0 0B BCS $01BC 01B1: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 01B4: C9 20 CMP #$20 01B6: 90 04 BCC $01BC 01B8: C9 E0 CMP #$E0 01BA: 90 45 BCC $0201 01BC: 4C 09E8 JMP $E809 ; Remove Enemy ---- 01BF: A9 14 LDA #$14 ; A = 14 (gravity coefficient for Bombs) 01C1: 20 42EB JSR $EB42 ; Add A to Y Velocity 01C4: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 01C7: C9 D0 CMP #$D0 ; Bombs explode at this height 01C9: 90 36 BCC $0201 01CB: A9 00 LDA #$00 ; A = 00 01CD: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 01D0: A9 01 LDA #$01 ; A = 01 01D2: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 01D5: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 01D8: 1E 21 21 1E 79 07 Table for Bullet Sprite Codes (6 bytes) 01DE: 01 02 02 01 01 02 Table for Bullet Palette Codes (6 bytes) ---- Enemy Bullet - Pointer 3 01E4: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 01E7: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 01EA: D0 15 BNE $0201 01EC: A9 08 LDA #$08 ; A = 08 01EE: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 01F1: FE 6805 INC $0568,X ; Enemy Animation Frame Code 01F4: BC 6805 LDY $0568,X 01F7: C0 03 CPY #$03 01F9: B0 DA BCS $01D5 01FB: B9 0282 LDA $8202,Y 01FE: 9D 0A03 STA $030A,X ; Enemy Sprite Code 0201: 60 RTS ---- 0202: 37 36 37 Table for some Tile Codes (3 bytes) ---- 0205: Pointer table for Weapon Box (B * 2 = 16 bytes) 1B82 -> 821B 2582 -> 8225 4882 -> 8248 B082 -> 82B0 BD82 -> 82BD 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- Weapon Box - Pointer 1 021B: A9 01 LDA #$01 ; A = 01 021D: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 0220: A9 20 LDA #$20 ; A = 20 (Weapon Box initial delay) 0222: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- Weapon Box - Pointer 2 0225: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 0228: A9 F0 LDA #$F0 ; A = F0 (X Position for Weapon Box activation) 022A: A0 30 LDY #$30 ; Y = 30 (Y Position for Vertical Level) 022C: 20 9C84 JSR $849C 022F: 90 6E BCC $029F 0231: A9 18 LDA #$18 ; A = 18 0233: A0 C8 LDY #$C8 ; Y = C8 0235: 20 9C84 JSR $849C 0238: B0 09 BCS $0243 023A: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 023D: D0 60 BNE $029F 023F: A9 08 LDA #$08 ; A = 08 0241: D0 DF BNE $0222 0243: A9 04 LDA #$04 ; A = 04 0245: 4C 1AE8 JMP $E81A ---- Weapon Box - Pointer 3 0248: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 024B: A9 18 LDA #$18 ; A = 18 024D: A0 C8 LDY #$C8 ; Y = C8 024F: 20 9C84 JSR $849C 0252: B0 EF BCS $0243 0254: DE 3805 DEC $0538,X 0257: D0 46 BNE $029F 0259: A9 08 LDA #$08 ; A = 08 025B: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 025E: BD C805 LDA $05C8,X 0261: D0 18 BNE $027B 0263: 20 A482 JSR $82A4 0266: B0 37 BCS $029F 0268: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 026B: C9 02 CMP #$02 026D: 90 2D BCC $029C 026F: DE 6805 DEC $0568,X ; Enemy Animation Frame Code 0272: A9 01 LDA #$01 ; A = 01 0274: 9D 7805 STA $0578,X ; Weapon Box HP (when open) *** Change Box HP according to difficulty level and level number (works) *** 0272: 20 A0BD JSR $BDA0 0275: EA NOP 0276: EA NOP -- 3D80: Table for Weapon Box HP according to game Completion Count (20 bytes) 01 01 01 01 Level 1 01 01 01 02 Level 2 01 01 01 03 Level 3 01 01 02 04 Level 4 01 02 02 05 Level 5 01 02 03 06 Level 6 01 02 03 07 Level 7 01 02 04 08 Level 8 -- 3DA0: A5 30 LDA $30 ; Current Level 3DA2: 0A ASL 3DA3: 0A ASL 3DA4: 18 CLC 3DA5: 65 31 ADC $31 ; Game Completion Count 3DA7: A8 TAY 3DA8: B9 80BD LDA $3D80,Y 3DAB: 9D 7805 STA $0578,X ; Enemy HP 3DAE: 60 RTS *** 0277: A9 01 LDA #$01 ; A = 01 0279: D0 14 BNE $028F 027B: 20 A482 JSR $82A4 027E: B0 1F BCS $029F 0280: BD 6805 LDA $0568,X 0283: D0 1B BNE $02A0 0285: FE 6805 INC $0568,X ; Enemy Animation Frame Code 0288: A9 F0 LDA #$F0 ; A = F0 (F0 = No Hit) 028A: 9D 7805 STA $0578,X ; Enemy HP 028D: A9 00 LDA #$00 ; A = 00 028F: 9D C805 STA $05C8,X 0292: A9 40 LDA #$40 ; A = 40 (Delay when Weapon Box Fully Open) 0294: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 0297: A9 02 LDA #$02 ; A = 02 0299: 4C 1AE8 JMP $E81A ; Set Routine Index to A ---- Next Animation Frame 029C: FE 6805 INC $0568,X ; Enemy Animation Frame Code 029F: 60 RTS ---- Previous Animation Frame 02A0: DE 6805 DEC $0568,X ; Enemy Animation Frame Code 02A3: 60 RTS ---- 02A4: BC 6805 LDY $0568,X ; Enemy Animation Frame Code 02A7: B9 AD82 LDA $82AD,Y 02AA: 4C AAEB JMP $EBAA ---- 02AD: 00 01 02 Table for Weapon Box Frame Codes (3 bytes) 00: Closed 01: Semi-Open 02: Fully Open ---- Weapon Box - Pointer 4 02B0: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 02B3: A9 00 LDA #$00 ; A = 00 02B5: 20 B5EB JSR $EBB5 ; Draw a 4x4 Tile 02B8: B0 3A BCS $02F4 02BA: 4C 09E8 JMP $E809 ; Remove Enemy ---- Weapon Box - Pointer 5 02BD: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 02C0: A5 30 LDA $30 ; Current Level 02C2: 0A ASL 02C3: A8 TAY 02C4: BD A805 LDA $05A8,X ; Enemy Attributes 02C7: 29 08 AND #$08 ; keep bits .... x... 02C9: F0 01 BEQ $02CC 02CB: C8 INY 02CC: B9 F582 LDA $82F5,Y 02CF: 20 B5EB JSR $EBB5 ; Draw a 4x4 Tile 02D2: B0 CB BCS $029F 02D4: A9 19 LDA #$19 ; A = 19 02D6: 20 6BC1 JSR $C16B ; Play Sound 02D9: 20 2FEB JSR $EB2F ; Set X/Y Position relative to Enemy Position 02DC: 20 B3EA JSR $EAB3 ; Create Explosion Type 89 02DF: BD A805 LDA $05A8,X ; Enemy Attributes 02E2: 29 07 AND #$07 ; keep bits .... .xxx 02E4: 9D A805 STA $05A8,X 02E7: 20 F1ED JSR $EDF1 02EA: A9 01 LDA #$01 ; A = 01 02EC: 9D B804 STA $04B8,X ; Enemy Routine Index 02EF: A9 00 LDA #$00 ; A = 00 02F1: 9D 2805 STA $0528,X ; Enemy Type 02F4: 60 RTS ---- 02F5: Table for Weapon Box Tile Code after destruction (8 * 2 = 10 bytes) 2 bytes per level 16 16 16 16 16 16 16 16 19 1A 03 04 09 09 16 16 ---- 0305: Pointer table for Weapon Zeppelin (3 * 2 = 6 bytes) 0B83 -> 030B 5D83 -> 035D 7683 -> 0376 ---- Weapon Zeppelin - Pointer 1 030B: A9 03 LDA #$03 ; A = 03 (Weapon Zeppelin Palette Code) 030D: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 0310: BD 2403 LDA $0324,X 0313: 9D B805 STA $05B8,X 0316: BD 3E03 LDA $033E,X 0319: 9D C805 STA $05C8,X 031C: A5 41 LDA $41 ; Level Scrolling Type 031E: D0 0E BNE $032E 0320: A9 20 LDA #$20 ; A = 20 (Zeppelin Vertical Amplitude) 0322: 20 1FEB JSR $EB1F 0325: A9 10 LDA #$10 ; A = 10 (Zeppelin Initial X Position) 0327: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 032A: A0 00 LDY #$00 ; Y = 00 032C: F0 0C BEQ $033A 032E: A9 20 LDA #$20 ; A = 20 0330: 20 27EB JSR $EB27 0333: A9 E0 LDA #$E0 ; A = E0 0335: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 0338: A0 04 LDY #$04 ; Y = 04 033A: B9 5583 LDA $8355,Y 033D: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 0340: B9 5683 LDA $8356,Y 0343: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 0346: B9 5783 LDA $8357,Y 0349: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 034C: B9 5883 LDA $8358,Y 034F: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 0352: 4C 8EE7 JMP $E78E ---- 0355: Table for Weapon Zeppelin Velocities (4 * 2 = 8 bytes) 00 00 80 01 Horizontal Scrolling 80 FE 00 00 Vertical Scrolling ---- Weapon Zeppelin - Pointer 2 035D: A9 4D LDA #$4D ; A = 4D 035F: 9D 0A03 STA $030A,X 0362: A5 41 LDA $41 ; Level Scrolling Type 0364: D0 08 BNE $036E 0366: A0 01 LDY #$01 ; Y = 01 0368: 20 4BEC JSR $EC4B 036B: 4C 7383 JMP $8373 ---- 036E: A0 01 LDY #$01 ; Y = 01 0370: 20 6FEC JSR $EC6F 0373: 4C 37E8 JMP $E837 ---- Weapon Zeppelin Pointer 3 (Table 0305) 0376: 4C D482 JMP $82D4 ---- 0379: Pointer table for Gray Turret (A * 2 = 14 bytes) 8D83 -> 038D 9783 -> 0397 AC83 -> 03AC D583 -> 03D5 2E84 -> 042E 8284 -> 0482 8F84 -> 048F 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- Gray Turret - Pointer 1 038D: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 0390: A9 06 LDA #$06 ; A = 06 0392: 9D B805 STA $05B8,X 0395: D0 11 BNE $03A8 Gray Turret - Pointer 2 0397: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 039A: A9 F0 LDA #$F0 ; A = F0 039C: A0 30 LDY #$30 ; Y = 30 039E: 20 9C84 JSR $849C 03A1: 90 08 BCC $03AB 03A3: A9 08 LDA #$08 ; A = 08 03A5: 9D 3805 STA $0538,X 03A8: 4C 8EE7 JMP $E78E ---- 03AB: 60 RTS ---- Gray Turret - Pointer 3 03AC: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 03AF: DE 3805 DEC $0538,X 03B2: D0 F7 BNE $03AB 03B4: A9 08 LDA #$08 ; A = 08 03B6: 9D 3805 STA $0538,X 03B9: BD 6805 LDA $0568,X 03BC: 18 CLC 03BD: 69 03 ADC #$03 03BF: 20 AAEB JSR $EBAA 03C2: B0 E7 BCS $03AB 03C4: FE 6805 INC $0568,X 03C7: BD 6805 LDA $0568,X 03CA: C9 03 CMP #$03 03CC: 90 DD BCC $03AB 03CE: 20 12EB JSR $EB12 03D1: A9 08 LDA #$08 ; A = 08 03D3: D0 D0 BNE $03A5 Gray Turret - Pointer 4 03D5: 20 2484 JSR $8424 03D8: 90 05 BCC $03DF 03DA: A9 06 LDA #$06 ; A = 06 03DC: 4C 1AE8 JMP $E81A ---- 03DF: DE 3805 DEC $0538,X 03E2: D0 27 BNE $040B 03E4: A4 2F LDY $2F ; Current Weapon Strength Code 03E6: B9 6B84 LDA $846B,Y 03E9: 9D 3805 STA $0538,X 03EC: 20 F5EC JSR $ECF5 03EF: 84 0A STY $0A 03F1: 20 2FEB JSR $EB2F 03F4: 20 20F4 JSR $F420 03F7: 08 PHP 03F8: BD B805 LDA $05B8,X 03FB: 38 SEC 03FC: E9 06 SBC #$06 03FE: B0 02 BCS $0402 0400: 69 0C ADC #$0C 0402: 18 CLC 0403: 69 05 ADC #$05 0405: 20 AAEB JSR $EBAA 0408: 90 02 BCC $040C 040A: 28 PLP 040B: 60 RTS ---- 040C: 28 PLP 040D: 90 FC BCC $040B 040F: BD A805 LDA $05A8,X 0412: 29 03 AND #$03 ; keep bits .... ..xx 0414: A8 TAY 0415: B9 2084 LDA $8420,Y 0418: 9D C805 STA $05C8,X 041B: A9 08 LDA #$08 ; A = 08 041D: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- 0420: Table for Gray Turret bullets per attack (from attributes) (4 bytes) 01 02 03 03 ---- 0424: 20 A7E8 JSR $E8A7 0427: A9 18 LDA #$18 ; A = 18 0429: A0 C8 LDY #$C8 ; Y = C8 042B: 4C 9C84 JMP $849C ---- Gray Turret - Pointer 5 042E: 20 2484 JSR $8424 0431: B0 A7 BCS $03DA 0433: DE 3805 DEC $0538,X 0436: D0 32 BNE $046A 0438: BC B805 LDY $05B8,X 043B: B9 7384 LDA $8473,Y 043E: 18 CLC 043F: 7D 2403 ADC $0324,X 0442: 85 08 STA $08 0444: B9 7684 LDA $8476,Y 0447: 18 CLC 0448: 7D 3E03 ADC $033E,X 044B: 85 09 STA $09 044D: 98 TYA 044E: A0 04 LDY #$04 ; Y = 04 Gray Turret Bullet Speed 0450: 20 BEF2 JSR $F2BE 0453: A9 10 LDA #$10 ; A = 10 Delay Between Bullets 0455: 9D 3805 STA $0538,X 0458: DE C805 DEC $05C8,X 045B: D0 0D BNE $046A 045D: A4 2F LDY $2F ; Current Weapon Strength Code 045F: B9 6F84 LDA $846F,Y 0462: 9D 3805 STA $0538,X 0465: A9 04 LDA #$04 ; A = 04 0467: 4C 1AE8 JMP $E81A ---- 046A: 60 RTS ---- 046B: 30 28 20 18 Table for Gray Turret delays while rotating (4 bytes) 046F: 80 60 40 30 Table for Gray Turret pause after attack (4 bytes) ---- 0473: Table for Gray Turret bullet initial positions ? (F bytes) 00 07 0C 0D 0C 07 00 F9 F4 F3 F4 F9 00 07 0C ---- Gray Turret - Pointer 6 0482: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 0485: A9 03 LDA #$03 ; A = 03 0487: 20 B5EB JSR $EBB5 048A: B0 2B BCS $04B7 048C: 4C 09E8 JMP $E809 ; Remove Enemy ---- Gray Turret - Pointer 7 048F: 20 A7E8 JSR $E8A7 0492: A9 16 LDA #$16 ; A = 16 0494: 20 B5EB JSR $EBB5 0497: B0 1E BCS $04B7 0499: 4C 8EE7 JMP $E78E ---- 049C: 85 08 STA $08 049E: 84 09 STY $09 04A0: A5 41 LDA $41 ; Horizontal/Vertical 04A2: D0 09 BNE $04AD 04A4: BD 3E03 LDA $033E,X 04A7: C5 08 CMP $08 04A9: B0 0B BCS $04B6 04AB: 90 07 BCC $04B4 04AD: BD 2403 LDA $0324,X 04B0: C5 09 CMP $09 04B2: 90 02 BCC $04B6 04B4: 38 SEC 04B5: 60 RTS ---- 04B6: 18 CLC 04B7: 60 RTS ---- 04B8: Pointer table for Red Turret (9 * 2 = 12 bytes) CA84 -> 04CA D484 -> 04D4 E884 -> 04E8 3785 -> 0537 D185 -> 05D1 E185 -> 05E1 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- Red Turret - Pointer 1 04CA: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 04CD: A9 06 LDA #$06 ; A = 06 04CF: 9D B805 STA $05B8,X 04D2: D0 0E BNE $04E2 Red Turret - Pointer 2 04D4: A9 F0 LDA #$F0 ; A = F0 (Red Turret emerge at this X offset) 04D6: A0 40 LDY #$40 ; Y = 40 04D8: 20 9C84 JSR $849C 04DB: 90 08 BCC $04E5 04DD: A9 01 LDA #$01 ; A = 01 (delay before emerging) 04DF: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 04E2: 20 8EE7 JSR $E78E ; Advance to Next Routine 04E5: 4C A7E8 JMP $E8A7 ; Add Scrolling to Enemy Position ---- Red Turret - Pointer 3 04E8: 20 0E85 JSR $850E 04EB: B0 F8 BCS $04E5 04ED: FE 6805 INC $0568,X 04F0: BD 6805 LDA $0568,X 04F3: C9 04 CMP #$04 04F5: 90 EE BCC $04E5 04F7: A9 02 LDA #$02 ; A = 02 04F9: 9D C805 STA $05C8,X 04FC: A9 28 LDA #$28 ; A = 28 (delay before first attack) 04FE: A4 31 LDY $31 ; Game Completion Count 0500: F0 02 BEQ $0504 0502: A9 08 LDA #$08 ; A = 08 0504: 9D 5805 STA $0558,X 0507: 20 12EB JSR $EB12 050A: A9 10 LDA #$10 ; A = 10 050C: D0 D1 BNE $04DF 050E: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 0511: D0 17 BNE $052A 0513: A9 04 LDA #$04 ; A = 04 0515: 9D 3805 STA $0538,X ; delay between frames when emerging 0518: BD A805 LDA $05A8,X ; Enemy Attributes 051B: 4A LSR 051C: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 051F: 90 02 BCC $0523 0521: 69 03 ADC #$03 0523: A8 TAY 0524: B9 2C85 LDA $852C,Y 0527: 4C AAEB JMP $EBAA ---- 052A: 38 SEC 052B: 60 RTS ---- 052C: Table for Red Turret tile mapping codes (B bytes) 16 14 18 11 17 15 18 11 11 12 13 ---- Red Turret - Pointer 4 0537: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 053A: A9 30 LDA #$30 ; A = 30 (X offset to return to ground) 053C: A0 C0 LDY #$C0 ; Y = C0 053E: 20 9C84 JSR $849C 0541: 90 0D BCC $0550 0543: A9 02 LDA #$02 ; A = 02 0545: 9D 6805 STA $0568,X ; initial frame code when returning to ground) 0548: 20 07EB JSR $EB07 ; Set Bits 0 and 4 of $598,X 054B: A9 01 LDA #$01 ; A = 01 054D: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- 0550: 20 C7EC JSR $ECC7 0553: 20 F685 JSR $85F6 0556: 98 TYA 0557: B0 02 BCS $055B 0559: 49 01 EOR #$01 ; flip bits .... ...x 055B: 85 0A STA $0A 055D: 20 2FEB JSR $EB2F 0560: 20 4DF4 JSR $F44D 0563: 85 08 STA $08 0565: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 0568: D0 27 BNE $0591 056A: A9 10 LDA #$10 ; A = 10 056C: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 056F: BC B805 LDY $05B8,X 0572: A5 08 LDA $08 0574: 30 1B BMI $0591 0576: D0 09 BNE $0581 0578: C0 08 CPY #$08 057A: F0 15 BEQ $0591 057C: FE B805 INC $05B8,X 057F: D0 07 BNE $0588 0581: C0 06 CPY #$06 0583: F0 0C BEQ $0591 0585: DE B805 DEC $05B8,X 0588: BC B805 LDY $05B8,X 058B: B9 2E85 LDA $852E,Y 058E: 20 AAEB JSR $EBAA 0591: DE 5805 DEC $0558,X 0594: D0 34 BNE $05CA 0596: A0 10 LDY #$10 ; Y = 10 0598: DE C805 DEC $05C8,X ; delay between bullets 059B: 10 07 BPL $05A4 059D: A9 02 LDA #$02 ; A = 02 059F: 9D C805 STA $05C8,X ; consecutive bullets (02 = 3 bullets) 05A2: A0 50 LDY #$50 ; Y = 50 (delay between attacks) 05A4: 98 TYA 05A5: 9D 5805 STA $0558,X ; Delay Between Attacks 05A8: A4 0F LDY $0F 05AA: 20 F685 JSR $85F6 05AD: 90 1B BCC $05CA 05AF: BC B805 LDY $05B8,X 05B2: B9 C585 LDA $85C5,Y 05B5: 18 CLC 05B6: 7D 2403 ADC $0324,X ; Enemy Y Position on Screen 05B9: 85 08 STA $08 05BB: B9 C885 LDA $85C8,Y 05BE: 18 CLC 05BF: 7D 3E03 ADC $033E,X ; Enemy X Position on Screen 05C2: 85 09 STA $09 05C4: 98 TYA 05C5: A0 05 LDY #$05 ; Red Turret bullet speed 05C7: 4C BEF2 JMP $F2BE ---- 05CA: 60 RTS ---- 05CB: Table for Red Turret bullet initial offsets (6 bytes) 00 F8 F0 Y Offset 0 , -8 , -10 F2 F2 F8 X Offset -E , -E , -8 ---- Red Turret - Pointer 5 05D1: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 05D4: 20 0E85 JSR $850E 05D7: B0 F1 BCS $05CA 05D9: DE 6805 DEC $0568,X ; Enemy Animation Frame Code 05DC: 10 EC BPL $05CA 05DE: 4C 09E8 JMP $E809 ; Remove Enemy ---- Red Turret - Pointer 6 05E1: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 05E4: BD A805 LDA $05A8,X ; Enemy Attributes 05E7: 4A LSR 05E8: A9 16 LDA #$16 ; A = 16 05EA: 90 02 BCC $05EE 05EC: A9 17 LDA #$17 ; A = 17 05EE: 20 B5EB JSR $EBB5 05F1: B0 D7 BCS $05CA 05F3: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 05F6: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 05F9: 18 CLC 05FA: 69 20 ADC #$20 05FC: D9 1A03 CMP $031A,Y ; Player Y Position on Screen 05FF: 90 06 BCC $0607 0601: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 0604: D9 3403 CMP $0334,Y ; Player X Position on Screen 0607: 60 RTS ---- 0608: Pointer table for Running Man (B * 2 = 16 bytes) 1E86 -> 061E 6586 -> 0665 AF86 -> 06AF 0388 -> 0803 C388 -> 08C3 0089 -> 0900 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 8C88 -> 088C A188 -> 08A1 ---- Running Man - Pointer 1 061E: 20 A7E8 JSR $E8A7 0621: 20 88EB JSR $EB88 0624: BD A805 LDA $05A8,X 0627: 4A LSR 0628: 4A LSR 0629: 4A LSR 062A: 4A LSR 062B: 29 03 AND #$03 ; keep bits .... ..xx 062D: A8 TAY 062E: B9 3486 LDA $8634,Y 0631: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- 0634: 01 10 20 30 Table for ? (4 bytes) ---- 0638: 20 3E86 JSR $863E 063B: 4C D0E8 JMP $E8D0 ---- 063E: A0 00 LDY #$00 ; Y = 00 0640: A5 41 LDA $41 ; Level Scrolling Type 0642: F0 02 BEQ $0646 0644: A0 04 LDY #$04 ; Y = 04 0646: 84 08 STY $08 0648: BD C805 LDA $05C8,X 064B: 0A ASL 064C: 18 CLC 064D: 65 08 ADC $08 064F: A8 TAY 0650: B9 5D86 LDA $865D,Y 0653: 9D 1805 STA $0518,X 0656: B9 5E86 LDA $865E,Y 0659: 9D 0805 STA $0508,X 065C: 60 RTS ---- 065D: 00 FF 40 01 00 FF 00 01 Table for Running Man (8 bytes) 00: X Velocity Facing Left (low byte) FF: X Velocity Facing Left (high byte) 40: X Velocity Facing Right (low byte) 01: X Velocity Facing Right (high byte) Next 4 bytes: Idem for vertical scrolling level type ---- Running Man - Pointer 2 0665: A5 41 LDA $41 0667: F0 06 BEQ $066F 0669: 20 A7E8 JSR $E8A7 066C: 4C 8686 JMP $8686 ---- 066F: A5 68 LDA $68 0671: F0 13 BEQ $0686 0673: BD A805 LDA $05A8,X 0676: 29 01 AND #$01 ; keep bits .... ...x 0678: F0 07 BEQ $0681 067A: 25 1A AND $1A ; Frame Counter 067C: 4A LSR 067D: B0 07 BCS $0686 067F: 90 DB BCC $065C 0681: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 0684: F0 05 BEQ $068B 0686: DE 3805 DEC $0538,X 0689: D0 D1 BNE $065C 068B: A0 10 LDY #$10 ; Y = 10 068D: 20 33EC JSR $EC33 0690: D0 03 BNE $0695 0692: 4C 09E8 JMP $E809 ; Remove Enemy ---- 0695: 20 16EB JSR $EB16 0698: BD A805 LDA $05A8,X ; Enemy Attributes 069B: 29 01 AND #$01 ; keep bits .... ...x 069D: 9D C805 STA $05C8,X 06A0: F0 05 BEQ $06A7 06A2: A9 0A LDA #$0A ; A = 0A 06A4: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 06A7: 20 3886 JSR $8638 06AA: A9 10 LDA #$10 ; A = 10 06AC: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- Running Man - Pointer 3 06AF: BD D805 LDA $05D8,X 06B2: F0 33 BEQ $06E7 06B4: A9 0A LDA #$0A ; A = 0A 06B6: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 06B9: BD E804 LDA $04E8,X ; Enemy Y Velocity (high byte) 06BC: 30 23 BMI $06E1 06BE: A0 10 LDY #$10 ; Y = 10 06C0: 20 33EC JSR $EC33 06C3: 30 02 BMI $06C7 06C5: 90 11 BCC $06D8 06C7: A9 00 LDA #$00 ; A = 00 06C9: 9D D805 STA $05D8,X 06CC: 9D 6805 STA $0568,X 06CF: 20 88EB JSR $EB88 06D2: 20 3886 JSR $8638 06D5: 4C 9487 JMP $8794 ---- 06D8: C9 02 CMP #$02 06DA: D0 05 BNE $06E1 06DC: A9 0A LDA #$0A ; A = 0A 06DE: 20 1AE8 JSR $E81A 06E1: 20 40EB JSR $EB40 06E4: 4C 9487 JMP $8794 ---- 06E7: BD A805 LDA $05A8,X 06EA: 29 0C AND #$0C ; keep bits .... xx.. 06EC: F0 1F BEQ $070D 06EE: A5 8E LDA $8E ; Enemy Attack Switch 06F0: F0 1B BEQ $070D 06F2: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 06F5: D0 16 BNE $070D 06F7: A9 80 LDA #$80 ; A = 80 06F9: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 06FC: A9 08 LDA #$08 ; A = 08 06FE: 9D 5805 STA $0558,X 0701: 20 D987 JSR $87D9 0704: 9D D805 STA $05D8,X 0707: 20 8EE7 JSR $E78E 070A: 4C C587 JMP $87C5 ---- 070D: FE 4805 INC $0548,X 0710: BD 4805 LDA $0548,X 0713: 29 07 AND #$07 0715: D0 0F BNE $0726 0717: FE 6805 INC $0568,X ; Enemy Animation Frame Code 071A: BD 6805 LDA $0568,X 071D: C9 06 CMP #$06 071F: 90 05 BCC $0726 0721: A9 00 LDA #$00 ; A = 00 0723: 9D 6805 STA $0568,X 0726: A0 10 LDY #$10 ; Y = 10 0728: BD 0805 LDA $0508,X ; Enemy X Velocity (high byte) 072B: 20 35EC JSR $EC35 072E: 30 64 BMI $0794 0730: B0 62 BCS $0794 0732: BD E805 LDA $05E8,X 0735: C9 02 CMP #$02 0737: B0 0D BCS $0746 0739: BD A805 LDA $05A8,X 073C: 29 02 AND #$02 073E: F0 06 BEQ $0746 0740: 20 CB87 JSR $87CB 0743: 4C 9487 JMP $8794 ---- 0746: FE D805 INC $05D8,X 0749: 20 F5EC JSR $ECF5 074C: B9 1A03 LDA $031A,Y 074F: 38 SEC 0750: FD 2403 SBC $0324,X ; Enemy Y Position On Screen 0753: A0 04 LDY #$04 ; Y = 04 0755: B0 06 BCS $075D 0757: 49 FF EOR #$FF ; flip all bits 0759: 69 01 ADC #$01 075B: A0 00 LDY #$00 ; Y = 00 075D: C9 10 CMP #$10 075F: B0 02 BCS $0763 0761: A0 00 LDY #$00 ; Y = 00 0763: 84 08 STY $08 0765: A5 34 LDA $34 ; Randomizer 0767: 29 03 AND #$03 ; keep bits .... ..xx 0769: 18 CLC 076A: 65 08 ADC $08 076C: A8 TAY 076D: B9 F387 LDA $87F3,Y 0770: A8 TAY 0771: B9 FB87 LDA $87FB,Y 0774: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 0777: B9 FC87 LDA $87FC,Y 077A: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 077D: B9 FD87 LDA $87FD,Y 0780: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 0783: B9 FE87 LDA $87FE,Y 0786: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 0789: BD C805 LDA $05C8,X 078C: F0 03 BEQ $0791 078E: 20 1EE9 JSR $E91E 0791: 4C C587 JMP $87C5 ---- 0794: 20 27EC JSR $EC27 0797: 10 05 BPL $079E 0799: A9 07 LDA #$07 ; A = 07 079B: 4C 1AE8 JMP $E81A ---- 079E: BD E805 LDA $05E8,X 07A1: C9 02 CMP #$02 07A3: B0 20 BCS $07C5 07A5: A9 F8 LDA #$F8 ; A = F8 07A7: BC C805 LDY $05C8,X 07AA: F0 02 BEQ $07AE 07AC: A9 08 LDA #$08 ; A = 08 07AE: 18 CLC 07AF: 7D 3E03 ADC $033E,X ; Enemy X Position On Screen 07B2: C9 F0 CMP #$F0 07B4: B0 0F BCS $07C5 07B6: C9 10 CMP #$10 07B8: 90 0B BCC $07C5 07BA: BC 2403 LDY $0324,X ; Enemy Y Position On Screen 07BD: 20 87E0 JSR $E087 07C0: 10 03 BPL $07C5 07C2: 20 CB87 JSR $87CB 07C5: 20 1A89 JSR $891A 07C8: 4C 37E8 JMP $E837 ---- 07CB: FE E805 INC $05E8,X 07CE: BD C805 LDA $05C8,X 07D1: 49 01 EOR #$01 ; flip bits .... ...x 07D3: 9D C805 STA $05C8,X 07D6: 4C 3E86 JMP $863E ---- 07D9: A5 2F LDA $2F ; Current Weapon Strength Code 07DB: 29 02 AND #$02 ; keep bits .... ..x. 07DD: 0A ASL 07DE: 85 08 STA $08 07E0: A5 34 LDA $34 ; Randomizer 07E2: 29 03 AND #$03 ; keep bits .... ..xx 07E4: 65 08 ADC $08 07E6: A8 TAY 07E7: B9 EB87 LDA $87EB,Y 07EA: 60 RTS ---- 07EB: 01 01 02 01 02 01 02 02 Table for ? (8 bytes) ---- 07F3: Running Man Possible Jumping Codes (8 bytes) 00 00 04 00 04 00 04 04 Offset into table at 07FB 07FB: Table for Running Man Jumping Velocities (8 bytes) 00 FE Jumping Y Velocity 48 FF Jumping X Velocity 00 FF Jumping Y Velocity 60 FF Jumping X Velocity ---- Running Man - Pointer 4 0803: BD A805 LDA $05A8,X 0806: 29 0C AND #$0C ; keep bits .... xx.. 0808: C9 05 CMP #$05 080A: A0 00 LDY #$00 ; Y = 00 080C: A9 06 LDA #$06 ; A = 06 080E: 90 09 BCC $0819 0810: A9 1B LDA #$1B ; A = 1B 0812: 9D 8805 STA $0588,X 0815: A0 02 LDY #$02 ; Y = 02 0817: A9 07 LDA #$07 ; A = 07 0819: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 081C: DE 5805 DEC $0558,X 081F: D0 43 BNE $0864 0821: DE D805 DEC $05D8,X 0824: 30 44 BMI $086A 0826: A9 10 LDA #$10 ; A = 10 0828: 9D 5805 STA $0558,X 082B: BD C805 LDA $05C8,X 082E: F0 01 BEQ $0831 0830: C8 INY 0831: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 0834: 18 CLC 0835: 79 8288 ADC $8882,Y 0838: 85 08 STA $08 083A: B9 8688 LDA $8886,Y 083D: 18 CLC 083E: 30 07 BMI $0847 0840: 7D 3E03 ADC $033E,X ; Enemy X Position On Screen 0843: B0 1F BCS $0864 0845: 90 09 BCC $0850 0847: 7D 3E03 ADC $033E,X 084A: 90 18 BCC $0864 084C: C9 08 CMP #$08 084E: 90 14 BCC $0864 0850: 85 09 STA $09 0852: BC C805 LDY $05C8,X 0855: B9 8A88 LDA $888A,Y 0858: A0 06 LDY #$06 ; Y = 06 085A: 20 BEF2 JSR $F2BE ; Bullet Generation 085D: D0 05 BNE $0864 085F: A9 06 LDA #$06 ; A = 06 0861: 9D B805 STA $05B8,X 0864: 20 1A89 JSR $891A 0867: 4C A7E8 JMP $E8A7 ---- 086A: A9 10 LDA #$10 ; A = 10 086C: 9D 8805 STA $0588,X 086F: A9 00 LDA #$00 ; A = 00 0871: 9D D805 STA $05D8,X 0874: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 0877: 20 1A89 JSR $891A 087A: 20 A7E8 JSR $E8A7 087D: A9 03 LDA #$03 ; A = 03 087F: 4C 1AE8 JMP $E81A ---- 0882: F7 F7 0A 0A Table for ? (4 bytes) 0886: F0 10 F0 10 Table for ? (4 bytes) 088A: 06 00 Table for ? (2 bytes) ---- Running Man - Pointer A 088C: A9 08 LDA #$08 ; A = 08 088E: 9D 6805 STA $0568,X 0891: A9 10 LDA #$10 ; A = 10 0893: 20 BA88 JSR $88BA 0896: 20 1A89 JSR $891A 0899: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 089C: A9 08 LDA #$08 ; A = 08 089E: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- Running Man - Pointer B 08A1: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 08A4: D0 17 BNE $08BD 08A6: A9 08 LDA #$08 ; A = 08 08A8: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 08AB: FE 6805 INC $0568,X ; Enemy Animation Frame Code 08AE: BD 6805 LDA $0568,X 08B1: C9 0A CMP #$0A 08B3: 90 03 BCC $08B8 08B5: 4C 09E8 JMP $E809 ; Remove Enemy ---- 08B8: A9 08 LDA #$08 ; A = 08 08BA: 20 1FEB JSR $EB1F ; Add A to Y Position On Screen 08BD: 20 1A89 JSR $891A 08C0: 4C A7E8 JMP $E8A7 ; Add Scrolling to Enemy Position ---- Running Man - Pointer 5 08C3: A9 0B LDA #$0B ; A = 0B 08C5: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 08C8: 20 1A89 JSR $891A 08CB: 20 07EB JSR $EB07 ; Set Bits 0 and 4 of $598,X 08CE: A9 80 LDA #$80 ; A = 80 08D0: 9D F804 STA $04F8,X ; initial Y velocity when enemy fly up (low) 08D3: A9 FC LDA #$FC ; A = FC 08D5: 9D E804 STA $04E8,X ; initial Y velocity when enemy fly up (high) 08D8: A9 60 LDA #$60 ; A = 60 08DA: 9D 1805 STA $0518,X ; initial X velocity when enemy fly up (low) 08DD: A9 00 LDA #$00 ; A = 00 08DF: 9D 0805 STA $0508,X ; initial X velocity when enemy fly up (high) 08E2: BD 3E03 LDA $033E,X ; Enemy X Position on Screen 08E5: C9 10 CMP #$10 08E7: 90 04 BCC $08ED 08E9: C9 F0 CMP #$F0 08EB: 90 03 BCC $08F0 08ED: 20 D9E8 JSR $E8D9 ; Set X Velocity to Zero 08F0: BD C805 LDA $05C8,X 08F3: F0 03 BEQ $08F8 08F5: 20 1EE9 JSR $E91E ; Reverse X Direction 08F8: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 08FB: A9 10 LDA #$10 ; A = 10 08FD: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- Running Man - Pointer 6 0900: 20 1A89 JSR $891A 0903: A9 30 LDA #$30 ; A = 30 (gravity when enemy fly up) 0905: 20 42EB JSR $EB42 ; Add A to Y Velocity 0908: BD 2403 LDA $0324,X ; Enemy Y Position on Screen 090B: C9 08 CMP #$08 090D: 90 08 BCC $0917 090F: 20 37E8 JSR $E837 ; Apply Velocities and Scrolling Adjust 0912: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 0915: D0 22 BNE $0939 0917: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 091A: BC 6805 LDY $0568,X ; Enemy Animation Frame Code 091D: B9 3A89 LDA $893A,Y 0920: 9D 0A03 STA $030A,X ; Enemy Sprite Code 0923: A9 40 LDA #$40 ; A = 40 (Running Man facing right) 0925: BC C805 LDY $05C8,X 0928: F0 02 BEQ $092C 092A: A9 00 LDA #$00 ; A = 00 (Running Man facing left) 092C: BC B805 LDY $05B8,X 092F: F0 05 BEQ $0936 0931: DE B805 DEC $05B8,X 0934: 09 08 ORA #$08 ; set bits .... x... (gun recoil flag) 0936: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 0939: 60 RTS ---- 093A: Table for Running Man Sprite Codes (C bytes) 3B 3C 3D 3F 3C 3E 40 26 73 18 28 27 ---- 0946: Pointer table for Rifle Man (9 * 2 = 12 bytes) 5889 -> 0958 8289 -> 0982 D289 -> 09D2 B38A -> 0AB3 F18A -> 0AF1 FC8A -> 0AFC 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- Rifle Man - Pointer 1 0958: BC A805 LDY $05A8,X ; Enemy Attributes 095B: B9 7989 LDA $8979,Y 095E: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 0961: B9 7F89 LDA $897F,Y 0964: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 0967: 20 88EB JSR $EB88 096A: BD A805 LDA $05A8,X ; Enemy Attributes 096D: C9 01 CMP #$01 096F: D0 05 BNE $0976 0971: A9 05 LDA #$05 ; A = 05 (Hiding Rifle Man Y offset) 0973: 20 1FEB JSR $EB1F ; Add A to Enemy Y Position on Screen 0976: 4C 8EE7 JMP $E78E ---- 0979: 01 30 80 01 60 80 03 00 00 Table for Rifle Man (9 bytes) 01 = Delay before first attack - Standing Rifle Man (01 = smallest delay?) 30 = Delay before first attack - Hiding Rifle Man (< 0B = 1st shot no bullet) 80 = Delay before first attack - Hiding/Standing Rifle Man 01 = ??? 60 = Delay hiding between attacks - Hiding Rifle Man 80 = Delay hiding between attacks - Hiding/Standing Rifle Man 03 = Starting Animation Frame - Standing Rifle Man 00 = Starting Animation Frame - Hiding Rifle Man 00 = ??? ---- Rifle Man - Pointer 2 0982: 20 028B JSR $8B02 0985: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 0988: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 098B: D0 3E BNE $09CB 098D: BC A805 LDY $05A8,X ; Enemy Attributes 0990: F0 22 BEQ $09B4 0992: A9 08 LDA #$08 ; A = 08 0994: 9D 3805 STA $0538,X ; Delay between frames when unhiding 0997: FE 6805 INC $0568,X ; Enemy Animation Frame Code 099A: BD 6805 LDA $0568,X 099D: C9 03 CMP #$03 099F: 90 2A BCC $09CB 09A1: C0 01 CPY #$01 09A3: D0 05 BNE $09AA 09A5: DE 6805 DEC $0568,X 09A8: D0 0A BNE $09B4 09AA: A9 F2 LDA #$F2 ; A = F2 09AC: 20 1FEB JSR $EB1F ; Add A to Enemy Y Position on Screen 09AF: A9 01 LDA #$01 ; A = 01 09B1: 20 27EB JSR $EB27 ; Add A to Enemy X Position on Screen 09B4: 20 16EB JSR $EB16 09B7: A9 30 LDA #$30 ; A = 30 (related to score and collision test) 09B9: 9D 8805 STA $0588,X 09BC: B9 CC89 LDA $89CC,Y 09BF: 9D 5805 STA $0558,X ; Delay Between Attacks 09C2: B9 CF89 LDA $89CF,Y 09C5: 9D E805 STA $05E8,X ; Enemy Bullet Counter 09C8: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 09CB: 60 RTS ---- 09CC: 40 04 10 Table for Rifle Man (3 bytes) 40 = Delay Before Resuming Attack - Standing Rifle Man 04 = Delay Before Shooting After Unhiding (Hiding Rifle Man) 10 = Delay Before Shooting After Unhiding (Hiding/Standing Rifle Man) 09CF: 03 01 03 Table for Rifle Man (3 bytes) 03 = Number of bullets to shoot per attack - Standing Rifle Man 01 = Number of bullets to shoot per attack - Hiding Rifle Man 03 = Number of bullets to shoot per attack - Hiding/Standing Rifle Man ---- Rifle Man - Pointer 3 09D2: 20 028B JSR $8B02 09D5: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 09D8: DE 5805 DEC $0558,X ; Delay Between Attacks 09DB: D0 EE BNE $09CB 09DD: DE E805 DEC $05E8,X ; Enemy Bullet Counter 09E0: 10 03 BPL $09E5 09E2: 4C 848A JMP $8A84 ---- 09E5: A9 18 LDA #$18 ; A = 18 09E7: 9D 5805 STA $0558,X ; Delay Between Bullets (standing & hiding) 09EA: 20 F5EC JSR $ECF5 09ED: 84 0A STY $0A 09EF: B9 3403 LDA $0334,Y 09F2: DD 3E03 CMP $033E,X ; Enemy X Position On Screen 09F5: A9 00 LDA #$00 ; A = 00 09F7: 90 02 BCC $09FB 09F9: A9 01 LDA #$01 ; A = 01 09FB: 9D C805 STA $05C8,X 09FE: BD A805 LDA $05A8,X ; Enemy Attributes 0A01: 4A LSR 0A02: 90 0E BCC $0A12 0A04: A9 00 LDA #$00 ; A = 00 0A06: BC C805 LDY $05C8,X ; Bullet Angle 0A09: D0 02 BNE $0A0D 0A0B: A9 0C LDA #$0C ; A = 0C 0A0D: 85 0C STA $0C 0A0F: 4C 258A JMP $8A25 ---- 0A12: A0 00 LDY #$00 ; Y = 00 0A14: BD A805 LDA $05A8,X ; Enemy Attributes 0A17: C9 02 CMP #$02 0A19: D0 02 BNE $0A1D 0A1B: A0 F0 LDY #$F0 ; Y = F0 0A1D: A9 00 LDA #$00 ; A = 00 0A1F: 20 32EB JSR $EB32 ; Set X/Y Position relative to Enemy Position 0A22: 20 51F4 JSR $F451 0A25: A5 0C LDA $0C 0A27: 18 CLC 0A28: 69 06 ADC #$06 0A2A: C9 18 CMP #$18 0A2C: 90 02 BCC $0A30 0A2E: E9 18 SBC #$18 0A30: C9 0C CMP #$0C 0A32: 90 07 BCC $0A3B 0A34: 85 08 STA $08 0A36: A9 18 LDA #$18 ; A = 18 0A38: 38 SEC 0A39: E5 08 SBC $08 0A3B: A0 00 LDY #$00 ; Y = 00 0A3D: C9 05 CMP #$05 0A3F: 90 06 BCC $0A47 0A41: C8 INY 0A42: C9 08 CMP #$08 0A44: 90 01 BCC $0A47 0A46: C8 INY 0A47: BD A805 LDA $05A8,X ; Enemy Attributes 0A4A: C9 01 CMP #$01 0A4C: F0 06 BEQ $0A54 0A4E: B9 A78A LDA $8AA7,Y 0A51: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 0A54: BD 2403 LDA $0324,X 0A57: 18 CLC 0A58: 79 AA8A ADC $8AAA,Y 0A5B: 85 08 STA $08 0A5D: BD C805 LDA $05C8,X 0A60: 4A LSR 0A61: B9 AD8A LDA $8AAD,Y 0A64: 90 04 BCC $0A6A 0A66: 49 FF EOR #$FF ; flip all bits 0A68: 69 00 ADC #$00 0A6A: 18 CLC 0A6B: 7D 3E03 ADC $033E,X 0A6E: 85 09 STA $09 0A70: BC A805 LDY $05A8,X ; Enemy Attributes 0A73: B9 B08A LDA $8AB0,Y 0A76: A8 TAY 0A77: A5 0C LDA $0C 0A79: 20 BFF2 JSR $F2BF 0A7C: D0 05 BNE $0A83 0A7E: A9 06 LDA #$06 ; A = 06 0A80: 9D D805 STA $05D8,X 0A83: 60 RTS ---- 0A84: BC A805 LDY $05A8,X ; Enemy Attributes 0A87: D0 0C BNE $0A95 0A89: B9 CF89 LDA $89CF,Y 0A8C: 9D E805 STA $05E8,X ; Enemy Bullet Counter 0A8F: A9 80 LDA #$80 ; A = 80 0A91: 9D 5805 STA $0558,X ; Delay between attacks (standing) 0A94: 60 RTS ---- 0A95: BD A805 LDA $05A8,X ; Enemy Attributes 0A98: 4A LSR 0A99: A9 02 LDA #$02 ; A = 02 0A9B: B0 02 BCS $0A9F 0A9D: A9 03 LDA #$03 ; A = 03 0A9F: 9D 6805 STA $0568,X 0AA2: A9 80 LDA #$80 ; A = 80 (delay before rehiding) 0AA4: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- 0AA7: 04 03 05 Tile Codes While Shooting - Standing Rifle Man 04 = Shooting Up 03 = Shooting Straight 05 = Shooting Down 0AAA: EE F5 06 Initial Y Offset of Bullets - Standing Rifle Man 0AAD: F3 F1 F1 Initial X Offset of Bullets - Standing Rifle Man 0AB0: 03 05 03 Bullet Speed Code 03 = Bullet Speed Code for Standing Rifle Man 05 = Bullet Speed Code for Hiding Rifle Man 03 = Bullet Speed Code for Boss Hiding Rifle Man ---- Rifle Man - Pointer 4 0AB3: DE 3805 DEC $0538,X 0AB6: D0 33 BNE $0AEB 0AB8: 20 07EB JSR $EB07 0ABB: A9 08 LDA #$08 ; A = 08 0ABD: 9D 3805 STA $0538,X ; Delay between frames when hiding 0AC0: DE 6805 DEC $0568,X 0AC3: D0 0E BNE $0AD3 0AC5: BC A805 LDY $05A8,X 0AC8: B9 7C89 LDA $897C,Y 0ACB: 9D 3805 STA $0538,X 0ACE: A9 02 LDA #$02 ; A = 02 0AD0: 20 1AE8 JSR $E81A 0AD3: BD A805 LDA $05A8,X ; Enemy Attributes 0AD6: C9 02 CMP #$02 0AD8: D0 11 BNE $0AEB 0ADA: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 0ADD: C9 02 CMP #$02 0ADF: D0 0A BNE $0AEB 0AE1: A9 0E LDA #$0E ; A = 0E 0AE3: 20 1FEB JSR $EB1F ; Add A to Enemy Y Position on Screen 0AE6: A9 FF LDA #$FF ; A = FF 0AE8: 20 27EB JSR $EB27 ; Add A to Enemy X Position on Screen 0AEB: 20 028B JSR $8B02 0AEE: 4C A7E8 JMP $E8A7 ---- Rifle Man - Pointer 5 0AF1: A9 06 LDA #$06 ; A = 06 0AF3: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 0AF6: 20 028B JSR $8B02 0AF9: 4C CB88 JMP $88CB ---- Rifle Man - Pointer 6 0AFC: 20 028B JSR $8B02 0AFF: 4C 0389 JMP $8903 ---- 0B02: A0 00 LDY #$00 ; Y = 00 0B04: BD A805 LDA $05A8,X ; Enemy Attributes 0B07: C9 02 CMP #$02 0B09: 90 02 BCC $0B0D 0B0B: A0 02 LDY #$02 ; Y = 02 0B0D: B9 378B LDA $8B37,Y 0B10: 85 08 STA $08 0B12: B9 388B LDA $8B38,Y 0B15: 85 09 STA $09 0B17: BC 6805 LDY $0568,X ; Enemy Animation Frame Code 0B1A: B1 08 LDA ($08),Y 0B1C: 9D 0A03 STA $030A,X ; Enemy Sprite Code 0B1F: BD C805 LDA $05C8,X ; Bullet Angle 0B22: 4A LSR 0B23: A9 40 LDA #$40 ; A = 40 0B25: 90 02 BCC $0B29 0B27: A9 00 LDA #$00 ; A = 00 0B29: BC D805 LDY $05D8,X 0B2C: F0 05 BEQ $0B33 0B2E: DE D805 DEC $05D8,X 0B31: 09 08 ORA #$08 ; set bits .... x... (gun recoil flag) 0B33: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 0B36: 60 RTS ---- 0B37: Pointer table for Rifle Man Sprite Codes (2 * 2 = 4 bytes) 3B8B -> 0B3B 428B -> 0B42 ---- 0B3B: 44 45 46 43 42 41 29 Regular/Hiding Rifle Man Sprite Codes (7 bytes) 0B42: 44 45 46 2C 42 2D 29 Boss Hiding Rifle Man Sprite Codes (7 bytes) ---- 0B49: Pointer table for Level 1 Bomb Turret (6 * 2 = C bytes) 558B -> 0B55 5C8B -> 0B5C BF8B -> 0BBF 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- Bomb Turret - Pointer 1 0B55: A9 20 LDA #$20 ; A = 20 0B57: 9D 5805 STA $0558,X ; delay before first attack 0B5A: D0 6A BNE $0BC6 Bomb Turret - Pointer 2 0B5C: 20 A7E8 JSR $E8A7 0B5F: DE 5805 DEC $0558,X ; Delay Between Attacks 0B62: D0 54 BNE $0BB8 0B64: 20 968B JSR $8B96 0B67: B0 4F BCS $0BB8 0B69: A9 28 LDA #$28 ; A = 28 (delay between bombs) 0B6B: BC B805 LDY $05B8,X 0B6E: F0 02 BEQ $0B72 0B70: A9 08 LDA #$08 ; A = 08 (time during which turret recoils) 0B72: 9D 5805 STA $0558,X 0B75: 98 TYA 0B76: 49 02 EOR #$02 ; flip bits .... ..xx 0B78: 9D B805 STA $05B8,X 0B7B: F0 3B BEQ $0BB8 0B7D: A9 F8 LDA #$F8 ; A = F8 (initial X offset of bombs) 0B7F: A0 00 LDY #$00 ; Y = 00 (initial Y offset of bombs) 0B81: 20 32EB JSR $EB32 ; Set Position Relative to Enemy Position 0B84: A5 34 LDA $34 ; Randomizer 0B86: 29 03 AND #$03 ; keep bits .... ..xx 0B88: A8 TAY 0B89: B9 928B LDA $8B92,Y 0B8C: A8 TAY 0B8D: A9 17 LDA #$17 ; A = 17 (Bullet Type and Angle) *** Randomize Bullet Angle *** 0B8F: 4C BEF2 JMP $F2BE ; Bullet Generation Routine *** Generate more than 1 bullet per cannon *** ---- 0B92: 01 03 05 07 Table for Bombs Initial X Velocities (4 bytes) ---- 0B96: BC B805 LDY $05B8,X 0B99: BD A805 LDA $05A8,X ; Enemy Attributes 0B9C: 4A LSR 0B9D: 90 06 BCC $0BA5 0B9F: C8 INY 0BA0: A9 F8 LDA #$F8 ; A = F8 0BA2: 20 27EB JSR $EB27 ; Add A to Enemy X Position on Screen 0BA5: B9 B98B LDA $8BB9,Y 0BA8: 20 AAEB JSR $EBAA 0BAB: 08 PHP 0BAC: BD A805 LDA $05A8,X ; Enemy Attributes 0BAF: F0 06 BEQ $0BB7 0BB1: C8 INY 0BB2: A9 08 LDA #$08 ; A = 08 0BB4: 20 27EB JSR $EB27 ; Add A to Enemy X Position on Screen 0BB7: 28 PLP 0BB8: 60 RTS ---- 0BB9: 29 26 2A 27 2B 28 Table for Bomb Turrets Tile Codes (6 bytes) ---- Bomb Turret - Pointer 3 0BBF: A0 04 LDY #$04 ; Y = 04 0BC1: 20 998B JSR $8B99 0BC4: B0 F2 BCS $0BB8 0BC6: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 0BC9: Pointer table for Door Plate with Siren (7 * 2 = E bytes) D78B -> 0BD7 A7E8 -> 1E8A7 ; Add Scrolling to Enemy Position 40E7 -> 1E740 B0E7 -> 1E7B0 14E8 -> 1E814 DF8B -> 0BDF E98B -> 0BE9 ---- Door Plate - Pointer 1 0BD7: A9 1B LDA #$1B ; A = 1B 0BD9: 20 6BC1 JSR $C16B ; Play Sound (1B = Siren Sound) 0BDC: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- Door Plate - Pointer 6 0BDF: A9 00 LDA #$00 ; A = 00 0BE1: 9D B805 STA $05B8,X 0BE4: A9 08 LDA #$08 ; A = 08 0BE6: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- Door Plate - Pointer 7 0BE9: DE 3805 DEC $0538,X 0BEC: D0 22 BNE $0C10 0BEE: A9 08 LDA #$08 ; A = 08 0BF0: 9D 3805 STA $0538,X 0BF3: BC B805 LDY $05B8,X 0BF6: B9 428C LDA $8C42,Y 0BF9: 20 AAEB JSR $EBAA 0BFC: B0 BA BCS $0BB8 0BFE: BC B805 LDY $05B8,X 0C01: B9 4A8C LDA $8C4A,Y 0C04: 20 25EA JSR $EA25 0C07: 20 2FEB JSR $EB2F 0C0A: FE B805 INC $05B8,X 0C0D: 4C B7EA JMP $EAB7 ---- 0C10: BD 3805 LDA $0538,X 0C13: C9 01 CMP #$01 0C15: D0 A1 BNE $0BB8 0C17: BD B805 LDA $05B8,X 0C1A: 0A ASL 0C1B: A8 TAY 0C1C: B9 318C LDA $8C31,Y 0C1F: C9 FF CMP #$FF 0C21: F0 09 BEQ $0C2C 0C23: 20 1FEB JSR $EB1F 0C26: B9 328C LDA $8C32,Y 0C29: 4C 27EB JMP $EB27 ---- 0C2C: A9 30 LDA #$30 ; A = 30 0C2E: 4C F6EA JMP $EAF6 ---- 0C31: Table for Destroyed Barricade Explosions Offsets (11 bytes) F0 F0 -10 , -10 20 00 20 , 00 E0 20 -20 , 20 20 00 20 , 00 E0 20 20 00 E0 20 20 00 FF ---- 0C42: 1E 22 1F 23 20 24 21 25 Table for ? (8 bytes) 0C4A: 00 00 00 04 00 04 00 04 Table for ? (8 bytes) ---- 0C52: Pointer table for Exploding Bridge (5 * 2 = A bytes) 5C8C -> 0C5C 738C -> 0C73 4BE7 -> 1E74B B0E7 -> 1E7B0 F08C -> 0CF0 ---- 0C5C: 20 A7E8 JSR $E8A7 0C5F: 20 F5EC JSR $ECF5 0C62: C9 18 CMP #$18 0C64: B0 4E BCS $0CB4 0C66: A9 01 LDA #$01 ; A = 01 0C68: 9D 3805 STA $0538,X 0C6B: A9 00 LDA #$00 ; A = 00 0C6D: 9D C805 STA $05C8,X 0C70: 4C 8EE7 JMP $E78E ---- 0C73: 20 A7E8 JSR $E8A7 0C76: DE 3805 DEC $0538,X 0C79: D0 39 BNE $0CB4 0C7B: BD B805 LDA $05B8,X 0C7E: 0A ASL 0C7F: 85 08 STA $08 0C81: BD C805 LDA $05C8,X 0C84: C9 02 CMP #$02 0C86: B0 30 BCS $0CB8 0C88: 18 CLC 0C89: 65 08 ADC $08 0C8B: A8 TAY 0C8C: B9 E08C LDA $8CE0,Y 0C8F: F0 27 BEQ $0CB8 0C91: 85 10 STA $10 0C93: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 0C96: 18 CLC 0C97: 69 F4 ADC #$F4 0C99: A8 TAY 0C9A: BD C805 LDA $05C8,X 0C9D: 4A LSR 0C9E: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 0CA1: B0 02 BCS $0CA5 0CA3: 69 E0 ADC #$E0 0CA5: 18 CLC 0CA6: 69 F4 ADC #$F4 0CA8: 20 93C1 JSR $C193 0CAB: A6 83 LDX $83 0CAD: 90 06 BCC $0CB5 0CAF: A9 01 LDA #$01 ; A = 01 0CB1: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 0CB4: 60 RTS ---- 0CB5: 20 23EA JSR $EA23 0CB8: FE C805 INC $05C8,X 0CBB: BD C805 LDA $05C8,X 0CBE: C9 04 CMP #$04 ; Number of Explosion Clouds per Segment 0CC0: B0 AE BCS $0C70 0CC2: A9 24 LDA #$24 ; A = 24 (sound of explosion) 0CC4: 20 6BC1 JSR $C16B ; Play Sound 0CC7: A9 04 LDA #$04 ; A = 04 (delay between explosions and clouds) 0CC9: 9D 3805 STA $0538,X 0CCC: BC C805 LDY $05C8,X 0CCF: B9 EB8C LDA $8CEB,Y 0CD2: 85 08 STA $08 0CD4: B9 E78C LDA $8CE7,Y 0CD7: A8 TAY 0CD8: A5 08 LDA $08 0CDA: 20 32EB JSR $EB32 0CDD: 4C B7EA JMP $EAB7 ---- 0CE0: 00 1A 1B 1C 19 1C 19 1D Table for Tile Codes After Destruction (8 bytes) 0CE7: 00 F0 00 10 Table for Clouds Y Offsets (4 bytes) 0CEB: F0 00 10 00 Table for Clouds X Offsets (4 bytes) ---- 0CF0: 20 A7E8 JSR $E8A7 0CF3: FE B805 INC $05B8,X 0CF6: BD B805 LDA $05B8,X 0CF9: C9 04 CMP #$04 ; Number of Explosions 0CFB: B0 19 BCS $0D16 0CFD: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 0D00: 69 20 ADC #$20 0D02: B0 12 BCS $0D16 0D04: 9D 3E03 STA $033E,X 0D07: A9 01 LDA #$01 ; A = 01 0D09: 9D 0A03 STA $030A,X 0D0C: A9 01 LDA #$01 ; A = 01 0D0E: 20 688C JSR $8C68 0D11: A9 02 LDA #$02 ; A = 02 0D13: 4C 1AE8 JMP $E81A ---- 0D16: 4C 09E8 JMP $E809 ; Remove Enemy ---- 0D19: Pointer table for Green Guys Generator (3 * 2 = 6 bytes) 1F8D -> 0D1F 288D -> 0D28 09E8 -> 1E809 Remove Enemy ---- 0D1F: A9 40 LDA #$40 ; A = 40 0D21: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 0D24: 4C 8EE7 JMP $E78E ---- 0D27: 60 RTS ---- 0D28: A5 1A LDA $1A ; Permanent Frame Counter 0D2A: 4A LSR 0D2B: 90 FA BCC $0D27 ; if $1A is even, return 0D2D: A5 8A LDA $8A 0D2F: D0 F6 BNE $0D27 ; if $8A > 0, return 0D31: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 0D34: D0 F1 BNE $0D27 0D36: BD A805 LDA $05A8,X ; Enemy Attributes 0D39: 0A ASL 0D3A: A8 TAY 0D3B: B9 CF8D LDA $8DCF,Y ; pointer to table entry, high byte 0D3E: 85 0A STA $0A 0D40: B9 D08D LDA $8DD0,Y ; pointer to table entry, low byte 0D43: 85 0B STA $0B 0D45: A5 64 LDA $64 ; Screen Number 0D47: 0A ASL 0D48: A8 TAY 0D49: B1 0A LDA ($0A),Y 0D4B: 85 08 STA $08 0D4D: C8 INY 0D4E: B1 0A LDA ($0A),Y 0D50: 85 09 STA $09 0D52: BC B805 LDY $05B8,X 0D55: B1 08 LDA ($08),Y ; read byte from tables defined at 0DCF 0D57: 29 3F AND #$3F ; keep bits ..xx xxxx 0D59: 85 0A STA $0A ; enemy attributes 0D5B: B1 08 LDA ($08),Y 0D5D: 2A ROL 0D5E: 2A ROL 0D5F: 2A ROL 0D60: 29 03 AND #$03 ; keep bits .... ..xx 0D62: 85 0B STA $0B ; enemy type (0-3) 0D64: C8 INY 0D65: B1 08 LDA ($08),Y ; read next byte (delay byte) 0D67: C8 INY 0D68: 0A ASL 0D69: 90 0F BCC $0D7A ; if bit 7 = 0, skip to $0D7A 0D6B: A0 00 LDY #$00 ; Y = 00 0D6D: 48 PHA 0D6E: E6 88 INC $88 0D70: A5 88 LDA $88 ; Number of cycles for Guys to stop 0D72: C9 07 CMP #$07 ; Guys stop after 7 cycles 0D74: 68 PLA 0D75: 90 03 BCC $0D7A 0D77: 4C 09E8 JMP $E809 ; Remove Enemy ---- 0D7A: 4A LSR 0D7B: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 0D7E: 98 TYA 0D7F: 9D B805 STA $05B8,X 0D82: A4 0B LDY $0B 0D84: F0 0A BEQ $0D90 0D86: 88 DEY 0D87: F0 0B BEQ $0D94 0D89: 88 DEY 0D8A: F0 21 BEQ $0DAD 0D8C: A9 17 LDA #$17 ; A = 17 Seeking Guy 0D8E: D0 06 BNE $0D96 0D90: A9 15 LDA #$15 ; A = 15 Running Guy 0D92: D0 02 BNE $0D96 0D94: A9 16 LDA #$16 ; A = 16 Jumping Guy 0D96: 85 08 STA $08 0D98: 20 CEED JSR $EDCE ; Find next enemy slot 0D9B: D0 2F BNE $0DCC 0D9D: A5 08 LDA $08 0D9F: 9D 2805 STA $0528,X ; Enemy Type 0DA2: 20 47EE JSR $EE47 0DA5: A5 0A LDA $0A 0DA7: 9D A805 STA $05A8,X ; Enemy Attributes 0DAA: 4C CC8D JMP $8DCC ---- Group of 4 Running Guys 0DAD: A9 03 LDA #$03 ; A = 03 0DAF: 85 0C STA $0C 0DB1: 20 CEED JSR $EDCE ; Find next enemy slot 0DB4: D0 16 BNE $0DCC 0DB6: A9 18 LDA #$18 ; A = 18 0DB8: 9D 2805 STA $0528,X 0DBB: 20 47EE JSR $EE47 0DBE: A5 0A LDA $0A 0DC0: 9D A805 STA $05A8,X ; Enemy Attributes 0DC3: A5 0C LDA $0C 0DC5: 9D B805 STA $05B8,X 0DC8: C6 0C DEC $0C 0DCA: 10 E5 BPL $0DB1 0DCC: A6 83 LDX $83 0DCE: 60 RTS ---- 0DCF: Pointer table for Level 2/4 Enemy Cycles Pointers (2 * 2 = 4 bytes) D38D -> 0DD3 098E -> 0E09 ---- 0DD3: Pointer table for Level 2 Enemy Cycles (5 * 2 = E bytes) DD8D -> 0DDD E38D -> 0DE3 EF8D -> 0DEF F38D -> 0DF3 F98D -> 0DF9 ---- Level 2 Enemy Cycles (2C bytes) 0DDD: 42 30 01 01 00 C0 (6 bytes) 0DE3: 46 30 81 50 01 10 00 30 00 10 01 E0 (C bytes) 0DEF: 00 30 C5 A0 (4 bytes) 0DF3: 46 20 81 60 C3 E1 (6 bytes) 0DF9: 40 30 81 60 00 10 03 30 02 10 01 40 47 10 4A E0 (10 bytes) -- Screen 1 42 30 Type 01 Jumping Attr. 00 01 Weapon Item 0 and Red Guy at next cycle Delay 30 Dir. 00 From right 01 01 Type 00 Running Attr. 00 01 Weapon Type 0 -> Bullets Delay 01 Dir. 01 From left 00 C0 Type 00 Running Attr. 00 00 Weapon Type 0 -> Bullets Delay 40 Dir. 00 From right Restart Loop -- Byte 0 Format xx...... Type (0 = Run, 1 = Jump, 2 = Group of Four, 3 = Seek) ..xxxxxx Attributes, depending on type Type 0 - Running ..xxx... No Effect * potential for ASM, e.g. speed code * .....xx. Weapon Used (0 = bullets, 1 = grenades, 2/3 = rollers) .......x Direction (0 = from right, 1 = from left) Type 1 - Jumping ..x..... No Effect ...xxx.. Weapon Type for Red Guy ......x. Guy will be Red in second enemy cycle .......x Direction (0 = from right, 1 = from left) If the Guy to be Red at next cycle is the last Guy of the cycle... He will be Red immediately when the first cycle ends, not the next one... Type 2 - Group of Four ..xxxxx. No Effect .......x Direction (0 = from right, 1 = from left) Type 3 - Seeking ..xxx... No Effect .....xx. Number of Grenades (0-3) .......x Direction (0 = from right, 1 = from left) Byte 1 Format x....... End of Loop .xxxxxxx Delay before next enemy ---- 0E09: Pointer table for Level 4 Enemy Cycles (8 * 2 = 10 bytes) 198E -> 0E19 258E -> 0E25 338E -> 0E33 3B8E -> 0E3B 438E -> 0E43 498E -> 0E49 518E -> 0E51 5D8E -> 0E5D ---- Level 4 Enemy Cycles (4E bytes) 0E19: 04 30 05 60 41 60 02 30 03 60 80 E0 (C bytes) 0E25: 4A 50 C3 20 C2 20 04 20 05 50 47 50 C2 B0 (E bytes) 0E33: 05 40 80 60 53 60 80 E0 (8 bytes) 0E3B: 57 60 40 60 41 60 40 E0 (8 bytes) 0E43: 05 30 04 60 42 E0 (6 bytes) 0E49: 4E 40 81 60 41 60 40 E0 (8 bytes) 0E51: 04 20 03 40 4B 60 07 20 02 40 4B E0 (C bytes) 0E5D: 02 30 47 40 80 60 03 20 04 D0 (A bytes) ---- 0E67: Pointer table for Base I Boss Eye (7 * 2 = E bytes) 758E -> 0E75 7D8E -> 0E7D A48E -> 0EA4 088F -> 0F08 40E7 -> 1E740 B0E7 -> 1E7B0 2D8F -> 0F2D ---- 0E75: A9 40 LDA #$40 ; A = 40 (delay before Base I Boss appears) 0E77: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 0E7A: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 0E7D: A5 87 LDA $87 ; Number of Boss Platings Destroyed 0E7F: C9 04 CMP #$04 ; Number of Boss Platings to Destroy (Base I) 0E81: 90 20 BCC $0EA3 0E83: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 0E86: D0 1B BNE $0EA3 0E88: A9 40 LDA #$40 ; A = 40 0E8A: 9D 1805 STA $0518,X ; Boss X Velocity (low byte) 0E8D: A9 01 LDA #$01 ; A = 01 0E8F: 9D 0805 STA $0508,X ; Boss X Velocity (high byte) 0E92: A9 10 LDA #$10 ; A = 10 0E94: 9D B805 STA $05B8,X ; Boss HP 0E97: 20 16EB JSR $EB16 ; Collision Attributes Setup ? 0E9A: A9 20 LDA #$20 ; A = 20 (delay before first attack) 0E9C: 9D 5805 STA $0558,X ; Delay Between Attacks 0E9F: A9 C0 LDA #$C0 ; A = C0 0EA1: D0 D4 BNE $0E77 0EA3: 60 RTS ---- 0EA4: A0 00 LDY #$00 ; Y = 00 0EA6: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 0EA9: F0 0C BEQ $0EB7 0EAB: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 0EAE: A5 1A LDA $1A ; Permanent Frame Counter 0EB0: 4A LSR 0EB1: 4A LSR 0EB2: 4A LSR 0EB3: 90 02 BCC $0EB7 0EB5: A0 04 LDY #$04 ; Y = 04 0EB7: 84 08 STY $08 0EB9: FE 6805 INC $0568,X ; Enemy Animation Frame Code 0EBC: BD 6805 LDA $0568,X 0EBF: 4A LSR 0EC0: 4A LSR 0EC1: 4A LSR 0EC2: 29 03 AND #$03 ; keep bits .... ..xx 0EC4: 18 CLC 0EC5: 65 08 ADC $08 0EC7: A8 TAY 0EC8: B9 008F LDA $8F00,Y 0ECB: 9D 0A03 STA $030A,X ; Enemy Sprite Code 0ECE: 20 37E8 JSR $E837 ; Apply Velocities and Scrolling Adjust 0ED1: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 0ED4: BC 0805 LDY $0508,X ; Enemy X Velocity (high byte) 0ED7: 30 06 BMI $0EDF 0ED9: C9 B0 CMP #$B0 ; Maximum X Position 0EDB: 90 09 BCC $0EE6 0EDD: B0 04 BCS $0EE3 0EDF: C9 50 CMP #$50 ; Minimum X Position 0EE1: B0 03 BCS $0EE6 0EE3: 20 1EE9 JSR $E91E 0EE6: A5 8E LDA $8E ; Enemy Attack Switch 0EE8: F0 B9 BEQ $0EA3 0EEA: DE 5805 DEC $0558,X 0EED: D0 B4 BNE $0EA3 0EEF: A4 2F LDY $2F ; Weapon Strength Code 0EF1: B9 FC8E LDA $8EFC,Y 0EF4: 9D 5805 STA $0558,X ; Delay Between Attacks 0EF7: A9 1B LDA #$1B ; A = 1B *** bridge here for random projectile generation *** 0EF7: A5 34 LDA $34 ; Randomizer 0EF9: 4C 0010 JMP $1000 ; Jump to projectile selection routine 1000: 29 03 AND #$03 ; keep bits .... ..xx 1002: A8 TAY 1003: B9 0610 LDA $1009,Y ; refer to table at $1009 1006: 4C 52EB JMP $EB52 ; Generate Enemy 1009: 1B 1D 1E 1F Table for Possible Projectile Types *** 10 = Boss Eye (!) 1B = Sphere Projectile 1C = Boss Gemini (!) 1D = Spinning Bubbles Projectile 1E = Blue Jumping Guy 1F = Red Shooting Guy *** Trick for Boss Eye to regain HP when firing a projectile *** *** Can be used in higher levels of difficulty *** 2000: A5 34 LDA $34 ; Randomizer 2002: 29 07 AND #$07 ; keep bits .... .xxx 2004: A8 TAY 2005: B9 0610 LDA $2009,Y ; refer to table at $2009 2008: 18 CLC 2009: 7D B805 ADC $05B8,X 200C: 9D B805 STA $05B8,X 1009: 00 00 01 00 02 00 00 03 Table for Possible HP Gain Values (8 bytes) *** 0EF9: 4C 52EB JMP $EB52 ; Generate Enemy ---- Tables for Base I Boss Eye Attributes 0EFC: 70 50 40 28 Table for Delay between attacks (4 bytes) 0F00: 5D 5E 5F 5E Table for Tile mapping codes (4 bytes) 0F04: 60 61 62 61 Table for Tile mapping codes when hit (4 bytes) ---- 0F08: DE B805 DEC $05B8,X 0F0B: F0 48 BEQ $0F55 0F0D: BD B805 LDA $05B8,X 0F10: C9 01 CMP #$01 0F12: D0 05 BNE $0F19 0F14: A9 52 LDA #$52 ; A = 52 0F16: 9D 8805 STA $0588,X 0F19: A9 16 LDA #$16 ; A = 16 0F1B: 20 6BC1 JSR $C16B ; Play Sound 0F1E: A9 01 LDA #$01 ; A = 01 0F20: 9D 7805 STA $0578,X ; Enemy HP (?) 0F23: A9 20 LDA #$20 ; A = 20 0F25: 9D 3805 STA $0538,X ; Time for enemy flashing red when hit 0F28: A9 03 LDA #$03 ; A = 03 0F2A: 4C 1AE8 JMP $E81A ---- 0F2D: 20 14E8 JSR $E814 0F30: A9 60 LDA #$60 ; A = 60 0F32: 4C F6EA JMP $EAF6 ---- 0F35: Pointer table for Base I Boss Eye Sphere Projectile (5 * 2 = A bytes) 3F8F -> 0F3F 588F -> 0F58 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- 0F3F: 20 F5EC JSR $ECF5 0F42: 84 0A STY $0A 0F44: 20 2FEB JSR $EB2F 0F47: A9 06 LDA #$06 ; A = 06 (projectile speed) 0F49: 85 06 STA $06 0F4B: A9 01 LDA #$01 ; A = 01 0F4D: 85 0F STA $0F 0F4F: 20 2CF5 JSR $F52C ; Projectile Aim ? 0F52: 20 13F3 JSR $F313 0F55: 4C 8EE7 JMP $E78E ---- 0F58: A9 63 LDA #$63 ; A = 63 0F5A: BC 2403 LDY $0324,X ; Enemy Y Position On Screen 0F5D: C0 48 CPY #$48 ; Height for Projectile to become big & hittable 0F5F: 90 05 BCC $0F66 0F61: 20 16EB JSR $EB16 0F64: A9 64 LDA #$64 ; A = 64 0F66: 9D 0A03 STA $030A,X ; Enemy Sprite Code 0F69: A5 1A LDA $1A 0F6B: 4A LSR 0F6C: 4A LSR 0F6D: 29 03 AND #$03 ; keep bits .... ..xx 0F6F: A8 TAY 0F70: BD 5803 LDA $0358,X ; Enemy Sprite Attributes 0F73: 29 3F AND #$3F ; keep bits ..xx xxxx 0F75: 19 7E8F ORA $8F7E,Y 0F78: 9D 5803 STA $0358,X 0F7B: 4C 37E8 JMP $E837 ---- 0F7E: 00 40 C0 80 Table for Sphere Projectile Mirroring Codes (4 bytes) ---- 0F82: Pointer table for Rollers (5 * 2 = A bytes) 8C8F -> 0F8C 948F -> 0F94 4BE7 -> 1E74B A4E7 -> 1E7A4 06E8 -> 1E806 ---- 0F8C: A9 72 LDA #$72 ; A = 72 (initial Y position) 0F8E: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 0F91: 4C 8EE7 JMP $E78E ---- 0F94: A0 03 LDY #$03 ; Y = 03 0F96: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 0F99: D9 C58F CMP $8FC5,Y 0F9C: B0 03 BCS $0FA1 0F9E: 88 DEY 0F9F: D0 F8 BNE $0F99 0FA1: 98 TYA 0FA2: 18 CLC 0FA3: 69 99 ADC #$99 0FA5: 9D 0A03 STA $030A,X ; Enemy Sprite Code 0FA8: C0 02 CPY #$02 0FAA: 90 05 BCC $0FB1 0FAC: A9 2E LDA #$2E ; A = 2E 0FAE: 9D 8805 STA $0588,X ; Collision, Explosion Type, Score 0FB1: 20 37E8 JSR $E837 0FB4: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 0FB7: C9 AC CMP #$AC 0FB9: 90 07 BCC $0FC2 0FBB: C9 BC CMP #$BC 0FBD: B0 04 BCS $0FC3 0FBF: 4C 16EB JMP $EB16 ---- 0FC2: 60 RTS ---- 0FC3: 4C 09E8 JMP $E809 ; Remove Enemy ---- 0FC6: 7C 8C 9C Table for Y Positions to change tile mapping (3 bytes) ---- 0FC9: Pointer table for Grenades (Indoor) (6 * 2 = C bytes) D58F -> 0FD5 E88F -> 0FE8 7C90 -> 107C 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- 0FD5: BD 2403 LDA $0324,X 0FD8: 9D B805 STA $05B8,X 0FDB: A9 00 LDA #$00 ; A = 00 0FDD: 9D E805 STA $05E8,X 0FE0: A9 FD LDA #$FD ; A = FD (initial Y velocity) 0FE2: 9D 5805 STA $0558,X 0FE5: 4C 8EE7 JMP $E78E ---- 0FE8: A0 02 LDY #$02 ; Y = 02 0FEA: BD B805 LDA $05B8,X 0FED: D9 4890 CMP $9048,Y 0FF0: B0 03 BCS $0FF5 0FF2: 88 DEY 0FF3: D0 F8 BNE $0FED 0FF5: A5 1A LDA $1A 0FF7: 29 07 AND #$07 ; keep bits .... .xxx 0FF9: D0 03 BNE $0FFE 0FFB: FE 6805 INC $0568,X ; Enemy Animation Frame Code 0FFE: BD 6805 LDA $0568,X 1001: D9 4B90 CMP $904B,Y 1004: 90 02 BCC $1008 1006: A9 00 LDA #$00 ; A = 00 1008: 9D 6805 STA $0568,X 100B: B9 4B90 LDA $904B,Y 100E: 85 0A STA $0A 1010: 98 TYA 1011: 0A ASL 1012: A8 TAY 1013: B9 4E90 LDA $904E,Y 1016: 85 08 STA $08 1018: B9 4F90 LDA $904F,Y 101B: 85 09 STA $09 101D: BC 6805 LDY $0568,X 1020: B1 08 LDA ($08),Y 1022: 9D 0A03 STA $030A,X 1025: 98 TYA 1026: 18 CLC 1027: 65 0A ADC $0A 1029: A8 TAY 102A: B1 08 LDA ($08),Y 102C: 9D 5803 STA $0358,X 102F: BD E805 LDA $05E8,X 1032: 18 CLC 1033: 69 0C ADC #$0C 1035: 9D E805 STA $05E8,X 1038: BD 5805 LDA $0558,X 103B: 69 00 ADC #$00 103D: 9D 5805 STA $0558,X 1040: 20 66ED JSR $ED66 1043: BD D805 LDA $05D8,X 1046: 10 9D BPL $0FE5 1048: 60 RTS ---- 1049: 80 90 Table for delays before changing tile mapping (2 bytes) 104B: 04 08 08 Table for ? (related to Z position and palette) (3 bytes) ---- 104E: Pointer table for Grenade Tile Mappings and Palettes (3 * 2 = 6 bytes) 5490 -> 1054 5C90 -> 105C 6C90 -> 106C ---- 1054: A8 A9 A6 A9 00 00 00 C0 Table for ? (8 bytes) 105C: A4 A5 A6 A5 A4 A7 A6 A7 00 00 00 C0 C0 00 00 C0 Table for ? (10 bytes) 106C: A0 A1 A2 A1 A0 A3 A2 A3 00 00 00 C0 C0 00 00 C0 Table for ? (10 bytes) ---- 107C: A9 24 LDA #$24 ; A = 24 107E: 20 6BC1 JSR $C16B 1081: A9 AC LDA #$AC ; A = AC 1083: 9D 2403 STA $0324,X 1086: 20 52E7 JSR $E752 1089: 4C 8EE7 JMP $E78E ---- 108C: Pointer table for Wall Cannon (8 * 2 = 10 bytes) 9C90 -> 109C A890 -> 10A8 C190 -> 10C1 EE90 -> 10EE 0891 -> 1108 37E7 -> 1E737 B0E7 -> 1E7B0 06E8 -> 1E806 ---- 109C: BC A805 LDY $05A8,X ; Enemy Attributes 109F: B9 A490 LDA $90A4,Y 10A2: D0 1A BNE $10BE ---- 10A4: 50 80 B0 F0 Table for Wall Cannon deployment Delays (4 bytes) ---- 10A8: BD B805 LDA $05B8,X 10AB: D0 0A BNE $10B7 10AD: A9 84 LDA #$84 ; A = 84 10AF: 20 0AEC JSR $EC0A 10B2: B0 03 BCS $10B7 10B4: FE B805 INC $05B8,X 10B7: DE 3805 DEC $0538,X 10BA: D0 4B BNE $1107 10BC: A9 01 LDA #$01 ; A = 01 10BE: 4C 778E JMP $8E77 ---- 10C1: DE 3805 DEC $0538,X 10C4: D0 41 BNE $1107 10C6: A9 08 LDA #$08 ; A = 08 (delay between deployment frames) 10C8: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 10CB: BC 6805 LDY $0568,X ; Enemy Animation Frame Code 10CE: B9 EB90 LDA $90EB,Y 10D1: 20 A4EB JSR $EBA4 10D4: B0 31 BCS $1107 10D6: FE 6805 INC $0568,X 10D9: BD 6805 LDA $0568,X 10DC: C9 03 CMP #$03 10DE: 90 27 BCC $1107 10E0: 20 12EB JSR $EB12 10E3: A9 80 LDA #$80 ; A = 80 (initial delay before attacking) 10E5: 9D 5805 STA $0558,X ---- 10E8: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 10EB: 85 88 89 Table for Wall Cannon Opening Tile Mapping Codes (3 bytes) ---- 10EE: DE 5805 DEC $0558,X 10F1: D0 14 BNE $1107 10F3: A9 50 LDA #$50 ; A = 50 (delay between attacks) 10F5: 9D 5805 STA $0558,X 10F8: 20 F5EC JSR $ECF5 10FB: 84 0A STY $0A 10FD: 20 2FEB JSR $EB2F 1100: A9 60 LDA #$60 ; A = 60 1102: A0 04 LDY #$04 ; Y = 04 1104: 4C 9EF2 JMP $F29E ---- 1107: 60 RTS ---- 1108: A9 83 LDA #$83 ; A = 83 110A: 20 0AEC JSR $EC0A 110D: 90 D9 BCC $10E8 110F: 60 RTS ---- 1110: Pointer table for Base Core (A * 2 = 14 bytes) 2491 -> 1124 6791 -> 1167 A091 -> 11A0 CF91 -> 11CF FB91 -> 11FB 37E7 -> 1E737 B0E7 -> 1E7B0 3B92 -> 123B 5192 -> 1251 (Boss appears after or during this routine) AE92 -> 12AE ---- 1124: BD A805 LDA $05A8,X ; Enemy Attributes 1127: 4A LSR 1128: 4A LSR 1129: 29 03 AND #$03 ; keep bits .... ..xx 112B: A8 TAY 112C: 4A LSR 112D: A9 25 LDA #$25 ; A = 25 112F: 90 07 BCC $1138 1131: A9 04 LDA #$04 ; A = 04 1133: 9D 4805 STA $0548,X 1136: A9 22 LDA #$22 ; A = 22 1138: 9D 8805 STA $0588,X 113B: B9 5F91 LDA $915F,Y 113E: 9D 7805 STA $0578,X ; Enemy HP 1141: B9 6391 LDA $9163,Y 1144: 9D C805 STA $05C8,X 1147: A0 00 LDY #$00 ; Y = 00 1149: BD A805 LDA $05A8,X ; Enemy Attributes 114C: 29 04 AND #$04 ; keep bits .... .x.. (Core is plated) 114E: D0 06 BNE $1156 1150: BD A805 LDA $05A8,X ; Enemy Attributes 1153: 29 03 AND #$03 ; keep bits .... ..xx (Core opening delay) 1155: A8 TAY 1156: B9 5B91 LDA $915B,Y 1159: D0 42 BNE $119D ---- 115B: 20 80 B0 F0 Table for Core opening delays (4 bytes) 115F: 08 05 10 05 Table for Base Enemies HP (4 bytes) 08: HP for Normal Core (not plated) 05: HP for first level of Core plating 10: HP for Big Core 05: ??? 1163: 00 03 00 03 Table for ? (4 bytes) ---- 1167: BD A805 LDA $05A8,X ; Enemy Attributes 116A: 29 08 AND #$08 ; keep bits .... x... 116C: D0 19 BNE $1187 116E: BD B805 LDA $05B8,X 1171: D0 14 BNE $1187 1173: BD A805 LDA $05A8,X ; Enemy Attributes 1176: 4A LSR 1177: 4A LSR 1178: 4A LSR 1179: A9 84 LDA #$84 ; A = 84 (Tile Mapping Code for Normal Core) 117B: 90 02 BCC $117F 117D: A9 80 LDA #$80 ; A = 80 (Tile Mapping Code for Plated Core) 117F: 20 0AEC JSR $EC0A 1182: B0 03 BCS $1187 1184: FE B805 INC $05B8,X 1187: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 118A: D0 6E BNE $11FA 118C: BD A805 LDA $05A8,X ; Enemy Attributes 118F: 29 04 AND #$04 ; keep bits .... .x.. 1191: F0 03 BEQ $1196 1193: 20 C691 JSR $91C6 1196: A9 01 LDA #$01 ; A = 01 1198: 9D 5805 STA $0558,X 119B: A9 01 LDA #$01 ; A = 01 119D: 4C 778E JMP $8E77 ---- 11A0: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 11A3: D0 55 BNE $11FA 11A5: BD A805 LDA $05A8,X ; Enemy Attributes 11A8: 29 08 AND #$08 ; keep bits .... x... 11AA: D0 1A BNE $11C6 11AC: A9 08 LDA #$08 ; A = 08 (delay between frames when Core opens) 11AE: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 11B1: BC 6805 LDY $0568,X ; Enemy Animation Frame Code 11B4: B9 CC91 LDA $91CC,Y 11B7: 20 A4EB JSR $EBA4 11BA: B0 3E BCS $11FA 11BC: FE 6805 INC $0568,X ; Enemy Animation Frame Code 11BF: BD 6805 LDA $0568,X 11C2: C9 03 CMP #$03 11C4: 90 34 BCC $11FA 11C6: 20 12EB JSR $EB12 11C9: 4C 8EE7 JMP $E78E ---- 11CC: 85 86 87 Table for Core Opening Tile Mapping Codes (3 bytes) ---- 11CF: A5 88 LDA $88 ; Enemy Cycles Counter 11D1: C9 07 CMP #$07 ; Number of cycles for Core to start shooting 11D3: 90 25 BCC $11FA 11D5: BD C805 LDA $05C8,X ; Bullet Angle 11D8: D0 20 BNE $11FA 11DA: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 11DD: C9 70 CMP #$70 ; Check if Core is not too low 11DF: B0 19 BCS $11FA 11E1: DE 5805 DEC $0558,X ; Delay Between Attacks 11E4: D0 14 BNE $11FA 11E6: A9 28 LDA #$28 ; A = 28 (delay between bullets) 11E8: 9D 5805 STA $0558,X 11EB: 20 F5EC JSR $ECF5 11EE: 84 0A STY $0A 11F0: 20 2FEB JSR $EB2F 11F3: A9 60 LDA #$60 ; A = 60 11F5: A0 05 LDY #$05 ; Y = 05 (Wall Cannon bullet speed code) 11F7: 4C 9EF2 JMP $F29E ---- 11FA: 60 RTS ---- 11FB: BC C805 LDY $05C8,X ; Bullet Angle 11FE: BD A805 LDA $05A8,X ; Enemy Attributes 1201: 29 08 AND #$08 ; keep bits .... x... 1203: F0 05 BEQ $120A 1205: 98 TYA 1206: 18 CLC 1207: 69 04 ADC #$04 1209: A8 TAY 120A: B9 3392 LDA $9233,Y 120D: 20 0AEC JSR $EC0A 1210: B0 E8 BCS $11FA 1212: A0 05 LDY #$05 ; Y = 05 (HP for 2nd and 3rd levels of Plating) 1214: DE C805 DEC $05C8,X 1217: 30 17 BMI $1230 1219: D0 0C BNE $1227 121B: A9 00 LDA #$00 ; A = 00 121D: 9D 4805 STA $0548,X 1220: A9 25 LDA #$25 ; A = 25 1222: 9D 8805 STA $0588,X 1225: A0 08 LDY #$08 ; Y = 08 (HP for Core after Plating destroyed) 1227: 98 TYA 1228: 9D 7805 STA $0578,X ; Enemy HP 122B: A9 04 LDA #$04 ; A = 04 122D: 4C 1AE8 JMP $E81A ---- 1230: 4C 8EE7 JMP $E78E ---- 1233: 83 87 82 81 83 8A 82 81 Tile Mappings for Destroyed Core (8 bytes) ---- Core Destroyed 123B: C6 86 DEC $86 ; Remaining Cores/Bosses to Destroy 123D: D0 78 BNE $12B7 123F: A9 00 LDA #$00 ; A = 00 1241: 9D 0A03 STA $030A,X ; Enemy Sprite Code 1244: 20 E5E9 JSR $E9E5 1247: A9 03 LDA #$03 ; A = 03 1249: 9D D805 STA $05D8,X 124C: A9 04 LDA #$04 ; A = 04 124E: 4C 778E JMP $8E77 ---- 1251: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 1254: D0 40 BNE $1296 1256: BC D805 LDY $05D8,X 1259: B9 A692 LDA $92A6,Y 125C: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 125F: B9 AA92 LDA $92AA,Y 1262: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 1265: B9 A292 LDA $92A2,Y 1268: 20 B5EB JSR $EBB5 126B: B0 1F BCS $128C 126D: BC D805 LDY $05D8,X 1270: 98 TYA 1271: 4A LSR 1272: 4A LSR 1273: A9 FC LDA #$FC ; A = FC 1275: 90 02 BCC $1279 1277: A9 F4 LDA #$F4 ; A = F4 1279: 18 CLC 127A: 79 A692 ADC $92A6,Y 127D: 85 08 STA $08 127F: B9 AA92 LDA $92AA,Y 1282: 85 09 STA $09 1284: 20 ABEA JSR $EAAB 1287: DE D805 DEC $05D8,X 128A: 30 06 BMI $1292 128C: A9 01 LDA #$01 ; A = 01 128E: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 1291: 60 RTS ---- 1292: A9 10 LDA #$10 ; A = 10 1294: D0 B8 BNE $124E 1296: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 1299: C9 01 CMP #$01 129B: D0 F4 BNE $1291 129D: A9 25 LDA #$25 ; A = 25 129F: 4C 6BC1 JMP $C16B ---- Tables related to screen cleared explosions and replacing tiles 12A2: 02 03 01 00 Table for ? (4 bytes) 12A6: 78 78 58 58 Table for ? (4 bytes) 12AA: 70 90 90 70 Table for ? (4 bytes) ---- 12AE: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 12B1: D0 DE BNE $1291 12B3: A9 01 LDA #$01 ; A = 01 12B5: 85 37 STA $37 ; Indoor Screen cleared (1 = cleared) 12B7: 4C 09E8 JMP $E809 ; Remove Enemy ---- 12BA: Pointer table for Running Guy (7 * 2 = E bytes) C892 -> 12C8 D592 -> 12D5 4693 -> 1346 6093 -> 1360 4BE7 -> 1E74B AAE7 -> 1E7AA 06E8 -> 1E806 ---- 12C8: A0 00 LDY #$00 ; Y = 00 12CA: 20 9796 JSR $9697 12CD: A9 08 LDA #$08 ; A = 08 (delay before attacking, Running Guy) 12CF: 9D 5805 STA $0558,X ; Delay Between Attacks 12D2: 4C 8EE7 JMP $E78E ---- 12D5: 20 1693 JSR $9316 12D8: 20 C196 JSR $96C1 12DB: DE 5805 DEC $0558,X ; Delay Between Attacks 12DE: D0 35 BNE $1315 12E0: A9 10 LDA #$10 ; A = 10 (delay between attacks, Running Guy) 12E2: 9D 5805 STA $0558,X ; Delay Between Attacks 12E5: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 12E8: C9 68 CMP #$68 ; Location of disappearance, from left 12EA: 90 29 BCC $1315 12EC: C9 98 CMP #$98 ; Location of disappearance, from right 12EE: B0 25 BCS $1315 12F0: BD A805 LDA $05A8,X ; Enemy Attributes 12F3: 4A LSR 12F4: 29 03 AND #$03 ; keep bits .... ..xx 12F6: A8 TAY 12F7: D0 03 BNE $12FC 12F9: 4C 8497 JMP $9784 ---- 12FC: 88 DEY 12FD: D0 0C BNE $130B 12FF: FE B805 INC $05B8,X 1302: BD B805 LDA $05B8,X 1305: 4A LSR 1306: 90 0D BCC $1315 1308: 4C 4397 JMP $9743 ---- 130B: A0 08 LDY #$08 ; Y = 08 130D: A9 00 LDA #$00 ; A = 00 130F: 20 32EB JSR $EB32 1312: 4C 0097 JMP $9700 *** bridge here for roller/grenade selector *** Rollers, like original : 1700 Grenades : 1746 ---- 1315: 60 RTS ---- 1316: A5 1A LDA $1A ; Permanent Frame Counter 1318: 29 03 AND #$03 ; keep bits .... ..xx 131A: D0 0F BNE $132B 131C: FE 6805 INC $0568,X ; Enemy Animation Frame Code 131F: BD 6805 LDA $0568,X 1322: C9 03 CMP #$03 1324: 90 02 BCC $1328 1326: A9 00 LDA #$00 ; A = 00 1328: 9D 6805 STA $0568,X 132B: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 132E: 18 CLC 132F: 69 93 ADC #$93 1331: 9D 0A03 STA $030A,X ; Enemy Sprite Code 1334: BD 5803 LDA $0358,X ; Enemy Sprite Attributes 1337: BC 0805 LDY $0508,X ; Enemy X Velocity (high byte) 133A: 30 04 BMI $1340 133C: 29 BF AND #$BF ; keep bits x.xx xxxx 133E: 10 02 BPL $1342 1340: 09 40 ORA #$40 ; set bits .x.. .... 1342: 9D 5803 STA $0358,X 1345: 60 RTS ---- 1346: 20 07EB JSR $EB07 1349: A9 96 LDA #$96 ; A = 96 (tile mapping for killed guy, indoor) 134B: 9D 0A03 STA $030A,X 134E: A9 80 LDA #$80 ; A = 80 1350: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 1353: A9 FD LDA #$FD ; A = FD 1355: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 1358: 20 D9E8 JSR $E8D9 ; Set X Velocity to Zero 135B: A9 10 LDA #$10 ; A = 10 135D: 4C 778E JMP $8E77 ---- 1360: 20 37E8 JSR $E837 1363: A9 38 LDA #$38 ; A = 38 (gravity when flying up, indoor) 1365: 20 42EB JSR $EB42 1368: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 136B: D0 D8 BNE $1345 136D: 4C 8EE7 JMP $E78E ---- 1370: Pointer table for Jumping Guy (8 * 2 = 10 bytes) 8093 -> 1380 A593 -> 13A5 4693 -> 1346 6093 -> 1360 3794 -> 1437 4BE7 -> 1E74B AAE7 -> 1E7AA 06E8 -> 1E806 ---- 1380: BD A805 LDA $05A8,X ; Enemy Attributes 1383: 4A LSR 1384: 4A LSR 1385: 90 16 BCC $139D 1387: A5 89 LDA $89 1389: D0 0A BNE $1395 138B: A5 88 LDA $88 ; Enemy Cycles Counter 138D: F0 06 BEQ $1395 138F: A9 01 LDA #$01 ; A = 01 1391: 85 89 STA $89 1393: D0 08 BNE $139D 1395: BD A805 LDA $05A8,X ; Enemy Attributes 1398: 29 FD AND #$FD ; keep bits xxxx xx.x 139A: 9D A805 STA $05A8,X ; Enemy Attributes 139D: A0 02 LDY #$02 ; Y = 02 139F: 20 9796 JSR $9697 13A2: 4C 8EE7 JMP $E78E ---- 13A5: A9 97 LDA #$97 ; A = 97 (tile mapping when jumping) 13A7: BC 3805 LDY $0538,X ; Enemy Animation Frame Delay Counter 13AA: F0 08 BEQ $13B4 13AC: A9 93 LDA #$93 ; A = 93 13AE: C0 04 CPY #$04 13B0: 90 02 BCC $13B4 13B2: A9 98 LDA #$98 ; A = 98 13B4: 9D 0A03 STA $030A,X ; Enemy Sprite Code 13B7: BD A805 LDA $05A8,X ; Enemy Attributes 13BA: 4A LSR 13BB: 4A LSR 13BC: A9 00 LDA #$00 ; A = 00 13BE: 90 02 BCC $13C2 13C0: A9 05 LDA #$05 ; A = 05 00-03 = Green Normal 04 = Blue 05 = Red 06 = Fire 07 = Green with Green Hair 13C2: 85 08 STA $08 13C4: BD 5803 LDA $0358,X ; Enemy Sprite Attributes 13C7: BC 0805 LDY $0508,X ; Enemy X Velocity (high byte) 13CA: 30 04 BMI $13D0 13CC: 29 BF AND #$BF ; keep bits x.xx xxxx 13CE: 10 02 BPL $13D2 13D0: 09 40 ORA #$40 ; set bits .x.. .... 13D2: 29 F8 AND #$F8 ; keep bits xxxx x... 13D4: 05 08 ORA $08 13D6: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 13D9: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 13DC: F0 20 BEQ $13FE 13DE: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 13E1: BD A805 LDA $05A8,X ; Enemy Attributes 13E4: 29 02 AND #$02 ; keep bits .... ..x. 13E6: D0 3A BNE $1422 13E8: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 13EB: C9 08 CMP #$08 13ED: D0 33 BNE $1422 13EF: 20 F5EC JSR $ECF5 13F2: 84 0A STY $0A 13F4: 20 2FEB JSR $EB2F 13F7: A9 60 LDA #$60 ; A = 60 13F9: A0 04 LDY #$04 ; Y = 04 (Jumping Guy bullet speed code) 13FB: 4C 9EF2 JMP $F29E ---- 13FE: 20 C196 JSR $96C1 1401: BC B805 LDY $05B8,X 1404: B9 2394 LDA $9423,Y 1407: 18 CLC 1408: 7D 2403 ADC $0324,X 140B: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 140E: FE B805 INC $05B8,X 1411: BD B805 LDA $05B8,X 1414: C9 14 CMP #$14 1416: 90 0A BCC $1422 1418: A9 00 LDA #$00 ; A = 00 141A: 9D B805 STA $05B8,X 141D: A9 10 LDA #$10 ; A = 10 141F: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter *** bridge here for randomization of delay before shooting and jumping *** 13EB: C9 02 CMP #$02 (instead of 08) 141D: A5 34 LDA $34 ; Randomizer 141F: 20 0010 JSR $1000 ; Jump to delay randomization routine Could be 4C 0010 in that specific case 1000: 29 38 AND #$38 ; keep bits ..xx x... 1002: 09 04 ORA #$04 ; set bits .... .x.. Minimum : .... .x.. 04 Maximum : ..xx xx.. 3C 1004: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 1007: 60 RTS *** 1422: 60 RTS ---- 1423: Table for Jumping Guy Y Velocities when jumping (14 bytes) FD FD FE FE FE FF FF FF 00 00 00 00 01 01 01 02 02 02 03 03 ---- 1437: BD A805 LDA $05A8,X ; Enemy Attributes 143A: 29 02 AND #$02 ; keep bits .... ..x. 143C: F0 19 BEQ $1457 143E: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 1441: C9 64 CMP #$64 1443: 90 12 BCC $1457 1445: C9 9C CMP #$9C 1447: B0 0E BCS $1457 1449: BD A805 LDA $05A8,X ; Enemy Attributes 144C: 30 09 BMI $1457 144E: 5E A805 LSR $05A8,X ; Enemy Attributes 1451: 5E A805 LSR $05A8,X 1454: 4C D482 JMP $82D4 ---- 1457: 4C 8EE7 JMP $E78E ---- 145A: Pointer table for Seeking Guy (7 * 2 = E bytes) 6894 -> 1468 7994 -> 1479 4693 -> 1346 6093 -> 1360 4BE7 -> 1E74B AAE7 -> 1E7AA 2995 -> 1529 ---- 1468: A9 01 LDA #$01 ; A = 01 146A: 85 8A STA $8A 146C: 20 1695 JSR $9516 146F: A0 06 LDY #$06 ; Y = 06 1471: 20 9796 JSR $9697 1474: A9 20 LDA #$20 ; A = 20 1476: 4C 778E JMP $8E77 ---- 1479: BD D805 LDA $05D8,X 147C: F0 49 BEQ $14C7 147E: A9 96 LDA #$96 ; A = 96 1480: 9D 0A03 STA $030A,X 1483: DE 3805 DEC $0538,X 1486: D0 29 BNE $14B1 1488: A9 08 LDA #$08 ; A = 08 148A: 9D 3805 STA $0538,X 148D: A9 00 LDA #$00 ; A = 00 148F: 9D D805 STA $05D8,X 1492: BD 3E03 LDA $033E,X 1495: 20 4EED JSR $ED4E 1498: 85 0A STA $0A 149A: 20 1695 JSR $9516 149D: 20 7C96 JSR $967C 14A0: C5 0A CMP $0A 14A2: A9 00 LDA #$00 ; A = 00 14A4: 90 02 BCC $14A8 14A6: A9 80 LDA #$80 ; A = 80 14A8: 5D 0805 EOR $0508,X ; Enemy X Velocity (high byte) 14AB: 10 03 BPL $14B0 14AD: 20 1EE9 JSR $E91E ; Reverse X Direction 14B0: 60 RTS ---- 14B1: BD B805 LDA $05B8,X 14B4: F0 10 BEQ $14C6 14B6: DE 5805 DEC $0558,X ; Delay Between Attacks 14B9: D0 0B BNE $14C6 14BB: A9 14 LDA #$14 ; A = 14 (delay between grenades, indoor) 14BD: 9D 5805 STA $0558,X 14C0: DE B805 DEC $05B8,X 14C3: 4C 4397 JMP $9743 ---- 14C6: 60 RTS ---- 14C7: 20 1693 JSR $9316 14CA: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 14CD: BC 0805 LDY $0508,X ; Enemy X Velocity (high byte) 14D0: 30 06 BMI $14D8 14D2: C9 A0 CMP #$A0 14D4: B0 0E BCS $14E4 14D6: 90 04 BCC $14DC 14D8: C9 60 CMP #$60 14DA: 90 08 BCC $14E4 14DC: 20 C196 JSR $96C1 14DF: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 14E2: D0 31 BNE $1515 14E4: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 14E7: 20 4EED JSR $ED4E 14EA: 85 0A STA $0A 14EC: BC C805 LDY $05C8,X 14EF: 20 7C96 JSR $967C 14F2: A0 18 LDY #$18 ; Y = 18 (delay for pause between seeks) 14F4: C5 0A CMP $0A 14F6: 08 PHP 14F7: D0 02 BNE $14FB 14F9: A0 38 LDY #$38 ; Y = 38 (delay for resume seek after attack) 14FB: 98 TYA 14FC: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 14FF: FE D805 INC $05D8,X 1502: A9 04 LDA #$04 ; A = 04 (delay before attacking) 1504: 9D 5805 STA $0558,X ; Delay Between Attacks 1507: BD A805 LDA $05A8,X ; Enemy Attributes 150A: 4A LSR 150B: 29 03 AND #$03 ; keep bits .... ..xx 150D: 28 PLP 150E: F0 02 BEQ $1512 1510: A9 00 LDA #$00 ; A = 00 1512: 9D B805 STA $05B8,X 1515: 60 RTS ---- 1516: 20 F5EC JSR $ECF5 1519: B9 9000 LDA $0090,Y 151C: C9 01 CMP #$01 151E: F0 04 BEQ $1524 1520: 98 TYA 1521: 49 01 EOR #$01 ; flip bits .... ...x 1523: A8 TAY 1524: 98 TYA 1525: 9D C805 STA $05C8,X 1528: 60 RTS ---- 1529: 20 06E8 JSR $E806 152C: A9 00 LDA #$00 ; A = 00 152E: 85 8A STA $8A 1530: 60 RTS ---- 1531: Pointer table for Group of 4 (8 * 2 = 10 bytes) 4195 -> 1541 4C95 -> 154C 8295 -> 1582 4693 -> 1346 6093 -> 1360 4BE7 -> 1E74B AAE7 -> 1E7AA 06E8 -> 1E806 ---- 1541: A0 04 LDY #$04 ; Y = 04 1543: 20 9796 JSR $9697 1546: 20 9D95 JSR $959D 1549: 4C 8EE7 JMP $E78E ---- 154C: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 154F: D0 1A BNE $156B 1551: BD C805 LDA $05C8,X 1554: C9 01 CMP #$01 1556: D0 0A BNE $1562 1558: BD B805 LDA $05B8,X 155B: C9 02 CMP #$02 155D: 90 03 BCC $1562 155F: 20 1EE9 JSR $E91E 1562: 20 A795 JSR $95A7 1565: B9 7695 LDA $9576,Y 1568: 4C 778E JMP $8E77 ---- 156B: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 156E: C9 04 CMP #$04 1570: D0 03 BNE $1575 1572: 4C 8497 JMP $9784 ---- 1575: 60 RTS ---- 1576: Table for Group of 4 stop/attack distances (C bytes) 3F 39 33 2D 18 10 10 18 FF FF FF FF 3F 39 33 2D Initial Delays before stop 18 10 10 18 Delays for second attack, each side ---- 1582: 20 1693 JSR $9316 1585: 20 C196 JSR $96C1 1588: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 158B: D0 E8 BNE $1575 158D: A9 96 LDA #$96 ; A = 96 (tile mapping before attack) 158F: 9D 0A03 STA $030A,X 1592: FE C805 INC $05C8,X 1595: 20 9D95 JSR $959D 1598: A9 02 LDA #$02 ; A = 02 159A: 4C 1AE8 JMP $E81A ---- 159D: 20 A795 JSR $95A7 15A0: B9 B695 LDA $95B6,Y 15A3: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 15A6: 60 RTS ---- 15A7: BD C805 LDA $05C8,X 15AA: 0A ASL 15AB: 0A ASL 15AC: 85 08 STA $08 15AE: BD B805 LDA $05B8,X 15B1: 18 CLC 15B2: 65 08 ADC $08 15B4: A8 TAY 15B5: 60 RTS ---- 15B6: Table for Group of 4 Delays (C bytes) 01 07 0D 13 Delays of appearance 18 18 18 18 Delays before attack 1 10 18 18 10 Delays before attack 2 ---- 15C2: Pointer table for Rollers Generator (3 * 2 = 6 bytes) C895 -> 15C8 CD95 -> 15CD 09E8 -> 1E809 Remove Enemy ---- 15C8: A9 60 LDA #$60 ; A = 60 (delay before first set of Rollers) 15CA: 4C 778E JMP $8E77 ---- 15CD: A5 88 LDA $88 ; Enemy Cycles Counter 15CF: C9 07 CMP #$07 ; Number of cycles for Rollers to stop 15D1: 90 03 BCC $15D6 15D3: 4C 09E8 JMP $E809 ; Remove Enemy ---- 15D6: A5 1A LDA $1A ; Permanent Frame Counter 15D8: 4A LSR 15D9: 90 4D BCC $1628 15DB: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 15DE: D0 48 BNE $1628 15E0: BD A805 LDA $05A8,X ; Enemy Attributes 15E3: 29 07 AND #$07 15E5: 0A ASL 15E6: A8 TAY 15E7: B9 3096 LDA $9630,Y ; Rollers Pattern - Low Byte 15EA: 85 10 STA $10 15EC: B9 3196 LDA $9631,Y ; Rollers Pattern - High Byte 15EF: 85 11 STA $11 15F1: BC B805 LDY $05B8,X 15F4: B1 10 LDA ($10),Y 15F6: C9 FF CMP #$FF 15F8: D0 04 BNE $15FE 15FA: A0 00 LDY #$00 ; Y = 00 15FC: F0 F6 BEQ $15F4 15FE: 85 0B STA $0B 1600: 29 0F AND #$0F ; keep bits .... xxxx 1602: 85 0A STA $0A 1604: C8 INY 1605: B1 10 LDA ($10),Y 1607: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 160A: C8 INY 160B: 98 TYA 160C: 9D B805 STA $05B8,X 160F: A5 0B LDA $0B 1611: 4A LSR 1612: 4A LSR 1613: 4A LSR 1614: 4A LSR 1615: A8 TAY 1616: B9 2996 LDA $9629,Y 1619: 85 09 STA $09 161B: A9 70 LDA #$70 ; A = 70 (Rollers starting Y Position) 161D: 85 08 STA $08 161F: 98 TYA 1620: 20 0397 JSR $9703 1623: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 1626: F0 C9 BEQ $15F1 1628: 60 RTS ---- 1629: 98 90 88 80 78 70 68 Rollers starting X Positions (7 bytes) ---- 1630: 34 96 6D 96 Pointer table for Rollers pattern (2 * 2 = 4 bytes) 3496 -> 1634 6D96 -> 166D ---- 1634: Table for Rollers Type A (39 bytes) 00 00 10 00 20 00 30 00 40 00 50 00 60 F0 01 00 11 00 21 00 31 00 41 00 51 00 61 F0 30 10 20 00 40 10 10 00 50 10 00 00 60 F0 00 00 60 10 10 00 50 10 20 00 40 10 30 F0 FF Byte 0 : Position for Roller 0 Byte 1 : Delay before Roller 0 Byte 2 : Position for Roller 1 Byte 3 : Delay before Roller 1 ... 7 times (D bytes) ... Byte D : Delay before next set of Rollers FF : End of Sets, go from the start ---- 166D: Table for Rollers Type B (F bytes) 00 00 20 00 40 00 60 F0 10 00 30 00 50 F0 FF ---- 167C: B9 3403 LDA $0334,Y 167F: A0 06 LDY #$06 ; Y = 06 1681: D9 9096 CMP $9690,Y 1684: 90 08 BCC $168E 1686: 88 DEY 1687: 30 02 BMI $168B 1689: B0 F6 BCS $1681 168B: A9 00 LDA #$00 ; A = 00 168D: 60 RTS ---- 168E: 98 TYA 168F: 60 RTS ---- 1690: FF BC A4 8C 74 5C 44 Table for ? (7 bytes) ---- 1697: B9 B996 LDA $96B9,Y 169A: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 169D: B9 BA96 LDA $96BA,Y 16A0: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 16A3: BD A805 LDA $05A8,X ; Enemy Attributes 16A6: 4A LSR 16A7: A9 A8 LDA #$A8 ; A = A8 16A9: 90 05 BCC $16B0 16AB: 20 1EE9 JSR $E91E 16AE: A9 58 LDA #$58 ; A = 58 (location of appearance, from left) 16B0: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 16B3: A9 6D LDA #$6D ; A = 6D (Y Position of Guys) 16B5: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 16B8: 60 RTS ---- 16B9: 20 FF 40 FF 40 FF 40 FF Table for Guys X Velocities (8 bytes) 20 FF : Running 40 FF : Jumping 40 FF : Group of 4 40 FF : Seeking ---- 16C1: BD D804 LDA $04D8,X 16C4: 18 CLC 16C5: 7D 1805 ADC $0518,X ; Enemy X Velocity (low byte) 16C8: 9D D804 STA $04D8,X 16CB: BD 3E03 LDA $033E,X 16CE: 7D 0805 ADC $0508,X ; Enemy X Velocity (high byte) 16D1: 9D 3E03 STA $033E,X 16D4: BC 0805 LDY $0508,X ; Enemy X Velocity (high byte) 16D7: 30 06 BMI $16DF 16D9: C9 B0 CMP #$B0 ; Guys right limit (disappearance) 16DB: B0 06 BCS $16E3 16DD: 90 07 BCC $16E6 16DF: C9 50 CMP #$50 ; Guys left limit (disappearance) 16E1: B0 03 BCS $16E6 16E3: 4C 09E8 JMP $E809 ; Remove Enemy ---- 16E6: BC 5803 LDY $0358,X ; Enemy Sprite Attributes 16E9: C9 A0 CMP #$A0 16EB: B0 04 BCS $16F1 16ED: C9 60 CMP #$60 16EF: B0 05 BCS $16F6 16F1: 98 TYA 16F2: 09 20 ORA #$20 ; set bits ..x. .... (drawn behind bg) 16F4: D0 03 BNE $16F9 16F6: 98 TYA 16F7: 29 DF AND #$DF ; keep bits xx.x xxxx (drawn in front of bg) 16F9: 9D 5803 STA $0358,X 16FC: 60 RTS ---- 16FD: 20 2FEB JSR $EB2F ; set position on screen to 0,0 1700: 20 4CED JSR $ED4C 1703: 85 0F STA $0F 1705: A5 8E LDA $8E ; Enemy Attack Switch 1707: F0 29 BEQ $1732 1709: 20 CEED JSR $EDCE 170C: D0 24 BNE $1732 170E: A9 11 LDA #$11 ; A = 11 (enemy type code for rollers) 11 -> 12 : all rollers are grenades! 11 -> 13 : all rollers are wall cannons! 11 -> 14 : all rollers are cores! Etc... 1710: 20 D497 JSR $97D4 1713: A5 0A LDA $0A 1715: 9D A805 STA $05A8,X ; Enemy Attributes 1718: A5 0F LDA $0F 171A: 0A ASL 171B: A8 TAY 171C: B9 3597 LDA $9735,Y 171F: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 1722: B9 3697 LDA $9736,Y 1725: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 1728: A9 80 LDA #$80 ; A = 80 (Y Velocity for Rollers, low byte) 172A: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 172D: A9 00 LDA #$00 ; A = 00 (Y Velocity for Rollers, high byte) 172F: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 1732: A6 83 LDX $83 1734: 60 RTS ---- 1735: Table for Rollers X Velocities (E bytes) 55 00 38 00 1C 00 00 00 E4 FF C8 FF AB FF ---- 1743: 20 2FEB JSR $EB2F 1746: 20 4CED JSR $ED4C 1749: 85 0F STA $0F 174B: A5 8E LDA $8E ; Enemy Attack Switch 174D: F0 24 BEQ $1773 174F: 20 CEED JSR $EDCE 1752: D0 1F BNE $1773 1754: A9 12 LDA #$12 ; A = 12 (code for grenade??) 1756: 20 D497 JSR $97D4 1759: A5 0F LDA $0F 175B: 0A ASL 175C: A8 TAY 175D: B9 7697 LDA $9776,Y 1760: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 1763: B9 7797 LDA $9777,Y 1766: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 1769: A9 80 LDA #$80 ; A = 80 176B: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 176E: A9 00 LDA #$00 ; A = 00 1770: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 1773: A6 83 LDX $83 1775: 60 RTS ---- 1776: 55 00 38 00 1C 00 00 00 E4 FF C8 FF AB FF Table for ? (E bytes) ---- 1784: 20 2FEB JSR $EB2F 1787: A5 09 LDA $09 1789: C9 A0 CMP #$A0 178B: B0 36 BCS $17C3 178D: C9 60 CMP #$60 178F: 90 32 BCC $17C3 1791: A5 8E LDA $8E ; Enemy Attack Switch 1793: F0 2E BEQ $17C3 1795: 20 4CED JSR $ED4C 1798: 85 0F STA $0F 179A: 20 CEED JSR $EDCE 179D: D0 24 BNE $17C3 179F: A9 01 LDA #$01 ; A = 01 17A1: 20 D497 JSR $97D4 17A4: A9 03 LDA #$03 ; A = 03 17A6: 9D B805 STA $05B8,X 17A9: A5 0F LDA $0F 17AB: 0A ASL 17AC: A8 TAY 17AD: B9 C697 LDA $97C6,Y 17B0: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 17B3: B9 C797 LDA $97C7,Y 17B6: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 17B9: A9 40 LDA #$40 ; A = 40 (Y Velocity of bullets, running) 17BB: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 17BE: A9 01 LDA #$01 ; A = 01 (Y Velocity of bullets, running) 17C0: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 17C3: A6 83 LDX $83 17C5: 60 RTS ---- 17C6: D4 00 8D 00 46 00 00 00 BA FF 73 FF 2C FF Table for ? (E bytes) ---- 17D4: 9D 2805 STA $0528,X ; Enemy Type 17D7: 20 47EE JSR $EE47 17DA: A5 08 LDA $08 17DC: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 17DF: A5 09 LDA $09 17E1: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 17E4: 60 RTS ---- 17E5: Pointer table for Rock Platform Code (2 * 2 = 4 bytes) E997 -> 17E9 1C98 -> 181C ---- 17E9: BD A805 LDA $05A8,X ; Enemy Attributes 17EC: 0A ASL 17ED: A8 TAY 17EE: B9 0C98 LDA $980C,Y 17F1: 9D 1805 STA $0518,X 17F4: B9 0D98 LDA $980D,Y 17F7: 9D 0805 STA $0508,X 17FA: B9 1498 LDA $9814,Y 17FD: 9D C805 STA $05C8,X 1800: B9 1598 LDA $9815,Y 1803: 9D B805 STA $05B8,X 1806: 20 A7E8 JSR $E8A7 1809: 4C 8EE7 JMP $E78E ---- 180C: Table for Rock Platform and Moving Flame Velocities (8 bytes) 80 FF : Slow (00) Rock Platform X Velocity C0 00 : Fast (01) Rock Platform X Velocity 80 FF : Flame Going Left X Velocity 80 00 : Flame Going Right X Velocity 1814: Table for Rock Platform and Moving Flame Boundaries (8 bytes) 50 B0 : Slow (00) Rock Platform Boundaries 70 C0 : Fast (01) Rock Platform Boundaries 48 B8 : Flame Going Left Boundaries 48 B8 : Flame Going Right Boundaries ---- 181C: A9 48 LDA #$48 ; A = 48 (tile mapping for Rock Platform) 181E: 9D 0A03 STA $030A,X ; Enemy Sprite Code 1821: 20 37E8 JSR $E837 ; Apply Velocities and Scrolling Adjust 1824: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 1827: BC 0805 LDY $0508,X ; Enemy X Velocity (high byte) 182A: 30 07 BMI $1833 182C: DD B805 CMP $05B8,X 182F: 90 0A BCC $183B 1831: B0 05 BCS $1838 1833: DD C805 CMP $05C8,X 1836: B0 03 BCS $183B 1838: 4C 1EE9 JMP $E91E ; Reverse X Direction ---- 183B: 60 RTS ---- 183C: Pointer table for Moving Flame (2 * 2 = 4 bytes) E997 -> 17E9 4098 -> 1840 ---- 1840: A9 49 LDA #$49 ; A = 49 (tile mapping for Moving Flame) 1842: 9D 0A03 STA $030A,X ; Enemy Sprite Code 1845: A5 1A LDA $1A 1847: 4A LSR 1848: 4A LSR 1849: 4A LSR 184A: 4A LSR 184B: A9 00 LDA #$00 ; A = 00 184D: 90 02 BCC $1851 184F: A9 40 LDA #$40 ; A = 40 1851: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 1854: 4C 2198 JMP $9821 ---- 1857: Pointer table for Falling Rock Generator (3 * 2 = 6 bytes) 5D98 -> 185D 6398 -> 1863 6B98 -> 186B ---- 185D: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 1860: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 1863: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 1866: A9 08 LDA #$08 ; A = 08 (delay before first Falling Rock) 1868: 4C 3B99 JMP $993B ---- 186B: 20 37E8 JSR $E837 ; Apply Velocities and Scrolling Adjust 186E: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 1871: D0 5A BNE $18CD 1873: A9 E0 LDA #$E0 ; A = E0 (delay before next Falling Rock) 1875: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 1878: A9 13 LDA #$13 ; A = 13 187A: 4C 52EB JMP $EB52 ; Generate Enemy ---- 187D: Pointer table for Falling Rock (6 * 2 = C bytes) 8998 -> 1889 8E98 -> 188E CE98 -> 18CE 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- 1889: A9 40 LDA #$40 ; A = 40 (delay before Rock starts falling) 188B: 4C 3B99 JMP $993B ---- 188E: 20 C898 JSR $98C8 1891: 20 37E8 JSR $E837 ; Apply Velocities and Scrolling Adjust 1894: A5 1A LDA $1A ; Permanent Frame Counter 1896: 29 03 AND #$03 ; keep bits .... ..xx 1898: D0 0F BNE $18A9 189A: A5 1A LDA $1A ; Permanent Frame Counter 189C: 4A LSR 189D: 4A LSR 189E: 4A LSR 189F: 90 05 BCC $18A6 18A1: FE 3E03 INC $033E,X ; Enemy X Position On Screen 18A4: B0 03 BCS $18A9 18A6: DE 3E03 DEC $033E,X ; Enemy X Position On Screen 18A9: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 18AC: D0 1F BNE $18CD 18AE: 20 16EB JSR $EB16 18B1: A9 01 LDA #$01 ; A = 01 18B3: 4C 3B99 JMP $993B ---- 18B6: A5 1A LDA $1A ; Permanent Frame Counter 18B8: 4A LSR 18B9: 4A LSR 18BA: 29 03 AND #$03 ; keep bits .... ..xx 18BC: A8 TAY 18BD: BD 5803 LDA $0358,X ; Enemy Sprite Attributes 18C0: 29 3F AND #$3F ; keep bits ..xx xxxx 18C2: 19 1499 ORA $9914,Y 18C5: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 18C8: A9 4A LDA #$4A ; A = 4A 18CA: 9D 0A03 STA $030A,X ; Enemy Sprite Code 18CD: 60 RTS ---- 18CE: 20 B698 JSR $98B6 18D1: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 18D4: DD B805 CMP $05B8,X 18D7: 90 28 BCC $1901 18D9: A0 08 LDY #$08 ; Y = 08 18DB: 20 33EC JSR $EC33 18DE: 90 21 BCC $1901 18E0: A9 05 LDA #$05 ; A = 05 (sound of Rock hitting ground) 18E2: 20 6BC1 JSR $C16B 18E5: A9 40 LDA #$40 ; A = 40 18E7: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 18EA: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 18ED: 18 CLC 18EE: 69 10 ADC #$10 18F0: 90 02 BCC $18F4 18F2: A9 FF LDA #$FF ; A = FF 18F4: 9D B805 STA $05B8,X 18F7: A9 C0 LDA #$C0 ; A = C0 (Y Velocity for Rock Bouncing, low) 18F9: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 18FC: A9 FE LDA #$FE ; A = FE (Y Velocity for Rock Bouncing, high) 18FE: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 1901: 20 40EB JSR $EB40 ; Add 10 to Y Velocity 1904: BD B805 LDA $05B8,X 1907: 18 CLC 1908: 65 68 ADC $68 190A: 90 02 BCC $190E 190C: A9 FF LDA #$FF ; A = FF 190E: 9D B805 STA $05B8,X 1911: 4C 37E8 JMP $E837 ---- 1914: 00 40 C0 80 Table for Falling Rock Mirroring Codes (4 bytes) ---- 1918: Pointer table for Level 3 Boss Mouth (9 * 2 = 12 bytes) 2A99 -> 192A 4199 -> 1941 5499 -> 1954 A299 -> 19A2 EF99 -> 19EF 40E7 -> 1E740 B0E7 -> 1E7B0 14E8 -> 1E814 149A -> 1A14 ---- 192A: A9 20 LDA #$20 ; A = 20 192C: 9D B805 STA $05B8,X ; Level 3 Boss Mouth HP 192F: A9 02 LDA #$02 ; A = 02 1931: 9D D805 STA $05D8,X 1934: A9 01 LDA #$01 ; A = 01 1936: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 1939: A9 FF LDA #$FF ; A = FF (delay before first attack) 193B: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 193E: 4C 8EE7 JMP $E78E ---- 193B: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 193E: 4C 8EE7 JMP $E78E ---- 1941: 20 A7E8 JSR $E8A7 1944: A5 84 LDA $84 1946: F0 1B BEQ $1963 1948: A5 74 LDA $74 194A: D0 17 BNE $1963 194C: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 194F: D0 12 BNE $1963 1951: 4C 8EE7 JMP $E78E ---- 1954: 20 7699 JSR $9976 1957: B0 0A BCS $1963 1959: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 195C: C9 02 CMP #$02 195E: B0 04 BCS $1964 1960: FE 6805 INC $0568,X 1963: 60 RTS ---- 1964: 20 12EB JSR $EB12 1967: BD B805 LDA $05B8,X 196A: 9D 7805 STA $0578,X ; Enemy HP 196D: A9 06 LDA #$06 ; A = 06 196F: 9D 5805 STA $0558,X ; delay between mouth open and attack 1972: A9 70 LDA #$70 ; A = 70 (time during which Mouth is open) 1974: D0 C5 BNE $193B 1976: 20 A7E8 JSR $E8A7 1979: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 197C: D0 1C BNE $199A 197E: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 1981: 0A ASL 1982: A8 TAY 1983: B9 9C99 LDA $999C,Y 1986: 85 10 STA $10 1988: B9 9D99 LDA $999D,Y 198B: A0 01 LDY #$01 ; Y = 01 198D: 20 CEEB JSR $EBCE 1990: A9 06 LDA #$06 ; A = 06 1992: 90 02 BCC $1996 ; (delay between frames when Mouth open/close) 1994: A9 01 LDA #$01 ; A = 01 1996: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 1999: 60 RTS ---- 199A: 38 SEC 199B: 60 RTS ---- 199C: A0 A1 A2 A3 A4 A5 Table for ? (6 bytes) Related to Closed/Closing Mouth Tile Mappings ---- 19A2: 20 A7E8 JSR $E8A7 19A5: BD 5805 LDA $0558,X ; Delay Between Attacks 19A8: F0 2A BEQ $19D4 19AA: DE 5805 DEC $0558,X ; Delay Between Attacks 19AD: D0 25 BNE $19D4 19AF: A9 02 LDA #$02 ; A = 02 19B1: 85 16 STA $16 ; Number of Projectiles *** Bridge to change the number of projectiles *** 19AF: 20 70BD JSR $BD70 19B2: EA NOP -- 3D70: A5 34 LDA $34 ; Randomizer 3D72: 29 03 AND #$03 ; keep bits .... ..xx 3D74: 18 CLC 3D75: 69 01 ADC #$02 3D77: 85 16 STA $16 ; Number of Projectiles (2-5) 3D79: 60 RTS *** 19B3: A0 08 LDY #$08 ; Y = 08 19B5: A9 00 LDA #$00 ; A = 00 19B7: 20 32EB JSR $EB32 ; Add A/Y to X/Y Position on Screen 19BA: A0 06 LDY #$06 ; Y = 06 19BC: A5 85 LDA $85 19BE: C9 02 CMP #$02 19C0: 90 02 BCC $19C4 19C2: A0 07 LDY #$07 ; Y = 07 (bullet speed) 19C4: 84 0F STY $0F 19C6: A4 16 LDY $16 19C8: B9 EC99 LDA $99EC,Y ; Mouth Projectile Type and Angle *** Bridge to change the projectile type *** 19C8: 20 90BD JSR $BD90 -- 3D90: A5 34 LDA $34 ; Randomizer 3D92: 65 16 ADC $16 3D94: A8 TAY 3D95: B9 00B0 LDA $B000,Y 3D98: 29 0F AND #$0F ; keep bits .... xxxx 3D9A: A8 TAY 3D9B: B9 B0BD LDA $BDB0,Y 3D9E: 60 RTS -- 3DB0: Table for Projectile Types (10 bytes) 83 84 85 86 86 87 88 89 (8 bytes) 22 24 26 28 2A 30 32 34 (8 bytes) 20 2C 2E 36 38 22 24 26 28 2A 30 32 34 *** 19CB: A4 0F LDY $0F 19CD: 20 BFF2 JSR $F2BF 19D0: C6 16 DEC $16 19D2: 10 DF BPL $19B3 19D4: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 19D7: D0 8A BNE $1963 19D9: 20 03EB JSR $EB03 19DC: BD 7805 LDA $0578,X ; Enemy HP 19DF: 9D B805 STA $05B8,X ; Store Enemy HP here while it's closed 19E2: A9 F1 LDA #$F1 ; A = F1 (F1 = Hittable, No Damage) 19E4: 9D 7805 STA $0578,X ; Enemy HP 19E7: A9 06 LDA #$06 ; A = 06 19E9: 4C 3B99 JMP $993B ---- 19EC: 88 86 84 Table for Mouth Projectiles Types and Angles (3 bytes) From 3h, clockwise 00-17: White Bullets 20-37: Bomb Drop (like Level 1 Boss Bomb Turret) 40-57: Red Bullets (like Base Triple Cannon) 60-77: White Bullets with limited range 80-97: Orange Fireballs (default) ---- 19EF: 20 7699 JSR $9976 19F2: B0 08 BCS $19FC 19F4: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 19F7: F0 04 BEQ $19FD 19F9: DE 6805 DEC $0568,X 19FC: 60 RTS ---- 19FD: A5 85 LDA $85 19FF: C9 02 CMP #$02 1A01: 90 02 BCC $1A05 1A03: A9 02 LDA #$02 ; A = 02 1A05: A8 TAY 1A06: B9 119A LDA $9A11,Y 1A09: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 1A0C: A9 03 LDA #$03 ; A = 03 1A0E: 4C 1AE8 JMP $E81A ---- 1A11: C0 70 20 Table for Mouth delays between attacks (3 bytes) C0: Delay with 2 arms 70: Delay with 1 arm 20: Delay without arms ---- 1A14: DE D805 DEC $05D8,X 1A17: D0 14 BNE $1A2D 1A19: A9 01 LDA #$01 ; A = 01 1A1B: 9D D805 STA $05D8,X 1A1E: 20 339A JSR $9A33 1A21: B0 0A BCS $1A2D 1A23: FE C805 INC $05C8,X 1A26: BD C805 LDA $05C8,X 1A29: C9 0E CMP #$0E 1A2B: B0 01 BCS $1A2E 1A2D: 60 RTS ---- 1A2E: A9 60 LDA #$60 ; A = 60 1A30: 4C F6EA JMP $EAF6 ---- 1A33: BC C805 LDY $05C8,X 1A36: B9 629A LDA $9A62,Y 1A39: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 1A3C: B9 709A LDA $9A70,Y 1A3F: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 1A42: B9 7E9A LDA $9A7E,Y 1A45: 20 B5EB JSR $EBB5 1A48: B0 12 BCS $1A5C 1A4A: BC C805 LDY $05C8,X 1A4D: B9 629A LDA $9A62,Y 1A50: 85 08 STA $08 1A52: B9 709A LDA $9A70,Y 1A55: 85 09 STA $09 1A57: 20 B3EA JSR $EAB3 ; Create Explosion Type 89 1A5A: 18 CLC 1A5B: 60 RTS ---- 1A5C: A9 01 LDA #$01 ; A = 01 1A5E: 9D D805 STA $05D8,X 1A61: 60 RTS ---- Tables for Explosions and replacing tiles X/Y and codes (after Level 3 Boss) 1A62: 20 20 20 20 40 40 60 60 80 80 A0 A0 C0 C0 Y Positions (E bytes) 1A70: 50 B0 70 90 70 90 70 90 70 90 70 90 70 90 X Positions (E bytes) 1A7E: 19 19 19 19 1A 1B 29 2A 1C 1D 1E 1F 26 27 Tile Codes (E bytes) ---- 1A8C: Pointer table for Boss Arm (8 * 2 = 10 bytes) 9C9A -> 1A9C C59A -> 1AC5 639B -> 1B63 039C -> 1C03 DD9E -> 1EDD 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- 1A9C: BD A805 LDA $05A8,X ; Enemy Attributes 1A9F: 4A LSR 1AA0: A9 38 LDA #$38 ; A = 38 1AA2: A0 08 LDY #$08 ; Y = 08 1AA4: 90 04 BCC $1AAA 1AA6: A9 28 LDA #$28 ; A = 28 1AA8: A0 F8 LDY #$F8 ; Y = F8 1AAA: 9D B805 STA $05B8,X 1AAD: 9D 4805 STA $0548,X 1AB0: 98 TYA 1AB1: 20 27EB JSR $EB27 1AB4: A9 FF LDA #$FF ; A = FF 1AB6: 9D E805 STA $05E8,X 1AB9: A9 04 LDA #$04 ; A = 04 1ABB: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 1ABE: 8A TXA 1ABF: 9D C805 STA $05C8,X 1AC2: 4C 8EE7 JMP $E78E ---- 1AC5: 20 A7E8 JSR $E8A7 1AC8: A5 84 LDA $84 1ACA: F0 09 BEQ $1AD5 1ACC: A5 74 LDA $74 1ACE: D0 05 BNE $1AD5 1AD0: BD E805 LDA $05E8,X 1AD3: 30 01 BMI $1AD6 1AD5: 60 RTS ---- 1AD6: 20 CEED JSR $EDCE ; Find Next Available Enemy Slot 1AD9: D0 46 BNE $1B21 1ADB: A9 15 LDA #$15 ; A = 15 1ADD: 9D 2805 STA $0528,X ; Enemy Type 1AE0: 20 47EE JSR $EE47 1AE3: 20 249B JSR $9B24 1AE6: 86 10 STX $10 1AE8: A6 83 LDX $83 1AEA: DE 6805 DEC $0568,X ; Enemy Animation Frame Code 1AED: D0 32 BNE $1B21 1AEF: A4 10 LDY $10 1AF1: A9 FF LDA #$FF ; A = FF 1AF3: 99 D805 STA $05D8,Y 1AF6: A9 10 LDA #$10 ; A = 10 1AF8: 99 7805 STA $0578,Y ; Enemy HP 1AFB: A9 0C LDA #$0C ; A = 0C 1AFD: 99 9805 STA $0598,Y 1B00: A9 01 LDA #$01 ; A = 01 1B02: 99 C805 STA $05C8,Y 1B05: A9 20 LDA #$20 ; A = 20 (delay before arms appear) 1B07: 99 3805 STA $0538,Y ; Enemy Animation Frame Delay Counter 1B0A: 98 TYA 1B0B: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 1B0E: 20 8EE7 JSR $E78E 1B11: BD D805 LDA $05D8,X 1B14: AA TAX 1B15: 10 F7 BPL $1B0E 1B17: A6 83 LDX $83 1B19: A9 00 LDA #$00 ; A = 00 1B1B: 9D C805 STA $05C8,X 1B1E: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 1B21: A6 83 LDX $83 1B23: 60 RTS ---- 1B24: A9 02 LDA #$02 ; A = 02 1B26: 9D B804 STA $04B8,X ; Enemy Slots 1B29: A9 8C LDA #$8C ; A = 8C 1B2B: 9D 9805 STA $0598,X 1B2E: A9 52 LDA #$52 ; A = 52 (last nibble determines size) 1B30: 9D 8805 STA $0588,X 1B33: A9 F1 LDA #$F1 ; A = F1 1B35: 9D 7805 STA $0578,X ; Enemy HP 1B38: A9 00 LDA #$00 ; A = 00 1B3A: 9D B805 STA $05B8,X 1B3D: A4 83 LDY $83 1B3F: B9 A805 LDA $05A8,Y ; Enemy Attributes 1B42: 9D A805 STA $05A8,X 1B45: B9 2403 LDA $0324,Y ; Enemy Y Position On Screen 1B48: 9D 2403 STA $0324,X 1B4B: B9 3E03 LDA $033E,Y ; Enemy X Position On Screen 1B4E: 9D 3E03 STA $033E,X 1B51: B9 C805 LDA $05C8,Y 1B54: 9D E805 STA $05E8,X 1B57: 85 08 STA $08 1B59: 8A TXA 1B5A: 99 C805 STA $05C8,Y 1B5D: A4 08 LDY $08 1B5F: 99 D805 STA $05D8,Y 1B62: 60 RTS ---- 1B63: 20 A7E8 JSR $E8A7 1B66: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 1B69: F0 09 BEQ $1B74 1B6B: A5 1A LDA $1A 1B6D: 4A LSR 1B6E: 90 03 BCC $1B73 1B70: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 1B73: 60 RTS ---- 1B74: BD C805 LDA $05C8,X 1B77: F0 45 BEQ $1BBE 1B79: 20 F69B JSR $9BF6 1B7C: 20 BF9B JSR $9BBF 1B7F: BD C805 LDA $05C8,X 1B82: 30 3A BMI $1BBE 1B84: FE C805 INC $05C8,X 1B87: BD C805 LDA $05C8,X 1B8A: C9 10 CMP #$10 1B8C: 90 30 BCC $1BBE 1B8E: A9 FF LDA #$FF ; A = FF 1B90: 9D C805 STA $05C8,X 1B93: BC E805 LDY $05E8,X 1B96: A9 01 LDA #$01 ; A = 01 1B98: 99 C805 STA $05C8,Y 1B9B: A9 00 LDA #$00 ; A = 00 1B9D: 99 3805 STA $0538,Y 1BA0: B9 E805 LDA $05E8,Y 1BA3: 10 17 BPL $1BBC 1BA5: 98 TYA 1BA6: AA TAX 1BA7: 20 8EE7 JSR $E78E 1BAA: A9 00 LDA #$00 ; A = 00 1BAC: 9D C805 STA $05C8,X 1BAF: BD D805 LDA $05D8,X 1BB2: AA TAX 1BB3: 10 F2 BPL $1BA7 1BB5: A6 83 LDX $83 1BB7: A9 00 LDA #$00 ; A = 00 1BB9: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 1BBC: A6 83 LDX $83 1BBE: 60 RTS ---- 1BBF: BD A805 LDA $05A8,X ; Enemy Attributes 1BC2: 29 01 AND #$01 ; keep bits .... ...x 1BC4: 0A ASL 1BC5: 0A ASL 1BC6: A8 TAY 1BC7: B9 EE9B LDA $9BEE,Y 1BCA: 18 CLC 1BCB: 7D C804 ADC $04C8,X 1BCE: 9D C804 STA $04C8,X 1BD1: B9 EF9B LDA $9BEF,Y 1BD4: 7D 2403 ADC $0324,X 1BD7: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 1BDA: B9 F09B LDA $9BF0,Y 1BDD: 18 CLC 1BDE: 7D D804 ADC $04D8,X 1BE1: 9D D804 STA $04D8,X 1BE4: B9 F19B LDA $9BF1,Y 1BE7: 7D 3E03 ADC $033E,X 1BEA: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 1BED: 60 RTS ---- 1BEE: Table for ? (8 bytes) 4B FF B5 00 4B FF 4B FF ---- 1BF6: A9 7A LDA #$7A ; A = 7A 1BF8: BC D805 LDY $05D8,X 1BFB: 10 02 BPL $1BFF 1BFD: A9 7B LDA #$7B ; A = 7B 1BFF: 9D 0A03 STA $030A,X ; Enemy Sprite Code 1C02: 60 RTS ---- 1C03: 20 F69B JSR $9BF6 1C06: BD E805 LDA $05E8,X 1C09: 30 01 BMI $1C0C 1C0B: 60 RTS ---- 1C0C: 20 1E9C JSR $9C1E 1C0F: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 1C12: C9 04 CMP #$04 1C14: F0 03 BEQ $1C19 1C16: 20 8A9D JSR $9D8A 1C19: 4C 4E9E JMP $9E4E ---- 1C1C: 30 D0 Table for ? (2 bytes) ---- 1C1E: BC 6805 LDY $0568,X ; Enemy Animation Frame Code 1C21: D0 4E BNE $1C71 1C23: 20 E89C JSR $9CE8 1C26: BD A805 LDA $05A8,X ; Enemy Attributes 1C29: 29 01 AND #$01 ; keep bits .... ...x 1C2B: A8 TAY 1C2C: BD F804 LDA $04F8,X ; Enemy Y Velocity (low byte) 1C2F: D0 0F BNE $1C40 1C31: BD B805 LDA $05B8,X 1C34: D9 6A9C CMP $9C6A,Y 1C37: F0 23 BEQ $1C5C 1C39: B9 6E9C LDA $9C6E,Y 1C3C: 9D C805 STA $05C8,X 1C3F: 60 RTS ---- 1C40: BD B805 LDA $05B8,X 1C43: D9 6C9C CMP $9C6C,Y 1C46: F0 07 BEQ $1C4F 1C48: B9 6F9C LDA $9C6F,Y 1C4B: 9D C805 STA $05C8,X 1C4E: 60 RTS ---- 1C4F: FE 5805 INC $0558,X 1C52: BD 5805 LDA $0558,X ; Delay Between Attacks 1C55: C9 03 CMP #$03 1C57: D0 03 BNE $1C5C 1C59: FE 6805 INC $0568,X ; Enemy Animation Frame Code 1C5C: A9 03 LDA #$03 ; A = 03 1C5E: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 1C61: BD F804 LDA $04F8,X ; Enemy Y Velocity (low byte) 1C64: 49 01 EOR #$01 ; flip bits .... ...x 1C66: 9D F804 STA $04F8,X 1C69: 60 RTS ---- 1C6A: Table for ? (8 bytes) 14 0C 2C 34 40 C0 40 88 ---- 1C72: D0 0C BNE $1C80 1C74: 20 E89C JSR $9CE8 1C77: BD E804 LDA $04E8,X 1C7A: D0 03 BNE $1C7F 1C7C: FE 6805 INC $0568,X 1C7F: 60 RTS ---- 1C80: 88 DEY 1C81: D0 3D BNE $1CC0 1C83: 20 E89C JSR $9CE8 1C86: BD A805 LDA $05A8,X ; Enemy Attributes 1C89: 29 01 AND #$01 ; keep bits .... ...x 1C8B: 85 08 STA $08 1C8D: BD D805 LDA $05D8,X 1C90: AA TAX 1C91: A4 08 LDY $08 1C93: BD B805 LDA $05B8,X 1C96: D9 BA9C CMP $9CBA,Y 1C99: F0 09 BEQ $1CA4 1C9B: B9 6E9C LDA $9C6E,Y 1C9E: 9D C805 STA $05C8,X 1CA1: A6 83 LDX $83 1CA3: 60 RTS ---- 1CA4: BD D805 LDA $05D8,X 1CA7: 30 03 BMI $1CAC 1CA9: AA TAX 1CAA: 10 E5 BPL $1C91 1CAC: A6 83 LDX $83 1CAE: A5 34 LDA $34 ; Randomizer 1CB0: 65 1A ADC $1A 1CB2: 29 03 AND #$03 ; keep bits .... ..xx 1CB4: A8 TAY 1CB5: B9 BC9C LDA $9CBC,Y 1CB8: D0 13 BNE $1CCD ---- 1CBA: 08 38 Table for ? (2 bytes) 1CBC: 40 60 30 70 Table for ? (4 bytes) ---- 1CC0: 88 DEY 1CC1: D0 11 BNE $1CD4 1CC3: 20 E89C JSR $9CE8 1CC6: DE 5805 DEC $0558,X ; Delay Between Attacks 1CC9: D0 08 BNE $1CD3 1CCB: A9 C0 LDA #$C0 ; A = C0 1CCD: 9D 5805 STA $0558,X ; Delay Between Attacks 1CD0: FE 6805 INC $0568,X ; Enemy Animation Frame Code 1CD3: 60 RTS ---- 1CD4: 20 089D JSR $9D08 1CD7: DE 5805 DEC $0558,X 1CDA: D0 0B BNE $1CE7 1CDC: A9 00 LDA #$00 ; A = 00 1CDE: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 1CE1: 9D 5805 STA $0558,X ; Delay Between Attacks 1CE4: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 1CE7: 60 RTS ---- 1CE8: DE 4805 DEC $0548,X 1CEB: D0 1A BNE $1D07 1CED: A9 90 LDA #$90 ; A = 90 1CEF: 9D 4805 STA $0548,X 1CF2: BD 1805 LDA $0518,X ; Enemy X Velocity (low byte) 1CF5: AA TAX 1CF6: 20 F5EC JSR $ECF5 1CF9: 84 0A STY $0A 1CFB: 20 2FEB JSR $EB2F 1CFE: A9 80 LDA #$80 ; A = 80 1D00: A0 05 LDY #$05 ; Y = 05 1D02: 20 9EF2 JSR $F29E 1D05: A6 83 LDX $83 1D07: 60 RTS ---- 1D08: BD 1805 LDA $0518,X ; Enemy X Velocity (low byte) 1D0B: AA TAX 1D0C: 20 F5EC JSR $ECF5 1D0F: 84 10 STY $10 1D11: 8A TXA 1D12: A8 TAY 1D13: 86 11 STX $11 1D15: BE E805 LDX $05E8,Y 1D18: 30 6D BMI $1D87 1D1A: A5 10 LDA $10 1D1C: 85 0A STA $0A 1D1E: 20 CDF4 JSR $F4CD 1D21: 30 EE BMI $1D11 1D23: A6 11 LDX $11 1D25: A8 TAY 1D26: D0 2D BNE $1D55 1D28: BD E805 LDA $05E8,X 1D2B: 30 0B BMI $1D38 1D2D: BC B805 LDY $05B8,X 1D30: C0 08 CPY #$08 1D32: D0 04 BNE $1D38 1D34: AA TAX 1D35: 4C 289D JMP $9D28 ---- 1D38: E4 11 CPX $11 1D3A: D0 13 BNE $1D4F 1D3C: BD D805 LDA $05D8,X 1D3F: 30 0C BMI $1D4D 1D41: AA TAX 1D42: DE B805 DEC $05B8,X 1D45: BD B805 LDA $05B8,X 1D48: 29 3F AND #$3F ; keep bits ..xx xxxx 1D4A: 9D B805 STA $05B8,X 1D4D: A6 11 LDX $11 1D4F: FE B805 INC $05B8,X 1D52: 4C 7F9D JMP $9D7F ---- 1D55: BD E805 LDA $05E8,X 1D58: 30 0B BMI $1D65 1D5A: BC B805 LDY $05B8,X 1D5D: C0 38 CPY #$38 1D5F: D0 04 BNE $1D65 1D61: AA TAX 1D62: 4C 559D JMP $9D55 ---- 1D65: E4 11 CPX $11 1D67: D0 13 BNE $1D7C 1D69: BD D805 LDA $05D8,X 1D6C: 30 0C BMI $1D7A 1D6E: AA TAX 1D6F: FE B805 INC $05B8,X 1D72: BD B805 LDA $05B8,X 1D75: 29 3F AND #$3F ; keep bits ..xx xxxx 1D77: 9D B805 STA $05B8,X 1D7A: A6 11 LDX $11 1D7C: DE B805 DEC $05B8,X 1D7F: BD B805 LDA $05B8,X 1D82: 29 3F AND #$3F ; keep bits ..xx xxxx 1D84: 9D B805 STA $05B8,X 1D87: A6 83 LDX $83 1D89: 60 RTS ---- 1D8A: A9 00 LDA #$00 ; A = 00 1D8C: 85 08 STA $08 1D8E: 85 0E STA $0E 1D90: 86 10 STX $10 1D92: 20 AC9D JSR $9DAC 1D95: A6 10 LDX $10 1D97: BD C805 LDA $05C8,X 1D9A: 05 0E ORA $0E 1D9C: 85 0E STA $0E 1D9E: BD D805 LDA $05D8,X 1DA1: AA TAX 1DA2: 10 EC BPL $1D90 1DA4: A6 83 LDX $83 1DA6: A5 0E LDA $0E 1DA8: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 1DAB: 60 RTS ---- 1DAC: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 1DAF: F0 07 BEQ $1DB8 1DB1: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 1DB4: A9 00 LDA #$00 ; A = 00 1DB6: F0 13 BEQ $1DCB 1DB8: BD C805 LDA $05C8,X 1DBB: F0 0E BEQ $1DCB 1DBD: 30 07 BMI $1DC6 1DBF: DE C805 DEC $05C8,X 1DC2: A9 01 LDA #$01 ; A = 01 1DC4: D0 05 BNE $1DCB 1DC6: FE C805 INC $05C8,X 1DC9: A9 FF LDA #$FF ; A = FF 1DCB: 85 0C STA $0C 1DCD: A0 00 LDY #$00 ; Y = 00 1DCF: 84 0D STY $0D 1DD1: 18 CLC 1DD2: 65 08 ADC $08 1DD4: 85 0B STA $0B 1DD6: F0 6E BEQ $1E46 1DD8: 30 37 BMI $1E11 1DDA: BD E805 LDA $05E8,X 1DDD: 30 1F BMI $1DFE 1DDF: BC B805 LDY $05B8,X 1DE2: C0 08 CPY #$08 1DE4: D0 18 BNE $1DFE 1DE6: A4 0C LDY $0C 1DE8: F0 09 BEQ $1DF3 1DEA: 30 07 BMI $1DF3 1DEC: A9 00 LDA #$00 ; A = 00 1DEE: 9D C805 STA $05C8,X 1DF1: F0 18 BEQ $1E0B 1DF3: A9 01 LDA #$01 1DF5: 9D 3805 STA $0538,X 1DF8: DE C805 DEC $05C8,X 1DFB: 4C 0B9E JMP $9E0B ---- 1DFE: C6 0D DEC $0D 1E00: FE B805 INC $05B8,X 1E03: BD B805 LDA $05B8,X 1E06: 29 3F AND #$3F ; keep bits ..xx xxxx 1E08: 9D B805 STA $05B8,X 1E0B: C6 0B DEC $0B 1E0D: D0 CB BNE $1DDA 1E0F: F0 35 BEQ $1E46 1E11: BD E805 LDA $05E8,X 1E14: 30 1F BMI $1E35 1E16: BC B805 LDY $05B8,X 1E19: C0 38 CPY #$38 1E1B: D0 18 BNE $1E35 1E1D: A4 0C LDY $0C 1E1F: F0 09 BEQ $1E2A 1E21: 10 07 BPL $1E2A 1E23: A9 00 LDA #$00 ; A = 00 1E25: 9D C805 STA $05C8,X 1E28: F0 18 BEQ $1E42 1E2A: A9 01 LDA #$01 ; A = 01 1E2C: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 1E2F: FE C805 INC $05C8,X 1E32: 4C 429E JMP $9E42 ---- 1E35: E6 0D INC $0D 1E37: DE B805 DEC $05B8,X 1E3A: BD B805 LDA $05B8,X 1E3D: 29 3F AND #$3F ; keep bits ..xx xxxx 1E3F: 9D B805 STA $05B8,X 1E42: E6 0B INC $0B 1E44: D0 CB BNE $1E11 1E46: A5 08 LDA $08 1E48: 18 CLC 1E49: 65 0D ADC $0D 1E4B: 85 08 STA $08 1E4D: 60 RTS ---- 1E4E: A4 83 LDY $83 1E50: B9 B805 LDA $05B8,Y 1E53: 99 0805 STA $0508,Y ; Enemy X Velocity (high byte) 1E56: B9 D805 LDA $05D8,Y 1E59: 30 2F BMI $1E8A 1E5B: AA TAX 1E5C: B9 2403 LDA $0324,Y ; Enemy Y Position On Screen 1E5F: 85 08 STA $08 1E61: B9 3E03 LDA $033E,Y ; Enemy X Position On Screen 1E64: 85 09 STA $09 1E66: B9 0805 LDA $0508,Y ; Enemy X Velocity (high byte) 1E69: 18 CLC 1E6A: 7D B805 ADC $05B8,X 1E6D: 29 3F AND #$3F ; keep bits ..xx xxxx 1E6F: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 1E72: A8 TAY 1E73: B9 8D9E LDA $9E8D,Y 1E76: 18 CLC 1E77: 65 08 ADC $08 1E79: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 1E7C: B9 9D9E LDA $9E9D,Y 1E7F: 18 CLC 1E80: 65 09 ADC $09 1E82: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 1E85: 8A TXA 1E86: A8 TAY 1E87: 4C 569E JMP $9E56 ---- 1E8A: A6 83 LDX $83 1E8C: 60 RTS ---- 1E8D: Table for ? (50 bytes) 00 01 03 04 06 07 08 0A 0B 0C 0D 0E 0E 0F 0F 0F0F 0F 0F 0F 0E 0E 0D 0C 0B 0A 08 07 06 04 03 0100 FF FD FC FA F9 F8 F6 F5 F4 F3 F2 F2 F1 F1 F1F1 F1 F1 F1 F2 F2 F3 F4 F5 F6 F8 F9 FA FC FD FF00 01 03 04 06 07 08 0A 0B 0C 0D 0E 0E 0F 0F 0F ---- 1EDD: BD D805 LDA $05D8,X 1EE0: 10 10 BPL $1EF2 1EE2: E6 85 INC $85 1EE4: BD E805 LDA $05E8,X 1EE7: 30 07 BMI $1EF0 1EE9: AA TAX 1EEA: 20 74E9 JSR $E974 ; Define Enemy Attributes ? 1EED: 4C E49E JMP $9EE4 ---- 1EF0: A6 83 LDX $83 1EF2: 4C 8EE7 JMP $E78E ---- 1EF5: Pointer table for Boss Gemini (7 * 2 = E bytes) 039F -> 1F03 259F -> 1F25 3D9F -> 1F3D FF9F -> 1FFF 38A0 -> 2038 B0E7 -> 1E7B0 42A0 -> 2042 ---- Boss Gemini - Pointer 1 1F03: A9 0A LDA #$0A ; A = 0A (Boss Gemini HP) 1F05: 9D E805 STA $05E8,X 1F08: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 1F0B: 9D B805 STA $05B8,X 1F0E: A9 80 LDA #$80 ; A = 80 1F10: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 1F13: A9 00 LDA #$00 ; A = 00 1F15: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 1F18: A9 80 LDA #$80 ; A = 80 1F1A: 9D 5805 STA $0558,X ; Delay Between Attacks 1F1D: A9 40 LDA #$40 ; A = 40 (delay before appearing) 1F1F: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 1F22: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- Boss Gemini - Pointer 2 1F25: A5 87 LDA $87 ; Number of Boss Platings Destroyed 1F27: C9 03 CMP #$03 ; Number of Boss Platings to Destroy (Base II) 1F29: 90 11 BCC $1F3C 1F2B: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 1F2E: D0 0C BNE $1F3C 1F30: A9 A0 LDA #$A0 ; A = A0 1F32: 9D 5805 STA $0558,X ; Delay Between Attacks 1F35: 20 12EB JSR $EB12 1F38: A9 20 LDA #$20 ; A = 20 1F3A: D0 E3 BNE $1F1F 1F3C: 60 RTS ---- Boss Gemini - Pointer 3 1F3D: A5 1A LDA $1A ; Permanent Frame Counter 1F3F: 29 07 AND #$07 ; keep bits .... .xxx (frame change frequency) 1F41: D0 0F BNE $1F52 1F43: FE 6805 INC $0568,X 1F46: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 1F49: C9 03 CMP #$03 1F4B: 90 02 BCC $1F4F 1F4D: A9 00 LDA #$00 ; A = 00 1F4F: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 1F52: BD D805 LDA $05D8,X 1F55: BC C805 LDY $05C8,X 1F58: F0 0E BEQ $1F68 1F5A: DE C805 DEC $05C8,X 1F5D: BD C805 LDA $05C8,X 1F60: 4A LSR 1F61: BD D805 LDA $05D8,X 1F64: 90 02 BCC $1F68 1F66: 49 01 EOR #$01 ; flip bits .... ...x 1F68: 4A LSR 1F69: A9 00 LDA #$00 ; A = 00 1F6B: 90 02 BCC $1F6F 1F6D: A9 03 LDA #$03 ; A = 03 1F6F: 18 CLC 1F70: 7D 6805 ADC $0568,X ; Enemy Animation Frame Code 1F73: A8 TAY 1F74: B9 F59F LDA $9FF5,Y 1F77: 9D 0A03 STA $030A,X ; Enemy Sprite Code 1F7A: A5 8E LDA $8E ; Enemy Attack Switch 1F7C: F0 24 BEQ $1FA2 1F7E: DE 5805 DEC $0558,X ; Delay Between Attacks 1F81: D0 1F BNE $1FA2 1F83: A5 2F LDA $2F ; Current Weapon Strength Code 1F85: 0A ASL 1F86: 0A ASL 1F87: 0A ASL 1F88: 85 08 STA $08 1F8A: A5 34 LDA $34 ; Randomizer 1F8C: 65 1A ADC $1A ; Permanent Frame Counter 1F8E: 85 34 STA $34 ; Randomizer 1F90: 4A LSR 1F91: 29 03 AND #$03 ; keep bits .... ..xx 1F93: A8 TAY 1F94: B9 FB9F LDA $9FFB,Y 1F97: 38 SEC 1F98: E5 08 SBC $08 1F9A: 9D 5805 STA $0558,X ; Delay Between Attacks 1F9D: A9 1D LDA #$1D ; A = 1D (1D = Spinning Bubbles) 1F9F: 20 52EB JSR $EB52 ; Generate Enemy 1FA2: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 1FA5: F0 08 BEQ $1FAF 1FA7: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 1FAA: D0 34 BNE $1FE0 1FAC: 20 07EB JSR $EB07 ; Set Bits 0 and 4 of $598,X 1FAF: BD F804 LDA $04F8,X ; Enemy Y Velocity (low byte) 1FB2: 18 CLC 1FB3: 7D 1805 ADC $0518,X ; Enemy X Velocity (low byte) 1FB6: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 1FB9: BD E804 LDA $04E8,X ; Enemy Y Velocity (high byte) 1FBC: 7D 0805 ADC $0508,X ; Enemy X Velocity (high byte) 1FBF: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 1FC2: BC 0805 LDY $0508,X ; Enemy X Velocity (high byte) 1FC5: 30 08 BMI $1FCF 1FC7: C9 30 CMP #$30 1FC9: 90 15 BCC $1FE0 1FCB: A9 20 LDA #$20 ; A = 20 1FCD: D0 0B BNE $1FDA 1FCF: A8 TAY 1FD0: 10 0E BPL $1FE0 1FD2: 20 D0E8 JSR $E8D0 ; Set Y Velocity to Zero 1FD5: 20 12EB JSR $EB12 ; Set $0598,X to 7F 1FD8: A9 30 LDA #$30 ; A = 30 (delay when Gemini is fused) 1FDA: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 1FDD: 20 1EE9 JSR $E91E ; Reverse X Direction 1FE0: A5 1A LDA $1A ; Permanent Frame Counter 1FE2: 4A LSR 1FE3: BD B805 LDA $05B8,X 1FE6: B0 06 BCS $1FEE 1FE8: 7D E804 ADC $04E8,X ; Enemy Y Velocity (high byte) 1FEB: 4C F19F JMP $9FF1 ---- 1FEE: FD E804 SBC $04E8,X ; Enemy Y Velocity (high byte) 1FF1: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 1FF4: 60 RTS ---- 1FF5: 68 69 6A 68 6B 6C Table for Gemini Boss Tile Mappings (6 bytes) 1FFB: 8A A9 63 D7 Table for Possible Delay Coefficients (4 bytes) ---- Boss Gemini - Pointer 4 1FFF: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 2002: F0 03 BEQ $2007 2004: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 2007: DE E805 DEC $05E8,X 200A: F0 29 BEQ $2035 200C: BD E805 LDA $05E8,X 200F: C9 07 CMP #$07 2011: B0 0E BCS $2021 2013: C9 01 CMP #$01 2015: D0 05 BNE $201C 2017: A9 52 LDA #$52 ; A = 52 2019: 9D 8805 STA $0588,X 201C: A9 01 LDA #$01 ; A = 01 201E: 9D D805 STA $05D8,X 2021: A9 01 LDA #$01 ; A = 01 2023: 9D 7805 STA $0578,X ; Enemy HP 2026: A9 10 LDA #$10 ; A = 10 2028: 9D C805 STA $05C8,X 202B: A9 16 LDA #$16 ; A = 16 202D: 20 6BC1 JSR $C16B ; Play Sound (enemy hit sound, twing!) 2030: A9 03 LDA #$03 ; A = 03 2032: 4C 1AE8 JMP $E81A ---- 2035: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- Boss Gemini - Pointer 5 2038: C6 86 DEC $86 ; Remaining Bosses to Destroy 203A: D0 03 BNE $203F ; Check if both Gemini are destroyed 203C: 4C 40E7 JMP $E740 ; Normal Explosion + Final Boom (with echo) ---- 203F: 4C 4BE7 JMP $E74B ; Normal Explosion ---- Boss Gemini - Pointer 7 2042: A5 86 LDA $86 ; Remaining Bosses to Destroy 2044: F0 03 BEQ $2049 ; Check if both Gemini are destroyed 2046: 4C 09E8 JMP $E809 ; Remove Enemy ---- 2049: 20 14E8 JSR $E814 ; Set TM Code to 0 and Advance to Next Routine 204C: A9 60 LDA #$60 ; A = 60 (delay before auto-move) 204E: 4C F6EA JMP $EAF6 ; Set Delay to A ---- 2051: Pointer table for Spinning Bubbles Projectile (5 * 2 = A bytes) 5BA0 -> 205B 94A0 -> 2094 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- 205B: 20 F5EC JSR $ECF5 205E: 84 0A STY $0A 2060: 98 TYA 2061: 9D C805 STA $05C8,X 2064: 20 2FEB JSR $EB2F 2067: A5 1A LDA $1A 2069: 29 03 AND #$03 ; keep bits .... ..xx 206B: 9D A805 STA $05A8,X ; Enemy Attributes 206E: A8 TAY 206F: B9 90A0 LDA $A090,Y 2072: 85 06 STA $06 2074: A9 01 LDA #$01 ; A = 01 2076: 85 0F STA $0F 2078: 20 2CF5 JSR $F52C 207B: 48 PHA 207C: 20 13F3 JSR $F313 207F: 68 PLA 2080: 20 66F4 JSR $F466 2083: A5 0C LDA $0C 2085: 9D B805 STA $05B8,X 2088: A9 20 LDA #$20 ; A = 20 208A: 9D 5805 STA $0558,X ; Delay Between Attacks 208D: 4C 8EE7 JMP $E78E ---- 2090: 01 03 04 05 Table for Possible Initial Speed Codes (4 bytes) ---- 2094: BC A805 LDY $05A8,X ; Enemy Attributes 2097: FE 3805 INC $0538,X 209A: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 209D: D9 45A1 CMP $A145,Y 20A0: 90 14 BCC $20B6 20A2: A9 00 LDA #$00 ; A = 00 20A4: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 20A7: FE 6805 INC $0568,X 20AA: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 20AD: C9 06 CMP #$06 20AF: 90 02 BCC $20B3 20B1: A9 00 LDA #$00 ; A = 00 20B3: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 20B6: BD 6805 LDA $0568,X 20B9: 18 CLC 20BA: 69 6D ADC #$6D 20BC: 9D 0A03 STA $030A,X ; Enemy Sprite Code 20BF: 20 37E8 JSR $E837 20C2: BD D805 LDA $05D8,X 20C5: C9 14 CMP #$14 20C7: B0 3F BCS $2108 20C9: DE 5805 DEC $0558,X ; Delay Between Attacks 20CC: D0 3A BNE $2108 20CE: A9 08 LDA #$08 ; A = 08 (delay before direction adjust) 20D0: 9D 5805 STA $0558,X 20D3: FE D805 INC $05D8,X 20D6: 20 2FEB JSR $EB2F 20D9: BD C805 LDA $05C8,X 20DC: 85 0A STA $0A 20DE: 20 1AF4 JSR $F41A 20E1: B0 25 BCS $2108 20E3: BD A805 LDA $05A8,X ; Enemy Attributes 20E6: 09 03 ORA #$03 ; set bits .... ..xx 20E8: 9D A805 STA $05A8,X ; Enemy Attributes 20EB: BD B805 LDA $05B8,X 20EE: 0A ASL 20EF: A8 TAY 20F0: B9 09A1 LDA $A109,Y 20F3: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 20F6: B9 0AA1 LDA $A10A,Y 20F9: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 20FC: B9 15A1 LDA $A115,Y 20FF: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 2102: B9 16A1 LDA $A116,Y 2105: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 2108: 60 RTS ---- 2109: Table for Possible X/Y Velocities (3C bytes) 00 00 63 00 C0 00 0F 01 4B 01 72 01 7E 01 72 01 4B 01 0F 01 C0 00 63 00 00 00 9D FF 40 FF F1 FE B5 FE 8E FE 82 FE 8E FE B5 FE F1 FE 40 FF 9D FF 00 00 63 00 C0 00 0F 01 4B 01 72 01 ---- 2145: 08 06 04 02 Table for Possible Spinning Speeds (4 bytes) ---- 2149: Pointer table for Red/Blue Guy (7 * 2 = E bytes) 57A1 -> 2157 8AA1 -> 218A F7A1 -> 21F7 45A2 -> 2245 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- 2157: BD A805 LDA $05A8,X ; Enemy Attributes 215A: 0A ASL 215B: A8 TAY 215C: B9 7EA1 LDA $A17E,Y 215F: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 2162: B9 7FA1 LDA $A17F,Y 2165: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 2168: BD A805 LDA $05A8,X ; Enemy Attributes 216B: 29 01 AND #$01 ; keep bits .... ...x 216D: 0A ASL 216E: A8 TAY 216F: B9 86A1 LDA $A186,Y 2172: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 2175: B9 87A1 LDA $A187,Y 2178: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 217B: 4C 8EE7 JMP $E78E ---- 217E: Table for Red Guys Stop Positions (8 bytes) 9C F0 9C 10 61 F0 61 10 2186: Table for Red/Blue Guys Running Velocities (4 bytes) 00 FF X Velocity from Left 00 01 X Velocity from Right ---- 218A: 20 C5A1 JSR $A1C5 218D: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 2190: 18 CLC 2191: 69 85 ADC #$85 2193: 9D 0A03 STA $030A,X ; Enemy Sprite Code 2196: BD A805 LDA $05A8,X ; Enemy Attributes 2199: 4A LSR 219A: A9 47 LDA #$47 ; A = 47 (Blue Guy from Right) 219C: 90 02 BCC $21A0 219E: A9 07 LDA #$07 ; A = 07 (Blue Guy from Left) 21A0: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 21A3: 20 DBA1 JSR $A1DB 21A6: 20 37E8 JSR $E837 21A9: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 21AC: C9 D8 CMP #$D8 ; Maximum Stop X, Blue Guy from Right 21AE: B0 2A BCS $21DA 21B0: C9 28 CMP #$28 ; Minimum Stop X, Blue Guy from Left 21B2: 90 26 BCC $21DA 21B4: 20 F5EC JSR $ECF5 21B7: C9 10 CMP #$10 21B9: B0 1F BCS $21DA 21BB: A9 00 LDA #$00 ; A = 00 21BD: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 21C0: A9 01 LDA #$01 ; A = 01 21C2: 4C 1F9F JMP $9F1F ---- 21C5: A5 1A LDA $1A 21C7: 29 03 AND #$03 ; keep bits .... ..xx 21C9: D0 0F BNE $21DA 21CB: FE 6805 INC $0568,X ; Enemy Animation Frame Code 21CE: BD 6805 LDA $0568,X 21D1: C9 03 CMP #$03 21D3: 90 05 BCC $21DA 21D5: A9 00 LDA #$00 ; A = 00 21D7: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 21DA: 60 RTS ---- 21DB: A0 00 LDY #$00 ; Y = 00 21DD: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 21E0: C9 DC CMP #$DC 21E2: B0 04 BCS $21E8 21E4: C9 24 CMP #$24 21E6: B0 02 BCS $21EA 21E8: A0 20 LDY #$20 ; Y = 20 21EA: 84 08 STY $08 21EC: BD 5803 LDA $0358,X ; Enemy Sprite Attributes 21EF: 29 DF AND #$DF ; keep bits xx.x xxxx 21F1: 05 08 ORA $08 21F3: 9D 5803 STA $0358,X 21F6: 60 RTS ---- 21F7: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 21FA: D0 FA BNE $21F6 21FC: A9 08 LDA #$08 ; A = 08 21FE: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 2201: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 2204: 18 CLC 2205: 69 88 ADC #$88 2207: 9D 0A03 STA $030A,X ; Enemy Sprite Code 220A: FE 6805 INC $0568,X 220D: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 2210: C9 03 CMP #$03 2212: 90 E2 BCC $21F6 2214: BD 5803 LDA $0358,X ; Enemy Sprite Attributes 2217: 29 DF AND #$DF ; keep bits xx.x xxxx 2219: 9D 5803 STA $0358,X 221C: 20 16EB JSR $EB16 221F: BD A805 LDA $05A8,X ; Enemy Attributes 2222: 29 01 AND #$01 ; keep bits .... ...x 2224: 0A ASL 2225: A8 TAY 2226: B9 41A2 LDA $A241,Y 2229: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 222C: B9 42A2 LDA $A242,Y 222F: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 2232: A9 00 LDA #$00 2234: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 2237: A9 FF LDA #$FF 2239: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 223C: A9 10 LDA #$10 ; A = 10 223E: 4C 1F9F JMP $9F1F ---- 2241: Table for Blue Guy X Velocity while jumping (4 bytes) C0 FF Coming from Left 40 00 Coming from Right ---- 2245: A9 8B LDA #$8B ; A = 8B 2247: BC 3805 LDY $0538,X ; Enemy Animation Frame Delay Counter 224A: F0 05 BEQ $2251 224C: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 224F: A9 8A LDA #$8A ; A = 8A 2251: 9D 0A03 STA $030A,X ; Enemy Sprite Code 2254: 20 40EB JSR $EB40 ; Add 10 to Y Velocity *** Bridge here to increase gravity for Blue Guys *** 2257: 4C 37E8 JMP $E837 ---- 225A: Pointer table for Red Shooting Guys (6 * 2 = C bytes) 57A1 -> 2157 66A2 -> 2266 BBA2 -> 22BB 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- 2266: 20 C5A1 JSR $A1C5 2269: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 226C: 18 CLC 226D: 69 8C ADC #$8C 226F: 9D 0A03 STA $030A,X ; Enemy Sprite Code 2272: BD A805 LDA $05A8,X ; Enemy Attributes 2275: 4A LSR 2276: A9 46 LDA #$46 ; A = 46 (Red Guy from Right) 2278: 90 02 BCC $227C 227A: A9 06 LDA #$06 ; A = 06 (Red Guy from Left) 227C: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 227F: 20 DBA1 JSR $A1DB 2282: 20 37E8 JSR $E837 2285: BD C805 LDA $05C8,X 2288: D0 45 BNE $22CF 228A: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 228D: C9 D8 CMP #$D8 228F: B0 3E BCS $22CF 2291: C9 28 CMP #$28 2293: 90 3A BCC $22CF 2295: BD A805 LDA $05A8,X ; Enemy Attributes 2298: 4A LSR 2299: 4A LSR 229A: A9 10 LDA #$10 ; A = 10 229C: 90 02 BCC $22A0 229E: A9 30 LDA #$30 ; A = 30 22A0: 85 0F STA $0F 22A2: 20 F5EC JSR $ECF5 ; Calculate Coordinates Difference ? 22A5: C5 0F CMP $0F 22A7: B0 26 BCS $22CF 22A9: A9 8F LDA #$8F ; A = 8F 22AB: 9D 0A03 STA $030A,X ; Enemy Sprite Code 22AE: A9 03 LDA #$03 ; A = 03 22B0: 9D B805 STA $05B8,X 22B3: A9 10 LDA #$10 ; A = 10 (delay before first attack) 22B5: 9D 5805 STA $0558,X ; Delay Between Attacks 22B8: 4C 8EE7 JMP $E78E ---- 22BB: DE 5805 DEC $0558,X ; Delay Between Attacks 22BE: F0 10 BEQ $22D0 22C0: BD 5805 LDA $0558,X ; Delay Between Attacks 22C3: C9 2C CMP #$2C 22C5: D0 08 BNE $22CF 22C7: BD 5803 LDA $0358,X ; Enemy Sprite Attributes 22CA: 29 F7 AND #$F7 ; keep bits xxxx .xxx 22CC: 9D 5803 STA $0358,X 22CF: 60 RTS ---- 22D0: A9 90 LDA #$90 ; A = 90 22D2: 9D 0A03 STA $030A,X ; Enemy Sprite Code 22D5: DE B805 DEC $05B8,X 22D8: 30 1C BMI $22F6 22DA: A9 30 LDA #$30 ; A = 30 (delay when shooting) 22DC: 9D 5805 STA $0558,X ; Delay Between Attacks 22DF: BD 5803 LDA $0358,X ; Enemy Sprite Attributes 22E2: 09 08 ORA #$08 ; set bits .... x... 22E4: 9D 5803 STA $0358,X 22E7: 20 F5EC JSR $ECF5 22EA: 84 0A STY $0A 22EC: 20 2FEB JSR $EB2F 22EF: A9 00 LDA #$00 ; A = 00 22F1: A0 04 LDY #$04 ; Y = 04 22F3: 4C 9EF2 JMP $F29E ---- 22F6: FE C805 INC $05C8,X 22F9: A9 02 LDA #$02 ; A = 02 22FB: 4C 1AE8 JMP $E81A ---- 22FE: Pointer table for Red/Blue Guys Generator (3 * 2 = 6 bytes) 04A3 -> 2304 09A3 -> 2309 09E8 -> 1E809 Remove Enemy ---- 2304: A9 80 LDA #$80 ; A = 80 2306: 4C 1F9F JMP $9F1F ---- 2309: A5 87 LDA $87 ; Number of Boss Platings Destroyed 230B: C9 03 CMP #$03 230D: 90 03 BCC $2312 230F: 4C 09E8 JMP $E809 ; Remove Enemy ---- 2312: A5 1A LDA $1A 2314: 4A LSR 2315: B0 50 BCS $2367 2317: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 231A: D0 4B BNE $2367 231C: BC B805 LDY $05B8,X 231F: FE B805 INC $05B8,X 2322: B9 68A3 LDA $A368,Y 2325: C9 FF CMP #$FF 2327: D0 08 BNE $2331 2329: A0 00 LDY #$00 ; Y = 00 232B: 98 TYA 232C: 9D B805 STA $05B8,X 232F: F0 EE BEQ $231F 2331: B9 68A3 LDA $A368,Y 2334: 30 11 BMI $2347 2336: 29 03 AND #$03 ; keep bits .... ..xx 2338: 85 08 STA $08 233A: B9 68A3 LDA $A368,Y 233D: 4A LSR 233E: 4A LSR 233F: 85 09 STA $09 2341: 20 4CA3 JSR $A34C 2344: 4C 1CA3 JMP $A31C ---- 2347: 0A ASL 2348: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 234B: 60 RTS ---- 234C: 20 CEED JSR $EDCE ; Find next enemy slot 234F: D0 14 BNE $2365 2351: A5 09 LDA $09 2353: 4A LSR 2354: A9 1F LDA #$1F ; A = 1F 2356: 90 02 BCC $235A 2358: A9 1E LDA #$1E ; A = 1E 235A: 9D 2805 STA $0528,X ; Enemy Type 235D: 20 47EE JSR $EE47 2360: A5 08 LDA $08 2362: 9D A805 STA $05A8,X ; Enemy Attributes 2365: A6 83 LDX $83 2367: 60 RTS ---- 2368: Table for ? (1C bytes) 00 01 02 03 D0 06 07 A0 04 05 C0 00 01 B0 02 03 D0 04 05 06 07 D0 00 01 02 03 FE FF ---- 2384: Pointer table for Grenade Generator (3 * 2 = 6 bytes) 8AA3 -> 238A 99A3 -> 2399 09E8 -> 1E809 Remove Enemy ---- 238A: 20 A7E8 JSR $E8A7 238D: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 2390: C9 C8 CMP #$C8 2392: B0 42 BCS $23D6 2394: A9 01 LDA #$01 ; A = 01 2396: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- 2399: 20 A7E8 JSR $E8A7 239C: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 239F: D0 35 BNE $23D6 23A1: A9 80 LDA #$80 ; A = 80 (delay between Grenades) 23A3: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 23A6: A9 11 LDA #$11 ; A = 11 (11 = Code for Grenade) 23A8: 4C 52EB JMP $EB52 ; Generate Enemy ---- 23AB: Pointer table for Grenade (5 * 2 = A bytes) B5A3 -> 23B5 D7A3 -> 23D7 52E7 -> 1E752 B0E7 -> 1E7B0 06E8 -> 1E806 ---- 23B5: A9 1A LDA #$1A ; A = 1A ("piiuuu" sound) 23B7: 20 6BC1 JSR $C16B ; Play Sound 23BA: A9 20 LDA #$20 ; A = 20 23BC: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 23BF: A9 80 LDA #$80 ; A = 80 23C1: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 23C4: A9 00 LDA #$00 ; A = 00 23C6: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 23C9: A9 00 LDA #$00 ; A = 00 23CB: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 23CE: A9 FE LDA #$FE ; A = FE 23D0: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 23D3: 4C 8EE7 JMP $E78E *** Set X Velocity according to Attribute (doesn't work) 23BF: 4C 20BE JMP $BE20 -- 3E20: BD A805 LDA $05A8,X ; Enemy Attributes 3E23: 29 03 AND #$03 ; keep bits .... ..xx 3E25: 0A ASL 3E26: A8 TAY 3E27: B9 40BE LDA $BE40,Y 3E2A: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 3E2D: B9 41BE LDA $BE41,Y 3E30: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 3E33: 4C C9A3 JMP $A3C9 -- 3E40: Table for possible X Velocities of Grenade 80 00 Attribute 0 40 00 Attribute 1 C0 00 Attribute 2 00 01 Attribute 3 *** ---- 23D6: 60 RTS ---- 23D7: A5 1A LDA $1A ; Permanent Frame Counter 23D9: 29 07 AND #$07 ; keep bits ... .xxx 23DB: D0 03 BNE $23E0 23DD: FE 6805 INC $0568,X ; Enemy Animation Frame Code 23E0: BD 6805 LDA $0568,X 23E3: 29 03 AND #$03 ; keep bits .... ..xx 23E5: A8 TAY 23E6: B9 0AA4 LDA $A40A,Y 23E9: 9D 0A03 STA $030A,X ; Enemy Sprite Code 23EC: 20 37E8 JSR $E837 23EF: A9 0A LDA #$0A ; A = 0A 23F1: 20 42EB JSR $EB42 ; Add A to Y Velocity 23F4: 30 E0 BMI $23D6 23F6: A9 00 LDA #$00 ; A = 00 23F8: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 23FB: A0 04 LDY #$04 ; Y = 04 (distance from ground for explosion) 23FD: 20 33EC JSR $EC33 2400: F0 D4 BEQ $23D6 2402: A9 24 LDA #$24 ; A = 24 (explosion sound) 2404: 20 6BC1 JSR $C16B ; Play Sound 2407: 4C 8EE7 JMP $E78E ---- 240A: 74 75 76 77 Table for Grenade Mapping Codes (4 bytes) ---- 240E: Pointer table for Tank (6 * 2 = C bytes) 1AA4 -> 241A 48A4 -> 2448 EEA4 -> 24EE B5A5 -> 25B5 E3A5 -> 25E3 F8A5 -> 25F8 ---- *** Replace the first pointer at 240E by the new routine and JMP to 241A afterwards RAM 04C8,X seems unused by the Tank 60BE -> 3E60 -- Set initial delay before projectile launch begins 3E60: A9 5A LDA #$5A ; 5A = 90 frames = 1.5 second 3E62: 9D C804 STA $04C8,X 3E65: 4C 1AA4 JMP $A41A *** 241A: A9 30 LDA #$30 ; A = 30 241C: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 241F: A9 01 LDA #$01 ; A = 01 2421: 9D D804 STA $04D8,X 2424: A9 90 LDA #$90 ; A = 90 2426: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 2429: A9 0C LDA #$0C ; A = 0C 242B: 9D B805 STA $05B8,X 242E: 4A LSR 242F: 9D 5805 STA $0558,X ; Delay Between Attacks 2432: A9 3F LDA #$3F ; A = 3F 2434: 85 78 STA $78 2436: 85 7F STA $7F 2438: 85 52 STA $52 243A: A9 41 LDA #$41 ; A = 41 243C: 85 53 STA $53 243E: A9 10 LDA #$10 ; A = 10 2440: 20 81D0 JSR $D081 2443: A6 83 LDX $83 2445: 4C 8EE7 JMP $E78E ---- 2448: A5 1A LDA $1A ; Permanent Frame Counter 244A: 29 01 AND #$01 ; keep bits .... ...x 244C: 85 77 STA $77 244E: 20 C9A4 JSR $A4C9 2451: BD D804 LDA $04D8,X 2454: D0 07 BNE $245D 2456: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 2459: C9 A0 CMP #$A0 245B: 90 4F BCC $24AC 245D: BD 7805 LDA $0578,X ; Enemy HP 2460: F0 0F BEQ $2471 2462: DE 5805 DEC $0558,X ; Delay Between Attacks 2465: D0 0A BNE $2471 2467: A9 1E LDA #$1E ; A = 1E 2469: 20 6BC1 JSR $C16B ; Play Sound 246C: A9 06 LDA #$06 ; A = 06 (Tank sound repeat frequency) 246E: 9D 5805 STA $0558,X ; Delay Between Attacks 2471: A5 1A LDA $1A ; Permanent Frame Counter 2473: 29 03 AND #$03 ; keep bits .... ..xx 2475: A8 TAY 2476: B9 DFA5 LDA $A5DF,Y 2479: 85 10 STA $10 247B: A5 1A LDA $1A ; Permanent Frame Counter 247D: 29 01 AND #$01 ; keep bits .... ...x 247F: D0 11 BNE $2492 2481: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 2484: 38 SEC 2485: E9 0C SBC #$0C 2487: 85 09 STA $09 2489: BD D804 LDA $04D8,X 248C: E9 00 SBC #$00 248E: D0 1B BNE $24AB 2490: F0 0F BEQ $24A1 2492: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 2495: 18 CLC 2496: 69 14 ADC #$14 2498: 85 09 STA $09 249A: BD D804 LDA $04D8,X 249D: 69 00 ADC #$00 249F: D0 0A BNE $24AB 24A1: BC 2403 LDY $0324,X ; Enemy Y Position On Screen 24A4: A5 09 LDA $09 24A6: 20 93C1 JSR $C193 24A9: A6 83 LDX $83 24AB: 60 RTS ---- 24AC: A9 00 LDA #$00 ; A = 00 24AE: 85 77 STA $77 24B0: BD A805 LDA $05A8,X ; Enemy Attributes 24B3: 29 01 AND #$01 ; keep bits .... ...x 24B5: A8 TAY 24B6: B9 ECA4 LDA $A4EC,Y 24B9: 9D E805 STA $05E8,X ; Delay for entire attack sequence 24BC: A9 47 LDA #$47 ; A = 47 (HP for Tank) 24BE: 9D 7805 STA $0578,X ; Enemy HP *** Make HP progressively high with difficulty level *** However, the Tank is already barely destroyable with M Weapon The F Weapon is also very ineffective against the Tank at long distance Can be done if the Tank total attack time is extended (24F9) 24C1: A9 08 LDA #$08 ; A = 08 (initial delay before first attack) 24C3: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 24C6: 4C 8EE7 JMP $E78E ---- 24C9: A5 68 LDA $68 ; Level Scrolling 24CB: 18 CLC 24CC: 65 77 ADC $77 24CE: 85 00 STA $00 24D0: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 24D3: 38 SEC 24D4: E5 00 SBC $00 24D6: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 24D9: B0 10 BCS $24EB 24DB: DE D804 DEC $04D8,X 24DE: BD 7805 LDA $0578,X ; Enemy HP 24E1: F0 08 BEQ $24EB 24E3: BD 9805 LDA $0598,X 24E6: 49 81 EOR #$81 ; flip bits x... ...x 24E8: 9D 9805 STA $0598,X 24EB: 60 RTS ---- 24EC: 00 F8 Table for Time during which Tank is immobile (2 bytes) Bit 0 (.... ...x) of Enemy Attributes 5A8,X determine this variable ---- *** 24EE: 20 80BE JSR $BE80 ; Bridge to routine -- Launch Projectile 3E80: DE C804 DEC $04C8,X 3E83: D0 1D BNE $3EA2 3E85: A9 5A LDA #$5A ; A = 5A (90 Frames) 3E87: 9D C804 STA $04C8,X 3E8A: A9 19 LDA #$19 ; A = 19 (Mortar sound) 3E8C: 20 6BC1 JSR $C16B ; Play Sound 3E8F: A9 0B LDA #$0B ; A = 0B (0B = Code for Mortar Shot) 3E91: 20 52EB JSR $EB52 ; Generate Enemy 3E94: D0 0C BNE $3EA2 // Set projectile variables here // Velocity variables don't work with Mortar (damned!) Mortar Shot with random attributes 3E96: A5 34 LDA $34 ; Randomizer 3E98: 65 BC ADC $BC ; More Random (BC = Player 1 Animation Frame) 3E9A: 29 03 AND #$03 ; keep bits .... ..xx 3E9C: 18 CLC 3E9D: 69 04 ADC #$04 ; Random between 4-7 3E9F: 99 A805 STA $05A8,Y ; Enemy Attributes Ends with the normal JSR that was overwritten for the bridge at 24EE 3EA2: 4C ACA5 JMP $A5AC *** 24EE: 20 ACA5 JSR $A5AC 24F1: 90 F8 BCC $24EB 24F3: A5 1A LDA $1A ; Permanent Frame Counter 24F5: 29 01 AND #$01 ; keep bits .... ...x 24F7: D0 05 BNE $24FE 24F9: DE E805 DEC $05E8,X 24FC: F0 C8 BEQ $24C6 *** Bridge here to modify 5E8,X differently *** The counter is decreased by 1 on even frames (every other frame) Total attack time of Tank can be made longer by decreasing every 4 frames Or shorter by removing the conditional at 24F7 or changing values at 24EC F8 * 2 = 1F0 = 496 frames / 60 = 8.266 seconds F8 * 1 = F8 = 248 frames / 60 = 4.133 seconds F8 * 4 = 3E0 = 992 frames / 60 = 16.53 seconds *** 24FE: BD 9805 LDA $0598,X 2501: 30 E8 BMI $24EB 2503: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 2506: D0 E3 BNE $24EB 2508: BD D805 LDA $05D8,X 250B: D0 5E BNE $256B 250D: BD B805 LDA $05B8,X 2510: 85 17 STA $17 2512: 20 F5EC JSR $ECF5 2515: 84 0A STY $0A 2517: A0 F4 LDY #$F4 ; Y = F4 2519: A9 00 LDA #$00 ; A = 00 251B: 20 32EB JSR $EB32 ; Set X/Y Position Relative to Enemy Position 251E: 20 1AF4 JSR $F41A 2521: BD B805 LDA $05B8,X 2524: C9 0A CMP #$0A 2526: 90 04 BCC $252C 2528: C9 0D CMP #$0D 252A: 90 07 BCC $2533 252C: A5 17 LDA $17 252E: 9D B805 STA $05B8,X 2531: 85 0C STA $0C 2533: C5 0C CMP $0C 2535: D0 05 BNE $253C 2537: A9 03 LDA #$03 ; A = 03 (number of consecutive bullets) 2539: 9D D805 STA $05D8,X *** bridge here to randomize number of bullets (works) *** 2537: 20 C0BE JSR $BEC0 253A: EA NOP 253B: EA NOP -- 3EC0: A5 34 LDA $34 ; Randomizer 3EC2: 65 BC ADC $BC ; More Random (BC = Player 1 Animation Frame) 3EC4: 29 07 AND #$07 ; keep bits .... .xxx 3EC6: 69 01 ADC #$01 ; Random between 1-8 3EC8: 9D D805 STA $05D8,X 3ECB: 60 RTS *** 253C: BD B805 LDA $05B8,X 253F: 38 SEC 2540: E9 0A SBC #$0A 2542: A8 TAY 2543: B9 A0A5 LDA $A5A0,Y 2546: 85 10 STA $10 2548: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 254B: E9 1C SBC #$1C 254D: A8 TAY 254E: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 2551: E9 2C SBC #$2C 2553: 85 00 STA $00 2555: BD D804 LDA $04D8,X 2558: E9 00 SBC #$00 255A: D0 43 BNE $259F 255C: A5 00 LDA $00 255E: 20 93C1 JSR $C193 2561: A9 01 LDA #$01 ; A = 01 2563: B0 37 BCS $259C 2565: A6 83 LDX $83 2567: A9 30 LDA #$30 ; A = 30 (delay before attack) 2569: D0 31 BNE $259C 256B: BD B805 LDA $05B8,X 256E: 38 SEC 256F: E9 0A SBC #$0A 2571: 85 00 STA $00 2573: 0A ASL 2574: 65 00 ADC $00 2576: A8 TAY 2577: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 257A: F9 A3A5 SBC $A5A3,Y 257D: 85 09 STA $09 257F: BD D804 LDA $04D8,X 2582: E9 00 SBC #$00 2584: 90 19 BCC $259F 2586: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 2589: F9 A4A5 SBC $A5A4,Y 258C: 85 08 STA $08 258E: B9 A5A5 LDA $A5A5,Y 2591: BC A805 LDY $05A8,X ; Enemy Attributes (Tank bullets speed) 2594: 20 BFF2 JSR $F2BF 2597: DE D805 DEC $05D8,X 259A: A9 20 LDA #$20 ; A = 20 (delay between bullets) 259C: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 259F: 60 RTS ---- 25A0: 13 12 0F Table for Tank Cannon Tile Codes (3 bytes) ---- 25A3: 24 03 09 29 09 0A 2E 14 0C Table for Tank Bullets (9 bytes) 24 03 09 Position 0 (7h) 29 09 0A Position 1 (8h) 2E 14 0C Position 2 (9h) Byte 0: X Offset of Bullet (to the left) Byte 1: Y Offset of Bullet (to the left) Byte 2: Bullet Type and Angle ---- 25AC: 20 80A6 JSR $A680 25AF: 20 C9A4 JSR $A4C9 25B2: 4C C3A5 JMP $A5C3 ---- 25B5: A5 1A LDA $1A ; Permanent Frame Counter 25B7: 29 01 AND #$01 ; keep bits .... ...x 25B9: 85 77 STA $77 25BB: 20 ACA5 JSR $A5AC 25BE: 90 1E BCC $25DE 25C0: 4C 5DA4 JMP $A45D ---- 25C3: BD D804 LDA $04D8,X 25C6: 38 SEC 25C7: 10 15 BPL $25DE 25C9: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 25CC: C9 D0 CMP #$D0 25CE: B0 0E BCS $25DE 25D0: 20 09E8 JSR $E809 ; Remove Enemy 25D3: A9 00 LDA #$00 ; A = 00 25D5: 85 77 STA $77 25D7: 85 78 STA $78 25D9: 85 7F STA $7F 25DB: A6 83 LDX $83 25DD: 18 CLC 25DE: 60 RTS ---- 25DF: 10 11 14 15 Table for ? (4 bytes) ---- 25E3: 20 C9A4 JSR $A4C9 25E6: 20 07EB JSR $EB07 ; Set Bits 0 and 4 of $598,X 25E9: A9 05 LDA #$05 ; A = 05 25EB: 9D B805 STA $05B8,X 25EE: A9 55 LDA #$55 ; A = 55 25F0: 20 6BC1 JSR $C16B ; Play Sound 25F3: A9 00 LDA #$00 ; A = 00 25F5: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- 25F8: A5 1A LDA $1A ; Permanent Frame Counter 25FA: 29 01 AND #$01 ; keep bits .... ...x 25FC: 85 77 STA $77 25FE: 20 C9A4 JSR $A4C9 2601: 20 C3A5 JSR $A5C3 2604: 90 57 BCC $265D 2606: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 2609: D0 53 BNE $265E 260B: BD B805 LDA $05B8,X 260E: 30 4D BMI $265D 2610: 0A ASL 2611: 0A ASL 2612: 7D B805 ADC $05B8,X 2615: A8 TAY 2616: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 2619: 79 63A6 ADC $A663,Y 261C: 85 00 STA $00 261E: BD D804 LDA $04D8,X 2621: 79 62A6 ADC $A662,Y 2624: D0 34 BNE $265A 2626: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 2629: 79 64A6 ADC $A664,Y 262C: 84 07 STY $07 262E: A8 TAY 262F: A9 9B LDA #$9B ; A = 9B 2631: 85 10 STA $10 2633: A5 00 LDA $00 2635: 20 93C1 JSR $C193 2638: B0 23 BCS $265D 263A: A6 83 LDX $83 263C: A4 07 LDY $07 263E: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 2641: 79 65A6 ADC $A665,Y 2644: 85 09 STA $09 2646: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 2649: 18 CLC 264A: 79 66A6 ADC $A666,Y 264D: 85 08 STA $08 264F: DE B805 DEC $05B8,X 2652: A9 04 LDA #$04 ; A = 04 2654: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 2657: 4C B3EA JMP $EAB3 ; Create Explosion Type 89 ---- 265A: DE B805 DEC $05B8,X 265D: 60 RTS ---- 265E: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 2661: 60 RTS ---- 2662: Table for ? (1E bytes) 00 16 04 1C 0E 00 16 E4 1C F2 FF F6 04 00 0E FF F6 E4 00 F2 FF D6 04 E4 0E FF D6 E4 E4 F2 ---- Tank Palette Change 2680: BD 7805 LDA $0578,X ; Enemy HP 2683: 4A LSR 2684: 4A LSR 2685: 4A LSR 2686: 4A LSR 2687: A8 TAY 2688: B9 95A6 LDA $A695,Y 268B: 85 52 STA $52 268D: A9 10 LDA #$10 ; A = 10 268F: 20 81D0 JSR $D081 2692: A6 83 LDX $83 2694: 60 RTS ---- 2695: 61 60 5F 3F 3F Table for Tank Palette Changes (5 bytes) ---- 269A: Pointer table for Alien Carrier - Level 5 Boss (18 bytes) B2A6 -> 26B2 C3A6 -> 26C3 E6A6 -> 26E6 23A7 -> 2723 61A7 -> 2761 FDA7 -> 27FD 17A8 -> 2817 2CA8 -> 282C34A8 -> 2834 3FA8 -> 283F 57A8 -> 2857 B5A8 -> 28B5 ---- Alien Carrier - Pointer 1 26B2: A9 10 LDA #$10 ; A = 10 26B4: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 26B7: A9 10 LDA #$10 ; A = 10 26B9: 85 74 STA $74 26BB: 20 81D0 JSR $D081 26BE: A6 83 LDX $83 ; Temporary storage for X register 26C0: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- Alien Carrier - Pointer 2 26C3: A5 34 LDA $34 ; Randomizer 26C5: 29 03 AND #$03 ; keep bits .... ..xx 26C7: A8 TAY 26C8: B9 E2A6 LDA $A6E2,Y 26CB: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 26CE: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 26D1: 18 CLC 26D2: 69 20 ADC #$20 26D4: C9 71 CMP #$71 26D6: 90 02 BCC $26DA 26D8: A9 30 LDA #$30 ; A = 30 26DA: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 26DD: A9 03 LDA #$03 ; A = 03 26DF: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- 26E2: 40 60 80 80 Table for Boss possible X Positions (4 bytes) ---- Alien Carrier - Pointer 3 26E6: BC 3805 LDY $0538,X ; Enemy Animation Frame Delay Counter 26E9: B9 17A7 LDA $A717,Y 26EC: 85 10 STA $10 26EE: 98 TYA 26EF: 0A ASL 26F0: A8 TAY 26F1: B9 1BA7 LDA $A71B,Y 26F4: 7D 3E03 ADC $033E,X ; Enemy X Position On Screen 26F7: 85 00 STA $00 26F9: B9 1CA7 LDA $A71C,Y 26FC: 18 CLC 26FD: 7D 2403 ADC $0324,X ; Enemy Y Position On Screen 2700: A8 TAY 2701: A5 00 LDA $00 2703: 20 93C1 JSR $C193 2706: A6 83 LDX $83 2708: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 270B: 10 09 BPL $2716 270D: A9 02 LDA #$02 ; A = 02 270F: 9D B805 STA $05B8,X 2712: A9 60 LDA #$60 ; A = 60 (delay before starting attacks) 2714: D0 C9 BNE $26DF 2716: 60 RTS ---- 2717: 0D 0E 07 08 Table for ? (4 bytes) ---- 271B: Table for relative X/Y positions of Carrier tile parts (8 bytes) E4 E4 Top-Left ( -1C , -1C ) 04 E4 Top-Right ( 04 , -1C ) E4 04 Bottom-Left ( -1C , 04 ) 04 04 Bottom-Right ( 04 , 04 ) ---- Alien Carrier - Pointer 4 2723: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 2726: F0 03 BEQ $272B 2728: 4C B4A7 JMP $A7B4 ---- 272B: 20 16EB JSR $EB16 272E: 20 3BA7 JSR $A73B 2731: DE B805 DEC $05B8,X 2734: 10 E0 BPL $2716 2736: A9 00 LDA #$00 ; A = 00 2738: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- 273B: A9 0A LDA #$0A ; A = 0A (delay when opening the side bays) 273D: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 2740: BD B805 LDA $05B8,X 2743: 0A ASL 2744: A8 TAY 2745: B9 5AA7 LDA $A75A,Y 2748: 85 07 STA $07 274A: B9 59A7 LDA $A759,Y 274D: A0 00 LDY #$00 ; Y = 00 274F: 20 ECA6 JSR $A6EC 2752: A5 07 LDA $07 2754: A0 01 LDY #$01 ; Y = 01 2756: 4C ECA6 JMP $A6EC ---- 2759: Table for side bays closing sequence Tile Codes (8 bytes) 0B 05 0A 04 09 03 0D 0E ---- Alien Carrier - Pointer 5 2761: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 2764: F0 45 BEQ $27AB 2766: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 2769: 29 0F AND #$0F ; keep bits .... xxxx 276B: D0 47 BNE $27B4 276D: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 2770: 4A LSR 2771: 4A LSR 2772: 29 0C AND #$0C ; keep bits .... xx.. 2774: A8 TAY 2775: B9 E9A7 LDA $A7E9,Y 2778: 85 0A STA $0A 277A: B9 EAA7 LDA $A7EA,Y 277D: 84 17 STY $17 277F: A0 F4 LDY #$F4 ; Y = F4 (relative height of bombs and UFOs) 2781: 20 57EB JSR $EB57 ; Generate Enemy 2784: D0 24 BNE $27AA 2786: A6 17 LDX $17 2788: BD EBA7 LDA $A7EB,X 278B: 99 0805 STA $0508,Y ; Enemy X Velocity (high byte) *** Randomize X Velocity of Drop Bomb (works) *** 278B: 20 E0BE JSR $BEE0 -- 3EE0: 99 0805 STA $0508,Y 3EE3: A5 0A LDA $0A ; Enemy Type 3EE5: C9 16 CMP #$16 3EE7: D0 0D BNE $3EF6 3EE9: A5 34 LDA $34 ; Randomizer 3EEB: 29 07 AND #$07 ; keep bits .... .xxx 3EED: AA TAX 3EEE: BD 00BF LDA $BF00,X 3EF1: 99 0805 STA $0508,Y 3EF4: A6 17 LDX $17 3EF6: 60 RTS -- 3F00: FE FF 00 00 00 00 01 02 *** 278E: A9 10 LDA #$10 ; A = 10 (delay between UFO appear and move) 2790: 99 3805 STA $0538,Y 2793: A9 02 LDA #$02 ; A = 02 2795: 99 8805 STA $0588,Y 2798: 8A TXA 2799: 29 04 AND #$04 ; keep bits .... .x.. 279B: D0 05 BNE $27A2 279D: A9 80 LDA #$80 ; A = 80 279F: 99 1805 STA $0518,Y ; Enemy X Velocity (low byte) 27A2: BD ECA7 LDA $A7EC,X 27A5: 99 0A03 STA $030A,Y ; Enemy Sprite Code 27A8: A6 83 LDX $83 27AA: 60 RTS ---- 27AB: A9 01 LDA #$01 ; A = 01 27AD: 9D B805 STA $05B8,X 27B0: A9 08 LDA #$08 ; A = 08 27B2: D0 60 BNE $2814 27B4: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 27B7: 29 07 AND #$07 ; keep bits .... .xxx 27B9: C9 03 CMP #$03 27BB: D0 ED BNE $27AA 27BD: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 27C0: 85 06 STA $06 27C2: A0 00 LDY #$00 ; Y = 00 27C4: 29 08 AND #$08 ; keep bits .... x... 27C6: D0 02 BNE $27CA 27C8: A0 02 LDY #$02 ; Y = 02 27CA: A9 02 LDA #$02 ; A = 02 27CC: 9D 3805 STA $0538,X 27CF: B9 FAA7 LDA $A7FA,Y 27D2: 85 07 STA $07 27D4: B9 F9A7 LDA $A7F9,Y 27D7: A0 02 LDY #$02 ; Y = 02 27D9: 20 ECA6 JSR $A6EC 27DC: A5 07 LDA $07 27DE: A0 03 LDY #$03 ; Y = 03 27E0: 20 ECA6 JSR $A6EC 27E3: A5 06 LDA $06 27E5: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 27E8: 60 RTS ---- 27E9: Table for ? (14 bytes) 15 14 01 7C Flying Saucer from Right Dock 15 = Enemy Type 14 = Relative Initial X Position 01 = Initial X Velocity (high byte) 7C = Enemy Sprite Code 16 00 00 22 Dropped Bomb 1 15 EC FE 7C Flying Saucer from Left Dock 16 00 00 22 Dropped Bomb 2 07 08 0C 06 Rocket Thrusters Tile Codes 07 = Left Thruster Frame 1 08 = Right Thruster Frame 1 0C = Left Thruster Frame 2 06 = Right Thruster Frame 2 ---- Alien Carrier - Pointer 6 27FD: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 2800: D0 B2 BNE $27B4 2802: 20 3BA7 JSR $A73B 2805: FE B805 INC $05B8,X 2808: BD B805 LDA $05B8,X 280B: C9 04 CMP #$04 280D: D0 2F BNE $283E 280F: 20 07EB JSR $EB07 2812: A9 20 LDA #$20 ; A = 20 (delay between bays closing and fade) 2814: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- Alien Carrier - Pointer 7 2817: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 281A: D0 98 BNE $27B4 281C: A9 18 LDA #$18 ; A = 18 281E: 85 74 STA $74 2820: A9 10 LDA #$10 ; A = 10 2822: 20 81D0 JSR $D081 2825: A6 83 LDX $83 2827: A9 03 LDA #$03 ; A = 03 2829: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- Alien Carrier - Pointer 8 282C: BC 3805 LDY $0538,X ; Enemy Animation Frame Delay Counter 282F: A9 9B LDA #$9B ; A = 9B 2831: 4C ECA6 JMP $A6EC ---- Alien Carrier - Pointer 9 2834: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 2837: D0 05 BNE $283E 2839: A9 02 LDA #$02 ; A = 02 283B: 4C 1AE8 JMP $E81A ---- 283E: 60 RTS ---- Alien Carrier - Pointer A 283F: 20 83C1 JSR $C183 2842: A9 55 LDA #$55 ; A = 55 2844: 20 6BC1 JSR $C16B ; Play Sound 2847: 20 07EB JSR $EB07 284A: A9 04 LDA #$04 ; A = 04 (final explosions count) 284C: 9D B805 STA $05B8,X 284F: 20 E5E9 JSR $E9E5 2852: A9 10 LDA #$10 ; A = 10 (delay before final explosions) 2854: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- Alien Carrier - Pointer B 2857: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 285A: D0 37 BNE $2893 285C: BD B805 LDA $05B8,X 285F: 30 41 BMI $28A2 2861: 0A ASL 2862: A8 TAY 2863: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 2866: 85 16 STA $16 2868: 79 ABA8 ADC $A8AB,Y 286B: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 286E: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 2871: 85 17 STA $17 2873: 18 CLC 2874: 79 ACA8 ADC $A8AC,Y 2877: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 287A: C0 10 CPY #$10 287C: B0 07 BCS $2885 287E: A9 9B LDA #$9B ; A = 9B 2880: 20 B5EB JSR $EBB5 2883: B0 12 BCS $2897 2885: 20 2FEB JSR $EB2F 2888: DE B805 DEC $05B8,X 288B: A9 08 LDA #$08 ; A = 08 (delay between final explosions) 288D: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 2890: 4C B3EA JMP $EAB3 ; Create Explosion Type 89 ---- 2893: DE 3805 DEC $0538,X 2896: 60 RTS ---- 2897: A5 16 LDA $16 2899: 9D 3E03 STA $033E,X 289C: A5 17 LDA $17 289E: 9D 2403 STA $0324,X 28A1: 60 RTS ---- 28A2: A9 02 LDA #$02 ; A = 02 28A4: 9D B805 STA $05B8,X 28A7: A9 04 LDA #$04 ; A = 04 28A9: D0 A9 BNE $2854 ---- 28AB: Table for Alien Carrier Final Explosions Relative Offsets (A bytes) E0 00 Final Explosion 5 00 20 Final Explosion 4 20 00 Final Explosion 3 F0 F0 Final Explosion 2 00 00 Final Explosion 1 ---- Alien Carrier - Pointer C 28B5: BD 3805 LDA $0538,X 28B8: D0 D9 BNE $2893 28BA: BD B805 LDA $05B8,X 28BD: 30 1C BMI $28DB 28BF: 0A ASL 28C0: 7D B805 ADC $05B8,X 28C3: A8 TAY 28C4: B9 E3A8 LDA $A8E3,Y 28C7: 9D 3E03 STA $033E,X 28CA: B9 E4A8 LDA $A8E4,Y 28CD: 9D 2403 STA $0324,X 28D0: B9 E5A8 LDA $A8E5,Y 28D3: 20 B5EB JSR $EBB5 28D6: B0 BE BCS $2896 28D8: 4C 85A8 JMP $A885 ---- 28DB: 20 EAEA JSR $EAEA ; Play Sound A and Set Delay to FF 28DE: A9 30 LDA #$30 ; A = 30 28E0: 4C F6EA JMP $EAF6 ---- 28E3: Table for ? (9 bytes) C0 80 96 C0 = X Position for Exit Explosions 80 = Y Position for Exit Explosions 96 = ? C0 A0 97 D0 C0 98 ---- 28EC: Pointer table for Flying Saucer (7 * 2 = E bytes) FAA8 -> 28FA 05A9 -> 2905 22A9 -> 2922 4CA9 -> 294C 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- Flying Saucer - Pointer 1 28FA: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 28FD: F0 03 BEQ $2902 28FF: 4C 55A9 JMP $A955 ---- 2902: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- Flying Saucer - Pointer 2 2905: 20 52A9 JSR $A952 2908: 20 42E8 JSR $E842 290B: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 290E: C9 20 CMP #$20 ; Flying Saucer Left Limit 2910: 90 04 BCC $2916 2912: C9 E0 CMP #$E0 ; Flying Saucer Right Limit 2914: 90 35 BCC $294B Flying Saucer Y Velocity going down (180) (high byte and low byte) 2916: A9 80 LDA #$80 ; A = 80 2918: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 291B: A9 01 LDA #$01 ; A = 01 291D: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 2920: D0 E0 BNE $2902 Flying Saucer - Pointer 3 2922: 20 52A9 JSR $A952 2925: 20 51E8 JSR $E851 2928: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 292B: C9 A8 CMP #$A8 ; Flying Saucer Bottom Limit 292D: 90 1C BCC $294B 292F: A9 A9 LDA #$A9 ; A = A9 (Y adjust when at bottom limit) 2931: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 2934: A0 01 LDY #$01 ; Y = 01 2936: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 2939: 10 02 BPL $293D Flying Saucer X Velocity going left (-180) (high byte and low byte) 293B: A0 FE LDY #$FE ; Y = FE 293D: 98 TYA 293E: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 2941: A9 80 LDA #$80 ; A = 80 2943: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 2946: 20 D0E8 JSR $E8D0 ; Set Y Velocity to Zero 2949: F0 B7 BEQ $2902 294B: 60 RTS ---- Flying Saucer - Pointer 4 294C: 20 52A9 JSR $A952 294F: 4C 37E8 JMP $E837 ; Apply Velocities and Scrolling Adjust ---- 2952: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 2955: BD 3805 LDA $0538,X 2958: 29 03 AND #$03 ; keep bits .... ..xx 295A: D0 0F BNE $296B 295C: FE 0A03 INC $030A,X ; Enemy Sprite Code 295F: BD 0A03 LDA $030A,X 2962: C9 7F CMP #$7F 2964: 90 05 BCC $296B 2966: E9 03 SBC #$03 2968: 9D 0A03 STA $030A,X ; Enemy Sprite Code 296B: 60 RTS ---- 296C: Pointer table for Drop Bomb (4 * 2 = 8 bytes) 74A9 -> 2974 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- Drop Bomb - Pointer 1 2974: A9 28 LDA #$28 ; A = 28 (gravity value for Drop Bomb) 2976: 20 42EB JSR $EB42 ; Add A to Y Velocity 2979: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 297C: C9 B0 CMP #$B0 ; Drop Bomb explosion height 297E: 90 CF BCC $294F 2980: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 2983: Pointer table for Pipe Joint (2 bytes) 85A9 -> 2985 ---- Pipe Joint - Pointer 1 2985: A9 C4 LDA #$C4 ; A = C4 2987: 9D 0A03 STA $030A,X ; Enemy Sprite Code 298A: A5 7F LDA $7F 298C: F0 08 BEQ $2996 298E: A5 68 LDA $68 ; Level Scrolling 2990: F0 03 BEQ $2995 2992: DE 3E03 DEC $033E,X ; Enemy X Position On Screen 2995: 60 RTS ---- 2996: 4C A7E8 JMP $E8A7 ; Add Scrolling to Enemy Position ---- 2999: Pointer table for Energy Beam Down (4 * 2 = 8 bytes) A1A9 -> 29A1 C8A9 -> 29CB 0FAA -> 2A0F 2BAA -> 2A2B ---- Energy Beam Down - Pointer 1 29A1: A9 04 LDA #$04 ; A = 04 29A3: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 29A6: A9 80 LDA #$80 ; A = 80 29A8: 1D A805 ORA $05A8,X ; Enemy Attributes 29AB: 9D A805 STA $05A8,X 29AE: A9 08 LDA #$08 ; A = 08 29B0: 20 1FEB JSR $EB1F ; Add A to Enemy Y Position on Screen 29B3: BD A805 LDA $05A8,X ; Enemy Attributes 29B6: 4A LSR 29B7: 4A LSR 29B8: 29 03 AND #$03 ; keep bits .... ..xx 29BA: A8 TAY 29BB: B9 C4A9 LDA $A9C4,Y 29BE: 9D 4805 STA $0548,X 29C1: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- 29C4: 00 20 40 60 Table for Energy Beams delays between bursts (4 bytes) ---- 29C8: 20 5AAB JSR $AB5A Energy Beam Down - Pointer 2 29CB: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 29CE: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 29D1: D0 34 BNE $2A07 29D3: 20 F5EC JSR $ECF5 29D6: C9 20 CMP #$20 29D8: B0 4C BCS $2A26 29DA: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 29DD: C9 30 CMP #$30 ; position at which Energy Beam stops firing 29DF: 90 45 BCC $2A26 29E1: A9 09 LDA #$09 ; A = 09 29E3: 20 6BC1 JSR $C16B ; Play Sound 29E6: 20 0EEB JSR $EB0E 29E9: BD A805 LDA $05A8,X ; Enemy Attributes 29EC: 29 03 AND #$03 ; keep bits .... ..xx 29EE: A8 TAY 29EF: B9 0BAA LDA $AA0B,Y 29F2: 9D C805 STA $05C8,X ; Energy Beam Length 29F5: A9 01 LDA #$01 ; A = 01 29F7: 9D 0A03 STA $030A,X ; Enemy Sprite Code 29FA: A9 00 LDA #$00 ; A = 00 29FC: 9D B805 STA $05B8,X 29FF: 9D D805 STA $05D8,X 2A02: 9D E805 STA $05E8,X 2A05: F0 BA BEQ $29C1 2A07: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 2A0A: 60 RTS ---- 2A0B: 05 09 0D 0F Table for Energy Beams possible lengths (4 bytes) ---- Energy Beam Down - Pointer 3 2A0F: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 2A12: A0 00 LDY #$00 ; Y = 00 2A14: 20 F5AA JSR $AAF5 2A17: B0 0D BCS $2A26 2A19: DE C805 DEC $05C8,X ; Energy Beam Length 2A1C: F0 09 BEQ $2A27 2A1E: BD E805 LDA $05E8,X 2A21: 69 08 ADC #$08 ; add this to each step of the Energy Beam 2A23: 9D E805 STA $05E8,X 2A26: 60 RTS ---- 2A27: A9 10 LDA #$10 ; A = 10 (delay for Energy Beam to stay at max) 2A29: D0 96 BNE $29C1 Energy Beam Down - Pointer 4 2A2B: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 2A2E: A0 02 LDY #$02 ; Y = 02 2A30: 20 F5AA JSR $AAF5 2A33: B0 F1 BCS $2A26 2A35: BD E805 LDA $05E8,X 2A38: E9 07 SBC #$07 2A3A: 9D E805 STA $05E8,X 2A3D: 10 E7 BPL $2A26 2A3F: BD 4805 LDA $0548,X 2A42: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 2A45: 20 07EB JSR $EB07 2A48: A9 02 LDA #$02 ; A = 02 2A4A: 4C 1AE8 JMP $E81A ---- 2A4D: Pointer table for Energy Beam Left (4 * 2 = 8 bytes) 55AA -> 2A55 5AAA -> 2A5A 6CAA -> 2A6C 84AA -> 2A84 ---- 2A55: A9 40 LDA #$40 ; A = 40 2A57: 4C A8A9 JMP $A9A8 ---- 2A5A: 20 5AAB JSR $AB5A 2A5D: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 2A60: A5 1A LDA $1A ; Permanent Frame Counter 2A62: 29 7F AND #$7F ; keep bits .xxx xxxx 2A64: DD 4805 CMP $0548,X 2A67: D0 1A BNE $2A83 2A69: 4C DAA9 JMP $A9DA ---- 2A6C: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 2A6F: A0 04 LDY #$04 ; Y = 04 2A71: 20 F5AA JSR $AAF5 2A74: B0 0D BCS $2A83 2A76: DE C805 DEC $05C8,X ; Energy Beam Length 2A79: F0 AC BEQ $2A27 2A7B: BD D805 LDA $05D8,X 2A7E: E9 07 SBC #$07 2A80: 9D D805 STA $05D8,X 2A83: 60 RTS ---- 2A84: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 2A87: A0 06 LDY #$06 ; Y = 06 2A89: 20 F5AA JSR $AAF5 2A8C: B0 F5 BCS $2A83 2A8E: BD D805 LDA $05D8,X 2A91: 69 08 ADC #$08 2A93: 9D D805 STA $05D8,X 2A96: 30 EB BMI $2A83 2A98: F0 E9 BEQ $2A83 2A9A: 10 A3 BPL $2A3F ---- 2A9C: Pointer table for Energy Beam Right (4 * 2 = 8 bytes) A4AA -> 2AA4 AEAA -> 2AAE C3AA -> 2AC3 DEAA -> 2ADE ---- 2AA4: A9 40 LDA #$40 ; A = 40 2AA6: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 2AA9: A9 00 LDA #$00 ; A = 00 2AAB: 4C A8A9 JMP $A9A8 ---- 2AAE: 20 5AAB JSR $AB5A 2AB1: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 2AB4: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 2AB7: D0 21 BNE $2ADA 2AB9: A5 34 LDA $34 ; Randomizer 2ABB: 29 3F AND #$3F ; keep bits ..xx xxxx 2ABD: 9D 4805 STA $0548,X 2AC0: 4C DAA9 JMP $A9DA ---- 2AC3: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 2AC6: A0 08 LDY #$08 ; Y = 08 2AC8: 20 F5AA JSR $AAF5 2ACB: B0 0D BCS $2ADA 2ACD: DE C805 DEC $05C8,X ; Energy Beam Length 2AD0: F0 09 BEQ $2ADB 2AD2: BD D805 LDA $05D8,X 2AD5: 69 08 ADC #$08 2AD7: 9D D805 STA $05D8,X 2ADA: 60 RTS ---- 2ADB: 4C 27AA JMP $AA27 ---- 2ADE: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 2AE1: A0 0A LDY #$0A ; Y = 0A 2AE3: 20 F5AA JSR $AAF5 2AE6: B0 F2 BCS $2ADA 2AE8: BD D805 LDA $05D8,X 2AEB: E9 07 SBC #$07 2AED: 9D D805 STA $05D8,X 2AF0: 10 E8 BPL $2ADA 2AF2: 4C 3FAA JMP $AA3F ---- 2AF5: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 2AF8: D0 4F BNE $2B49 2AFA: BD D805 LDA $05D8,X 2AFD: 1D E805 ORA $05E8,X 2B00: F0 01 BEQ $2B03 2B02: C8 INY 2B03: B9 4EAB LDA $AB4E,Y 2B06: 85 10 STA $10 2B08: BD E805 LDA $05E8,X 2B0B: 18 CLC 2B0C: 7D 2403 ADC $0324,X ; Enemy Y Position On Screen 2B0F: A8 TAY 2B10: 88 DEY 2B11: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 2B14: 38 SEC 2B15: E9 07 SBC #$07 2B17: 85 00 STA $00 2B19: BD D805 LDA $05D8,X 2B1C: 18 CLC 2B1D: 30 06 BMI $2B25 2B1F: 65 00 ADC $00 2B21: 90 06 BCC $2B29 2B23: 18 CLC 2B24: 60 RTS ---- 2B25: 65 00 ADC $00 2B27: 90 FB BCC $2B24 2B29: 20 A6C1 JSR $C1A6 2B2C: B0 1A BCS $2B48 2B2E: A6 83 LDX $83 2B30: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 2B33: C9 30 CMP #$30 2B35: A9 00 LDA #$00 ; A = 00 2B37: 90 03 BCC $2B3C 2B39: 18 CLC 2B3A: A9 01 LDA #$01 ; A = 01 (delay between steps of burst) 2B3C: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 2B3F: BD D805 LDA $05D8,X 2B42: 1D E805 ORA $05E8,X 2B45: 9D B805 STA $05B8,X 2B48: 60 RTS ---- 2B49: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 2B4C: 38 SEC 2B4D: 60 RTS ---- 2B4E: Table for Energy Beams Tile Mapping Codes (C bytes) 87 88 80 89 Beam Down 84 85 80 86 Beam Left 81 82 80 83 Beam Right ---- 2B5A: DE 5805 DEC $0558,X 2B5D: BD 5805 LDA $0558,X 2B60: 29 07 AND #$07 ; keep bits .... .xxx 2B62: D0 C0 BNE $2B24 2B64: BD 5805 LDA $0558,X 2B67: 4A LSR 2B68: 4A LSR 2B69: 4A LSR 2B6A: 29 03 AND #$03 ; keep bits .... ..xx 2B6C: 1D 6805 ORA $0568,X ; Enemy Animation Frame Code 2B6F: A8 TAY 2B70: B9 77AB LDA $AB77,Y 2B73: 9D 0A03 STA $030A,X ; Enemy Sprite Code 2B76: 60 RTS ---- 2B77: Table for ? (8 bytes) 01 BF C0 BF 01 C1 C2 C1 ---- 2B7F: Pointer table for Boss Robot (A * 2 = 14 bytes) 93AB -> 2B93 B3AB -> 2BB3 BFAB -> 2BBF 7BAC -> 2C7B D4AC -> 2CD4 16AD -> 2D16 49AD -> 2D49 61AD -> 2D61 9BAD -> 2D9B ADAD -> 2DAD ---- Boss Robot - Pointer 0 2B93: A5 2F LDA $2F ; Current Weapon Strength Code 2B95: 0A ASL 2B96: 0A ASL 2B97: 0A ASL 2B98: 69 40 ADC #$40 2B9A: 9D 7805 STA $0578,X ; Enemy HP (40 + WSC * 8) 2B9D: A5 34 LDA $34 ; Randomizer 2B9F: 9D B805 STA $05B8,X 2BA2: A9 B8 LDA #$B8 ; A = B8 2BA4: 9D 0A03 STA $030A,X ; Enemy Sprite Code 2BA7: A9 9B LDA #$9B ; A = 9B (initial boss Y Position) 2BA9: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 2BAC: A9 31 LDA #$31 ; A = 31 (initial boss delay waiting) 2BAE: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 2BB1: D0 09 BNE $2BBC Boss Robot - Pointer 1 2BB3: 20 37E8 JSR $E837 ; Apply Velocities and Scrolling Adjust 2BB6: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 2BB9: F0 01 BEQ $2BBC 2BBB: 60 RTS ---- 2BBC: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- Boss Robot - Pointer 2 2BBF: 20 37E8 JSR $E837 ; Apply Velocities and Scrolling Adjust 2BC2: BD B805 LDA $05B8,X 2BC5: 29 03 AND #$03 ; keep bits .... ..xx 2BC7: D0 30 BNE $2BF9 2BC9: 20 4AAC JSR $AC4A Set Initial Y Velocity when jumping 2BCC: A9 F9 LDA #$F9 ; A = F9 2BCE: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 2BD1: A9 80 LDA #$80 ; A = 80 2BD3: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 2BD6: A5 34 LDA $34 ; Randomizer 2BD8: 65 1A ADC $1A ; Permanent Frame Counter 2BDA: 29 03 AND #$03 ; keep bits .... ..xx 2BDC: 0A ASL 2BDD: A8 TAY 2BDE: B9 6FAC LDA $AC6F,Y 2BE1: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 2BE4: B9 70AC LDA $AC70,Y 2BE7: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 2BEA: A9 00 LDA #$00 ; A = 00 2BEC: 9D E805 STA $05E8,X ; Enemy Bullet Counter (among other things) 2BEF: A9 BA LDA #$BA ; A = BA (Tile Mapping Code while jumping) 2BF1: 9D 0A03 STA $030A,X ; Enemy Sprite Code 2BF4: A9 05 LDA #$05 ; A = 05 2BF6: 4C 1AE8 JMP $E81A ; Set Routine Index to A ---- 2BF9: C9 01 CMP #$01 ; Probability of Attacking (1/4) 2BFB: D0 14 BNE $2C11 2BFD: 20 4AAC JSR $AC4A 2C00: FE E805 INC $05E8,X ; Enemy Bullet Counter (among other things) 2C03: BD E805 LDA $05E8,X 2C06: C9 04 CMP #$04 ; Max number of consecutive projectiles 2C08: B0 25 BCS $2C2F 2C0A: A9 20 LDA #$20 ; A = 20 (delay before throwing position) 2C0C: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 2C0F: D0 AB BNE $2BBC ; (determines delay between projectiles) 2C11: 20 4AAC JSR $AC4A 2C14: A5 34 LDA $34 ; Randomizer 2C16: 29 01 AND #$01 ; keep bits .... ...x 2C18: 0A ASL 2C19: A8 TAY 2C1A: B9 77AC LDA $AC77,Y 2C1D: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 2C20: B9 78AC LDA $AC78,Y 2C23: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 2C26: A9 0C LDA #$0C ; A = 0C 2C28: 9D C805 STA $05C8,X ; delay for first step of walking 2C2B: A9 06 LDA #$06 ; A = 06 2C2D: D0 C7 BNE $2BF6 2C2F: A9 B8 LDA #$B8 ; A = B8 2C31: 9D 0A03 STA $030A,X ; Enemy Sprite Code 2C34: 20 CDE8 JSR $E8CD ; Set X/Y Velocities to Zero 2C37: A5 34 LDA $34 ; Randomizer 2C39: 9D B805 STA $05B8,X 2C3C: 65 1A ADC $1A ; Permanent Frame Counter 2C3E: 29 80 AND #$80 ; keep bits x... .... 2C40: 1D 3805 ORA $0538,X ; (extend delay before next attack by 0 or 80) 2C43: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 2C46: A9 03 LDA #$03 ; A = 03 2C48: D0 AC BNE $2BF6 2C4A: A0 00 LDY #$00 ; Y = 00 2C4C: A5 39 LDA $39 ; Game Over state of Player 2 2C4E: D0 0B BNE $2C5B 2C50: A5 34 LDA $34 ; Randomizer 2C52: 29 01 AND #$01 ; keep bits .... ...x 2C54: A8 TAY 2C55: A5 38 LDA $38 ; Game Over state of Player 1 2C57: F0 02 BEQ $2C5B 2C59: A0 01 LDY #$01 ; Y = 01 2C5B: B9 3403 LDA $0334,Y 2C5E: 85 08 STA $08 2C60: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 2C63: C5 08 CMP $08 2C65: A9 00 LDA #$00 ; A = 00 2C67: B0 02 BCS $2C6B 2C69: A9 40 LDA #$40 ; A = 40 2C6B: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 2C6E: 60 RTS ---- 2C6F: Table for possible X Velocities when jumping (8 bytes) Seems to happen rarely, only at the beginning When he is not on his left or right limit (X position) 00 80 00 00 00 00 FF 80 ---- 2C77: Table for Level 6 Boss Walking Speed (4 bytes) 01 18 Boss Walking Speed - Going Left FE E8 Boss Walking Speed - Going Right ---- Boss Robot - Pointer 3 2C7B: 20 37E8 JSR $E837 ; Apply Velocities and Scrolling Adjust 2C7E: A5 8E LDA $8E ; Enemy Attack Switch 2C80: F0 4F BEQ $2CD1 2C82: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 2C85: F0 2E BEQ $2CB5 2C87: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 2C8A: C9 0F CMP #$0F ; (determines delay for throw stance) 2C8C: B0 05 BCS $2C93 2C8E: A9 C3 LDA #$C3 ; A = C3 (Tile Mapping Code before throw) 2C90: 9D 0A03 STA $030A,X ; Enemy Sprite Code Change Palette According to HP 2C93: A5 1A LDA $1A ; Permanent Frame Counter 2C95: 29 07 AND #$07 ; keep bits .... .xxx 2C97: C9 03 CMP #$03 2C99: D0 17 BNE $2CB2 2C9B: BD 7805 LDA $0578,X ; Enemy HP 2C9E: C9 20 CMP #$20 ; normal palette if HP >= 20 2CA0: B0 10 BCS $2CB2 2CA2: A0 51 LDY #$51 ; Y = 51 (palette for medium damage) 2CA4: C9 10 CMP #$10 ; medium damage if HP >= 10 and < 20 2CA6: B0 02 BCS $2CAA 2CA8: A0 52 LDY #$52 ; Y = 52 (palette for critical damage) ; critical damage if HP < 10 2CAA: 98 TYA 2CAB: 85 57 STA $57 ; Change a specific palette code 2CAD: A9 20 LDA #$20 ; A = 20 2CAF: 20 81D0 JSR $D081 2CB2: A6 83 LDX $83 2CB4: 60 RTS ---- 2CB5: A9 14 LDA #$14 ; A = 14 (14 = Spiked Disk Projectile) 2CB7: 85 0A STA $0A ; Set Enemy Type for Projectile 2CB9: A9 F0 LDA #$F0 ; A = F0 (initial relative X position) 2CBB: A0 E8 LDY #$E8 ; Y = E8 (initial relative Y position) 2CBD: 20 57EB JSR $EB57 ; Generate Projectile 2CC0: D0 0F BNE $2CD1 2CC2: BD 5803 LDA $0358,X ; Enemy Sprite Attributes 2CC5: 29 40 AND #$40 ; keep bits .x.. .... 2CC7: F0 08 BEQ $2CD1 2CC9: B9 3E03 LDA $033E,Y ; Enemy X Position On Screen 2CCC: 69 30 ADC #$30 ; add 30 to X position if facing right 2CCE: 99 3E03 STA $033E,Y ; Enemy X Position On Screen 2CD1: 4C 2FAC JMP $AC2F ---- Boss Robot - Pointer 4 2CD4: 20 93AC JSR $AC93 ; Change Palette According to HP 2CD7: 20 F9AC JSR $ACF9 ; Apply Gravity and X Boundaries Check 2CDA: 20 37E8 JSR $E837 ; Apply Velocities and Scrolling Adjust 2CDD: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 2CE0: C9 9B CMP #$9B ; ground limit when landing after jump 2CE2: B0 01 BCS $2CE5 2CE4: 60 RTS ---- Boss Robot Landing 2CE5: A9 15 LDA #$15 ; A = 15 (sound of Boss Robot landing) 2CE7: 20 6BC1 JSR $C16B ; Play Sound 2CEA: 20 CDE8 JSR $E8CD ; Set X/Y Velocities to Zero 2CED: A9 9B LDA #$9B ; A = 9B 2CEF: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 2CF2: A9 B8 LDA #$B8 ; A = B8 2CF4: 9D 0A03 STA $030A,X ; Enemy Sprite Code 2CF7: D0 D8 BNE $2CD1 Apply Gravity and X Boundaries Check 2CF9: A9 38 LDA #$38 ; A = 38 (gravity when jumping) 2CFB: 20 42EB JSR $EB42 ; Add A to Velocity (38) 2CFE: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 2D01: C9 21 CMP #$21 ; 20 = Left Boundary 2D03: 90 08 BCC $2D0D 2D05: C9 C0 CMP #$C0 ; C0 = Right Boundary 2D07: 90 0C BCC $2D15 2D09: A9 C0 LDA #$C0 ; A = C0 2D0B: D0 02 BNE $2D0F 2D0D: A9 20 LDA #$20 ; A = 20 2D0F: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 2D12: 20 D9E8 JSR $E8D9 ; Set X Velocity to Zero 2D15: 60 RTS ---- Boss Robot - Pointer 5 2D16: 20 93AC JSR $AC93 2D19: 20 37E8 JSR $E837 ; Apply Velocities and Scrolling Adjust 2D1C: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 2D1F: C9 20 CMP #$20 ; Left Limit when Walking ? 2D21: 90 0A BCC $2D2D 2D23: C9 C0 CMP #$C0 ; Right Limit when Walking ? 2D25: B0 06 BCS $2D2D 2D27: DE C805 DEC $05C8,X 2D2A: F0 04 BEQ $2D30 2D2C: 60 RTS ---- 2D2D: 4C 2FAC JMP $AC2F ---- 2D30: A9 00 LDA #$00 ; A = 00 2D32: 9D E805 STA $05E8,X ; Enemy Bullet Counter (among other things) 2D35: A9 0C LDA #$0C ; A = 0C (delay between steps) 2D37: 9D C805 STA $05C8,X 2D3A: FE D805 INC $05D8,X 2D3D: BD D805 LDA $05D8,X 2D40: 29 01 AND #$01 ; keep bits .... ...x 2D42: 18 CLC 2D43: 69 B8 ADC #$B8 2D45: 9D 0A03 STA $030A,X ; Enemy Sprite Code 2D48: 60 RTS ---- 2D49: 20 83C1 JSR $C183 2D4C: A9 55 LDA #$55 ; A = 55 2D4E: 20 EAEA JSR $EAEA ; Play Sound and Initiate Auto-Move 2D51: 20 F8ED JSR $EDF8 ; Set 5B8,5C8,5D8,5E8 to Zero 2D54: 9D 0A03 STA $030A,X ; Enemy Sprite Code 2D57: 85 08 STA $08 2D59: 85 09 STA $09 2D5B: 20 81AD JSR $AD81 2D5E: 4C 8EE7 JMP $E78E ---- 2D61: A9 08 LDA #$08 ; A = 08 2D63: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 2D66: BD B805 LDA $05B8,X 2D69: C9 04 CMP #$04 ; Number of Explosions when Boss is destroyed 2D6B: 90 05 BCC $2D72 2D6D: A9 30 LDA #$30 ; A = 30 2D6F: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- 2D72: FE B805 INC $05B8,X 2D75: 0A ASL 2D76: A8 TAY 2D77: B9 93AD LDA $AD93,Y 2D7A: 85 08 STA $08 2D7C: B9 94AD LDA $AD94,Y 2D7F: 85 09 STA $09 2D81: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 2D84: 65 08 ADC $08 2D86: A8 TAY 2D87: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 2D8A: 65 09 ADC $09 2D8C: 84 08 STY $08 2D8E: 85 09 STA $09 2D90: 4C B3EA JMP $EAB3 ; Create Explosion Type 89 ---- 2D93: Table for Explosions Relative Offsets (4 * 2 = 8 bytes) F0 F0 10 10 F0 10 10 F0 ---- 2D9B: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 2D9E: F0 00 BEQ $2DA0 ; Useless Branching 2DA0: 20 F8ED JSR $EDF8 ; Set 5B8,5C8,5D8,5E8 to Zero 2DA3: A9 08 LDA #$08 ; A = 08 (number of steps for door opening) 2DA5: 9D D805 STA $05D8,X 2DA8: A9 0A LDA #$0A ; A = 0A (delay for 1st step of door opening) 2DAA: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- 2DAD: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 2DB0: F0 22 BEQ $2DD4 2DB2: 60 RTS ---- 2DB3: A9 8C LDA #$8C ; A = 8C (opened door tile code) 2DB5: 85 10 STA $10 2DB7: BD C805 LDA $05C8,X 2DBA: A8 TAY 2DBB: A9 D0 LDA #$D0 ; A = D0 (X position to draw tiles) 2DBD: 20 A6C1 JSR $C1A6 2DC0: A6 83 LDX $83 2DC2: DE D805 DEC $05D8,X 2DC5: D0 03 BNE $2DCA 2DC7: FE B805 INC $05B8,X 2DCA: BD C805 LDA $05C8,X 2DCD: 38 SEC 2DCE: E9 08 SBC #$08 2DD0: 9D C805 STA $05C8,X 2DD3: 60 RTS ---- 2DD4: A9 0A LDA #$0A ; A = 0A (delay for each step of door opening) 2DD6: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 2DD9: BD B805 LDA $05B8,X 2DDC: C9 01 CMP #$01 2DDE: F0 D3 BEQ $2DB3 2DE0: 0A ASL 2DE1: A8 TAY 2DE2: B9 35AE LDA $AE35,Y 2DE5: 85 04 STA $04 2DE7: B9 36AE LDA $AE36,Y 2DEA: 85 05 STA $05 2DEC: A0 00 LDY #$00 ; Y = 00 2DEE: B1 04 LDA ($04),Y 2DF0: 18 CLC 2DF1: 69 10 ADC #$10 2DF3: 85 06 STA $06 2DF5: A9 D0 LDA #$D0 ; A = D0 2DF7: 85 07 STA $07 2DF9: 86 83 STX $83 2DFB: A5 07 LDA $07 2DFD: C8 INY 2DFE: B1 04 LDA ($04),Y 2E00: C9 FF CMP #$FF 2E02: F0 17 BEQ $2E1B 2E04: 85 10 STA $10 2E06: 98 TYA 2E07: 48 PHA 2E08: A5 07 LDA $07 2E0A: A4 06 LDY $06 2E0C: 20 A6C1 JSR $C1A6 2E0F: 68 PLA 2E10: A8 TAY 2E11: A5 06 LDA $06 2E13: 18 CLC 2E14: 69 10 ADC #$10 2E16: 85 06 STA $06 2E18: 4C FBAD JMP $ADFB ---- 2E1B: A6 83 LDX $83 2E1D: A5 06 LDA $06 2E1F: 38 SEC 2E20: E9 20 SBC #$20 2E22: 9D C805 STA $05C8,X 2E25: FE B805 INC $05B8,X 2E28: BD B805 LDA $05B8,X 2E2B: C9 03 CMP #$03 2E2D: F0 01 BEQ $2E30 2E2F: 60 RTS ---- 2E30: A9 01 LDA #$01 ; A = 01 2E32: 4C F6EA JMP $EAF6 ---- 2E35: Pointer Table for ? (3 * 2 = 6 bytes) 3BAE -> 2E3B 3BAE -> 2E3B 3FAE -> 2E3F ---- 2E3B: 90 8B 8A FF Table for ? (4 bytes) 2E3F: 58 8D FF Table for ? (3 bytes) ---- 2E42: Pointer table for Spiked Disk Projectile (3 * 2 = 6 bytes) 48AE -> 2E48 8AAE -> 2E8A 09E8 -> 1E809 Remove Enemy ---- Spiked Disk Projectile - Pointer 0 2E48: A9 06 LDA #$06 ; A = 06 (delay between frames when airborne) 2E4A: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 2E4D: A9 BB LDA #$BB ; A = BB 2E4F: 9D 0A03 STA $030A,X ; Enemy Sprite Code X Velocity for Spiked Disk - Going Left 2E52: A9 FD LDA #$FD ; A = FD 2E54: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 2E57: A9 00 LDA #$00 ; A = 00 2E59: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 2E5C: A2 0F LDX #$0F ; X = 0F 2E5E: BD 2805 LDA $0528,X ; Enemy Type 2E61: C9 13 CMP #$13 2E63: F0 03 BEQ $2E68 2E65: CA DEX 2E66: D0 F6 BNE $2E5E 2E68: BD 5803 LDA $0358,X ; Enemy Sprite Attributes 2E6B: 29 40 AND #$40 ; keep bits .x.. .... 2E6D: F0 0C BEQ $2E7B 2E6F: A6 83 LDX $83 X Velocity for Spiked Disk - Going Right 2E71: A9 03 LDA #$03 ; A = 03 2E73: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 2E76: A9 00 LDA #$00 ; A = 00 2E78: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) Y Velocity for Spiked Disk 2E7B: A6 83 LDX $83 2E7D: A9 02 LDA #$02 ; A = 02 2E7F: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 2E82: A9 00 LDA #$00 ; A = 00 2E84: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 2E87: 4C 8EE7 JMP $E78E ---- Spiked Disk Projectile - Pointer 1 2E8A: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 2E8D: C9 E0 CMP #$E0 2E8F: B0 F6 BCS $2E87 2E91: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 2E94: F0 0F BEQ $2EA5 2E96: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 2E99: C9 AF CMP #$AF ; ground limit for Spiked Disk 2E9B: B0 02 BCS $2E9F 2E9D: 90 03 BCC $2EA2 2E9F: 20 D0E8 JSR $E8D0 ; Set Y Velocity to Zero 2EA2: 4C 37E8 JMP $E837 ; Apply Velocities and Scrolling Adjust ---- 2EA5: A9 06 LDA #$06 ; A = 06 2EA7: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 2EAA: FE B805 INC $05B8,X 2EAD: BD B805 LDA $05B8,X 2EB0: 29 01 AND #$01 ; keep bits .... ...x 2EB2: 18 CLC 2EB3: 69 BB ADC #$BB 2EB5: 9D 0A03 STA $030A,X ; Enemy Sprite Code 2EB8: 4C 37E8 JMP $E837 ---- 2EBB: Pointer table for Mechanical Claw (4 * 2 = 8 bytes) C3AE -> 2EC3 E5AE -> 2EE5 30AF -> 2F30 4DAF -> 2F4D ---- 2EC3: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 2EC6: BD A805 LDA $05A8,X ; Enemy Attributes 2EC9: 4A LSR 2ECA: 4A LSR 2ECB: 29 03 AND #$03 ; keep bits .... ..xx 2ECD: A8 TAY 2ECE: B9 E1AE LDA $AEE1,Y 2ED1: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 2ED4: BD A805 LDA $05A8,X ; Enemy Attributes 2ED7: 29 03 AND #$03 ; keep bits .... ..xx 2ED9: 9D A805 STA $05A8,X ; Enemy Attributes 2EDC: A9 20 LDA #$20 ; A = 20 (initial delay before going down) 2EDE: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- 2EE1: 00 20 40 60 Table for possible delays before going down (4 bytes) Enemy Attributes Bits .... xx.. ---- 2EE5: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 2EE8: BD A805 LDA $05A8,X ; Enemy Attributes 2EEB: C9 03 CMP #$03 2EED: F0 25 BEQ $2F14 2EEF: A5 1A LDA $1A ; Permanent Frame Counter 2EF1: 29 7F AND #$7F ; keep bits .xxx xxxx 2EF3: DD 6805 CMP $0568,X ; Enemy Animation Frame Code 2EF6: D0 4D BNE $2F45 2EF8: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 2EFB: C9 2C CMP #$2C 2EFD: 90 46 BCC $2F45 2EFF: BD A805 LDA $05A8,X ; Enemy Attributes 2F02: A8 TAY 2F03: 0A ASL 2F04: 9D E805 STA $05E8,X 2F07: B9 2CAF LDA $AF2C,Y 2F0A: 9D C805 STA $05C8,X 2F0D: A9 00 LDA #$00 ; A = 00 2F0F: 9D D805 STA $05D8,X 2F12: F0 CA BEQ $2EDE 2F14: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 2F17: D0 0E BNE $2F27 2F19: A5 1A LDA $1A ; Permanent Frame Counter 2F1B: C9 C0 CMP #$C0 2F1D: B0 26 BCS $2F45 2F1F: 20 F5EC JSR $ECF5 2F22: C9 10 CMP #$10 2F24: 90 D2 BCC $2EF8 2F26: 60 RTS ---- 2F27: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 2F2A: 38 SEC 2F2B: 60 RTS ---- 2F2C: 04 03 08 03 Table for possible Claw Lengths (4 bytes) Length Code 3 makes the claw activate only when the player is near ---- 2F30: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 2F33: 20 6AAF JSR $AF6A 2F36: B0 0D BCS $2F45 2F38: DE C805 DEC $05C8,X 2F3B: F0 09 BEQ $2F46 2F3D: A9 08 LDA #$08 ; A = 08 2F3F: 20 1FEB JSR $EB1F ; Add A to Enemy Y Position on Screen 2F42: FE D805 INC $05D8,X ; Extension of the Claw 2F45: 60 RTS ---- 2F46: FE E805 INC $05E8,X 2F49: A9 08 LDA #$08 ; A = 08 2F4B: D0 91 BNE $2EDE 2F4D: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 2F50: 20 6AAF JSR $AF6A 2F53: B0 F0 BCS $2F45 2F55: DE D805 DEC $05D8,X ; Extension of the Claw 2F58: 30 05 BMI $2F5F 2F5A: A9 F8 LDA #$F8 ; A = F8 2F5C: 4C 1FEB JMP $EB1F ; Add A to Enemy Y Position on Screen ---- 2F5F: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 2F62: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 2F65: A9 02 LDA #$02 ; A = 02 2F67: 4C 1AE8 JMP $E81A ---- 2F6A: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 2F6D: D0 B8 BNE $2F27 2F6F: BD E805 LDA $05E8,X 2F72: 0A ASL 2F73: A8 TAY 2F74: B9 A2AF LDA $AFA2,Y 2F77: 85 10 STA $10 2F79: B9 A3AF LDA $AFA3,Y 2F7C: 85 11 STA $11 2F7E: BC D805 LDY $05D8,X ; Extension of the Claw 2F81: B1 10 LDA ($10),Y 2F83: 85 10 STA $10 2F85: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 2F88: BC 2403 LDY $0324,X ; Enemy Y Position On Screen 2F8B: 20 A6C1 JSR $C1A6 2F8E: B0 11 BCS $2FA1 2F90: A6 83 LDX $83 ; Temporary storage for X register 2F92: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 2F95: C9 2C CMP #$2C 2F97: A9 00 LDA #$00 ; A = 00 (speed of claw, close to left side) 2F99: 90 03 BCC $2F9E 2F9B: 18 CLC 2F9C: A9 02 LDA #$02 ; A = 02 (speed of Claw) 2F9E: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 2FA1: 60 RTS ---- 2FA2: Pointer table for Claw Tile Codes (8 * 2 = 10 bytes) B2AF -> 2FB2 B6AF -> 2FB6 B2AF -> 2FB2 B6AF -> 2FB6 BAAF -> 2FBA C2AF -> 2FC2 B2AF -> 2FB2 B6AF -> 2FB6 ---- Tables for Claw Tile Codes 2FB2: 80 80 80 80 2FB6: 80 80 82 84 2FBA: 86 86 86 86 2FBE: 86 86 86 86 2FC2: 80 80 80 80 2FC6: 80 80 82 84 ---- 2FCA: Pointer table for Raising Spiked Wall (6 * 2 = C bytes) D6AF -> 2FD6 0CB0 -> 300C 25B0 -> 3025 00B2 -> 3200 87B0 -> 3087 9CB0 -> 309C ---- 2FD6: BD A805 LDA $05A8,X ; Enemy Attributes 2FD9: 29 0C AND #$0C ; keep bits .... xx.. 2FDB: 4A LSR 2FDC: A8 TAY 2FDD: B9 00B0 LDA $B000,Y 2FE0: 9D D805 STA $05D8,X 2FE3: B9 01B0 LDA $B001,Y 2FE6: 9D E805 STA $05E8,X 2FE9: BD A805 LDA $05A8,X ; Enemy Attributes 2FEC: 29 03 AND #$03 ; keep bits .... ..xx 2FEE: A8 TAY 2FEF: B9 08B0 LDA $B008,Y 2FF2: 9D 5805 STA $0558,X 2FF5: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 2FF8: A9 C0 LDA #$C0 ; A = C0 2FFA: 9D A805 STA $05A8,X ; Enemy Attributes 2FFD: 4C 8EE7 JMP $E78E ---- 3000: Table for distance of emergence and subsequent delays (C bytes) 30 00 first wall (no delay) 50 0F distance and delay before second wall 70 1E distance and delay before third wall 40 00 ? ---- 3008: Table for possible delays between emerging steps (4 bytes) 0C 08 04 02 Determines emergence speed ---- 300C: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 300F: 20 F5EC JSR $ECF5 3012: DD D805 CMP $05D8,X 3015: B0 5A BCS $3071 3017: 20 16EB JSR $EB16 301A: A9 06 LDA #$06 ; A = 06 301C: 9D C805 STA $05C8,X 301F: BD E805 LDA $05E8,X 3022: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- 3025: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 3028: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 302B: D0 41 BNE $306E 302D: BD C805 LDA $05C8,X 3030: 0A ASL 3031: 7D C805 ADC $05C8,X 3034: A8 TAY 3035: B9 73B0 LDA $B073,Y 3038: 85 10 STA $10 303A: B9 74B0 LDA $B074,Y 303D: 9D B805 STA $05B8,X 3040: B9 72B0 LDA $B072,Y 3043: 7D 2403 ADC $0324,X ; Enemy Y Position On Screen 3046: A8 TAY 3047: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 304A: E9 0D SBC #$0D 304C: 20 93C1 JSR $C193 304F: B0 20 BCS $3071 3051: A6 83 LDX $83 3053: BD C805 LDA $05C8,X 3056: C9 04 CMP #$04 3058: B0 07 BCS $3061 305A: A9 00 LDA #$00 ; A = 00 305C: A0 0F LDY #$0F ; Y = 0F 305E: 20 26EA JSR $EA26 3061: BD 5805 LDA $0558,X 3064: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 3067: DE C805 DEC $05C8,X 306A: 10 05 BPL $3071 306C: 30 8F BMI $2FFD 306E: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 3071: 60 RTS ---- 3072: Tile Codes for Raising Spiked Wall (15 bytes) C0 91 D0 D0 91 E0 E0 90 F0 E0 8F F8 F0 8E 00 F0 8D 09 F0 8C 09 ---- 3087: A9 00 LDA #$00 ; A = 00 3089: 9D E805 STA $05E8,X 308C: A9 03 LDA #$03 ; A = 03 308E: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 3091: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 3094: A9 24 LDA #$24 ; A = 24 3096: 20 6BC1 JSR $C16B ; Play Sound 3099: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 309C: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 309F: BD E805 LDA $05E8,X 30A2: 0A ASL 30A3: 7D E805 ADC $05E8,X 30A6: A8 TAY 30A7: B9 E7B0 LDA $B0E7,Y 30AA: 85 10 STA $10 30AC: B9 E6B0 LDA $B0E6,Y 30AF: 7D 2403 ADC $0324,X ; Enemy Y Position on Screen 30B2: 84 F0 STY $F0 30B4: A8 TAY 30B5: BD 3E03 LDA $033E,X ; Enemy X Position on Screen 30B8: E9 0D SBC #$0D 30BA: 90 27 BCC $30E3 30BC: 20 93C1 JSR $C193 30BF: B0 B0 BCS $3071 30C1: A6 83 LDX $83 30C3: BD E805 LDA $05E8,X 30C6: 29 03 AND #$03 ; keep bits .... ..xx 30C8: F0 03 BEQ $30CD 30CA: 20 23EA JSR $EA23 30CD: A4 F0 LDY $F0 30CF: B9 E8B0 LDA $B0E8,Y 30D2: A8 TAY 30D3: A9 FC LDA #$FC ; A = FC 30D5: 20 32EB JSR $EB32 ; Set X/Y Position Relative to Enemy Position 30D8: 20 B3EA JSR $EAB3 ; Create Explosion 30DB: FE E805 INC $05E8,X 30DE: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 30E1: D0 8E BNE $3071 30E3: 4C 09E8 JMP $E809 ; Remove Enemy ---- 30E6: Spiked Walls Block Indexes After Destruction (15 bytes) Raising Spiked Walls (3 Tiles High) and High Fixed Walls (4 Tiles High) 00 84 08 Tile 0 (bottom) E0 8B F0 Tile 1 C0 8A D0 Tile 2 A0 86 B0 Tile 3 (top) Fixed Walls (3 Tiles High) 00 84 08 Tile 0 (bottom) E0 8B F0 Tile 1 C0 86 D0 Tile 2 (top) ---- 30FB: Pointer table for Spiked Wall (12) (4 * 2 = 8 bytes) 03B1 -> 3103 00B2 -> 3200 91B0 -> 3091 9CB0 -> 309C ---- 3103: A9 B8 LDA #$B8 ; A = B8 3105: 9D B805 STA $05B8,X 3108: BC A805 LDY $05A8,X ; Enemy Attributes 310B: B9 1AB1 LDA $B11A,Y 310E: 9D E805 STA $05E8,X 3111: B9 1BB1 LDA $B11B,Y 3114: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 3117: 4C F5AF JMP $AFF5 ---- 311A: Table for ? (4 bytes) 04 03 00 04 ---- 311E: Pointer table for Cart Generator (13) (2 * 2 = 4 bytes) 22B1 -> 3122 2CB1 -> 312C ---- 3122: A9 80 LDA #$80 ; A = 80 3124: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 3127: A9 01 LDA #$01 ; A = 01 3129: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- 312C: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 312F: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 3132: 10 35 BPL $3169 3134: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 3137: D0 40 BNE $3179 3139: FE 3805 INC $0538,X ; Enemy Animation Frame Delay Counter 313C: 20 CEED JSR $EDCE ; Find next enemy slot 313F: D0 25 BNE $3166 3141: A9 14 LDA #$14 ; A = 14 (14 = Moving Cart) 3143: 9D 2805 STA $0528,X ; Enemy Type 3146: 20 47EE JSR $EE47 ; Generate Enemy Set Position/Velocity of Generated Cart 3149: A9 F8 LDA #$F8 ; A = F8 314B: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 314E: A9 FF LDA #$FF ; A = FF 3150: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 3153: A9 02 LDA #$02 ; A = 02 3155: 9D E805 STA $05E8,X 3158: A9 80 LDA #$80 ; A = 80 315A: 9D A805 STA $05A8,X ; Enemy Attributes 315D: 20 EDB1 JSR $B1ED 3160: 8A TXA 3161: A6 83 LDX $83 3163: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 3166: A6 83 LDX $83 3168: 60 RTS ---- 3169: BC 6805 LDY $0568,X ; Enemy Animation Frame Code 316C: B9 B804 LDA $04B8,Y ; Enemy Slots (0 = empty) 316F: D0 08 BNE $3179 3171: A9 80 LDA #$80 ; A = 80 3173: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 3176: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 3179: 60 RTS ---- 317A: Pointer table for Moving Cart (14) (6 * 2 = C bytes) 86B1 -> 3186 86B1 -> 3186 86B1 -> 3186 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- 3186: A5 1A LDA $1A ; Permanent Frame Counter 3188: 4A LSR 3189: 4A LSR 318A: 29 01 AND #$01 ; keep bits .... ...x 318C: 18 CLC 318D: 69 2A ADC #$2A 318F: 9D 0A03 STA $030A,X ; Enemy Sprite Code 3192: 20 37E8 JSR $E837 ; Apply Velocities and Scrolling Adjust 3195: BC E805 LDY $05E8,X ; Cart Direction ? (0 = Right, 1 = Left) 3198: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 319B: 18 CLC 319C: 79 D6B1 ADC $B1D6,Y 319F: 85 00 STA $00 31A1: A9 00 LDA #$00 ; A = 00 31A3: 79 D5B1 ADC $B1D5,Y 31A6: 85 10 STA $10 31A8: A5 00 LDA $00 31AA: BC 2403 LDY $0324,X ; Enemy Y Position On Screen 31AD: 20 C3E0 JSR $E0C3 31B0: D0 0E BNE $31C0 31B2: A9 00 LDA #$00 ; A = 00 31B4: A0 09 LDY #$09 ; Y = 09 31B6: 20 35EC JSR $EC35 31B9: D0 BE BNE $3179 31BB: A9 20 LDA #$20 ; A = 20 (gravity for Cart) 31BD: 4C 42EB JMP $EB42 ; Add A to Y Velocity ---- 31C0: BD A805 LDA $05A8,X ; Enemy Attributes 31C3: 30 0B BMI $31D0 31C5: BD E805 LDA $05E8,X 31C8: 49 02 EOR #$02 ; flip bits .... ..x. 31CA: 9D E805 STA $05E8,X 31CD: 4C 1EE9 JMP $E91E ; Reverse X Direction ---- 31D0: A9 04 LDA #$04 ; A = 04 31D2: 4C 1AE8 JMP $E81A ; Set Routine Index to A ---- 31D5: 00 0F FF F1 Table for ? (4 bytes) Related to collsion detection ---- 31D9: Pointer table for Immobile Cart (15) (6 * 2 = C bytes) E5B1 -> 31E5 FBB1 -> 31FB 86B1 -> 3186 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- 31E5: A9 C0 LDA #$C0 ; A = C0 31E7: 20 EDB1 JSR $B1ED ; X Velocity of Cart when stepped on 31EA: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 31ED: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 31F0: A9 2A LDA #$2A ; A = 2A 31F2: 9D 0A03 STA $030A,X ; Enemy Sprite Code 31F5: A9 C8 LDA #$C8 ; A = C8 31F7: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 31FA: 60 RTS ---- 31FB: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 31FE: D0 EA BNE $31EA 3200: 4C A7E8 JMP $E8A7 ; Add Scrolling to Enemy Position ---- 3203: Pointer table for Armored Door (L7) (16) (7 * 2 = E bytes) 11B2 -> 3211 19B2 -> 3219 28B2 -> 3228 40E7 -> 1E740 B0E7 -> 1E7B0 40B2 -> 3240 48B2 -> 3248 ---- Armored Door - Pointer 0 3211: A9 1B LDA #$1B ; A = 1B (Boss Siren) 3213: 20 6BC1 JSR $C16B ; Play Sound 3216: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- Armored Door - Pointer 1 3219: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position *** bridge here for HP modifications *** 321C: BD 7805 LDA $0578,X ; Enemy HP 321F: C9 05 CMP #$05 ; Stop spawning enemies when HP < 5 3221: B0 04 BCS $3227 3223: A9 02 LDA #$02 ; A = 02 3225: 85 85 STA $85 3227: 60 RTS ---- Armored Door - Pointer 2 3228: BD B805 LDA $05B8,X 322B: D0 08 BNE $3235 322D: A9 08 LDA #$08 ; A = 08 322F: 20 27EB JSR $EB27 ; Add A to Enemy X Position on Screen 3232: FE B805 INC $05B8,X 3235: A9 05 LDA #$05 ; A = 05 3237: 20 B5EB JSR $EBB5 323A: 90 01 BCC $323D 323C: 60 RTS ---- 323D: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 3240: 20 14E8 JSR $E814 3243: A9 20 LDA #$20 ; A = 20 3245: 4C 1FEB JMP $EB1F ; Add A to Enemy Y Position on Screen ---- 3248: BC C805 LDY $05C8,X 324B: B9 72B2 LDA $B272,Y 324E: 20 B5EB JSR $EBB5 3251: B0 E9 BCS $323C 3253: A9 05 LDA #$05 ; A = 05 3255: A0 05 LDY #$05 ; Y = 05 3257: 20 26EA JSR $EA26 325A: 20 2FEB JSR $EB2F ; Set X/Y Position Relative to Enemy Position 325D: 20 B3EA JSR $EAB3 ; Create Explosion Type 89 3260: 20 43B2 JSR $B243 3263: FE C805 INC $05C8,X 3266: BD C805 LDA $05C8,X 3269: C9 02 CMP #$02 326B: 90 CF BCC $323C 326D: A9 80 LDA #$80 ; A = 80 (delay before auto-move) 326F: 4C F6EA JMP $EAF6 ---- 3272: 08 04 Tile Codes for Destroyed Door (2 bytes) ---- 3274: Pointer table for Mortar Launcher (17) (8 * 2 = 10 bytes) 84B2 -> 3284 9AB2 -> 329A C3B2 -> 32C3 EFB2 -> 32EF 0FB3 -> 330F 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- Mortar Launcher - Pointer 1 3284: A9 04 LDA #$04 ; A = 04 3286: 20 1FEB JSR $EB1F ; Add A to Enemy Y Position on Screen 3289: A9 04 LDA #$04 ; A = 04 328B: 9D B805 STA $05B8,X 328E: BD A805 LDA $05A8,X ; Enemy Attributes *** bridge here for special launcher *** 3291: 4A LSR 3292: A9 60 LDA #$60 ; A = 60 (initial delay for Attr. 0) 3294: 90 02 BCC $3298 3296: A9 10 LDA #$10 ; A = 10 (initial delay for Attr. 1) 3298: D0 26 BNE $32C0 ---- Mortar Launcher - Pointer 2 329A: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 329D: A5 84 LDA $84 329F: F0 14 BEQ $32B5 32A1: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 32A4: D0 0F BNE $32B5 32A6: 20 1BB3 JSR $B31B 32A9: B0 0A BCS $32B5 32AB: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 32AE: C9 02 CMP #$02 ; Stop at opening frame 2 32B0: B0 04 BCS $32B6 32B2: FE 6805 INC $0568,X ; Enemy Animation Frame Code 32B5: 60 RTS ---- 32B6: 20 16EB JSR $EB16 32B9: A9 10 LDA #$10 ; A = 10 (delay between opening and attack) 32BB: 9D 5805 STA $0558,X ; Delay Between Attacks 32BE: A9 60 LDA #$60 ; A = 60 (total delay for open state) 32C0: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- Mortar Launcher - Pointer 3 32C3: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 32C6: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 32C9: F0 1D BEQ $32E8 32CB: DE 5805 DEC $0558,X ; Delay Between Attacks 32CE: D0 17 BNE $32E7 32D0: A9 0B LDA #$0B ; A = 0B (0B = Mortar Shot) 32D2: 20 52EB JSR $EB52 ; Generate Enemy 32D5: D0 10 BNE $32E7 32D7: BD B805 LDA $05B8,X 32DA: 99 B805 STA $05B8,Y 32DD: DE B805 DEC $05B8,X 32E0: D0 05 BNE $32E7 32E2: A9 04 LDA #$04 ; A = 04 32E4: 9D B805 STA $05B8,X 32E7: 60 RTS ---- 32E8: 20 07EB JSR $EB07 32EB: A9 01 LDA #$01 ; A = 01 32ED: D0 D1 BNE $32C0 ---- Mortar Launcher - Pointer 4 32EF: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 32F2: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 32F5: D0 0D BNE $3304 32F7: 20 1BB3 JSR $B31B 32FA: B0 08 BCS $3304 32FC: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 32FF: F0 04 BEQ $3305 3301: DE 6805 DEC $0568,X ; Enemy Animation Frame Code 3304: 60 RTS ---- 3305: A9 A0 LDA #$A0 ; A = A0 (delay between Mortar Shots) 3307: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 330A: A9 02 LDA #$02 ; A = 02 330C: 4C 1AE8 JMP $E81A ; Set Routine Index to A ---- Mortar Launcher - Pointer 5 330F: A9 03 LDA #$03 ; A = 03 3311: 20 1EB3 JSR $B31E 3314: B0 EE BCS $3304 3316: E6 85 INC $85 3318: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 331B: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 331E: 18 CLC 331F: 69 08 ADC #$08 3321: 20 08EC JSR $EC08 3324: A9 01 LDA #$01 ; A = 01 3326: B0 02 BCS $332A 3328: A9 08 LDA #$08 ; A = 08 (delay between door opening frames) 332A: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 332D: 60 RTS ---- 332E: Pointer table for Enemy Generator (L7) (18) (5 * 2 = A bytes) 38B3 -> 3338 3CB3 -> 333C 8FB3 -> 338F D0B3 -> 33D0 F5B3 -> 33F5 ---- Enemy Generator (L7) - Pointer 1 3338: A9 A0 LDA #$A0 ; A = A0 333A: D0 4C BNE $3388 ; Initial delay before first attack Enemy Generator (L7) - Pointer 2 333C: BD D805 LDA $05D8,X 333F: C9 1E CMP #$1E 3341: B0 06 BCS $3349 3343: A5 85 LDA $85 3345: C9 02 CMP #$02 3347: 90 05 BCC $334E 3349: A9 F0 LDA #$F0 ; A = F0 334B: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 334E: 20 F8B3 JSR $B3F8 3351: B0 0A BCS $335D 3353: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 3356: C9 02 CMP #$02 3358: B0 04 BCS $335E 335A: FE 6805 INC $0568,X ; Enemy Animation Frame Code 335D: 60 RTS ---- 335E: FE D805 INC $05D8,X 3361: A0 00 LDY #$00 ; Y = 00 3363: AD 3403 LDA $0334 3366: C9 A0 CMP #$A0 3368: B0 07 BCS $3371 336A: AD 3503 LDA $0335 336D: C9 A0 CMP #$A0 336F: 90 01 BCC $3372 3371: C8 INY 3372: 98 TYA 3373: 9D C805 STA $05C8,X 3376: A5 34 LDA $34 ; Randomizer 3378: 29 03 AND #$03 ; keep bits .... ..xx 337A: A8 TAY 337B: B9 8BB3 LDA $B38B,Y 337E: 9D B805 STA $05B8,X 3381: A9 10 LDA #$10 ; A = 10 (delay between door open and attack) 3383: 9D 5805 STA $0558,X ; Delay Between Attacks 3386: A9 80 LDA #$80 ; A = 80 (delay for door staying open) 3388: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- 338B: 03 04 02 04 Table for number of enemies generated (4 bytes) ---- Enemy Generator (L7) - Pointer 3 338F: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 3392: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 3395: F0 35 BEQ $33CC 3397: DE 5805 DEC $0558,X ; Delay Between Attacks 339A: D0 2F BNE $33CB 339C: A9 05 LDA #$05 ; A = 05 (05 = Running Man) 339E: 85 0A STA $0A ; Type of Generated Enemy *** bridge here for other enemy types *** 33A0: A0 00 LDY #$00 ; Y = 00 33A2: A9 F8 LDA #$F8 ; A = F8 33A4: 20 57EB JSR $EB57 ; Generate Enemy at Relative Position A,Y 33A7: BD C805 LDA $05C8,X 33AA: D0 10 BNE $33BC 33AC: BD D805 LDA $05D8,X 33AF: C9 14 CMP #$14 33B1: B0 04 BCS $33B7 33B3: A5 85 LDA $85 33B5: F0 05 BEQ $33BC 33B7: A5 34 LDA $34 ; Randomizer 33B9: 4A LSR 33BA: 29 01 AND #$01 ; keep bits .... ...x 33BC: 99 A805 STA $05A8,Y ; Enemy Attributes (facing direction) 33BF: A9 10 LDA #$10 ; A = 10 (delay between generated enemies) 33C1: DE B805 DEC $05B8,X 33C4: D0 02 BNE $33C8 33C6: A9 FF LDA #$FF ; A = FF (delay after last enemy) 33C8: 9D 5805 STA $0558,X ; Delay Between Attacks 33CB: 60 RTS ---- 33CC: A9 01 LDA #$01 ; A = 01 33CE: D0 B8 BNE $3388 Enemy Generator (L7) - Pointer 4 33D0: 20 F8B3 JSR $B3F8 33D3: B0 08 BCS $33DD 33D5: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 33D8: F0 04 BEQ $33DE 33DA: DE 6805 DEC $0568,X ; Enemy Animation Frame Code 33DD: 60 RTS ---- 33DE: A5 34 LDA $34 ; Randomizer 33E0: 4A LSR 33E1: 4A LSR 33E2: 4A LSR 33E3: 29 03 AND #$03 ; keep bits .... ..xx 33E5: A8 TAY 33E6: B9 F1B3 LDA $B3F1,Y 33E9: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 33EC: A9 02 LDA #$02 ; A = 02 33EE: 4C 1AE8 JMP $E81A ; Set Routine Index to A ---- 33F1: F0 80 A0 C0 Possible delays between door openings (4 bytes) ---- Enemy Generator (L7) - Pointer 5 33F5: 4C 09E8 JMP $E809 ; Remove Enemy ---- 33F8: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 33FB: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 33FE: D0 1C BNE $341C 3400: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 3403: 0A ASL 3404: A8 TAY 3405: B9 1EB4 LDA $B41E,Y 3408: 85 10 STA $10 340A: B9 1FB4 LDA $B41F,Y 340D: A0 00 LDY #$00 ; Y = 00 340F: 20 CEEB JSR $EBCE 3412: A9 08 LDA #$08 ; A = 08 3414: 90 02 BCC $3418 3416: A9 01 LDA #$01 ; A = 01 3418: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 341B: 60 RTS ---- 341C: 38 SEC 341D: 60 RTS ---- 341E: 03 12 13 14 07 15 Table for Door Tile Mapping Codes (6 bytes) ---- 3424: Pointer table for Alien Guardian (D * 2 = 1A bytes) 4BB4 -> 344B 7CB4 -> 347C 45B5 -> 3545 9BB6 -> 369B B2B6 -> 36B2 72B5 -> 3572 D8B5 -> 35D8 01B6 -> 3601 23B6 -> 3623 43B6 -> 3643 76B6 -> 3676 02BD -> 3D02 09E8 -> 1E809 Remove Enemy ---- 343E: A5 31 LDA $31 ; Game Completion Count 3440: 20 46B4 JSR $B446 ; Multiply A by 10 3443: 85 07 STA $07 3445: 60 RTS ---- Multiply A by 10 3446: 0A ASL 3447: 0A ASL 3448: 0A ASL 3449: 0A ASL 344A: 60 RTS ---- Alien Guardian - Pointer 1 344B: 20 61B4 JSR $B461 344E: A9 20 LDA #$20 ; A = 20 3450: 9D E805 STA $05E8,X ; delay between mouth movements 3453: A9 90 LDA #$90 ; A = 90 3455: 9D B805 STA $05B8,X ; Tile Mapping Code (90 = closed mouth) 3458: A9 40 LDA #$40 ; A = 40 345A: 85 76 STA $76 ; Auto-Scroll Counter 345C: A9 03 LDA #$03 ; A = 03 345E: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- 3461: 20 3EB4 JSR $B43E Alien Guardian HP is calculated like this: Weapon Strength Code * 10 + 37 + Completion Count * 10 If the result is >= A0, HP is set to A0 Heart HP is calculated the same way 3464: A5 2F LDA $2F ; Current Weapon Strength Code 3466: 20 46B4 JSR $B446 ; Multiply A by 10 3469: 18 CLC 346A: 69 37 ADC #$37 346C: B0 08 BCS $3476 346E: 65 07 ADC $07 3470: B0 04 BCS $3476 3472: C9 A0 CMP #$A0 3474: 90 02 BCC $3478 3476: A9 A0 LDA #$A0 ; A = A0 (max HP) 3478: 9D 7805 STA $0578,X ; Enemy HP 347B: 60 RTS ---- Alien Guardian - Pointer 2 347C: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 347F: C9 50 CMP #$50 3481: B0 03 BCS $3486 3483: 4C A7E8 JMP $E8A7 ; Add Scrolling to Enemy Position ---- 3486: BD C805 LDA $05C8,X 3489: F0 03 BEQ $348E 348B: 20 E5B4 JSR $B4E5 348E: BD D805 LDA $05D8,X 3491: F0 03 BEQ $3496 3493: 20 FDB4 JSR $B4FD 3496: DE E805 DEC $05E8,X 3499: D0 22 BNE $34BD 349B: A9 20 LDA #$20 ; A = 20 349D: 9D E805 STA $05E8,X ; delay between mouth movements 34A0: BD B805 LDA $05B8,X 34A3: C9 90 CMP #$90 34A5: D0 0B BNE $34B2 34A7: A9 92 LDA #$92 ; A = 92 34A9: 9D B805 STA $05B8,X ; Tile Mapping code for open mouth 34AC: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 34AF: 4C B7B4 JMP $B4B7 ---- 34B2: A9 90 LDA #$90 ; A = 90 34B4: 9D B805 STA $05B8,X ; Tile Mapping code for closed mouth 34B7: 20 E5B4 JSR $B4E5 34BA: 20 FDB4 JSR $B4FD 34BD: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 34C0: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 34C3: D0 03 BNE $34C8 34C5: 4C 3DB5 JMP $B53D ---- 34C8: 60 RTS ---- 34C9: 86 83 STX $83 34CB: A5 08 LDA $08 34CD: 85 10 STA $10 34CF: A5 09 LDA $09 34D1: 38 SEC 34D2: E9 10 SBC #$10 34D4: A8 TAY 34D5: A5 0A LDA $0A 34D7: 38 SEC 34D8: E9 0E SBC #$0E 34DA: 20 93C1 JSR $C193 34DD: A6 83 LDX $83 34DF: A9 00 LDA #$00 ; A = 00 34E1: 2A ROL 34E2: 85 0B STA $0B 34E4: 60 RTS ---- 34E5: BD B805 LDA $05B8,X 34E8: 85 08 STA $08 34EA: 18 CLC 34EB: 69 01 ADC #$01 34ED: 85 0C STA $0C 34EF: A9 10 LDA #$10 ; A = 10 34F1: 20 57BD JSR $BD57 34F4: 20 1BB5 JSR $B51B 34F7: A5 0B LDA $0B 34F9: 9D C805 STA $05C8,X 34FC: 60 RTS ---- 34FD: BD B805 LDA $05B8,X 3500: C9 92 CMP #$92 3502: F0 02 BEQ $3506 3504: A9 81 LDA #$81 ; A = 81 3506: 18 CLC 3507: 69 02 ADC #$02 3509: 85 08 STA $08 350B: A0 20 LDY #$20 ; Y = 20 350D: A9 11 LDA #$11 ; A = 11 350F: 20 5DBD JSR $BD5D 3512: 20 C9B4 JSR $B4C9 3515: A5 0B LDA $0B 3517: 9D D805 STA $05D8,X 351A: 60 RTS ---- 351B: A5 09 LDA $09 351D: 85 05 STA $05 351F: A5 0A LDA $0A 3521: 85 06 STA $06 3523: A5 0C LDA $0C 3525: 85 04 STA $04 3527: 20 C9B4 JSR $B4C9 352A: A5 04 LDA $04 352C: 85 08 STA $08 352E: A5 05 LDA $05 3530: 85 09 STA $09 3532: A5 06 LDA $06 3534: 38 SEC 3535: E9 20 SBC #$20 3537: 85 0A STA $0A 3539: 4C C9B4 JMP $B4C9 ---- 353C: 60 RTS ---- 353D: 20 FDB4 JSR $B4FD 3540: A9 20 LDA #$20 ; A = 20 (delay between mouth open and attack) 3542: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- Alien Guardian - Pointer 3 3545: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 3548: A5 8E LDA $8E ; Enemy Attack Switch 354A: F0 1C BEQ $3568 354C: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 354F: BD 3805 LDA $0538,X 3552: C9 02 CMP #$02 3554: 90 08 BCC $355E 3556: D0 E4 BNE $353C 3558: A5 2F LDA $2F ; Current Weapon Strength Code 355A: C9 03 CMP #$03 355C: 90 DE BCC $353C 355E: A9 11 LDA #$11 ; A = 11 (11 = Alien Foetus) 3560: 20 52EB JSR $EB52 ; Generate Enemy 3563: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 3566: D0 D4 BNE $353C 3568: A9 03 LDA #$03 ; A = 03 (mouth movements before next attack) 356A: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 356D: A9 02 LDA #$02 ; A = 02 356F: 4C 1AE8 JMP $E81A ; Set Routine Index to A ---- Alien Guardian - Pointer 6 3572: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 3575: A9 00 LDA #$00 ; A = 00 3577: 20 86B5 JSR $B586 357A: A5 0B LDA $0B 357C: D0 BE BNE $353C 357E: A9 01 LDA #$01 ; A = 01 3580: 9D C805 STA $05C8,X 3583: 4C 8EE7 JMP $E78E ---- 3586: 0A ASL 3587: 0A ASL 3588: A8 TAY 3589: B9 A8B5 LDA $B5A8,Y 358C: 85 08 STA $08 358E: B9 A9B5 LDA $B5A9,Y 3591: 85 0C STA $0C 3593: B9 AAB5 LDA $B5AA,Y 3596: 18 CLC 3597: 7D 2403 ADC $0324,X ; Enemy Y Position On Screen 359A: 85 09 STA $09 359C: B9 ABB5 LDA $B5AB,Y 359F: 18 CLC 35A0: 7D 3E03 ADC $033E,X ; Enemy X Position On Screen 35A3: 85 0A STA $0A 35A5: 4C 1BB5 JMP $B51B ---- 35A8: Tile Codes for Guardian and Heart (C * 4 = 30 bytes) Byte 0: Tile Code 1 - Right Byte 1: Tile Code 2 - Left Byte 2: Relative Y Position Byte 3: Relative X Position 83 83 00 10 95 96 C0 30 97 83 E0 50 84 85 F0 10 Heart - Frame 0 - Top-Right and Top-Left 86 87 10 10 Heart - Frame 0 - Bottom-Right and Bottom-Left 88 89 F0 10 Heart - Frame 1 - Top-Right and Top-Left 8A 8B 10 10 Heart - Frame 1 - Bottom-Right and Bottom-Left 8C 8D F0 10 Heart - Destroyed - Top-Right and Top-Left 8E 8F 10 10 Heart - Destroyed - Bottom-Right and Bottom-Left 83 83 20 F0 83 83 40 F0 29 29 60 F0 ---- Alien Guardian - Pointer 7 35D8: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 35DB: BD C805 LDA $05C8,X 35DE: F0 14 BEQ $35F4 35E0: A9 83 LDA #$83 ; A = 83 35E2: 85 08 STA $08 35E4: A0 20 LDY #$20 ; Y = 20 35E6: A9 10 LDA #$10 ; A = 10 35E8: 20 5DBD JSR $BD5D 35EB: 20 C9B4 JSR $B4C9 35EE: A5 0B LDA $0B 35F0: 9D C805 STA $05C8,X 35F3: 60 RTS ---- 35F4: A9 E0 LDA #$E0 ; A = E0 35F6: 20 1FEB JSR $EB1F ; Add A to Enemy Y Position on Screen 35F9: 20 72B5 JSR $B572 35FC: A9 20 LDA #$20 ; A = 20 35FE: 4C 1FEB JMP $EB1F ; Add A to Enemy Y Position on Screen ---- Alien Guardian - Pointer 8 3601: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 3604: BD C805 LDA $05C8,X 3607: F0 0B BEQ $3614 3609: A9 01 LDA #$01 ; A = 01 360B: 20 86B5 JSR $B586 360E: A5 0B LDA $0B 3610: 9D C805 STA $05C8,X 3613: 60 RTS ---- 3614: A9 02 LDA #$02 ; A = 02 3616: 20 86B5 JSR $B586 3619: A5 0B LDA $0B 361B: D0 F6 BNE $3613 361D: FE C805 INC $05C8,X 3620: 4C 8EE7 JMP $E78E ---- Alien Guardian - Pointer 9 3623: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 3626: A9 83 LDA #$83 ; A = 83 3628: 85 08 STA $08 362A: A9 30 LDA #$30 ; A = 30 362C: 20 57BD JSR $BD57 362F: 20 C9B4 JSR $B4C9 3632: A0 C0 LDY #$C0 ; Y = C0 3634: A9 F0 LDA #$F0 ; A = F0 3636: 20 5DBD JSR $BD5D 3639: A9 83 LDA #$83 ; A = 83 363B: 85 08 STA $08 363D: 20 C9B4 JSR $B4C9 3640: 4C 19B6 JMP $B619 ---- Alien Guardian - Pointer A 3643: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 3646: BD C805 LDA $05C8,X 3649: F0 0E BEQ $3659 364B: A9 09 LDA #$09 ; A = 09 364D: 20 86B5 JSR $B586 3650: 48 PHA 3651: 20 61B6 JSR $B661 3654: 68 PLA 3655: 9D C805 STA $05C8,X 3658: 60 RTS ---- 3659: A9 0A LDA #$0A ; A = 0A 365B: 20 4DB6 JSR $B64D 365E: F0 BD BEQ $361D 3660: 60 RTS ---- 3661: A5 12 LDA $12 3663: 48 PHA 3664: 20 23EA JSR $EA23 3667: 68 PLA 3668: 18 CLC 3669: 69 04 ADC #$04 366B: 85 12 STA $12 366D: A5 13 LDA $13 366F: 69 00 ADC #$00 3671: 85 13 STA $13 3673: 4C 23EA JMP $EA23 ---- Alien Guardian - Pointer B 3676: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 3679: BD C805 LDA $05C8,X 367C: F0 1A BEQ $3698 367E: A9 0B LDA #$0B ; A = 0B 3680: 20 86B5 JSR $B586 3683: 48 PHA 3684: A5 12 LDA $12 3686: 38 SEC 3687: E9 20 SBC #$20 3689: 85 12 STA $12 368B: A5 13 LDA $13 368D: E9 00 SBC #$00 368F: 85 13 STA $13 3691: 20 61B6 JSR $B661 3694: 68 PLA 3695: F0 01 BEQ $3698 3697: 60 RTS ---- 3698: 4C 8EE7 JMP $E78E ---- Alien Guardian - Pointer 4 369B: A9 55 LDA #$55 ; A = 55 369D: 20 6BC1 JSR $C16B ; Play Sound 36A0: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 36A3: 20 F8ED JSR $EDF8 ; Set 5B8,5C8,5D8,5E8 to Zero 36A6: 85 08 STA $08 36A8: 85 09 STA $09 36AA: 20 D8B6 JSR $B6D8 36AD: A9 05 LDA #$05 ; A = 05 36AF: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- Alien Guardian - Pointer 5 Heart - Pointer 5 36B2: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 36B5: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 36B8: D0 DD BNE $3697 36BA: A9 05 LDA #$05 ; A = 05 36BC: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 36BF: FE B805 INC $05B8,X 36C2: BD B805 LDA $05B8,X 36C5: C9 0C CMP #$0C 36C7: F0 CF BEQ $3698 36C9: 4C CCB6 JMP $B6CC ---- 36CC: 0A ASL 36CD: A8 TAY 36CE: B9 34BD LDA $BD34,Y 36D1: 85 08 STA $08 36D3: B9 35BD LDA $BD35,Y 36D6: 85 09 STA $09 36D8: A4 08 LDY $08 36DA: A5 09 LDA $09 36DC: 20 32EB JSR $EB32 ; Set X/Y Position Relative to Enemy Position 36DF: 4C B3EA JMP $EAB3 ; Create Explosion Type 89 ---- 36E2: Pointer table for Alien Foetus (11) (5 * 2 = A bytes) ECB6 -> 36EC 36B7 -> 3736 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- Alien Foetus - Pointer 0 36EC: 20 D2B7 JSR $B7D2 36EF: 1E D805 ASL $05D8,X Alien Foetus HP = Completion Count + 2 36F2: A5 31 LDA $31 ; Game Completion Count 36F4: 18 CLC 36F5: 69 02 ADC #$02 36F7: 9D 7805 STA $0578,X ; Enemy HP 36FA: A9 AC LDA #$AC ; A = AC 36FC: 9D 0A03 STA $030A,X ; Enemy Sprite Code 36FF: A9 06 LDA #$06 ; A = 06 3701: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 3704: A5 39 LDA $39 ; Player 2 Game Over state (1 = Game Over) 3706: D0 15 BNE $371D 3708: A5 34 LDA $34 ; Randomizer 370A: 65 1A ADC $1A ; Permanent Frame Counter 370C: 29 1F AND #$1F ; keep bits ...x xxxx 370E: 18 CLC 370F: 69 0E ADC #$0E 3711: 9D E805 STA $05E8,X 3714: A5 38 LDA $38 ; Player 1 Game Over state (1 = Game Over) 3716: F0 05 BEQ $371D 3718: A9 01 LDA #$01 ; A = 01 371A: 9D E805 STA $05E8,X 371D: A5 34 LDA $34 ; Randomizer 371F: 29 03 AND #$03 ; keep bits .... ..xx 3721: D0 02 BNE $3725 3723: A9 03 LDA #$03 ; A = 03 3725: 0A ASL 3726: BC A805 LDY $05A8,X ; Enemy Attributes 3729: F0 02 BEQ $372D 372B: A9 06 LDA #$06 ; A = 06 372D: 9D B805 STA $05B8,X 3730: FE B804 INC $04B8,X 3733: 4C A6B7 JMP $B7A6 ---- Alien Foetus - Pointer 1 3736: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 3739: D0 49 BNE $3784 373B: A9 06 LDA #$06 ; A = 06 373D: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 3740: A0 FF LDY #$FF ; Y = FF 3742: BD B805 LDA $05B8,X 3745: 18 CLC 3746: 69 01 ADC #$01 3748: C9 0C CMP #$0C 374A: D0 02 BNE $374E 374C: A9 00 LDA #$00 ; A = 00 374E: 38 SEC 374F: E9 03 SBC #$03 3751: C8 INY 3752: B0 FA BCS $374E 3754: 98 TYA 3755: 0A ASL 3756: 85 08 STA $08 3758: BD C805 LDA $05C8,X 375B: 49 01 EOR #$01 ; flip bits .... ...x 375D: 9D C805 STA $05C8,X 3760: BD 5803 LDA $0358,X ; Enemy Animation Frame Delay Counter 3763: 29 3F AND #$3F ; keep bits ..xx xxxx 3765: 9D 5803 STA $0358,X ; Enemy Animation Frame Delay Counter 3768: A5 08 LDA $08 376A: C9 04 CMP #$04 376C: 90 0D BCC $377B 376E: BD 5803 LDA $0358,X 3771: 09 C0 ORA #$C0 ; set bits xx.. .... 3773: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 3776: A5 08 LDA $08 3778: 38 SEC 3779: E9 04 SBC #$04 377B: 18 CLC 377C: 69 AC ADC #$AC 377E: 7D C805 ADC $05C8,X 3781: 9D 0A03 STA $030A,X ; Enemy Sprite Code 3784: DE D805 DEC $05D8,X 3787: D0 03 BNE $378C 3789: 20 8FB7 JSR $B78F 378C: 4C 37E8 JMP $E837 ; Apply Velocities and Scrolling Adjust ---- 378F: BD E805 LDA $05E8,X 3792: 29 3E AND #$3E ; keep bits ..xx xxx. 3794: F0 22 BEQ $37B8 3796: 20 D2B7 JSR $B7D2 3799: 20 2FEB JSR $EB2F ; Set X/Y Position Relative to Enemy Position 379C: BD E805 LDA $05E8,X 379F: 29 01 AND #$01 ; keep bits .... ...x 37A1: 85 0A STA $0A 37A3: 20 20F4 JSR $F420 37A6: BD B805 LDA $05B8,X 37A9: 0A ASL 37AA: 0A ASL 37AB: A8 TAY 37AC: 20 B9B7 JSR $B7B9 37AF: BD E805 LDA $05E8,X 37B2: 18 CLC 37B3: E9 02 SBC #$02 37B5: 9D E805 STA $05E8,X 37B8: 60 RTS ---- 37B9: B9 EFB9 LDA $B9EF,Y 37BC: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 37BF: B9 F0B9 LDA $B9F0,Y 37C2: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 37C5: B9 FBB9 LDA $B9FB,Y 37C8: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 37CB: B9 FCB9 LDA $B9FC,Y 37CE: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 37D1: 60 RTS ---- 37D2: A4 8B LDY $8B 37D4: E6 8B INC $8B 37D6: B9 E8B7 LDA $B7E8,Y 37D9: C9 FF CMP #$FF 37DB: D0 07 BNE $37E4 37DD: A9 00 LDA #$00 ; A = 00 37DF: 85 8B STA $8B 37E1: 4C D2B7 JMP $B7D2 ---- 37E4: 9D D805 STA $05D8,X 37E7: 60 RTS ---- 37E8: Table for ? (E bytes) 16 0F 08 13 3A 06 21 3A 1D 14 12 28 48 FF ---- 37F6: Pointer table for Alien Mouth (12) (6 * 2 = C bytes) 02B8 -> 3802 1FB8 -> 381F 5EB8 -> 385E 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- Alien Mouth - Pointer 0 Alien Mouth HP = Weapon Strength + 3 + Completion Count * 2 Completion 0 1 2 3 4 5 6 7 Normal 3 5 7 9 B D F 11 Weapon F 4 6 8 A C E 10 12 Weapon M or L 5 7 9 B D F 11 13 Weapon S 6 8 A C E 10 12 14 3802: A5 2F LDA $2F ; Current Weapon Strength Code 3804: 69 03 ADC #$03 3806: 85 08 STA $08 3808: A5 31 LDA $31 ; Game Completion Count 380A: 0A ASL 380B: 65 08 ADC $08 380D: 9D 7805 STA $0578,X ; Enemy HP 3810: A9 20 LDA #$20 ; A = 20 (delay for first frame) 3812: 9D D805 STA $05D8,X 3815: A9 01 LDA #$01 ; A = 01 3817: 20 B5EB JSR $EBB5 381A: A9 0A LDA #$0A ; A = 0A (delay before first attack) 381C: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- Alien Mouth - Pointer 1 381F: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 3822: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 3825: C9 20 CMP #$20 ; Stop moving/attacking past this X position 3827: B0 01 BCS $382A 3829: 60 RTS ---- 382A: A5 8E LDA $8E ; Enemy Attack Switch 382C: F0 13 BEQ $3841 382E: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 3831: D0 0E BNE $3841 3833: A9 13 LDA #$13 ; A = 13 (13 = White Sentient Blob) 3835: 20 52EB JSR $EB52 ; Generate Enemy 3838: A5 34 LDA $34 ; Randomizer 383A: 29 1F AND #$1F ; keep bits ...x xxxx 383C: 69 C0 ADC #$C0 ; delay between White Sentient Blob spawn 383E: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 3841: DE D805 DEC $05D8,X 3844: D0 17 BNE $385D 3846: BD E805 LDA $05E8,X 3849: 29 01 AND #$01 ; keep bits .... ...x 384B: 18 CLC 384C: 69 00 ADC #$00 384E: 20 B5EB JSR $EBB5 3851: A9 01 LDA #$01 ; A = 01 3853: B0 05 BCS $385A 3855: FE E805 INC $05E8,X 3858: A9 20 LDA #$20 ; A = 20 (delay between mouth open/closed) 385A: 9D D805 STA $05D8,X 385D: 60 RTS ---- Alien Mouth - Pointer 2 385E: A9 02 LDA #$02 ; A = 02 3860: 20 B5EB JSR $EBB5 3863: B0 F8 BCS $385D 3865: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 3868: Pointer table for White Sentient Blob (13) (6 * 2 = C bytes) 74B8 -> 3874 B3B8 -> 38B3 40B9 -> 3940 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- 3874: A5 34 LDA $34 ; Randomizer 3876: 29 1F AND #$1F ; keep bits ...x xxxx 3878: 69 50 ADC #$50 387A: 9D C805 STA $05C8,X ; delay before sentience starts 387D: A9 C0 LDA #$C0 ; A = C0 387F: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 3882: A5 39 LDA $39 ; Player 2 Game Over state (1 = Game Over) 3884: D0 12 BNE $3898 3886: A5 34 LDA $34 ; Randomizer 3888: 65 1A ADC $1A ; Permanent Frame Counter 388A: 29 01 AND #$01 ; keep bits .... ...x 388C: 9D D805 STA $05D8,X 388F: A5 38 LDA $38 ; Player 1 Game Over state (1 = Game Over) 3891: F0 05 BEQ $3898 3893: A9 01 LDA #$01 ; A = 01 3895: 9D D805 STA $05D8,X 3898: A9 B0 LDA #$B0 ; A = B0 389A: 9D 0A03 STA $030A,X ; Enemy Sprite Code 389D: BD D805 LDA $05D8,X 38A0: 85 0A STA $0A 38A2: 20 2FEB JSR $EB2F ; Set X/Y Position Relative to Enemy Position 38A5: 20 51F4 JSR $F451 38A8: A5 0C LDA $0C 38AA: 9D B805 STA $05B8,X 38AD: FE B804 INC $04B8,X ; Enemy Routine Index 38B0: 4C E8B8 JMP $B8E8 ---- 38B3: A9 B0 LDA #$B0 ; A = B0 38B5: 20 ADB9 JSR $B9AD 38B8: 20 37E8 JSR $E837 ; Apply Velocities and Scrolling Adjust 38BB: BD E805 LDA $05E8,X 38BE: D0 61 BNE $3921 38C0: 20 F0B8 JSR $B8F0 38C3: C9 08 CMP #$08 38C5: D0 03 BNE $38CA 38C7: 20 D0B8 JSR $B8D0 38CA: DE C805 DEC $05C8,X 38CD: F0 47 BEQ $3916 38CF: 60 RTS ---- 38D0: BC B805 LDY $05B8,X 38D3: BD F804 LDA $04F8,X ; Enemy Y Velocity (low byte) 38D6: 18 CLC 38D7: 79 F8B8 ADC $B8F8,Y 38DA: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 38DD: BD 1805 LDA $0518,X ; Enemy X Velocity (low byte) 38E0: 18 CLC 38E1: 79 FEB8 ADC $B8FE,Y 38E4: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 38E7: 60 RTS ---- 38E8: BD B805 LDA $05B8,X 38EB: 0A ASL 38EC: A8 TAY 38ED: 4C B9B7 JMP $B7B9 ---- 38F0: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 38F3: 4A LSR 38F4: 4A LSR 38F5: 4A LSR 38F6: 4A LSR 38F7: 60 RTS ---- 38F8: 00 FD FA F8 F6 F5 Table for ? (6 bytes) 38FE: F4 F5 F6 F8 FA FD Table for ? (6 bytes) 00 03 06 08 0A 0B 0C 0B 0A 08 06 03 00 FD FA F8 F6 F5 ---- 3916: A5 34 LDA $34 ; Randomizer 3918: 29 20 AND #$20 ; keep bits ..x. .... 391A: 18 CLC 391B: 69 02 ADC #$02 391D: 9D E805 STA $05E8,X 3920: 60 RTS ---- 3921: 20 CDE8 JSR $E8CD ; Set X/Y Velocities to Zero 3924: DE E805 DEC $05E8,X 3927: D0 F7 BNE $3920 3929: A9 08 LDA #$08 ; A = 08 (delay of freeze before sentience) 392B: 9D E805 STA $05E8,X 392E: 9D C805 STA $05C8,X 3931: FE B804 INC $04B8,X 3934: 20 A2B9 JSR $B9A2 3937: 20 A2B9 JSR $B9A2 393A: 20 A2B9 JSR $B9A2 393D: 4C A2B9 JMP $B9A2 ---- 3940: A9 B0 LDA #$B0 ; A = B0 3942: 20 ADB9 JSR $B9AD 3945: BD E805 LDA $05E8,X 3948: F0 42 BEQ $398C 394A: DE C805 DEC $05C8,X 394D: F0 03 BEQ $3952 394F: 4C 8CB9 JMP $B98C ---- 3952: FE E805 INC $05E8,X 3955: FE E805 INC $05E8,X 3958: BD E805 LDA $05E8,X 395B: 9D C805 STA $05C8,X 395E: 20 A2B9 JSR $B9A2 3961: BD B805 LDA $05B8,X 3964: 0A ASL 3965: A8 TAY 3966: B9 F2B9 LDA $B9F2,Y 3969: 85 08 STA $08 396B: B9 F1B9 LDA $B9F1,Y 396E: 20 8FB9 JSR $B98F 3971: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 3974: A5 08 LDA $08 3976: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 3979: B9 F8B9 LDA $B9F8,Y 397C: 85 08 STA $08 397E: B9 F7B9 LDA $B9F7,Y 3981: 20 8FB9 JSR $B98F 3984: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 3987: A5 08 LDA $08 3989: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 398C: 4C 37E8 JMP $E837 ; Apply Velocities and Scrolling Adjust ---- 398F: 85 09 STA $09 3991: 85 0A STA $0A 3993: A5 08 LDA $08 3995: 0A ASL 3996: 26 09 ROL $09 3998: 18 CLC 3999: 65 08 ADC $08 399B: 85 08 STA $08 399D: A5 09 LDA $09 399F: 65 0A ADC $0A 39A1: 60 RTS ---- 39A2: 20 2FEB JSR $EB2F ; Set X/Y Position Relative to Enemy Position 39A5: BD D805 LDA $05D8,X 39A8: 85 0A STA $0A 39AA: 4C 1AF4 JMP $F41A ---- 39AD: 85 08 STA $08 39AF: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 39B2: 29 0F AND #$0F ; keep bits .... xxxx 39B4: A8 TAY 39B5: 20 F0B8 JSR $B8F0 39B8: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 39BB: DE 3805 DEC $0538,X 39BE: D0 18 BNE $39D8 39C0: B9 EAB9 LDA $B9EA,Y 39C3: C9 FF CMP #$FF 39C5: D0 05 BNE $39CC 39C7: A0 00 LDY #$00 ; Y = 00 39C9: 4C C0B9 JMP $B9C0 ---- 39CC: C8 INY 39CD: 18 CLC 39CE: 65 08 ADC $08 39D0: 9D 0A03 STA $030A,X ; Enemy Sprite Code 39D3: A9 08 LDA #$08 ; A = 08 39D5: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 39D8: BD 3805 LDA $0538,X 39DB: 20 46B4 JSR $B446 ; Multiply A by 10 39DE: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 39E1: 98 TYA 39E2: 18 CLC 39E3: 7D 3805 ADC $0538,X ; Enemy Animation Frame Delay Counter 39E6: 9D 3805 STA $0538,X 39E9: 60 RTS ---- 39EA: 00 01 02 01 FF Alien Spider Sprite Codes (5 bytes) ---- Related to various velocities Smoothing velocities ? 39EF: 00 00 00 42 00 7F 00 B2 00 DD 00 F7 Table for ? (C bytes) 39FB: 00 FF 00 F7 00 DD 00 B2 00 7F 00 42 Table for ? (C bytes) ---- 3A07: Table for ? (24 bytes) 00 00 FF BE FF 81 FF 4E FF 23 FF 09 FF 01 FF 09 FF 23 FF 4E FF 81 FF BE 00 00 00 42 00 7F 00 B2 00 DD 00 F7 ---- 3A2B: Pointer table for Alien Spider (14) (8 * 2 = 10 bytes) 3BBA -> 3A3B 44BB -> 3B44 68BB -> 3B68 8CBA -> 3A8C 2ABB -> 3B2A 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- Alien Spider - Pointer 1 3A3B: 20 6FBA JSR $BA6F ; Calculate Alien Spider HP and other variables 3A3E: 20 F8ED JSR $EDF8 ; Set 5B8,5C8,5D8,5E8 to Zero 3A41: A9 B3 LDA #$B3 ; A = B3 3A43: 9D 0A03 STA $030A,X ; Enemy Sprite Code Initial X Velocity of Alien Spider 3A46: A9 FE LDA #$FE ; A = FE 3A48: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 3A4B: A9 80 LDA #$80 ; A = 80 3A4D: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 3A50: 20 D0E8 JSR $E8D0 ; Set Y Velocity to Zero 3A53: A5 39 LDA $39 ; Player 2 Game Over state (1 = Game Over) 3A55: D0 09 BNE $3A60 3A57: A5 34 LDA $34 ; Randomizer 3A59: 65 1A ADC $1A ; Permanent Frame Counter 3A5B: 29 01 AND #$01 ; keep bits .... ...x 3A5D: 9D B805 STA $05B8,X 3A60: A5 34 LDA $34 ; Randomizer 3A62: 4A LSR 3A63: 65 1A ADC $1A ; Permanent Frame Counter 3A65: 29 02 AND #$02 ; keep bits .... ..x. 3A67: 9D C805 STA $05C8,X 3A6A: A9 04 LDA #$04 ; A = 04 3A6C: 4C 1AE8 JMP $E81A ; Set Routine Index to A ---- Alien Spider HP = Weapon Strength + Completion Count + 1 3A6F: A5 2F LDA $2F ; Current Weapon Strength Code 3A71: 65 31 ADC $31 ; Game Completion Count 3A73: 69 01 ADC #$01 3A75: 9D 7805 STA $0578,X ; Enemy HP 3A78: A9 60 LDA #$60 ; A = 60 3A7A: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 3A7D: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 3A80: C9 80 CMP #$80 3A82: A9 00 LDA #$00 ; A = 00 3A84: B0 02 BCS $3A88 3A86: A9 80 LDA #$80 ; A = 80 (80 = vertical flip) 3A88: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 3A8B: 60 RTS ---- Alien Spider - Pointer 4 3A8C: A9 B3 LDA #$B3 ; A = B3 3A8E: 20 ADB9 JSR $B9AD 3A91: BD D805 LDA $05D8,X 3A94: D0 7D BNE $3B13 3A96: BD C805 LDA $05C8,X 3A99: F0 78 BEQ $3B13 3A9B: BD B805 LDA $05B8,X ; Targeted Player (selected at random) 3A9E: A8 TAY 3A9F: B9 1A03 LDA $031A,Y ; Player Y Position on Screen 3AA2: C9 20 CMP #$20 3AA4: 90 6D BCC $3B13 3AA6: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 3AA9: 38 SEC 3AAA: F9 3403 SBC $0334,Y 3AAD: C9 30 CMP #$30 ; distance for initiating descent 3AAF: B0 62 BCS $3B13 3AB1: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 3AB4: D9 1A03 CMP $031A,Y ; Player Y Position on Screen Replace with C9 80 EA, to avoid small downward movement 3AB7: B0 20 BCS $3AD9 Alien Spider Y Velocity while descending to ground 3AB9: A9 02 LDA #$02 ; A = 02 3ABB: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 3ABE: A9 40 LDA #$40 ; A = 40 3AC0: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 3AC3: A5 2F LDA $2F ; Current Weapon Strength Code 3AC5: 20 46B4 JSR $B446 ; Multiply A by 10 Add Weapon Strength * 10 to Y Velocity 3AC8: 7D F804 ADC $04F8,X ; Enemy Y Velocity (low byte) 3ACB: 9D F804 STA $04F8,X 3ACE: BD E804 LDA $04E8,X ; Enemy Y Velocity (high byte) 3AD1: 69 00 ADC #$00 3AD3: 9D E804 STA $04E8,X 3AD6: 4C EEBA JMP $BAEE ---- 3AD9: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 3ADC: 38 SEC 3ADD: F9 3403 SBC $0334,Y 3AE0: C9 20 CMP #$20 ; distance for initiating take off 3AE2: B0 2F BCS $3B13 Alien Spider Y Velocity while ascending 3AE4: A9 FF LDA #$FF ; A = FF 3AE6: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 3AE9: A9 00 LDA #$00 ; A = 00 3AEB: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 3AEE: A9 B3 LDA #$B3 ; A = B3 3AF0: 9D 0A03 STA $030A,X ; Enemy Sprite Code 3AF3: BD 5803 LDA $0358,X ; Enemy Sprite Attributes 3AF6: 29 3F AND #$3F ; keep bits ..xx xxxx (no flip) 3AF8: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 3AFB: BD E804 LDA $04E8,X ; Enemy Y Velocity (high byte) 3AFE: 30 0A BMI $3B0A 3B00: A9 FF LDA #$FF ; A = FF 3B02: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 3B05: A9 80 LDA #$80 ; A = 80 3B07: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 3B0A: FE D805 INC $05D8,X 3B0D: FE B804 INC $04B8,X ; Enemy Routine Index 3B10: 4C 37E8 JMP $E837 ; Apply Velocities and Scrolling Adjust ---- 3B13: A9 B8 LDA #$B8 ; A = B8 3B15: DD 2403 CMP $0324,X ; Enemy Y Position On Screen 3B18: 90 07 BCC $3B21 3B1A: A9 38 LDA #$38 ; A = 38 3B1C: DD 2403 CMP $0324,X ; Enemy Y Position On Screen 3B1F: 90 03 BCC $3B24 3B21: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 3B24: 20 37E8 JSR $E837 ; Apply Velocities and Scrolling Adjust 3B27: 4C D0E8 JMP $E8D0 ; Set Y Velocity to Zero ---- Alien Spider - Pointer 5 3B2A: 20 31EC JSR $EC31 ; Check for Collision with Solid Surface 3B2D: 90 12 BCC $3B41 3B2F: 20 D0E8 JSR $E8D0 ; Set Y Velocity to Zero Alien Spider X Velocity after landing 3B32: A9 FE LDA #$FE ; A = FE 3B34: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 3B37: A9 80 LDA #$80 ; A = 80 3B39: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 3B3C: A9 04 LDA #$04 ; A = 04 3B3E: 9D B804 STA $04B8,X ; Enemy Slots (0 = empty) 3B41: 4C 37E8 JMP $E837 ; Apply Velocities and Scrolling Adjust ---- Alien Spider - Pointer 2 3B44: A9 33 LDA #$33 ; A = 33 3B46: 9D 8805 STA $0588,X ; Collision, Explosion Type, Score... 3B49: 20 6FBA JSR $BA6F Alien Spider X/Y Velocities when out of Spider Spawn 3B4C: A9 B6 LDA #$B6 ; A = B6 3B4E: 9D 0A03 STA $030A,X ; Enemy Sprite Code 3B51: A9 FF LDA #$FF ; A = FF 3B53: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 3B56: A9 B0 LDA #$B0 ; A = B0 3B58: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 3B5B: A9 FC LDA #$FC ; A = FC 3B5D: 9D D805 STA $05D8,X ; Enemy Y Velocity (high byte) 3B60: A9 00 LDA #$00 ; A = 00 3B62: 9D E805 STA $05E8,X ; Enemy Y Velocity (low byte) 3B65: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- Alien Spider - Pointer 3 3B68: BD E805 LDA $05E8,X 3B6B: 18 CLC 3B6C: 69 28 ADC #$28 ; gravity when out of Spider Spawn 3B6E: 9D E805 STA $05E8,X 3B71: BD D805 LDA $05D8,X 3B74: 69 00 ADC #$00 3B76: 9D D805 STA $05D8,X 3B79: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 3B7C: C9 80 CMP #$80 3B7E: 90 0F BCC $3B8F 3B80: BD D805 LDA $05D8,X 3B83: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 3B86: BD E805 LDA $05E8,X 3B89: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 3B8C: 4C A0BB JMP $BBA0 ---- 3B8F: BD D805 LDA $05D8,X 3B92: 49 FF EOR #$FF ; flip all bits 3B94: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 3B97: A9 00 LDA #$00 ; A = 00 3B99: 38 SEC 3B9A: FD E805 SBC $05E8,X 3B9D: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 3BA0: 20 37E8 JSR $E837 ; Apply Velocities and Scrolling Adjust 3BA3: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 3BA6: C9 C1 CMP #$C1 3BA8: B0 05 BCS $3BAF 3BAA: C9 30 CMP #$30 3BAC: 90 01 BCC $3BAF 3BAE: 60 RTS ---- 3BAF: A9 B3 LDA #$B3 ; A = B3 3BB1: 9D 0A03 STA $030A,X ; Enemy Sprite Code 3BB4: 4C 3EBA JMP $BA3E ---- 3BB7: Pointer table for Spider Spawn (15) (6 * 2 = C bytes) C3BB -> 3BC3 F0BB -> 3BF0 6DBC -> 3C6D 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- Spider Spawn - Pointer 1 Spider Spawn HP = Completion Count * 2 + Weapon Strength * 2 + 18 3BC3: A5 31 LDA $31 ; Game Completion Count 3BC5: 0A ASL 3BC6: 85 08 STA $08 3BC8: A5 2F LDA $2F ; Current Weapon Strength Code 3BCA: 0A ASL 3BCB: 65 08 ADC $08 3BCD: 69 18 ADC #$18 3BCF: 9D 7805 STA $0578,X ; Enemy HP Delay before Spider Spawn opens and starts spawning enemies Random between 0 and 3F + A0 3BD2: A5 34 LDA $34 ; Randomizer 3BD4: 65 1A ADC $1A ; Permanent Frame Counter 3BD6: 29 3F AND #$3F ; keep bits ..xx xxxx 3BD8: 69 A0 ADC #$A0 3BDA: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 3BDD: A0 A5 LDY #$A5 ; Y = A5 (Tile Code for Spider Spawn on ground) 3BDF: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 3BE2: C9 80 CMP #$80 3BE4: B0 02 BCS $3BE8 3BE6: A0 A1 LDY #$A1 ; Y = A1 (Tile Code for Spider Spawn on ceiling) 3BE8: 98 TYA 3BE9: 9D B805 STA $05B8,X 3BEC: FE B804 INC $04B8,X ; Enemy Routine Index (0 = Empty Enemy Slot) 3BEF: 60 RTS ---- Spider Spawn - Pointer 2 3BF0: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 3BF3: BD E805 LDA $05E8,X 3BF6: D0 62 BNE $3C5A 3BF8: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 3BFB: BD 3805 LDA $0538,X 3BFE: F0 09 BEQ $3C09 3C00: C9 30 CMP #$30 3C02: F0 37 BEQ $3C3B 3C04: C9 10 CMP #$10 3C06: F0 33 BEQ $3C3B 3C08: 60 RTS ---- 3C09: A5 8E LDA $8E ; Enemy Attack Switch 3C0B: F0 0C BEQ $3C19 3C0D: A9 14 LDA #$14 ; A = 14 (14 = Alien Spider) 3C0F: 20 52EB JSR $EB52 ; Generate Enemy 3C12: D0 05 BNE $3C19 3C14: A9 02 LDA #$02 ; A = 02 3C16: 99 B804 STA $04B8,Y ; Enemy Routine Index 3C19: A5 AA LDA $AA ; Current Weapon Code - Player 1 3C1B: 05 AB ORA $AB ; Current Weapon Code - Player 2 3C1D: 29 07 AND #$07 ; keep bits .... .xxx 3C1F: 85 08 STA $08 3C21: A9 0A LDA #$0A ; A = 0A 3C23: 38 SEC 3C24: E5 08 SBC $08 3C26: 9D E805 STA $05E8,X 3C29: A5 1A LDA $1A ; Permanent Frame Counter 3C2B: 65 34 ADC $34 ; Randomizer 3C2D: 29 03 AND #$03 ; keep bits .... ..xx 3C2F: 7D E805 ADC $05E8,X 3C32: 9D E805 STA $05E8,X 3C35: A9 14 LDA #$14 ; A = 14 (related to delay between spawns) 3C37: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 3C3A: 60 RTS ---- 3C3B: FE B805 INC $05B8,X 3C3E: FE D805 INC $05D8,X 3C41: BD D805 LDA $05D8,X 3C44: C9 03 CMP #$03 3C46: 90 0C BCC $3C54 3C48: DE B805 DEC $05B8,X 3C4B: DE B805 DEC $05B8,X 3C4E: DE D805 DEC $05D8,X 3C51: DE D805 DEC $05D8,X 3C54: BD B805 LDA $05B8,X 3C57: 4C B5EB JMP $EBB5 ---- 3C5A: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 3C5D: D0 DB BNE $3C3A 3C5F: A9 14 LDA #$14 ; A = 14 3C61: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 3C64: 20 3BBC JSR $BC3B 3C67: DE E805 DEC $05E8,X 3C6A: F0 9D BEQ $3C09 3C6C: 60 RTS ---- Spider Spawn - Pointer 3 3C6D: A0 A8 LDY #$A8 ; Y = A8 (Tile Code for destroyed state) 3C6F: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 3C72: C9 80 CMP #$80 3C74: B0 02 BCS $3C78 3C76: A0 A4 LDY #$A4 ; Y = A4 (Tile Code for destroyed state) 3C78: 98 TYA 3C79: 20 B5EB JSR $EBB5 3C7C: 90 01 BCC $3C7F 3C7E: 60 RTS ---- 3C7F: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 3C82: Pointer table for Heart (8 * 2 = 10 bytes) 92BC -> 3C92 9DBC -> 3C9D B4BC -> 3CB4 4CBD -> 3D4C B2B6 -> 36B2 EBBC -> 3CEB F8BC -> 3CF8 02BD -> 3D02 ---- Heart - Pointer 1 3C92: 20 61B4 JSR $B461 ; Calculate Heart HP 3C95: A9 0A LDA #$0A ; A = 0A (delay before first heartbeat) 3C97: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 3C9A: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- Heart - Pointer 2 3C9D: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 3CA0: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 3CA3: F0 01 BEQ $3CA6 3CA5: 60 RTS ---- 3CA6: FE C805 INC $05C8,X 3CA9: BD 7805 LDA $0578,X ; Enemy HP 3CAC: 4A LSR 3CAD: D0 02 BNE $3CB1 3CAF: A9 01 LDA #$01 ; A = 01 3CB1: 4C 8BE7 JMP $E78B ; Set EAFD Counter and Advance to Next Routine ---- Heart - Pointer 3 3CB4: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 3CB7: BD C805 LDA $05C8,X 3CBA: F0 15 BEQ $3CD1 3CBC: FE E805 INC $05E8,X 3CBF: BD E805 LDA $05E8,X 3CC2: 29 01 AND #$01 ; keep bits .... ...x 3CC4: 0A ASL 3CC5: 18 CLC 3CC6: 69 03 ADC #$03 3CC8: 20 86B5 JSR $B586 3CCB: A5 0B LDA $0B 3CCD: 9D C805 STA $05C8,X 3CD0: 60 RTS ---- 3CD1: BD E805 LDA $05E8,X 3CD4: 29 01 AND #$01 ; keep bits .... ...x 3CD6: 0A ASL 3CD7: 18 CLC 3CD8: 69 04 ADC #$04 3CDA: 20 86B5 JSR $B586 3CDD: A5 0B LDA $0B 3CDF: 9D C805 STA $05C8,X 3CE2: F0 01 BEQ $3CE5 3CE4: 60 RTS ---- 3CE5: A9 02 LDA #$02 ; A = 02 3CE7: 9D B804 STA $04B8,X ; Enemy Routine Index 3CEA: 60 RTS ---- Heart - Pointer 6 3CEB: A9 07 LDA #$07 ; A = 07 3CED: 20 86B5 JSR $B586 3CF0: A5 0B LDA $0B 3CF2: F0 01 BEQ $3CF5 3CF4: 60 RTS ---- 3CF5: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- Heart - Pointer 7 3CF8: A9 08 LDA #$08 ; A = 08 3CFA: 20 86B5 JSR $B586 3CFD: A5 0B LDA $0B 3CFF: F0 F4 BEQ $3CF5 3D01: 60 RTS ---- Alien Guardian - Pointer C Heart - Pointer 8 Destroy All Enemies 3D02: A2 0F LDX #$0F ; X = 0F 3D04: BD 2805 LDA $0528,X ; Enemy Type 3D07: C9 14 CMP #$14 3D09: F0 1E BEQ $3D29 3D0B: C9 15 CMP #$15 3D0D: F0 16 BEQ $3D25 3D0F: C9 12 CMP #$12 3D11: F0 12 BEQ $3D25 3D13: C9 13 CMP #$13 3D15: F0 19 BEQ $3D30 3D17: C9 11 CMP #$11 3D19: F0 0A BEQ $3D25 3D1B: CA DEX 3D1C: D0 E6 BNE $3D04 3D1E: A6 83 LDX $83 3D20: A9 A0 LDA #$A0 ; A = A0 3D22: 4C F6EA JMP $EAF6 ; Set Delay to A and Remove Enemy ---- 3D25: A9 03 LDA #$03 ; A = 03 3D27: D0 02 BNE $3D2B 3D29: A9 06 LDA #$06 ; A = 06 3D2B: 9D B804 STA $04B8,X ; Enemy Slots (0 = empty) 3D2E: D0 EB BNE $3D1B 3D30: A9 04 LDA #$04 ; A = 04 3D32: D0 F7 BNE $3D2B ---- 3D34: Table for Explosions relative positions for Heart (C * 2 = 18 bytes) Also used for Guardian 10 10 10 , 10 F0 10 -10 , 10 F0 F0 -10 , -10 10 F0 10 , -10 20 20 20 , 20 E0 20 -20 , 20 E0 E0 -20 , -20 20 E0 20 , -20 40 40 40 , 40 C0 40 -40 , 40 C0 C0 -40 , -40 50 00 50 , 00 ---- Heart - Pointer 4 3D4C: 20 83C1 JSR $C183 3D4F: A9 57 LDA #$57 ; A = 57 (57 = Big Blast with Echo) 3D51: 20 EAEA JSR $EAEA ; Play Sound and Initiate Auto-Move 3D54: 4C A0B6 JMP $B6A0 ---- 3D57: A0 00 LDY #$00 ; Y = 00 3D59: F0 02 BEQ $3D5D 3D5B: A9 00 LDA #$00 ; A = 00 3D5D: 18 CLC 3D5E: 7D 3E03 ADC $033E,X ; Enemy X Position On Screen 3D61: 85 0A STA $0A 3D63: 98 TYA 3D64: 18 CLC 3D65: 7D 2403 ADC $0324,X ; Enemy Y Position On Screen 3D68: 85 09 STA $09 3D6A: 60 RTS ---- 3D6B: Unused Space (295 bytes) (661 decimal) ---- // End of Bank // --------