On Fri, Sep 11, 2009 at 08:36:02PM +0900, 武田 俊也 wrote:
This is new patch.
Nice work -- looks a lot closer! :)
I've a few questions, though.
I notice that the 82078 has 'PC AT', 'PS/2' and 'PS/2 Model 30'
modes.
QEMU doesn't seem to implement this, but I don't know common each
of the
different modes is/was.
Also, I notice that in fdctrl_write_dor(), the DR0 bit (in PS/2 mode)
is set if drives 0 or 2 are selected, which looks like a bug -- I
would
expect that it should only be set if drive 0 is selected.
AFAIK, in most IBM PC 'clones' (but not quite all), the FDC can
support
four drives, but only up to one/two drives can be physically
attached.
It seems that MAX_FD affects emulation of the FDC itself, and doesn't
just determine the number of drives that may be connected. Surely
that
can't be right? I.e. if MAX_FD == 2, any attempt to select drive 2
results in drive 0 being selected, which should not be the case...
I'm not sure why QEMU limits certain machines to two drives... Maybe
the reason is that software for systems where only two drives can be
physically connected might react badly to seeing unexpected drives.
Is this the case? TBH, I'm not sure whether I *really* need more
than
a single drive... :)
Also, it seems to me that a floppy controller might have either one,
two, three, four or no drives attached. (I assume that software can
distinguish between a missing drive and a drive with no disk
inserted.)
In that case, it seems to me that QEMU cannot provide emulation of a
system with no drives connected to its FDC.
Cheers,
--
Stuart Brady