add fx/stagger.ud, stagger.ud.white, stagger.lr, stagger.lr.white, corner.cicle, sunrise, radial

This commit is contained in:
4am 2018-11-03 09:23:04 -04:00
parent f4895501fd
commit 201b3f5d5a
29 changed files with 9014 additions and 13 deletions

View File

@ -29,15 +29,22 @@ asm: md
$(ACME) src/fx/fx.hgr.fizzle.a
$(ACME) src/fx/fx.hgr.bar.dissolve.a
$(ACME) src/fx/fx.hgr.block.fizzle.a
$(ACME) src/fx/fx.hgr.block.mosaic.a
$(ACME) src/fx/fx.hgr.block.fizzle.white.a
$(ACME) src/fx/fx.hgr.2pass.lr.a
$(ACME) src/fx/fx.hgr.crystal.a
$(ACME) src/fx/fx.hgr.foursquare.a
$(ACME) src/fx/fx.hgr.onesquare.a
$(ACME) src/fx/fx.hgr.foursquare.white.a
$(ACME) src/fx/fx.hgr.onesquare.white.a
$(ACME) src/fx/fx.hgr.diamond.a
$(ACME) src/fx/fx.hgr.checkerboard.a
$(ACME) src/fx/fx.hgr.checkerboard.white.a
$(ACME) src/fx/fx.hgr.halfblock.fizzle.a
$(ACME) src/fx/fx.hgr.halfblock.mosaic.a
$(ACME) src/fx/fx.hgr.halfblock.fizzle.white.a
$(ACME) src/fx/fx.hgr.stagger.ud.a
$(ACME) src/fx/fx.hgr.stagger.ud.white.a
$(ACME) src/fx/fx.hgr.stagger.lr.a
$(ACME) src/fx/fx.hgr.stagger.lr.white.a
$(ACME) src/fx/fx.hgr.corner.circle.a
$(ACME) src/fx/fx.hgr.sunrise.a
$(ACME) src/fx/fx.hgr.radial.a
dsk: md asm
$(CADIUS) CREATEVOLUME build/"$(DISK)" "${VOLUME}" 32766KB >>build/log

View File

@ -1 +1 @@
# # transition effects for HGR slideshows # DIAGONAL HALF.FIZZLE HALF.MOSAIC CHECKERBOARD DIAMOND ONESQUARE FOURSQUARE CRYSTAL TWOPASS.LR INTERLOCK.LR BLOCK.MOSAIC IRIS FIZZLE INTERLOCK.UD BLOCK.FIZZLE DIAGONAL ONESQUARE BAR.DISSOLVE [eof]
# # transition effects for HGR slideshows # DIAGONAL CRYSTAL SUNRISE DIAGONAL CHECKERBOARD HALF.FIZZLE CORNER.CIRCLE BAR.DISSOLVE STAGGERWHITE.LR DIAMOND ONESQUARE TWOPASS.LR CRYSTAL HALF.MOSAIC STAGGER.LR FOURSQUARE STAGGER.UD INTERLOCK.LR BLOCK.MOSAIC IRIS FIZZLE STAGGERWHITE.UD INTERLOCK.UD BLOCK.FIZZLE HALF.FIZZLE ONESQUARE [eof]

View File

@ -15,3 +15,10 @@ DIAMOND=Type(06),AuxType(6000),Access(C3)
CHECKERBOARD=Type(06),AuxType(6000),Access(C3)
HALF.FIZZLE=Type(06),AuxType(6000),Access(C3)
HALF.MOSAIC=Type(06),AuxType(6000),Access(C3)
STAGGER.UD=Type(06),AuxType(6000),Access(C3)
STAGGERWHITE.UD=Type(06),AuxType(6000),Access(C3)
STAGGER.LR=Type(06),AuxType(6000),Access(C3)
STAGGERWHITE.LR=Type(06),AuxType(6000),Access(C3)
CORNER.CIRCLE=Type(06),AuxType(6000),Access(C3)
SUNRISE=Type(06),AuxType(6000),Access(C3)
RADIAL=Type(06),AuxType(6000),Access(C3)

1745
res/notes/corner-circle.txt Normal file

File diff suppressed because it is too large Load Diff

34
res/notes/corner.py Executable file
View File

@ -0,0 +1,34 @@
#!/usr/bin/env python3
import math
def f(x,r):
x = float(x)
r = float(r)
try:
return math.sqrt(r*r*(1.0-(x*x/(r*r*0.6))))
except:
return 0
coords = [(255,255)]
for r in range(72, 0, -1):
any = False
for x in range(1, 41):
y = round(f(x,r))
if y > 48:
continue
for m in range(x, 41):
for n in range(max(y,1), 49):
if (m-1,n-1) not in coords:
coords.append((m-1,n-1))
any = True
if any:
coords.append((255,255))
coords.reverse()
with open("../../src/fx/fx.hgr.corner.circle.data.a", "w") as f:
for x, y in coords:
if x == 255:
f.write(" !byte 255,255\n")
else:
f.write(" !byte %s,%s\n" % (47-y,39-x))

49
res/notes/do.txt Normal file
View File

