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

161 lines
3.1 KiB
Plaintext
Raw Normal View History

2019-10-17 02:15:57 +00:00
;license:MIT
;(c) 2019 by 4am
;
!cpu 6502
!to "build/FX/SOFT.UD",plain
*=$6000
tmp = $fb
maskindex = $fc
row = $fd
lda #$FA
sta row
@rowloop
lda #6
sta maskindex
2019-10-20 00:30:48 +00:00
jsr WaitForVBL
2019-10-17 02:15:57 +00:00
@maskloop
lda row
bmi @skiprow
cmp #24
bcs @skiprow
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
@blockloop
@basemaskaddr=*+1
lda $FDFD,x ; SMC
sta @copymask
eor #%11111111
sta @sourcemask
ldy #39
@colloop
lda ($26),y
@sourcemask=*+1
and #0 ; SMC
sta tmp
lda ($3c),y
@copymask=*+1
and #0 ; SMC
ora tmp
sta ($26),y
dey
bpl @colloop
lda $27
adc #4
sta $27
eor #$60
sta $3d
dex
bpl @blockloop
@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 #24
bcc @rowloop
@exit 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"
!source "src/fx/fx.hgr.common.a"
2019-10-20 00:30:48 +00:00
!source "src/fx/hw.vbl.a"