From df4343cdeac510be649ff478f3cd0605c7fe017b Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Sat, 26 May 2018 10:54:48 -0700 Subject: [PATCH] support Borrowed Time and switch to Cadius --- res/_FileInformation.txt | 1 + src/apicode.a | 4 ++++ src/apidefs.a | 4 +++- src/id/advent.a | 8 ++++++++ src/mods/t00only.a | 1 - src/passport.a | 1 + src/patchers/advent.a | 13 +++++++++++-- src/strings/en.a | 2 +- winmake.bat | 29 ++++++++++++++++------------- 9 files changed, 45 insertions(+), 18 deletions(-) create mode 100644 res/_FileInformation.txt diff --git a/res/_FileInformation.txt b/res/_FileInformation.txt new file mode 100644 index 0000000..5aa67cf --- /dev/null +++ b/res/_FileInformation.txt @@ -0,0 +1 @@ +PASSPORT.SYSTEM=Type(FF),AuxType(2000),Access(C3) diff --git a/src/apicode.a b/src/apicode.a index 10dac5b..1180c0f 100644 --- a/src/apicode.a +++ b/src/apicode.a @@ -49,6 +49,10 @@ ; compile-time flag, no way to change at runtime FIRSTFILTER +;gIsAdvent + !byte FALSE ; 0=true, 1=false + ; reset before each operation + ; set in IDBootloader() after reading T00,S00 ;gForceDiskVol !byte FALSE ; 0=true, 1=false ; reset before each operation diff --git a/src/apidefs.a b/src/apidefs.a index 5b15864..c789ca8 100644 --- a/src/apidefs.a +++ b/src/apidefs.a @@ -87,9 +87,10 @@ gIsF7F6 = gIsSierra13-$01 ; byte gIsTrillium = gIsF7F6-$01 ; byte gPolarwareTamperCheck = gIsTrillium-$01 ; byte gForceDiskVol = gPolarwareTamperCheck-$01 ; byte +gIsAdvent = gForceDiskVol-$01 ; byte ;LASTFILTER ; add new gIs* above this line -gOnAClearDayYouCanReadForever = gForceDiskVol-$01 ; byte +gOnAClearDayYouCanReadForever = gIsAdvent-$01 ; byte gUsingRAMDisk = gOnAClearDayYouCanReadForever-$01 ; byte gRAMDiskRef = gUsingRAMDisk-$01 ; byte gDisplayBytes = gRAMDiskRef-$0A ; 10 bytes @@ -156,6 +157,7 @@ ConstructStandardDelivery = jConstructStandardDelivery !warn "gPolarwareTamperCheck=",gPolarwareTamperCheck !warn "gForceDiskVol=",gIsForceDiskVol !warn "gOnAClearDayYouCanReadForever=",gOnAClearDayYouCanReadForever +!warn "gIsAdvent=",gIsAdvent !warn "gUsingRAMDisk=",gUsingRAMDisk !warn "gRAMDiskRef=",gRAMDiskRef !warn "gDisplayBytes=",gDisplayBytes diff --git a/src/id/advent.a b/src/id/advent.a index 36b640b..1fbcd79 100644 --- a/src/id/advent.a +++ b/src/id/advent.a @@ -48,6 +48,14 @@ foundadvent sta $BDC5 lda #>.checktrk sta $BDC6 + +; +; this RWTS alters the data prologue in a routine +; on a non-zero track, so we need to set a flag so +; we know to search for it later +; + lda #TRUE + sta gIsAdvent jmp ADStyle .prologtbl1 diff --git a/src/mods/t00only.a b/src/mods/t00only.a index 4d2cbcc..a94606e 100644 --- a/src/mods/t00only.a +++ b/src/mods/t00only.a @@ -108,7 +108,6 @@ AnalyzeT00 !source "../patchers/dos32.a" !source "../patchers/dos32dlm.a" !source "../patchers/microfun.a" - !source "../patchers/advent.a" ;add only above this line rts diff --git a/src/passport.a b/src/passport.a index f777c07..454233e 100755 --- a/src/passport.a +++ b/src/passport.a @@ -764,6 +764,7 @@ _applyToAll !source "patchers/ssprot.a" ; gIsF7F6 only !source "patchers/f7f6.a" ; gIsF7F6 only !source "patchers/trillium.a" ; gIsTrillium only + !source "patchers/advent.a" ; gIsAdvent only lda gPatchCount beq .nopatches diff --git a/src/patchers/advent.a b/src/patchers/advent.a index 6bb143d..e85f375 100644 --- a/src/patchers/advent.a +++ b/src/patchers/advent.a @@ -9,7 +9,16 @@ ; module by qkumba ;------------------------------- !zone { - clc + lda gIsAdvent + bne .exit + + ;carry controls how many times to run on one track + ;Mindshadow and Tracer Sanction have two copies + ;of the protection on track 0, loaded to two + ;different addresses at different stages of play + + lda gTrack + cmp #1 .again php ldy #29 jsr SearchTrack @@ -72,7 +81,7 @@ plp bcs .exit sec - jmp .again + bcs .again .pop plp diff --git a/src/strings/en.a b/src/strings/en.a index a233060..3c44574 100755 --- a/src/strings/en.a +++ b/src/strings/en.a @@ -141,7 +141,7 @@ StringTable ; can be set directly before calling PrintByID. ; .header - !text "Passport by 4am 2018-05-25",$00 + !text "Passport by 4am 2018-05-26",$00 .mainmenu !text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D !text " " diff --git a/winmake.bat b/winmake.bat index e394014..6fcce1e 100644 --- a/winmake.bat +++ b/winmake.bat @@ -4,36 +4,39 @@ if "%1" equ "clean" ( echo y|1>nul rd build /s goto :EOF ) +set ACME=acme +set EXOMIZER=exomize +set CADIUS=cadius 2>nul md build cd src\mods -acme universalrwts.a +%ACME% universalrwts.a cd ..\..\build -exomize raw -q universalrwts.bin -o universalrwts.tmp +%EXOMIZER% raw -q universalrwts.bin -o universalrwts.tmp cscript /nologo //e:jscript %~f0 "b8" "00" 1>nul copy /b tmp+universalrwts.tmp universalrwts.pak cd ..\src\mods -acme t00only.a +%ACME% t00only.a cd ..\..\build -exomize raw -q t00only.bin -o t00only.tmp +%EXOMIZER% raw -q t00only.bin -o t00only.tmp cscript /nologo //e:jscript %~f0 "20" "00" 1>nul copy /b tmp+t00only.tmp t00only.pak cd ..\src -for /f "tokens=*" %%q in ('2^>^&1 acme passport.a') do set _make=%%q -acme -r ..\build\passport.lst -DRELBASE=$%_make:~-5,4% passport.a +for /f "tokens=*" %%q in ('2^>^&1 %ACME% passport.a') do set _make=%%q +%ACME% -r ..\build\passport.lst -DRELBASE=$%_make:~-5,4% passport.a set _make= cd .. 1>nul copy res\work.po build\passport.po -java -jar bin\AppleCommander.jar -p build\passport.po "PASSPORT.SYSTEM" sys 0x2000 < build\PASSPORT.SYSTEM +1>nul copy res\_FileInformation.txt build\ +%CADIUS% ADDFILE "build\passport.po" "/PASSPORT/" "build\PASSPORT.SYSTEM" goto :EOF */ new ActiveXObject("scripting.filesystemobject").createtextfile("tmp").write(String.fromCharCode(parseInt(WScript.arguments(0),16),String.fromCharCode(parseInt(WScript.arguments(1),16)))) /* bat/jscript hybrid make script for Windows environments a qkumba monstrosity from 2017-10-16 -requires ACME, Exomizer, Apple Commander, Java -https://sourceforge.net/projects/acme-crossass/ -https://sourceforge.net/projects/applecommander/ -https://bitbucket.org/magli143/exomizer/wiki/Home -https://java.com/en/download/ -requires ACME, Exomizer, Java to be in path +rem third-party tools required to build (must be in path) +rem https://sourceforge.net/projects/acme-crossass/ +rem https://bitbucket.org/magli143/exomizer/wiki/Home +rem https://www.brutaldeluxe.fr/products/crossdevtools/cadius/ +rem https://github.com/mach-kernel/cadius */