[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: fdc: support NEC PC-9821 family

From: Natalia Portillo
Subject: Re: [Qemu-devel] Re: fdc: support NEC PC-9821 family
Date: Tue, 15 Sep 2009 13:28:07 +0100

I can assure you all the Shugart based controlers (NEC FD765 and derived like the Intel 82078) do support four drives per controller.

El 12/09/2009, a las 5:02, 武田 俊也 escribió:

Dear Stuart and members,

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.

Stuart Brady

I agree.

In PC-98x1 family case (uPD765A is used for fdc), bios checks which drive
the disket is inserted to, by the commands below:
        recalib to drive0
        recalib to drive1
        recalib to drive2
        recalib to drive3
        sence interrupt stat
Yes, if MAX_FD = 2, it is recognized the same drive is connected to
drive0 and drive2, drive1 and drive3.
So I need to change MAX_FD to 4 for PC-98x1 family.

I think we need to divide MAX_FD for 2 meanings,
the number of drives that floppy drive controller can control, is always 4,
and the number of drives that each machine has, is 2 or 4.
For example, MAX_FD used in FD_DOR_SELMASK definition is the former.
MAX_FD in save/load function is the latter.

(Sorry I don't enough about 82078, so I cannot comment about PC/AT and
other mode.)

TAKEDA, toshiya

reply via email to

[Prev in Thread] Current Thread [Next in Thread]