add support for extra wide tracks anywhere, expand sigcheck patcher

This commit is contained in:
4am 2021-09-13 02:08:11 -04:00
parent 7975003b15
commit 5fb1e40e0a
10 changed files with 70 additions and 29 deletions

View File

@ -409,12 +409,18 @@ IN THE SOFTWARE.
## History
In-development (unreleased)
- NEW: patchers/t00_sigcheck.a (fixes
Hardball, Law of the West)
- NEW: patchers/pfs.pascal.a (fixes
pfs:* Pascal titles)
- NEW: patchers/pfs.prodos.a (fixes
pfs:* ProDOS titles)
- IMPROVED: patchers/ea.a (fixes
Boulder Dash II) (by qkumba)
- IMPROVED: patchers/sigcheck.a (fixes
Inca, Holy Grail)
- Detect extra wide tracks anywhere,
not just on track 6
2021-09-04
- IMPROVED: patchers/universale7.a

View File

@ -83,7 +83,10 @@ FIRSTFILTER
!byte FALSE ; 0=true, 1=false
; reset before each operation
; set in IDVolumeName() after identifying ProDOS bootloader
;gPossibleSigCheck
!byte FALSE ; 0=true, 1=false
; reset before each operation
; set in IsWideTrack() after finding extra wide protection track
;gPossibleB4BBBasic
!byte FALSE ; 0=true, 1=false
; reset before each operation

View File

@ -182,7 +182,8 @@ gIsTSR = gIsDiversi-$01 ; byte
gPossibleMECCSwapper = gIsTSR-$01 ; byte
gPossibleWoodbury = gPossibleMECCSwapper-$01 ; byte
gPossibleB4BBBasic = gPossibleWoodbury-$01 ; byte
gIsLowDOS = gPossibleB4BBBasic-$01 ; byte
gPossibleSigCheck = gPossibleB4BBBasic-$01 ; byte
gIsLowDOS = gPossibleSigCheck-$01 ; byte
;LASTFILTER ; add new gIs* above this line
;gIsInfocom18 is a special case whose ID is not in the regular inspection path
gIsInfocom18 = gIsLowDOS-$01 ; byte

View File

@ -94,6 +94,7 @@ T00_IsNotRWTS
!source "../patchers/t00_pascalrwts.a"
!source "../patchers/t00_rdos13.a"
!source "../patchers/t00_rol1e.a"
!source "../patchers/t00_sigcheck.a"
rts
!if * > $3200 {

View File

@ -365,6 +365,7 @@ AnalyzeTrack
!source "patchers/tsr.a" ; T04 && gIsTSR only
!source "patchers/woodbury.a" ; gPossibleWoodbury only
!source "patchers/b4bbbasic.a" ; gPossibleB4BBBasic only
!source "patchers/sigcheck.a" ; gPossibleSigCheck only
!source "patchers/errord51.a" ; gIsLowDOS only
;
; DOS 3.3-specific patchers
@ -386,7 +387,6 @@ _endDOS33Patchers
lda gIsDiversi
bne _endDiversiPatchers
!source "patchers/pdi.a" ; gIsDiversi only
!source "patchers/sigcheck.a" ; gIsDiversi only
_endDiversiPatchers
;
; ProDOS-specific patchers

View File

@ -7,10 +7,8 @@
; - Complex Circuits
; - Projectile and Circular Motion
;-------------------------------
!zone {
; gIsDiversi is TRUE here
; (only ever seen this protection on Diversi-DOS disks)
lda gPossibleSigCheck
bne +
ldy #$0A
jsr SearchTrack
!byte $4C,$42,$61
@ -18,9 +16,9 @@
!byte $F0,$02
!byte $A9,$FF
!byte $48
bcs .exit ; passport-test-suite/Advanced Electricity.woz [C=0] matches
bcs + ; passport-test-suite/Advanced Electricity.woz [C=0] matches
jsr inx8
jsr modify1
!byte $00
.exit
}
+

View File

@ -0,0 +1,28 @@
;-------------------------------
; #T00SIGCHECK
; productized extra wide track protection check
;
; tested on
; - Hardball
;-------------------------------
; gTrack = 0
ldy #$0A
jsr SearchTrack
!byte $4C,$42,$61
!byte $A9,$00
!byte $F0,$02
!byte $A9,$FF
!byte $48
bcs + ; passport-test-suite/Hardball.woz [C=0] matches
inx
inx
inx
inx
inx
inx
inx
inx
jsr modify1
!byte $00
+

View File

@ -132,7 +132,7 @@ StringTableLow ; must be kept in sync with constants in enid.a
!byte <.restart
!byte <.corrupter
!byte <.eaboot0
!byte <.eatrk6
!byte <.widetrack
!byte <.protectioncheck
!byte <.poke
!byte <.bootcounter
@ -282,7 +282,7 @@ StringTableHigh ; must be kept in sync with constants in enid.a
!byte >.restart
!byte >.corrupter
!byte >.eaboot0
!byte >.eatrk6
!byte >.widetrack
!byte >.protectioncheck
!byte >.poke
!byte >.bootcounter
@ -365,7 +365,7 @@ StringTableHigh ; must be kept in sync with constants in enid.a
.passport
!text "Passport ",$00
.header
!text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2021-09-12",$00
!text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2021-09-13",$00
.bar9
!text "_________",$00
.bar18
@ -633,7 +633,7 @@ StringTableHigh ; must be kept in sync with constants in enid.a
!text "destroys unauthorized copies",$8D,$00
.eaboot0
!text "@",s_tfound,"Electronic Arts @",s_bootloader,$8D,$00
.eatrk6
.widetrack
!text "@",s_tfound,"extra wide @",s_protectiontrack,$8D,$00
.poke
!text "T%t,S%0 BASIC program POKEs @",s_protection,$8D

View File

@ -70,7 +70,7 @@ s_a5count = $41
s_restart = $42
s_corrupter= $43
s_eab0 = $44
s_eatrk6 = $45
s_widetrack = $45
s_protectioncheck = $46
s_poke = $47
s_bootcounter =$48

View File

@ -29,8 +29,8 @@ SkipTrack
;
; Electronic Arts protection track?
;
jsr IsEATrack6
lda #s_eatrk6
jsr IsWideTrack
lda #s_widetrack
bcc @print
;
; Nibble count track?
@ -250,23 +250,27 @@ IsUnformatted
rts
;-------------------------------
; IsEATrack6
; check if track 6 even exists
; IsWideTrack
; check if this track claims to be the previous track
; in the case of EA, track 6 reads as track 5
; in the case of Accolade, track $22 reads as track $21
;
; in slot 6, drive 1 is on track to test
; out C clear if read track does not match expected track
; C set otherwise
; out C clear if found wide track
; C set if not found
;-------------------------------
IsEATrack6
lda gTrack
cmp #6
IsWideTrack
lda $2E
clc
adc #1
cmp gTrack
beq +
sec
bne +
lda $2E ;DOS read track number
sbc #5
cmp #1
+ rts
rts
+ lda #TRUE
sta gPossibleSigCheck
clc
rts
;-------------------------------
; ReadNib