From f771555bf65dc8fc3309533a0e1d78ef9cc085b6 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Fri, 10 Feb 2017 21:20:25 -0800 Subject: [PATCH 1/2] switch Optimum to ProDOS write method really avoids fatal OpenEmulator bug --- src/patchers/optimum.a | 44 +++++++++++++++++++----------------------- src/strings/en.a | 2 +- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/src/patchers/optimum.a b/src/patchers/optimum.a index 8a51e72..3d007ca 100644 --- a/src/patchers/optimum.a +++ b/src/patchers/optimum.a @@ -191,40 +191,36 @@ _optimum cpy #$FF bne - - ;write replaced page + ;read other page in block - lda gRWTSParams+1 - pha - lda gRWTSParams+2 - pha - lda SLOT - asl - asl - asl - asl - sta gRWTSParams+1 - sta gRWTSParams+$0F - lda DRIVE - and #$0F - sta gRWTSParams+2 lda #1 sta gTrack - lda #$0F sta gSector - inc gRWTSParams+$0C + dec gAddress+1 ldy #gRWTSParams jsr $BD00 - dec gRWTSParams+$0C - pla - sta gRWTSParams+2 - pla - sta gRWTSParams+$0F - sta gRWTSParams+1 - ;restore original page + ;write replaced block + + lda #(BASEPAGE+$0E) + sta mliparam+3 ; hi byte of data buffer + dec mliparam+4 ; lo byte of block number + jsr SwapProDOS + lda #$81 ; 'write block' command + ldy #$03 ; parameter count + jsr mli + jsr SwapProDOS + + ;restore original pages dec gTrack + inc gSector + ldy #gRWTSParams + jsr $BD00 + inc gSector + inc gAddress+1 ldy #gRWTSParams jsr $BD00 diff --git a/src/strings/en.a b/src/strings/en.a index 18a28fa..ed0a928 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-02-09",00 + !text "Passport by 4am 2017-02-10",00 .mainmenu !text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D !text " " From aafe65190ba9b0301ffd4c0024e41701c2ca4462 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Sat, 11 Feb 2017 09:08:32 -0800 Subject: [PATCH 2/2] additional Optimum message --- src/patchers/optimum.a | 2 ++ src/strings/en.a | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/patchers/optimum.a b/src/patchers/optimum.a index 3d007ca..ff633eb 100644 --- a/src/patchers/optimum.a +++ b/src/patchers/optimum.a @@ -138,6 +138,8 @@ _optimum ;track 0, find the region with replaced page .reread1 + lda #s_construct + jsr PrintByID ldy #8 jsr SearchTrack !byte $20,$5D,$B6 ;JSR $B65D diff --git a/src/strings/en.a b/src/strings/en.a index ed0a928..a65a439 100755 --- a/src/strings/en.a +++ b/src/strings/en.a @@ -89,7 +89,8 @@ s_eab0 = $46 s_eatrk6 = $47 s_eeef = $48 s_poke = $49 -STRINGCOUNT = $4A +s_construct= $4A +STRINGCOUNT = $4B !zone { StringTable @@ -167,6 +168,7 @@ StringTable !word .eatrk6 !word .eeef !word .poke + !word .construct ; ; Text can contain substitution strings, which ; are replaced by current values at runtime. Each @@ -427,4 +429,7 @@ StringTable .poke !text "T%t,S%0 BASIC program POKEs protection",$8D !text "check into memory and CALLs it.",$8D,$00 +.construct + !text "Constructing complete T01S0F content.",$8D + !text "Protected version is only partial.",$8D,$00 }