more prefs work

This commit is contained in:
4am 2018-11-17 09:02:43 -05:00
parent f8ab1fd606
commit 8f183e6f6a
5 changed files with 25 additions and 23 deletions

View File

@ -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
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/PREFS.CONF" >>build/log
cp res/prefs-sample.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
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/FX.CONF" >>build/log

View File

@ -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 # # 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 master prefs file. # # Format: # key=value # # |key| must be unique within this file # value must be one of value must be one of value must be one of # 1 for HGR slideshow (key is a file containing a list of HGR graphics) value must be one of # 2 for DHGR slideshow (key is a file containing a list of DHGR graphics) value must be one of # 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]

View File

@ -32,8 +32,6 @@
gRootDirectory
!word $FDFD
gPrefix
!word $FDFD
;------------------------------------------------------------------------------
; LoadFile
@ -55,10 +53,7 @@ LoadFile
+PARAMS_ON_STACK 2
+LDPARAM 1
+STAY namlo ; set filename
+STAY gPrefix ; remember path
jsr traverse ; go to subdirectory, set up filename for read
lda #cmdread ; read (instead of write)
sta reqcmd
lda #0 ; 0 = read into main memory
@ -86,9 +81,7 @@ LoadDHRFile
+PARAMS_ON_STACK 2
+LDPARAM 1
+STAY namlo ; set filename
jsr traverse ; go to subdirectory, set up filename for read
lda #$00 ; read first $2000 bytes
sta sizelo
lda #$20
@ -123,17 +116,11 @@ SaveSmallFile
+PARAMS_ON_STACK 4
+LDPARAM 1
+STAY namlo ; set filename for ProRWTS2
+STAY gPrefix ; remember path
+LDPARAM 3
+STAY ldrlo ; set data buffer address for ProRWTS2
jsr traverse ; go to subdirectory, set up filename for read
lda #cmdwrite ; write (instead of read)
sta reqcmd
lda #0 ; 0 = data buffer is in main memory (instead of auxmem)
sta auxreq
jmp hddopendir ; exit via ProRWTS2
;------------------------------------------------------------------------------

View File

@ -17,8 +17,7 @@
; - kNextDFX
;
kGlobalPrefsBuffer
!word $0800
kGlobalPrefsBuffer = $0800
kGlobalPrefsFilename
!byte 10
@ -46,7 +45,8 @@ kNextDFX
; $00/$01/$FE/$FF clobbered
;------------------------------------------------------------------------------
SaveGlobalPreferences
+LDADDR kGlobalPrefsBuffer
lda #$00
ldy #$08
+STAY $FE
+LDADDR @kFluff1

View File

@ -89,7 +89,7 @@ AttractMode
beq @HGRSlideshow
@DHGRSlideshow
bit MachineStatus
bit MachineStatus ; only run DHGR slideshow if we have 128K
bvc @exit
jsr LoadDHGRTransition ; load transition effect code at $6000
jsr BlankDHGR ; switch to DHGR mode with initial blank screen
@ -158,17 +158,31 @@ WaitOnScreenshot
LoadTransition
jsr okvs_nth ; get filename of transition effect code
!word gFXStore
@fxindex !byte 0
FXIndex !byte 0
+STAY @fxkey
inc @fxindex ; increment transition effect index for next time
inc FXIndex ; increment transition effect index
jsr okvs_len
!word gFXStore
cmp @fxindex
cmp FXIndex
bne +
lda #0
sta @fxindex
sta FXIndex
+
lda FXIndex
sta @nexti
jsr okvs_nth ; get name of next transition
!word gFXStore
@nexti !byte $FD ; SMC
+STAY @nextfx
jsr okvs_update ; save name of next transition in prefs store
!word gGlobalPrefsStore
!word kNextFX
@nextfx !word $FDFD ; SMC
jsr SaveGlobalPreferences ; write prefs store to disk
; load transition effect code at $6000
+LOAD_FILE kFXDirectory, @fxkey
rts