Learn Something Old Every Day, Part V: Early IBM PS/2 Hard Disks

So I have been (again) trying to properly archive old MS OS/2 SDKs. The version 1.02 SDK from December 1987 (corresponding to OS/2 1.0) turned out to be a bit of a poser.

The SDK came on both 3.5″ and 5.25″ media (unlike the older 1.00 and 1.01 SDKs, which as far as I can tell only existed on 5.25″ media). My Kryoflux tells me that the Install floppies were modified in both the 3.5″ and 5.25″ disk sets. Now, it’s very common for OS/2 install disks to be modified, because the installer writes an INSTALL.LOG file. But I could find no evidence of that happening.

Instead, it looked like Microsoft made some changes after mastering the disks, but exactly what those changes were is difficult to tell.

On the 5.25″ Install disk, Microsoft almost certainly updated the INSTAID.EXE file (the main installer executable). The allocation chain for INSTAID.EXE is not contiguous, which is a strong hint that it had been overwritten with a larger file. Yet the timestamp for INSTAID.EXE is the same as the other files (12/15/1987) and the entry for INSTAID.EXE is in the middle of the root directory, alphabetically sorted.

Okay, so that makes some sense. Microsoft made some last-minute installer change and had to update the already mastered disks. One might expect to find the same sort of change on both 3.5″ and 5.25″ media… but no.

The 3.5″ Install disk was also changed, but differently. There appears to have been a similar change made to INSTAID.EXE; it is similarly fragmented, and identical to the 5.25″ variant. But there are additional changes, apparently to the disk drivers. And that’s where things get a bit mysterious.

The 5.25″ Install disk comes with a DISK01.SYS driver. The 3.5″ Install disk has DISK01.506, DISK01.ESD, and DISK01.SYS on it. The DISK01.SYS on the 3.5″ media is identical to DISK01.506, but the DISK01.SYS on the 5.25″ media does not match either DISK01.506 or DISK01.ESD. In addition (perhaps not surprisingly), neither DISK01.506 nor DISK01.ESD works on an AT compatible.

Upon reflection, it’s clear that Microsoft intended the 5.25″ media to be used on AT compatibles (whether with a 286 or 386 CPU) and the 3.5″ media on IBM PS/2 machines. This was a significant difference from how IBM packaged OS/2, because IBM’s OS/2 1.0 on 3.5″ and 5.25″ media each supported both AT compatibles and PS/2 machines (DISK01.SYS vs. DISK02.SYS etc.).

The only hint I could find about the mysterious disk drivers was in a file called READ.ME! on the Toolkit disk:

I have a PS/2 machine and when booting from the Installation Diskette the machine just freezes. What's the deal?

If you have a PS/2 machine with an ESDI hard disk (i.e. 71MB or larger) the default disk driver must be changed. You simply copy the Disk01.ESD to Disk01.SYS and then re-boot the machine. The bottom line is that if you have a low level formatted hard disk and try the instaid program with the wrong disk device driver your machine will freeze.

Early PS/2 Disk Controllers

The early (1987) PS/2 machines had either MFM hard disks with a ST-506 interface, or larger ESDI disks. More about the controllers can be found here.

Now… the problem with all these interfaces is that ST-506 and ESDI are drive interfaces that host software can’t do anything with. Host software needs to call to a disk controller, but there simply isn’t any predictable mapping between drive interfaces and disk controllers. Software developers had a bad tendency to name disk drivers by the drive interface (IBM1S506.ADD, ESDI506.PDR), even though the drive interface is not too relevant when talking to a disk controller, which is what all those drivers do.

The IBM PC/XT, PC/AT, and some early PS/2 models all used disks with the ST-506 interface, but each had its own disk controller, incompatible with the others.

Western Digital’s WD1005/WD1007 ESDI controllers on the other hand were software compatible with the PC/AT disk controller, but the ESDI controller in PS/2 machines was again completely different.

The PS/2 ESDI controller used an unfamiliar I/O port range, namely 3510h-3517h. The ESDI controller information can be found for example here. I believe IBM kept using the ESDI controller interface for some time, especially in lower end MCA PS/2 machines, while high-end systems switched to SCSI.

The PS/2 ST-506 controller used the same 320h-324h I/O port range as the PC/XT disk controller. That is quite likely because it was also used on the original PS/2 Model 25 and 30, in many ways enhanced PC/XTs.

There is very little technical information available about the PS/2 ST-506 controller (the IBM documentation for the adapters does not appear to have survived, or at least isn’t publicly available). I believe that the information in the PS/1 Technical Reference (starting at page 339 in the PDF) applies.

As far as I can tell, the PS/2 ST-506 aka MFM controller was conceptually very similar to the PC/XT disk controller, but different enough in detail to be incompatible. The I/O port range was about the same, both used command blocks with CHS addressing, both used DMA to transfer data to/from disk. But the status bits were different, the command blocks were different, and I just don’t see how the two could possibly be compatible.

In other words, it looks like the programming model of the PC/XT disk controller and the PS/2 ST-506 controller is essentially the same, but the details are different enough that existing code could not work. At the same time, it looks like adapting code written for one controller to the other should not be particularly difficult.

