The Fdio Project

Why and how

It is hard to imagine, but there was a time before the IBM PC. And even in the early years of the PC, by far not every system immediately adapted to the IBM standards. In fact, most vintage systems defined their own standards, so the early days of computing were determined by a much higher degree of heterogenity, than it is today.

One important objective of standards is to ensure interoperability, and interoperability between computer systems generally means using the same media, the same information structure, and the same semantics. In the era of the 9845, the floppy disc already was the most important medium for data interchange on desktop level. Paper tapes and cards had their best times already behind them, and the mini tape cartridge was an indeed low cost alternative for local mass storage, but not really designed for interoperability with other systems. Fortunately, the floppy disc already had been standardized in form factor and magnetic characteristics, so from 3.5" up to 8" floppies the medium could be used in each floppy drive, provided that the form factor of medium and drive was the same.

<floppy pictures>

Yet the information structure was not standardized at all. There had been industry standards like the IBM 8" format, but in principle, even the low level data encoding wasn't standardized. In addtion, head count, cylinder count, sector count and sector size differed from system to system, which makes it sometimes really hard to gain access to vintage media on a modern standard PC.

Nevertheless, assumed you do own a PC with a floppy drive of the right form factor, there is in principle a good chance that the drive may read (and sometimes even write) those vintage media. Consider that a normal drive isn't much more than a spinning motor, a movable read/write head and some electronics to encode and decode the signals from the magnetic head to/from digital bits, even a modern floppy disc drive is theoretically capable of accessing the information stored on old floppy discs. Provided you tell the drive in detail what to do.

Exactly this is the problem with DOS, Windows and even Linux. There is a defined set of supported recording formats, and everything else will overburden the standard OS floppy drivers. The solution is on-hand, the floppy controller has to be programmed directly without the support of the OS drivers. This is exactly what the Fdio program does, it talks directly to the standard PC floppy controllers and tells them what to do in order to read or write vintage floppy discs.

I could have implemented another Windows floppy driver, but due to the complexity of this approach I chose to simply develop a console program which does the job. Since direct device access without a driver is somewhat tricky under NT based Windows versions, I decided to use a special low-level controller driver developed by Simon Owen for this task. The FDRAWCMD package is a real good thing, and it is freely available.

Although handling 9845 and LIF floppies was the main reason to develop Fdio, its use is by far not limited to those formats. Fdio is quite generic, supports both FM and MFM encoding, and can be tuned for almost everything which can be handled physically by a standard floppy disc drive. However, not every standard floppy disc drive is physically able to read anything. Sometimes the tolerances are different, and either the error rates get high or the drive can't synchronize to the medium at all. In such cases, the only solution might be to connect a good old single density floppy disc drive, or even to use the original vintage drives and find another way how to transfer the data to and from a PC.

HP Floppy Disc Formats

In principal, the 9845 just supports three different floppy disc formats, that of the 9885, that of the 9895A floppy disc drive, and single-sided IBM 3740 media. All form factors are 8" (5.25" drives were invented in the mid-seventies, but were not yet considered as an alternative at the design time of the 9845). So for gaining access to a standard 9845 floppy disc, you'll need a 8" floppy drive for your PC.

Actually, since I personally don't own one, I just can hope that Fdio works with those 8" drives, but I never tried. So some feedback would be great.

Floppy disc support can be extended for the 9845 by installing an admittedly rare option ROM from Structured Software Systems. With such an option ROM installed, the 9845 can use any AMIGO based floppy disc drive, including those with 5.25" and 3.5" form factor. The media produced with this combination can generally be handled by the Fdio program.

The later HP 9000 series 200 systems had built-in 5.25" floppy disc drives which used the same format as the 82901 external floppy disc drives. The first drives which could handle 3.5" floppy discs were the 9121 external floppy disc drives. Later the 9122 floppy disc drives supported the 3.5" DD and HD formats, but already used the SS/80 command set. Generally, for LIF floppy discs HP mainly used the 5.25" and the 3.5" form factors. All those discs can be handled with Fdio.

All HP floppy discs (at least until the entry in the PC compatibles) use a sector size of 256 bytes. The formats are summarized in the following table:

Drive 9885 9895 IBM 3740 82901 9121 9122D/S 9122C
Form Factor 8" 8" 8" 5.25" 3.5" 3.5" 3.5"
Track Density -- -- -- low high high high
Capacity 502.5 1,155 kBytes 240.5 kBytes 280 kBytes 280 kBytes 616 kBytes 1,232 kBytes
Cylinders 67 77 74 35 70 77 77
Heads 1 2 1 2 1 2 2
Sectors 30 30 26 16 16 16 32
Start Sector 0 0 ?? 0 0 0 0
Sector Size 256 256 128 256 256 256 256
Data Rate ?? ?? ?? 500 kbps 250 kbps 250 kbps 500 kbps
GAP3 (access/format) ?? ?? ?? 27/84 32/50 32/50 14/54
SR/HUT ?? ?? ?? 0xdf 0xdf 0xdf 0xdf
Interleave (default) 5:1 7:1 ?? 2:1 2:1 2:1 2:1
Head Skew -- ?? ?? 2 -- 2 2
Cylinder Skew 5 ?? ?? 2 4 4 4
Encoding M2FM M2FM FM MFM MFM MFM MFM

