Re: [hatari-devel] Re: Hatari floppy drive detection with EmuTOS

[ Thread Index | Date Index | More Archives ]

On 15 Jan 2014 at 17:51, Nicolas Pomarède wrote:

> Le 15/01/2014 17:08, Roger Burrows a écrit :
> > On 15 Jan 2014 at 9:43, Nicolas Pomarède wrote:
> >> But on real HW, do you mean that if you set the timeout to 9 sec, then
> >> bit 5 gets to 0 after 3 sec ?
> >>
> > When I say "set the timeout to N seconds", I mean "wait N seconds for bit 5
> to
> > go to 0".  As far as real hardware is concerned, the drives are correctly
> > detected as present or absent with the current timeout of 3 seconds.
> >
> Sorry for insisting, but too be very precise I have another wording/test :
> On real HW, if you set timeout to 9 sec, disconnect drive A and wait for
> bit 5 of ffffa01 to go to 0 :
>   - does bit 5 go to 0 before those 9 seconds ? And if so after how many
> seconds (approximatively) ?
>   - does bit 5 always stays to 1, and the timeout expires after 9
> seconds, indicating the fdc was not able to complete the restore command ?

I cannot answer your question concerning real hardware with a 9 second timeout,
because I have not tried it (I don't consider it relevant).  On real hardware,
the presence/absence of a drive is detected before the current 3-second timeout
expires.  In other words, bit 5 goes to zero before 3 seconds have elapsed
irrespective of whether a drive is connected.

For a non-connected drive, the restore time should be approximately 255 times
the step rate.  Since the step rate code is 0x03, that should be 6 msec on a
real 1772, so the total time for the restore to 'complete' should be
approximately 1.53 seconds.

If you need to know exactly how much time elapses before bit 5 goes to zero
when no drive is connected, let me know and I'll run a test.

> Basically, if you set the timeout to 1 minute and disconnected both
> drive on real HW, would it take 2x1 minutes for EmuTOS to consider the
> drives are not available ?
No.  For each drive, EmuTOS would see that bit 5 went to zero in about 1.5
seconds (see above), would test the TR00 bit and deduce that the drive was not
available.  So the total floppy drive detection time should be about 3 seconds.
EmuTOS does NOT rely on timeouts to detect the absence of a floppy drive! 
(Although if a timeout occurs, it will assume the drive isn't present).


Mail converted by MHonArc 2.6.19+