From 8e8945c8a0b89103063f57b7c33b98384ae98054 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Wed, 13 Oct 2021 22:43:50 -0700 Subject: [PATCH] fix Windows build --- bin/buildfxful.bat | 13 ++++--------- bin/buildpre.js | 1 + bin/buildpreall.bat | 6 +++--- res/DEMO/ALIEN.DOWNPOUR | Bin 191 -> 191 bytes res/DEMO/CHOPLIFTER | Bin 155 -> 155 bytes res/DEMO/NIGHT.STALKER | Bin 333 -> 333 bytes res/DEMO/SNEAKERS | Bin 156 -> 156 bytes res/DEMO/SPACE.QUARKS | Bin 218 -> 218 bytes res/DEMO/TB | Bin 199 -> 199 bytes res/DEMO/WAVY.NAVY | Bin 157 -> 157 bytes src/4cade.init.a | 3 ++- src/constants.a | 8 ++++---- src/glue.prorwts2.a | 3 --- src/macros.a | 6 ------ src/parse.prefs.a | 4 ++-- src/prodos.impl.lc2.a | 3 ++- src/ui.attract.mode.a | 2 +- winmake.bat | 10 ++++++---- 18 files changed, 25 insertions(+), 34 deletions(-) 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 e8f92b33aa0b4003da1d3916c7093578e351d0db..a9fcf2a1ae73ccfe121d2098ee4eea395ed5dea0 100755 GIT binary patch delta 11 ScmdnbxSw%?FXNYqeuV%VTm+*4 delta 11 ScmdnbxSw%?FXOj~euV%VWCW!E diff --git a/res/DEMO/CHOPLIFTER b/res/DEMO/CHOPLIFTER index 13a16a30c2f4416dd9e5eabbba90f92cd5eecf32..d53c9e96c6b6f229e164d89d308184d47b083cc5 100755 GIT binary patch delta 11 ScmbQuIGb^TFXNYqe!c)0XaqL^ delta 11 ScmbQuIGb^TFXOj~e!c)0a0EF3 diff --git a/res/DEMO/NIGHT.STALKER b/res/DEMO/NIGHT.STALKER index 4c7435f1c0b214e30c78283d3b18bb68ced4dbe3..c775673046bbd937e8d144fdd6a1f2965a1a8069 100755 GIT binary patch delta 11 ScmX@hbe3s?FXNYqe*Xa-6a`NJ delta 11 ScmX@hbe3s?FXOj~e*Xa-90gGT diff --git a/res/DEMO/SNEAKERS b/res/DEMO/SNEAKERS index cfc899fb9e5e0155250bbb71bd5703764ec2b9a1..e7867f3c12b69015efacd8a06184c8a2db6462fc 100644 GIT binary patch delta 11 ScmbQkIEQh9FXNYqetrNLeFQoH delta 11 ScmbQkIEQh9FXOj~etrNLg#
.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 )