From 735cffaa9837864e5340be4f0cb60e0ea8886e2e Mon Sep 17 00:00:00 2001 From: Michael Zapf Date: Sat, 21 Mar 2020 15:21:11 +0100 Subject: ti99: Clear datamux latch of stale content, in case that no device responds on the bus. --- src/devices/bus/ti99/internal/datamux.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/devices/bus/ti99/internal/datamux.cpp b/src/devices/bus/ti99/internal/datamux.cpp index 91265ab6d5c..1a4f90d17a0 100644 --- a/src/devices/bus/ti99/internal/datamux.cpp +++ b/src/devices/bus/ti99/internal/datamux.cpp @@ -372,7 +372,7 @@ uint16_t datamux_device::read(offs_t offset) // Reading the even address now (addr) uint8_t hbyte = 0; read_all(m_addr_buf, &hbyte); - LOGMASKED(LOG_ACCESS, "Read even byte from address %04x -> %02x\n", m_addr_buf, hbyte); + LOGMASKED(LOG_ACCESS, "%04x -> %02x\n", m_addr_buf, hbyte); value = (hbyte<<8) | m_latch; } @@ -500,9 +500,11 @@ WRITE_LINE_MEMBER( datamux_device::clock_in ) } if (m_waitcount==2) { + // Clear the latch (if no device responds on the bus, we assume the data lines as 0) + m_latch = 0; // read odd byte read_all(m_addr_buf+1, &m_latch); - LOGMASKED(LOG_ACCESS, "Read odd byte from address %04x -> %02x\n", m_addr_buf+1, m_latch); + LOGMASKED(LOG_ACCESS, "%04x -> %02x\n", m_addr_buf+1, m_latch); // do the setaddress for the even address setaddress_all(m_addr_buf); } -- cgit v1.2.3