shave some blocks

This commit is contained in:
4am 2024-05-03 23:58:02 -04:00
parent 43eeccd54d
commit d2d45bf0b4
2 changed files with 11 additions and 42 deletions

View File

@ -63,10 +63,7 @@ dsk: index asmproboot asmlauncher extract
rm -f "$$f"/.DS_Store; \
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/$$(basename $$f)" "$$f" -C >>build/log; \
done
$(CADIUS) CREATEFOLDER build/"$(DISK)" "/$(VOLUME)/X/" -C >>build/log
for f in build/X/*; do \
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/X/$$(basename $$f)" "$$f" -C >>build/log; \
done
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/X" "build/X" -C >>build/log; \
bin/changebootloader.sh build/"$(DISK)" build/proboothd
gamesconf: preconditions md
@ -81,8 +78,14 @@ gamesconf: preconditions md
extract: preconditions md gamesconf
$(PARALLEL) '$(CADIUS) EXTRACTVOLUME {} build/X/ >>build/log' ::: res/dsk/*.po
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* build/X/**/_FileInformation.txt
for f in $$(grep '^....1' build/GAMES.CONF | awk '!/^$$|^#/' | awk -F, '/,/ { print $$2 }' | awk -F= '{ print $$1 }'); do mv build/X/"$$(basename $$f)"/"$$(basename $$f)"* build/X.INDEXED/; rm -rf build/X/"$$(basename $$f)"; done
for d in build/X/*; do \
for f in "$$d"/*; do \
mv -i "$$f" build/X/"$$(basename $$f)"; \
done; \
rmdir "$$d"; \
done
(for f in build/X.INDEXED/*; do echo "$$(basename $$f)"; done) | bin/buildindexedfile.sh -a -p build/TOTAL.DATA build/X.INDEXED > build/XSINGLE.IDX
index: preconditions md asmfx asmprelaunch asmdemo compress extract

View File

@ -158,49 +158,15 @@ PlayGameInAY
jmp Launch
@loadFromSubdirectory
; we start by placing the subdirectory name at gPathname+kGameDirectoryLen
; to leave room for the GameDirectory name as the parent
lda #kGameDirectoryLen
sta gPathname
+LD16 SAVE
jsr AddToPath
+ST16 @p
; attach the separator
inc gPathname
lda #'/'
sta gPathname+1,x
; then we save the length of the resulting string without the count byte
dex
txa
pha
; then attach the game name
+LD16 SAVE
jsr AddToPath
; don't look while I do this
; we "place" a string at gPathname+kGameDirectoryLen
; whose length is the subdirectory name and game name
; then we load it
; the load sets the path to the GameDirectory
; and then finds the subdirectory name and game name right after it
; and attaches it to the path by overwriting the count byte
;;sec ; carry set by AddToPath
lda gPathname
sbc #kGameDirectoryLen
sta gPathname+kGameDirectoryLen
jsr LoadFile ; load the game startup file
!word kGameDirectory
!word gPathname+kGameDirectoryLen
@p !word $FDFD
!word 0 ; use file's default address
pla
lda #1
sta ProDOS_prefix ; set 'root' directory to the path part
; of the game startup file we just loaded
; so games can load other files without