• Please review our updated Terms and Rules here

Sergey's 8-Bit FDC and Serial Port board...

Al Hartman

Veteran Member
Joined
Aug 13, 2013
Messages
912
Location
Keansburg, New Jersey, United States
I'm building up two of these boards. I'm nearly done on one of them, and need parts for the other. I should have everything by the middle of the coming week.

I have the BIOS and the XTIDECFG program to program the board.

My plan to program the boards is:

1. Set extension BIOS address to D0000h

2. Copy BIOS and XTIDECFG program to my hard drive.

3. Program the BIOS.

4. Restart and test.


Does anyone see a problem with these steps?

I'll have to make a cable for this board as it won't use the existing cable I have now.
 

Al Hartman

Veteran Member
Joined
Aug 13, 2013
Messages
912
Location
Keansburg, New Jersey, United States
Both boards are done (FDC only, waiting for serial chip and DE-9 Connector).

Both are programmed with the BIOS.

Both boards tested OK with a 360k drive by formatting a disk, copying files, and then running TESTFDC.

I tested one board with a 1.44mb 3.5" drive. It copied files, formatted a disk and ran TESTFDC.

I'll test the other board with the 3.5" later, but not expecting trouble. And, I have a 1.2mb drive to try.

My only negative is how long the FDC BIOS seeks before it decides there is no bootable floppy in drive A:, and it doesn't automatically continue to boot from the hard drive. You have to hit a key to tell it to skip booting the floppy. Annoying, but livable.
 

Al Hartman

Veteran Member
Joined
Aug 13, 2013
Messages
912
Location
Keansburg, New Jersey, United States
Both boards fully populated and assembled. Real easy to do. I even screwed up a couple things, and fixed them without damage to the board or components.

Tested the comm ports last night, and they worked great.

I have a couple of issues with the firmware though...

1. It takes too long to fail booting from a 5.25" floppy drive. If a 3.5" is drive 0, it comes back right away.

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.

3. Sometimes after writing the configuration, the system does not reboot properly, and I have to power cycle.

4. Also, if I hit F2 at the wrong time, the XT-FDC firmware keeps trying to boot from the 5.25" and won't accept a later "F2" or an "F" key. So, I have to reboot and go through the whole process again.

5. The DOS Format.com under DOS 3.30 and DOS 5.00 crashes when I try to format a disk. I have to reboot the system. It didn't do this with the Magitronic half card I had in there before. Norton Utilities Format.exe works fine.

5150 logicboard w/640k
V20 CPU
Lo-Tech CF Adapter with latest XT-IDE firmware from his website.
Sergey's FDC and Comm port card with the latest firmware from his site.

Any ideas?
 

sergey

Veteran Member
Joined
Jul 15, 2010
Messages
740
Location
Silicon Forest, Oregon, USA
Both boards fully populated and assembled. Real easy to do. I even screwed up a couple things, and fixed them without damage to the board or components.

Tested the comm ports last night, and they worked great.

I have a couple of issues with the firmware though...

Thanks for your feedback. I'll try to look into these issues (as time allows). Just to make sure, you're using FDC BIOS version 2.2, right?

1. It takes too long to fail booting from a 5.25" floppy drive. If a 3.5" is drive 0, it comes back right away.
What is the failure scenario here? Do you have a disk installed in 5.25" drive? If yes - had it been formatted?
It might be related to the fact that 5.25" drives (at least 360KB ones) don't have disk changed signal, and BIOS doesn't use that to determine if drive is ready.

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.
It might be an artifact of the BIOS extension mechanism in early PCs, or bug (feature?!) of XT-IDE BIOS. Generally BIOS extension should be installed during BIOS extension scan. It looks like in your case XT-IDE BIOS is installed later - INT 19h handler... You can try changing order of XT-IDE and FDC BIOS extensions in memory, so that XT-IDE gets priority on INT 19h.

3. Sometimes after writing the configuration, the system does not reboot properly, and I have to power cycle.
So FDC BIOS configuration utility does not reboot the computer - are you rebooting the computer manually? Can you please describe what exactly you're doing, so I can reproduce this issue?

4. Also, if I hit F2 at the wrong time, the XT-FDC firmware keeps trying to boot from the 5.25" and won't accept a later "F2" or an "F" key. So, I have to reboot and go through the whole process again.
So I assume you're trying to enter the FDC BIOS configuration utility, hit F2, but too early or too late, so it doesn't go into into the configuration utility. Currently FDC BIOS waits for 3 seconds for F2 key. This delay can be changed.

5. The DOS Format.com under DOS 3.30 and DOS 5.00 crashes when I try to format a disk. I have to reboot the system. It didn't do this with the Magitronic half card I had in there before. Norton Utilities Format.exe works fine.
I will try to reproduce and debug this issue...

Thanks,
Sergey
 

sergey

Veteran Member
Joined
Jul 15, 2010
Messages
740
Location
Silicon Forest, Oregon, USA
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.
 

Al Hartman

Veteran Member
Joined
Aug 13, 2013
Messages
912
Location
Keansburg, New Jersey, United States
So, where would you suggest putting the FDC BIOS if the XT-IDE BIOS is at C800?

I put it at D800, because I didn't know where else to put it.

My two FDC cards work beautifully, and I'm very happy with them. If someday you improve the firmware, that will only be a bonus.
 

sergey

Veteran Member
Joined
Jul 15, 2010
Messages
740
Location
Silicon Forest, Oregon, USA
So, where would you suggest putting the FDC BIOS if the XT-IDE BIOS is at C800?

I put it at D800, because I didn't know where else to put it.

Well, in this case you'll need to move your XT-IDE BIOS elsewhere. E.g. put it at 0xD0000, and FDC BIOS at 0xC8000.

My two FDC cards work beautifully, and I'm very happy with them. If someday you improve the firmware, that will only be a bonus.

Glad to hear that. I will work on improving it, as much as I can... any assistance is welcome :) (For example it was really nice of you to provide the feedback)
 
Top