• Please review our updated Terms and Rules here

DOS File Level access to Secondary (370H) FDC - Driver

maxtherabbit

Veteran Member
Joined
Apr 23, 2019
Messages
2,153
Location
VA, USA
I have two floppy controllers in my 286. Primary is part of some generic Taiwanese IDE/IO card managed by the system BIOS with 2 high density drives. I also have an Adaptec 1542B SCSI controller which contains a NI DP8473V FDC (similar to the one on the CC IV) jumpered to the secondary FDC address.

As per TESTFDC, this FDC will support single density and 128B sectors. I am able to read and write disk images to/from drives connected to the secondary controller in IMD with no issues. I can then quit IMD and perform DOS file accesses to the primary FDC's drives. I'm interpreting this to mean that the two FDCs are able to "share" the IRQ/DMA without issue.

So far I have not been able to locate any software which will assign a drive letter to any drive on the secondary FDC and allow file level access.

Tried:
SDRIVE.SYS - says secondary controller not operational, tried hex editing it to not reset FDC, no effect
WONDER34.SYS - does not appear to support secondary FDC in any capacity
Uniform-PC - only allows selecting Compaticard products as Secondary FDC. Selecting the Compaticard 4 requires the CC4 device driver be loaded. Trying to load the CC4BIOS.SYS to facilitate the CC4 driver's loading is balking at the secondary FDC.

Really struggling to believe that after 40 years+ of using floppies in DOS no one ever wrote a DOS driver to access a secondary FDC, but that is seeming more and more like the case. Would it be possible to use 22disk to read DOS formats? Or would that require changing the code? I guess the other thing would be modifying the CC4 BIOS image to work with a different FDC but that's beyond my capability.
 
Most PCs only support 2 floppy drives. In all of my years of working with PCs the only PC I have ever seen that supported 4 floppy drives was the original IBM PC with its expansion unit (DOS definitely supports that). Once hard drives became available with the PC XT there was generally no need for more than two floppy drives. I/O controller cards, motherboards and BIOSes almost always support a single floppy drive controller (at 3F0h-3F7h) which allows for 2 floppy drives. Most users had no need or want for more than 2 floppy drives so this was never an issue. In fact I reduced the internal tables in the PC DOS 7.0 IBMBIO data area so that only 2 floppy drive tables were allocated by default instead of 4 saving 200 bytes of conventional memory. The additional tables would be added dynamically if needed in the case of something like an IBM PC with an expansion unit with additional floppy drives (incredibly rare in 1994).

DOS always assumes A: and B: are floppy drives, builtin drives (usually hard drives) are added after that starting with C:. Given the appropriate driver, additional floppy drives would appear after builtin drives much like a CD-ROM drive or RAM drive does.
 
Most PCs only support 2 floppy drives. In all of my years of working with PCs the only PC I have ever seen that supported 4 floppy drives was the original IBM PC with its expansion unit (DOS definitely supports that). Once hard drives became available with the PC XT there was generally no need for more than two floppy drives. I/O controller cards, motherboards and BIOSes almost always support a single floppy drive controller (at 3F0h-3F7h) which allows for 2 floppy drives. Most users had no need or want for more than 2 floppy drives so this was never an issue. In fact I reduced the internal tables in the PC DOS 7.0 IBMBIO data area so that only 2 floppy drive tables were allocated by default instead of 4 saving 200 bytes of conventional memory. The additional tables would be added dynamically if needed in the case of something like an IBM PC with an expansion unit with additional floppy drives (incredibly rare in 1994).

DOS always assumes A: and B: are floppy drives, builtin drives (usually hard drives) are added after that starting with C:. Given the appropriate driver, additional floppy drives would appear after builtin drives much like a CD-ROM drive or RAM drive does.

yeah not disputing any of that, but I want more floppy drives - I want like stacks of the things flopping all over the place
 
There was an effort to add extra floppy drive support to FreeDOS about a decade ago. I can't find any code that had been written to implement it though.
 
