Re: [hatari-devel] The WD1770 "Motor on" line

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 24/11/2014 22:22, Roger Burrows a écrit :
When EmuTOS is booted under Hatari 1.8.0 with both floppies enabled, the green
LED indicator for drive B stays on, showing the drive is still selected.  The
normal EmuTOS behaviour after a drive has been selected is to leave it selected
until the MOTOR ON bit in the WD1770 status register is zero; at that time, all
drives are deselected.

The MOTOR ON bit is checked in the VBL handler, and appears to be always set
on; thus the drive is never deselected.  According to my WD1770 spec, if the
device remains idle for 10 revolutions, the MOTOR ON line will go back to 0,
but this doesn't seem to happen with the emulated WD1770.

This code worked fine under 1.7.0.


Hi,

this was already reported by vincent and discussed in the thread "LED with empty floppy drives" and my answer from 9/6/2014.

Basically, Hatari's behaviour is the same as my STF and STE when no floppy are inserted in both drives.

Note that your reading of the doc is incomplete : the led/motor will indeed turn off after the WD1772 counts 10 revolution. But the problem is that the WD1772 can't count revolution unless a floppy is inserted in the drive :(

So, this means a selected drive where you sent a command (restore, seek, ....) will never turns off. You can wait several hours, it will keep on spinning ; it's only if you insert a floppy that the drive will complete its command and clear motor after 2 sec.

It's wrong at Emutos level to assume the motor bit will eventually be cleared ; if there's not floppy it will stay on forever. So, you need to have an extra timeout > 10 revolution = 2 sec to unselect the drive in all cases, even if motor bit was not cleared.

This "worked" in Hatari 1.7.0 because it was not correctly emulated :)

Nicolas




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/