processor 6502 include "vcs.h" include "macro.h" SEG ORG $F000 ; build with dasm mouse.asm -f3 -omouse.bin SCANLINE = $80 ; current Y location MOUSEX0 = $81 ; Mouse 0's X location MOUSEX1 = $82 ; Mouse 1's X location MOUSEY0 = $83 ; Mouse 0's Y location MOUSEY1 = $84 ; Mouse 1's Y location MAPColupf = $85 ; playfield color for next row MAPColubk = $86 ; background color for next row MAPPf0 = $87 ; playfield 0 & 3 for next row (rotate 4 bits to get 3) MAPPf1 = $88 ; playfield 1 for next row MAPPf2 = $89 ; playfield 2 for next row MAPPf4 = $90 ; playfield 4 for next row MAPPf5 = $91 ; playfield 5 for next row ; Memory for wall hole patterns starts at $92; there are six walls, each of which is two rows each two scanlines ; thick. Every five bytes represent the pixels across the playfield registers (the low half of the PF0 register ; is shifted and used for the PF3 register), so 5 x 2 x 6 = 60 bytes, about half our RAM, for wall gnawing. HOLES = $91 ; Not actually used for holes data, since offset 0 indicates non-wall areas; $CE is next available address HOLESP1 = $92 ; just HOLES plus 1 HOLESP2 = $93 ; just HOLES plus 2 HOLESP3 = $94 ; just HOLES plus 3 HOLESP4 = $95 ; just HOLES plus 4 HOLESEND = $CD ; HOLES plus 60 Reset ; Andrew Davie's magical reset formula ldx #0 lda #0 Clear sta 0,x inx bne Clear ; now fill $92 through $CD with $FF ldx HOLESP1 ; holes plus one; the lowest HOLES map address ever used FillHoles lda #$FF sta 0,x inx cpx HOLESEND bne FillHoles jmp StartFrame ; Sitting mouse facing right MSFR .byte %00000101 .byte %00001010 .byte %00011110 .byte %01111111 .byte %10011110 .byte %00011110 .byte %00000101 ; Mouse walking right, frame 0 MWFR0 .byte %00000110 .byte %00001010 .byte %00011110 .byte %01111111 .byte %10011110 .byte %00011010 .byte %00001001 ; Mouse walking right, frame 1 MWFR1 .byte %00001001 .byte %00011010 .byte %10011110 .byte %01111111 .byte %00011110 .byte %00001010 .byte %00000110 ; Sitting mouse facing left MSFL .byte %10100000 .byte %01010000 .byte %01111000 .byte %11111110 .byte %01111001 .byte %01111000 .byte %10100000 ; Mouse walking left, frame 0 MWFL0 .byte %01100000 .byte %01010000 .byte %01111000 .byte %11111110 .byte %01111001 .byte %01011000 .byte %10010000 ; Mouse walking left, frame 1 MWFL1 .byte %10010000 .byte %01010000 .byte %01111001 .byte %11111110 .byte %01111000 .byte %01010000 .byte %01100000 ; Sitting mouse facing up MSFU .byte %00010000 .byte %01010100 .byte %00111000 .byte %10111010 .byte %01111100 .byte %01111100 .byte %00111000 .byte %00010000 .byte %00010000 .byte %00001100 ; Mouse walking up, frame 0 MWFU0 .byte %00010000 .byte %00010100 .byte %01111000 .byte %10111000 .byte %01111010 .byte %01111100 .byte %00111100 .byte %00010000 .byte %00010000 .byte %00001000 ; Mouse walking up, frame 1 MWFU1 .byte %00010000 .byte %01010000 .byte %00111100 .byte %00111010 .byte %10111100 .byte %01111100 .byte %01111000 .byte %00010000 .byte %00010000 .byte %00100000 ; Sitting mouse facing down MSFD .byte %00001100 .byte %00010000 .byte %00010000 .byte %00111000 .byte %01111100 .byte %01111100 .byte %10111010 .byte %00111000 .byte %01010100 .byte %00010000 ; Mouse walking down, frame 0 MWFD0 .byte %00001000 .byte %00010000 .byte %00010000 .byte %00111100 .byte %01111100 .byte %01111010 .byte %10111000 .byte %01111000 .byte %00010100 .byte %00010000 ; Mouse walking down, frame 1 MWFD1 .byte %00100000 .byte %00010000 .byte %00010000 .byte %01111000 .byte %01111100 .byte %10111100 .byte %00111010 .byte %00111100 .byte %01010000 .byte %00010000 ; scores - PF1 single digit; shift score value left 3 bits, then add scanline SCORES0 .byte %0100 .byte %1110 .byte %1010 .byte %1010 .byte %1010 .byte %1010 .byte %1110 .byte %0100 SCORES1 .byte %0100 .byte %1100 .byte %0100 .byte %0100 .byte %0100 .byte %0100 .byte %0100 .byte %1110 SCORES2 .byte %0100 .byte %1110 .byte %1010 .byte %0010 .byte %0110 .byte %1100 .byte %1110 .byte %1110 SCORES3 .byte %1110 .byte %1110 .byte %0010 .byte %0100 .byte %0010 .byte %1010 .byte %1110 .byte %0100 SCORES4 .byte %0010 .byte %0010 .byte %1010 .byte %1111 .byte %1111 .byte %0010 .byte %0010 .byte %0010 SCORES5 .byte %1110 .byte %1110 .byte %1000 .byte %1100 .byte %1110 .byte %0010 .byte %1110 .byte %1100 SCORES6 .byte %0100 .byte %1100 .byte %1000 .byte %1100 .byte %1110 .byte %1010 .byte %1110 .byte %0100 SCORES7 .byte %1110 .byte %1110 .byte %0010 .byte %0010 .byte %0010 .byte %0100 .byte %0100 .byte %0100 SCORES8 .byte %0100 .byte %1110 .byte %1010 .byte %1100 .byte %0110 .byte %1010 .byte %1110 .byte %0100 SCORES9 .byte %0100 .byte %1110 .byte %1010 .byte %1110 .byte %0110 .byte %0010 .byte %0110 .byte %0100 StartFrame lda #0 sta VBLANK lda #2 ; put a 1 in D1 of VSYNC sta VSYNC sta WSYNC sta WSYNC sta WSYNC lda #0 sta VSYNC ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; vertical blank area (37 blank lines at top of screen, during which we can perform set-up) VerticalBlank lda #2 ldy #35 ; ====> "scanlines to waste" ; burn off extra scanlines (number of extras set in y register, above) BurnVBlank dey sty COLUBK sta WSYNC bne BurnVBlank ; now LDY is set to zero, which is the first row of the display ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; set up time before display area (be sure to reduce "scanlines to waste," above, as appropriate) ; set score mode for score area playfield, and set ball size at 4 clock-pixels wide for wall studs lda #%00010010 sta CTRLPF ;okay, fake score code lda #5 asl ; multiply by 8 asl asl tax lda #6 asl ; multiply by 8 asl asl tay sta WSYNC ; score background lda #$0f ; white sta COLUBK ; player colors (will be more complicated for 2 player...) lda #$10 ; dark brown mouse sta COLUP0 lda #$18 ; orangish cat sta COLUP1 sta WSYNC ;clear PF registers lda #0 sta PF0 sta PF1 sta PF2 sta WSYNC ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; display area (192 golden lines of screen time) Score lda SCORES0,x sta PF1 inx lda SCORES0,y iny SLEEP 22 sta PF1 sta WSYNC ; first row complete lda SCORES0,x sta PF1 inx lda SCORES0,y iny SLEEP 22 sta PF1 sta WSYNC ; second row complete lda SCORES0,x sta PF1 inx lda SCORES0,y iny SLEEP 22 sta PF1 sta WSYNC ; third lda SCORES0,x sta PF1 inx lda SCORES0,y iny SLEEP 22 sta PF1 sta WSYNC ; fourth lda SCORES0,x sta PF1 inx lda SCORES0,y iny SLEEP 22 sta PF1 sta WSYNC ; fifth lda SCORES0,x sta PF1 inx lda SCORES0,y iny SLEEP 22 sta PF1 sta WSYNC ; sixth lda SCORES0,x sta PF1 inx lda SCORES0,y iny SLEEP 22 sta PF1 sta WSYNC ; seventh lda SCORES0,x sta PF1 inx lda SCORES0,y iny SLEEP 22 sta PF1 sta WSYNC ; eighth line of score display lda #$0f ; 2 - white line between score and game board sta COLUBK ; 3 sta COLUPF ; 3 ; playfield is black for line after score, but load in first row's pattern ;lda FLRTILE0 ; 3 ;sta PF0 ; 3 ;lda FLRTILE1 ; 3 ;sta PF1 ; 3 ;lda FLRTILE2 ; 3 ;sta PF2 ; 3 ; unset score mode for rest of playfield, and set (keep) ball size at 4 clock-pixels wide for wall studs lda #%00010000 sta CTRLPF ; we've had 8 rows of display now, so we'll be continuing on row 9 ldy #8 ; at scanline 8 sta WSYNC ; eighth row complete FinishLine cpy #192 ; see if we've reached the bottom beq NewFrame iny lda MAPFG,y ; get COLUPF for next section sta COLUPF lda MAPBG,y ; get COLUBK for next section sta COLUBK ldx MAPWALL,y ; get wall/not-wall status of next row (if wall, is also holes pattern offset) bne GameBoardWall GameBoard lda FLRTILE0 sta PF0 sta WSYNC ; now wait for display to start! Y will always be 1 or more lda FLRTILE1 sta PF1 lda FLRTILE2 sta PF2 jmp FinishLine ; must be a wall - load the first three segments & turn on wall collisions GameBoardWall lda HOLES,x sta PF0 sta WSYNC lda HOLESP1,x sta PF1 lda HOLESP2,x sta PF2 ; load the second half lda HOLES,x asl asl asl asl sta PF0 lda HOLESP3,x sta PF1 lda HOLESP4,x sta PF2 jmp FinishLine ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; wait until next frame NewFrame lda #%01000010 sta VBLANK ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; overscan area lda #0 sta COLUPF ldy #30 Overscan dey sta WSYNC bne Overscan jmp StartFrame ; &&& Always set colors of mice to light and dark brown ; MAP - the game board ; the background consists of a 2-PF-Pixel left edge, four 13-PF-Pixel center tiles and a 3-PF-Pixel righthand end ; these tiles alternate between two colors defined in this table ; scanline list; groups clustered together represent walls ; Removed June 20, 2004 ; MAPSCLN .byte 9, 35,36,37, 39, 42, 46, 50, 54,56,57, 58, 60, 91,92,93, 95, 98, 103, 107, 110,112,113, 114, 147,148,149, 151, 154, 159, 163, 166,168,169, 170 ; "floor" pattern for "background" pattern (5 bits on, 10 bits off, 5 bits on) FLRTILE0 .byte %11111111 ; the first four 1s are for the left side of the screen; PF0 is shifted for the second half of the screen, so the other 1s are for the right side ;solid patterns for testing: FLRTILE1 .byte %11111111 ;solid patterns for testing: FLRTILE2 .byte %11111111 FLRTILE1 .byte %10000000 FLRTILE2 .byte %11111000 ; the first pattern starts at scanline 9 and continues to scanline 34 MAPFG .byte $06 ; row 009 dark grey (lit dark tile) .byte $06 ; row 010 dark grey (lit dark tile) .byte $06 ; row 011 dark grey (lit dark tile) .byte $06 ; row 012 dark grey (lit dark tile) .byte $06 ; row 013 dark grey (lit dark tile) .byte $06 ; row 014 dark grey (lit dark tile) .byte $06 ; row 015 dark grey (lit dark tile) .byte $06 ; row 016 dark grey (lit dark tile) .byte $06 ; row 017 dark grey (lit dark tile) .byte $06 ; row 018 dark grey (lit dark tile) .byte $06 ; row 019 dark grey (lit dark tile) .byte $06 ; row 020 dark grey (lit dark tile) .byte $06 ; row 021 dark grey (lit dark tile) .byte $06 ; row 022 dark grey (lit dark tile) .byte $06 ; row 023 dark grey (lit dark tile) .byte $06 ; row 024 dark grey (lit dark tile) .byte $06 ; row 025 dark grey (lit dark tile) .byte $06 ; row 026 dark grey (lit dark tile) .byte $06 ; row 027 dark grey (lit dark tile) .byte $06 ; row 028 dark grey (lit dark tile) .byte $06 ; row 029 dark grey (lit dark tile) .byte $06 ; row 030 dark grey (lit dark tile) .byte $06 ; row 031 dark grey (lit dark tile) .byte $06 ; row 032 dark grey (lit dark tile) .byte $06 ; row 033 dark grey (lit dark tile) .byte $06 ; row 034 dark grey (lit dark tile) .byte $0E ; row 035 white, the color of the paint on the outside of the wall .byte $0C ; row 036 light gray; the color of wallboard .byte $0C ; row 037 light gray; the color of wallboard .byte $0C ; row 038 light gray; the color of wallboard .byte $02 ; row 039 darkest grey (shadowed dark tile) .byte $02 ; row 040 darkest grey (shadowed dark tile) .byte $02 ; row 041 darkest grey (shadowed dark tile) .byte $04 ; row 042 darker grey (middling dark tile) .byte $04 ; row 043 darker grey (middling dark tile) .byte $04 ; row 044 darker grey (middling dark tile) .byte $04 ; row 045 darker grey (middling dark tile) .byte $08 ; row 046 grey (middling light tile) .byte $08 ; row 047 grey (middling light tile) .byte $08 ; row 048 grey (middling light tile) .byte $08 ; row 049 grey (middling light tile) .byte $06 ; row 050 dark grey (shadowed light tile) .byte $06 ; row 051 dark grey (shadowed light tile) .byte $06 ; row 052 dark grey (shadowed light tile) .byte $0C ; row 053 light gray; the color of wallboard .byte $0C ; row 054 light gray; the color of wallboard .byte $0C ; row 055 light gray; the color of wallboard .byte $0E ; row 056 white; the color of paint .byte $0C ; row 057 light grey (lit light tile) .byte $0C ; row 058 light grey (lit light tile) .byte $0C ; row 059 light grey (lit light tile) .byte $0C ; row 060 light grey (lit light tile) .byte $0C ; row 061 light grey (lit light tile) .byte $0C ; row 062 light grey (lit light tile) .byte $0C ; row 063 light grey (lit light tile) .byte $0C ; row 064 light grey (lit light tile) .byte $0C ; row 065 light grey (lit light tile) .byte $0C ; row 066 light grey (lit light tile) .byte $0C ; row 067 light grey (lit light tile) .byte $0C ; row 068 light grey (lit light tile) .byte $0C ; row 069 light grey (lit light tile) .byte $0C ; row 070 light grey (lit light tile) .byte $0C ; row 071 light grey (lit light tile) .byte $0C ; row 072 light grey (lit light tile) .byte $0C ; row 073 light grey (lit light tile) .byte $0C ; row 074 light grey (lit light tile) .byte $0C ; row 075 light grey (lit light tile) .byte $0C ; row 076 light grey (lit light tile) .byte $0C ; row 077 light grey (lit light tile) .byte $0C ; row 078 light grey (lit light tile) .byte $0C ; row 079 light grey (lit light tile) .byte $0C ; row 080 light grey (lit light tile) .byte $0C ; row 081 light grey (lit light tile) .byte $0C ; row 082 light grey (lit light tile) .byte $0C ; row 083 light grey (lit light tile) .byte $0C ; row 084 light grey (lit light tile) .byte $0C ; row 085 light grey (lit light tile) .byte $0C ; row 086 light grey (lit light tile) .byte $0C ; row 087 light grey (lit light tile) .byte $0C ; row 088 light grey (lit light tile) .byte $0C ; row 089 light grey (lit light tile) .byte $0E ; row 090 white; the color of paint .byte $0C ; row 091 light gray; the color of wallboard .byte $0C ; row 092 light gray; the color of wallboard .byte $0C ; row 093 light gray; the color of wallboard .byte $06 ; row 094 dark grey (shadowed light tile) .byte $06 ; row 095 dark grey (shadowed light tile) .byte $06 ; row 096 dark grey (shadowed light tile) .byte $08 ; row 097 grey (middling light tile) .byte $08 ; row 098 grey (middling light tile) .byte $08 ; row 099 grey (middling light tile) .byte $08 ; row 100 grey (middling light tile) .byte $08 ; row 101 grey (middling light tile) .byte $04 ; row 102 darker grey (middling dark tile) .byte $04 ; row 103 darker grey (middling dark tile) .byte $04 ; row 104 darker grey (middling dark tile) .byte $04 ; row 105 darker grey (middling dark tile) .byte $02 ; row 106 darkest grey (shadowed dark tile) .byte $02 ; row 107 darkest grey (shadowed dark tile) .byte $02 ; row 108 darkest grey (shadowed dark tile) .byte $0C ; row 109 light gray; the color of wallboard .byte $0C ; row 110 light gray; the color of wallboard .byte $0C ; row 111 light gray; the color of wallboard .byte $0E ; row 112 white; the color of paint .byte $06 ; row 113 dark grey (lit dark tile) .byte $06 ; row 114 dark grey (lit dark tile) .byte $06 ; row 115 dark grey (lit dark tile) .byte $06 ; row 116 dark grey (lit dark tile) .byte $06 ; row 117 dark grey (lit dark tile) .byte $06 ; row 118 dark grey (lit dark tile) .byte $06 ; row 119 dark grey (lit dark tile) .byte $06 ; row 120 dark grey (lit dark tile) .byte $06 ; row 121 dark grey (lit dark tile) .byte $06 ; row 122 dark grey (lit dark tile) .byte $06 ; row 123 dark grey (lit dark tile) .byte $06 ; row 124 dark grey (lit dark tile) .byte $06 ; row 125 dark grey (lit dark tile) .byte $06 ; row 126 dark grey (lit dark tile) .byte $06 ; row 127 dark grey (lit dark tile) .byte $06 ; row 128 dark grey (lit dark tile) .byte $06 ; row 129 dark grey (lit dark tile) .byte $06 ; row 130 dark grey (lit dark tile) .byte $06 ; row 131 dark grey (lit dark tile) .byte $06 ; row 132 dark grey (lit dark tile) .byte $06 ; row 133 dark grey (lit dark tile) .byte $06 ; row 134 dark grey (lit dark tile) .byte $06 ; row 135 dark grey (lit dark tile) .byte $06 ; row 136 dark grey (lit dark tile) .byte $06 ; row 137 dark grey (lit dark tile) .byte $06 ; row 138 dark grey (lit dark tile) .byte $06 ; row 139 dark grey (lit dark tile) .byte $06 ; row 140 dark grey (lit dark tile) .byte $06 ; row 141 dark grey (lit dark tile) .byte $06 ; row 142 dark grey (lit dark tile) .byte $06 ; row 143 dark grey (lit dark tile) .byte $06 ; row 144 dark grey (lit dark tile) .byte $06 ; row 145 dark grey (lit dark tile) .byte $0E ; row 146 white; the color of paint .byte $0C ; row 147 light gray; the color of wallboard .byte $0C ; row 148 light gray; the color of wallboard .byte $0C ; row 149 light gray; the color of wallboard .byte $02 ; row 150 darkest grey (shadowed dark tile) .byte $02 ; row 151 darkest grey (shadowed dark tile) .byte $02 ; row 152 darkest grey (shadowed dark tile) .byte $04 ; row 153 darker grey (middling dark tile) .byte $04 ; row 154 darker grey (middling dark tile) .byte $04 ; row 155 darker grey (middling dark tile) .byte $04 ; row 156 darker grey (middling dark tile) .byte $04 ; row 157 darker grey (middling dark tile) .byte $08 ; row 158 grey (middling light tile) .byte $08 ; row 159 grey (middling light tile) .byte $08 ; row 160 grey (middling light tile) .byte $08 ; row 161 grey (middling light tile) .byte $06 ; row 162 dark grey (shadowed light tile) .byte $06 ; row 163 dark grey (shadowed light tile) .byte $06 ; row 164 dark grey (shadowed light tile) .byte $0C ; row 165 light gray; the color of wallboard .byte $0C ; row 166 light gray; the color of wallboard .byte $0C ; row 167 light gray; the color of wallboard .byte $0E ; row 168 white; the color of paint .byte $0C ; row 169 light grey (lit light tile) .byte $0C ; row 170 light grey (lit light tile) .byte $0C ; row 171 light grey (lit light tile) .byte $0C ; row 172 light grey (lit light tile) .byte $0C ; row 173 light grey (lit light tile) .byte $0C ; row 174 light grey (lit light tile) .byte $0C ; row 175 light grey (lit light tile) .byte $0C ; row 176 light grey (lit light tile) .byte $0C ; row 177 light grey (lit light tile) .byte $0C ; row 178 light grey (lit light tile) .byte $0C ; row 179 light grey (lit light tile) .byte $0C ; row 180 light grey (lit light tile) .byte $0C ; row 181 light grey (lit light tile) .byte $0C ; row 182 light grey (lit light tile) .byte $0C ; row 183 light grey (lit light tile) .byte $0C ; row 184 light grey (lit light tile) .byte $0C ; row 185 light grey (lit light tile) .byte $0C ; row 186 light grey (lit light tile) .byte $0C ; row 187 light grey (lit light tile) .byte $0C ; row 188 light grey (lit light tile) .byte $0C ; row 189 light grey (lit light tile) .byte $0C ; row 190 light grey (lit light tile) .byte $0C ; row 191 light grey (lit light tile) MAPBG .byte $0C ; row 009 light grey (lit light tile) .byte $0C ; row 010 light grey (lit light tile) .byte $0C ; row 011 light grey (lit light tile) .byte $0C ; row 012 light grey (lit light tile) .byte $0C ; row 013 light grey (lit light tile) .byte $0C ; row 014 light grey (lit light tile) .byte $0C ; row 015 light grey (lit light tile) .byte $0C ; row 016 light grey (lit light tile) .byte $0C ; row 017 light grey (lit light tile) .byte $0C ; row 018 light grey (lit light tile) .byte $0C ; row 019 light grey (lit light tile) .byte $0C ; row 020 light grey (lit light tile) .byte $0C ; row 021 light grey (lit light tile) .byte $0C ; row 022 light grey (lit light tile) .byte $0C ; row 023 light grey (lit light tile) .byte $0C ; row 024 light grey (lit light tile) .byte $0C ; row 025 light grey (lit light tile) .byte $0C ; row 026 light grey (lit light tile) .byte $0C ; row 027 light grey (lit light tile) .byte $0C ; row 028 light grey (lit light tile) .byte $0C ; row 029 light grey (lit light tile) .byte $0C ; row 030 light grey (lit light tile) .byte $0C ; row 031 light grey (lit light tile) .byte $0C ; row 032 light grey (lit light tile) .byte $0C ; row 033 light grey (lit light tile) .byte $0C ; row 034 light grey (lit light tile) .byte $09 ; row 035 middling gray - color of a hole .byte $09 ; row 036 middling gray - color of a hole .byte $09 ; row 037 middling gray - color of a hole .byte $09 ; row 038 middling gray - color of a hole .byte $06 ; row 039 dark grey (shadowed light tile) .byte $06 ; row 040 dark grey (shadowed light tile) .byte $06 ; row 041 dark grey (shadowed light tile) .byte $08 ; row 042 grey (middling light tile) .byte $08 ; row 043 grey (middling light tile) .byte $08 ; row 044 grey (middling light tile) .byte $08 ; row 045 grey (middling light tile) .byte $04 ; row 046 darker grey (middling dark tile) .byte $04 ; row 047 darker grey (middling dark tile) .byte $04 ; row 048 darker grey (middling dark tile) .byte $04 ; row 049 darker grey (middling dark tile) .byte $02 ; row 050 darkest grey (shadowed dark tile) .byte $02 ; row 051 darkest grey (shadowed dark tile) .byte $02 ; row 052 darkest grey (shadowed dark tile) .byte $09 ; row 053 middling gray - color of a hole .byte $09 ; row 054 middling gray - color of a hole .byte $09 ; row 055 middling gray - color of a hole .byte $09 ; row 056 middling gray - color of a hole .byte $06 ; row 057 dark grey (lit dark tile) .byte $06 ; row 058 dark grey (lit dark tile) .byte $06 ; row 059 dark grey (lit dark tile) .byte $06 ; row 060 dark grey (lit dark tile) .byte $06 ; row 061 dark grey (lit dark tile) .byte $06 ; row 062 dark grey (lit dark tile) .byte $06 ; row 063 dark grey (lit dark tile) .byte $06 ; row 064 dark grey (lit dark tile) .byte $06 ; row 065 dark grey (lit dark tile) .byte $06 ; row 066 dark grey (lit dark tile) .byte $06 ; row 067 dark grey (lit dark tile) .byte $06 ; row 068 dark grey (lit dark tile) .byte $06 ; row 069 dark grey (lit dark tile) .byte $06 ; row 070 dark grey (lit dark tile) .byte $06 ; row 071 dark grey (lit dark tile) .byte $06 ; row 072 dark grey (lit dark tile) .byte $06 ; row 073 dark grey (lit dark tile) .byte $06 ; row 074 dark grey (lit dark tile) .byte $06 ; row 075 dark grey (lit dark tile) .byte $06 ; row 076 dark grey (lit dark tile) .byte $06 ; row 077 dark grey (lit dark tile) .byte $06 ; row 078 dark grey (lit dark tile) .byte $06 ; row 079 dark grey (lit dark tile) .byte $06 ; row 080 dark grey (lit dark tile) .byte $06 ; row 081 dark grey (lit dark tile) .byte $06 ; row 082 dark grey (lit dark tile) .byte $06 ; row 083 dark grey (lit dark tile) .byte $06 ; row 084 dark grey (lit dark tile) .byte $06 ; row 085 dark grey (lit dark tile) .byte $06 ; row 086 dark grey (lit dark tile) .byte $06 ; row 087 dark grey (lit dark tile) .byte $06 ; row 088 dark grey (lit dark tile) .byte $06 ; row 089 dark grey (lit dark tile) .byte $09 ; row 090 middling gray - color of a hole .byte $09 ; row 091 middling gray - color of a hole .byte $09 ; row 092 middling gray - color of a hole .byte $09 ; row 093 middling gray - color of a hole .byte $02 ; row 094 darkest grey (shadowed dark tile) .byte $02 ; row 095 darkest grey (shadowed dark tile) .byte $02 ; row 096 darkest grey (shadowed dark tile) .byte $04 ; row 097 darker grey (middling dark tile) .byte $04 ; row 098 darker grey (middling dark tile) .byte $04 ; row 099 darker grey (middling dark tile) .byte $04 ; row 100 darker grey (middling dark tile) .byte $04 ; row 101 darker grey (middling dark tile) .byte $08 ; row 102 grey (middling light tile) .byte $08 ; row 103 grey (middling light tile) .byte $08 ; row 104 grey (middling light tile) .byte $08 ; row 105 grey (middling light tile) .byte $06 ; row 106 dark grey (shadowed light tile) .byte $06 ; row 107 dark grey (shadowed light tile) .byte $06 ; row 108 dark grey (shadowed light tile) .byte $09 ; row 109 middling gray - color of a hole .byte $09 ; row 110 middling gray - color of a hole .byte $09 ; row 111 middling gray - color of a hole .byte $09 ; row 112 middling gray - color of a hole .byte $0C ; row 113 light grey (lit light tile) .byte $0C ; row 114 light grey (lit light tile) .byte $0C ; row 115 light grey (lit light tile) .byte $0C ; row 116 light grey (lit light tile) .byte $0C ; row 117 light grey (lit light tile) .byte $0C ; row 118 light grey (lit light tile) .byte $0C ; row 119 light grey (lit light tile) .byte $0C ; row 120 light grey (lit light tile) .byte $0C ; row 121 light grey (lit light tile) .byte $0C ; row 122 light grey (lit light tile) .byte $0C ; row 123 light grey (lit light tile) .byte $0C ; row 124 light grey (lit light tile) .byte $0C ; row 125 light grey (lit light tile) .byte $0C ; row 126 light grey (lit light tile) .byte $0C ; row 127 light grey (lit light tile) .byte $0C ; row 128 light grey (lit light tile) .byte $0C ; row 129 light grey (lit light tile) .byte $0C ; row 130 light grey (lit light tile) .byte $0C ; row 131 light grey (lit light tile) .byte $0C ; row 132 light grey (lit light tile) .byte $0C ; row 133 light grey (lit light tile) .byte $0C ; row 134 light grey (lit light tile) .byte $0C ; row 135 light grey (lit light tile) .byte $0C ; row 136 light grey (lit light tile) .byte $0C ; row 137 light grey (lit light tile) .byte $0C ; row 138 light grey (lit light tile) .byte $0C ; row 139 light grey (lit light tile) .byte $0C ; row 140 light grey (lit light tile) .byte $0C ; row 141 light grey (lit light tile) .byte $0C ; row 142 light grey (lit light tile) .byte $0C ; row 143 light grey (lit light tile) .byte $0C ; row 144 light grey (lit light tile) .byte $0C ; row 145 light grey (lit light tile) .byte $09 ; row 146 middling gray - color of a hole .byte $09 ; row 147 middling gray - color of a hole .byte $09 ; row 148 middling gray - color of a hole .byte $09 ; row 149 middling gray - color of a hole .byte $06 ; row 150 dark grey (shadowed light tile) .byte $06 ; row 151 dark grey (shadowed light tile) .byte $06 ; row 152 dark grey (shadowed light tile) .byte $08 ; row 153 grey (middling light tile) .byte $08 ; row 154 grey (middling light tile) .byte $08 ; row 155 grey (middling light tile) .byte $08 ; row 156 grey (middling light tile) .byte $08 ; row 157 grey (middling light tile) .byte $04 ; row 158 darker grey (middling dark tile) .byte $04 ; row 159 darker grey (middling dark tile) .byte $04 ; row 160 darker grey (middling dark tile) .byte $04 ; row 161 darker grey (middling dark tile) .byte $02 ; row 162 darkest grey (shadowed dark tile) .byte $02 ; row 163 darkest grey (shadowed dark tile) .byte $02 ; row 164 darkest grey (shadowed dark tile) .byte $09 ; row 165 middling gray - color of a hole .byte $09 ; row 166 middling gray - color of a hole .byte $09 ; row 167 middling gray - color of a hole .byte $09 ; row 168 middling gray - color of a hole .byte $06 ; row 169 dark grey (lit dark tile) .byte $06 ; row 170 dark grey (lit dark tile) .byte $06 ; row 171 dark grey (lit dark tile) .byte $06 ; row 172 dark grey (lit dark tile) .byte $06 ; row 173 dark grey (lit dark tile) .byte $06 ; row 174 dark grey (lit dark tile) .byte $06 ; row 175 dark grey (lit dark tile) .byte $06 ; row 176 dark grey (lit dark tile) .byte $06 ; row 177 dark grey (lit dark tile) .byte $06 ; row 178 dark grey (lit dark tile) .byte $06 ; row 179 dark grey (lit dark tile) .byte $06 ; row 180 dark grey (lit dark tile) .byte $06 ; row 181 dark grey (lit dark tile) .byte $06 ; row 182 dark grey (lit dark tile) .byte $06 ; row 183 dark grey (lit dark tile) .byte $06 ; row 184 dark grey (lit dark tile) .byte $06 ; row 185 dark grey (lit dark tile) .byte $06 ; row 186 dark grey (lit dark tile) .byte $06 ; row 187 dark grey (lit dark tile) .byte $06 ; row 188 dark grey (lit dark tile) .byte $06 ; row 189 dark grey (lit dark tile) .byte $06 ; row 190 dark grey (lit dark tile) .byte $06 ; row 191 dark grey (lit dark tile) MAPWALL .byte $00 ; row 009 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 010 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 011 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 012 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 013 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 014 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 015 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 016 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 017 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 018 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 019 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 020 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 021 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 022 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 023 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 024 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 025 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 026 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 027 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 028 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 029 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 030 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 031 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 032 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 033 background, not foreground - don't detect collisions, don't place in foreground .byte $00 ; row 034 background, not foreground - don't detect collisions, don't place in foreground .byte $01 ; row 035 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $01 ; row 036 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $06 ; row 037 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $06 ; row 038 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $00 ; row 039 background, not foreground - don't detect collisions .byte $00 ; row 040 background, not foreground - don't detect collisions .byte $00 ; row 041 background, not foreground - don't detect collisions .byte $00 ; row 042 background, not foreground - don't detect collisions .byte $00 ; row 043 background, not foreground - don't detect collisions .byte $00 ; row 044 background, not foreground - don't detect collisions .byte $00 ; row 045 background, not foreground - don't detect collisions .byte $00 ; row 046 background, not foreground - don't detect collisions .byte $00 ; row 047 background, not foreground - don't detect collisions .byte $00 ; row 048 background, not foreground - don't detect collisions .byte $00 ; row 049 background, not foreground - don't detect collisions .byte $00 ; row 050 background, not foreground - don't detect collisions .byte $00 ; row 051 background, not foreground - don't detect collisions .byte $00 ; row 052 background, not foreground - don't detect collisions .byte $0B ; row 053 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $0B ; row 054 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $10 ; row 055 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $10 ; row 056 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $00 ; row 057 background, not foreground - don't detect collisions .byte $00 ; row 058 background, not foreground - don't detect collisions .byte $00 ; row 059 background, not foreground - don't detect collisions .byte $00 ; row 060 background, not foreground - don't detect collisions .byte $00 ; row 061 background, not foreground - don't detect collisions .byte $00 ; row 062 background, not foreground - don't detect collisions .byte $00 ; row 063 background, not foreground - don't detect collisions .byte $00 ; row 064 background, not foreground - don't detect collisions .byte $00 ; row 065 background, not foreground - don't detect collisions .byte $00 ; row 066 background, not foreground - don't detect collisions .byte $00 ; row 067 background, not foreground - don't detect collisions .byte $00 ; row 068 background, not foreground - don't detect collisions .byte $00 ; row 069 background, not foreground - don't detect collisions .byte $00 ; row 070 background, not foreground - don't detect collisions .byte $00 ; row 071 background, not foreground - don't detect collisions .byte $00 ; row 072 background, not foreground - don't detect collisions .byte $00 ; row 073 background, not foreground - don't detect collisions .byte $00 ; row 074 background, not foreground - don't detect collisions .byte $00 ; row 075 background, not foreground - don't detect collisions .byte $00 ; row 076 background, not foreground - don't detect collisions .byte $00 ; row 077 background, not foreground - don't detect collisions .byte $00 ; row 078 background, not foreground - don't detect collisions .byte $00 ; row 079 background, not foreground - don't detect collisions .byte $00 ; row 080 background, not foreground - don't detect collisions .byte $00 ; row 081 background, not foreground - don't detect collisions .byte $00 ; row 082 background, not foreground - don't detect collisions .byte $00 ; row 083 background, not foreground - don't detect collisions .byte $00 ; row 084 background, not foreground - don't detect collisions .byte $00 ; row 085 background, not foreground - don't detect collisions .byte $00 ; row 086 background, not foreground - don't detect collisions .byte $00 ; row 087 background, not foreground - don't detect collisions .byte $00 ; row 088 background, not foreground - don't detect collisions .byte $00 ; row 089 background, not foreground - don't detect collisions .byte $15 ; row 090 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $15 ; row 091 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $1A ; row 092 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $1A ; row 093 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $00 ; row 094 background, not foreground - don't detect collisions .byte $00 ; row 095 background, not foreground - don't detect collisions .byte $00 ; row 096 background, not foreground - don't detect collisions .byte $00 ; row 097 background, not foreground - don't detect collisions .byte $00 ; row 098 background, not foreground - don't detect collisions .byte $00 ; row 099 background, not foreground - don't detect collisions .byte $00 ; row 100 background, not foreground - don't detect collisions .byte $00 ; row 101 background, not foreground - don't detect collisions .byte $00 ; row 102 background, not foreground - don't detect collisions .byte $00 ; row 103 background, not foreground - don't detect collisions .byte $00 ; row 104 background, not foreground - don't detect collisions .byte $00 ; row 105 background, not foreground - don't detect collisions .byte $00 ; row 106 background, not foreground - don't detect collisions .byte $00 ; row 107 background, not foreground - don't detect collisions .byte $00 ; row 108 background, not foreground - don't detect collisions .byte $1F ; row 109 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $1F ; row 110 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $24 ; row 111 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $24 ; row 112 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $00 ; row 113 background, not foreground - don't detect collisions .byte $00 ; row 114 background, not foreground - don't detect collisions .byte $00 ; row 115 background, not foreground - don't detect collisions .byte $00 ; row 116 background, not foreground - don't detect collisions .byte $00 ; row 117 background, not foreground - don't detect collisions .byte $00 ; row 118 background, not foreground - don't detect collisions .byte $00 ; row 119 background, not foreground - don't detect collisions .byte $00 ; row 120 background, not foreground - don't detect collisions .byte $00 ; row 121 background, not foreground - don't detect collisions .byte $00 ; row 122 background, not foreground - don't detect collisions .byte $00 ; row 123 background, not foreground - don't detect collisions .byte $00 ; row 124 background, not foreground - don't detect collisions .byte $00 ; row 125 background, not foreground - don't detect collisions .byte $00 ; row 126 background, not foreground - don't detect collisions .byte $00 ; row 127 background, not foreground - don't detect collisions .byte $00 ; row 128 background, not foreground - don't detect collisions .byte $00 ; row 129 background, not foreground - don't detect collisions .byte $00 ; row 130 background, not foreground - don't detect collisions .byte $00 ; row 131 background, not foreground - don't detect collisions .byte $00 ; row 132 background, not foreground - don't detect collisions .byte $00 ; row 133 background, not foreground - don't detect collisions .byte $00 ; row 134 background, not foreground - don't detect collisions .byte $00 ; row 135 background, not foreground - don't detect collisions .byte $00 ; row 136 background, not foreground - don't detect collisions .byte $00 ; row 137 background, not foreground - don't detect collisions .byte $00 ; row 138 background, not foreground - don't detect collisions .byte $00 ; row 139 background, not foreground - don't detect collisions .byte $00 ; row 140 background, not foreground - don't detect collisions .byte $00 ; row 141 background, not foreground - don't detect collisions .byte $00 ; row 142 background, not foreground - don't detect collisions .byte $00 ; row 143 background, not foreground - don't detect collisions .byte $00 ; row 144 background, not foreground - don't detect collisions .byte $00 ; row 145 background, not foreground - don't detect collisions .byte $29 ; row 146 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $29 ; row 147 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $2E ; row 148 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $2E ; row 149 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $00 ; row 150 background, not foreground - don't detect collisions .byte $00 ; row 151 background, not foreground - don't detect collisions .byte $00 ; row 152 background, not foreground - don't detect collisions .byte $00 ; row 153 background, not foreground - don't detect collisions .byte $00 ; row 154 background, not foreground - don't detect collisions .byte $00 ; row 155 background, not foreground - don't detect collisions .byte $00 ; row 156 background, not foreground - don't detect collisions .byte $00 ; row 157 background, not foreground - don't detect collisions .byte $00 ; row 158 background, not foreground - don't detect collisions .byte $00 ; row 159 background, not foreground - don't detect collisions .byte $00 ; row 160 background, not foreground - don't detect collisions .byte $00 ; row 161 background, not foreground - don't detect collisions .byte $00 ; row 162 background, not foreground - don't detect collisions .byte $00 ; row 163 background, not foreground - don't detect collisions .byte $00 ; row 164 background, not foreground - don't detect collisions .byte $33 ; row 165 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $33 ; row 166 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $38 ; row 167 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $38 ; row 168 non-zero means foreground - detect collisions and set priority high - and indicates HOLES map range to use .byte $00 ; row 169 background, not foreground - don't detect collisions .byte $00 ; row 170 background, not foreground - don't detect collisions .byte $00 ; row 171 background, not foreground - don't detect collisions .byte $00 ; row 172 background, not foreground - don't detect collisions .byte $00 ; row 173 background, not foreground - don't detect collisions .byte $00 ; row 174 background, not foreground - don't detect collisions .byte $00 ; row 175 background, not foreground - don't detect collisions .byte $00 ; row 176 background, not foreground - don't detect collisions .byte $00 ; row 177 background, not foreground - don't detect collisions .byte $00 ; row 178 background, not foreground - don't detect collisions .byte $00 ; row 179 background, not foreground - don't detect collisions .byte $00 ; row 180 background, not foreground - don't detect collisions .byte $00 ; row 181 background, not foreground - don't detect collisions .byte $00 ; row 182 background, not foreground - don't detect collisions .byte $00 ; row 183 background, not foreground - don't detect collisions .byte $00 ; row 184 background, not foreground - don't detect collisions .byte $00 ; row 185 background, not foreground - don't detect collisions .byte $00 ; row 186 background, not foreground - don't detect collisions .byte $00 ; row 187 background, not foreground - don't detect collisions .byte $00 ; row 188 background, not foreground - don't detect collisions .byte $00 ; row 189 background, not foreground - don't detect collisions .byte $00 ; row 190 background, not foreground - don't detect collisions .byte $00 ; row 191 background, not foreground - don't detect collisions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Interrupt Vectors ORG $FFFA .word Reset ; NMI .word Reset ; RESET .word Reset ; IRQ END