hook up all SHR transition effects and cycle through them

This commit is contained in:
4am 2021-12-02 22:22:28 -05:00
parent eef9098661
commit a5af77ec60
53 changed files with 169 additions and 81 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

52
res/SFX.CONF Normal file
View File

@ -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]

View File

@ -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"

View File

@ -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 $FE
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 (<src), y
sec
sub1 sbc #0
dey
bpl -
clc
lda $FE
lda <src
adc #10
sta $FE
sta <src
pla
sec
sub2 sbc #-25
@ -109,13 +116,6 @@ sub2 sbc #-25
sta sub1+1
stx sub2+1
bcc ---
txa
- ldy start, x
sty $00, x
sta EndStagesHi, x
inx
bne -
+BUILD_SHR_LOOKUP_TABLES shrlo, shrhi
+COPY_SCB_AND_PALETTES
@ -147,7 +147,7 @@ NextBox dex
exit sta WRITEMAINMEM
setV rts
src !word 0
src !word BoxesX
rowcount !byte 0
lefty !byte 0
righty !byte 0
@ -253,9 +253,9 @@ BoxStages
!macro SET_ROW_X {
lda shrlo, x
sta src
sta <src
lda shrhi, x
sta src+1
sta <src+1
ldy lefty
}

View File

@ -2,7 +2,7 @@
;(c) 2021 by 4am
!cpu 6502
!to "build/FX/SHR.FIZZLE",plain
!to "build/FX.INDEXED/SHR.DIAGONAL",plain
*=$A000
!source "src/fx/fx.shr.common.a"

View File

@ -2,7 +2,7 @@
;(c) 2021 by 4am
!cpu 6502
!to "build/FX/SHR.FIZZLE",plain
!to "build/FX.INDEXED/SHR.FADEIN",plain
*=$A000
color = $F7 ; byte

View File

@ -2,7 +2,7 @@
;(c) 2019-2020 by qkumba/4am/John Brooks
!cpu 6502
!to "build/SHR.FIZZLE",plain
!to "build/FX.INDEXED/SHR.FIZZLE",plain
*=$A000
!source "src/fx/fx.shr.common.a"

View File

@ -2,7 +2,7 @@
;(c) 2021 by 4am
!cpu 6502
!to "build/SHR.LR",plain
!to "build/FX.INDEXED/SHR.LR",plain
*=$A000
!source "src/fx/fx.shr.common.a"

View File

@ -2,7 +2,7 @@
;(c) 2021 by 4am
!cpu 6502
!to "build/SHR.LR2",plain
!to "build/FX.INDEXED/SHR.LR2",plain
*=$A000
!source "src/fx/fx.shr.common.a"

View File

@ -2,7 +2,7 @@
;(c) 2021 by 4am
!cpu 6502
!to "build/FX/SHR.FIZZLE",plain
!to "build/FX.INDEXED/SHR.UD",plain
*=$A000
!source "src/fx/fx.shr.common.a"

View File

@ -16,6 +16,8 @@
; A/Y clobbered
;------------------------------------------------------------------------------
HasVidHDCard
sec
rts
ldx #$C7
@slotLoop
stx @byteLoop+2

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10802342
!be24 10805403
!le16 4244

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10755453
!be24 10758378
!le16 5223

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10698664
!be24 10701589
!le16 3593

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10711041
!be24 10713966
!le16 3953

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10726447
!be24 10729372
!le16 4628

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10743729
!be24 10746654
!le16 5575

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10807086
!be24 10810057
!le16 107

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

8
src/index/sfx.idx.a Normal file
View File

@ -0,0 +1,8 @@
;
; Index record for build/SFX.IDX
;
; This file is automatically generated
;
!byte 0
!be24 10766989
!le16 136

View File

@ -1,8 +0,0 @@
;
; Index record for build/SHR.FIZZLE
;
; This file is automatically generated
;
!byte 0
!be24 10806996
!le16 90

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 10770213
!be24 10773274
!le16 4894

View File

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

View File

@ -27,6 +27,9 @@ kNextFX
kNextDFX
!byte 7
!raw "NEXTDFX"
kNextSFX
!byte 7
!raw "NEXTSFX"
kCheat
!byte 5
!raw "CHEAT"
@ -46,7 +49,10 @@ kCheat
.kFluff3 !byte .kFluff4-*-1
!byte $0A
!raw "# value=effect listed in DFX.CONF",$0A
.kFluff4 !byte .kEOF-*-1
.kFluff4 !byte .kFluff5-*-1
!byte $0A
!raw "# value=effect listed in SFX.CONF",$0A
.kFluff5 !byte .kEOF-*-1
!byte $0A
!raw "# value=0 or 1",$0A
.kEOF !byte ._-*-1
@ -207,6 +213,11 @@ pref_set
+LDADDR .kFluff4
jsr .addString
+LDADDR kNextSFX
jsr .addStringFromStore
+LDADDR .kFluff5
jsr .addString
+LDADDR kCheat
jsr .addStringFromStore

View File

@ -81,6 +81,9 @@ kFXIndexRecord
kDFXIndexRecord
!source "src/index/dfx.idx.a"
kSFXIndexRecord
!source "src/index/sfx.idx.a"
kGameHelpIndexRecord
!source "src/index/gamehelp.idx.a"
@ -176,9 +179,6 @@ kCoverFadeRecord
kGRFizzleRecord
!source "src/index/gr.fizzle.idx.a"
kSFXFizzleRecord
!source "src/index/shr.fizzle.idx.a"
kHelpBackgroundRecord
!source "src/index/res.help.idx.a"

View File

@ -54,17 +54,36 @@ jmpblank
jmp BlankHGR
;------------------------------------------------------------------------------
; LoadSHGRTransition [private]
; load the SHR transition effect code (currently always the same file)
; LoadSHRTransition [private]
; looks up name of next SHR transition effect in SFX.CONF and loads that file
; at $A000
;
; in: none
; out: all registers and flags clobbered
; $A000..$BFFF/main contains transition effect code
;------------------------------------------------------------------------------
LoadSHRTransition
jsr LoadIndexedFile ; load SHR transition effects list into $A000
- !word $A000
!word kSFXIndexRecord
jsr pref_get ; get SHR transition effect from prefs
!word kNextSFX
!word -
+ST16 @indexRecordPtr ; A/Y = filename (don't load file yet)
; $WINDEX = index of the transition in SFX store
+LDADDR -
jsr okvs_next ; get transition after this one
+ST16 +
jsr pref_set ; update prefs store and save to disk
!word kNextSFX
+ !word $FDFD ; SMC
jsr LoadIndexedFile
!word $A000
!word kSFXFizzleRecord
!word $A000 ; load actual transition effect code into $A000
@indexRecordPtr
!word $FDFD ; SMC
SHRRTS rts
;------------------------------------------------------------------------------