The XENIX 2.2.3 Mystery, Continued

After pondering the strange TeleDisk images of SCO XENIX 386 2.2.3 (released in 1988) and not being able to make heads or tails of it, I decided it was time to simply restore the TeleDisk images onto actual floppies and boot those on a real system.

This was not entirely straightforward. The images were of 720K 3.5″ disks. On a typical system, DOS is unable to format a 1.44M 3.5″ disk as 720K; I know that from experience. TeleDisk did not fare any better. It would simply not write the 720K image onto a high-density 1.44M disk (and of course I don’t have any actual 720K disks anymore, or at least not ones I’d want to overwrite). That raised two questions: why, and what to do about it?

The latter is easier to answer. Either tape over the ‘density hole’ on a HD disk, or fill the hole with a wadded piece of paper (newspaper works well). I took the latter route, fixed up two floppies, and that allowed TeleDisk to write the 720K images (and also enabled DOS to format the floppies as 720K).

Now back to the first question: Why won’t a PC format a 1.44M floppy as 720K? That should be perfectly possible, since 720K media just uses one-half the bit density. The preceding paragraph hints that it is physically possible, but something normally prevents it. Obviously the density detect hole (found opposite the write lock on HD 3.5″ floppies) has something to do with it.

In PS/2 systems, it is reportedly possible to format 1.44M media as 720K without too much hassle, with the caveat that the disks may cause trouble in actual 720K drives. In typical PCs, it simply doesn’t work. 3.5″ floppy drives have a mechanism to detect the media density; some drives can also be configured to report the detected density on pin 2 of the drive interface (HD OUT signal).

In typical PCs, the drive does not utilize the HD OUT signal as the host system wouldn’t know what to do with it, either because the floppy controller doesn’t support it or because the BIOS doesn’t. Instead, the floppy drive detects the media type and prevents the host system from reading/writing the medium unless the correct data rate is used (the 720K media use MFM encoding at 250kbps, with the disk rotating at 300rpm; the 1.44M media are very similar with the key difference that 500kbps data rate is used). In fact the data rate is how operating systems typically distinguish between 3.5″ media types—if it can be read at 250kbps, it must be a 720K disk, at 500kbps it must be a 1.44M medium.

The obvious benefit of this scheme is that a 720K (double-density, or DD) disk cannot be accidentally formatted to 1.44M; while that might be possible, data loss would be highly likely to occur sooner or later. The less obvious drawback (perhaps not even considered a drawback by the original implementors) is that a 1.44M disk cannot be formatted to 720K because the drive will prevent it.

Note that for 5.25″ high-density drives (1.2MB), the controller may need to correctly output the DENSEL (Density Select) signal on pin 2 of the drive interface. It appears that in most 3.5″ drives this signal is not utilized, or at least not by default. The drive itself is in control of media density detection, with no input from the host. The host system merely needs to select the data rate appropriate for the medium (250/500kbps).

Anyway, back to XENIX. TeleDisk restored the strange images without complaint, which confirms that there is nothing wrong with the TeleDisk images per se. Although it is questionable whether the disks corresponded to the originals; the trouble is that when sectors with duplicate IDs exist on a single track, they cannot be reliably written to. That might be a part of a copy protection scheme… then again it might not.

With the two boot floppies in hand (traditionally designated as N1 and N2), I set out to boot them on two different systems. On a Pentium II class machine, the XENIX 2.2.3 kernel panicked due to a trap almost immediately. Too new perhaps? Not sufficiently PC compatible? Who knows.

On an IBM ThinkPad (ironically a newer machine, with a Pentium M processor), XENIX got further. The kernel started up and started reading the second (filesystem) floppy. Sadly, after a while XENIX started making grinding floppy seek noises and announced that it couldn’t read a block off the disk. So that was that.

Maybe uncorrupted floppy images of XENIX 386 2.2.3 will surface eventually…

This entry was posted in PC hardware, Xenix. Bookmark the permalink.

