• Please review our updated Terms and Rules here

Imagedisk & floppy drives beyond C:?

Neuromancer

Member
Joined
May 3, 2021
Messages
31
Location
Columbus, Ohio
I'm trying to create a reasonable machine to read and write using multiple floppy drives. I'm using the Monster FDC controller, which has the capability to have a bunch of floppy drives on it, and there's been a lot of effort getting that to work. I found I had a working solution with a 360K 5.25" drive as drive 1, a 1.44Mb 3.5" drive as drive 0, and a Gotek as drive 0 on the 2nd FDC on the Monster FDC mapped as drive 2 in the system. DOS 6.22 was happy with this solution.

Monster FDC configuration : BIOS @ E0000, main FDC at the usual, 2nd FDC @ IRQ 3 and DMA 3 (only 1 serial port on the Monster FDC, 0 parallel ports on the machine). This configuration generally works, and the machine boots DOS from an IDE CF adapter just fine.

The problem is that Imagedisk only seems to see drives A and B, or only allows that as options. I saw in another thread that the theory was it only deals with drives on the main FDC (IRQ 6), so I've tried arranging the drives all on the same bus. That means now because the Gotek seems to only be drive 0 or 1 as an option, the 3.5" drive is drive 0 still, the Gotek is drive 1, and the 5.25" drive is now mapped as drive 2. I get a "floppy disks fail" error when I boot the BIOS, but DOS still happily sees drives A and B, and reads them. It sees drive D (the 5.25") but now won't read from it successfully.

And in the end Imagedisk still doesn't allow options other than A or B. Is there a utility that can deal with IMD files which will deal with floppy drives beyond C:? Has anyone gotten Imagedisk to read/write files to a floppy drive beyond the hard disk?

- Mowgli
 
Has anyone gotten Imagedisk to read/write files to a floppy drive beyond the hard disk?
I haven't looked at the sources in decades. It talks directly to the floppy disk controller chip
and was written to solve a specific set of problems, mainly to be a replacement for Teledisk.
It wouldn't surprise me if there never was any code written in it to support more than two
drives.
 
I don't know how that floppy controller works in general, but a possible problem is that with a PC/XT BIOS (pre 286/AT) and/or with a custom BIOS on the FDC you can have four drives with each FDC. You can also have two FDCs but I think that is only a hardware configuration that more or less never had any software support, and it just happened as a way to be able to have two IBM AT style combined MFM hard disk + floppy controller cards in the same computer, to use more than two hard disks.

If the source code is available then it should be fairly easy to at least do some dirty hack that hard codes it to use the third and fourth drive rather than the first and second, and/or use the second rather than the first FDC.
 
The problem is that Imagedisk only seems to see drives A and B, or only allows that as options. I saw in another thread that the theory was it only deals with drives on the main FDC (IRQ 6), so I've tried arranging the drives all on the same bus. That means now because the Gotek seems to only be drive 0 or 1 as an option, the 3.5" drive is drive 0 still, the Gotek is drive 1, and the 5.25" drive is now mapped as drive 2. I get a "floppy disks fail" error when I boot the BIOS, but DOS still happily sees drives A and B, and reads them. It sees drive D (the 5.25") but now won't read from it successfully.

Do "IMD /?" or read the docs. There is a "/4" switch when running IMD to allow for 4 drives. If I remember right, "C" is the third floppy drive even if you have a hard drive as "C". It's weird but it works. You might have to experiment a little to see how it works in your environment. I also have a Monster FDC and I think I might have had to move the drives around in the FDC configuration. I run a 1.2MB 5.25", 360K 5.25"/720K 5.25" when needed,1.44MB 3.5" and occasionally an 8" drive. It has been a while though as I've used Applesauce a LOT lately for archiving.

P.S. I am using IMD 1.18 in case it matters. Good luck!
 
If the source code is available

The source code (should be the most recent) is available here:

https://dunfield.themindfactory.com/dnld/sc/IMDSRC.ZIP

along with all of the author's currently-released source code here:

https://dunfield.themindfactory.com/dnldsrc.htm

To make the executable, you'll likely need the Micro-C compiler from his site. Or you could just download the pre-compiled version here:

https://dunfield.themindfactory.com/dnld/dos/IMD.ZIP

@snuci is right about the /4 option. In addition, IMD matches each floppy drive number to a letter as if the floppy drives are the only drives attached to the computer. In other words, the drive numbers 0, 1, 2, and 3 match the drive letters A, B, C, and D regardless of any HDs, RAM disks, etc. You can directly access drive 2 using the /C option and drive 3 using the /D option.

The code that does this is here:

Code:
switch(c = (toupper(*ptr++) << 8) | toupper(*ptr++)) {
  case '/A' : Drive = 0; return;
  case '/B' : Drive = 1; return;
  case '/C' : Drive = 2; goto set4;
  case '/D' : Drive = 3; set4:
  case '/4' : Maxdrive = 4; return;

So it looks like both /C and /D automatically set /4.
 
tangent: I wonder if the code runs faster with the "goto set4" part? It replaces setting drive= an extra time, but adds a jump. The code for sure makes the executable a few bytes longer. Not that such small differences make much difference on a PC, but still :)
 
Back
Top