2. If I boot from a floppy, it never loads the XT-IDE BIOS from the Lo-Tech CF Adapter card, so the hard drive is not available. I have to keep the floppy out, press "F" to skip to XT-IDE firmware, and then hit "A" to boot to the floppy. Very annoying.
I tested this one. As I suspected the location of BIOS extensions in address space (and thus the order in which they're initialized) do matter here: If FDC BIOS extension address is higher than XT-IDE BIOS extension, the FDC BIOS will get initialized last, and will run first on boot (INT 19h), and it will result in the behavior you've described. Otherwise (FDC BIOS extension address is lower than XT-BIOS extension address) the XT-IDE BIOS IPL will run first. Now it seems to be that it defaults to boot from drive 'C:', so you'll have to press 'A' during boot to boot from floppy.
On the technical side, it looks like XT-IDE BIOS extension does not install INT 13h handler during BIOS extension scan. It installs INT 19h handler instead, and installs INT 13h handler later in IPL (INT 19h) There could be some good reasons for that (for example system BIOS or other BIOS extensions messing around with interrupt vectors), maybe aitotat (the XT-IDE BIOS author) can shed more light on this implementation.
I spent quite some time to come up with BIOS initialization procedure that works sufficiently well on systems that might be using my FDC BIOS extension. Some difficulties that I've experienced:
- PC and XT run ROM BIOS extension scan when system is in a half-initialized state, for example keyboard is not configured yet, and interrupts are not enabled. AT systems (at least AT-compatible with AWARD and AMI BIOSes) run ROM BIOS extension scan with initialized keyboard and interrupts. This for example rules out the possibility of running setup utility during the ROM BIOS scan on PC/XT. My BIOS can be configured to prompt for configuration utility either during BIOS extension scan, or during IPL (INT 19h). The latter one is the default.
- PC and XT BIOSes will overwrite BIOS equipment word after BIOS ROM extension scan. So that for example the number of floppy drives will be that configured by switches and not by FDC BIOS. As a workaround my BIOS will update BIOS equipment word on boot (this is a configurable option too).
- The whole interrupt chaining thing is messy
The FDC BIOS needs to hook to the following interrupts:
* INT 08h (IRQ0) - Timer, used to turn off floppy drive motors. This generally needed only in two FDCs configuration (system's BIOS handler normally turns off motors on the first FDC)
* INT 13h - Floppy and Hard drive services. Now there are at least two scenarios possible with INT 13h: The first scenario is that the FDC BIOS extension runs first (and INT 13h is still pointing to the default BIOS handler), in this case FDC BIOS extension installs itself on INT 13h. The second scenario is that some another BIOS extension (normally a hard drive BIOS) already installed itself on INT 13h, in this case floppy service vector is normally relocated to INT 40h, so the FDC BIOS installs itself on INT 40h.
* INT 19h - IPL (initial program loader) - BIOS calls this interrupt to boot the OS. You'd think that the default BIOS IPL will boot from floppy, but it is not the case. For example it gets confused by disk changed errors. So the FDC BIOS implements its own IPL. Also, as I described above, this interrupt is used to update BIOS equipment word and to prompt for and run the FDC BIOS configuration utility.