add fx/dhgr.iris, ripple, star, radial1-5

This commit is contained in:
4am 2018-11-06 21:18:13 -05:00
parent 6c2d1e1f5a
commit 8124144a45
28 changed files with 31082 additions and 3 deletions

View File

@ -21,6 +21,14 @@ CADIUS=cadius
asm: md
$(ACME) -r build/4cade.lst src/4cade.a
$(ACME) src/fx/fx.dhgr.ripple.a
$(ACME) src/fx/fx.dhgr.iris.a
$(ACME) src/fx/fx.dhgr.radial.a
$(ACME) src/fx/fx.dhgr.radial2.a
$(ACME) src/fx/fx.dhgr.radial3.a
$(ACME) src/fx/fx.dhgr.radial4.a
$(ACME) src/fx/fx.dhgr.radial5.a
$(ACME) src/fx/fx.dhgr.star.a
$(ACME) src/fx/fx.hgr.diagonal.a
$(ACME) src/fx/fx.hgr.interlock.ud.a
$(ACME) src/fx/fx.hgr.interlock.lr.a
@ -98,6 +106,6 @@ md:
mkdir -p build/FX
clean:
rm -rf build/
rm -rf build/ || rm -rf build
all: clean asm dsk mount

View File

@ -1 +1 @@
# # Mega-Attract-Mode configuration file # # Mega-Attract-Mode is split into modules. Each module can be a # short slideshow or a self-running demo (like a game's built-in # 'attract mode'). Modules are run in the order listed here, one # after the next, until interrupted by user input. The last-run # module is tracked in the master prefs file. # # Format: # key=value # # value must be one of # 1 for HGR slideshow (key is a file containing a list of HGR graphics) # 2 for DHGR slideshow (key is a file containing a list of DHGR graphics) # 3 for self-running demo (key is an executable binary file) # # Blank lines and lines beginning with '#' are ignored (like this one!) # A line beginning with '[' terminates the parsing # FAVORITES.CONF=1 #SHORT.CONF=1 #SNEAKERS=3 EFG.CONF=1 #WAVY.NAVY=3 #DHGR.CONF=2 ACTIVISION.CONF=1 CD.CONF=1 BRODERBUND.CONF=1 T.CONF=1 ATARI.CONF=1 SIERRA.CONF=1 PQR.CONF=1 DATAMOST.CONF=1 MNO.CONF=1 DATASOFT.CONF=1 S.CONF=1 MICROFUN.CONF=1 AB.CONF=1 PICCADILLY.CONF=1 HIJKL.CONF=1 SIRIUS.CONF=1 [eof]
# # Mega-Attract-Mode configuration file # # Mega-Attract-Mode is split into modules. Each module can be a # short slideshow or a self-running demo (like a game's built-in # 'attract mode'). Modules are run in the order listed here, one # after the next, until interrupted by user input. The last-run # module is tracked in the master prefs file. # # Format: # key=value # # value must be one of # 1 for HGR slideshow (key is a file containing a list of HGR graphics) # 2 for DHGR slideshow (key is a file containing a list of DHGR graphics) # 3 for self-running demo (key is an executable binary file) # # Blank lines and lines beginning with '#' are ignored (like this one!) # A line beginning with '[' terminates the parsing # DHGR.CONF=2 FAVORITES.CONF=1 #SHORT.CONF=1 #SNEAKERS=3 EFG.CONF=1 #WAVY.NAVY=3 ACTIVISION.CONF=1 CD.CONF=1 BRODERBUND.CONF=1 T.CONF=1 ATARI.CONF=1 SIERRA.CONF=1 PQR.CONF=1 DATAMOST.CONF=1 MNO.CONF=1 DATASOFT.CONF=1 S.CONF=1 MICROFUN.CONF=1 AB.CONF=1 PICCADILLY.CONF=1 HIJKL.CONF=1 SIRIUS.CONF=1 [eof]

BIN
res/demo/LODE.RUNNER Executable file