@ -0,0 +1,49 @@
0123456789012345678901234567890123456789
0AAAAA AAAAA AAAAA AAAAA .
1 .
2 .
3 .
4 .
5 AAAAA AAAAA AAAAA AAAAA.
6AAAAA .
7 .
8 .
9 .
0 .
1 .
2AAAAA .
3 .
4 .
5 .
6 .
7 .
8AAAAA .
9 .
0 .
1 .
2 .
3 .
4AAAAA .
5 .
6 .
7 .
8 .
9 .
0AAAAA .
1 .
2 .
3 .
4 .
5 .
6AAAAA .
7 .
8 .
9 .
0 .
1 .
2AAAAA .
3 .
4 .
5 .
6 .
7 .

40
res/notes/radial.py Executable file
View File

@ -0,0 +1,40 @@
#!/usr/bin/env python3
import math
def f(x,r=36.3):
x = float(x)
try:
return math.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(20, 0, -1):
y = round(float(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))
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 + coords + q2 + q3
with open("../../src/fx/fx.hgr.radial.data.a", "w") as f:
for x, y in coords:
if x not in range(-40,40):
f.write(" !byte 255,255\n")
else:
f.write(" !byte %s,%s\n" % ((23-y,19-x)))

35
res/notes/sunrise.py Executable file
View File

@ -0,0 +1,35 @@
#!/usr/bin/env python3
import math
def f(x,r):
x = float(x)
r = float(r)
try:
return math.sqrt(r*r*(1.0-((x-21.0)*(x-21.0)/(r*r*0.25))))
except:
return -1
coords = [(255,255)]
for r in range(0, 80):
any = False
for x in range(1, 41):
y = round(f(x,r))
if y < 0 or y > 48:
continue
for n in range(1, y+1):
if (x-1,n-1) not in coords:
coords.append((x-1,n-1))
any = True
if any:
coords.append((255,255))
coords.pop()
coords.append((0,47))
coords.append((255,255))
with open("../../src/fx/fx.hgr.sunrise.data.a", "w") as f:
for x, y in coords:
if x == 255:
f.write(" !byte 255,255\n")
else:
f.write(" !byte %s,%s\n" % (47-y,39-x))

View File

@ -107,10 +107,10 @@ Reenter ; self-running demos should call this to ex
Main
ldx #$FF
txs
bit $C010
jsr BlankHGR
- bit $C010
jsr AttractMode
jmp Reboot
jmp -
AttractMode
jsr okvs_nth ; get filename of next attract-mode module
@ -209,6 +209,7 @@ HGRLoad
; load HGR screenshot at $4000
+LOAD_FILE kHGRScreenshotDirectory, PTR
; jsr LoadTransition
jsr $6000 ; transition effect code was loaded here earlier
jmp WaitOnScreenshot

View File

@ -23,7 +23,6 @@ row = $FF
lda #$10
jsr WaitForKeyWithTimeout
lda $C000
bmi @exit
inc @h1
@ -47,7 +46,6 @@ row = $FF
lda #$10
jsr WaitForKeyWithTimeout
lda $C000
bmi @exit
inc @h2

View File

@ -27,7 +27,6 @@ row2 = $ff
bpl -
lda #$30
jsr WaitForKeyWithTimeout
lda $C000
bmi @exit
inc row1
dec row2

View File

@ -96,6 +96,7 @@ HGRHalfBlockCopy
asl
asl
+HGR_CALC
HGRStaggerCopy
clc
ldx #$04
@loop
@ -121,6 +122,7 @@ HGRHalfBlockToWhite
asl
asl
+HGR_CALC
HGRStaggerToWhite
clc
ldx #$04
@loop

View File

@ -0,0 +1,44 @@
!cpu 6502
!to "build/FX/CORNER.CIRCLE",plain
*=$6000
coord = $FE
lda #<@coords
sta coord
lda #>@coords
sta coord+1
ldy #0
@loop
lda (coord),y
bpl @copy
lda #$28
jsr WaitForKeyWithTimeout
bmi @exit
bpl @next ; always branches
@copy
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.corner.circle.data.a"
!byte $80
!source "src/wait.a"
!source "src/fx/fx.hgr.common.a"

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,6 @@ row = $FF
bne @loop
lda #$20
jsr WaitForKeyWithTimeout
lda $C000
bmi @exit
inc @h1
dec @h2

View File

@ -29,7 +29,6 @@ row2 = $ff
bpl -
lda #$30
jsr WaitForKeyWithTimeout
lda $C000
bmi @exit
inc row1
dec row2

44
src/fx/fx.hgr.radial.a Normal file
View File

@ -0,0 +1,44 @@
!cpu 6502
!to "build/FX/RADIAL",plain
*=$6000
coord = $FE
lda #<@coords
sta coord
lda #>@coords
sta coord+1
ldy #0
@loop
lda (coord),y
bpl @copy
lda #$6
jsr WaitForKeyWithTimeout
bmi @exit
bpl @next ; always branches
@copy
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.radial.data.a"
!byte $80
!source "src/wait.a"
!source "src/fx/fx.hgr.common.a"

