The hard disk installed in my 5160 is a Seagate ST-238R. It appears to be a full-height 5.25″ hard drive with a 33MB capacity. It is always amazing to think about how far things have come in terms of capacity. The laptop on which I am writing this post has a relatively-paltry 256GB solid state drive with a formatted capacity of 222GB; still, that is more than 7,700 Seagate ST-238R drives.
This Seagate drive was cabled to an ISA controller card. It appears that this drive uses RLL.
MFM and RLL interfaces
As a 90s kid born in the 1980s, when I think of old hard drives, I think of IDE (Integrated Drive Electronics, which is apparently now PATA: Parallel AT Attachment). The oldest drives (besides this Seagate) in my collection are IDE drives. The current standards are all SATA-based (Serial ATA). SCSI (Small Computer System Interface) was also a popular standard back in the day of which I was previously aware.
But the original IBM PC and the XT predate these standards. They are older than anything I have any experience with. As I have mentioned, I did have an XT in my bedroom as a young lad, but it was long before I was old enough to really appreciate it, and I certainly never opened it up to peek at its hard disk interface.
An MFM drive (Modified Frequency Modulation) seems to be what IBM included with the 5160. It is unclear to me if there were other options available from IBM, or if non-MFM options were all aftermarket. As above, this Seagate ST-238R is an RLL drive (Run Length Limited) which is a related-but-slightly-different standard from MFM.
Both MFM and RLL use a two-cable arrangement for hard disks. In contrast, IDE uses a single 40-pin cable. The MFM arrangement relies on a 34-pin cable for CONTROL and a 20-pin cable for DATA. Note that floppy controllers (both in the 5160 and in 3.5″ floppy drives until floppies fell out of favor) use a single 34-pin cable for both CONTROL and DATA.
My understanding is that RLL is more of a difference in how data is actually written to the disk versus how it is transferred to the computer; this is likely why both use the same 34- and 20-pin cable arrangement.
In addition to CONTROL and DATA is a power connector; the hard disk requires connections to the 5v and 12v rails, which is done through a still-standard MOLEX connector.
How mechanical hard disks work
A mechanical hard disk essentially works on the same principles as a floppy disk. As discussed in the previous post in this series, there is a read/write head which is moved over the disk surface as it spins. Data is essentially read and written like on a record: in circular tracks around the disk. Unlike a record, the disk is a magnetic medium: it can be thought of like a big, thick, circular piece of tape.
As with floppy disks, there can be a head on both the top and bottom of the disk. In hard drives, a particular disk is often called a platter. Unlike floppy disks, each drive may contain multiple platters. A unique set of read and write heads exist for each platter of the drive.
One key difference is that platters are hard, non-bending disks which otherwise are magnetically similar to floppy disks. A key difference, though, is in the density of the data put onto the disk: hard disks allow for a much higher density of data storage versus floppy disks; as a trade-off for needing a much thicker, more-rigid platter or platters, the hard disk drive is able to store a lot more information than a floppy disk. Likewise, hard disks must be sealed from the elements entirely, as individual particles of dust may interact with the read/write heads in a way as to cause either a temporary or permanent failure. As a consequence, the platters of a hard disk may never be viewed, since doing so outside of a clean room would mean introducing foreign particles into the system.
Another key difference is how the read/write heads are mounted in a hard disk drive. It tends to be the case that they sit on an arm or arms (often called an “actuator”) which moves in and out of the disk area as it spins. This actuator is not terribly different, again, from a record turntable arm; the core principles are the same in terms of lining up with tracks on the platter (in fact, a floppy disk read/write head assembly is not dissimilar from a less-common Linear Tracking turntable cartridge). The read/write heads never actually touch the platter, however. They sit on a thin film of air created by the spinning motion of the platter. This is essential, since the heads touching the platter can damage the platter and make its contents at the point of contact unreadable and unwritable. It is for this reason that hard disk drives (old ones, in particular) needed to be “parked” before being moved a long distance. Parking the heads caused the actuator to move into a safe space where vibration could not lead to the heads coming in contact with the platter(s) while the drive was off.
Using the drive
My drive spun up — this was apparently by the jet engine-like sound it makes when the computer is started with its power cable connected. It was clear, then, that the platters were spinning.
But, aside from a couple of clicks after spin-up (likely the actuator arm trying to move), there was nothing from the Seagate. There are not a lot of options in this case. It is worth noting that old hard disks are well known for not working after a while. In fact, MFM drives which work are a rarity. The intricacy of their inner workings does not lend itself to a long life span. In fact, the life expectancy of the drive (as listed here, presumably from a technical manual) is 5 years. 5 years! It is a wonder that the drive even responds after 35 years.
So I decided that there were two possible outcomes here. In one, I go no further, and the drive never works, and it sits for eternity until disposed of. In another, I do what one should never do: I remove the cover from the drive, see if I can get the actuator to move, and see if anything changes. This will, of couse, render the drive inherently unreliable and not usable in any real capacity. But from what I could see, it was already that way.
So I pulled the cover off.
Inside there are two platters and thus a double actuator. The motor assembly on the actuator is interesting; the motor is held against the end of the actuator using friction and transfers its motion to the arm. I carefully moved the actuator with my fingers with the drive off. It did not move easily. I noticed that there was a small gap on the axle of the motor; I lubed this with a very small amount of 3-in-1 oil. I continued to move the actuator, being careful not to push the heads into the platters.
After doing this many times and turning on the computer, the actuator was moving more than before. It worked itself back and forth. The XT still booted off of its DOS floppy (meaning, if this hard disk is bootable, it is not reading well enough to complete that boot).
But amazingly, I found that I could read the disk. Sort of.
Typing C:\ into DOS yielded a C prompt, meaning the drive was seen. Typing dir yielded a directory listing, which was pretty amazing. I was able to see whatever was on the drive the last time someone really used it. There appeared to be a few utilities there in addition to the default DOS stuff. Lots of things were in subfolders. There was a folder called GAMES, but trying to read it yielded an error
As exciting as it was that the drive was working at all, it was clear that it was only partially functional. I could clearly read the allocation table, which is where the file and folder name information I was seeing is stored. Trying to access files, though, was a mixed bag. I tried to copy some things to floppy, but most of that failed. I got as much off of it as I could, but most of it was plaintext readme.txt files and the like.
I decided it would be fun to try a ROM-based low-level format routine. Old hard disk controllers used to include these. If the system’s instruction pointer is directed at the correct address, it reads the routine from a ROM on the controller card. Thanks to Googling, I found that this card often contained a ROM-based formatter loaded at 0005h, offset C800h. The DOS DEBUG command, which is insanely useful and interesting and will be the focus of many things to come, allows for easy changing of the instruction pointer using the command g = c800:5. After entering that command, the ROM-based format routine started.
I let it do its thing, and it completed successfully.
As fun as all this was, the disk was never reliable (for obvious reasons). I could write to it (sometimes) and I could read from it (sometimes), even after replacing the cover. This is all to be expected. In the end the experience of getting that close to a classic hard disk was worth it. Ultimately, I would shift gears into running this machine off of a CompactFlash card, which would require at the very least an IDE interface (CompactFlash is actually IDE-based). But more on that in a future post.