* [Qemu-devel] can anybody check ?
@ 2008-12-08 0:38 William PECNIK
2008-12-11 17:05 ` Blue Swirl
0 siblings, 1 reply; 2+ messages in thread
From: William PECNIK @ 2008-12-08 0:38 UTC (permalink / raw)
To: qemu-devel
Hello,
Perhaps not the good way to report a "potential" bug, but i try ....
in hw/fdc.c in qemu-0.9.1.tar.gz line 768-781
static uint32_t fdctrl_read_dor (fdctrl_t *fdctrl)
{
uint32_t retval = 0;
/* Drive motors state indicators */
if (drv0(fdctrl)->drflags & FDRIVE_MOTOR_ON)
retval |= 1 << 5;
if (drv1(fdctrl)->drflags & FDRIVE_MOTOR_ON)
retval |= 1 << 4;
/* DMA enable */
retval |= fdctrl->dma_en << 3;
/* Reset indicator */
retval |= (fdctrl->state & FD_CTRL_RESET) == 0 ? 0x04 : 0;
/* Selected drive */
retval |= fdctrl->cur_drv;
FLOPPY_DPRINTF("digital output register: 0x%02x\n", retval);
return retval;
}
In my book PC Programming System edition CampuPress they say:
bit 7 r/w motor on drive 3
bit 6 r/w motor on drive 2
bit 5 r/w motor on drive 1
bit 4 r/w motor on drive 0,
... for the port 0x3F2
and as i can see in source it is inverse , can anybody confirm ?
thanks a lot
william pecnik
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] can anybody check ?
2008-12-08 0:38 [Qemu-devel] can anybody check ? William PECNIK
@ 2008-12-11 17:05 ` Blue Swirl
0 siblings, 0 replies; 2+ messages in thread
From: Blue Swirl @ 2008-12-11 17:05 UTC (permalink / raw)
To: wpecnik, qemu-devel
On 12/8/08, William PECNIK <wpecnik@tecwec.org> wrote:
> Hello,
> Perhaps not the good way to report a "potential" bug, but i try ....
> in hw/fdc.c in qemu-0.9.1.tar.gz line 768-781
>
> static uint32_t fdctrl_read_dor (fdctrl_t *fdctrl)
> {
> uint32_t retval = 0;
>
> /* Drive motors state indicators */
> if (drv0(fdctrl)->drflags & FDRIVE_MOTOR_ON)
> retval |= 1 << 5;
> if (drv1(fdctrl)->drflags & FDRIVE_MOTOR_ON)
> retval |= 1 << 4;
> /* DMA enable */
> retval |= fdctrl->dma_en << 3;
> /* Reset indicator */
> retval |= (fdctrl->state & FD_CTRL_RESET) == 0 ? 0x04 : 0;
> /* Selected drive */
> retval |= fdctrl->cur_drv;
> FLOPPY_DPRINTF("digital output register: 0x%02x\n", retval);
>
> return retval;
> }
>
> In my book PC Programming System edition CampuPress they say:
> bit 7 r/w motor on drive 3
> bit 6 r/w motor on drive 2
> bit 5 r/w motor on drive 1
> bit 4 r/w motor on drive 0,
> ... for the port 0x3F2
> and as i can see in source it is inverse , can anybody confirm ?
At least i82077AA and i82078 manuals describe the bits same way.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-11 17:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-08 0:38 [Qemu-devel] can anybody check ? William PECNIK
2008-12-11 17:05 ` Blue Swirl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).