4cade/src/fx/fx.hgr.soft.ud.out.a

163 lines
3.1 KiB
Plaintext
Raw Normal View History

2019-10-18 01:56:26 +00:00
;license:MIT
;(c) 2019 by 4am
;
!cpu 6502
!to "build/FX.INDEXED/SOFT.UD.OUT",plain
2019-10-18 01:56:26 +00:00
*=$6000
maskindex = $fc
row = $fd
2019-10-24 19:41:08 +00:00
!source "src/fx/macros.a"
!source "src/constants.a"
2019-10-24 19:41:08 +00:00
2019-10-18 01:56:26 +00:00
lda #$FA
sta row
@rowloop
lda #6
sta maskindex
2019-10-20 00:30:48 +00:00
jsr WaitForVBL
2019-10-18 01:56:26 +00:00
@maskloop
lda row
bmi @skiprow
cmp #12
bcs @skiprow
clc
adc #12
jsr do
lda #11
sec
sbc row
jsr do
@skiprow
inc row
dec maskindex
bpl @maskloop
lda #40
jsr WaitForKeyWithTimeout
bmi @exit
dec row
dec row
dec row
dec row
dec row
dec row
lda row
bmi @rowloop
cmp #12
bcc @rowloop
2019-11-20 05:55:33 +00:00
@exit jmp UnwaitForVBL
2019-10-18 01:56:26 +00:00
do
asl
asl
asl
jsr HGRCalc
lda #<masks
sta @basemaskaddr
lda #>masks
sta @basemaskaddr+1
lda maskindex
asl
asl
asl
clc
adc @basemaskaddr
sta @basemaskaddr
bcc +
inc @basemaskaddr+1
+
ldx #7
2019-10-24 19:41:08 +00:00
clc
2019-10-18 01:56:26 +00:00
@blockloop
@basemaskaddr=*+1
lda $FDFD,x ; SMC
sta @copymask
ldy #39
@colloop
lda ($26),y
2019-10-24 19:41:08 +00:00
eor ($3c),y
2019-10-18 01:56:26 +00:00
@copymask=*+1
and #0 ; SMC
2019-10-24 19:41:08 +00:00
eor ($26),y
2019-10-18 01:56:26 +00:00
sta ($26),y
dey
bpl @colloop
2019-10-24 19:41:08 +00:00
+HGR_INC_WITHIN_BLOCK
2019-10-18 01:56:26 +00:00
dex
bpl @blockloop
rts
masks
!byte %10000000
!byte %10000000
!byte %10000000
!byte %10001000
!byte %10001000
!byte %10000000
!byte %10000000
!byte %10000000
!byte %10000000
!byte %10000000
!byte %10010100
!byte %10001000
!byte %10001000
!byte %10010100
!byte %10000000
!byte %10000000
!byte %10000000
!byte %10000000
!byte %10011100
!byte %10011100
!byte %10011100
!byte %10011100
!byte %10000000
!byte %10000000
!byte %10000000
!byte %10101010
!byte %10011100
!byte %10111110
!byte %10011100
!byte %10011100
!byte %10101010
!byte %10000000
!byte %10000000
!byte %10111110
!byte %10111110
!byte %10111110
!byte %10111110
!byte %10111110
!byte %10111110
!byte %10000000
!byte %11010101
!byte %10111110
!byte %11111111
!byte %10111110
!byte %11111111
!byte %10111110
!byte %10111110
!byte %11010101
!byte %11111111
!byte %11111111
!byte %11111111
!byte %11111111
!byte %11111111
!byte %11111111
!byte %11111111
!byte %11111111
!source "src/wait.a"
+HGR_CALC_ROUTINES