From 5fd88f03f29245b1c725cf3805a8f3e680ee8e6f Mon Sep 17 00:00:00 2001 From: AJR Date: Thu, 21 Nov 2024 09:07:26 -0500 Subject: efo_sound3: Improve propagation of data from latch to speech synthesizer * tms5220: Further logging refinements --- src/devices/sound/tms5220.cpp | 4 ++-- src/mame/shared/efo_sound3.cpp | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/devices/sound/tms5220.cpp b/src/devices/sound/tms5220.cpp index 250d23d08c2..dd02cf8d714 100644 --- a/src/devices/sound/tms5220.cpp +++ b/src/devices/sound/tms5220.cpp @@ -627,7 +627,7 @@ void tms5220_device::data_write(int data) m_fifo[m_fifo_tail] = data; m_fifo_tail = (m_fifo_tail + 1) % FIFO_SIZE; m_fifo_count++; - LOGMASKED(LOG_FIFO, "data_write: Added byte to FIFO (current count=%2d)\n", m_fifo_count); + LOGMASKED(LOG_FIFO, "data_write: Added %02X byte to FIFO (current count=%2d)\n", data, m_fifo_count); update_fifo_status_and_ints(); // if we just unset buffer low with that last write, and SPEN *was* zero (see circuit 251, sheet 12) @@ -884,7 +884,7 @@ void tms5220_device::process(int16_t *buffer, unsigned int size) int i, bitout; int32_t this_sample; - LOG("process called with size of %d; IP=%d, PC=%d, subcycle=%d, m_SPEN=%d, m_TALK=%d, m_TALKD=%d\n", size, m_IP, m_PC, m_subcycle, m_SPEN, m_TALK, m_TALKD); + LOGMASKED(LOG_GENERATION, "process called with size of %d; IP=%d, PC=%d, subcycle=%d, m_SPEN=%d, m_TALK=%d, m_TALKD=%d\n", size, m_IP, m_PC, m_subcycle, m_SPEN, m_TALK, m_TALKD); /* loop until the buffer is full or we've stopped speaking */ while (size > 0) diff --git a/src/mame/shared/efo_sound3.cpp b/src/mame/shared/efo_sound3.cpp index c3d4a049fe4..8eaae7e2d5c 100644 --- a/src/mame/shared/efo_sound3.cpp +++ b/src/mame/shared/efo_sound3.cpp @@ -64,9 +64,14 @@ u8 efo_sound3_device::input_r() void efo_sound3_device::intf_cs_w(int state) { - // slightly hacky, but the data path must be enabled somehow - if (!m_tms->readyq_r() && !m_intflatch->sr_r()) - m_tms->data_w(m_intflatch->read()); + if (!m_intflatch->sr_r()) + { + // CS1 enables data while READY is inactive high! + if (m_tms->readyq_r()) + m_tms->data_w(m_intflatch->do_r()); + else + (void)m_intflatch->read(); // reset SR (and end WSQ) + } } void efo_sound3_device::efo90435_mem(address_map &map) -- cgit v1.2.3