Finding authoritative information is surprisingly tricky. There is a Minix driver for the PS/2 ST-506 adapters, ps_wini.c, which reportedly works on MCA PS/2 machines. Those are the machines that the MS OS/2 1.02 SDK would have targeted; the PS/2 Model 30 was not relevant since it had an 8086 CPU, and the PS/2 Model 30-286 wasn’t announced until September 1988. The Minix ps_wini.c matches the above mentioned PS/1 Technical Reference.

Note that there is also a Minix xt_wini.c, which is indeed similar to ps_wini.c but far from identical.

Back to the OS/2 1.02 SDK

After researching the disk modifications, I am reasonably certain that the Install disks were modified by Microsoft and INSTAID.EXE was updated before the disks were shipped.

I considered the possibility that a previous user overwrote DISK01.SYS on the 3.5″ Install disk. On reflection, that is highly unlikely given that DISK01.SYS matches DISK01.506, and the included READ.ME! implies that that was the state in which the disks were shipped. It’s more likely that the disk drivers were updated by Microsoft before shipping; the 5.25″ media wouldn’t have any corresponding change because its DISK01.SYS is different (confusing!).

Comparing with another MS OS/2 1.02 SDK disk set would help. But finding such a set could be tricky.

Update: More Digging

I’ve partially disassembled the earliest available system BIOS for PS/2 ISA-based Model 30 (September 1986) and MCA-based Model 50/60 (February 1987). I can confirm that in both cases, the system BIOS includes support for the PS/2 XT-like disk interface (it is tempting to call it XT/2 interface, though I don’t think anyone used that term), and that the code from 1986-1987 corresponds to the documentation in the PS/1 Technical Reference which is quite a bit newer (1990).

The disk interface itself seems sensible enough, but it suffers from the same problem PC/AT BIOSes did: The system only handles drive types hardcoded in the system BIOS ROM.

Interestingly, even though the interface was the same from software point of view, the implementation on Model 30 vs. Model 50/60 was very different. PS/2 Model 30 used an IDE (but not ATA!) drive with a built in controller, while the MCA models used a separate controller adapter that worked with standard ST-506 drives.

As far as I can tell, the Model 30 was self-configuring because the drive “knew” which drive type it was. On the MCA-based PS/2 machines, the user had to select the right drive type in the system setup because the system had no way to detect the drive type automatically.

I should also add that the PS/2 ST-506 drive interface is not XTA. The XTA interface emulates a standard PC/XT disk controller, but the PS/2 interface is different.

This entry was posted in ESDI, IBM, PC history, PS/2. Bookmark the permalink.

