10

I have a 3.5" floppy drive in an IBM XT 286 (5162). I can boot DOS from the floppy just fine but when I try to run FORMAT, it always says that the disk drive is not ready.

Specifically:

A:\>format A:
Insert new diskette for drive A:
and strike any key when ready

Formatting...
Drive not ready
Format failure

That's with the DOS 1.1 FORMAT. With FreeDOS, I get:

A:\FDOS>format /U /V:dos A:
 Insert new diskette for drive A:
 Press ENTER when the right disk is in the drive...
Using drive default: 1440k (Cyl=80 Head=2 Sec=18)
 Full Formatting (wiping all data)
Format_Floppy_Cylinder( head=0 cylinder=0 ) sectors=18 [int 13.5]

 Critical error during INT 13 disk access
 INT 13 status (hex): 80
   Bits: timeout / no response
   Description: timeout (drive not ready)
 Program terminated.
 [Error 128]

Again, I can boot from the drive just fine so I don't think the cable is backwards or anything like that.

4
  • 1
    I narrowed it down to the drive by replacing it with a slim drive I pulled out of a laptop. It does not have this issue.
    – Sydius
    Dec 30, 2017 at 2:34
  • Does it happen on other drives too? And on other disks?
    – neverMind9
    Jan 16, 2018 at 14:01
  • 1
    @TechLord Since posting this, I've verified that it only happened with that disk drive and no other.
    – Sydius
    Jan 16, 2018 at 22:22
  • I must be missing something. How can your DOS 1.1 handle 1.44 disks?
    – Dercsár
    Jan 13, 2021 at 14:18

2 Answers 2

9

It is likely that the "start of track" signal, which is generated when the index hole of the floppy disk passes the sensor, is not sent from the drive to the controller. It could be due to a bad contact somewhere, a broken LED in the drive, a piece of debris stuck in the index hole in the floppy, etc.

When reading, the signal is ignored, but it is essential for formatting.

6
  • Where is the index hole (or its sensor) for 3.5" disks? I can only find references for 5.25".
    – Sydius
    Dec 30, 2017 at 1:26
  • Hmm, but doesn't the missing index signal already cause an interrupt from the uPD 765? If not, the missing indes during Seek would be another possible reason to trigger the timeout.
    – Raffzahn
    Dec 30, 2017 at 2:16
  • 1
    @Sydius It is my understanding that for 3.5" disks, the notch on the hub serves as the index hole, and the whole mechanism responsible for generating the "start of track" signal is a part of the drive. As the disk can be engaged only in one specific position, this is sufficient.
    – Leo B.
    Dec 30, 2017 at 3:47
  • Index is actually needed for formatting only, to be able to create a sector skew. If really everything but formatting works, I would bet the index signal is missing.
    – tofro
    Dec 30, 2017 at 13:06
  • @tofro That was my thinking exactly.
    – Leo B.
    Dec 30, 2017 at 22:59
6

(Caveat: The following information is strictly only true for the XT BIOS, not 100% sure about the XT286, but I'd say it is as compatible here as the AT is)

Conclusion from above messages:

INT 13h timeout (80h) occures whenever the 'Wait for Interrupt' BOIS routine doesn't detect an interrupt within 2 seconds. So I say the FDC doesn't return from whatever command (usually Seek) is issued. My bet would be on a missing track 0 signal.


Detailed workings:

Whenever a Seek or Recalibrate/Reset is issued, the 8088 goes into an active wait loop, looking for a flag which is set whenever a disk interrupt occures. The only interrupts possible here hit when the drive has found the desired track (or track 0). When the interrupt occures, the interrupt routine sets the flag, which again breaks the wait loop. Now the FDC status is read and returned. Good or bad, either way (CF=0 if good, or CF=1 when bad).

If there is no FD interrupt within the ca. two second wait, the loop terminates and returns a general error which is returned by the floppy handler as CF=1, AH=80h, 'Drive timed out, assumed not ready'.

3
  • A missing track 0 signal would have prevented the drive from reading successfully.
    – Leo B.
    Dec 30, 2017 at 2:18
  • Not neccessary. The BIOS first reads the actual track number before doing a seek. Thus if the drive is already positioned, it won't do a Recalibrate bt just go ahead and read.
    – Raffzahn
    Dec 30, 2017 at 2:27
  • 2
    Issuing INT 13h with AH=00h should fail, then? This can be tried in the debugger. If it fails, the track 0 signal is bad, if it succeeds, the start of track signal is bad.
    – Leo B.
    Dec 30, 2017 at 3:57

You must log in to answer this question.

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