Binary file not shown.

BIN
res/demo/LODE.RUNNER.1 Executable file

Binary file not shown.

BIN
res/demo/LODE.RUNNER.M Executable file

Binary file not shown.

View File

@ -2,3 +2,6 @@ SNEAKERS=Type(06),AuxType(0800),Access(C3)
SNEAKERS.1=Type(06),AuxType(0000),Access(C3)
WAVY.NAVY=Type(06),AuxType(0800),Access(C3)
WAVY.NAVY.1=Type(06),AuxType(0000),Access(C3)
LODE.RUNNER=Type(06),AuxType(1F00),Access(C3)
LODE.RUNNER.1=Type(06),AuxType(0000),Access(C3)
LODE.RUNNER.M=Type(06),AuxType(0000),Access(C3)

View File

@ -32,3 +32,12 @@ IRIS=Type(06),AuxType(6000),Access(C3)
STAR=Type(06),AuxType(6000),Access(C3)
RIPPLE=Type(06),AuxType(6000),Access(C3)
RIPPLE2=Type(06),AuxType(6000),Access(C3)
DHGR.IRIS=Type(06),AuxType(6000),Access(C3)
DHGR.RIPPLE=Type(06),AuxType(6000),Access(C3)
DHGR.RADIAL=Type(06),AuxType(6000),Access(C3)
DHGR.RADIAL2=Type(06),AuxType(6000),Access(C3)
DHGR.RADIAL3=Type(06),AuxType(6000),Access(C3)
DHGR.RADIAL4=Type(06),AuxType(6000),Access(C3)
DHGR.RADIAL5=Type(06),AuxType(6000),Access(C3)
DHGR.STAR=Type(06),AuxType(6000),Access(C3)
DHGR.CORNER=Type(06),AuxType(6000),Access(C3)

89
res/notes/dradial.py Executable file
View File

@ -0,0 +1,89 @@
#!/usr/bin/env python3
from math import sqrt
def f(x,r=36.3):
try:
return sqrt(r*r*(1.0-(x*x/(r*r*0.6))))
except:
return -1
coords = [(255,255)]
for i in range(300, 0, -1):
a = float(i)/10.0
any = False
b = f(a)
for x in range(40, 0, -1):
y = round(x*b/a)
if y < 1 or y > 24:
continue
for m in range(1, y+1):
if (x-1,m-1) not in coords:
coords.append((x-1,m-1))
any = True
# if any:
# coords.append((255,255))
q1 = coords.copy()
q2 = [(-x-1,y) for x,y in coords]
q2.reverse()
q3 = [(-x-1,-y-1) for x,y in coords]
q4 = [(x,-y-1) for x,y in coords]
q4.reverse()
coords = q4 + q1 + q2 + q3
with open("../../src/fx/fx.dhgr.radial.data.a", "w") as f:
for x, y in coords:
if x not in range(-80,80):
f.write(" !byte 255,255\n")
else:
f.write(" !byte %s,%s\n" % ((23-y,39-x)))
coords = []
for cs in list(zip(q1,q3)) + list(zip(q2,q4)):
for c in cs:
coords.append(c)
with open("../../src/fx/fx.dhgr.radial2.data.a", "w") as f:
for x, y in coords:
if x not in range(-80,80):
f.write(" !byte 255,255\n")
else:
f.write(" !byte %s,%s\n" % ((23-y,39-x)))
coords = []
for cs in zip(q1,q2,q3,q4):
for c in cs:
coords.append(c)
with open("../../src/fx/fx.dhgr.radial3.data.a", "w") as f:
for x, y in coords:
if x not in range(-80,80):
f.write(" !byte 255,255\n")
else:
f.write(" !byte %s,%s\n" % ((23-y,39-x)))
q1.reverse()
q3.reverse()
coords = []
for cs in zip(q1,q2,q3,q4):
for c in cs:
coords.append(c)
with open("../../src/fx/fx.dhgr.radial4.data.a", "w") as f:
for x, y in coords:
if x not in range(-80,80):
f.write(" !byte 255,255\n")
else:
f.write(" !byte %s,%s\n" % ((23-y,39-x)))
q1.reverse()
q2.reverse()
q3.reverse()
q4.reverse()
coords = []
for cs in zip(q1,q2,q3,q4):
for c in cs:
coords.append(c)
with open("../../src/fx/fx.dhgr.radial5.data.a", "w") as f:
for x, y in coords:
if x not in range(-80,80):
f.write(" !byte 255,255\n")
else:
f.write(" !byte %s,%s\n" % ((23-y,39-x)))

