several new and updated DHGR precomputed effects

This commit is contained in:
4am 2020-11-22 18:32:19 -05:00
parent 4d2ea22158
commit 4a60b564fb
21 changed files with 404 additions and 3923 deletions

View File

@ -1,24 +1,35 @@
DHGR.FIZZLE2BIT
DHGR.RIPPLE
DHGR.DIAGONAL
DHGR.SOFT.DIAG
DHGR.BUBBLES
DHGR.RADIAL
DHGR.SNOWFL.IN
DHGR.SLOW.STAR
DHGR.CORNER4
DHGR.REDLINES
DHGR.RADIAL4
DHGR.SOFT.DIAG
DHGR.TWOPASS.LR
DHGR.CORNER4RIP
DHGR.STAR
DHGR.BAR.DISSLV
DHGR.SLOW.STARI
DHGR.RADIAL3
DHGR.TWOPASS.LR
DHGR.DIAGONAL
DHGR.SNOWFLAKE
DHGR.RADIAL2
DHGR.IRIS
DHGR.R.BY.PIXEL
DHGR.BUBBLES.IN
DHGR.SLOWST.RIP
DHGR.RADIAL5
DHGR.FIZZLE
DHGR.RIPPLEWH
DHGR.IRIS.IN
DHGR.RADIALWH
DHGR.SWIRL
DHGR.R.BY.PIXEL
DHGR.SNOWFL.RIP
DHGR.STARWH
DHGR.CORNER4.IN
DHGR.RADIAL3WH
DHGR.IRISWH
DHGR.RADIAL2WH
DHGR.FIZZLEWH
DHGR.RADIAL4WH

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

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

View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.BUBBLES.IN",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
+FX_REVERSE_1BIT
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit
CoordinatesFile
!byte 15
!text "FX/BUBBLES.DATA"

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

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

View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.CORNER4.IN",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
+FX_REVERSE_1BIT
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit
CoordinatesFile
!byte 15
!text "FX/CORNER4.DATA"

View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.CORNER4RIP",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
jsr EndCoordinates1Bit+1
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit
CoordinatesFile
!byte 15
!text "FX/CORNER4.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.IRIS",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.a"
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_DHGR CoordinatesFile, PostInit
lda #$80
sta EndCoordinatesDHGR
+COPY_SELF_TO_AUXMEM
PostInit
+FX_PRECOMPUTED_DHGR HGRHalfBlockCopy, Coordinates, $1
+FX_INITONCE_1BIT CoordinatesFile, Start
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit
rts
Coordinates=CoordinatesDHGR
CoordinatesFile
!byte 17
!text "FX/DHGR.IRIS.DATA"
!byte 12
!text "FX/IRIS.DATA"

File diff suppressed because it is too large Load Diff

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

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

View File

@ -1,23 +0,0 @@
;license:MIT
;(c) 2018-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.IRISWH",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.a"
+FX_INITONCE_DHGR CoordinatesFile, PostInit
lda #$80
sta EndCoordinatesDHGR
+COPY_SELF_TO_AUXMEM
PostInit
+FX_PRECOMPUTED_DHGR HGRHalfBlockToWhite, Coordinates, $0
+FX_PRECOMPUTED_DHGR HGRHalfBlockCopy, Coordinates, $0
rts
Coordinates=CoordinatesDHGR
CoordinatesFile
!byte 17
!text "FX/DHGR.IRIS.DATA"

View File

