[comp.sys.amiga.tech] Questions on the floppy drive hardware

bryan@geo-works.UUCP (Bryan Ford) (08/12/89)

I have a few questions on the floppy drive hardware.

First, does the WORDSYNC feature shift each bit into a compare register as
they come in, and compare it at each bit, or does it just grab a whole word
at a time and compare it at each word boundary?  I would think the former,
but the manual is a little vague on this, and I've learned not to assume
anything.  :-)

What affect do the PRECOMP0, PRECOMP1, and MFMPREC bits have on data input
and output?  I know that the hardware doesn't automatically do
precompensation.  Is this just a hook for a later hardware feature?  What
does the standard trackdisk.device use for these bits?

I know that if you use FAST mode (2 usec per bit), you can't have two 1's
right next to each other in the data stream.  Is this limitation imposed by
the actual disk drive hardware, or the hardware in the Amiga, or both?


Thank you for your help.

				Bryan

P.S.  CBM, if/when you make a new Hardware manual, please clarify some of
this stuff a little bit better, and mention somewhere the FAST limitation.

--

     _______________________________________
   _/   Bryan Ford - bryan@geo-works.uucp   \_
 _/  ..!utah-cs!caeco!i-core!geo-works!bryan  \_
/ ..!uunet!iconsys!caeco!i-core!geo-works!bryan \
\_____________Author: Chroma Paint______________/

jesup@cbmvax.UUCP (Randell Jesup) (08/19/89)

In article <2117.AA2117@geo-works> bryan@geo-works.UUCP (Bryan Ford) writes:
>First, does the WORDSYNC feature shift each bit into a compare register as
>they come in, and compare it at each bit, or does it just grab a whole word
>at a time and compare it at each word boundary?  I would think the former,
>but the manual is a little vague on this, and I've learned not to assume
>anything.  :-)

	The WORDSYNC compares at each bit.  If it sees a match, it will
re-sync (throwing away any partial word that has net been written).  The
effect of this is if there are two sync words in the input stream, say
$4489 $4489, and they are on a word boundary already, the hardware will
write $4489 $4489.  If they were not on a word boundary (shifted some
number of bits) you will get only one $4489 in the output.

	This is all discussed in the next issue of AmigaMail, I believe.

>What affect do the PRECOMP0, PRECOMP1, and MFMPREC bits have on data input
>and output?  I know that the hardware doesn't automatically do
>precompensation.  Is this just a hook for a later hardware feature?  What
>does the standard trackdisk.device use for these bits?

	PRECOMP 0&1 determine the amount of precomp when writing, from 0ns
for 00 to 560ns for 11.  For floppies, you need 00 for tracks 0-79 (0-39
for 5.25" drives), 01 for the inner tracks (140ns).

	MFMPREC should be 0 for MFM data, 1 for GCR data.  Note that to use
GCR you cannot use FAST (2us/bit), you must use 4us/bit.

	Trackdisk uses MFM in all cases.

>I know that if you use FAST mode (2 usec per bit), you can't have two 1's
>right next to each other in the data stream.  Is this limitation imposed by
>the actual disk drive hardware, or the hardware in the Amiga, or both?

	Disk hardware.  You need some clocking to keep track of where bits
fall, and the hardware can only keep sync for so long.  It causes by a
combination of things, exactly what is unimportant (media, heads, electronics,
etc).

-- 
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
Common phrase heard at Amiga Devcon '89: "It's in there!"

U211344@HNYKUN11.BITNET (Olaf 'Rhialto' Seibert) (08/28/89)

In article <7697@cbmvax.UUCP> jesup@cbmvax.UUCP (Randell Jesup) writes:
>       The WORDSYNC compares at each bit.  If it sees a match, it will
>re-sync (throwing away any partial word that has net been written).  The
>effect of this is if there are two sync words in the input stream, say
>$4489 $4489, and they are on a word boundary already, the hardware will
>write $4489 $4489.  If they were not on a word boundary (shifted some
>number of bits) you will get only one $4489 in the output.

Does this mean that WORDSYNC has effect during the complete DMA
transfer, i.e., that it re-syncs when it encounters the sync word in
the middle of the track? Or is it (as I originally thought) that
WORDSYNC only determines when the DMA starts and has no effect
thereafter?

I looked into the hardware manual and the wording seems to allow
both interpretations.

The real question is, of course, do I need to write a routine to find
misaligned SYNCS in data I have read with (a replacement for)
ETD_RAWREAD (which knows about WORDSYNC)?

>       PRECOMP 0&1 determine the amount of precomp when writing, from 0ns
>for 00 to 560ns for 11.  For floppies, you need 00 for tracks 0-79 (0-39
>for 5.25" drives), 01 for the inner tracks (140ns).

I know just enough about hardware to be dangerous, so I must ask:
What exactly *is* precompensation, and what is its use?

>Randell Jesup, Keeper of AmigaDos, Commodore Engineering.

Freely_Distributable=Greetings(Not_For_Any_Commercial_Purpose)->
        Olaf.Seibert;

Astounding News! By Express Via Norfolk!   OS+2 is a trademark of
The Atlantic Crossed in Three Days!        Olaf 'Rhialto' Seibert
[E.A. Poe, 1844]                           U211344@hnykun11.bitnet

jesup@cbmvax.UUCP (Randell Jesup) (08/29/89)

In article <8908281131.AA15119@jade.berkeley.edu> U211344@HNYKUN11.BITNET (Olaf 'Rhialto' Seibert) writes:
>In article <7697@cbmvax.UUCP> jesup@cbmvax.UUCP (Randell Jesup) writes:
>>       The WORDSYNC compares at each bit.  If it sees a match, it will

>Does this mean that WORDSYNC has effect during the complete DMA
>transfer, i.e., that it re-syncs when it encounters the sync word in
>the middle of the track? Or is it (as I originally thought) that
>WORDSYNC only determines when the DMA starts and has no effect
>thereafter?

	It continues to sync as long as the transfer continues.

>>       PRECOMP 0&1 determine the amount of precomp when writing, from 0ns
>>for 00 to 560ns for 11.  For floppies, you need 00 for tracks 0-79 (0-39
>>for 5.25" drives), 01 for the inner tracks (140ns).
>
>I know just enough about hardware to be dangerous, so I must ask:
>What exactly *is* precompensation, and what is its use?

	When the bits are closer together on the inner tracks, you have to
tweak the timing of bits going out.

-- 
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
Common phrase heard at Amiga Devcon '89: "It's in there!"