50 lines
1.8 KiB
ArmAsm
50 lines
1.8 KiB
ArmAsm
; lenser -- Atari GR.15 (ANTIC mode E) viewer, self-booting
|
|
;
|
|
; 160x192, 4 colours chosen globally (no per-cell limit). Boots from sector 1:
|
|
; the OS loads this blob to $2000 and JSRs $2006. Appended data (from $4000):
|
|
; $4000 bitmap lines 0-101 (4080 bytes)
|
|
; $5000 bitmap lines 102-191 (3600 bytes) [split at the 4K ANTIC boundary]
|
|
; $6000 4 colour register values (value 0..3)
|
|
;
|
|
; assembled by atari/viewer/assemble.py via xa
|
|
|
|
* = $2000
|
|
boot:
|
|
.byte 0 ; flags
|
|
.byte 0 ; sector count (patched by the ATR writer)
|
|
.word $2000 ; load address
|
|
.word binit ; init address (DOSINI)
|
|
|
|
cont: ; $2006 -- OS JSRs here after loading
|
|
lda #$22
|
|
sta $22f ; SDMCTL = normal playfield + DL DMA
|
|
lda #<dlist
|
|
sta $230 ; SDLSTL
|
|
lda #>dlist
|
|
sta $231 ; SDLSTH
|
|
lda #$00
|
|
sta $26f ; GPRIOR = 0 (no GTIA mode)
|
|
; copy the 4 colour registers from $6000
|
|
lda $6000
|
|
sta $2c8 ; COLBAK (pixel value 0)
|
|
lda $6001
|
|
sta $2c4 ; COLPF0 (value 1)
|
|
lda $6002
|
|
sta $2c5 ; COLPF1 (value 2)
|
|
lda $6003
|
|
sta $2c6 ; COLPF2 (value 3)
|
|
#include "awyt.i"
|
|
|
|
binit:
|
|
rts
|
|
|
|
dlist:
|
|
.byte $70,$70,$70 ; 24 blank scan lines
|
|
.byte $4e ; LMS + mode E
|
|
.word $4000
|
|
.dsb 101,$0e ; 101 more mode E lines (102 total from $4000)
|
|
.byte $4e ; LMS + mode E
|
|
.word $5000
|
|
.dsb 89,$0e ; 89 more mode E lines (90 total from $5000)
|
|
.byte $41 ; JVB
|
|
.word dlist
|