| 1 | ; ============================================================================ |
| 2 | ; P65 VDP demo: waving rolling rainbow, sine-bouncing sprite text, smooth |
| 3 | ; scroller. Standalone ROM ($8100..$FFFF), assemble with tools/asm2bin.sh. |
| 4 | ; |
| 5 | ; * Graphics I mode. The rainbow is 24 solid tile groups; the colour table is |
| 6 | ; rotated every few frames (rolling) and every row of the name table starts |
| 7 | ; at a different column from a sine table (waving). |
| 8 | ; * The letters are 10 magnified 8x8 sprites on a sine wave, colours cycling. |
| 9 | ; The wave is chosen so that never more than 4 sprites share a scanline. |
| 10 | ; * The scroller redefines 32 tile patterns every frame: a 256x8 bit buffer is |
| 11 | ; shifted left by one pixel (ROL chains) and uploaded to the pattern table. |
| 12 | ; * The three LEDs run a light chaser (red, yellow, green, yellow, ...). |
| 13 | ; * Everything is paced by the 60 Hz VSYNC interrupt (VDP R1 bit 5), the main |
| 14 | ; loop sleeps on WAI. |
| 15 | ; |
| 16 | ; VRAM: $0000 sprite patterns (ROM font, name = ASCII) $0800 tile patterns |
| 17 | ; $1000 sprite attributes $1400 name table $2000 colour table |
| 18 | ; ============================================================================ |
| 19 | |
| 20 | .setcpu "W65C02" |
| 21 | |
| 22 | VDATA = $8002 |
| 23 | VCTRL = $8003 ; write: address / register, read: status |
| 24 | |
| 25 | SCROLL_PX = 2 ; pixels per frame |
| 26 | |
| 27 | ; zero page |
| 28 | frame = $00 ; counted by the IRQ handler |
| 29 | t = $01 ; frames processed by the main loop |
| 30 | t3 = $02 |
| 31 | t4 = $03 |
| 32 | cdiv = $04 |
| 33 | cshift = $05 |
| 34 | tc = $06 |
| 35 | ph = $07 |
| 36 | i = $08 |
| 37 | n = $09 |
| 38 | bitsleft = $0A |
| 39 | tp = $0B ; scroll text pointer (2 bytes) |
| 40 | gp = $0D ; glyph pointer (2 bytes) |
| 41 | ptr = $0F ; (2 bytes) |
| 42 | feed = $11 ; 8 bytes: glyph being shifted in (to $18) |
| 43 | ldiv = $19 ; frames until the LED chaser moves on |
| 44 | lpos = $1A ; position in the chaser pattern |
| 45 | |
| 46 | LED_FRAMES = 6 ; chaser speed: one step every 6 frames (10 steps/s) |
| 47 | LEDPORT = $8000 ; bits 0-2: LED0 (red), LED1 (yellow), LED2 (green) |
| 48 | |
| 49 | ; scroller bit buffer: 8 rows x 32 bytes (one row = 256 pixels) |
| 50 | row0 = $0200 |
| 51 | row1 = $0220 |
| 52 | row2 = $0240 |
| 53 | row3 = $0260 |
| 54 | row4 = $0280 |
| 55 | row5 = $02A0 |
| 56 | row6 = $02C0 |
| 57 | row7 = $02E0 |
| 58 | |
| 59 | .macro vram_write addr |
| 60 | lda #<(addr) |
| 61 | sta VCTRL |
| 62 | lda #(((addr) >> 8) | $40) |
| 63 | sta VCTRL |
| 64 | .endmacro |
| 65 | |
| 66 | .macro SHROW rn, rowarr |
| 67 | asl feed+rn ; MSB of the incoming glyph row -> carry |
| 68 | ldx #31 |
| 69 | : rol rowarr,x ; shift the row left, carry runs leftwards |
| 70 | dex ; (DEX does not touch the carry) |
| 71 | bpl :- |
| 72 | .endmacro |
| 73 | |
| 74 | .org $8100 |
| 75 | |
| 76 | ; --------------------------------------------------------------------------- |
| 77 | reset: |
| 78 | sei |
| 79 | cld |
| 80 | ldx #$ff |
| 81 | txs |
| 82 | ldx #$1a |
| 83 | lda #$00 |
| 84 | : sta $00,x ; clear our zero page |
| 85 | dex |
| 86 | bpl :- |
| 87 | lda #1 ; LEDs: start the chaser at LED0 |
| 88 | sta LEDPORT |
| 89 | |
| 90 | ; VDP registers |
| 91 | ldx #0 |
| 92 | : lda vdpregs,x |
| 93 | sta VCTRL |
| 94 | txa |
| 95 | ora #$80 |
| 96 | sta VCTRL |
| 97 | inx |
| 98 | cpx #8 |
| 99 | bne :- |
| 100 | |
| 101 | ; sprite patterns: the ROM font (128 glyphs) -> $0000, sprite name = ASCII |
| 102 | vram_write $0000 |
| 103 | lda #<font |
| 104 | sta ptr |
| 105 | lda #>font |
| 106 | sta ptr+1 |
| 107 | ldx #4 |
| 108 | @page: ldy #0 |
| 109 | : lda (ptr),y |
| 110 | sta VDATA |
| 111 | iny |
| 112 | bne :- |
| 113 | inc ptr+1 |
| 114 | dex |
| 115 | bne @page |
| 116 | |
| 117 | ; tile patterns: 256 solid blocks ($0800-$0FFF); the scroller rewrites the last 32 |
| 118 | vram_write $0800 |
| 119 | ldx #8 |
| 120 | lda #$ff |
| 121 | @fill: ldy #0 |
| 122 | : sta VDATA |
| 123 | iny |
| 124 | bne :- |
| 125 | dex |
| 126 | bne @fill |
| 127 | |
| 128 | ; name table: rows 6-17 are black ($C0, colour group 24); row 16 is the scroller |
| 129 | vram_write $14C0 |
| 130 | ldx #10 ; rows 6..15 |
| 131 | @blk: ldy #32 |
| 132 | lda #$c0 |
| 133 | : sta VDATA |
| 134 | dey |
| 135 | bne :- |
| 136 | dex |
| 137 | bne @blk |
| 138 | ldx #224 ; row 16: tiles 224..255 (scroller) |
| 139 | : stx VDATA |
| 140 | inx |
| 141 | bne :- |
| 142 | ldy #32 ; row 17 |
| 143 | lda #$c0 |
| 144 | : sta VDATA |
| 145 | dey |
| 146 | bne :- |
| 147 | |
| 148 | ; scroller buffer and text |
| 149 | ldx #0 |
| 150 | lda #0 |
| 151 | : sta row0,x |
| 152 | inx |
| 153 | bne :- |
| 154 | lda #<scrolltext |
| 155 | sta tp |
| 156 | lda #>scrolltext |
| 157 | sta tp+1 |
| 158 | lda #1 |
| 159 | sta bitsleft |
| 160 | |
| 161 | jsr update ; first picture |
| 162 | lda #$e1 ; now switch the display on (R1 = $E1) |
| 163 | sta VCTRL |
| 164 | lda #$81 |
| 165 | sta VCTRL |
| 166 | lda VCTRL ; discard a stale frame flag |
| 167 | cli |
| 168 | |
| 169 | main: lda frame |
| 170 | @wait: wai ; sleep until the next interrupt |
| 171 | cmp frame |
| 172 | beq @wait |
| 173 | jsr update |
| 174 | bra main |
| 175 | |
| 176 | ; --------------------------------------------------------------------------- |
| 177 | ; VSYNC interrupt: the IRQ line is released a little after the status read, so |
| 178 | ; this can be entered again with the frame flag clear - those entries are ignored. |
| 179 | irq: pha |
| 180 | lda VCTRL ; read status: clears the flag, releases /IRQ |
| 181 | bpl @done |
| 182 | inc frame |
| 183 | @done: pla |
| 184 | rti |
| 185 | |
| 186 | ; --------------------------------------------------------------------------- |
| 187 | ; one animation step |
| 188 | update: |
| 189 | inc t |
| 190 | lda t |
| 191 | asl |
| 192 | clc |
| 193 | adc t |
| 194 | sta t3 ; 3t |
| 195 | lda t |
| 196 | asl |
| 197 | asl |
| 198 | sta t4 ; 4t |
| 199 | |
| 200 | inc cdiv ; rainbow rolls one group every 3 frames |
| 201 | lda cdiv |
| 202 | cmp #3 |
| 203 | bcc @c1 |
| 204 | stz cdiv |
| 205 | inc cshift |
| 206 | lda cshift |
| 207 | cmp #24 |
| 208 | bcc @c1 |
| 209 | stz cshift |
| 210 | @c1: lda t ; letter colours move on every 4 frames |
| 211 | and #3 |
| 212 | bne @c2 |
| 213 | inc tc |
| 214 | lda tc |
| 215 | cmp #10 |
| 216 | bcc @c2 |
| 217 | stz tc |
| 218 | @c2: inc ldiv ; LED light chaser: 0 1 2 1 0 1 2 1 ... |
| 219 | lda ldiv |
| 220 | cmp #LED_FRAMES |
| 221 | bcc @c3 |
| 222 | stz ldiv |
| 223 | lda lpos |
| 224 | inc |
| 225 | and #3 |
| 226 | sta lpos |
| 227 | tax |
| 228 | lda ledtab,x |
| 229 | sta LEDPORT |
| 230 | @c3: |
| 231 | |
| 232 | ; --- colour table: 24 rotated rainbow entries + 4 black + 4 white-on-black |
| 233 | vram_write $2000 |
| 234 | ldx cshift |
| 235 | ldy #24 |
| 236 | : lda rb48,x |
| 237 | sta VDATA |
| 238 | inx |
| 239 | dey |
| 240 | bne :- |
| 241 | ldx #0 |
| 242 | : lda colstatic,x |
| 243 | sta VDATA |
| 244 | inx |
| 245 | cpx #8 |
| 246 | bne :- |
| 247 | |
| 248 | ; --- name table: 6 rainbow rows at the top, 6 at the bottom |
| 249 | vram_write $1400 |
| 250 | lda t3 |
| 251 | sta ph |
| 252 | lda #6 |
| 253 | sta i |
| 254 | : lda ph |
| 255 | jsr rainbow_row |
| 256 | lda ph |
| 257 | clc |
| 258 | adc #13 |
| 259 | sta ph |
| 260 | dec i |
| 261 | bne :- |
| 262 | vram_write $1640 |
| 263 | lda #6 |
| 264 | sta i |
| 265 | : lda ph |
| 266 | jsr rainbow_row |
| 267 | lda ph |
| 268 | clc |
| 269 | adc #13 |
| 270 | sta ph |
| 271 | dec i |
| 272 | bne :- |
| 273 | |
| 274 | ; --- the 10 letter sprites |
| 275 | vram_write $1000 |
| 276 | stz i |
| 277 | @spr: ldx i |
| 278 | lda t4 |
| 279 | clc |
| 280 | adc yph,x |
| 281 | tay |
| 282 | lda ysin,y |
| 283 | sta VDATA ; Y |
| 284 | lda t3 |
| 285 | clc |
| 286 | adc xph,x |
| 287 | tay |
| 288 | lda xs,y |
| 289 | clc |
| 290 | adc basex,x |
| 291 | sta VDATA ; X |
| 292 | lda letters,x |
| 293 | sta VDATA ; pattern = ASCII |
| 294 | txa |
| 295 | clc |
| 296 | adc tc |
| 297 | tay |
| 298 | lda tcol20,y |
| 299 | sta VDATA ; colour |
| 300 | inc i |
| 301 | lda i |
| 302 | cmp #10 |
| 303 | bne @spr |
| 304 | lda #$d0 ; end of the sprite list |
| 305 | sta VDATA |
| 306 | |
| 307 | ; --- scroller |
| 308 | lda #SCROLL_PX |
| 309 | sta n |
| 310 | : jsr scroll1 |
| 311 | dec n |
| 312 | bne :- |
| 313 | vram_write $0F00 |
| 314 | ldy #0 |
| 315 | : lda row0,y |
| 316 | sta VDATA |
| 317 | lda row1,y |
| 318 | sta VDATA |
| 319 | lda row2,y |
| 320 | sta VDATA |
| 321 | lda row3,y |
| 322 | sta VDATA |
| 323 | lda row4,y |
| 324 | sta VDATA |
| 325 | lda row5,y |
| 326 | sta VDATA |
| 327 | lda row6,y |
| 328 | sta VDATA |
| 329 | lda row7,y |
| 330 | sta VDATA |
| 331 | iny |
| 332 | cpy #32 |
| 333 | bne :- |
| 334 | rts |
| 335 | |
| 336 | ; --------------------------------------------------------------------------- |
| 337 | ; one row of 32 name table entries; A = phase into the wave table |
| 338 | rainbow_row: |
| 339 | tax |
| 340 | lda wob,x ; start column 4..20 |
| 341 | tax |
| 342 | ldy #32 |
| 343 | : lda grp48,x |
| 344 | sta VDATA |
| 345 | inx |
| 346 | dey |
| 347 | bne :- |
| 348 | rts |
| 349 | |
| 350 | ; --------------------------------------------------------------------------- |
| 351 | ; shift the scroller left by one pixel, feed in the next bit of the text |
| 352 | scroll1: |
| 353 | SHROW 0, row0 |
| 354 | SHROW 1, row1 |
| 355 | SHROW 2, row2 |
| 356 | SHROW 3, row3 |
| 357 | SHROW 4, row4 |
| 358 | SHROW 5, row5 |
| 359 | SHROW 6, row6 |
| 360 | SHROW 7, row7 |
| 361 | dec bitsleft |
| 362 | bne @done |
| 363 | lda #8 ; glyph used up: fetch the next character |
| 364 | sta bitsleft |
| 365 | lda (tp) |
| 366 | bne @have |
| 367 | lda #<scrolltext ; end of text: start again |
| 368 | sta tp |
| 369 | lda #>scrolltext |
| 370 | sta tp+1 |
| 371 | lda (tp) |
| 372 | @have: inc tp |
| 373 | bne :+ |
| 374 | inc tp+1 |
| 375 | : sta gp ; glyph address = font + char * 8 |
| 376 | stz gp+1 |
| 377 | asl gp |
| 378 | rol gp+1 |
| 379 | asl gp |
| 380 | rol gp+1 |
| 381 | asl gp |
| 382 | rol gp+1 |
| 383 | clc |
| 384 | lda gp+1 |
| 385 | adc #>font |
| 386 | sta gp+1 |
| 387 | ldy #7 |
| 388 | : lda (gp),y |
| 389 | sta feed,y |
| 390 | dey |
| 391 | bpl :- |
| 392 | @done: rts |
| 393 | |
| 394 | ; --------------------------------------------------------------------------- |
| 395 | vdpregs: .byte $00, $A1, $05, $80, $01, $20, $00, $01 |
| 396 | ; R0 graphics I | R1 16K, display OFF (until the first picture is ready), IRQ on, |
| 397 | ; sprites 8x8 magnified - $E1 turns the display on |
| 398 | ; R2 names $1400 | R3 colours $2000 | R4 patterns $0800 |
| 399 | ; R5 sprite attributes $1000 | R6 sprite patterns $0000 | R7 black |
| 400 | colstatic: .byte $11, $11, $11, $11, $F1, $F1, $F1, $F1 |
| 401 | ledtab: .byte $01, $02, $04, $02 ; light chaser: LED0, LED1, LED2, LED1, ... |
| 402 | |
| 403 | ; 24 rainbow colours (12 hues, each twice), repeated so a window of 24 never wraps |
| 404 | rb48: .byte $66, $66, $88, $88, $99, $99, $AA, $AA, $BB, $BB, $33, $33 |
| 405 | .byte $22, $22, $CC, $CC, $77, $77, $55, $55, $44, $44, $DD, $DD |
| 406 | .byte $66, $66, $88, $88, $99, $99, $AA, $AA, $BB, $BB, $33, $33 |
| 407 | .byte $22, $22, $CC, $CC, $77, $77, $55, $55, $44, $44, $DD, $DD |
| 408 | ; name table entries: colour group k mod 24 (solid block tile = group * 8) |
| 409 | grp48: .byte $00, $08, $10, $18, $20, $28, $30, $38, $40, $48, $50, $58 |
| 410 | .byte $60, $68, $70, $78, $80, $88, $90, $98, $A0, $A8, $B0, $B8 |
| 411 | .byte $00, $08, $10, $18, $20, $28, $30, $38, $40, $48, $50, $58 |
| 412 | .byte $60, $68, $70, $78, $80, $88, $90, $98, $A0, $A8, $B0, $B8 |
| 413 | .byte $00, $08, $10, $18, $20, $28, $30, $38 |
| 414 | ; stripe shift per row: 12 + 8 sin |
| 415 | wob: .byte $0C, $0C, $0C, $0D, $0D, $0D, $0D, $0D, $0E, $0E, $0E, $0E, $0E, $0F, $0F, $0F |
| 416 | .byte $0F, $0F, $0F, $10, $10, $10, $10, $10, $10, $11, $11, $11, $11, $11, $11, $12 |
| 417 | .byte $12, $12, $12, $12, $12, $12, $12, $13, $13, $13, $13, $13, $13, $13, $13, $13 |
| 418 | .byte $13, $13, $14, $14, $14, $14, $14, $14, $14, $14, $14, $14, $14, $14, $14, $14 |
| 419 | .byte $14, $14, $14, $14, $14, $14, $14, $14, $14, $14, $14, $14, $14, $14, $14, $13 |
| 420 | .byte $13, $13, $13, $13, $13, $13, $13, $13, $13, $13, $12, $12, $12, $12, $12, $12 |
| 421 | .byte $12, $12, $11, $11, $11, $11, $11, $11, $10, $10, $10, $10, $10, $10, $0F, $0F |
| 422 | .byte $0F, $0F, $0F, $0F, $0E, $0E, $0E, $0E, $0E, $0D, $0D, $0D, $0D, $0D, $0C, $0C |
| 423 | .byte $0C, $0C, $0C, $0B, $0B, $0B, $0B, $0B, $0A, $0A, $0A, $0A, $0A, $09, $09, $09 |
| 424 | .byte $09, $09, $09, $08, $08, $08, $08, $08, $08, $07, $07, $07, $07, $07, $07, $06 |
| 425 | .byte $06, $06, $06, $06, $06, $06, $06, $05, $05, $05, $05, $05, $05, $05, $05, $05 |
| 426 | .byte $05, $05, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04 |
| 427 | .byte $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $05 |
| 428 | .byte $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $06, $06, $06, $06, $06, $06 |
| 429 | .byte $06, $06, $07, $07, $07, $07, $07, $07, $08, $08, $08, $08, $08, $08, $09, $09 |
| 430 | .byte $09, $09, $09, $09, $0A, $0A, $0A, $0A, $0A, $0B, $0B, $0B, $0B, $0B, $0C, $0C |
| 431 | ; letter Y: 84 + 24 sin |
| 432 | ysin: .byte $54, $55, $55, $56, $56, $57, $58, $58, $59, $59, $5A, $5A, $5B, $5C, $5C, $5D |
| 433 | .byte $5D, $5E, $5E, $5F, $5F, $60, $60, $61, $61, $62, $62, $63, $63, $64, $64, $65 |
| 434 | .byte $65, $65, $66, $66, $67, $67, $67, $68, $68, $68, $69, $69, $69, $69, $6A, $6A |
| 435 | .byte $6A, $6A, $6B, $6B, $6B, $6B, $6B, $6B, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C |
| 436 | .byte $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6B, $6B, $6B, $6B, $6B, $6B, $6A |
| 437 | .byte $6A, $6A, $6A, $69, $69, $69, $69, $68, $68, $68, $67, $67, $67, $66, $66, $65 |
| 438 | .byte $65, $65, $64, $64, $63, $63, $62, $62, $61, $61, $60, $60, $5F, $5F, $5E, $5E |
| 439 | .byte $5D, $5D, $5C, $5C, $5B, $5A, $5A, $59, $59, $58, $58, $57, $56, $56, $55, $55 |
| 440 | .byte $54, $53, $53, $52, $52, $51, $50, $50, $4F, $4F, $4E, $4E, $4D, $4C, $4C, $4B |
| 441 | .byte $4B, $4A, $4A, $49, $49, $48, $48, $47, $47, $46, $46, $45, $45, $44, $44, $43 |
| 442 | .byte $43, $43, $42, $42, $41, $41, $41, $40, $40, $40, $3F, $3F, $3F, $3F, $3E, $3E |
| 443 | .byte $3E, $3E, $3D, $3D, $3D, $3D, $3D, $3D, $3C, $3C, $3C, $3C, $3C, $3C, $3C, $3C |
| 444 | .byte $3C, $3C, $3C, $3C, $3C, $3C, $3C, $3C, $3C, $3D, $3D, $3D, $3D, $3D, $3D, $3E |
| 445 | .byte $3E, $3E, $3E, $3F, $3F, $3F, $3F, $40, $40, $40, $41, $41, $41, $42, $42, $43 |
| 446 | .byte $43, $43, $44, $44, $45, $45, $46, $46, $47, $47, $48, $48, $49, $49, $4A, $4A |
| 447 | .byte $4B, $4B, $4C, $4C, $4D, $4E, $4E, $4F, $4F, $50, $50, $51, $52, $52, $53, $53 |
| 448 | ; letter X wobble: 3 + 3 sin |
| 449 | xs: .byte $03, $03, $03, $03, $03, $03, $03, $04, $04, $04, $04, $04, $04, $04, $04, $04 |
| 450 | .byte $04, $04, $04, $04, $04, $04, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05 |
| 451 | .byte $05, $05, $05, $05, $05, $05, $05, $05, $05, $06, $06, $06, $06, $06, $06, $06 |
| 452 | .byte $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06 |
| 453 | .byte $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06 |
| 454 | .byte $06, $06, $06, $06, $06, $06, $06, $06, $05, $05, $05, $05, $05, $05, $05, $05 |
| 455 | .byte $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $04, $04, $04, $04, $04 |
| 456 | .byte $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $03, $03, $03, $03, $03, $03 |
| 457 | .byte $03, $03, $03, $03, $03, $03, $03, $02, $02, $02, $02, $02, $02, $02, $02, $02 |
| 458 | .byte $02, $02, $02, $02, $02, $02, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01 |
| 459 | .byte $01, $01, $01, $01, $01, $01, $01, $01, $01, $00, $00, $00, $00, $00, $00, $00 |
| 460 | .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 |
| 461 | .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 |
| 462 | .byte $00, $00, $00, $00, $00, $00, $00, $00, $01, $01, $01, $01, $01, $01, $01, $01 |
| 463 | .byte $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $02, $02, $02, $02, $02 |
| 464 | .byte $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $03, $03, $03, $03, $03, $03 |
| 465 | ; PORTABLE 65 (without the space) |
| 466 | letters: .byte $50, $4F, $52, $54, $41, $42, $4C, $45, $36, $35 |
| 467 | basex: .byte $30, $3E, $4C, $5A, $68, $76, $84, $92, $AE, $BC |
| 468 | ; phase offsets 52 per letter: <= 4 sprites on any scanline |
| 469 | yph: .byte $00, $34, $68, $9C, $D0, $04, $38, $6C, $A0, $D4 |
| 470 | xph: .byte $00, $25, $4A, $6F, $94, $B9, $DE, $03, $28, $4D |
| 471 | tcol20: .byte $09, $0B, $03, $07, $05, $0D, $0F, $08, $0A, $02 |
| 472 | .byte $09, $0B, $03, $07, $05, $0D, $0F, $08, $0A, $02 |
| 473 | |
| 474 | scrolltext: |
| 475 | .byte " *** PORTABLE 65 *** W65C02S + EMULAT" |
| 476 | .byte "ED TMS9918 *** 60 FPS WITH VSYNC IRQ ***" |
| 477 | .byte " RAINBOWS, SINE SPRITES AND A SMOOTH SCR" |
| 478 | .byte "OLLER *** GREETINGS TO ALL 6502 FANS ***" |
| 479 | .byte " " |
| 480 | .byte 0 |
| 481 | |
| 482 | .align 256 |
| 483 | ; ROM font: 128 glyphs of 8 bytes, index = ASCII (copied from testrom1.a65) |
| 484 | font: .byte $00, $00, $00, $00, $00, $00, $00, $00 |
| 485 | .byte $E0, $E0, $E0, $E0, $00, $00, $00, $00 |
| 486 | .byte $1C, $1C, $1C, $1C, $00, $00, $00, $00 |
| 487 | .byte $FC, $FC, $FC, $FC, $00, $00, $00, $00 |
| 488 | .byte $00, $00, $00, $00, $E0, $E0, $E0, $E0 |
| 489 | .byte $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0 |
| 490 | .byte $1C, $1C, $1C, $1C, $E0, $E0, $E0, $E0 |
| 491 | .byte $FC, $FC, $FC, $FC, $E0, $E0, $E0, $E0 |
| 492 | .byte $00, $00, $00, $00, $1C, $1C, $1C, $1C |
| 493 | .byte $E0, $E0, $E0, $E0, $1C, $1C, $1C, $1C |
| 494 | .byte $1C, $1C, $1C, $1C, $1C, $1C, $1C, $1C |
| 495 | .byte $FC, $FC, $FC, $FC, $1C, $1C, $1C, $1C |
| 496 | .byte $00, $00, $00, $00, $FC, $FC, $FC, $FC |
| 497 | .byte $E0, $E0, $E0, $E0, $FC, $FC, $FC, $FC |
| 498 | .byte $1C, $1C, $1C, $1C, $FC, $FC, $FC, $FC |
| 499 | .byte $FC, $FC, $FC, $FC, $FC, $FC, $FC, $FC |
| 500 | .byte $00, $00, $00, $3C, $20, $20, $20, $20 |
| 501 | .byte $00, $00, $00, $FC, $20, $20, $20, $20 |
| 502 | .byte $00, $00, $00, $E0, $20, $20, $20, $20 |
| 503 | .byte $20, $20, $20, $20, $20, $20, $20, $20 |
| 504 | .byte $20, $20, $20, $3C, $20, $20, $20, $20 |
| 505 | .byte $20, $20, $20, $FC, $20, $20, $20, $20 |
| 506 | .byte $20, $20, $20, $E0, $20, $20, $20, $20 |
| 507 | .byte $20, $20, $20, $3C, $00, $00, $00, $00 |
| 508 | .byte $20, $20, $20, $FC, $00, $00, $00, $00 |
| 509 | .byte $20, $20, $20, $E0, $00, $00, $00, $00 |
| 510 | .byte $00, $00, $00, $FC, $00, $00, $00, $00 |
| 511 | .byte $00, $00, $70, $70, $70, $00, $00, $00 |
| 512 | .byte $20, $70, $A8, $20, $20, $20, $20, $00 |
| 513 | .byte $20, $20, $20, $20, $A8, $70, $20, $00 |
| 514 | .byte $00, $20, $40, $F8, $40, $20, $00, $00 |
| 515 | .byte $00, $20, $10, $F8, $10, $20, $00, $00 |
| 516 | .byte $00, $00, $00, $00, $00, $00, $00, $00 |
| 517 | .byte $20, $20, $20, $20, $20, $00, $20, $00 |
| 518 | .byte $50, $50, $50, $00, $00, $00, $00, $00 |
| 519 | .byte $50, $50, $F8, $50, $F8, $50, $50, $00 |
| 520 | .byte $20, $70, $80, $70, $08, $70, $20, $00 |
| 521 | .byte $00, $88, $10, $20, $40, $88, $00, $00 |
| 522 | .byte $40, $A0, $A0, $48, $B0, $90, $68, $00 |
| 523 | .byte $20, $20, $40, $00, $00, $00, $00, $00 |
| 524 | .byte $10, $20, $40, $40, $40, $20, $10, $00 |
| 525 | .byte $40, $20, $10, $10, $10, $20, $40, $00 |
| 526 | .byte $20, $A8, $70, $20, $70, $A8, $20, $00 |
| 527 | .byte $00, $20, $20, $F8, $20, $20, $00, $00 |
| 528 | .byte $00, $00, $00, $00, $00, $20, $20, $40 |
| 529 | .byte $00, $00, $00, $70, $00, $00, $00, $00 |
| 530 | .byte $00, $00, $00, $00, $00, $00, $20, $00 |
| 531 | .byte $00, $00, $08, $10, $20, $40, $80, $00 |
| 532 | .byte $70, $88, $98, $A8, $C8, $88, $70, $00 |
| 533 | .byte $20, $60, $20, $20, $20, $20, $70, $00 |
| 534 | .byte $70, $88, $08, $30, $40, $80, $F8, $00 |
| 535 | .byte $70, $88, $08, $30, $08, $88, $70, $00 |
| 536 | .byte $10, $30, $50, $90, $F8, $10, $10, $00 |
| 537 | .byte $F8, $80, $F0, $08, $08, $88, $70, $00 |
| 538 | .byte $30, $40, $80, $F0, $88, $88, $70, $00 |
| 539 | .byte $F8, $08, $10, $20, $40, $40, $40, $00 |
| 540 | .byte $70, $88, $88, $70, $88, $88, $70, $00 |
| 541 | .byte $70, $88, $88, $78, $08, $10, $60, $00 |
| 542 | .byte $00, $00, $00, $20, $00, $20, $00, $00 |
| 543 | .byte $00, $00, $00, $20, $00, $20, $20, $40 |
| 544 | .byte $10, $20, $40, $80, $40, $20, $10, $00 |
| 545 | .byte $00, $00, $00, $F8, $00, $F8, $00, $00 |
| 546 | .byte $80, $40, $20, $10, $20, $40, $80, $00 |
| 547 | .byte $70, $88, $10, $20, $20, $00, $20, $00 |
| 548 | .byte $70, $88, $88, $B8, $B8, $80, $70, $00 |
| 549 | .byte $20, $50, $88, $88, $F8, $88, $88, $00 |
| 550 | .byte $F0, $88, $88, $F0, $88, $88, $F0, $00 |
| 551 | .byte $70, $88, $80, $80, $80, $88, $70, $00 |
| 552 | .byte $F0, $88, $88, $88, $88, $88, $F0, $00 |
| 553 | .byte $F8, $80, $80, $F0, $80, $80, $F8, $00 |
| 554 | .byte $F8, $80, $80, $F0, $80, $80, $80, $00 |
| 555 | .byte $70, $88, $80, $98, $88, $88, $78, $00 |
| 556 | .byte $88, $88, $88, $F8, $88, $88, $88, $00 |
| 557 | .byte $70, $20, $20, $20, $20, $20, $70, $00 |
| 558 | .byte $08, $08, $08, $08, $88, $88, $70, $00 |
| 559 | .byte $88, $90, $A0, $C0, $A0, $90, $88, $00 |
| 560 | .byte $80, $80, $80, $80, $80, $80, $F8, $00 |
| 561 | .byte $88, $D8, $A8, $A8, $88, $88, $88, $00 |
| 562 | .byte $88, $88, $C8, $A8, $98, $88, $88, $00 |
| 563 | .byte $70, $88, $88, $88, $88, $88, $70, $00 |
| 564 | .byte $F0, $88, $88, $F0, $80, $80, $80, $00 |
| 565 | .byte $70, $88, $88, $88, $88, $90, $68, $00 |
| 566 | .byte $F0, $88, $88, $F0, $A0, $90, $88, $00 |
| 567 | .byte $70, $88, $80, $70, $08, $88, $70, $00 |
| 568 | .byte $F8, $20, $20, $20, $20, $20, $20, $00 |
| 569 | .byte $88, $88, $88, $88, $88, $88, $70, $00 |
| 570 | .byte $88, $88, $88, $88, $88, $50, $20, $00 |
| 571 | .byte $88, $88, $88, $A8, $A8, $D8, $88, $00 |
| 572 | .byte $88, $88, $50, $20, $50, $88, $88, $00 |
| 573 | .byte $88, $88, $88, $50, $20, $20, $20, $00 |
| 574 | .byte $F8, $08, $10, $20, $40, $80, $F8, $00 |
| 575 | .byte $70, $40, $40, $40, $40, $40, $70, $00 |
| 576 | .byte $00, $00, $80, $40, $20, $10, $08, $00 |
| 577 | .byte $70, $10, $10, $10, $10, $10, $70, $00 |
| 578 | .byte $20, $50, $88, $00, $00, $00, $00, $00 |
| 579 | .byte $00, $00, $00, $00, $00, $00, $00, $FC |
| 580 | .byte $40, $20, $10, $00, $00, $00, $00, $00 |
| 581 | .byte $00, $00, $70, $08, $78, $88, $78, $00 |
| 582 | .byte $80, $80, $B0, $C8, $88, $88, $F0, $00 |
| 583 | .byte $00, $00, $70, $88, $80, $88, $70, $00 |
| 584 | .byte $08, $08, $68, $98, $88, $88, $78, $00 |
| 585 | .byte $00, $00, $70, $88, $F8, $80, $78, $00 |
| 586 | .byte $30, $48, $40, $E0, $40, $40, $40, $00 |
| 587 | .byte $00, $00, $78, $88, $88, $78, $08, $70 |
| 588 | .byte $80, $80, $B0, $C8, $88, $88, $88, $00 |
| 589 | .byte $20, $00, $60, $20, $20, $20, $20, $00 |
| 590 | .byte $08, $00, $18, $08, $08, $08, $88, $70 |
| 591 | .byte $80, $80, $88, $90, $E0, $90, $88, $00 |
| 592 | .byte $60, $20, $20, $20, $20, $20, $20, $00 |
| 593 | .byte $00, $00, $88, $D8, $A8, $88, $88, $00 |
| 594 | .byte $00, $00, $70, $88, $88, $88, $88, $00 |
| 595 | .byte $00, $00, $70, $88, $88, $88, $70, $00 |
| 596 | .byte $00, $00, $B0, $C8, $88, $F0, $80, $80 |
| 597 | .byte $00, $00, $68, $98, $88, $78, $08, $08 |
| 598 | .byte $00, $00, $70, $88, $80, $80, $80, $00 |
| 599 | .byte $00, $00, $78, $80, $70, $08, $F0, $00 |
| 600 | .byte $40, $40, $E0, $40, $40, $48, $30, $00 |
| 601 | .byte $00, $00, $88, $88, $88, $98, $68, $00 |
| 602 | .byte $00, $00, $88, $88, $88, $50, $20, $00 |
| 603 | .byte $00, $00, $88, $88, $A8, $D8, $88, $00 |
| 604 | .byte $00, $00, $88, $50, $20, $50, $88, $00 |
| 605 | .byte $00, $00, $88, $88, $88, $78, $08, $70 |
| 606 | .byte $00, $00, $F8, $10, $20, $40, $F8, $00 |
| 607 | .byte $30, $40, $40, $80, $40, $40, $30, $00 |
| 608 | .byte $20, $20, $20, $00, $20, $20, $20, $00 |
| 609 | .byte $60, $10, $10, $08, $10, $10, $60, $00 |
| 610 | .byte $68, $B0, $00, $00, $00, $00, $00, $00 |
| 611 | .byte $00, $A8, $50, $A8, $50, $A8, $00, $00 |
| 612 | |
| 613 | .res $FFFA-* |
| 614 | .word reset, reset, irq ; NMI, RESET, IRQ/BRK |
| 615 |
zdebel / vdpdemo.a65
Last active 1 day ago