Skip to content

Commit

Permalink
support reading into zpage
Browse files Browse the repository at this point in the history
  • Loading branch information
peterferrie committed Dec 14, 2015
1 parent 32a562b commit db9a289
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
18 changes: 18 additions & 0 deletions QBOOT.S
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 -
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit db9a289

Please sign in to comment.