2017-06-22 13:24:39 +00:00
|
|
|
*= $6000
|
|
|
|
|
|
|
|
; os memory map
|
|
|
|
CLRTEXT = $c050
|
|
|
|
SETTEXT = $c051
|
|
|
|
CLRMIXED = $c052
|
|
|
|
SETMIXED = $c053
|
|
|
|
TXTPAGE1 = $c054
|
|
|
|
TXTPAGE2 = $c055
|
|
|
|
CLRHIRES = $c056
|
|
|
|
SETHIRES = $c057
|
|
|
|
|
|
|
|
; ROM entry points
|
|
|
|
COUT = $fded
|
|
|
|
ROMWAIT = $fca8
|
|
|
|
|
|
|
|
; Zero page locations we use (unused by Monitor, Applesoft, or ProDOS)
|
|
|
|
PARAM0 = $06
|
|
|
|
PARAM1 = $07
|
|
|
|
PARAM2 = $08
|
|
|
|
PARAM3 = $09
|
|
|
|
SCRATCH0 = $19
|
|
|
|
SCRATCH1 = $1a
|
|
|
|
SPRITEPTR_L = $1b
|
|
|
|
SPRITEPTR_H = $1c
|
|
|
|
|
|
|
|
start
|
|
|
|
bit CLRTEXT ; start with HGR page 1, full screen
|
|
|
|
bit CLRMIXED
|
|
|
|
bit TXTPAGE1
|
|
|
|
bit SETHIRES
|
|
|
|
|
|
|
|
jmp draw
|
|
|
|
|
|
|
|
jsr clrscr
|
|
|
|
|
|
|
|
ldx #0
|
2017-06-22 18:17:31 +00:00
|
|
|
?1
|
2017-06-22 13:24:39 +00:00
|
|
|
txa
|
|
|
|
sta $2000,x
|
|
|
|
inx
|
2017-06-22 18:17:31 +00:00
|
|
|
bne ?1
|
2017-06-22 13:24:39 +00:00
|
|
|
|
|
|
|
draw
|
|
|
|
lda #100
|
|
|
|
sta PARAM1 ; y coord
|
2017-06-22 18:17:31 +00:00
|
|
|
lda #0
|
2017-06-22 13:24:39 +00:00
|
|
|
sta PARAM0 ; x coord
|
|
|
|
|
2017-06-22 18:17:31 +00:00
|
|
|
loop
|
2017-06-22 16:39:40 +00:00
|
|
|
jsr COLORSPRITE
|
2017-06-22 13:24:39 +00:00
|
|
|
|
2017-06-22 18:17:31 +00:00
|
|
|
jsr wait
|
|
|
|
inc PARAM0
|
|
|
|
lda PARAM0
|
|
|
|
cmp #100
|
|
|
|
bcc checky
|
|
|
|
lda #0
|
|
|
|
sta PARAM0
|
|
|
|
|
|
|
|
checky
|
|
|
|
inc PARAM1
|
|
|
|
lda PARAM1
|
|
|
|
cmp #100
|
|
|
|
bcc loop
|
|
|
|
lda #0
|
|
|
|
sta PARAM1
|
|
|
|
beq loop
|
|
|
|
|
2017-06-22 13:24:39 +00:00
|
|
|
wait
|
2017-06-22 18:17:31 +00:00
|
|
|
ldy #$06 ; Loop a bit
|
|
|
|
wait_outer
|
|
|
|
ldx #$ff
|
|
|
|
wait_inner
|
|
|
|
nop
|
|
|
|
nop
|
|
|
|
nop
|
|
|
|
nop
|
|
|
|
nop
|
|
|
|
nop
|
|
|
|
nop
|
|
|
|
dex
|
|
|
|
bne wait_inner
|
|
|
|
dey
|
|
|
|
bne wait_outer
|
|
|
|
rts
|
2017-06-22 13:24:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
clrscr
|
|
|
|
lda #0
|
|
|
|
sta clr1+1
|
|
|
|
lda #$20
|
|
|
|
sta clr1+2
|
|
|
|
clr0
|
|
|
|
lda #$81
|
|
|
|
ldy #0
|
|
|
|
clr1
|
|
|
|
sta $ffff,y
|
|
|
|
iny
|
|
|
|
bne clr1
|
|
|
|
inc clr1+2
|
|
|
|
ldx clr1+2
|
|
|
|
cpx #$40
|
|
|
|
bcc clr1
|
|
|
|
rts
|
|
|
|
|
2017-06-22 16:39:40 +00:00
|
|
|
.include colorsprite.s
|