mirror of
https://github.com/a2-4am/4cade.git
synced 2025-04-07 16:39:56 +00:00
reload ATTRACT.CONF and reparse into gAttractModeStore, which is now at 0x6000 and is overwritten after loading the current attract mode module from disk and saving the name of the next attract mode module
This commit is contained in:
parent
7bf2959dd7
commit
0036d0cf5d
@ -1,8 +1,8 @@
|
||||
PRODOS=Type(FF),AuxType(0000),Access(C3)
|
||||
LAUNCHER.SYSTEM=Type(FF),AuxType(2000),Access(C3)
|
||||
PREFS.CONF=Type(04),AuxType(4000),Access(C3)
|
||||
GAMES.CONF=Type(04),AuxType(4000),Access(C3)
|
||||
ATTRACT.CONF=Type(04),AuxType(4000),Access(C3)
|
||||
FX.CONF=Type(04),AuxType(4000),Access(C3)
|
||||
DFX.CONF=Type(04),AuxType(4000),Access(C3)
|
||||
PREFS.CONF=Type(04),AuxType(8000),Access(C3)
|
||||
GAMES.CONF=Type(04),AuxType(8000),Access(C3)
|
||||
ATTRACT.CONF=Type(04),AuxType(8000),Access(C3)
|
||||
FX.CONF=Type(04),AuxType(8000),Access(C3)
|
||||
DFX.CONF=Type(04),AuxType(8000),Access(C3)
|
||||
COVER=Type(06),AuxType(2000),Access(C3)
|
||||
|
@ -60,67 +60,21 @@ OneTimeSetup
|
||||
ldy hddopendir+3
|
||||
+STAY gRootDirectory
|
||||
|
||||
jsr LoadFile ; load preferences file
|
||||
jsr LoadFile ; load preferences file into $8000
|
||||
!word kGlobalPrefsFilename
|
||||
|
||||
jsr ParseKeyValueList ; parse contents into global prefs store
|
||||
jsr ParseKeyValueList ; parse contents into global prefs store into LC RAM bank
|
||||
!word gGlobalPrefsStore
|
||||
!word ldrlo2 ; (ldrlo2) points to last load address
|
||||
!byte 16
|
||||
+LDAY SRC
|
||||
+STAY gGamesListStore ; save pointer to free space for next store
|
||||
|
||||
jsr LoadFile ; load games list
|
||||
jsr LoadFile ; load games list into $8000
|
||||
!word kGameListConfFile
|
||||
jsr ParseGamesList ; parse games list
|
||||
jsr ParseGamesList ; parse games list into LC RAM bank
|
||||
!word gGamesListStore
|
||||
!word ldrlo2 ; (ldrlo2) points to last load address
|
||||
+LDAY SRC
|
||||
+STAY gAttractModeStore ; save pointer to free space for next store
|
||||
|
||||
jsr LoadFile ; load attract-mode configuration
|
||||
!word kAttractModeConfFile
|
||||
jsr ParseKeyValueList ; parse attract-mode configuration
|
||||
!word gAttractModeStore
|
||||
!word ldrlo2 ; (ldrlo2) points to last load address
|
||||
!byte 0
|
||||
|
||||
jsr okvs_get ; get next attract-mode module from prefs
|
||||
!word gGlobalPrefsStore
|
||||
!word kNextAttract
|
||||
bcs @noattract
|
||||
+STAY @attract
|
||||
jsr okvs_get
|
||||
!word gAttractModeStore
|
||||
@attract !word $FDFD ; SMC
|
||||
bcc +
|
||||
@noattract
|
||||
ldx #0
|
||||
+ stx gAttractIndex
|
||||
|
||||
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
|
||||
@ -128,8 +82,3 @@ kGameListConfFile
|
||||
@kGameListConfFile_b
|
||||
!text "GAMES.CONF"
|
||||
@kGameListConfFile_e
|
||||
kAttractModeConfFile
|
||||
!byte @kAttractModeConfFile_e-@kAttractModeConfFile_b
|
||||
@kAttractModeConfFile_b
|
||||
!text "ATTRACT.CONF"
|
||||
@kAttractModeConfFile_e
|
||||
|
@ -14,7 +14,7 @@
|
||||
;
|
||||
|
||||
gAttractModeStore
|
||||
!word $FDFD
|
||||
!word $6000
|
||||
gFXStore
|
||||
!word $6000
|
||||
gDFXStore
|
||||
|
@ -12,6 +12,26 @@
|
||||
; - gDFXIndex ; [byte] numeric index of DHGR transition effect
|
||||
|
||||
AttractMode
|
||||
jsr LoadFile ; load attract-mode configuration into $8000
|
||||
!word kAttractModeConfFile
|
||||
jsr ParseKeyValueList ; parse attract-mode configuration into $6000
|
||||
!word gAttractModeStore
|
||||
!word ldrlo2 ; (ldrlo2) points to last load address
|
||||
!byte 0
|
||||
|
||||
jsr okvs_get ; get next attract-mode module from prefs
|
||||
!word gGlobalPrefsStore
|
||||
!word kNextAttract
|
||||
bcs @noattract
|
||||
+STAY @attract
|
||||
jsr okvs_get
|
||||
!word gAttractModeStore
|
||||
@attract !word $FDFD ; SMC
|
||||
bcc +
|
||||
@noattract
|
||||
ldx #0
|
||||
+ stx gAttractIndex
|
||||
|
||||
jsr okvs_nth ; get filename of next attract-mode module
|
||||
!word gAttractModeStore
|
||||
gAttractIndex
|
||||
@ -125,6 +145,11 @@ gAttractIndex
|
||||
!word gSlideshowStore
|
||||
!word HGRLoad ; address of callback (called on each file)
|
||||
@exit rts
|
||||
kAttractModeConfFile
|
||||
!byte @kAttractModeConfFile_e-@kAttractModeConfFile_b
|
||||
@kAttractModeConfFile_b
|
||||
!text "ATTRACT.CONF"
|
||||
@kAttractModeConfFile_e
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; internal functions
|
||||
@ -177,13 +202,25 @@ WaitOnScreenshot
|
||||
+ rts
|
||||
|
||||
LoadTransition
|
||||
jsr LoadFile ; load HGR transition effects list
|
||||
jsr LoadFile ; load HGR transition effects list into $8000
|
||||
!word kFXConfFile
|
||||
jsr ParseKeyValueList ; parse HGR transition effects list
|
||||
jsr ParseKeyValueList ; parse HGR transition effects list into $6000
|
||||
!word gFXStore
|
||||
!word ldrlo2 ; (ldrlo2) points to last load address
|
||||
!byte 0
|
||||
|
||||
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_nth ; get filename of transition effect code
|
||||
!word gFXStore
|
||||
gFXIndex
|
||||
@ -223,13 +260,25 @@ kFXConfFile
|
||||
@kFXConfFile_e
|
||||
|
||||
LoadDHGRTransition
|
||||
jsr LoadFile ; load DHGR transition effects list
|
||||
jsr LoadFile ; load DHGR transition effects list into $8000
|
||||
!word kDFXConfFile
|
||||
jsr ParseKeyValueList ; parse DHGR transition effects list
|
||||
jsr ParseKeyValueList ; parse DHGR transition effects list into $6000
|
||||
!word gDFXStore
|
||||
!word ldrlo2 ; (ldrlo2) points to last load address
|
||||
!byte 0
|
||||
|
||||
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
|
||||
|
||||
jsr okvs_nth ; get filename of DHGR transition effect code
|
||||
!word gDFXStore
|
||||
gDFXIndex
|
||||
|
Loading…
x
Reference in New Issue
Block a user