new and upgraded DHGR effects

This commit is contained in:
4am 2020-11-23 19:05:51 -05:00
parent 56542020d0
commit ee06325830
24 changed files with 479 additions and 3858 deletions

View File

@ -3,30 +3,49 @@ DHGR.RIPPLE
DHGR.SOFT.DIAG
DHGR.BUBBLES
DHGR.RADIAL
DHGR.SOFT.IRIS
DHGR.WAVY.RIP
DHGR.SNOWFL.IN
DHGR.MAPLE
DHGR.SLOW.STAR
DHGR.HEART.RIP
DHGR.CORNER4
DHGR.STAR.IN
DHGR.REDLINES
DHGR.BUTTERFLY
DHGR.BLOOM.IN
DHGR.RADIAL4
DHGR.TWOPASS.LR
DHGR.WAVY.IN
DHGR.CORNER4RIP
DHGR.STAR
DHGR.MAPLE.IN
DHGR.BAR.DISSLV
DHGR.BLOOM
DHGR.SLOW.STARI
DHGR.HEART
DHGR.RADIAL3
DHGR.STAR.RIP
DHGR.BFLY.IN
DHGR.DIAGONAL
DHGR.SNOWFLAKE
DHGR.SOFTIRISIN
DHGR.RADIAL2
DHGR.IRIS
DHGR.BUBBLES.IN
DHGR.SLOWST.RIP
DHGR.RADIAL5
DHGR.FIZZLE
DHGR.BFLY.RIP
DHGR.IRIS.IN
DHGR.SWIRL
DHGR.MAPLE.RIP
DHGR.R.BY.PIXEL
DHGR.HEART.IN
DHGR.SNOWFL.RIP
DHGR.CORNER4.IN
DHGR.WAVY.IRIS
DHGR.BLOOM.RIP
DHGR.FLICK
[eof]

View File

@ -0,0 +1,16 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.BUTTERFLY",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
CoordinatesFile
!byte 17
!text "FX/BUTTERFLY.DATA"

View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.BFLY.IN",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_REVERSE_2BIT
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
CoordinatesFile
!byte 17
!text "FX/BUTTERFLY.DATA"

View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.BFLY.RIP",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_RIPPLE_2BIT
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
CoordinatesFile
!byte 17
!text "FX/BUTTERFLY.DATA"

16
src/fx/fx.dhgr.heart.a Normal file
View File

@ -0,0 +1,16 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.HEART",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
CoordinatesFile
!byte 13
!text "FX/HEART.DATA"

17
src/fx/fx.dhgr.heart.in.a Normal file
View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.HEART.IN",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_REVERSE_2BIT
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
CoordinatesFile
!byte 13
!text "FX/HEART.DATA"

View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.HEART.RIP",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_RIPPLE_2BIT
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
CoordinatesFile
!byte 13
!text "FX/HEART.DATA"

16
src/fx/fx.dhgr.maple.a Normal file
View File

@ -0,0 +1,16 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.MAPLE",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
CoordinatesFile
!byte 13
!text "FX/MAPLE.DATA"

17
src/fx/fx.dhgr.maple.in.a Normal file
View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.MAPLE.IN",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_REVERSE_2BIT
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
CoordinatesFile
!byte 13
!text "FX/MAPLE.DATA"

View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.MAPLE.RIP",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_RIPPLE_2BIT
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
CoordinatesFile
!byte 13
!text "FX/MAPLE.DATA"

View File

