dos33fsprogs/demos/d2/wires.s

91 lines
839 B
ArmAsm
Raw Normal View History

2021-11-06 04:09:39 +00:00
; wires -- Apple II Hires
; go for 100 frames?
wires:
; jsr HGR2
ldx #$0
stx FRAME
2021-11-07 19:06:57 +00:00
reset_x:
ldx #$0
stx COUNT
2021-11-06 04:09:39 +00:00
outer_loop:
; pulse loop horizontal
lda #$00
tay
sta GBASL
lda #$40
sta GBASH
horiz_loop:
lda even_lookup,X
sta (GBASL),Y
iny
lda odd_lookup,X
sta (GBASL),Y
iny
bne noflo2
inc GBASH
noflo2:
lda #$44
cmp GBASH
bne horiz_loop
; A should already be $44 here
; Y should be 0
vert_loop:
txa
clc
adc #2
asl
asl
adc #$40
sbc GBASH
cmp #8
lda #$81
bcs noeor
ora #$02
noeor:
sta (GBASL),Y
inc GBASL
inc GBASL
bne noflo
inc GBASH
noflo:
lda #$60
cmp GBASH
bne vert_loop
inx ; wrap at 7
cpx #7
beq reset_x
2021-11-07 19:06:57 +00:00
inc COUNT
2021-11-06 04:09:39 +00:00
inc FRAME
2021-11-07 19:06:57 +00:00
lda FRAME
2021-11-12 01:29:38 +00:00
cmp #53
2021-11-07 19:06:57 +00:00
2021-11-06 04:09:39 +00:00
bne outer_loop
2021-11-12 01:55:03 +00:00
; rts
2021-11-06 04:09:39 +00:00
2021-11-12 01:55:03 +00:00
;even_lookup:
;.byte $D7,$DD,$F5, $D5,$D5,$D5,$D5
;odd_lookup:
;.byte $AA,$AA,$AA, $AB,$AE,$BA,$EA