Kernel 0.94

This commit is contained in:
Rémy GIBERT 2020-11-24 18:49:46 +01:00
parent f8d5dc8deb
commit da8ca2414c
8 changed files with 128 additions and 95 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -199,7 +199,7 @@ CS.RUN.Format jsr CS.RUN.GetDevStatus
>LDYA L.MSG.OK
>SYSCALL PutS
bcs .9
>DEBUG
>DEBUGOA
.8 >PUSHB DSSS0000
>PUSHW pData
>SYSCALL Online
@ -394,7 +394,7 @@ CS.RUN.LL.DISKII
bpl .80
jsr CS.RUN.LL.DISKII.V
>DEBUG
>DEBUGOA
bcs .9
.80 jmp CS.RUN.MotorOff

View File

@ -4,7 +4,7 @@ NEW
IO.D2.SeekTimeR .EQ 140 LIBBLKDEV Recalibration
IO.D2.SeekTimeF .EQ 70 LIBBLKDEV Track Formatter
IO.D2.SeekTimeB .EQ 70 LIBBLKDEV Boot Block
IO.D2.SeekTimeP .EQ 70 ProDOS.FX initial
IO.D2.SeekTimeP .EQ 55 ProDOS.FX initial
IO.D2.SeekTimeI .EQ 10 ProDOS.FX increment -> until > 128
*--------------------------------------
IO.D2.Ph0Off .EQ $C080

View File

@ -239,9 +239,6 @@ goread lda iobuff
sta buff+1
jmp (dent)
*--------------------------------------
BB.PhX .HS 00
BB.Phy .HS 0002020404060600
*--------------------------------------
mods .DA #mod1,#mod2,#mod3,#mod4,#mod5,#mod6,#mod7,#mod8,#mod8+1,#mod9
mods.cnt .EQ *-mods
chgs .DA #chg1,#chg2,#chg3,#chg4,#chg5,#chg6,#chg7,#$91,#BB.HdrPtr,#BB.HdrTrk
@ -309,7 +306,7 @@ BB.Seek lda BB.HdrTrk get track we're on
ldy BB.Slotn0
.1 jsr BB.PhasesOff
bcs .2
* Current < Target, must move in
@ -324,25 +321,50 @@ BB.Seek lda BB.HdrTrk get track we're on
sta BB.CurrentQTrack
and #7
tax
lda BB.PhY,x
ora BB.Slotn0
tay
lda BB.PhX,x
pha
and #6
ora BB.Slotn0
tax
php
sei
pla
bcs .3
* Current < Target, must move in
inc
.HS B0 BCS
* Current > Target, must move out
.3 dec
and #6
ora BB.Slotn0
bcc .4
* move out : invert 2 phases
phx
tax
pla
.4 tay
lda IO.D2.Ph0On,x
nop
nop
lda IO.D2.Ph0On,y
plp
nop
nop
lda #IO.D2.SeekTimeB
jsr BB.Wait
lda BB.CurrentQTrack
.6 lda BB.CurrentQTrack
cmp BB.TargetQTrack
bne .1
@ -353,17 +375,22 @@ BB.Seek lda BB.HdrTrk get track we're on
jsr BB.PhasesOff
bra BB.Read
*--------------------------------------
BB.PhasesOff php
sei
bit IO.D2.Ph0Off,x
BB.PhasesOff bit IO.D2.Ph0Off,x
nop
nop
ldx IO.D2.Ph0Off,y
plp
nop
nop
rts
*--------------------------------------
BB.Wait phx (3)
.1 ldx #20 (2)
.1 ldx BB.Slotn0 (3)
bit IO.D2.RData,x (4)
ldx #18 (2)
.2 dex (2)
bne .2 (3)

View File

@ -67,110 +67,113 @@ D2MoveHead >PULLB MoveTo
jsr CheckDiskII
bcs .9
lda MoveFrom
cmp MoveTo
beq .9
php
sei
jsr D2MoveHead.SEI
plp
clc
.9 rts
pha
bcs .10
D2MoveHead.SEI ldx Slotn0
ldy Slotn0
.1 lda MoveFrom
cmp MoveTo
beq .7
jsr .8
inc
.10 and #6
ora Slotn0
tax
ora #$80
sta .7+1
stz .6+1
bit IO.D2.Ph0On,x
nop
nop
pla
.1 bcc .2
* Current > Target, must move out
dec
.HS 90 BCC
bcs .2
* Current < Target, must move in
.2 inc
inc
.HS B0 BCS
* Current > Target, must move out
.2 dec
sta MoveFrom
and #7
tay
pha
bcs .3
and #6
ora Slotn0
tax
lda D2.PhIn,y
pla
bcs .3
* Current < Target, must move in
inc
.HS B0 BCS
* Current > Target, must move out
.3 dec
and #6
ora Slotn0
bcc .4
* move out : invert 2 phases
.3 lda D2.PhOut,y
.4 ora Slotn0
sta .5+1
lsr
bcc .5
asl
ldx .7+1
stx .6+1
sta .7+1
.5 bit $C000
phx
tax
pla
.4 tay
lda IO.D2.Ph0On,x
nop
nop
lda IO.D2.Ph0On,y
nop
nop
lda #IO.D2.SeekTimeF
jsr D2.Wait100usecA
lda MoveFrom
cmp MoveTo
bne .1
bra .1
jsr D2.Wait25600usec
.7 jsr D2.Wait25600usec
.6 bit $C000
.8 bit IO.D2.Ph0Off,x
nop
nop
.7 bit $C000
ldx IO.D2.Ph0Off,y
nop
nop
plp
.9 clc
rts
*--------------------------------------
D2.Wait25600usec
lda #0
D2.Wait100usecA
.1 ldx #11 (2)
D2.Wait100usecA phx
.2 bit $C0EC
dex (2)
.1 ldx Slotn0 (3)
bit IO.D2.RData,x (4)
ldx #18 (2)
.2 dex (2)
bne .2 (3)
dec (2)
bne .1 (3)
plx
rts (6)
*/--------------------------------------
* # D2TrkRead16s

View File

@ -380,13 +380,13 @@ L596F ldy #$FF index to last byte of data to write.
* if no error, acc=uncertain, x=unchanged, y=0, carry clear.
*--------------------------------------
.LIST ON
XRW.Write sec
XRW.Write lda IO.D2.ReadProt,x PREWRITE MODE
.LIST OFF
lda IO.D2.ReadProt,x PREWRITE MODE
lda IO.D2.ReadMode,x
bpl .1
* sec
* bpl .1
jmp XRW.ReadMode
* jmp XRW.ReadMode
.1 lda nbuf2
sta pcl
@ -555,10 +555,13 @@ XRW.Wait25600usec
lda #0
XRW.Wait100usecA
phx
.1 ldx #10 (2)
.1 ldx A2L (3)
bit IO.D2.RData,x (4)
ldx #16 (2)
.2 bit $C0EC (4)
dex (2)
.2 dex (2)
bne .2 (3)
inc XRW.montimel (6)
@ -814,11 +817,11 @@ XRW.Seek ldx XRW.UnitIndex
.8 bit IO.D2.Ph0Off,x
nop
nop
ldx IO.D2.Ph0Off,y
nop
nop
rts
*--------------------------------------
XRW.Reset ldx A2L