From 428ac7ca5ac4d9d6a148c483472f585a2e9d7dad Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Mon, 13 Feb 2017 13:15:10 -0800 Subject: [PATCH] reduce Optimum read overhead --- src/patchers/optimum.a | 29 ++++++++++++----------------- src/strings/en.a | 2 +- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/src/patchers/optimum.a b/src/patchers/optimum.a index ff633eb..381b18f 100644 --- a/src/patchers/optimum.a +++ b/src/patchers/optimum.a @@ -55,7 +55,7 @@ _optimum lda #$2C sta $BE40 - ;read T01S0F + ;read T01S0F, remains encoded at $BB00-BC55 lda gTrack pha @@ -109,7 +109,7 @@ _optimum ora ($D110-$96)-$16,x sty $2C ldy $26 - sta $B600,y + sta $300,y ldy $2C bne + dec .tblsel1+2 @@ -180,6 +180,8 @@ _optimum ;read replaced page + lda #9 ; $900-9FF + sta gAddress+1 ldy #gRWTSParams jsr $BD00 @@ -187,8 +189,8 @@ _optimum ;merge content ldy #$86 -- lda $B600,y - sta (BASEPAGE+$0F)*256,y +- lda $300,y + sta $900,y dey cpy #$FF bne - @@ -198,14 +200,14 @@ _optimum lda #1 sta gTrack sta gSector - dec gAddress+1 + dec gAddress+1 ; and $800-8FF ldy #gRWTSParams jsr $BD00 ;write replaced block - lda #(BASEPAGE+$0E) + lda #8 ; $800-9FF sta mliparam+3 ; hi byte of data buffer dec mliparam+4 ; lo byte of block number jsr SwapProDOS @@ -214,18 +216,11 @@ _optimum jsr mli jsr SwapProDOS - ;restore original pages + ;restore original disk location - dec gTrack - inc gSector - ldy #gRWTSParams - jsr $BD00 - inc gSector - inc gAddress+1 - ldy #gRWTSParams - jsr $BD00 + dec gTrack ; #0 + lda #$0F + sta gSector .exit } diff --git a/src/strings/en.a b/src/strings/en.a index 823a013..9418376 100755 --- a/src/strings/en.a +++ b/src/strings/en.a @@ -194,7 +194,7 @@ StringTable ; can be set directly before calling PrintByID. ; .header - !text "Passport by 4am 2017-02-12",00 + !text "Passport by 4am 2017-02-13",00 .mainmenu !text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D !text " "