diff options
author | 2022-06-07 01:41:58 +0200 | |
---|---|---|
committer | 2022-06-07 01:46:29 +0200 | |
commit | 91e217332f87039f8ffff90c0d98011ee74c1585 (patch) | |
tree | b3d361858dcc367c0b5315af5147f4297f3ddebf | |
parent | 9b961a538a489f1d3350b03bfd2d7126d41a0be0 (diff) |
ti99/geneve: TIPI: Fixed crash on empty queue access and network instabilities.
-rw-r--r-- | src/devices/bus/ti99/peb/tipi.cpp | 9 | ||||
-rw-r--r-- | src/devices/bus/ti99/peb/tipi.h | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/devices/bus/ti99/peb/tipi.cpp b/src/devices/bus/ti99/peb/tipi.cpp index 1dc8b1d3c3d..313bc02cc03 100644 --- a/src/devices/bus/ti99/peb/tipi.cpp +++ b/src/devices/bus/ti99/peb/tipi.cpp @@ -105,6 +105,7 @@ tipi_card_device::tipi_card_device(const machine_config &mconfig, const char *ta m_waitinit(false), m_rpiconn(false), m_tc(0), + m_rd(0), m_lasttc(0) { } @@ -155,9 +156,8 @@ void tipi_card_device::readz(offs_t offset, uint8_t *value) int val = 0; if (m_address & 2) { - val = m_indqueue.front(); - m_indqueue.pop(); - LOGMASKED(LOG_PORTS, "RDIN -> %02x\n", val); + LOGMASKED(LOG_PORTS, "RDIN -> %02x\n", m_rd); + val = m_rd; } else { @@ -393,6 +393,9 @@ void tipi_card_device::process_message() { m_rc = m_tc; // Auto-acknowledge m_lasttc = m_tc; + + m_rd = m_indqueue.front(); + m_indqueue.pop(); } } } diff --git a/src/devices/bus/ti99/peb/tipi.h b/src/devices/bus/ti99/peb/tipi.h index f0fb6753758..abd2808daf9 100644 --- a/src/devices/bus/ti99/peb/tipi.h +++ b/src/devices/bus/ti99/peb/tipi.h @@ -88,6 +88,7 @@ private: u8 m_tc; u8 m_td; u8 m_rc; + u8 m_rd; u8 m_lasttc; }; |