Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!rutgers!labrea!decwrl!decvax!ucbvax!ICASE.ARPA!csrobe
From: csrobe@ICASE.ARPA (Charles S. Roberson)
Newsgroups: comp.sys.atari.st
Subject: RE: fast multi-sector floppy I/O with interrupts (question)
Message-ID: <8707221253.AA03974@work1.icase>
Date: Wed, 22-Jul-87 08:53:29 EDT
Article-I.D.: work1.8707221253.AA03974
Posted: Wed Jul 22 08:53:29 1987
Date-Received: Fri, 24-Jul-87 04:19:22 EDT
Sender: daemon@ucbvax.BERKELEY.EDU
Distribution: world
Organization: The ARPA Internet
Lines: 109

>From: mcvax!philmds!nlgvax!johan@seismo.css.gov  (Johan Stevenson)
>Subject: fast multi-sector floppy I/O with interrupts (question)
>To: info-atari16@score.stanford.edu
>
>To speed up I see the following options:
>
> - improve the driver, so that the interrupt caused by the first sector
>   is in time to start the transfer of the second sector
>
> - use a non-standard floppy disk formatter that gives physically
>   consecutive sectors the following relative sector numbers:
>	1, 6, 2, 7, 3, 8, 4, 9, 5
>
> - perform the same trick as above in the driver itself

Johan-

	Well I haven't heard from you so i don't know if this stuff
is of any use to you, but I will finish off what i started.  (I hope
this is getting to you!)

STart, Spring 87, Vol. 1, No. 4, pp. 83-94
"Hard Disk Warfare" by Dave Small (and Dan Moore)

First off, "Twister isn't really a hard disk utilty, it's a program
which doubles your floppy disk speed and adds an additional 40K per
side.  It formats a disk in a special manner, letting the disk
drivers run at full speed instead of the normal half speed.  The
new format is completely compatible with your ST's operating system."

Ok, here is the gist.  Your disk is revolving at 300 rpm, which is
5 disk spins every second, or 200ms per spin.  "The floppy hardware
takes 16.6 ms to read a sector, with around 3-4 microseconds of
"dead space" between sectors.  If there's 20ms per sector and 200ms
per spin," then there's room for 10 sectors per track.  Ergo, the
extra 40K per side.

The disk is basically moving like this: "(index pulse)
1-2-3-4-5-6-7-8-9-10 (index pulse) 1-2-3-4-5-6-7-8-9-10..."
When moving from one track to the next, the head switches
tracks, settles, "seeks" for a track number and reports
back to _floprd that it is there.  Well, after reading
track 0 and moving to track 1, sector 1 is "used up" by
the Seek.  The rest of the track must spin by before we
can start the read.  "We thus miss sector #1 every
time we step to a new track, thereby adding 1/5 of a second
per track overhead to all floppy read/writes."

Dave Small and Dan Moore format (twist) their disk in this manner:

	Track 0:  1,2,3,4,5,6,7,8,9,10
	Track 1:  9,10,1,2,3,4,5,6,7,8
	Track 2:  7,8,9,10,1,2,3,4,5,6
	Track 3:  5,6,7,8,9,10,1,2,3,4
	Track 4:  3,4,5,6,7,8,9,10,1,2
	Track 5:  1,2,3,4,5,6,7,8,9,10 (which is the same as #0)

What happens is that after reading sector 10 of the previous
track, the Seek has time to move the head (2ms), let it settle
(about 30ms), and find a track number before sector 1 of the
next tract rolls around.  The two extra sectors give
Seek "33ms to quit rattling and catch a sector ID mark
before sector #1 shows up again."

"Actually benchmarking indicates Twister does exactly what it's
supposed to do, it can read in an entire disk side (80 tracks)
in 80 spins, plus about 10 for overhead, or 18 seconds.  A
double-sided disk takes one more spin for the back side of each
track, or 36 seconds."

"If we use double sided disks, we also have to twist the sector
data from side to side.  I don't really know why; there should
not be that much overhead in switching sides.  However, there
seems to be."

***DISCLAIMER:  The information presented above is NOT my work!
The information ALL comes from the forementioned STart article.
I have tried to encapsulate what I could without losing the
basic idea.  All inquiries should be directed to that article
(i.e. Read it), or to Dave Small or Dan Moore.  However, if
I have mis-stated something, please notify me so I make correct
the error of my ways.

Johan, i hope this helps.  I really like twister, and i use
these guys' Meg-a-minute Hard Disk Backup Utility and have no
complaints, yet (it relies on the twister disk format).

Best of luck, and the offer still stands to send you a copy
of the article if you need more information.  The source code
also came with the magazine, so you might consider trying to
find the magazine or writing to one of the authors care of
the magazine:

	Jon A. Bell
	Editor
	STart
	544 Second Street
	San Francisco, CA 94107

Question:  Do you know if the X Window System could run on MINIX?
Or where I could find out?

-chip
--------------------------------------------------------------------
Chip Roberson                ARPANET:  csrobe@icase.arpa
1105 London Company Way      BITNET:   $csrobe@wmmvs.bitnet
Williamsburg, VA 23185       UUCP:     ...!seismo!gmu90x!wmcs!csrobe
--------------------------------------------------------------------
NB: The correction in my BITNET address:  changed "$wmmvs" to "@wmmvs"