diff --git a/bin/buildfxful.bat b/bin/buildfxful.bat index 81334ca49..196ff7299 100644 --- a/bin/buildfxful.bat +++ b/bin/buildfxful.bat @@ -1,20 +1,15 @@ @echo off setlocal enabledelayedexpansion 1>nul copy /y nul %2 -set f=0 for /f "tokens=*" %%a in (%1) do ( -call :x %%a %2 +set f=0 +call :x %%a +if !f!==2 goto:eof +if !f!==0 1>nul copy /b /y %2+build\FX\%%a %2 ) goto:eof :x -call :check %1 -if !f!==2 goto:eof -if !f!==0 1>nul copy /b /y %2+build\FX\%1 %2 -) -goto:eof - -:check set a=%1 if not x%a:#=%==x%a% set/a f=1 if not x%a:[=%==x%a% set/a f=2 diff --git a/bin/buildpre.js b/bin/buildpre.js index 8e7c7538d..e15fda7cd 100644 --- a/bin/buildpre.js +++ b/bin/buildpre.js @@ -34,6 +34,7 @@ while (!b.atendofstream) } entries.sort() +a.createtextfile("build\\games.lst").write(entries.toString().replace(/,/g, "\n")) y = "build\\PRELAUNCH\\" pre_off = a.getfile(y + "STANDARD").size osize = pre_off diff --git a/bin/buildpreall.bat b/bin/buildpreall.bat index 3d7dd1582..f5dd209f9 100644 --- a/bin/buildpreall.bat +++ b/bin/buildpreall.bat @@ -1,4 +1,4 @@ @echo off -1>nul copy /y %1\STANDARD %2 -rem requires sorted file-system -for %%a in (%1\*) do if %%a neq STANDARD 1>nul copy /b /y %2+%%a %2 +setlocal enabledelayedexpansion +1>nul copy /y build\PRELAUNCH\STANDARD %1 +for /f "tokens=*" %%a in (build\games.lst) do 1>nul copy /b /y %1+build\PRELAUNCH\%%a %1 diff --git a/res/DEMO/ALIEN.DOWNPOUR b/res/DEMO/ALIEN.DOWNPOUR index e8f92b33a..a9fcf2a1a 100755 Binary files a/res/DEMO/ALIEN.DOWNPOUR and b/res/DEMO/ALIEN.DOWNPOUR differ diff --git a/res/DEMO/CHOPLIFTER b/res/DEMO/CHOPLIFTER index 13a16a30c..d53c9e96c 100755 Binary files a/res/DEMO/CHOPLIFTER and b/res/DEMO/CHOPLIFTER differ diff --git a/res/DEMO/NIGHT.STALKER b/res/DEMO/NIGHT.STALKER index 4c7435f1c..c77567304 100755 Binary files a/res/DEMO/NIGHT.STALKER and b/res/DEMO/NIGHT.STALKER differ diff --git a/res/DEMO/SNEAKERS b/res/DEMO/SNEAKERS index cfc899fb9..e7867f3c1 100644 Binary files a/res/DEMO/SNEAKERS and b/res/DEMO/SNEAKERS differ diff --git a/res/DEMO/SPACE.QUARKS b/res/DEMO/SPACE.QUARKS index 97c70f505..3d48f556a 100755 Binary files a/res/DEMO/SPACE.QUARKS and b/res/DEMO/SPACE.QUARKS differ diff --git a/res/DEMO/TB b/res/DEMO/TB index 88fb44eda..96660eb01 100755 Binary files a/res/DEMO/TB and b/res/DEMO/TB differ diff --git a/res/DEMO/WAVY.NAVY b/res/DEMO/WAVY.NAVY index 43166f65a..1c2dddbe4 100644 Binary files a/res/DEMO/WAVY.NAVY and b/res/DEMO/WAVY.NAVY differ diff --git a/src/4cade.init.a b/src/4cade.init.a index 5074abbee..aef386120 100644 --- a/src/4cade.init.a +++ b/src/4cade.init.a @@ -370,7 +370,8 @@ CopyDevs lda hddopendir+1 ; save current directory as 'root' ldy hddopendir+3 jsr SwitchToBank1 - +ST16 gRootDirectory + sta gRootDirectory+1 + sty gRootDirectory+3 jsr LoadFile ; load preferences file into $8000 !word kRootDirectory diff --git a/src/constants.a b/src/constants.a index 8a0f97b42..78c5d79a2 100644 --- a/src/constants.a +++ b/src/constants.a @@ -7,7 +7,7 @@ ; ; LC RAM BANK 1 ; D000..E789 - persistent data structures (gGlobalPrefsStore, gGamesListStore) -; E956..FFF1 - main program code +; E962..FFF1 - main program code ; FFF2..FFF9 - API functions and global constants available for main program ; code, prelaunchers, transition effects, &c. ; (Wait/UnwaitForVBL, MockingboardStuff, MachineStatus) @@ -16,8 +16,8 @@ ; LC RAM BANK 2 ; D000..D3FF - ProRWTS data ; D400..D66F - ProRWTS code -; D670..DB93 - HGR font code & ProRWTS glue code -; DB94..DBA3 - backup of stack (during gameplay and self-running demos) +; D670..DB91 - HGR font code & ProRWTS glue code +; DB92..DBA1 - backup of stack (during gameplay and self-running demos) ; ...unused... ; DBB4..DBFF - (de)acceleration function ; DC00..DFFF - HGR font data @@ -148,7 +148,7 @@ CHEATS_ENABLED = %00001000 iCurBlockLo = $D401 iCurBlockHi = $D403 iProDOS_enter = $D670 -LoadFileDirect = $DAF6 +LoadFileDirect = $DAF4 launchpatch = $D60E iAddToPath = $FE67 itraverse = $D8D8 diff --git a/src/glue.prorwts2.a b/src/glue.prorwts2.a index c0c1ab5c5..b40e90827 100644 --- a/src/glue.prorwts2.a +++ b/src/glue.prorwts2.a @@ -211,6 +211,3 @@ LoadIndexedFile @address !word $DFDF ; SMC @size !word $DFDF ; SMC !word $ffff - -gRootDirectory - !word $FDFD diff --git a/src/macros.a b/src/macros.a index 85fe3c683..7e3541e28 100755 --- a/src/macros.a +++ b/src/macros.a @@ -69,12 +69,6 @@ ldy .ptr+1 } -; load a 16-bit immediate value into A (low) and Y (high) -!macro LDI16 .ptr { - lda #<.ptr - ldy #>.ptr+1 -} - ; store a 16-bit value from A (low) and Y (high) !macro ST16 .ptr { sta .ptr diff --git a/src/parse.prefs.a b/src/parse.prefs.a index 7e73ecc37..e24573fd8 100644 --- a/src/parse.prefs.a +++ b/src/parse.prefs.a @@ -217,7 +217,7 @@ pref_set +LDADDR kGlobalPrefsFilename ; write prefs buffer to file on disk jsr SetPath - +LD16 kGlobalPrefsBuffer +;; +LDADDR kGlobalPrefsBuffer ; /!\ execution falls through here to glue.prorwts/SaveSmallFile ;------------------------------------------------------------------------------ ; SaveSmallFile @@ -233,7 +233,7 @@ pref_set ; all registers clobbered ;------------------------------------------------------------------------------ SaveSmallFile - +ST16 ldrlo ; set data buffer address for ProRWTS2 +;; +ST16 ldrlo ; set data buffer address for ProRWTS2 jsr SwitchToBank2 jsr SaveSmallFileInternal jmp SwitchToBank1 diff --git a/src/prodos.impl.lc2.a b/src/prodos.impl.lc2.a index 5237fcd91..3cd60173d 100644 --- a/src/prodos.impl.lc2.a +++ b/src/prodos.impl.lc2.a @@ -405,7 +405,8 @@ resetval=$f0 } } traverse - +LD16 gRootDirectory +gRootDirectory + +LDADDR 0 ; SMC sta (reloc + unrhddblocklo - unrelochdd) + 1 sty (reloc + unrhddblockhi - unrelochdd) + 1 sta @myreadblock+1 diff --git a/src/ui.attract.mode.a b/src/ui.attract.mode.a index 6450c577b..df3e897af 100644 --- a/src/ui.attract.mode.a +++ b/src/ui.attract.mode.a @@ -100,7 +100,7 @@ MiniAttractMode beq ATTRTS ; we've run through all modules, so exit to caller + @MiniAttractIndex - +LDI16 0 ; SMC + +LDADDR 0 ; SMC +ST16 WINDEX +LDADDR - jsr okvs_nth ; get the next module on the list diff --git a/winmake.bat b/winmake.bat index 5b3c4bb20..5372161c8 100644 --- a/winmake.bat +++ b/winmake.bat @@ -49,8 +49,8 @@ call :compress cscript /nologo bin\rsync.js "res\PREFS.CONF" "build\" >>build\log cscript /nologo bin\padto.js 512 build\PREFS.CONF cscript /nologo bin\buildokvs.js "res\ATTRACT.CONF" "build\ATTRACT.IDX" >>build\log -call bin\buildfxful.bat res\FX.CONF "build\FX.ALL" >>build\log -call bin\buildfxful.bat res\DFX.CONF "build\DFX.ALL" >>build\log +call bin\buildfxful.bat res\FX.CONF build\FX.ALL >>build\log +call bin\buildfxful.bat res\DFX.CONF build\DFX.ALL >>build\log cscript /nologo bin\buildfx.js "res\FX.CONF" "build\fx.inc" "build\FX.IDX" >>build\log cscript /nologo bin\buildfx.js "res\DFX.CONF" "build\dfx.inc" "build\DFX.IDX" >>build\log cscript /nologo bin\buildhelp.js "build\GAMEHELP.ALL" "build\help.inc" "build\GAMEHELP.IDX" >>build\log @@ -60,8 +60,8 @@ cscript /nologo bin\buildss.js "build\SS" "build\ss.inc" "build\SLIDESHOW.IDX" > for %%q in (res\ATTRACT\*) do cscript /nologo bin\buildokvs.js "%%q" "build\ATTRACT\%%~nxq" >>build\log call bin\buildssall.bat build\ATTRACT build\MINIATTRACT.ALL>>build\log cscript /nologo bin\buildss.js "build\ATTRACT" "build\attract.inc" "build\MINIATTRACT.IDX" >>build\log -call bin\buildpreall.bat build\PRELAUNCH build\PRELAUNCH.ALL>>build\log cscript /nologo bin\buildpre.js "build\PRELAUNCH" "build\prelaunch.inc" "build\PRELAUNCH.IDX" >>build\log +call bin\buildpreall.bat build\PRELAUNCH.ALL>>build\log %CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\TITLE" >>build\log %CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\COVER" >>build\log %CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\HELP" >>build\log @@ -109,12 +109,14 @@ for %%q in (res\dsk\*.po) do %CADIUS% EXTRACTVOLUME "%%q" build\X\ >>build\log 1>nul 2>nul del /s build\X\.DS_Store build\X\PRODOS build\X\LOADER.SYSTEM %CADIUS% CREATEFOLDER "build\%DISK%" "/%VOLUME%/X/" >>build\log %CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/X" "build\X" >>build\log +%CADIUS% CREATEFOLDER "build\%DISK%" "/%VOLUME%/PRELAUNCH/" >>build\log +for %%q in (build\PRELAUNCH\*.MB) do %CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/PRELAUNCH" "%%q" >>build\log cscript /nologo bin\changebootloader.js "build\%DISK%" build\proboothd goto :EOF ) if "%1" equ "demo" ( -for %%q in (src\demo\*) do %acme% %1 +for %%q in (src\demo\*) do %acme% %%q goto :EOF )