From f771555bf65dc8fc3309533a0e1d78ef9cc085b6 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Fri, 10 Feb 2017 21:20:25 -0800 Subject: [PATCH] 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 " "