diff --git a/.Floppies/A2OSX.BOOTHD.woz b/.Floppies/A2OSX.BOOTHD.woz index be0bed85..b9e72c4b 100644 Binary files a/.Floppies/A2OSX.BOOTHD.woz and b/.Floppies/A2OSX.BOOTHD.woz differ diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 8b5767cb..8742490f 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/.Floppies/A2OSX.TEST.po b/.Floppies/A2OSX.TEST.po index 4a6fd7c7..99b1c25d 100644 Binary files a/.Floppies/A2OSX.TEST.po and b/.Floppies/A2OSX.TEST.po differ diff --git a/BIN/FORMAT.S.txt b/BIN/FORMAT.S.txt index ab776e76..f935697b 100644 --- a/BIN/FORMAT.S.txt +++ b/BIN/FORMAT.S.txt @@ -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 diff --git a/INC/IO.D2.I.txt b/INC/IO.D2.I.txt index 6416a61a..04793f2c 100644 --- a/INC/IO.D2.I.txt +++ b/INC/IO.D2.I.txt @@ -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 diff --git a/LIB/LIBBLKDEV.S.BB.txt b/LIB/LIBBLKDEV.S.BB.txt index 13b77eaf..77529b5a 100644 --- a/LIB/LIBBLKDEV.S.BB.txt +++ b/LIB/LIBBLKDEV.S.BB.txt @@ -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) diff --git a/LIB/LIBBLKDEV.S.D2.txt b/LIB/LIBBLKDEV.S.D2.txt index 465e4120..f3919831 100644 --- a/LIB/LIBBLKDEV.S.D2.txt +++ b/LIB/LIBBLKDEV.S.D2.txt @@ -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 diff --git a/ProDOS.FX/ProDOS.S.XRW.txt b/ProDOS.FX/ProDOS.S.XRW.txt index dd6ad259..0331b0d1 100644 --- a/ProDOS.FX/ProDOS.S.XRW.txt +++ b/ProDOS.FX/ProDOS.S.XRW.txt @@ -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