mirror of
https://github.com/A2osX/A2osX.git
synced 2024-06-29 12:29:30 +00:00
Kernel 0.94+
This commit is contained in:
parent
f73e38b2d0
commit
41ca317460
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,10 +1,10 @@
|
||||||
NEW
|
NEW
|
||||||
AUTO 3,1
|
AUTO 3,1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
IO.D2.SeekTimeR .EQ 55 LIBBLKDEV Recalibration
|
IO.D2.SeekTimeR .EQ 45 LIBBLKDEV Recalibration
|
||||||
IO.D2.SeekTimeF .EQ 55 LIBBLKDEV Track Formatter
|
IO.D2.SeekTimeF .EQ 65 LIBBLKDEV Track Formatter
|
||||||
IO.D2.SeekTimeB .EQ 45 LIBBLKDEV Boot Block
|
IO.D2.SeekTimeB .EQ 55 LIBBLKDEV Boot Block
|
||||||
IO.D2.SeekTimeP .EQ 28 ProDOS.FX initial
|
IO.D2.SeekTimeP .EQ 15 ProDOS.FX initial
|
||||||
IO.D2.SeekTimeI .EQ 5 ProDOS.FX increment -> until > 128
|
IO.D2.SeekTimeI .EQ 5 ProDOS.FX increment -> until > 128
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
IO.D2.Ph0Off .EQ $C080
|
IO.D2.Ph0Off .EQ $C080
|
||||||
|
|
|
@ -271,7 +271,7 @@ BB.ReadBlock lda blok figure out track & sector.
|
||||||
lsr
|
lsr
|
||||||
lsr
|
lsr
|
||||||
sta BB.TargetTrk
|
sta BB.TargetTrk
|
||||||
|
*--------------------------------------
|
||||||
lda buff+1
|
lda buff+1
|
||||||
sta dbuf+1
|
sta dbuf+1
|
||||||
|
|
||||||
|
@ -337,10 +337,10 @@ BB.Seek lda BB.HdrTrk get track we're on
|
||||||
tay
|
tay
|
||||||
lda IO.D2.Ph0On,y we are on 0/4 or 2/4 track
|
lda IO.D2.Ph0On,y we are on 0/4 or 2/4 track
|
||||||
|
|
||||||
* lda #1
|
lda #1
|
||||||
* bra .9 no wait, next operation will be phy/plx/Ph0On,y
|
bra .9 no wait, next operation will be phy/plx/Ph0On,y
|
||||||
|
|
||||||
bra .90
|
* bra .90
|
||||||
|
|
||||||
.1
|
.1
|
||||||
* cmp BB.TargetQTrack we are on 1/4 or 3/4
|
* cmp BB.TargetQTrack we are on 1/4 or 3/4
|
||||||
|
|
|
@ -83,10 +83,10 @@ D2.MoveHead.SEI lda D2.CurrentQTrack
|
||||||
|
|
||||||
jsr .10 we are on 0/4 or 2/4 track
|
jsr .10 we are on 0/4 or 2/4 track
|
||||||
|
|
||||||
* lda #1
|
lda #1
|
||||||
* bra .9 no wait, next operation will be phy/plx/Ph0On,y
|
bra .9 no wait, next operation will be phy/plx/Ph0On,y
|
||||||
|
|
||||||
bra .90
|
* bra .90
|
||||||
|
|
||||||
.1 cmp D2.TargetQTrack we are on 1/4 or 3/4
|
.1 cmp D2.TargetQTrack we are on 1/4 or 3/4
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ D2.MoveHead.SEI lda D2.CurrentQTrack
|
||||||
|
|
||||||
sta D2.CurrentQTrack
|
sta D2.CurrentQTrack
|
||||||
|
|
||||||
bra .7 Ph ON to go to 0/4 or 2/4, then wait
|
bra .6 Ph ON to go to 0/4 or 2/4, then wait
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.3 bcs .4 if CS, C > T, must move out
|
.3 bcs .4 if CS, C > T, must move out
|
||||||
|
|
||||||
|
@ -116,6 +116,7 @@ D2.MoveHead.SEI lda D2.CurrentQTrack
|
||||||
bne .5 we must go to 1/4 or 3/4
|
bne .5 we must go to 1/4 or 3/4
|
||||||
|
|
||||||
lda IO.D2.Ph0Off,x we must go to 0/4 or 2/4 : Off Prev Ph
|
lda IO.D2.Ph0Off,x we must go to 0/4 or 2/4 : Off Prev Ph
|
||||||
|
* lda $C0EC
|
||||||
bra .8 go wait....
|
bra .8 go wait....
|
||||||
|
|
||||||
.5 phy we must go on 1/4 or 3/4
|
.5 phy we must go on 1/4 or 3/4
|
||||||
|
@ -125,13 +126,7 @@ D2.MoveHead.SEI lda D2.CurrentQTrack
|
||||||
|
|
||||||
inc CC: C < T, ON next PH
|
inc CC: C < T, ON next PH
|
||||||
|
|
||||||
* .HS B0 BCS
|
.6 jsr .10 now X and Y on
|
||||||
|
|
||||||
*.6 dec CS: C > T, ON prev PH
|
|
||||||
|
|
||||||
.6
|
|
||||||
|
|
||||||
.7 jsr .10 now X and Y on
|
|
||||||
|
|
||||||
.8 lda #IO.D2.SeekTimeF
|
.8 lda #IO.D2.SeekTimeF
|
||||||
|
|
||||||
|
@ -144,13 +139,16 @@ D2.MoveHead.SEI lda D2.CurrentQTrack
|
||||||
jsr D2.Wait25600usec
|
jsr D2.Wait25600usec
|
||||||
|
|
||||||
lda IO.D2.Ph0Off,x
|
lda IO.D2.Ph0Off,x
|
||||||
|
* lda $C0EC
|
||||||
lda IO.D2.Ph0Off,y
|
lda IO.D2.Ph0Off,y
|
||||||
|
* lda $C0EC
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.10 and #6
|
.10 and #6
|
||||||
ora D2.Slotn0
|
ora D2.Slotn0
|
||||||
tay
|
tay
|
||||||
lda IO.D2.Ph0On,y
|
lda IO.D2.Ph0On,y
|
||||||
|
* lda $C0EC
|
||||||
rts
|
rts
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # D2TrkRead16s
|
* # D2TrkRead16s
|
||||||
|
|
|
@ -34,7 +34,7 @@ XRW.START cld $D8 to flag language card bank 1 (main)
|
||||||
|
|
||||||
eor XRW.LastUnitUsed same slot as last ?
|
eor XRW.LastUnitUsed same slot as last ?
|
||||||
asl
|
asl
|
||||||
beq L59BD
|
beq XRW.Blk2TS
|
||||||
|
|
||||||
lda #$01
|
lda #$01
|
||||||
sta XRW.montimeh
|
sta XRW.montimeh
|
||||||
|
@ -42,37 +42,59 @@ XRW.START cld $D8 to flag language card bank 1 (main)
|
||||||
.1 lda XRW.LastUnitUsed
|
.1 lda XRW.LastUnitUsed
|
||||||
and #$70
|
and #$70
|
||||||
tax
|
tax
|
||||||
beq L59BD branch if no previous ever (boot only).
|
beq XRW.Blk2TS branch if no previous ever (boot only).
|
||||||
|
|
||||||
jsr XRW.CheckMotorOnX check if previous drive running.
|
jsr XRW.CheckMotorOnX check if previous drive running.
|
||||||
beq L59BD branch if stopped.
|
beq XRW.Blk2TS branch if stopped.
|
||||||
|
|
||||||
jsr XRW.Wait100usec
|
jsr XRW.Wait100usec
|
||||||
|
|
||||||
lda XRW.montimeh
|
lda XRW.montimeh
|
||||||
bne .1
|
bne .1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
L59BD lda bloknml
|
XRW.Blk2TS
|
||||||
ldx bloknml+1
|
lda bloknml
|
||||||
stx XRW.ReqTrack calculate block's track and sector.
|
sta XRW.ReqTrack
|
||||||
|
|
||||||
ldy #$05
|
and #7
|
||||||
|
cmp #4
|
||||||
|
php
|
||||||
|
and #3
|
||||||
|
asl
|
||||||
|
plp
|
||||||
|
rol
|
||||||
|
sta XRW.ReqSector
|
||||||
|
|
||||||
.1 asl
|
lda bloknml+1
|
||||||
rol XRW.ReqTrack
|
|
||||||
dey
|
ldx #3
|
||||||
|
|
||||||
|
.1 lsr
|
||||||
|
ror XRW.ReqTrack
|
||||||
|
dex
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
asl
|
* lda bloknml
|
||||||
bcc .2
|
* ldx bloknml+1
|
||||||
|
* stx XRW.ReqTrack calculate block's track and sector.
|
||||||
|
|
||||||
ora #$10 adjust for upper 4 bits of track
|
* ldy #$05
|
||||||
|
|
||||||
.2 lsr
|
*.1 asl
|
||||||
lsr
|
* rol XRW.ReqTrack
|
||||||
lsr
|
* dey
|
||||||
lsr
|
* bne .1
|
||||||
sta XRW.ReqSector
|
|
||||||
|
* asl
|
||||||
|
* bcc .2
|
||||||
|
|
||||||
|
* ora #$10 adjust for upper 4 bits of track
|
||||||
|
|
||||||
|
*.2 lsr
|
||||||
|
* lsr
|
||||||
|
* lsr
|
||||||
|
* lsr
|
||||||
|
* sta XRW.ReqSector
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
ldx A2L
|
ldx A2L
|
||||||
jsr XRW.ReadMode
|
jsr XRW.ReadMode
|
||||||
|
@ -115,7 +137,7 @@ L59BD lda bloknml
|
||||||
php Z set
|
php Z set
|
||||||
|
|
||||||
.5 plp was motor on ?
|
.5 plp was motor on ?
|
||||||
bne L538E if so, don't wait.
|
bne XRW.Cmd if so, don't wait.
|
||||||
|
|
||||||
* motor was off, wait for it to speed up
|
* motor was off, wait for it to speed up
|
||||||
|
|
||||||
|
@ -130,7 +152,7 @@ L59BD lda bloknml
|
||||||
jsr XRW.CheckMotorOn is drive present ?
|
jsr XRW.CheckMotorOn is drive present ?
|
||||||
beq XRW.E.ND
|
beq XRW.E.ND
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
L538E lda A4L get command #
|
XRW.Cmd lda A4L get command #
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
jsr XRW.TestWP 0 = status
|
jsr XRW.TestWP 0 = status
|
||||||
|
@ -737,9 +759,6 @@ XRW.TrackSelect lda #2
|
||||||
cmp XRW.ReqTrack2
|
cmp XRW.ReqTrack2
|
||||||
beq .8
|
beq .8
|
||||||
|
|
||||||
* lda #"S"
|
|
||||||
* sta $722
|
|
||||||
|
|
||||||
lda XRW.BadSeekCnt
|
lda XRW.BadSeekCnt
|
||||||
beq .6 2 bad seeks, already
|
beq .6 2 bad seeks, already
|
||||||
|
|
||||||
|
@ -785,15 +804,15 @@ XRW.SeekYA sta XRW.D2Trk-1,x will be current track at the end
|
||||||
jsr XRW.Trk2Qtrk
|
jsr XRW.Trk2Qtrk
|
||||||
sta XRW.CurrentQTrack
|
sta XRW.CurrentQTrack
|
||||||
|
|
||||||
bit #1 A = Current QT
|
|
||||||
bne .1
|
|
||||||
|
|
||||||
* cmp XRW.TargetQTrack
|
* cmp XRW.TargetQTrack
|
||||||
* bcc .88
|
* bcs .88
|
||||||
* >DEBUG
|
* >DEBUG
|
||||||
*.88
|
*.88
|
||||||
|
|
||||||
jsr .10 we are on 0/4 or 2/4 track
|
bit #1 A = Current QT
|
||||||
|
bne .1
|
||||||
|
|
||||||
|
jsr .10 we are on 0/4 or 2/4 track : PhY on
|
||||||
|
|
||||||
* lda #1
|
* lda #1
|
||||||
* bra .9 no wait, next operation will be phy/plx/Ph0On,y
|
* bra .9 no wait, next operation will be phy/plx/Ph0On,y
|
||||||
|
@ -812,7 +831,7 @@ XRW.SeekYA sta XRW.D2Trk-1,x will be current track at the end
|
||||||
|
|
||||||
sta XRW.CurrentQTrack
|
sta XRW.CurrentQTrack
|
||||||
|
|
||||||
bra .7 Ph ON to go to 0/4 or 2/4, then wait
|
bra .6 PhY ON to go to 0/4 or 2/4, then wait
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.3 bcs .4 if CS, C > T, must move out
|
.3 bcs .4 if CS, C > T, must move out
|
||||||
|
|
||||||
|
@ -827,8 +846,8 @@ XRW.SeekYA sta XRW.D2Trk-1,x will be current track at the end
|
||||||
bit #1
|
bit #1
|
||||||
bne .5 we must go to 1/4 or 3/4
|
bne .5 we must go to 1/4 or 3/4
|
||||||
|
|
||||||
lda IO.D2.Ph0Off,x we must go to 0/4 or 2/4 : Off Prev Ph
|
lda IO.D2.Ph0Off,x we must go to 0/4 or 2/4 : PhX Off
|
||||||
|
* lda $C0EC
|
||||||
bra .8 go wait....
|
bra .8 go wait....
|
||||||
|
|
||||||
.5 phy we must go on 1/4 or 3/4
|
.5 phy we must go on 1/4 or 3/4
|
||||||
|
@ -838,15 +857,7 @@ XRW.SeekYA sta XRW.D2Trk-1,x will be current track at the end
|
||||||
|
|
||||||
inc CC: C < T, ON next PH
|
inc CC: C < T, ON next PH
|
||||||
|
|
||||||
* useless, AND #6 will do it
|
.6 jsr .10 now X and Y on
|
||||||
|
|
||||||
* .HS B0 BCS
|
|
||||||
|
|
||||||
*.6 dec CS: C > T, ON prev PH
|
|
||||||
|
|
||||||
.6
|
|
||||||
|
|
||||||
.7 jsr .10 now X and Y on
|
|
||||||
|
|
||||||
.8 lda XRW.SeekTime
|
.8 lda XRW.SeekTime
|
||||||
|
|
||||||
|
@ -859,7 +870,9 @@ XRW.SeekYA sta XRW.D2Trk-1,x will be current track at the end
|
||||||
jsr XRW.Wait25600usec
|
jsr XRW.Wait25600usec
|
||||||
|
|
||||||
lda IO.D2.Ph0Off,x
|
lda IO.D2.Ph0Off,x
|
||||||
|
* lda $C0EC
|
||||||
lda IO.D2.Ph0Off,y
|
lda IO.D2.Ph0Off,y
|
||||||
|
* lda $C0EC
|
||||||
clc Exit wit CC (recalibrate)
|
clc Exit wit CC (recalibrate)
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
@ -867,27 +880,33 @@ XRW.SeekYA sta XRW.D2Trk-1,x will be current track at the end
|
||||||
ora A2L
|
ora A2L
|
||||||
tay
|
tay
|
||||||
lda IO.D2.Ph0On,y
|
lda IO.D2.Ph0On,y
|
||||||
|
* lda $C0EC
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* A = 0 -> 79, X = XRW.UnitIndex
|
* A = 0 -> 159, X = XRW.UnitIndex
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
XRW.Trk2Qtrk asl x2, CC
|
XRW.Trk2Qtrk sta pch
|
||||||
sta pch
|
|
||||||
|
|
||||||
bit XRW.D2VolNum-1,x
|
bit XRW.D2VolNum-1,x
|
||||||
bpl .1 < $80 : x4
|
bpl .1 < $80 : x4
|
||||||
|
|
||||||
bvs .2
|
bvs .2
|
||||||
|
|
||||||
lsr $80 < v < $BF : x3
|
asl $80 < v < $BF : x3
|
||||||
|
adc pch
|
||||||
.1 adc pch
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
.1 asl
|
||||||
|
asl
|
||||||
|
rts
|
||||||
|
|
||||||
|
* 2 sides :
|
||||||
|
|
||||||
.2 lda XRW.D2VolNum-1,x > $C0 : 2 heads
|
.2 lda XRW.D2VolNum-1,x > $C0 : 2 heads
|
||||||
lsr CS if 80trk
|
lsr CS : $C1 = 80, 2 heads
|
||||||
|
|
||||||
lda pch
|
lda pch
|
||||||
|
and #$FE
|
||||||
bcs .8 x2 for 80trk (ELITE III)
|
bcs .8 x2 for 80trk (ELITE III)
|
||||||
|
|
||||||
asl x4 for 40trk (ELITE II)
|
asl x4 for 40trk (ELITE II)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user