mirror of
https://github.com/holub/mame
synced 2025-04-18 22:49:58 +03:00
z80scc: reassert interrupt if conditions persist (fixes MT#9141)
This commit is contained in:
parent
dfcb1350c4
commit
47e9f4eee2
@ -1796,6 +1796,8 @@ void z80scc_channel::do_sccreg_wr0(uint8_t data)
|
||||
break;
|
||||
}
|
||||
}
|
||||
// re-assert interrupt if conditions are still present
|
||||
check_receive_interrupt();
|
||||
break;
|
||||
case WR0_ERROR_RESET:
|
||||
/*Error Reset Command (110). This command resets the error bits in RR1. If interrupt on first Rx
|
||||
@ -2584,22 +2586,7 @@ void z80scc_channel::receive_data(uint8_t data)
|
||||
m_rr0 |= RR0_RX_CHAR_AVAILABLE;
|
||||
check_dma_request();
|
||||
|
||||
// receive interrupt on FIRST and ALL character
|
||||
switch (m_wr1 & WR1_RX_INT_MODE_MASK)
|
||||
{
|
||||
case WR1_RX_INT_FIRST:
|
||||
if (m_rx_first)
|
||||
{
|
||||
m_uart->trigger_interrupt(m_index, INT_RECEIVE);
|
||||
|
||||
m_rx_first = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case WR1_RX_INT_ALL:
|
||||
m_uart->trigger_interrupt(m_index, INT_RECEIVE);
|
||||
break;
|
||||
}
|
||||
check_receive_interrupt();
|
||||
}
|
||||
|
||||
|
||||
@ -3005,3 +2992,24 @@ void z80scc_channel::check_dma_request()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void z80scc_channel::check_receive_interrupt()
|
||||
{
|
||||
if (m_rr0 & RR0_RX_CHAR_AVAILABLE)
|
||||
{
|
||||
switch (m_wr1 & WR1_RX_INT_MODE_MASK)
|
||||
{
|
||||
case WR1_RX_INT_FIRST:
|
||||
if (m_rx_first)
|
||||
{
|
||||
m_uart->trigger_interrupt(m_index, INT_RECEIVE);
|
||||
m_rx_first = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case WR1_RX_INT_ALL:
|
||||
m_uart->trigger_interrupt(m_index, INT_RECEIVE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -249,6 +249,7 @@ protected:
|
||||
int get_tx_word_length();
|
||||
void safe_transmit_register_reset();
|
||||
void check_dma_request();
|
||||
void check_receive_interrupt();
|
||||
|
||||
emu_timer *m_baudtimer;
|
||||
uint16_t m_brg_counter;
|
||||
|
Loading…
Reference in New Issue
Block a user