From a5af77ec60c1940ef7fda30179fb5e3f9f2959bd Mon Sep 17 00:00:00 2001 From: 4am Date: Thu, 2 Dec 2021 22:22:28 -0500 Subject: [PATCH] hook up all SHR transition effects and cycle through them --- Makefile | 3 +- res/ATTRACT.CONF | 4 +- res/DFX.CONF | 4 +- res/FX.CONF | 4 +- res/PREFS.CONF | 3 ++ res/SFX.CONF | 52 +++++++++++++++++++ src/fx/{wip => }/fx.shr.2pass.lr.a | 2 +- src/fx/{wip => }/fx.shr.80boxes.a | 36 ++++++------- src/fx/{wip => }/fx.shr.diagonal.a | 2 +- ...x.shr.palette.fadein.a => fx.shr.fadein.a} | 2 +- src/fx/fx.shr.fizzle.a | 2 +- src/fx/{wip => }/fx.shr.lr.a | 2 +- src/fx/{wip => }/fx.shr.lr2.a | 2 +- src/fx/{wip/fx.shr.thin.ud.a => fx.shr.ud.a} | 2 +- src/hw.vidhd.a | 2 + src/index/artwork.idx.a | 2 +- src/index/attract.idx.a | 2 +- src/index/cache00.idx.a | 2 +- src/index/cache01.idx.a | 2 +- src/index/cache10.idx.a | 2 +- src/index/cache11.idx.a | 2 +- src/index/coverfade.idx.a | 2 +- src/index/credits.idx.a | 2 +- src/index/decrunch.idx.a | 2 +- src/index/dfx.idx.a | 2 +- src/index/dhgr.idx.a | 2 +- src/index/dtitle.idx.a | 2 +- src/index/fx.idx.a | 2 +- src/index/gamehelp.idx.a | 2 +- src/index/gr.fizzle.idx.a | 2 +- src/index/gr.idx.a | 2 +- src/index/helptext.idx.a | 2 +- src/index/hgr0.idx.a | 2 +- src/index/hgr1.idx.a | 2 +- src/index/hgr2.idx.a | 2 +- src/index/hgr3.idx.a | 2 +- src/index/hgr4.idx.a | 2 +- src/index/hgr5.idx.a | 2 +- src/index/hgr6.idx.a | 2 +- src/index/joystick.idx.a | 2 +- src/index/miniattract.idx.a | 2 +- src/index/prelaunch.idx.a | 2 +- src/index/search00.idx.a | 2 +- src/index/search01.idx.a | 2 +- src/index/search10.idx.a | 2 +- src/index/search11.idx.a | 2 +- src/index/sfx.idx.a | 8 +++ src/index/shr.fizzle.idx.a | 8 --- src/index/slideshow.idx.a | 2 +- src/index/title.idx.a | 2 +- src/parse.prefs.a | 13 ++++- src/prodos.path.a | 6 +-- src/ui.attract.shr.a | 27 ++++++++-- 53 files changed, 169 insertions(+), 81 deletions(-) create mode 100644 res/SFX.CONF rename src/fx/{wip => }/fx.shr.2pass.lr.a (91%) rename src/fx/{wip => }/fx.shr.80boxes.a (98%) rename src/fx/{wip => }/fx.shr.diagonal.a (92%) rename src/fx/{wip/fx.shr.palette.fadein.a => fx.shr.fadein.a} (95%) rename src/fx/{wip => }/fx.shr.lr.a (91%) rename src/fx/{wip => }/fx.shr.lr2.a (92%) rename src/fx/{wip/fx.shr.thin.ud.a => fx.shr.ud.a} (93%) create mode 100644 src/index/sfx.idx.a delete mode 100644 src/index/shr.fizzle.idx.a diff --git a/Makefile b/Makefile index 57a34f5bd..7a302b296 100644 --- a/Makefile +++ b/Makefile @@ -127,6 +127,7 @@ index: md asmfx asmprelaunch compress # [ -f build/index ] || (bin/buildindexedfile.sh -p -a build/TOTAL.DATA build/FX.INDEXED < res/FX.CONF > build/FX.IDX) [ -f build/index ] || (bin/buildindexedfile.sh -p -a build/TOTAL.DATA build/FX.INDEXED < res/DFX.CONF > build/DFX.IDX) + [ -f build/index ] || (bin/buildindexedfile.sh -p -a build/TOTAL.DATA build/FX.INDEXED < res/SFX.CONF > build/SFX.IDX) # # precompute indexed files for HGR & DHGR action screenshots # note: these can not be padded because they are compressed and the decompressor needs the exact size @@ -174,6 +175,7 @@ index: md asmfx asmprelaunch compress [ -f build/index ] || bin/addfile.sh build/ATTRACT.IDX build/TOTAL.DATA > src/index/attract.idx.a [ -f build/index ] || bin/addfile.sh build/FX.IDX build/TOTAL.DATA > src/index/fx.idx.a [ -f build/index ] || bin/addfile.sh build/DFX.IDX build/TOTAL.DATA > src/index/dfx.idx.a + [ -f build/index ] || bin/addfile.sh build/SFX.IDX build/TOTAL.DATA > src/index/sfx.idx.a [ -f build/index ] || bin/addfile.sh build/GAMEHELP.IDX build/TOTAL.DATA > src/index/gamehelp.idx.a [ -f build/index ] || bin/addfile.sh build/SLIDESHOW.IDX build/TOTAL.DATA > src/index/slideshow.idx.a [ -f build/index ] || bin/addfile.sh build/MINIATTRACT.IDX build/TOTAL.DATA > src/index/miniattract.idx.a @@ -193,7 +195,6 @@ index: md asmfx asmprelaunch compress # add additional miscellaneous files # [ -f build/index ] || bin/addfile.sh build/COVERFADE build/TOTAL.DATA > src/index/coverfade.idx.a - [ -f build/index ] || bin/addfile.sh build/SHR.FIZZLE build/TOTAL.DATA > src/index/shr.fizzle.idx.a [ -f build/index ] || bin/addfile.sh build/GR.FIZZLE build/TOTAL.DATA > src/index/gr.fizzle.idx.a [ -f build/index ] || bin/addfile.sh build/HELPTEXT build/TOTAL.DATA > src/index/helptext.idx.a [ -f build/index ] || bin/addfile.sh build/CREDITS build/TOTAL.DATA > src/index/credits.idx.a diff --git a/res/ATTRACT.CONF b/res/ATTRACT.CONF index 487c6ab7f..42a9c8749 100644 --- a/res/ATTRACT.CONF +++ b/res/ATTRACT.CONF @@ -9,8 +9,8 @@ # # The same format is used by the per-game ("mini-attract-mode") configuration files. # -# This file is converted to a binary data structure at build time and stored in -# ATTRACT.IDX on the final disk image. +# This file is converted to a binary data structure (ATTRACT.IDX) during build +# then added to TOTAL.DATA on the final disk image. # # Format: # key=value diff --git a/res/DFX.CONF b/res/DFX.CONF index cd9b46112..017038a40 100644 --- a/res/DFX.CONF +++ b/res/DFX.CONF @@ -19,8 +19,8 @@ # on exit. If you need ROM routines, you are responsible for switching to ROM # then switching back to RAM bank 1 (read/write) before returning. # -# This file is converted to a binary data structure during build and stored -# in DFX.IDX on the final disk image. +# This file is converted to a binary data structure (DFX.IDX) during build +# then added to TOTAL.DATA on the final disk image. # DHGR.FIZZLE2BIT DHGR.RIPPLE diff --git a/res/FX.CONF b/res/FX.CONF index c4b3832ca..cc50bda49 100644 --- a/res/FX.CONF +++ b/res/FX.CONF @@ -19,8 +19,8 @@ # on exit. If you need ROM routines, you are responsible for switching to ROM # then switching back to RAM bank 1 (read/write) before returning. # -# This file is converted to a binary data structure during build and stored -# in FX.IDX on the final disk image. +# This file is converted to a binary data structure (FX.IDX) during build +# then added to TOTAL.DATA on the final disk image. # BOXES48.SNAKE RIPPLE diff --git a/res/PREFS.CONF b/res/PREFS.CONF index 363478970..6d4061102 100644 --- a/res/PREFS.CONF +++ b/res/PREFS.CONF @@ -11,6 +11,9 @@ NEXTFX= # value=transition effect listed in DFX.CONF, or empty NEXTDFX= +# value=transition effect listed in SFX.CONF, or empty +NEXTSFX= + # value=0 or 1 CHEAT=0 diff --git a/res/SFX.CONF b/res/SFX.CONF new file mode 100644 index 000000000..8ab537617 --- /dev/null +++ b/res/SFX.CONF @@ -0,0 +1,52 @@ +# +# Transition effects for SHR slideshows +# +# Each Mega-Attract Module that is an SHR slideshow (see ATTRACT.CONF) +# will use a single transition effect for the length of the module. +# Transition effects are loaded in the order listed in this file. Each line +# of this file is a filename (not including comments, like this one). The +# name of the next transition effect is stored in the global prefs, so this +# file should not contain duplicates. +# +# Transition effects are binary files loaded at $A000 and called with main +# memory banked in and the next SHR graphic already loaded at $2000/main. +# A transition effect has full use of zero page (main), text page (main, +# but preserve screen holes), and $A000-$BEFF/main. $BF00-$BFFF/main is +# reserved for the ProDOS shim. LC RAM banks 1 and 2 are reserved for the +# launcher. +# +# /!\ You can not assume auxiliary memory exists! No, really. +# +# Consider this (supported) configuration: Apple ][+, 64K, VidHD card. +# This machine is capable of displaying SHR graphics by copying pixel and +# palette data from $2000-$9FFF/main to $2000-$9FFF/aux, despite the fact +# that auxiliary memory does not exist and the writes will actually go to +# main memory. However, the VidHD card notices and respects the WRITEAUXMEM +# softswitch and will cache the data in its internal cache and ultimately +# display it. +# +# Even worse, this means that SHR transitions must be careful about writing +# to aux anything other than the current value of that address in main, +# because in some (supported) configurations, those writes will actually +# be altering main memory. Example: you want to clear the palettes space +# before progressively fading them in. Writing all zeros to the palettes +# in "auxiliary" memory will actually overwrite the original palettes in +# main memory. +# +# Important: LC RAM bank 1 will be read/write on entry and must be read/write +# on exit. If you need ROM routines, you are responsible for switching to ROM +# then switching back to RAM bank 1 (read/write) before returning. +# +# This file is converted to a binary data structure (SFX.IDX) during build +# then added to TOTAL.DATA on the final disk image. +# +SHR.80BOXES +SHR.FIZZLE +SHR.TWOPASS.LR +SHR.DIAGONAL +SHR.LR +SHR.FADEIN +SHR.LR2 +SHR.UD + +[eof] diff --git a/src/fx/wip/fx.shr.2pass.lr.a b/src/fx/fx.shr.2pass.lr.a similarity index 91% rename from src/fx/wip/fx.shr.2pass.lr.a rename to src/fx/fx.shr.2pass.lr.a index db38a6c8d..b1fe95e3c 100644 --- a/src/fx/wip/fx.shr.2pass.lr.a +++ b/src/fx/fx.shr.2pass.lr.a @@ -2,7 +2,7 @@ ;(c) 2021 by 4am !cpu 6502 -!to "build/SHR.TWOPASS.LR",plain +!to "build/FX.INDEXED/SHR.TWOPASS.LR",plain *=$A000 !source "src/fx/fx.shr.common.a" diff --git a/src/fx/wip/fx.shr.80boxes.a b/src/fx/fx.shr.80boxes.a similarity index 98% rename from src/fx/wip/fx.shr.80boxes.a rename to src/fx/fx.shr.80boxes.a index 1e046f220..0c38d4a04 100644 --- a/src/fx/wip/fx.shr.80boxes.a +++ b/src/fx/fx.shr.80boxes.a @@ -3,7 +3,7 @@ ; !cpu 6502 -!to "build/SHR.FIZZLE",plain +!to "build/FX.INDEXED/SHR.80BOXES",plain *=$A000 ; The SHR screen in 320x200 mode is separated into 80 boxes. @@ -81,23 +81,30 @@ shrhi = $301 ; [$C8 bytes] !source "src/fx/macros.a" !source "src/fx/fx.shr.common.a" - lda #BoxesX - sta $FF + ldx #0 +- ldy start, x + sty $00, x + sta EndStagesHi, x + inx + bne - + + stx seta+1 + stx sub1+1 + ldx #-25 + stx sub2+1 --- ldx #8 seta lda #0 -- pha ldy #10-1 -- sta ($FE), y +- sta (