hgr: static

This commit is contained in:
Vince Weaver 2022-02-03 01:35:48 -05:00
parent 1e7a64719d
commit 66982968c1
3 changed files with 143 additions and 2 deletions

View File

@ -7,7 +7,8 @@ EMPTY_DISK = ../../../empty_disk
all: wires.dsk
wires.dsk: HELLO WIRES WIRES_BOT CYCLE STAGGERED BLUEORANGE BLUEORANGEZ
wires.dsk: HELLO WIRES WIRES_BOT CYCLE STAGGERED BLUEORANGE BLUEORANGEZ \
STATIC STATIC_COLUMN
cp $(EMPTY_DISK)/empty.dsk wires.dsk
$(DOS33) -y wires.dsk SAVE A HELLO
$(DOS33) -y wires.dsk BSAVE -a 0x0C00 WIRES
@ -16,6 +17,8 @@ wires.dsk: HELLO WIRES WIRES_BOT CYCLE STAGGERED BLUEORANGE BLUEORANGEZ
$(DOS33) -y wires.dsk BSAVE -a 0x0C00 STAGGERED
$(DOS33) -y wires.dsk BSAVE -a 0x0373 BLUEORANGE
$(DOS33) -y wires.dsk BSAVE -a 0x0C00 BLUEORANGEZ
$(DOS33) -y wires.dsk BSAVE -a 0x0C00 STATIC
$(DOS33) -y wires.dsk BSAVE -a 0x0C00 STATIC_COLUMN
###
@ -47,6 +50,22 @@ STAGGERED: staggered.o
staggered.o: staggered.s
ca65 -o staggered.o staggered.s -l staggered.lst
####
STATIC: static.o
ld65 -o STATIC static.o -C $(LINKER_SCRIPTS)/apple2_c00.inc
static.o: static.s
ca65 -o static.o static.s -l static.lst
####
STATIC_COLUMN: static_column.o
ld65 -o STATIC_COLUMN static_column.o -C $(LINKER_SCRIPTS)/apple2_c00.inc
static_column.o: static_column.s
ca65 -o static_column.o static_column.s -l static_column.lst
####
@ -73,4 +92,4 @@ BLUEORANGEZ: blueorange.o
######
clean:
rm -f *~ *.o *.lst WIRES CYCLE
rm -f *~ *.o *.lst WIRES CYCLE STAGGERED STATIC STATIC_COLUMN

View File

@ -0,0 +1,61 @@
; shimmery blue pattern
INDEXL = $F6
INDEXH = $F7
HGR2 = $F3D8 ; set hires page2 and clear $4000-$5fff
WAIT = $FCA8 ; delay 1/2(26+27A+5A^2) us
even_lookup=$f000
odd_lookup=$f100
staggered:
jsr HGR2 ; after, A=0, Y=0
tax ; init X to 0
stx INDEXL ; set INDEXL to 0
; pulse loop horizontal
outer_loop:
lda #$40 ; reset INDEXH to begin page2
sta INDEXH
inner_loop:
lda even_lookup,X ; get even color
sta (INDEXL),Y ; store it to memory
iny
lda odd_lookup,X ; get odd color
sta (INDEXL),Y ; store it to memory
iny
bne inner_loop ; repeat for 256
inc INDEXH ; point to next page
inx ; point to next lookup
; txa ; wrap to 0..7
; and #$7
; tax
lda #$60 ; see if done
cmp INDEXH
bne inner_loop
; lda #100 ; A is $60 here
jsr WAIT ; pause a bit
; A is 0 here
inx ; offset next FRAME
jmp outer_loop
;even_lookup:
;.byte $D7,$DD,$F5,$D5, $D5,$D5,$D5,$D5
;odd_lookup:
;.byte $AA,$AA,$AA,$AB, $AB,$AE,$BA,$EA

View File

@ -0,0 +1,61 @@
; shimmery blue pattern
INDEXL = $F6
INDEXH = $F7
HGR2 = $F3D8 ; set hires page2 and clear $4000-$5fff
WAIT = $FCA8 ; delay 1/2(26+27A+5A^2) us
even_lookup=$f000
odd_lookup=$f100
staggered:
jsr HGR2 ; after, A=0, Y=0
tax ; init X to 0
stx INDEXL ; set INDEXL to 0
; pulse loop horizontal
outer_loop:
lda #$40 ; reset INDEXH to begin page2
sta INDEXH
inner_loop:
lda even_lookup,X ; get even color
sta (INDEXL),Y ; store it to memory
iny
lda odd_lookup,X ; get odd color
sta (INDEXL),Y ; store it to memory
iny
bne inner_loop ; repeat for 256
inc INDEXH ; point to next page
inx ; point to next lookup
txa ; wrap to 0..7
and #$7
tax
lda #$60 ; see if done
cmp INDEXH
bne inner_loop
; lda #100 ; A is $60 here
jsr WAIT ; pause a bit
; A is 0 here
inx ; offset next FRAME
jmp outer_loop
;even_lookup:
;.byte $D7,$DD,$F5,$D5, $D5,$D5,$D5,$D5
;odd_lookup:
;.byte $AA,$AA,$AA,$AB, $AB,$AE,$BA,$EA