[Coco] [COCO] Proposed HDBDOS Patch
David Ladd
davidwladd at gmail.com
Mon Jan 26 17:54:41 EST 2015
Everyone,
Here is the next patch that I was talking about previously proposed.
This patch includes a track 0 seek at the end of the verify process of
DSKINI
This patch also required change of the side encoding code to change from X
register to the use of the Y register so could get enough space to add the
track 0 seek code.
Here is the diff output from HG for HDBDOS.ASM
-----------------------------------------------
diff -r c850a6e703b2 hdbdos/hdbdos.asm
--- a/hdbdos/hdbdos.asm Wed Jan 21 11:11:07 2015 -0600
+++ b/hdbdos/hdbdos.asm Mon Jan 26 16:36:44 2015 -0600
@@ -3321,7 +3321,7 @@
inca = ADD ONE TO IT, COMPARE TO
THE MAXIMUM TRACK
cmpa #TRKMAX = NUMBER AND KEEP LOOPING IF
blo LD66F = THERE ARE STILL TRACKS TO DO
- jmp >BEEP
+ jmp >FDPAT1
* JMP >LD2CD GO CHECK FOR A DOS RESET
LD688 clr DRGRAM CLEAR RAM IMAGE OF DSKREG
clr DSKREG CLEAR DSKREG - TURN DISK
MOTORS OFF
@@ -3341,7 +3341,7 @@
bsr LD6C8 * WRITE THEM TO BUFFER
lda DCTRK = GET TRACK NUMBER AND STORE
lT
sta ,X+ = IN THE RAM BUFFER
- lbsr TFSIDE branch to sub routine that
deals with the side
+ jsr TFSIDE branch to sub routine that
deals with the side
NOP This NOP is used to keep rom
spacing correct
* clr ,X+ CLEAR A BYTE (SIDE NUMBER)
IN BUFFER
* lda DSEC * GET SECTOR NUMBER AND
@@ -3357,7 +3357,7 @@
LD6C2 stb ,X+ STORE A BYTE IN THE BUFFER
deca DECREMENT COUNTER
bne LD6C2 BRANCH IF ALL BYTES NOT MOVED
- rts
+ rts
LD6C8 pshs B SAVE THE COUNTER ON THE STACK
ldd ,U++ GET TWO BYTES OF DATA FROM
THE TABLE
bsr LD6C2 WRITE ACCA BYTES OF ACCB INTO
THE BUFFER
@@ -3694,11 +3694,10 @@
puls d,x,pc Restore & return
* SIDE select portion of the track buffer format routine.
-TFSIDE pshs x Backup X onto stack
- ldx #LD89D Set X to point to drive table
+TFSIDE EQU *
+ ldy #LD89D Set Y to point to drive table
ldb <DCDRV Get current drive from DCDRV
- ldb b,x Get drive masks from drive
table for B
- puls x Restore X from stack
+ ldb b,y Get drive masks from drive
table for B
clra clear A to have it ready for
bit6 from B
lslb roll bit 7 into C and bit 6
into N
lslb roll what was bit 6 into C
@@ -3706,8 +3705,11 @@
sta ,x+ store A into track format
buffer
lda DSEC * GET SECTOR NUMBER AND
rts
+FDPAT1 CLR DCOPC RESTORE HEAD TO TRACK ZERO DSKCON OP CODE
+ JSR >LD6F2 RESTORE HEAD TO TRACK ZERO
+ jmp >BEEP
* These fcb's are filler
- fcb $FF,$FF,$FF,$FF,$FF
+* fcb $FF,$FF,$FF,$FF,$FF
* This fcb is also filler and is used to help check ROM locations
fcb $99
---------------------------------------
Please reply with commends about this and as well if the code looks
acceptable enough for pushing to the repo.
I have verified this code actually works as I had a DSKINI loop going for 5
hours. No lockups and defeater still reports the side select is still
encoded correctly. After DSKINI finished both the low level format and
verify the heads were reset back to track 0 after verify was complete.
More information about the Coco
mailing list