DOS Floppy Disc Formats

Just for comparison, here are the characteristics for common DOS floppy disc formats:

Drive
3.5"
5.25"
DS/DD DS/HD DS/ED SS/DD SS/DD DS/DD DS/DD DS/HD
Form Factor 3.5" 3.5" 3.5" 5.25" 5.25" 5.25" 5.25" 5.25"
Track Density low high high low low low low high
Capacity (kBytes) 720 1,440 2,880 160 180 320 360 1,200
Cylinders 80 80 80 40 40 40 40 80
Heads 2 2 2 1 1 2 2 2
Sectors 9 18 36 8 9 8 9 15
Start Sector 1 1 1 1 1 1 1 1
Sector Size (bytes) 512 512 512 512 512 512 512 512
Data Rate (kbps) 250 500 1,000 300 300 300 300 500
GAP3 (access/format) 27/80 27/108 27/83 42/80 42/80 42/80 42/80 27/84
SR/HUT 0xdf 0xdf 0xdf 0xdf 0xdf 0xdf 0xdf 0xdf
Interleave 1:1 1:1 1:1 1:1 1:1 1:1 1:1 1:1
Head Skew 0 0 0 -- -- 0 0 0
Cylinder Skew 0 0 0 0 0 0 0 0
Encoding MFM MFM MFM MFM MFM MFM MFM MFM

The Fdio Utility

Fdio just handles the raw sector data and doesn't care about any file system information. The main job for Fdio is to save the low-level floppy data into binary image files and, in turn, restore original floppy disc media from binary images. Besides, Fdio provides typical media operations like formatting, duplication and diagnostics. Finally, Fdio has the ability to perform a deeper analysis of unknown media in order to determine the medium characteristics.

All functions have been implemented into one single executable, which runs as a console application under all WIN32 versions from Windows 95 up to Windows Vista. For direct floppy access under Windows NT/2000/XP/Vista the free FDRAWCMD driver package must be installed (the package was developed by Simon Owen and is included in the distribution packages which can be downloaded below, more information about the FDRAWCMD driver can be found here).

Fdio can be executed in the form

fdio <command> [<options>] [<parameters>]

Below is a summary of all commands. Execute Fdio with the -h option for a summary. Also have a look into the README file for up-to-date information.

Command Description
-format <drive> Low level formats a floppy disc.
-dup <source> <target>

Sector-by-sector copy from <source> to <target>. <source> and <target> can either be drives or images. Can be used to duplicates media, to create images from media or to restore media from images.

Normally, duplication works with ordered sectors, i.e. the sector data is read in the sequence of the sector IDs. It can be switched to reading raw track data with the -raw option.

The duplication range can be limited with the -r option.

-verify <drive> Performs a sector-by-sector read verify on the floppy disc. All data on the disc will be preserved.
-info <drive> Report the medium type (only works if there is already a preset for the medium, see the -preset command below).
-analyze <drive> Performs a detailes medium format analysis. Can be used with any medium.
-preset [<preset>] Shows details about a specific <preset>. If <preset> is omitted, all presets are listed.
-reset Resets the floppy disc controller (can be useful if the controller has been left in an unkown state).
-license Show license information.

Most commands can be tailored with one or more options. Below is a summary of all available options. Again, execute Fdio with the -h option for a summary. Also have a look into the README file for up-to-date information.

Option Description
-h Output a summary of the command line options.
-l <loglevel> Specifies detail of HPDir's reporting. Possible values are
0 (=silent operation, no output except errors),
1 (=output errors and warnings only),
2 (=like 1 plus some basic information - this is the normal mode),
3 (=like 2 plus detailed logging of all floppy disc activity),
4 (=like 3 plus verbose reporting of all data which passes the floppy disc controller)
-p <preset> Use a predefined preset instead of the default (see the -preset command above)
-g <c,h,s,size> Specify the disc geometry for known media (overrides any autodetection) with the following parameters:

c: cylinders per disc
h: heads per disc
s: sectors per track
size: sector size in bytes

-i <interleave> Specifiy the n:1 interleave factor (overrides autodetection).
-s <headskew> <cylskew> Specify head and cylinder skew (overrides autodetection).
-r <first> <last>

Specify a range for dup. <first> denotes the first 256-byte-block, <last> the last 256-byte-block. If the sector size is higher than 256 bytes, partial sector copy is possible.

-raw Use raw track access mode for dup (read only). In this mode, the sector ID is ignored and the sector data is just read in the order they are placed on the track, including any junk sectors.
-v Show version info.
-license Show license info.

Downloads

Click here for downloading Fdio:

Fdio 1.0 beta Windows 9x/ME/NT/2000/XP/Vista executable: fdio-10beta-bin.zip
Fdio 1.0 beta source code package: fdio-10beta-src.zip

This first beta version may still have a couple of bugs. Please use the contact feature to let me know if something doesn't work as expected.

Troubleshooting

See the README included in the Fdio package for troubleshooting procedures.