add unexpected 5&3 track detection [fixes Real Math]

This commit is contained in:
4am 2023-06-26 20:39:38 -04:00
parent 3e8f19deb4
commit 39758aaba9
4 changed files with 64 additions and 1 deletions

View File

@ -473,6 +473,8 @@ development branch
- NEW: patchers/t00_scottforesman_ - NEW: patchers/t00_scottforesman_
dos33.a (fixes Addition and dos33.a (fixes Addition and
Subtraction 3, Decimals 2) Subtraction 3, Decimals 2)
- NEW: unexpected 5&3 track detection
(fixes Real Math, Mathosaurus)
- IMPROVED: patchers/d5d5f7.a (fixes - IMPROVED: patchers/d5d5f7.a (fixes
Les Sports) Les Sports)
- IMPROVED: patchers/gamco.a (fixes - IMPROVED: patchers/gamco.a (fixes

View File

@ -220,6 +220,7 @@ StringTableLow ; must be kept in sync with constants in enid.a
!byte <.probs5 !byte <.probs5
!byte <.didatech !byte <.didatech
!byte <.anychecksum !byte <.anychecksum
!byte <.unexpected5and3
StringTableHigh ; must be kept in sync with constants in enid.a StringTableHigh ; must be kept in sync with constants in enid.a
!byte >.header !byte >.header
@ -379,11 +380,12 @@ StringTableHigh ; must be kept in sync with constants in enid.a
!byte >.probs5 !byte >.probs5
!byte >.didatech !byte >.didatech
!byte >.anychecksum !byte >.anychecksum
!byte >.unexpected5and3
.passport .passport
!text "Passport ",$00 !text "Passport ",$00
.header .header
!text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2023-05-28",$00 !text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2023-06-26",$00
.bar9 .bar9
!text "_________",$00 !text "_________",$00
.bar18 .bar18
@ -786,3 +788,5 @@ StringTableHigh ; must be kept in sync with constants in enid.a
.anychecksum .anychecksum
!text "@",s_rwts,"@",s_acceptsany,$8D !text "@",s_rwts,"@",s_acceptsany,$8D
!text "address field checksum",$8D,$00 !text "address field checksum",$8D,$00
.unexpected5and3
!text "@",s_tfound,"5-and-3 @",s_protectiontrack,$8D,$00

View File

@ -158,3 +158,4 @@ s_neosoft = $99
s_probs5 = $9A s_probs5 = $9A
s_didatech = $9B s_didatech = $9B
s_anychecksum = $9C s_anychecksum = $9C
s_unexpected5and3 = $9D

View File

@ -39,6 +39,13 @@ SkipTrack
lda #s_sync lda #s_sync
bcc @print bcc @print
; ;
; Unexepcted 13-sector track on a 16-sector disk?
; (Micrograms likes to do this)
;
jsr Unexpected5And3InBaggingArea
lda #s_unexpected5and3
bcc @print
;
; RW18-format track? ; RW18-format track?
; ;
jsr VerifyInfocom18 jsr VerifyInfocom18
@ -312,3 +319,52 @@ Read4x4
} }
and tmp and tmp
rts rts
;-------------------------------
; Unexpected5And3InBaggingArea
; check if track is unexpectedly full of
; 5-and-3-encoded sectors on a disk where
; we expected 6-and-2 encoded sectors
;
; used by e.g. Micrograms as a weak form
; of copy protection to foil COPYA-style
; copying
;
; in slot 6, drive 1 is on track to test
; out C clear if unexpected track found
; C set if not found
;-------------------------------
Unexpected5And3InBaggingArea
lda gIs13Sector
beq @no ; if ID'd as a 13 sector disk, then this is not unexpected
lda $C0E9
lda #$19
sta nibcount
ldx #$0C
ldy #$00
@restart
dey
bne +
dec nibcount
beq @no
+
- lda $C0EC
bpl -
@maybeD5
cmp #$D5
bne @restart
- lda $C0EC
bpl -
cmp #$AA
bne @maybeD5
- lda $C0EC
bpl -
cmp #$B5
bne @maybeD5
dex
bne @restart
clc ; passport-test-suite/Real Math.woz [C=0] matches
!byte $A9
@no sec
lda $C0E8
rts