upgraded ripple wipe, new iris.in wipe, refactor iris wipe

This commit is contained in:
4am 2019-10-21 19:00:14 -04:00
parent 51dfa78d70
commit 883d57ad1a
8 changed files with 13736 additions and 2171 deletions

View File

@ -1 +1 @@
RIPPLE STARWHITE SOFT.DIAGONAL STAGGERWHITE.UD RADIAL STAGGER.LR SOFT.UD CRYSTAL BIT.FIZZLE MEETINTHEMIDDLE DIAGONAL R.BY.PIXEL SUNRISE SOFT.L SUNSET CORNER.CIRCLE CENTER.BY.PIXEL DIAGONAL2 RIPPLE2 PALETTE.FIZZLE RADIAL2 SPLIT.UD.INTRO R.BY.2 HALF.FIZZLE RADIAL3 DIAGONAL3 BAR.DISSOLVE R.BY.PALETTE FOURSPIRAL SOFT.R IRIS CASCADE AND CHECKERBOARD LR.BY.PIXEL RADIAL4 CHECKER.FIZZLE STAGGERWHITE.LR SOFT.UD.OUT ONESQUARE FIZZLE STAR DIAMOND TWOPASS.LR HALF.MOSAIC RADIAL5 ARROW FOURSQUARE DIAGONAL4 STAGGER.UD INTERLOCK.LR SOFT.UD.IN BLOCK.MOSAIC INTERLOCK.UD BLOCK.FIZZLE SPIRAL ARROW.WHITE [eof] # # transition effects for HGR slideshows # # Each Mega-Attract Module that is an HGR slideshow (see attract.conf) # will use a single transition effect for the length of the module. # Transition effects are loaded in the order listed in this file. Each line # of this file is a filename (not including comments, like this one). The # name of the next transition effect is stored in the global prefs, so this # file should not contain duplicates. # # Transition effects are binary files loaded at $6000 and called with # hi-res page 1 showing and the next HGR graphic already loaded at $4000. # A transition effect can use $6000-$BFFF in main memory, zero page, and # text page if needed. $800-$1FFF is reserved for the slideshow data. # LC RAM banks 1 and 2 are reserved for the launcher. # # Important: LC RAM bank 1 will be read/write on entry and must be read/write # on exit. If you need ROM routines, you are responsible for switching to ROM # then switching back to RAM bank 1 (read/write) before returning. #
RIPPLE STARWHITE SOFT.DIAGONAL STAGGERWHITE.UD RADIAL STAGGER.LR SOFT.UD CRYSTAL BIT.FIZZLE MEETINTHEMIDDLE DIAGONAL R.BY.PIXEL SUNRISE SOFT.L SUNSET IRIS.IN CORNER.CIRCLE CENTER.BY.PIXEL DIAGONAL2 RIPPLE2 PALETTE.FIZZLE RADIAL2 SPLIT.UD.INTRO R.BY.2 HALF.FIZZLE RADIAL3 DIAGONAL3 BAR.DISSOLVE R.BY.PALETTE FOURSPIRAL SOFT.R IRIS CASCADE AND CHECKERBOARD LR.BY.PIXEL RADIAL4 CHECKER.FIZZLE STAGGERWHITE.LR SOFT.UD.OUT ONESQUARE FIZZLE STAR DIAMOND TWOPASS.LR HALF.MOSAIC RADIAL5 ARROW FOURSQUARE DIAGONAL4 STAGGER.UD INTERLOCK.LR SOFT.UD.IN BLOCK.MOSAIC INTERLOCK.UD BLOCK.FIZZLE SPIRAL ARROW.WHITE [eof] # # transition effects for HGR slideshows # # Each Mega-Attract Module that is an HGR slideshow (see attract.conf) # will use a single transition effect for the length of the module. # Transition effects are loaded in the order listed in this file. Each line # of this file is a filename (not including comments, like this one). The # name of the next transition effect is stored in the global prefs, so this # file should not contain duplicates. # # Transition effects are binary files loaded at $6000 and called with # hi-res page 1 showing and the next HGR graphic already loaded at $4000. # A transition effect can use $6000-$BFFF in main memory, zero page, and # text page if needed. $800-$1FFF is reserved for the slideshow data. # LC RAM banks 1 and 2 are reserved for the launcher. # # Important: LC RAM bank 1 will be read/write on entry and must be read/write # on exit. If you need ROM routines, you are responsible for switching to ROM # then switching back to RAM bank 1 (read/write) before returning. #

View File

