This commit is contained in:
Peter Ferrie 2019-11-30 17:15:28 -08:00
commit 77b26e6e86
17 changed files with 33728 additions and 77 deletions

View File

@ -1 +1 @@
RIPPLE STAR.IN SOFT.DIAGONAL STAGGERWHITE.UD RADIAL STAGGER.LR SOFT.UD HEART.IN CRYSTAL STAR.RIPPLE BIT.FIZZLE APPLE.IN MEETINTHEMIDDLE FLOWER.RAD.RIP SOFT.IRIS W.RIPPLE.BLOOM DIAGONAL MANDELBROT.IN CORNER.SUPERRIP BOLT RADIAL2 STAR FLOWER.IN R.BY.PIXEL WAVY.IRIS APPLE SUNRISE MANDELBROT.RIP SOFT.L HEART.RIPPLE SUNSET FLOWER.RAD SLOW.STAR.IN IRIS.IN BUTTERFLYRIPPLE W.IRIS.BLOOM.IN CENTER.BY.PIXEL SNOWFLAKE.IN FLOWER APPLE.RIPPLE DIAGONAL2 STAR.BLOOM PALETTE.FIZZLE BUTTERFLY FLOWER.RIPPLE SPLIT.UD.INTRO WAVY.IRIS.IN R.BY.2 HALF.FIZZLE SNOWFLAKE.RIP RADIAL3 HEART BOLT.IN FLOWER.RAD.IN DIAGONAL3 MANDELBROT WAVY.RIPPLE CORNER4.OUT LATTICE BAR.DISSOLVE R.BY.PALETTE FOURSPIRAL SOFT.R MAPLE.IN RADIAL4 IRIS CASCADE SNOWFLAKE VERTICAL.BLINDS BUTTERFLY.IN CHECKERBOARD LR.BY.PIXEL CHECKER.FIZZLE STAGGERWHITE.LR SOFT.UD.OUT ONESQUARE W.IRIS.BLOOM MAPLE SWIRL FIZZLE SLOW.STAR ARROW.WHITE TRI.FIZZLE SOFT.IRIS.IN DIAMOND TWOPASS.LR RADIAL5 HALF.MOSAIC BOLT.RIPPLE ARROW FOURSQUARE BLOCK.FIZZLE DIAGONAL4 STAGGER.UD INTERLOCK.LR SOFT.UD.IN BLOCK.MOSAIC CORNER4.IN MAPLE.RIPPLE INTERLOCK.UD LITTLE.BOXES SPIRAL WAVY.CORNER [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 (but preserve the screen holes). $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 STAR.IN SOFT.DIAGONAL STAGGERWHITE.UD RADIAL STAGGER.LR SOFT.UD HEART.IN CRYSTAL STAR.RIPPLE BIT.FIZZLE APPLE.IN MEETINTHEMIDDLE FLOWER.RAD.RIP SOFT.IRIS W.RIPPLE.BLOOM DIAGONAL PINWHEELS MANDELBROT.IN CORNER.SUPERRIP BOLT RADIAL2 STAR FLOWER.IN R.BY.PIXEL WAVY.IRIS APPLE SUNRISE MANDELBROT.RIP SOFT.L HEART.RIPPLE SUNSET FLOWER.RAD SLOW.STAR.IN IRIS.IN BUTTERFLYRIPPLE W.IRIS.BLOOM.IN CENTER.BY.PIXEL RADBUBBLES SNOWFLAKE.IN FLOWER APPLE.RIPPLE DIAGONAL2 STAR.BLOOM PALETTE.FIZZLE BUTTERFLY BUBBLES FLOWER.RIPPLE SPLIT.UD.INTRO WAVY.IRIS.IN R.BY.2 HALF.FIZZLE SNOWFLAKE.RIP RADIAL3 HEART BOLT.IN FLOWER.RAD.IN DIAGONAL3 MANDELBROT WAVY.RIPPLE CORNER4.OUT LATTICE BAR.DISSOLVE R.BY.PALETTE FOURSPIRAL SOFT.R MAPLE.IN RADIAL4 IRIS CASCADE SNOWFLAKE VERTICAL.BLINDS BUTTERFLY.IN CHECKERBOARD LR.BY.PIXEL CHECKER.FIZZLE STAGGERWHITE.LR SOFT.UD.OUT ONESQUARE W.IRIS.BLOOM MAPLE SWIRL FIZZLE SLOW.STAR ARROW.WHITE TRI.FIZZLE SOFT.IRIS.IN DIAMOND BUBBLES.IN TWOPASS.LR RADIAL5 HALF.MOSAIC BOLT.RIPPLE ARROW FOURSQUARE FULL.OF.STARS BLOCK.FIZZLE DIAGONAL4 STAGGER.UD INTERLOCK.LR SOFT.UD.IN BLOCK.MOSAIC CORNER4.IN MAPLE.RIPPLE INTERLOCK.UD LITTLE.BOXES SPIRAL WAVY.CORNER [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 (but preserve the screen holes). $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

@ -1,6 +1,7 @@
#!/usr/bin/env python3
from math import sqrt, sin, cos, acos, pi
import util
max_x = 280//2
max_y = 192//2
@ -22,26 +23,13 @@ for k_mul in range(500):
continue
coords.append((x,y))
d = {}
unique_coords = []
for c in coords:
if not d.get(c):
unique_coords.append(c)
d[c] = 1
unique_coords = util.unique(coords)
unique_vals = util.vals_1bit(unique_coords)
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.slow.star.data.a", "w") as f:
for aval, bval in unique_vals:
f.write(" !byte %s,%s\n" % (aval, bval))
util.write("../../../src/fx/fx.hgr.slow.star.data.a", unique_vals)
unique_vals.reverse()
with open("../../../src/fx/fx.hgr.slow.star.in.data.a", "w") as f:
for aval, bval in unique_vals:
f.write(" !byte %s,%s\n" % (aval, bval))
util.write("../../../src/fx/fx.hgr.slow.star.in.data.a", unique_vals)
mult_coords = util.ripple(util.radial_multiply(unique_coords))
util.write("../../../src/fx/fx.hgr.full.of.stars.data.a", util.vals_1bit(mult_coords))

View File

@ -24,32 +24,20 @@ for i in range(1000000):
unique_coords = util.unique(coords)
unique_vals = util.vals_1bit(unique_coords)
with open("../../../src/fx/fx.hgr.iris.data.a", "w") as f:
for aval, bval in unique_vals:
f.write(" !byte %s,%s\n" % (aval, bval))
util.write("../../../src/fx/fx.hgr.iris.data.a", unique_vals)
util.write("../../../src/fx/fx.hgr.ripple.data.a", util.ripple(unique_vals))
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 = util.ripple(unique_vals)
with open("../../../src/fx/fx.hgr.ripple.data.a", "w") as f:
for aval, bval in ripple_vals:
f.write(" !byte %s,%s\n" % (aval, bval))
util.write("../../../src/fx/fx.hgr.iris.in.data.a", unique_vals)
corner4_coords = [(139-x,95-y) for (x,y) in unique_coords]
corner4_vals = util.vals_1bit(corner4_coords)
with open("../../../src/fx/fx.hgr.corner4.in.data.a", "w") as f:
for aval, bval in corner4_vals:
f.write(" !byte %s,%s\n" % (aval, bval))
util.write("../../../src/fx/fx.hgr.corner4.in.data.a", corner4_vals)
corner4_vals.reverse()
with open("../../../src/fx/fx.hgr.corner4.out.data.a", "w") as f:
for aval, bval in corner4_vals:
f.write(" !byte %s,%s\n" % (aval, bval))
swirl_vals = util.ripple(util.ripple(corner4_vals))
with open("../../../src/fx/fx.hgr.swirl.data.a", "w") as f:
for aval, bval in swirl_vals:
f.write(" !byte %s,%s\n" % (aval, bval))
util.write("../../../src/fx/fx.hgr.corner4.out.data.a", corner4_vals)
util.write("../../../src/fx/fx.hgr.swirl.data.a", util.ripple(util.ripple(corner4_vals)))
mult_coords = util.ripple(util.quadrant_multiply(util.ripple(util.quadrant_multiply(util.ripple(util.quadrant_multiply(unique_coords))))))
util.write("../../../src/fx/fx.hgr.bubbles.data.a", util.vals_1bit(mult_coords))
mult_coords.reverse()
util.write("../../../src/fx/fx.hgr.bubbles.in.data.a", util.vals_1bit(mult_coords))
mult_coords = util.halfripple(util.ripple(util.radial_multiply(util.radial_multiply(unique_coords))))
util.write("../../../src/fx/fx.hgr.radbubbles.data.a", util.vals_1bit(mult_coords))

View File

@ -25,33 +25,13 @@ for i in range(30000, 0, -1):
continue
coords.append((radius_x - x,radius_y - m))
d = {}
unique_coords = []
for c in coords:
if not d.get(c):
unique_coords.append(c)
d[c] = 1
unique_coords = util.unique(coords)
unique_vals = util.vals_1bit(unique_coords)
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))
util.write("../../../src/fx/fx.hgr.radial.data.a", unique_vals)
util.write("../../../src/fx/fx.hgr.radial2.data.a", util.halfripple(unique_vals))
util.write("../../../src/fx/fx.hgr.radial4.data.a", util.ripple(unique_vals))
util.write("../../../src/fx/fx.hgr.radial5.data.a", util.ripple(util.halfripple(unique_vals)))
with open("../../../src/fx/fx.hgr.radial.data.a", "w") as f:
for aval, bval in unique_vals:
f.write(" !byte %s,%s\n" % (aval, bval))
with open("../../../src/fx/fx.hgr.radial2.data.a", "w") as f:
for aval, bval in util.halfripple(unique_vals):
f.write(" !byte %s,%s\n" % (aval, bval))
with open("../../../src/fx/fx.hgr.radial4.data.a", "w") as f:
for aval, bval in util.ripple(unique_vals):
f.write(" !byte %s,%s\n" % (aval, bval))
with open("../../../src/fx/fx.hgr.radial5.data.a", "w") as f:
for aval, bval in util.ripple(util.halfripple(unique_vals)):
f.write(" !byte %s,%s\n" % (aval, bval))
mult_coords = util.ripple(util.radial_multiply(util.ripple(util.radial_multiply(util.ripple(util.radial_multiply(unique_coords))))))
util.write("../../../src/fx/fx.hgr.pinwheels.data.a", util.vals_1bit(mult_coords))

