After digging through BIOS listings and disassembling the Adaptec 1542C BIOS as well as the PC DOS 2000 boot sector, it’s clear why the floppy-less SCSI boot does not work on my test system. It’s because disk reset done by the boot sector (INT 13h/00h) fails when booting off SCSI. But the details are… interesting.
The root of the problem is that the INT 13h/00h service (Reset Disk System) behaves in a rather unexpected and to some extent very surprising manner. For reasons that aren’t obvious, resetting a fixed disk (BIOS drive 80h) also resets the floppy subsystem. And for that reason, the Adaptec 1542C BIOS, which hooks the INT 13h vector, has a relatively complicated disk reset logic (see below).
At a quick glance, MS-DOS 6.22 should behave exactly like PC DOS 2000 in this regard. It executes the same INT 13h/00h call with DL holding the boot drive number.
If the drive number passed in DL register is less than 80h, the Adaptec BIOS checks whether the equipment byte at 40:10 has bit zero set. That bit indicates whether a bootable floppy drive is present. When the bit is not set, the Adaptec BIOS simply returns success. When the bit is set, Adaptec’s BIOS execute INT 40h (that is the re-vectored floppy BIOS entry point) and immediately returns with whatever status INT 40h produced.
If the drive passed in DL is 80h or higher, it gets more complicated. The 1542C BIOS then checks whether it controls drive 80h (the first hard disk, typically the boot drive). If it doesn’t, it executes the old INT 13h vector (which was in place before the 1542C was initialized) and returns, although there’s a bit of trickery with the byte at 40:75 to hide the presence of the Adaptec-controlled SCSI disk from the chained BIOS.
Note that the above case works well and the system boots fine.
The troublesome case is with 1542C controlling drive 80h. In that case, the Adaptec BIOS again checks bit 0 of the equipment byte at 40:10; and again if the bit is set, executes INT 40h and returns, and if not, simply returns success. Note that there is nothing whatsoever done to reset the SCSI drive because the concept does not really apply, and there is also nothing done to reset any other hard disks which might be present.
The above described logic sounds perfectly sensible, yet it does not work. The trouble is that the system BIOS does set bit 0 of the equipment byte, indicating a boot floppy even when there is no floppy drive configured. That causes the floppy disk reset to fail if there is also no floppy controller.
Okay, resetting a non-existent floppy drive sounds like it ought to fail, so why does it work without the Adaptec?
The canonical implementation is the IBM PC/AT. And its logic is rather different. When the PC/AT fixed disk BIOS service processes the reset function, it likewise checks if the drive passed in DL register is 80h or higher. If not, it executes INT 40h and returns, including the status code in AH and flags in the state INT 40h left them in.
That is almost the same as the 1542C BIOS. Note that the IBM hard disk BIOS does not check the equipment byte. It leaves up to the floppy BIOS to decide what to do or not do, which seems to be sound logic.
If the drive number is 80h or higher, the PC/AT BIOS first executes INT 40h and clears the status code in AH. Then it gets interesting. If the drive number in DL is 82h or higher (more than the maximum of two fixed disks supported by the PC/AT BIOS), the routine returns to caller. Note that in this case, the floppy drive is reset but INT 13h always returns success.
If DL is 80 or 81h, the fixed disk is actually reset and the status of the fixed disk reset operation is returned.
It’s apparent what the difference is. With actual IBM PC/AT BIOS (and my board’s clone BIOS), executing INT 13h/00h with 80h in register DL can never fail because of the floppy subsystem, only because of a fixed disk failure. With the Adaptec 1542C BIOS, it can fail—but only when the 1542C controls drive 80h.
The logic in the Adaptec BIOS checking the equipment byte is questionable. It makes potentially unwarranted assumptions about the relationship of the bit to the floppy BIOS behavior. At any rate, the real problem is that the Adaptec BIOS returns the status of the floppy subsystem reset to the caller in cases where the original IBM BIOS does not. That can (and does) cause visible behavioral differences.
Another problem is that my board’s BIOS leaves the bit 0 in the equipment byte set even when no floppy drives are configured. That is likely a bug. Yet another unexpected behavior is that the floppy disk reset still succeeds with no drives configured as long as there is a FDC, but not without.
It is fairly obvious that back in the early 1990s, machines without floppy drives were exceedingly rare and firmware vendors did not test the behavior of floppy-less systems. The problem also illustrates that alternative BIOS vendors need to very carefully consider the behavior of the original and stick to it as much as possible. It is also apparent that the IBM BIOS authors probably did not consider all edge cases.
The behavior of INT 13h/00h is quite odd to say the least. It is also very questionable what the value of the boot sector resetting any disk might be when booting from hard disk. By the time the DOS boot sector is loaded, the MBR already had to be successfully loaded and executed, hence resetting the disk is unlikely to do anything useful and resetting the floppy drive even less so. But for simplicity, the boot sector is the same for hard disks and floppies which contributes to this problem.
It is worth noting that the odd disk reset behavior was introduced in the IBM PC/XT (1983). Its fixed disk BIOS was located in a separate ROM, but the reset logic was very much like the PC/AT described above and also masked floppy reset failures when also resetting the fixed disk.