VOGONS


First post, by Alex_C

User metadata
Rank Newbie
Rank
Newbie

I've seen this come up a few times and experienced it myself. Sometimes using CompactFlash IDE adapters causes issues with floppy drive access. Swapping disks seems to cache the previous disk's FAT in memory, leading to corruption of the subsequent disk unless it's write-protected.

I've seen people mention this as a problem with XT-IDE and also with drive overlays in general. But it seems neither of those is the actual cause.

After a lot of headaches I found the solution (though not necessarily the cause). Here are my verbatim notes relating to a 486 machine with VL-Bus graphics and I/O built into the motherboard. Skip to the end for the answer.

---

You may get problems with floppy access, though I think it could be limited to VL-Bus machines. At first I thought it was due to OnTrack or other drive overlays, but it's not. It's an issue with using CF cards in CF-IDE adapters.

It's NOT the floppy drive, as I had exactly the same issue on the DX2/66 CL/Chicony board. And I tried the known working floppy with the 386 - same issue. If I boot from a DOS floppy, even with the OnTrack software supposedly uninstalled, something in the boot sector means that swapping floppies corrupts them because the FAT is cached somehow and written to the second disk (unless write-protected).

So... try the earlier IBM overlay, and then work backwards until you find one that works? And/or perhaps disable PIO modes and other stuff? Nope... the IBM version 9.43 does exactly the same thing. In fact it's not even the overlay - it's something in the MBR that messes it up. But I don't think I can run the DDO without the MBR... or can I? Maybe install the DDO and then try fdisk /mbr? No, it's even weirder...

I tried booting to a DOS 5.00 system disk, then changing to a different floppy and doing dir. If it worked, it should show the new FAT. If it didn't work, it would still show the FAT for the DOS 5.00 system disk. Results:

- no HDD set in the BIOS, nothing plugged into the CF-IDE adapter: works
- 32MB card plugged in and formatted: works
- 512MB card plugged in and formatted: doesn't work (not even when re-fdisk'ing and format /u /s and retrying)
- 4GB card plugged in and formatted: doesn't work
- 16GB card plugged in and formatted: doesn't work

Doesn't matter if I wipe the disks entirely (dd if=/dev/zero of=/dev/whatever) and/or create partitions on Linux. Effect is the same. Remember, this also happens in the other 486 - different motherboard, different floppy drive, different controller (still VL-Bus). And it happens in this machine regardless of whether I'm using an internal or external CF-IDE adapter. It happens with 16MB or 32MB of RAM and regardless of BIOS chipset settings.

Solution: disable changeline for all installed floppy drives using drivparm in config.sys. So you MUST add "drivparm /d:0 /f:N" (where N is 7 for 1.44MB, 1 for 1.2MB and 0 for 360KB) to all config.sys files. One drivparm entry for each drive. Refer to drivparm notes elsewhere online if you need more details about it.

This works perfectly for me. Let me know your experiences here.

Reply 1 of 8, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie

The problem is because both IDE and floppy would like to exist at address 3F7h.
It is same with hard drives, not just CF cards. The CF-IDE adapters themselves can't cause the issue.

See http://www.intel.com/design/archives/periphrl/docs/7225.htm for more info.

When you have a combo adapter with IDE+Floppy, it knows how to handle this.
But having IDE and Floppy adapters on separate boards can definitely cause problems.

Another solution is to disable primary IDE port (or address) and use secondary IDE port (or address).

Reply 2 of 8, by Alex_C

User metadata
Rank Newbie
Rank
Newbie

That's not the problem, at least not on my two 486 test PCs. In both cases the IDE and floppy adapters are built into the same VL-Bus adapter. In one case they are built into the motherboard.

And these PCs do not exhibit the problem when using their original IDE hard drives. If they did they'd never have left the factory!

Reply 3 of 8, by brostenen

User metadata
Rank l33t++
Rank
l33t++

The problem is to get a CF card to work as a HDD in a machine such as an 486 right?

I have had some problems on a 486dx33 (ISA controller) and my 286 (originally with 20mb MFM HDD).
486 is Ami-BIOS and 286 is Phoenix BIOS.

The 286 would not work with any CF cards, though installing an ISA controller instead of the MFM controller, and disabling all ports except IDE made it work with a 640mb "normal" harddrive. (the 286 has serial and floppy onboard, so I needed to disable all ports but IDE) I installed it with a Drive Overlay, and funny enough it can now see and use a 32mb CF card as slave drive.

