new universal JMPB4BB patcher for DOS 3.2 and 3.3 (fixes Rubik's Cube Unlocked)

This commit is contained in:
4am 2017-11-25 11:18:42 -05:00
parent 3ee6fa37bc
commit a501879fdf
6 changed files with 26 additions and 114 deletions

View File

@ -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"

View File

@ -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

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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 " "