@ -0,0 +1,151 @@
;license:MIT
;(c) 2020 by 4am
;
!source "src/fx/fx.hgr.precomputed.1bit.a"
!source "src/fx/fx.dhgr.common.a"
!macro BUILD_SPARSE_BITMASKS_DHGR .copymasks, .mirror_copymasks {
; build sparse lookup tables for bitmasks
lda #%00000000
sta .copymasks
sta .mirror_copymasks+$C0
sta .copymasks+$20
sta .mirror_copymasks+$A0
sta .copymasks+$40
sta .mirror_copymasks+$80
lda #%10000001
sta .copymasks+$60
sta .mirror_copymasks+$60
lda #%10000110
sta .copymasks+$80
sta .mirror_copymasks+$40
lda #%10011000
sta .copymasks+$A0
sta .mirror_copymasks+$20
lda #%11100000
sta .copymasks+$C0
sta .mirror_copymasks
sta $C005
lda #%10000011
sta .copymasks
sta .mirror_copymasks+$C0
lda #%10001100
sta .copymasks+$20
sta .mirror_copymasks+$A0
lda #%10110000
sta .copymasks+$40
sta .mirror_copymasks+$80
lda #%11000000
sta .copymasks+$60
sta .mirror_copymasks+$60
lda #%00000000
sta .copymasks+$80
sta .mirror_copymasks+$40
sta .copymasks+$A0
sta .mirror_copymasks+$20
sta .copymasks+$C0
sta .mirror_copymasks
sta $C004
}
!macro FX_PRECOMPUTED_1BIT_DHGR .coords {
+BUILD_HGR_LOOKUP_TABLES hgrlo, hgr1hi
+BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror
+BUILD_MIRROR_COLS mirror_cols
+BUILD_SPARSE_BITMASKS_DHGR copymasks, mirror_copymasks
+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 {
Exit1Bit rts
InputLoop
ldy #0
input=*+1
lda .coords, y ; first value: HGR row (only 0..95 will be in input array)
bmi Exit1Bit ; if > 127 then we're done
tax
+ROW_X_TO_BASE_ADDRESSES
+ROW_X_TO_MIRROR_ADDRESSES
inc input
clc
!byte $2C
bankloop sec
tay
lda (input), y
+HIGH_3_LOW_5 input
; main 1x2 block in top-left quadrant
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
; corresponding 1x2 block in top-right quadrant (same row, opposite column)
lda mirror_cols, y
tay
+COPY_BIT src1, dest1, mirror_copymasks
+COPY_BIT src2, dest2, mirror_copymasks
; corresponding 1x2 block in bottom-right quadrant (opposite row, opposite column)
mirror_src1=*+1
lda $FDFD, y
eor (<mirror_dest1), y
and mirror_copymasks, x
eor (<mirror_dest1), y
mirror_dest1=*+1
sta $FDFD, y
mirror_src2=*+1
lda $FDFD, y
eor (<mirror_dest2), y
and mirror_copymasks, x
eor (<mirror_dest2), y
mirror_dest2=*+1
sta $FDFD, y
; corresponding 1x2 block in bottom-left quadrant (opposite row, original column)
lda mirror_cols, y
tay
+COPY_BIT mirror_src1, mirror_dest1, copymasks
+COPY_BIT mirror_src2, mirror_dest2, copymasks
lda #0
sta $C003
sta $C005
bcc bankloop
sta $C002
sta $C004
+INC_INPUT_AND_LOOP InputLoop
}
end
!if * and 1 {
!byte 0 ;align 2 but avoids the fake allocation bug if it was aligned already
}
}

View File

@ -1,23 +1,17 @@
;license:MIT
;(c) 2018-2020 by 4am/qkumba
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.RIPPLE",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.a"
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_DHGR CoordinatesFile, PostInit
sec
ror EndCoordinatesDHGR
+FX_RIPPLE_DHGR
+COPY_SELF_TO_AUXMEM
PostInit
+FX_PRECOMPUTED_DHGR HGRHalfBlockCopy, Coordinates, $1
+FX_INITONCE_1BIT CoordinatesFile, Start
jsr EndCoordinates1Bit+1
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit
rts
Coordinates=CoordinatesDHGR
CoordinatesFile
!byte 17
!text "FX/DHGR.IRIS.DATA"
!byte 12
!text "FX/IRIS.DATA"

View File

@ -1,24 +0,0 @@
;license:MIT
;(c) 2018-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.RIPPLEWH",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.a"
+FX_INITONCE_DHGR CoordinatesFile, PostInit
sec
ror EndCoordinatesDHGR
+FX_RIPPLE_DHGR
+COPY_SELF_TO_AUXMEM
PostInit
+FX_PRECOMPUTED_DHGR HGRHalfBlockToWhite, Coordinates, $0
+FX_PRECOMPUTED_DHGR HGRHalfBlockCopy, Coordinates, $0
rts
Coordinates=CoordinatesDHGR
CoordinatesFile
!byte 17
!text "FX/DHGR.IRIS.DATA"

View File

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

View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.SLOW.STARI",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
+FX_REVERSE_1BIT
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit
CoordinatesFile
!byte 17
!text "FX/SLOW.STAR.DATA"

View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.SLOWST.RIP",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
jsr EndCoordinates1Bit+1
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit
CoordinatesFile
!byte 17
!text "FX/SLOW.STAR.DATA"

View File

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

View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.SNOWF.IN",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
+FX_REVERSE_1BIT
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit
CoordinatesFile
!byte 17
!text "FX/SNOWFLAKE.DATA"

View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.SNOWFL.RIP",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
jsr EndCoordinates1Bit+1
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit
CoordinatesFile
!byte 17
!text "FX/SNOWFLAKE.DATA"

17
src/fx/fx.dhgr.swirl.a Normal file
View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019-2020 by 4am/qkumba
;
!cpu 6502
!to "build/FX/DHGR.SWIRL",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
+FX_RIPPLE_1BIT aslmod4
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit
CoordinatesFile
!byte 15
!text "FX/CORNER4.DATA"

View File

@ -6722,3 +6722,7 @@
!byte $1E,%00000000
!byte $1C,%00000000
!byte $80
!source "src/fx/fx.hgr.precomputed.1bit.a"
+FX_RIPPLE_1BIT aslmod2
rts