13

I have a 1991 vintage AST Premium Exec 386SX/20 laptop, which is in excellent condition apart from that the original hard drive and the floppy drive are both dead.

I've replaced the hard drive with a modern SD-card based device that seems to work.

When I received this machine, the floppy drive did work for long enough for me to get the SD-card device up and running. But after a few days the FDD started to fail and eventually died completely (totally unresponsive and the laptop draws excessive current).

So, of course I removed the FDD and attempted to boot the laptop but now it complains of:

[50.09] DISKETTE DRIVES OR TYPES MISMATCH ERROR - RUN SETUP

and will not boot. Setting the BIOS to "try the HDD first" did not help. I am certain that it is the absence of the floppy drive that is causing this error.

The FDD was an Epson SMD-1000 model with a 26-pin flat-flex ribbon providing both signals and power, although I am unable to find schematics for either the FDD cable wiring or the laptop's motherboard.

I'm not planning to use the floppy drive, instead simply writing files to the SD-card using a modern Linux PC.

Is there a way for me to trick the laptop into thinking that there is a floppy drive present when there isn't? Perhaps there's some way to modify the ribbon cable or the motherboard?

Update:

Found a likely pinout (copyright: old.pinouts.ru) enter image description here

Seems to be correct given the positions of the GND and VCC pins. So I started to modify the free end of the flat-flex ribbon cable to pull pins 8 and 9 up to VCC, and pull 2 and 6 down to GND (one at a time and then all simultaneously), but this didn't have any effect at all. Also it didn't cause any change in the current draw (sits at around 1570 mA once it's showing the error message).

Perhaps there is a more elaborate "handshake" between the motherboard and the FDD at bootup to determine the presence of the FDD?

The floppy disk controller is a Western Digital WD76C20.

9
  • 1
    No way in the BIOS to say there's no floppy installed? E.g. disable the floppy controller. Mar 19, 2022 at 14:56
  • 1
    "Floppy disk emulators" seem to be a thing -- connect to floppy disk interface at the back end, USB thumb drive at the front. But the ones I saw look like desktop PC form factor, might not fit your laptop. They're also described as being for various non-computer electronic appliances (sewing machines, organs, ...) but that might just be marketing. Mar 19, 2022 at 18:40
  • 1
    @another-dave The firmware tends to vary as a means of market segmentation. Most of the ones by Gotek are effectively specialized STM32F105 dev boards (more recently Artery AT32F415), and can be reflashed with FlashFloppy. According to the page I linked, one user sucessfully modded a 26-pin model to run FlashFloppy.
    – ssokolow
    Mar 19, 2022 at 19:48
  • 1
    Your "success" section should probably be appended to Michael's answer since it really has nothing to do with the question. SE sites are meant to be Q&A-based and it makes about as much sense to answer in the question as it does to answer in a comment. Or worse, comment in a (non-)answer :-)
    – paxdiablo
    Mar 24, 2022 at 10:22
  • 1
    @user882326721 I paraphrased your "success" section into my answer, re-using your trace and attributing the realization and trace generation to you. You might want to remove your "SUCCESS" paragraph from the question. Feel free to suggest an edit to my answer if you feel I didn't correctly represent your success story. Mar 24, 2022 at 14:46

1 Answer 1

12

The standard algorithm to probe for floppy drives (and tell 1.2MB drives from 360KB drives) is patented by IBM and yet cloned by most BIOS manufacturers. There were litigation lawsuits against Award and AMI at least in the 90's. It all is about seeking and the track zero sensor. The standard algorithm is:

  • seek outwards until the track 0 sensor goes active ("recalibrate")
  • seek inwards (around) 45 tracks. This causes 40-track drives to mechanically skip (either skip to the neighbouring turn on a spindle, or causes a misstep of the stepper motor, both ways due to the force from hitting the end). Report an error if the track 0 sensor is still active.
  • seek outwards (around) 35 tracks at once. Report an error if the track 0 sensor is already active now.
  • seek outwards single tracks until the track 0 sensor goes active again. Count the steps required.
    • If it was 10 steps, the drive did not skip and supports 80 tracks.
    • If it was less, the drive only supports 40 tracks.
    • If it takes more than 10 steps, report an error.

So an emulator to make the floppy type detection algorithm happy needs to count steps and activate the TRK00 singnal if the counter is zero.


The original poster was able to put this theoretical desciption into a practical solution, and attached the a logic probe to /TRK00, /DIR and /STEP, to find the following diagram (/DIR and /STEP are driven by the floppy controller, and /TRK00 is driven by a microcontroller the original poster programmed.

traces of /DIR, /STEP and /TRK00

In this case, the specific number of my original answer do not apply verbatim. It's not 45 out followed by 35 in, but 50 out followed by 40 in. The remaining tracks to be single-stepped is indeed 10, just as I estimated.

It turned out that this solution is sufficient to fake a working floppy drive to the POST routine in the BIOS.

11
  • 2
    It should be possible to implement such a counter using a simple microcontroller: As an example, using an ATtiny 13 (a 8 pin IC) it should be possible to implement this without any additional parts (not counting wires and connectors). Mar 21, 2022 at 14:08
  • 1
    Thank you for this information, looks promising. I've attached my logic analyser to /STEP, /DIR, and /TRK00. As you mentioned, (about 22 seconds after power-on) the step signal falls and then pulses 50 times before going high again and gives up. This must be the attempt to find the "recalibrate" position. Mar 21, 2022 at 18:16
  • 2
    Your traces look perfect! So it's not 45 inward / 35 outward (at least in your BIOS), but 50 in / 40 out and then single steps. All numbers in my answer were estimates, but it seems I hit the 10 single steps on the spot. You probably remember the eee-eee-aww boot sound emitted by the floppy drives in 286 - Pentium class computers. That's exactly what steps 2 to 4 of the drive detection procedure do. As this procedure leaves the head at track 0, on most boots, step 1 does nothing. If the head it at a different track, you get an extra eee sound at the beginning of the procedure Mar 22, 2022 at 21:27
  • 1
    Happy to report that my problem is solved! The laptop now breezes past the floppy drive detection phase of the BIOS and begins to access the HDD. Mar 23, 2022 at 17:23
  • 1
    @user253751 It wouldn't work. The algorithm description was incomplete. I edited the answer. Furthermore, if you can't change the drive type in the BIOS setup of that laptop, it is likely hardwired to "1.44MB 3,5inch", so a 360K drive would also report the dreaded "drive type mismatch" error. Mar 24, 2022 at 14:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .