mirror of https://github.com/peterferrie/qboot.git
improved DOS 3.3 Launcher support
This commit is contained in:
parent
db9a28925c
commit
e916e1df97
|
@ -0,0 +1,41 @@
|
|||
;qboot DOS 3.3 default launcher support
|
||||
;copyright (c) Peter Ferrie 2016
|
||||
;assemble using ACME
|
||||
!cpu 6502
|
||||
!to "dos33l",plain
|
||||
;place on sector 1
|
||||
*=$BF00
|
||||
stx sectors
|
||||
sta address
|
||||
lda phase
|
||||
lsr
|
||||
sta track
|
||||
- sty index + 1
|
||||
lda xlatsec, y
|
||||
sta sector
|
||||
lda #>iocb
|
||||
ldy #<iocb
|
||||
jsr $bd00
|
||||
index ldy #0
|
||||
iny
|
||||
tya
|
||||
and #$0f
|
||||
tay
|
||||
bne +
|
||||
inc track
|
||||
+ inc address
|
||||
bcc +
|
||||
phase !byte $d1 ;set by bootsector if qboot loaded to $be00
|
||||
+ dec sectors
|
||||
bne -
|
||||
rts
|
||||
|
||||
sectors !byte $d1
|
||||
xlatsec !byte 0, 7, $e, 6, $d, 5, $c, 4, $b, 3, $a, 2, 9, 1, 8, $f
|
||||
iocb !byte 1, $60, 1, 0
|
||||
track !byte $d1
|
||||
sector !byte $d1
|
||||
!byte <dct, >dct, 0
|
||||
address !byte $d1
|
||||
!byte 0, 0, 1, 0, 0, $60, 1
|
||||
dct !byte 1, $ef, $d8, 0
|
|
@ -0,0 +1,38 @@
|
|||
;qboot DOS 3.3 relocated launcher support
|
||||
;copyright (c) Peter Ferrie 2016
|
||||
;assemble using ACME
|
||||
!cpu 6502
|
||||
!to "dos33l",plain
|
||||
;place on sector 1
|
||||
*=$BF00
|
||||
firsttrk = $d1 ;user-defined, first track to read
|
||||
|
||||
stx sectors
|
||||
sta address
|
||||
- sty index + 1
|
||||
lda xlatsec, y
|
||||
sta sector
|
||||
lda #>iocb
|
||||
ldy #<iocb
|
||||
jsr $bd00
|
||||
index ldy #0
|
||||
iny
|
||||
tya
|
||||
and #$0f
|
||||
tay
|
||||
bne +
|
||||
inc track
|
||||
+ inc address
|
||||
dec sectors
|
||||
bne -
|
||||
rts
|
||||
|
||||
sectors !byte $d1
|
||||
xlatsec !byte 0, 7, $e, 6, $d, 5, $c, 4, $b, 3, $a, 2, 9, 1, 8, $f
|
||||
iocb !byte 1, $60, 1, 0
|
||||
track !byte firsttrk
|
||||
sector !byte $d1
|
||||
!byte <dct, >dct, 0
|
||||
address !byte $d1
|
||||
!byte 0, 0, 1, 0, 0, $60, 1
|
||||
dct !byte 1, $ef, $d8, 0
|
46
QBOOT.S
46
QBOOT.S
|
@ -1,5 +1,5 @@
|
|||
;fast seek/multi-read
|
||||
;copyright (c) Peter Ferrie 2015
|
||||
;copyright (c) Peter Ferrie 2015-16
|
||||
;assemble using ACME
|
||||
!cpu 6502
|
||||
!to "qboot",plain
|
||||
|
@ -67,6 +67,10 @@
|
|||
ldy #$7f
|
||||
bne + ;branch always
|
||||
*=$839
|
||||
lda #>(entry-1)
|
||||
pha
|
||||
lda #<(entry-1)
|
||||
pha
|
||||
jsr preread
|
||||
jmp $bf00 ;DOS 3.3 launcher entrypoint
|
||||
|
||||
|
@ -122,28 +126,42 @@ indextbl ;the 0 also terminates the patchtbl list!
|
|||
iny
|
||||
cpy #3
|
||||
bcc --
|
||||
|
||||
preread
|
||||
|
||||
lda #>(entry-1)
|
||||
pha
|
||||
lda #<(entry-1)
|
||||
pha
|
||||
jsr preread
|
||||
|
||||
!if seekback { ;no room to do this in the routine
|
||||
sty startsec+1
|
||||
sta tmpadr+1
|
||||
stx total+1
|
||||
}
|
||||
jmp seekread
|
||||
|
||||
preread
|
||||
|
||||
;copy post-read if necessary
|
||||
;push post-read address here
|
||||
; pla
|
||||
; tax
|
||||
; pla
|
||||
; tay
|
||||
; lda #>(postread-1)
|
||||
; pha
|
||||
; lda #<(postread-1)
|
||||
; pha
|
||||
; tya
|
||||
; pha
|
||||
; txa
|
||||
; pha
|
||||
|
||||
lda #<(firsttrk*2)
|
||||
sta phase+1
|
||||
ldx #sectors
|
||||
ldy #address
|
||||
lda #firstsec
|
||||
!if seekback { ;no room to do this in the routine
|
||||
sta startsec+1
|
||||
stx total+1
|
||||
sty tmpadr+1
|
||||
}
|
||||
jmp seekread
|
||||
lda #address
|
||||
ldy #firstsec
|
||||
rts
|
||||
|
||||
*=$8fe
|
||||
!byte $be, 1
|
||||
|
@ -163,9 +181,9 @@ slotpatch1
|
|||
|
||||
seekread
|
||||
!if seekback=0 {
|
||||
sta startsec+1
|
||||
sty startsec+1
|
||||
sta tmpadr+1
|
||||
stx total+1
|
||||
sty tmpadr+1
|
||||
}
|
||||
|
||||
inittrk
|
||||
|
|
Loading…
Reference in New Issue