The end goal here is to be able to have an 8" FDD and an IBM 4869 360kB take turns on a rear bracket mounted IDC DC-37 that I've crimped on to a 34-pin ribbon that goes to the secondary FDC. Secondary FDC hassles notwithstanding, finding driver support for the DOS 8" logical format (77 track, 8 SPT, 1kB sector size) is just as elusive.
 
The end goal here is to be able to have an 8" FDD and an IBM 4869 360kB take turns on a rear bracket mounted IDC DC-37 that I've crimped on to a 34-pin ribbon that goes to the secondary FDC. Secondary FDC hassles notwithstanding, finding driver support for the DOS 8" logical format (77 track, 8 SPT, 1kB sector size) is just as elusive.

8" floppy drives predate PCs so you're probably not going to find a DOS driver that supports them. Also while DOS supports several sector sizes (128, 256, 512, 1024), 512-byte sectors were almost exclusively used to the point that some third-party disk software simply assumed a sector was 512 bytes. If a BIOS had the support you might be able to use DRIVPARM or DRIVER.SYS (DOS 3.2+) but I doubt it. You want to use something that simply wasn't relevant to PCs. 8" floppy drives were largely a thing of the 1970s.
 
I believe that Seattle Computer's 86-DOS running on their S100 platform supported 8" floppies.

It'd be pretty simple to rig up an installable device driver for DOS.
 
It'd be pretty simple to rig up an installable device driver for DOS.

I suspect it would be for you, for me it would be a massive undertaking.

Could your 22disk program be adapted to read/write DOS FAT12 disks through the use of a custom definition or would that require a rewrite?
 
Sprechen Sie x86 assembly? I might have something that could be modified.

Not exactly, I learned assembly on the Z80 but that was years ago. I guess now's as good a time as ever to learn. Having a place to start by modifying some existing code would be wonderful.
 
You would really need a device driver which accessed the secondary floppy controller (370h-377h) for DOS to see the drives since PC BIOSes only access the primary controller for INT 13h access which is what the DOS builtin disk driver uses. Even then DOS may not recognize the disks since they aren't in a standard floppy format (160KB, 180KB, 320KB, 360KB, 720KB, 1.2MB, 1.44MB, 2.88MB). I don't recall a specific media descriptor byte code for 8" floppy drives though there were two old unused codes (FAh and FBh).

Would it be possible to use a null modem serial cable to transfer over whatever data you have from whatever computer used the 8" floppy drives to a PC ? Seems like that would be easier than trying to get an anachronistic device from the 70s to work with a PC from the 80s.
 
That's what I offered. Other than using the standard DMA2, IRQ6, the code allows for specifying the FDC base address.

I have a little experience in this. Said code that I was looking at was for an Eagle 1600 DOS driver. Since I don't know what 8" format was used (I seem to recall that there were two), you'd have to figure that one out and change the device parameters and recompile. I've got a similar driver for NEC APC 8" floppies, but I don't think the native SCP 86-DOS ones were the same.
 
Starting to awaken from the nightmare. A certain resident floppy disk expert here (you may know him from his eponymous XT-IDE mod) has handed me a powerful floppy disk I/O library and a nifty DOS block device driver template to wrap around it. I've managed to get a proof of concept driver working that allows file level access to a bog standard DS/DD 5.25 disk on a secondary FDC. All the heavy lifting for toggling the DMA bit in the DORs of the primary and secondary controllers was already implemented in the library, so it's even able to copy files back and forth directly between drives on different controllers.

The main issue I'm having right now is how to handle turning the motor(s) off on the secondary FDC. The primary FDC uses a timer in the BDA to shut the motor off after a certain period. The BIOS of course doesn't service the secondary FDC so that method is unavailable. Currently I have the driver turning the secondary motors off at the end of every block level transfer, which of course is woefully non-performant since file transactions are composed of many block transfers.

Any thoughts on the proper way to handle that?

PS does anyone have any IMD images of an SCP 86-DOS double density 8" disk? I have single density FM ones but nothing MFM.
 
Last edited:
would hooking INT 08H at the time of driver initialization with a handler be an appropriate way to time the motor shutdown?

bear in mind this is my first foray into DOS programming of any kind so this is probably obvious to others, but I'm just not sure if this is the "right way" to do it
 
Back
Top