diff options
author | 2024-10-05 01:21:18 +1000 | |
---|---|---|
committer | 2024-10-05 01:21:18 +1000 | |
commit | 347d50ad4cb282625418cddb365fa5ae0f54b53d (patch) | |
tree | 0aef90e0832ca7e076b1e6d093acaecfb944a0da /src/devices/machine/sc16is741.cpp | |
parent | 3526880749ae1286372f36015ad895c5366cde13 (diff) |
-igs/igs_m027xa.xpp: Fixed inputs for Crazy Bugs (V103JP).
* The hopper is hooked up because an input for it appears in the I/O
test, however both the Payout and Ticket buttons seem to use the
ticker dispenser to pay out credits.
-machine/sc16is741.cpp: Implemented CTS/RTS deasserted interrupt.
-bus/spectrum/musicmachine.cpp: Get device out of global namespace,
and some cleanup.
-lnux4004.xml: Include Linux distro in software item description.
Diffstat (limited to 'src/devices/machine/sc16is741.cpp')
-rw-r--r-- | src/devices/machine/sc16is741.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/devices/machine/sc16is741.cpp b/src/devices/machine/sc16is741.cpp index c0a92d88943..694d0362e9e 100644 --- a/src/devices/machine/sc16is741.cpp +++ b/src/devices/machine/sc16is741.cpp @@ -126,7 +126,7 @@ enum sc16is741a_device::interrupt : u8 INTERRUPT_MODEM_STATUS = 0x08, INTERRUPT_XOFF = 0x04, INTERRUPT_SPECIAL_CHAR = 0x02, - INTERRUPT_RTS_CTS = 0x01 + INTERRUPT_CTS_RTS = 0x01 }; @@ -254,6 +254,11 @@ void sc16is741a_device::cts_w(int state) if (bool(state) != bool(m_cts)) { m_interrupts |= INTERRUPT_MODEM_STATUS; + if (state && IER_CTS_INT() && !(m_interrupts & INTERRUPT_CTS_RTS)) + { + LOG("CTS deasserted, setting CTS interrupt\n"); + m_interrupts |= INTERRUPT_CTS_RTS; + } update_irq(); } m_cts = state ? 1 : 0; @@ -572,6 +577,7 @@ inline void sc16is741a_device::iir_r(bool first) else if (IER_THR_INT() && (m_interrupts & INTERRUPT_THR)) { m_buffer |= 0x02; + LOG("clearing THR interrupt\n"); m_interrupts &= ~INTERRUPT_THR; } @@ -579,6 +585,13 @@ inline void sc16is741a_device::iir_r(bool first) { m_buffer |= 0x00; } + else if ((IER_CTS_INT() || IER_RTS_INT()) && (m_interrupts & INTERRUPT_CTS_RTS)) + { + m_buffer |= 0x20; + + LOG("clearing CTS/RTS interrupt\n"); + m_interrupts &= ~INTERRUPT_CTS_RTS; + } LOG("read IIR (0x%1$02x)\n", m_buffer); } @@ -1144,12 +1157,24 @@ TIMER_CALLBACK_MEMBER(sc16is741a_device::rx_shift) if (level >= (trigger * 4)) { LOG("RX FIFO level %1$u exceeds %2$u*4, deasserting RTS\n", level, trigger); + if (IER_RTS_INT() && !(m_interrupts & INTERRUPT_CTS_RTS)) + { + LOG("setting RTS interrupt\n"); + m_interrupts |= INTERRUPT_CTS_RTS; + update_irq(); + } set_rts(1); } } else { LOG("RHR full, deasserting RTS\n"); + if (IER_RTS_INT() && !(m_interrupts & INTERRUPT_CTS_RTS)) + { + LOG("setting RTS interrupt\n"); + m_interrupts |= INTERRUPT_CTS_RTS; + update_irq(); + } set_rts(1); } } |