Contra Bank 2 0x8000 - 0xBFFF Mapper 1 (21 00) (0010 0001 0000 0000) -------- 8000: 02 Bank Number ---- Level Data - Total 1013 bytes 8001: Pointer table for level 1 data (E * 2 = 1C bytes) 1D80 -> 801D 4880 -> 8048 7980 -> 8079 A780 -> 80A7 CF80 -> 80CF FC80 -> 80FC 1881 -> 8118 3281 -> 8132 4981 -> 8149 6981 -> 8169 9181 -> 8191 B081 -> 81B0 (last screen before boss) D681 -> 81D6 (boss screen) 1D80 -> 801D (first screen) ---- 801D: Level 1 Data (1E9 bytes) Each byte represents a block of 4x4 tiles Bit 7 set means the tile is repeated by the amount of bits 0-6 8x = Make x consecutive units of the following code EF = Make 6F consecutive units (max) Fx = ? ---- 8206: Pointer table for Level 2 (18 * 2 = 30 bytes) 7682 -> 8276 (0) Normal Room 0083 -> 8300 (1) 2E83 -> 832E (2) 5C83 -> 835C (3) 7682 -> 8276 (0) Normal Room 0083 -> 8300 (1) 2E83 -> 832E (2) 5C83 -> 835C (3) 7682 -> 8276 (0) Normal Room 0083 -> 8300 (1) 2E83 -> 832E (2) 5C83 -> 835C (3) D282 -> 82D2 (4) Room with Holes for Roller Rows 0083 -> 8300 (1) 2E83 -> 832E (2) 5C83 -> 835C (3) A482 -> 82A4 (5) Room with Big Core 0083 -> 8300 (1) 2E83 -> 832E (2) 5C83 -> 835C (3) 7682 -> 8276 (0) First Room again 0083 -> 8300 (1) 2E83 -> 832E (2) 5C83 -> 835C (3) ---- 8236: Pointer table for Level 4 (20 * 2 = 40 bytes) 8A83 -> 838A (0) 2C84 -> 842C (1) 6284 -> 8462 (2) 9884 -> 8498 (3) 8A83 -> 838A (0) 2C84 -> 842C (1) 6284 -> 8462 (2) 9884 -> 8498 (3) 8A83 -> 838A (0) 2C84 -> 842C (1) 6284 -> 8462 (2) 9884 -> 8498 (3) 8A83 -> 838A (0) 2C84 -> 842C (1) 6284 -> 8462 (2) 9884 -> 8498 (3) 8A83 -> 838A (0) 2C84 -> 842C (1) 6284 -> 8462 (2) 9884 -> 8498 (3) F683 -> 83F6 (4) 2C84 -> 842C (1) 6284 -> 8462 (2) 9884 -> 8498 (3) 8A83 -> 838A (0) 2C84 -> 842C (1) 6284 -> 8462 (2) 9884 -> 8498 (3) C083 -> 83C0 (5) 2C84 -> 842C (1) 6284 -> 8462 (2) 9884 -> 8498 (3) ---- 8276: Level 2 Data (114 bytes) 8276: Pointer 0 (2E bytes) 62 86 61 63 60 04 05 06 07 01 02 5E 60 08 09 69 0C 0B 03 5E 60 10 0D 6A 6F 0F 10 5E 60 15 16 14 14 12 13 5E 60 18 84 11 17 5E 5D 86 5F 5D 82A4: Pointer 5 (2E bytes) 62 86 61 63 60 04 05 06 07 01 02 5E 60 08 09 6B 6E 0B 03 5E 60 10 0D 6C 6D 0F 10 5E 60 15 16 14 14 12 13 5E 60 18 84 11 17 5E 5D 86 5F 5D 82D2: Pointer 4 (2E bytes) 62 86 61 63 60 04 05 06 07 01 02 5E 60 08 09 69 0C 0B 03 5E 60 10 0D 70 71 0F 10 5E 60 15 16 14 14 12 13 5E 60 18 84 11 17 5E 5D 86 5F 5D 8300: Pointer 1 (2E bytes) 62 86 61 63 60 5C 1D 1E 1F 20 5B 5E 60 08 21 2222 24 03 5E 60 10 25 26 26 27 10 5E 60 28 29 2A2A 2B 2C 5E 60 2D 84 2E 23 5E 5D 86 5F 5D 832E: Pointer 2 (2E bytes) 62 86 61 63 60 5C 1D 1E 1F 20 5B 5E 60 08 21 2222 24 03 5E 60 10 25 26 26 27 10 5E 60 28 29 2A2A 2B 2C 5E 60 2D 84 2E 23 5E 5D 86 5F 5D 835C: Pointer 3 (2E bytes) 62 86 61 63 60 48 58 49 4A 59 5A 5E 60 4B 4C 4D4E 4F 50 5E 60 4B 4C 51 52 4F 50 5E 60 53 54 5555 56 57 5E 60 46 84 11 47 5E 5D 86 5F 5D ---- 838A: Level 4 Data (144 bytes) 838A: Pointer 0 (36 bytes) 64 65 66 65 66 65 66 64 67 04 05 06 07 01 02 7468 08 09 69 0C 0B 03 75 67 10 0D 6A 6F 0F 10 7468 15 16 14 14 12 13 75 67 18 84 11 17 74 64 7273 72 73 72 73 64 83C0: Pointer 5 (36 bytes) 64 65 66 65 66 65 66 64 67 04 05 06 07 01 02 7468 08 09 6B 6E 0B 03 75 67 10 0D 6C 6D 0F 10 7468 15 16 14 14 12 13 75 67 18 84 11 17 74 64 7273 72 73 72 73 64 83F6: Pointer 4 (36 bytes) 64 65 66 65 66 65 66 64 67 04 05 06 07 01 02 7468 08 09 69 0C 0B 03 75 67 10 0D 70 71 0F 10 7468 15 16 14 14 12 13 75 67 18 84 11 17 74 64 7273 72 73 72 73 64 842C: Pointer 1 (36 bytes) 64 65 66 65 66 65 66 64 67 5C 1D 1E 1F 20 5B 7468 08 21 22 22 24 03 75 67 10 25 26 26 27 10 7468 28 29 2A 2A 2B 2C 75 67 2D 84 2E 23 74 64 7273 72 73 72 73 64 8462: Pointer 2 (36 bytes) 64 65 66 65 66 65 66 64 67 2F 30 31 32 33 34 7468 35 36 37 38 39 3A 75 67 3B 3C 3D 3E 3F 40 7468 41 42 43 43 44 45 75 67 46 84 11 47 74 64 7273 72 73 72 73 64 8498: Pointer 3 (36 bytes) 64 65 66 65 66 65 66 64 67 48 58 49 4A 59 5A 7468 4B 4C 4D 4E 4F 50 75 67 4B 4C 51 52 4F 50 7468 53 54 55 55 56 57 75 67 46 84 11 47 74 64 7273 72 73 72 73 64 ---- 84CE: Pointer table for Level 3 (A * 2 = 14 bytes) 6786 -> 8667 3586 -> 8635 0D86 -> 860D D285 -> 85D2 9985 -> 8599 5C85 -> 855C 3185 -> 8531 1585 -> 8515 E484 -> 84E4 E284 -> 84E2 Level Data blocks are stored in reverse order First pointer for top screen ---- 84E2: Level 3 Data (1AD bytes) 8667: Pointer 0 (28 bytes) 00 00 5D 5D 83 01 21 5D 00 00 5D 5D 18 16 5D 8400 5D 83 00 16 5D 5D 84 00 5D 26 83 5D 83 00 1828 16 83 5D 8B 00 88 5D 8635 (32 bytes) 84 00 0A 83 5D 16 00 00 5D 47 18 16 18 26 00 0A5D 84 00 19 01 83 5D 0A 01 21 5D 85 01 0A 18 8401 47 5D 5D 2F 16 0A 83 01 5D 18 2A 26 16 84 5D00 00 860D (28 bytes) 84 5D 84 00 16 00 00 18 84 0C 2D 16 8A 00 18 1618 16 01 21 0B 0C 2E 2D 2E 2D 5D 5D 14 85 13 8800 5B 5B 01 01 5B 83 00 85D2 (3B bytes) 4A 01 11 1A 5E 5E 0C 0C 01 01 18 17 83 00 0F 1618 2E 28 16 83 00 2D 2E 5E 5E 2D 16 84 00 07 0808 09 00 00 01 21 0F 5E 5E 28 16 4A 5D 21 11 121A 5E 2D 16 83 5B 18 0F 5C 5C 2D 8599 (39 bytes) 5D 0F 28 16 01 01 5D 0F 4A 0F 5E 2D 16 5D 18 2A18 2A 5E 5E 26 00 2F 5E 2E 84 5E 0C 5E 5E 83 000F 84 5E 16 83 00 27 83 00 26 5D 18 0C 28 16 0121 00 00 2F 5C 5C 2D 16 5B 855C (3D bytes) 4A 0B 0C 5E 5E 0D 00 5D 18 0E 83 00 27 00 00 2E19 01 21 0B 5E 0D 4A 28 16 01 21 11 12 12 15 5E26 83 5D 47 18 2A 5E 28 16 5D 00 00 2F 5E 00 2783 00 18 2A 5E 5B 0F 0D 5B 5B 00 00 0F 8531 (2B bytes) 87 04 83 06 1E 20 1F 83 04 1E 20 84 60 23 04 8760 1F 83 1D 24 84 1B 5D 4A 18 2A 84 5E 47 83 0025 83 12 5D 5B 18 0B 0E 5B 01 5B 8515 (1C bytes) 88 04 84 06 84 05 06 05 05 8A 06 83 05 84 04 8706 83 04 06 06 83 04 06 84 05 88 06 84E4 (31 bytes) 60 60 35 36 37 38 84 60 39 3A 3B 3C 83 60 3D 3E70 71 41 42 60 43 44 45 46 22 10 02 03 40 40 3031 32 33 40 40 3F 3F 30 34 6F 33 3F 3F 88 04 8806 84E2 (2 bytes) C0 60 ---- 868F: Pointer table for Level 5 (16 * 2 = 2C bytes) BB86 -> 86BB E186 -> 86E1 0087 -> 8700 3387 -> 8733 6387 -> 8763 9287 -> 8792 C687 -> 87C6 FA87 -> 87FA 2A88 -> 882A 5188 -> 8851 5588 -> 8855 5188 -> 8851 6388 -> 8863 5188 -> 8851 5588 -> 8855 5188 -> 8851 9088 -> 8890 C488 -> 88C4 EB88 -> 88EB 5188 -> 8851 0E89 -> 890E BB86 -> 86BB ---- 86BB: Level 5 Data (26A bytes) ... ---- 8925: Pointer table for Level 6 (E * 2 = 1C bytes) 4189 -> 8941 7389 -> 8973 A389 -> 89A3 D589 -> 89D5 078A -> 8A07 3D8A -> 8A3D 718A -> 8A71 A78A -> 8AA7 DA8A -> 8ADA 0E8B -> 8B0E 408B -> 8B40 648B -> 8B64 6A8B -> 8B6A 4189 -> 8941 ---- 8941: Level 6 Data (240 bytes) ... ---- 8B81: Pointer table for level 7 (10 * 2 = 20 bytes) A18B -> 8BA1 D28B -> 8BD2 F88B -> 8BF8 278C -> 8C27 588C -> 8C58 8A8C -> 8C8A A78C -> 8CA7 D78C -> 8CD7 038D -> 8D03 2A8D -> 8D2A 588D -> 8D58 828D -> 8D82 B68D -> 8DB6 EA8D -> 8DEA 108E -> 8D10 A18B -> 8BA1 ---- 8BA1: Level 7 Data (2A6 bytes) ... ---- 8E47: Pointer table for Level 8 (C * 2 = 18 bytes) 5F8E -> 8E5F 8E8E -> 8E8E B48E -> 8EB4 E78E -> 8EE7 0B8F -> 8F0B 318F -> 8F31 598F -> 8F59 888F -> 8F88 AC8F -> 8FAC D98F -> 8FD9 EF8F -> 8FEF 5F8E -> 8E5F ---- 8E5F: Level 8 Data (1B4 bytes) ... Level 8 Last Screen (24 bytes) 88 18 33 83 4C 19 6A 6A 18 84 4C 1D 4E 4D 18 85 4C 50 4F 18 84 4C 1A 17 17 18 84 35 1E 6E 6E 18 18 49 86 18 ---- 9013: Pointer table for Indoor Levels Boss Rooms (2 * 2 = 4 bytes) 1790 -> 9017 5790 -> 9057 ---- 9017: Table for Level 2 Boss Room (40 bytes) 01 02 03 09 0E 0F 10 11 04 05 06 00 00 12 0B 1307 08 4A 53 56 4A 0D 0C 07 05 59 71 65 59 0B 0A07 14 5C 6E 6B 5C 1D 0A 16 15 17 19 1C 18 1E 1F1A 1B 21 22 23 24 1B 20 00 00 00 00 00 00 00 00 ---- 9057: Table for Level 4 Boss Room (40 bytes) 2C 2D 2E 2F 3B 3C 3D 3E 30 31 32 62 5F 40 41 4230 34 35 50 68 35 44 42 37 38 4A 53 56 4A 46 4730 48 49 28 39 39 3A 42 29 2A 2B 45 36 33 27 2643 3F 3F 3F 3F 3F 3F 25 00 00 00 00 00 00 00 00 ---- 9097: Compressed Tile Mapping Data - Code 02 (1BB bytes) Intro Screen Written to the first Name Table at 0x2000 ---- 9252: Compressed Alternate Graphics Data for Level 1 (length ?) -------- AFF2: A2 01 LDX #$01 ; X = 01 AFF4: 20 FEAF JSR $AFFE AFF7: CA DEX AFF8: 10 FA BPL $AFF4 AFFA: 60 RTS ---- AFFB: 20 54B0 JSR $B054 AFFE: B5 BA LDA $BA,X B000: D0 0B BNE $B00D B002: B4 D6 LDY $D6,X B004: B5 AE LDA $AE,X B006: F0 07 BEQ $B00F B008: A5 1A LDA $1A ; Permanent Frame Counter B00A: 4A LSR B00B: 90 02 BCC $B00F B00D: A0 00 LDY #$00 ; Y = 00 B00F: 98 TYA B010: 9D 0003 STA $0300,X B013: BD 50B0 LDA $B050,X B016: B4 C8 LDY $C8,X ; Counter for Electrocution B018: F0 04 BEQ $B01E B01A: A9 02 LDA #$02 ; A = 02 B01C: D0 06 BNE $B024 B01E: B4 B0 LDY $B0,X B020: F0 12 BEQ $B034 B022: A9 04 LDA #$04 ; A = 04 B024: 85 00 STA $00 B026: A5 1A LDA $1A ; Permanent Frame Counter B028: 5D 52B0 EOR $B052,X B02B: A0 04 LDY #$04 ; Y = 04 B02D: 25 00 AND $00 B02F: F0 02 BEQ $B033 B031: A0 05 LDY #$05 ; Y = 05 B033: 98 TYA B034: B4 DA LDY $DA,X B036: 10 02 BPL $B03A B038: 09 20 ORA #$20 ; set bits ..x. .... B03A: B4 CE LDY $CE,X B03C: F0 06 BEQ $B044 B03E: C0 0C CPY #$0C B040: 90 02 BCC $B044 B042: 09 08 ORA #$08 ; set bits .... x... B044: 85 00 STA $00 B046: B5 D8 LDA $D8,X B048: 29 C8 AND #$C8 ; keep bits xx.. x... B04A: 05 00 ORA $00 B04C: 9D 4E03 STA $034E,X B04F: 60 RTS ---- B050: 00 05 00 FF Table for ? (4 bytes) ---- B054: B5 B2 LDA $B2,X B056: F0 03 BEQ $B05B B058: 4C 7AB1 JMP $B17A ---- B05B: B5 A4 LDA $A4,X B05D: F0 03 BEQ $B062 B05F: 4C 28B1 JMP $B128 ---- B062: B5 A0 LDA $A0,X B064: F0 03 BEQ $B069 B066: 4C 3BB1 JMP $B13B ---- B069: A5 40 LDA $40 ; Outdoor/Indoor B06B: F0 08 BEQ $B075 B06D: 30 03 BMI $B072 B06F: 4C A4B2 JMP $B2A4 ---- B072: 4C FFB2 JMP $B2FF ---- B075: B4 BC LDY $BC,X ; Player Animation Frame B077: C0 03 CPY #$03 B079: B0 09 BCS $B084 B07B: B9 81B0 LDA $B081,Y B07E: 4C 2AB1 JMP $B12A ---- B081: 0F 16 17 Table for ? (3 bytes) ---- B084: D0 69 BNE $B0EF B086: B4 C2 LDY $C2,X ; Player Aim Code B088: B9 BDB0 LDA $B0BD,Y B08B: D0 06 BNE $B093 B08D: B4 CE LDY $CE,X B08F: F0 02 BEQ $B093 B091: A9 01 LDA #$01 ; A = 01 B093: 0A ASL B094: A8 TAY B095: B9 C7B0 LDA $B0C7,Y B098: 85 01 STA $01 B09A: B9 C8B0 LDA $B0C8,Y B09D: 85 02 STA $02 B09F: B5 A6 LDA $A6,X B0A1: A8 TAY B0A2: B1 01 LDA ($01),Y B0A4: 95 D6 STA $D6,X B0A6: F6 9E INC $9E,X B0A8: B5 9E LDA $9E,X B0AA: 29 07 AND #$07 ; keep bits .... .xxx B0AC: D0 0C BNE $B0BA B0AE: F6 A6 INC $A6,X B0B0: B5 A6 LDA $A6,X B0B2: C9 06 CMP #$06 B0B4: 90 04 BCC $B0BA B0B6: A9 00 LDA #$00 ; A = 00 B0B8: 95 A6 STA $A6,X B0BA: 4C 2CB1 JMP $B12C ---- B0BD: 00 02 00 03 00 00 03 00 02 00 Table for ? (A bytes) ---- B0C7: Pointer table for ? (5 * 2 = A bytes) D1B0 -> B0D1 D7B0 -> B0D7 DDB0 -> B0DD E3B0 -> B0E3 E9B0 -> B0E9 ---- Tables for ? B0D1: 02 03 04 05 03 06 B0D7: 0D 0E 0F 0D 0E 0F B0DD: 10 11 12 10 11 12 B0E3: 13 14 15 13 14 15 B0E9: 51 52 53 51 52 53 ---- B0EF: F6 D2 INC $D2,X B0F1: B5 D2 LDA $D2,X B0F3: 29 07 AND #$07 ; keep bits .... .xxx B0F5: D0 0C BNE $B103 B0F7: F6 A6 INC $A6,X B0F9: B5 A6 LDA $A6,X B0FB: C9 05 CMP #$05 B0FD: 90 04 BCC $B103 B0FF: A9 04 LDA #$04 ; A = 04 B101: 95 A6 STA $A6,X B103: B5 A6 LDA $A6,X B105: 0A ASL B106: A8 TAY B107: B9 1EB1 LDA $B11E,Y B10A: 95 D6 STA $D6,X B10C: B9 1FB1 LDA $B11F,Y B10F: 95 D8 STA $D8,X B111: B5 B4 LDA $B4,X ; Player Death Flag (and more ?) B113: 29 02 AND #$02 ; keep bits .... ..x. B115: F0 06 BEQ $B11D B117: B5 D8 LDA $D8,X B119: 49 40 EOR #$40 ; flip bits .x.. .... B11B: 95 D8 STA $D8,X B11D: 60 RTS ---- B11E: 0A 00 0B 00 0A C0 0B C0 0C 00 Table for ? (A bytes) ---- B128: A9 05 LDA #$05 ; A = 05 B12A: 95 D6 STA $D6,X ; Player Animation Frame (Sprite Code) B12C: B5 D8 LDA $D8,X B12E: 29 3F AND #$3F ; keep bits ..xx xxxx B130: B4 C2 LDY $C2,X ; Player Aim Code B132: C0 05 CPY #$05 B134: 90 02 BCC $B138 B136: 09 40 ORA #$40 ; set bits .x.. .... B138: 95 D8 STA $D8,X B13A: 60 RTS ---- B13B: B5 A0 LDA $A0,X B13D: 0A ASL B13E: A9 00 LDA #$00 ; A = 00 B140: 90 02 BCC $B144 B142: A9 40 LDA #$40 ; A = 40 B144: 85 08 STA $08 B146: B5 D8 LDA $D8,X B148: 29 3F AND #$3F ; keep bits ..xx xxxx B14A: B4 A6 LDY $A6,X B14C: C0 02 CPY #$02 B14E: 90 02 BCC $B152 B150: 09 C0 ORA #$C0 ; set bits xx.. .... B152: 45 08 EOR $08 B154: 95 D8 STA $D8,X B156: B4 A6 LDY $A6,X B158: B9 76B1 LDA $B176,Y B15B: 95 D6 STA $D6,X ; Player Animation Frame (Sprite Code) B15D: F6 D2 INC $D2,X B15F: B5 D2 LDA $D2,X B161: C9 05 CMP #$05 B163: 90 10 BCC $B175 B165: A9 00 LDA #$00 ; A = 00 B167: 95 D2 STA $D2,X B169: F6 A6 INC $A6,X B16B: B5 A6 LDA $A6,X B16D: C9 04 CMP #$04 B16F: 90 02 BCC $B173 B171: A9 00 LDA #$00 ; A = 00 B173: 95 A6 STA $A6,X B175: 60 RTS ---- B176: 08 09 08 09 Table for ? (4 bytes) ---- B17A: B5 B2 LDA $B2,X ; Player Animation Frame in Water B17C: 29 04 AND #$04 ; keep bits .... .x.. B17E: D0 54 BNE $B1D4 B180: B5 B2 LDA $B2,X ; Player Animation Frame in Water B182: 29 10 AND #$10 ; keep bits ...x .... B184: D0 27 BNE $B1AD B186: A9 00 LDA #$00 ; A = 00 B188: 95 A6 STA $A6,X B18A: A9 05 LDA #$05 ; A = 05 B18C: 95 D6 STA $D6,X ; Player Animation Frame (Sprite Code) B18E: BD 1A03 LDA $031A,X ; Player Y Position on Screen B191: 18 CLC B192: 69 10 ADC #$10 B194: 9D 1A03 STA $031A,X ; Player Y Position on Screen B197: B5 C2 LDA $C2,X ; Player Aim Code B199: C9 05 CMP #$05 B19B: 90 06 BCC $B1A3 B19D: B5 B2 LDA $B2,X ; Player Animation Frame in Water B19F: 09 02 ORA #$02 ; set bits .... ..x. B1A1: 95 B2 STA $B2,X B1A3: A9 10 LDA #$10 ; A = 10 B1A5: 95 CC STA $CC,X B1A7: B5 B2 LDA $B2,X ; Player Animation Frame in Water B1A9: 09 90 ORA #$90 ; set bits x..x .... B1AB: 95 B2 STA $B2,X B1AD: A9 00 LDA #$00 ; A = 00 B1AF: 95 98 STA $98,X ; Player X Velocity B1B1: B5 CC LDA $CC,X B1B3: F0 1F BEQ $B1D4 B1B5: C9 0C CMP #$0C B1B7: B0 0C BCS $B1C5 B1B9: A9 73 LDA #$73 ; A = 73 B1BB: 95 D6 STA $D6,X ; Player Animation Frame (Sprite Code) B1BD: C9 08 CMP #$08 B1BF: B0 04 BCS $B1C5 B1C1: A9 18 LDA #$18 ; A = 18 B1C3: 95 D6 STA $D6,X ; Player Animation Frame (Sprite Code) B1C5: D6 CC DEC $CC,X B1C7: B5 B2 LDA $B2,X ; Player Animation Frame in Water B1C9: 29 02 AND #$02 ; keep bits .... ..x. B1CB: F0 06 BEQ $B1D3 B1CD: B5 D8 LDA $D8,X B1CF: 09 40 ORA #$40 ; set bits .x.. .... B1D1: 95 D8 STA $D8,X B1D3: 60 RTS ---- B1D4: B5 B2 LDA $B2,X ; Player Animation Frame in Water B1D6: 29 08 AND #$08 ; keep bits .... x... B1D8: F0 03 BEQ $B1DD B1DA: 4C 53B2 JMP $B253 ---- B1DD: B5 B2 LDA $B2,X ; Player Animation Frame in Water B1DF: 09 04 ORA #$04 ; set bits .... .x.. B1E1: 29 7F AND #$7F ; keep bits .xxx xxxx B1E3: 95 B2 STA $B2,X B1E5: B5 C2 LDA $C2,X ; Player Aim Code B1E7: 0A ASL B1E8: A8 TAY B1E9: B5 CE LDA $CE,X B1EB: F0 0B BEQ $B1F8 B1ED: B9 90B2 LDA $B290,Y B1F0: 95 D6 STA $D6,X ; Player Animation Frame (Sprite Code) B1F2: B9 91B2 LDA $B291,Y B1F5: 4C 00B2 JMP $B200 ---- B1F8: B9 7CB2 LDA $B27C,Y B1FB: 95 D6 STA $D6,X ; Player Animation Frame (Sprite Code) B1FD: B9 7DB2 LDA $B27D,Y B200: 85 01 STA $01 B202: B5 D8 LDA $D8,X B204: 29 0F AND #$0F ; keep bits .... xxxx B206: 05 01 ORA $01 B208: 95 D8 STA $D8,X B20A: A5 1A LDA $1A ; Permanent Frame Counter B20C: 29 0F AND #$0F ; keep bits .... xxxx B20E: D0 02 BNE $B212 B210: F6 A6 INC $A6,X B212: B5 A6 LDA $A6,X B214: 29 01 AND #$01 ; keep bits .... ...x B216: D0 06 BNE $B21E B218: B5 D8 LDA $D8,X B21A: 09 08 ORA #$08 ; set bits .... x... B21C: D0 04 BNE $B222 B21E: B5 D8 LDA $D8,X B220: 29 F7 AND #$F7 ; keep bits xxxx .xxx B222: 95 D8 STA $D8,X B224: BD 1A03 LDA $031A,X ; Player Y Position on Screen B227: A8 TAY B228: BD 3403 LDA $0334,X ; Player X Position on Screen B22B: 20 BBE0 JSR $E0BB B22E: C9 02 CMP #$02 B230: F0 20 BEQ $B252 B232: B5 B2 LDA $B2,X ; Player Animation Frame in Water B234: 09 88 ORA #$88 ; set bits x... x... B236: 95 B2 STA $B2,X B238: A9 0C LDA #$0C ; A = 0C B23A: 95 CC STA $CC,X B23C: A9 1A LDA #$1A ; A = 1A B23E: 95 D6 STA $D6,X ; Player Animation Frame (Sprite Code) B240: B5 C2 LDA $C2,X ; Player Aim Code B242: C9 05 CMP #$05 B244: 90 06 BCC $B24C B246: B5 B2 LDA $B2,X ; Player Animation Frame in Water B248: 09 02 ORA #$02 ; set bits .... ..x. B24A: D0 04 BNE $B250 B24C: B5 B2 LDA $B2,X ; Player Animation Frame in Water B24E: 29 FD AND #$FD ; keep bits xxxx xx.x B250: 95 B2 STA $B2,X B252: 60 RTS ---- B253: A9 06 LDA #$06 ; A = 06 B255: 95 98 STA $98,X ; Player X Velocity B257: B5 CC LDA $CC,X B259: F0 11 BEQ $B26C B25B: C9 05 CMP #$05 B25D: 90 03 BCC $B262 B25F: 4C C5B1 JMP $B1C5 ---- B262: A9 05 LDA #$05 ; A = 05 B264: 95 D6 STA $D6,X ; Player Animation Frame (Sprite Code) B266: 4C C5B1 JMP $B1C5 ---- B269: D6 CC DEC $CC,X B26B: 60 RTS ---- B26C: A9 00 LDA #$00 ; A = 00 B26E: 95 B2 STA $B2,X ; Player Animation Frame in Water B270: 95 A6 STA $A6,X B272: BD 1A03 LDA $031A,X ; Player Y Position on Screen B275: 38 SEC B276: E9 10 SBC #$10 B278: 9D 1A03 STA $031A,X B27B: 60 RTS ---- B27C: Table for ? (14 bytes) 19 00 19 00 19 00 18 00 18 00 18 40 18 40 19 40 19 40 19 40 ---- B290: Table for ? (14 bytes) 1B 00 1C 00 1D 00 18 00 18 00 18 40 18 40 1D 40 1C 40 1B 40 ---- B2A4: B5 BC LDA $BC,X B2A6: 20 57C8 JSR $C857 ; Go to Routine A in following table ---- B2A9: Pointer table for ? (8 * 2 = 10 bytes) C6B2 -> B2C6 CAB2 -> B2CA CEB2 -> B2CE B9B2 -> B2B9 B9B2 -> B2B9 D3B2 -> B2D3 ECB2 -> B2EC C2B2 -> B2C2 ---- B2B9: B5 CE LDA $CE,X B2BB: F0 02 BEQ $B2BF B2BD: A9 04 LDA #$04 ; A = 04 B2BF: 4C 93B0 JMP $B093 ---- B2C2: A9 91 LDA #$91 ; A = 91 B2C4: D0 0A BNE $B2D0 B2C6: A9 50 LDA #$50 ; A = 50 B2C8: D0 06 BNE $B2D0 B2CA: A9 55 LDA #$55 ; A = 55 B2CC: D0 02 BNE $B2D0 B2CE: A9 54 LDA #$54 ; A = 54 B2D0: 95 D6 STA $D6,X ; Player Animation Frame (Sprite Code) B2D2: 60 RTS ---- B2D3: D6 9E DEC $9E,X B2D5: 10 0B BPL $B2E2 B2D7: A9 03 LDA #$03 ; A = 03 B2D9: 20 6BC1 JSR $C16B ; Play Sound B2DC: A9 0A LDA #$0A ; A = 0A B2DE: 95 9E STA $9E,X B2E0: F6 A6 INC $A6,X B2E2: B5 A6 LDA $A6,X B2E4: 29 01 AND #$01 ; keep bits .... ...x B2E6: 18 CLC B2E7: 69 57 ADC #$57 B2E9: 95 D6 STA $D6,X ; Player Animation Frame (Sprite Code) B2EB: 60 RTS ---- B2EC: B5 D2 LDA $D2,X B2EE: C9 1B CMP #$1B B2F0: A9 56 LDA #$56 ; A = 56 B2F2: B0 04 BCS $B2F8 B2F4: F6 D2 INC $D2,X B2F6: A9 55 LDA #$55 ; A = 55 B2F8: 95 D6 STA $D6,X ; Player Animation Frame (Sprite Code) B2FA: A9 00 LDA #$00 ; A = 00 B2FC: 95 D8 STA $D8,X B2FE: 60 RTS ---- B2FF: B5 BC LDA $BC,X B301: 20 57C8 JSR $C857 ; Go to Routine A in following table ---- B304: Pointer table for ? (5 * 2 = A bytes) 0EB3 -> B30E 0EB3 -> B30E 0EB3 -> B30E 86B0 -> B086 ECB2 -> B2EC ---- B30E: B5 D8 LDA $D8,X B310: 29 3F AND #$3F ; keep bits ..xx xxxx B312: 95 D8 STA $D8,X B314: A9 50 LDA #$50 ; A = 50 B316: 95 D6 STA $D6,X ; Player Animation Frame (Sprite Code) B318: 60 RTS ---- B319: Level Headers (8 * 20 = 100 bytes) Offsets 00 : Outdoor/Indoor (0 = Outdoor ; 1 = Indoor ; FF = Indoor Boss Room) 01 : Scrolling (0 = Horizontal ; 1 = Vertical) 02-03 : Level Data Pointer 04-05 : Tile Mappings Pointer 06-07 : Palette Mappings Pointer 08 : Alternate Graphics Loading (+2) (section where they start loading) 09-0B : Tile Collision Limits 0C-0F : Palette Codes for Cycling Background Tiles 10-13 : Palette Codes for Background Tiles 14-17 : Palette Codes for Sprites 18 : Section to stop scrolling at (+2) (level length) 19 : ??? 1A-1F : Apparently unused B319: Header for Level 1 00 00 01 80 01 80 71 86 0B 06 F9 FF 05 08 05 08 02 03 04 05 00 01 22 07 0B 00 00 00 00 00 00 00 B339: Header for Level 2 01 00 06 82 18 87 78 8E 04 00 FF FF 24 28 29 2809 0A 04 24 00 01 22 2A 05 00 00 00 00 00 00 00 B359: Header for Level 3 00 01 CE 84 F8 8E 18 96 07 07 FF FF 0D 0E 0F 000B 0C 04 0D 00 01 22 07 07 00 00 00 00 00 00 00 B379: Header for Level 4 01 00 36 82 18 87 78 8E 07 00 FF FF 2E 2F 30 2F2C 2D 04 2E 00 01 22 2A 08 00 00 00 00 00 00 00 B399: Header for Level 5 00 00 8F 86 98 96 68 9D 13 20 F0 F0 62 63 62 633D 3E 04 62 00 01 22 07 13 01 00 00 00 00 00 00 B3B9: Header for Level 6 00 00 25 89 1E 9E FE A4 0B 0C DE DE 35 36 37 3833 34 04 35 00 01 22 07 0B 81 00 00 00 00 00 00 B3D9: Header for Level 7 00 00 81 8B AA A5 4A AD 0D 0E F1 F1 47 57 47 58 45 46 04 47 00 01 22 07 0D 81 00 00 00 00 00 00 B3F9: Header for Level 8 00 00 47 8E CA AD FA B4 09 05 EF EF 4C 4D 4E 4F 48 49 4A 4C 00 01 43 44 09 00 00 00 00 00 00 00 ---- B419: A5 30 LDA $30 ; Current LevelB41B: 0A ASLB41C: A8 TAYB41D: B9 13B5 LDA $B513,Y ; Levels Enemy Groups Pointer (high byte)B420: 85 08 STA $08B422: B9 14B5 LDA $B514,Y ; Levels Enemy Groups Pointer (low byte)B425: 85 09 STA $09B427: A5 64 LDA $64 ; Screen NumberB429: 0A ASLB42A: A8 TAYB42B: B1 08 LDA ($08),YB42D: 85 0A STA $0AB42F: C8 INYB430: B1 08 LDA ($08),YB432: 85 0B STA $0BB434: A5 40 LDA $40 ; Outdoor/Indoor (0 = Outdoor ; 1 = Indoor)B436: F0 03 BEQ $B43B B438: 4C AFB4 JMP $B4AF ---- Outdoor B43B: A4 82 LDY $82 ; Offset for Enemy DataB43D: B1 0A LDA ($0A),YB43F: C9 FF CMP #$FFB441: F0 6B BEQ $B4AE B443: 85 0F STA $0FB445: 29 FE AND #$FE ; keep bits xxxx xxx.B447: 38 SECB448: E5 65 SBC $65 ; Scrolling Offset (outdoor)B44A: F0 06 BEQ $B452B44C: B0 60 BCS $B4AE B44E: 49 FF EOR #$FF ; flip all bitsB450: 69 01 ADC #$01 B452: 85 0E STA $0EB454: C8 INYB455: B1 0A LDA ($0A),YB457: AA TAXB458: 29 3F AND #$3F ; keep bits ..xx xxxx (Enemy Type)B45A: 85 08 STA $08B45C: 8A TXAB45D: 2A ROLB45E: 2A ROLB45F: 2A ROLB460: 29 03 AND #$03 ; keep bits .... ..xx (Repeat Value)B462: 85 09 STA $09 B464: C8 INYB465: B1 0A LDA ($0A),YB467: 85 0C STA $0C B469: 20 CEED JSR $EDCE ; Find Next Available Enemy SlotB46C: F0 08 BEQ $B476 B46E: A5 0F LDA $0FB470: 4A LSRB471: 90 34 BCC $B4A7 B473: 20 D9ED JSR $EDD9 B476: A5 08 LDA $08B478: 9D 2805 STA $0528,X ; Enemy Type B47B: 20 47EE JSR $EE47 ; Initialize Enemy Attributes B47E: A5 0C LDA $0CB480: 29 0F AND #$0F ; keep bits .... xxxxB482: 9D A805 STA $05A8,X ; Enemy AttributesB485: A5 41 LDA $41 ; Scrolling (H/V)B487: F0 0F BEQ $B498 B489: A5 0C LDA $0CB48B: 29 F0 AND #$F0 ; keep bits xxxx ....B48D: 9D 3E03 STA $033E,X ; Enemy X Position on ScreenB490: A5 0E LDA $0EB492: 9D 2403 STA $0324,X ; Enemy Y Position on Screen B495: 4C A7B4 JMP $B4A7 ---- B498: A5 0C LDA $0CB49A: 29 F0 AND #$F0 ; keep bits xxxx ....B49C: 9D 2403 STA $0324,X ; Enemy Y Position on ScreenB49F: A9 F0 LDA #$F0 ; A = F0B4A1: 38 SECB4A2: E5 0E SBC $0EB4A4: 9D 3E03 STA $033E,X ; Enemy X Position on Screen B4A7: C6 09 DEC $09B4A9: 10 B9 BPL $B464 B4AB: C8 INYB4AC: 84 82 STY $82 B4AE: 60 RTS ---- Indoor B4AF: A5 82 LDA $82 ; Offset for Enemy DataB4B1: D0 FB BNE $B4AE B4B3: E6 82 INC $82 ; Offset for Enemy DataB4B5: A9 00 LDA #$00 ; A = 00B4B7: 85 88 STA $88 ; Enemy Cycles CounterB4B9: 85 87 STA $87 ; Number of Boss Platings DestroyedB4BB: 85 89 STA $89B4BD: 85 8A STA $8A B4BF: 20 16EA JSR $EA16 B4C2: A0 00 LDY #$00 ; Y = 00B4C4: B1 0A LDA ($0A),YB4C6: C9 FF CMP #$FFB4C8: F0 E4 BEQ $B4AE B4CA: 85 86 STA $86 ; Remaining Cores to DestroyB4CC: C9 00 CMP #$00B4CE: D0 04 BNE $B4D4 B4D0: A9 01 LDA #$01 ; A = 01B4D2: 85 37 STA $37 ; Indoor Screen Cleared (0 = not cleared) B4D4: C8 INYB4D5: A2 0F LDX #$0F ; X = 0F B4D7: B1 0A LDA ($0A),YB4D9: C9 FF CMP #$FFB4DB: F0 D1 BEQ $B4AE B4DD: 85 0F STA $0FB4DF: C8 INYB4E0: B1 0A LDA ($0A),YB4E2: 85 08 STA $08B4E4: 29 3F AND #$3F ; keep bits ..xx xxxxB4E6: 9D 2805 STA $0528,X ; Enemy Type B4E9: 20 47EE JSR $EE47 ; Initialize Enemy Attributes B4EC: A5 0F LDA $0FB4EE: 29 F0 AND #$F0 ; keep bits xxxx ....B4F0: 06 08 ASL $08B4F2: 90 02 BCC $B4F6 B4F4: 69 07 ADC #$07 B4F6: 9D 2403 STA $0324,X ; Enemy Y Position On ScreenB4F9: A5 0F LDA $0FB4FB: 0A ASLB4FC: 0A ASLB4FD: 0A ASLB4FE: 0A ASLB4FF: 06 08 ASL $08B501: 90 02 BCC $B505 B503: 69 07 ADC #$07 B505: 9D 3E03 STA $033E,X ; Enemy X Position On ScreenB508: C8 INYB509: B1 0A LDA ($0A),YB50B: 9D A805 STA $05A8,XB50E: C8 INYB50F: CA DEXB510: 10 C5 BPL $B4D7 B512: 60 RTS ---- B513: Levels Enemy Groups Pointers (8 * 2 = 10 bytes) 2BB8 -> B82B Level 1 AAB8 -> B8AA Level 2 0DB9 -> B90D Level 3 AFB9 -> B9AF Level 4 48BA -> BA48 Level 5 24BB -> BB24 Level 6 B7BB -> BBB7 Level 7 A9BC -> BCA9 Level 8 ---- B523: A5 64 LDA $64 ; Screen NumberB525: CD 9501 CMP $0195B528: F0 08 BEQ $B532 B52A: 8D 9501 STA $0195B52D: A9 00 LDA #$00 ; A = 00B52F: 8D 9601 STA $0196 B532: A5 79 LDA $79 ; Running Man Generation Routine Index B534: 20 57C8 JSR $C857 ; Go to Routine A in following table ---- B537: Pointer table for Running Man Generation (3 * 2 = 6 bytes) 3DB5 -> B53D 81B5 -> B581 57B6 -> B657 ---- B53D: 20 48B5 JSR $B548B540: F0 05 BEQ $B547 B542: 20 4FB5 JSR $B54F B545: E6 79 INC $79 ; Running Man Generation Routine Index B547: 60 RTS ---- Get Level's Base Value for Running Men Generation B548: A5 30 LDA $30 ; Current LevelB54A: A8 TAYB54B: B9 79B5 LDA $B579,Y B54E: 60 RTS ---- Running Men Generation B54F: 20 48B5 JSR $B548 B552: 85 7A STA $7A ; Running Man Generation CoefficientB554: A4 31 LDY $31 ; Game Completion CountB556: F0 0C BEQ $B564 B558: 98 TYAB559: C9 04 CMP #$04B55B: 90 02 BCC $B55F B55D: A0 03 LDY #$03 ; Y = 03 B55F: A9 28 LDA #$28 ; A = 28 B561: 20 6AB5 JSR $B56A B564: A4 2F LDY $2F ; Current Weapon Strength CodeB566: F0 10 BEQ $B578 B568: A9 05 LDA #$05 ; A = 05 B56A: 85 08 STA $08B56C: A5 7A LDA $7A ; Running Man Generation Coefficient B56E: 38 SECB56F: E5 08 SBC $08B571: 90 05 BCC $B578 B573: 85 7A STA $7AB575: 88 DEYB576: D0 F6 BNE $B56E B578: 60 RTS ---- Table for Running Men Generation Base Values (8 bytes) B579: 90 00 D8 00 D0 C8 C0 00 Initial value according to current level The lower the value of $7A, the higher the chance of generating a Running Man 36 = Lots of Running Men 08 = Insane ---- B581: A5 1A LDA $1A ; Permanent Frame CounterB583: 6A RORB584: 90 04 BCC $B58A B586: A5 68 LDA $68 ; Level ScrollingB588: D0 0A BNE $B594 B58A: A5 7A LDA $7A ; Running Man Generation CoefficientB58C: 38 SECB58D: E9 02 SBC #$02B58F: 85 7A STA $7A ; Running Man Generation CoefficientB591: 90 06 BCC $B599 B593: 60 RTS ---- B594: C6 7A DEC $7A ; Running Man Generation CoefficientB596: F0 01 BEQ $B599 B598: 60 RTS ---- B599: 20 4FB5 JSR $B54F B59C: A5 1A LDA $1A ; Permanent Frame CounterB59E: 65 34 ADC $34 ; RandomizerB5A0: 29 01 AND #$01 ; keep bits .... ...xB5A2: A8 TAYB5A3: B9 1A03 LDA $031A,YB5A6: D0 06 BNE $B5AE B5A8: 98 TYAB5A9: 49 01 EOR #$01 ; flip bits .... ...xB5AB: B9 1A03 LDA $031A,Y B5AE: 85 08 STA $08B5B0: 85 0A STA $0AB5B2: A5 1A LDA $1A ; Permanent Frame CounterB5B4: 29 03 AND #$03 ; keep bits .... ..xxB5B6: A8 TAYB5B7: F0 17 BEQ $B5D0 B5B9: 88 DEYB5BA: F0 2F BEQ $B5EB B5BC: 20 06B6 JSR $B606 B5BF: A5 08 LDA $08B5C1: 38 SECB5C2: E9 10 SBC #$10B5C4: 85 08 STA $08B5C6: C5 0A CMP $0AB5C8: F0 05 BEQ $B5CF B5CA: 20 28B6 JSR $B628B5CD: 90 F0 BCC $B5BF B5CF: 60 RTS ---- B5D0: A9 00 LDA #$00 ; A = 00B5D2: 85 08 STA $08B5D4: 85 0A STA $0A B5D6: 20 06B6 JSR $B606 B5D9: A5 08 LDA $08B5DB: 18 CLCB5DC: 69 10 ADC #$10B5DE: 85 08 STA $08B5E0: C5 0A CMP $0AB5E2: F0 EB BEQ $B5CF B5E4: 20 28B6 JSR $B628B5E7: 90 F0 BCC $B5D9B5E9: B0 E4 BCS $B5CF B5EB: A9 F0 LDA #$F0 ; A = F0B5ED: 85 08 STA $08B5EF: 85 0A STA $0A B5F1: 20 06B6 JSR $B606 B5F4: A5 08 LDA $08B5F6: 38 SECB5F7: E9 10 SBC #$10B5F9: 85 08 STA $08B5FB: C5 0A CMP $0AB5FD: F0 D0 BEQ $B5CF B5FF: 20 28B6 JSR $B628B602: 90 F0 BCC $B5F4B604: B0 C9 BCS $B5CF B606: A5 1A LDA $1A ; Permanent Frame CounterB608: 65 34 ADC $34 ; RandomizerB60A: 29 0F AND #$0F ; keep bits .... xxxxB60C: A8 TAYB60D: B9 47B6 LDA $B647,YB610: A4 31 LDY $31 ; Game Completion CountB612: D0 12 BNE $B626 B614: A4 30 LDY $30 ; Current LevelB616: D0 0E BNE $B626 B618: 48 PHAB619: AD 9601 LDA $0196B61C: C9 1E CMP #$1EB61E: B0 05 BCS $B625 B620: 68 PLAB621: A9 FC LDA #$FC ; A = FCB623: D0 01 BNE $B626 B625: 68 PLA B626: 85 09 STA $09 B628: A5 09 LDA $09B62A: A4 08 LDY $08 B62C: 20 BBE0 JSR $E0BB B62F: B0 01 BCS $B632 B631: 60 RTS ---- B632: A5 09 LDA $09B634: 85 7B STA $7BB636: A5 08 LDA $08B638: 38 SECB639: E9 10 SBC #$10B63B: 85 7C STA $7CB63D: A5 79 LDA $79B63F: C9 02 CMP #$02B641: F0 02 BEQ $B645 B643: E6 79 INC $79 B645: 38 SEC B646: 60 RTS ---- B647: FA 0A FA FA 0A FA 0A FA 0A 0A 0A FA FA 0A 0A FA Table for ? (10 bytes) ---- B657: A5 30 LDA $30 ; Current LevelB659: C9 02 CMP #$02B65B: F0 09 BEQ $B666 B65D: A5 7C LDA $7CB65F: C9 40 CMP #$40B661: B0 03 BCS $B666 B663: 4C 30B7 JMP $B730 ---- B666: A5 7C LDA $7C ; Generated Man Initial Y Position on ScreenB668: C9 E0 CMP #$E0B66A: B0 F7 BCS $B663 B66C: A5 8E LDA $8EB66E: F0 F3 BEQ $B663 B670: A5 30 LDA $30 ; Current LevelB672: C9 04 CMP #$04 ; check if Level 5B674: D0 0B BNE $B681 Check if in the last screens of Level 5 ? B676: A5 64 LDA $64 ; Screen NumberB678: C9 11 CMP #$11B67A: 90 05 BCC $B681 B67C: 20 35B7 JSR $B735B67F: 90 E2 BCC $B663 B681: A5 7B LDA $7BB683: A4 7C LDY $7C B685: 20 87E0 JSR $E087B688: 30 D9 BMI $B663 B68A: 20 35B7 JSR $B735B68D: 90 02 BCC $B691 B68F: E9 10 SBC #$10 B691: 18 CLCB692: 69 08 ADC #$08B694: A4 7C LDY $7C B696: 20 87E0 JSR $E087B699: 30 C8 BMI $B663 B69B: 20 CAED JSR $EDCA ; Find Next Available Enemy Slot (0-6)B69E: D0 C3 BNE $B663 B6A0: A5 30 LDA $30 ; Current LevelB6A2: 0A ASLB6A3: A8 TAYB6A4: B9 BBB7 LDA $B7BB,YB6A7: 85 08 STA $08B6A9: B9 BCB7 LDA $B7BC,YB6AC: 85 09 STA $09B6AE: A5 64 LDA $64 ; Screen NumberB6B0: F0 B1 BEQ $B663 B6B2: A8 TAYB6B3: 88 DEYB6B4: B1 08 LDA ($08),YB6B6: C9 FF CMP #$FFB6B8: F0 A9 BEQ $B663 B6BA: 29 80 AND #$80 ; keep bits x... ....B6BC: F0 07 BEQ $B6C5 Bit 7 Set = 50% probability of No Generation B6BE: A5 1A LDA $1A ; Permanent Frame CounterB6C0: 6A RORB6C1: 90 02 BCC $B6C5 ; useless branch conditionB6C3: B0 6B BCS $B730 B6C5: B1 08 LDA ($08),YB6C7: 29 40 AND #$40 ; keep bits .x.. ....B6C9: F0 08 BEQ $B6D3 Bit 6 Set = 25% probability of No Generation B6CB: A5 1A LDA $1A ; Permanent Frame CounterB6CD: 29 03 AND #$03 ; keep bits .... ..xxB6CF: F0 02 BEQ $B6D3B6D1: D0 5D BNE $B730 B6D3: AD 9601 LDA $0196B6D6: C9 1E CMP #$1EB6D8: B0 07 BCS $B6E1 B6DA: A5 31 LDA $31 ; Game Completion CountB6DC: D0 03 BNE $B6E1 B6DE: 4C 88B7 JMP $B788 ---- B6E1: A5 30 LDA $30 ; Current LevelB6E3: C9 02 CMP #$02B6E5: F0 0A BEQ $B6F1 B6E7: A5 68 LDA $68 ; Level ScrollingB6E9: F0 06 BEQ $B6F1 B6EB: A5 34 LDA $34 ; RandomizerB6ED: 29 03 AND #$03 ; keep bits .... ..xxB6EF: F0 49 BEQ $B73A B6F1: A9 05 LDA #$05 ; A = 05B6F3: 9D 2805 STA $0528,X ; Enemy Type B6F6: 20 47EE JSR $EE47 ; Initialize Enemy Attributes B6F9: B1 08 LDA ($08),YB6FB: 29 3F AND #$3F ; keep bits ..xx xxxxB6FD: 0A ASLB6FE: 0A ASLB6FF: 85 0A STA $0AB701: A5 1A LDA $1A ; Permanent Frame CounterB703: 29 03 AND #$03 ; keep bits .... ..xxB705: 18 CLCB706: 65 0A ADC $0AB708: A8 TAYB709: B9 0FB8 LDA $B80F,YB70C: 9D A805 STA $05A8,X ; Enemy AttributesB70F: A5 34 LDA $34 ; RandomizerB711: 65 1A ADC $1A ; Permanent Frame CounterB713: 29 02 AND #$02 ; keep bits .... ..x.B715: F0 06 BEQ $B71D B717: 1D A805 ORA $05A8,X ; Enemy AttributesB71A: 9D A805 STA $05A8,X B71D: A5 7C LDA $7CB71F: 9D 2403 STA $0324,X B722: 20 35B7 JSR $B735 B725: 9D 3E03 STA $033E,XB728: B0 03 BCS $B72D B72A: FE A805 INC $05A8,X ; Enemy Attributes B72D: EE 9601 INC $0196 B730: A9 00 LDA #$00 ; A = 00B732: 85 79 STA $79 ; Running Man Generation Routine Index B734: 60 RTS ---- B735: A5 7B LDA $7B ; Generated Man Initial X Position on ScreenB737: C9 80 CMP #$80 B739: 60 RTS ---- B73A: A9 00 LDA #$00 ; A = 00B73C: 85 07 STA $07 B73E: 20 35B7 JSR $B735B741: B0 02 BCS $B745 B743: E6 07 INC $07B745: A0 02 LDY #$02 ; Y = 02 B747: E6 06 INC $06B749: 98 TYAB74A: 48 PHA B74B: 20 CAED JSR $EDCA ; Find Next Available Enemy SlotB74E: D0 29 BNE $B779 B750: A9 05 LDA #$05 ; A = 05B752: 9D 2805 STA $0528,X ; Enemy Type B755: 20 47EE JSR $EE47 ; Initialize Enemy AttributesB758: 20 7DB7 JSR $B77D B75B: A5 06 LDA $06B75D: 29 02 AND #$02 ; keep bits .... ..x.B75F: 9D A805 STA $05A8,X ; Enemy AttributesB762: 68 PLAB763: A8 TAYB764: 0A ASLB765: 0A ASLB766: 0A ASLB767: 0A ASLB768: 18 CLCB769: 7D A805 ADC $05A8,X ; Enemy AttributesB76C: 05 07 ORA $07B76E: 9D A805 STA $05A8,X ; Enemy Attributes B771: 20 7DB7 JSR $B77D B774: 88 DEYB775: 30 B9 BMI $B730B777: 10 CE BPL $B747 B779: 68 PLA B77A: 4C 30B7 JMP $B730 ---- B77D: A5 7C LDA $7C ; Generated Man Initial Y Position on ScreenB77F: 9D 2403 STA $0324,X ; Enemy Y Position on ScreenB782: A5 7B LDA $7B ; Generated Man Initial X Position on ScreenB784: 9D 3E03 STA $033E,X ; Enemy X Position on Screen B787: 60 RTS ---- B788: 98 TYAB789: 48 PHAB78A: A0 01 LDY #$01 ; Y = 01 B78C: 20 35B7 JSR $B735 ; Compare $7B to 80B78F: B0 19 BCS $B7AA B791: B9 3800 LDA $0038,Y ; Game Over state (1 = Game Over)B794: D0 07 BNE $B79D If the player's X position is lower than 40 and the Running Man is supposed to be facing right, don't generate B796: B9 3403 LDA $0334,Y ; Player X Position on ScreenB799: C9 40 CMP #$40B79B: 90 08 BCC $B7A5 B79D: 88 DEYB79E: 10 F1 BPL $B791 B7A0: 68 PLAB7A1: A8 TAY B7A2: 4C E1B6 JMP $B6E1 ---- B7A5: 68 PLAB7A6: A8 TAY B7A7: 4C 30B7 JMP $B730 ---- B7AA: B9 3800 LDA $0038,Y ; Game Over state (1 = Game Over)B7AD: D0 07 BNE $B7B6 If the player's X position is higher or equal to C0 and the Running Man is supposed to be facing left, don't generate B7AF: B9 3403 LDA $0334,YB7B2: C9 C0 CMP #$C0B7B4: B0 EF BCS $B7A5 B7B6: 88 DEY B7B7: 10 F1 BPL $B7AAB7B9: 30 E5 BMI $B7A0 ---- B7BB: Pointer table for Running Men Generation (8 * 2 = 10 bytes) CBB7 -> B7CB CBB7 -> B7CB D7B7 -> B7D7 CBB7 -> B7CB E0B7 -> B7E0 F4B7 -> B7F4 00B8 -> B800 CBB7 -> B7CB ---- Tables for Running Men Generation (44 bytes) Related to Running Men generation according to Level and Screen Number FF = don't generate Running Men B7CB: 80 80 80 80 80 80 80 40 40 80 FF FF (C bytes) B7D7: 00 00 00 01 00 FF 01 FF FF (9 bytes) B7E0: 01 02 03 04 03 03 03 02 FF 04 02 03 FF 02 03 04 02 FF FF FF (14 bytes) B7F4: 00 05 02 FF FF 80 05 03 82 FF FF FF (C bytes) B800: 80 05 06 80 80 05 07 80 80 04 FF 04 04 FF FF (F bytes) 80 = Random right/left, no shooting, freq. 1 on screen 40 = Random right/left, no shooting, freq. 50% of 80 00 = Random right/left, no shooting, freq. 1 per 1.5s 01 = Random right/left, shoot 1-2 bullets ratio 75-25, freq. like 00 02 = Random right/left, shoot 1-2 bullets ratio 67-33, freq. like 00 03 = Random right/left, shoot 1-2 bullets ratio 67-33, freq. like 00 ---- B80F: Table for ? (1C bytes) 00 00 00 00 00 00 00 04 00 00 04 04 00 04 04 0404 04 04 04 00 00 00 08 00 00 04 08 ---- B82B: Pointer table for Level 1 Enemy Groups (D * 2 = 1A bytes) 45B8 -> B845 58B8 -> B858 5CB8 -> B85C 60B8 -> B860 64B8 -> B864 71B8 -> B871 7BB8 -> B87B 7FB8 -> B87F 86B8 -> B886 8DB8 -> B88D 95B8 -> B895 99B8 -> B899 A9B8 -> B8A9 ---- B845: Level 1 Enemy Data (65 bytes) 10 05 60 40 05 60 50 06 C0 60 02 A1 80 05 60 F0 03 40 FF 90 06 C0 FF 20 12 80 FF 40 12 80 FF 00 04 A0 10 06 60 50 06 61 60 03 43 FF 20 06 41 40 02 A2 80 04 80 FF 40 04 80 FF 20 07 A0 A0 07 41 FF 00 02 C3 50 06 80 FF 10 43 40 B4 E0 07 81 FF C0 04 C0 FF 40 04 C3 A8 10 81 B1 11 B0 B4 06 52 C0 10 80 FF FF Enemy Format XX TT YY XX = X Position xxxxxxxx X Position TT = Enemy Type + Repeat xx...... Repeat ..xxxxxx Enemy Type YY = Y Position + Attributes xxxxx... Y Position .....xxx Attributes Enemy Types Descriptions 00 Weapon Attributes 000 = Rapid Fire (R) 001 = Machine Gun (M) 010 = Flame Thrower (F) 011 = Spray Gun (S) 100 = Laser (L) 101 = Invincibility (B) (Why B, by the way?) 110 = Eagle ( ) Destroys Everything on Screen 111 = Unused ( ) Same as 110, but no graphic 01 Immobile Bullet (Weird!) Attributes - No Effect 02 Weapon Box Attributes - Same as 00 03 Weapon Drop Attributes - Same as 00 04 Gray Turret .xx Consecutive Bullets (00 = 1, 01 = 2, 10/11 = 3) x.. ??? 05 Running Man ..x Running Direction (0 = Left, 1 = Right) .x. ??? x.. Shoots Bullets 06 Rifle Man 000 Standing - Shoots 3 Bullets 001 Hides - Shoots 1 Bullet 010 Hides - Shoots 3 Bullets (gets up when shooting) 011 Hides - Shoots 30 Bullets (gets up when shooting) 100 Hides - Shoots 2 Bullets (semi-hidden glitched) Etc... 07 Red Turret ..x Background (0 = Rock, 1 = Tree Trunks) xx. ??? 08 Turret Shooting Down 3 Slugs (keeps position relative to screen) Attributes - No Effect 09 ??? (invisible object, indestructible) 0A ??? (destructible, probably Base 1 and 2 Plating Units) 0B Mortar 000 Up straight, divide in 3 at top of screen 001 Up straight, single, low 010 Up right, single, low 011 Up left, single, low 100 Up left slightly, single, very high 101 Up left, single, very high 110 Up left more, single, very high 111 Up left even more, single very high 0C Scuba Diver Attributes - No Effect 0D ??? (crashes the game if shot) 0E Turret Man xxx Firing Speed (000 = Fastest, 111 = Slowest) 0F ??? (Red Bullet blinking once) 10 Level 1 Boss Bomb Turret ..x Background (0 = Wall, 1 = Jungle) xx. ??? 11 Level 1 Boss Plated Door + Sound Effect (siren) (invisible) Attributes - No Effect 12 4 Explosions (exploding bridge) Attributes - No Effect -------- Level 1 Section 1 10 05 60 Enemy Type 05 Running Man X Position 10 Y Position 0C Repeat 0 Attributes 00 Going Left 40 05 60 Enemy Type 05 Running Man X Position 40 Y Position 0C Repeat 0 Attributes 00 Going Left 50 06 C0 Enemy Type 06 Rifle Man X Position 50 Y Position 18 Repeat 0 Attributes 00 Standing 60 02 A1 Enemy Type 02 Weapon Box X Position 60 Y Position 14 Repeat 0 Attributes 01 Machine Gun 80 05 60 Enemy Type 05 Running Man X Position 80 Y Position 0C Repeat 0 Attributes 00 Going Left F0 03 40 Enemy Type 03 Weapon Drop X Position F0 Y Position 08 Repeat 0 Attributes 00 Rapid Fire Level 1 Last Enemy C0 10 80 Enemy Type 10 Level 1 Boss Bomb Turret X Position C0 Y Position 10 Repeat 0 Attributes 00 Wall Background -------- B8AA: Pointer table for Level 2 Enemy Groups (6 * 2 = C bytes) B6B8 -> B8B6 BEB8 -> B8BE C9B8 -> B8C9 D7B8 -> B8D7 E5B8 -> B8E5 F6B8 -> B8F6 ---- B8B6: Level 2 Enemy Data (Wall Objects Definitions) 01 11 19 00 68 94 03 FF 01 11 59 00 66 D4 03 69 D3 00 FF 01 11 59 00 78 14 03 66 D3 00 69 D3 00 FF 01 11 59 00 11 1A 00 58 93 00 68 94 03 FF 01 11 59 00 68 94 0B 66 D3 00 69 D3 00 58 13 00 FF 01 48 10 00 65 08 00 68 0A 01 6B 08 00 95 0A 00 98 0A 00 9B 0A 00 FF (Boss) 01 = Number of Cores to destroy to advance to next room 00 -> can't destroy level but there's no electric barrier blocking the player 11 = ??? 19 = Generator associated with room 00 = Enemy Sequences Group Code (00 = Base 1, 01 = Base 2) * can be set to 02, 03, etc, and modify the pointer table at 0DCF accordingly * Byte 0 = Location of Object xxxx.... Y Position * 16 ....xxxx X Position * 16 0 -> out of screen Byte 1 = Position Adjust + Object Type x....... Y Position + 8 .x...... X Position + 8 ..xxxxxx Object Type Byte 2 = Object Attributes ---- 08 = Triple Cannon 0A = Wall Plating Attributes - To be decoded, can be 00 or 01 11 = Single Roller 12 = Single Grenade 13 = Wall Cannon ......xx Opening Delay (0-3, refer to table at $10A4) * possibility for additional attributes, delay between attacks (see $10F3) * 14 = Core xxxx.... No Effect ....x... Big Core (invisible) .....x.. Plated (0 = not plated, 1 = plated) ......xx Opening Delay (0-3, refer to table at $115B) 1A = Rollers Generator (7) (row, row, 1234, 4321) (repeating) 19 = Rollers Row, type B, used in Base II If used in Base I, all enemies are duplicated (!) ---- 15 = Running Guy Attributes xx. Type (0 = Shoot, 1 = Grenades, 2/3 = Drop Rollers) ..x Direction (0 = from right, 1 = from left) 16 = Jump and Shoot Guy Attributes ..x Direction (0 = from right, 1 = from left) 17 = Seeking Guy xx. Number of grenades per attack ..x Direction (0 = from right, 1 = from left) 18 = Single guy from group of 4 (run, stop and shoot) ..x Direction (0 = from right, 1 = from left) 00 = From right, 2/3 01 = From left, 2/3 02 = From right, 3/4 19 = Green Guy Generator 1B = Sphere Projectile 1C = Boss Gemini 1D = Spinning Bubbles 1E = Base 2 Boss Jumping Man 1F = Base 2 Boss Shooting Man 20 = Base 2 Boss Jumping/Shooting Man Generator (repeats) Replace FF at B8BD with 68 for funny effects... ---- B90D: Pointer table for Level 3 Enemy Groups (A * 2 = 14 bytes) 21B9 -> B921 41B9 -> B941 48B9 -> B948 5AB9 -> B95A 6AB9 -> B96A 84B9 -> B984 94B9 -> B994 A4B9 -> B9A4 (boss) AEB9 -> B9AE (no enemy) AEB9 -> B9AE (no enemy) ---- B921: Level 3 Enemy Data - Section 1 (20 bytes) 08 05 21 22 12 35 40 02 92 48 05 23 62 12 D1 68 45 33 96 82 12 B5 A2 12 55 C0 02 94 E2 12 95 FF ... ---- XX = X Position xxxxxxxx X Position TT = Enemy Type + Repeat xx...... Repeat ..xxxxxx Enemy Type YY = Y Position + Attributes xxxxx... Y Position .....xxx Attributes 08 05 E4 Enemy Type 05 Running Man X Position 08 Y Position 1C Repeat 0 Attributes 04 ? A8 55 51 B0 Enemy Type 15 Boss Arm X Position A8 Y Position 0A 16 Repeat 1 Attributes 01 Left 00 Right C1 14 80 Enemy Type 14 Boss Mouth X Position C1 Y Position 10 Repeat 0 Attributes 00 ? FF End -------- B9AF: Pointer table for Level 4 Enemy Groups (9 * 2 = 12 bytes) C1B9 -> B9C1 CFB9 -> B9CF E0B9 -> B9E0 EEB9 -> B9EE FCB9 -> B9FC 0ABA -> BA0A 15BA -> BA15 20BA -> BA20 31BA -> BA31 ---- B9C1: Level 4 Enemy Data - Wall Objects Definitions (87 bytes) 01 11 19 01 68 94 04 66 D3 00 69 D3 00 FF 04 11 19 01 76 54 03 77 54 01 78 54 01 79 54 03 FF 02 11 19 01 67 D4 04 68 D4 04 58 93 00 FF 02 11 19 01 68 13 00 77 54 03 78 54 03 FF 02 11 19 01 66 D4 03 68 93 00 69 D4 03 FF 01 11 1A 01 11 19 01 68 94 03 FF 01 11 19 01 58 94 03 68 93 00 FF 01 11 19 01 58 13 00 66 D3 00 68 94 0B 69 D3 00 FF 02 11 20 00 36 5C 00 39 5C 00 58 08 00 85 0A 00 88 0A 01 8B 0A 00 FF ---- BA48: Pointer table for Level 5 Enemy Groups (16 * 2 = 2C bytes) 74BA -> BA74 81BA -> BA81 8BBA -> BA8B 92BA -> BA92 9FBA -> BA9F A9BA -> BAA9 ADBA -> BAAD B6BA -> BAB6 BDBA -> BABD CABA -> BACA D1BA -> BAD1 D8BA -> BAD8 DCBA -> BADC E6BA -> BAE6 EDBA -> BAED F7BA -> BAF7 01BB -> BB01 05BB -> BB05 12BB -> BB12 1FBB -> BB1F 20BB -> BB20 23BB -> BB23 ---- BA74: Level 5 Enemy Data (B0 bytes) 20 10 60 50 10 61 60 0E 82 D8 10 60 FF 00 0E 81 08 10 63 80 02 A1 FF 60 0E 82 C0 0E B2 FF 20 0E 51 60 03 30 D8 10 43 F0 10 43 FF 80 10 53 C0 10 53 D0 0E 81 FF 60 02 82 FF 40 83 30 76 B3 40 0C D8 FF 10 0C D8 A0 06 80 FF 00 13 B0 40 13 B0 80 13 B0 C0 13 B0 FF 01 12 32 00 13 B0 FF 80 13 B0 C0 13 B0 FF A8 0E A1 FF 40 13 B0 80 13 B0 C0 13 B0 FF 01 12 33 00 13 B0 FF 80 13 B0 C0 13 B0 D0 0E A1 FF 60 10 52 A0 10 53 E8 10 53 FF 60 02 A4 FF 00 10 80 60 10 81 B0 0E 81 C0 10 82 FF 00 13 B0 40 13 B0 80 13 B0 C0 13 B0 FF FF 01 14 30 FF ---- 0E = Turret Man .... ..xx Delay between shots 0F = Turret Man Bullet 10 = Grenade Generator No attributes The original game uses 02-03 but there seem to be no discernable effect 11 = Grenade 12 = Tank Attributes 02-03 used in original game, effect unknown 13 = Pipe Joint Also used for Boss 14 = Alien Carrier 15 = Flying Saucer 16 = Drop Bomb ---- BB24: Pointer table for Level 6 Enemy Groups (D * 2 = 1A bytes) 3EBB -> BB3E 4BBB -> BB4B 55BB -> BB55 5CBB -> BB5C 6CBB -> BB6C 75BB -> BB75 86BB -> BB86 8EBB -> BB8E 9EBB -> BB9E ADBB -> BBAD B1BB -> BBB1 B2BB -> BBB2 B6BB -> BBB6 ---- BB3E: Level 6 Enemy Data (79 bytes) 40 05 84 60 05 68 C0 02 A1 E0 06 60 FF 80 0E 61 E0 0E 61 F0 0E C1 FF A0 0E C1 A0 06 90 FF 40 02 AC 48 10 26 C8 10 25 E0 0E 91 F0 0E C1 FF 28 10 27 B8 91 58 84 B2 FF 58 51 6C 99 A8 10 26 A0 02 AD C8 06 30 F8 11 C2 FF 58 51 39 64 A8 12 6E FF 40 0E 61 48 12 99 68 10 25 A8 12 C0 E8 10 27 FF 60 4E 91 C1 68 52 6A CA E8 12 64 F0 0E 91 FF 68 10 23 FF FF B1 13 A0 FF FF ---- 10 = Energy Beam - Down .... ..xx Beam Length Code Possible lengths are in table at 2A0B, original values are 05 09 0D 0F A beam's length (in tiles) is equal to the beam's length value + 1 ---- BBB7: Pointer table for Level 7 Enemy Data (F * 2 = 1E bytes) D5BB -> BBD5 EDBB -> BBED FDBB -> BBFD 0DBC -> BC0D 17BC -> BC17 36BC -> BC36 40BC -> BC40 44BC -> BC44 4BBC -> BC4B 67BC -> BC67 77BC -> BC77 81BC -> BC81 91BC -> BC91 9BBC -> BC9B A8BC -> BCA8 ---- Enemy Format XX TT YY XX = X Position xxxxxxxx X Position TT = Enemy Type + Repeat xx...... Repeat ..xxxxxx Enemy Type YY = Y Position + Attributes xxxxx... Y Position .....xxx Attributes 47 10 A1 47,14 Type 10 Attr. 1 67 10 A5 67,14 Type 10 Attr. 5 87 10 A9 87,15 Type 10 Attr. 1 97 10 40 97,8 Type 10 Attr. 0 A7 50 44 AD A7,8 Type 10 Attr. 4 + A7,15 Attr. 5 B7 10 48 B7,9 Type 10 Attr. 0 C7 50 4C A1 C7,9 Type 10 Attr. 4 + C7,14 Attr. 1 FF ---- BCA9: Pointer table for Level 8 Enemy Groups (B * 2 = 16 bytes) C0BC -> BCC0 C8BC -> BCC8 D5BC -> BCD5 DCBC -> BCDC ECBC -> BCEC F3BC -> BCF3 FDBC -> BCFD 07BD -> BD07 11BD -> BD11 21BD -> BD21 3CBD -> BD3C ---- BCBF: Level 8 Enemy Data (7E bytes) FF 40 43 31 C5 F0 11 A1 FF 60 11 51 A0 11 61 A8 11 61 B0 10 60 FF BE 12 40 DE 12 40 FF 1E 12 60 3E 12 60 DE 12 60 E0 03 C3 FE 12 60 FF DE 12 E0 FE 12 E0 FF 1E 12 E0 DE 12 80 FE 12 80 FF 7E 12 E0 9E 12 E0 FE 12 80 FF 1E 12 80 BE 12 E0 DE 12 E0 FF 3E 12 60 5E 12 60 A0 14 C8 C0 14 C8 F0 14 C8 FF Last Screen 30 14 C8 3E 12 E0 70 14 20 B8 14 C8 C0 15 40 C2 15 C0 D1 16 70 E0 15 40 E2 15 C0 FF ---- BD3D: Unused Space (2C3 bytes) (707 decimal) -------- // End of Bank // --------