Saturday, April 16, 2011

All Those Floppy Disk Formats…

Seattle Computer Products adapted DOS to an array of floppy disk systems. We used North Star, Cromemco, and Tarbell floppy disk controllers, and later designed a floppy disk controller of our own (the “Disk Master”).

Floppy disks came in two sizes, which we called 5” and 8” (but the 5” was really 5.25”). The 8” disk came first, introduced by IBM with 77 tracks of 26 sectors, each storing 128 bytes of data, for a total capacity of 256,256 bytes. A single small hole was punched into the disk near the hub as the “index”, or starting point of each revolution. This means the disk was “soft-sectored”: there were no physical indications of sector boundaries. The sector start could only be determined by reading from the disk.

The North Star system used 5” disks with 35 tracks of 10 sectors of 256 bytes, for a total capacity of 89,600 bytes. The disks were “hard-sectored”, with 11 holes punched into them (10 for the sectors and an extra for the index). As far as I know this format was unique to North Star, and the rest of the industry evolved to use 40 tracks on the 5” disk with soft sectors.

Those 5” disks would spin at 300 RPM (5 revolutions per second), a little slower than the 360 RPM (6 revolutions per second) of 8” disks. And the 5” disks had exactly half the data rate, 125,000 bits per second, vs. 250 kbps for 8”.

Enter Double-Density

The way the stream of bits was stored on a floppy disk was very simple. First there was a “clock” pulse, which indicated a data bit was coming. This was followed by a data pulse for 1-bit, or no pulse for a 0-bit. At the 125 kbps rate of 5” floppy disks, the clock pulse would occur every 8 microseconds. The data pulse, if present, would follow 4 microseconds later, halfway between the clock pulses. For the 8” disk, all times were cut in half.

The clock pulses were sent to keep the disk controller “locked on” to the data stream. The motors spinning the disks weren’t guaranteed to be going exactly the right speed, so the clock pulses allowed the controller to adjust to the actual rate. Without them the controller could get lost after a long string of 0-bits (no pulses).

But someone figured out that 1-bits could serve as clock pulses (for locking on to the rate), allowing some clock pulses to be eliminated so the bits could be sent closer together. With that, double-density was born. You simply took out all the clock pulses except the ones between two 0-bits, and sent the data twice as fast.

So with double-density, as with the original single-density, the closest two pulses could be was still 4 microseconds apart (for 5” disks). A 0-bit following a 1-bit would be 6 microseconds apart, as would a 1-bit following a 0-bit. A string of pulses 4 microseconds apart could be either 0-bits (clock bits with no data bits) or 1-bits (data bits with no clock bits) – you had to keep track from the start. Once again, cut all times in half for 8” disks.

IBM PC Floppy Disks

IBM chose to use 5” double-density soft-sectored disks with 40 tracks, 8 sectors per track, and 512 bytes per sector. This gave their disk a total capacity of 163,840 bytes, known as the “160k disk”.

In the spring of 1981 I left Seattle Computer to work for Microsoft. My first task was to help put the finishing touches on the adaptation of DOS to the IBM PC hardware. This work was generally driven by bug reports and feature requests from IBM, and I stuck to doing the work I was asked to do. But eventually I got up the nerve to ask: Why were there only 8 sectors per track on the IBM floppy disk?

We had worked with many disk formats at Seattle Computer, and I had gotten deep into the nitty-gritty of how they were laid out. A 5” disk spun at 300 RPM, or 0.2 seconds per revolution. The double-density bit rate was 250 kbps, meaning there was time for 50,000 raw bits, or 6250 bytes, in one revolution. There was considerable overhead for each sector, something like 114 bytes. But IBM was only using (512 + 114) * 8 = 5008 bytes of the track. Adding a 9th sector on the track would increase this to 5634 bytes, still far less than the total available. You could almost fit a 10th sector, but not quite (or maybe you could reduce the overhead and make 10 fit!).