View File

@ -10,6 +10,20 @@ def unique(coords):
d[c] = 1
return unique_coords
def radial_multiply(unique_coords):
q2 = [(279-x, y) for (x, y) in unique_coords]
q2.reverse()
q3 = [(279-x, 190-y) for (x, y) in unique_coords]
q4 = [(x, 190-y) for (x, y) in unique_coords]
q4.reverse()
return unique([(x//2, y//2) for (x, y) in unique_coords + q2 + q3 + q4 if (x % 2 == 0) and (y % 4 == 0)])
def quadrant_multiply(unique_coords):
q2 = [(279-x, y) for (x, y) in unique_coords]
q3 = [(279-x, 190-y) for (x, y) in unique_coords]
q4 = [(x, 190-y) for (x, y) in unique_coords]
return unique([(x//2, y//2) for (x, y) in unique_coords + q2 + q3 + q4 if (x % 2 == 0) and (y % 4 == 0)])
def vals_1bit(unique_coords):
unique_vals = []
for x, y in unique_coords:
@ -88,3 +102,8 @@ def halfripple(unique_vals):
ripple_vals.append(unique_vals[i])
ripple_vals.append(unique_vals[j])
return ripple_vals
def write(filename, vals):
with open(filename, "w") as f:
for aval, bval in vals:
f.write(" !byte %s,%s\n" % (aval, bval))

View File

@ -64,9 +64,6 @@ InitPRNG
sta SEED+3
rts
RAND7BIT
rts
PRNG
lda #$01
ldx #$03

14
src/fx/fx.hgr.bubbles.a Normal file
View File

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

6720
src/fx/fx.hgr.bubbles.data.a Normal file

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019 by 4am
;
!cpu 6502
!to "build/FX/FULL.OF.STARS",plain
*=$6000
!source "src/fx/fx.hgr.precomputed.1bit.a"
!source "src/fx/fx.hgr.radial.common.a"
!if * and 1 {
!byte 0
}
Coordinates
!source "src/fx/fx.hgr.full.of.stars.data.a"
EndCoordinates
!byte $80

File diff suppressed because it is too large Load Diff

17
src/fx/fx.hgr.pinwheels.a Normal file
View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019 by 4am
;
!cpu 6502
!to "build/FX/PINWHEELS",plain
*=$6000
!source "src/fx/fx.hgr.precomputed.1bit.a"
!source "src/fx/fx.hgr.radial.common.a"
!if * and 1 {
!byte 0
}
Coordinates
!source "src/fx/fx.hgr.pinwheels.data.a"
EndCoordinates
!byte $80

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,17 @@
;license:MIT
;(c) 2019 by 4am
;
!cpu 6502
!to "build/FX/RADBUBBLES",plain
*=$6000
!source "src/fx/fx.hgr.precomputed.1bit.a"
!source "src/fx/fx.hgr.radial.common.a"
!if * and 1 {
!byte 0
}
Coordinates
!source "src/fx/fx.hgr.radbubbles.data.a"
EndCoordinates
!byte $80

File diff suppressed because it is too large Load Diff

View File

@ -195,4 +195,4 @@ HGRActionCallback
sta gPathname,y
+LDADDR gPathname
sec
; /!\ execution falls through to glue.font/DrawString
; /!\ execution falls through to ui.font/DrawString