adding more commands

Now that I *think* I’ve got a handle on the reading portion, I’ve been adding a couple more commands.

I added support so that the SX knows what cylinder number it is on.  The F and B commands increase and decrease the cylinder number and step the drive accordingly.  I think I’ll have to step backwards initially to make sure I’m truly on cylinder 0.  I’ve wired the track zero lead into the SX, so it knows when it’s on the first track.  While it should start on track 0, the startup of my SX sometimes causes the drive to step.  This is because the drive goes from a floating, probably 0v state, to the idle state of +5v.  Floppy drives step on the RISING EDGE of the pulse, so this initial setup causes the drive to step.

I’ve added a command “C” which means cylinder number, and it reports just that whenever you send it.  I think I’ll also add a “move to cylinder 57” command, so that the repositioning is done by the SX instead of the PC.  The SX can handle this much faster, and we don’t have to involve unnecessary PC to SX communication.

I’ve also added a “T” command for “test track” which basically looks for double 1’s on the SX.  Tim has reminded me that there will be garbage in the track gap, and so I’m going to have to add a counter, where, say 5 “double-1’s” is ok, or something.  Some tracks that have decoded perfectly have had a couple bad bytes, so one bad double-1 isn’t the end of the world.  I record 13,824 bytes from the track, although 11,968, giving me almost 2 extra sectors read.  This is necessary because we start an unknown position and have to read enough to cover a half-sector that we started with.

About the author

keith

Amateur Electronics Design Engineer and Hacker