diff --git a/res/ARTWORK.SHR.SCORES/CC b/res/ARTWORK.SHR.SCORES/CC
index b0dc99bca..64d60e958 100644
--- a/res/ARTWORK.SHR.SCORES/CC
+++ b/res/ARTWORK.SHR.SCORES/CC
@@ -1 +1 @@
- 334.4422855629522
+ 327.30579882322456
diff --git a/res/ARTWORK.SHR.SCORES/CRAZY.MAZEY b/res/ARTWORK.SHR.SCORES/CRAZY.MAZEY
index 266732e42..2d0e6d932 100644
--- a/res/ARTWORK.SHR.SCORES/CRAZY.MAZEY
+++ b/res/ARTWORK.SHR.SCORES/CRAZY.MAZEY
@@ -1 +1 @@
- 541.9530738584349
+ 538.9938832685687
diff --git a/res/ARTWORK.SHR.SCORES/DEATH.SWORD b/res/ARTWORK.SHR.SCORES/DEATH.SWORD
index b7da41fbb..910e0aa46 100644
--- a/res/ARTWORK.SHR.SCORES/DEATH.SWORD
+++ b/res/ARTWORK.SHR.SCORES/DEATH.SWORD
@@ -1 +1 @@
- 364.9317587447242
+ 352.6997360423836
diff --git a/res/ARTWORK.SHR.UNCOMPRESSED/CC b/res/ARTWORK.SHR.UNCOMPRESSED/CC
index cb0fb269b..286f079f1 100644
Binary files a/res/ARTWORK.SHR.UNCOMPRESSED/CC and b/res/ARTWORK.SHR.UNCOMPRESSED/CC differ
diff --git a/res/ARTWORK.SHR.UNCOMPRESSED/CRAZY.MAZEY b/res/ARTWORK.SHR.UNCOMPRESSED/CRAZY.MAZEY
index 090175133..f5a04d625 100644
Binary files a/res/ARTWORK.SHR.UNCOMPRESSED/CRAZY.MAZEY and b/res/ARTWORK.SHR.UNCOMPRESSED/CRAZY.MAZEY differ
diff --git a/res/ARTWORK.SHR.UNCOMPRESSED/DEATH.SWORD b/res/ARTWORK.SHR.UNCOMPRESSED/DEATH.SWORD
index 53b23ea5a..5b2d0e5ab 100644
Binary files a/res/ARTWORK.SHR.UNCOMPRESSED/DEATH.SWORD and b/res/ARTWORK.SHR.UNCOMPRESSED/DEATH.SWORD differ
diff --git a/res/ARTWORK.SHR/CC b/res/ARTWORK.SHR/CC
index e653d8411..97df1b3dd 100644
Binary files a/res/ARTWORK.SHR/CC and b/res/ARTWORK.SHR/CC differ
diff --git a/res/ARTWORK.SHR/CRAZY.MAZEY b/res/ARTWORK.SHR/CRAZY.MAZEY
index 5f1b04ef5..7dfb919b0 100644
Binary files a/res/ARTWORK.SHR/CRAZY.MAZEY and b/res/ARTWORK.SHR/CRAZY.MAZEY differ
diff --git a/res/ARTWORK.SHR/DEATH.SWORD b/res/ARTWORK.SHR/DEATH.SWORD
index 7f20f93d5..801fc59be 100644
Binary files a/res/ARTWORK.SHR/DEATH.SWORD and b/res/ARTWORK.SHR/DEATH.SWORD differ
diff --git a/res/SFX.CONF b/res/SFX.CONF
index bf24d4764..db3704d70 100644
--- a/res/SFX.CONF
+++ b/res/SFX.CONF
@@ -42,10 +42,12 @@
#
SHR.80BOXES
SHR.FIZZLE
+SHR.RIPPLE
SHR.TWOPASS.LR
SHR.80.SNAKE
SHR.DIAGONAL
SHR.80.DOWN
+SHR.IRIS
SHR.LR
SHR.80.SPIRAL
SHR.FADEIN
diff --git a/res/notes/transitions/shr_iris.py b/res/notes/transitions/shr_iris.py
new file mode 100755
index 000000000..dfa508e84
--- /dev/null
+++ b/res/notes/transitions/shr_iris.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python3
+
+from math import sqrt, sin, cos, pi
+import util
+
+radius_x = 160//2
+radius_y = 100//2
+
+def f(t):
+ return (sqrt(t)*cos(2*pi*sqrt(t)), 0.92*sqrt(t)*sin(2*pi*sqrt(t)))
+
+coords = []
+for i in range(1000000):
+ any = False
+ a, b = f(float(i)/10.0)
+ x = round(radius_x+a)
+ y = round(radius_y+b)
+ if x < 0 or x >= radius_x or y < 0 or y >= radius_y:
+ continue
+ coords.append((y*2,x))
+
+unique_coords = util.unique(coords)
+
+util.write("../../../src/fx/fx.shr.iris.data.a", unique_coords, header="""!cpu 6502
+!to "build/FX/SHR.IRIS.DATA",plain
+*=$9F00
+""")
+
+util.write("../../../src/fx/fx.shr.ripple.data.a", util.ripple(unique_coords), header="""!cpu 6502
+!to "build/FX/SHR.RIPPLE.DATA",plain
+*=$9F00
+""")
diff --git a/res/notes/transitions/util.py b/res/notes/transitions/util.py
index 876dabba5..dc0e4127e 100644
--- a/res/notes/transitions/util.py
+++ b/res/notes/transitions/util.py
@@ -103,7 +103,9 @@ def halfripple(unique_vals):
ripple_vals.append(unique_vals[j])
return ripple_vals
-def write(filename, vals):
+def write(filename, vals, header="", footer=""):
with open(filename, "w") as f:
+ f.write(header)
for aval, bval in vals:
f.write(" !byte %s,%s\n" % (aval, bval))
+ f.write(footer)
diff --git a/src/constants.a b/src/constants.a
index 77a34cbf3..5f40a89c6 100644
--- a/src/constants.a
+++ b/src/constants.a
@@ -164,8 +164,8 @@ gVal = $1F81
gSearchIndex = $6000
gSearchCache = $A000
-; LC RAM 1
-iLoadFileDirect = $FFEF
+; LC RAM 1 & 2
+iLoadFileDirect = $FFEF ; note: you really want LC RAM 2 banked in before calling this
WaitForVBL = $FFF2
UnwaitForVBL = $FFF5
diff --git a/src/fx/fx.shr.iris.a b/src/fx/fx.shr.iris.a
new file mode 100644
index 000000000..4ea464466
--- /dev/null
+++ b/src/fx/fx.shr.iris.a
@@ -0,0 +1,143 @@
+;license:MIT
+;(c) 2021 by 4am
+;
+!cpu 6502
+!to "build/FX.INDEXED/SHR.IRIS",plain
+*=$A000
+
+mirror_cols = $126 ; $A0 bytes but clobbers $20 bytes before
+shrlo = $201 ; $C8 bytes
+CoordinatesFileCopy = $2C8; $11 bytes
+shrhi = $301 ; $C8 bytes
+coords = $9F00 ; $1F40 bytes
+mirror_rows = $BE40 ; $C0 bytes
+
+!macro BUILD_MIRROR_COLS .mirror_cols {
+ ; build lookup table to get $9F-y for y in $00..$9F
+; X=0
+}
+
+ !source "src/constants.a"
+ !source "src/macros.a"
+ !source "src/fx/fx.shr.common.a"
+
+start
+ ldx #$C0
+ ldy #$00
+- tya
+ sta mirror_cols-$21, x
+ sta mirror_rows-1, x
+ iny
+ dex
+ bne -
+
+ +BUILD_SHR_LOOKUP_TABLES shrlo, shrhi
+ ;X=0
+ +COPY_SCB_AND_PALETTES
+ ;WRITEAUXMEM active
+ +WRITE_MAIN
+ ;X=0
+- lda start, x
+ sta $9D00, x
+ lda start+$100, x
+ sta $9E00, x
+ inx
+ bne -
+ jmp stage2
+
+!pseudopc *-$300 {
+CoordinatesFile
+ !byte 16
+ !text "FX/SHR.IRIS.DATA"
+
+stage2
+ ldx #(stage2-CoordinatesFile) ; LOAD_FILE_AT macro destroys pathname
+- lda CoordinatesFile, x ; so we need to make a copy
+ sta CoordinatesFileCopy, x
+ dex
+ bpl -
+
+ +READ_RAM2_WRITE_RAM2
+ +LOAD_FILE_AT CoordinatesFileCopy, coords
+ ;WRITEMAINMEM active after LOAD_FILE_AT macro
+
+ ldx #(endzp-startzp) ; copy loop code to zero page
+- lda startzp-1, x
+ sta $FF, x
+ dex
+ bne -
+
+ +WRITE_AUX
+ jsr InputLoop
+ +WRITE_MAIN
+
+ ldx #$00
+- lda $9D00, x ; copy main code back to $A000
+ sta start, x ; so it can be called again if necessary
+ lda $9E00, x
+ sta start+$100, x
+ inx
+ bne -
+ +READ_RAM1_WRITE_RAM1
+
+startzp
+!pseudopc 0 {
+exit rts ; also terminates stage2 code
+InputLoop
+ ldy #0
+input ldx coords, y ; first value: SHR row (only 0..99 will be in input array)
+ bmi exit ; if > 127 then we're done
+ inc 127 then we're done
+ inc kGlobalPrefsBuffer ;lda ldrhi2
diff --git a/src/hw.vbl.a b/src/hw.vbl.a
index d0fa9b6b9..59aae8d96 100644
--- a/src/hw.vbl.a
+++ b/src/hw.vbl.a
@@ -4,7 +4,7 @@
; Functions to enable and disable VBL polling on various
; Apple II models
-iWaitForVBL
+iWaitForVBL
sei ; IIc is special
sta $C07F ; enable access to VBL register
sta $C05B ; enable VBL polling
diff --git a/src/index/artwork.idx.a b/src/index/artwork.idx.a
index 220d22492..cf60628c7 100644
--- a/src/index/artwork.idx.a
+++ b/src/index/artwork.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10947147
+ !be24 10948420
!le16 4281
diff --git a/src/index/attract.idx.a b/src/index/attract.idx.a
index f3a7c51a4..b5df3109e 100644
--- a/src/index/attract.idx.a
+++ b/src/index/attract.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10899933
+ !be24 10901174
!le16 5239
diff --git a/src/index/cache00.idx.a b/src/index/cache00.idx.a
index 300d2d3e9..5b82f5030 100644
--- a/src/index/cache00.idx.a
+++ b/src/index/cache00.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10842792
+ !be24 10844033
!le16 3586
diff --git a/src/index/cache01.idx.a b/src/index/cache01.idx.a
index 5716392f5..84c18716c 100644
--- a/src/index/cache01.idx.a
+++ b/src/index/cache01.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10855162
+ !be24 10856403
!le16 3946
diff --git a/src/index/cache10.idx.a b/src/index/cache10.idx.a
index bd8bd3ccb..2b206d65d 100644
--- a/src/index/cache10.idx.a
+++ b/src/index/cache10.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10870561
+ !be24 10871802
!le16 4998
diff --git a/src/index/cache11.idx.a b/src/index/cache11.idx.a
index 64a01ba03..bc97e58d9 100644
--- a/src/index/cache11.idx.a
+++ b/src/index/cache11.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10888213
+ !be24 10889454
!le16 5571
diff --git a/src/index/coverfade.idx.a b/src/index/coverfade.idx.a
index 6db04cb1c..c418d785f 100644
--- a/src/index/coverfade.idx.a
+++ b/src/index/coverfade.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10951428
+ !be24 10952701
!le16 410
diff --git a/src/index/credits.idx.a b/src/index/credits.idx.a
index 9812f0ae5..f9ac975e9 100644
--- a/src/index/credits.idx.a
+++ b/src/index/credits.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10952182
+ !be24 10953455
!le16 448
diff --git a/src/index/decrunch.idx.a b/src/index/decrunch.idx.a
index 430f92e44..a16647d71 100644
--- a/src/index/decrunch.idx.a
+++ b/src/index/decrunch.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10952630
+ !be24 10953903
!le16 303
diff --git a/src/index/dfx.idx.a b/src/index/dfx.idx.a
index 3ddb921e8..6ba9168a0 100644
--- a/src/index/dfx.idx.a
+++ b/src/index/dfx.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10907318
+ !be24 10908559
!le16 1242
diff --git a/src/index/dgr.fizzle.idx.a b/src/index/dgr.fizzle.idx.a
index 457d5071f..ed852bf38 100644
--- a/src/index/dgr.fizzle.idx.a
+++ b/src/index/dgr.fizzle.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10951914
+ !be24 10953187
!le16 67
diff --git a/src/index/dgr.idx.a b/src/index/dgr.idx.a
index 49100a52c..08eef3a03 100644
--- a/src/index/dgr.idx.a
+++ b/src/index/dgr.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10947088
+ !be24 10948361
!le16 59
diff --git a/src/index/dhgr.idx.a b/src/index/dhgr.idx.a
index ed719b706..60de53f5a 100644
--- a/src/index/dhgr.idx.a
+++ b/src/index/dhgr.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10945758
+ !be24 10947031
!le16 1249
diff --git a/src/index/dtitle.idx.a b/src/index/dtitle.idx.a
index b119fd94d..741176031 100644
--- a/src/index/dtitle.idx.a
+++ b/src/index/dtitle.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10931748
+ !be24 10933021
!le16 464
diff --git a/src/index/fx.idx.a b/src/index/fx.idx.a
index 9a3bf49ea..2f651bc27 100644
--- a/src/index/fx.idx.a
+++ b/src/index/fx.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10905172
+ !be24 10906413
!le16 2146
diff --git a/src/index/gamehelp.idx.a b/src/index/gamehelp.idx.a
index 8b3ba361b..5ca6edb12 100644
--- a/src/index/gamehelp.idx.a
+++ b/src/index/gamehelp.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10908791
+ !be24 10910064
!le16 6149
diff --git a/src/index/gr.fizzle.idx.a b/src/index/gr.fizzle.idx.a
index 60b501696..56a6fdc13 100644
--- a/src/index/gr.fizzle.idx.a
+++ b/src/index/gr.fizzle.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10951838
+ !be24 10953111
!le16 76
diff --git a/src/index/gr.idx.a b/src/index/gr.idx.a
index 647b0656a..285bbba58 100644
--- a/src/index/gr.idx.a
+++ b/src/index/gr.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10947007
+ !be24 10948280
!le16 81
diff --git a/src/index/helptext.idx.a b/src/index/helptext.idx.a
index db8f7526b..78521405f 100644
--- a/src/index/helptext.idx.a
+++ b/src/index/helptext.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10951981
+ !be24 10953254
!le16 201
diff --git a/src/index/hgr0.idx.a b/src/index/hgr0.idx.a
index fed4ce5f1..86cdd7f6e 100644
--- a/src/index/hgr0.idx.a
+++ b/src/index/hgr0.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10932212
+ !be24 10933485
!le16 4407
diff --git a/src/index/hgr1.idx.a b/src/index/hgr1.idx.a
index 2931d3fcc..cb43dc1e3 100644
--- a/src/index/hgr1.idx.a
+++ b/src/index/hgr1.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10936619
+ !be24 10937892
!le16 1533
diff --git a/src/index/hgr2.idx.a b/src/index/hgr2.idx.a
index a31ea4d4a..527067cca 100644
--- a/src/index/hgr2.idx.a
+++ b/src/index/hgr2.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10938152
+ !be24 10939425
!le16 1040
diff --git a/src/index/hgr3.idx.a b/src/index/hgr3.idx.a
index f2ac0934f..4653b5e9f 100644
--- a/src/index/hgr3.idx.a
+++ b/src/index/hgr3.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10939192
+ !be24 10940465
!le16 3237
diff --git a/src/index/hgr4.idx.a b/src/index/hgr4.idx.a
index 98d2599af..b17bc14a7 100644
--- a/src/index/hgr4.idx.a
+++ b/src/index/hgr4.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10942429
+ !be24 10943702
!le16 2764
diff --git a/src/index/hgr5.idx.a b/src/index/hgr5.idx.a
index a8de7eeb3..a10004217 100644
--- a/src/index/hgr5.idx.a
+++ b/src/index/hgr5.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10945193
+ !be24 10946466
!le16 460
diff --git a/src/index/hgr6.idx.a b/src/index/hgr6.idx.a
index 95486296d..1ef3c4783 100644
--- a/src/index/hgr6.idx.a
+++ b/src/index/hgr6.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10945653
+ !be24 10946926
!le16 105
diff --git a/src/index/joystick.idx.a b/src/index/joystick.idx.a
index 6a11176b2..d171a74c6 100644
--- a/src/index/joystick.idx.a
+++ b/src/index/joystick.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10952933
+ !be24 10954206
!le16 2370
diff --git a/src/index/miniattract.idx.a b/src/index/miniattract.idx.a
index f53d0ea7a..1c8b1bf36 100644
--- a/src/index/miniattract.idx.a
+++ b/src/index/miniattract.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10919853
+ !be24 10921126
!le16 6149
diff --git a/src/index/prelaunch.idx.a b/src/index/prelaunch.idx.a
index 5682af614..cc3ff3d92 100644
--- a/src/index/prelaunch.idx.a
+++ b/src/index/prelaunch.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10893784
+ !be24 10895025
!le16 6149
diff --git a/src/index/search00.idx.a b/src/index/search00.idx.a
index 26cce1788..77d5773d2 100644
--- a/src/index/search00.idx.a
+++ b/src/index/search00.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10834760
+ !be24 10836001
!le16 8032
diff --git a/src/index/search01.idx.a b/src/index/search01.idx.a
index aba5155cd..07dd21cc0 100644
--- a/src/index/search01.idx.a
+++ b/src/index/search01.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10846378
+ !be24 10847619
!le16 8784
diff --git a/src/index/search10.idx.a b/src/index/search10.idx.a
index 317fd04dd..023d7cb2e 100644
--- a/src/index/search10.idx.a
+++ b/src/index/search10.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10859108
+ !be24 10860349
!le16 11453
diff --git a/src/index/search11.idx.a b/src/index/search11.idx.a
index 93493294f..badf3b3ab 100644
--- a/src/index/search11.idx.a
+++ b/src/index/search11.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10875559
+ !be24 10876800
!le16 12654
diff --git a/src/index/sfx.idx.a b/src/index/sfx.idx.a
index 088c6396c..ef25c6075 100644
--- a/src/index/sfx.idx.a
+++ b/src/index/sfx.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10908560
- !le16 231
+ !be24 10909801
+ !le16 263
diff --git a/src/index/slideshow.idx.a b/src/index/slideshow.idx.a
index 131269e93..3823d2953 100644
--- a/src/index/slideshow.idx.a
+++ b/src/index/slideshow.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10914940
+ !be24 10916213
!le16 4913
diff --git a/src/index/title.idx.a b/src/index/title.idx.a
index be3c742c4..23ea63e39 100644
--- a/src/index/title.idx.a
+++ b/src/index/title.idx.a
@@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
- !be24 10926002
+ !be24 10927275
!le16 5746
diff --git a/src/macros.a b/src/macros.a
index ff0b5150f..048f2f7b8 100755
--- a/src/macros.a
+++ b/src/macros.a
@@ -240,6 +240,22 @@
bit $C082
}
+!macro READ_AUX {
+ sta READMAINMEM
+}
+
+!macro READ_MAIN {
+ sta READAUXMEM
+}
+
+!macro WRITE_AUX {
+ sta WRITEAUXMEM
+}
+
+!macro WRITE_MAIN {
+ sta WRITEMAINMEM
+}
+
; requires setting zpCharMask in zero page to #$FF or #$DF before use
!macro FORCE_UPPERCASE_IF_REQUIRED {
cmp #$E1