From 320872ff9e2955d518101d946bc995018349647e Mon Sep 17 00:00:00 2001 From: 4am Date: Fri, 5 May 2017 14:04:32 -0400 Subject: [PATCH] add jmpb412 patcher --- src/passport.a | 23 ++++++++------- src/patchers/jmpb412.a | 57 +++++++++++++++++++++++++++++++++++++ src/patchers/rwtsswapmecc.a | 2 ++ src/strings/en.a | 7 ++++- 4 files changed, 77 insertions(+), 12 deletions(-) create mode 100644 src/patchers/jmpb412.a diff --git a/src/passport.a b/src/passport.a index ebe197b..db81e80 100755 --- a/src/passport.a +++ b/src/passport.a @@ -701,22 +701,23 @@ _applyToT00 !source "patchers/jsr8b3.a" _applyToAll !source "patchers/universale7.a" - !source "patchers/runhello.a" - !source "patchers/a6bc95.a" - !source "patchers/a5count.a" + !source "patchers/runhello.a" ; !gIsProDOS && !gIsPascal only + !source "patchers/a6bc95.a" ; gIsPascal only + !source "patchers/a5count.a" ; gIsPascal only !source "patchers/d5d5f7.a" - !source "patchers/prodosrwts.a" - !source "patchers/prodos6a.a" - !source "patchers/prodosmecc.a" + !source "patchers/prodosrwts.a" ; gIsProDOS only + !source "patchers/prodos6a.a" ; gIsProDOS only + !source "patchers/prodosmecc.a" ; gIsProDOS only !source "patchers/rwtsswapmecc.a" - !source "patchers/protecteddos.a" + !source "patchers/protecteddos.a" ; gIsProtDOS only !source "patchers/fbff.a" !source "patchers/sierra.a" !source "patchers/corrupter.a" - !source "patchers/ea.a" - !source "patchers/gamco.a" - !source "patchers/optimum.a" - !source "patchers/bootcounter.a" + !source "patchers/ea.a" ; gIsEA only (+gIsBoot0 for DOS titles) + !source "patchers/gamco.a" ; gIsEEEF only + !source "patchers/optimum.a" ; gIsOptimum only + !source "patchers/bootcounter.a" ; T01 only + !source "patchers/jmpb412.a" ; T02 only lda gPatchCount beq .nopatches diff --git a/src/patchers/jmpb412.a b/src/patchers/jmpb412.a new file mode 100644 index 0000000..00f6d12 --- /dev/null +++ b/src/patchers/jmpb412.a @@ -0,0 +1,57 @@ +;------------------------------- +; #JMPB412 +; Boot1 jumps to $B3C3 to read +; and decrypt a nibble check at +; $B412, which exits via $9D84 +; if successful +; +; Zoo Goer +; Zoo Collector +; Zoo Builder +; America Coast to Coast (Mindscape release) +;------------------------------- +!zone { + lda gTrack + cmp #$02 + bne .exit + + lda #$00 + ldx #$C3 + ldy #$35 + jsr compare ; if T02,S00,$C3 == + !byte $A9,WILDCARD;LDA #$** + !byte $8D,$EC,$B7; STA $B7EC + !byte $A9,WILDCARD;LDA #$** + !byte $8D,$ED,$B7; STA $B7ED + !byte $A9,$B4 ; LDA #$B4 + !byte $8D,$F1,$B7; STA $B7F1 + !byte $A9,$00 ; LDA #$00 + !byte $8D,$F3,$B7; STA $B7F3 + !byte $8D,$EB,$B7; STA $B7EB + !byte $A9,$B7 ; LDA #$B7 + !byte $A0,$E8 ; LDY #$E8 + !byte $20,$B5,$B7; JSR $B7B5 + !byte $A0,$00 ; LDY #$00 + !byte $B9,$12,$B4; LDA $B412,Y + !byte $49,WILDCARD;EOR #$** + !byte $99,$12,$B4; STA $B412,Y + !byte $C8 ; INY + !byte $C0,$FF ; CPY #$FF + !byte $D0,$F3 ; BNE + !byte WILDCARD + !byte WILDCARD + !byte WILDCARD + !byte WILDCARD + !byte WILDCARD + !byte $4C,$12,$B4; JMP $B412 + bcs .exit + sta gDisplayBytes + lda #s_jmpb412 + jsr PrintByID + lda #$00 + ldx #$F6 + ldy #$02 + jsr modify ; then set T02,S00,$F6 = + !byte $84,$9D +.exit +} diff --git a/src/patchers/rwtsswapmecc.a b/src/patchers/rwtsswapmecc.a index fd04a1c..9e3667d 100755 --- a/src/patchers/rwtsswapmecc.a +++ b/src/patchers/rwtsswapmecc.a @@ -2,6 +2,8 @@ ; #RWTSSWAPMECC ; post-boot RWTS swapper in MECC ; disks +; TODO might be able to gate this on MECC fastloader +; (I think it's only used on Dataquest disks) ;------------------------------- !zone { _rwtsswapmecc diff --git a/src/strings/en.a b/src/strings/en.a index fdca0c7..db577de 100755 --- a/src/strings/en.a +++ b/src/strings/en.a @@ -96,7 +96,8 @@ s_daviddos = $4D s_quickdos = $4E s_diversidos = $4F s_prontodos = $50 -STRINGCOUNT = $51 +s_jmpb412 = $51 +STRINGCOUNT = $52 !zone { StringTable @@ -181,6 +182,7 @@ StringTable !word .quickdos !word .diversidos !word .prontodos + !word .jmpb412 ; ; Text can contain substitution strings, which ; are replaced by current values at runtime. Each @@ -457,4 +459,7 @@ StringTable !text "T00,S00 Found Diversi-DOS bootloader",$8D,00 .prontodos !text "T00,S00 Found Pronto-DOS bootloader",$8D,00 +.jmpb412 + !text "T02,S00 Disk calls a protection check",$8D + !text "at $B412 before initializing DOS.",$8D,00 }