@ -26,12 +26,31 @@ for c in coords:
if not d.get(c):
unique_coords.append(c)
d[c] = 1
if len(unique_coords) == 10000:
break
unique_vals = []
for x, y in unique_coords:
aval = "$" + hex(y)[2:].rjust(2, "0").upper()
bval = "%" + \
bin(x%7)[2:].rjust(3, "0") + \
bin(x//7)[2:].rjust(5, "0")
unique_vals.append((aval, bval))
with open("../../../src/fx/fx.hgr.iris.data.a", "w") as f:
for x, y in unique_coords:
aval = "$" + hex(y)[2:].rjust(2, "0").upper()
bval = "%" + \
bin(x%7)[2:].rjust(3, "0") + \
bin(x//7)[2:].rjust(5, "0")
for aval, bval in unique_vals:
f.write(" !byte %s,%s\n" % (aval, bval))
unique_vals.reverse()
with open("../../../src/fx/fx.hgr.iris.in.data.a", "w") as f:
for aval, bval in unique_vals:
f.write(" !byte %s,%s\n" % (aval, bval))
unique_vals.reverse()
ripple_vals = []
for i, j, k, l in zip(range(1680), range(1680,3360), range(3360,5040), range(5040,6720)):
ripple_vals.append(unique_vals[i])
ripple_vals.append(unique_vals[j])
ripple_vals.append(unique_vals[k])
ripple_vals.append(unique_vals[l])
with open("../../../src/fx/fx.hgr.slow.ripple.data.a", "w") as f:
for aval, bval in ripple_vals:
f.write(" !byte %s,%s\n" % (aval, bval))

View File

@ -1,251 +1,16 @@
;license:MIT
;(c) 2018 by 4am
;(c) 2019 by 4am
;
!cpu 6502
!to "build/FX/IRIS",plain
*=$6000
src1 = $F0 ; word
dest1 = $F2 ; word
src2 = $F4 ; word
dest2 = $F6 ; word
input = $FE ; word
!source "src/fx/fx.hgr.precomputed.1bit.a"
copymasks = $0200 ; $100 bytes but sparse, index is 0..6 but in high 3 bits, so $00, $20, $40, $60, $80, $A0, $C0
sourcemasks = $0201 ; same as copymasks
mirror_copymasks = $0202
mirror_sourcemasks = $0203
hgrlo = $0300 ; $C0 bytes
mirror_cols = $BD58 ; $28 bytes
mirror_rows = $BD80 ; $C0 bytes
hgr1hi = $BE40 ; $C0 bytes
+FX_PRECOMPUTED_1BIT Coordinates
!source "src/fx/macros.a"
rts
; build lookup tables for base address of HGR rows
+BUILD_HGR_LOOKUP_TABLES hgrlo, hgr1hi
; build lookup table to get $27-y for y in $00..$27
ldx #$27
ldy #$00
- tya
sta mirror_cols,x
iny
dex
bpl -
; build lookup table to get $BF-x for x in $00..$BF
ldx #$BF
ldy #$00
- tya
sta mirror_rows,x
dex
iny
cpy #$C0
bne -
; build sparse lookup tables for bitmasks
lda #%10000001
sta copymasks
sta mirror_copymasks+$C0
eor #%11111111
sta sourcemasks
sta mirror_sourcemasks+$C0
lda #%10000010
sta copymasks+$20
sta mirror_copymasks+$A0
eor #%11111111
sta sourcemasks+$20
sta mirror_sourcemasks+$A0
lda #%10000100
sta copymasks+$40
sta mirror_copymasks+$80
eor #%11111111
sta sourcemasks+$40
sta mirror_sourcemasks+$80
lda #%10001000
sta copymasks+$60
sta mirror_copymasks+$60
eor #%11111111
sta sourcemasks+$60
sta mirror_sourcemasks+$60
lda #%10010000
sta copymasks+$80
sta mirror_copymasks+$40
eor #%11111111
sta sourcemasks+$80
sta mirror_sourcemasks+$40
lda #%10100000
sta copymasks+$A0
sta mirror_copymasks+$20
eor #%11111111
sta sourcemasks+$A0
sta mirror_sourcemasks+$20
lda #%11000000
sta copymasks+$C0
sta mirror_copymasks
eor #%11111111
sta sourcemasks+$C0
sta mirror_sourcemasks
; set up pointer to input data
lda #<Coords
sta input
lda #>Coords
sta input+1
jmp InputLoop
Exit1 rts
InputLoop
ldy #0
lda (input),y ; first value: HGR row (only 0..95 will be in coords array)
bmi Exit1 ; if > 127 then we're done
pha
tax
lda hgrlo,x
sta dest1
sta src1
lda hgr1hi,x
sta dest1+1
eor #$60
sta src1+1
inx
lda hgrlo,x
sta dest2
sta src2
lda hgr1hi,x
sta dest2+1
eor #$60
sta src2+1
iny
lda (input),y
pha
and #%00011111 ; second value: low 5 bits = byte offset within the row
tay
pla
and #%11100000 ; second value: high 3 bits = index into tables to find bitmasks
tax
; main 1x2 block in top-left quadrant
lda (dest1),y
and sourcemasks,x
sta $00
lda (src1),y
; lda #$FF
and copymasks,x
ora $00
sta (dest1),y
lda (dest2),y
and sourcemasks,x
sta $00
lda (src2),y
; lda #$FF
and copymasks,x
ora $00
sta (dest2),y
; corresponding 1x2 block in top-right quadrant (same row, opposite column)
lda mirror_cols,y
tay
lda (dest1),y
and mirror_sourcemasks,x
sta $00
lda (src1),y
; lda #$FF
and mirror_copymasks,x
ora $00
sta (dest1),y
lda (dest2),y
and mirror_sourcemasks,x
sta $00
lda (src2),y
; lda #$FF
and mirror_copymasks,x
ora $00
sta (dest2),y
; corresponding 1x2 block in bottom-right quadrant (opposite row, opposite column)
stx $00
pla
tax
lda mirror_rows,x
tax
lda hgrlo,x
sta dest1
sta src1
lda hgr1hi,x
sta dest1+1
eor #$60
sta src1+1
dex
lda hgrlo,x
sta dest2
sta src2
lda hgr1hi,x
sta dest2+1
eor #$60
sta src2+1
ldx $00
lda (dest1),y
and mirror_sourcemasks,x
sta $00
lda (src1),y
; lda #$FF
and mirror_copymasks,x
ora $00
sta (dest1),y
lda (dest2),y
and mirror_sourcemasks,x
sta $00
lda (src2),y
; lda #$FF
and mirror_copymasks,x
ora $00
sta (dest2),y
; corresponding 1x2 block in bottom-left quadrant (opposite row, original column)
lda mirror_cols,y
tay
lda (dest1),y
and sourcemasks,x
sta $00
lda (src1),y
; lda #$FF
and copymasks,x
ora $00
sta (dest1),y
lda (dest2),y
and sourcemasks,x
sta $00
lda (src2),y
; lda #$FF
and copymasks,x
ora $00
sta (dest2),y
bit $c000
bmi Exit2
inc input
bne +
inc input+1
+ inc input
+LBNE InputLoop
inc input+1
+LBNE InputLoop
Exit2 rts
Coords
Coordinates
!source "src/fx/fx.hgr.iris.data.a"
!byte $80

16
src/fx/fx.hgr.iris.in.a Normal file
View File

@ -0,0 +1,16 @@
;license:MIT
;(c) 2019 by 4am
;
!cpu 6502
!to "build/FX/IRIS.IN",plain
*=$6000
!source "src/fx/fx.hgr.precomputed.1bit.a"
+FX_PRECOMPUTED_1BIT Coordinates
rts
Coordinates
!source "src/fx/fx.hgr.iris.in.data.a"
!byte $80

6720
src/fx/fx.hgr.iris.in.data.a Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,245 @@
;license:MIT
;(c) 2019 by 4am
;
src1 = $F0 ; word
dest1 = $F2 ; word
src2 = $F4 ; word
dest2 = $F6 ; word
input = $FE ; word
copymasks = $0200 ; $100 bytes but sparse, index is 0..6 but in high 3 bits, so $00, $20, $40, $60, $80, $A0, $C0
sourcemasks = $0201 ; same as copymasks
mirror_copymasks = $0202
mirror_sourcemasks = $0203
hgrlo = $0300 ; $C0 bytes
mirror_cols = $BD58 ; $28 bytes
mirror_rows = $BD80 ; $C0 bytes
hgr1hi = $BE40 ; $C0 bytes
!source "src/fx/macros.a"
!macro FX_PRECOMPUTED_1BIT .coords {
; build lookup tables for base address of HGR rows
+BUILD_HGR_LOOKUP_TABLES hgrlo, hgr1hi
; build lookup table to get $27-y for y in $00..$27
ldx #$27
ldy #$00
- tya
sta mirror_cols,x
iny
dex
bpl -
; build lookup table to get $BF-x for x in $00..$BF
ldx #$BF
ldy #$00
- tya
sta mirror_rows,x
dex
iny
cpy #$C0
bne -
; build sparse lookup tables for bitmasks
lda #%10000001
sta copymasks
sta mirror_copymasks+$C0
eor #%11111111
sta sourcemasks
sta mirror_sourcemasks+$C0
lda #%10000010
sta copymasks+$20
sta mirror_copymasks+$A0
eor #%11111111
sta sourcemasks+$20
sta mirror_sourcemasks+$A0
lda #%10000100
sta copymasks+$40
sta mirror_copymasks+$80
eor #%11111111
sta sourcemasks+$40
sta mirror_sourcemasks+$80
lda #%10001000
sta copymasks+$60
sta mirror_copymasks+$60
eor #%11111111
sta sourcemasks+$60
sta mirror_sourcemasks+$60
lda #%10010000
sta copymasks+$80
sta mirror_copymasks+$40
eor #%11111111
sta sourcemasks+$80
sta mirror_sourcemasks+$40
lda #%10100000
sta copymasks+$A0
sta mirror_copymasks+$20
eor #%11111111
sta sourcemasks+$A0
sta mirror_sourcemasks+$20
lda #%11000000
sta copymasks+$C0
sta mirror_copymasks
eor #%11111111
sta sourcemasks+$C0
sta mirror_sourcemasks
; set up pointer to input data
lda #<.coords
sta input
lda #>.coords
sta input+1
jmp InputLoop
Exit1 rts
InputLoop
ldy #0
lda (input),y ; first value: HGR row (only 0..95 will be in input array)
bmi Exit1 ; if > 127 then we're done
pha
tax
lda hgrlo,x
sta dest1
sta src1
lda hgr1hi,x
sta dest1+1
eor #$60
sta src1+1
inx
lda hgrlo,x
sta dest2
sta src2
lda hgr1hi,x
sta dest2+1
eor #$60
sta src2+1
iny
lda (input),y
pha
and #%00011111 ; second value: low 5 bits = byte offset within the row
tay
pla
and #%11100000 ; second value: high 3 bits = index into tables to find bitmasks
tax
; main 1x2 block in top-left quadrant
lda (dest1),y
and sourcemasks,x
sta $00
lda (src1),y
; lda #$FF
and copymasks,x
ora $00
sta (dest1),y
lda (dest2),y
and sourcemasks,x
sta $00
lda (src2),y
; lda #$FF
and copymasks,x
ora $00
sta (dest2),y
; corresponding 1x2 block in top-right quadrant (same row, opposite column)
lda mirror_cols,y
tay
lda (dest1),y
and mirror_sourcemasks,x
sta $00
lda (src1),y
; lda #$FF
and mirror_copymasks,x
ora $00
sta (dest1),y
lda (dest2),y
and mirror_sourcemasks,x
sta $00
lda (src2),y
; lda #$FF
and mirror_copymasks,x
ora $00
sta (dest2),y
; corresponding 1x2 block in bottom-right quadrant (opposite row, opposite column)
stx $00
pla
tax
lda mirror_rows,x
tax
lda hgrlo,x
sta dest1
sta src1
lda hgr1hi,x
sta dest1+1
eor #$60
sta src1+1
dex
lda hgrlo,x
sta dest2
sta src2
lda hgr1hi,x
sta dest2+1
eor #$60
sta src2+1
ldx $00
lda (dest1),y
and mirror_sourcemasks,x
sta $00
lda (src1),y
; lda #$FF
and mirror_copymasks,x
ora $00
sta (dest1),y
lda (dest2),y
and mirror_sourcemasks,x
sta $00
lda (src2),y
; lda #$FF
and mirror_copymasks,x
ora $00
sta (dest2),y
; corresponding 1x2 block in bottom-left quadrant (opposite row, original column)
lda mirror_cols,y
tay
lda (dest1),y
and sourcemasks,x
sta $00
lda (src1),y
; lda #$FF
and copymasks,x
ora $00
sta (dest1),y
lda (dest2),y
and sourcemasks,x
sta $00
lda (src2),y
; lda #$FF
and copymasks,x
ora $00
sta (dest2),y
bit $c000
bmi Exit2
inc input
bne +
inc input+1
+ inc input
+LBNE InputLoop
inc input+1
+LBNE InputLoop
Exit2
}

View File

@ -1,13 +1,13 @@
;license:MIT
;(c) 2018 by 4am
;(c) 2019 by 4am
;
!cpu 6502
!to "build/FX/RIPPLE",plain
*=$6000
!source "src/fx/fx.hgr.precomputed.a"
!source "src/fx/fx.hgr.precomputed.1bit.a"
+FX_PRECOMPUTED HGRHalfBlockCopy, Coordinates, $30
+FX_PRECOMPUTED_1BIT Coordinates
rts

File diff suppressed because it is too large Load Diff