The 486dx33 is one that I had better luck with. I installed a Transcent 512mb CF card, using the parameters autodetect gave me on a more modern machine (SS7 platform). Yet random non quality cards seem to leave me not booting from master. I suspect issues are more related to the quality of the card and not really related to the size of the card. I can only recommend Transcend cards. Though there are other brands, such as cisco, I have only used Transcend as the best/top brand. Btw... Cisco seems to be cheap cards on eBay, when hunting for 128 to 512 mb.

Don't eat stuff off a 15 year old never cleaned cpu cooler.
Those cakes make you sick....

My blog: http://to9xct.blogspot.dk
My YouTube: https://www.youtube.com/user/brostenen

001100 010010 011110 100001 101101 110011

Reply 4 of 8, by Alex_C

User metadata
Rank Newbie
Rank
Newbie

Yes, that's right. I can get almost any CF card to work in these 486s, but most of them interfere with floppy changeline unless I add drivparm statements to config.sys. I tested a lot of floppy drives before working it out.

I agree that the issue is the variability of CF cards. Something in some of them triggers an issue with the floppy changeline in my two machines, though how and why that happens I can't explain. In other PCs it appears they just don't work at all.

Like you, I've had variable results with different cards in different machines. I don't have enough to test brands in full, but the 32MB card that *didn't* interfere with floppy changeline on these machines was branded Ericsson.

Reply 5 of 8, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie
Alex_C wrote:

That's not the problem, at least not on my two 486 test PCs. In both cases the IDE and floppy adapters are built into the same VL-Bus adapter. In one case they are built into the motherboard.

And these PCs do not exhibit the problem when using their original IDE hard drives. If they did they'd never have left the factory!

Well, that's correct, my bad - it really is the CF cards fault after all.

Real hard drives don't drive the data bit 7 when reading 3F7h address so it can be just driven by floppy interface, but apparently some CF cards do drive bit 7 during 3F7h address read and CF card datasheets have warnings about this causing conflicts with floppy interfaces and they list possible workarounds for this.

So it's apparent that the VL bus ide/floppy adapter expects the drive to behave properly when reading 3F7H and some CF cards don't behave properly. CF specs suggest this could be avoided by not letting the CF card to see port 37FH read, but that would have meant a chip or two more on the CF-IDE adapter card so it would cost more.

Which is why drivparm is needed, by omitting the /C parameter that tells drivparm that the drive does not support disk change signaling by reading 3F7H bit 7.

Reply 6 of 8, by Alex_C

User metadata
Rank Newbie
Rank
Newbie

Yes, that sounds right. I think I read somewhere that Microsoft stopped using changeline in Windows 9x onward - if true, this problem is likely to only be an issue in DOS, not for PCs running Windows on CF cards.

It took me far too long to find the solution, hence this thread so others can find it faster. I don't think I've used drivparm on any PC since about 1988!

Reply 7 of 8, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie

does not surprise me CF cards driving bit 7 because the CF spec lets you bitbang CF cards as 8bit IO as IDE!... which is probably how all the cf-ide interfaces are working as, just bit banging 8bit io. all these CF adapters are 'dumb' they just map the IO lines, they dont have IC's to interface between the CF card and the IDE interface. Its 8bit mode is why they also work perfectly in XT's.

Maybe its not it but it makes me wonder..

--/\-[ Stu : Bloody Cactus :: [ https://bloodycactus.com :: http://kråketær.com ]-/\--

Reply 8 of 8, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie
BloodyCactus wrote:

does not surprise me CF cards driving bit 7 because the CF spec lets you bitbang CF cards as 8bit IO as IDE!... which is probably how all the cf-ide interfaces are working as, just bit banging 8bit io. all these CF adapters are 'dumb' they just map the IO lines, they dont have IC's to interface between the CF card and the IDE interface. Its 8bit mode is why they also work perfectly in XT's.

Maybe its not it but it makes me wonder..

Actually the CF card has several modes, and the CF-IDE adapter wires those mode selection pins so that the CF card goes into "True IDE" mode, because the standad PC as host needs to see a true IDE device with a 16-bit data bus there like on a real hard drive. Otherwise the CF adapter is dumb and maps the IDE bus pins to CF card pins, and gives the card power. The other CF modes (IO mode and Memory mode) can be used as 8-bits, but require some other connection to host than IDE bus. Using True IDE mode in 8-bits requires the host to actually control it into 8-bit mode, so therefore the 8-bit IDE mode needs special initialization commands so XT-IDE adapters need to have custom disk bios for this to work, otherwise you can't boot or see the drive in DOS.

So the CF card in "True IDE" mode is not entirely equivalent to hard drive. If the CF-IDE adapter were not passive, it could prevent driving of bit7 when reading from 3F7h, or completely preventing the CF card seeing the read to 3F7h.