Let me tell a story in case it helps someone else in future
Recently I replaced the original IBM floppy controller with a generic 16-bit multi I/O card in my IBM XT, the objective being to gain high-density floppy support. I have a XT-IDE card in this machine which provides the ability to easily flash a BIOS extension for HD support alongside the XT-IDE BIOS.
The floppy BIOS I use is from Sergey's FDC project: http://www.malinov.com/Home/sergeys-projects/isa-fdc-and-uart
This all worked well, apart from a couple of bugbears:
- Intermittent 601 (floppy/FDC) POST errors
- Following cold/warm reboot and POST, accessing a high-density disk would give a general failure in DOS, unless a low-density disk was accessed first.
On boot, the floppy BIOS is initialised during POST and sets up the FDC, then the floppy POST checks run. Apart from the seek test sounding like crap on ageing drives, I suspect the XT BIOS messes up the FDC settings, for example setting the data rate back to 250kbps/low-density.
On a PC 5150, a dipswitch can be used to disable floppy POST. However on an XT, the switch also makes the POST loop indefinitely.
The obvious solution is to modify the XT BIOS, but this requires burning an EPROM.
Instead, I was able to modify the floppy BIOS to skip floppy POST after initialisation.
The floppy POST code is immediately after option ROM initialisation, so we can modify the stack to skip the floppy POST code while returning to the XT BIOS.
Note:
- Requires the ability to modify either the floppy BIOS or another option ROM. The XT-IDE or the lo-tech ROM card makes this easy.
- As subsequent option ROMs won't be initialised, the modified option ROM should be the last one to be initialised.
- Tested on XT BIOS 01/10/86, others not tested but should work.
The following code should be inserted immediately before the RETF at the end of the option ROM initialisation code:
58 POP AX // Discard IP
58 POP AX // Retrieve CS
59 POP CX // Discard DX
59 POP CX // Retrieve IP
83C173 ADD CX,73 // For BIOS 01/10/86. Change to 72 for BIOS 05/09/85, 6C for BIOS 11/08/82. Increases stored IP to skip past floppy POST.
1F POP DS // Restore DS
50 PUSH AX // Save CS
51 PUSH CX // Save modified IP
(CB RETF) // Return to XT BIOS
Make sure to fix up the BIOS checksum value.
With these changes the floppy POST gets completely skipped, so it's up to the floppy BIOS to initialise the controller. This obviously prevents the seek test and 601 POST errors but also fixed my issue with accessing HD floppies after boot. In the case of Sergey's floppy BIOS, I just overwrote the INT19 handler install code with the above changes as I'm using the XT-IDE BIOS to handle floppy boot.
Recently I replaced the original IBM floppy controller with a generic 16-bit multi I/O card in my IBM XT, the objective being to gain high-density floppy support. I have a XT-IDE card in this machine which provides the ability to easily flash a BIOS extension for HD support alongside the XT-IDE BIOS.
The floppy BIOS I use is from Sergey's FDC project: http://www.malinov.com/Home/sergeys-projects/isa-fdc-and-uart
This all worked well, apart from a couple of bugbears:
- Intermittent 601 (floppy/FDC) POST errors
- Following cold/warm reboot and POST, accessing a high-density disk would give a general failure in DOS, unless a low-density disk was accessed first.
On boot, the floppy BIOS is initialised during POST and sets up the FDC, then the floppy POST checks run. Apart from the seek test sounding like crap on ageing drives, I suspect the XT BIOS messes up the FDC settings, for example setting the data rate back to 250kbps/low-density.
On a PC 5150, a dipswitch can be used to disable floppy POST. However on an XT, the switch also makes the POST loop indefinitely.
The obvious solution is to modify the XT BIOS, but this requires burning an EPROM.
Instead, I was able to modify the floppy BIOS to skip floppy POST after initialisation.
The floppy POST code is immediately after option ROM initialisation, so we can modify the stack to skip the floppy POST code while returning to the XT BIOS.
Note:
- Requires the ability to modify either the floppy BIOS or another option ROM. The XT-IDE or the lo-tech ROM card makes this easy.
- As subsequent option ROMs won't be initialised, the modified option ROM should be the last one to be initialised.
- Tested on XT BIOS 01/10/86, others not tested but should work.
The following code should be inserted immediately before the RETF at the end of the option ROM initialisation code:
58 POP AX // Discard IP
58 POP AX // Retrieve CS
59 POP CX // Discard DX
59 POP CX // Retrieve IP
83C173 ADD CX,73 // For BIOS 01/10/86. Change to 72 for BIOS 05/09/85, 6C for BIOS 11/08/82. Increases stored IP to skip past floppy POST.
1F POP DS // Restore DS
50 PUSH AX // Save CS
51 PUSH CX // Save modified IP
(CB RETF) // Return to XT BIOS
Make sure to fix up the BIOS checksum value.
With these changes the floppy POST gets completely skipped, so it's up to the floppy BIOS to initialise the controller. This obviously prevents the seek test and 601 POST errors but also fixed my issue with accessing HD floppies after boot. In the case of Sergey's floppy BIOS, I just overwrote the INT19 handler install code with the above changes as I'm using the XT-IDE BIOS to handle floppy boot.
Last edited: