FLOPPY DRIVES IN THE IBM 3174
The IBM 3174 Controllers have been built with two capacities of floppy drives, either a 1.2MB or a 2.4MB version. Both of these use 5 1/4" media and are used to load the microcode and utility programs into the controller. The lower cost models of the 3174 come with a 1.2MB drive, while the higher end models implement the 2.4MB version.
In addition to the single drive that comes in the base configurations, an additional drive can be added as an option; the smaller controller models can add either version of the drive. Another option installs a small hard disk in addition to the single floppy drive.
The 1.2MB version is identical to the drive that shipped in the IBM PC/AT but did not catch on in the wider PC marketplace. The 2.4MB version is pretty unique to the 3174 controller as far as I know. Since these two versions were not widely used outside of IBM, relatively little is known about their specifications and interface.
In fact, the lack of specifications and other details is common to IBM products of the era, at a time when they had substantial competition from other companies building compatible versions of the IBM products and undercutting their sales. To help combat this, technical details were closely held and the microcode was protected under a licensing agreement that forbade any investigation or reverse engineering - terming it Licensed Internal Code.
Existing maintenance documents show the wiring of the cable between the floppy drive(s) and the motherboard, but don't help understand what signals are put on those wires or how it worked. I have to work from the compatible market for IBM PCs (and compatible floppy drive makers) that established the interface over the 34 wire IDC connector.
Even though we have a defined interface that has a wire to cause the drive to step, it doesn't tell us how many tracks are available on the drive. The wire delivers the incoming data but that tells us nothing about the format of the data on a track, such as sector size, number of sectors, checksums or other formatting information.
Fortunately, due to the use of the 1.2MB drive in the IBM PC/AT, we do know the details fairly well. The drive offers 80 tracks, two heads, and is formatted on the PC into 15 sectors per track of 512 bytes size. Thus the drive holds 2,400 sectors of 512 bytes for a formatted capacity of 1.2MB
IBM clearly states in the 3174 maintenance documentation that it uses only 77 tracks, not the 80 that the drive is capable of addressing. This in fact shrinks the capacity of the 1.2MB drive to only 1.155MB.
We know that the 2.4MB drive can read the 1.2MB written diskettes, which means that we have 15 sectors per track, two heads, and twice the total number of sectors. What isn't clear is whether the drive still has 80 tracks but could write up to 30 sectors per track, or whether the drive implements 160 total tracks.
The IBM manual again asserts that the 2.4MB drive uses 77 tracks, thus it is physically capable of storing 2.4MB but actually stores 2.31MB. It must store 30 sectors per track per side.
Floppy drives were built that supported dual densities. Mostly that meant 360K and 720K but the interface has a signal wire defined for density selection - pin 2. Some drives simply dropped the rotational rate in half for the lower density mode, based on this signal.
One other ambiguity is the presence of two wires in the interface that are listed as N/C- Reserved in the specs but both are wired to the motherboard of the 3174. Those are pins 4 and 6. I had no idea what use IBM might put these to for use with these drive versions. Turns out the definition of the interface I was reading is for more modern drives, those that have only driveA/driveB.
The 2.4MB drives were built by two vendors for IBM - Y-E Data made the YD 803 and Hitachi made the
I don't have the same certainty about the makers of the 1.2MB drive, but I do know that Mitsubishi made a 1.2MB 5.25" drive for use in some IBM products, the MF504C-342MN. Y-E Data made the YD-308 which is likely one of the drives installed in the 3174, since they chose the same maker for the higher density versions. Many other makes built 1.2MB drives, among them Teac, NEC, Epson and Mitsumi.
I looked at the specs for the EPSON SD-800 and its 5.25" drive specifies 160 tracks, 80 per side, so that matches what I know. These earlier drives had four drive select lines DS0 to DS3 instead of the two (A and B) of more modern 5.25" products. This gives me the usage of pins 4 and 6. Pin 4 is a head loaded signal, pin 6 is DS3. Pin 2 is unconnected on this drive.
The Teac FD-55GFR is also a 1.2MB drive and it uses pin 2 to select between high density (1.2MB) mode and lower density. You can jumper the drive to determine whether the wire connected to ground asserts or deasserts high density.
Internet posts by others investigating the 2.4MB drives show pin 2 as an input to the drive, which is not connected on the 1.2MB drive. I suspect that this line is used to switch the higher density drive between 1.2MB compatibility mode and full 2.4MB mode.
Here are the pins of the interface and the usage that I suspect for the 3174, remembering that all odd pins are ground:
2 - unused on 1.2 drive, some input probably density select to the 2.4 drive
4 - output indicating that the head is loaded onto a diskette thus ready to read
6 - DS3 select input, ignored by the drive due to jumpers set to DS1
8 - Index pulse output
10 - DS0 select input, ignored due to jumpers
12 - DS1 select input, which is toggled by 3174
14 - DS2 select input, ignored due to jumpers
16 - Motor enable input
18 - Direction of travel input
20 - Step pulse input
22 - Write data input
24 - Write enable input
26 - Track 00 output
28 - Write protect output
30 - Read data output
32 - side select input
34 - disk changed output
HOW DOES THE 3174 KNOW WHICH VERSION OF DRIVE IS INSTALLED
It appears to be wired into the cable harness. I assume this because the maintenance manual lists different cables for a controller with twin 1.2MB floppy drives and a controller that has a 1.2 primary and 2.4MB secondary drive.
Physically, every pin is wired to the motherboard except for one \on each connector. The ground side is a black wire and the signal side (even pins) is a yellow wire for almost every pin position. Oddly, it differs between the primary and second drive positions.
On my unit, which has the cable for 1.2 MB primary and secondary drives, the primary drive connector has no black ground wire on pin 13, instead that black wire is connected to pin 14 (DS2). For the secondary drive, the ground wire is not installed on pin 5 and instead is connected to pin 6 (DS3 select).
Since the DS2 and DS3 wires are inputs, they are essentially logically high if the motherboard looks at the ground wire in locations 5 and 13. If it doesn't match ground level from the other pins, this cable is telling the motherboard that we have a 1.2MB drive cable for this position (primary and secondary). I would need to see the cable wiring for a 2.4MB drive to tell whether they use a different set of ground pins to make the determination of that drive version.
FLASHFLOPPY SOFTWARE FOR EMULATING DISKS ON THE IBM 3174
I am using a Gotek floppy drive emulator box whose firmware was reflashed to install FlashFloppy into the microcontroller (STM 32). This software is known to work with 3174 controllers with the 2.4MB drives. It has a configuration option (IBM-3174).
All the known cases where this is working properly are machines with the 2.4MB drives configured in the controller. Since I have the 1.2MB drive as my only unit, this may be the root of my issue trying to read.
There are a number of configuration files for FlashFloppy, where I can override the use of various pins and change behavior. It also allows me to override the geometry assumed for the image file, which may be important since I copied two of the 2.4MB images onto the USB stick.
When I changed the Gotek to point to those diskette images, I saw an E31 error which is FlashFloppy complaining that the format of the file doesn't match the drive it is emulating. I think I might have to explicitly adjust this file both for the 2.4 and the 1.2 images.
One other possible incompatibility is based on the oddball grounding of DS2 and DS3 pins (6 and 14) by the 3174. I have to investigate whether the Gotek will have a problem with this.