2764
src/fx/fx.hgr.radial.data.a Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,40 @@
!cpu 6502
!to "build/FX/STAGGER.LR",plain
*=$6000
row = $fd
col1 = $fe
col2 = $ff
lda #$00
sta col1
lda #$27
sta col2
@outerloop
lda #$2E
sta row
@loop1 ldy col1
lda row
jsr HGRHalfBlockCopy
iny
jsr HGRStaggerCopy
ldy col2
lda row
jsr HGRHalfBlockCopy
dey
jsr HGRStaggerCopy
dec row
dec row
bpl @loop1
lda #$40
jsr WaitForKeyWithTimeout
bmi @exit
inc col1
inc col1
dec col2
dec col2
bpl @outerloop
@exit rts
!source "src/wait.a"
!source "src/fx/fx.hgr.common.a"

View File

@ -0,0 +1,69 @@
!cpu 6502
!to "build/FX/STAGGERWHITE.LR",plain
*=$6000
row = $fd
col1 = $fe
col2 = $ff
lda #$00
sta col1
lda #$27
sta col2
@outerloop1
lda #$2E
sta row
@loop1 ldy col1
lda row
jsr HGRHalfBlockToWhite
iny
jsr HGRStaggerToWhite
ldy col2
lda row
jsr HGRHalfBlockToWhite
dey
jsr HGRStaggerToWhite
dec row
dec row
bpl @loop1
lda #$40
jsr WaitForKeyWithTimeout
bmi @exit
inc col1
inc col1
dec col2
dec col2
bpl @outerloop1
lda #$00
sta col1
lda #$27
sta col2
@outerloop2
lda #$2E
sta row
@loop2 ldy col1
lda row
jsr HGRHalfBlockCopy
iny
jsr HGRStaggerCopy
ldy col2
lda row
jsr HGRHalfBlockCopy
dey
jsr HGRStaggerCopy
dec row
dec row
bpl @loop2
lda #$40
jsr WaitForKeyWithTimeout
bmi @exit
inc col1
inc col1
dec col2
dec col2
bpl @outerloop2
@exit rts
!source "src/wait.a"
!source "src/fx/fx.hgr.common.a"

View File

@ -0,0 +1,39 @@
!cpu 6502
!to "build/FX/STAGGER.UD",plain
*=$6000
row1 = $fe
row2 = $ff
lda #$00
sta row1
lda #$2E
sta row2
ldy #$27
@loop1 lda row1
jsr HGRHalfBlockCopy
dey
jsr HGRStaggerCopy
dey
bpl @loop1
iny ; Y -> 0
@loop2 lda row2
jsr HGRHalfBlockCopy
iny
jsr HGRStaggerCopy
iny
cpy #$28
bne @loop2
lda #$40
jsr WaitForKeyWithTimeout
bmi @exit
dey ; Y -> #$27
inc row1
inc row1
dec row2
dec row2
bpl @loop1
@exit rts
!source "src/wait.a"
!source "src/fx/fx.hgr.common.a"

View File

@ -0,0 +1,68 @@
!cpu 6502
!to "build/FX/STAGGERWHITE.UD",plain
*=$6000
row1 = $fe
row2 = $ff
lda #$00
sta row1
lda #$2E
sta row2
ldy #$27
@loop1 lda row1
jsr HGRHalfBlockToWhite
dey
jsr HGRStaggerToWhite
dey
bpl @loop1
iny ; Y -> 0
@loop2 lda row2
jsr HGRHalfBlockToWhite
iny
jsr HGRStaggerToWhite
iny
cpy #$28
bne @loop2
lda #$30
jsr WaitForKeyWithTimeout
bmi @exit
dey ; Y -> #$27
inc row1
inc row1
dec row2
dec row2
bpl @loop1
lda #$00
sta row1
lda #$2E
sta row2
ldy #$27
@loop3 lda row1
jsr HGRHalfBlockCopy
dey
jsr HGRStaggerCopy
dey
bpl @loop3
iny ; Y -> 0
@loop4 lda row2
jsr HGRHalfBlockCopy
iny
jsr HGRStaggerCopy
iny
cpy #$28
bne @loop4
lda #$30
jsr WaitForKeyWithTimeout
bmi @exit
dey ; Y -> #$27
inc row1
inc row1
dec row2
dec row2
bpl @loop3
@exit rts
!source "src/wait.a"
!source "src/fx/fx.hgr.common.a"

44
src/fx/fx.hgr.sunrise.a Normal file
View File

@ -0,0 +1,44 @@
!cpu 6502
!to "build/FX/SUNRISE",plain
*=$6000
coord = $FE
lda #<@coords
sta coord
lda #>@coords
sta coord+1
ldy #0
@loop
lda (coord),y
bpl @copy
lda #$28
jsr WaitForKeyWithTimeout
bmi @exit
bpl @next ; always branches
@copy
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.sunrise.data.a"
!byte $80
!source "src/wait.a"
!source "src/fx/fx.hgr.common.a"

1983
src/fx/fx.hgr.sunrise.data.a Normal file

File diff suppressed because it is too large Load Diff