add fx/star

This commit is contained in:
4am
2018-11-03 15:24:23 -04:00
parent 22c3b2e38e
commit 1ef1b5608f
7 changed files with 2247 additions and 2 deletions

View File

@@ -47,6 +47,7 @@ asm: md
$(ACME) src/fx/fx.hgr.split.ud.intro.a
$(ACME) src/fx/fx.hgr.iris.a
$(ACME) src/fx/fx.hgr.ripple.a
$(ACME) src/fx/fx.hgr.star.a
dsk: md asm
$(CADIUS) CREATEVOLUME build/"$(DISK)" "${VOLUME}" 32766KB >>build/log

View File

@@ -1 +1 @@
#
#

View File

@@ -24,3 +24,4 @@ RADIAL=Type(06),AuxType(6000),Access(C3)
SPLIT.UD.INTRO=Type(06),AuxType(6000),Access(C3)
IRIS=Type(06),AuxType(6000),Access(C3)
RIPPLE=Type(06),AuxType(6000),Access(C3)
STAR=Type(06),AuxType(6000),Access(C3)

26
res/notes/star.py Executable file
View File

@@ -0,0 +1,26 @@
#!/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):
any = False
for t_mul in range(int(pi*1000+1)):
a, b = f(float(t_mul/100), float(k_mul)/10.0)
x = round(20+a*.6)
y = round(24+b)
if x < 0 or x > 39 or y < 0 or y > 47 or (x,y) in coords:
continue
coords.append((x,y))
any = True
if any:
coords.append((255,255))
with open("../../src/fx/fx.hgr.star.data.a", "w") as f:
for x, y in coords:
f.write(" !byte %s,%s\n" % (y,x))

View File

@@ -1 +1 @@
#
#

43
src/fx/fx.hgr.star.a Normal file
View File

@@ -0,0 +1,43 @@
!cpu 6502
!to "build/FX/STAR",plain
*=$6000
coord = $FE
lda #<@coords
sta coord
lda #>@coords
sta coord+1
ldy #0
@loop
lda (coord),y
bpl +
lda #$10
jsr WaitForKeyWithTimeout
bmi @exit
bpl @next
+ tax
iny
lda (coord),y
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 rts
@coords
!source "src/fx/fx.hgr.star.data.a"
!byte $80
!source "src/wait.a"
!source "src/fx/fx.hgr.common.a"

2174
src/fx/fx.hgr.star.data.a Normal file

File diff suppressed because it is too large Load Diff