mirror of
https://github.com/holub/mame
synced 2025-04-18 22:49:58 +03:00
ti99/geneve: TIPI: Fixed crash on empty queue access and network instabilities.
This commit is contained in:
parent
9b961a538a
commit
91e217332f
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -88,6 +88,7 @@ private:
|
||||
u8 m_tc;
|
||||
u8 m_td;
|
||||
u8 m_rc;
|
||||
u8 m_rd;
|
||||
|
||||
u8 m_lasttc;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user