Hard-sector discs -- how many sectors?

Philip Pemberton classiccmp at philpem.me.uk
Thu Nov 19 10:55:18 CST 2009


Chuck Guzis wrote:
> The 8" case is a bit different.  Because of the near-universal use of 
> 32-sector disks for hard-sectored data, you want a way to ignore 
> every other, or the next consecutive 3, or 7, or 15 sector holes, for 
> 16, 8, 4 and 2 sector formats respectively.

That's easy.

The hard-sector support is basically a state machine that bolts onto the 
start/stop detector. There are four standard trigger modes (immediate, 
time-delayed, index-pulse and MFM Sync).

When the track-mark detector is enabled, an additional state is added to 
the trigger FSM -- essentially it waits for a single track mark, then 
carries on waiting for whatever you told it to wait for.

So if you program the trigger unit like this:

    * Start Event = HSTMD + Index Pulse
    * Start Count = 1
    * Stop  Event = Index Pulse
    * Stop  Count = 2

What you'll get is this:
       t  i     j     j
    I  I  I     I     I     I     I     I ...
          S-----------P

S=start, P=stop, -= acquisition zone.
t = track mark detected, i = index after track mark, j = index pulses

By changing the start and stop counts, you can read any of the 32 
sectors individually, or read the entire disc in one shot (the index 
pulses are stored as part of the timing data, which allows the data to 
be separated into sectors after it's read).

The write module works in a similar way -- it's an FSM that executes 
single-byte instructions. A byte with a 1 in the MSB waits <byte[6:0]> 
clock cycles, then writes a transition. A byte with a 0 can execute one 
of a number of micro-instructions (00nnnnnn is "wait N, don't write", 
01000000 is "stop now", and there are a few others for "wait for track 
mark" and "wait for next index pulse").

The real pain is going to be *testing* all this stuff. I might end up 
tying a 4046 PLL and a counter to a 3.5" drive to make a "fake 
hard-sector" drive, just to test the HSTMD...

-- 
Phil.
classiccmp at philpem.me.uk
http://www.philpem.me.uk/



More information about the cctech mailing list