Contra Bank 4 0x10000 - 0x13FFF Mapper 1 (21 00) (0010 0001 0000 0000) -------- 10000: 04 Bank Number ---- 10001: Compressed Graphics Data - Code 03 (5AD bytes) 105AE: Compressed Graphics Data - Code 04 (1F3 bytes) 107A1: Compressed Graphics Data - Code 13 (CB bytes) 1086C: Compressed Graphics Data - Code 08 (1161 bytes) 119CD: Compressed Graphics Data - Code 09 (2F bytes) 119FC: Compressed Graphics Data - Code 06 (607 bytes) 12003: Compressed Graphics Data - Code 10 / 0A (343 / 341 bytes) 12346: Compressed Graphics Data - Code 0F (A1 bytes) 123E7: Compressed Graphics Data - Code 11 (559 bytes) 12940: Compressed Graphics Data - Code 12 (ED bytes) 12A2D: Compressed Graphics Data - Code 01 (E8C bytes) ---- 138B9: A5 19 LDA $19 ; Routine Index for Ending 138BB: 20 57C8 JSR $C857 ; Go to Routine A in following table ---- 138BE: Pointer table for Ending (6 * 2 = C bytes) CAB8 -> 138CA D3B8 -> 138D3 3EB9 -> 1393E 41B9 -> 13941 Helicopter Scene E3BA -> 13AE3 Credit Roll 87BB -> 13B87 ---- 138CA: A9 08 LDA #$08 ; A = 08 138CC: 85 30 STA $30 ; Level 8 = Ending 138CE: C6 23 DEC $23 138D0: 4C FAC2 JMP $C2FA ---- 138D3: A5 40 LDA $40 ; Outdoor/Indoor 138D5: 0A ASL 138D6: A8 TAY 138D7: A6 21 LDX $21 ; Index for PPU Tile Mapping 138D9: A9 02 LDA #$02 ; A = 02 138DB: 9D 0007 STA $0700,X 138DE: A9 20 LDA #$20 ; A = 20 138E0: E8 INX 138E1: 9D 0007 STA $0700,X 138E4: A9 01 LDA #$01 ; A = 01 138E6: E8 INX 138E7: 9D 0007 STA $0700,X 138EA: B9 2FB9 LDA $B92F,Y 138ED: E8 INX 138EE: 9D 0007 STA $0700,X 138F1: B9 2EB9 LDA $B92E,Y 138F4: 18 CLC 138F5: 65 41 ADC $41 ; Scrolling (H/V) 138F7: E8 INX 138F8: 9D 0007 STA $0700,X 138FB: A0 20 LDY #$20 ; Y = 20 138FD: A9 00 LDA #$00 ; A = 00 138FF: E8 INX 13900: 9D 0007 STA $0700,X 13903: E8 INX 13904: 88 DEY 13905: D0 F9 BNE $13900 13907: 86 21 STX $21 ; Index for PPU Tile Mapping 13909: A5 40 LDA $40 ; Outdoor/Indoor 1390B: 18 CLC 1390C: 69 01 ADC #$01 1390E: C9 08 CMP #$08 13910: D0 0A BNE $1391C 13912: E6 41 INC $41 ; Scrolling (H/V) 13914: A5 41 LDA $41 13916: C9 10 CMP #$10 13918: F0 05 BEQ $1391F 1391A: A9 00 LDA #$00 ; A = 00 1391C: 85 40 STA $40 ; Outdoor/Indoor 1391E: 60 RTS ---- 1391F: A9 40 LDA #$40 ; A = 40 13921: 85 2A STA $2A ; Various delays (low byte) 13923: 20 FAC2 JSR $C2FA 13926: 20 64D0 JSR $D064 13929: A9 0C LDA #$0C ; A = 0C (load Graphics Code 0C) 1392B: 4C 04C2 JMP $C204 ---- 1392E: Table for ? (10 bytes) 00 10 00 14 00 18 00 1C 10 10 10 14 10 18 10 1C Related to Special Fade after Heart is defeated ---- 1393E: 4C FAC2 JMP $C2FA ---- 13941: 20 05D1 JSR $D105 ; Palette Modifications for Various Situations 13944: A5 2D LDA $2D ; Routine Index for Ending Scene 13946: 20 57C8 JSR $C857 ; Go to Routine A in following table ---- 13949: Pointer table for Ending Scene (3 * 2 = 6 bytes) 4FB9 -> 1394F 8FB9 -> 1398F C8BA -> 13AC8 ---- Ending Scene - Pointer 0 1394F: A9 CF LDA #$CF ; A = CF 13951: 8D 1203 STA $0312 ; Enemy 8 Sprite Code 13954: A9 C5 LDA #$C5 ; A = C5 13956: 8D 1303 STA $0313 ; Enemy 9 Sprite Code 13959: A9 FF LDA #$FF ; A = FF 1395B: 8D 1105 STA $0511 ; Enemy 9 X Velocity (high byte) 1395E: 8D F104 STA $04F1 ; Enemy 9 Y Velocity (high byte) 13961: A9 60 LDA #$60 ; A = 60 13963: 8D 2105 STA $0521 ; Enemy 9 X Velocity (low byte) 13966: A9 70 LDA #$70 ; A = 70 13968: 8D 0105 STA $0501 ; Enemy 9 Y Velocity (low byte) 1396B: A2 09 LDX #$09 ; X = 09 1396D: A0 00 LDY #$00 ; Y = 00 1396F: B9 AABA LDA $BAAA,Y 13972: 9D 3805 STA $0538,X ; Enemy Animation Frame Delay Counter 13975: B9 ABBA LDA $BAAB,Y 13978: 9D 3E03 STA $033E,X ; Enemy X Position On Screen 1397B: B9 ACBA LDA $BAAC,Y 1397E: 9D 2403 STA $0324,X ; Enemy Y Position On Screen 13981: C8 INY 13982: C8 INY 13983: C8 INY 13984: CA DEX 13985: 10 E8 BPL $1396F 13987: A9 21 LDA #$21 ; A = 21 (Helicopter Sound) 13989: 20 6BC1 JSR $C16B ; Play Sound 1398C: E6 2D INC $2D 1398E: 60 RTS ---- Ending Scene - Pointer 1 1398F: AD 1303 LDA $0313 ; Enemy 9 Sprite Code 13992: C9 01 CMP #$01 13994: F0 58 BEQ $139EE 13996: AD E104 LDA $04E1 13999: 18 CLC 1399A: 6D 2105 ADC $0521 1399D: 8D E104 STA $04E1 139A0: AD 4703 LDA $0347 139A3: 6D 1105 ADC $0511 139A6: 8D 4703 STA $0347 139A9: AD D104 LDA $04D1 139AC: 18 CLC 139AD: 6D 0105 ADC $0501 139B0: 8D D104 STA $04D1 139B3: AD 2D03 LDA $032D 139B6: 6D F104 ADC $04F1 139B9: 8D 2D03 STA $032D 139BC: B0 07 BCS $139C5 139BE: A9 01 LDA #$01 ; A = 01 139C0: 8D 1303 STA $0313 ; Enemy 9 Sprite Code 139C3: D0 29 BNE $139EE 139C5: AD 2105 LDA $0521 139C8: 18 CLC 139C9: 69 02 ADC #$02 139CB: 8D 2105 STA $0521 139CE: AD 1105 LDA $0511 139D1: 69 00 ADC #$00 139D3: 8D 1105 STA $0511 139D6: AD 4703 LDA $0347 139D9: AD 4105 LDA $0541 139DC: 4A LSR 139DD: 4A LSR 139DE: A8 TAY 139DF: B9 47BA LDA $BA47,Y 139E2: 8D 1303 STA $0313 ; Enemy 9 Sprite Code 139E5: A5 1A LDA $1A ; Permanent Frame Counter 139E7: 29 01 AND #$01 ; keep bits .... ...x 139E9: D0 36 BNE $13A21 139EB: EE 4105 INC $0541 ; Enemy 9 Animation Frame Delay Counter 139EE: A2 07 LDX #$07 ; X = 07 139F0: BD 3805 LDA $0538,X ; Enemy Animation Frame Delay Counter 139F3: D0 03 BNE $139F8 139F5: 8A TXA 139F6: F0 48 BEQ $13A40 139F8: DE 3805 DEC $0538,X ; Enemy Animation Frame Delay Counter 139FB: C9 60 CMP #$60 139FD: 90 1A BCC $13A19 139FF: C9 80 CMP #$80 13A01: B0 0B BCS $13A0E 13A03: 4A LSR 13A04: 4A LSR 13A05: 4A LSR 13A06: 29 03 AND #$03 ; keep bits .... ..xx 13A08: A8 TAY 13A09: B9 43BA LDA $BA43,Y 13A0C: D0 0D BNE $13A1B 13A0E: D0 09 BNE $13A19 13A10: A9 25 LDA #$25 ; A = 25 (Big Explosion) 13A12: 20 6BC1 JSR $C16B ; Play Sound 13A15: E0 03 CPX #$03 13A17: F0 09 BEQ $13A22 13A19: A9 00 LDA #$00 ; A = 00 13A1B: 9D 0A03 STA $030A,X 13A1E: CA DEX 13A1F: 10 CF BPL $139F0 13A21: 60 RTS ---- 13A22: A9 00 LDA #$00 ; A = 00 13A24: 8D 1203 STA $0312 13A27: 86 00 STX $00 13A29: A6 21 LDX $21 ; Index for PPU Tile Mapping 13A2B: A0 00 LDY #$00 ; Y = 00 13A2D: B9 67BA LDA $BA67,Y 13A30: 9D 0007 STA $0700,X 13A33: E8 INX 13A34: C8 INY 13A35: C0 43 CPY #$43 13A37: D0 F4 BNE $13A2D 13A39: 86 21 STX $21 13A3B: A6 00 LDX $00 13A3D: 4C 1EBA JMP $BA1E ---- 13A40: E6 2D INC $2D 13A42: 60 RTS ---- 13A43: Table for Explosions Sprite Codes (4 bytes) 37 36 35 37 ---- 13A47: Table for Helicopter Sprite Codes (20 bytes) C5 C6 C7 C5 C6 C7 C5 C6 C7 C5 C8 C9 CA CB CC CD CE CC CD CE CC CD CE CC CD CE CC CD CE CC CD CE ---- 13A67: Tile Mappings and Palette Mappings - After Destruction (43 bytes) 01 0E 04 22 29 00 00 00 00 00 00 00 00 00 00 00 00 00 00 22 49 00 00 00 00 00 00 00 00 00 70 71 72 00 00 22 69 7C 00 00 70 00 7C 74 7E 74 80 81 74 73 7F 23 DA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ---- 13AAA: Tables for Ending Scene Sprites (A * 3 = 1E bytes) Byte 0: Delay Byte 1: X Position Byte 2: Y Position 00 80 90 Helicopter 00 50 86 Mountain Peaks A8 60 8C Explosion 0 B4 98 8A Explosion 1 B8 70 94 Explosion 2 D0 50 96 Explosion 3 D3 A8 98 Explosion 4 D6 78 94 Explosion 5 DB 68 96 Explosion 6 EF 88 94 Explosion 7 ---- Ending Scene - Pointer 2 13AC8: 20 15C3 JSR $C315 13ACB: D0 15 BNE $13AE2 13ACD: A9 20 LDA #$20 ; A = 20 13ACF: 85 44 STA $44 13AD1: 20 83C1 JSR $C183 13AD4: 20 28C3 JSR $C328 ; Set Delay to 240 13AD7: A9 4A LDA #$4A ; A = 4A (End Credits Music) 13AD9: 20 6BC1 JSR $C16B ; Play Sound 13ADC: 20 A1C9 JSR $C9A1 ; Erase Name Tables 0-1 13ADF: 4C FAC2 JMP $C2FA ---- 13AE2: 60 RTS ---- 13AE3: A5 1A LDA $1A ; Permanent Frame Counter 13AE5: 29 03 AND #$03 ; keep bits .... ..xx (speed of credits text) 13AE7: D0 F9 BNE $13AE2 13AE9: E6 FC INC $FC ; Vertical Scroll Offset 13AEB: A5 FC LDA $FC 13AED: C9 F0 CMP #$F0 13AEF: D0 0A BNE $13AFB 13AF1: A9 20 LDA #$20 ; A = 20 13AF3: 85 44 STA $44 13AF5: A9 00 LDA #$00 ; A = 00 13AF7: 85 43 STA $43 13AF9: 85 FC STA $FC ; Vertical Scroll Offset 13AFB: 29 0F AND #$0F ; keep bits .... xxxx 13AFD: C9 04 CMP #$04 13AFF: F0 08 BEQ $13B09 13B01: C9 0C CMP #$0C 13B03: D0 6A BNE $13B6F 13B05: A0 00 LDY #$00 ; Y = 00 13B07: F0 06 BEQ $13B0F 13B09: A5 42 LDA $42 ; Line Index in Ending Credits 13B0B: E6 42 INC $42 13B0D: 0A ASL 13B0E: A8 TAY 13B0F: B9 95BB LDA $BB95,Y 13B12: 85 00 STA $00 13B14: B9 96BB LDA $BB96,Y 13B17: F0 57 BEQ $13B70 13B19: 85 01 STA $01 13B1B: A0 00 LDY #$00 ; Y = 00 13B1D: B1 00 LDA ($00),Y 13B1F: 85 03 STA $03 ; Number of Tiles to Draw 13B21: C8 INY 13B22: B1 00 LDA ($00),Y 13B24: 85 02 STA $02 ; Distance from Left Side of Screen 13B26: A9 20 LDA #$20 ; A = 20 13B28: 38 SEC 13B29: E5 02 SBC $02 13B2B: E5 03 SBC $03 13B2D: 85 04 STA $04 ; Remaining Spaces after Text Tiles 13B2F: A6 21 LDX $21 ; Index for PPU Tile Mapping 13B31: A9 01 LDA #$01 ; A = 01 13B33: 9D 0007 STA $0700,X 13B36: 9D 0207 STA $0702,X 13B39: A9 20 LDA #$20 ; A = 20 13B3B: E8 INX 13B3C: 9D 0007 STA $0700,X 13B3F: E8 INX 13B40: A5 44 LDA $44 13B42: E8 INX 13B43: 9D 0007 STA $0700,X 13B46: A5 43 LDA $43 13B48: E8 INX 13B49: 9D 0007 STA $0700,X 13B4C: E8 INX 13B4D: 20 79BB JSR $BB79 13B50: A5 03 LDA $03 ; Number of Tiles to Draw 13B52: F0 0B BEQ $13B5F 13B54: C8 INY 13B55: B1 00 LDA ($00),Y 13B57: 9D 0007 STA $0700,X 13B5A: C6 03 DEC $03 13B5C: E8 INX 13B5D: D0 F1 BNE $13B50 13B5F: A5 04 LDA $04 13B61: 85 02 STA $02 13B63: 20 79BB JSR $BB79 13B66: 86 21 STX $21 ; Index for PPU Tile Mapping 13B68: A2 43 LDX #$43 ; X = 43 13B6A: A9 20 LDA #$20 ; A = 20 13B6C: 20 92C8 JSR $C892 ; Advance Read Address ($00-$01) A bytes 13B6F: 60 RTS ---- Delay before returning to Intro Screen 300 = 768 frames / 60 = 12.8 seconds The timer starts roughly 1 second before the text stops scrolling 13B70: 85 2A STA $2A ; Various delays (low byte) 13B72: A9 03 LDA #$03 ; A = 03 13B74: 85 2B STA $2B ; Various delays (high byte) 13B76: 4C FAC2 JMP $C2FA ---- Draw Spaces for Line Distance from Left Side of Screen (Tile 00) 13B79: A5 02 LDA $02 13B7B: F0 F2 BEQ $13B6F 13B7D: A9 00 LDA #$00 ; A = 00 13B7F: 9D 0007 STA $0700,X 13B82: C6 02 DEC $02 13B84: E8 INX 13B85: D0 F2 BNE $13B79 13B87: 20 15C3 JSR $C315 ; Decrease Delay by 1 (return 1 when Delay is 0) 13B8A: D0 E3 BNE $13B6F ** bridge here for extra stuff at the very end ** 13B8C: A9 00 LDA #$00 ; A = 00 13B8E: 85 23 STA $23 13B90: 85 30 STA $30 ; Current Level 13B92: C6 18 DEC $18 ; Game Mode 13B94: 60 RTS *** Lets you start at any level after completing the game 13B8C: 20 E0BF JSR $BFE0 13B8F: EA NOP -- 13FE0: A9 00 LDA #$00 13FE2: 85 23 STA $23 13FE4: A9 04 LDA #$04 ; Level to start from 13FE6: 60 RTS *** ---- 13B95: Pointer table for Ending Credits (48 * 2 = 90 bytes) 27BC -> 13C27 55BD -> 13D55 CONGRATULATIONS! 67BD -> 13D67 YOU'VE DESTROYED THE VILE RED 86BD -> 13D86 FALCON AND SAVED THE UNIVERSE. A6BD -> 13DA6 CONSIDER YOURSELF A HERO. 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 29BC -> 13C29 S.T.A.F.F. 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 34BC -> 13C34 PROGRAMMERS 27BC -> 13C27 41BC -> 13C41 S.UMEZAKI 4CBC -> 13C4C S.KISHIWADA 59BC -> 13C59 66BC -> 13C66 70BC -> 13C70 27BC -> 13C27 27BC -> 13C27 79BC -> 13C79 27BC -> 13C27 8CBC -> 13C8C 96BC -> 13C96 A0BC -> 13CA0 ACBC -> 13CAC B9BC -> 13CB9 27BC -> 13C27 27BC -> 13C27 E4BC -> 13CE4 27BC -> 13C27 F4BC -> 13CF4 FFBC -> 13CFF 27BC -> 13C27 27BC -> 13C27 07BD -> 13D07 27BC -> 13C27 1ABD -> 13D1A 27BD -> 13D27 2FBD -> 13D2F 27BC -> 13C27 27BC -> 13C27 C2BC -> 13CC2 27BC -> 13C27 CFBC -> 13CCF D8BC -> 13CD8 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 3FBD -> 13D3F PRESENTED BY 27BC -> 13C27 4DBD -> 13D4D KONAMI 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 27BC -> 13C27 ---- 13C25: 00 00 End of Credits (2 bytes) 13C27: 00 20 Line Skip (2 bytes) ---- Text Table Same for Intro and Ending, except 87 (!) unique to Ending 00 = Space 30 = 0 31 = 1 32 = 2 33 = 3 34 = 4 35 = 5 36 = 6 37 = 7 38 = 8 39 = 9 40 = . 41 = A 42 = B 43 = C 44 = D 45 = E 46 = F 47 = G 48 = H 49 = I 4A = J 4B = K 4C = L 4D = M 4E = N 4F = O 50 = P 51 = Q 52 = R 53 = S 54 = T 55 = U 56 = V 57 = W 58 = X 59 = Y 5A = Z 87 = ! B0 = , C3 = © F7 = ' ---- Ending Credits Text Data Byte 0: Number of bytes to process after bytes 0-1 Byte 1: Starting X Position 13C29: 09 0B 53 00 54 00 41 00 46 00 46 S.T.A.F.F. 13C34: 0B 09 50 52 4F 47 52 41 4D 4D 45 52 53 PROGRAMMERS 13C41: 09 0B 53 40 55 4D 45 5A 41 4B 49 S.UMEZAKI 13C4C: 0B 0B 53 40 4B 49 53 48 49 57 41 44 41 S.KISHIWADA 13C59: 0B 0B 4B 40 59 41 4D 41 53 48 49 54 41 K.YAMASHITA 13C66: 08 0B 54 40 44 41 4E 4A 59 4F T.DANJYO 13C70: 07 0B 4D 40 4F 47 41 57 41 M.OGAWA 13C79: 11 09 47 52 41 50 48 49 43 00 44 45 53 49 47 4E 45 52 53 GRAPHIC DESIGNERS 13C8C: 08 0B 54 40 55 45 59 41 4D 41 T.UEYAMA 13C96: 08 0B 53 40 4D 55 52 41 4B 49 S.MURAKI 13CA0: 0A 0B 4D 40 46 55 4A 49 57 41 52 41 M.FUJIWARA 13CAC: 0B 0B 54 40 4E 49 53 48 49 4B 41 57 41 T.NISHIKAWA 13CB9: 07 0B 43 40 4F 5A 41 57 41 C.OZAWA 13CE4: 0E 09 53 4F 55 4E 44 00 43 52 45 41 54 4F 52 53 SOUND CREATORS 13CF4: 09 0B 48 40 4D 41 45 5A 41 57 41 H.MAEZAWA 13CFF: 06 0B 4B 40 53 41 44 41 K.SADA ... 13D4D: 06 0D 4B 4F 4E 41 4D 49 KONAMI ---- 13D55: Ending Story Text Data Byte 0: Number of bytes to process after bytes 0-1 Byte 1: Starting X Position 10 01 43 4F 4E 47 52 41 54 55 4C 41 54 49 4F 4E 53 87 CONGRATULATIONS! 13D67 1D 01 59 4F 55 F7 56 45 00 43 YOU'VE DESTROYED THE VILE RED 4F 4D 50 4C 45 54 45 44 00 54 48 45 00 56 49 4C 45 00 52 45 44 13D86 1E 01 46 41 4C 43 4F 4E 00 41 FALCON AND SAVED THE UNIVERSE. 4E 44 00 53 41 56 45 44 00 54 48 45 00 55 4E 49 56 45 52 53 45 40 13DA6 19 01 43 4F 4E 53 49 44 45 52 CONSIDER YOURSELF A HERO. 00 59 4F 55 52 53 45 4C 46 00 41 00 48 45 52 4F 40 ---- 13DC1: Unused Space (23F bytes) ---- // End of Bank // --------