From a501879fdfdeab1ec3cc59bc0f91aa11497c94f4 Mon Sep 17 00:00:00 2001 From: 4am Date: Sat, 25 Nov 2017 11:18:42 -0500 Subject: [PATCH] new universal JMPB4BB patcher for DOS 3.2 and 3.3 (fixes Rubik's Cube Unlocked) --- src/mods/t00only.a | 2 -- src/passport.a | 2 +- src/patchers/dos32jmpb4bb.a | 45 --------------------------------- src/patchers/jmpb4bb.a | 50 ++++++++++++++++++------------------- src/patchers/jmpb4bbhi.a | 39 ----------------------------- src/strings/en.a | 2 +- 6 files changed, 26 insertions(+), 114 deletions(-) delete mode 100644 src/patchers/dos32jmpb4bb.a delete mode 100755 src/patchers/jmpb4bbhi.a diff --git a/src/mods/t00only.a b/src/mods/t00only.a index 31c12c9..c8b952f 100644 --- a/src/mods/t00only.a +++ b/src/mods/t00only.a @@ -87,8 +87,6 @@ AnalyzeT00 !source "../patchers/mecc3.a" !source "../patchers/mecc4.a" !source "../patchers/rol1e.a" - !source "../patchers/jmpb4bb.a" - !source "../patchers/jmpb4bbhi.a" ; !source "../patchers/thunder.a" !source "../patchers/jsrbb03.a" !source "../patchers/davidbb03.a" diff --git a/src/passport.a b/src/passport.a index 5292a19..dd21420 100755 --- a/src/passport.a +++ b/src/passport.a @@ -696,7 +696,7 @@ _applyToAll !source "patchers/jmpb400.a" ; T02 && gIsBoot0 only !source "patchers/advint.a" ; gAdventureInternational only !source "patchers/jsr8635.a" ; gIsRWTS only - !source "patchers/dos32jmpb4bb.a" ; T01 && gIsDOS32 only + !source "patchers/jmpb4bb.a" ; T02 && gIsDOS32 only !source "patchers/dos32muse.a" ; T01 && gIsDOS32 only !source "patchers/sra.a" ; gIsDOS32 or gIsRWTS only diff --git a/src/patchers/dos32jmpb4bb.a b/src/patchers/dos32jmpb4bb.a deleted file mode 100644 index c5919a6..0000000 --- a/src/patchers/dos32jmpb4bb.a +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------- -; #DOS32JMPB4BB -; boot2 jumps to $B4BB for a -; nibble check (13-sector variant) -; -; tested on -; Bellhop (1982, Imaginative Systems) -; Property Management System demo (1982, Realty Software Company) -;------------------------------- -!zone { - lda gIsDOS32 ; if DOS 3.2 - bne .exit - lda gTrack - cmp #$01 - bne .exit - lda #$00 - sta gDisplayBytes - ldx #$84 - ldy #$03 - jsr compare ; and T01,S00,$84 == - !byte $4C,$BB,$B4 - bcs .exit - lda #s_jmpb4bb - jsr PrintByID - lda #$00 - ldx #$84 - ldy #$03 - jsr modify ; then set T01,S00,$84 = - !byte $AD,$E9,$37 -; -; also check a variant that redirects the DOS input -; vector through code that is only loaded by the -; protection check we just bypassed -; - lda #$01 - ldx #$BA - ldy #$01 - jsr compare ; if T01,S01,$BA == - !byte $4C - bcs .exit - ldy #$03 - jsr modify ; then set T01,S01,$BA = - !byte $6C,$38,00 -.exit -} diff --git a/src/patchers/jmpb4bb.a b/src/patchers/jmpb4bb.a index 0bd1dd0..74931be 100755 --- a/src/patchers/jmpb4bb.a +++ b/src/patchers/jmpb4bb.a @@ -5,37 +5,35 @@ ; e.g. Troll's Tale ;------------------------------- !zone { - lda gIsMaster ; if DOS 3.3 lomem bootloader + lda gTrack + cmp #$02 bne .exit - lda #$0C + lda gIsDOS32 + bne + + lda #$0A + !byte $2C ; hide next LDA ++ lda #$03 sta gDisplayBytes - ldx #$84 - ldy #$03 - jsr compare ; and T00,S0C,$84 == - !byte $4C,$BB,$B4 + ldx #$D7 + ldy #$04 + jsr compare ; and T02,S0x,$D7 == + !byte $D8 ; CLD + !byte $AD,$FF,$CF; LDA $CFFF + bcc .found + ldx #$DD + ldy #$04 + jsr compare ; or T02,S0x,$DD == + !byte $D8 ; CLD + !byte $AD,$FF,$CF; LDA $CFFF bcs .exit +.found + pha lda #s_jmpb4bb jsr PrintByID - lda #$0C - ldx #$84 + pla + inx ldy #$03 - jsr modify ; then set T00,S0C,$84 = - !byte $AD,$E9,$37 -; -; also check a variant that redirects the DOS input -; vector through code that is only loaded by the -; protection check we just bypassed -; - lda #$0D - ldx #$BA - ldy #$01 - jsr compare ; if T00,S0D,$BA == - !byte $4C - bcs .exit - lda #$0D - ldx #$BA - ldy #$03 - jsr modify ; then set T00,S0D,$BA = - !byte $6C,$38,00 + jsr modify ; then set offset+1 to + !byte $4C,$84,$9D .exit } diff --git a/src/patchers/jmpb4bbhi.a b/src/patchers/jmpb4bbhi.a deleted file mode 100755 index a514a16..0000000 --- a/src/patchers/jmpb4bbhi.a +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------- -; #JMPB4BBHI -; boot2 jumps to $B4BB for a -; nibble check -; e.g. Snooper Troops 2 -;------------------------------- -!zone { -_jmpb4bbhi - lda gIsBoot1 ; if DOS 3.3 bootloader - bne .exit - lda #$0C - sta gDisplayBytes - ldx #$84 - ldy #$03 - jsr compare ; and T00,S0C,$84 == - !byte $4C,$BB,$B4 - bcs .exit - lda #s_jmpb4bb - jsr PrintByID - lda #$0C - ldy #$03 - jsr modify ; then set T00,S0C,$84 = - !byte $AD,$E9,$B7 -; -; also check a variant that redirects the DOS input -; vector through code that is only loaded by the -; protection check we just bypassed -; - lda #$0D - ldx #$BA - ldy #$01 - jsr compare ; if T00,S0D,$BA == - !byte $4C - bcs .exit - ldy #$03 - jsr modify ; then set T00,S0D,$BA = - !byte $6C,$38,00 -.exit -} diff --git a/src/strings/en.a b/src/strings/en.a index fe8529f..d90fedd 100755 --- a/src/strings/en.a +++ b/src/strings/en.a @@ -134,7 +134,7 @@ StringTable ; can be set directly before calling PrintByID. ; .header - !text "Passport by 4am 2017-11-24",$00 + !text "Passport by 4am 2017-11-25",$00 .mainmenu !text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D !text " "