summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Michael Zapf <Michael.Zapf@mizapf.de>2015-07-27 12:08:27 +0200
committer Michael Zapf <Michael.Zapf@mizapf.de>2015-07-27 12:09:16 +0200
commit8ed7dd1930090481bdbfad0cd024d273210c6225 (patch)
tree7b18561b6c7310b984a046ca11fecf71ded316e8
parent4886e20be1b16e9d55dfe1d65310428899cf4142 (diff)
ti99: Fixed PIO output, no more lockup.
-rw-r--r--src/emu/bus/ti99_peb/ti_rs232.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/emu/bus/ti99_peb/ti_rs232.c b/src/emu/bus/ti99_peb/ti_rs232.c
index 3f1bf2761ec..9f3706cece1 100644
--- a/src/emu/bus/ti99_peb/ti_rs232.c
+++ b/src/emu/bus/ti99_peb/ti_rs232.c
@@ -230,13 +230,13 @@ bool ti_pio_attached_device::call_load()
{
ti_rs232_pio_device* card = static_cast<ti_rs232_pio_device*>(owner());
- /* tell whether the image is readable */
+ // tell whether the image is readable
card->m_pio_readable = !has_been_created();
- /* tell whether the image is writable */
+ // tell whether the image is writable
card->m_pio_writable = !is_readonly();
if (card->m_pio_write && card->m_pio_writable)
- card->m_pio_handshakein = false; /* receiver ready */
+ card->m_pio_handshakein = false; // receiver ready
else
card->m_pio_handshakein = true;
@@ -1025,6 +1025,9 @@ void ti_rs232_pio_device::device_start()
// Prepare the receive buffers
m_recvbuf[0] = global_alloc_array(UINT8, 512);
m_recvbuf[1] = global_alloc_array(UINT8, 512);
+ m_pio_write = true; // required for call_load of pio_attached_device
+ m_pio_writable = false;
+ m_pio_handshakein = false;
}
void ti_rs232_pio_device::device_stop()
@@ -1038,14 +1041,12 @@ void ti_rs232_pio_device::device_reset()
m_pio_direction_in = false;
m_pio_handshakeout = false;
m_pio_spareout = false;
- m_pio_writable = false;
m_flag0 = false;
set_bit(0, CTS, 0);
set_bit(1, CTS, 0);
m_led = false;
- m_pio_write = true;
m_recv_mode[0] = RECV_MODE_NORMAL;
m_recv_mode[1] = RECV_MODE_NORMAL;