diff --git a/.Floppies/A2OSX.BLANK.woz b/.Floppies/A2OSX.BLANK.woz index 0b4335bb..7199e9ac 100644 Binary files a/.Floppies/A2OSX.BLANK.woz and b/.Floppies/A2OSX.BLANK.woz differ diff --git a/.Floppies/A2OSX.BOOT.woz b/.Floppies/A2OSX.BOOT.woz index b4789e92..9508c7d7 100644 Binary files a/.Floppies/A2OSX.BOOT.woz and b/.Floppies/A2OSX.BOOT.woz differ diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 4cb46d4c..83d56e19 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/.Floppies/A2OSX.MAKE.po b/.Floppies/A2OSX.MAKE.po index b45c6bb7..253d4880 100644 Binary files a/.Floppies/A2OSX.MAKE.po and b/.Floppies/A2OSX.MAKE.po differ diff --git a/.Floppies/A2OSX.TEST.po b/.Floppies/A2OSX.TEST.po index ea25b377..9b6688de 100644 Binary files a/.Floppies/A2OSX.TEST.po and b/.Floppies/A2OSX.TEST.po differ diff --git a/BIN/CHMOD.S.txt b/BIN/CHMOD.S.txt index cd168511..31abb449 100644 --- a/BIN/CHMOD.S.txt +++ b/BIN/CHMOD.S.txt @@ -3,7 +3,7 @@ NEW .LIST OFF .OP 65C02 .OR $2000 - .TF BIN/CHMOD + .TF bin/chmod *-------------------------------------- .INB INC/MACROS.I .INB INC/A2OSX.I diff --git a/BIN/FORMAT.S.txt b/BIN/FORMAT.S.txt index 87a3bbc7..084d42f8 100644 --- a/BIN/FORMAT.S.txt +++ b/BIN/FORMAT.S.txt @@ -598,6 +598,8 @@ hLIBBLKDEV .BS 1 *-------------------------------------- MSG.USAGE .AS "Usage : FORMAT [VOLUME.NAME]\r\n" .AS " -L : Low-Level Format\r\n" + .AS " -H : 35trk drives, High Density: 47 tracks, 376 Blocks\r\n" + .AS " -X : 40trk drives, 320 Blocks, combined with -H = 432 Blocks\r\n" .AS " -B xxxx : override Device block size\r\n" .AZ " -1-9 : Catalog Size (Blocks)\r\n" MSG.OK .AZ "[OK]" @@ -607,7 +609,7 @@ MSG.NOSIZE .AZ "Unable to get media size." MSG.INIT .AZ "Formatting %s, Volname:%s\r\n" MSG.LL .AZ "Low Level Format %D Blks\r\n" MSG.LLDISK2 .AZ "\rWriting Track %02d (%02d/%02d)..." -MSG.VERIFY .AZ "\rVerifying Track %02d, Block:%05D..." +MSG.VERIFY .AZ "\rVerifying Track %02d, Block %05D..." MSG.WRITECAT .AZ "Writing Catalog..." FMT.BLANK .AZ "BLANK%H%H" *-------------------------------------- diff --git a/BIN/HTTPGET.S.txt b/BIN/HTTPGET.S.txt index 8c78d16d..ccf6d76a 100644 --- a/BIN/HTTPGET.S.txt +++ b/BIN/HTTPGET.S.txt @@ -176,11 +176,10 @@ CS.RUN.HOSTOK >INC.G ArgIndex >SYSCALL ArgV bcs .9 - pha - >PUSHWZ Aux type - >PUSHBI S.FI.T.TXT + >PUSHYA >PUSHBI O.RDONLY - pla + >PUSHBI S.FI.T.TXT + >PUSHWZ Aux type >SYSCALL LoadTxtFile bcs .9 diff --git a/BIN/MKDIR.S.txt b/BIN/MKDIR.S.txt index fa07cec7..88128470 100644 --- a/BIN/MKDIR.S.txt +++ b/BIN/MKDIR.S.txt @@ -35,11 +35,16 @@ CS.INIT clc CS.RUN lda #1 >SYSCALL ArgV bcs .99 + + >PUSHYA + >PUSHWI S.STAT.MODE.FO+S.STAT.MODE.FG+S.STAT.MODE.FU >SYSCALL MKDir bcs .9 + lda #0 sec .9 rts + .99 lda #E.SYN sec rts diff --git a/BIN/NSCUTIL.S.txt b/BIN/NSCUTIL.S.txt index eca82a63..79ed12aa 100644 --- a/BIN/NSCUTIL.S.txt +++ b/BIN/NSCUTIL.S.txt @@ -59,8 +59,8 @@ CS.RUN.READ jsr NSC.Init dex bpl .1 + >PUSHW L.MSG.READ.KO >PUSHBI 0 - >LDYA L.MSG.READ.KO >SYSCALL PrintF lda #MLI.E.NODEV sec @@ -68,8 +68,8 @@ CS.RUN.READ jsr NSC.Init .8 jsr NSC.Dump + >PUSHW L.MSG.USAGE >PUSHBI 0 - >LDYA L.MSG.USAGE >SYSCALL PrintF lda #0 tell TSKMGR that all done ok, but sec we do not want to stay in memory @@ -235,42 +235,51 @@ NSC.Write php .99 plp rts *-------------------------------------- -NSC.Dump ldx #1 +NSC.Dump >PUSHW L.MSG.READ.OK1 + ldx #1 ldy #1 lda DS1216E.DATA+3 bit #%00010000 beq .1 + dex .1 bit #%00100000 + beq .2 dey -.2 txa + +.2 tya >PUSHA - tya + txa >PUSHA + >PUSHBI 2 - >LDYA L.MSG.READ.OK1 >SYSCALL PrintF - >PUSHBI 2 + >LDYA L.MSG.READ.OK2.24 bit DS1216E.DATA+4 bpl .3 >LDYA L.MSG.READ.OK2.12 -.3 >SYSCALL PrintF +.3 >SYSCALL PutS + >PUSHBI 0 >LDYA L.MSG.READ.OK3 >SYSCALL PrintF lda DS1216E.DATA jsr PrintBCD + lda #'/' >SYSCALL PutChar + lda DS1216E.DATA+1 jsr PrintBCD + lda #'/' >SYSCALL PutChar + lda DS1216E.DATA+2 jsr PrintBCD @@ -283,21 +292,26 @@ NSC.Dump ldx #1 .4 and #$3F jsr PrintBCD + lda #':' >SYSCALL PutChar + lda DS1216E.DATA+5 jsr PrintBCD + lda #':' >SYSCALL PutChar + lda DS1216E.DATA+6 jsr PrintBCD + * lda #'.' * >SYSCALL PutChar * lda DS1216E.DATA+7 * jsr PrintBCD + >PUSHW L.MSG.CRLF >PUSHBI 0 - >LDYA L.MSG.CRLF >SYSCALL PrintF rts *-------------------------------------- @@ -345,7 +359,7 @@ MSG.READ.KO .AZ "DS1216E Not Detected.\r\n" MSG.READ.OK1 .AZ "DS1216E Detected : /OSC=%d, /RST=%d, mode=" MSG.READ.OK2.12 .AZ "am/pm" MSG.READ.OK2.24 .AZ "24h" -MSG.READ.OK3 .AZ "\r\n\r\nCurrent Date/Time : " +MSG.READ.OK3 .AZ "\r\nCurrent Date/Time : " MSG.USAGE .AS "\r\nTo Reset the chip and set clock, type:\r\nNSCUTIL YY/MM/DD,hh:mm:ss" MSG.CRLF .AZ "\r\n" DS1216E.PATTERN .HS 5CA33AC55CA33AC5 Reverted 7->0 diff --git a/BIN/WC.S.txt b/BIN/WC.S.txt index 8af48466..e0b25336 100644 --- a/BIN/WC.S.txt +++ b/BIN/WC.S.txt @@ -82,8 +82,8 @@ CS.RUN >INC.G ArgIndex jsr CS.RUN.CheckOpt bcc CS.RUN -.9 >PUSHBI 0 - >LDYA L.MSG.USAGE +.9 >PUSHW L.MSG.USAGE + >PUSHBI 0 >SYSCALL PrintF lda #E.SYN sec @@ -316,9 +316,9 @@ CS.RUN.FILE.LOOP *-------------------------------------- CS.RUN.CheckErr bcc .9 pha + >PUSHW L.MSG.ERR >PUSHA >PUSHBI 1 - >LDYA L.MSG.ERR >SYSCALL PrintF lda bContinue eor #$80 @@ -339,18 +339,21 @@ CS.RUN.GetFilePath *-------------------------------------- CS.RUN.OpenFile ldx #12 ldy #fCharCount + lda #0 + .1 sta (pData),y iny dex bne .1 - >PUSHWZ Aux type - >PUSHBI 0 Type + + >PUSHW ZPFullPath >PUSHBI O.RDONLY+O.TEXT - >LDYA ZPFullPath - + >PUSHBI 0 Type + >PUSHWZ Aux type >SYSCALL FOpen bcs .9 + >STA.G hFile .9 rts diff --git a/BIN/X.CPMVRM.S.txt b/BIN/X.CPMVRM.S.txt index 4631eba5..fdcf21d3 100644 --- a/BIN/X.CPMVRM.S.txt +++ b/BIN/X.CPMVRM.S.txt @@ -497,10 +497,13 @@ CS.RUN.Rename ldy #hSrcFullPath *-------------------------------------- .DO X.COPY.TO.DEST=1 CS.RUN.CopyStart + >STZ.G hSrcFile + >STA.G hDstFile + ldy #hSrcFullPath lda #O.RDONLY jsr CS.RUN.Open - bcs .99 + bcs .9 >STA.G hSrcFile @@ -518,14 +521,8 @@ CS.RUN.CopyStart clc rts -.9 pha - >LDA.G hSrcFile - >SYSCALL FClose - pla - sec - -.99 >STA.G CopyRC - rts +.9 >STA.G CopyRC + jmp CS.RUN.CopyEnd *-------------------------------------- CS.RUN.Open pha Save open mode jsr CS.RUN.GetPathY @@ -558,41 +555,49 @@ CS.RUN.Copy >STZ.G hCopyBuf >LDA.G hSrcFile >SYSCALL FRead bcc .1 + cmp #MLI.E.EOF bne .9 + lda #0 bra .9 + .1 >PUSHYA Bytes To Write >PUSHW ZPPtr1 Src Ptr >LDA.G hDstFile >SYSCALL FWrite bcs .9 + >LDA.G hCopyBuf >SYSCALL FreeMem + ldy #bQuiet lda (pData),y bmi .8 lda #'.' >SYSCALL PutChar - rts -.8 clc - rts +.8 rts + .9 ldy #CopyRC sta (pData),y >LDA.G hCopyBuf beq CS.RUN.CopyEnd + >SYSCALL FreeMem *-------------------------------------- -CS.RUN.CopyEnd >LDA.G hSrcFile +CS.RUN.CopyEnd php + pha + >LDA.G hSrcFile >SYSCALL FClose >LDA.G hDstFile >SYSCALL FClose >STZ.G bCopy - clc + pla + plp rts .FIN *-------------------------------------- @@ -679,11 +684,7 @@ CS.QUIT jsr LeaveSubDir >LDA.G bCopy bpl .1 - >LDA.G hSrcFile - >SYSCALL FClose - - >LDA.G hDstFile - >SYSCALL FClose + jsr CS.RUN.CopyEnd .1 ldy #hDstFullPath jsr .7 diff --git a/DRV/X.SSC.DRV.S.txt b/DRV/X.SSC.DRV.S.txt index 4f616c3b..88e05a32 100644 --- a/DRV/X.SSC.DRV.S.txt +++ b/DRV/X.SSC.DRV.S.txt @@ -52,8 +52,10 @@ Dev.Detect >STYA ARGS >LDYA L.MSG.DETECT >SYSCALL PutS stz ZPArgPtr + lda #$C1 sta ZPArgPtr+1 + .1 and #$0f tay lda A2osX.S,y @@ -65,9 +67,12 @@ Dev.Detect >STYA ARGS lda (ZPArgPtr),y cmp DEVSIG.Value,x bne .3 + dex bpl .2 + bra .4 + .3 inc FD.DEV.NAME+3 inc ZPArgPtr+1 no match, try next slot.... lda ZPArgPtr+1 @@ -121,39 +126,48 @@ Dev.ParseArgs >LDYA ARGS >STYA ZPArgPTR lda (ZPArgPTR) bne .1 + clc rts + .1 stz ZPhParity stz ZPhControl + >LDYAI 256 >SYSCALL GetMem bcs .2 + >STYA ZPParityPtr stx ZPhParity + >LDYAI 256 >SYSCALL GetMem + .2 bcs .90 + >STYA ZPControlPtr stx ZPhControl >PUSHW ZPArgPtr >PUSHW L.SSCANF.ARGS - >PUSHW ZPControlPtr - >PUSHW ZPParityPtr - >PUSHW L.DCB.STOP - >PUSHW L.DCB.DATA >PUSHW L.DCB.BAUD + >PUSHW L.DCB.DATA + >PUSHW L.DCB.STOP + >PUSHW ZPParityPtr + >PUSHW ZPControlPtr >PUSHBI 10 5 x byte PTRs >SYSCALL sscanf - bcs .90 + .90 lda ZPhControl beq .91 + >SYSCALL FreeMem .91 lda ZPhParity beq .92 + >SYSCALL FreeMem .92 lda #E.SYN diff --git a/LIB/LIBBLKDEV.S.BB.txt b/LIB/LIBBLKDEV.S.BB.txt index 1ea7573e..ed5df272 100644 --- a/LIB/LIBBLKDEV.S.BB.txt +++ b/LIB/LIBBLKDEV.S.BB.txt @@ -256,7 +256,7 @@ endcode ldx slotz jmp seek *-------------------------------------- -BB.MSG.ERR .AS -"BOOT ERROR" +BB.MSG.ERR .AS -"ERROR" BB.MSG.ERR.Len .EQ *-BB.MSG.ERR BB.ProDOS .DA #$26 $20 = storage type + 6 = "PRODOS" len .AS "PRODOS" @@ -323,40 +323,45 @@ seek lda BB.HdrTrk get track we're on jsr BB.PhaseOn - lda #40 + lda #60 jsr BB.MSWait Trash X ldx slotz lda IO.D2.Ph0Off,x - nop lda IO.D2.Ph1Off,x - nop lda IO.D2.Ph2Off,x - nop lda IO.D2.Ph3Off,x - - lda #60 - jsr BB.MSWait Trash X - bcs .1 CS from MSWAIT + bra .1 65c02 *-------------------------------------- -BB.PhaseOn pha - jsr .7 - pla - - bit #1 1,3,5,7 ? - beq .8 +BB.PhaseOn bit #1 1,3,5,7 ? + beq .7 - inc 2,4,6,0 + pha + + bcs .1 move out,start by+1 + + jsr .7 + + pla + +.1 inc 2,4,6,0 + + jsr .7 + + bcc BB.MSWait.RTS + + pla .7 and #6 mask for 0,2,4,6 ora slotz Slot $n0 tax lda IO.D2.Ph0On,x turn on one phase -.8 rts + lda #1 *-------------------------------------- -BB.MSWait sec (6) JSR (2) +BB.MSWait php + sec (6) JSR (2) -.1 ldx #17 (2) +.1 ldx #19 (2) .2 dex (2) delay 86 usec. bne .2 (2+) 2 + 5x16 + 2 + 2 @@ -364,7 +369,9 @@ BB.MSWait sec (6) JSR (2) sbc #1 (2) done 'n' intervals? bne .1 (2+) a-reg counts - rts (6) + plp + +BB.MSWait.RTS rts (6) *-------------------------------------- BB.Trk2Qtrk asl x2 sta .1+1 diff --git a/LIB/LIBBLKDEV.S.D2.txt b/LIB/LIBBLKDEV.S.D2.txt index c361ed7f..6ff16c09 100644 --- a/LIB/LIBBLKDEV.S.D2.txt +++ b/LIB/LIBBLKDEV.S.D2.txt @@ -38,22 +38,23 @@ D2MoveHead >PULLB MoveTo bcs .2 - inc MoveFrom>MoveTo, must move in + inc MoveFromMoveTo, must move out sta MoveFrom jsr D2.PhaseOn - lda #40 + lda #60 jsr D2.Wait100msA Trash X - jsr D2.AllPhaseOff - -* lda #10 -* jsr D2.Wait100msA Trash X + ldx Slotn0 + lda IO.D2.Ph0Off,x make sure all motor phases are off + lda IO.D2.Ph1Off,x + lda IO.D2.Ph2Off,x + lda IO.D2.Ph3Off,x bra .1 .3 tya @@ -65,34 +66,39 @@ D2MoveHead >PULLB MoveTo .8 clc .9 rts *-------------------------------------- -D2.PhaseOn pha +D2.PhaseOn bit #1 1,3,5,7 ? + beq .7 + + pha + + bcs .1 move out,start by+1 + jsr .7 + pla + +.1 inc 2,4,6,0 - bit #1 1,3,5,7 ? - beq .8 + jsr .7 - inc 2,4,6,0 + bcc .8 + + pla -.7 and #6 mask for 0,2,4,6 +.7 php + and #6 mask for 0,2,4,6 ora Slotn0 tax lda IO.D2.Ph0On,x turn on one phase + + lda #1 + jsr D2.Wait100msA + plp .8 rts *-------------------------------------- -D2.AllPhaseOff ldx Slotn0 - lda IO.D2.Ph0Off,x make sure all motor phases are off. - nop - lda IO.D2.Ph1Off,x - nop - lda IO.D2.Ph2Off,x - nop - lda IO.D2.Ph3Off,x - rts -*-------------------------------------- D2.Wait100msA sec -.1 ldx #17 +.1 ldx #19 .2 dex bne .2 diff --git a/ProDOS.FX/ProDOS.S.XRW.txt b/ProDOS.FX/ProDOS.S.XRW.txt index f3398c75..94742aaa 100644 --- a/ProDOS.FX/ProDOS.S.XRW.txt +++ b/ProDOS.FX/ProDOS.S.XRW.txt @@ -118,7 +118,7 @@ L5362 lda IO.D2.DrvSel1,x plp indicate drive off by setting z-flag. - lda #6 6x256 -> 1500ms delay before stepping. + lda #150 150 ms delay before stepping. jsr XRW.Wait100msA @@ -750,56 +750,64 @@ XRW.Seek ldx XRW.UnitIndex bcs .2 - inc CurrentQTrack>TargetQTrack, must move in + inc CC, CurrentQTrack>TargetQTrack, must move in .HS B0 BCS -.2 dec CurrentQTrack