add support for E7 Everywhere protection check [fixes Garfield Trivia Game]

This commit is contained in:
4am 2019-04-13 09:55:41 -04:00
parent f909ff30fd
commit 2ea34407e6
4 changed files with 57 additions and 2 deletions

View File

@ -846,6 +846,7 @@ _applyToAll
!source "patchers/hallabs.a" ; T01 only
!source "patchers/holle.a" ; gIsHolle only
!source "patchers/zoomgrafix.a" ; gIsPhoenix only
!source "patchers/e7everywhere.a" ; gIsBoot0 || gIsProDOS only
lda gPatchCount
beq .nopatches

View File

@ -0,0 +1,50 @@
;------------------------------------------------------------------------------
; #E7EVERYWHERE
; E7 bitstream in the track seam of every track
;
; We can't attack the bitstream itself (like #UNIVERSALE7) because it's not
; within any sector data, so we search for the code instead. AFAIK the code
; is never encrypted.
; This does a full-track search on every track, which is unfortunate. I've
; only seen this protection on DOS and ProDOS disks, so we filter on that
; to optimize performance a little bit.
;
; tested on
; - Curious George Goes Shopping (DLM)
; - Curious George Visits The Library (DLM)
; - Curious George Goes To Outer Space (DLM)
; - Spelling Mastery (DLM)
; - Garfield Trivia Game (DLM)
; - The Quarter Mile (Barnum)
; - Reading and Writing with The Boars (McGraw-Hill)
;------------------------------------------------------------------------------
!zone {
bit gMode ; nothing to do here in verify-only mode
bpl .exit
lda gIsBoot0
beq +
lda gIsProDOS
bne .exit
+
ldy #$11
jsr SearchTrack
;
LDA #$05
!byte $8D,WILDCARD,WILDCARD
!byte $AE,WILDCARD,WILDCARD
LDA $C08E,X
LDA $C089,X
LDA #$00
!byte $8D
;
bcs .exit
sta gDisplayBytes
pha
lda #s_e7everywhere
jsr PrintByID
pla
ldy #$02
jsr modify
!byte $18,$60 ; CLC/RTS
.exit
}

View File

@ -132,6 +132,7 @@ StringTable
!word .holle
!word .hoffman
!word .diskvol0
!word .e7everywhere
;
; Text can contain substitution strings, which
; are replaced by current values at runtime. Each
@ -157,7 +158,7 @@ StringTable
; can be set directly before calling PrintByID.
;
.header
!text "Passport by 4am 2019-04-09",$00
!text "Passport by 4am 2019-04-13",$00
.mainmenu
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D
!text " "
@ -483,4 +484,6 @@ StringTable
!text "T%t,S%0 Found Hoffman protection check",$8D,$00
.diskvol0
!text "T%t,S%0 Disk requires volume number 000",$8D,$00
.e7everywhere
!text "T%t,S%0 Found E7 Everywhere protection",$8D,$00
}

View File

@ -118,4 +118,5 @@ s_hallabs = $70
s_holle = $71
s_hoffman = $72
s_diskvol0 = $73
STRINGCOUNT = $74
s_e7everywhere=$74
STRINGCOUNT = $75