Contra Bank 7 0x1C000 - 0x1FFFF Mapper 1 (21 00) (0010 0001 0000 0000) -------- 1C000: 07 Bank Number ---- Reset Vector (01C0) 1C001: D8 CLD 1C002: 78 SEI 1C003: AD 0220 LDA $20021C006: 10 FB BPL $1C003 1C008: AD 0220 LDA $20021C00B: 10 FB BPL $1C008 1C00D: A9 00 LDA #$00 ; A = 001C00F: 85 18 STA $18 ; Game Mode 1C011: 20 17C1 JSR $C117 ; Reset PPU Address and Parameters 1C014: A2 FF LDX #$FF ; X = FF1C016: 9A TXS 1C017: A9 01 LDA #$01 ; A = 011C019: A2 01 LDX #$01 ; X = 011C01B: A0 BF LDY #$BF ; Y = BF1C01D: 20 26C1 JSR $C126 1C020: A9 07 LDA #$07 ; A = 071C022: A2 05 LDX #$05 ; X = 051C024: A0 DF LDY #$DF ; Y = DF1C026: 20 26C1 JSR $C126 1C029: A2 F0 LDX #$F0 ; X = F01C02B: 8A TXA1C02C: DD 0007 CMP $0700,X1C02F: D0 05 BNE $1C036 1C031: E8 INX1C032: D0 F7 BNE $1C02B1C034: F0 13 BEQ $1C049 1C036: A2 F0 LDX #$F0 ; X = F01C038: 8A TXA1C039: 9D 0007 STA $0700,X1C03C: E8 INX1C03D: D0 F9 BNE $1C038 1C03F: A9 C8 LDA #$C8 ; A = C8 (default High Score)1C041: 8D E007 STA $07E01C044: A9 00 LDA #$00 ; A = 001C046: 8D E107 STA $07E11C049: A9 00 LDA #$00 ; A = 001C04B: 8D 0007 STA $0700 1C04E: 20 DCC0 JSR $C0DC1C051: 20 83C1 JSR $C1831C054: 20 E7C0 JSR $C0E7 1C057: A5 1A LDA $1A ; Permanent Frame Counter1C059: 65 34 ADC $34 ; Randomizer1C05B: 85 34 STA $34 1C05D: 4C 57C0 JMP $C057 ---- NMI Entry-Point (60C0) 1C060: 08 PHP1C061: 48 PHA1C062: 8A TXA1C063: 48 PHA1C064: 98 TYA1C065: 48 PHA 1C066: AD 0220 LDA $20021C069: A4 1B LDY $1B1C06B: D0 49 BNE $1C0B6 1C06D: 20 17C1 JSR $C117 ; Reset PPU Address and Parameters 1C070: 8D 0320 STA $20031C073: A0 02 LDY #$02 ; Y = 021C075: 8C 1440 STY $4014 ; DMA Sprite Memory (200) 1C078: 20 81CC JSR $CC811C07B: 20 C9CB JSR $CBC9 ; Name Table Drawing 1C07E: A5 FE LDA $FE 1C080: A6 20 LDX $20 1C082: F0 06 BEQ $1C08A 1C084: C6 20 DEC $20 1C086: F0 02 BEQ $1C08A 1C088: A9 00 LDA #$00 ; A = 00 1C08A: 8D 0120 STA $2001 1C08D: 20 F7C0 JSR $C0F7 1C090: E6 1B INC $1B 1C092: A0 01 LDY #$01 ; Y = 011C094: 20 39C1 JSR $C139 ; Load Bank Y (01)1C097: 20 D580 JSR $80D5 ; Sound and Music 1C09A: 20 5BC3 JSR $C35B ; Controllers Input1C09D: 20 3BC2 JSR $C23B ; Main Game Routine 1C0A0: A0 01 LDY #$01 ; Y = 011C0A2: 20 39C1 JSR $C139 ; Load Bank Y (01)1C0A5: 20 9DAE JSR $AE9D ; Draw Sprites1C0A8: 20 B9CB JSR $CBB9 ; Reset PPU Tile Mapping Index 1C0AB: A9 00 LDA #$00 ; A = 001C0AD: 85 1B STA $1B 1C0AF: 68 PLA1C0B0: A8 TAY1C0B1: 68 PLA1C0B2: AA TAX1C0B3: 68 PLA1C0B4: 28 PLP 1C0B5: 40 RTI ---- 1C0B6: A5 FE LDA $FE1C0B8: A6 20 LDX $201C0BA: F0 02 BEQ $1C0BE 1C0BC: A9 00 LDA #$00 ; A = 00 1C0BE: 8D 0120 STA $20011C0C1: AD 0080 LDA $8000 1C0C4: 48 PHA1C0C5: A5 1B LDA $1B1C0C7: 30 08 BMI $1C0D1 1C0C9: A0 01 LDY #$01 ; Y = 01 1C0CB: 20 3FC1 JSR $C13F1C0CE: 20 D580 JSR $80D5 1C0D1: 68 PLA 1C0D2: A8 TAY 1C0D3: 20 3FC1 JSR $C13F1C0D6: 20 04C1 JSR $C104 1C0D9: 4C AFC0 JMP $C0AF ---- 1C0DC: A9 0F LDA #$0F ; A = 0F1C0DE: 8D 1540 STA $40151C0E1: A9 C0 LDA #$C0 ; A = C01C0E3: 8D 1740 STA $4017 1C0E6: 60 RTS ---- 1C0E7: A9 05 LDA #$05 ; A = 051C0E9: 85 20 STA $201C0EB: A9 B0 LDA #$B0 ; A = B01C0ED: 85 FF STA $FF1C0EF: 8D 0020 STA $20001C0F2: A9 05 LDA #$05 ; A = 051C0F4: 85 20 STA $20 1C0F6: 60 RTS ---- 1C0F7: AD 0220 LDA $20021C0FA: A9 20 LDA #$20 ; A = 201C0FC: 8D 0620 STA $20061C0FF: A9 00 LDA #$00 ; A = 001C101: 8D 0620 STA $20061C104: AD 0220 LDA $20021C107: A5 FD LDA $FD ; Horizontal Scroll Offset1C109: 8D 0520 STA $20051C10C: A5 FC LDA $FC ; Vertical Scroll Offset1C10E: 8D 0520 STA $20051C111: A5 FF LDA $FF1C113: 8D 0020 STA $2000 1C116: 60 RTS ---- Reset PPU Address and Parameters 1C117: A9 00 LDA #$00 ; A = 001C119: 8D 0620 STA $20061C11C: 8D 0620 STA $20061C11F: 8D 0020 STA $20001C122: 8D 0120 STA $2001 1C125: 60 RTS ---- 1C126: 85 01 STA $011C128: A9 00 LDA #$00 ; A = 001C12A: 85 00 STA $00 1C12C: 91 00 STA ($00),Y1C12E: 88 DEY1C12F: C0 FF CPY #$FF1C131: D0 F9 BNE $1C12C 1C133: C6 01 DEC $011C135: CA DEX1C136: 10 F4 BPL $1C12C 1C138: 60 RTS ---- 1C139: AD 0080 LDA $8000 ; Current Bank Number1C13C: 8D EC07 STA $07EC 1C13F: B9 D0FF LDA $FFD0,Y1C142: 99 D0FF STA $FFD0,Y 1C145: 60 RTS ---- 1C146: AC EC07 LDY $07EC1C149: 4C 3FC1 JMP $C13F ; Restore Previous Bank ---- Store current Bank into $07ED and switch to Bank 1 1C14C: 48 PHA1C14D: 98 TYA1C14E: 48 PHA 1C14F: AD 0080 LDA $80001C152: 8D ED07 STA $07ED1C155: A0 01 LDY #$01 ; Y = 01 1C157: 20 3FC1 JSR $C13F ; Switch to Bank Y 1C15A: 68 PLA1C15B: A8 TAY1C15C: 68 PLA 1C15D: 60 RTS ---- Load bank in $07ED 1C15E: 48 PHA1C15F: 98 TYA1C160: 48 PHA 1C161: AC ED07 LDY $07ED1C164: 20 3FC1 JSR $C13F 1C167: 68 PLA1C168: A8 TAY1C169: 68 PLA 1C16A: 60 RTS ---- Play Sound/Music Switch to Bank 1, JSR to $479B, restore previous bank 1C16B: 48 PHA1C16C: A5 1B LDA $1B1C16E: 09 80 ORA #$80 ; set bits x... ....1C170: 85 1B STA $1B1C172: 68 PLA 1C173: 20 4CC1 JSR $C14C ; Switch to Bank 11C176: 20 9B87 JSR $879B1C179: 20 5EC1 JSR $C15E ; Load bank in $07ED 1C17C: A5 1B LDA $1B1C17E: 29 7F AND #$7F ; keep bits .xxx xxxx1C180: 85 1B STA $1B 1C182: 60 RTS ---- 1C183: 84 F7 STY $F71C185: A0 01 LDY #$01 ; Y = 01 1C187: 20 4CC1 JSR $C14C ; Switch to Bank 11C18A: 20 1287 JSR $87121C18D: 20 5EC1 JSR $C15E ; Load bank in $07ED 1C190: A4 F7 LDY $F7 1C192: 60 RTS ---- 1C193: 85 F3 STA $F31C195: 84 F7 STY $F7 1C197: A0 03 LDY #$03 ; Y = 031C199: 20 39C1 JSR $C139 ; Load Bank Y (03) 1C19C: A5 F3 LDA $F31C19E: A4 F7 LDY $F7 1C1A0: 20 36C5 JSR $C536 1C1A3: 4C 46C1 JMP $C146 ---- 1C1A6: 85 F3 STA $F31C1A8: 84 F7 STY $F7 1C1AA: A0 03 LDY #$03 ; Y = 031C1AC: 20 39C1 JSR $C139 ; Switch to Bank Y (03) 1C1AF: A5 F3 LDA $F31C1B1: A4 F7 LDY $F7 1C1B3: 20 F8C6 JSR $C6F8 1C1B6: 4C 46C1 JMP $C146 ---- Various tasks with different banks 1C1B9: A0 06 LDY #$06 ; Y = 061C1BB: 20 39C1 JSR $C139 ; Switch Bank to 061C1BE: 4C 4AB9 JMP $B94A 1C1C1: A0 06 LDY #$06 ; Y = 061C1C3: 20 39C1 JSR $C139 ; Switch Bank to 061C1C6: 4C C7B3 JMP $B3C7 1C1C9: A0 00 LDY #$00 ; Y = 001C1CB: 20 39C1 JSR $C139 ; Switch Bank to 001C1CE: 4C 1EE6 JMP $E61E Enemy Generation 1C1D1: A0 02 LDY #$02 ; Y = 021C1D3: 20 39C1 JSR $C139 ; Switch Bank to 021C1D6: 4C 19B4 JMP $B419 Get Table Pointer for Enemy Routines 1C1D9: A0 00 LDY #$00 ; Y = 001C1DB: 20 39C1 JSR $C139 ; Switch Bank to 001C1DE: 4C 89E6 JMP $E689 Running Man Generation 1C1E1: A0 02 LDY #$02 ; Y = 021C1E3: 20 39C1 JSR $C139 ; Switch Bank to 021C1E6: 4C 23B5 JMP $B523 1C1E9: A0 03 LDY #$03 ; Y = 031C1EB: 20 39C1 JSR $C139 ; Switch Bank to 031C1EE: 4C 4BDC JMP $DC4B 1C1F1: A0 03 LDY #$03 ; Y = 031C1F3: 20 39C1 JSR $C139 ; Switch Bank to 031C1F6: 4C E6DB JMP $DBE6 1C1F9: A0 02 LDY #$02 ; Y = 021C1FB: 20 39C1 JSR $C139 ; Switch Bank to 02 1C1FE: 4C B8CC JMP $CCB8 ; Boss Tiles Loading ---- 1C201: 4C C4C8 JMP $C8C4 ---- 1C204: 4C C6C8 JMP $C8C6 ---- 1C207: A0 02 LDY #$02 ; Y = 021C209: 20 39C1 JSR $C139 ; Switch Bank to Y (02)1C20C: 4C FBAF JMP $AFFB ---- 1C20F: A0 02 LDY #$02 ; Y = 021C211: 20 39C1 JSR $C139 ; Switch Bank to Y (02)1C214: 4C F2AF JMP $AFF2 ---- Switch to Bank 6 and Draw Text String 1C217: 85 F3 STA $F3 1C219: A0 06 LDY #$06 ; Y = 061C21B: 20 39C1 JSR $C139 ; Switch Bank to Y (06) 1C21E: A5 F3 LDA $F31C220: 4C 60CB JMP $CB60 ---- Intro Routines - Pointer 7 1C223: A0 04 LDY #$04 ; Y = 041C225: 20 39C1 JSR $C139 ; Switch Bank to Y (04)1C228: 4C B9B8 JMP $B8B9 ---- 1C22B: A0 05 LDY #$05 ; Y = 051C22D: 20 39C1 JSR $C139 ; Switch Bank to Y (05)1C230: 4C 5EB3 JMP $B35E ---- 1C233: A0 03 LDY #$03 ; Y = 031C235: 20 39C1 JSR $C139 ; Switch Bank to Y (03)1C238: 4C FABD JMP $BDFA ---- 1C23B: E6 1A INC $1A ; Permanent Frame Counter1C23D: A5 18 LDA $18 ; Game Mode1C23F: F0 07 BEQ $1C248 1C241: C9 03 CMP #$031C243: B0 03 BCS $1C248 1C245: 20 BCC3 JSR $C3BC 1C248: A5 18 LDA $18 ; Game Mode 1C24A: 20 57C8 JSR $C857 ; Go to Routine A in following table ---- 1C24D: Pointer table for Intro Routines (7 * 2 = E bytes) 5BC2 -> 1C25B 74C2 -> 1C274 B1C2 -> 1C2B1 C7C2 -> 1C2C7 F4C2 -> 1C2F4 30CE -> 1CE30 23C2 -> 1C223 ---- Intro Routines - Pointer 1 (Initial Intro Scrolling) 1C25B: 20 A1C9 JSR $C9A1 ; Reset Name Tables 0-1 to Zeroes1C25E: 20 A8C8 JSR $C8A8 1C261: A0 00 LDY #$00 ; Y = 001C263: 84 3F STY $3F1C265: C8 INY1C266: 84 FD STY $FD ; Horizontal Scroll Offset1C268: C8 INY1C269: 84 2B STY $2B ; Various delays (high byte)1C26B: A9 B1 LDA #$B1 ; A = B11C26D: 85 FF STA $FF 1C26F: 4C 01C3 JMP $C301 ---- 1C272: A2 B2 Table for Y positions of Intro Screen cursor (2 bytes) ---- Intro Routines - Pointer 2 1C274: 20 31C3 JSR $C331 1C277: A5 FD LDA $FD ; Horizontal Scroll Offset1C279: F0 07 BEQ $1C282 1C27B: E6 FD INC $FD ; Horizontal Scroll Offset1C27D: D0 31 BNE $1C2B0 1C27F: 20 F9C3 JSR $C3F9 ; Play Intro Tune and Display the Two Guys 1C282: A9 2C LDA #$2C ; A = 2C (X Position of Cursor in Intro)1C284: 8D 3403 STA $03341C287: A9 AA LDA #$AA ; A = AA (AA = Tile Code for Cursor)1C289: 8D 0003 STA $03001C28C: A6 22 LDX $22 ; Number of Players (0 = 1 Player)1C28E: BD 72C2 LDA $C272,X1C291: 8D 1A03 STA $031A1C294: A9 00 LDA #$00 ; A = 001C296: 8D 4E03 STA $034E1C299: A9 AB LDA #$AB ; A = AB (AB = Extra Graphics for Intro Guys)1C29B: 8D 0103 STA $03011C29E: A9 B3 LDA #$B3 ; A = B3 (X Position for Extra Graphics)1C2A0: 8D 3503 STA $03351C2A3: A9 77 LDA #$77 ; A = 77 (Y Position for Extra Graphics)1C2A5: 8D 1B03 STA $031B 1C2A8: 20 15C3 JSR $C315 ; Decrease Delay and Check if it reaches 01C2AB: D0 03 BNE $1C2B0 1C2AD: 4C 05C3 JMP $C305 ; Increase Game Mode (and set $19/$1F to 0) ---- 1C2B0: 60 RTS ---- Intro Routines - Pointer 3 1C2B1: A6 19 LDX $19 ; Routine Index for Ending1C2B3: D0 05 BNE $1C2BA 1C2B5: E6 19 INC $19 ; Routine Index for Ending 1C2B7: 4C 1CC4 JMP $C41C ---- 1C2BA: 20 27CE JSR $CE27 1C2BD: A5 1F LDA $1F1C2BF: F0 3F BEQ $1C300 1C2C1: A9 00 LDA #$00 ; A = 001C2C3: 85 23 STA $231C2C5: F0 47 BEQ $1C30E ; Set Game Mode to A and Set Delay to 240 Intro Routines - Pointer 4 1C2C7: A6 19 LDX $191C2C9: D0 08 BNE $1C2D3 1C2CB: A9 00 LDA #$00 ; A = 001C2CD: 85 1C STA $1C1C2CF: A9 40 LDA #$40 ; A = 401C2D1: D0 29 BNE $1C2FC 1C2D3: 20 0FC4 JSR $C40F 1C2D6: A5 2A LDA $2A ; Various delays (low byte)1C2D8: F0 02 BEQ $1C2DC 1C2DA: C6 2A DEC $2A ; Various delays (low byte)1C2DC: 05 28 ORA $281C2DE: F0 25 BEQ $1C305 1C2E0: A9 01 LDA #$01 ; A = 011C2E2: 18 CLC1C2E3: 65 22 ADC $22 ; Number of Players (0 = 1 Player)1C2E5: 85 00 STA $001C2E7: A9 08 LDA #$08 ; A = 081C2E9: 25 1A AND $1A ; Permanent Frame Counter1C2EB: 0A ASL1C2EC: 0A ASL1C2ED: 0A ASL1C2EE: 0A ASL1C2EF: 05 00 ORA $00 1C2F1: 4C 17C2 JMP $C217 ---- Intro Routines - Pointer 5 1C2F4: 20 3EC4 JSR $C43E1C2F7: 4C 05C3 JMP $C305 ---- 1C2FA: A9 80 LDA #$80 ; A = 80 1C2FC: 85 2A STA $2A ; Various delays (low byte)1C2FE: E6 19 INC $19 ; Routine Index for Ending 1C300: 60 RTS ---- 1C301: A9 80 LDA #$80 ; A = 80 (delay at end of helicopter scene)1C303: 85 2A STA $2A ; Various delays (low byte) 1C305: E6 18 INC $18 ; Game Mode 1C307: A9 00 LDA #$00 ; A = 001C309: 85 1F STA $1F1C30B: 85 19 STA $19 ; Routine Index for Ending 1C30D: 60 RTS ---- 1C30E: 85 18 STA $18 ; Game Mode 1C310: 20 28C3 JSR $C328 ; Set Delay to 2401C313: D0 F2 BNE $1C307 Decrease Delay and Check if it reaches 0 If the delay = 0, A is set to 0 If the delay > 0, A is set to 1 (or left to its non-zero value) 1C315: A5 2A LDA $2A ; Various delays (low byte)1C317: 05 2B ORA $2B ; Various delays (high byte)1C319: F0 0C BEQ $1C327 ; check if delay is 0 1C31B: C6 2A DEC $2A ; Various delays (low byte)1C31D: D0 08 BNE $1C327 1C31F: A5 2B LDA $2B ; Various delays (high byte)1C321: F0 02 BEQ $1C325 1C323: C6 2B DEC $2B ; Various delays (high byte) 1C325: A9 01 LDA #$01 ; A = 01 1C327: 60 RTS ---- Set delay before demo begins Only if the Intro Screen is forced by pressing Start/Select Delay is 240 = 576 decimal / 60 = 9.6 seconds (too long ?) 1C328: A2 40 LDX #$40 ; X = 401C32A: 86 2A STX $2A1C32C: A2 02 LDX #$02 ; X = 021C32E: 86 2B STX $2B 1C330: 60 RTS ---- 1C331: A4 3F LDY $3F1C333: 30 1B BMI $1C350 1C335: A5 F5 LDA $F5 ; Controller 1 Buttons Pressed1C337: 29 CF AND #$CF ; keep bits xx.. xxxx (check for Arrows and A/B)1C339: F0 15 BEQ $1C350 1C33B: D9 51C3 CMP $C351,Y ; Compare with 30-Lives Code Sequence1C33E: F0 05 BEQ $1C345 ; On success, goto $1C345 1C340: A9 FF LDA #$FF ; A = FF1C342: 85 3F STA $3F 1C344: 60 RTS ---- 1C345: C8 INY1C346: 84 3F STY $3F1C348: C0 0A CPY #$0A1C34A: 90 04 BCC $1C350 1C34C: A9 01 LDA #$01 ; A = 011C34E: 85 24 STA $24 ; 01 = 30-Lives Code Input successful 1C350: 60 RTS ---- 1C351: 08 08 04 04 02 01 02 01 40 80 Table for 30 Lives Code (A bytes) The 30-Lives Code! Aha! Up Up Down Down Left Right Left Right B A ---- 1C35B: 20 97C3 JSR $C397 1C35E: A5 04 LDA $041C360: 85 00 STA $001C362: A5 05 LDA $051C364: 85 01 STA $01 1C366: 20 97C3 JSR $C397 1C369: A2 01 LDX #$01 ; X = 01 1C36B: B5 04 LDA $04,X1C36D: D5 00 CMP $00,X1C36F: F0 04 BEQ $1C375 1C371: B5 F9 LDA $F9,X1C373: 95 04 STA $04,X 1C375: CA DEX1C376: 10 F3 BPL $1C36B 1C378: A5 1D LDA $1D1C37A: 29 04 AND #$04 ; keep bits .... .x..1C37C: D0 06 BNE $1C384 1C37E: A5 04 LDA $041C380: 05 05 ORA $051C382: 85 04 STA $04 1C384: A2 01 LDX #$01 ; X = 01 1C386: B5 04 LDA $04,X1C388: A8 TAY1C389: 55 F9 EOR $F9,X1C38B: 35 04 AND $04,X1C38D: 95 F5 STA $F5,X1C38F: 94 F1 STY $F1,X1C391: 94 F9 STY $F9,X1C393: CA DEX1C394: 10 F0 BPL $1C386 1C396: 60 RTS ---- Controller Input Routine 1C397: A2 01 LDX #$01 ; X = 011C399: 8E 1640 STX $40161C39C: CA DEX1C39D: 8E 1640 STX $40161C3A0: A0 08 LDY #$08 ; Y = 08 1C3A2: AD 1640 LDA $40161C3A5: 85 07 STA $071C3A7: 4A LSR1C3A8: 05 07 ORA $071C3AA: 4A LSR1C3AB: 26 04 ROL $041C3AD: AD 1740 LDA $40171C3B0: 85 07 STA $071C3B2: 4A LSR1C3B3: 05 07 ORA $071C3B5: 4A LSR1C3B6: 26 05 ROL $051C3B8: 88 DEY1C3B9: D0 E7 BNE $1C3A2 1C3BB: 60 RTS ---- 1C3BC: 20 0FC4 JSR $C40F 1C3BF: A5 F5 LDA $F5 ; Controller 1 Buttons Pressed1C3C1: 29 30 AND #$30 ; keep bits ..xx .... (check for Select/Start)1C3C3: F0 21 BEQ $1C3E6 1C3C5: 20 28C3 JSR $C328 1C3C8: A6 18 LDX $18 ; Game Mode1C3CA: E0 01 CPX #$011C3CC: D0 19 BNE $1C3E7 1C3CE: A6 FD LDX $FD ; Horizontal Scroll Offset1C3D0: D0 27 BNE $1C3F9 ; Play Intro Tune and Display the Two Guys 1C3D2: 29 20 AND #$20 ; keep bits ..x. .... (check for Select button)1C3D4: D0 05 BNE $1C3DB 1C3D6: A9 03 LDA #$03 ; A = 03 1C3D8: 4C 0EC3 JMP $C30E ; Set Game Mode to A (03) and Set Delay to 240 ---- Switch between 1 and 2 players 1C3DB: E6 22 INC $22 ; Number of Players (0 = 1 Player)1C3DD: A9 02 LDA #$02 ; A = 021C3DF: 38 SEC1C3E0: E5 22 SBC $22 ; Number of Players (0 = 1 Player)1C3E2: D0 02 BNE $1C3E6 1C3E4: 85 22 STA $22 ; Number of Players (0 = 1 Player) 1C3E6: 60 RTS ---- Return to Intro Screen after pressing Start/Select during demo 1C3E7: A9 00 LDA #$00 ; A = 001C3E9: 85 23 STA $23 1C3EB: 20 A1C9 JSR $C9A1 ; Reset Name Tables 0-1 to Zeroes1C3EE: 20 A8C8 JSR $C8A81C3F1: 20 F9C3 JSR $C3F9 ; Play Intro Tune and Display the Two Guys 1C3F4: A9 01 LDA #$01 ; A = 01 1C3F6: 4C 0EC3 JMP $C30E ; Set Game Mode to A (01) and Set Delay to 240 ---- Play Intro Tune and Display the Two Guys 1C3F9: A9 00 LDA #$00 ; A = 001C3FB: 85 FD STA $FD1C3FD: A9 B0 LDA #$B0 ; A = B01C3FF: 85 FF STA $FF1C401: A9 A4 LDA #$A4 ; A = A41C403: 85 28 STA $28 1C405: A9 04 LDA #$04 ; A = 041C407: 20 17C2 JSR $C217 ; Palettes for Intro Screen (when guys appear) 1C40A: A9 26 LDA #$26 ; A = 26 (Code for Intro Tune) 1C40C: 4C 6BC1 JMP $C16B ; Play Sound ---- 1C40F: A5 1A LDA $1A ; Permanent Frame Counter1C411: 29 01 AND #$01 ; keep bits .... ...x1C413: D0 D1 BNE $1C3E6 1C415: A5 28 LDA $281C417: F0 CD BEQ $1C3E6 1C419: C6 28 DEC $28 1C41B: 60 RTS ---- 1C41C: 20 7FC4 JSR $C47F 1C41F: A9 07 LDA #$07 ; A = 071C421: 85 1D STA $1D1C423: A9 00 LDA #$00 ; A = 001C425: 85 1A STA $1A ; Permament Frame Counter1C427: 85 34 STA $34 ; Randomizer1C429: A5 27 LDA $27 ; Level of Demo Mode1C42B: C9 03 CMP #$031C42D: 90 02 BCC $1C431 1C42F: A9 00 LDA #$00 ; A = 00 1C431: 85 27 STA $27 ; Level of Demo Mode1C433: 85 30 STA $30 ; Current Level (0 = Level 1)1C435: E6 27 INC $27 ; Level of Demo Mode1C437: A9 62 LDA #$62 ; A = 621C439: 85 32 STA $32 ; Player 1 Lives1C43B: 85 33 STA $33 ; Player 2 Lives 1C43D: 60 RTS ---- 1C43E: 20 7FC4 JSR $C47F *** Lets you start at any level (works) *** 1C43E: 20 30F6 JSR $F630 -- 1F630: 20 7FC4 JSR $C47F 1F633: A9 04 LDA #$04 ; can be any level 1F635: 85 30 STA $30 1F637: 60 RTS *** 1C441: 85 27 STA $27 ; Level of Demo Mode1C443: A9 03 LDA #$03 ; A = 031C445: 85 3A STA $3A ; Continues Remaining1C447: A2 03 LDX #$03 ; X = 031C449: A9 00 LDA #$00 ; A = 00 1C44B: 9D E207 STA $07E2,X1C44E: CA DEX1C44F: 10 FA BPL $1C44B 1C451: 85 1C STA $1C ; Demo Mode (0 = Not in Demo Mode)1C453: 85 38 STA $38 ; Game Over State of Player 1 (1 = Game Over)1C455: A6 22 LDX $22 ; Number of Players (0 = 1 Player)1C457: BD 7BC4 LDA $C47B,X1C45A: 85 1D STA $1D1C45C: BD 7DC4 LDA $C47D,X1C45F: 85 39 STA $39 ; Game Over State of Player 2 (1 = Game Over) 1C461: A9 02 LDA #$02 ; A = 02 (starting lives)1C463: A4 24 LDY $24 ; 30-lives Code Switch (1 = Code Activated)1C465: F0 02 BEQ $1C469 ; 1 = 30 lives, 0 = 3 lives 1C467: A9 1D LDA #$1D ; A = 1D (1D = 29 decimal) 1C469: 95 32 STA $32,X ; Player Lives1C46B: CA DEX1C46C: 10 F3 BPL $1C461 1C46E: A9 C8 LDA #$C8 ; A = C8 (C8 = 200 decimal)1C470: 85 3C STA $3C ; Starting Score for Extra Life (20000)1C472: 85 3E STA $3E1C474: A9 00 LDA #$00 ; A = 001C476: 85 3D STA $3D1C478: 85 3F STA $3F 1C47A: 60 RTS ---- 1C47B: 01 07 Table for ? (2 bytes) 1C47D: 01 00 Table for ? (2 bytes) ---- Initialize Memory (28-EF) 1C47F: A2 28 LDX #$28 ; X = 28 1C481: A9 00 LDA #$00 ; A = 00 1C483: 95 00 STA $00,X1C485: E8 INX1C486: E0 F0 CPX #$F01C488: D0 F9 BNE $1C483 1C48A: A2 07 LDX #$07 ; X = 071C48C: A0 03 LDY #$03 ; Y = 031C48E: 84 01 STY $011C490: 85 00 STA $001C492: A0 00 LDY #$00 ; Y = 00 1C494: 91 00 STA ($00),Y1C496: C8 INY1C497: D0 FB BNE $1C494 1C499: E6 01 INC $011C49B: E4 01 CPX $011C49D: D0 F5 BNE $1C494 1C49F: 60 RTS ---- Related to Player Score Y is either 0 or 1, for Player 1 or 2 $00 (low byte) and $01 (high byte) contain the score to add 1C4A0: A5 1C LDA $1C ; Demo Mode (0 = Not in Demo Mode)1C4A2: D0 FB BNE $1C49F 1C4A4: A9 00 LDA #$00 ; A = 001C4A6: 85 01 STA $01 1C4A8: 98 TYA1C4A9: 85 02 STA $021C4AB: 0A ASL1C4AC: A8 TAY1C4AD: A5 00 LDA $001C4AF: 79 E207 ADC $07E2,Y ; Player Score (low byte)1C4B2: 99 E207 STA $07E2,Y ; Player Score (low byte)1C4B5: A5 01 LDA $011C4B7: 79 E307 ADC $07E3,Y ; Player Score (high byte)1C4BA: 90 05 BCC $1C4C1 1C4BC: A9 FF LDA #$FF ; A = FF1C4BE: 99 E207 STA $07E2,Y ; Player Score (low byte) 1C4C1: 99 E307 STA $07E3,Y ; Player Score (high byte)1C4C4: A6 01 LDX $011C4C6: F0 05 BEQ $1C4CD 1C4C8: A9 88 LDA #$88 ; A = 881C4CA: 18 CLC1C4CB: 90 18 BCC $1C4E5 1C4CD: D9 3D00 CMP $003D,Y ; Player Score for Extra Life - High Byte1C4D0: 90 45 BCC $1C5171C4D2: D0 08 BNE $1C4DC 1C4D4: B9 E207 LDA $07E2,Y ; Player Score (low byte)1C4D7: D9 3C00 CMP $003C,Y ; Player Score for Extra Life - Low Byte1C4DA: 90 3B BCC $1C517 1C4DC: B9 3D00 LDA $003D,Y ; Player Score for Extra Life - High Byte1C4DF: C9 75 CMP #$751C4E1: B0 34 BCS $1C517 1C4E3: A9 2C LDA #$2C ; A = 2C (12C = 300 decimal) (Extra Life score?) 1C4E5: 79 3C00 ADC $003C,Y1C4E8: 99 3C00 STA $003C,Y ; Player Score for Extra Life - Low Byte1C4EB: A9 01 LDA #$01 ; A = 011C4ED: A6 01 LDX $011C4EF: F0 02 BEQ $1C4F3 1C4F1: A9 13 LDA #$13 ; A = 131C4F3: 79 3D00 ADC $003D,Y ; Player Score for Extra Life - High Byte1C4F6: 90 05 BCC $1C4FD 1C4F8: A9 FF LDA #$FF ; A = FF1C4FA: 99 3C00 STA $003C,Y ; Player Score for Extra Life - Low Byte 1C4FD: 99 3D00 STA $003D,Y ; Player Score for Extra Life - High Byte1C500: A6 02 LDX $021C502: F6 32 INC $32,X ; Number of Lives1C504: B5 32 LDA $32,X1C506: C9 63 CMP #$631C508: 90 02 BCC $1C50C ; Can't have more than 99 lives 1C50A: A9 63 LDA #$63 ; A = 63 (63 = 99 decimal) 1C50C: 95 32 STA $32,X ; Number of Lives1C50E: A5 01 LDA $011C510: D0 05 BNE $1C517 1C512: A9 20 LDA #$20 ; A = 20 (extra life sound)1C514: 20 6BC1 JSR $C16B ; Play Sound 1C517: B9 E307 LDA $07E3,Y ; Player Score (high byte)1C51A: CD E107 CMP $07E1 ; High Score (high byte)1C51D: 90 16 BCC $1C5351C51F: D0 08 BNE $1C529 1C521: B9 E207 LDA $07E2,Y ; Player Score (low byte)1C524: CD E007 CMP $07E0 ; High Score (low byte)1C527: 90 0C BCC $1C535 1C529: B9 E207 LDA $07E2,Y ; Player Score (low byte)1C52C: 8D E007 STA $07E0 ; High Score (low byte)1C52F: B9 E307 LDA $07E3,Y ; Player Score (high byte)1C532: 8D E107 STA $07E1 ; High Score (high byte) 1C535: 60 RTS ---- 1C536: 85 11 STA $111C538: A5 21 LDA $211C53A: C9 40 CMP #$401C53C: B0 F7 BCS $1C535 1C53E: 20 BBC7 JSR $C7BB 1C541: A6 21 LDX $211C543: A5 30 LDA $30 ; Current Level1C545: A4 40 LDY $40 ; Outdoor/Indoor1C547: 10 02 BPL $1C54B 1C549: A9 08 LDA #$08 ; A = 08 1C54B: 0A ASL1C54C: 0A ASL1C54D: A8 TAY1C54E: B9 D3C6 LDA $C6D3,Y1C551: 85 16 STA $161C553: B9 D4C6 LDA $C6D4,Y1C556: 85 17 STA $171C558: A5 0F LDA $0F1C55A: D0 19 BNE $1C575 1C55C: B9 D5C6 LDA $C6D5,Y1C55F: 85 0E STA $0E1C561: B9 D6C6 LDA $C6D6,Y1C564: 85 0F STA $0F1C566: A4 10 LDY $101C568: A5 00 LDA $001C56A: D0 64 BNE $1C5D0 1C56C: 20 3CC8 JSR $C83C 1C56F: B1 0E LDA ($0E),Y1C571: 9D 0007 STA $0700,X1C574: E8 INX 1C575: A9 00 LDA #$00 ; A = 001C577: 85 11 STA $111C579: A5 10 LDA $101C57B: 0A ASL1C57C: 0A ASL1C57D: 26 11 ROL $111C57F: 0A ASL1C580: 26 11 ROL $111C582: 0A ASL1C583: 26 11 ROL $111C585: 65 16 ADC $161C587: 85 16 STA $161C589: A5 11 LDA $111C58B: 65 17 ADC $171C58D: 85 17 STA $171C58F: A9 01 LDA #$01 ; A = 011C591: 9D 0007 STA $0700,X1C594: E8 INX1C595: A9 04 LDA #$04 ; A = 041C597: 85 14 STA $141C599: 9D 0007 STA $0700,X1C59C: E8 INX1C59D: 9D 0007 STA $0700,X1C5A0: E8 INX1C5A1: A0 00 LDY #$00 ; Y = 00 1C5A3: A5 0D LDA $0D1C5A5: 9D 0007 STA $0700,X1C5A8: E8 INX1C5A9: A5 0C LDA $0C1C5AB: 9D 0007 STA $0700,X1C5AE: E8 INX 1C5AF: B1 16 LDA ($16),Y1C5B1: 9D 0007 STA $0700,X1C5B4: E8 INX1C5B5: C8 INY1C5B6: 98 TYA1C5B7: 29 03 AND #$03 ; keep bits .... ..xx1C5B9: D0 F4 BNE $1C5AF 1C5BB: A5 0C LDA $0C1C5BD: 18 CLC1C5BE: 69 20 ADC #$201C5C0: 85 0C STA $0C1C5C2: A5 0D LDA $0D1C5C4: 69 00 ADC #$001C5C6: 85 0D STA $0D1C5C8: C6 14 DEC $141C5CA: D0 D7 BNE $1C5A3 1C5CC: 86 21 STX $211C5CE: 18 CLC 1C5CF: 60 RTS ---- 1C5D0: AA TAX1C5D1: B1 0E LDA ($0E),Y1C5D3: CA DEX1C5D4: 86 01 STX $011C5D6: D0 29 BNE $1C601 1C5D8: AA TAX1C5D9: 29 33 AND #$33 ; keep bits ..xx ..xx1C5DB: 0A ASL1C5DC: 0A ASL1C5DD: 85 08 STA $081C5DF: 8A TXA1C5E0: 29 CC AND #$CC ; keep bits xx.. xx..1C5E2: 4A LSR1C5E3: 4A LSR1C5E4: 85 09 STA $091C5E6: A6 02 LDX $021C5E8: BC 0006 LDY $0600,X1C5EB: B1 46 LDA ($46),Y1C5ED: 29 33 AND #$33 ; keep bits ..xx ..xx1C5EF: 05 08 ORA $081C5F1: 85 08 STA $081C5F3: BC 0106 LDY $0601,X1C5F6: B1 46 LDA ($46),Y1C5F8: 29 CC AND #$CC ; keep bits xx.. xx..1C5FA: 05 09 ORA $091C5FC: 85 09 STA $09 1C5FE: 4C 7BC6 JMP $C67B ---- 1C601: CA DEX1C602: D0 2D BNE $1C631 1C604: A2 00 LDX #$00 ; X = 001C606: 86 09 STX $091C608: 0A ASL1C609: 26 09 ROL $091C60B: 0A ASL1C60C: 26 09 ROL $091C60E: 0A ASL1C60F: 26 09 ROL $091C611: 0A ASL1C612: 26 09 ROL $091C614: 85 08 STA $081C616: A6 02 LDX $021C618: BC 0006 LDY $0600,X1C61B: B1 46 LDA ($46),Y1C61D: 29 0F AND #$0F ; keep bits .... xxxx1C61F: 05 08 ORA $081C621: 85 08 STA $081C623: BC 0806 LDY $0608,X1C626: B1 46 LDA ($46),Y1C628: 29 F0 AND #$F0 ; keep bits xxxx ....1C62A: 05 09 ORA $091C62C: 85 09 STA $09 1C62E: 4C 7BC6 JMP $C67B ---- 1C631: A2 00 LDX #$00 ; X = 001C633: 86 08 STX $081C635: 86 0B STX $0B1C637: 4A LSR1C638: 66 08 ROR $081C63A: 4A LSR1C63B: 66 08 ROR $081C63D: 29 0C AND #$0C ; keep bits .... xx..1C63F: 85 0A STA $0A1C641: B1 0E LDA ($0E),Y1C643: 0A ASL1C644: 26 0B ROL $0B1C646: 0A ASL1C647: 26 0B ROL $0B1C649: 29 30 AND #$30 ; keep bits ..xx ....1C64B: 85 09 STA $091C64D: A6 02 LDX $021C64F: BC 0006 LDY $0600,X1C652: B1 46 LDA ($46),Y1C654: 29 3F AND #$3F ; keep bits ..xx xxxx1C656: 05 08 ORA $081C658: 85 08 STA $081C65A: BC 0106 LDY $0601,X1C65D: B1 46 LDA ($46),Y1C65F: 29 CF AND #$CF ; keep bits xx.. xxxx1C661: 05 09 ORA $091C663: 85 09 STA $091C665: BC 0806 LDY $0608,X1C668: B1 46 LDA ($46),Y1C66A: 29 F3 AND #$F3 ; keep bits xxxx ..xx1C66C: 05 0A ORA $0A1C66E: 85 0A STA $0A1C670: BC 0906 LDY $0609,X1C673: B1 46 LDA ($46),Y1C675: 29 FC AND #$FC ; keep bits xxxx xx..1C677: 05 0B ORA $0B1C679: 85 0B STA $0B1C67B: A5 01 LDA $011C67D: 0A ASL1C67E: A8 TAY1C67F: A6 21 LDX $211C681: A9 01 LDA #$01 ; A = 011C683: 9D 0007 STA $0700,X1C686: E8 INX1C687: B9 CDC6 LDA $C6CD,Y1C68A: 9D 0007 STA $0700,X1C68D: E8 INX1C68E: B9 CEC6 LDA $C6CE,Y 1C691: 9D 0007 STA $0700,X1C694: E8 INX1C695: A0 00 LDY #$00 ; Y = 00 1C697: A5 15 LDA $151C699: 9D 0007 STA $0700,X1C69C: E8 INX1C69D: A5 14 LDA $141C69F: 9D 0007 STA $0700,X1C6A2: E8 INX1C6A3: B9 0800 LDA $0008,Y1C6A6: 9D 0007 STA $0700,X1C6A9: E8 INX1C6AA: A5 00 LDA $001C6AC: C9 02 CMP #$021C6AE: F0 08 BEQ $1C6B8 1C6B0: C8 INY1C6B1: B9 0800 LDA $0008,Y1C6B4: 9D 0007 STA $0700,X1C6B7: E8 INX 1C6B8: A5 01 LDA $011C6BA: F0 0E BEQ $1C6CA 1C6BC: C8 INY1C6BD: A5 14 LDA $141C6BF: 18 CLC1C6C0: 69 08 ADC #$081C6C2: 85 14 STA $141C6C4: A9 00 LDA #$00 ; A = 001C6C6: 85 01 STA $011C6C8: F0 CD BEQ $1C697 1C6CA: 4C 75C5 JMP $C575 ---- 1C6CD: 02 01 01 02 02 02 Table for ? (6 bytes) ---- 1C6D3: Pointer table for Tile Switch Mappings and Palettes (12 * 2 = 24 bytes) Bank 3 Offsets 2 Pointers per Level Pointer 1: Tile Mappings Pointer 2: Palette Codes B183 -> C3B1 AC86 -> C6AC A888 -> C8A8 918E -> CE91 6893 -> D368 5F96 -> D65F A888 -> C8A8 918E -> CE91 A89B -> DBA8 B99D -> DDB9 AEA4 -> E4AE 67A5 -> E567 EAAB -> EBEA AEAD -> EDAE 5AB2 -> F25A 43B5 -> F543 1ABA -> FA1A C4BD -> FDC4 ---- 1C6F7: 60 RTS ---- 1C6F8: 85 11 STA $111C6FA: A5 21 LDA $21 ; Index for PPU Tile Mapping1C6FC: C9 50 CMP #$501C6FE: B0 F7 BCS $1C6F7 1C700: 20 BBC7 JSR $C7BB 1C703: A5 10 LDA $101C705: 0A ASL1C706: 0A ASL1C707: 65 10 ADC $101C709: A8 TAY1C70A: A5 30 LDA $30 ; Current Level1C70C: 0A ASL1C70D: AA TAX1C70E: BD 9FC7 LDA $C79F,X1C711: 85 16 STA $161C713: BD A0C7 LDA $C7A0,X1C716: 85 17 STA $171C718: A2 02 LDX #$02 ; X = 021C71A: B1 16 LDA ($16),Y1C71C: 10 03 BPL $1C721 1C71E: 29 07 AND #$07 ; keep bits .... .xxx1C720: AA TAX 1C721: 86 14 STX $141C723: A6 21 LDX $21 ; Index for PPU Tile Mapping1C725: A5 0F LDA $0F1C727: D0 33 BNE $1C75C 1C729: B1 16 LDA ($16),Y1C72B: 84 0E STY $0E1C72D: A4 00 LDY $001C72F: F0 0C BEQ $1C73D 1C731: 88 DEY1C732: F0 07 BEQ $1C73B 1C734: 88 DEY1C735: F0 02 BEQ $1C739 1C737: 0A ASL1C738: 0A ASL 1C739: 0A ASL1C73A: 0A ASL 1C73B: 0A ASL1C73C: 0A ASL 1C73D: 85 08 STA $081C73F: A6 02 LDX $021C741: BC 0006 LDY $0600,X1C744: B1 46 LDA ($46),Y1C746: A4 00 LDY $001C748: 39 B7C7 AND $C7B7,Y1C74B: 05 08 ORA $081C74D: 85 08 STA $081C74F: A6 21 LDX $21 1C751: 20 3CC8 JSR $C83C 1C754: A5 08 LDA $081C756: 9D 0007 STA $0700,X1C759: E8 INX1C75A: A4 0E LDY $0E 1C75C: C8 INY1C75D: A9 01 LDA #$01 ; A = 011C75F: 9D 0007 STA $0700,X1C762: E8 INX1C763: A9 02 LDA #$02 ; A = 021C765: 9D 0007 STA $0700,X1C768: E8 INX1C769: A5 14 LDA $141C76B: 9D 0007 STA $0700,X1C76E: E8 INX 1C76F: A9 02 LDA #$02 ; A = 021C771: 85 15 STA $151C773: A5 0D LDA $0D1C775: 9D 0007 STA $0700,X1C778: E8 INX1C779: A5 0C LDA $0C1C77B: 9D 0007 STA $0700,X1C77E: E8 INX 1C77F: B1 16 LDA ($16),Y1C781: 9D 0007 STA $0700,X1C784: E8 INX1C785: C8 INY1C786: C6 15 DEC $151C788: D0 F5 BNE $1C77F 1C78A: A5 0C LDA $0C1C78C: 18 CLC1C78D: 69 20 ADC #$201C78F: 85 0C STA $0C1C791: A5 0D LDA $0D1C793: 69 00 ADC #$001C795: 85 0D STA $0D1C797: C6 14 DEC $141C799: D0 D4 BNE $1C76F 1C79B: 86 21 STX $211C79D: 18 CLC 1C79E: 60 RTS ---- 1C79F: Pointer table for Extra Tile Mappings (9 * 2 = 12 bytes) Points to Bank 3 0180 -> C001 Level 1 E186 -> C6E1 Level 2 F88E -> CEF8 Level 3 E186 -> C6E1 Level 4 9896 -> D698 Level 5 D89D -> DDD8 Level 6 6EA5 -> E56E Level 7 CAAD -> EDCA Level 8 7AB5 -> F57A Level 2/4 Boss Rooms ---- 1C7B1: 20 24 Table for ? (2 bytes) 1C7B3: 23 27 Table for ? (2 bytes) 1C7B5: 00 40 Table for ? (2 bytes) 1C7B7: FC F3 CF 3F Table for ? (4 bytes) ---- 1C7BB: A5 10 LDA $101C7BD: 29 80 AND #$80 ; keep bits x... ....1C7BF: 85 0F STA $0F1C7C1: A5 10 LDA $101C7C3: 29 7F AND #$7F ; keep bits .xxx xxxx1C7C5: 85 10 STA $101C7C7: 98 TYA1C7C8: 18 CLC1C7C9: 65 FC ADC $FC ; Vertical Scroll Offset1C7CB: B0 04 BCS $1C7D1 1C7CD: C9 F0 CMP #$F01C7CF: 90 02 BCC $1C7D3 1C7D1: 69 0F ADC #$0F 1C7D3: 29 F8 AND #$F8 ; keep bits xxxx x...1C7D5: 85 12 STA $121C7D7: 4A LSR1C7D8: 4A LSR1C7D9: A8 TAY1C7DA: 4A LSR1C7DB: 29 02 AND #$02 ; keep bits .... ..x.1C7DD: 85 00 STA $001C7DF: 98 TYA1C7E0: 29 38 AND #$38 ; keep bits ..xx x...1C7E2: 85 14 STA $141C7E4: A9 00 LDA #$00 ; A = 001C7E6: 06 12 ASL $121C7E8: 2A ROL1C7E9: 06 12 ASL $121C7EB: 2A ROL1C7EC: 85 13 STA $131C7EE: A5 11 LDA $111C7F0: 18 CLC1C7F1: 65 FD ADC $FD1C7F3: 85 11 STA $111C7F5: A5 FF LDA $FF1C7F7: 29 01 AND #$01 ; keep bits .... ...x1C7F9: 90 02 BCC $1C7FD 1C7FB: 49 01 EOR #$01 ; flip bits .... ...x 1C7FD: A8 TAY1C7FE: B9 B3C7 LDA $C7B3,Y1C801: 09 03 ORA #$03 ; set bits .... ..xx1C803: 85 15 STA $151C805: B9 B1C7 LDA $C7B1,Y1C808: 05 13 ORA $131C80A: 85 13 STA $131C80C: 85 0D STA $0D1C80E: B9 B5C7 LDA $C7B5,Y1C811: 85 02 STA $02 1C813: A5 11 LDA $111C815: 29 F8 AND #$F8 ; keep bits xxxx x...1C817: 4A LSR1C818: 4A LSR1C819: 4A LSR1C81A: A8 TAY1C81B: 4A LSR1C81C: AA TAX1C81D: 29 01 AND #$01 ; keep bits .... ...x1C81F: 05 00 ORA $001C821: 85 00 STA $001C823: 8A TXA1C824: 4A LSR1C825: 05 14 ORA $141C827: 85 03 STA $031C829: 18 CLC1C82A: 69 C0 ADC #$C01C82C: 85 14 STA $141C82E: 98 TYA1C82F: 05 12 ORA $121C831: 85 12 STA $121C833: 85 0C STA $0C1C835: A5 02 LDA $021C837: 05 03 ORA $031C839: 85 02 STA $02 1C83B: 60 RTS ---- 1C83C: A9 01 LDA #$01 ; A = 011C83E: 9D 0007 STA $0700,X1C841: E8 INX1C842: 9D 0007 STA $0700,X1C845: E8 INX1C846: 9D 0007 STA $0700,X1C849: E8 INX1C84A: A5 15 LDA $151C84C: 9D 0007 STA $0700,X1C84F: E8 INX1C850: A5 14 LDA $141C852: 9D 0007 STA $0700,X1C855: E8 INX 1C856: 60 RTS ---- Go to Routine A in table that follows the JSR 1C857: 0A ASL1C858: 84 03 STY $031C85A: A8 TAY1C85B: C8 INY1C85C: 68 PLA1C85D: 85 00 STA $001C85F: 68 PLA1C860: 85 01 STA $011C862: B1 00 LDA ($00),Y1C864: 85 02 STA $021C866: C8 INY1C867: B1 00 LDA ($00),Y1C869: A4 03 LDY $031C86B: 85 03 STA $03 1C86D: 6C 0200 JMP ($0002) ---- 1C870: 86 00 STX $001C872: 84 01 STY $01 1C874: A9 00 LDA #$00 ; A = 001C876: 85 02 STA $021C878: A0 10 LDY #$10 ; Y = 101C87A: 26 00 ROL $001C87C: 26 01 ROL $01 1C87E: 26 02 ROL $021C880: A5 02 LDA $021C882: C5 03 CMP $031C884: 90 04 BCC $1C88A 1C886: E5 03 SBC $031C888: 85 02 STA $02 1C88A: 26 00 ROL $001C88C: 26 01 ROL $011C88E: 88 DEY1C88F: D0 ED BNE $1C87E 1C891: 60 RTS ---- Advance Read Address ($00-$01) A bytes 1C892: 18 CLC1C893: 75 00 ADC $00,X1C895: 95 00 STA $00,X1C897: 90 02 BCC $1C89B 1C899: F6 01 INC $01,X 1C89B: 60 RTS ---- 1C89C: 49 FF EOR #$FF ; flip all bits1C89E: 38 SEC1C89F: 75 00 ADC $00,X1C8A1: 95 00 STA $00,X1C8A3: B0 02 BCS $1C8A7 1C8A5: D6 01 DEC $01,X 1C8A7: 60 RTS ---- 1C8A8: 20 83C1 JSR $C1831C8AB: 20 7FC4 JSR $C47F 1C8AE: A9 1E LDA #$1E ; A = 1E1C8B0: 85 FE STA $FE1C8B2: A0 00 LDY #$00 ; Y = 001C8B4: 84 6A STY $6A1C8B6: C8 INY1C8B7: 84 1C STY $1C ; Demo Mode (0 = Not in Demo Mode) 1C8B9: A9 0B LDA #$0B ; A = 0B1C8BB: 20 04C2 JSR $C204 ; JMP $C8C6 1C8BE: A9 06 LDA #$06 ; A = 061C8C0: 20 17C2 JSR $C217 ; Draw Text String (Palettes for Intro Screen) 1C8C3: 60 RTS ---- Select pointer from Graphics Groups Code and retrieve Group Code 1C8C4: A5 30 LDA $30 ; Current Level 1C8C6: 0A ASL1C8C7: A8 TAY1C8C8: B9 E3C8 LDA $C8E3,Y1C8CB: 85 06 STA $061C8CD: B9 E4C8 LDA $C8E4,Y1C8D0: 85 07 STA $071C8D2: A0 00 LDY #$00 ; Y = 001C8D4: 84 05 STY $05 1C8D6: B1 06 LDA ($06),Y ; A = Group Code1C8D8: 30 E9 BMI $1C8C3 ; if FF, stop loading PPU and go on... 1C8DA: 20 A3C9 JSR $C9A3 ; Load Chunk of Graphics Data 1C8DD: E6 05 INC $051C8DF: A4 05 LDY $051C8E1: D0 F3 BNE $1C8D6 ---- 1C8E3: Pointer table for Graphics Groups Codes (D * 2 = 1A bytes) FDC8 -> 1C8FD 05C9 -> 1C905 16C9 -> 1C916 0DC9 -> 1C90D 1EC9 -> 1C91E 26C9 -> 1C926 2EC9 -> 1C92E 36C9 -> 1C936 3BC9 -> 1C93B 40C9 -> 1C940 46C9 -> 1C946 48C9 -> 1C948 4BC9 -> 1C94B ---- Tables for Graphics Groups Codes (53 bytes) 1C8FD: 03 13 19 1A 14 16 05 FF Level 1 1C905: 03 04 06 0A 0F 10 11 FF Level 2 1C90D: 03 04 06 0A 0F 10 11 12 FF Level 4 1C916: 03 13 19 1A 14 16 07 FF Level 3 1C91E: 03 13 19 1A 15 16 0B FF Level 5 1C926: 03 13 19 1A 15 16 0C FF Level 6 1C92E: 03 13 19 1A 15 16 0D FF Level 7 1C936: 03 13 19 0E FF Level 8 1C93B: 03 04 13 08 FF Level 2 Boss Room 1C940: 03 04 13 08 09 FF Level 4 Boss Room 1C946: 01 FF Intro Graphics 1C948: 01 02 FF Intro Graphics and Tile Mappings 1C94B: 01 03 17 18 FF Ending Scene ---- 1C950: Tables for Graphics Groups Data pointers (1B * 3 = 51 bytes) XXXX .. Pointer .... XX Bank Number (except 00 -> 07) 00: 36CB 00 1CB36 (used to reset PPU name tables to zeroes) 01: 2DAA 04 12A2D (intro, level title, game over screens) 02: 9790 02 9097 (intro screen) 03: 0180 04 10001 (character, medals, power-ups, explosions) 04: AE85 04 105AE (character facing up) 05: 0180 05 14001 (character when immobile, prone, weapon zeppelin) 06: FC99 04 119FC (most Base graphics) 07: 618A 05 14A61 (character in level 3) 08: 6C88 04 1086C 09: CD99 04 119CD 0A: 05A0 04 12005 0B: E093 05 153E0 0C: 0180 06 18001 0D: DC8C 06 18CDC 0E: D69B 06 19BD6 0F: 46A3 04 12346 10: 03A0 84 12003 (horizontal flip) 11: E7A3 04 123E7 12: 40A9 04 12940 (Base 2 Graphics) 13: A187 04 107A1 14: 14A8 05 16814 (Turrets, Gray and Red) 15: 7AB0 06 1B07A (Turret Guy) 16: 5CB1 06 1B15C (Weapon Box) 17: DFAD 05 16DDF (End Scene) 18: 0DB3 05 1730D 19: 1BA3 05 1631B 1A: 00A5 05 16500 00: CPU 1CB36 - 1D3DF 01: CPU 12A2D - 138B8 02: CPU 9097 - 9251 03: CPU 10001 - 105AD PPU 0000-0680 04: CPU 105AE - 107A0 05: CPU 14001 - 14A60 PPU 09A0-2000 06: CPU 119FC - 12002 07: CPU 14A61 - 153DF 08: CPU 1086C - 119CC 09: CPU 119CD - 119FB 0A: CPU 12005 - 12345 0B: CPU 153E0 - 1631A 0C: CPU 18001 - 18CDB 0D: CPU 18CDC - 19BD5 0E: CPU 19BD6 - 1B079 0F: CPU 12346 - 123E6 10: CPU 12003 - 12345 11: CPU 123E7 - 1293F 12: CPU 12940 - 12A2C 13: CPU 107A1 - 1086B PPU 08C0-09A0 14: CPU 16814 - 16DDE PPU 1600-1BD0 15: CPU 1B07A - 1B15B 16: CPU 1B15C - 1B261 PPU 1200-1320 17: CPU 16DDF - 1730C 18: CPU 1730D - 1735D 19: CPU 1631B - 164FF PPU 0680-08C0 1A: CPU 16500 - 16813 PPU 0A80-0DC0 ---- 1C9A1: A9 00 LDA #$00 ; A = 00 1C9A3: 85 04 STA $041C9A5: 0A ASL1C9A6: 65 04 ADC $04 ; Multiply A by 31C9A8: AA TAX1C9A9: BD 50C9 LDA $C950,X1C9AC: 85 00 STA $001C9AE: BD 51C9 LDA $C951,X1C9B1: 85 01 STA $011C9B3: BD 52C9 LDA $C952,X1C9B6: 29 80 AND #$80 ; keep bits x... ....1C9B8: 85 04 STA $041C9BA: BD 52C9 LDA $C952,X1C9BD: 29 07 AND #$07 ; keep bits .... .xxx1C9BF: A8 TAY 1C9C0: 20 39C1 JSR $C139 ; Load Bank Y1C9C3: 20 17C1 JSR $C117 ; Reset PPU Write Address (0000) 1C9C6: 85 21 STA $21 ; Index for PPU Tile Mapping1C9C8: 85 FC STA $FC ; Vertical Scroll Offset1C9CA: 85 FD STA $FD ; Horizontal Scroll Offset 1C9CC: AD 0220 LDA $20021C9CF: A0 01 LDY #$01 ; Y = 011C9D1: B1 00 LDA ($00),Y1C9D3: 8D 0620 STA $2006 ; set initial PPU write address (Low Byte)1C9D6: 88 DEY1C9D7: B1 00 LDA ($00),Y1C9D9: 8D 0620 STA $2006 ; set initial PPU write address (High Byte)1C9DC: A9 02 LDA #$02 ; A = 021C9DE: A6 04 LDX $041C9E0: 10 01 BPL $1C9E3 1C9E2: 0A ASL 1C9E3: A2 00 LDX #$00 ; X = 00 1C9E5: 20 92C8 JSR $C892 ; Advance Read Address A bytes 1C9E8: A0 00 LDY #$00 ; Y = 001C9EA: B1 00 LDA ($00),Y1C9EC: C9 FF CMP #$FF ; if byte read == FF1C9EE: F0 6B BEQ $1CA5B ; return to previous bank ($07EC) 1C9F0: C9 7F CMP #$7F ; if byte read == 7F1C9F2: F0 5D BEQ $1CA51 ; advance 1 byte, set PPU to next 2 bytes 1C9F4: A8 TAY1C9F5: 10 26 BPL $1CA1D ; if byte read Positive (< 80), RLE at $1CA1D 1C9F7: 29 7F AND #$7F ; keep bits .xxx xxxx1C9F9: 85 02 STA $021C9FB: A0 01 LDY #$01 ; Y = 01 1C9FD: B1 00 LDA ($00),Y ;1C9FF: A6 04 LDX $04 ;1CA01: 10 03 BPL $1CA06 ; ;1CA03: 20 36CA JSR $CA36 ; goto flip routine if $04 is Negative ; 1CA06: 8D 0720 STA $2007 ;1CA09: C4 02 CPY $02 ;1CA0B: F0 03 BEQ $1CA10 ;1CA0D: C8 INY ;1CA0E: D0 ED BNE $1C9FD ; Normal String Loop ($02 times) 1CA10: A9 01 LDA #$01 ; A = 011CA12: 18 CLC1CA13: 65 02 ADC $02 1CA15: A2 00 LDX #$00 ; X = 00 1CA17: 20 92C8 JSR $C892 ; advance $02 bytes + 11CA1A: 4C E8C9 JMP $C9E8 ; and continue... ---- 1CA1D: A0 01 LDY #$01 ; Y = 011CA1F: 85 02 STA $021CA21: B1 00 LDA ($00),Y1CA23: A4 02 LDY $021CA25: A6 04 LDX $041CA27: 10 03 BPL $1CA2C 1CA29: 20 36CA JSR $CA36 ; goto flip routine 1CA2C: 8D 0720 STA $2007 ;1CA2F: 88 DEY ;1CA30: D0 FA BNE $1CA2C ; RLE Loop ($02 times) 1CA32: A9 02 LDA #$02 ; A = 021CA34: D0 DF BNE $1CA15 1CA36: 85 03 STA $03 ; horizontal flip routine1CA38: 06 03 ASL $031CA3A: 6A ROR1CA3B: 06 03 ASL $031CA3D: 6A ROR1CA3E: 06 03 ASL $031CA40: 6A ROR1CA41: 06 03 ASL $031CA43: 6A ROR1CA44: 06 03 ASL $031CA46: 6A ROR1CA47: 06 03 ASL $031CA49: 6A ROR1CA4A: 06 03 ASL $031CA4C: 6A ROR1CA4D: 06 03 ASL $031CA4F: 6A ROR 1CA50: 60 RTS ---- 1CA51: A9 01 LDA #$01 ; A = 011CA53: A2 00 LDX #$00 ; X = 00 1CA55: 20 92C8 JSR $C8921CA58: 4C CCC9 JMP $C9CC ---- 1CA5B: 20 46C1 JSR $C1461CA5E: 4C E7C0 JMP $C0E7 ---- 1CA61: A9 1E LDA #$1E ; A = 1E1CA63: 85 02 STA $021CA65: A9 07 LDA #$07 ; A = 071CA67: 18 CLC1CA68: 65 1E ADC $1E 1CA6A: 20 17C2 JSR $C217 ; Draw Text String (REST) 1CA6D: A6 1E LDX $1E1CA6F: B5 38 LDA $38,X ; Player Game Over State (1 = Game Over)1CA71: 49 01 EOR #$01 ; flip bits .... ...x1CA73: 18 CLC1CA74: 75 32 ADC $32,X ; Player Lives1CA76: F0 2E BEQ $1CAA61CA78: 10 02 BPL $1CA7C 1CA7A: A9 00 LDA #$00 ; A = 00 1CA7C: A2 00 LDX #$00 ; X = 00 1CA7E: 85 00 STA $001CA80: C9 0A CMP #$0A1CA82: 90 0A BCC $1CA8E 1CA84: E9 0A SBC #$0A1CA86: E8 INX1CA87: E0 0A CPX #$0A1CA89: 90 F3 BCC $1CA7E 1CA8B: A2 09 LDX #$09 ; X = 091CA8D: 8A TXA 1CA8E: A4 21 LDY $211CA90: 09 30 ORA #$30 ; set bits ..xx ....1CA92: E0 00 CPX #$001CA94: D0 04 BNE $1CA9A 1CA96: C9 30 CMP #$301CA98: F0 0B BEQ $1CAA5 1CA9A: 99 FE06 STA $06FE,Y1CA9D: 8A TXA1CA9E: F0 05 BEQ $1CAA5 1CAA0: 09 30 ORA #$30 ; set bits ..xx ....1CAA2: 99 FD06 STA $06FD,Y 1CAA5: 60 RTS ---- 1CAA6: 8A TXA1CAA7: 18 CLC1CAA8: 69 0F ADC #$0F 1CAAA: 4C 17C2 JMP $C217 ; Draw Text String ---- Draw Text "STAGE " and the level's name 1CAAD: A9 0C LDA #$0C ; A = 0C (Text String "STAGE ")1CAAF: 20 17C2 JSR $C217 ; Draw Text String 1CAB2: A5 30 LDA $30 ; Current Level1CAB4: 18 CLC1CAB5: 69 31 ADC #$311CAB7: 9D FE06 STA $06FE,X1CABA: A5 30 LDA $30 ; Current Level1CABC: 69 11 ADC #$11 ; String ID = Level Number + 11 1CABE: 4C 17C2 JMP $C217 ; Draw Text String ---- Draw the scores 1CAC1: A9 09 LDA #$09 ; A = 09 (Text String "HI") 1CAC3: 20 17C2 JSR $C217 ; Draw Text String 1CAC6: AD E007 LDA $07E0 ; High Score (low byte) 1CAC9: 85 00 STA $00 1CACB: AD E107 LDA $07E1 ; High Score (high byte) 1CACE: 85 01 STA $01 1CAD0: 20 F8CA JSR $CAF8 1CAD3: A9 0A LDA #$0A ; A = 0A (Text String "1P") 1CAD5: 20 17C2 JSR $C217 ; Draw Text String 1CAD8: AD E207 LDA $07E2 ; Player 1 Score (low byte) 1CADB: 85 00 STA $00 1CADD: AD E307 LDA $07E3 ; Player 1 Score (high byte) 1CAE0: 85 01 STA $01 1CAE2: 20 F8CA JSR $CAF8 1CAE5: A5 22 LDA $22 ; Number of Players (0 = 1 Player) 1CAE7: F0 45 BEQ $1CB2E 1CAE9: A9 0B LDA #$0B ; A = 0B (Text String "2P") 1CAEB: 20 17C2 JSR $C217 ; Draw Text String 1CAEE: AD E407 LDA $07E4 ; Player 2 Score (low byte) 1CAF1: 85 00 STA $00 1CAF3: AD E507 LDA $07E5 ; Player 2 Score (high byte) 1CAF6: 85 01 STA $01 1CAF8: A5 1A LDA $1A ; Permanent Frame Counter 1CAFA: 29 10 AND #$10 ; keep bits ...x .... 1CAFC: D0 30 BNE $1CB2E ; (flashing speed of score before level) 1CAFE: A9 05 LDA #$05 ; A = 05 1CB00: 85 04 STA $04 1CB02: A9 0A LDA #$0A ; A = 0A 1CB04: 85 03 STA $03 1CB06: 20 74C8 JSR $C874 1CB09: A5 02 LDA $02 1CB0B: 09 30 ORA #$30 ; set bits ..xx .... 1CB0D: 9D FC06 STA $06FC,X 1CB10: CA DEX 1CB11: A5 00 LDA $00 1CB13: 05 01 ORA $01 1CB15: F0 04 BEQ $1CB1B 1CB17: C6 04 DEC $04 1CB19: D0 E7 BNE $1CB02 1CB1B: A6 21 LDX $21 1CB1D: A5 04 LDA $04 1CB1F: 38 SEC 1CB20: E9 05 SBC #$05 1CB22: 05 02 ORA $02 1CB24: F0 09 BEQ $1CB2F 1CB26: A9 30 LDA #$30 ; A = 30 1CB28: 9D FD06 STA $06FD,X 1CB2B: 9D FE06 STA $06FE,X 1CB2E: 60 RTS ---- 1CB2F: 9D FC06 STA $06FC,X 1CB32: A9 30 LDA #$30 ; A = 30 (Initial "0" tile for score) 1CB34: D0 F5 BNE $1CB2B ---- 1CB36: Table for Name Table Reset (2A bytes) Set Name Table 0 (2000) and 1 (2400) all to 00 400 bytes each 00 20 78 00 78 00 78 00 78 00 78 00 78 00 78 00 78 00 40 00 7F 00 24 78 00 78 00 78 00 78 00 78 00 78 00 78 00 78 00 40 00 FF ---- Draw Text String A is the index of the pointer to the PPU Macro Command 1CB60: 48 PHA1CB61: A9 02 LDA #$02 ; A = 021CB63: 85 03 STA $03 1CB65: A9 01 LDA #$01 ; A = 011CB67: 20 BDCB JSR $CBBD1CB6A: 68 PLA 1CB6B: 85 02 STA $021CB6D: 0A ASL1CB6E: AA TAX1CB6F: BD 62B2 LDA $B262,X ; Pointer table for Text Data (low byte)1CB72: 85 00 STA $001CB74: BD 63B2 LDA $B263,X ; Pointer table for Text Data (high byte)1CB77: 85 01 STA $011CB79: A6 21 LDX $211CB7B: A0 00 LDY #$00 ; Y = 00 1CB7D: B1 00 LDA ($00),Y1CB7F: C8 INY1CB80: C9 FF CMP #$FF1CB82: F0 3F BEQ $1CBC3 1CB84: C9 FE CMP #$FE1CB86: F0 19 BEQ $1CBA1 1CB88: C9 FD CMP #$FD1CB8A: F0 19 BEQ $1CBA5 1CB8C: 9D 0007 STA $0700,X1CB8F: A5 02 LDA $021CB91: 10 0B BPL $1CB9E 1CB93: A5 03 LDA $031CB95: D0 05 BNE $1CB9C 1CB97: 9D 0007 STA $0700,X1CB9A: F0 02 BEQ $1CB9E 1CB9C: C6 03 DEC $03 1CB9E: E8 INX1CB9F: D0 DC BNE $1CB7D 1CBA1: A9 FF LDA #$FF1CBA3: D0 1A BNE $1CBBF 1CBA5: A9 FF LDA #$FF ; A = FF1CBA7: 20 BFCB JSR $CBBF 1CBAA: A9 02 LDA #$02 ; A = 021CBAC: 85 03 STA $031CBAE: A9 01 LDA #$01 ; A = 01 1CBB0: 20 BFCB JSR $CBBF 1CBB3: D0 C8 BNE $1CB7D 1CBB5: A9 FF LDA #$FF ; A = FF1CBB7: D0 04 BNE $1CBBD 1CBB9: A9 00 LDA #$00 ; A = 001CBBB: F0 00 BEQ $1CBBD ; Useless Branch 1CBBD: A6 21 LDX $21 ; Index for PPU Tile Mapping 1CBBF: 9D 0007 STA $0700,X1CBC2: E8 INX 1CBC3: 86 21 STX $21 1CBC5: 60 RTS ---- 1CBC6: 00 04 00 Table for PPU Pattern Table Control (3 bytes) ---- Name Table Drawing 1CBC9: A5 23 LDA $231CBCB: D0 72 BNE $1CC3F 1CBCD: A0 00 LDY #$00 ; Y = 001CBCF: 84 08 STY $08 1CBD1: A5 08 LDA $081CBD3: C9 3F CMP #$3F1CBD5: D0 0E BNE $1CBE5 1CBD7: 8D 0620 STA $20061CBDA: A9 00 LDA #$00 ; A = 001CBDC: 8D 0620 STA $20061CBDF: 8D 0620 STA $20061CBE2: 8D 0620 STA $2006 1CBE5: BE 0007 LDX $0700,Y1CBE8: F0 32 BEQ $1CC1C 1CBEA: A5 FF LDA $FF1CBEC: 29 18 AND #$18 ; keep bits ...x x...1CBEE: 1D C5CB ORA $CBC5,X1CBF1: 8D 0020 STA $20001CBF4: C8 INY1CBF5: AD 0220 LDA $20021CBF8: B9 0007 LDA $0700,Y1CBFB: 85 08 STA $081CBFD: 8D 0620 STA $20061CC00: C8 INY1CC01: B9 0007 LDA $0700,Y1CC04: 8D 0620 STA $20061CC07: C8 INY1CC08: E0 03 CPX #$031CC0A: D0 22 BNE $1CC2E 1CC0C: B9 0007 LDA $0700,Y1CC0F: 85 09 STA $09 1CC11: C8 INY1CC12: B9 0007 LDA $0700,Y1CC15: 8D 0720 STA $20071CC18: C6 09 DEC $091CC1A: D0 F5 BNE $1CC11 1CC1C: A9 00 LDA #$00 ; A = 001CC1E: 8D 0007 STA $07001CC21: 85 21 STA $21 ; Index for PPU Tile Mapping1CC23: A5 FF LDA $FF1CC25: 8D 0020 STA $2000 1CC28: 60 RTS ---- 1CC29: A9 FF LDA #$FF ; A = FF1CC2B: 8D 0720 STA $2007 1CC2E: B9 0007 LDA $0700,Y1CC31: C8 INY1CC32: C9 FF CMP #$FF1CC34: D0 F5 BNE $1CC2B 1CC36: B9 0007 LDA $0700,Y1CC39: C9 04 CMP #$041CC3B: B0 EC BCS $1CC291CC3D: 90 92 BCC $1CBD1 1CC3F: A2 00 LDX #$00 ; X = 001CC41: A5 FF LDA $FF1CC43: 29 18 AND #$18 ; keep bits ...x x...1CC45: 85 02 STA $02 1CC47: BC 0007 LDY $0700,X1CC4A: F0 D0 BEQ $1CC1C 1CC4C: A5 02 LDA $021CC4E: 19 C5CB ORA $CBC5,Y1CC51: 8D 0020 STA $20001CC54: E8 INX1CC55: BD 0007 LDA $0700,X1CC58: 85 00 STA $001CC5A: E8 INX1CC5B: BD 0007 LDA $0700,X1CC5E: 85 01 STA $01 1CC60: A4 00 LDY $001CC62: E8 INX1CC63: BD 0007 LDA $0700,X1CC66: 8D 0620 STA $20061CC69: E8 INX1CC6A: BD 0007 LDA $0700,X1CC6D: 8D 0620 STA $2006 1CC70: E8 INX1CC71: BD 0007 LDA $0700,X1CC74: 8D 0720 STA $20071CC77: 88 DEY1CC78: D0 F6 BNE $1CC70 1CC7A: C6 01 DEC $011CC7C: D0 E2 BNE $1CC60 1CC7E: E8 INX1CC7F: D0 C6 BNE $1CC47 1CC81: A6 36 LDX $361CC83: F0 32 BEQ $1CCB7 1CC85: A5 21 LDA $21 ; Index for PPU Tile Mapping1CC87: C9 30 CMP #$301CC89: B0 2C BCS $1CCB7 1CC8B: A5 FF LDA $FF1CC8D: 29 18 AND #$18 ; keep bits ...x x...1CC8F: 8D 0020 STA $20001CC92: A9 3F LDA #$3F ; A = 3F1CC94: 8D 0620 STA $20061CC97: A9 00 LDA #$00 ; A = 001CC99: 8D 0620 STA $20061CC9C: A8 TAY 1CC9D: B9 C007 LDA $07C0,Y1CCA0: 8D 0720 STA $20071CCA3: C8 INY1CCA4: CA DEX1CCA5: D0 F6 BNE $1CC9D 1CCA7: A9 3F LDA #$3F ; A = 3F1CCA9: 8D 0620 STA $20061CCAC: 8E 0620 STX $20061CCAF: 8E 0620 STX $20061CCB2: 8E 0620 STX $20061CCB5: 86 36 STX $36 1CCB7: 60 RTS ---- Alternate Graphics Loading 1CCB8: A5 71 LDA $711CCBA: F0 FB BEQ $1CCB71CCBC: 30 26 BMI $1CCE4 1CCBE: A5 30 LDA $30 ; Current Level1CCC0: 0A ASL1CCC1: 0A ASL1CCC2: 65 30 ADC $30 ; Level * 5...1CCC4: A8 TAY1CCC5: B9 2CCD LDA $CD2C,Y1CCC8: 85 6C STA $6C1CCCA: B9 2DCD LDA $CD2D,Y1CCCD: 85 6D STA $6D1CCCF: B9 2ECD LDA $CD2E,Y1CCD2: 85 6E STA $6E1CCD4: B9 2FCD LDA $CD2F,Y1CCD7: 85 6F STA $6F1CCD9: B9 30CD LDA $CD30,Y1CCDC: F0 49 BEQ $1CD27 1CCDE: 85 70 STA $701CCE0: A9 80 LDA #$80 ; A = 801CCE2: 85 71 STA $71 1CCE4: A6 21 LDX $211CCE6: E0 10 CPX #$101CCE8: B0 CD BCS $1CCB7 1CCEA: A9 01 LDA #$01 ; A = 011CCEC: 9D 0007 STA $0700,X1CCEF: 9D 0207 STA $0702,X1CCF2: E8 INX1CCF3: A9 20 LDA #$20 ; A = 201CCF5: 9D 0007 STA $0700,X1CCF8: E8 INX1CCF9: E8 INX1CCFA: A5 6D LDA $6D1CCFC: 9D 0007 STA $0700,X1CCFF: E8 INX1CD00: A5 6C LDA $6C1CD02: 9D 0007 STA $0700,X1CD05: E8 INX1CD06: A0 00 LDY #$00 ; Y = 00 1CD08: B1 6E LDA ($6E),Y1CD0A: 9D 0007 STA $0700,X1CD0D: C8 INY1CD0E: E8 INX1CD0F: C0 20 CPY #$201CD11: D0 F5 BNE $1CD08 1CD13: 86 21 STX $211CD15: C6 70 DEC $701CD17: F0 0E BEQ $1CD27 1CD19: A9 20 LDA #$20 ; A = 201CD1B: A2 6E LDX #$6E ; X = 6E1CD1D: 20 92C8 JSR $C892 ; Advance Address 6E-6F by 20 bytes 1CD20: A9 20 LDA #$20 ; A = 201CD22: A2 6C LDX #$6C ; X = 6C1CD24: 4C 92C8 JMP $C892 ; Advance Address 6C-6D by 20 bytes ---- 1CD27: A9 00 LDA #$00 ; A = 001CD29: 85 71 STA $71 1CD2B: 60 RTS ---- 1CD2C: Table for Alternate Graphics Loading (8 * 5 = 28 bytes) Bytes 0-1: PPU address Bytes 2-3: CPU address Byte 4 : Number of Tiles to Change (x2) 80 1A 52 92 2C Level 1 00 10 52 92 00 Level 2 60 14 D2 97 5D Level 3 00 10 52 92 00 Level 4 A0 16 72 A3 1D Level 5 80 0A 12 A7 22 Level 6 00 10 52 92 00 Level 7 60 1B 52 AB 25 Level 8 ---- 1CD54: A5 40 LDA $40 ; Outdoor/Indoor1CD56: 30 64 BMI $1CDBC 1CD58: A5 37 LDA $37 ; Indoor Screen cleared (0 = not cleared)1CD5A: F0 08 BEQ $1CD64 1CD5C: A9 80 LDA #$80 ; A = 801CD5E: 85 37 STA $371CD60: A9 20 LDA #$20 ; A = 201CD62: D0 0B BNE $1CD6F 1CD64: A5 1A LDA $1A1CD66: 29 03 AND #$03 ; keep bits .... ..xx1CD68: D0 52 BNE $1CDBC 1CD6A: A5 1A LDA $1A1CD6C: 29 0C AND #$0C ; keep bits .... xx..1CD6E: 0A ASL 1CD6F: 85 14 STA $141CD71: A6 21 LDX $211CD73: A9 01 LDA #$01 ; A = 011CD75: 9D 0007 STA $0700,X1CD78: 9D 0207 STA $0702,X1CD7B: E8 INX1CD7C: A9 40 LDA #$40 ; A = 401CD7E: 9D 0007 STA $0700,X1CD81: E8 INX1CD82: E8 INX1CD83: A9 1F LDA #$1F ; A = 1F1CD85: 9D 0007 STA $0700,X1CD88: E8 INX1CD89: A9 C0 LDA #$C0 ; A = C01CD8B: 9D 0007 STA $0700,X1CD8E: E8 INX1CD8F: AD BDCD LDA $CDBD1CD92: 85 10 STA $101CD94: AD BECD LDA $CDBE1CD97: 85 11 STA $111CD99: A9 07 LDA #$07 ; A = 071CD9B: 85 13 STA $131CD9D: 86 12 STX $121CD9F: A6 14 LDX $141CDA1: A0 00 LDY #$00 ; Y = 00 1CDA3: B1 10 LDA ($10),Y1CDA5: 1D FFCD ORA $CDFF,X1CDA8: 91 12 STA ($12),Y1CDAA: E8 INX1CDAB: 8A TXA1CDAC: 29 07 AND #$07 ; keep bits .... .xxx1CDAE: 05 14 ORA $141CDB0: AA TAX1CDB1: C8 INY1CDB2: C0 40 CPY #$401CDB4: 90 ED BCC $1CDA3 1CDB6: 98 TYA1CDB7: 18 CLC1CDB8: 65 12 ADC $121CDBA: 85 21 STA $21 1CDBC: 60 RTS ---- 1CDBD: BF CD Pointer for table below... ---- 1CDBF: Table for ? (40 bytes) Related to Electric Barrier FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FE FC F8 F0 E0 C0 80 00 00 01 03 07 0F 1F 3F 7F 7F 3F 1F 0F 07 03 01 00 00 80 C0 E0 F0 F8 FC FE ---- 1CDFF: Table for ? (28 bytes) 00 00 04 44 EB 32 20 00 00 00 10 30 EB 6A 44 00 00 00 08 0C D7 56 22 00 00 00 20 22 D7 4C 04 00 00 00 00 00 00 00 00 00 ---- 1CE27: A5 2C LDA $2C1CE29: C9 04 CMP #$041CE2B: D0 05 BNE $1CE32 1CE2D: 20 2BC2 JSR $C22B Intro Routines - Pointer 6 1CE30: A5 2C LDA $2C 1CE32: 20 57C8 JSR $C857 ; Go to Routine A in following table ---- 1CE35: Pointer table for Main Game (11 * 2 = 22 bytes) 4BCE -> 1CE4B 7ECE -> 1CE7E 9BCE -> 1CE9B D8CE -> 1CED8 E3CE -> 1CEE3 2ECF -> 1CF2E 9DCF -> 1CF9D E1CF -> 1CFE1 EACF -> 1CFEA 1FD0 -> 1D01F 2ED0 -> 1D02E ---- Main Game - Pointer 0 Load Level Headers 1CE4B: 20 83C1 JSR $C1831CE4E: 20 A1C9 JSR $C9A1 ; Reset Name Tables 0-1 to Zeroes 1CE51: A9 06 LDA #$06 ; A = 06 (Palettes for Intro Screen)1CE53: 20 17C2 JSR $C217 ; Draw Text String 1CE56: A0 02 LDY #$02 ; A = 021CE58: 20 39C1 JSR $C139 ; Switch Bank 2 1CE5B: A5 30 LDA $30 ; Current Level1CE5D: 0A ASL1CE5E: 0A ASL1CE5F: 0A ASL1CE60: 0A ASL1CE61: 0A ASL1CE62: A8 TAY1CE63: A2 00 LDX #$00 ; X = 001CE65: 86 3B STX $3B1CE67: 8E 9401 STX $0194 1CE6A: B9 19B3 LDA $B319,Y ; Load Level Headers (bank 2)1CE6D: 95 40 STA $40,X1CE6F: C8 INY1CE70: E8 INX1CE71: E0 20 CPX #$201CE73: D0 F5 BNE $1CE6A 1CE75: 20 9DDB JSR $DB9D1CE78: 20 D9C1 JSR $C1D9 1CE7B: E6 2C INC $2C ; Routine Index for Main Game 1CE7D: 60 RTS ---- Main Game - Pointer 1 Display Status Screen 1CE7E: A5 1C LDA $1C ; Demo Mode (0 = Not in Demo Mode)1CE80: D0 15 BNE $1CE97 1CE82: 20 ADCA JSR $CAAD ; Draw "STAGE" string 1CE85: A9 00 LDA #$00 ; A = 001CE87: 85 1E STA $1E1CE89: 20 61CA JSR $CA61 1CE8C: A5 22 LDA $22 ; Number of Players (0 = 1 Player)1CE8E: F0 05 BEQ $1CE95 1CE90: 85 1E STA $1E1CE92: 20 61CA JSR $CA61 1CE95: A9 C0 LDA #$C0 ; A = C0 (delay for score display screen)1CE97: 85 2A STA $2A ; Various delays (low byte)1CE99: D0 E0 BNE $1CE7B ; (put 02 in $2A to skip score display screen) 1CE9B: 20 15C3 JSR $C3151CE9E: D0 25 BNE $1CEC5 1CEA0: 20 A1C9 JSR $C9A1 ; Reset Name Tables1CEA3: 20 01C2 JSR $C201 ; Load Level Graphics 1CEA6: A9 20 LDA #$20 ; A = 201CEA8: 20 81D0 JSR $D081 1CEAB: A5 30 LDA $30 ; Current Level1CEAD: 0A ASL1CEAE: A8 TAY1CEAF: B9 C8CE LDA $CEC8,Y1CEB2: 85 FC STA $FC ; Vertical Scroll Offset1CEB4: A5 1C LDA $1C ; Demo Mode (0 = Not in Demo Mode)1CEB6: D0 06 BNE $1CEBE 1CEB8: B9 C9CE LDA $CEC9,Y1CEBB: 20 6BC1 JSR $C16B ; Play Sound (music in this case) 1CEBE: A9 FF LDA #$FF ; A = FF1CEC0: 85 23 STA $231CEC2: E6 2C INC $2C ; Routine Index for Main Game 1CEC4: 60 RTS ---- 1CEC5: 4C C1CA JMP $CAC1 ---- 1CEC8: Table for Vertical Adjustment and Music Theme (8 * 2 = 10 bytes) E0 2A E8 3E 00 2E E8 3E E0 32 E0 36 E0 2A E0 3A Byte 1: Vertical Adjustment for Background Tiles Byte 2: Music Theme Code 26 = Intro Tune 2A = Jungle and Hangar 2E = Waterfall 32 = Snow Field 36 = Energy Zone 3A = Alien's Lair 3E = Base I and II 42 = Base I and II Boss 46 = End of Level 4A = End Credits 4E = Game Over ---- 1CED8: 20 F1C1 JSR $C1F11CEDB: D0 E7 BNE $1CEC4 1CEDD: A9 FF LDA #$FF ; A = FF1CEDF: 85 6A STA $6A1CEE1: D0 98 BNE $1CE7B 1CEE3: 20 38D0 JSR $D038 1CEE6: A5 25 LDA $251CEE8: D0 1F BNE $1CF09 1CEEA: A5 3B LDA $3B1CEEC: D0 37 BNE $1CF25 1CEEE: 20 71D3 JSR $D371 1CEF1: A5 38 LDA $38 ; Player 1 Game Over State (1 = Game Over)1CEF3: 25 39 AND $39 ; Player 2 Game Over State (1 = Game Over)1CEF5: D0 13 BNE $1CF0A 1CEF7: 20 E9C1 JSR $C1E91CEFA: 20 C9C1 JSR $C1C91CEFD: 20 D1C1 JSR $C1D11CF00: 20 E1C1 JSR $C1E11CF03: 20 05D1 JSR $D1051CF06: 20 F9C1 JSR $C1F9 ; Boss Tiles Loading 1CF09: 60 RTS ---- 1CF0A: A9 60 LDA #$60 ; A = 601CF0C: 85 29 STA $291CF0E: A9 0A LDA #$0A ; A = 0A1CF10: D0 15 BNE $1CF27 1CF12: A9 00 LDA #$00 ; A = 001CF14: 85 3B STA $3B1CF16: A9 05 LDA #$05 ; A = 051CF18: 20 27CF JSR $CF27 1CF1B: A9 00 LDA #$00 ; A = 001CF1D: 85 23 STA $231CF1F: 8D 0007 STA $0700 1CF22: 4C 83C1 JMP $C183 ---- 1CF25: A9 08 LDA #$08 ; A = 08 1CF27: 85 2C STA $2C1CF29: A9 00 LDA #$00 ; A = 001CF2B: 85 2D STA $2D 1CF2D: 60 RTS ---- Related to End of Level 1CF2E: A9 00 LDA #$00 ; A = 00 1CF30: 85 6A STA $6A 1CF32: 85 37 STA $37 1CF34: A5 AA LDA $AA ; Current Weapon Code (Player 1) 1CF36: 85 10 STA $10 1CF38: A5 AB LDA $AB ; Current Weapon Code (Player 2) 1CF3A: 85 11 STA $11 1CF3C: A2 40 LDX #$40 ; X = 40 (set to 30 for Game Over after Lvl 1) 1CF3E: 20 81C4 JSR $C481 1CF41: A5 3B LDA $3B 1CF43: F0 29 BEQ $1CF6E 1CF45: A5 10 LDA $10 1CF47: 85 AA STA $AA ; Current Weapon Code (Player 1) 1CF49: A5 11 LDA $11 1CF4B: 85 AB STA $AB ; Current Weapon Code (Player 2) 1CF4D: E6 30 INC $30 ; EA this line to loop the first level 1CF4F: A5 30 LDA $30 ; Current Level 1CF51: C9 08 CMP #$08 ; if > last level, start ending sequence 1CF53: 90 0B BCC $1CF60 1CF55: 20 01C3 JSR $C301 1CF58: E6 31 INC $31 ; Game Completion Count 1CF5A: A9 09 LDA #$09 ; A = 09 1CF5C: 85 30 STA $30 ; Current Level 1CF5E: D0 05 BNE $1CF65 1CF60: A9 0A LDA #$0A ; A = 0A 1CF62: 20 04C2 JSR $C204 ; Load Graphics Group 0A 1CF65: A9 00 LDA #$00 ; A = 00 1CF67: 85 2C STA $2C 1CF69: 85 2D STA $2D 1CF6B: 85 6A STA $6A 1CF6D: 60 RTS ---- Game Over 1CF6E: A5 1C LDA $1C ; Demo Mode (0 = Not in Demo Mode) 1CF70: D0 28 BNE $1CF9A 1CF72: 20 A1C9 JSR $C9A1 ; Reset Name Tables 0-1 to Zeroes 1CF75: A9 0A LDA #$0A ; A = 0A 1CF77: 20 04C2 JSR $C204 ; Load Graphics Group 0A 1CF7A: A9 06 LDA #$06 ; A = 06 (Palettes for Intro Screen) 1CF7C: 20 17C2 JSR $C217 ; Draw Text String 1CF7F: A9 0D LDA #$0D ; A = 0D (GAME OVER) 1CF81: 20 17C2 JSR $C217 ; Draw Text String 1CF84: A9 4E LDA #$4E ; A = 4E (4E = Game Over Tune) 1CF86: 20 6BC1 JSR $C16B ; Play Sound 1CF89: C6 3A DEC $3A 1CF8B: 30 08 BMI $1CF95 1CF8D: A9 0E LDA #$0E ; A = 0E (CONTINUE END) 1CF8F: 20 17C2 JSR $C217 ; Draw Text String 1CF92: 4C 7BCE JMP $CE7B ---- 1CF95: A9 07 LDA #$07 ; A = 07 1CF97: 4C 27CF JMP $CF27 ---- 1CF9A: E6 1F INC $1F 1CF9C: 60 RTS ---- 1CF9D: A5 F5 LDA $F5 ; Controller 1 Buttons Pressed 1CF9F: 29 10 AND #$10 ; keep bits ...x .... (Start button) 1CFA1: F0 18 BEQ $1CFBB 1CFA3: 20 83C1 JSR $C183 1CFA6: A5 6B LDA $6B 1CFA8: D0 32 BNE $1CFDC 1CFAA: 20 47C4 JSR $C447 1CFAD: A9 00 LDA #$00 1CFAF: 85 2C STA $2C 1CFB1: 8D 3403 STA $0334 1CFB4: 8D 1A03 STA $031A 1CFB7: 8D 0003 STA $0300 1CFBA: 60 RTS ---- 1CFBB: A5 F5 LDA $F5 ; Controller 1 Buttons Pressed 1CFBD: 29 20 AND #$20 ; keep bits ..x. .... (Select button) 1CFBF: F0 06 BEQ $1CFC7 1CFC1: A5 6B LDA $6B 1CFC3: 49 01 EOR #$01 ; flip bits .... ...x 1CFC5: 85 6B STA $6B 1CFC7: A9 52 LDA #$52 ; A = 52 (Y Position of Cursor - 1 Player) 1CFC9: 8D 3403 STA $0334 1CFCC: A9 AA LDA #$AA ; A = AA 1CFCE: 8D 0003 STA $0300 1CFD1: A6 6B LDX $6B 1CFD3: BD 72C2 LDA $C272,X 1CFD6: 8D 1A03 STA $031A 1CFD9: 4C C1CA JMP $CAC1 ---- 1CFDC: A9 00 LDA #$00 ; A = 00 1CFDE: 4C 0EC3 JMP $C30E ; Set Game Mode to A and Set Delay to 240 ---- 1CFE1: A5 F5 LDA $F5 ; Controller 1 Buttons Pressed 1CFE3: 29 10 AND #$10 ; Check for Start button 1CFE5: D0 F5 BNE $1CFDC 1CFE7: 4C C1CA JMP $CAC1 ---- 1CFEA: 20 EECE JSR $CEEE 1CFED: A5 2C LDA $2C 1CFEF: C9 0A CMP #$0A 1CFF1: F0 2B BEQ $1D01E 1CFF3: A4 2A LDY $2A 1CFF5: F0 08 BEQ $1CFFF 1CFF7: C8 INY 1CFF8: F0 24 BEQ $1D01E 1CFFA: 20 15C3 JSR $C315 1CFFD: D0 1F BNE $1D01E 1CFFF: A2 01 LDX #$01 ; X = 01 1D001: A0 00 LDY #$00 ; Y = 00 1D003: B5 38 LDA $38,X 1D005: D0 07 BNE $1D00E 1D007: B5 90 LDA $90,X 1D009: C9 01 CMP #$01 1D00B: D0 01 BNE $1D00E 1D00D: C8 INY 1D00E: CA DEX 1D00F: 10 F2 BPL $1D003 1D011: 98 TYA 1D012: 8D 9401 STA $0194 1D015: F0 07 BEQ $1D01E 1D017: A9 46 LDA #$46 ; A = 46 (End of Level Tune) 1D019: 20 6BC1 JSR $C16B ; Play Sound 1D01C: E6 2C INC $2C 1D01E: 60 RTS ---- 1D01F: 20 33C2 JSR $C233 1D022: 20 71D3 JSR $D371 1D025: 20 E9C1 JSR $C1E9 1D028: 20 C9C1 JSR $C1C9 1D02B: 4C 05D1 JMP $D105 ---- 1D02E: 20 F7CE JSR $CEF7 1D031: C6 29 DEC $29 1D033: D0 E9 BNE $1D01E 1D035: 4C 12CF JMP $CF12 ---- 1D038: A5 1C LDA $1C ; Demo Mode (0 = Not in Demo Mode) 1D03A: 05 26 ORA $26 1D03C: 05 20 ORA $20 1D03E: D0 23 BNE $1D063 1D040: A5 F5 LDA $F5 ; Controller 1 Buttons Pressed 1D042: A4 25 LDY $25 1D044: D0 0D BNE $1D053 Pause Game 1D046: 29 10 AND #$10 ; keep bits ...x .... (check for Start button) 1D048: F0 19 BEQ $1D063 1D04A: A9 01 LDA #$01 ; A = 01 1D04C: 85 25 STA $25 ; Pause State (1 = Game Paused) 1D04E: A9 54 LDA #$54 ; A = 54 (54 = Pause sound) 1D050: 4C 6BC1 JMP $C16B ; Play Sound ---- 1D053: 20 8BD3 JSR $D38B 1D056: 20 0FC2 JSR $C20F Unpause Game 1D059: A5 F5 LDA $F5 ; Controller 1 Buttons Pressed 1D05B: 29 10 AND #$10 ; keep bits ...x .... (check for Start button) 1D05D: F0 04 BEQ $1D063 1D05F: A9 00 LDA #$00 ; A = 00 1D061: 85 25 STA $25 ; Pause State (1 = Game Paused) 1D063: 60 RTS ---- Load Boss Room (indoor) 1D064: A9 FF LDA #$FF ; A = FF 1D066: 85 48 STA $48 ; Boss Tiles Load 1D068: A5 30 LDA $30 ; Current Level 1D06A: 0A ASL 1D06B: 0A ASL 1D06C: 0A ASL 1D06D: 0A ASL 1D06E: 38 SEC 1D06F: E5 30 SBC $30 1D071: A8 TAY 1D072: A2 00 LDX #$00 ; X = 00 1D074: B9 9ED1 LDA $D19E,Y 1D077: 95 49 STA $49,X 1D079: C8 INY 1D07A: E8 INX 1D07B: E0 0F CPX #$0F 1D07D: D0 F5 BNE $1D074 1D07F: A9 20 LDA #$20 ; A = 20 1D081: 85 02 STA $021D083: 85 36 STA $36 ; Index for PPU Sprite Index1D085: A5 1A LDA $1A ; Permanent Frame Counter1D087: 29 30 AND #$30 ; keep bits ..xx ....1D089: 85 03 STA $031D08B: A2 00 LDX #$00 ; X = 001D08D: 86 00 STX $00 1D08F: A9 00 LDA #$00 ; A = 001D091: 85 07 STA $071D093: A4 00 LDY $001D095: B9 5000 LDA $0050,Y1D098: 0A ASL1D099: 79 5000 ADC $0050,Y1D09C: 26 07 ROL $071D09E: 6D 25D2 ADC $D2251D0A1: 85 06 STA $061D0A3: A5 07 LDA $071D0A5: 6D 26D2 ADC $D2261D0A8: 85 07 STA $071D0AA: A0 00 LDY #$00 ; Y = 001D0AC: A9 0F LDA #$0F ; A = 0F (basic black for all palettes)1D0AE: 9D C007 STA $07C0,X1D0B1: E8 INX 1D0B2: A5 74 LDA $741D0B4: D0 1A BNE $1D0D0 1D0B6: B1 06 LDA ($06),Y 1D0B8: 9D C007 STA $07C0,X1D0BB: C8 INY1D0BC: E8 INX1D0BD: C0 03 CPY #$031D0BF: D0 F1 BNE $1D0B2 1D0C1: E6 00 INC $001D0C3: E4 02 CPX $021D0C5: D0 C8 BNE $1D08F 1D0C7: A5 74 LDA $741D0C9: F0 04 BEQ $1D0CF1D0CB: 30 02 BMI $1D0CF 1D0CD: C6 74 DEC $74 1D0CF: 60 RTS ---- 1D0D0: 84 03 STY $031D0D2: A4 40 LDY $40 ; Outdoor/Indoor1D0D4: 30 06 BMI $1D0DC 1D0D6: A4 03 LDY $031D0D8: E0 04 CPX #$041D0DA: 90 DA BCC $1D0B6 1D0DC: A4 03 LDY $031D0DE: E0 10 CPX #$101D0E0: B0 D4 BCS $1D0B6 1D0E2: A5 74 LDA $74 ; Timer for Palette Change1D0E4: 30 13 BMI $1D0F9 1D0E6: C9 09 CMP #$091D0E8: B0 0F BCS $1D0F9 1D0EA: A8 TAY1D0EB: B9 FCD0 LDA $D0FC,Y1D0EE: 85 04 STA $041D0F0: A4 03 LDY $031D0F2: B1 06 LDA ($06),Y1D0F4: 38 SEC1D0F5: E5 04 SBC $041D0F7: B0 BF BCS $1D0B8 1D0F9: A9 0F LDA #$0F ; A = 0F1D0FB: D0 BB BNE $1D0B8 ---- 1D0FC: 00 00 10 10 20 20 30 30 Table for ? (8 bytes) ---- Palette Modifications for Various Situations 1D105: A5 36 LDA $361D107: C5 18 CMP $18 ; Game Mode1D109: B0 60 BCS $1D16B 1D10B: A5 1A LDA $1A ; Permanent Frame Counter1D10D: 29 07 AND #$07 ; keep bits .... .xxx1D10F: C9 05 CMP #$051D111: D0 37 BNE $1D14A 1D113: A5 78 LDA $781D115: D0 33 BNE $1D14A 1D117: E6 72 INC $721D119: A5 72 LDA $721D11B: A4 30 LDY $30 ; Current Level1D11D: D9 81D1 CMP $D181,Y1D120: 90 04 BCC $1D126 1D122: A9 00 LDA #$00 ; A = 001D124: 85 72 STA $72 1D126: A8 TAY1D127: B9 4C00 LDA $004C,Y ; Palette Code 0 for Cycling Background Tiles1D12A: 85 53 STA $53 ; Palette Code 3 for Background Tiles1D12C: A5 40 LDA $40 ; Level Type (Outdoor/Indoor)1D12E: 30 3C BMI $1D16C 1D130: A5 30 LDA $30 ; Current Level1D132: F0 0C BEQ $1D140 1D134: C9 07 CMP #$07 ; check if Level 81D136: F0 0D BEQ $1D145 1D138: C9 08 CMP #$08 ; check if Ending1D13A: F0 40 BEQ $1D17C 1D13C: A5 48 LDA $48 ; Boss Tiles Load1D13E: 30 05 BMI $1D145 1D140: B9 96D1 LDA $D196,Y1D143: 85 52 STA $52 1D145: A9 10 LDA #$10 ; A = 101D147: 20 81D0 JSR $D081 1D14A: A5 7D LDA $7D ; Eagle Weapon Flash Timer1D14C: F0 1D BEQ $1D16B 1D14E: C6 7D DEC $7D ; Eagle Weapon Flash Timer1D150: A5 7D LDA $7D1D152: 4A LSR1D153: B0 16 BCS $1D16B 1D155: 29 03 AND #$03 ; keep bits .... ..xx1D157: A8 TAY1D158: B9 92D1 LDA $D192,Y1D15B: 8D D007 STA $07D01D15E: 8D D407 STA $07D41D161: 8D D807 STA $07D81D164: 8D DC07 STA $07DC1D167: A9 20 LDA #$20 ; A = 201D169: 85 36 STA $36 ; Index for PPU Sprite Index 1D16B: 60 RTS ---- 1D16C: A5 30 LDA $30 ; Current Level1D16E: 29 02 AND #$02 ; keep bits .... ..x.1D170: 0A ASL1D171: 65 72 ADC $721D173: A8 TAY1D174: B9 8AD1 LDA $D18A,Y1D177: 85 52 STA $52 ; Palette Code 2 for Background Tiles 1D179: 4C 45D1 JMP $D145 ---- 1D17C: B9 9AD1 LDA $D19A,Y1D17F: D0 C2 BNE $1D143 ---- 1D181: 04 04 03 04 04 04 04 04 04 Table for ? (9 bytes) ---- 1D18A: 13 14 15 14 Level 2 Boss Room Palette Codes (4 bytes) 1D18E: 1B 1C 1D 1C Level 4 Boss Room Palette Codes (4 bytes) 1D192: 0F 30 16 11 Flashing Effect Color Codes (4 bytes) 1D196: 04 5C 04 5D Table related to Level 1 (mountains and more) (4 bytes) 1D19A: 66 6A 6B 6A Table for Ending Scene (4 bytes) Tables for Alternate Collision Limits and Palettes (8 * F = 78 bytes) 1D19E: 06 A8 A8 23 23 23 23 02 03 04 23 00 01 22 07 Level 1 1D1AD: 00 FF FF 16 17 18 17 11 12 13 16 00 01 22 21 Level 2 1D1BC: 07 FF FF 27 54 55 54 0B 25 26 27 00 01 22 07 Level 3 1D1CB: 00 FF FF 1E 1F 20 1F 19 1A 1C 1E 00 01 22 2B Level 4 1D1DA: 20 F0 F0 42 42 42 42 3D 3E 40 42 00 01 22 06 Level 5 1D1E9: 0C DE DE 3A 3B 3A 3C 39 39 04 3A 00 01 22 56 Level 6 1D1F8: 0E F1 F1 5A 5F 5A 5B 45 46 59 5F 00 01 22 07 Level 7 1D207: 05 B6 B6 4B 50 4B 50 48 49 4A 4B 00 01 43 44 Level 8 1D216: 00 00 00 67 68 69 68 25 65 66 67 6D 6C 22 64 Ending ? ---- 1D225: 27 D2 Pointer for Palettes Table (2 bytes) ---- 1D227: Palettes (6E * 3 = 14A bytes) From Level 1 Header (0C-17) 05 08 05 08 02 03 04 05 00 01 22 07 00: 37 12 0F 01: 36 16 0F 02: 19 29 08 03: 28 18 08 04: 16 30 10 05: 11 21 30 06: 16 20 00 07: 20 00 0F 08: 11 30 21 22: 20 26 16 From Level 2 Header (0C-17) 24 28 29 28 09 0A 04 24 00 01 22 2A 00: 37 12 0F 01: 36 16 0F 04: 16 30 10 09: 10 00 09 0A: 00 0C 20 22: 20 26 16 24: 36 06 02 28: 36 06 22 29: 36 06 32 2A: 20 1B 0F ---- From Level 3 Header (0C-17) 0D 0E 0F 00 0B 0C 04 0D 00 01 22 07 00: 37 12 0F 01: 36 16 0F 04: 16 30 10 07: 20 00 0F 0B: 0A 1A 00 0C: 28 18 07 0D: 1C 2C 0C 0E: 0C 1C 2C 0F: 2C 0C 1C 22: 20 26 16 ---- From Level 4 Header (0C-17) 2E 2F 30 2F 2C 2D 04 2E 00 01 22 2A 00: 37 12 0F 01: 36 16 0F 04: 16 30 10 22: 20 26 16 2A: 20 1B 0F 2C: 10 00 0C 2D: 00 06 20 2E: 38 09 06 2F: 38 09 16 30: 38 09 26 ---- From Level 5 Header (0C-17) 62 63 62 633D 3E 04 62 00 01 22 07 00: 37 12 0F 01: 36 16 0F 04: 16 30 10 07: 20 00 0F 22: 20 26 16 3D: 20 10 1C 3E: 20 10 0A 62: 20 22 02 63: 22 20 02 ---- From Level 6 Header (0C-17) 35 36 37 3833 34 04 35 00 01 22 07 00: 37 12 0F 01: 36 16 0F 04: 16 30 10 07: 20 00 0F 22: 20 26 16 33: 00 20 1A 34: 01 20 00 35: 20 27 17 36: 20 26 07 37: 20 27 16 38: 20 26 06 ---- From Level 7 Header (0C-17) 47 57 47 58 45 46 04 47 00 01 22 07 00: 37 12 0F 01: 36 16 0F 04: 16 30 10 07: 20 00 0F 22: 20 26 16 45: 27 17 06 46: 20 10 00 47: 06 1B 0B 57: 15 1B 0B 58: 0F 1B 0B ---- From Level 8 Header (0C-17) 4C 4D 4E 4F 48 49 4A 4C 00 01 43 44 00: 37 12 0F 01: 36 16 0F 43: 30 28 16 44: 30 25 14 48: 10 00 07 49: 36 15 06 4A: 35 15 04 4C: 18 13 03 4D: 26 13 03 4E: 14 13 03 4F: 2B 13 03 ---- 00: 37 12 0F 01: 36 16 0F 02: 19 29 08 03: 28 18 08 04: 16 30 10 05: 11 21 30 06: 16 20 00 07: 20 00 0F 08: 11 30 21 09: 10 00 09 0A: 00 0C 20 0B: 0A 1A 00 0C: 28 18 07 0D: 1C 2C 0C 0E: 0C 1C 2C 0F: 2C 0C 1C 10: 10 2B 0F 11: 06 00 08 12: 20 00 08 13: 06 00 08 14: 16 00 08 15: 26 00 08 16: 20 00 06 17: 20 00 16 18: 20 00 26 19: 0C 18 09 1A: 20 18 09 1B: 06 18 09 1C: 16 18 09 1D: 26 18 09 1E: 20 18 06 1F: 20 18 16 20: 20 18 26 21: 20 22 02 22: 20 26 16 23: 01 30 10 24: 36 06 02 25: 30 10 00 26: 28 18 08 27: 05 18 08 28: 36 06 22 29: 36 06 32 2A: 20 1B 0F 2B: 20 22 1C 2C: 10 00 0C 2D: 00 06 20 2E: 38 09 06 2F: 38 09 16 30: 38 09 26 31: 0F 20 2C 32: 0F 20 26 33: 00 20 1A 34: 01 20 00 35: 20 27 17 36: 20 26 07 37: 20 27 16 38: 20 26 06 39: 00 10 13 3A: 16 20 00 3B: 06 20 00 3C: 26 20 00 3D: 20 10 1C 3E: 20 10 0A 3F: 20 00 17 40: 20 12 00 41: 07 00 17 42: 20 16 00 43: 30 28 16 44: 30 25 14 45: 27 17 06 46: 20 10 00 47: 06 1B 0B 48: 10 00 07 49: 36 15 06 4A: 35 15 04 4B: 35 16 1C 4C: 18 13 03 4D: 26 13 03 4E: 14 13 03 4F: 2B 13 03 50: 26 16 03 51: 20 13 27 52: 20 16 27 53: 00 00 00 54: 15 18 08 55: 35 18 08 56: 20 12 17 57: 15 1B 0B 58: 0F 1B 0B 59: 24 13 03 5A: 27 17 06 5B: 17 06 0F 5C: 06 30 10 5D: 26 30 10 5E: 00 00 00 5F: 20 27 17 60: 10 26 06 61: 10 16 07 62: 20 22 02 63: 22 20 02 64: 20 10 00 65: 18 07 1A 66: 16 18 07 67: 20 10 11 68: 20 11 11 69: 20 2C 11 6A: 26 18 07 6B: 16 18 07 6C: 16 00 00 6D: 0B 1B 3B ---- 1D371: 20 B4D3 JSR $D3B4 1D374: A5 73 LDA $731D376: C9 02 CMP #$021D378: 90 02 BCC $1D37C 1D37A: A9 00 LDA #$00 ; A = 00 1D37C: 85 73 STA $731D37E: A5 75 LDA $751D380: 05 76 ORA $761D382: F0 04 BEQ $1D388 1D384: A9 01 LDA #$01 ; A = 011D386: 85 68 STA $68 1D388: 20 B9C1 JSR $C1B9 1D38B: A0 07 LDY #$07 ; Y = 07 1D38D: 98 TYA1D38E: 0A ASL1D38F: 85 08 STA $081D391: A5 1A LDA $1A ; Permanent Frame Counter1D393: 29 01 AND #$01 ; keep bits .... ...x1D395: 05 08 ORA $081D397: AA TAX1D398: BD 6803 LDA $0368,X1D39B: 99 0203 STA $0302,Y1D39E: BD 7803 LDA $0378,X1D3A1: 99 5003 STA $0350,Y1D3A4: BD B803 LDA $03B8,X1D3A7: 99 1C03 STA $031C,Y1D3AA: BD C803 LDA $03C8,X1D3AD: 99 3603 STA $0336,Y1D3B0: 88 DEY1D3B1: 10 DA BPL $1D38D 1D3B3: 60 RTS ---- 1D3B4: A9 00 LDA #$00 ; A = 001D3B6: 85 68 STA $681D3B8: 85 A2 STA $A21D3BA: 85 A3 STA $A31D3BC: 85 8E STA $8E1D3BE: 85 2F STA $2F ; Current Weapon Strength Code1D3C0: A4 38 LDY $38 ; Game Over State of Player 1 (1 = Game Over)1D3C2: D0 02 BNE $1D3C6 1D3C4: 09 01 ORA #$01 ; set bits .... ...x 1D3C6: A4 39 LDY $391D3C8: D0 02 BNE $1D3CC 1D3CA: 09 02 ORA #$02 ; set bits .... ..x. 1D3CC: AA TAX1D3CD: F0 17 BEQ $1D3E6 1D3CF: CA DEX1D3D0: 86 DF STX $DF1D3D2: 8A TXA1D3D3: 29 01 AND #$01 ; keep bits .... ...x1D3D5: AA TAX 1D3D6: 20 60D4 JSR $D460 1D3D9: A5 DF LDA $DF1D3DB: C9 02 CMP #$021D3DD: D0 07 BNE $1D3E6 1D3DF: E8 INX 1D3E0: 20 60D4 JSR $D4601D3E3: 20 2CD4 JSR $D42C 1D3E6: A5 2C LDA $2C1D3E8: C9 04 CMP #$041D3EA: D0 3F BNE $1D42B 1D3EC: A5 22 LDA $22 ; Number of Players (0 = 1 Player)1D3EE: F0 3B BEQ $1D42B 1D3F0: A2 01 LDX #$01 ; X = 01 1D3F2: B5 38 LDA $38,X1D3F4: D0 05 BNE $1D3FB 1D3F6: CA DEX1D3F7: 10 F9 BPL $1D3F21D3F9: 30 30 BMI $1D42B Related to Lives Transfer between players 1D3FB: B5 F5 LDA $F5,X ; Controller X Buttons Pressed1D3FD: 29 80 AND #$80 ; keep bits x... .... (check for A button)1D3FF: F0 2A BEQ $1D42B 1D401: 8A TXA1D402: 49 01 EOR #$01 ; flip bits .... ...x1D404: A8 TAY1D405: B9 3200 LDA $0032,Y ; Player X Lives1D408: F0 21 BEQ $1D42B 1D40A: C9 01 CMP #$011D40C: D0 07 BNE $1D415 1D40E: B9 9000 LDA $0090,Y1D411: C9 01 CMP #$011D413: D0 16 BNE $1D42B 1D415: B9 3200 LDA $0032,Y ; Player X Lives1D418: 38 SEC1D419: E9 01 SBC #$01 ; Lose a Life ?1D41B: C9 FF CMP #$FF ; Check if out of lives1D41D: D0 02 BNE $1D421 1D41F: A9 00 LDA #$00 ; A = 00 1D421: 99 3200 STA $0032,Y 1D424: 20 D1DA JSR $DAD1 1D427: 95 90 STA $90,X1D429: 95 38 STA $38,X ; Player Game Over State (1 = Game Over) 1D42B: 60 RTS ---- 1D42C: A5 40 LDA $40 ; Outdoor/Indoor1D42E: D0 23 BNE $1D453 1D430: A5 41 LDA $41 ; Scrolling (H/V)1D432: D0 09 BNE $1D43D 1D434: 20 54D4 JSR $D4541D437: F0 03 BEQ $1D43C 1D439: DE 3403 DEC $0334,X 1D43C: 60 RTS ---- 1D43D: A5 75 LDA $751D43F: D0 12 BNE $1D453 1D441: 20 54D4 JSR $D4541D444: F0 0D BEQ $1D453 1D446: BD 1A03 LDA $031A,X1D449: 18 CLC1D44A: 65 68 ADC $681D44C: 9D 1A03 STA $031A,X1D44F: 90 02 BCC $1D453 1D451: F6 BA INC $BA,X 1D453: 60 RTS ---- 1D454: A2 00 LDX #$00 ; X = 001D456: A5 A2 LDA $A21D458: C5 A3 CMP $A31D45A: F0 03 BEQ $1D45F1D45C: 90 01 BCC $1D45F 1D45E: E8 INX 1D45F: 60 RTS ---- 1D460: 20 A0D4 JSR $D4A0 1D463: B5 AE LDA $AE,X ; Timer for Invincibility (after dying)1D465: F0 05 BEQ $1D46C 1D467: D6 AE DEC $AE,X ; GG Code SLTIYG changes D6 -> B5 1D469: 4C 76D4 JMP $D476 ---- 1D46C: B5 90 LDA $90,X1D46E: C9 01 CMP #$011D470: D0 04 BNE $1D476 1D472: A9 01 LDA #$01 ; A = 011D474: 85 8E STA $8E ; Enemy Attack Switch (1 = Enemies Attack) 1D476: B5 B0 LDA $B0,X ; Timer for B Weapon Effect1D478: F0 08 BEQ $1D482 1D47A: A5 1A LDA $1A ; Permanent Frame Counter1D47C: 29 07 AND #$07 ; keep bits .... .xxx1D47E: D0 02 BNE $1D482 1D480: D6 B0 DEC $B0,X 1D482: B5 CE LDA $CE,X1D484: F0 02 BEQ $1D488 1D486: D6 CE DEC $CE,X 1D488: A9 00 LDA #$00 ; A = 001D48A: 95 D4 STA $D4,X1D48C: B5 AA LDA $AA,X1D48E: 29 07 AND #$07 ; keep bits .... .xxx1D490: A8 TAY1D491: B9 9BD4 LDA $D49B,Y1D494: C5 2F CMP $2F ; Current Weapon Strength Code (0-3)1D496: 90 02 BCC $1D49A 1D498: 85 2F STA $2F 1D49A: 60 RTS ---- 1D49B: 00 02 01 03 02 Table for Weapon Strength Code (5 bytes) Regular = Weak M = Strong F = Medium S = Very Strong L = Strong ---- 1D4A0: A4 30 LDY $30 ; Current Level1D4A2: A5 40 LDA $40 ; Outdoor/Indoor1D4A4: 0A ASL1D4A5: B9 BBD4 LDA $D4BB,Y1D4A8: 90 02 BCC $1D4AC 1D4AA: A9 03 LDA #$03 ; A = 03 1D4AC: 85 08 STA $081D4AE: B5 90 LDA $90,X 1D4B0: 20 57C8 JSR $C857 ; Go to Routine A in following table ---- 1D4B3: Pointer table for ? (4 * 2 = 8 bytes) C3D4 -> 1D4C3 34D5 -> 1D534 93D5 -> 1D593 E6D3 -> 1D3E6 ---- 1D4BB: 00 01 02 01 00 00 00 00 Spawn Position Index (8 bytes) ---- 1D4C3: 20 D5DA JSR $DAD5 1D4C6: 8A TXA1D4C7: 0A ASL1D4C8: 0A ASL1D4C9: 18 CLC1D4CA: 65 08 ADC $081D4CC: A8 TAY1D4CD: B9 24D5 LDA $D524,Y1D4D0: 9D 1A03 STA $031A,X ; Player Y Position on Screen1D4D3: B9 2CD5 LDA $D52C,Y1D4D6: 9D 3403 STA $0334,X ; Player X Position on Screen1D4D9: A9 01 LDA #$01 ; A = 011D4DB: 95 A0 STA $A0,X1D4DD: A5 40 LDA $40 ; Outdoor/Indoor1D4DF: D0 24 BNE $1D505 ; if Indoor, skip to $1D505 1D4E1: 20 14D5 JSR $D5141D4E4: 90 1F BCC $1D505 1D4E6: A9 10 LDA #$10 ; A = 101D4E8: 9D 3403 STA $0334,X 1D4EB: 20 14D5 JSR $D5141D4EE: 90 15 BCC $1D505 1D4F0: BD 3403 LDA $0334,X1D4F3: 18 CLC1D4F4: 69 10 ADC #$101D4F6: 9D 3403 STA $0334,X1D4F9: C9 E0 CMP #$E01D4FB: B0 03 BCS $1D500 1D4FD: 4C EBD4 JMP $D4EB ---- 1D500: A9 30 LDA #$30 ; A = 301D502: 9D 3403 STA $0334,X 1D505: A9 02 LDA #$02 ; A = 021D507: 95 A6 STA $A6,X1D509: A9 00 LDA #$00 ; A = 001D50B: 95 C6 STA $C6,X ; Player Y Acceleration1D50D: A9 80 LDA #$80 ; A = 80 (Invincibility Time, 1.33 second)1D50F: 95 AE STA $AE,X ; Timer for Invincibility1D511: F6 90 INC $90,X 1D513: 60 RTS ---- 1D514: 20 A3D9 JSR $D9A3 1D517: 0A ASL1D518: B0 09 BCS $1D523 1D51A: BD 1A03 LDA $031A,X1D51D: 18 CLC1D51E: 69 20 ADC #$20 1D520: 4C A1DA JMP $DAA1 ---- 1D523: 60 RTS ---- Player Spawn Positions, according to level and player index 1D524: Table for Spawn Y Positions (8 bytes) 20 60 50 60 Player 1 20 60 50 60 Player 2 1D52C: Table for Spawn X Positions (8 bytes) 30 70 30 70 Player 1 20 90 20 90 Player 2 ---- 1D534: 20 6BD5 JSR $D56B1D537: 20 07C2 JSR $C207 1D53A: B5 C2 LDA $C2,X1D53C: 95 C0 STA $C0,X1D53E: B5 BA LDA $BA,X1D540: D0 07 BNE $1D549 1D542: BD 1A03 LDA $031A,X1D545: C9 E8 CMP #$E8 ; Check if falling at the bottom of the screen1D547: B0 01 BCS $1D54A 1D549: 60 RTS ---- 1D54A: A9 52 LDA #$52 ; A = 52 (Player Death)1D54C: 20 6BC1 JSR $C16B ; Play Sound 1D54F: 20 88D8 JSR $D888 1D552: 95 B2 STA $B2,X1D554: 95 C8 STA $C8,X1D556: 95 D2 STA $D2,X1D558: 95 A6 STA $A6,X1D55A: 95 9E STA $9E,X1D55C: A9 01 LDA #$01 ; A = 011D55E: 95 B4 STA $B4,X ; Player Death Flag1D560: A9 FD LDA #$FD ; A = FD1D562: 95 C6 STA $C6,X ; Player Y Velocity1D564: A9 80 LDA #$80 ; A = 801D566: 95 C4 STA $C4,X1D568: F6 90 INC $90,X 1D56A: 60 RTS ---- 1D56B: 20 12D9 JSR $D9121D56E: 20 7AD9 JSR $D97A1D571: 20 C1C1 JSR $C1C11D574: 20 EED5 JSR $D5EE 1D577: A5 75 LDA $751D579: 05 76 ORA $761D57B: F0 15 BEQ $1D592 1D57D: A5 41 LDA $41 ; Scrolling (H/V)1D57F: D0 0E BNE $1D58F 1D581: BD 3403 LDA $0334,X1D584: A0 00 LDY #$00 ; Y = 001D586: D9 68D6 CMP $D668,Y1D589: 90 07 BCC $1D592 1D58B: DE 3403 DEC $0334,X 1D58E: 60 RTS ---- 1D58F: FE 1A03 INC $031A,X 1D592: 60 RTS ---- 1D593: 20 77D5 JSR $D5771D596: 20 73D7 JSR $D773 1D599: B9 E8D5 LDA $D5E8,Y1D59C: 95 BC STA $BC,X1D59E: B5 9E LDA $9E,X1D5A0: F0 07 BEQ $1D5A9 1D5A2: D6 9E DEC $9E,X1D5A4: D0 3F BNE $1D5E5 1D5A6: 4C FAD9 JMP $D9FA ---- 1D5A9: B9 EBD5 LDA $D5EB,Y1D5AC: 95 98 STA $98,X1D5AE: B5 C2 LDA $C2,X1D5B0: C9 05 CMP #$051D5B2: 90 0D BCC $1D5C1 1D5B4: B5 B4 LDA $B4,X1D5B6: 09 02 ORA #$02 ; keep bits .... ..x.1D5B8: 95 B4 STA $B4,X1D5BA: A9 00 LDA #$00 ; A = 001D5BC: 38 SEC1D5BD: F5 98 SBC $98,X1D5BF: 95 98 STA $98,X 1D5C1: B5 C6 LDA $C6,X1D5C3: 30 1A BMI $1D5DF 1D5C5: C9 02 CMP #$021D5C7: 90 16 BCC $1D5DF 1D5C9: B5 BA LDA $BA,X1D5CB: C9 01 CMP #$011D5CD: F0 0C BEQ $1D5DB 1D5CF: 20 A3D9 JSR $D9A31D5D2: F0 0B BEQ $1D5DF 1D5D4: C9 02 CMP #$021D5D6: F0 07 BEQ $1D5DF 1D5D8: 20 EFD8 JSR $D8EF 1D5DB: A9 40 LDA #$40 ; A = 401D5DD: 95 9E STA $9E,X 1D5DF: 20 C8D9 JSR $D9C81D5E2: 20 FBD5 JSR $D5FB 1D5E5: 4C 07C2 JMP $C207 ---- 1D5E8: 04 04 06 Table for ? (3 bytes) 1D5EB: FF 00 00 Table for X Velocities when dying (3 bytes) ---- 1D5EE: B5 D0 LDA $D0,X1D5F0: D0 06 BNE $1D5F8 1D5F2: A9 00 LDA #$00 ; A = 001D5F4: 95 98 STA $98,X ; Player X Velocity1D5F6: 95 96 STA $96,X 1D5F8: 20 6BD6 JSR $D66B Apply X Acceleration to X Velocity 1D5FB: B5 98 LDA $98,X1D5FD: 18 CLC1D5FE: 75 D4 ADC $D4,X1D600: 95 98 STA $98,X1D602: B5 B2 LDA $B2,X1D604: 30 5E BMI $1D664 1D606: B5 98 LDA $98,X1D608: 15 96 ORA $96,X1D60A: F0 58 BEQ $1D664 1D60C: B5 98 LDA $98,X1D60E: 30 2F BMI $1D63F 1D610: A5 3B LDA $3B1D612: 30 1D BMI $1D631 1D614: A9 08 LDA #$08 ; A = 08 1D616: 20 28DB JSR $DB281D619: B0 49 BCS $1D664 1D61B: 20 73D7 JSR $D773 1D61E: BD 3403 LDA $0334,X1D621: D9 65D6 CMP $D665,Y1D624: B0 3E BCS $1D664 1D626: A4 84 LDY $841D628: F0 07 BEQ $1D631 1D62A: A4 30 LDY $30 ; Current Level1D62C: D9 37D6 CMP $D637,Y1D62F: B0 33 BCS $1D664 1D631: 20 0BDA JSR $DA0B 1D634: 4C 55D6 JMP $D655 ---- 1D637: 90 FF FF FF A0 D0 B0 B0 Table for ? (8 bytes) ---- 1D63F: A9 F8 LDA #$F8 ; A = F8 1D641: 20 28DB JSR $DB281D644: B0 1E BCS $1D664 1D646: A5 3B LDA $3B1D648: 30 0B BMI $1D655 1D64A: 20 73D7 JSR $D773 1D64D: BD 3403 LDA $0334,X1D650: D9 68D6 CMP $D668,Y1D653: 90 0F BCC $1D664 1D655: B5 92 LDA $92,X1D657: 18 CLC1D658: 75 96 ADC $96,X1D65A: 95 92 STA $92,X1D65C: BD 3403 LDA $0334,X1D65F: 75 98 ADC $98,X1D661: 9D 3403 STA $0334,X 1D664: 60 RTS ---- 1D665: E6 E0 D0 Table for ? (3 bytes) 1D668: 1A 20 30 Table for ? (3 bytes) ---- 1D66B: A9 03 LDA #$03 ; A = 031D66D: 95 BC STA $BC,X1D66F: B5 CA LDA $CA,X1D671: F0 0C BEQ $1D67F 1D673: A9 00 LDA #$00 ; A = 001D675: 95 CA STA $CA,X1D677: 95 D0 STA $D0,X 1D679: 20 58D8 JSR $D858 1D67C: 4C D3D6 JMP $D6D3 ---- 1D67F: B5 C8 LDA $C8,X1D681: F0 03 BEQ $1D6861D683: 4C 30D8 JMP $D830 ---- 1D686: B5 A4 LDA $A4,X1D688: F0 03 BEQ $1D68D1D68A: 4C 7FD7 JMP $D77F ---- 1D68D: B5 A0 LDA $A0,X1D68F: F0 03 BEQ $1D6941D691: 4C AFD7 JMP $D7AF ---- 1D694: B5 D0 LDA $D0,X1D696: F0 03 BEQ $1D69B1D698: 4C 3FD8 JMP $D83F ---- 1D69B: B5 B2 LDA $B2,X1D69D: D0 59 BNE $1D6F8 1D69F: B5 F5 LDA $F5,X1D6A1: 29 80 AND #$80 ; keep bits x... .... (check for A button)1D6A3: F0 53 BEQ $1D6F8 1D6A5: B5 F1 LDA $F1,X1D6A7: 29 07 AND #$07 ; keep bits .... .xxx1D6A9: C9 04 CMP #$041D6AB: D0 26 BNE $1D6D3 1D6AD: A9 02 LDA #$02 ; A = 021D6AF: 95 BC STA $BC,X 1D6B1: 20 91DA JSR $DA911D6B4: B0 1C BCS $1D6D2 1D6B6: A9 81 LDA #$81 ; A = 811D6B8: D0 0A BNE $1D6C4 1D6BA: B5 C2 LDA $C2,X1D6BC: C9 05 CMP #$051D6BE: A9 21 LDA #$21 ; A = 211D6C0: 90 02 BCC $1D6C4 1D6C2: A9 41 LDA #$41 ; A = 41 1D6C4: 95 A4 STA $A4,X1D6C6: BD 1A03 LDA $031A,X1D6C9: 18 CLC1D6CA: 69 14 ADC #$141D6CC: 90 02 BCC $1D6D0 1D6CE: A9 FF LDA #$FF ; A = FF 1D6D0: 95 B8 STA $B8,X 1D6D2: 60 RTS ---- 1D6D3: B5 C2 LDA $C2,X ; Player Animation Frame1D6D5: C9 05 CMP #$051D6D7: A9 91 LDA #$91 ; A = 911D6D9: B0 02 BCS $1D6DD 1D6DB: A9 11 LDA #$11 ; A = 11 1D6DD: 95 A0 STA $A0,X1D6DF: A9 00 LDA #$00 ; A = 001D6E1: 95 9E STA $9E,X1D6E3: 95 A6 STA $A6,X1D6E5: A5 40 LDA $40 ; Outdoor/Indoor1D6E7: 4A LSR1D6E8: A9 FB LDA #$FB ; A = FB1D6EA: A0 F0 LDY #$F0 ; Y = F01D6EC: 90 04 BCC $1D6F2 1D6EE: A9 FC LDA #$FC ; A = FC1D6F0: A0 90 LDY #$90 ; Y = 90 1D6F2: 95 C6 STA $C6,X1D6F4: 98 TYA1D6F5: 95 C4 STA $C4,X 1D6F7: 60 RTS ---- 1D6F8: B5 F1 LDA $F1,X1D6FA: 4A LSR1D6FB: B0 5F BCS $1D75C 1D6FD: 4A LSR1D6FE: B0 60 BCS $1D760 1D700: A0 02 LDY #$02 ; Y = 021D702: 4A LSR1D703: B0 05 BCS $1D70A 1D705: 88 DEY1D706: 4A LSR1D707: B0 05 BCS $1D70E 1D709: 88 DEY 1D70A: 98 TYA 1D70B: 95 BC STA $BC,X 1D70D: 60 RTS ---- Related to Electrocution 1D70E: A5 40 LDA $40 ; Outdoor/Indoor 1D710: 4A LSR 1D711: 90 F7 BCC $1D70A 1D713: 20 0AD7 JSR $D70A 1D716: A5 37 LDA $37 ; Indoor Section Cleared (0 = not cleared) 1D718: D0 09 BNE $1D723 1D71A: A9 30 LDA #$30 ; A = 30 (delay for electrocution) 1D71C: 95 C8 STA $C8,X 1D71E: A9 1C LDA #$1C ; A = 1C (sound of electrocution) 1D720: 4C 6BC1 JMP $C16B ; Play Sound ---- 1D723: 86 10 STX $10 1D725: 8A TXA 1D726: 49 01 EOR #$01 ; flip bits .... ...x 1D728: AA TAX 1D729: B5 38 LDA $38,X 1D72B: D0 0A BNE $1D737 1D72D: B5 90 LDA $90,X 1D72F: C9 01 CMP #$01 1D731: D0 23 BNE $1D756 1D733: B5 A0 LDA $A0,X 1D735: D0 1F BNE $1D756 1D737: A2 01 LDX #$01 ; X = 01 1D739: A9 05 LDA #$05 ; A = 05 1D73B: 95 BC STA $BC,X ; Player Animation Frame 1D73D: B5 D0 LDA $D0,X 1D73F: D0 0F BNE $1D750 1D741: A9 01 LDA #$01 ; A = 01 1D743: 85 73 STA $73 1D745: 95 D0 STA $D0,X 1D747: A9 00 LDA #$00 ; A = 00 1D749: 95 A6 STA $A6,X 1D74B: 95 9E STA $9E,X 1D74D: 20 9BD8 JSR $D89B 1D750: CA DEX 1D751: 10 E6 BPL $1D739 1D753: A6 10 LDX $10 1D755: 60 RTS ---- 1D756: A6 10 LDX $10 1D758: A9 00 LDA #$00 ; A = 00 1D75A: F0 AF BEQ $1D70B 1D75C: A9 01 LDA #$01 ; A = 01 1D75E: D0 02 BNE $1D762 1D760: A9 FF LDA #$FF ; A = FF 1D762: B4 B2 LDY $B2,X 1D764: F0 0A BEQ $1D770 1D766: 85 08 STA $08 1D768: B5 F1 LDA $F1,X 1D76A: 29 04 AND #$04 ; keep bits .... .x.. 1D76C: D0 04 BNE $1D772 1D76E: A5 08 LDA $08 1D770: 95 98 STA $98,X 1D772: 60 RTS ---- 1D773: A0 00 LDY #$00 ; Y = 001D775: A5 40 LDA $40 ; Outdoor/Indoor1D777: F0 05 BEQ $1D77E 1D779: C8 INY1D77A: 0A ASL1D77B: B0 01 BCS $1D77E 1D77D: C8 INY 1D77E: 60 RTS ---- 1D77F: BD 1A03 LDA $031A,X 1D782: D5 B8 CMP $B8,X 1D784: 90 0B BCC $1D791 1D786: 20 A3D9 JSR $D9A3 1D789: F0 06 BEQ $1D791 1D78B: 20 EFD8 JSR $D8EF 1D78E: 4C 67D8 JMP $D867 ---- 1D791: 20 C8D9 JSR $D9C8 1D794: BD 1A03 LDA $031A,X 1D797: D5 B8 CMP $B8,X 1D799: 90 0F BCC $1D7AA 1D79B: 20 20D8 JSR $D820 1D79E: F0 0A BEQ $1D7AA 1D7A0: 85 08 STA $08 1D7A2: B5 A4 LDA $A4,X 1D7A4: 29 9F AND #$9F ; keep bits x..x xxxx 1D7A6: 05 08 ORA $08 1D7A8: 95 A4 STA $A4,X 1D7AA: B5 A4 LDA $A4,X 1D7AC: 4C 14D8 JMP $D814 ---- 1D7AF: B5 C6 LDA $C6,X 1D7B1: 30 28 BMI $1D7DB 1D7B3: A4 40 LDY $40 ; Outdoor/Indoor 1D7B5: D0 16 BNE $1D7CD 1D7B7: C9 01 CMP #$01 1D7B9: 90 39 BCC $1D7F4 1D7BB: B5 C6 LDA $C6,X 1D7BD: C9 04 CMP #$04 ; related to ground collision test 1D7BF: B0 0C BCS $1D7CD 1D7C1: BD 1A03 LDA $031A,X ; Player Y Position on Screen 1D7C4: 18 CLC 1D7C5: 65 FC ADC $FC ; Vertical Scroll Offset 1D7C7: 29 0F AND #$0F ; keep bits .... xxxx 1D7C9: C9 08 CMP #$08 1D7CB: B0 27 BCS $1D7F4 1D7CD: 20 A3D9 JSR $D9A3 1D7D0: F0 22 BEQ $1D7F4 1D7D2: 20 EFD8 JSR $D8EF 1D7D5: 20 03D8 JSR $D803 1D7D8: 4C 67D8 JMP $D867 ---- 1D7DB: A5 3B LDA $3B 1D7DD: 30 15 BMI $1D7F4 1D7DF: BD 1A03 LDA $031A,X 1D7E2: 18 CLC 1D7E3: 69 F6 ADC #$F6 1D7E5: A8 TAY 1D7E6: BD 3403 LDA $0334,X 1D7E9: 20 BBE0 JSR $E0BB 1D7EC: 10 06 BPL $1D7F4 1D7EE: A9 00 LDA #$00 ; A = 00 1D7F0: 95 C6 STA $C6,X 1D7F2: 95 C4 STA $C4,X 1D7F4: 20 ECD9 JSR $D9EC 1D7F7: A5 41 LDA $41 ; Scrolling (H/V) 1D7F9: F0 05 BEQ $1D800 1D7FB: 20 0BDA JSR $DA0B 1D7FE: B0 03 BCS $1D803 1D800: 20 CBD9 JSR $D9CB 1D803: 20 20D8 JSR $D820 1D806: F0 0A BEQ $1D812 1D808: 85 08 STA $08 1D80A: B5 A0 LDA $A0,X 1D80C: 29 9F AND #$9F ; keep bits x..x xxxx 1D80E: 05 08 ORA $08 1D810: 95 A0 STA $A0,X 1D812: B5 A0 LDA $A0,X 1D814: 0A ASL 1D815: 10 03 BPL $1D81A 1D817: 4C 60D7 JMP $D760 ---- 1D81A: 0A ASL 1D81B: 10 12 BPL $1D82F 1D81D: 4C 5CD7 JMP $D75C ---- 1D820: A0 00 LDY #$00 ; Y = 00 1D822: B5 F1 LDA $F1,X 1D824: 4A LSR 1D825: 90 02 BCC $1D829 1D827: A0 20 LDY #$20 ; Y = 20 1D829: 4A LSR 1D82A: 90 02 BCC $1D82E 1D82C: A0 40 LDY #$40 ; Y = 40 1D82E: 98 TYA 1D82F: 60 RTS ---- 1D830: A9 01 LDA #$01 ; A = 01 1D832: 95 BC STA $BC,X ; Player Animation Frame 1D834: D6 C8 DEC $C8,X ; Counter for Electrocution 1D836: A5 37 LDA $37 ; Indoor Section Cleared (0 = not cleared) 1D838: F0 04 BEQ $1D83E 1D83A: A9 00 LDA #$00 ; A = 00 1D83C: 95 C8 STA $C8,X ; Counter for Electrocution 1D83E: 60 RTS ---- 1D83F: A9 05 LDA #$05 ; A = 05 1D841: 95 BC STA $BC,X ; Player Animation Frame 1D843: B5 94 LDA $94,X 1D845: 18 CLC 1D846: 75 9A ADC $9A,X 1D848: 95 94 STA $94,X 1D84A: BD 1A03 LDA $031A,X ; Player Y Position on Screen 1D84D: 75 9C ADC $9C,X 1D84F: 9D 1A03 STA $031A,X 1D852: A5 73 LDA $73 1D854: C9 02 CMP #$02 1D856: 90 0E BCC $1D866 1D858: A9 00 LDA #$00 ; A = 00 1D85A: 95 D0 STA $D0,X 1D85C: B5 A8 LDA $A8,X 1D85E: 9D 1A03 STA $031A,X 1D861: B5 BE LDA $BE,X 1D863: 9D 3403 STA $0334,X 1D866: 60 RTS ---- 1D867: B5 A0 LDA $A0,X 1D869: 15 A4 ORA $A4,X 1D86B: F0 0D BEQ $1D87A 1D86D: A9 00 LDA #$00 ; A = 00 1D86F: 95 A6 STA $A6,X 1D871: 95 9E STA $9E,X 1D873: 95 B8 STA $B8,X 1D875: A9 03 LDA #$03 ; A = 03 (sound for player landing) 1D877: 20 6BC1 JSR $C16B ; Play Sound 1D87A: B5 C2 LDA $C2,X 1D87C: C9 05 CMP #$05 1D87E: B5 D8 LDA $D8,X 1D880: 29 3F AND #$3F ; keep bits ..xx xxxx 1D882: 90 02 BCC $1D886 1D884: 09 40 ORA #$40 ; set bits .x.. .... 1D886: 95 D8 STA $D8,X 1D888: A9 00 LDA #$00 ; A = 00 1D88A: 95 A0 STA $A0,X 1D88C: 95 A4 STA $A4,X 1D88E: 95 BC STA $BC,X 1D890: A9 00 LDA #$00 ; A = 00 1D892: 95 C4 STA $C4,X 1D894: 95 C6 STA $C6,X 1D896: 95 9A STA $9A,X 1D898: 95 9C STA $9C,X 1D89A: 60 RTS ---- 1D89B: A9 00 LDA #$00 ; A = 00 1D89D: 85 12 STA $12 1D89F: A9 58 LDA #$58 ; A = 58 (affects speed when walking up) 1D8A1: 20 CDD8 JSR $D8CD 1D8A4: A5 0F LDA $0F 1D8A6: 95 9C STA $9C,X 1D8A8: A5 0E LDA $0E 1D8AA: 95 9A STA $9A,X 1D8AC: BD 1A03 LDA $031A,X 1D8AF: 95 A8 STA $A8,X 1D8B1: BD 3403 LDA $0334,X 1D8B4: 95 BE STA $BE,X 1D8B6: 38 SEC 1D8B7: E9 80 SBC #$80 1D8B9: 85 12 STA $12 1D8BB: B0 04 BCS $1D8C1 1D8BD: 49 FF EOR #$FF ; flip all bits 1D8BF: 69 01 ADC #$01 1D8C1: 20 CDD8 JSR $D8CD 1D8C4: A5 0F LDA $0F 1D8C6: 95 98 STA $98,X 1D8C8: A5 0E LDA $0E 1D8CA: 95 96 STA $96,X 1D8CC: 60 RTS ---- 1D8CD: 85 0F STA $0F 1D8CF: A9 00 LDA #$00 ; A = 00 1D8D1: 85 0E STA $0E 1D8D3: A0 07 LDY #$07 ; Y = 07 1D8D5: 46 0F LSR $0F 1D8D7: 66 0E ROR $0E 1D8D9: 88 DEY 1D8DA: D0 F9 BNE $1D8D5 1D8DC: A5 12 LDA $12 1D8DE: 10 01 BPL $1D8E1 1D8E0: 60 RTS ---- 1D8E1: A9 00 LDA #$00 ; A = 001D8E3: 38 SEC1D8E4: E5 0E SBC $0E1D8E6: 85 0E STA $0E1D8E8: A9 00 LDA #$00 ; A = 001D8EA: E5 0F SBC $0F1D8EC: 85 0F STA $0F 1D8EE: 60 RTS ---- 1D8EF: 20 73D7 JSR $D773 1D8F2: B9 0FD9 LDA $D90F,Y 1D8F5: D0 14 BNE $1D90B 1D8F7: A5 FC LDA $FC ; Vertical Scroll Offset 1D8F9: 29 0F AND #$0F ; keep bits .... xxxx 1D8FB: 09 F0 ORA #$F0 ; set bits xxxx .... 1D8FD: 85 00 STA $00 1D8FF: 18 CLC 1D900: 7D 1A03 ADC $031A,X 1D903: 29 F0 AND #$F0 ; keep bits xxxx .... 1D905: 38 SEC 1D906: E5 00 SBC $00 1D908: 18 CLC 1D909: 69 04 ADC #$04 1D90B: 9D 1A03 STA $031A,X 1D90E: 60 RTS ---- 1D90F: 00 C9 A8 Table for ? (3 bytes) ---- 1D912: A0 20 LDY #$20 ; Y = 20 1D914: A5 A0 LDA $A0 1D916: F0 02 BEQ $1D91A 1D918: A0 30 LDY #$30 ; Y = 30 1D91A: A5 08 LDA $08 1D91C: C9 03 CMP #$03 1D91E: F0 0A BEQ $1D92A 1D920: A0 00 LDY #$00 ; Y = 00 1D922: B5 C0 LDA $C0,X 1D924: C9 05 CMP #$05 1D926: 90 02 BCC $1D92A 1D928: A0 10 LDY #$10 ; Y = 10 1D92A: 84 08 STY $08 1D92C: B5 F1 LDA $F1,X 1D92E: 29 0F AND #$0F ; keep bits .... xxxx 1D930: 18 CLC 1D931: 65 08 ADC $08 1D933: A8 TAY 1D934: B9 3AD9 LDA $D93A,Y 1D937: 95 C2 STA $C2,X 1D939: 60 RTS ---- 1D93A: Table for ? (40 bytes) (related to player state) 02 02 07 02 04 03 06 02 00 01 08 02 07 02 07 0207 02 07 02 05 03 06 02 09 01 08 02 07 02 07 0200 02 07 00 00 02 07 02 00 01 08 02 07 02 07 0200 02 07 00 0A 03 06 02 00 01 08 02 07 02 07 02 ---- 1D97A: B5 B6 LDA $B6,X 1D97C: D0 18 BNE $1D996 1D97E: B5 B2 LDA $B2,X 1D980: 15 A0 ORA $A0,X 1D982: 15 A4 ORA $A4,X 1D984: 15 D0 ORA $D0,X 1D986: D0 12 BNE $1D99A 1D988: B5 DA LDA $DA,X 1D98A: 4A LSR 1D98B: B0 09 BCS $1D996 1D98D: 20 A3D9 JSR $D9A3 1D990: F0 0E BEQ $1D9A0 1D992: C9 02 CMP #$02 1D994: F0 05 BEQ $1D99B 1D996: A9 00 LDA #$00 1D998: 95 A4 STA $A4,X 1D99A: 60 RTS ---- 1D99B: A9 01 LDA #$01 ; A = 01 1D99D: 95 B2 STA $B2,X 1D99F: 60 RTS ---- 1D9A0: 4C BAD6 JMP $D6BA ---- 1D9A3: A5 40 LDA $40 ; Outdoor/Indoor (negative if in Boss Room) 1D9A5: 30 15 BMI $1D9BC 1D9A7: D0 0F BNE $1D9B8 1D9A9: BD 1A03 LDA $031A,X ; Player Y Position on Screen 1D9AC: 18 CLC 1D9AD: 69 10 ADC #$10 1D9AF: B0 14 BCS $1D9C5 1D9B1: A8 TAY 1D9B2: BD 3403 LDA $0334,X ; Player X Position on Screen 1D9B5: 4C BBE0 JMP $E0BB ---- 1D9B8: A9 A0 LDA #$A0 ; A = A0 (floor level for most levels) 1D9BA: D0 02 BNE $1D9BE 1D9BC: A9 C8 LDA #$C8 ; A = C8 (floor level for indoor Boss Room) 1D9BE: DD 1A03 CMP $031A,X ; Player Y Position on Screen 1D9C1: A9 01 LDA #$01 ; A = 01 1D9C3: 90 02 BCC $1D9C7 1D9C5: A9 00 LDA #$00 ; A = 00 1D9C7: 60 RTS ---- 1D9C8: 20 ECD9 JSR $D9EC 1D9CB: B5 C6 LDA $C6,X 1D9CD: 0A ASL 1D9CE: A9 00 LDA #$00 ; A = 00 1D9D0: 90 02 BCC $1D9D4 1D9D2: A9 FF LDA #$FF ; A = FF 1D9D4: 85 08 STA $08 1D9D6: B5 94 LDA $94,X 1D9D8: 18 CLC 1D9D9: 75 C4 ADC $C4,X 1D9DB: 95 94 STA $94,X 1D9DD: BD 1A03 LDA $031A,X 1D9E0: 75 C6 ADC $C6,X 1D9E2: 9D 1A03 STA $031A,X 1D9E5: B5 BA LDA $BA,X 1D9E7: 65 08 ADC $08 1D9E9: 95 BA STA $BA,X 1D9EB: 60 RTS ---- 1D9EC: 18 CLC 1D9ED: B5 C4 LDA $C4,X 1D9EF: 69 23 ADC #$23 1D9F1: 95 C4 STA $C4,X 1D9F3: B5 C6 LDA $C6,X 1D9F5: 69 00 ADC #$00 1D9F7: 95 C6 STA $C6,X 1D9F9: 60 RTS ---- Player Death 1D9FA: 20 D1DA JSR $DAD1 1D9FD: 95 90 STA $90,X 1D9FF: B5 32 LDA $32,X ; Player Lives 1DA01: F0 03 BEQ $1DA06 1DA03: D6 32 DEC $32,X ; Player Lives 1DA05: 60 RTS ---- 1DA06: A9 01 LDA #$01 ; A = 01 1DA08: 95 38 STA $38,X ; Game Over State of Player (1 = Game Over) 1DA0A: 60 RTS ---- 1DA0B: A5 40 LDA $40 ; Outdoor/Indoor 1DA0D: 05 75 ORA $75 1DA0F: 05 76 ORA $76 1DA11: D0 4B BNE $1DA5E 1DA13: B5 90 LDA $90,X 1DA15: C9 01 CMP #$01 1DA17: D0 45 BNE $1DA5E 1DA19: A5 41 LDA $41 ; Scrolling (H/V) 1DA1B: D0 46 BNE $1DA63 1DA1D: A5 58 LDA $58 ; Screen to stop scrolling at 1DA1F: 30 3D BMI $1DA5E 1DA21: A4 DF LDY $DF 1DA23: BD 3403 LDA $0334,X 1DA26: D9 60DA CMP $DA60,Y 1DA29: 90 33 BCC $1DA5E 1DA2B: C0 02 CPY #$02 1DA2D: D0 0B BNE $1DA3A 1DA2F: 8A TXA 1DA30: 49 01 EOR #$01 ; flip bits .... ...x 1DA32: A8 TAY 1DA33: B9 3403 LDA $0334,Y 1DA36: C9 21 CMP #$21 1DA38: 90 1E BCC $1DA58 1DA3A: 20 36E1 JSR $E136 1DA3D: F0 1F BEQ $1DA5E 1DA3F: B5 96 LDA $96,X 1DA41: 18 CLC 1DA42: 75 92 ADC $92,X 1DA44: 95 92 STA $92,X 1DA46: B5 98 LDA $98,X 1DA48: 69 00 ADC #$00 1DA4A: 85 68 STA $68 1DA4C: A9 01 LDA #$01 ; A = 01 1DA4E: 95 A2 STA $A2,X 1DA50: A9 00 LDA #$00 ; A = 00 1DA52: 95 96 STA $96,X 1DA54: 95 98 STA $98,X 1DA56: 38 SEC 1DA57: 60 RTS ---- 1DA58: A9 00 LDA #$00 ; A = 00 1DA5A: 95 96 STA $96,X 1DA5C: 95 98 STA $98,X 1DA5E: 18 CLC 1DA5F: 60 RTS ---- 1DA60: 80 80 B0 Table for ? (3 bytes) ---- 1DA63: BD 1A03 LDA $031A,X 1DA66: C9 50 CMP #$50 1DA68: B0 25 BCS $1DA8F 1DA6A: B5 C6 LDA $C6,X 1DA6C: 10 21 BPL $1DA8F 1DA6E: 20 36E1 JSR $E136 1DA71: F0 1C BEQ $1DA8F 1DA73: B5 94 LDA $94,X 1DA75: 18 CLC 1DA76: 75 C4 ADC $C4,X 1DA78: 95 94 STA $94,X 1DA7A: BD 1A03 LDA $031A,X 1DA7D: 75 C6 ADC $C6,X 1DA7F: 85 08 STA $08 1DA81: BD 1A03 LDA $031A,X 1DA84: 38 SEC 1DA85: E5 08 SBC $08 1DA87: 85 68 STA $68 1DA89: A9 01 LDA #$01 ; A = 01 1DA8B: 95 A2 STA $A2,X 1DA8D: 38 SEC 1DA8E: 60 RTS ---- 1DA8F: 18 CLC 1DA90: 60 RTS ---- 1DA91: A5 58 LDA $58 1DA93: C9 FF CMP #$FF 1DA95: F0 04 BEQ $1DA9B 1DA97: A5 41 LDA $41 ; Scrolling (H/V) 1DA99: D0 32 BNE $1DACD 1DA9B: BD 1A03 LDA $031A,X 1DA9E: 18 CLC 1DA9F: 69 10 ADC #$10 1DAA1: A8 TAY 1DAA2: 4A LSR 1DAA3: 4A LSR 1DAA4: 4A LSR 1DAA5: 4A LSR 1DAA6: 85 08 STA $08 1DAA8: BD 3403 LDA $0334,X 1DAAB: 20 87E0 JSR $E087 1DAAE: 30 1F BMI $1DACF 1DAB0: E6 08 INC $08 1DAB2: A5 08 LDA $08 1DAB4: C9 0E CMP #$0E 1DAB6: B0 16 BCS $1DACE 1DAB8: A5 13 LDA $13 1DABA: 29 C0 AND #$C0 ; keep bits xx.. .... 1DABC: 85 17 STA $17 1DABE: A5 13 LDA $13 1DAC0: 18 CLC 1DAC1: 69 04 ADC #$04 1DAC3: 29 3F AND #$3F ; keep bits ..xx xxxx 1DAC5: 05 17 ORA $17 1DAC7: A8 TAY 1DAC8: 20 B5E0 JSR $E0B5 1DACB: F0 E3 BEQ $1DAB0 1DACD: 18 CLC 1DACE: 60 RTS ---- 1DACF: 38 SEC 1DAD0: 60 RTS ---- 1DAD1: A9 00 LDA #$00 ; A = 001DAD3: 95 AA STA $AA,X ; Current Weapon Code EA the 4 bytes above to keep the same weapon after being killed * or bridge to use a new weapon item that "locks" the weapon when killed * 1DAD5: A9 00 LDA #$00 ; A = 001DAD7: 9D 0003 STA $0300,X1DADA: 9D 1A03 STA $031A,X1DADD: 9D 3403 STA $0334,X1DAE0: 9D 4E03 STA $034E,X1DAE3: 95 92 STA $92,X1DAE5: 95 94 STA $94,X1DAE7: 95 96 STA $96,X1DAE9: 95 98 STA $98,X1DAEB: 95 9A STA $9A,X1DAED: 95 9C STA $9C,X1DAEF: 95 9E STA $9E,X1DAF1: 95 A0 STA $A0,X1DAF3: 95 A2 STA $A2,X1DAF5: 95 A4 STA $A4,X1DAF7: 95 A6 STA $A6,X1DAF9: 95 A8 STA $A8,X1DAFB: 95 AC STA $AC,X1DAFD: 95 AE STA $AE,X1DAFF: 95 B0 STA $B0,X1DB01: 95 B2 STA $B2,X1DB03: 95 B4 STA $B4,X1DB05: 95 B6 STA $B6,X1DB07: 95 B8 STA $B8,X1DB09: 95 BA STA $BA,X1DB0B: 95 BC STA $BC,X1DB0D: 95 BE STA $BE,X1DB0F: 95 C0 STA $C0,X1DB11: 95 C2 STA $C2,X1DB13: 95 C4 STA $C4,X1DB15: 95 C6 STA $C6,X1DB17: 95 C8 STA $C8,X1DB19: 95 CA STA $CA,X1DB1B: 95 CC STA $CC,X1DB1D: 95 CE STA $CE,X1DB1F: 95 D0 STA $D0,X1DB21: 95 D6 STA $D6,X1DB23: 95 D8 STA $D8,X1DB25: 95 DA STA $DA,X 1DB27: 60 RTS ---- 1DB28: 18 CLC 1DB29: 7D 3403 ADC $0334,X 1DB2C: 85 0A STA $0A 1DB2E: A0 0B LDY #$0B ; Y = 0B 1DB30: B5 D6 LDA $D6,X ; Player Animation Frame 1DB32: C9 17 CMP #$17 1DB34: D0 02 BNE $1DB38 1DB36: A0 00 LDY #$00 ; Y = 00 1DB38: 84 08 STY $08 1DB3A: B5 BA LDA $BA,X 1DB3C: D0 0C BNE $1DB4A 1DB3E: BD 1A03 LDA $031A,X 1DB41: 38 SEC 1DB42: E5 08 SBC $08 1DB44: 90 04 BCC $1DB4A 1DB46: C9 10 CMP #$10 1DB48: B0 02 BCS $1DB4C 1DB4A: A9 0A LDA #$0A ; A = 0A 1DB4C: 85 09 STA $09 1DB4E: 20 A3D9 JSR $D9A3 1DB51: D0 07 BNE $1DB5A 1DB53: B5 A0 LDA $A0,X 1DB55: 4A LSR 1DB56: A9 1B LDA #$1B ; A = 1B 1DB58: B0 05 BCS $1DB5F 1DB5A: A9 0A LDA #$0A ; A = 0A 1DB5C: 18 CLC 1DB5D: 65 08 ADC $08 1DB5F: 85 08 STA $08 1DB61: A5 09 LDA $09 1DB63: 18 CLC 1DB64: 65 FC ADC $FC ; Vertical Scroll Offset 1DB66: 29 0F AND #$0F ; keep bits .... xxxx 1DB68: 85 0B STA $0B 1DB6A: A9 10 LDA #$10 ; A = 10 1DB6C: 38 SEC 1DB6D: E5 0B SBC $0B 1DB6F: 85 0B STA $0B 1DB71: A5 0A LDA $0A 1DB73: A4 09 LDY $09 1DB75: 20 87E0 JSR $E087 1DB78: 30 1F BMI $1DB99 1DB7A: A5 0B LDA $0B 1DB7C: C5 08 CMP $08 1DB7E: B0 1B BCS $1DB9B 1DB80: 69 10 ADC #$10 1DB82: 85 0B STA $0B 1DB84: A5 13 LDA $13 1DB86: 29 C0 AND #$C0 ; keep bits xx.. .... 1DB88: 85 17 STA $17 1DB8A: A5 13 LDA $13 1DB8C: 18 CLC 1DB8D: 69 04 ADC #$04 1DB8F: 29 3F AND #$3F ; keep bits ..xx xxxx 1DB91: 05 17 ORA $17 1DB93: A8 TAY 1DB94: 20 AFE0 JSR $E0AF 1DB97: 10 E1 BPL $1DB7A 1DB99: 38 SEC 1DB9A: 60 RTS ---- 1DB9B: 18 CLC 1DB9C: 60 RTS ---- 1DB9D: A5 41 LDA $41 ; Scrolling (H/V)1DB9F: D0 23 BNE $1DBC4 1DBA1: A5 40 LDA $40 ; Outdoor/Indoor1DBA3: D0 36 BNE $1DBDB 1DBA5: A9 30 LDA #$30 ; A = 30 1DBA7: 85 61 STA $611DBA9: A9 00 LDA #$00 ; A = 001DBAB: 85 64 STA $64 ; Screen Number1DBAD: 85 65 STA $65 ; Scrolling Offset1DBAF: 85 69 STA $69 ; Sprite Data Offset (6xx)1DBB1: 85 60 STA $601DBB3: 85 62 STA $621DBB5: A9 20 LDA #$20 ; A = 201DBB7: 85 63 STA $631DBB9: A9 C0 LDA #$C0 ; A = C01DBBB: 85 66 STA $661DBBD: A9 23 LDA #$23 ; A = 231DBBF: 85 67 STA $67 1DBC1: 4C 69E1 JMP $E169 ---- Vertical Scrolling 1DBC4: A9 00 LDA #$00 ; A = 00 1DBC6: 85 65 STA $65 1DBC8: 85 64 STA $64 1DBCA: 85 69 STA $69 1DBCC: A9 1D LDA #$1D ; A = 1D 1DBCE: 85 60 STA $60 1DBD0: A9 A0 LDA #$A0 ; A = A0 1DBD2: 85 62 STA $62 1DBD4: A9 23 LDA #$23 ; A = 23 1DBD6: 85 63 STA $63 1DBD8: 4C 69E1 JMP $E169 ---- Indoor 1DBDB: A9 10 LDA #$10 ; A = 10 1DBDD: 85 74 STA $74 1DBDF: 20 81D0 JSR $D081 1DBE2: A9 20 LDA #$20 ; A = 20 1DBE4: D0 C1 BNE $1DBA7 1DBE6: A5 41 LDA $41 ; Scrolling (H/V) 1DBE8: D0 30 BNE $1DC1A 1DBEA: A5 40 LDA $40 ; Outdoor/Indoor 1DBEC: D0 50 BNE $1DC3E 1DBEE: 20 1ADE JSR $DE1A 1DBF1: 20 48DF JSR $DF48 1DBF4: E6 62 INC $62 1DBF6: E6 60 INC $60 1DBF8: C6 61 DEC $61 1DBFA: F0 1D BEQ $1DC19 1DBFC: A5 60 LDA $60 1DBFE: C9 20 CMP #$20 1DC00: 90 15 BCC $1DC17 1DC02: A9 00 LDA #$00 ; A = 00 1DC04: 85 62 STA $62 1DC06: 85 60 STA $60 1DC08: A9 24 LDA #$24 ; A = 24 1DC0A: 85 63 STA $63 1DC0C: A9 27 LDA #$27 ; A = 27 1DC0E: 85 67 STA $67 1DC10: A9 40 LDA #$40 ; A = 40 1DC12: 85 69 STA $69 1DC14: 20 62E1 JSR $E162 1DC17: A9 FF LDA #$FF ; A = FF 1DC19: 60 RTS ---- 1DC1A: 20 BEDE JSR $DEBE 1DC1D: 20 96DF JSR $DF96 1DC20: A5 62 LDA $62 1DC22: 38 SEC 1DC23: E9 20 SBC #$20 1DC25: 85 62 STA $62 1DC27: A5 63 LDA $63 1DC29: E9 00 SBC #$00 1DC2B: 85 63 STA $63 1DC2D: C6 60 DEC $60 1DC2F: 10 E6 BPL $1DC17 1DC31: 20 C4DB JSR $DBC4 1DC34: A9 40 LDA #$40 ; A = 40 1DC36: 85 69 STA $69 1DC38: 20 62E1 JSR $E162 1DC3B: A9 00 LDA #$00 ; A = 00 1DC3D: 60 RTS ---- 1DC3E: 20 1ADE JSR $DE1A 1DC41: 20 48DF JSR $DF48 1DC44: E6 62 INC $62 1DC46: E6 60 INC $60 1DC48: C6 61 DEC $61 1DC4A: 60 RTS ---- 1DC4B: A5 41 LDA $41 ; Scrolling (H/V) 1DC4D: F0 03 BEQ $1DC52 1DC4F: 4C D8DC JMP $DCD8 ---- 1DC52: A5 40 LDA $40 ; Outdoor/Indoor 1DC54: F0 03 BEQ $1DC59 1DC56: 4C 5FDD JMP $DD5F ---- 1DC59: A5 76 LDA $76 1DC5B: F0 04 BEQ $1DC61 1DC5D: C6 76 DEC $76 1DC5F: D0 0A BNE $1DC6B 1DC61: A5 75 LDA $75 1DC63: F0 0A BEQ $1DC6F 1DC65: C6 75 DEC $75 1DC67: D0 02 BNE $1DC6B 1DC69: E6 84 INC $84 1DC6B: A9 01 LDA #$01 ; A = 01 1DC6D: 85 68 STA $68 1DC6F: A5 68 LDA $68 1DC71: 18 CLC 1DC72: 65 77 ADC $77 1DC74: F0 53 BEQ $1DCC9 1DC76: 85 17 STA $17 1DC78: E6 65 INC $65 ; Movement from room to room (00-03) (indoor) 1DC7A: D0 19 BNE $1DC95 1DC7C: E6 64 INC $64 ; Screen Number 1DC7E: A5 64 LDA $64 1DC80: C5 48 CMP $48 ; Boss Tiles Load 1DC82: D0 07 BNE $1DC8B 1DC84: A9 01 LDA #$01 ; A = 01 1DC86: 85 71 STA $71 1DC88: 20 64D0 JSR $D064 1DC8B: A9 00 LDA #$00 ; A = 00 1DC8D: 85 82 STA $82 1DC8F: A5 FF LDA $FF 1DC91: 49 01 EOR #$01 ; flip bits .... ...x 1DC93: 85 FF STA $FF 1DC95: A5 65 LDA $65 ; Movement from room to room (00-03) (indoor) 1DC97: 29 07 AND #$07 ; keep bits .... .xxx 1DC99: D0 2F BNE $1DCCA 1DC9B: 20 1ADE JSR $DE1A 1DC9E: E6 62 INC $62 1DCA0: E6 60 INC $60 1DCA2: A5 60 LDA $60 1DCA4: C9 20 CMP #$20 1DCA6: 90 1B BCC $1DCC3 1DCA8: A5 69 LDA $69 1DCAA: 49 40 EOR #$40 ; flip bits .x.. .... 1DCAC: 85 69 STA $69 1DCAE: 20 5BE1 JSR $E15B 1DCB1: A9 00 LDA #$00 ; A = 00 1DCB3: 85 62 STA $62 1DCB5: 85 60 STA $60 1DCB7: A5 63 LDA $63 1DCB9: 49 04 EOR #$04 ; flip bits .... .x.. 1DCBB: 85 63 STA $63 1DCBD: A5 67 LDA $67 1DCBF: 49 04 EOR #$04 ; flip bits .... .x.. 1DCC1: 85 67 STA $67 1DCC3: E6 FD INC $FD 1DCC5: C6 17 DEC $17 1DCC7: D0 AF BNE $1DC78 1DCC9: 60 RTS ---- 1DCCA: A5 65 LDA $65 ; Movement from room to room (00-03) (indoor) 1DCCC: 29 0F AND #$0F ; keep bits .... xxxx 1DCCE: C9 03 CMP #$03 1DCD0: D0 F1 BNE $1DCC3 1DCD2: 20 48DF JSR $DF48 1DCD5: 4C C3DC JMP $DCC3 ---- 1DCD8: A5 75 LDA $75 1DCDA: F0 0E BEQ $1DCEA 1DCDC: A9 10 LDA #$10 ; A = 10 1DCDE: 85 74 STA $74 1DCE0: A9 01 LDA #$01 ; A = 01 1DCE2: 85 68 STA $68 1DCE4: C6 75 DEC $75 1DCE6: D0 02 BNE $1DCEA 1DCE8: E6 84 INC $84 1DCEA: A5 68 LDA $68 1DCEC: F0 62 BEQ $1DD50 1DCEE: 85 17 STA $17 1DCF0: E6 65 INC $65 1DCF2: A5 65 LDA $65 1DCF4: C9 F0 CMP #$F0 1DCF6: 90 19 BCC $1DD11 1DCF8: A9 00 LDA #$00 ; A = 00 1DCFA: 85 65 STA $65 1DCFC: 85 82 STA $82 ; Offset for Enemy Data 1DCFE: E6 64 INC $64 1DD00: A5 64 LDA $64 ; Screen Number 1DD02: C5 48 CMP $48 ; Boss Tiles Load 1DD04: D0 0B BNE $1DD11 1DD06: A9 01 LDA #$01 ; A = 01 1DD08: 85 71 STA $71 1DD0A: A9 80 LDA #$80 ; A = 80 1DD0C: 85 74 STA $74 1DD0E: 20 64D0 JSR $D064 1DD11: A5 65 LDA $65 1DD13: 29 07 AND #$07 ; keep bits .... .xxx 1DD15: D0 3A BNE $1DD51 1DD17: 20 BEDE JSR $DEBE 1DD1A: A5 62 LDA $62 1DD1C: 38 SEC 1DD1D: E9 20 SBC #$20 1DD1F: 85 62 STA $62 1DD21: A5 63 LDA $63 1DD23: E9 00 SBC #$00 1DD25: 85 63 STA $63 1DD27: C6 60 DEC $60 1DD29: 10 15 BPL $1DD40 1DD2B: A5 69 LDA $69 1DD2D: 49 40 EOR #$40 ; flip bits .x.. .... 1DD2F: 85 69 STA $69 1DD31: 20 62E1 JSR $E162 1DD34: A9 1D LDA #$1D ; A = 1D 1DD36: 85 60 STA $60 1DD38: A9 A0 LDA #$A0 ; A = A0 1DD3A: 85 62 STA $62 1DD3C: A9 23 LDA #$23 ; A = 23 1DD3E: 85 63 STA $63 1DD40: C6 FC DEC $FC ; Vertical Scroll Offset 1DD42: A5 FC LDA $FC ; Vertical Scroll Offset 1DD44: C9 FF CMP #$FF 1DD46: D0 04 BNE $1DD4C 1DD48: A9 EF LDA #$EF ; A = EF 1DD4A: 85 FC STA $FC ; Vertical Scroll Offset 1DD4C: C6 17 DEC $17 1DD4E: D0 A0 BNE $1DCF0 1DD50: 60 RTS ---- 1DD51: A5 65 LDA $65 1DD53: 29 0F AND #$0F ; keep bits .... xxxx 1DD55: C9 07 CMP #$07 1DD57: D0 E7 BNE $1DD40 1DD59: 20 96DF JSR $DF96 1DD5C: 4C 40DD JMP $DD40 ---- 1DD5F: A5 37 LDA $37 ; Indoor Screen cleared (0 = not cleared) 1DD61: 10 5D BPL $1DDC0 1DD63: A5 61 LDA $61 1DD65: 30 5C BMI $1DDC3 1DD67: D0 44 BNE $1DDAD 1DD69: A5 73 LDA $73 1DD6B: F0 52 BEQ $1DDBF 1DD6D: A9 00 LDA #$00 ; A = 00 1DD6F: 85 60 STA $60 1DD71: 85 62 STA $62 1DD73: 85 66 STA $66 1DD75: A9 20 LDA #$20 ; A = 20 1DD77: 85 61 STA $61 1DD79: A5 63 LDA $63 1DD7B: 49 04 EOR #$04 ; flip bits .... .x.. 1DD7D: 85 63 STA $63 1DD7F: A5 67 LDA $67 1DD81: 49 04 EOR #$04 ; flip bits .... .x.. 1DD83: 85 67 STA $67 1DD85: A5 64 LDA $64 ; Screen Number 1DD87: C5 48 CMP $48 ; Boss Tiles Load 1DD89: D0 18 BNE $1DDA3 1DD8B: A5 65 LDA $65 1DD8D: C9 03 CMP #$03 1DD8F: D0 12 BNE $1DDA3 1DD91: A0 00 LDY #$00 ; Y = 00 1DD93: B9 14DE LDA $DE14,Y 1DD96: 99 4200 STA $0042,Y 1DD99: C8 INY 1DD9A: C0 06 CPY #$06 1DD9C: D0 F5 BNE $1DD93 1DD9E: A5 30 LDA $30 ; Current Level 1DDA0: 4A LSR 1DDA1: B0 07 BCS $1DDAA 1DDA3: A5 64 LDA $64 1DDA5: 0A ASL 1DDA6: 0A ASL 1DDA7: 38 SEC 1DDA8: 65 65 ADC $65 1DDAA: 20 6BE1 JSR $E16B 1DDAD: 20 1ADE JSR $DE1A 1DDB0: 20 48DF JSR $DF48 1DDB3: E6 60 INC $60 1DDB5: E6 62 INC $62 1DDB7: C6 61 DEC $61 1DDB9: D0 04 BNE $1DDBF 1DDBB: A9 80 LDA #$80 ; A = 80 1DDBD: 85 61 STA $61 1DDBF: 60 RTS ---- 1DDC0: 4C 54CD JMP $CD54 ---- 1DDC3: A9 00 LDA #$00 ; A = 00 1DDC5: 85 61 STA $61 1DDC7: E6 73 INC $73 1DDC9: E6 65 INC $65 1DDCB: A5 65 LDA $65 1DDCD: C9 04 CMP #$04 1DDCF: D0 3C BNE $1DE0D 1DDD1: E6 CA INC $CA 1DDD3: E6 CB INC $CB 1DDD5: A9 00 LDA #$00 ; A = 00 1DDD7: 85 37 STA $37 1DDD9: 85 65 STA $65 1DDDB: 85 82 STA $82 1DDDD: E6 64 INC $64 1DDDF: A5 64 LDA $64 ; Screen Number 1DDE1: C5 58 CMP $58 ; Screen to stop scrolling at 1DDE3: D0 1F BNE $1DE04 1DDE5: A9 80 LDA #$80 ; A = 80 1DDE7: 85 40 STA $40 ; Outdoor/Indoor 1DDE9: 20 64D0 JSR $D064 1DDEC: 20 83C1 JSR $C183 1DDEF: A5 30 LDA $30 ; Current Level 1DDF1: 4A LSR 1DDF2: 09 08 ORA #$08 ; set bits .... x... 1DDF4: 20 04C2 JSR $C204 ; Load Graphics Group Code 08 or 09 1DDF7: A9 42 LDA #$42 ; A = 42 (Base I and II Boss Theme) 1DDF9: 20 6BC1 JSR $C16B ; Play Sound 1DDFC: A9 B1 LDA #$B1 ; A = B1 1DDFE: 85 FF STA $FF 1DE00: A9 E0 LDA #$E0 ; A = E0 1DE02: 85 FC STA $FC ; Vertical Scroll Offset 1DE04: A9 0C LDA #$0C ; A = 0C 1DE06: 85 74 STA $74 1DE08: A9 20 LDA #$20 ; A = 20 1DE0A: 20 81D0 JSR $D081 1DE0D: A5 FF LDA $FF 1DE0F: 49 01 EOR #$01 ; flip bits .... ...x 1DE11: 85 FF STA $FF 1DE13: 60 RTS ---- 1DE14: Pointer table for Indoor Level Boss header changes (3 * 2 = 6 bytes) 1390 -> 9013 Level Data Pointer 7AB5 -> B57A Tile Mappings Pointer 7ABD -> BD7A Palette Mappings Pointer ---- 1DE1A: A6 21 LDX $21 1DE1C: A9 02 LDA #$02 ; A = 02 1DE1E: 9D 0007 STA $0700,X 1DE21: A9 1C LDA #$1C ; A = 1C 1DE23: E8 INX 1DE24: 9D 0007 STA $0700,X 1DE27: A9 01 LDA #$01 ; A = 01 1DE29: E8 INX 1DE2A: 9D 0007 STA $0700,X 1DE2D: A5 63 LDA $63 1DE2F: E8 INX 1DE30: 9D 0007 STA $0700,X 1DE33: 85 12 STA $12 1DE35: A5 62 LDA $62 1DE37: E8 INX 1DE38: 9D 0007 STA $0700,X 1DE3B: E8 INX 1DE3C: A0 FF LDY #$FF ; Y = FF 1DE3E: 4A LSR 1DE3F: B0 14 BCS $1DE55 1DE41: 85 13 STA $13 1DE43: 46 12 LSR $12 1DE45: 46 12 LSR $12 1DE47: 46 12 LSR $12 1DE49: 6A ROR 1DE4A: 4A LSR 1DE4B: 85 12 STA $12 1DE4D: A5 13 LDA $13 1DE4F: 29 03 AND #$03 ; keep bits .... ..xx 1DE51: 85 13 STA $13 1DE53: A0 00 LDY #$00 ; Y = 00 1DE55: 84 11 STY $11 1DE57: A5 60 LDA $60 1DE59: 29 03 AND #$03 ; keep bits .... ..xx 1DE5B: 85 02 STA $02 1DE5D: A5 60 LDA $60 1DE5F: 4A LSR 1DE60: 4A LSR 1DE61: 05 69 ORA $69 ; Sprite Data Offset 1DE63: 85 10 STA $10 1DE65: A8 TAY 1DE66: A9 00 LDA #$00 ; A = 00 1DE68: 85 08 STA $08 1DE6A: B9 0006 LDA $0600,Y 1DE6D: 0A ASL 1DE6E: 0A ASL 1DE6F: 26 08 ROL $08 1DE71: 0A ASL 1DE72: 26 08 ROL $08 1DE74: 0A ASL 1DE75: 26 08 ROL $08 1DE77: 65 44 ADC $44 1DE79: 85 00 STA $00 1DE7B: A5 08 LDA $08 1DE7D: 65 45 ADC $45 1DE7F: 85 01 STA $01 1DE81: A4 02 LDY $02 1DE83: B1 00 LDA ($00),Y 1DE85: 9D 0007 STA $0700,X 1DE88: 20 FFDF JSR $DFFF 1DE8B: E8 INX 1DE8C: C8 INY 1DE8D: C8 INY 1DE8E: C8 INY 1DE8F: C8 INY 1DE90: B1 00 LDA ($00),Y 1DE92: 9D 0007 STA $0700,X 1DE95: E8 INX 1DE96: C8 INY 1DE97: C8 INY 1DE98: C8 INY 1DE99: C8 INY 1DE9A: B1 00 LDA ($00),Y 1DE9C: 9D 0007 STA $0700,X 1DE9F: 20 FFDF JSR $DFFF 1DEA2: E8 INX 1DEA3: C8 INY 1DEA4: C8 INY 1DEA5: C8 INY 1DEA6: C8 INY 1DEA7: B1 00 LDA ($00),Y 1DEA9: 9D 0007 STA $0700,X 1DEAC: E8 INX 1DEAD: A5 10 LDA $10 1DEAF: 18 CLC 1DEB0: 69 08 ADC #$08 1DEB2: 85 10 STA $10 1DEB4: A8 TAY 1DEB5: 29 3F AND #$3F ; keep bits ..xx xxxx 1DEB7: C9 38 CMP #$38 1DEB9: 90 AB BCC $1DE66 1DEBB: 86 21 STX $21 1DEBD: 60 RTS ---- 1DEBE: A6 21 LDX $21 ; Index for PPU Tile Mapping 1DEC0: A9 01 LDA #$01 ; A = 01 1DEC2: 9D 0007 STA $0700,X 1DEC5: 9D 0207 STA $0702,X 1DEC8: A9 20 LDA #$20 ; A = 20 1DECA: E8 INX 1DECB: 9D 0007 STA $0700,X 1DECE: E8 INX 1DECF: A5 63 LDA $63 1DED1: E8 INX 1DED2: 9D 0007 STA $0700,X 1DED5: A5 62 LDA $62 1DED7: E8 INX 1DED8: 9D 0007 STA $0700,X 1DEDB: E8 INX 1DEDC: A9 00 LDA #$00 ; A = 00 1DEDE: 85 11 STA $11 1DEE0: 85 13 STA $13 1DEE2: A5 60 LDA $60 1DEE4: 29 03 AND #$03 ; keep bits .... ..xx 1DEE6: 0A ASL 1DEE7: 0A ASL 1DEE8: 85 02 STA $02 1DEEA: A5 60 LDA $60 1DEEC: 29 1C AND #$1C ; keep bits ...x xx.. 1DEEE: 0A ASL 1DEEF: 05 69 ORA $69 1DEF1: 85 10 STA $10 1DEF3: A5 60 LDA $60 1DEF5: 4A LSR 1DEF6: 66 11 ROR $11 1DEF8: 0A ASL 1DEF9: 0A ASL 1DEFA: 85 12 STA $12 1DEFC: A4 10 LDY $10 1DEFE: A9 00 LDA #$00 ; A = 00 1DF00: 85 08 STA $08 1DF02: B9 0006 LDA $0600,Y 1DF05: 0A ASL 1DF06: 0A ASL 1DF07: 26 08 ROL $08 1DF09: 0A ASL 1DF0A: 26 08 ROL $08 1DF0C: 0A ASL 1DF0D: 26 08 ROL $08 1DF0F: 65 44 ADC $44 1DF11: 85 00 STA $00 1DF13: A5 08 LDA $08 1DF15: 65 45 ADC $45 1DF17: 85 01 STA $01 1DF19: A4 02 LDY $02 1DF1B: B1 00 LDA ($00),Y 1DF1D: 9D 0007 STA $0700,X 1DF20: 20 FFDF JSR $DFFF 1DF23: E8 INX 1DF24: C8 INY 1DF25: B1 00 LDA ($00),Y 1DF27: 9D 0007 STA $0700,X 1DF2A: E8 INX 1DF2B: C8 INY 1DF2C: B1 00 LDA ($00),Y 1DF2E: 9D 0007 STA $0700,X 1DF31: 20 FFDF JSR $DFFF 1DF34: E8 INX 1DF35: C8 INY 1DF36: B1 00 LDA ($00),Y 1DF38: 9D 0007 STA $0700,X 1DF3B: E8 INX 1DF3C: E6 10 INC $10 1DF3E: A5 10 LDA $10 1DF40: A8 TAY 1DF41: 29 07 AND #$07 ; keep bits .... .xxx 1DF43: D0 B9 BNE $1DEFE 1DF45: 86 21 STX $21 1DF47: 60 RTS ---- 1DF48: A6 21 LDX $21 1DF4A: A9 01 LDA #$01 ; A = 01 1DF4C: 9D 0007 STA $0700,X 1DF4F: E8 INX 1DF50: 9D 0007 STA $0700,X 1DF53: E8 INX 1DF54: A9 07 LDA #$07 ; A = 07 1DF56: 9D 0007 STA $0700,X 1DF59: E8 INX 1DF5A: A5 60 LDA $60 1DF5C: 4A LSR 1DF5D: 4A LSR 1DF5E: 09 C0 ORA #$C0 ; set bits xx.. .... 1DF60: 85 00 STA $00 1DF62: 29 0F AND #$0F ; keep bits .... xxxx 1DF64: 05 69 ORA $69 1DF66: 85 10 STA $10 1DF68: A8 TAY 1DF69: A5 67 LDA $67 1DF6B: 9D 0007 STA $0700,X 1DF6E: E8 INX 1DF6F: A5 00 LDA $00 1DF71: 9D 0007 STA $0700,X 1DF74: E8 INX 1DF75: B9 0006 LDA $0600,Y 1DF78: A8 TAY 1DF79: B1 46 LDA ($46),Y 1DF7B: 9D 0007 STA $0700,X 1DF7E: E8 INX 1DF7F: A5 00 LDA $00 1DF81: 18 CLC 1DF82: 69 08 ADC #$08 1DF84: 85 00 STA $00 1DF86: C9 F8 CMP #$F8 1DF88: B0 09 BCS $1DF93 1DF8A: A5 10 LDA $10 1DF8C: 69 08 ADC #$08 1DF8E: 85 10 STA $10 1DF90: A8 TAY 1DF91: 90 D6 BCC $1DF69 1DF93: 86 21 STX $21 1DF95: 60 RTS ---- 1DF96: A6 21 LDX $21 1DF98: A9 01 LDA #$01 ; A = 01 1DF9A: 9D 0007 STA $0700,X 1DF9D: 9D 0207 STA $0702,X 1DFA0: A9 08 LDA #$08 ; A = 08 1DFA2: E8 INX 1DFA3: 9D 0007 STA $0700,X 1DFA6: E8 INX 1DFA7: A9 23 LDA #$23 ; A = 23 1DFA9: E8 INX 1DFAA: 9D 0007 STA $0700,X 1DFAD: A5 60 LDA $60 1DFAF: 0A ASL 1DFB0: 29 38 AND #$38 ; keep bits ..xx x... 1DFB2: 05 69 ORA $69 1DFB4: 85 10 STA $10 1DFB6: 29 BF AND #$BF ; keep bits x.xx xxxx 1DFB8: 18 CLC 1DFB9: 69 C0 ADC #$C0 1DFBB: E8 INX 1DFBC: 9D 0007 STA $0700,X 1DFBF: E8 INX 1DFC0: A5 60 LDA $60 1DFC2: 29 03 AND #$03 ; keep bits .... ..xx 1DFC4: C9 03 CMP #$03 1DFC6: F0 18 BEQ $1DFE0 1DFC8: A5 10 LDA $10 1DFCA: A8 TAY 1DFCB: B9 0006 LDA $0600,Y 1DFCE: A8 TAY 1DFCF: B1 46 LDA ($46),Y 1DFD1: 9D 0007 STA $0700,X 1DFD4: E8 INX 1DFD5: E6 10 INC $10 1DFD7: A5 10 LDA $10 1DFD9: 29 07 AND #$07 ; keep bits .... .xxx 1DFDB: D0 E3 BNE $1DFC0 1DFDD: 86 21 STX $21 1DFDF: 60 RTS ---- 1DFE0: A5 10 LDA $10 1DFE2: A8 TAY 1DFE3: B9 0006 LDA $0600,Y 1DFE6: A8 TAY 1DFE7: B1 46 LDA ($46),Y 1DFE9: 29 F0 AND #$F0 ; keep bits xxxx .... 1DFEB: 85 11 STA $11 1DFED: A5 10 LDA $10 1DFEF: 49 40 EOR #$40 ; flip bits .x.. .... 1DFF1: A8 TAY 1DFF2: B9 0006 LDA $0600,Y 1DFF5: A8 TAY 1DFF6: B1 46 LDA ($46),Y 1DFF8: 29 0F AND #$0F ; keep bits .... xxxx 1DFFA: 05 11 ORA $11 1DFFC: 4C D1DF JMP $DFD1 ---- Determine Tile Collision Code (0-3) A = Tile Code Tile Code 0 is always set to Collision Code 0 Other upper limits are NOT inclusive 1DFFF: 84 14 STY $14 1E001: A4 11 LDY $11 ; Temporary Storage for Player Index (0-1) 1E003: D0 6F BNE $1E074 1E005: A8 TAY 1E006: F0 0C BEQ $1E014 1E008: C5 49 CMP $49 1E00A: B0 04 BCS $1E010 1E00C: A9 01 LDA #$01 ; A = 01 1E00E: D0 12 BNE $1E022 1E010: C5 4A CMP $4A 1E012: B0 04 BCS $1E018 1E014: A9 00 LDA #$00 1E016: F0 0A BEQ $1E022 1E018: C5 4B CMP $4B 1E01A: B0 04 BCS $1E020 1E01C: A9 02 LDA #$02 ; A = 02 1E01E: D0 02 BNE $1E022 1E020: A9 03 LDA #$03 ; A = 03 1E022: A4 13 LDY $13 1E024: D0 12 BNE $1E038 1E026: 0A ASL 1E027: 0A ASL 1E028: 0A ASL 1E029: 0A ASL 1E02A: 0A ASL 1E02B: 0A ASL 1E02C: 85 15 STA $15 1E02E: A4 12 LDY $12 1E030: B9 8006 LDA $0680,Y 1E033: 29 3F AND #$3F ; keep bits ..xx xxxx 1E035: 4C 65E0 JMP $E065 ---- 1E038: 88 DEY 1E039: D0 10 BNE $1E04B 1E03B: 0A ASL 1E03C: 0A ASL 1E03D: 0A ASL 1E03E: 0A ASL 1E03F: 85 15 STA $15 1E041: A4 12 LDY $12 1E043: B9 8006 LDA $0680,Y 1E046: 29 CF AND #$CF ; keep bits xx.. xxxx 1E048: 4C 65E0 JMP $E065 ---- 1E04B: 88 DEY 1E04C: D0 0E BNE $1E05C 1E04E: 0A ASL 1E04F: 0A ASL 1E050: 85 15 STA $15 1E052: A4 12 LDY $12 1E054: B9 8006 LDA $0680,Y 1E057: 29 F3 AND #$F3 ; keep bits xxxx ..xx 1E059: 4C 65E0 JMP $E065 ---- 1E05C: 85 15 STA $15 1E05E: A4 12 LDY $12 1E060: B9 8006 LDA $0680,Y 1E063: 29 FC AND #$FC ; keep bits xxxx xx.. 1E065: 05 15 ORA $15 1E067: 99 8006 STA $0680,Y 1E06A: A5 41 LDA $41 ; Scrolling (H/V) 1E06C: D0 09 BNE $1E077 1E06E: 98 TYA 1E06F: 18 CLC 1E070: 69 04 ADC #$04 1E072: 85 12 STA $12 1E074: A4 14 LDY $14 1E076: 60 RTS ---- 1E077: E6 13 INC $13 1E079: A5 13 LDA $13 1E07B: C9 04 CMP #$04 1E07D: 90 F5 BCC $1E074 1E07F: A9 00 LDA #$00 ; A = 00 1E081: 85 13 STA $13 1E083: E6 12 INC $12 1E085: D0 ED BNE $1E074 1E087: 20 BBE0 JSR $E0BB 1E08A: 48 PHA1E08B: 90 20 BCC $1E0AD 1E08D: A5 13 LDA $131E08F: 85 16 STA $161E091: 29 C0 AND #$C0 ; keep bits xx.. ....1E093: 85 17 STA $171E095: A5 16 LDA $161E097: 18 CLC1E098: 69 04 ADC #$041E09A: 29 3F AND #$3F ; keep bits ..xx xxxx1E09C: 05 17 ORA $171E09E: A8 TAY 1E09F: 20 B5E0 JSR $E0B5 1E0A2: 0A ASL1E0A3: A5 16 LDA $161E0A5: 85 13 STA $131E0A7: 90 04 BCC $1E0AD 1E0A9: 68 PLA 1E0AA: A9 80 LDA #$80 ; A = 80 1E0AC: 60 RTS ---- 1E0AD: 68 PLA 1E0AE: 60 RTS ---- 1E0AF: 20 B5E0 JSR $E0B5 1E0B2: 4C 8AE0 JMP $E08A ---- 1E0B5: A9 00 LDA #$00 ; A = 00 1E0B7: 85 15 STA $15 1E0B9: F0 4A BEQ $1E105 1E0BB: 85 13 STA $13 1E0BD: A9 00 LDA #$00 ; A = 00 1E0BF: 85 10 STA $10 1E0C1: F0 02 BEQ $1E0C5 1E0C3: 85 13 STA $13 1E0C5: 98 TYA 1E0C6: 85 15 STA $15 1E0C8: 18 CLC 1E0C9: 65 FC ADC $FC ; Vertical Scroll Offset 1E0CB: B0 04 BCS $1E0D1 1E0CD: C9 F0 CMP #$F0 1E0CF: 90 02 BCC $1E0D3 1E0D1: 69 0F ADC #$0F 1E0D3: 85 11 STA $11 1E0D5: A5 13 LDA $13 1E0D7: 18 CLC 1E0D8: 65 FD ADC $FD ; Horizontal Scroll Offset 1E0DA: 85 12 STA $12 1E0DC: A5 FF LDA $FF 1E0DE: 45 10 EOR $10 1E0E0: 29 01 AND #$01 ; keep bits .... ...x 1E0E2: 90 02 BCC $1E0E6 1E0E4: 49 01 EOR #$01 ; flip bits .... ...x 1E0E6: A8 TAY 1E0E7: A5 11 LDA $11 1E0E9: 4A LSR 1E0EA: 4A LSR 1E0EB: 29 3C AND #$3C ; keep bits ..xx xx.. 1E0ED: 85 11 STA $11 1E0EF: A5 12 LDA $12 1E0F1: 4A LSR 1E0F2: 4A LSR 1E0F3: 4A LSR 1E0F4: 4A LSR 1E0F5: 85 12 STA $12 1E0F7: 4A LSR 1E0F8: 4A LSR 1E0F9: 05 11 ORA $11 1E0FB: 19 30E1 ORA $E130,Y 1E0FE: A8 TAY 1E0FF: A5 12 LDA $12 1E101: 29 03 AND #$03 ; keep bits .... ..xx 1E103: 85 12 STA $12 1E105: 84 13 STY $13 1E107: A5 15 LDA $15 1E109: C9 E0 CMP #$E0 1E10B: A9 00 LDA #$00 ; A = 00 1E10D: B0 1B BCS $1E12A 1E10F: B9 8006 LDA $0680,Y 1E112: A4 12 LDY $12 1E114: F0 08 BEQ $1E11E 1E116: 88 DEY 1E117: F0 07 BEQ $1E120 1E119: 88 DEY 1E11A: F0 06 BEQ $1E122 1E11C: D0 06 BNE $1E124 1E11E: 4A LSR 1E11F: 4A LSR 1E120: 4A LSR 1E121: 4A LSR 1E122: 4A LSR 1E123: 4A LSR 1E124: 29 03 AND #$03 ; keep bits .... ..xx 1E126: A8 TAY 1E127: B9 32E1 LDA $E132,Y 1E12A: 85 14 STA $14 1E12C: 4A LSR 1E12D: A5 14 LDA $14 1E12F: 60 RTS ---- 1E130: 00 40 Table for ? (2 bytes) 1E132: 00 01 02 80 Table for ? (4 bytes) ---- 1E136: A5 3B LDA $3B 1E138: D0 1C BNE $1E156 1E13A: A5 58 LDA $58 ; Screen to stop scrolling at 1E13C: 30 16 BMI $1E154 1E13E: C5 64 CMP $64 ; Screen Number 1E140: D0 14 BNE $1E156 1E142: A4 41 LDY $41 ; Scrolling (H/V) 1E144: A5 65 LDA $65 ; Movement from room to room (00-03) (indoor) 1E146: D9 57E1 CMP $E157,Y 1E149: 90 0B BCC $1E156 1E14B: B9 59E1 LDA $E159,Y 1E14E: 85 75 STA $75 1E150: A9 FF LDA #$FF ; A = FF 1E152: 85 58 STA $58 ; Screen to stop scrolling at 1E154: A9 00 LDA #$00 ; A = 00 1E156: 60 RTS ---- 1E157: A0 C0 Table for ? (2 bytes) 1E159: 60 40 Table for ? (2 bytes) ---- Screen Load 1E15B: A5 64 LDA $64 ; Screen Number 1E15D: 18 CLC 1E15E: 69 02 ADC #$02 1E160: D0 09 BNE $1E16B 1E162: A5 64 LDA $64 ; Screen Number 1E164: 18 CLC 1E165: 69 01 ADC #$01 1E167: D0 02 BNE $1E16B 1E169: A5 64 LDA $64 ; Screen Number 1E16B: 0A ASL 1E16C: AA TAX 1E16D: A0 02 LDY #$02 ; Y = 02 1E16F: 20 39C1 JSR $C139 ; Switch Bank (02) 1E172: 8A TXA 1E173: A8 TAY 1E174: B1 42 LDA ($42),Y 1E176: 85 00 STA $00 1E178: C8 INY 1E179: B1 42 LDA ($42),Y 1E17B: 85 01 STA $01 1E17D: A0 00 LDY #$00 ; Y = 00 1E17F: A6 69 LDX $69 ; Sprite Data Offset 1E181: B1 00 LDA ($00),Y 1E183: C8 INY 1E184: C9 80 CMP #$80 1E186: B0 1E BCS $1E1A6 1E188: 9D 0006 STA $0600,X 1E18B: E8 INX 1E18C: A5 41 LDA $41 ; Scrolling (H/V) 1E18E: D0 0B BNE $1E19B 1E190: E0 38 CPX #$38 1E192: F0 0F BEQ $1E1A3 1E194: E0 78 CPX #$78 1E196: 90 E9 BCC $1E181 1E198: 4C 46C1 JMP $C146 ; Restore Bank ---- 1E19B: E0 40 CPX #$40 1E19D: F0 04 BEQ $1E1A3 1E19F: E0 80 CPX #$80 1E1A1: 90 DE BCC $1E181 1E1A3: 4C 46C1 JMP $C146 ---- Player/Enemy Collision Detection 1E1A6: C9 F0 CMP #$F0 1E1A8: B0 11 BCS $1E1BB 1E1AA: 29 7F AND #$7F ; keep bits .xxx xxxx 1E1AC: 85 02 STA $02 1E1AE: B1 00 LDA ($00),Y 1E1B0: C8 INY 1E1B1: 9D 0006 STA $0600,X 1E1B4: E8 INX 1E1B5: C6 02 DEC $02 1E1B7: D0 F8 BNE $1E1B1 1E1B9: F0 D1 BEQ $1E18C 1E1BB: 29 0F AND #$0F ; keep bits .... xxxx 1E1BD: 0A ASL 1E1BE: 0A ASL 1E1BF: 0A ASL 1E1C0: 05 69 ORA $69 1E1C2: 84 03 STY $03 1E1C4: A8 TAY 1E1C5: A9 08 LDA #$08 ; A = 08 1E1C7: 85 02 STA $02 1E1C9: B9 0006 LDA $0600,Y 1E1CC: 9D 0006 STA $0600,X 1E1CF: E8 INX 1E1D0: C8 INY 1E1D1: C6 02 DEC $02 1E1D3: D0 F4 BNE $1E1C9 1E1D5: A4 03 LDY $03 1E1D7: D0 B3 BNE $1E18C 1E1D9: A2 01 LDX #$01 ; X = 01 1E1DB: A4 83 LDY $83 ; Temporary storage for X register 1E1DD: B5 90 LDA $90,X 1E1DF: C9 01 CMP #$01 1E1E1: D0 79 BNE $1E25C 1E1E3: A5 40 LDA $40 ; Outdoor/Indoor 1E1E5: 4A LSR 1E1E6: 90 0F BCC $1E1F7 1E1E8: B9 2805 LDA $0528,Y ; Enemy Type 1E1EB: C9 01 CMP #$01 1E1ED: D0 3B BNE $1E22A 1E1EF: B5 BC LDA $BC,X ; Player Animation Frame 1E1F1: C9 02 CMP #$02 1E1F3: D0 35 BNE $1E22A 1E1F5: F0 65 BEQ $1E25C 1E1F7: B9 9805 LDA $0598,Y 1E1FA: 0A ASL 1E1FB: 10 2D BPL $1E22A 1E1FD: 0A ASL 1E1FE: 10 1C BPL $1E21C 1E200: B9 2403 LDA $0324,Y ; Enemy Y Position On Screen 1E203: 38 SEC 1E204: FD 1A03 SBC $031A,X ; Player Y Position on Screen 1E207: 90 09 BCC $1E212 1E209: C9 08 CMP #$08 1E20B: B9 9805 LDA $0598,Y 1E20E: 29 EF AND #$EF ; keep bits xxx. xxxx 1E210: B0 05 BCS $1E217 1E212: B9 9805 LDA $0598,Y 1E215: 09 10 ORA #$10 ; set bits ...x .... 1E217: 99 9805 STA $0598,Y 1E21A: D0 0E BNE $1E22A 1E21C: B5 A0 LDA $A0,X 1E21E: F0 0A BEQ $1E22A 1E220: B5 C6 LDA $C6,X 1E222: 30 38 BMI $1E25C 1E224: C9 01 CMP #$01 1E226: 90 34 BCC $1E25C 1E228: B0 00 BCS $1E22A 1E22A: A0 00 LDY #$00 ; Y = 00 1E22C: B5 B2 LDA $B2,X 1E22E: F0 08 BEQ $1E238 1E230: B5 F1 LDA $F1,X 1E232: 29 04 AND #$04 ; keep bits .... .x.. 1E234: D0 26 BNE $1E25C 1E236: F0 0D BEQ $1E245 1E238: C8 INY 1E239: B5 A0 LDA $A0,X 1E23B: D0 08 BNE $1E245 1E23D: C8 INY 1E23E: B5 D6 LDA $D6,X 1E240: C9 17 CMP #$17 1E242: F0 01 BEQ $1E245 1E244: C8 INY 1E245: 20 11E4 JSR $E411 1E248: BD 1A03 LDA $031A,X 1E24B: 38 SEC 1E24C: E5 08 SBC $08 1E24E: C5 0A CMP $0A 1E250: B0 0A BCS $1E25C 1E252: BD 3403 LDA $0334,X 1E255: 38 SEC 1E256: E5 09 SBC $09 1E258: C5 0B CMP $0B 1E25A: 90 43 BCC $1E29F 1E25C: CA DEX 1E25D: 30 03 BMI $1E262 1E25F: 4C DBE1 JMP $E1DB ---- 1E262: A6 83 LDX $83 1E264: 60 RTS ---- 1E265: BD 1A03 LDA $031A,X 1E268: D5 B8 CMP $B8,X 1E26A: 90 F0 BCC $1E25C 1E26C: A9 01 LDA #$01 ; A = 01 1E26E: 99 6805 STA $0568,Y ; Enemy Animation Frame Code 1E271: B9 1805 LDA $0518,Y ; Enemy X Velocity (low byte) 1E274: 18 CLC 1E275: 79 D804 ADC $04D8,Y 1E278: B9 0805 LDA $0508,Y ; Enemy X Velocity (high byte) 1E27B: 69 00 ADC #$00 1E27D: 18 CLC 1E27E: 75 D4 ADC $D4,X 1E280: 95 D4 STA $D4,X 1E282: B9 9805 LDA $0598,Y 1E285: 0A ASL 1E286: 0A ASL 1E287: 0A ASL 1E288: A9 E4 LDA #$E4 ; A = E4 1E28A: 90 02 BCC $1E28E 1E28C: A9 E8 LDA #$E8 ; A = E8 1E28E: 18 CLC 1E28F: 79 2403 ADC $0324,Y ; Enemy Y Position On Screen 1E292: 9D 1A03 STA $031A,X 1E295: A9 01 LDA #$01 ; A = 01 1E297: 95 B6 STA $B6,X 1E299: 20 67D8 JSR $D867 1E29C: 4C 5CE2 JMP $E25C ---- 1E29F: A4 83 LDY $83 1E2A1: B9 3E03 LDA $033E,Y ; Enemy X Position On Screen 1E2A4: 38 SEC 1E2A5: FD 3403 SBC $0334,X 1E2A8: B0 04 BCS $1E2AE 1E2AA: 49 FF EOR #$FF ; flip all bits 1E2AC: 69 01 ADC #$01 1E2AE: C9 80 CMP #$80 1E2B0: B0 AA BCS $1E25C 1E2B2: B9 9805 LDA $0598,Y 1E2B5: 0A ASL 1E2B6: 10 04 BPL $1E2BC 1E2B8: 29 20 AND #$20 ; keep bits ..x. .... 1E2BA: F0 A9 BEQ $1E265 1E2BC: B9 2805 LDA $0528,Y ; Enemy Type 1E2BF: F0 2B BEQ $1E2EC 1E2C1: B5 AE LDA $AE,X ; Timer for Invincibility 1E2C3: D0 97 BNE $1E25C 1E2C5: B5 B0 LDA $B0,X ; Timer for B Weapon Effect 1E2C7: D0 0D BNE $1E2D6 1E2C9: 20 4AD5 JSR $D54A 1E2CC: B9 2805 LDA $0528,Y ; Enemy Type 1E2CF: C9 01 CMP #$01 1E2D1: F0 6D BEQ $1E340 1E2D3: A6 83 LDX $83 1E2D5: 60 RTS ---- 1E2D6: 86 17 STX $17 1E2D8: A6 83 LDX $83 ; Temporary storage for X register 1E2DA: BD 7805 LDA $0578,X ; Enemy HP 1E2DD: F0 0C BEQ $1E2EB 1E2DF: C9 F0 CMP #$F0 1E2E1: B0 08 BCS $1E2EB 1E2E3: A9 00 LDA #$00 ; A = 00 1E2E5: 9D 7805 STA $0578,X ; Enemy HP 1E2E8: 20 42E9 JSR $E942 ; Related to Score ? 1E2EB: 60 RTS ---- 1E2EC: 86 10 STX $10 1E2EE: A9 0A LDA #$0A ; A = 0A 1E2F0: 85 00 STA $00 1E2F2: 8A TXA 1E2F3: A8 TAY 1E2F4: 20 A0C4 JSR $C4A0 1E2F7: A6 10 LDX $10 1E2F9: A4 83 LDY $83 1E2FB: A9 1F LDA #$1F ; A = 1F (1F = Weapon Item taken) 1E2FD: 20 6BC1 JSR $C16B ; Play Sound 1E300: B9 A805 LDA $05A8,Y ; Enemy Attributes 1E303: 29 07 AND #$07 ; keep bits .... .xxx 1E305: F0 1E BEQ $1E325 ; check for R Weapon 1E307: C9 05 CMP #$05 ; check for B Weapon 1E309: 90 22 BCC $1E32D 1E30B: F0 09 BEQ $1E316 1E30D: 20 E5E9 JSR $E9E5 ; Eagle Weapon Effect - Destroy All Enemies 1E310: A9 20 LDA #$20 ; A = 20 1E312: 85 7D STA $7D ; Eagle Weapon Flash Timer 1E314: D0 2A BNE $1E340 B Weapon B Weapon Effect is controlled by variable B0,X Decreases every 8 frames 80 * 8 = 400 / 3C = 17.06667 seconds 90 * 8 = 480 / 3C = 19.2 seconds 1E316: A9 80 LDA #$80 ; A = 80 (duration of the B Weapon effect) 1E318: A4 30 LDY $30 ; Current Level 1E31A: C0 06 CPY #$06 ; Check if Level 7 (Hangar) 1E31C: D0 02 BNE $1E320 *** set length according to level, using a table and Y as the index *** 1E31A: B9 70F6 LDA $F670,Y ; Custom Table for B Weapon Durations 1E31D: EA NOP 1E31E: EA NOP 1E31F: EA NOP *** 1E31E: A9 90 LDA #$90 ; A = 90 (duration if in Level 7) 1E320: 95 B0 STA $B0,X ; Timer for B Weapon Effect 1E322: 4C 40E3 JMP $E340 ---- R Weapon 1E325: A9 10 LDA #$10 ; A = 10 1E327: 85 08 STA $08 1E329: A0 FF LDY #$FF ; Y = FF 1E32B: D0 0C BNE $1E339 MFSL Weapons *** bridge here for Weapon Upgrade *** 1E32D: A0 F0 LDY #$F0 ; Y = F0 1E32F: 85 08 STA $08 1E331: 55 AA EOR $AA,X 1E333: 29 0F AND #$0F ; keep bits .... xxxx 1E335: F0 02 BEQ $1E339 1E337: A0 E0 LDY #$E0 ; Y = E0 1E339: 98 TYA 1E33A: 35 AA AND $AA,X 1E33C: 05 08 ORA $08 1E33E: 95 AA STA $AA,X 1E340: A6 83 LDX $83 1E342: 4C 09E8 JMP $E809 ; Remove Enemy ---- 1E345: BD 9805 LDA $0598,X 1E348: 29 30 AND #$30 ; keep bits ..xx .... 1E34A: 0A ASL 1E34B: 0A ASL 1E34C: 85 10 STA $10 1E34E: A0 04 LDY #$04 ; Y = 04 1E350: 20 11E4 JSR $E411 1E353: A2 0F LDX #$0F ; X = 0F 1E355: BD 6803 LDA $0368,X 1E358: F0 30 BEQ $1E38A 1E35A: BD 3804 LDA $0438,X 1E35D: C9 01 CMP #$01 1E35F: D0 29 BNE $1E38A 1E361: A5 40 LDA $40 ; Outdoor/Indoor 1E363: 4A LSR 1E364: 90 12 BCC $1E378 1E366: A4 10 LDY $10 1E368: 10 07 BPL $1E371 1E36A: BD 8803 LDA $0388,X 1E36D: 30 09 BMI $1E378 1E36F: 10 19 BPL $1E38A 1E371: BD 1804 LDA $0418,X 1E374: C9 02 CMP #$02 1E376: B0 12 BCS $1E38A 1E378: BD B803 LDA $03B8,X 1E37B: E5 08 SBC $08 1E37D: C5 0A CMP $0A 1E37F: B0 09 BCS $1E38A 1E381: BD C803 LDA $03C8,X 1E384: E5 09 SBC $09 1E386: C5 0B CMP $0B 1E388: 90 06 BCC $1E390 1E38A: CA DEX 1E38B: 10 C8 BPL $1E355 1E38D: A6 83 LDX $83 1E38F: 60 RTS ---- 1E390: A4 83 LDY $83 1E392: B9 3E03 LDA $033E,Y ; Enemy X Position On Screen 1E395: 38 SEC 1E396: FD C803 SBC $03C8,X 1E399: B0 04 BCS $1E39F 1E39B: 49 FF EOR #$FF ; flip all bits 1E39D: 69 01 ADC #$01 1E39F: C9 80 CMP #$80 1E3A1: B0 E7 BCS $1E38A 1E3A3: BD 4804 LDA $0448,X 1E3A6: 20 D8E3 JSR $E3D8 1E3A9: BD 8803 LDA $0388,X 1E3AC: C9 05 CMP #$05 1E3AE: D0 17 BNE $1E3C7 1E3B0: 86 08 STX $08 1E3B2: 8A TXA 1E3B3: A2 00 LDX #$00 ; X = 00 1E3B5: C9 0A CMP #$0A 1E3B7: 90 02 BCC $1E3BB 1E3B9: A2 0A LDX #$0A ; X = 0A 1E3BB: BD 3804 LDA $0438,X 1E3BE: C9 01 CMP #$01 1E3C0: F0 05 BEQ $1E3C7 1E3C2: E8 INX 1E3C3: E4 08 CPX $08 1E3C5: D0 F4 BNE $1E3BB 1E3C7: 20 CDE3 JSR $E3CD 1E3CA: A6 83 LDX $83 1E3CC: 60 RTS ---- 1E3CD: A9 02 LDA #$02 ; A = 021E3CF: 9D 3804 STA $0438,X1E3D2: A9 06 LDA #$06 ; A = 061E3D4: 9D 1804 STA $0418,X 1E3D7: 60 RTS ---- 1E3D8: 85 17 STA $17 1E3DA: 86 11 STX $11 1E3DC: A4 83 LDY $83 1E3DE: B9 7805 LDA $0578,Y ; Enemy HP 1E3E1: F0 28 BEQ $1E40B 1E3E3: C9 F0 CMP #$F0 1E3E5: B0 24 BCS $1E40B 1E3E7: E9 00 SBC #$00 1E3E9: B0 02 BCS $1E3ED 1E3EB: A9 00 LDA #$00 ; A = 00 1E3ED: 99 7805 STA $0578,Y ; Enemy HP 1E3F0: D0 08 BNE $1E3FA 1E3F2: A6 83 LDX $83 1E3F4: 20 42E9 JSR $E942 1E3F7: A6 11 LDX $11 1E3F9: 60 RTS ---- 1E3FA: B9 9805 LDA $0598,Y 1E3FD: 29 04 AND #$04 ; keep bits .... .x.. 1E3FF: F0 0A BEQ $1E40B 1E401: B9 4805 LDA $0548,Y 1E404: A8 TAY 1E405: B9 0CE4 LDA $E40C,Y 1E408: 20 6BC1 JSR $C16B ; Play Sound 1E40B: 60 RTS ---- 1E40C: 16 16 16 18 14 Table for Bullet Hit Sound Codes (5 bytes) 16 = Normal Hit 18 = Heart Hit 14 = Core Plating Hit ---- 1E411: 86 11 STX $11 1E413: A6 83 LDX $83 1E415: 98 TYA 1E416: 0A ASL 1E417: A8 TAY 1E418: B9 E8E4 LDA $E4E8,Y 1E41B: 85 0E STA $0E 1E41D: B9 E9E4 LDA $E4E9,Y 1E420: 85 0F STA $0F 1E422: BD 8805 LDA $0588,X 1E425: 29 0F AND #$0F ; keep bits .... xxxx 1E427: C9 0F CMP #$0F 1E429: F0 20 BEQ $1E44B 1E42B: 0A ASL 1E42C: 0A ASL 1E42D: A8 TAY 1E42E: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 1E431: 71 0E ADC ($0E),Y 1E433: 85 08 STA $08 1E435: C8 INY 1E436: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 1E439: 18 CLC 1E43A: 71 0E ADC ($0E),Y 1E43C: 85 09 STA $09 1E43E: C8 INY 1E43F: B1 0E LDA ($0E),Y 1E441: 85 0A STA $0A 1E443: C8 INY 1E444: B1 0E LDA ($0E),Y 1E446: 85 0B STA $0B 1E448: A6 11 LDX $11 1E44A: 60 RTS ---- 1E44B: BD A805 LDA $05A8,X 1E44E: 0A ASL 1E44F: 0A ASL 1E450: BD B805 LDA $05B8,X 1E453: 90 04 BCC $1E459 1E455: 49 FF EOR #$FF ; flip all bits 1E457: 69 00 ADC #$00 1E459: 18 CLC 1E45A: 69 08 ADC #$08 1E45C: 85 0C STA $0C 1E45E: 98 TYA 1E45F: 0A ASL 1E460: A8 TAY 1E461: B9 C4E4 LDA $E4C4,Y 1E464: 85 08 STA $08 1E466: B9 C5E4 LDA $E4C5,Y 1E469: 85 09 STA $09 1E46B: B9 C6E4 LDA $E4C6,Y 1E46E: 85 0A STA $0A 1E470: B9 C7E4 LDA $E4C7,Y 1E473: 85 0B STA $0B 1E475: BD A805 LDA $05A8,X 1E478: 4A LSR 1E479: 4A LSR 1E47A: 4A LSR 1E47B: 4A LSR 1E47C: 29 0C AND #$0C ; keep bits .... xx.. 1E47E: A8 TAY 1E47F: B9 D8E4 LDA $E4D8,Y 1E482: 20 B6E4 JSR $E4B6 1E485: 18 CLC 1E486: 65 08 ADC $08 1E488: 18 CLC 1E489: 7D 2403 ADC $0324,X ; Enemy Y Position On Screen 1E48C: 85 08 STA $08 1E48E: B9 D9E4 LDA $E4D9,Y 1E491: 20 B6E4 JSR $E4B6 1E494: 18 CLC 1E495: 65 09 ADC $09 1E497: 18 CLC 1E498: 7D 3E03 ADC $033E,X ; Enemy X Position On Screen 1E49B: 85 09 STA $09 1E49D: B9 DAE4 LDA $E4DA,Y 1E4A0: 20 B6E4 JSR $E4B6 1E4A3: 18 CLC 1E4A4: 65 0A ADC $0A 1E4A6: 85 0A STA $0A 1E4A8: B9 DBE4 LDA $E4DB,Y 1E4AB: 20 B6E4 JSR $E4B6 1E4AE: 18 CLC 1E4AF: 65 0B ADC $0B 1E4B1: 85 0B STA $0B 1E4B3: A6 11 LDX $11 1E4B5: 60 RTS ---- 1E4B6: C9 FE CMP #$FE 1E4B8: 90 09 BCC $1E4C3 1E4BA: 4A LSR 1E4BB: A5 0C LDA $0C 1E4BD: B0 04 BCS $1E4C3 1E4BF: 49 FF EOR #$FF ; flip all bits 1E4C1: 69 01 ADC #$01 1E4C3: 60 RTS ---- 1E4C4: Table for ? (14 bytes) 00 FB 0A 0A F8 FC 10 08 F4 F5 04 16 F1 FC 1D 08 FE FE 04 04 1E4D8: Table for ? (10 bytes) FA F8 0C FF FA FE 0C FF F8 FA FF 0C FE F6 FF 14 ---- 1E4E8: Pointer table for ? (6 * 2 = C bytes) F2E4 -> 1E4F2 2EE5 -> 1E52E 6AE5 -> 1E56A A6E5 -> 1E5A6 E2E5 -> 1E5E2 ---- 1E4F2: Pointer 0 (Table 1E4E8) (3C bytes) F1 F7 28 12 FE F9 14 14 F8 F3 1A 1A F2 ED 26 26 E0 F0 08 20 FD F8 10 10 F5 F7 20 12 E7 E2 3C 3C F1 E2 28 3C E4 D3 48 5A 00 F6 16 16 08 F1 12 1E F5 F1 20 1E EA EC 37 28 F3 F3 11 1A ---- 1E52E: Pointer 1 (Table 1E4E8) (3C bytes) EA F8 1E 10 F6 FA 0C 0C F1 F5 12 16 EA EE 24 24 E0 F0 08 20 F5 F9 0E 0E ED F8 1E 10 DF E3 3A 3A E9 E3 26 3A DC D4 46 58 F8 F7 14 14 00 F2 10 1C ED F2 1E 1C E2 ED 35 26 F3 F1 12 1E ---- 1E56A: Pointer 2 (Table 1E4E8) (3C bytes) F4 F1 0D 1E F3 F4 04 18 EC ED 10 26 E6 E7 1C 32 E0 F0 08 20 F1 F2 06 1C E9 F1 16 1E DB DC 32 48 E5 DC 1E 48 D8 CD 3E 66 F4 F0 19 22 FC EB 08 2A E3 F2 1A 1C DE E6 2D 34 E9 EA 0D 2C ---- 1E5A6: Pointer 3 (Table 1E4E8) (3C bytes) F3 F8 24 10 F0 FB 1F 0A EA F5 2B 16 E3 EE 39 24 E0 F0 08 20 EE F9 23 0E E6 F8 33 10 D8 E3 4F 3A E2 E3 3B 3A D5 D4 5B 58 F1 F7 29 14 F9 F2 25 1C E4 F2 35 1C DA ED 4A 26 E6 F1 2A 1E ---- 1E5E2: Pointer 4 (Table 1E4E8) (3C bytes) EE F5 24 16 FC FC 08 08 F5 F5 16 16 EF EF 22 22 E0 F0 08 20 FA FA 0C 0C F3 FA 16 0C E4 E4 38 38 EE E4 24 38 E1 D5 44 56 FD F8 12 12 05 F3 0E 1A F3 F3 1A 1A E7 EE 33 24 F2 F2 13 1C ---- 1E61E: A9 00 LDA #$00 ; A = 00 1E620: 85 B6 STA $B6 1E622: 85 B7 STA $B7 1E624: A2 0F LDX #$0F ; X = 0F 1E626: BD B804 LDA $04B8,X ; Enemy Routine Index 1E629: F0 2A BEQ $1E655 1E62B: 86 83 STX $83 1E62D: 0A ASL 1E62E: 85 04 STA $04 1E630: 20 59E6 JSR $E659 1E633: BD 0A03 LDA $030A,X ; Enemy Tile Mapping Code 1E636: F0 1D BEQ $1E655 1E638: A5 40 LDA $40 ; Outdoor/Indoor 1E63A: 4A LSR 1E63B: 90 07 BCC $1E644 1E63D: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 1E640: C9 9C CMP #$9C 1E642: 90 09 BCC $1E64D 1E644: BD 9805 LDA $0598,X 1E647: 4A LSR 1E648: B0 03 BCS $1E64D 1E64A: 20 D9E1 JSR $E1D9 1E64D: BD 9805 LDA $0598,X 1E650: 30 03 BMI $1E655 1E652: 20 45E3 JSR $E345 1E655: CA DEX 1E656: 10 CE BPL $1E626 1E658: 60 RTS ---- Execute Enemy X Routine 1E659: BD 2805 LDA $0528,X ; Enemy Type 1E65C: 0A ASL 1E65D: A8 TAY 1E65E: 4A LSR 1E65F: C9 10 CMP #$10 1E661: B0 18 BCS $1E67B 1E663: B9 A8E6 LDA $E6A8,Y 1E666: 85 02 STA $02 1E668: B9 A9E6 LDA $E6A9,Y 1E66B: 85 03 STA $03 1E66D: A4 04 LDY $04 1E66F: B1 02 LDA ($02),Y 1E671: 85 04 STA $04 1E673: C8 INY 1E674: B1 02 LDA ($02),Y 1E676: 85 05 STA $05 1E678: 6C 0400 JMP ($0004) ---- Enemy Type >= 10 1E67B: 98 TYA 1E67C: E9 20 SBC #$20 1E67E: A8 TAY 1E67F: B1 80 LDA ($80),Y 1E681: 85 02 STA $02 1E683: C8 INY 1E684: B1 80 LDA ($80),Y 1E686: 4C 6BE6 JMP $E66B ---- Get Table Pointer for Enemy Routines 1E689: A5 30 LDA $30 ; Current Level1E68B: 0A ASL1E68C: A8 TAY1E68D: B9 98E6 LDA $E698,Y1E690: 85 80 STA $801E692: B9 99E6 LDA $E699,Y1E695: 85 81 STA $81 1E697: 60 RTS ---- 1E698: Pointer table for Enemy Routines by Level (8 * 2 = 10 bytes) C8E6 -> 1E6C8 CEE6 -> 1E6CE F0E6 -> 1E6F0 CEE6 -> 1E6CE FCE6 -> 1E6FC 0AE7 -> 1E70A 14E7 -> 1E714 26E7 -> 1E726 ---- 1E6A8: Pointer table for Common Enemies Routines - Codes 00 to 0F Address offset -2 bytes FF7F -> 7FFF Weapon Item (00) (7FFF + 2 = 8001 -> 0001) 4581 -> 0145 Enemy Bullet (01) 0382 -> 0203 Weapon Box (02) 0383 -> 0303 Weapon Zeppelin (03) 7783 -> 0377 Gray Turret (04) 0686 -> 0606 Running Man (05) 4489 -> 0944 Rifle Man (06) B684 -> 04B6 Red Turret (07) B5EF -> 1EFB5 Triple Cannon (08) 32E7 -> 1E732 ? (09) 75F0 -> 1F075 Wall Plating (0A) C2F1 -> 1F1C2 Mortar Shot (0B) 39F1 -> 1F139 Scuba Diver (0C) 32E7 -> 1E732 ? (0D) BBF0 -> 1F0BB Turret Man (0E) 17F1 -> 1F117 Turret Man Bullet (0F) ---- 1E6C8: Pointer table for Level 1 Enemy Routines (2 * 3 = 6 bytes) 478B -> 0B47 Boss Bomb Turret (10) C78B -> 0BC7 Door Plate with Siren (11) 508C -> 0C50 Exploding Bridge (12) ---- 1E6CE: Pointer table for Level 2/4 Enemy Routines (11 * 2 = 22 bytes) 658E -> 0E65 Boss Eye (10) 808F -> 0F80 Rollers (11) C78F -> 0FC7 Grenades (12) 8A90 -> 108A Wall Cannon (13) 0E91 -> 110E Core (14) B892 -> 12B8 Running Guy (15) 6E93 -> 136E Jumping Guy (16) 5894 -> 1458 Seeking Guy (17) 2F95 -> 152F Group of 4 (18) 178D -> 0D17 Green Guys Generator (19) C095 -> 15C0 Rollers Generator (1A) 338F -> 0F33 Sphere Projectile (1B) F39E -> 1EF3 Boss Gemini (1C) 4FA0 -> 204F Spinning Bubbles (1D) 47A1 -> 2147 Blue Jumping Guy (1E) 58A2 -> 2258 Red Shooting Guy (1F) FCA2 -> 22FC Red/Blue Guys Generator (20) ---- 1E6F0: Pointer table for Level 3 Enemy Routines (6 * 2 = C bytes) E397 -> 17E3 Rock Platform (10) 3A98 -> 183A Moving Flame (11) 5598 -> 1855 Falling Rock Generator (12) 7B98 -> 187B Falling Rock (13) 1699 -> 1916 Level 3 Boss Mouth (14) 8A9A -> 1A8A Level 3 Boss Arm (15) ---- 1E6FC: Pointer table for Level 5 Enemy Routines (7 * 2 = E bytes) 82A3 -> 2382 Grenade Generator (10) A9A3 -> 23A9 Grenade (11) 0CA4 -> 240C Tank (12) 81A9 -> 2981 Pipe Joint (13) 98A6 -> 2698 Alien Carrier (14) EAA8 -> 28EA Flying Saucer (15) 6AA9 -> 296A Drop Bomb (16) ---- 1E70A: Pointer table for Level 6 Enemy Routines (5 * 2 = A bytes) 97A9 -> 2997 Energy Beam - Down (10) 4BAA -> 2A4B Energy Beam - Left (11) 9AAA -> 2A9A Energy Beam - Right (12) 7DAB -> 2B7D Boss Robot (13) 40AE -> 2E40 Spiked Disk Projectile (14) ---- 1E714: Pointer table for Level 7 Enemy Routines (9 * 2 = 12 bytes) B9AE -> 2EB9 Mechanical Claw (10) C8AF -> 2FC8 Raising Spiked Wall (11) F9B0 -> 30F9 Spiked Wall (12) 1CB1 -> 311C Cart Generator (13) 78B1 -> 3178 Cart - Moving (14) D7B1 -> 31D7 Cart - Immobile (15) 01B2 -> 3201 Armored Door with Siren (16) 72B2 -> 3272 Mortar Launcher (17) 2CB3 -> 332C Enemy Generator (18) ---- 1E726: Pointer table for Level 8 Enemy Routines (6 * 2 = C bytes) 22B4 -> 3422 Alien Guardian (10) E0B6 -> 36E0 Alien Foetus (11) F4B7 -> 37F4 Alien Mouth (12) 66B8 -> 3866 White Sentient Blob (13) 29BA -> 3A29 Alien Spider (14) B5BB -> 3BB5 Spider Spawn (15) 80BC -> 3C80 Heart (16) ---- 36E7 -> 1E736 Nothing ---- 1E736: 60 RTS ---- 1E737: 20 4BE7 JSR $E74B 1E73A: A9 00 LDA #$00 ; A = 00 1E73C: 9D 6805 STA $0568,X ; Enemy Animation Frame Code 1E73F: 60 RTS ---- 1E740: 20 83C1 JSR $C183 1E743: A9 57 LDA #$57 ; A = 57 (57 = Big Blast with Echo) 1E745: 20 EAEA JSR $EAEA ; Play Sound and Initiate Auto-Move 1E748: 20 E5E9 JSR $E9E5 ; Destroy All Enemies 1E74B: BD 9805 LDA $0598,X1E74E: 09 81 ORA #$81 ; set bits x... ...x1E750: D0 0C BNE $1E75E 1E752: A9 0D LDA #$0D ; A = 0D1E754: 9D 8805 STA $0588,X1E757: BD 9805 LDA $0598,X1E75A: 29 BE AND #$BE ; keep bits x.xx xxx.1E75C: 09 80 ORA #$80 ; set bits x... .... 1E75E: 9D 9805 STA $0598,X1E761: 29 02 AND #$02 ; keep bits .... ..x.1E763: F0 05 BEQ $1E76A 1E765: A9 19 LDA #$19 ; A = 19 (19 = Soldier Explode)1E767: 20 6BC1 JSR $C16B ; Play Sound 1E76A: BD 5803 LDA $0358,X ; Enemy Sprite Attributes1E76D: 29 FC AND #$FC ; keep bits xxxx xx..1E76F: 09 06 ORA #$06 ; set bits .... .xx.1E771: 9D 5803 STA $0358,X1E774: BD 0A03 LDA $030A,X1E777: D0 03 BNE $1E77C 1E779: 4C 09E8 JMP $E809 ; Remove Enemy ---- 1E77C: A9 FF LDA #$FF ; A = FF1E77E: 9D 6805 STA $0568,X ; Enemy Animation Frame Code1E781: A9 01 LDA #$01 ; A = 011E783: 9D 0A03 STA $030A,X 1E786: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 1E789: A9 01 LDA #$01 ; A = 01 Set EAFD Counter and Advance to Next Routine 1E78B: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter Advance to Next Routine 1E78E: BD B804 LDA $04B8,X ; Enemy Routine Index1E791: F0 7B BEQ $1E80E 1E793: FE B804 INC $04B8,X ; Enemy Routine Index 1E796: 60 RTS ---- 1E797: BD B804 LDA $04B8,X ; Enemy Routine Index1E79A: F0 72 BEQ $1E80E 1E79C: FE B804 INC $04B8,X ; Enemy Routine Index 1E79F: A9 24 LDA #$24 ; A = 24 (24 = Medium Explosion)1E7A1: 4C 6BC1 JMP $C16B ; Play Sound ---- 1E7A4: A9 03 LDA #$03 ; A = 031E7A6: A0 02 LDY #$02 ; Y = 021E7A8: D0 12 BNE $1E7BC 1E7AA: A9 02 LDA #$02 ; A = 021E7AC: A0 03 LDY #$03 ; Y = 031E7AE: D0 0C BNE $1E7BC 1E7B0: BD 9805 LDA $0598,X1E7B3: A0 03 LDY #$03 ; Y = 031E7B5: 29 08 AND #$08 ; keep bits .... x...1E7B7: F0 01 BEQ $1E7BA 1E7B9: C8 INY 1E7BA: A9 00 LDA #$00 ; A = 00 1E7BC: 84 08 STY $081E7BE: 85 09 STA $091E7C0: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 1E7C3: BD B804 LDA $04B8,X ; Enemy Routine Index1E7C6: F0 3D BEQ $1E805 1E7C8: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter1E7CB: D0 38 BNE $1E805 1E7CD: FE 6805 INC $0568,X ; Enemy Animation Frame Code1E7D0: BC 6805 LDY $0568,X1E7D3: C4 08 CPY $081E7D5: B0 B7 BCS $1E78E ; Advance to Next Routine 1E7D7: C8 INY1E7D8: C4 08 CPY $081E7DA: 90 03 BCC $1E7DF 1E7DC: 20 07EB JSR $EB07 ; Set $0598,X to 7F 1E7DF: A9 0A LDA #$0A ; A = 0A (delay between explosion frames)1E7E1: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter1E7E4: A4 09 LDY $091E7E6: D0 08 BNE $1E7F0 1E7E8: BD 9805 LDA $0598,X1E7EB: 29 08 AND #$08 ; keep bits .... x...1E7ED: F0 01 BEQ $1E7F0 1E7EF: C8 INY 1E7F0: 98 TYA1E7F1: 0A ASL1E7F2: A8 TAY1E7F3: B9 23E8 LDA $E823,Y1E7F6: 85 0A STA $0A1E7F8: B9 24E8 LDA $E824,Y1E7FB: 85 0B STA $0B1E7FD: BC 6805 LDY $0568,X ; Enemy Animation Frame Code1E800: B1 0A LDA ($0A),Y1E802: 9D 0A03 STA $030A,X 1E805: 60 RTS ---- 1E806: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position Remove Enemy 1E809: A9 00 LDA #$00 ; A = 001E80B: 9D B804 STA $04B8,X ; Enemy Routine Index 1E80E: A9 00 LDA #$00 ; A = 001E810: 9D 0A03 STA $030A,X ; Enemy Tile Mapping Code 1E813: 60 RTS ---- 1E814: 20 0EE8 JSR $E80E ; Set Tile Mapping Code to 01E817: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- Set Routine Index to A 1E81A: BC B804 LDY $04B8,X ; Enemy Routine Index1E81D: F0 EF BEQ $1E80E 1E81F: 9D B804 STA $04B8,X ; Enemy Routine Index 1E822: 60 RTS ---- 1E823: Pointer table for Explosion Types (4 * 2 = 8 bytes) 2BE8 -> 1E82B 2EE8 -> 1E82E 32E8 -> 1E832 35E8 -> 1E835 ---- Tables for Explosions Tile Mappings (4 * 3 = C bytes) 1E82B: 38 39 3A 1E82E: 37 35 36 1E832: 37 9D 9E 1E835: 9F 36 37 ---- Apply Velocities and Scrolling Adjust 1E837: A5 41 LDA $41 ; Scrolling (H/V)1E839: F0 0F BEQ $1E84A 1E83B: 20 E2E8 JSR $E8E2 ; Apply Y Acceleration and Velocity 1E83E: C9 E8 CMP #$E81E840: B0 16 BCS $1E858 1E842: 20 0AE9 JSR $E90A ; Apply X Acceleration and Velocity 1E845: C9 08 CMP #$081E847: 90 0F BCC $1E858 1E849: 60 RTS ---- 1E84A: 20 00E9 JSR $E900 1E84D: C9 08 CMP #$081E84F: 90 07 BCC $1E858 1E851: 20 ECE8 JSR $E8EC 1E854: C9 E8 CMP #$E81E856: 90 F1 BCC $1E849 1E858: 4C 09E8 JMP $E809 ; Remove Enemy ---- 1E85B: A5 41 LDA $41 ; Scrolling (H/V)1E85D: F0 10 BEQ $1E86F 1E85F: A0 00 LDY #$00 ; Y = 001E861: BD E804 LDA $04E8,X ; Enemy Y Velocity (high byte)1E864: 18 CLC1E865: 65 68 ADC $68 1E867: 20 83E8 JSR $E8831E86A: F0 EC BEQ $1E858 1E86C: 4C 42E8 JMP $E842 ---- 1E86F: 20 00E9 JSR $E900 1E872: C9 08 CMP #$081E874: 90 0A BCC $1E880 1E876: A0 00 LDY #$00 ; Y = 001E878: BD E804 LDA $04E8,X ; Enemy Y Velocity (high byte) 1E87B: 20 83E8 JSR $E8831E87E: D0 38 BNE $1E8B8 1E880: 4C 09E8 JMP $E809 ; Remove Enemy ---- Related to Weapon Item 1E883: 10 01 BPL $1E886 1E885: 88 DEY 1E886: 84 01 STY $011E888: 85 00 STA $001E88A: BD C804 LDA $04C8,X ; Enemy Y Acceleration1E88D: 18 CLC1E88E: 7D F804 ADC $04F8,X ; Enemy Y Velocity (low byte)1E891: 9D C804 STA $04C8,X1E894: BD 2403 LDA $0324,X ; Enemy Y Position on Screen1E897: 65 00 ADC $001E899: 9D 2403 STA $0324,X1E89C: BD 6805 LDA $0568,X1E89F: 65 01 ADC $011E8A1: 9D 6805 STA $0568,X1E8A4: C9 01 CMP #$01 1E8A6: 60 RTS ---- Add Scrolling to Enemy Position 1E8A7: A5 41 LDA $41 ; Scrolling (H/V)1E8A9: F0 0E BEQ $1E8B9 Add Y Scrolling to Enemy Y Position 1E8AB: BD 2403 LDA $0324,X ; Enemy Y Position On Screen1E8AE: 18 CLC1E8AF: 65 68 ADC $681E8B1: 9D 2403 STA $0324,X ; Enemy Y Position On Screen1E8B4: C9 E8 CMP #$E81E8B6: B0 C8 BCS $1E880 1E8B8: 60 RTS ---- Add X Scrolling to Enemy Y Position Horizontal Scrolling Level 1E8B9: BD 3E03 LDA $033E,X ; Enemy X Position On Screen1E8BC: 38 SEC1E8BD: E5 68 SBC $681E8BF: 9D 3E03 STA $033E,X ; Enemy X Position On Screen1E8C2: C9 08 CMP #$081E8C4: 90 BA BCC $1E880 1E8C6: 60 RTS ---- 1E8C7: 20 42E8 JSR $E8421E8CA: 4C 51E8 JMP $E851 ---- Set X/Y Velocities to Zero 1E8CD: 20 D9E8 JSR $E8D9 Set Y Velocity to Zero 1E8D0: A9 00 LDA #$00 ; A = 001E8D2: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte)1E8D5: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 1E8D8: 60 RTS ---- Set X Velocity to Zero 1E8D9: A9 00 LDA #$00 ; A = 001E8DB: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte)1E8DE: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 1E8E1: 60 RTS ---- 1E8E2: 20 ECE8 JSR $E8EC ; Apply Y Acceleration and Velocity 1E8E5: 18 CLC1E8E6: 65 68 ADC $68 ; Level Scrolling1E8E8: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 1E8EB: 60 RTS ---- Apply Y Acceleration and Velocity 1E8EC: BD C804 LDA $04C8,X1E8EF: 18 CLC1E8F0: 7D F804 ADC $04F8,X1E8F3: 9D C804 STA $04C8,X1E8F6: BD 2403 LDA $0324,X1E8F9: 7D E804 ADC $04E8,X1E8FC: 9D 2403 STA $0324,X 1E8FF: 60 RTS ---- 1E900: 20 0AE9 JSR $E90A ; Apply Velocity to X Position 1E903: 38 SEC1E904: E5 68 SBC $68 ; Level Scrolling1E906: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 1E909: 60 RTS ---- Apply X Acceleration and Velocity 1E90A: BD D804 LDA $04D8,X ; Enemy X Acceleration1E90D: 18 CLC1E90E: 7D 1805 ADC $0518,X ; Enemy X Velocity (low byte)1E911: 9D D804 STA $04D8,X1E914: BD 3E03 LDA $033E,X ; Enemy X Position On Screen1E917: 7D 0805 ADC $0508,X ; Enemy X Velocity (high byte)1E91A: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 1E91D: 60 RTS ---- Reverse X Direction 1E91E: A9 00 LDA #$00 ; A = 001E920: 38 SEC1E921: FD 1805 SBC $0518,X1E924: 9D 1805 STA $0518,X 1E927: A9 00 LDA #$00 ; A = 001E929: FD 0805 SBC $0508,X1E92C: 9D 0805 STA $0508,X 1E92F: 60 RTS ---- Reverse Y Direction 1E930: A9 00 LDA #$00 ; A = 001E932: 38 SEC1E933: FD F804 SBC $04F8,X1E936: 9D F804 STA $04F8,X 1E939: A9 00 LDA #$00 ; A = 001E93B: FD E804 SBC $04E8,X1E93E: 9D E804 STA $04E8,X 1E941: 60 RTS ---- Get score according to Score Code 1E942: BD 8805 LDA $0588,X 1E945: 4A LSR 1E946: 4A LSR 1E947: 4A LSR 1E948: 4A LSR 1E949: A8 TAY 1E94A: C0 0A CPY #$0A ; Score Type A 1E94C: D0 10 BNE $1E95E 1E94E: A9 88 LDA #$88 ; A = 88 1E950: 85 00 STA $00 1E952: A9 13 LDA #$13 ; A = 13 (1388 = 5000 decimal) (500000 points) 1E954: 85 01 STA $01 1E956: A4 17 LDY $17 1E958: 20 A8C4 JSR $C4A8 1E95B: 4C 6AE9 JMP $E96A ---- 1E95E: B9 A3E9 LDA $E9A3,Y 1E961: F0 07 BEQ $1E96A 1E963: 85 00 STA $00 1E965: A4 17 LDY $17 1E967: 20 A0C4 JSR $C4A0 1E96A: A6 83 LDX $83 1E96C: BD 8805 LDA $0588,X ; Collision, Explosion Type, Score 1E96F: 29 0F AND #$0F ; keep bits .... xxxx 1E971: 9D 8805 STA $0588,X 1E974: BD 2805 LDA $0528,X ; Enemy Type 1E977: C9 10 CMP #$10 1E979: A0 10 LDY #$10 ; Y = 10 1E97B: 90 04 BCC $1E981 1E97D: A5 30 LDA $30 ; Current Level 1E97F: 0A ASL 1E980: A8 TAY 1E981: B9 ADE9 LDA $E9AD,Y 1E984: 85 08 STA $08 1E986: B9 AEE9 LDA $E9AE,Y 1E989: 85 09 STA $09 1E98B: BD 2805 LDA $0528,X ; Enemy Type 1E98E: 4A LSR 1E98F: A8 TAY 1E990: B1 08 LDA ($08),Y 1E992: B0 04 BCS $1E998 1E994: 4A LSR 1E995: 4A LSR 1E996: 4A LSR 1E997: 4A LSR 1E998: 29 0F AND #$0F ; keep bits .... xxxx 1E99A: DD B804 CMP $04B8,X ; Enemy Routine Index 1E99D: 90 03 BCC $1E9A2 1E99F: 9D B804 STA $04B8,X 1E9A2: 60 RTS ---- 1E9A3: 00 01 03 05 0A 14 1E 32 64 96 Table for Score Codes (A bytes) Type 0: 0 Type 1: 100 Type 2: 300 Type 3: 500 Type 4: 1000 Type 5: 2000 Type 6: 3000 Type 7: 5000 Type 8: 10000 Type 9: 15000 Type A is hard-coded and gives 500,000 points ---- 1E9AD: Pointer table for ? (9 * 2 = 12 bytes) BFE9 -> 1E9BF Level 1 C1E9 -> 1E9C1 Level 2 CAE9 -> 1E9CA Level 3 C1E9 -> 1E9C1 Level 4 CDE9 -> 1E9CD Level 5 D1E9 -> 1E9D1 Level 6 D4E9 -> 1E9D4 Level 7 D9E9 -> 1E9D9 Level 8 BFE9 -> 1E9BF Common Enemies (Type < 0x10) ---- 1E9BF: Table for Enemy Routine Index when Destroyed 4 bits per enemy Used for Eagle Item or when Boss is destroyed 04 Weapon Item / Enemy Bullet 53 Weapon Box / Weapon Zeppelin 75 Gray Turret / Running Man 56 Rifle Man / Red Turret 50 Triple Cannon / ? 44 Wall Plating / Mortar Shot 44 Scuba Diver / ? 43 Turret Man / Turret Man Bullet 33 Boss Bomb Turret / Door Plate with Siren 20 Exploding Bridge 43 Boss Eye / Rollers 45 Grenades / Wall Cannon 53 Core / Running Guy 33 Jumping Guy / Seeking Guy 43 Group of 4 / Green Guys Generator 33 Rollers Generator / Sphere Projectile 43 Boss Gemini / Spinning Bubbles Projectile 54 Blue Jumping Guy / Red Shooting Guy 30 Red/Blue Guys Generator 22 Rock Platform / Moving Flame 24 Falling Rock Generator / Falling Rock 65 Level 3 Boss Mouth / Level 3 Boss Arm 33 Grenade Generator / Grenade 50 Tank / Pipe Joint A5 Alien Carrier / Flying Saucer 20 Bomb Drop 00 Energy Beam Down / Energy Beam Left 07 Energy Beam Right / Boss Robot 30 Spiked Disk Projectile 05 Mechanical Claw / Raising Spiked Wall 30 Spiked Wall / Cart Generator 44 Cart Moving / Cart Immobile 35 Armored Door / Mortar Launcher 50 Enemy Generator 43 Alien Guardian / Alien Foetus 34 Alien Mouth / White Sentient Blob 63 Alien Spider / Spider Spawn 40 Heart ---- Eagle Weapon - Destroy All Enemies (with exceptions) 1E9E5: 86 10 STX $10 1E9E7: A2 0F LDX #$0F ; X = 0F 1E9E9: BD B804 LDA $04B8,X ; Enemy Routine Index 1E9EC: F0 22 BEQ $1EA10 1E9EE: BD 0A03 LDA $030A,X ; Enemy Tile Mapping Code 1E9F1: F0 1D BEQ $1EA10 1E9F3: BD 2805 LDA $0528,X ; Enemy Type 1E9F6: C9 02 CMP #$02 ; Weapon Box not affected 1E9F8: F0 16 BEQ $1EA10 1E9FA: C9 03 CMP #$03 ; Weapon Zeppelin not affected 1E9FC: F0 12 BEQ $1EA10 1E9FE: BD 7805 LDA $0578,X ; Enemy HP 1EA01: C9 F0 CMP #$F0 ; F0 = No Hit 1EA03: F0 0B BEQ $1EA10 1EA05: 20 74E9 JSR $E974 1EA08: BD A805 LDA $05A8,X ; Enemy Attributes 1EA0B: 09 80 ORA #$80 ; set bits x... .... 1EA0D: 9D A805 STA $05A8,X 1EA10: CA DEX 1EA11: 10 D6 BPL $1E9E9 1EA13: A6 10 LDX $10 1EA15: 60 RTS ---- 1EA16: 86 10 STX $10 1EA18: A2 0F LDX #$0F ; X = 0F 1EA1A: 20 09E8 JSR $E809 ; Remove Enemy 1EA1D: CA DEX 1EA1E: 10 FA BPL $1EA1A 1EA20: A6 10 LDX $10 1EA22: 60 RTS ---- 1EA23: A9 00 LDA #$00 ; A = 00 1EA25: A8 TAY 1EA26: 85 11 STA $11 1EA28: 84 14 STY $14 1EA2A: A5 12 LDA $12 1EA2C: 4A LSR 1EA2D: 29 03 AND #$03 ; keep bits .... ..xx 1EA2F: 85 00 STA $00 1EA31: A5 13 LDA $13 1EA33: 29 07 AND #$07 ; keep bits .... .xxx 1EA35: 06 12 ASL $12 1EA37: 2A ROL 1EA38: 06 12 ASL $12 1EA3A: 2A ROL 1EA3B: 06 12 ASL $12 1EA3D: 06 12 ASL $12 1EA3F: 2A ROL 1EA40: 06 12 ASL $12 1EA42: 2A ROL 1EA43: 85 04 STA $04 1EA45: A9 02 LDA #$02 ; A = 02 1EA47: 85 01 STA $01 1EA49: A5 00 LDA $00 1EA4B: 85 02 STA $02 1EA4D: 20 64EA JSR $EA64 1EA50: 46 11 LSR $11 1EA52: 46 11 LSR $11 1EA54: 46 14 LSR $14 1EA56: 46 14 LSR $14 1EA58: A5 04 LDA $04 1EA5A: 18 CLC 1EA5B: 69 04 ADC #$04 1EA5D: 85 04 STA $04 1EA5F: C6 01 DEC $01 1EA61: D0 E6 BNE $1EA49 1EA63: 60 RTS ---- 1EA64: A5 04 LDA $04 1EA66: 85 07 STA $07 1EA68: A9 01 LDA #$01 ; A = 01 1EA6A: 85 06 STA $06 1EA6C: A4 02 LDY $02 1EA6E: B9 A7EA LDA $EAA7,Y 1EA71: 85 05 STA $05 1EA73: A5 06 LDA $06 1EA75: 4A LSR 1EA76: A5 11 LDA $11 1EA78: B0 02 BCS $1EA7C 1EA7A: A5 14 LDA $14 1EA7C: 29 03 AND #$03 ; keep bits .... ..xx 1EA7E: C8 INY 1EA7F: C0 04 CPY #$04 1EA81: B0 05 BCS $1EA88 1EA83: 0A ASL 1EA84: 0A ASL 1EA85: 4C 7EEA JMP $EA7E ---- 1EA88: 85 03 STA $03 1EA8A: A4 07 LDY $07 1EA8C: B9 8006 LDA $0680,Y 1EA8F: 25 05 AND $05 1EA91: 05 03 ORA $03 1EA93: 99 8006 STA $0680,Y 1EA96: E6 02 INC $02 1EA98: A5 02 LDA $02 1EA9A: 29 03 AND #$03 ; keep bits .... ..xx 1EA9C: 85 02 STA $02 1EA9E: D0 02 BNE $1EAA2 1EAA0: E6 07 INC $07 1EAA2: C6 06 DEC $06 1EAA4: 10 C6 BPL $1EA6C 1EAA6: 60 RTS ---- 1EAA7: 3F CF F3 FC Table for Bit Masks (4 bytes) ..xx xxxx xx.. xxxx xxxx ..xx xxxx xx.. ---- 1EAAB: A9 89 LDA #$89 ; A = 89 1EAAD: 85 0A STA $0A 1EAAF: A9 09 LDA #$09 ; A = 09 1EAB1: D0 0A BNE $1EABD 1EAB3: A9 89 LDA #$89 ; A = 891EAB5: D0 02 BNE $1EAB9 1EAB7: A9 08 LDA #$08 ; A = 08 1EAB9: 85 0A STA $0A1EABB: A9 06 LDA #$06 ; A = 06 1EABD: 85 0B STA $0B1EABF: 86 10 STX $10 1EAC1: 20 CEED JSR $EDCE ; Find Next Available Enemy Slot1EAC4: D0 21 BNE $1EAE7 1EAC6: A9 02 LDA #$02 ; A = 021EAC8: 9D 2805 STA $0528,X ; Enemy Type 1EACB: 20 47EE JSR $EE47 ; Initialize Enemy Attributes 1EACE: A5 0B LDA $0B1EAD0: 9D B804 STA $04B8,X ; Enemy Routine Index1EAD3: A9 01 LDA #$01 ; A = 011EAD5: 9D 0A03 STA $030A,X ; Enemy Tile Mapping Code1EAD8: A5 0A LDA $0A1EADA: 9D 9805 STA $0598,X1EADD: A5 08 LDA $081EADF: 9D 2403 STA $0324,X ; Enemy Y Position On Screen1EAE2: A5 09 LDA $091EAE4: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 1EAE7: A6 10 LDX $10 1EAE9: 60 RTS ---- Play Sound A and Set Delay to FF 1EAEA: 20 6BC1 JSR $C16B ; Play Sound Auto-Move Delay 1EAED: A9 FF LDA #$FF ; A = FF 1EAEF: 85 2A STA $2A ; Various delays (low byte) 1EAF1: A9 01 LDA #$01 ; A = 01 1EAF3: 85 3B STA $3B ; Various delays (high byte) 1EAF5: 60 RTS ---- Set Delay to A and Remove Enemy 1EAF6: 85 2A STA $2A ; Various delays (low byte)1EAF8: A9 00 LDA #$00 ; A = 001EAFA: 85 2B STA $2B ; Various delays (high byte) 1EAFC: 4C 09E8 JMP $E809 ; Remove Enemy ---- 1EAFF: A9 01 LDA #$01 ; A = 01 1EB01: D0 06 BNE $1EB09 1EB03: A9 80 LDA #$80 ; A = 80 1EB05: D0 02 BNE $1EB09 Set Bits 0 and 4 of $598,X 1EB07: A9 81 LDA #$81 ; A = 81 1EB09: 1D 9805 ORA $0598,X1EB0C: D0 0D BNE $1EB1B 1EB0E: A9 FE LDA #$FE ; A = FE1EB10: D0 06 BNE $1EB18 1EB12: A9 7F LDA #$7F ; A = 7F1EB14: D0 02 BNE $1EB18 1EB16: A9 7E LDA #$7E ; A = 7E 1EB18: 3D 9805 AND $0598,X 1EB1B: 9D 9805 STA $0598,X 1EB1E: 60 RTS ---- Add A to Enemy Y Position on Screen 1EB1F: 18 CLC1EB20: 7D 2403 ADC $0324,X1EB23: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 1EB26: 60 RTS ---- Add A to Enemy X Position on Screen 1EB27: 18 CLC1EB28: 7D 3E03 ADC $033E,X1EB2B: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 1EB2E: 60 RTS ---- Set X/Y Position Relative to Enemy Position A for X Y for Y 1EB2F: A9 00 LDA #$00 ; A = 001EB31: A8 TAY 1EB32: 18 CLC1EB33: 7D 3E03 ADC $033E,X ; Enemy X Position On Screen1EB36: 85 09 STA $091EB38: 98 TYA1EB39: 18 CLC1EB3A: 7D 2403 ADC $0324,X ; Enemy Y Position On Screen1EB3D: 85 08 STA $08 1EB3F: 60 RTS ---- Add 10 to Y Velocity 1EB40: A9 10 LDA #$10 ; A = 10 Add A to Y Velocity 1EB42: 18 CLC1EB43: 7D F804 ADC $04F8,X1EB46: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte)1EB49: BD E804 LDA $04E8,X1EB4C: 69 00 ADC #$001EB4E: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 1EB51: 60 RTS ---- Generate Enemy at Relative Position 0,0 A = Enemy Type 1EB52: 85 0A STA $0A1EB54: A9 00 LDA #$00 ; A = 001EB56: A8 TAY Generate Enemy at Relative Position A,Y 1EB57: 84 08 STY $081EB59: 85 09 STA $091EB5B: 8A TXA1EB5C: A8 TAY 1EB5D: 20 CEED JSR $EDCE ; Find Next Available Enemy Slot 1EB60: D0 21 BNE $1EB83 1EB62: A5 0A LDA $0A 1EB64: 9D 2805 STA $0528,X ; Enemy Type 1EB67: 20 47EE JSR $EE47 1EB6A: B9 2403 LDA $0324,Y ; Enemy Y Position On Screen 1EB6D: 18 CLC 1EB6E: 65 08 ADC $08 1EB70: 9D 2403 STA $0324,X 1EB73: B9 3E03 LDA $033E,Y 1EB76: 18 CLC 1EB77: 65 09 ADC $09 1EB79: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 1EB7C: 8A TXA 1EB7D: A8 TAY 1EB7E: A6 83 LDX $83 1EB80: A9 00 LDA #$00 ; A = 00 1EB82: 60 RTS ---- 1EB83: A6 83 LDX $83 1EB85: A9 01 LDA #$01 ; A = 01 1EB87: 60 RTS ---- 1EB88: A9 04 LDA #$04 ; A = 04 (Rifle Man Y position offset) 1EB8A: 85 01 STA $011EB8C: A5 FC LDA $FC ; Vertical Scroll Offset1EB8E: 29 0F AND #$0F ; keep bits .... xxxx1EB90: 09 F0 ORA #$F0 ; set bits xxxx ....1EB92: 85 00 STA $001EB94: 18 CLC1EB95: 7D 2403 ADC $0324,X ; Enemy Y Position On Screen1EB98: 29 F0 AND #$F0 ; keep bits xxxx ....1EB9A: 38 SEC1EB9B: E5 00 SBC $001EB9D: 18 CLC1EB9E: 65 01 ADC $011EBA0: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 1EBA3: 60 RTS ---- 1EBA4: 20 08EC JSR $EC081EBA7: 4C ADEB JMP $EBAD ---- 1EBAA: 20 B5EB JSR $EBB5 ; Draw a 4x4 Tile1EBAD: 90 05 BCC $1EBB4 1EBAF: A9 01 LDA #$01 ; A = 011EBB1: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 1EBB4: 60 RTS ---- Draw a 4x4 Tile A = Tile Code 1EBB5: 85 10 STA $10 1EBB7: BD 2403 LDA $0324,X ; Enemy Y Position On Screen1EBBA: 38 SEC1EBBB: E9 0C SBC #$0C1EBBD: 90 64 BCC $1EC23 1EBBF: A8 TAY1EBC0: BD 3E03 LDA $033E,X ; Enemy X Position On Screen1EBC3: 38 SEC1EBC4: E9 0C SBC #$0C1EBC6: 90 5B BCC $1EC23 1EBC8: 20 93C1 JSR $C193 1EBCB: A6 83 LDX $83 1EBCD: 60 RTS ---- 1EBCE: 84 07 STY $07 1EBD0: 48 PHA 1EBD1: 20 B7EB JSR $EBB7 1EBD4: 68 PLA 1EBD5: B0 30 BCS $1EC07 1EBD7: 85 10 STA $10 1EBD9: A5 07 LDA $07 1EBDB: D0 07 BNE $1EBE4 1EBDD: A9 00 LDA #$00 ; A = 00 1EBDF: A0 0F LDY #$0F ; Y = 0F 1EBE1: 20 26EA JSR $EA26 1EBE4: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 1EBE7: 18 CLC 1EBE8: 69 14 ADC #$14 1EBEA: B0 37 BCS $1EC23 1EBEC: A8 TAY 1EBED: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 1EBF0: 38 SEC 1EBF1: E9 0C SBC #$0C 1EBF3: 90 2E BCC $1EC23 1EBF5: 20 93C1 JSR $C193 1EBF8: B0 0B BCS $1EC05 1EBFA: A5 07 LDA $07 1EBFC: D0 07 BNE $1EC05 1EBFE: A9 01 LDA #$01 ; A = 01 1EC00: A0 01 LDY #$01 ; Y = 01 1EC02: 20 26EA JSR $EA26 1EC05: A6 83 LDX $83 1EC07: 60 RTS ---- 1EC08: 09 80 ORA #$80 ; set bits x... .... 1EC0A: 85 10 STA $101EC0C: BD 2403 LDA $0324,X ; Enemy Y Position On Screen1EC0F: 38 SEC1EC10: E9 04 SBC #$041EC12: 90 0F BCC $1EC23 1EC14: A8 TAY1EC15: BD 3E03 LDA $033E,X ; Enemy X Position On Screen1EC18: 38 SEC1EC19: E9 04 SBC #$041EC1B: 90 06 BCC $1EC23 1EC1D: 20 A6C1 JSR $C1A6 1EC20: A6 83 LDX $83 1EC22: 60 RTS ---- 1EC23: 18 CLC1EC24: A6 83 LDX $83 1EC26: 60 RTS ---- 1EC27: A0 00 LDY #$00 ; Y = 001EC29: A9 00 LDA #$00 ; A = 00 1EC2B: 20 35EC JSR $EC35 1EC2E: 4C 8AE0 JMP $E08A ---- 1EC31: A0 00 LDY #$00 ; Y = 00 1EC33: A9 00 LDA #$00 ; A = 00 1EC35: 18 CLC1EC36: 7D 3E03 ADC $033E,X ; Enemy X Position On Screen1EC39: 85 13 STA $131EC3B: 98 TYA1EC3C: 18 CLC1EC3D: 7D 2403 ADC $0324,X ; Enemy Y Position On Screen1EC40: B0 04 BCS $1EC46 1EC42: A8 TAY 1EC43: 4C BDE0 JMP $E0BD ---- 1EC46: A9 00 LDA #$00 ; A = 001EC48: 60 RTS ---- 1EC49: A0 00 LDY #$00 ; Y = 00 1EC4B: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 1EC4E: 85 01 STA $01 1EC50: BD B805 LDA $05B8,X 1EC53: 85 03 STA $03 1EC55: BD E804 LDA $04E8,X ; Enemy Y Velocity (high byte) 1EC58: 85 04 STA $04 1EC5A: BD F804 LDA $04F8,X ; Enemy Y Velocity (low byte) 1EC5D: 85 05 STA $05 1EC5F: 20 93EC JSR $EC93 1EC62: A5 00 LDA $00 1EC64: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 1EC67: A5 01 LDA $01 1EC69: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 1EC6C: 60 RTS ---- 1EC6D: A0 00 LDY #$00 ; Y = 00 1EC6F: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 1EC72: 85 01 STA $01 1EC74: BD C805 LDA $05C8,X 1EC77: 85 03 STA $03 1EC79: BD 0805 LDA $0508,X ; Enemy X Velocity (high byte) 1EC7C: 85 04 STA $04 1EC7E: BD 1805 LDA $0518,X ; Enemy X Velocity (low byte) 1EC81: 85 05 STA $05 1EC83: 20 93EC JSR $EC93 1EC86: A5 00 LDA $00 1EC88: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 1EC8B: A5 01 LDA $01 1EC8D: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 1EC90: 60 RTS ---- 1EC91: A0 00 LDY #$00 ; Y = 00 1EC93: A5 01 LDA $01 1EC95: 38 SEC 1EC96: E5 03 SBC $03 1EC98: 85 01 STA $01 1EC9A: A9 00 LDA #$00 ; A = 00 1EC9C: E9 00 SBC #$00 1EC9E: 85 00 STA $00 1ECA0: 85 07 STA $07 1ECA2: 98 TYA 1ECA3: F0 14 BEQ $1ECB9 1ECA5: 30 09 BMI $1ECB0 1ECA7: 06 01 ASL $01 1ECA9: 26 00 ROL $00 1ECAB: 88 DEY 1ECAC: D0 F9 BNE $1ECA7 1ECAE: F0 09 BEQ $1ECB9 1ECB0: 46 07 LSR $07 1ECB2: 66 00 ROR $00 1ECB4: 66 01 ROR $01 1ECB6: C8 INY 1ECB7: D0 F7 BNE $1ECB0 1ECB9: A5 05 LDA $05 1ECBB: 38 SEC 1ECBC: E5 01 SBC $01 1ECBE: 85 01 STA $01 1ECC0: A5 04 LDA $04 1ECC2: E5 00 SBC $00 1ECC4: 85 00 STA $00 1ECC6: 60 RTS ---- 1ECC7: 20 F5EC JSR $ECF5 1ECCA: 98 TYA 1ECCB: 49 01 EOR #$01 ; flip bits .... ...x 1ECCD: 85 0C STA $0C 1ECCF: A5 08 LDA $08 1ECD1: 85 0A STA $0A 1ECD3: A5 09 LDA $09 1ECD5: 85 0B STA $0B 1ECD7: 20 0EED JSR $ED0E 1ECDA: 98 TYA 1ECDB: 49 01 EOR #$01 ; flip bits .... ...x 1ECDD: C5 0C CMP $0C 1ECDF: D0 03 BNE $1ECE4 1ECE1: 98 TYA 1ECE2: 85 0C STA $0C 1ECE4: AA TAX 1ECE5: A8 TAY 1ECE6: B5 08 LDA $08,X 1ECE8: A6 0C LDX $0C 1ECEA: D5 0A CMP $0A,X 1ECEC: 90 04 BCC $1ECF2 1ECEE: A4 0C LDY $0C 1ECF0: B5 0A LDA $0A,X 1ECF2: A6 83 LDX $83 1ECF4: 60 RTS ---- 1ECF5: AD 3403 LDA $03341ECF8: 38 SEC1ECF9: FD 3E03 SBC $033E,X ; Enemy X Position On Screen1ECFC: B0 04 BCS $1ED02 1ECFE: 49 FF EOR #$FF ; flip all bits1ED00: 69 01 ADC #$01 1ED02: 85 08 STA $081ED04: AD 3503 LDA $03351ED07: 38 SEC1ED08: FD 3E03 SBC $033E,X ; Enemy X Position On Screen 1ED0B: 4C 24ED JMP $ED24 ---- 1ED0E: AD 1A03 LDA $031A 1ED11: 38 SEC 1ED12: FD 2403 SBC $0324,X ; Enemy Y Position On Screen 1ED15: B0 04 BCS $1ED1B 1ED17: 49 FF EOR #$FF ; flip all bits 1ED19: 69 01 ADC #$01 1ED1B: 85 08 STA $08 1ED1D: AD 1B03 LDA $031B 1ED20: 38 SEC 1ED21: FD 2403 SBC $0324,X ; Enemy Y Position On Screen 1ED24: B0 04 BCS $1ED2A 1ED26: 49 FF EOR #$FF ; flip all bits1ED28: 69 01 ADC #$01 1ED2A: 85 09 STA $091ED2C: A0 FE LDY #$FE ; Y = FE1ED2E: A5 90 LDA $901ED30: C9 01 CMP #$011ED32: F0 02 BEQ $1ED36 1ED34: 84 08 STY $08 1ED36: A0 FF LDY #$FF ; Y = FF1ED38: A5 91 LDA $911ED3A: C9 01 CMP #$011ED3C: F0 02 BEQ $1ED40 1ED3E: 84 09 STY $09 1ED40: A5 09 LDA $091ED42: A0 01 LDY #$01 ; Y = 011ED44: C5 08 CMP $081ED46: 90 03 BCC $1ED4B 1ED48: 88 DEY1ED49: A5 08 LDA $08 1ED4B: 60 RTS ---- 1ED4C: A5 09 LDA $09 1ED4E: A0 06 LDY #$06 ; Y = 06 1ED50: D9 5FED CMP $ED5F,Y1ED53: 90 08 BCC $1ED5D 1ED55: 88 DEY1ED56: 30 02 BMI $1ED5A1ED58: B0 F6 BCS $1ED50 1ED5A: A9 00 LDA #$00 ; A = 00 1ED5C: 60 RTS ---- 1ED5D: 98 TYA1ED5E: 60 RTS ---- 1ED5F: FF 94 8C 84 7C 74 6C Table for ? (7 bytes) ---- 1ED66: BD C805 LDA $05C8,X1ED69: 18 CLC1ED6A: 7D E805 ADC $05E8,X1ED6D: 9D C805 STA $05C8,X1ED70: BD D805 LDA $05D8,X1ED73: 7D 5805 ADC $0558,X1ED76: 9D D805 STA $05D8,X1ED79: BD C804 LDA $04C8,X1ED7C: 18 CLC1ED7D: 7D F804 ADC $04F8,X1ED80: 9D C804 STA $04C8,X1ED83: BD B805 LDA $05B8,X1ED86: 7D E804 ADC $04E8,X1ED89: 9D B805 STA $05B8,X1ED8C: C9 F0 CMP #$F01ED8E: B0 0A BCS $1ED9A 1ED90: 18 CLC1ED91: 7D D805 ADC $05D8,X1ED94: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 1ED97: 4C 42E8 JMP $E842 ---- 1ED9A: 4C 09E8 JMP $E809 ; Remove Enemy ---- 1ED9D: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 1EDA0: 20 4EED JSR $ED4E 1EDA3: 0A ASL1EDA4: A8 TAY1EDA5: B9 BCED LDA $EDBC,Y1EDA8: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte)1EDAB: B9 BDED LDA $EDBD,Y1EDAE: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte)1EDB1: A9 00 LDA #$00 ; A = 001EDB3: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte)1EDB6: A9 01 LDA #$01 ; A = 011EDB8: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 1EDBB: 60 RTS ---- 1EDBC: Table for ? (E bytes) Two-byte values for some X Velocity AA 00 AA 170 170 / 256 = 0.66 71 00 71 113 113 / 256 = 0.44 38 00 38 56 56 / 256 = 0.22 00 00 00 0 C8 FF -38 -56 -56 / 256 = -0.22 8F FF -71 -113 -113 / 256 = -0.44 56 FF -AA -170 -170 / 256 = -0.66 ---- Find Next Available Enemy Slot (Between Slots 0 and 6) 1EDCA: A2 06 LDX #$06 ; X = 06 1EDCC: D0 02 BNE $1EDD0 Find Next Available Enemy Slot (All Slots 0-F) 1EDCE: A2 0F LDX #$0F ; X = 0F 1EDD0: BD B804 LDA $04B8,X1EDD3: F0 03 BEQ $1EDD8 1EDD5: CA DEX1EDD6: 10 F8 BPL $1EDD0 1EDD8: 60 RTS ---- 1EDD9: A2 0F LDX #$0F ; X = 0F 1EDDB: BD 2805 LDA $0528,X ; Enemy Type 1EDDE: C9 01 CMP #$01 1EDE0: F0 F6 BEQ $1EDD8 1EDE2: CA DEX 1EDE3: 10 F6 BPL $1EDDB 1EDE5: A2 00 LDX #$00 ; X = 00 1EDE7: 60 RTS ---- 1EDE8: A2 0F LDX #$0F ; X = 0F 1EDEA: 20 FCED JSR $EDFC 1EDED: CA DEX 1EDEE: 10 FA BPL $1EDEA 1EDF0: 60 RTS ---- 1EDF1: A9 00 LDA #$00 ; A = 001EDF3: 9D 0A03 STA $030A,X ; Enemy Tile Mapping Code1EDF6: F0 21 BEQ $1EE19 1EDF8: A9 00 LDA #$00 ; A = 001EDFA: F0 3E BEQ $1EE3A 1EDFC: A9 00 LDA #$00 ; A = 00 1EDFE: 9D B804 STA $04B8,X1EE01: 9D 7805 STA $0578,X1EE04: 9D 2805 STA $0528,X1EE07: 9D 0A03 STA $030A,X 1EE0A: 9D A805 STA $05A8,X1EE0D: 9D 2403 STA $0324,X1EE10: 9D 3E03 STA $033E,X1EE13: 9D C804 STA $04C8,X1EE16: 9D D804 STA $04D8,X 1EE19: 9D 5803 STA $0358,X1EE1C: 9D F804 STA $04F8,X1EE1F: 9D 1805 STA $0518,X1EE22: 9D E804 STA $04E8,X1EE25: 9D 0805 STA $0508,X1EE28: 9D 3805 STA $0538,X1EE2B: 9D 4805 STA $0548,X1EE2E: 9D 5805 STA $0558,X1EE31: 9D 6805 STA $0568,X1EE34: 9D 9805 STA $0598,X1EE37: 9D 8805 STA $0588,X 1EE3A: 9D B805 STA $05B8,X1EE3D: 9D C805 STA $05C8,X1EE40: 9D D805 STA $05D8,X1EE43: 9D E805 STA $05E8,X 1EE46: 60 RTS ---- Initialize Enemy Attributes 1EE47: A9 01 LDA #$01 ; A = 011EE49: 9D B804 STA $04B8,X ; Enemy Routine Index1EE4C: 9D 0A03 STA $030A,X ; Enemy Tile Mapping Code 1EE4F: A9 00 LDA #$00 ; A = 001EE51: 20 0AEE JSR $EE0A ; Set Many Variables to A 1EE54: 98 TYA1EE55: 48 PHA1EE56: BD 2805 LDA $0528,X ; Enemy Type1EE59: C9 10 CMP #$101EE5B: A0 10 LDY #$10 ; Y = 101EE5D: 90 04 BCC $1EE63 1EE5F: A5 30 LDA $30 ; Current Level1EE61: 0A ASL1EE62: A8 TAY 1EE63: B9 8DEE LDA $EE8D,Y1EE66: 85 8C STA $8C1EE68: B9 8EEE LDA $EE8E,Y1EE6B: 85 8D STA $8D1EE6D: BD 2805 LDA $0528,X ; Enemy Type1EE70: 0A ASL1EE71: 0A ASL1EE72: A8 TAY1EE73: B1 8C LDA ($8C),Y1EE75: 9D 9805 STA $0598,X1EE78: C8 INY1EE79: B1 8C LDA ($8C),Y1EE7B: 9D 8805 STA $0588,X1EE7E: C8 INY1EE7F: B1 8C LDA ($8C),Y1EE81: 9D 7805 STA $0578,X ; Enemy HP1EE84: C8 INY1EE85: B1 8C LDA ($8C),Y1EE87: 9D 4805 STA $0548,X1EE8A: 68 PLA1EE8B: A8 TAY 1EE8C: 60 RTS ---- 1EE8D: Pointer table for Enemy Attributes (9 * 2 = 12 bytes) 9FEE -> 1EE9F Level 1 ABEE -> 1EEAB Level 2 EFEE -> 1EEEF Level 3 ABEE -> 1EEAB Level 4 07EF -> 1EF07 Level 5 23EF -> 1EF23 Level 6 37EF -> 1EF37 Level 7 5BEF -> 1EF5B Level 8 9FEE -> 1EE9F Level 1 ---- 1EE9F: Enemy Attributes (46 * 4 = 118 bytes) Byte 0: ? (0598) (related to facing direction and/or enemy width) Byte 1: Score Code (bits 4-7), Explosion Type (bit 3), Collision Code (0588) Byte 2: Enemy HP (0578) Byte 3: ? (0548) Enemy Type < 10 82 22 01 00 Weapon Item (00) 80 00 01 00 Enemy Bullet (01) 0F 32 F0 00 Weapon Box (02) 0B 32 01 00 Weapon Zeppelin (03) 8F 22 08 00 Gray Turret (04) 83 10 01 00 Running Man (05) 83 30 01 00 Rifle Man (06) 8F 30 08 00 Red Turret (07) 0F 52 F1 00 Triple Cannon (08) 00 00 01 00 ? (09) 0F 42 F0 00 Wall Plating (0A) 8A 05 01 00 Mortar Shot (0B) 83 42 01 00 Scuba Diver (0C) 00 00 01 00 ? (0D) 0E 33 0A 00 Turret Man (0E) 80 01 01 00 Turret Man Bullet (0F) 1EEDF: Level 1 Enemies 0F 42 10 00 Boss Bomb Turret (10) 0C 82 20 00 Door Plate with Siren (11) 89 00 01 00 Exploding Bridge (12) 1EEEB: Level 2/4 Enemies 8D 02 01 00 Boss Eye (10) 2F 22 05 00 Rollers (11) 81 03 01 00 Grenades (12) 9F 35 04 00 Wall Cannon (13) 9F 05 01 00 Core (14) 13 16 01 00 Running Guy (15) 13 16 01 00 Jumping Guy (16) 13 36 01 00 Seeking Guy (17) 13 16 01 00 Group of 4 (18) 89 00 F1 00 Green Guys Generator (19) 81 00 F1 00 Rollers Generator (1A) 8F 13 02 01 Sphere Projectile (1B) 8F 02 01 00 Boss Gemini (1C) 0A 15 01 00 Spinning Bubbles Projectile (1D) 03 30 01 00 Blue Jumping Guy (1E) 03 30 01 00 Red Shooting Guy (1F) 81 00 F1 00 Red/Blue Guys Generator (20) 1EF2F: Level 3 Enemies C0 04 F0 00 Rock Platform (10) 80 02 F0 00 Moving Flame (11) 81 00 F0 00 Falling Rock Generator (12) 8F 31 05 00 Falling Rock (13) 8D 83 F1 02 Level 3 Boss Mouth (14) 0E 52 F1 00 Level 3 Boss Arm (15) 1EF47: Level 5 Enemies 81 00 F0 00 Grenade Generator (10) 81 02 F1 00 Grenade (11) 85 79 F0 00 Tank (12) 81 00 F0 00 Pipe Joint (13) 8D 93 20 00 Alien Carrier (14) 02 20 01 00 Flying Saucer (15) 0A 12 01 00 Bomb Drop (16) 1EF63: Level 6 Enemies 81 0F F0 00 Energy Beam - Down (10) 81 0F F0 00 Energy Beam - Left (11) 81 0F F0 00 Energy Beam - Right (12) 04 9D 01 02 Boss Robot (13) 80 05 01 00 Spiked Disk Projectile (14) 1EF77: Level 7 Enemies 80 0A F0 00 Mechanical Claw (10)8D 0F 10 00 Raising Spiked Wall (11) 0C 0F 10 00 Spiked Wall (12) 81 00 F0 00 Cart Generator (13) 6E 0C 03 00 Cart - Moving (14)6E 0C 03 00 Cart - Immobile (15) 0C 93 20 00 Armored Door (16) 8F 72 08 00 Mortar Launcher (17) 89 00 01 00 Enemy Generator (18) 1EF9B: Level 8 Enemies 04 78 01 02 Alien Guardian (10) 06 22 01 01 Alien Foetus (11) 06 42 01 01 Alien Mouth (12) 02 22 01 00 White Sentient Blob (13) 06 33 01 01 Alien Spider (14) 06 62 10 01 Spider Spawn (15) 04 A7 01 03 Heart (16) ---- 1EFB7: Pointer table for Triple Cannon (9 * 2 = 12 bytes) C7EF -> 1EFC7 D4EF -> 1EFD4 07F0 -> 1F007 48F0 -> 1F048 6DF0 -> 1F06D 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- 1EFC7: A9 08 LDA #$08 ; A = 08 (HP for Triple Cannon) 1EFC9: 9D B805 STA $05B8,X 1EFCC: A9 50 LDA #$50 ; A = 50 1EFCE: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 1EFD1: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 1EFD4: A5 8E LDA $8E 1EFD6: F0 14 BEQ $1EFEC 1EFD8: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 1EFDB: D0 0F BNE $1EFEC 1EFDD: 20 FCEF JSR $EFFC 1EFE0: B0 0A BCS $1EFEC 1EFE2: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 1EFE5: C9 02 CMP #$02 1EFE7: B0 04 BCS $1EFED 1EFE9: FE 6805 INC $0568,X ; Enemy Animation Frame Code 1EFEC: 60 RTS ---- 1EFED: BD B805 LDA $05B8,X 1EFF0: 9D 7805 STA $0578,X ; Store HP Temporarily 1EFF3: A9 04 LDA #$04 ; A = 04 1EFF5: 9D 5805 STA $0558,X ; Delay Between Attacks 1EFF8: A9 40 LDA #$40 ; A = 40 (delay between attack and closing) 1EFFA: D0 D2 BNE $1EFCE 1EFFC: A9 06 LDA #$06 ; A = 06 (delay between frames when open/close) 1EFFE: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 1F001: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 1F004: 4C AAEB JMP $EBAA ---- 1F007: BD 5805 LDA $0558,X ; Delay Between Attacks 1F00A: F0 21 BEQ $1F02D 1F00C: DE 5805 DEC $0558,X ; Delay Between Attacks 1F00F: D0 1C BNE $1F02D 1F011: A9 02 LDA #$02 ; A = 02 1F013: 85 16 STA $16 1F015: A4 16 LDY $16 1F017: B9 42F0 LDA $F042,Y 1F01A: A0 08 LDY #$08 ; Y = 08 1F01C: 20 32EB JSR $EB32 1F01F: A4 16 LDY $16 1F021: B9 45F0 LDA $F045,Y 1F024: A0 07 LDY #$07 ; Y = 07 1F026: 20 BFF2 JSR $F2BF 1F029: C6 16 DEC $16 1F02B: 10 E8 BPL $1F015 1F02D: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 1F030: D0 BA BNE $1EFEC 1F032: BD 7805 LDA $0578,X ; Enemy HP 1F035: 9D B805 STA $05B8,X ; Store Enemy HP while invulnerable 1F038: A9 F1 LDA #$F1 ; A = F1 (F1 = Hittable, No Damage) 1F03A: 9D 7805 STA $0578,X ; Enemy HP 1F03D: A9 06 LDA #$06 ; A = 06 1F03F: 4C CEEF JMP $EFCE ---- 1F042: F8 00 08 Table for Bullets Starting X Positions (3 bytes) 1F045: 48 46 44 Table for Bullets Type and Angle (3 bytes) ---- 1F048: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 1F04B: D0 9F BNE $1EFEC 1F04D: 20 FCEF JSR $EFFC 1F050: B0 08 BCS $1F05A 1F052: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 1F055: F0 04 BEQ $1F05B 1F057: DE 6805 DEC $0568,X ; Enemy Animation Frame Code 1F05A: 60 RTS ---- 1F05B: A5 2F LDA $2F 1F05D: C9 02 CMP #$02 ; if Weapon Strength < 2 1F05F: A9 C0 LDA #$C0 ; A = C0 (delay for Weapon Strength 0-1) 1F061: 90 02 BCC $1F065 1F063: A9 60 LDA #$60 ; A = 60 (delay for Weapon Strength 2-3) 1F065: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 1F068: A9 02 LDA #$02 ; A = 02 1F06A: 4C 1AE8 JMP $E81A ---- 1F06D: A9 05 LDA #$05 ; A = 05 (Tile Code after destruction) 1F06F: 20 B5EB JSR $EBB5 1F072: B0 E6 BCS $1F05A 1F074: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 1F077: Pointer table for Wall Plating (7 * 2 = E bytes) 85F0 -> 1F085 8AF0 -> 1F08A B0F0 -> 1F0B0 B1F0 -> 1F0B1 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- Wall Plating - Pointer 0 1F085: A9 80 LDA #$80 ; A = 80 (delay before deployment) 1F087: 4C CEEF JMP $EFCE ---- Wall Plating - Pointer 1 1F08A: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 1F08D: D0 21 BNE $1F0B0 1F08F: A9 04 LDA #$04 ; A = 04 (delay between frames when deploying) 1F091: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 1F094: BD 6805 LDA $0568,X ; Enemy Animation Frame Code 1F097: 18 CLC 1F098: 69 03 ADC #$03 1F09A: 20 AAEB JSR $EBAA 1F09D: B0 11 BCS $1F0B0 1F09F: FE 6805 INC $0568,X ; Enemy Animation Frame Code 1F0A2: BD 6805 LDA $0568,X 1F0A5: C9 02 CMP #$02 1F0A7: 90 07 BCC $1F0B0 1F0A9: A9 0A LDA #$0A ; A = 0A (HP for Wall Plating) 1F0AB: 9D 7805 STA $0578,X ; Enemy HP 1F0AE: B0 0A BCS $1F0BA Wall Plating - Pointer 2 1F0B0: 60 RTS ---- Wall Plating - Pointer 3 1F0B1: A9 05 LDA #$05 ; A = 05 1F0B3: 20 B5EB JSR $EBB5 1F0B6: B0 F8 BCS $1F0B0 1F0B8: E6 87 INC $87 ; Number of Boss Platings Destroyed 1F0BA: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 1F0BD: Pointer table for Turret Man (6 * 2 = C bytes) C9F0 -> 1F0C9 DBF0 -> 1F0DB ECF0 -> 1F0EC 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- 1F0C9: A9 BD LDA #$BD ; A = BD 1F0CB: 9D 0A03 STA $030A,X ; Enemy Tile Mapping Code 1F0CE: BD A805 LDA $05A8,X ; Enemy Attributes 1F0D1: 0A ASL 1F0D2: 0A ASL 1F0D3: 0A ASL 1F0D4: 0A ASL 1F0D5: 18 CLC 1F0D6: 69 01 ADC #$01 Initial delay before attack is Attributes * 10 + 1 00: 0 * 10 + 1 = 1 01: 1 * 10 + 1 = 11 02: 2 * 10 + 1 = 21 03: 3 * 10 + 1 = 31 1F0D8: 4C CEEF JMP $EFCE ---- 1F0DB: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 1F0DE: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 1F0E1: D0 08 BNE $1F0EB 1F0E3: FE 0A03 INC $030A,X ; Enemy Tile Mapping Code 1F0E6: A9 05 LDA #$05 ; A = 05 (recoil delay) 1F0E8: 4C CEEF JMP $EFCE ---- 1F0EB: 60 RTS ---- 1F0EC: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 1F0EF: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 1F0F2: D0 F7 BNE $1F0EB 1F0F4: A9 0C LDA #$0C ; A = 0C (sound of Turret Man bullet) 1F0F6: 20 6BC1 JSR $C16B ; Play Sound 1F0F9: A9 0F LDA #$0F ; A = 0F (enemy code of projectile) 1F0FB: 85 0A STA $0A 1F0FD: A9 F0 LDA #$F0 ; A = F0 1F0FF: A0 FC LDY #$FC ; Y = FC 1F101: 20 57EB JSR $EB57 ; Generate Enemy (A/Y as relative offsets) 1F104: BD A805 LDA $05A8,X 1F107: 0A ASL 1F108: 0A ASL 1F109: 0A ASL 1F10A: 0A ASL 1F10B: 18 CLC 1F10C: 69 30 ADC #$30 ; delay between shots (attr. * 10 + 30) 1F10E: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter *** Game completion variations Level 0: 05A8 * 8 + 30 or 05A8 * 10 + 40 (or other value) Level 1: 05A8 * 10 + 30 normal Level 2: 05A8 * 10 + 10 fast (or 18) Level 3: 05A8 * 10 + Random random aspect (random between 8 and 28) -- Turret Man - Random delay between shots 05A8 * 10 + Random (between 4 and 24) 1F10B: 20 50F6 JSR $F650 -- F650: 9D 3805 STA $0538,X F653: A5 34 LDA $34 ; Randomizer F655: 29 1F AND #$1F ; keep bits ...x xxxx F?57: 18 CLC F658: 09 04 ORA #$04 F65A: 7D 3805 ADC $0538,X F65D: 60 RTS *** 1F111: DE 0A03 DEC $030A,X ; Enemy Tile Mapping Code 1F114: A9 02 LDA #$02 ; A = 02 1F116: 4C 1AE8 JMP $E81A ---- 1F119: Pointer table for Turret Man Bullet (3 * 2 = 6 bytes) 1FF1 -> 1F11F 31F1 -> 1F131 09E8 -> 1E809 Remove Enemy ---- Turret Man Bullet - Pointer 1 1F11F: A9 FD LDA #$FD ; A = FD 1F121: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 1F124: A9 80 LDA #$80 ; A = 80 1F126: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 1F129: A9 1F LDA #$1F ; A = 1F 1F12B: 9D 0A03 STA $030A,X ; Enemy Sprite Code *** bridge here to randomize bullet velocity and/or type *** Slight randomization without bridge: 1F124: A5 34 LDA $34 -- 1E = Regular White Bullet 1F = S Weapon Like Projectile (default) 22 = F Weapon Fireball (looks cool) 23 = Vertical Laser (cool) 24 = Horizontal Laser (good) 27-28 = Running Man (funny!) 29 = Rifle Man 2C = Glitched (but cool) Rifle Man 2F = S Weapon Item 30 = B Weapon Item *** 1F12E: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- Turret Man Bullet - Pointer 2 1F131: BD 3E03 LDA $033E,X ; Enemy X Position On Screen 1F134: C9 F0 CMP #$F0 1F136: B0 F6 BCS $1F12E 1F138: 4C 37E8 JMP $E837 ; Apply Velocities and Scrolling Adjust ---- 1F13B: Pointer table for Scuba Diver (6 * 2 = C bytes) 47F1 -> 1F147 4CF1 -> 1F14C 83F1 -> 1F183 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 ---- 1F147: A9 80 LDA #$80 ; A = 80 (delay before first attack) 1F149: 4C CEEF JMP $EFCE ; Set EAFD Counter and Advance to Next Routine ---- 1F14C: A9 4B LDA #$4B ; A = 4B 1F14E: 9D 0A03 STA $030A,X ; Enemy Tile Mapping Code 1F151: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 1F154: 0A ASL 1F155: 0A ASL 1F156: 0A ASL 1F157: 0A ASL 1F158: A9 08 LDA #$08 ; A = 08 1F15A: 90 02 BCC $1F15E 1F15C: A9 00 LDA #$00 ; A = 00 1F15E: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 1F161: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 1F164: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 1F167: D0 0C BNE $1F175 1F169: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 1F16C: C9 B8 CMP #$B8 ; if vertical, don't shoot until this height 1F16E: B0 06 BCS $1F176 1F170: A9 10 LDA #$10 ; A = 10 (vertical scrolling only) 1F172: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 1F175: 60 RTS ---- 1F176: 20 16EB JSR $EB16 1F179: A9 10 LDA #$10 ; A = 10 (delay between aim and fire) 1F17B: 9D 5805 STA $0558,X ; Delay Between Attacks 1F17E: A9 30 LDA #$30 ; A = 30 (total delay of vulnerability) 1F180: 4C CEEF JMP $EFCE ---- 1F183: A9 4C LDA #$4C ; A = 4C 1F185: 9D 0A03 STA $030A,X ; Enemy Tile Mapping Code 1F188: A9 00 LDA #$00 ; A = 00 1F18A: BC B805 LDY $05B8,X 1F18D: F0 05 BEQ $1F194 1F18F: DE B805 DEC $05B8,X 1F192: A9 08 LDA #$08 ; A = 08 (gun recoil flag) 1F194: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 1F197: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 1F19A: F0 18 BEQ $1F1B4 1F19C: DE 5805 DEC $0558,X ; Delay Between Attacks 1F19F: D0 10 BNE $1F1B1 1F1A1: A9 07 LDA #$07 ; A = 07 (recoil delay) 1F1A3: 9D B805 STA $05B8,X 1F1A6: A9 0B LDA #$0B ; A = 0B (0B = Mortar Shot) 1F1A8: 85 0A STA $0A 1F1AA: A0 E8 LDY #$E8 ; Y = E8 (Mortar initial relative Y Position) 1F1AC: A9 05 LDA #$05 ; A = 05 (Mortar initial relative X Position) *** Bridge here to change the mortar's attributes *** 1F1AE: 20 57EB JSR $EB57 ; Generate Projectile 1F1B1: 4C A7E8 JMP $E8A7 ; Add Scrolling to Enemy Position ---- 1F1B4: 20 A7E8 JSR $E8A7 ; Add Scrolling to Enemy Position 1F1B7: A9 C0 LDA #$C0 ; A = C0 (delay hidden in water) 1F1B9: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 1F1BC: 20 07EB JSR $EB07 1F1BF: A9 02 LDA #$02 ; A = 02 1F1C1: 4C 1AE8 JMP $E81A ---- 1F1C4: Pointer table for Mortar Shot (9 * 2 = 12 bytes) D6F1 -> 1F1D6 37F2 -> 1F237 6EF2 -> 1F26E 4BE7 -> 1E74B B0E7 -> 1E7B0 06E8 -> 1E806 52E7 -> 1E752 B0E7 -> 1E7B0 06E8 -> 1E806 ---- Mortar Shot Pointer 0 (Table 1F1C4) 1F1D6: A9 8A LDA #$8A ; A = 8A (type of explosion for main shot) .... ...x ? .... ..x. Mortar Sound .... .x.. ? .... x... 0 = Round Blast / 1 = Big Explosion .xxx .... ? x... .... ? 1F1D8: BC A805 LDY $05A8,X ; Enemy Attributes 1F1DB: F0 02 BEQ $1F1DF 1F1DD: A9 80 LDA #$80 ; A = 80 (type of explosion for mortars landing) 00 = Exploding Bridge Sound 01 = Exploding Bridge Sound 02 = Bigger Explosion Sound 03 = Bigger Explosion Sound 08 = Big Explosion and Exploding Bridge Sound 1F1DF: 9D 9805 STA $0598,X 1F1E2: A9 20 LDA #$20 ; A = 20 (20 = medium red sphere) 1E = White Bullet 1F = Small Red Sphere (like M Weapon) 20 = Medium Red Sphere (like S Weapon) 21 = Big Red Sphere (like Triple Cannon) 22 = Fireball (like F Weapon) 23 = Vertical Laser 24 = Horizontal Laser 1F1E4: 9D 0A03 STA $030A,X ; Enemy Tile Mapping Code 1F1E7: A9 06 LDA #$06 ; A = 06 1F1E9: 9D 5803 STA $0358,X ; Enemy Sprite Attributes 1F1EC: BD A805 LDA $05A8,X ; Enemy Attributes 1F1EF: D0 08 BNE $1F1F9 1F1F1: BD B805 LDA $05B8,X 1F1F4: F0 03 BEQ $1F1F9 1F1F6: 18 CLC 1F1F7: 69 03 ADC #$03 1F1F9: 0A ASL 1F1FA: 0A ASL 1F1FB: A8 TAY 1F1FC: B9 17F2 LDA $F217,Y 1F1FF: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte) 1F202: B9 18F2 LDA $F218,Y 1F205: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte) 1F208: B9 19F2 LDA $F219,Y 1F20B: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte) 1F20E: B9 1AF2 LDA $F21A,Y 1F211: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte) 1F214: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 1F217: Table for Mortar Velocities (20 bytes) 00 FB 00 00 ( -500 , 0 ) Straight Up Fast 00 FE 00 00 ( -200 , 0 ) Straight Up Slow 40 FE 90 00 ( -240 , 90 ) 40 FE 70 FF ( -240 , -90 )00 FB C0 FF ( -500 , -40 ) 00 FB 80 FF ( -500 , -80 ) 00 FB 40 FF ( -500 , -C0 ) 00 FB 00 FF ( -500 , -100 ) *** 5-Shot Setup 00 FB 00 00 00 FE 00 00 20 FE 90 00 20 FE 70 FF 40 FE E0 FE 40 FE 20 01 00 FB 40 FF 00 FB 00 FF Change 1F1F7: 69 03 ADC #$03 1F1F7: 69 01 ADC #$01 Change 1F271: A9 03 LDA #$03 ; A = 03 1F271: A9 03 LDA #$05 ; A = 05 ---- Mortar Shot Pointer 1 (Table 1F1C4) 1F237: 20 40EB JSR $EB40 ; Add 10 to Y Velocity 1F23A: 20 37E8 JSR $E837 ; Apply Velocities and Scrolling Adjust 1F23D: BD A805 LDA $05A8,X ; Enemy Attributes 1F240: D0 0D BNE $1F24F ; goto 1F24F if single mortar 1F242: BD E804 LDA $04E8,X ; Enemy Y Velocity (high byte) 1F245: 10 CD BPL $1F214 ; Advance to Next Routine (divisible mortar) 1F247: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 1F24A: C9 30 CMP #$30 ; Height for Mortar to divide *** Randomizable height for Mortar division *** 1F24C: 90 C6 BCC $1F214 1F24E: 60 RTS ---- Single Mortar (Attribute > 0) 1F24F: BD E804 LDA $04E8,X ; Enemy Y Velocity (high byte) 1F252: 30 FA BMI $1F24E ; if Y Velocity is positive, check for impact 1F254: 20 F5EC JSR $ECF5 1F257: BD 2403 LDA $0324,X ; Enemy Y Position On Screen 1F25A: D9 1A03 CMP $031A,Y 1F25D: 90 EF BCC $1F24E 1F25F: 20 31EC JSR $EC31 1F262: F0 EA BEQ $1F24E 1F264: A9 24 LDA #$24 ; A = 24 (24 = Mortar Impact) 1F266: 20 6BC1 JSR $C16B ; Play Sound 1F269: A9 07 LDA #$07 ; A = 07 1F26B: 4C 1AE8 JMP $E81A ---- Mortar Shot Pointer 2 (Table 1F1C4) 1F26E: 20 37E8 JSR $E837 ; Apply Velocities and Scrolling Adjust *** bridge here for alternative division effects *** 1F271: A9 03 LDA #$03 ; A = 03 (number of projectiles generated) 1F273: 85 08 STA $08 1F275: 8A TXA 1F276: A8 TAY 1F277: 20 CEED JSR $EDCE ; Find Next Available Enemy Slot 1F27A: D0 1D BNE $1F299 1F27C: A9 0B LDA #$0B ; A = 0B (0B = Mortar) 1F27E: 9D 2805 STA $0528,X ; Enemy Type 1F281: 20 47EE JSR $EE47 ; Initialize Enemy Attributes 1F284: B9 3E03 LDA $033E,Y ; Enemy X Position On Screen 1F287: 9D 3E03 STA $033E,X 1F28A: B9 2403 LDA $0324,Y ; Enemy Y Position On Screen 1F28D: 9D 2403 STA $0324,X 1F290: A5 08 LDA $08 1F292: 9D A805 STA $05A8,X ; Enemy Attributes 1F295: C6 08 DEC $08 1F297: D0 DE BNE $1F277 1F299: A6 83 LDX $83 1F29B: 4C 8EE7 JMP $E78E ; Advance to Next Routine ---- 1F29E: 84 06 STY $06 1F2A0: 85 00 STA $00 1F2A2: A9 01 LDA #$01 ; A = 01 1F2A4: 85 0F STA $0F 1F2A6: A5 0A LDA $0A 1F2A8: 10 0A BPL $1F2B4 1F2AA: A5 0C LDA $0C 1F2AC: 85 0A STA $0A 1F2AE: 20 5EF5 JSR $F55E 1F2B1: 4C B7F2 JMP $F2B7 ---- 1F2B4: 20 2CF5 JSR $F52C 1F2B7: 05 00 ORA $00 1F2B9: 85 0A STA $0A 1F2BB: 4C D8F2 JMP $F2D8 ---- Bullet Generation (speed, type, etc...) A = Bullet Type and Angle Y = Bullet Speed (Enemy Attributes) 08 = Initial Y Position On Screen 09 = Initial X Position On Screen 1F2BE: 0A ASL 1F2BF: 84 06 STY $061F2C1: 85 0A STA $0A1F2C3: 29 1F AND #$1F ; keep bits ...x xxxx (keep angle value)1F2C5: A0 00 LDY #$00 ; Y = 001F2C7: C9 07 CMP #$071F2C9: 90 06 BCC $1F2D1 1F2CB: C9 12 CMP #$121F2CD: B0 02 BCS $1F2D1 1F2CF: A0 02 LDY #$02 ; Y = 02 1F2D1: C9 0D CMP #$0D1F2D3: 90 01 BCC $1F2D6 1F2D5: C8 INY 1F2D6: 84 07 STY $07 1F2D8: A5 0A LDA $0A1F2DA: 29 E0 AND #$E0 ; keep bits xxx. .... (keep type value)1F2DC: C9 20 CMP #$201F2DE: F0 04 BEQ $1F2E4 1F2E0: A5 8E LDA $8E1F2E2: F0 4B BEQ $1F32F 1F2E4: 20 CEED JSR $EDCE ; Find Next Enemy Slot1F2E7: D0 46 BNE $1F32F 1F2E9: A9 01 LDA #$01 ; A = 011F2EB: 9D 2805 STA $0528,X ; Enemy Type 1F2EE: 20 47EE JSR $EE47 ; Initialize Enemy Attributes 1F2F1: A5 0A LDA $0A1F2F3: 4A LSR1F2F4: 4A LSR1F2F5: 4A LSR1F2F6: 4A LSR1F2F7: 4A LSR1F2F8: 9D B805 STA $05B8,X1F2FB: A5 06 LDA $061F2FD: C9 07 CMP #$071F2FF: 90 02 BCC $1F303 1F301: A9 07 LDA #$07 ; A = 07 (can't have more than speed 07) 1F303: 85 06 STA $061F305: A5 08 LDA $081F307: 9D 2403 STA $0324,X ; Enemy Y Position On Screen1F30A: A5 09 LDA $091F30C: 9D 3E03 STA $033E,X ; Enemy X Position On Screen1F30F: A5 0A LDA $0A1F311: 29 1F AND #$1F ; keep bits ...x xxxx (keep angle value) 1F313: 20 34F3 JSR $F334 1F316: A5 05 LDA $051F318: 9D E804 STA $04E8,X ; Enemy Y Velocity (high byte)1F31B: A5 04 LDA $041F31D: 9D F804 STA $04F8,X ; Enemy Y Velocity (low byte)1F320: A5 0B LDA $0B 1F322: 9D 0805 STA $0508,X ; Enemy X Velocity (high byte)1F325: A5 0A LDA $0A1F327: 9D 1805 STA $0518,X ; Enemy X Velocity (low byte)1F32A: A6 83 LDX $831F32C: A9 00 LDA #$00 ; A = 00 1F32E: 60 RTS ---- No Enemy Slot Available 1F32F: A6 83 LDX $831F331: A9 01 LDA #$01 ; A = 01 1F333: 60 RTS ---- A = Angle Value 1F334: A8 TAY1F335: B9 7FF3 LDA $F37F,Y1F338: A8 TAY1F339: B9 98F3 LDA $F398,Y1F33C: 85 04 STA $041F33E: A9 00 LDA #$00 ; A = 001F340: 85 05 STA $05 1F342: 20 A5F3 JSR $F3A5 1F345: A5 04 LDA $041F347: 85 0A STA $0A1F349: A5 05 LDA $051F34B: 85 0B STA $0B1F34D: B9 97F3 LDA $F397,Y1F350: 85 04 STA $041F352: A9 00 LDA #$00 ; A = 001F354: 85 05 STA $05 1F356: 20 A5F3 JSR $F3A5 1F359: A5 07 LDA $071F35B: 4A LSR1F35C: 90 0D BCC $1F36B 1F35E: A9 00 LDA #$00 ; A = 001F360: 38 SEC1F361: E5 04 SBC $041F363: 85 04 STA $041F365: A9 00 LDA #$00 ; A = 001F367: E5 05 SBC $051F369: 85 05 STA $05 1F36B: A5 07 LDA $071F36D: 4A LSR1F36E: 4A LSR1F36F: 90 0D BCC $1F37E 1F371: A9 00 LDA #$00 ; A = 001F373: 38 SEC1F374: E5 0A SBC $0A1F376: 85 0A STA $0A1F378: A9 00 LDA #$00 ; A = 001F37A: E5 0B SBC $0B1F37C: 85 0B STA $0B 1F37E: 60 RTS ---- 1F37F: Table for Bullet Angle Indexes (19 bytes) 00 02 04 06 08 0A 0C 0A 08 06 04 02 00 02 04 06 08 0A 0C 0A 08 06 04 02 00 ---- 1F398: Table for Bullet Angle X/Y Velocities ? (D bytes) FF 42 -1 , 42 F7 80 -9 , -80 DD B5 -23 , -4B B5 DD -4B , -23 80 F7 -80 , -9 42 FF 42 , -1 00 ---- 1F3A5: A5 06 LDA $06 ; Bullet Speed (0-7)1F3A7: 29 07 AND #$07 ; keep bits .... .xxx 1F3A9: 20 57C8 JSR $C857 ; Go to Routine A in following table ---- 1F3AC: Pointer table for Bullet Speeds (9 * 2 = 12 bytes) BEF3 -> 1F3BE C3F3 -> 1F3C3 E4F3 -> 1F3E4 CAF3 -> 1F3CA D3F3 -> 1F3D3 E5F3 -> 1F3E5 F0F3 -> 1F3F0 FFF3 -> 1F3FF 15F4 -> 1F415 ---- Bullet Speed 0 1F3BE: 46 05 LSR $05 1F3C0: 66 04 ROR $04 1F3C2: 60 RTS ---- Bullet Speed 1 1F3C3: 46 05 LSR $05 1F3C5: 66 04 ROR $04 1F3C7: 4C D3F3 JMP $F3D3 ---- Bullet Speed 3 1F3CA: A5 05 LDA $05 1F3CC: 4A LSR 1F3CD: A5 04 LDA $04 1F3CF: 6A ROR 1F3D0: 4A LSR 1F3D1: 10 06 BPL $1F3D9 Bullet Speed 4 1F3D3: A5 05 LDA $05 1F3D5: 4A LSR 1F3D6: A5 04 LDA $04 1F3D8: 6A ROR 1F3D9: 18 CLC 1F3DA: 65 04 ADC $04 1F3DC: 85 04 STA $04 1F3DE: A5 05 LDA $05 1F3E0: 69 00 ADC #$00 1F3E2: 85 05 STA $05 Bullet Speed 2 1F3E4: 60 RTS ---- Bullet Speed 5 1F3E5: A5 05 LDA $05 1F3E7: 4A LSR 1F3E8: A5 04 LDA $04 1F3EA: 6A ROR 1F3EB: 85 00 STA $00 1F3ED: 4A LSR 1F3EE: 10 08 BPL $1F3F8 Bullet Speed 6 1F3F0: A5 05 LDA $05 1F3F2: 4A LSR 1F3F3: A5 04 LDA $04 1F3F5: 6A ROR 1F3F6: 85 00 STA $00 1F3F8: 4A LSR 1F3F9: 18 CLC 1F3FA: 65 00 ADC $00 1F3FC: 4C D9F3 JMP $F3D9 ---- Bullet Speed 7 1F3FF: A5 05 LDA $05 1F401: 4A LSR 1F402: A5 04 LDA $04 1F404: 6A ROR 1F405: 85 00 STA $00 1F407: 4A LSR 1F408: 85 01 STA $01 1F40A: 18 CLC 1F40B: 65 00 ADC $00 1F40D: 46 01 LSR $01 1F40F: 18 CLC 1F410: 65 01 ADC $01 1F412: 4C D9F3 JMP $F3D9 ---- Bullet Speed 8 (impossible ?) 1F415: 06 04 ASL $04 1F417: 26 05 ROL $05 1F419: 60 RTS ---- 1F41A: 20 51F4 JSR $F451 1F41D: 4C 23F4 JMP $F423 ---- 1F420: 20 4DF4 JSR $F44D 1F423: 30 26 BMI $1F44B 1F425: D0 0E BNE $1F435 1F427: FE B805 INC $05B8,X 1F42A: BD B805 LDA $05B8,X 1F42D: C5 06 CMP $06 1F42F: 90 11 BCC $1F442 1F431: A9 00 LDA #$00 ; A = 00 1F433: F0 0A BEQ $1F43F 1F435: DE B805 DEC $05B8,X 1F438: 10 08 BPL $1F442 1F43A: A5 06 LDA $06 1F43C: 38 SEC 1F43D: E9 01 SBC #$01 1F43F: 9D B805 STA $05B8,X 1F442: BD B805 LDA $05B8,X 1F445: C5 0C CMP $0C 1F447: F0 02 BEQ $1F44B 1F449: 18 CLC 1F44A: 60 RTS ---- 1F44B: 38 SEC 1F44C: 60 RTS ---- 1F44D: A9 00 LDA #$00 ; A = 001F44F: F0 02 BEQ $1F453 1F451: A9 01 LDA #$01 ; A = 011F453: 85 0F STA $0F1F455: A5 0A LDA $0A1F457: 10 0A BPL $1F463 1F459: A5 0C LDA $0C1F45B: 85 0A STA $0A 1F45D: 20 5EF5 JSR $F55E 1F460: 4C 66F4 JMP $F466 ---- 1F463: 20 2CF5 JSR $F52C 1F466: 85 0C STA $0C1F468: A5 0F LDA $0F1F46A: 4A LSR1F46B: A9 06 LDA #$06 ; A = 061F46D: A0 0C LDY #$0C ; Y = 0C1F46F: 90 04 BCC $1F475 1F471: A9 0C LDA #$0C ; A = 0C1F473: A0 18 LDY #$18 ; Y = 18 1F475: 85 05 STA $051F477: 84 06 STY $061F479: A5 07 LDA $071F47B: 29 02 AND #$02 ; keep bits .... ..x.1F47D: F0 07 BEQ $1F486 1F47F: A5 05 LDA $051F481: 38 SEC1F482: E5 0C SBC $0C1F484: 85 0C STA $0C 1F486: 46 07 LSR $071F488: 90 0D BCC $1F497 1F48A: A5 06 LDA $061F48C: 38 SEC1F48D: E5 0C SBC $0C1F48F: C5 06 CMP $061F491: 90 02 BCC $1F495 1F493: A9 00 LDA #$00 ; A = 001F495: 85 0C STA $0C 1F497: A9 00 LDA #$00 ; A = 001F499: 85 0E STA $0E1F49B: BD B805 LDA $05B8,X1F49E: 18 CLC1F49F: 65 05 ADC $051F4A1: C5 06 CMP $061F4A3: 90 04 BCC $1F4A9 1F4A5: E6 0E INC $0E1F4A7: E5 06 SBC $06 1F4A9: 85 0D STA $0D1F4AB: A5 0C LDA $0C1F4AD: DD B805 CMP $05B8,X1F4B0: F0 17 BEQ $1F4C9 1F4B2: A4 0E LDY $0E1F4B4: D0 0A BNE $1F4C01F4B6: 90 0E BCC $1F4C6 1F4B8: C5 0D CMP $0D1F4BA: B0 0A BCS $1F4C6 1F4BC: A9 00 LDA #$00 ; A = 001F4BE: F0 08 BEQ $1F4C8 1F4C0: B0 FA BCS $1F4BC 1F4C2: C5 0D CMP $0D 1F4C4: 90 F6 BCC $1F4BC 1F4C6: A9 01 LDA #$01 ; A = 01 1F4C8: 60 RTS ---- 1F4C9: A9 80 LDA #$80 ; A = 80 1F4CB: D0 FB BNE $1F4C8 1F4CD: 20 2FEB JSR $EB2F 1F4D0: A9 02 LDA #$02 ; A = 02 1F4D2: 85 0F STA $0F 1F4D4: 20 2CF5 JSR $F52C 1F4D7: 85 0C STA $0C 1F4D9: BC D805 LDY $05D8,X 1F4DC: A5 07 LDA $07 1F4DE: 4A LSR 1F4DF: 4A LSR 1F4E0: 90 07 BCC $1F4E9 1F4E2: A9 20 LDA #$20 ; A = 20 1F4E4: 38 SEC 1F4E5: E5 0C SBC $0C 1F4E7: 85 0C STA $0C 1F4E9: 46 07 LSR $07 1F4EB: 90 09 BCC $1F4F6 1F4ED: A9 40 LDA #$40 ; A = 40 1F4EF: 38 SEC 1F4F0: E5 0C SBC $0C 1F4F2: 29 3F AND #$3F ; keep bits ..xx xxxx 1F4F4: 85 0C STA $0C 1F4F6: A9 00 LDA #$00 ; A = 00 1F4F8: 85 0E STA $0E 1F4FA: B9 0805 LDA $0508,Y ; Enemy X Velocity (high byte) 1F4FD: 18 CLC 1F4FE: 69 20 ADC #$20 1F500: C9 40 CMP #$40 1F502: 90 04 BCC $1F508 1F504: E6 0E INC $0E 1F506: E9 40 SBC #$40 1F508: 85 0D STA $0D 1F50A: A5 0C LDA $0C 1F50C: D9 0805 CMP $0508,Y ; Enemy X Velocity (high byte) 1F50F: F0 17 BEQ $1F528 1F511: A4 0E LDY $0E 1F513: D0 0A BNE $1F51F 1F515: 90 0E BCC $1F525 1F517: C5 0D CMP $0D 1F519: B0 0A BCS $1F525 1F51B: A9 00 LDA #$00 ; A = 00 1F51D: F0 08 BEQ $1F527 1F51F: B0 FA BCS $1F51B 1F521: C5 0D CMP $0D 1F523: 90 F6 BCC $1F51B 1F525: A9 01 LDA #$01 ; A = 01 1F527: 60 RTS ---- 1F528: A9 80 LDA #$80 ; A = 80 1F52A: D0 FB BNE $1F527 1F52C: A5 0A LDA $0A1F52E: 29 01 AND #$01 ; keep bits .... ...x1F530: A8 TAY1F531: B9 9000 LDA $0090,Y1F534: C9 01 CMP #$011F536: F0 15 BEQ $1F54D 1F538: 98 TYA1F539: 49 01 EOR #$01 ; flip bits .... ...x1F53B: A8 TAY1F53C: B9 9000 LDA $0090,Y1F53F: C9 01 CMP #$011F541: F0 0A BEQ $1F54D 1F543: A9 FF LDA #$FF ; A = FF1F545: 85 0A STA $0A1F547: A9 80 LDA #$80 ; A = 801F549: 85 0B STA $0B1F54B: D0 11 BNE $1F55E 1F54D: A5 40 LDA $40 ; Outdoor/Indoor1F54F: 4A LSR1F550: A9 B0 LDA #$B0 ; A = B01F552: B0 03 BCS $1F557 1F554: B9 1A03 LDA $031A,Y 1F557: 85 0A STA $0A1F559: B9 3403 LDA $0334,Y1F55C: 85 0B STA $0B 1F55E: A0 00 LDY #$00 ; Y = 001F560: A5 0A LDA $0A1F562: 38 SEC1F563: E5 08 SBC $081F565: B0 05 BCS $1F56C 1F567: 49 FF EOR #$FF ; flip all bits1F569: 69 01 ADC #$011F56B: C8 INY 1F56C: 4A LSR1F56D: 4A LSR1F56E: 4A LSR1F56F: 4A LSR1F570: 4A LSR1F571: 85 0A STA $0A1F573: A5 0B LDA $0B1F575: 38 SEC1F576: E5 09 SBC $091F578: B0 06 BCS $1F580 1F57A: 49 FF EOR #$FF ; flip all bits1F57C: 69 01 ADC #$011F57E: C8 INY1F57F: C8 INY 1F580: 4A LSR1F581: 4A LSR1F582: 4A LSR1F583: 4A LSR1F584: 4A LSR1F585: 84 07 STY $071F587: 4A LSR1F588: 85 0B STA $0B 1F58A: 08 PHP1F58B: A5 0F LDA $0F1F58D: 0A ASL1F58E: A8 TAY1F58F: B9 ACF5 LDA $F5AC,Y1F592: 85 0C STA $0C1F594: B9 ADF5 LDA $F5AD,Y1F597: 85 0D STA $0D1F599: A5 0A LDA $0A1F59B: 0A ASL1F59C: 0A ASL1F59D: 65 0B ADC $0B1F59F: A8 TAY1F5A0: B1 0C LDA ($0C),Y1F5A2: 28 PLP1F5A3: B0 04 BCS $1F5A9 1F5A5: 4A LSR1F5A6: 4A LSR1F5A7: 4A LSR1F5A8: 4A LSR 1F5A9: 29 0F AND #$0F ; keep bits .... xxxx 1F5AB: 60 RTS ---- 1F5AC: Pointer table for ? (3 * 2 = 6 bytes) Related to Spinning Bubbles Projectile, probably B2F5 -> 1F5B2 D2F5 -> 1F5D2 F2F5 -> 1F5F2 ---- 1F5B2: Table for ? (20 bytes) 00 00 00 00 32 11 00 00 32 11 11 11 32 22 11 1133 22 11 11 33 22 22 11 33 22 22 11 33 22 22 22 ---- 1F5D2: Table for ? (20 bytes) 00 00 00 00 63 21 11 11 64 32 21 11 65 43 22 2265 44 33 22 65 54 33 32 65 54 43 33 65 54 44 33 ---- 1F5F2: Table for ? (20 bytes) 80 00 00 00 F8 53 32 21 FB 86 54 33 FD A8 75 54FE B9 87 65 FE CB 98 76 FE DB A9 87 FF DC BA 98 ---- 1F612: Unused Space (5EE bytes) ---- 1FC00 --------