From 833a6ccdba7e501af3a57465f42a372ca0aeddb3 Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Fri, 20 Sep 2019 15:12:19 +0700 Subject: [PATCH] 4dpi: duh (nw) --- src/mame/drivers/4dpi.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/mame/drivers/4dpi.cpp b/src/mame/drivers/4dpi.cpp index 744b38d42af..3dd7cf3d86f 100644 --- a/src/mame/drivers/4dpi.cpp +++ b/src/mame/drivers/4dpi.cpp @@ -444,6 +444,8 @@ void pi4d2x_state::map(address_map &map) map(0x1faa0000, 0x1faa0003).lrw8("clrerr", [this](offs_t offset) { m_parerr &= ~(PARERR_BYTE | (1 << offset)); return 0; }, [this](offs_t offset) { m_parerr &= ~(PARERR_BYTE | (1 << offset)); }); map(0x1faa0004, 0x1faa0007).lr8("parerr", [this]() { return m_parerr; }).umask32(0x00ff0000); + map(0x1fac0000, 0x1fac0003).lrw8("vrrst", [this]() { lio_interrupt(1); return 0; }, [this](u8 data) { lio_interrupt(1); }).umask32(0xff000000); + map(0x1fb00000, 0x1fb00003).rw(m_scsi, FUNC(wd33c93_device::indir_addr_r), FUNC(wd33c93_device::indir_addr_w)).umask32(0x00ff0000); map(0x1fb00100, 0x1fb00103).rw(m_scsi, FUNC(wd33c93_device::indir_reg_r), FUNC(wd33c93_device::indir_reg_w)).umask32(0x00ff0000); @@ -607,12 +609,12 @@ void pi4d2x_state::common(machine_config &config) [this](int state) { if (state) - m_lio_isr |= (1U << LIO_VRSTAT); - else + { m_lio_isr &= ~(1U << LIO_VRSTAT); - - // FIXME: still problematic? - //lio_interrupt(!state); + lio_interrupt(0); + } + else + m_lio_isr |= (1U << LIO_VRSTAT); }); m_gfx->out_int_ge().set(*this, FUNC(pi4d2x_state::lio_interrupt)).invert(); m_gfx->out_int_fifo().set(*this, FUNC(pi4d2x_state::lio_interrupt)).invert(); @@ -641,6 +643,7 @@ void pi4d2x_state::initialize() void pi4d2x_state::lio_interrupt(unsigned number, int state) { + // TODO: special handling for fifo half-full interrupt u16 const mask = 1 << number; // record interrupt state @@ -651,7 +654,7 @@ void pi4d2x_state::lio_interrupt(unsigned number, int state) // update interrupt line bool const lio_int = ~m_lio_isr & m_lio_imr; - if (m_lio_imr ^ lio_int) + if (m_lio_int ^ lio_int) { m_lio_int = lio_int; m_cpu->set_input_line(INPUT_LINE_IRQ1, m_lio_int);