IBM’s response was something like “Oh, really?” They had never done the calculations. It was also too late to put a change like this into the product (it was probably 2 – 3 months before the PC shipped). They said they would save it as a new, upgraded feature for DOS 1.1. The first IBM PCs would ship with the 160k format.

More Formats

IBM refreshed the Personal Computer line around 6 months after the initial release. This not only included DOS 1.1, but now the floppy disk drives could use both sides of the disks, doubling the capacity.

For compatibility, they still had the single-sided format with 8 sectors per track – the 160k disk. But now older PCs (with single-sided disks) could upgrade to DOS 1.1 and use the 9-sector format – the 180k disk. And of course new machines would want to use the double-sided 9-sector format – the 360k disk. For some reason, IBM also supported a double-sided 8-sector format – the 320k disk – which served no useful purpose.

Two years later IBM introduced the Personal Computer AT, based on the Intel 286 microprocessor. With it came the high-capacity 5” floppy disk. It basically gave the 5” disk the same specifications as the older 8” disks – doubling the data rate and spinning the disk at the faster 360 RPM. Capacity increased to 1.2 MB, the same as the 8” disks.

Eventually the 5” floppy disk was replaced by the 3.5” disk with its 1.44 MB capacity. I still see a few of my computers around the office with 3.5” disk drives, but their time has passed as well.

9 comments:

  1. Can you recommend a service in the Seattle area that can read old DOS floppies, circa 1987, and write to current media? I wouldn't mind spending a few bucks nstead of buying an ancient drive that I'll never use again. Thanks.

    Richard

    ReplyDelete
  2. I think it was actually DOS 2.0 released with the XT that introduced the 9 sectors format. DOS 1.1 introduced support for double sided floppies I think

    ReplyDelete
  3. @Richard: You may want to check on the Kryoflux forums to see if there's someone with a Kryoflux board and drives in your area.
    I have one hooked up to a 5.25" 1.2MB and a 3.5" 1.44MB drive. Only about 20% of my 5.25" discs read without error, though they weren't stored well to begin with.
    Works well with Gilles Vollant's WinImage software so you can grab the data directly from the disk image.

    ReplyDelete
  4. This is a better-quality article as they all are. I make fun of been wonder wide this an eye to some beat now. Its great to receive this info. You are fair and balanced.

    Chevy W5500 Turbocharger

    ReplyDelete
  5. Here's a quote from the errata for the first edition of Undocumented DOS (which Tim Paterson co-wrote):

    "Not long after that (but before the introduction of DOS 2.0), an extra sector was added to the format, bringing the storage capacity up to the 360KB we know today." In fact, Tim Paterson assures us that was done in DOS 2.0.

    So yeah, Tim Paterson says the 9-sector format was introduced in DOS 2.0.

    ReplyDelete
  6. Excellent blog here! also your internet site lots up fast! What host ar you the utilization of? can i get your associate link on your host? i would like my web site loaded up as quickly as yours lol.
    microsoft outlook pst

    ReplyDelete
  7. I worked at Victor/Sirius for Chuck Peddle in 1981 and the Victor900 used GCR and variable motor speed to get 1.2 mb on a 5.25 disk long before the PC AT. That machine was way ahead of its time and far better than the IBM PC. It taught me the important lesson that "the best technology doesn't always win."

    I also spent many happy hours porting DOS to the 9000, making command.com load high, chaining memory arenas for 896K total RAM, etc. Whee!

    ReplyDelete
  8. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in IBM Storage Track, kindly contact us http://www.maxmunus.com/contactMaxMunus Offer World Class Virtual Instructor led training on IBM Storage Track. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us.
    Nitesh Kumar
    MaxMunus
    E-mail: nitesh@maxmunus.com
    Skype id: nitesh_maxmunus
    Ph:(+91) 8553912023
    http://www.maxmunus.com/

    ReplyDelete