add SHR soft iris effects

This commit is contained in:
4am 2021-12-17 21:27:18 -05:00
parent 0ec05f3f88
commit db6704a260
41 changed files with 4152 additions and 39 deletions

View File

@ -48,17 +48,19 @@ SHR.RIPPLE
SHR.TWOPASS.LR
SHR.RADIAL
SHR.80.SNAKE
SHR.SOFT.IRIS
SHR.DIAGONAL
SHR.80.DOWN
SHR.IRIS
SHR.IRIS.IN
SHR.LR
SHR.RADIAL2
SHR.80.SPIRAL
SHR.FADEIN
SHR.IRIS.IN
SHR.SOFTIRIS.IN
SHR.80.SIDE2
SHR.LR2
SHR.80.ARROW
SHR.IRIS
SHR.UD
[eof]

View File

@ -0,0 +1,32 @@
#!/usr/bin/env python3
from math import sqrt, sin, cos, acos, pi
import util
max_x = 320
max_y = 200
def f(t, k, a):
r = k/cos(0.4*acos(sin(2.5*(t+pi/2))))
return r*cos(t+a),r*sin(t+a)
coords = []
for k_mul in range(1000):
a = float(k_mul*pi/1000)
for t_mul in range(int(pi*1000+1)):
a, b = f(float(t_mul/100), float(k_mul)/10.0, a)
x = round(max_x//2+a*1.2)
y = round(max_y//2+b)
if (y % 2 != 0):
continue
if x < 0 or x >= max_x//2 or y < 0 or y >= max_y//2:
continue
coords.append((y,x//2))
unique_coords = util.unique(coords)
util.write("../../../src/fx/fx.shr.soft.iris.data.a", unique_coords, header="""!cpu 6502
!to "build/FX/SHR.SFIRIS.DATA",plain
*=$9F00
""", footer=""" !byte 128
""")

37
src/fx/fx.shr.soft.iris.a Normal file
View File

@ -0,0 +1,37 @@
;license:MIT
;(c) 2021 by 4am
;
!cpu 6502
!to "build/FX.INDEXED/SHR.SOFT.IRIS",plain
*=$A000
shrlo = $201 ; $C8 bytes
CoordinatesFileCopy = $2C8; $11 bytes
shrhi = $301 ; $C8 bytes
mirror_cols = $1E29 ; $A0 bytes but clobbers $28 bytes before
mirror_rows = $1F01 ; $C7 bytes
coords = $9F00 ; $1F41 bytes
!source "src/fx/macros.a"
!source "src/fx/fx.shr.common.a"
+SHR_STAGE_1 shrlo, shrhi, mirror_rows, mirror_cols
jmp stage2
!pseudopc *-$300 {
stage2
+LOAD_SHR_COORDINATES_AT coords, CoordinatesFile, CoordinatesFileCopy
+SHR_STAGE_2 startzp, endzp
rts
startzp
!pseudopc 0 {
stage3
+SHR_STAGE_3 coords, shrlo, shrhi, mirror_rows, mirror_cols
}
endzp
}
CoordinatesFile
!byte 18
!text "FX/SHR.SFIRIS.DATA"

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,38 @@
;license:MIT
;(c) 2021 by 4am
;
!cpu 6502
!to "build/FX.INDEXED/SHR.SOFTIRIS.IN",plain
*=$A000
shrlo = $201 ; $C8 bytes
CoordinatesFileCopy = $2C8; $11 bytes
shrhi = $301 ; $C8 bytes
mirror_cols = $1E29 ; $A0 bytes but clobbers $28 bytes before
mirror_rows = $1F01 ; $C7 bytes
coords = $9F00 ; $1F41 bytes
!source "src/fx/macros.a"
!source "src/fx/fx.shr.common.a"
+SHR_STAGE_1 shrlo, shrhi, mirror_rows, mirror_cols
jmp stage2
!pseudopc *-$300 {
stage2
+LOAD_SHR_COORDINATES_AT coords, CoordinatesFile, CoordinatesFileCopy
+SHR_REVERSE coords
+SHR_STAGE_2 startzp, endzp
rts
startzp
!pseudopc 0 {
stage3
+SHR_STAGE_3 coords, shrlo, shrhi, mirror_rows, mirror_cols
}
endzp
}
CoordinatesFile
!byte 18
!text "FX/SHR.SFIRIS.DATA"

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10963039
!be24 10963693
!le16 4281

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10915740
!be24 10916352
!le16 5239

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10858599
!be24 10859211
!le16 3586

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10870969
!be24 10871581
!le16 3946

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10886368
!be24 10886980
!le16 4998

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10904020
!be24 10904632
!le16 5571

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10967320
!be24 10967974
!le16 410

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10968074
!be24 10968728
!le16 448

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10968522
!be24 10969176
!le16 303

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10923125
!be24 10923737
!le16 1242

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10967806
!be24 10968460
!le16 67

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10962980
!be24 10963634
!le16 59

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10961650
!be24 10962304
!le16 1249

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10947640
!be24 10948294
!le16 464

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10920979
!be24 10921591
!le16 2146

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10924683
!be24 10925337
!le16 6149

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10967730
!be24 10968384
!le16 76

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10962899
!be24 10963553
!le16 81

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10967873
!be24 10968527
!le16 201

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10948104
!be24 10948758
!le16 4407

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10952511
!be24 10953165
!le16 1533

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10954044
!be24 10954698
!le16 1040

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10955084
!be24 10955738
!le16 3237

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10958321
!be24 10958975
!le16 2764

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10961085
!be24 10961739
!le16 460

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10961545
!be24 10962199
!le16 105

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10968825
!be24 10969479
!le16 2370

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10935745
!be24 10936399
!le16 6149

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10909591
!be24 10910203
!le16 6149

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10850567
!be24 10851179
!le16 8032

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10862185
!be24 10862797
!le16 8784

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10874915
!be24 10875527
!le16 11453

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10891366
!be24 10891978
!le16 12654

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10924367
!le16 316
!be24 10924979
!le16 358

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10930832
!be24 10931486
!le16 4913

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10941894
!be24 10942548
!le16 5746