aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHervé Poussineau <hpoussin@reactos.org>2012-02-06 22:29:12 +0100
committerKevin Wolf <kwolf@redhat.com>2012-02-29 12:48:46 +0100
commita2df5fa324cd09a31225701e5b2f9fb067c237cd (patch)
treec074f1b0c40f266fd2cfbf6ea2875c01c804c483
parentb072a3c85da1391d86aaea60451738131034c7c3 (diff)
fdc: DIR (Digital Input Register) should return status of current drive...
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--hw/fdc.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/hw/fdc.c b/hw/fdc.c
index 7879b70..a0236b7 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -216,6 +216,7 @@ static void fdctrl_reset_fifo(FDCtrl *fdctrl);
static int fdctrl_transfer_handler (void *opaque, int nchan,
int dma_pos, int dma_len);
static void fdctrl_raise_irq(FDCtrl *fdctrl, uint8_t status0);
+static FDrive *get_cur_drv(FDCtrl *fdctrl);
static uint32_t fdctrl_read_statusA(FDCtrl *fdctrl);
static uint32_t fdctrl_read_statusB(FDCtrl *fdctrl);
@@ -956,14 +957,9 @@ static uint32_t fdctrl_read_dir(FDCtrl *fdctrl)
{
uint32_t retval = 0;
- if (fdctrl_media_changed(drv0(fdctrl))
- || fdctrl_media_changed(drv1(fdctrl))
-#if MAX_FD == 4
- || fdctrl_media_changed(drv2(fdctrl))
- || fdctrl_media_changed(drv3(fdctrl))
-#endif
- )
+ if (fdctrl_media_changed(get_cur_drv(fdctrl))) {
retval |= FD_DIR_DSKCHG;
+ }
if (retval != 0) {
FLOPPY_DPRINTF("Floppy digital input register: 0x%02x\n", retval);
}