[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IIgs floppy questions



doug holverson <dholvrsn@netins.net> wrote:

> What's the most amount of 3.5" and 5" floppy drives that a person sanely can
> daisy chain to a IIgs?

(Already answered by others.)

> What's the difference between initializing a 800K 2:1 and a 800 4:1 floppy?

As explained by others, it controls the ordering of the sector numbers
within the track.  2:1 means that consecutive sector numbers are usually
two physical sectors apart, while 4:1 has consecutive sector numbers
four sectors apart.

For example, 2:1 interleave on a track with 12 sectors would go like
this:

0 6 1 7 2 8 3 9 4 10 5 11 (then wrap around to 0 again)

In most cases, reading adjacent sector numbers means skipping one other
sector.  The exceptions are the gap between sectors 5 and 6 (three
sectors apart) and sectors 11 and 0 (one sector apart).  The short gap
in the last case odlatter doesn't matter, because the software would
usually want to read sector 0 on the next track, not the same track.

Why interleave at all?  The reason for doing this is to give the
computer time to decode the data and work out whether it wants to read
the next sector number.  If the sectors were not interleaved, then it
would be necessary to read data continuously.  If the software has to
make any decisions after a sector has been read, and the drive head has
already passed the sector header, then it is necessary to wait an entire
revolution of the disk before the desired sector arrives again.  This
causes a major drop in performance.

The ideal interleave factor is influenced by the speed of the interface
between the computer and drive, the processing speed of the computer,
and how much work has to be done before a sector is written or after a
sector is read.

Getting out of theory and into the real world:

If you ever intend to use a disk in a UniDisk 3.5, you should format it
with a 4:1 interleave.  The UniDisk 3.5 is inherently slower than the
Apple 3.5 Drive, because the method of transferring data between the
drive and computer (or vice versa) is a two-step process: the drive's
processor reads a sector into the drive's internal memory, then the
entire packet is transferred over the bus into the computer.  (Reverse
the process for a write.)

If you are normally only going to use an Apple 3.5 Drive plugged into
the IIgs disk port, the best interleave factor is usually 2:1.  A
possible exception is if you are using a ROM 00 or 01 IIgs under
ProDOS-8, because the firmware 3.5" driver on the ROM 00/01 isn't as
efficient as that in the ROM 3.

If you are using GS/OS, the interleave factor is irrelevant for reading
disks, because the driver reads the entire track in one pass, and
deinterleaves it in software.  This doesn't apply to writing, so a 2:1
interleave disk in an Apple 3.5 Drive can be written about twice as fast
as a 4:1 interleave disk.  If you have a SuperDrive card, this behaviour
also extends to ProDOS-8.

(I had a vague idea that the ROM 3 firmware's Apple 3.5 Driver might
also be able to do this, but if so it would require a 6 KB buffer
somewhere in bank $E0 or $E1.  I know that it does perform better than
the ROM 00/01 firmware.)

One particular point of note: pre-formatted disks (or those formatted on
a PC) are typically 1:1 interleave.  When I was using my PC Transporter
on a regular basis, I found that pre-formatted MS-DOS 3.5" disks in my
SuperDrive (connected to the SuperDrive card) worked fine for reading,
but were really slow for writing.  Reformatting the disk as 2:1
interleave made the write speed bearable (with a 50% speed penalty when
accessing the disk on a PC).