mirror of
https://github.com/a2-4am/4cade.git
synced 2024-06-13 12:29:37 +00:00
merge prelaunch into indexed file
This commit is contained in:
parent
e34993178d
commit
69aa12d9d7
6
Makefile
6
Makefile
|
@ -41,7 +41,8 @@ dsk: asm
|
||||||
rm -f build/ATTRACTDIR.CONF && touch build/ATTRACTDIR.CONF >>build/log
|
rm -f build/ATTRACTDIR.CONF && touch build/ATTRACTDIR.CONF >>build/log
|
||||||
for f in res/ATTRACT/*; do bin/buildokvs.sh "$$f" "build/ATTRACT/$$(basename $$f)" && echo "$$(basename $$f)" >> build/ATTRACTDIR.CONF; done >>build/log
|
for f in res/ATTRACT/*; do bin/buildokvs.sh "$$f" "build/ATTRACT/$$(basename $$f)" && echo "$$(basename $$f)" >> build/ATTRACTDIR.CONF; done >>build/log
|
||||||
bin/buildfx.sh "build/ATTRACTDIR.CONF" "build/MINIATTRACT.IDX" "build/MINIATTRACT.ALL" "build/ATTRACT" >>build/log
|
bin/buildfx.sh "build/ATTRACTDIR.CONF" "build/MINIATTRACT.IDX" "build/MINIATTRACT.ALL" "build/ATTRACT" >>build/log
|
||||||
for f in res/TITLE res/COVER res/HELP res/GAMES.CONF build/PREFS.CONF res/CREDITS res/HELPTEXT build/ATTRACT.IDX build/FX.IDX build/FX.ALL build/DFX.IDX build/DFX.ALL build/GAMEHELP.IDX build/GAMEHELP.ALL build/SLIDESHOW.IDX build/SLIDESHOW.ALL build/MINIATTRACT.IDX build/MINIATTRACT.ALL res/DECRUNCH res/JOYSTICK res/Finder.Data res/Finder.Root; do $(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "$$f" >>build/log; done
|
bin/buildhelp.sh "res/GAMES.CONF" "build/PRELAUNCH.IDX" "build/PRELAUNCH.ALL" "build/PRELAUNCH" >>build/log
|
||||||
|
for f in res/TITLE res/COVER res/HELP res/GAMES.CONF build/PREFS.CONF res/CREDITS res/HELPTEXT build/ATTRACT.IDX build/FX.IDX build/FX.ALL build/DFX.IDX build/DFX.ALL build/GAMEHELP.IDX build/GAMEHELP.ALL build/SLIDESHOW.IDX build/SLIDESHOW.ALL build/MINIATTRACT.IDX build/MINIATTRACT.ALL build/PRELAUNCH.IDX build/PRELAUNCH.ALL res/DECRUNCH res/JOYSTICK res/Finder.Data res/Finder.Root; do $(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "$$f" >>build/log; done
|
||||||
bin/buildfileinfo.sh res/TITLE.HGR "06" "4000" >>build/log
|
bin/buildfileinfo.sh res/TITLE.HGR "06" "4000" >>build/log
|
||||||
bin/buildfileinfo.sh res/TITLE.DHGR "06" "4000" >>build/log
|
bin/buildfileinfo.sh res/TITLE.DHGR "06" "4000" >>build/log
|
||||||
bin/buildfileinfo.sh res/ACTION.HGR "06" "3FF8" >>build/log
|
bin/buildfileinfo.sh res/ACTION.HGR "06" "3FF8" >>build/log
|
||||||
|
@ -57,8 +58,6 @@ dsk: asm
|
||||||
rm -f build/X/**/.DS_Store build/X/**/PRODOS* build/X/**/LOADER.SYSTEM*
|
rm -f build/X/**/.DS_Store build/X/**/PRODOS* build/X/**/LOADER.SYSTEM*
|
||||||
$(CADIUS) CREATEFOLDER build/"$(DISK)" "/$(VOLUME)/X/" >>build/log
|
$(CADIUS) CREATEFOLDER build/"$(DISK)" "/$(VOLUME)/X/" >>build/log
|
||||||
for f in build/X/*; do $(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/X/$$(basename $$f)" "$$f"; done >>build/log
|
for f in build/X/*; do $(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/X/$$(basename $$f)" "$$f"; done >>build/log
|
||||||
bin/buildfileinfo.sh build/PRELAUNCH "06" "0106" >>build/log
|
|
||||||
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/PRELAUNCH" "build/PRELAUNCH" >>build/log
|
|
||||||
bin/changebootloader.sh build/"$(DISK)" build/proboothd
|
bin/changebootloader.sh build/"$(DISK)" build/proboothd
|
||||||
|
|
||||||
asm: asmlauncher asmfx asmprelaunch asmproboot
|
asm: asmlauncher asmfx asmprelaunch asmproboot
|
||||||
|
@ -73,7 +72,6 @@ asmfx: md
|
||||||
|
|
||||||
asmprelaunch: md
|
asmprelaunch: md
|
||||||
for f in src/prelaunch/*.a; do grep "^\!to" $${f} >/dev/null && $(ACME) $${f} >> build/log; done
|
for f in src/prelaunch/*.a; do grep "^\!to" $${f} >/dev/null && $(ACME) $${f} >> build/log; done
|
||||||
for f in res/TITLE.HGR/* res/TITLE.DHGR/*; do rsync --ignore-existing build/PRELAUNCH/STANDARD build/PRELAUNCH/$$(basename $$f); done
|
|
||||||
|
|
||||||
asmproboot: md
|
asmproboot: md
|
||||||
$(ACME) -r build/proboothd.lst src/proboothd/proboothd.a >> build/log
|
$(ACME) -r build/proboothd.lst src/proboothd/proboothd.a >> build/log
|
||||||
|
|
|
@ -25,19 +25,8 @@ source=$(mktemp)
|
||||||
echo "!byte ${#key}" # OKVS key length
|
echo "!byte ${#key}" # OKVS key length
|
||||||
echo "!text \"$key\"" # OKVS key (effect name)
|
echo "!text \"$key\"" # OKVS key (effect name)
|
||||||
if [ -f "$4/$key" ]; then
|
if [ -f "$4/$key" ]; then
|
||||||
offset=$(wc -c < "$3")
|
echo "!be24 $(wc -c < "$3")" # offset into merged-gamehelp file (3-byte big-endian)
|
||||||
echo "!be24 $offset" # offset into merged-gamehelp file (3-byte big-endian)
|
echo "!le16 $(wc -c < "$4/$key")" # size
|
||||||
# If offset+size does not cross a block boundary, use the size.
|
|
||||||
# Otherwise, round up size to the next block boundary.
|
|
||||||
# This padding does not get added to the file; it is just an
|
|
||||||
# optimization to avoid a partial copy on the last block read.
|
|
||||||
echo -n "!le16 "
|
|
||||||
size=$(wc -c < "$4/$key")
|
|
||||||
if [ $(($offset / 512)) -eq $((($offset + $size) / 512)) ]; then
|
|
||||||
echo "$size"
|
|
||||||
else
|
|
||||||
echo "$(((($offset + $size + 511) & -512) - $offset))"
|
|
||||||
fi
|
|
||||||
cat "$4/$key" >> "$3" # add this gamehelp to the merged-gamehelp file
|
cat "$4/$key" >> "$3" # add this gamehelp to the merged-gamehelp file
|
||||||
else
|
else
|
||||||
echo "!be24 0" # if game has no help, reuse placeholder at offset 0
|
echo "!be24 0" # if game has no help, reuse placeholder at offset 0
|
||||||
|
|
|
@ -14,6 +14,8 @@ GAMEHELP.IDX=Type(06),AuxType(6000),Access(C3)
|
||||||
GAMEHELP.ALL=Type(04),AuxType(6000),Access(C3)
|
GAMEHELP.ALL=Type(04),AuxType(6000),Access(C3)
|
||||||
SLIDESHOW.IDX=Type(06),AuxType(4000),Access(C3)
|
SLIDESHOW.IDX=Type(06),AuxType(4000),Access(C3)
|
||||||
SLIDESHOW.ALL=Type(06),AuxType(0800),Access(C3)
|
SLIDESHOW.ALL=Type(06),AuxType(0800),Access(C3)
|
||||||
|
PRELAUNCH.IDX=Type(06),AuxType(6000),Access(C3)
|
||||||
|
PRELAUNCH.ALL=Type(06),AuxType(0106),Access(C3)
|
||||||
COVER=Type(06),AuxType(2000),Access(C3)
|
COVER=Type(06),AuxType(2000),Access(C3)
|
||||||
TITLE=Type(06),AuxType(2000),Access(C3)
|
TITLE=Type(06),AuxType(2000),Access(C3)
|
||||||
HELP=Type(06),AuxType(2000),Access(C3)
|
HELP=Type(06),AuxType(2000),Access(C3)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
;
|
;
|
||||||
; LC RAM BANK 1
|
; LC RAM BANK 1
|
||||||
; D000..E789 - persistent data structures (gGlobalPrefsStore, gGamesListStore)
|
; D000..E789 - persistent data structures (gGlobalPrefsStore, gGamesListStore)
|
||||||
; E911..FFF1 - main program code
|
; E8E6..FFF1 - main program code
|
||||||
; FFF2..FFF9 - API functions and global constants available for main program
|
; FFF2..FFF9 - API functions and global constants available for main program
|
||||||
; code, prelaunchers, transition effects, &c.
|
; code, prelaunchers, transition effects, &c.
|
||||||
; (Wait/UnwaitForVBL, MockingboardStuff, MachineStatus)
|
; (Wait/UnwaitForVBL, MockingboardStuff, MachineStatus)
|
||||||
|
@ -151,7 +151,7 @@ iProDOS_enter = $D670
|
||||||
LoadFileDirect = $DAF9
|
LoadFileDirect = $DAF9
|
||||||
iAuxReq = $DB1F
|
iAuxReq = $DB1F
|
||||||
launchpatch = $D60E
|
launchpatch = $D60E
|
||||||
iAddToPath = $FE78
|
iAddToPath = $FE67
|
||||||
itraverse = $D8D8
|
itraverse = $D8D8
|
||||||
ldrhi = $56
|
ldrhi = $56
|
||||||
namlo = $57
|
namlo = $57
|
||||||
|
|
|
@ -200,10 +200,21 @@ PlayGame
|
||||||
jsr ClearScreens ; avoid seeing code load into the HGR page
|
jsr ClearScreens ; avoid seeing code load into the HGR page
|
||||||
; (clobbers $106, must do now before loading prelaunch code)
|
; (clobbers $106, must do now before loading prelaunch code)
|
||||||
|
|
||||||
jsr LoadFile ; load this game's prelaunch file at $106
|
jsr LoadFile ; load prelaunch index file into $6000
|
||||||
!word kPrelaunchDirectory
|
!word kRootDirectory
|
||||||
@pfile !word $FDFD
|
!word kPrelaunchIndexFile
|
||||||
|
- !word $6000
|
||||||
|
|
||||||
|
jsr okvs_find
|
||||||
|
!word -
|
||||||
|
@pfile !word $FDFD ; SMC
|
||||||
|
+ST16 @indexRecordPtr
|
||||||
|
|
||||||
|
jsr LoadIndexedFile
|
||||||
|
!word kPrelaunchFulFile
|
||||||
!word $0106
|
!word $0106
|
||||||
|
@indexRecordPtr
|
||||||
|
!word $FDFD ; SMC
|
||||||
|
|
||||||
; we start by placing the subdirectory name at gPathname+kGameDirectoryLen
|
; we start by placing the subdirectory name at gPathname+kGameDirectoryLen
|
||||||
; to leave room for the GameDirectory name as the parent
|
; to leave room for the GameDirectory name as the parent
|
||||||
|
@ -264,10 +275,7 @@ Launch
|
||||||
jmp LaunchInternal
|
jmp LaunchInternal
|
||||||
|
|
||||||
Joystick
|
Joystick
|
||||||
jsr LoadFile
|
jsr LoadStandardPrelaunch
|
||||||
!word kPrelaunchDirectory
|
|
||||||
!word kStandardPrelaunch
|
|
||||||
!word $0106
|
|
||||||
|
|
||||||
jsr LoadFile
|
jsr LoadFile
|
||||||
!word kRootDirectory
|
!word kRootDirectory
|
||||||
|
@ -275,3 +283,13 @@ Joystick
|
||||||
!word 0
|
!word 0
|
||||||
|
|
||||||
jmp Launch
|
jmp Launch
|
||||||
|
|
||||||
|
LoadStandardPrelaunch
|
||||||
|
jsr LoadIndexedFile ; load standard prelaunch code at $0106
|
||||||
|
!word kPrelaunchFulFile
|
||||||
|
!word $0106
|
||||||
|
!word +
|
||||||
|
rts
|
||||||
|
+ !byte 0
|
||||||
|
!be24 0
|
||||||
|
!le16 71
|
||||||
|
|
|
@ -94,9 +94,13 @@ kFXDirectory
|
||||||
!byte 3
|
!byte 3
|
||||||
!raw "FX/"
|
!raw "FX/"
|
||||||
|
|
||||||
kPrelaunchDirectory
|
kPrelaunchIndexFile
|
||||||
!byte 10
|
!byte 13
|
||||||
!raw "PRELAUNCH/"
|
!raw "PRELAUNCH.IDX"
|
||||||
|
|
||||||
|
kPrelaunchFulFile
|
||||||
|
!byte 13
|
||||||
|
!raw "PRELAUNCH.ALL"
|
||||||
|
|
||||||
kStandardPrelaunch
|
kStandardPrelaunch
|
||||||
!byte 8
|
!byte 8
|
||||||
|
|
|
@ -158,10 +158,7 @@ RunAttractModule
|
||||||
jsr ClearScreens ; avoid seeing code load into the HGR page
|
jsr ClearScreens ; avoid seeing code load into the HGR page
|
||||||
; (clobbers $106, must do now before loading prelaunch code)
|
; (clobbers $106, must do now before loading prelaunch code)
|
||||||
|
|
||||||
jsr LoadFile ; load standard prelaunch code (|Launch| will call it)
|
jsr LoadStandardPrelaunch ; load standard prelaunch code (|Launch| will call it)
|
||||||
!word kPrelaunchDirectory
|
|
||||||
!word kStandardPrelaunch
|
|
||||||
!word $0106
|
|
||||||
|
|
||||||
jsr LoadFile ; load self-running demo into its default address (varies)
|
jsr LoadFile ; load self-running demo into its default address (varies)
|
||||||
!word kDemoDirectory
|
!word kDemoDirectory
|
||||||
|
|
Loading…
Reference in New Issue
Block a user