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

View File

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

View File

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

View File

@ -67,110 +67,113 @@ D2MoveHead >PULLB MoveTo
jsr CheckDiskII jsr CheckDiskII
bcs .9 bcs .9
lda MoveFrom
cmp MoveTo
beq .9
php php
sei 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 bcs .2
.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
* Current < Target, must move in * Current < Target, must move in
.2 inc inc
.HS B0 BCS
* Current > Target, must move out
.2 dec
sta MoveFrom sta MoveFrom
and #7 pha
tay
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 bcc .4
* move out : invert 2 phases
.3 lda D2.PhOut,y phx
tax
.4 ora Slotn0 pla
sta .5+1
.4 tay
lsr
bcc .5 lda IO.D2.Ph0On,x
nop
asl nop
ldx .7+1 lda IO.D2.Ph0On,y
stx .6+1
sta .7+1
.5 bit $C000
nop nop
nop nop
lda #IO.D2.SeekTimeF lda #IO.D2.SeekTimeF
jsr D2.Wait100usecA jsr D2.Wait100usecA
lda MoveFrom bra .1
cmp MoveTo
bne .1
jsr D2.Wait25600usec .7 jsr D2.Wait25600usec
.6 bit $C000 .8 bit IO.D2.Ph0Off,x
nop nop
nop nop
.7 bit $C000 ldx IO.D2.Ph0Off,y
nop nop
nop nop
plp
.9 clc
rts rts
*-------------------------------------- *--------------------------------------
D2.Wait25600usec D2.Wait25600usec
lda #0 lda #0
D2.Wait100usecA D2.Wait100usecA phx
.1 ldx #11 (2)
.2 bit $C0EC .1 ldx Slotn0 (3)
dex (2) bit IO.D2.RData,x (4)
ldx #18 (2)
.2 dex (2)
bne .2 (3) bne .2 (3)
dec (2) dec (2)
bne .1 (3) bne .1 (3)
plx
rts (6) rts (6)
*/-------------------------------------- */--------------------------------------
* # D2TrkRead16s * # 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. * if no error, acc=uncertain, x=unchanged, y=0, carry clear.
*-------------------------------------- *--------------------------------------
.LIST ON .LIST ON
XRW.Write sec XRW.Write lda IO.D2.ReadProt,x PREWRITE MODE
.LIST OFF .LIST OFF
lda IO.D2.ReadProt,x PREWRITE MODE
lda IO.D2.ReadMode,x lda IO.D2.ReadMode,x
bpl .1 * sec
* bpl .1
jmp XRW.ReadMode * jmp XRW.ReadMode
.1 lda nbuf2 .1 lda nbuf2
sta pcl sta pcl
@ -555,10 +555,13 @@ XRW.Wait25600usec
lda #0 lda #0
XRW.Wait100usecA XRW.Wait100usecA
phx phx
.1 ldx #10 (2)
.1 ldx A2L (3)
bit IO.D2.RData,x (4)
ldx #16 (2)
.2 bit $C0EC (4) .2 dex (2)
dex (2)
bne .2 (3) bne .2 (3)
inc XRW.montimel (6) inc XRW.montimel (6)
@ -814,11 +817,11 @@ XRW.Seek ldx XRW.UnitIndex
.8 bit IO.D2.Ph0Off,x .8 bit IO.D2.Ph0Off,x
nop nop
nop nop
ldx IO.D2.Ph0Off,y ldx IO.D2.Ph0Off,y
nop nop
nop nop
rts rts
*-------------------------------------- *--------------------------------------
XRW.Reset ldx A2L XRW.Reset ldx A2L