From db9a28925c034f1e9fa7b216b2b911c7bcbcb8f9 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Mon, 14 Dec 2015 11:49:32 -0800 Subject: [PATCH] support reading into zpage --- QBOOT.S | 18 ++++++++++++++++++ README.md | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/QBOOT.S b/QBOOT.S index 04c80b9..8761048 100644 --- a/QBOOT.S +++ b/QBOOT.S @@ -9,7 +9,11 @@ firstsec = $d1 ;user-defined, first sector to read address = $d1 ;user-defined entry = $d1d1 ;user-defined + zpread = 0 ;set to 1 to allow reading into zero page + ;relies on memory wraparound, not supported on IIGS + ;also precludes reading to page $FF stkread = 0 ;set to 1 to allow reading into stack page + ;but remember about the 6 bytes of stack seekback = 0 ;set to 1 to enable seek backwards version = 1 @@ -177,10 +181,15 @@ inittrk startsec ldy #$d1 +!if zpread { + inc tmpadr+1 +} tmpadr - lda #$d1 sta addrtbl, y +!if !zpread { inc tmpadr+1 +} iny dec partial1 bne - @@ -211,20 +220,29 @@ read ldx addrtbl, y ;fetch corresponding address beq read sta sector+1 ;store index for later +!if zpread { + stx adrpatchx6+2 + dex +} stx adrpatchx5+2 stx adrpatch6+2 stx adrpatchx1+2 stx adrpatchx2+2 stx adrpatchx3+2 stx adrpatchx4+2 +!if !zpread { inx stx adrpatchx6+2 dex +} dex stx adrpatch3+2 stx adrpatch5+2 !if stkread { inx + !if zpread { + inx + } } ldy #$fe adrpatchx5 diff --git a/README.md b/README.md index b53d6b0..296888e 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ - can perform full-track read in one revolution - no zpage usage after init, and only 6 bytes of stack - only 2 bytes overhead per read -- can load up to $bc sectors at a time ($0100-bcff) +- can load up to $bd sectors at a time ($0000-bcff) + (or $c0 sectors if run from banked ROM) - DOS 3.3 Launcher compatible - requires only 3 pages in memory