Add titles to TOTAL.DATA

This commit is contained in:
4am 2021-11-15 13:24:53 -05:00
parent 5cda88b60b
commit 3e75f6bbe2
40 changed files with 292 additions and 697 deletions

View File

@ -36,8 +36,6 @@ dsk: index asmproboot asmlauncher
# #
# create _FileInformation.txt files for subdirectories # create _FileInformation.txt files for subdirectories
# #
bin/buildfileinfo.sh res/TITLE.HGR "06" "4000"
bin/buildfileinfo.sh res/TITLE.DHGR "06" "4000"
bin/buildfileinfo.sh res/ICONS "CA" "0000" bin/buildfileinfo.sh res/ICONS "CA" "0000"
bin/buildfileinfo.sh build/FX "06" "6000" bin/buildfileinfo.sh build/FX "06" "6000"
bin/buildfileinfo.sh build/PRELAUNCH "06" "0106" bin/buildfileinfo.sh build/PRELAUNCH "06" "0106"
@ -60,8 +58,6 @@ dsk: index asmproboot asmlauncher
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "$$f" >>build/log; \ $(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "$$f" >>build/log; \
done done
for f in \ for f in \
res/TITLE.HGR \
res/TITLE.DHGR \
res/DEMO \ res/DEMO \
res/TITLE.ANIMATED \ res/TITLE.ANIMATED \
res/ICONS \ res/ICONS \
@ -84,88 +80,98 @@ dsk: index asmproboot asmlauncher
bin/changebootloader.sh build/"$(DISK)" build/proboothd bin/changebootloader.sh build/"$(DISK)" build/proboothd
index: md asmfx asmprelaunch compress index: md asmfx asmprelaunch compress
# note: even though individual lines check individual files, you really want
# to re-run this with a clean build/ directory if anything changes, because
# everything is interconnected within TOTAL.DATA
# #
# precompute binary data structure for mega-attract mode configuration file # precompute binary data structure for mega-attract mode configuration file
# #
[ -f build/ATTRACT.IDX ] || (bin/buildokvs.sh < res/ATTRACT.CONF > build/ATTRACT.IDX) [ -f build/index ] || (bin/buildokvs.sh < res/ATTRACT.CONF > build/ATTRACT.IDX)
# #
# precompute binary data structure and substitute special characters # precompute binary data structure and substitute special characters
# in game help and other all-text pages # in game help and other all-text pages
# #
[ -f build/HELPTEXT ] || (bin/converthelp.sh res/HELPTEXT build/HELPTEXT) [ -f build/index ] || (bin/converthelp.sh res/HELPTEXT build/HELPTEXT)
[ -f build/CREDITS ] || (bin/converthelp.sh res/CREDITS build/CREDITS) [ -f build/index ] || (bin/converthelp.sh res/CREDITS build/CREDITS)
for f in res/GAMEHELP/*; do \ [ -f build/index ] || (for f in res/GAMEHELP/*; do \
[ -f build/GAMEHELP/"$$(basename $$f)" ] || (bin/converthelp.sh "$$f" build/GAMEHELP/"$$(basename $$f)"); \ bin/converthelp.sh "$$f" build/GAMEHELP/"$$(basename $$f)"; \
done done)
# #
# create search indexes for each variation of (game-requires-joystick) X (game-requires-128K) # create a version of GAMES.CONF without comments or blank lines
# in the form of OKVS data structures, plus game counts in the form of source files
# #
[ -f build/GAMES.CONF ] || (awk '!/^$$|^#/' < res/GAMES.CONF > build/GAMES.CONF) [ -f build/index ] || (awk '!/^$$|^#/' < res/GAMES.CONF > build/GAMES.CONF)
[ -f build/SEARCH00.IDX ] || (grep "^00" < build/GAMES.CONF | bin/buildsearch.sh src/index/count00.a > build/SEARCH00.IDX)
[ -f build/SEARCH01.IDX ] || (grep "^0" < build/GAMES.CONF | bin/buildsearch.sh src/index/count01.a > build/SEARCH01.IDX)
[ -f build/SEARCH10.IDX ] || (grep "^.0" < build/GAMES.CONF | bin/buildsearch.sh src/index/count10.a > build/SEARCH10.IDX)
[ -f build/SEARCH11.IDX ] || (bin/buildsearch.sh src/index/count11.a < build/GAMES.CONF > build/SEARCH11.IDX)
# #
# create a sorted list of game filenames, without metadata or display names # create a list of all game filenames, without metadata or display names, sorted by game filename
# #
[ -f build/GAMES.SORTED ] || (awk -F, '/,/ { print $$2 }' < build/GAMES.CONF | awk -F= '{ print $$1 }' | sort > build/GAMES.SORTED) [ -f build/index ] || (awk -F, '/,/ { print $$2 }' < build/GAMES.CONF | awk -F= '{ print $$1 }' | sort > build/GAMES.SORTED)
# #
# precompute indexed files for prelaunch # precompute indexed files for prelaunch
# note: prelaunch must be first in TOTAL.DATA due to a hack in LoadStandardPrelaunch # note: prelaunch must be first in TOTAL.DATA due to a hack in LoadStandardPrelaunch
# note 2: these can not be padded because they are loaded at $0106 and padding would clobber the stack # note 2: these can not be padded because they are loaded at $0106 and padding would clobber the stack
# #
[ -f build/PRELAUNCH.IDX ] || (bin/buildindexedfile.sh build/TOTAL.DATA build/PRELAUNCH.INDEXED < build/GAMES.SORTED > build/PRELAUNCH.IDX) [ -f build/index ] || (bin/buildindexedfile.sh build/TOTAL.DATA build/PRELAUNCH.INDEXED < build/GAMES.SORTED > build/PRELAUNCH.IDX)
#
# precompute indexed files for HGR & DHGR titles
# note: these are not padded because they are all an exact block-multiple anyway
#
[ -f build/index ] || bin/padto.sh build/TOTAL.DATA
[ -f build/index ] || ((for f in res/TITLE.HGR/*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/TITLE.HGR build/HGR.TITLES.LOG > build/TITLE.IDX)
[ -f build/index ] || ((for f in res/TITLE.DHGR/*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/TITLE.DHGR build/DHGR.TITLES.LOG > build/DTITLE.IDX)
# #
# precompute indexed files for game help # precompute indexed files for game help
# note: these can be padded because they're loaded into $800 at a time when $800..$1FFF is clobber-able
# #
[ -f build/GAMEHELP.IDX ] || (bin/buildindexedfile.sh -p -a build/TOTAL.DATA build/GAMEHELP < build/GAMES.SORTED > build/GAMEHELP.IDX) [ -f build/index ] || (bin/buildindexedfile.sh -p -a build/TOTAL.DATA build/GAMEHELP < build/GAMES.SORTED > build/GAMEHELP.IDX)
# #
# precompute indexed files for slideshows # precompute indexed files for slideshows
# note: these can be padded because they're loaded into $800 at a time when $800..$1FFF is clobber-able
# #
[ -f build/SLIDESHOW.IDX ] || ((for f in res/SS/*; do \ [ -f build/index ] || ((for f in res/SS/*; do \
[ $$(echo "$$(basename $$f)" | cut -c-3) = "ACT" ] && \ [ $$(echo "$$(basename $$f)" | cut -c-3) = "ACT" ] && \
bin/buildaction.sh build/GAMES.CONF < "$$f" > "build/SS/$$(basename $$f)" || \ bin/buildaction.sh build/GAMES.CONF < "$$f" > "build/SS/$$(basename $$f)" || \
bin/buildtitle.sh build/GAMES.CONF < "$$f" > "build/SS/$$(basename $$f)"; \ bin/buildtitle.sh build/GAMES.CONF < "$$f" > "build/SS/$$(basename $$f)"; \
echo "$$(basename $$f)"; \ echo "$$(basename $$f)"; \
done) | bin/buildindexedfile.sh -p -a build/TOTAL.DATA build/SS > build/SLIDESHOW.IDX) done) | bin/buildindexedfile.sh -p -a build/TOTAL.DATA build/SS > build/SLIDESHOW.IDX)
[ -f build/MINIATTRACT.IDX ] || ((for f in res/ATTRACT/*; do \ [ -f build/index ] || ((for f in res/ATTRACT/*; do \
bin/buildokvs.sh < "$$f" > "build/ATTRACT/$$(basename $$f)"; \ bin/buildokvs.sh < "$$f" > "build/ATTRACT/$$(basename $$f)"; \
echo "$$(basename $$f)"; \ echo "$$(basename $$f)"; \
done) | bin/buildindexedfile.sh -p -a build/TOTAL.DATA build/ATTRACT > build/MINIATTRACT.IDX) done) | bin/buildindexedfile.sh -p -a build/TOTAL.DATA build/ATTRACT > build/MINIATTRACT.IDX)
# #
# precompute indexed files for graphic effects # precompute indexed files for graphic effects
# note: these can be padded because they're loaded into $6000 at a time when $6000..$BEFF is clobber-able
# #
[ -f build/FX.IDX ] || (bin/buildindexedfile.sh -p -a build/TOTAL.DATA build/FX.INDEXED < res/FX.CONF > build/FX.IDX) [ -f build/index ] || (bin/buildindexedfile.sh -p -a build/TOTAL.DATA build/FX.INDEXED < res/FX.CONF > build/FX.IDX)
[ -f build/DFX.IDX ] || (bin/buildindexedfile.sh -p -a build/TOTAL.DATA build/FX.INDEXED < res/DFX.CONF > build/DFX.IDX) [ -f build/index ] || (bin/buildindexedfile.sh -p -a build/TOTAL.DATA build/FX.INDEXED < res/DFX.CONF > build/DFX.IDX)
# #
# precompute indexed files for HGR & DHGR action screenshots # precompute indexed files for HGR & DHGR action screenshots
# note: these can not be padded because they are compressed and the decompressor needs the exact size # note: these can not be padded because they are compressed and the decompressor needs the exact size
# #
[ -f build/HGR0.IDX ] || ((for f in res/ACTION.HGR/[ABCD]*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.HGR > build/HGR0.IDX) [ -f build/index ] || ((for f in res/ACTION.HGR/[ABCD]*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.HGR > build/HGR0.IDX)
[ -f build/HGR1.IDX ] || ((for f in res/ACTION.HGR/[EFGH]*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.HGR > build/HGR1.IDX) [ -f build/index ] || ((for f in res/ACTION.HGR/[EFGH]*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.HGR > build/HGR1.IDX)
[ -f build/HGR2.IDX ] || ((for f in res/ACTION.HGR/[IJKL]*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.HGR > build/HGR2.IDX) [ -f build/index ] || ((for f in res/ACTION.HGR/[IJKL]*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.HGR > build/HGR2.IDX)
[ -f build/HGR3.IDX ] || ((for f in res/ACTION.HGR/[MNOP]*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.HGR > build/HGR3.IDX) [ -f build/index ] || ((for f in res/ACTION.HGR/[MNOP]*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.HGR > build/HGR3.IDX)
[ -f build/HGR4.IDX ] || ((for f in res/ACTION.HGR/[QRST]*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.HGR > build/HGR4.IDX) [ -f build/index ] || ((for f in res/ACTION.HGR/[QRST]*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.HGR > build/HGR4.IDX)
[ -f build/HGR5.IDX ] || ((for f in res/ACTION.HGR/[UVWX]*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.HGR > build/HGR5.IDX) [ -f build/index ] || ((for f in res/ACTION.HGR/[UVWX]*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.HGR > build/HGR5.IDX)
[ -f build/HGR6.IDX ] || ((for f in res/ACTION.HGR/[YZ]*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.HGR > build/HGR6.IDX) [ -f build/index ] || ((for f in res/ACTION.HGR/[YZ]*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.HGR > build/HGR6.IDX)
[ -f build/DHGR.IDX ] || ((for f in res/ACTION.DHGR/*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.DHGR > build/DHGR.IDX) [ -f build/index ] || ((for f in res/ACTION.DHGR/*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ACTION.DHGR > build/DHGR.IDX)
# #
# precompute indexed files for GR action screenshots # precompute indexed files for GR action screenshots
# note: these can be padded because they are not compressed # note: these can be padded because they are not compressed
# #
[ -f build/GR.IDX ] || ((for f in res/ACTION.GR/*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a -p build/TOTAL.DATA res/ACTION.GR > build/GR.IDX) [ -f build/index ] || ((for f in res/ACTION.GR/*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a -p build/TOTAL.DATA res/ACTION.GR > build/GR.IDX)
# #
# precompute indexed files for SHR artwork # precompute indexed files for SHR artwork
# note: these can not be padded because they are compressed and the decompressor needs the exact size # note: these can not be padded because they are compressed and the decompressor needs the exact size
# #
[ -f build/ARTWORK.IDX ] || ((for f in res/ARTWORK.SHR/*; do \ [ -f build/index ] || ((for f in res/ARTWORK.SHR/*; do \
echo "$$(basename $$f)"; \ echo "$$(basename $$f)"; \
done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ARTWORK.SHR > build/ARTWORK.IDX) done) | bin/buildindexedfile.sh -a build/TOTAL.DATA res/ARTWORK.SHR > build/ARTWORK.IDX)
# #
# create search indexes for each variation of (game-requires-joystick) X (game-requires-128K)
# in the form of OKVS data structures, plus game counts in the form of source files
#
[ -f build/index ] || (grep "^00" < build/GAMES.CONF | bin/buildsearch.sh src/index/count00.a build/HGR.TITLES.LOG build/DHGR.TITLES.LOG > build/SEARCH00.IDX)
[ -f build/index ] || (grep "^0" < build/GAMES.CONF | bin/buildsearch.sh src/index/count01.a build/HGR.TITLES.LOG build/DHGR.TITLES.LOG > build/SEARCH01.IDX)
[ -f build/index ] || (grep "^.0" < build/GAMES.CONF | bin/buildsearch.sh src/index/count10.a build/HGR.TITLES.LOG build/DHGR.TITLES.LOG > build/SEARCH10.IDX)
[ -f build/index ] || (bin/buildsearch.sh src/index/count11.a build/HGR.TITLES.LOG build/DHGR.TITLES.LOG < build/GAMES.CONF > build/SEARCH11.IDX)
#
# add IDX files to the combined index file and generate # add IDX files to the combined index file and generate
# the index records that callers use to reference them # the index records that callers use to reference them
# #
@ -185,6 +191,8 @@ index: md asmfx asmprelaunch compress
bin/addfile.sh build/GAMEHELP.IDX build/TOTAL.IDX > src/index/gamehelp.idx.a bin/addfile.sh build/GAMEHELP.IDX build/TOTAL.IDX > src/index/gamehelp.idx.a
bin/addfile.sh build/SLIDESHOW.IDX build/TOTAL.IDX > src/index/slideshow.idx.a bin/addfile.sh build/SLIDESHOW.IDX build/TOTAL.IDX > src/index/slideshow.idx.a
bin/addfile.sh build/MINIATTRACT.IDX build/TOTAL.IDX > src/index/miniattract.idx.a bin/addfile.sh build/MINIATTRACT.IDX build/TOTAL.IDX > src/index/miniattract.idx.a
bin/addfile.sh build/TITLE.IDX build/TOTAL.IDX > src/index/title.idx.a
bin/addfile.sh build/DTITLE.IDX build/TOTAL.IDX > src/index/dtitle.idx.a
bin/addfile.sh build/HGR0.IDX build/TOTAL.IDX > src/index/hgr0.idx.a bin/addfile.sh build/HGR0.IDX build/TOTAL.IDX > src/index/hgr0.idx.a
bin/addfile.sh build/HGR1.IDX build/TOTAL.IDX > src/index/hgr1.idx.a bin/addfile.sh build/HGR1.IDX build/TOTAL.IDX > src/index/hgr1.idx.a
bin/addfile.sh build/HGR2.IDX build/TOTAL.IDX > src/index/hgr2.idx.a bin/addfile.sh build/HGR2.IDX build/TOTAL.IDX > src/index/hgr2.idx.a
@ -195,6 +203,7 @@ index: md asmfx asmprelaunch compress
bin/addfile.sh build/DHGR.IDX build/TOTAL.IDX > src/index/dhgr.idx.a bin/addfile.sh build/DHGR.IDX build/TOTAL.IDX > src/index/dhgr.idx.a
bin/addfile.sh build/GR.IDX build/TOTAL.IDX > src/index/gr.idx.a bin/addfile.sh build/GR.IDX build/TOTAL.IDX > src/index/gr.idx.a
bin/addfile.sh build/ARTWORK.IDX build/TOTAL.IDX > src/index/artwork.idx.a bin/addfile.sh build/ARTWORK.IDX build/TOTAL.IDX > src/index/artwork.idx.a
touch build/index
asmlauncher: md asmlauncher: md
$(ACME) -DBUILDNUMBER=`git rev-list --count HEAD` src/4cade.a 2>build/relbase.log $(ACME) -DBUILDNUMBER=`git rev-list --count HEAD` src/4cade.a 2>build/relbase.log

View File

@ -9,6 +9,7 @@
# stdout - binary OKVS data structure # stdout - binary OKVS data structure
# 1 - output filename for data file # 1 - output filename for data file
# 2 - input directory of files to merge into data file # 2 - input directory of files to merge into data file
# 3 - (optional) output filename for log of key,offset,size
pad=false pad=false
append=false append=false
@ -29,6 +30,11 @@ if [ "$append" = false ]; then
fi fi
touch "$1" touch "$1"
if [ "${#3}" -ne "0" ]; then
rm -f "$3"
touch "$3"
fi
# if there is a file called "STANDARD" in the input directory, add it now # if there is a file called "STANDARD" in the input directory, add it now
# because we will reuse it for any files that don't exist # because we will reuse it for any files that don't exist
if [ -f "$2"/STANDARD ]; then if [ -f "$2"/STANDARD ]; then
@ -49,30 +55,26 @@ source=$(mktemp)
echo "!byte ${#key}+7" # OKVS record length echo "!byte ${#key}+7" # OKVS record length
echo "!byte ${#key}" # OKVS key length echo "!byte ${#key}" # OKVS key length
echo "!text \"$key\"" # OKVS key echo "!text \"$key\"" # OKVS key
if [ -f "$2/$key" ]; then # if file exists, determine offset and size if [ ! -e "$2/$key" ]; then # if file does not exist, use standard offset and size
offset="$standardoffset"
size="$standardsize"
else # otherwise calculate offset and size from file and options
offset=$(wc -c < "$1") offset=$(wc -c < "$1")
echo "!be24 $offset" # offset into merged data file
echo -n "!le16 "
size=$(wc -c < "$2/$key") size=$(wc -c < "$2/$key")
if [ "$pad" = true ]; then if [ "$pad" = true ]; then
# If offset+size does not cross a block boundary, use file's true size. # If offset+size does not cross a block boundary, use file's true size.
# Otherwise, round up size to the next block boundary. # Otherwise, round up size to the next block boundary.
# This padding does not get added to the file; it is just an # This padding does not get added to the file; it is just an
# optimization to avoid a partial copy on the last block read. # optimization to avoid a partial copy on the last block read.
if [ $(($offset / 512)) -eq $((($offset + $size) / 512)) ]; then if [ $(($offset / 512)) -ne $((($offset + $size) / 512)) ]; then
echo "$size" size=$(((($offset + $size + 511) & -512) - $offset))
else
echo "$(((($offset + $size + 511) & -512) - $offset))"
fi fi
else
# Caller said never pad, so always use file's true size.
echo "$size"
fi fi
cat "$2/$key" >> "$1" # append this file to the end of the merged data file cat "$2/$key" >> "$1" # append this file to the end of the merged data file
else # if file does not exist, reuse STANDARD file
echo "!be24 $standardoffset"
echo "!le16 $standardsize"
fi fi
echo "!be24 $offset"
echo "!le16 $size"
[ "${#3}" -ne "0" ] && echo "$key,$offset,$size" >> "$3"
done < "$records") > "$source" done < "$records") > "$source"
# assemble temp source file into binary OKVS data structure, then output that # assemble temp source file into binary OKVS data structure, then output that

View File

@ -1,9 +1,21 @@
#!/bin/bash #!/bin/bash
# parameters
# stdin - input containing list of game metadata, filename, display name (e.g. GAMES.CONF or some subset of it)
# stdout - binary OKVS data structure
# 1 - output filename for game count in assembler code format
# 2 - input filename of HGR titles, offsets, and sizes
# 3 - input filename of DHGR titles, offsets, and sizes
# make temp file with just the key/value pairs (strip blank lines, comments, eof marker) # make temp file with just the key/value pairs (strip blank lines, comments, eof marker)
records=$(mktemp) records=$(mktemp)
awk '!/^$|^#|^\[/' > "$records" awk '!/^$|^#|^\[/' > "$records"
# read logs of offsets & sizes for HGR and DHGR titles
# that were generated by an earlier script
hgrlog=$(< "$2")
dhgrlog=$(< "$3")
# generate source file with game count # generate source file with game count
(echo ";" (echo ";"
echo "; Game count" echo "; Game count"
@ -20,13 +32,24 @@ source=$(mktemp)
dhgr=$(echo "$key" | cut -c3) # 'has DHGR title screen' flag (0 or 1) dhgr=$(echo "$key" | cut -c3) # 'has DHGR title screen' flag (0 or 1)
cheat=$(echo "$key" | cut -c4) # 'cheat category' (0..5) cheat=$(echo "$key" | cut -c4) # 'cheat category' (0..5)
key=$(echo "$key" | cut -d"," -f2) key=$(echo "$key" | cut -d"," -f2)
echo "!byte ${#key}+${#value}+5" # OKVS record length if [ "$dhgr" -eq "0" ]; then
offset=$hgrlog
size=$hgrlog
else
offset=$dhgrlog
size=$dhgrlog
fi
offset=$(echo "$offset" | awk -F, '/^'"$key"',/ { print $2 }')
size=$(echo "$size" | awk -F, '/^'"$key"',/ { print $3 }')
echo "!byte ${#key}+${#value}+10" # OKVS record length
echo "!byte ${#key}" # OKVS key length echo "!byte ${#key}" # OKVS key length
echo "!text \"$key\"" # OKVS key (filename) echo "!text \"$key\"" # OKVS key (filename)
echo "!byte ${#value}" # OKVS value length echo "!byte ${#value}" # OKVS value length
echo "!text \"$value\"" # OKVS value (display name) echo "!text \"$value\"" # OKVS value (display name)
echo "!byte 1" echo "!byte 1"
echo "!byte $((dhgr*128))+$cheat" echo "!byte $((dhgr*128))+$cheat"
echo "!be24 $offset"
echo "!le16 $size"
done < "$records") > "$source" done < "$records") > "$source"
# assemble temp source file into binary OKVS data structure, then output that # assemble temp source file into binary OKVS data structure, then output that

View File

@ -1,37 +0,0 @@
# This file is automatically generated
AIRHEART=Type(06),AuxType(4000),Access(C3)
ALIENS=Type(06),AuxType(4000),Access(C3)
BAD.DUDES=Type(06),AuxType(4000),Access(C3)
BATMAN=Type(06),AuxType(4000),Access(C3)
BRUCE.LEE=Type(06),AuxType(4000),Access(C3)
COLUMNS=Type(06),AuxType(4000),Access(C3)
DEATH.SWORD=Type(06),AuxType(4000),Access(C3)
DG=Type(06),AuxType(4000),Access(C3)
FLAPPLE.BIRD=Type(06),AuxType(4000),Access(C3)
HEAVY.BARREL=Type(06),AuxType(4000),Access(C3)
I2=Type(06),AuxType(4000),Access(C3)
IE=Type(06),AuxType(4000),Access(C3)
INDIANA.JONES=Type(06),AuxType(4000),Access(C3)
MS=Type(06),AuxType(4000),Access(C3)
PIPE.DREAM=Type(06),AuxType(4000),Access(C3)
PLATOON=Type(06),AuxType(4000),Access(C3)
PP=Type(06),AuxType(4000),Access(C3)
QIX=Type(06),AuxType(4000),Access(C3)
RADWARRIOR=Type(06),AuxType(4000),Access(C3)
RAMPAGE=Type(06),AuxType(4000),Access(C3)
RENEGADE=Type(06),AuxType(4000),Access(C3)
ROBOCOP=Type(06),AuxType(4000),Access(C3)
RR=Type(06),AuxType(4000),Access(C3)
SLICKS=Type(06),AuxType(4000),Access(C3)
SO=Type(06),AuxType(4000),Access(C3)
SPIDERBOT=Type(06),AuxType(4000),Access(C3)
SS3=Type(06),AuxType(4000),Access(C3)
TC=Type(06),AuxType(4000),Access(C3)
TETRIS=Type(06),AuxType(4000),Access(C3)
THE.LAST.NINJA=Type(06),AuxType(4000),Access(C3)
THEXDER=Type(06),AuxType(4000),Access(C3)
TS=Type(06),AuxType(4000),Access(C3)
VICTORY.ROAD=Type(06),AuxType(4000),Access(C3)
WF=Type(06),AuxType(4000),Access(C3)
_FileInformation.txt=Type(06),AuxType(4000),Access(C3)

View File

@ -1,384 +0,0 @@
# This file is automatically generated
A.CITY.DIES=Type(06),AuxType(4000),Access(C3)
A.E=Type(06),AuxType(4000),Access(C3)
AA=Type(06),AuxType(4000),Access(C3)
AB=Type(06),AuxType(4000),Access(C3)
AC=Type(06),AuxType(4000),Access(C3)
AF=Type(06),AuxType(4000),Access(C3)
AGENT.U.S.A=Type(06),AuxType(4000),Access(C3)
ALCAZAR=Type(06),AuxType(4000),Access(C3)
ALIEN.AMBUSH=Type(06),AuxType(4000),Access(C3)
ALIEN.DOWNPOUR=Type(06),AuxType(4000),Access(C3)
ALIEN.LANDER=Type(06),AuxType(4000),Access(C3)
ALIEN.MUNCHIES=Type(06),AuxType(4000),Access(C3)
ALIEN.TYPHOON=Type(06),AuxType(4000),Access(C3)
ANKH=Type(06),AuxType(4000),Access(C3)
AO=Type(06),AuxType(4000),Access(C3)
APE.ESCAPE=Type(06),AuxType(4000),Access(C3)
APPLE.INVADER=Type(06),AuxType(4000),Access(C3)
APPLE.PANIC=Type(06),AuxType(4000),Access(C3)
AQUATRON=Type(06),AuxType(4000),Access(C3)
ARCHON=Type(06),AuxType(4000),Access(C3)
ARCHON.II=Type(06),AuxType(4000),Access(C3)
ARCTIC.FOX=Type(06),AuxType(4000),Access(C3)
ARENA=Type(06),AuxType(4000),Access(C3)
ARGOS=Type(06),AuxType(4000),Access(C3)
ARKANOID=Type(06),AuxType(4000),Access(C3)
ARTESIANS=Type(06),AuxType(4000),Access(C3)
AS=Type(06),AuxType(4000),Access(C3)
AXIS.ASSASSIN=Type(06),AuxType(4000),Access(C3)
AZTEC=Type(06),AuxType(4000),Access(C3)
B1=Type(06),AuxType(4000),Access(C3)
B2=Type(06),AuxType(4000),Access(C3)
BALLBLAZER=Type(06),AuxType(4000),Access(C3)
BANDITS=Type(06),AuxType(4000),Access(C3)
BATTLE.CRUISER=Type(06),AuxType(4000),Access(C3)
BATTLEZONE=Type(06),AuxType(4000),Access(C3)
BB=Type(06),AuxType(4000),Access(C3)
BC=Type(06),AuxType(4000),Access(C3)
BEACH.LANDING=Type(06),AuxType(4000),Access(C3)
BEER.RUN=Type(06),AuxType(4000),Access(C3)
BEJEWELED=Type(06),AuxType(4000),Access(C3)
BELLHOP=Type(06),AuxType(4000),Access(C3)
BERZAP=Type(06),AuxType(4000),Access(C3)
BEZARE=Type(06),AuxType(4000),Access(C3)
BEZOFF=Type(06),AuxType(4000),Access(C3)
BH=Type(06),AuxType(4000),Access(C3)
BK=Type(06),AuxType(4000),Access(C3)
BLACK.MAGIC=Type(06),AuxType(4000),Access(C3)
BLISTER.BALL=Type(06),AuxType(4000),Access(C3)
BOA=Type(06),AuxType(4000),Access(C3)
BOLO=Type(06),AuxType(4000),Access(C3)
BORG=Type(06),AuxType(4000),Access(C3)
BOULDER.DASH=Type(06),AuxType(4000),Access(C3)
BOULDER.DASH.II=Type(06),AuxType(4000),Access(C3)
BQ=Type(06),AuxType(4000),Access(C3)
BR=Type(06),AuxType(4000),Access(C3)
BRUCE.LEE=Type(06),AuxType(4000),Access(C3)
BT=Type(06),AuxType(4000),Access(C3)
BU=Type(06),AuxType(4000),Access(C3)
BUBBLE.BOBBLE=Type(06),AuxType(4000),Access(C3)
BUG.ATTACK=Type(06),AuxType(4000),Access(C3)
BUG.BATTLE=Type(06),AuxType(4000),Access(C3)
BUZZARD.BAIT=Type(06),AuxType(4000),Access(C3)
BW=Type(06),AuxType(4000),Access(C3)
BY=Type(06),AuxType(4000),Access(C3)
CANYON.CLIMBER=Type(06),AuxType(4000),Access(C3)
CAPTAIN.POWER=Type(06),AuxType(4000),Access(C3)
CB=Type(06),AuxType(4000),Access(C3)
CC=Type(06),AuxType(4000),Access(C3)
CEILING.ZERO=Type(06),AuxType(4000),Access(C3)
CENTIPEDE=Type(06),AuxType(4000),Access(C3)
CF=Type(06),AuxType(4000),Access(C3)
CG=Type(06),AuxType(4000),Access(C3)
CHIP.OUT=Type(06),AuxType(4000),Access(C3)
CHIVALRY=Type(06),AuxType(4000),Access(C3)
CHOPLIFTER=Type(06),AuxType(4000),Access(C3)
CL=Type(06),AuxType(4000),Access(C3)
COLUMNS=Type(06),AuxType(4000),Access(C3)
COMMANDO=Type(06),AuxType(4000),Access(C3)
CONAN=Type(06),AuxType(4000),Access(C3)
CONGO=Type(06),AuxType(4000),Access(C3)
CONGO.BONGO=Type(06),AuxType(4000),Access(C3)
COSMIC.COMBAT=Type(06),AuxType(4000),Access(C3)
COUNTY.FAIR=Type(06),AuxType(4000),Access(C3)
CQ=Type(06),AuxType(4000),Access(C3)
CR=Type(06),AuxType(4000),Access(C3)
CRAZY.MAZEY=Type(06),AuxType(4000),Access(C3)
CRICKATEER=Type(06),AuxType(4000),Access(C3)
CRIME.WAVE=Type(06),AuxType(4000),Access(C3)
CRISIS.MOUNTAIN=Type(06),AuxType(4000),Access(C3)
CROSSFIRE=Type(06),AuxType(4000),Access(C3)
CRYSTAL.CASTLES=Type(06),AuxType(4000),Access(C3)
CS=Type(06),AuxType(4000),Access(C3)
CUBIT=Type(06),AuxType(4000),Access(C3)
CV=Type(06),AuxType(4000),Access(C3)
CW=Type(06),AuxType(4000),Access(C3)
CYBER.STRIKE=Type(06),AuxType(4000),Access(C3)
CYCLOD=Type(06),AuxType(4000),Access(C3)
DANGEROUS.DAVE=Type(06),AuxType(4000),Access(C3)
DEEP.SPACE=Type(06),AuxType(4000),Access(C3)
DEFENDER=Type(06),AuxType(4000),Access(C3)
DEMONIC.DECKS=Type(06),AuxType(4000),Access(C3)
DEPTH.CHARGE=Type(06),AuxType(4000),Access(C3)
DIAMOND.MINE=Type(06),AuxType(4000),Access(C3)
DIG.DUG=Type(06),AuxType(4000),Access(C3)
DINO.EGGS=Type(06),AuxType(4000),Access(C3)
DINO.SMURF=Type(06),AuxType(4000),Access(C3)
DIVE.BOMBER=Type(06),AuxType(4000),Access(C3)
DJ=Type(06),AuxType(4000),Access(C3)
DM=Type(06),AuxType(4000),Access(C3)
DOGFIGHT.II=Type(06),AuxType(4000),Access(C3)
DONKEY.KONG=Type(06),AuxType(4000),Access(C3)
DOUBLE.TROUBLE=Type(06),AuxType(4000),Access(C3)
DRAGONFIRE=Type(06),AuxType(4000),Access(C3)
DRELBS=Type(06),AuxType(4000),Access(C3)
DROL=Type(06),AuxType(4000),Access(C3)
DU=Type(06),AuxType(4000),Access(C3)
DUNG.BEETLES=Type(06),AuxType(4000),Access(C3)
EARLY.BIRD=Type(06),AuxType(4000),Access(C3)
EI=Type(06),AuxType(4000),Access(C3)
EPOCH=Type(06),AuxType(4000),Access(C3)
ES=Type(06),AuxType(4000),Access(C3)
EVOLUTION=Type(06),AuxType(4000),Access(C3)
EXTERMINATOR=Type(06),AuxType(4000),Access(C3)
FALCONS=Type(06),AuxType(4000),Access(C3)
FAT.CITY=Type(06),AuxType(4000),Access(C3)
FEDERATION=Type(06),AuxType(4000),Access(C3)
FIREBIRD=Type(06),AuxType(4000),Access(C3)
FIREBUG=Type(06),AuxType(4000),Access(C3)
FLIP.OUT=Type(06),AuxType(4000),Access(C3)
FLY.WARS=Type(06),AuxType(4000),Access(C3)
FORCE.7=Type(06),AuxType(4000),Access(C3)
FRAZZLE=Type(06),AuxType(4000),Access(C3)
FREE.FALL=Type(06),AuxType(4000),Access(C3)
FROGGER=Type(06),AuxType(4000),Access(C3)
FROGGER.II=Type(06),AuxType(4000),Access(C3)
FS2=Type(06),AuxType(4000),Access(C3)
G.I.JOE=Type(06),AuxType(4000),Access(C3)
GALACTIC.ATTACK=Type(06),AuxType(4000),Access(C3)
GALAXIAN=Type(06),AuxType(4000),Access(C3)
GALAXY.GATES=Type(06),AuxType(4000),Access(C3)
GAMMA.GOBLINS=Type(06),AuxType(4000),Access(C3)
GAUNTLET=Type(06),AuxType(4000),Access(C3)
GENESIS=Type(06),AuxType(4000),Access(C3)
GENETIC.DRIFT=Type(06),AuxType(4000),Access(C3)
GENIUS=Type(06),AuxType(4000),Access(C3)
GENIUS.2=Type(06),AuxType(4000),Access(C3)
GENIUS.3=Type(06),AuxType(4000),Access(C3)
GHOSTBUSTERS=Type(06),AuxType(4000),Access(C3)
GOLD.RUSH=Type(06),AuxType(4000),Access(C3)
GORGON=Type(06),AuxType(4000),Access(C3)
GRAPPLE=Type(06),AuxType(4000),Access(C3)
GREMLINS=Type(06),AuxType(4000),Access(C3)
GUARDIAN=Type(06),AuxType(4000),Access(C3)
GUMBALL=Type(06),AuxType(4000),Access(C3)
H.E.R.O=Type(06),AuxType(4000),Access(C3)
HADRON=Type(06),AuxType(4000),Access(C3)
HANDY.DANDY=Type(06),AuxType(4000),Access(C3)
HARD.HAT.MACK=Type(06),AuxType(4000),Access(C3)
HEAD.ON=Type(06),AuxType(4000),Access(C3)
HIGH.RISE=Type(06),AuxType(4000),Access(C3)
HORIZON.V=Type(06),AuxType(4000),Access(C3)
HUNGRYBOY=Type(06),AuxType(4000),Access(C3)
HYPER.HEAD.ON=Type(06),AuxType(4000),Access(C3)
I1=Type(06),AuxType(4000),Access(C3)
IKARI.WARRIORS=Type(06),AuxType(4000),Access(C3)
INFILTRATOR=Type(06),AuxType(4000),Access(C3)
INFILTRATOR.2=Type(06),AuxType(4000),Access(C3)
IO=Type(06),AuxType(4000),Access(C3)
IP=Type(06),AuxType(4000),Access(C3)
JAWBREAKER=Type(06),AuxType(4000),Access(C3)
JAWBREAKER.II=Type(06),AuxType(4000),Access(C3)
JELLYFISH=Type(06),AuxType(4000),Access(C3)
JOUST=Type(06),AuxType(4000),Access(C3)
JUGGLER=Type(06),AuxType(4000),Access(C3)
JUMP.JET=Type(06),AuxType(4000),Access(C3)
JUMPMAN=Type(06),AuxType(4000),Access(C3)
JUNGLE.HUNT=Type(06),AuxType(4000),Access(C3)
KAMIKAZE=Type(06),AuxType(4000),Access(C3)
KARATEKA=Type(06),AuxType(4000),Access(C3)
KID.NIKI=Type(06),AuxType(4000),Access(C3)
KUNG.FU.MASTER=Type(06),AuxType(4000),Access(C3)
LA=Type(06),AuxType(4000),Access(C3)
LABYRINTH=Type(06),AuxType(4000),Access(C3)
LADY.TUT=Type(06),AuxType(4000),Access(C3)
LANCASTER=Type(06),AuxType(4000),Access(C3)
LASER.BOUNCE=Type(06),AuxType(4000),Access(C3)
LAZER.SILK=Type(06),AuxType(4000),Access(C3)
LC=Type(06),AuxType(4000),Access(C3)
LEMMINGS=Type(06),AuxType(4000),Access(C3)
LG=Type(06),AuxType(4000),Access(C3)
LL=Type(06),AuxType(4000),Access(C3)
LODE.RUNNER=Type(06),AuxType(4000),Access(C3)
LOST.TOMB=Type(06),AuxType(4000),Access(C3)
LP=Type(06),AuxType(4000),Access(C3)
LUNAR.LEEPERS=Type(06),AuxType(4000),Access(C3)
M.I.R.V=Type(06),AuxType(4000),Access(C3)
MAD.BOMBER=Type(06),AuxType(4000),Access(C3)
MAD.RAT=Type(06),AuxType(4000),Access(C3)
MANIC.MINER=Type(06),AuxType(4000),Access(C3)
MARAUDER=Type(06),AuxType(4000),Access(C3)
MARBLE.MADNESS=Type(06),AuxType(4000),Access(C3)
MARS.CARS=Type(06),AuxType(4000),Access(C3)
MATING.ZONE=Type(06),AuxType(4000),Access(C3)
MAXWELL.MANOR=Type(06),AuxType(4000),Access(C3)
MAZEBLOX=Type(06),AuxType(4000),Access(C3)
MB=Type(06),AuxType(4000),Access(C3)
MC=Type(06),AuxType(4000),Access(C3)
MD=Type(06),AuxType(4000),Access(C3)
MEGABOTS=Type(06),AuxType(4000),Access(C3)
MI=Type(06),AuxType(4000),Access(C3)
MICRO.INVADERS=Type(06),AuxType(4000),Access(C3)
MICROWAVE=Type(06),AuxType(4000),Access(C3)
MINER.2049ER=Type(06),AuxType(4000),Access(C3)
MINER.II=Type(06),AuxType(4000),Access(C3)
MINIT.MAN=Type(06),AuxType(4000),Access(C3)
MINOTAUR=Type(06),AuxType(4000),Access(C3)
MM=Type(06),AuxType(4000),Access(C3)
MONSTER.MASH=Type(06),AuxType(4000),Access(C3)
MOON.PATROL=Type(06),AuxType(4000),Access(C3)
MOUSKATTACK=Type(06),AuxType(4000),Access(C3)
MP=Type(06),AuxType(4000),Access(C3)
MR=Type(06),AuxType(4000),Access(C3)
MT=Type(06),AuxType(4000),Access(C3)
MZ=Type(06),AuxType(4000),Access(C3)
N.O.R.A.D=Type(06),AuxType(4000),Access(C3)
NEON=Type(06),AuxType(4000),Access(C3)
NEPTUNE=Type(06),AuxType(4000),Access(C3)
NEUTRONS=Type(06),AuxType(4000),Access(C3)
NI=Type(06),AuxType(4000),Access(C3)
NIBBLER=Type(06),AuxType(4000),Access(C3)
NIGHT.STALKER=Type(06),AuxType(4000),Access(C3)
NM=Type(06),AuxType(4000),Access(C3)
NT=Type(06),AuxType(4000),Access(C3)
OI=Type(06),AuxType(4000),Access(C3)
OID.ZONE=Type(06),AuxType(4000),Access(C3)
OM=Type(06),AuxType(4000),Access(C3)
ON.THE.RUN=Type(06),AuxType(4000),Access(C3)
ORBITRON=Type(06),AuxType(4000),Access(C3)
OUTPOST=Type(06),AuxType(4000),Access(C3)
OUTWORLD=Type(06),AuxType(4000),Access(C3)
OW=Type(06),AuxType(4000),Access(C3)
PACMAN=Type(06),AuxType(4000),Access(C3)
PAPERBOY=Type(06),AuxType(4000),Access(C3)
PB=Type(06),AuxType(4000),Access(C3)
PEEPING.TOM=Type(06),AuxType(4000),Access(C3)
PEGASUS.II=Type(06),AuxType(4000),Access(C3)
PENETRATOR=Type(06),AuxType(4000),Access(C3)
PENGO=Type(06),AuxType(4000),Access(C3)
PENTAPUS=Type(06),AuxType(4000),Access(C3)
PEST.PATROL=Type(06),AuxType(4000),Access(C3)
PHANTOMS.FIVE=Type(06),AuxType(4000),Access(C3)
PHASER.FIRE=Type(06),AuxType(4000),Access(C3)
PHOTAR=Type(06),AuxType(4000),Access(C3)
PICNIC.PARANOIA=Type(06),AuxType(4000),Access(C3)
PIG.PEN=Type(06),AuxType(4000),Access(C3)
PITFALL.II=Type(06),AuxType(4000),Access(C3)
PITSTOP.II=Type(06),AuxType(4000),Access(C3)
PLANETOIDS=Type(06),AuxType(4000),Access(C3)
PLASMANIA=Type(06),AuxType(4000),Access(C3)
PM=Type(06),AuxType(4000),Access(C3)
POLLYWOG=Type(06),AuxType(4000),Access(C3)
POOYAN=Type(06),AuxType(4000),Access(C3)
PR=Type(06),AuxType(4000),Access(C3)
PULSAR.II=Type(06),AuxType(4000),Access(C3)
QUADRANT.6112=Type(06),AuxType(4000),Access(C3)
RANDAMN=Type(06),AuxType(4000),Access(C3)
RASTER.BLASTER=Type(06),AuxType(4000),Access(C3)
RB=Type(06),AuxType(4000),Access(C3)
REAR.GUARD=Type(06),AuxType(4000),Access(C3)
RED.ALERT=Type(06),AuxType(4000),Access(C3)
REPTON=Type(06),AuxType(4000),Access(C3)
RESCUE.RAIDERS=Type(06),AuxType(4000),Access(C3)
RETRO.FEVER=Type(06),AuxType(4000),Access(C3)
RG=Type(06),AuxType(4000),Access(C3)
RI=Type(06),AuxType(4000),Access(C3)
RIBBIT=Type(06),AuxType(4000),Access(C3)
RM=Type(06),AuxType(4000),Access(C3)
ROACH.HOTEL=Type(06),AuxType(4000),Access(C3)
ROADBLOCK=Type(06),AuxType(4000),Access(C3)
ROBOT.BATTLE=Type(06),AuxType(4000),Access(C3)
ROBOTRON.2084=Type(06),AuxType(4000),Access(C3)
ROUND.ABOUT=Type(06),AuxType(4000),Access(C3)
RUN.FOR.IT=Type(06),AuxType(4000),Access(C3)
RUSSKI.DUCK=Type(06),AuxType(4000),Access(C3)
S2=Type(06),AuxType(4000),Access(C3)
SABOTAGE=Type(06),AuxType(4000),Access(C3)
SAMMY.LIGHTFOOT=Type(06),AuxType(4000),Access(C3)
SARACEN=Type(06),AuxType(4000),Access(C3)
SC=Type(06),AuxType(4000),Access(C3)
SD=Type(06),AuxType(4000),Access(C3)
SEA.DRAGON=Type(06),AuxType(4000),Access(C3)
SEAFOX=Type(06),AuxType(4000),Access(C3)
SERPENTINE=Type(06),AuxType(4000),Access(C3)
SHAMUS=Type(06),AuxType(4000),Access(C3)
SHORT.CIRCUIT=Type(06),AuxType(4000),Access(C3)
SI=Type(06),AuxType(4000),Access(C3)
SKYFOX=Type(06),AuxType(4000),Access(C3)
SNACK.ATTACK=Type(06),AuxType(4000),Access(C3)
SNAKE.BYTE=Type(06),AuxType(4000),Access(C3)
SNEAKERS=Type(06),AuxType(4000),Access(C3)
SNOGGLE=Type(06),AuxType(4000),Access(C3)
SOLO.FLIGHT=Type(06),AuxType(4000),Access(C3)
SPACE.EGGS=Type(06),AuxType(4000),Access(C3)
SPACE.KADET=Type(06),AuxType(4000),Access(C3)
SPACE.QUARKS=Type(06),AuxType(4000),Access(C3)
SPACE.RAIDERS=Type(06),AuxType(4000),Access(C3)
SPARE.CHANGE=Type(06),AuxType(4000),Access(C3)
SPECTRE=Type(06),AuxType(4000),Access(C3)
SPELLWIELDER=Type(06),AuxType(4000),Access(C3)
SPIDER.RAID=Type(06),AuxType(4000),Access(C3)
SPINDIZZY=Type(06),AuxType(4000),Access(C3)
SPUTNIK.ATTACK=Type(06),AuxType(4000),Access(C3)
SPY.HUNTER=Type(06),AuxType(4000),Access(C3)
SS=Type(06),AuxType(4000),Access(C3)
SS2=Type(06),AuxType(4000),Access(C3)
STAR.AVENGER=Type(06),AuxType(4000),Access(C3)
STAR.BLAZER=Type(06),AuxType(4000),Access(C3)
STAR.CLONES=Type(06),AuxType(4000),Access(C3)
STAR.CRUISER=Type(06),AuxType(4000),Access(C3)
STAR.DANCE=Type(06),AuxType(4000),Access(C3)
STAR.MAZE=Type(06),AuxType(4000),Access(C3)
STAR.THIEF=Type(06),AuxType(4000),Access(C3)
STARBALL=Type(06),AuxType(4000),Access(C3)
STARBLASTER=Type(06),AuxType(4000),Access(C3)
STARGATE=Type(06),AuxType(4000),Access(C3)
STARGLIDER=Type(06),AuxType(4000),Access(C3)
STARMINES=Type(06),AuxType(4000),Access(C3)
STATION.5=Type(06),AuxType(4000),Access(C3)
STELLAR.7=Type(06),AuxType(4000),Access(C3)
SU=Type(06),AuxType(4000),Access(C3)
SUCCESSION=Type(06),AuxType(4000),Access(C3)
SUPER.BUNNY=Type(06),AuxType(4000),Access(C3)
SUPER.HUEY=Type(06),AuxType(4000),Access(C3)
SUPER.PUCKMAN=Type(06),AuxType(4000),Access(C3)
SUPER.TAXMAN.2=Type(06),AuxType(4000),Access(C3)
SUPER.ZAXXON=Type(06),AuxType(4000),Access(C3)
SWASHBUCKLER=Type(06),AuxType(4000),Access(C3)
TALON=Type(06),AuxType(4000),Access(C3)
TAPPER=Type(06),AuxType(4000),Access(C3)
TB=Type(06),AuxType(4000),Access(C3)
TELEPORT=Type(06),AuxType(4000),Access(C3)
TERITORY=Type(06),AuxType(4000),Access(C3)
TETRIS=Type(06),AuxType(4000),Access(C3)
THE.BILESTOAD=Type(06),AuxType(4000),Access(C3)
THE.DAM.BUSTERS=Type(06),AuxType(4000),Access(C3)
THE.GOONIES=Type(06),AuxType(4000),Access(C3)
THE.HEIST=Type(06),AuxType(4000),Access(C3)
THE.SNAPPER=Type(06),AuxType(4000),Access(C3)
THE.SPACE.ARK=Type(06),AuxType(4000),Access(C3)
THEXDER=Type(06),AuxType(4000),Access(C3)
THIEF=Type(06),AuxType(4000),Access(C3)
THRESHOLD=Type(06),AuxType(4000),Access(C3)
THUNDER.BOMBS=Type(06),AuxType(4000),Access(C3)
TIME.PILOT=Type(06),AuxType(4000),Access(C3)
TITAN.CRONUS=Type(06),AuxType(4000),Access(C3)
TOMAHAWK=Type(06),AuxType(4000),Access(C3)
TORAX=Type(06),AuxType(4000),Access(C3)
TRACK.ATTACK=Type(06),AuxType(4000),Access(C3)
TRIAD=Type(06),AuxType(4000),Access(C3)
TROMPERS=Type(06),AuxType(4000),Access(C3)
TSUNAMI=Type(06),AuxType(4000),Access(C3)
TU=Type(06),AuxType(4000),Access(C3)
TUNNEL.TERROR=Type(06),AuxType(4000),Access(C3)
TWERPS=Type(06),AuxType(4000),Access(C3)
UD=Type(06),AuxType(4000),Access(C3)
VIDEO.VEGAS=Type(06),AuxType(4000),Access(C3)
VINDICATOR=Type(06),AuxType(4000),Access(C3)
VORTEX=Type(06),AuxType(4000),Access(C3)
VV=Type(06),AuxType(4000),Access(C3)
WALL.DEFENCE=Type(06),AuxType(4000),Access(C3)
WARGLE=Type(06),AuxType(4000),Access(C3)
WARP.DESTROYER=Type(06),AuxType(4000),Access(C3)
WAVY.NAVY=Type(06),AuxType(4000),Access(C3)
WAYOUT=Type(06),AuxType(4000),Access(C3)
WHOMPER.STOMPER=Type(06),AuxType(4000),Access(C3)
WILLY.BYTE=Type(06),AuxType(4000),Access(C3)
XEVIOUS=Type(06),AuxType(4000),Access(C3)
ZARGS=Type(06),AuxType(4000),Access(C3)
ZAXXON=Type(06),AuxType(4000),Access(C3)
ZENITH=Type(06),AuxType(4000),Access(C3)
ZOO.MASTER=Type(06),AuxType(4000),Access(C3)
_FileInformation.txt=Type(06),AuxType(4000),Access(C3)

View File

@ -6,11 +6,8 @@
; Public functions ; Public functions
; - LoadFile ; - LoadFile
; - LoadAuxFile ; - LoadAuxFile
; - LoadDHRFile
; - LoadIndexedFile ; - LoadIndexedFile
; ; - LoadAuxIndexedFile
; Public variables
; - gRootDirectory
; ;
; A general note about paths: ; A general note about paths:
; ;
@ -35,8 +32,8 @@
; PROGRAM ROOT DIRECTORY. ; PROGRAM ROOT DIRECTORY.
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; LoadFile ; LoadFile/LoadAuxFile
; Load a file into memory all at once, using ProRWTS2 ; Load a file into main or auxiliary memory, all at once, using ProRWTS2
; ;
; supports paths, see note ; supports paths, see note
; ;
@ -51,43 +48,8 @@
LoadFile LoadFile
ldx #7 ldx #7
bne .loadcommon bne .loadcommon
;------------------------------------------------------------------------------
; LoadAuxFile
; Load a file into aux memory all at once, using ProRWTS2
;
; supports paths, see note
;
; in: stack contains 6 bytes of parameters:
; +1 [word] address of length-prefixed pathname
; +3 [word] address of length-prefixed filename
; +5 [word] address to load file, or 0 to use file's default address
; out: all flags clobbered
; all registers clobbered
; gPathname clobbered
;------------------------------------------------------------------------------
LoadAuxFile LoadAuxFile
ldx #6 ldx #6
bne .loadcommon
;------------------------------------------------------------------------------
; LoadDHRFile
; load .A2FC file (uncompressed double hi-res graphics) into memory
; all at once, using ProRWTS2
; first $2000 bytes of file are loaded into auxiliary memory $4000..$5FFF
; second $2000 bytes of file are loaded into main memory $4000..$4FFF
;
; supports paths, see note
;
; in: stack contains 4 bytes of parameters:
; +1 [word] address of length-prefixed pathname
; +3 [word] address of length-prefixed filename
; out: all flags clobbered
; all registers clobbered
; stack set to next instruction after parameters
;------------------------------------------------------------------------------
LoadDHRFile
ldx #$84
.loadcommon .loadcommon
pla pla
sta PARAM sta PARAM
@ -117,19 +79,17 @@ LoadDHRFile
+LDPARAMPTR 5, ldrlo ; set load address +LDPARAMPTR 5, ldrlo ; set load address
+ jsr SwitchToBank2 + jsr SwitchToBank2
plp plp
bmi ++
bcc + bcc +
jsr LoadFileInternal jsr LoadFileInternal
jmp SwitchToBank1 jmp SwitchToBank1
+ ldx #1 ; request aux memory + ldx #1 ; request aux memory
jsr LoadFileAuxInternal jsr LoadFileAuxInternal
jmp SwitchToBank1 jmp SwitchToBank1
++ jsr LoadDHRFileInternal
jmp SwitchToBank1
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; LoadAuxIndexedFile ; LoadIndexedFile/LoadAuxIndexedFile
; Load a file from inside an indexed file, all at once into auxiliary memory ; Load a file from inside an indexed file, all at once, into main or auxiliary
; memory
; ;
; To save disk space, some collections of small, related files (e.g. per-game ; To save disk space, some collections of small, related files (e.g. per-game
; help files) are merged into a single data file with an associated index file. ; help files) are merged into a single data file with an associated index file.
@ -137,37 +97,19 @@ LoadDHRFile
; data file) and a length. ; data file) and a length.
; ;
; Callers are responsible for loading the index file and finding the relevant ; Callers are responsible for loading the index file and finding the relevant
; record within the index. Most callers use okvs_find() for this. ; record within the index. Most callers use okvs_find() for this, although some
; have hard-coded records generated at build time.
; ;
; in: stack contains 6 bytes of parameters: ; in: stack contains 6 bytes of parameters:
; +1 [word] pointer to filename of merged data file ; +1 [word] pointer to filename of merged data file
; +3 [word] address of load destination ; +3 [word] address of load destination
; +5 [word] pointer to index record (see note) ; +5 [word] pointer to index record
; out: all flags clobbered ; out: all flags clobbered
; all registers clobbered ; all registers clobbered
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
LoadAuxIndexedFile LoadAuxIndexedFile
lda #$EE ; INC lda #$EE ; INC
+HIDE_NEXT_2_BYTES +HIDE_NEXT_2_BYTES
;------------------------------------------------------------------------------
; LoadIndexedFile
; Load a file from inside an indexed file, all at once
;
; To save disk space, some collections of small, related files (e.g. per-game
; help files) are merged into a single data file with an associated index file.
; The index stores the original filename along with an offset (into the merged
; data file) and a length.
;
; Callers are responsible for loading the index file and finding the relevant
; record within the index. Most callers use okvs_find() for this.
;
; in: stack contains 6 bytes of parameters:
; +1 [word] pointer to filename of merged data file
; +3 [word] address of load destination
; +5 [word] pointer to index record (see note)
; out: all flags clobbered
; all registers clobbered
;------------------------------------------------------------------------------
LoadIndexedFile LoadIndexedFile
lda #$8D ; STA lda #$8D ; STA
sta @iauxreq sta @iauxreq

View File

@ -35,28 +35,6 @@ LoadFileInternal_SizePatch
JumpOpen JumpOpen
jmp hddopendir ; exit via ProRWTS2 jmp hddopendir ; exit via ProRWTS2
LoadDHRFileInternal
+LDADDR gPathname
+ST16 namlo ; set filename
jsr traverse ; go to subdirectory, set up filename for read
lda #$20
sta sizehi
asl
sta ldrhi ; into $4000
lda #cmdread ; read (instead of write)
sta reqcmd
;;lda #1 ; 1 = read into aux memory
sta auxreq
lsr ; read first $2000 bytes
sta sizelo
sta ldrlo
jsr hddopendir ; call ProRWTS2
lda #$20 ; read next $2000 bytes
sta sizehi
dec auxreq ; 0 = read into main memory
clc ; not a subdirectory
jmp hddrdwrpart ; call ProRWTS2
SaveSmallFileInternal SaveSmallFileInternal
+LDADDR gPathname +LDADDR gPathname
+ST16 namlo ; set filename for ProRWTS2 +ST16 namlo ; set filename for ProRWTS2

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 95671 !be24 108539
!le16 4186 !le16 4186

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 55279 !be24 61954
!le16 5174 !le16 5174

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 6152 !be24 7472
!le16 3580 !le16 3580

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 16468 !be24 19228
!le16 3940 !le16 3940

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 29225 !be24 33845
!le16 4615 !le16 4615

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 43585 !be24 50260
!le16 5562 !le16 5562

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 62599 !be24 69274
!le16 1242 !le16 1242

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 94329 !be24 107197
!le16 1249 !le16 1249

8
src/index/dtitle.idx.a Normal file
View File

@ -0,0 +1,8 @@
;
; Index record for build/DTITLE.IDX
;
; This file is automatically generated
;
!byte 0
!be24 93345
!le16 464

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 60453 !be24 67128
!le16 2146 !le16 2146

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 63841 !be24 70516
!le16 6132 !le16 6132

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 95578 !be24 108446
!le16 93 !le16 93

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 80941 !be24 93809
!le16 4364 !le16 4364

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 85305 !be24 98173
!le16 1516 !le16 1516

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 86821 !be24 99689
!le16 1031 !le16 1031

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 87852 !be24 100720
!le16 3237 !le16 3237

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 91089 !be24 103957
!le16 2694 !le16 2694

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 93783 !be24 106651
!le16 441 !le16 441

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 94224 !be24 107092
!le16 105 !le16 105

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 74809 !be24 81484
!le16 6132 !le16 6132

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 49147 !be24 55822
!le16 6132 !le16 6132

View File

@ -5,4 +5,4 @@
; ;
!byte 0 !byte 0
!be24 0 !be24 0
!le16 6152 !le16 7472

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 9732 !be24 11052
!le16 6736 !le16 8176

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 20408 !be24 23168
!le16 8817 !le16 10677

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 33840 !be24 38460
!le16 9745 !le16 11800

View File

@ -4,5 +4,5 @@
; This file is automatically generated ; This file is automatically generated
; ;
!byte 0 !byte 0
!be24 69973 !be24 76648
!le16 4836 !le16 4836

8
src/index/title.idx.a Normal file
View File

@ -0,0 +1,8 @@
;
; Index record for build/TITLE.IDX
;
; This file is automatically generated
;
!byte 0
!be24 87616
!le16 5729

View File

@ -84,6 +84,12 @@ kDFXIndexRecord
kGameHelpIndexRecord kGameHelpIndexRecord
!source "src/index/gamehelp.idx.a" !source "src/index/gamehelp.idx.a"
kHGRTitleIndexRecord
!source "src/index/title.idx.a"
kDHGRTitleIndexRecord
!source "src/index/dtitle.idx.a"
kSHRArtworkIndexRecord kSHRArtworkIndexRecord
!source "src/index/artwork.idx.a" !source "src/index/artwork.idx.a"
@ -132,14 +138,6 @@ kTotalIndexFile
!byte 9 !byte 9
!raw "TOTAL.IDX" !raw "TOTAL.IDX"
kHGRTitleDirectory
!byte 10
!raw "TITLE.HGR/"
kDHGRTitleDirectory
!byte 11
!raw "TITLE.DHGR/"
kAnimatedTitleDirectory kAnimatedTitleDirectory
!byte 15 !byte 15
!raw "TITLE.ANIMATED/" !raw "TITLE.ANIMATED/"

View File

@ -27,7 +27,7 @@
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
DHGRTitleSlideshow DHGRTitleSlideshow
bit MachineStatus ; only run DHGR slideshow if we have 128K bit MachineStatus ; only run DHGR slideshow if we have 128K
bvc DHGRRTS bvc DHGRRTS0
jsr LoadDHGRTransition ; load transition effect code at $6000 jsr LoadDHGRTransition ; load transition effect code at $6000
jsr BlankDHGR ; switch to DHGR mode with initial blank screen jsr BlankDHGR ; switch to DHGR mode with initial blank screen
jsr okvs_iter ; cycle through all listed DHGR files jsr okvs_iter ; cycle through all listed DHGR files
@ -48,7 +48,7 @@ DHGRTitleSlideshow
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
DHGRActionSlideshow DHGRActionSlideshow
bit MachineStatus ; only run DHGR slideshow if we have 128K bit MachineStatus ; only run DHGR slideshow if we have 128K
bvc DHGRRTS bvc DHGRRTS0
jsr LoadDHGRTransition ; load transition effect code at $6000 jsr LoadDHGRTransition ; load transition effect code at $6000
jsr BlankDHGR ; switch to DHGR mode with initial blank screen jsr BlankDHGR ; switch to DHGR mode with initial blank screen
jsr okvs_iter ; cycle through all listed DHGR files jsr okvs_iter ; cycle through all listed DHGR files
@ -69,7 +69,7 @@ DHGRActionSlideshow
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
DHGRSingle DHGRSingle
bit MachineStatus ; only show DHGR screenshots if we have 128K bit MachineStatus ; only show DHGR screenshots if we have 128K
bvc DHGRRTS bvc DHGRRTS0
+ST16 IndexedDHGRFilename +ST16 IndexedDHGRFilename
jsr BlankDHGR ; switch to DHGR mode with initial blank screen jsr BlankDHGR ; switch to DHGR mode with initial blank screen
jsr LoadIndexedDHGRFile ; load compressed DHGR screenshot at aux $3FF8 jsr LoadIndexedDHGRFile ; load compressed DHGR screenshot at aux $3FF8
@ -106,7 +106,7 @@ HGRMode
GRMode GRMode
bit $C052 bit $C052
bit $C050 bit $C050
DHGRRTS rts DHGRRTS0 rts
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; ForceHGRMode ; ForceHGRMode
@ -156,7 +156,7 @@ LoadDHGRTransition
!word $6000 !word $6000
@indexRecordPtr @indexRecordPtr
!word $FDFD ; SMC !word $FDFD ; SMC
rts DHGRRTS1 rts
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; DHGRTitleCallback [private] ; DHGRTitleCallback [private]
@ -172,7 +172,7 @@ LoadDHGRTransition
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
DHGRTitleCallback DHGRTitleCallback
bit KBD bit KBD
bmi DHGRRTS bmi DHGRRTS1
+ST16 + +ST16 +
+ST16 gLastMegaAttractGame +ST16 gLastMegaAttractGame
@ -181,16 +181,27 @@ DHGRTitleCallback
; if game is not found (C will be set here), it means it can't be played on ; if game is not found (C will be set here), it means it can't be played on
; this machine due to memory or joystick requirements, so we don't display ; this machine due to memory or joystick requirements, so we don't display
; it in slideshows ; it in slideshows
bcs DHGRRTS bcs DHGRRTS1
+LD16 WINDEX ; save game index in case user hits RETURN +LD16 WINDEX ; save game index in case user hits RETURN
+ST16 gGameToLaunch ; while it's visible (we'll launch it) +ST16 gGameToLaunch ; while it's visible (we'll launch it)
; load DHGR screenshot at $4000/main and $4000/aux jsr LoadIndexedFile ; load index file into $4000
jsr LoadDHRFile !word kTotalIndexFile
!word kDHGRTitleDirectory - !word $4000
+ !word $FDFD !word kDHGRTitleIndexRecord
jsr okvs_get
!word -
+ !word $FDFD ; SMC
jsr SwitchToBank2
ldy #4
- lda (PTR), y
sta OKVS_CACHE + 1, y
dey
bpl -
jsr LoadIndexedDHRFile
jmp ExecuteTransitionAt6000AndWait jmp ExecuteTransitionAt6000AndWait
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
@ -207,7 +218,7 @@ DHGRTitleCallback
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
DHGRActionCallback DHGRActionCallback
bit KBD bit KBD
bmi DHGRRTS bmi DHGRRTS1
+ST16 IndexedDHGRFilename +ST16 IndexedDHGRFilename
@ -215,7 +226,7 @@ DHGRActionCallback
; if game name is not found (C will be set here), it means the game ; if game name is not found (C will be set here), it means the game
; can't be played due to memory or joystick requirements, so we hide ; can't be played due to memory or joystick requirements, so we hide
; it from slideshows ; it from slideshows
bcs DHGRRTS bcs DHGRRTS1
jsr LoadIndexedDHGRFile jsr LoadIndexedDHGRFile
jsr DecompressDHGR jsr DecompressDHGR

View File

@ -104,7 +104,7 @@ HGRTitleCallback
bit KBD bit KBD
bmi HGRRTS bmi HGRRTS
+ST16 + +ST16 @fname
+ST16 gLastMegaAttractGame +ST16 gLastMegaAttractGame
jsr FindGame jsr FindGame
@ -116,10 +116,21 @@ HGRTitleCallback
+LD16 WINDEX ; save game index in case user hits RETURN +LD16 WINDEX ; save game index in case user hits RETURN
+ST16 gGameToLaunch ; while it's visible (we'll launch it) +ST16 gGameToLaunch ; while it's visible (we'll launch it)
jsr LoadFile ; load HGR screenshot at $4000 jsr LoadIndexedFile ; load index file into $4000
!word kHGRTitleDirectory !word kTotalIndexFile
+ !word $FDFD ; SMC - !word $4000
!word kHGRTitleIndexRecord
jsr okvs_find
!word -
@fname !word $FDFD ; SMC
+ST16 @indexRecordPtr
jsr LoadIndexedFile ; load HGR graphic at $4000
!word kTotalDataFile
!word $4000 !word $4000
@indexRecordPtr
!word $FDFD ; SMC
jsr UnpackHGRTitle jsr UnpackHGRTitle
jmp ExecuteTransitionAt6000AndWait jmp ExecuteTransitionAt6000AndWait

View File

@ -68,6 +68,8 @@ BlankDHGR
sta WRITEAUXMEM sta WRITEAUXMEM
jsr ClearHGR1 ; clear hi-res screen 1 in auxmem jsr ClearHGR1 ; clear hi-res screen 1 in auxmem
sta WRITEMAINMEM sta WRITEMAINMEM
lda #1
sta OffscreenPage
; /!\ execution falls through here to DHGRMode ; /!\ execution falls through here to DHGRMode
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
@ -92,9 +94,9 @@ DHGRMode
sta DHIRESOFF sta DHIRESOFF
sta DHIRESON ; then turn DHGR on sta DHIRESON ; then turn DHGR on
bit PAGE1 jsr ToggleOffscreenPage
jsr ShowOtherPage
lda #1 lda #1
sta OffscreenPage
sta gMachineInDHGRMode sta gMachineInDHGRMode
jsr UnwaitForVBL jsr UnwaitForVBL
jmp HGRMode jmp HGRMode

View File

@ -8,8 +8,10 @@
; - LoadCoverOffscreen ; - LoadCoverOffscreen
; - LoadHelpOffscreen ; - LoadHelpOffscreen
; - LoadGameTitleOffscreen ; - LoadGameTitleOffscreen
; - UnpackHGRTitle
; - ResyncPage ; - ResyncPage
; - ShowOtherPage ; - ShowOtherPage
; - ShowOtherDHGRPage
; - ToggleOffscreenPage ; - ToggleOffscreenPage
; - ClearScreens ; - ClearScreens
; - ClearOffscreen ; - ClearOffscreen
@ -85,45 +87,107 @@ LoadOffscreenFromAY
LoadGameTitleOffscreen LoadGameTitleOffscreen
; in: gGameToLaunch = index into gSearchStore (word) ; in: gGameToLaunch = index into gSearchStore (word)
jsr GetGameToLaunch jsr GetGameToLaunch
+ST16 @fname
bit MachineStatus ; if < 128K, don't bother checking for DHGR title
bvc @hgr
jsr okvs_next_field jsr okvs_next_field
jsr okvs_next_field_PTR_is_already_set jsr okvs_next_field_PTR_is_already_set
; (PTR) -> length-prefixed game info bitfield ; (PTR) -> length-prefixed game info bitfield
; Y = 0 ; Y = 0
iny ; Y = 1 iny ; Y = 1
lda (PTR), y ; A = game info bitfield lda (PTR), y ; A = game info bitfield
;;and #HAS_DHGR_TITLE bpl .LoadHGRGameTitleOffscreen ; bit 7 = 1 if game has DHGR title, 0 if HGR title
bmi @dhgr
@hgr jsr SwitchToBank2
- iny
lda (PTR), y
sta OKVS_CACHE-1, y
cpy #6
bne -
LoadIndexedDHRFile
jsr SwitchToBank2
lda #0
sta OKVS_CACHE
lda #$20 ; load first $2000 bytes into auxiliary memory
sta OKVS_CACHE + 5
jsr GetOffscreenAddress
sta @dhgr_addr_aux + 1
sta @dhgr_addr_main + 1
jsr LoadAuxIndexedFile
!word kTotalDataFile
@dhgr_addr_aux
!word $FD00 ; SMC high byte
!word OKVS_CACHE
jsr SwitchToBank2
lda OKVS_CACHE + 2 ; offset += $2000 (note: stored in big-endian)
clc
adc #$20
sta OKVS_CACHE + 2
bcc +
inc OKVS_CACHE + 1
+ jsr LoadIndexedFile ; load next $2000 bytes into main memory
!word kTotalDataFile
@dhgr_addr_main
!word $FD00 ; SMC high byte
!word OKVS_CACHE
rts
.LoadHGRGameTitleOffscreen
jsr ForceHGRMode jsr ForceHGRMode
jsr GetOffscreenAddress jsr GetOffscreenAddress
sta @addrhi sta @hgr_addr + 1
eor #$1F eor #$1F
sta @poke+2 sta @poke+2
sta @peek+2 sta @peek+2
@poke sta $3FFD ; SMC - clear screen hole before load @poke sta $3FFD ; SMC high byte to clear screen hole before load
+LD16 PTR
jsr LoadFile +ST16 @hgrIndexRecordPtr
!word kHGRTitleDirectory jsr LoadIndexedFile
@fname !word $FDFD ; SMC !word kTotalDataFile
!byte $00 @hgr_addr
@addrhi !byte $FD ; SMC !word $FD00 ; SMC high byte
@hgrIndexRecordPtr
@peek lda $3FFD ; SMC !word $FDFD ; SMC
@peek lda $3FFD ; SMC high byte
cmp #$4C ; Check if screen hole now contains a JMP cmp #$4C ; Check if screen hole now contains a JMP
beq OFFSCREENRTS ; if so, file was not packed, so skip unpack beq OFFSCREENRTS ; if so, file was not packed, so skip unpack
jmp UnpackHGRTitle ; /!\ execution falls through here to UnpackHGRTitle
;------------------------------------------------------------------------------
@dhgr ; UnpackHGRTitle
jsr BlankDHGR ; unpack data from screen holes of the off screen HGR page
+LD16 @fname ;
+ST16 + ;------------------------------------------------------------------------------
jsr LoadDHRFile UnpackHGRTitle
!word kDHGRTitleDirectory jsr GetOffscreenAddress
+ !word $FDFD sta src+2
ora #$1E
sta dest+2
lda #$00
sta src+1
sta dest+1
lda #3
sta $E0
loop
ldx #0
-- ldy #$78
src
- lda $0000,y ;smc
dest
sta $0000,x ;smc
inx
iny
bpl -
tya ; y = #$80
eor src+1
sta src+1
bne +
inc src+2
+ cpx #$78
bne --
lda dest+1
eor #$80
sta dest+1
bne +
inc dest+2
+ dec $E0
bpl loop
OFFSCREENRTS OFFSCREENRTS
rts rts
@ -209,6 +273,10 @@ ShowOtherPage
+ bit PAGE1 ; show page 1 + bit PAGE1 ; show page 1
rts rts
ShowOtherDHGRPage
jsr ToggleOffscreenPage
jmp DHGRMode
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; ToggleOffscreenPage ; ToggleOffscreenPage
; switch the internal variable that tracks which HGR page is showing ; switch the internal variable that tracks which HGR page is showing
@ -223,52 +291,3 @@ ToggleOffscreenPage
eor #$01 eor #$01
sta OffscreenPage sta OffscreenPage
rts rts
;------------------------------------------------------------------------------
; UnpackHGRTitle
; unpack data from screen holes of the off screen HGR page
;
;------------------------------------------------------------------------------
UnpackHGRTitle
jsr GetOffscreenAddress
sta src+2
ora #$1E
sta dest+2
lda #$00
sta src+1
sta dest+1
lda #3
sta $E0
loop
ldx #0
-- ldy #$78
src
- lda $0000,y ;smc
dest
sta $0000,x ;smc
inx
iny
bpl -
tya ; y = #$80
eor src+1
sta src+1
bne +
inc src+2
+ cpx #$78
bne --
lda dest+1
eor #$80
sta dest+1
bne +
inc dest+2
+ dec $E0
bpl loop
rts

View File

@ -261,8 +261,12 @@ gDrawingOnscreen=*+1
jsr MaybeRedrawUIForDHGR ; transform for DHGR if this is a DHGR title screen jsr MaybeRedrawUIForDHGR ; transform for DHGR if this is a DHGR title screen
@uidone lda #0 @uidone lda #0
sta gDrawingOnscreen sta gDrawingOnscreen
clc bit MachineStatus
jmp ShowOtherPage bvc +
bit gGameToLaunchInfo
bpl +
jmp ShowOtherDHGRPage
+ jmp ShowOtherPage
CheckCheats CheckCheats
ldx #kCheatsEnabled ldx #kCheatsEnabled
@ -277,11 +281,12 @@ gGameToLaunchInfo=*+1
sta SAVE sta SAVE
lda kCheatDescriptionHi,x lda kCheatDescriptionHi,x
sta SAVE+1 sta SAVE+1
- rts OVERLAYRTS
rts
MaybeRedrawUIForDHGR MaybeRedrawUIForDHGR
bit MachineStatus bit MachineStatus
bvc - bvc OVERLAYRTS
bit gGameToLaunchInfo bit gGameToLaunchInfo
bpl - bpl OVERLAYRTS
jmp RedrawForDHGR jmp RedrawForDHGR