dos33fsprogs/demos/l/orb_256/staggered.s

53 lines
877 B
ArmAsm
Raw Normal View History

2022-02-02 19:02:02 +00:00
; shimmery blue pattern
; X=48 here, can't count on others
staggered:
2022-02-02 19:02:02 +00:00
stx FRAME ; set FRAME to 48
2022-02-02 19:02:02 +00:00
ldx #$00 ; init X to 0
stx GBASL ; set GBASL to 0
2022-02-02 19:02:02 +00:00
; pulse loop horizontal
outer_loop:
2022-02-02 19:02:02 +00:00
lda #$40 ; reset GBASH to begin page2
sta GBASH
2022-02-02 19:02:02 +00:00
inner_loop:
lda even_lookup,X ; get even color
sta (GBASL),Y ; store it to memory
iny
2022-02-02 19:02:02 +00:00
lda odd_lookup,X ; get odd color
sta (GBASL),Y ; store it to memory
iny
2022-02-02 19:02:02 +00:00
bne inner_loop ; repeat for 256
inc GBASH ; point to next page
2022-02-02 19:02:02 +00:00
inx ; wrap lookup at 8
txa
and #$7
tax
2022-02-02 19:02:02 +00:00
lda #$60 ; see if done
cmp GBASH
bne inner_loop
2022-02-02 19:02:02 +00:00
; lda #100 ; A is $60 here
jsr WAIT ; pause a bit
; A is 0 here
2022-02-02 19:02:02 +00:00
inx ; offset next FRAME
2022-02-02 19:02:02 +00:00
dec FRAME ; exit after so many frames
bne outer_loop
;even_lookup:
;.byte $D7,$DD,$F5,$D5, $D5,$D5,$D5,$D5
;odd_lookup:
;.byte $AA,$AA,$AA,$AB, $AB,$AE,$BA,$EA