mirror of
https://github.com/a2-4am/4cade.git
synced 2025-02-17 07:31:19 +00:00
read NEXTFX and NEXTDFX from prefs on startup, plus some comments
This commit is contained in:
parent
8f183e6f6a
commit
dd36021ed4
3
Makefile
3
Makefile
@ -70,7 +70,8 @@ dsk: md asm
|
||||
cp res/_FileInformation.txt build/ >>build/log
|
||||
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "build/LAUNCHER.SYSTEM" >>build/log
|
||||
$(CADIUS) CREATEFOLDER build/"$(DISK)" "/${VOLUME}/X/" >>build/log
|
||||
cp res/prefs-sample.conf build/PREFS.CONF >>build/log
|
||||
# cp res/prefs-sample.conf build/PREFS.CONF >>build/log
|
||||
cp res/prefs.conf build/PREFS.CONF >>build/log
|
||||
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "build/PREFS.CONF" >>build/log
|
||||
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/GAMES.CONF" >>build/log
|
||||
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/ATTRACT.CONF" >>build/log
|
||||
|
@ -1 +1 @@
|
||||
#
# Mega-Attract-Mode configuration file
#
# Mega-Attract-Mode is split into modules. Each module can be a
# short slideshow or a self-running demo (like a game's built-in
# 'attract mode'). Modules are run in the order listed here, one
# after the next, until interrupted by user input. The last-run
# module is tracked in the master prefs file.
#
# Format:
# key=value
#
# |key| must be unique within this file
#
# |value| must be one of
# 1 for HGR slideshow (|key| is a file containing a list of HGR graphics)
# 2 for DHGR slideshow (|key| is a file containing a list of DHGR graphics)
# 3 for self-running demo (|key| is an executable binary file)
#
# Blank lines and lines beginning with '#' are ignored (like this one!)
# A line beginning with '[' terminates the parsing
#
SHORT.CONF=1
PLASMANIA=3
SPY.HUNTER=3
DINO.EGGS=3
BOLO=3
CHAMP.LODERUN=3
SPYS.DEMISE=3
PEST.PATROL=3
PITFALL.II=3
LODE.RUNNER=3
BURGERTIME=3
SPARE.CHANGE=3
SNEAKERS=3
WAVY.NAVY=3
#HARD.HAT.MACK=3
DHGR.CONF=2
FAVORITES.CONF=1
EFG.CONF=1
ACTIVISION.CONF=1
CD.CONF=1
BRODERBUND.CONF=1
T.CONF=1
ATARI.CONF=1
SIERRA.CONF=1
PQR.CONF=1
DATAMOST.CONF=1
MNO.CONF=1
DATASOFT.CONF=1
S.CONF=1
MICROFUN.CONF=1
AB.CONF=1
PICCADILLY.CONF=1
HIJKL.CONF=1
SIRIUS.CONF=1
[eof]
|
||||
#
# Mega-Attract-Mode configuration file
#
# Mega-Attract-Mode is split into modules. Each module can be a
# short slideshow or a self-running demo (like a game's built-in
# 'attract mode'). Modules are run in the order listed here, one
# after the next, until interrupted by user input. The last-run
# module is tracked in the global prefs file.
#
# Format:
# key=value
#
# |key| must be unique within this file
#
# |value| must be one of
# 1 for HGR slideshow (|key| is a file containing a list of HGR graphics)
# 2 for DHGR slideshow (|key| is a file containing a list of DHGR graphics)
# 3 for self-running demo (|key| is an executable binary file)
#
# Blank lines and lines beginning with '#' are ignored (like this one!)
# A line beginning with '[' terminates the parsing
#
SHORT.CONF=1
PLASMANIA=3
SPY.HUNTER=3
DINO.EGGS=3
BOLO=3
CHAMP.LODERUN=3
SPYS.DEMISE=3
PEST.PATROL=3
PITFALL.II=3
LODE.RUNNER=3
BURGERTIME=3
SPARE.CHANGE=3
SNEAKERS=3
WAVY.NAVY=3
#HARD.HAT.MACK=3
DHGR.CONF=2
FAVORITES.CONF=1
EFG.CONF=1
ACTIVISION.CONF=1
CD.CONF=1
BRODERBUND.CONF=1
T.CONF=1
ATARI.CONF=1
SIERRA.CONF=1
PQR.CONF=1
DATAMOST.CONF=1
MNO.CONF=1
DATASOFT.CONF=1
S.CONF=1
MICROFUN.CONF=1
AB.CONF=1
PICCADILLY.CONF=1
HIJKL.CONF=1
SIRIUS.CONF=1
[eof]
|
@ -1 +1 @@
|
||||
#
# transition effects for DHGR slideshows
#
DHGR.RIPPLE
DHGR.RADIAL
DHGR.STAR
DHGR.RADIAL3
DHGR.IRIS
DHGR.RADIAL2
DHGR.RADIAL4
DHGR.RADIAL5
#TODO port this to a separate file like the others
#DHGR.FIZZLE
[eof]
|
||||
#
# transition effects for DHGR slideshows
#
# Each Mega-Attract Module that is a DHGR 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 $6000 and called with DHGR
# page 1 showing and the next DHGR graphic already loaded at $4000/main and
# $4000/aux. A transition effect has full use of main and auxiliary memory,
# including zero pages and text pages if needed. LC RAM banks 1 and 2 are
# reserved for the launcher.
#
# 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.
#
DHGR.RIPPLE
DHGR.RADIAL
DHGR.STAR
DHGR.RADIAL3
DHGR.IRIS
DHGR.RADIAL2
DHGR.RADIAL4
DHGR.RADIAL5
#TODO port this to a separate file like the others
#DHGR.FIZZLE
[eof]
|
@ -1 +1 @@
|
||||
#
# transition effects for HGR slideshows
#
RIPPLE2
STAR
CORNER.CIRCLE
SUNRISE
SUNSET
RADIAL
RADIAL2
RADIAL3
RADIAL4
RADIAL5
FOURSPIRAL
RIPPLE
IRIS
SPLIT.UD.INTRO
DIAGONAL
CHECKERBOARD
HALF.FIZZLE
BAR.DISSOLVE
STAGGERWHITE.LR
DIAMOND
ONESQUARE
TWOPASS.LR
CRYSTAL
HALF.MOSAIC
STAGGER.LR
FOURSQUARE
STAGGER.UD
INTERLOCK.LR
BLOCK.MOSAIC
FIZZLE
STAGGERWHITE.UD
INTERLOCK.UD
BLOCK.FIZZLE
SPIRAL
[eof]
|
||||
#
# transition effects for HGR slideshows
#
# Each Mega-Attract Module that is an HGR 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 $6000 and called with
# hi-res page 1 showing and the next HGR graphic already loaded at $4000.
# A transition effect has full use of main memory, including zero page and
# text page if needed. LC RAM banks 1 and 2 are reserved for the launcher.
#
# 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.
#
RIPPLE2
STAR
CORNER.CIRCLE
SUNRISE
SUNSET
RADIAL
RADIAL2
RADIAL3
RADIAL4
RADIAL5
FOURSPIRAL
RIPPLE
IRIS
SPLIT.UD.INTRO
DIAGONAL
CHECKERBOARD
HALF.FIZZLE
BAR.DISSOLVE
STAGGERWHITE.LR
DIAMOND
ONESQUARE
TWOPASS.LR
CRYSTAL
HALF.MOSAIC
STAGGER.LR
FOURSQUARE
STAGGER.UD
INTERLOCK.LR
BLOCK.MOSAIC
FIZZLE
STAGGERWHITE.UD
INTERLOCK.UD
BLOCK.FIZZLE
SPIRAL
[eof]
|
@ -100,6 +100,30 @@ OneTimeSetup
|
||||
+LDAY SRC
|
||||
+STAY gSlideshowStore ; save pointer to free space for next store
|
||||
|
||||
jsr okvs_get ; get next HGR transition effect from prefs
|
||||
!word gGlobalPrefsStore
|
||||
!word kNextFX
|
||||
bcs @nofx
|
||||
+STAY @fx
|
||||
jsr okvs_get
|
||||
!word gFXStore
|
||||
@fx !word $FDFD ; SMC
|
||||
bcc +
|
||||
@nofx ldx #0
|
||||
+ stx gFXIndex
|
||||
|
||||
jsr okvs_get ; get next DHGR transition effect from prefs
|
||||
!word gGlobalPrefsStore
|
||||
!word kNextDFX
|
||||
bcs @nodfx
|
||||
+STAY @dfx
|
||||
jsr okvs_get
|
||||
!word gDFXStore
|
||||
@dfx !word $FDFD ; SMC
|
||||
bcc +
|
||||
@nodfx ldx #0
|
||||
+ stx gDFXIndex
|
||||
|
||||
jmp Main
|
||||
kGameListConfFile
|
||||
!byte @kGameListConfFile_e-@kGameListConfFile_b
|
||||
|
@ -6,6 +6,9 @@
|
||||
; Public functions
|
||||
; - AttractMode
|
||||
;
|
||||
; Public variables
|
||||
; - gFXIndex ; [byte] numeric index of HGR transition effect
|
||||
; - gDFXIndex ; [byte] numeric index of DHGR transition effect
|
||||
|
||||
AttractMode
|
||||
jsr okvs_nth ; get filename of next attract-mode module
|
||||
@ -158,30 +161,31 @@ WaitOnScreenshot
|
||||
LoadTransition
|
||||
jsr okvs_nth ; get filename of transition effect code
|
||||
!word gFXStore
|
||||
FXIndex !byte 0
|
||||
gFXIndex
|
||||
!byte 0
|
||||
+STAY @fxkey
|
||||
|
||||
inc FXIndex ; increment transition effect index
|
||||
inc gFXIndex ; increment transition effect index
|
||||
jsr okvs_len
|
||||
!word gFXStore
|
||||
cmp FXIndex
|
||||
cmp gFXIndex
|
||||
bne +
|
||||
lda #0
|
||||
sta FXIndex
|
||||
sta gFXIndex
|
||||
+
|
||||
lda FXIndex
|
||||
lda gFXIndex
|
||||
sta @nexti
|
||||
jsr okvs_nth ; get name of next transition
|
||||
jsr okvs_nth ; get name of next HGR transition
|
||||
!word gFXStore
|
||||
@nexti !byte $FD ; SMC
|
||||
+STAY @nextfx
|
||||
|
||||
jsr okvs_update ; save name of next transition in prefs store
|
||||
jsr okvs_update ; save name of next HGR transition in prefs store
|
||||
!word gGlobalPrefsStore
|
||||
!word kNextFX
|
||||
@nextfx !word $FDFD ; SMC
|
||||
|
||||
jsr SaveGlobalPreferences ; write prefs store to disk
|
||||
; jsr SaveGlobalPreferences ; write prefs store to disk
|
||||
|
||||
; load transition effect code at $6000
|
||||
+LOAD_FILE kFXDirectory, @fxkey
|
||||
@ -189,20 +193,34 @@ FXIndex !byte 0
|
||||
@fxkey !word $FDFD
|
||||
|
||||
LoadDHGRTransition
|
||||
jsr okvs_nth ; get filename of transition effect code
|
||||
jsr okvs_nth ; get filename of DHGR transition effect code
|
||||
!word gDFXStore
|
||||
@dfxindex
|
||||
gDFXIndex
|
||||
!byte 0
|
||||
+STAY @dfxkey
|
||||
|
||||
inc @dfxindex ; increment transition effect index for next time
|
||||
inc gDFXIndex ; increment transition effect index for next time
|
||||
jsr okvs_len
|
||||
!word gDFXStore
|
||||
cmp @dfxindex
|
||||
cmp gDFXIndex
|
||||
bne +
|
||||
lda #0
|
||||
sta @dfxindex
|
||||
sta gDFXIndex
|
||||
+
|
||||
lda gDFXIndex
|
||||
sta @nexti
|
||||
jsr okvs_nth ; get name of next DHGR transition
|
||||
!word gDFXStore
|
||||
@nexti !byte $FD ; SMC
|
||||
+STAY @nextdfx
|
||||
|
||||
jsr okvs_update ; save name of next DHGR transition in prefs store
|
||||
!word gGlobalPrefsStore
|
||||
!word kNextDFX
|
||||
@nextdfx !word $FDFD ; SMC
|
||||
|
||||
; jsr SaveGlobalPreferences ; write prefs store to disk
|
||||
|
||||
; load transition effect code at $6000
|
||||
+LOAD_FILE kFXDirectory, @dfxkey
|
||||
rts
|
||||
|
Loading…
x
Reference in New Issue
Block a user