17 Responses to The XENIX 2.2.3 Mystery, Continued

  1. Jim Leonard says:

    In PS/2 systems, it is reportedly possible to format 1.44M media as 720K without too much hassle, with the caveat that the disks may cause trouble in actual 720K drives.

    It’s worse than that — in many PS/2 systems (I verified this on a PS/2 Model 30), you can format ANY 3.5″ media as 1.44MB. I had a friend in the late 80s who kept wondering why his disks were failing all the time — he was formatting 720K disks as 1.44MB and the PS/2 happily let him do it.

  2. michaln says:

    One caveat – the PS/2 Model 30 is different from the others. In fact “modern” floppy controllers (Intel 82077AA, NatSemi PC8477B) typically have AT, PS/2, and Model 30 modes. I don’t know if the user-visible behavior was different, but on the register level the PS/2 Model 30 was different from Model 50/60/80 etc. I guess I’ll have to try on my Model 80 when I’m near again – all I know is that the PS/2 floppy subsystem went through quite bit of evolution and especially the older models were substantially different from clones.

    At any rate… yeah, I guess this is exactly why clone PCs implemented the hardware density select mechanism. I suspect that when they implemented it, it didn’t even cross their minds that anyone might want to voluntarily halve the capacity of a 3.5″ HD floppy 🙂

  3. Richard Wells says:

    If I remember correctly, the density select pin was added about the same time Toshiba was pushing the concept of ED disks which had another density pin proposed. While using DD disks as HD disks seldom works and HD disks formatted for DD usage is viable for short time frames, ED disks were very poor when given a different format. At $10 a disk, accidentally formatting in a method that renders the disk unusable is not favored by users. These days the whole problem is solved by floppy drives that can only handle HD floppy formats and a decided lack of non-HD media.

    The thicker material used on double density floppies was probably the best long term storage option. Thin HD floppies don’t stand up to abuse as well and ED floppies needed more development time.

  4. michaln says:

    I’m pretty sure the ‘HD hole’ has always been there… at least it’s there on my 3.5″ HD disks from 1987 (otherwise newer machines presumably couldn’t read them at all). But yes, ED floppies had the density detection offset a little.

    Given that ED media used a completely different recording method (perpendicular recording) and a different magnetic substrate, I certainly believe that writing them as regular disks could make them completely unusable. With DD/HD disks, I think it was “just” a question of reliability, but the medium could be reformatted again and wasn’t destroyed.

    I never used ED floppies myself, but my experience with HD floppies is that pre-recorded disks last quite well (still readable after 25 years with almost no problems), while user-recorded HD disks tend to go bad rather fast. And the quality of new floppies seems to have gone down significantly over the years, too.

  5. Yuhong Bao says:

    michaln: PS/2 model 30 has only 720K drives. PS/2 model *30-286* has 1.44MB drives.

  6. michaln says:

    So what? I was talking about the “Model 30 mode” of floppy controllers. They never bothered to specify if it’s “Model 30-plain” or “Model 30-286”.

  7. Richard Wells says:

    IBM shipped HD drives in 1987 so the production prototypes had to be manufactured in 1986. Toshiba shipped their first ED drives in 1991 with prototypes being demonstrated in 1989. InfoWorld has a short blurb about a company Practical Computer Technologies shipping 2.88 MB EHD drives using Toshiba technology in 1990 though I don’t know if those are the same as the 2.88 MB drives that NeXT and IBM used.

    IBM’s early drives lacked the pin that checked for HD capability though IBM did talk about how the two holes on HD floppies allowed them to be attached to a binder. I don’t have access to any internal memos for the development process so I can’t be too sure exactly what happened. I see two possibilities:

    1) IBM told the early manufactures to remove the density detecting pin from drives so users can enjoy the same disk versus drive mismatch that happened with 5.25″ and 8″ drives. I am not a fan of late-80s IBM management but that just seems too stupid to be plausible.

    2) IBM introduced the extra hole but didn’t plan on having it detected by a computer. After the PS/2 shipped, the idea of using the IBM supplied hole for detection purposes occurred to various manufacturers plus adding more holes for additional densities. Toshiba was making a lot of floppy drives and had a big incentive to ensure correct density formatting. No more returns of drives when the incorrectly formatted diskette stops being readable after a few uses and the user loses all the irreplaceable data on the diskette.

    Obviously, things are different now. But it seems a bit much to expect drive manufacturers to plan for 25 years in the future when DD disks haven’t been produced in many years but are occasionally still needed.

  8. Yuhong Bao says:

    AFAIK 1.44MB floppy support was in the AT 339 BIOS, but I don’t think IBM ever shipped this configuration.

  9. michaln says:

    All I can say with 100% certainty is that the BIOS listings for the XT/286 (IBM model 5162) dated 04/21/86 do include 1.44MB floppy support. I could not find any mention of any 1.44 drives in that era supported by IBM, though obviously IBM must have had something available internally.

  10. michaln says:

    This is an interesting question. I don’t have a really old PS/2 floppy drive at hand; the one I have here (made by Mitsubishi, P/N 1619618, FRU 64F0162) clearly does have the density detect pin. Whether it was actually used I can’t tell.

    My oldest 3.5″ HD floppies were shipped as part of the MS OS/2 1.02 SDK. The files on those disks are dated Dec 1987 and I’m pretty sure the disks did go out that month. At any rate, these must be among the oldest high-density 3.5″ disks available in the PC market, only 8 months after the PS/2 line was introduced. The disks do have the HD hole.

    Anyway, how about theory 3) IBM wanted to implement density detection but for whatever reason, the drives weren’t available in time. So the diskettes all sported the density detect hole but actual systems couldn’t detect anything.

    My guess is also that it might be pretty easy to upgrade an existing 720K 3.5″ drive to support 1.44M media as they are mechanically the same, but implementing density detection requires additional logic and a sensor.

  11. Richard Wells says:

    A link regarding early PS/2 models and the lack of floppy detection:
    http://ps-2.kev009.com/ohlandl/floppy/floppy.html#Format_720K_On_144MB

  12. Robcfg says:

    From my experience with older 8-bit machines, if you need to format a HD 3.5″ floppy disk to 720Kb, you only need to cover the hole to the right (the one that isn’t the write protect hole), and the disk drive will not complain about it.

    It’s not supposed to be the best scenario, as the disks seems to deteriorate a bit earlier than DD disks.

    Regards,
    Rob

  13. michaln says:

    Yeah, that’s exactly what I did (see the previous article about XENIX 2.2.3). It worked just fine. If the data on the disks goes bad after a week, I can just write the disks again, it’s no bother.

    The funny thing is that I probably have 30-50 3.5″ DD disks in good shape, but they all hold things like Windows 2.0, old Microsoft C and MASM, Windows 2.0 SDKs, and stuff like that. For a while in the late 1980s and early 1990s, Microsoft preferred DD 3.5″ media for DOS-based software. Apparently there were enough systems with (only) 720K 3.5″ drives that it made sense. Interestingly, their OS/2 software always came on HD floppies (both 5.25″ and 3.5″). Perhaps there weren’t any AT class machines (to speak of) with only a 720K drive.

  14. rthdriblizer says:

    Maybe some new xenix 2.2 images are coming:
    http://www.betaarchive.com/forum/viewtopic.php?f=16&t=33666

  15. Michal Necasek says:

    Maybe — I’ll believe it when I see it (and it might be one of the known versions anyway).

  16. vbdasc says:

    > Instead, the floppy drive detects the media type and prevents the host system from reading/writing the medium unless the correct data rate is used (the 720K media use MFM encoding at 250kbps, with the disk rotating at 300rpm; the 1.44M media are very similar with the key difference that 500kbps data rate is used)

    I put some thought on this and now have a question (please forgive my blogpost necromancy): If the floppy drive selectively prevents the host from accessing the medium, this means that the drive must have a way to detect the data rate (250 or 500kbps), correct? But IMHO this would be a rather difficult task for the drive. The 250kbps and 500kbps MFM data signals look very similar; only the former has smaller spectral bandwidth than the latter. The easiest way for the drive to distinguish these would be to have a PLL module with an 8MHz or 24MHz reference oscillator, just like in the PC XT/AT floppy controller boards. And that would still be an expensive, redundant, complex and cumbersome solution, with benefits hardly worth the effort.

  17. Michal Necasek says:

    That’s a really good question (and comments added years after something was posted are standard here, so no worries).

    I don’t know how it is done. It is the drive doing it because most 3.5″ drives neither report nor accept any media density information. The answer should be in floppy drive datasheets but either it’s not there or I haven’t found it yet.

    The drive clearly knows what the media type is (otherwise messing with the density hole would do nothing), and from the host it has no explicit information in a generic PC. So it must somehow recognize the data rate.

    As for the benefits, there are at least two possible explanations. It could have been a customer requirement (customers being the OEMs). Or as mentioned in a previous comment, the drive manufacturers wanted to avoid end user complaints and drive returns caused by attempts to format DD media as HD.

    Media manufacturers would certainly have an incentive to prevent formatting DD media as HD. It is possible that also preventing the other mismatch (HD media formatted as DD) was a more or less unintentional side effect.

    I’m sure somewhere someone has detailed 3.5″ drive documentation which explains how it’s done.

Leave a Reply

Your email address will not be published. Required fields are marked *