Previous 199869 Revisions Next

r23467 Wednesday 5th June, 2013 at 19:02:55 UTC by Carl
ins8250: set thre only if tx fifo is cleared and unset received data available if rx fifo is cleared (nw)
[src/emu/machine]ins8250.c

trunk/src/emu/machine/ins8250.c
r23466r23467
617617   {
618618      memset(&m_rfifo, '\0', sizeof(m_rfifo));
619619      m_rhead = m_rtail = m_rnum = 0;
620      clear_int(COM_INT_PENDING_CHAR_TIMEOUT | COM_INT_PENDING_RECEIVED_DATA_AVAILABLE);
621      m_timeout->adjust(attotime::never);
620622   }
621623   if(data & 4)
622624   {
623625      memset(&m_tfifo, '\0', sizeof(m_tfifo));
624626      m_thead = m_ttail = 0;
627      m_regs.lsr |= 0x20;
628      trigger_int(COM_INT_PENDING_TRANSMITTER_HOLDING_REGISTER_EMPTY);
625629   }
626630   m_rintlvl = bytes_per_int[(data>>6)&3];
627631   m_regs.iir |= 0xc0;
628632   m_regs.fcr = data & 0xc9;
629   m_regs.lsr |= 0x20;
630   trigger_int(COM_INT_PENDING_TRANSMITTER_HOLDING_REGISTER_EMPTY);
631633}

Previous 199869 Revisions Next


© 1997-2024 The MAME Team