add DHGR two-pass L/R effect

This commit is contained in:
4am 2020-11-19 14:22:20 -05:00
parent e04d4372a9
commit 9e175b6058
2 changed files with 64 additions and 1 deletions

View File

@ -1,11 +1,12 @@
DHGR.FIZZLE2BIT
DHGR.RIPPLE
DHGR.REDLINES
DHGR.RADIAL
DHGR.BAR.DISSLV
DHGR.RADIAL4
DHGR.STAR
DHGR.RADIAL3
DHGR.REDLINES
DHGR.TWOPASS.LR
DHGR.RADIAL2
DHGR.IRIS
DHGR.RADIAL5

62
src/fx/fx.dhgr.2pass.lr.a Normal file
View File

@ -0,0 +1,62 @@
;license:MIT
;(c) 2018 by 4am
;
!cpu 6502
!to "build/FX/DHGR.TWOPASS.LR",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 {
loop ldy #$00
inc <startx
columnloop
startx=*+1
ldx #$FF
rowloop
lda hgrlo, x
sta <src+1
sta <dst+1
lda hgr1hi, x
sta <dst+2
eor #$60
sta <src+2
clc
!byte $A9
- sec
src lda $FDFD, y ; SMC
dst sta $FDFD ,y ; SMC
sta $C003
sta $C005
bcc -
sta $C002
sta $C004
inx
inx
cpx #$C0
bcc rowloop
lda #$10
jsr WaitForKeyWithTimeout
bmi exit
iny
cpy #$28
bne columnloop
lda <startx
beq loop
exit rts
!source "src/wait.a"
}
end