From 438711b396dd3852d6da6b595d34ccb4836cb264 Mon Sep 17 00:00:00 2001 From: 4am Date: Sat, 4 Mar 2017 10:29:44 -0500 Subject: [PATCH] add support for detecting ProDOS RWTS that alternates D4/D5 prologue, requires timing bit for address epilogue --- src/passport.a | 1 + src/patchers/prodos6a.a | 38 ++++++++++++++++++++++++++++++++++++++ src/patchers/rwts.a | 2 ++ src/strings/en.a | 6 +++--- 4 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 src/patchers/prodos6a.a diff --git a/src/passport.a b/src/passport.a index 2842f5f..a884a01 100755 --- a/src/passport.a +++ b/src/passport.a @@ -697,6 +697,7 @@ _applyToAll !source "patchers/a5count.a" !source "patchers/d5d5f7.a" !source "patchers/prodosrwts.a" + !source "patchers/prodos6a.a" !source "patchers/prodosmecc.a" !source "patchers/rwtsswapmecc.a" !source "patchers/protecteddos.a" diff --git a/src/patchers/prodos6a.a b/src/patchers/prodos6a.a new file mode 100644 index 0000000..de24ba9 --- /dev/null +++ b/src/patchers/prodos6a.a @@ -0,0 +1,38 @@ +;------------------------------- +; #PRODOS6A +; disk allows either $D4 or $D5 for the +; first address prologue nibble +; (no patches required, but we want to +; log it) +;------------------------------- +!zone { +prodos6a + lda gIsProDOS ; only if ProDOS (separate check for DOS) + bne .exit + lda #$0F + sta .sector+1 +.sector lda #$FF ; modified at runtime + sta gDisplayBytes + ldx #$A5 + ldy #$08 + jsr compare + !byte $BD,$8C,$C0,$10,$FB,$4A,$C9,$6A + bcs + + lda #s_lsr6a + jsr PrintByID + inc gPatchCount ++ + lda .sector+1 + ldx #$EF + ldy #$07 + jsr compare + !byte $48,$68,$BD,$8C,$C0,$C9,$08 + bcs .nextsector + lda #s_bcs08 + jsr PrintByID + inc gPatchCount +.nextsector + dec .sector+1 + bpl .sector +.exit +} diff --git a/src/patchers/rwts.a b/src/patchers/rwts.a index 22c1df6..5b6dba4 100755 --- a/src/patchers/rwts.a +++ b/src/patchers/rwts.a @@ -634,6 +634,7 @@ rwtspatcher lda gIsRWTS ; if DOS 3.3 RWTS bne .lsr6a lda #$03 + sta gDisplayBytes ldx #$4F ldy #$0A jsr compare ; and T00,S03,$4F == @@ -654,6 +655,7 @@ rwtspatcher lda gIsRWTS ; if DOS 3.3 RWTS bne .bcs08 lda #$03 + sta gDisplayBytes ldx #$8B ldy #$15 jsr compare ; and T00,S03,$8B == diff --git a/src/strings/en.a b/src/strings/en.a index a458d25..7bfafd1 100755 --- a/src/strings/en.a +++ b/src/strings/en.a @@ -192,7 +192,7 @@ StringTable ; can be set directly before calling PrintByID. ; .header - !text "Passport by 4am 2017-03-03",00 + !text "Passport by 4am 2017-03-04",00 .mainmenu !text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D !text " " @@ -381,10 +381,10 @@ StringTable .datasoft !text "T%t,S%0 Found Datasoft protection check",$8D,00 .lsr6a - !text "T00,S03 RWTS accepts $D4 or $D5 for the",$8D + !text "T%t,S%0 RWTS accepts $D4 or $D5 for the",$8D !text "first address prologue nibble.",$8D,00 .bcs08 - !text "T00,S03 RWTS accepts $DE or a timing bit" + !text "T%t,S%0 RWTS accepts $DE or a timing bit" !text "for the first address epilogue nibble.",$8D,00 .jmpb660 !text "T00,S02 RWTS requires timing bits after",$8D