32
res/notes/dripple.py Executable file
View File

@ -0,0 +1,32 @@
#!/usr/bin/env python3
from math import sin, cos, pi, sqrt
def f(t):
return (0.67*sqrt(t)*cos(2*pi*sqrt(t)), 0.5*sqrt(t)*sin(2*pi*sqrt(t)))
coords = []
for i in range(70000):
a, b = f(i/10.0)
x = round(40+a)
y = round(24+b)
if x < 0 or x > 79 or y < 0 or y > 47 or (x,y) in coords:
continue
coords.append((x,y))
with open("../../src/fx/fx.dhgr.iris.data.a", "w") as f:
for x, y in coords:
f.write(" !byte %s,%s\n" % (y,x))
radialcoords = []
L = len(coords)
for cs in zip(
coords[:L//4],
coords[L//4:L//2],
coords[L//2:L*3//4],
coords[L*3//4:]):
for c in cs:
radialcoords.append(c)
with open("../../src/fx/fx.dhgr.ripple.data.a", "w") as f:
for x, y in radialcoords:
f.write(" !byte %s,%s\n" % (y,x))

22
res/notes/dstar.py Executable file
View File

@ -0,0 +1,22 @@
#!/usr/bin/env python3
from math import sqrt, sin, cos, acos, pi
def f(t, k):
t = float(t)
r = k/cos(0.4*acos(sin(2.5*(t+pi/2))))
return r*cos(t),r*sin(t)
coords = []
for k_mul in range(500):
for t_mul in range(int(pi*1000+1)):
a, b = f(float(t_mul/100), float(k_mul)/10.0)
x = round(40+a*1.2)
y = round(24+b)
if x < 0 or x > 79 or y < 0 or y > 47 or (x,y) in coords:
continue
coords.append((x,y))
with open("../../src/fx/fx.dhgr.star.data.a", "w") as f:
for x, y in coords:
f.write(" !byte %s,%s\n" % (y,x))

View File

@ -186,11 +186,29 @@ AttractMode
beq @HGRSlideshow
;@DHGRSlideshow
; load transition effect code at $6000
jsr ResetPath
+LDADDR kFXDirectory
jsr AddToPath
+LDADDR kPathSeparator
jsr AddToPath
+LDADDR @dfx
jsr AddToPath
jsr LoadFile
!word gPathname
jsr BlankDHGR
jsr okvs_iter
!word gSlideshowStore
!word DHGRLoad
jmp BlankHGR
@dfx
!byte @dfx_e-@dfx_b
@dfx_b
!text "DHGR.RADIAL3"
@dfx_e
@HGRSlideshow
jsr LoadTransition
@ -228,7 +246,9 @@ DHGRLoad
jsr AddToPath
jsr LoadDHRFile
!word gPathname
jsr FizzleDHGR
; jsr FizzleDHGR
jsr $6000
; note: execution falls through here
WaitOnScreenshot
ldx #$20

11
src/fx/fx.dhgr.iris.a Normal file
View File

@ -0,0 +1,11 @@
!cpu 6502
!to "build/FX/DHGR.IRIS",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.a"
+FX_PRECOMPUTED_DHGR $1
@coords
!source "src/fx/fx.dhgr.iris.data.a"
!byte $80

3840
src/fx/fx.dhgr.iris.data.a Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,68 @@
coord = $FE
lda #$00
sta $FE
tay
lda #$60
sta $FF
tax
sta $c005
- lda ($FE),y
sta ($FE),y
iny
bne -
inc $FF
dex
bne -
sta $c004
jmp Start
!source "src/wait.a"
!source "src/fx/fx.hgr.common.a"
Start
!macro FX_PRECOMPUTED_DHGR .wait {
lda #<@coords
sta coord
lda #>@coords
sta coord+1
ldy #0
@loop
lda (coord),y
bpl +
lda #.wait
jsr WaitForKeyWithTimeout
bmi @exit
bpl @next
+ tax
iny
lda (coord),y
lsr
bcs @aux
sta $c003
sta $c005
bcc + ; always branches
@aux sta $c002
sta $c004
+
tay
txa
jsr HGRHalfBlockCopy
@next
inc coord
bne +
inc coord+1
+ inc coord
bne +
inc coord+1
+ ldy #$00
lda ($FE),y
cmp #$80
bne @loop
@exit sta $c002
sta $c004
rts
@coords
}

11
src/fx/fx.dhgr.radial.a Normal file
View File

@ -0,0 +1,11 @@
!cpu 6502
!to "build/FX/DHGR.RADIAL",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.a"
+FX_PRECOMPUTED_DHGR $1
@coords
!source "src/fx/fx.dhgr.radial.data.a"
!byte $80

3844
src/fx/fx.dhgr.radial.data.a Normal file

File diff suppressed because it is too large Load Diff

11
src/fx/fx.dhgr.radial2.a Normal file
View File

@ -0,0 +1,11 @@
!cpu 6502
!to "build/FX/DHGR.RADIAL2",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.a"
+FX_PRECOMPUTED_DHGR $1
@coords
!source "src/fx/fx.dhgr.radial2.data.a"
!byte $80

File diff suppressed because it is too large Load Diff

11
src/fx/fx.dhgr.radial3.a Normal file
View File

@ -0,0 +1,11 @@
!cpu 6502
!to "build/FX/DHGR.RADIAL3",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.a"
+FX_PRECOMPUTED_DHGR $1
@coords
!source "src/fx/fx.dhgr.radial3.data.a"
!byte $80

File diff suppressed because it is too large Load Diff

11
src/fx/fx.dhgr.radial4.a Normal file
View File

@ -0,0 +1,11 @@
!cpu 6502
!to "build/FX/DHGR.RADIAL4",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.a"
+FX_PRECOMPUTED_DHGR $1
@coords
!source "src/fx/fx.dhgr.radial4.data.a"
!byte $80

File diff suppressed because it is too large Load Diff

11
src/fx/fx.dhgr.radial5.a Normal file
View File

@ -0,0 +1,11 @@
!cpu 6502
!to "build/FX/DHGR.RADIAL5",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.a"
+FX_PRECOMPUTED_DHGR $1
@coords
!source "src/fx/fx.dhgr.radial5.data.a"
!byte $80

File diff suppressed because it is too large Load Diff

11
src/fx/fx.dhgr.ripple.a Normal file
View File

@ -0,0 +1,11 @@
!cpu 6502
!to "build/FX/DHGR.RIPPLE",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.a"
+FX_PRECOMPUTED_DHGR $1
@coords
!source "src/fx/fx.dhgr.ripple.data.a"
!byte $80

3840
src/fx/fx.dhgr.ripple.data.a Normal file

File diff suppressed because it is too large Load Diff

11
src/fx/fx.dhgr.star.a Normal file
View File

@ -0,0 +1,11 @@
!cpu 6502
!to "build/FX/DHGR.STAR",plain
*=$6000
!source "src/fx/fx.dhgr.precomputed.a"
+FX_PRECOMPUTED_DHGR $1
@coords
!source "src/fx/fx.dhgr.star.data.a"
!byte $80

3840
src/fx/fx.dhgr.star.data.a Normal file

File diff suppressed because it is too large Load Diff