15 Responses to Learn Something Old Every Day, Part V: Early IBM PS/2 Hard Disks

  1. Yuhong Bao says:

    I wonder if it was the same Xebec OEM.

  2. Michal Necasek says:

    The PS/2 ST-506 adapters are all highly integrated with custom IBM chips. As far as I can tell, the adapters were manufactured by IBM. It is quite possible or even likely that some OEM (WD? Xebec?) worked on those with IBM, but it’s not at all clear who it might have been.

  3. MiaM says:

    Thanks for digging in to this!

    What connectors did the disks in the model 50 and 60 use?

    (Freely from memory) the schematics for the model 30 shows that the disk has four address lines, i.e. 16 registers. IIRC the MFM controller used by IBM in the XT has way fewer registers. How many registers does the BIOS use?

    Bonus side track: I would say that if you were to rewrite parts of the BIOS of a model 25/30 you could use a passive adapter with a compact flash card, or use half the capacity of a regular AT-IDE/PATA disk. In practice if any modification were to be made to the BIOS of a model 25/30 in order to be able to use a replacement disk solution, it would be to make it use regular AT-IDE/PATA disks using an ISA card without any special hardware and unfortunately just ignore the built in interface. (This assumes that there are more surviving model 25/30 computers than matching hard disks, and/or that the users really want to use a larger disk as the only disk. I would assume that for an extra disk in conjunction with the built in disk you could just use one of those cards that adds an extra IDE/PATA port and has a built in bios to handle that port).

    Extra bonus: the connectors on the disks on PS/2 computers differs from what you would expect. For the floppy it’s obvious for a trained eye to tell that it’s just a regular floppy drive with a different connector and different pinout. For the hard disks it’s less obvious what they are though.

  4. Michal Necasek says:

    The PS/2 XT-ish controller (I kinda like the XT/2 name) uses three registers, at 320h, 322h, and 324h. The BIOS (at least on Model 50/60) also does 16-bit I/O to the data register in some situations. As far as I can tell, addresses 321h and 323h are unused.

    One variant of the MCA ST-506 adapter looked like this, with standard ST-506 connectors, and another looked like this, with a custom connector.

    I’m almost certain that Model 30 only supported one drive, while Model 50/60 supported two.

    My understanding is that on Model 25/30 it’s possible to install more or less any ISA storage adapter with its own BIOS, the difficulty is that those machines are short on expansion slots.

  5. Chris M. says:

    The second card with the custom adapter is out of a Model 50. The later Model 50Z and I think the Model 70 used a passive adapter card instead with more pins. The drives in those were “direct bus attachment”, basically an MCA variety of IDE. Makes data recovery fun and exciting if you don’t have a MCA machine readily available. I think those drives auto configured geometry from the reference disk, but its been a long time.

    The Model 25/30 drives were basically “XTA” interface like used in the later Tandy 1000 series and some other XT clones. The connector was different, but the signals were mostly the same.

  6. Michal Necasek says:

    No, I can safely say that Mod 25/30 was not XTA. Yes, the bus signals are nearly identical, but the programming interface is more or less the same as the ST-506 adapters on MCA PS/2 machines, not like PC/XT.

    XTA would have made sense but… nope. The I/O port range is more or less the same, the IRQ and DMA channels are the same, but everything else is different. Different status/command bits, different command blocks, it’s totally incompatible. My impression is that software that does not use the BIOS to access the disk was very rare on those machines. For Mod 30-286, operating systems like OS/2 or XENIX needed their own drivers.

    The DBA interface is interesting because after ATA and XTA it’s the third disk to system bus interface used in PCs (well, for some definition of “PCs”). That said, I’m not entirely sure if DBA or XTA came first. ATA is definitely the oldest.

  7. I had an IBM PS/1 2011, and it had a weird IDE but not quite IDE interface. Many things couldn’t find it, I wonder if it used some weird “XT/2” like interface

  8. Michal Necasek says:

    According to the PS/1 Tech Ref I found, it was definitely “XT/2”. The concept is certainly IDE, but the interface is not ATA, and it’s not XTA either. Why IBM bothered with non-ATA drives at the time the PS/1 was released (1990) is a bit beyond me.

    With the original PS/2 Model 25/30 they had the problem that the machines didn’t have a 16-bit bus, so ATA wasn’t a good fit. XTA would have been but now that I think about it, there probably weren’t any XTA drives in 1986-1987.

    Now I actually wonder when IBM started using IDE. I know that PS/2 E (Model 9533) and ThinkPad 750 both used IDE and came out in 1993. The 1992 ThinkPad 700/720 still used funky “ESDI” drives. Lots of IBM desktops used SCSI at the time, and the cheaper models tended to use “ESDI” or “ST-506” drives with integrated controllers. IBM also seems to have started producing ATA drives around 1992.

  9. Richard Wells says:

    JVC did a modified ST-412 interface using a 26-pin cable which had both power and data flowing through it. The earliest reference I can find for it is a 1986 Infoworld article announcing the introduction of a 21 MB drive that was added to the existing 10 MB drive. IBM’s interface for the Model 25/30 is similar except for the use of a card edge. IBM wanted most of the line to snap together fast and cut production costs.

    The first ATA drive was launched in late 1986 just months before the PS/2 line. The first XTA drives showed up mid 1988. The first IBM machine to be shipped with an IDE drive I know of was the L40 laptop from 1991 which used a 60 MB Conner.

  10. Chris M. says:

    Looks like the PS/2 Model 35SX/40SX came with IDE drives in 1991.

  11. Michal Necasek says:

    Indeed, and those machines came out in June 1991. Reportedly used Maxtor OEM drives. Wonder why IBM didn’t use IDE for the PS/1 which was not much older.

    So was Model 35 SX/40 SX the first IBM PC machine with ATA drives?

  12. Richard Wells says:

    The L40SX was released in March 1991. Having a laptop IDE drive was very unusual for IBM since the 60 MB Conner was only available in the fourth quarter of 1990 and even the whole 2.5″ hard drive category was barely two years old.

    Besides being 3 months later, the 35SX and 40SX were more to the usual tradition of IBM design. The Maxtor drives had been launched early in 1990 so well proven. The 35SX and 40SX were also available without hard drives.

    IBM was manufacturing IDE drives starting in the middle of 1990. Those were not used by IBM though I have never located who did purchase them.

  13. Michal Necasek says:

    Oh, that’s interesting. So the L40SX was an ISA machine, then the ThinkPad 700/720 was MCA, and with ThinkPad 750 IBM went back to ISA.

    I do know that disk upgrades on the ThinkPad 700/720 are painful precisely because the drives aren’t ATA.

  14. GL1zdA says:

    AFAIK, the DBA interface is basically an MCA interface. The drive comes with the controller integrated, which talks to the drive via ESDI or ST506. They are a pain to work with, because they fail and finding reasonable priced replacements is hard. I have one in my PS/2 and it was the 5th drive I bought.

  15. Michal Necasek says:

    Yes, DBA is basically a kind of IDE, only with MCA rather than ISA. Exact same idea, but completely different in detail. In retrospect it seems the PS/2 machines came out at just the wrong time and ended up with all these bizarre disk interfaces that no one else uses. A year or two later only SCSI and ATA would have made any real sense.

    I have a Model 77 with a SCSI adapter and replacing the drives is a lot easier. (And the original drive did die a while ago.) I also have an ISA based PS/2E and that thankfully uses regular 2.5″ ATA drives.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.