4cade/src/fx/fx.dhgr.bar.dissolve.a

82 lines
1.7 KiB
Plaintext

;license:MIT
;(c) 2020 by 4am
;
!cpu 6502
!to "build/FX.INDEXED/DHGR.BAR.DISSLV",plain
*=$6000
hgrlo = $0200 ; [$C0 bytes, main memory only]
hgr1hi = $0300 ; [$C0 bytes, main memory only]
!source "src/fx/macros.a"
ldx #(end-start) ; copy code to zero page
- lda start-1, x
sta $FF, x
dex
bne -
+BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgr1hi
jmp loop
start
!pseudopc 0 {
row1=*+1
loop ldx #$40
lda hgrlo-$40, x
sta <src1+1
sta <dst1+1
lda hgr1hi-$40, x
sta <dst1+2
eor #$60
sta <src1+2
clc
+HIDE_NEXT_BYTE
- sec
ldy #$27
src1 lda $FDFD, y ; SMC
dst1 sta $FDFD, y ; SMC
dey
dey
bpl src1
jsr toaux
bcc -
jsr tomain
row2=*+1
ldx #$BF
lda hgrlo, x
sta <src2+1
sta <dst2+1
lda hgr1hi, x
sta <dst2+2
eor #$60
sta <src2+2
clc
+HIDE_NEXT_BYTE
- sec
ldy #$26
src2 lda $FDFD, y ; SMC
dst2 sta $FDFD, y ; SMC
dey
dey
bpl src2
jsr toaux
bcc -
jsr tomain
lda #$30
jsr WaitForKeyWithTimeout
bmi exit
dec row2
inc row1
bne loop
tomain sta $C002
sta $C004
exit rts
toaux sta $C003
sta $C005
rts
!source "src/wait.a"
}
end