@ -0,0 +1,135 @@
;license:MIT
;(c) 2019-2020 by 4am
;
!source "src/fx/fx.hgr.precomputed.2bit.a"
!source "src/fx/fx.dhgr.common.a"
!macro BUILD_SPARSE_BITMASKS_2BIT_DHGR .copymasks, .mirror_copymasks {
; build sparse lookup tables for bitmasks
ldx #$00
txa
- sta .copymasks, x
sta $C005
sta .copymasks, x
sta $C004
inx
bne -
lda #%10011111
sta .copymasks+$40
sta .mirror_copymasks+$A0
lda #%11100000
sta .copymasks+$60
sta .mirror_copymasks+$80
lda #%10000111
sta .copymasks+$C0
sta .mirror_copymasks+$20
lda #%11111000
sta .copymasks+$E0
sta .mirror_copymasks
sta $C005
lda #%10001111
sta .copymasks
sta .mirror_copymasks+$E0
lda #%11110000
sta .copymasks+$20
sta .mirror_copymasks+$C0
lda #%10000011
sta .copymasks+$80
sta .mirror_copymasks+$60
lda #%11111100
sta .copymasks+$A0
sta .mirror_copymasks+$40
sta $C004
}
!macro FX_PRECOMPUTED_2BIT_DHGR .coords {
+BUILD_SPARSE_BITMASKS_2BIT_DHGR copymasks, mirror_copymasks
+BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgr1hi
+BUILD_MIRROR_COLS mirror_cols
+COPY_SELF_TO_AUXMEM
ldx #(end-start) ; copy InputLoop code to zero page
- lda start-1, x
sta $FF, x
dex
bne -
jmp InputLoop
start
!pseudopc 0 {
Exit2Bit rts
InputLoop
ldy #0
input=*+1
ldx .coords, y ; first value: HGR row + 1
beq Exit2Bit ; if 0 then we're done
+ROW_X_TO_2BIT_BASE_ADDRESSES
inc <input
lda (<input), y
+HIGH_3_LOW_5 input
; main 2x2 block in left half
clc
- lda copymasks, x
beq +
src1=*+1
lda $FDFD, y
eor (<dest1), y
and copymasks, x
eor (<dest1), y
dest1=*+1
sta $FDFD, y
src2=*+1
lda $FDFD, y
eor (<dest2), y
and copymasks, x
eor (<dest2), y
dest2=*+1
sta $FDFD, y
+ bcs +
sta $C003
sta $C005
sec
bcs -
+ sta $C002
sta $C004
; corresponding 2x2 block in right half (same row, opposite column)
lda mirror_cols, y
tay
clc
- lda mirror_copymasks, x
beq +
+COPY_BIT src1, dest1, mirror_copymasks
+COPY_BIT src2, dest2, mirror_copymasks
+ bcs +
sta $C003
sta $C005
sec
bcs -
+ sta $C002
sta $C004
inc <input
+LBNE InputLoop
bit $c000
bmi +
inc <input+1
jmp InputLoop
+ rts
}
end
!if * and 1 {
!byte 0 ;align 2 but avoids the fake allocation bug if it was aligned already
}
}

View File

@ -0,0 +1,16 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.SOFT.IRIS",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
CoordinatesFile
!byte 17
!text "FX/SOFT.IRIS.DATA"

View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.SOFTIRISIN",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_REVERSE_2BIT
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
CoordinatesFile
!byte 17
!text "FX/SOFT.IRIS.DATA"

View File

@ -1,22 +1,16 @@
;license:MIT
;(c) 2018-2020 by 4am/qkumba
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.STAR",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.a"
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_DHGR CoordinatesFile, PostInit
lda #$80
sta EndCoordinatesDHGR
+COPY_SELF_TO_AUXMEM
PostInit
+FX_PRECOMPUTED_DHGR HGRHalfBlockCopy, Coordinates, $1
+FX_INITONCE_2BIT CoordinatesFile, Start
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
rts
Coordinates=CoordinatesDHGR
CoordinatesFile
!byte 17
!text "FX/DHGR.STAR.DATA"
!byte 12
!text "FX/STAR.DATA"

File diff suppressed because it is too large Load Diff

17
src/fx/fx.dhgr.star.in.a Normal file
View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.STAR.IN",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_REVERSE_2BIT
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
CoordinatesFile
!byte 12
!text "FX/STAR.DATA"

View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.STAR.RIP",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_RIPPLE_2BIT
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
CoordinatesFile
!byte 12
!text "FX/STAR.DATA"

View File

@ -0,0 +1,16 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.WAVY.IRIS",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
CoordinatesFile
!byte 17
!text "FX/WAVY.IRIS.DATA"

View File

@ -0,0 +1,16 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.BLOOM",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
CoordinatesFile
!byte 18
!text "FX/W.IR.BLOOM.DATA"

View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.BLOOM.IN",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_REVERSE_2BIT
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
CoordinatesFile
!byte 18
!text "FX/W.IR.BLOOM.DATA"

View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.WAVY.IN",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_REVERSE_2BIT
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
CoordinatesFile
!byte 17
!text "FX/WAVY.IRIS.DATA"

View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.WAVY.RIP",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_RIPPLE_2BIT
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
CoordinatesFile
!byte 17
!text "FX/WAVY.IRIS.DATA"

View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.BLOOM.RIP",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_RIPPLE_2BIT
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
CoordinatesFile
!byte 18
!text "FX/W.IR.BLOOM.DATA"

View File

@ -277,9 +277,8 @@ Exit2Bit rts
InputLoop
ldy #0
input=*+1
lda .coords, y ; first value: HGR row + 1
ldx .coords, y ; first value: HGR row + 1
beq Exit2Bit ; if 0 then we're done
tax
+ROW_X_TO_2BIT_BASE_ADDRESSES
inc <input