mirror of
https://github.com/a2-4am/4cade.git
synced 2024-11-27 08:50:01 +00:00
.
This commit is contained in:
parent
3e22ec307d
commit
e2fff8a4ee
@ -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
#
DHGR.CONF=2
FAVORITES.CONF=1
#SHORT.CONF=1
#SNEAKERS=3
EFG.CONF=1
#WAVY.NAVY=3
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
#
# 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
SPARE.CHANGE=3
DHGR.CONF=2
FAVORITES.CONF=1
#SNEAKERS=3
EFG.CONF=1
#WAVY.NAVY=3
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]
|
BIN
res/demo/PITFALL.II
Executable file
BIN
res/demo/PITFALL.II
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE
Executable file
BIN
res/demo/SPARE.CHANGE
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.A
Executable file
BIN
res/demo/SPARE.CHANGE.A
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.B
Executable file
BIN
res/demo/SPARE.CHANGE.B
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.C
Executable file
BIN
res/demo/SPARE.CHANGE.C
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.D
Executable file
BIN
res/demo/SPARE.CHANGE.D
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.E
Executable file
BIN
res/demo/SPARE.CHANGE.E
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.F
Executable file
BIN
res/demo/SPARE.CHANGE.F
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.G
Executable file
BIN
res/demo/SPARE.CHANGE.G
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.H
Executable file
BIN
res/demo/SPARE.CHANGE.H
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.I
Executable file
BIN
res/demo/SPARE.CHANGE.I
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.J
Executable file
BIN
res/demo/SPARE.CHANGE.J
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.K
Executable file
BIN
res/demo/SPARE.CHANGE.K
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.L
Executable file
BIN
res/demo/SPARE.CHANGE.L
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.M
Executable file
BIN
res/demo/SPARE.CHANGE.M
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.N
Executable file
BIN
res/demo/SPARE.CHANGE.N
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.O
Executable file
BIN
res/demo/SPARE.CHANGE.O
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.P
Executable file
BIN
res/demo/SPARE.CHANGE.P
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.Q
Executable file
BIN
res/demo/SPARE.CHANGE.Q
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.R
Executable file
BIN
res/demo/SPARE.CHANGE.R
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.S
Executable file
BIN
res/demo/SPARE.CHANGE.S
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.T
Executable file
BIN
res/demo/SPARE.CHANGE.T
Executable file
Binary file not shown.
BIN
res/demo/SPARE.CHANGE.Z
Executable file
BIN
res/demo/SPARE.CHANGE.Z
Executable file
Binary file not shown.
BIN
res/demo/SPY.HUNTER
Executable file
BIN
res/demo/SPY.HUNTER
Executable file
Binary file not shown.
@ -5,3 +5,27 @@ WAVY.NAVY.1=Type(06),AuxType(0000),Access(C3)
|
||||
LODE.RUNNER=Type(06),AuxType(1F00),Access(C3)
|
||||
LODE.RUNNER.1=Type(06),AuxType(0000),Access(C3)
|
||||
LODE.RUNNER.M=Type(06),AuxType(0000),Access(C3)
|
||||
PITFALL.II=Type(06),AuxType(08E5),Access(C3)
|
||||
SPY.HUNTER=Type(06),AuxType(0B87),Access(C3)
|
||||
SPARE.CHANGE=Type(06),AuxType(2700),Access(C3)
|
||||
SPARE.CHANGE.A=Type(06),AuxType(8E00),Access(C3)
|
||||
SPARE.CHANGE.B=Type(06),AuxType(8E00),Access(C3)
|
||||
SPARE.CHANGE.C=Type(06),AuxType(8E00),Access(C3)
|
||||
SPARE.CHANGE.D=Type(06),AuxType(8E00),Access(C3)
|
||||
SPARE.CHANGE.E=Type(06),AuxType(8E00),Access(C3)
|
||||
SPARE.CHANGE.F=Type(06),AuxType(8E00),Access(C3)
|
||||
SPARE.CHANGE.G=Type(06),AuxType(9600),Access(C3)
|
||||
SPARE.CHANGE.H=Type(06),AuxType(9600),Access(C3)
|
||||
SPARE.CHANGE.I=Type(06),AuxType(9600),Access(C3)
|
||||
SPARE.CHANGE.J=Type(06),AuxType(9600),Access(C3)
|
||||
SPARE.CHANGE.K=Type(06),AuxType(9600),Access(C3)
|
||||
SPARE.CHANGE.L=Type(06),AuxType(9600),Access(C3)
|
||||
SPARE.CHANGE.M=Type(06),AuxType(9600),Access(C3)
|
||||
SPARE.CHANGE.N=Type(06),AuxType(9600),Access(C3)
|
||||
SPARE.CHANGE.O=Type(06),AuxType(9600),Access(C3)
|
||||
SPARE.CHANGE.P=Type(06),AuxType(9600),Access(C3)
|
||||
SPARE.CHANGE.Q=Type(06),AuxType(9600),Access(C3)
|
||||
SPARE.CHANGE.R=Type(06),AuxType(9600),Access(C3)
|
||||
SPARE.CHANGE.S=Type(06),AuxType(9600),Access(C3)
|
||||
SPARE.CHANGE.T=Type(06),AuxType(9600),Access(C3)
|
||||
SPARE.CHANGE.Z=Type(06),AuxType(B400),Access(C3)
|
||||
|
15
src/4cade.a
15
src/4cade.a
@ -4,11 +4,12 @@
|
||||
|
||||
!source "src/constants.a"
|
||||
!source "src/macros.a"
|
||||
|
||||
; first-run initialization, relocates code to language card and continues from Main
|
||||
!source "src/4cade.init.a"
|
||||
|
||||
FirstMover
|
||||
!pseudopc $D000 {
|
||||
!zone
|
||||
Reenter ; self-running demos should call this to exit back to 4cade
|
||||
+READ_RAM1_WRITE_RAM1
|
||||
Main
|
||||
@ -19,18 +20,6 @@ Main
|
||||
jsr AttractMode
|
||||
jmp -
|
||||
|
||||
Reboot
|
||||
ldx #(@end-@start-1)
|
||||
- lda @start,x
|
||||
sta $300,x
|
||||
dex
|
||||
bpl -
|
||||
jmp $300
|
||||
@start
|
||||
+READ_ROM_NO_WRITE
|
||||
jmp $FAA6
|
||||
@end
|
||||
|
||||
; these routines will only be called after relocating to language card
|
||||
!source "src/ui.attract.mode.a"
|
||||
!source "src/prodos.path.a"
|
||||
|
@ -1,4 +1,4 @@
|
||||
sta $C00E
|
||||
sta $C00E ; 40-column
|
||||
sta $C00C
|
||||
sta $C004
|
||||
sta $C002
|
||||
@ -42,8 +42,8 @@
|
||||
|
||||
; ProRWTS2 has its own function to relocate itself
|
||||
!source "src/prorwts2.a"
|
||||
; these routines will only be called once, from main memory, before relocating to language card
|
||||
ProRWTSBuffer
|
||||
; these routines will only be called once, from main memory, before relocating to language card
|
||||
!source "src/hw.memcheck.a"
|
||||
!source "src/hw.joystick.a"
|
||||
!source "src/hw.normfast.a"
|
||||
|
169
src/parse.prefs.a
Normal file
169
src/parse.prefs.a
Normal file
@ -0,0 +1,169 @@
|
||||
;license:MIT
|
||||
;(c) 2018 by 4am
|
||||
;
|
||||
; Parser for global preferences file
|
||||
;
|
||||
; Public functions
|
||||
; - SaveGlobalPreferences
|
||||
;
|
||||
; Public variables
|
||||
; - gGlobalPrefsStore word address of prefs okvs
|
||||
;
|
||||
; Public constants (all length-prefixed strings)
|
||||
; - kGlobalPrefsFilename
|
||||
; - kLastPlayed
|
||||
; - kNextAttract
|
||||
; - kNextFX
|
||||
; - kNextDFX
|
||||
;
|
||||
|
||||
gGlobalPrefsStore
|
||||
!word 0
|
||||
|
||||
kGlobalPrefsFilename
|
||||
!byte 10
|
||||
!raw "PREFS.CONF"
|
||||
|
||||
kLastPlayed
|
||||
!byte 10
|
||||
!raw "LASTPLAYED"
|
||||
kNextAttract
|
||||
!byte 11
|
||||
!raw "NEXTATTRACT"
|
||||
kNextFX
|
||||
!byte 6
|
||||
!raw "NEXTFX"
|
||||
kNextDFX
|
||||
!byte 7
|
||||
!raw "NEXTDFX"
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; SaveGlobalPreferences
|
||||
; save global options and state to file
|
||||
;
|
||||
; in: none
|
||||
; out: all registers and flags clobbered
|
||||
;------------------------------------------------------------------------------
|
||||
SaveGlobalPreferences
|
||||
+LDADDR kGlobalPrefsBuffer
|
||||
+STAY $FE
|
||||
|
||||
+LDADDR @kFluff1
|
||||
jsr @addString
|
||||
|
||||
jsr @addBooleanFromStore
|
||||
!word kForce40
|
||||
|
||||
jsr @addBooleanFromStore
|
||||
!word kForceUpper
|
||||
|
||||
jsr @addBooleanFromStore
|
||||
!word kScriptToFile
|
||||
|
||||
jsr @addBooleanFromStore
|
||||
!word kAutoScript
|
||||
|
||||
+LDADDR @kFluff2
|
||||
jsr @addString
|
||||
|
||||
jsr @addStringFromStore
|
||||
!word kLastPlayed
|
||||
|
||||
+LDADDR @kFluff3
|
||||
jsr @addString
|
||||
|
||||
jsr okvs_iter
|
||||
!word gGamesListStore
|
||||
!word @addGameToPrefs
|
||||
|
||||
+LDADDR @kEOF
|
||||
jsr @addString
|
||||
|
||||
lda $FE
|
||||
sta @filelen
|
||||
lda $FF
|
||||
sec
|
||||
sbc #>kGlobalPrefsBuffer
|
||||
sta @filelen+1
|
||||
|
||||
jsr SaveFile
|
||||
!word kGlobalPrefsFilename
|
||||
!byte 4 ; filetype=TXT
|
||||
!word 0 ; auxtype=0000
|
||||
!word kGlobalPrefsBuffer
|
||||
@filelen !word $FDFD ; SMC
|
||||
!word kProDOSFileBuffer
|
||||
|
||||
stz gGlobalPrefsDirty
|
||||
@exit rts
|
||||
|
||||
@addGameToPrefs
|
||||
+STAY +
|
||||
jsr @addStringFromStore
|
||||
+ !word $FDFD ; SMC
|
||||
rts
|
||||
|
||||
@addBooleanFromStore
|
||||
lda #$24 ; BIT opcode
|
||||
+HIDE_NEXT_2_BYTES
|
||||
@addStringFromStore
|
||||
lda #$80 ; BRA opcode
|
||||
sta @skipOverBooleanLogic
|
||||
+PARAMS_ON_STACK 2
|
||||
+LDPARAM 1
|
||||
+STAY @key
|
||||
jsr @addString
|
||||
+LDADDR @kEquals
|
||||
jsr @addString
|
||||
jsr okvs_get
|
||||
!word gGlobalPrefsStore
|
||||
@key !word $FDFD ; SMC
|
||||
@skipOverBooleanLogic
|
||||
bra + ; SMC (opcode may become BIT)
|
||||
+STAY PTR
|
||||
ldy #1
|
||||
lda (PTR),y
|
||||
ora #$30
|
||||
sta (PTR),y
|
||||
+LDAY PTR
|
||||
+ jsr @addString
|
||||
+LDADDR @kLF
|
||||
jmp @addString
|
||||
|
||||
@addString
|
||||
+STAY $00
|
||||
lda ($00)
|
||||
inc
|
||||
sta @len
|
||||
ldy #1
|
||||
- lda ($00),y
|
||||
sta ($FE)
|
||||
+ iny
|
||||
inc $FE
|
||||
bne +
|
||||
inc $FF
|
||||
@len=*+1
|
||||
+ cpy #$FD ; SMC
|
||||
bne -
|
||||
rts
|
||||
|
||||
@kEquals !byte 1
|
||||
!raw "="
|
||||
@kLF !byte 1
|
||||
!byte $0D
|
||||
@kFluff1 !byte @kFluff1_e-@kFluff1_b
|
||||
@kFluff1_b
|
||||
!raw "# 4cade preferences file",$0D
|
||||
!raw "# Do not edit by hand.",$0D
|
||||
!raw "# Or do. I'm a comment, not a cop.",$0D,$0D
|
||||
!raw "# value=game directory listed in GAMES.CONF, or empty",$0D
|
||||
@kFluff1_e
|
||||
@kFluff2 !byte 24
|
||||
!byte $0D
|
||||
!raw "# value=game directory",$0D
|
||||
@kFluff3 !byte 58
|
||||
!byte $0D
|
||||
!raw "# key=game directory, value=filename of selected version",$0D
|
||||
@kEOF !byte 7
|
||||
!byte $0D
|
||||
!raw "[eof]",$0D
|
@ -71,7 +71,6 @@ AttractMode
|
||||
bpl -
|
||||
jmp $106 ; jump to pre-launch code
|
||||
|
||||
!pseudopc $100 {
|
||||
@prelaunch ; this runs from main memory
|
||||
lda $C088 ; entry point used by some self-running demos
|
||||
jmp Reenter
|
||||
@ -89,7 +88,6 @@ AttractMode
|
||||
txs
|
||||
jmp (ldrlo2) ; jump to game
|
||||
@end_prelaunch
|
||||
}
|
||||
|
||||
@Slideshow ; HGR or DHGR slideshow
|
||||
pha ; save module type (1=HGR, 2=DHGR)
|
||||
|
Loading…
Reference in New Issue
Block a user