From ebe77f26f49e59842d92a5da831ab2e153a554ee Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Fri, 15 Oct 2021 13:00:40 -0700 Subject: [PATCH] add vector to reduce demo rebuild --- bin/buildfx.js | 2 +- bin/buildokvs.js | 3 +-- bin/buildpre.js | 2 +- bin/buildss.js | 2 +- 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.a | 3 +++ src/constants.a | 19 +++++++++---------- src/glue.prorwts2.lc2.a | 9 +-------- src/macros.a | 2 +- src/prelaunch/bejeweled.a | 8 ++++++-- src/prodos.impl.lc2.a | 10 +--------- src/prodos.path.a | 2 +- 18 files changed, 26 insertions(+), 36 deletions(-) diff --git a/bin/buildfx.js b/bin/buildfx.js index 3c26d19a4..cdae99f81 100644 --- a/bin/buildfx.js +++ b/bin/buildfx.js @@ -49,4 +49,4 @@ for (i = 0; i < entries.length; i++) f = a.createtextfile(WScript.Arguments(1)) f.write(groups) f.close() -new ActiveXObject("wscript.shell").run('cmd /c %acme% -o ' + WScript.Arguments(2) + " " + WScript.Arguments(1)) +new ActiveXObject("wscript.shell").run('cmd /c %acme% -o ' + WScript.Arguments(2) + " " + WScript.Arguments(1), 0, 1) diff --git a/bin/buildokvs.js b/bin/buildokvs.js index da5d9144d..a6abbd735 100644 --- a/bin/buildokvs.js +++ b/bin/buildokvs.js @@ -41,6 +41,5 @@ if (!a.fileexists(WScript.Arguments(1)) || a.getfile(WScript.Arguments(1)).datel source.writeline("!text \"" + ((val >= 0) ? (entries[i].substr(val + 1)) : "") + "\"") } - x = new ActiveXObject("wscript.shell") - x.run('cmd /c %acme% -o ' + WScript.Arguments(1) + ' build\\okvs.tmp') + new ActiveXObject("wscript.shell").run('cmd /c %acme% -o ' + WScript.Arguments(1) + ' build\\okvs.tmp', 0, 1) } diff --git a/bin/buildpre.js b/bin/buildpre.js index bf6f8b3b3..15fc9ab6d 100644 --- a/bin/buildpre.js +++ b/bin/buildpre.js @@ -58,4 +58,4 @@ for (i = 0; i < entries.length; i++) f = a.createtextfile(WScript.Arguments(1)) f.write(groups) f.close() -new ActiveXObject("wscript.shell").run('cmd /c %acme% -o ' + WScript.Arguments(2) + " " + WScript.Arguments(1)) +new ActiveXObject("wscript.shell").run('cmd /c %acme% -o ' + WScript.Arguments(2) + " " + WScript.Arguments(1), 0, 1) diff --git a/bin/buildss.js b/bin/buildss.js index da7d24697..b154448bd 100644 --- a/bin/buildss.js +++ b/bin/buildss.js @@ -25,4 +25,4 @@ for (i = 0; i < entries.length; i++) f = a.createtextfile(WScript.Arguments(1)) f.write(groups) f.close() -new ActiveXObject("wscript.shell").run('cmd /c %acme% -o ' + WScript.Arguments(2) + " " + WScript.Arguments(1)) +new ActiveXObject("wscript.shell").run('cmd /c %acme% -o ' + WScript.Arguments(2) + " " + WScript.Arguments(1), 0, 1) diff --git a/res/DEMO/ALIEN.DOWNPOUR b/res/DEMO/ALIEN.DOWNPOUR index aa738f14a2605cf1a735db2a29b7618edbf9859f..6540c5ba36e68e7749242058dcddc6f53c5ea891 100755 GIT binary patch delta 12 TcmdnbxSw%?FVp+~6a5PSBAErA delta 12 TcmdnbxSw%?FVmG<6a5PSA$|p3 diff --git a/res/DEMO/CHOPLIFTER b/res/DEMO/CHOPLIFTER index 947b1ae499721ec1d2a414f0928d8e057f8c8356..7583c4c1cad9ac2e2fad9c76bc67880cdc5400f5 100755 GIT binary patch delta 12 TcmbQuIGb^TFVp+~6a9SvA6*49 delta 12 TcmbQuIGb^TFVmG<6a9Sv9zq22 diff --git a/res/DEMO/NIGHT.STALKER b/res/DEMO/NIGHT.STALKER index 6cff564eb335bbd03150458e90833ce0ccb1ed62..61f46a6d8f8f5e74d4d4246d0d1ebcb86fba3e4b 100755 GIT binary patch delta 12 UcmX@hbe3s?FVp+~6aD`I03>e)N&o-= delta 12 UcmX@hbe3s?FVmG<6aD`I03%ce3IG5A diff --git a/res/DEMO/SNEAKERS b/res/DEMO/SNEAKERS index ed2accca5937762bd1f3227efe4e372f3e407aec..cbf547f22bccbed2719b7f5d240273454e52bd78 100644 GIT binary patch delta 12 TcmbQkIEQh9FVp+~6a9SwA9MvZ delta 12 TcmbQkIEQh9FVmG<6a9Sw9$5tS diff --git a/res/DEMO/SPACE.QUARKS b/res/DEMO/SPACE.QUARKS index 100e894612e6156c8e99cba0814505d77cd3f496..3f1785d4c9906dce3a3ef4afd3bd9752ac81eaa4 100755 GIT binary patch delta 12 Tcmcb`c#Cm@FVp+~6aBjZB?blW delta 12 Tcmcb`c#Cm@FVmG<6aBjZBkKjP diff --git a/res/DEMO/TB b/res/DEMO/TB index 7fe81c9b79f86cace971d1dee806e501c66e745f..9610bae468503308e71a2fda4ff6f3cabfdced1b 100755 GIT binary patch delta 12 TcmX@kc${&9FVp+~6a6ayBT)sm delta 12 TcmX@kc${&9FVmG<6a6ayA~pqf diff --git a/res/DEMO/WAVY.NAVY b/res/DEMO/WAVY.NAVY index d410a784db714f7e2daa632c9c7ac94d85bb0ded..d47eb5b9e07d3c58e67f9ea48dca51820cbd2978 100644 GIT binary patch delta 12 TcmbQsIG1rkAk+K*6N9|~AFBmC delta 12 TcmbQsIG1rkAk&pw6N9|~9*_k5 diff --git a/src/4cade.a b/src/4cade.a index 3db110c85..28c114a2f 100644 --- a/src/4cade.a +++ b/src/4cade.a @@ -137,6 +137,9 @@ SwitchToBank2 rts !source "src/prodos.path.a" ; paths end up on the same page +; iLoadFileDirect (label is in constants.a) + jmp LoadFileDirect ; no direct calling - target can move + ; WaitForVBL (label is in constants.a) jmp WaitForVBL_iie ; SMC to RTS on a II+ diff --git a/src/constants.a b/src/constants.a index c10cd8f5f..0be7aad73 100644 --- a/src/constants.a +++ b/src/constants.a @@ -115,6 +115,7 @@ gValLen = $1F80 gVal = $1F81 ; LC RAM 1 +iLoadFileDirect = $FFEF WaitForVBL = $FFF2 UnwaitForVBL = $FFF5 @@ -145,16 +146,14 @@ SUPPORTS_SHR = %00110000 CHEATS_ENABLED = %00001000 ; shared symbols for prelaunch and effects to call ProRWTS2 functions -iCurBlockLo = $D401 -iCurBlockHi = $D403 -iProDOS_enter = $D670 -LoadFileDirect = $DAD4 -launchpatch = $D60E -iAddToPath = $FE67 -itraverse = $D8D8 -ldrhi = $56 -namlo = $57 -namhi = $58 +iCurBlockLo = $D401 ; constant +iCurBlockHi = $D403 ; constant +launchpatch = $D60E ; glue.launch.a +iAddToPath = $FE64 ; Roger Rabbit, avoid, use Infiltrator 2 style instead +itraverse = $D8D8 ; Roger Rabbit, avoid, use Infiltrator 2 style instead +ldrhi = $56 ; constant +namlo = $57 ; constant +namhi = $58 ; constant _CONSTANTS_=* } diff --git a/src/glue.prorwts2.lc2.a b/src/glue.prorwts2.lc2.a index 843f1e57e..c0a89d56d 100644 --- a/src/glue.prorwts2.lc2.a +++ b/src/glue.prorwts2.lc2.a @@ -11,14 +11,7 @@ LoadFileInternal ldx #0 ; 0 = read into main memory LoadFileAuxInternal +LDADDR gPathname -!if RELBASE != $2000 { - !ifdef PASS2 { - } else { ;PASS2 - !if * != LoadFileDirect { - !error "LoadFileDirect=",*, ", fix constants.a, rebuild all src/demo and src/prelaunch" - } - } -} +LoadFileDirect +ST16 namlo ; set filename txa pha diff --git a/src/macros.a b/src/macros.a index 41de6db18..e248259a5 100755 --- a/src/macros.a +++ b/src/macros.a @@ -398,7 +398,7 @@ pha ldx #0 ; read to main memory +LDADDR .filepath - jsr LoadFileDirect + jsr iLoadFileDirect pla sta iCurBlockHi pla diff --git a/src/prelaunch/bejeweled.a b/src/prelaunch/bejeweled.a index 2d14df1df..a5fcef92c 100644 --- a/src/prelaunch/bejeweled.a +++ b/src/prelaunch/bejeweled.a @@ -1,5 +1,5 @@ ;license:MIT -;(c) 2020 by qkumba +;(c) 2020-2021 by qkumba !cpu 6502 !to "build/PRELAUNCH/BEJEWELED",plain @@ -28,7 +28,7 @@ helper dec $8DB5 ; write address (low) nohelp - jmp iProDOS_enter + jmp $FDFD ; SMC nocall plp @@ -39,6 +39,10 @@ nocall callback jsr $BE00 + lda $BF0B + sta nohelp + 1 + lda $BF0C + sta nohelp + 2 lda #helper diff --git a/src/prodos.impl.lc2.a b/src/prodos.impl.lc2.a index 3cd60173d..2848f0154 100644 --- a/src/prodos.impl.lc2.a +++ b/src/prodos.impl.lc2.a @@ -18,14 +18,6 @@ ipacket = first_zp ;word buffer = first_zp+2 ;word -!if RELBASE != $2000 { - !ifdef PASS2 { - } else { ;PASS2 - !if * != iProDOS_enter { - !error "iProDOS_enter=",*, ", fix constants.a" - } - } -} ProDOS_enter !set CloseHandles = @imp_close stx ProDOS_savedX+1 @@ -401,7 +393,7 @@ resetval=$f0 !ifdef PASS2 { } else { ;PASS2 !if * != itraverse { - !error "itraverse=",*, ", fix constants.a" + !error "itraverse=",*, ", fix constants.a, rebuild prelaunch" } } traverse diff --git a/src/prodos.path.a b/src/prodos.path.a index 4c8c954c3..d18b76562 100644 --- a/src/prodos.path.a +++ b/src/prodos.path.a @@ -28,7 +28,7 @@ kRootDirectory=*+1 !ifdef PASS2 { } else { ;PASS2 !if * != iAddToPath { - !error "iAddToPath=",*, ", fix constants.a" + !error "iAddToPath=",*, ", fix constants.a, rebuild prelaunch" } } }