From c6d2031368140d1fa29d14c7b87df6342a5eff5a Mon Sep 17 00:00:00 2001 From: 4am Date: Sat, 22 May 2021 11:35:57 -0400 Subject: [PATCH] support SIGCHECK.O extra wide track protection [fixes Advanced Electricity, others] --- README.md | 4 +++- src/passport.a | 10 ++++++++++ src/patchers/a5count.a | 4 +--- src/patchers/c9ff.a | 15 ++------------- src/patchers/pdi.a | 7 ++----- src/patchers/polarware.a | 4 +--- src/patchers/prodosmecc.a | 25 +++++-------------------- src/patchers/prodosrwts.a | 6 +----- src/patchers/sigcheck.a | 28 ++++++++++++++++++++++++++++ src/patchers/zoomgrafix.a | 5 +---- src/strings/en.a | 4 ++-- 11 files changed, 56 insertions(+), 56 deletions(-) create mode 100644 src/patchers/sigcheck.a diff --git a/README.md b/README.md index ce94e84..21c92e4 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ were common in educational software. - EME e.g. Metric System Tutor, - Water in the Air + Water in the Air, Complex Circuits - Encyclopaedia Britannica e.g. Problem Solving in Algebra, @@ -431,6 +431,8 @@ Development (unreleased) - NEW: patchers/errord51.a (Granny Applebee's Cookie Factory, Uncle Clyde's Consonant Slides) +- NEW: patchers/sigcheck.a (Advanced + Electricity, Complex Circuits) - IMPROVED: patches/mecc.a to erase site license information from final generation of MECC disks (by qkumba) diff --git a/src/passport.a b/src/passport.a index 76b8ccd..1771b00 100755 --- a/src/passport.a +++ b/src/passport.a @@ -390,6 +390,7 @@ AnalyzeTrack !source "patchers/leisure.a" ; gIsProDOS && T22 only !source "patchers/b4bbbasic.a" ; gPossibleB4BBBasic only !source "patchers/errord51.a" ; gIsLowDOS only + !source "patchers/sigcheck.a" ; gIsDiversi only _checkPatchCount lda gPatchCount @@ -401,6 +402,15 @@ _checkPatchCount rts ; utility functions used by several patchers +inx0F inx +inx0E inx +inx0D inx +inx0C inx +inx0B inx +inx0A inx +inx9 inx +inx8 inx +inx7 inx inx6 inx inx5 inx inx4 inx diff --git a/src/patchers/a5count.a b/src/patchers/a5count.a index 42ff6f5..4827897 100644 --- a/src/patchers/a5count.a +++ b/src/patchers/a5count.a @@ -18,9 +18,7 @@ bcs .exit ; passport-test-suite/Game Frame One.woz [C=0] matches sta gDisplayBytes pha - txa - adc #$08 - tax + jsr inx8 lda #s_a5count jsr PrintByID pla diff --git a/src/patchers/c9ff.a b/src/patchers/c9ff.a index 4d3533e..2cc67e5 100644 --- a/src/patchers/c9ff.a +++ b/src/patchers/c9ff.a @@ -32,22 +32,11 @@ !byte $60 ; RTS bcs .exit ; passport-test-suite/Mr. Pixel's Programming Paint Set.woz [C=0] matches sta gDisplayBytes - pha - txa - clc - adc #$09 - tax - stx gDisplayBytes+1 - pla - pha + jsr inx9 ldy #$01 jsr modify !byte $DE - lda gDisplayBytes+1 - clc - adc #$0A - tax - pla + jsr inx0A ldy #$01 jsr modify !byte $AA diff --git a/src/patchers/pdi.a b/src/patchers/pdi.a index 6291ae4..2942dae 100644 --- a/src/patchers/pdi.a +++ b/src/patchers/pdi.a @@ -21,16 +21,13 @@ !byte $88 ; DEY !byte $10,$F7 ; BPL *-9 !byte $4C,$E3,$93 ; JMP $93E3 - bcs .exit + bcs .exit ; passport-test-suite/Polywriter.woz [C=0] matches sta gDisplayBytes pha lda #s_pdi jsr PrintByID - txa - clc - adc #12 - tax pla + jsr inx0C ldy #$02 jsr modify !byte $99,$8E ; jmp directly to decoder diff --git a/src/patchers/polarware.a b/src/patchers/polarware.a index 013cc36..175ac09 100644 --- a/src/patchers/polarware.a +++ b/src/patchers/polarware.a @@ -47,9 +47,7 @@ bcs .exit ; passport-test-suite/The Crimson Crown.woz [C=0] matches sta gDisplayBytes pha - txa - adc #$09 - tax + jsr inx9 lda #s_tamper jsr PrintByID pla diff --git a/src/patchers/prodosmecc.a b/src/patchers/prodosmecc.a index 15eee37..4babab4 100755 --- a/src/patchers/prodosmecc.a +++ b/src/patchers/prodosmecc.a @@ -15,11 +15,7 @@ !byte $20,$10,$30,WILDCARD,$AA,$EB bcs + ; passport-test-suite/Mystery Objects v1.1.woz [C=0] matches sta gDisplayBytes - tay - txa - adc #$0B - tax - tya + jsr inx0B ldy #$01 jsr compare !byte $DE @@ -46,11 +42,7 @@ !byte $60 bcs + ; passport-test-suite/Miner's Cave.woz [C=0] matches sta gDisplayBytes - tay - txa - adc #$09 - tax - tya + jsr inx9 ldy #$01 jsr modify !byte $18 @@ -65,11 +57,8 @@ !byte $C9,$DE,$F0,$02,$18,$24,$38,$60 bcs + ; passport-test-suite/Spelling Press v1.1.woz [C=0] matches sta gDisplayBytes - tay - txa - adc #$16 - tax - tya + jsr inx0B + jsr inx0B ldy #$01 jsr modify !byte $18 @@ -84,11 +73,7 @@ !byte $38 !byte $60 bcs + ; passport-test-suite/Spelling Press v1.1.woz [C=0] matches - tay - txa - adc #$0A - tax - tya + jsr inx0A ldy #$01 jsr modify !byte $18 diff --git a/src/patchers/prodosrwts.a b/src/patchers/prodosrwts.a index bbb56a0..454287e 100755 --- a/src/patchers/prodosrwts.a +++ b/src/patchers/prodosrwts.a @@ -21,11 +21,7 @@ _prodosrwts !byte $38 bcs .exit ; passport-test-suite/Mystery Objects v1.1.woz [C=0] matches sta gDisplayBytes - tay - txa - adc #$0F - tax - tya + jsr inx0F ldy #$01 jsr compare !byte $DE diff --git a/src/patchers/sigcheck.a b/src/patchers/sigcheck.a new file mode 100644 index 0000000..d309d83 --- /dev/null +++ b/src/patchers/sigcheck.a @@ -0,0 +1,28 @@ +;------------------------------- +; #SIGCHECK +; productized fat track protection check +; +; tested on +; - Advanced Electricity +; - Complex Circuits +; - Projectile and Circular Motion +;------------------------------- +!zone { + lda gIsDiversi ; only ever seen this protection + bne .exit ; on Diversi-DOS disks + + ldy #$0A + jsr SearchTrack + !byte $4C,$42,$61 + !byte $A9,$00 + !byte $F0,$02 + !byte $A9,$FF + !byte $48 + bcs .exit ; passport-test-suite/Advanced Electricity.woz [C=0] matches + sta gDisplayBytes + jsr inx8 + ldy #$01 + jsr modify + !byte $00 +.exit +} diff --git a/src/patchers/zoomgrafix.a b/src/patchers/zoomgrafix.a index 0169cf5..52ab170 100644 --- a/src/patchers/zoomgrafix.a +++ b/src/patchers/zoomgrafix.a @@ -20,10 +20,7 @@ sta gDisplayBytes+1 lda #s_diskvol0x jsr PrintByID - txa - clc - adc #$0B - tax + jsr inx0B pla ldy #$01 jsr modify diff --git a/src/strings/en.a b/src/strings/en.a index 20d8ded..e639ce7 100755 --- a/src/strings/en.a +++ b/src/strings/en.a @@ -344,7 +344,7 @@ StringTableHigh .passport !text "Passport ",$00 .header - !text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2021-05-11",$00 + !text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2021-05-22",$00 .bar9 !text "_________",$00 .bar18 @@ -607,7 +607,7 @@ StringTableHigh .eaboot0 !text "@",s_tfound,"Electronic Arts @",s_bootloader,$8D,$00 .eatrk6 - !text "@",s_tfound,"EA @",s_protectiontrack,$8D,$00 + !text "@",s_tfound,"extra wide @",s_protectiontrack,$8D,$00 .poke !text "T%t,S%0 BASIC program POKEs protection",$8D !text "check into memory and CALLs it",$8D,$00