From a60f8ba71d3e4ce5ab33c4b97536829bc3f64d58 Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 7 Apr 2019 22:16:15 +0200 Subject: [PATCH] ay8910: changed my mind on prev i/o bandaid, it's too dangerous: port read callback implies read strobe, but it doesn't do that on port direction write (nw) --- src/devices/sound/ay8910.cpp | 6 ------ src/mame/drivers/lockon.cpp | 9 +++++---- src/mame/drivers/tispeak.cpp | 7 +++++-- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/devices/sound/ay8910.cpp b/src/devices/sound/ay8910.cpp index efe54b2c048..9ee02834f67 100644 --- a/src/devices/sound/ay8910.cpp +++ b/src/devices/sound/ay8910.cpp @@ -966,9 +966,6 @@ void ay8910_device::ay8910_write_reg(int r, int v) if ((m_last_enable == -1) || ((m_last_enable & 0x40) != (m_regs[AY_ENABLE] & 0x40))) { - if (!m_port_a_read_cb.isnull()) - m_regs[AY_PORTA] = m_port_a_read_cb(0); - /* write out 0xff if port set to input */ if (!m_port_a_write_cb.isnull()) m_port_a_write_cb((offs_t)0, (m_regs[AY_ENABLE] & 0x40) ? m_regs[AY_PORTA] : 0xff); @@ -977,9 +974,6 @@ void ay8910_device::ay8910_write_reg(int r, int v) if ((m_last_enable == -1) || ((m_last_enable & 0x80) != (m_regs[AY_ENABLE] & 0x80))) { - if (!m_port_b_read_cb.isnull()) - m_regs[AY_PORTB] = m_port_b_read_cb(0); - /* write out 0xff if port set to input */ if (!m_port_b_write_cb.isnull()) m_port_b_write_cb((offs_t)0, (m_regs[AY_ENABLE] & 0x80) ? m_regs[AY_PORTB] : 0xff); diff --git a/src/mame/drivers/lockon.cpp b/src/mame/drivers/lockon.cpp index 23830a5f669..abbf57e6855 100644 --- a/src/mame/drivers/lockon.cpp +++ b/src/mame/drivers/lockon.cpp @@ -6,8 +6,10 @@ driver by Phil Bennett - Known bugs: - * None + TODO: + * Coincounters add one coin at boot, caused by ay8910 writing 00 on + port direction change. Likely wrong I/O emulation in ay8910 device, + but not trivial to fix. ***************************************************************************/ @@ -28,7 +30,7 @@ /************************************* * - * Forward definitions + * Holy Space for The 5 Wise Enters * *************************************/ @@ -511,7 +513,6 @@ void lockon_state::lockon(machine_config &config) ymsnd.irq_handler().set(FUNC(lockon_state::ym2203_irq)); ymsnd.port_a_read_callback().set_ioport("YM2203"); ymsnd.port_b_write_callback().set(FUNC(lockon_state::ym2203_out_b)); - ymsnd.port_b_read_callback().set_constant(0xff); ymsnd.add_route(0, "lspeaker", 0.40); ymsnd.add_route(0, "rspeaker", 0.40); ymsnd.add_route(1, "f2203.1l", 1.0); diff --git a/src/mame/drivers/tispeak.cpp b/src/mame/drivers/tispeak.cpp index ca5be1e1769..7065b39093e 100644 --- a/src/mame/drivers/tispeak.cpp +++ b/src/mame/drivers/tispeak.cpp @@ -419,13 +419,15 @@ K28 modules: #include "snspellsp.lh" #include "tntell.lh" // keyboard overlay +namespace { + // The master clock is a single stage RC oscillator into TMS5100 RCOSC: // In an early 1979 Speak & Spell, C is 68pf, R is a 50kohm trimpot which is set to around 33.6kohm // (measured in-circuit). CPUCLK is this osc freq /2, ROMCLK is this osc freq /4. // The typical osc freq curve for TMS5100 is unknown. Let's assume it is set to the default frequency, // which is 640kHz for 8KHz according to the TMS5100 documentation. -#define MASTER_CLOCK 640_kHz_XTAL +#define MASTER_CLOCK 640000 class tispeak_state : public hh_tms1k_state @@ -505,7 +507,6 @@ private: u8 m_overlay; }; - void tispeak_state::machine_start() { hh_tms1k_state::machine_start(); @@ -1879,6 +1880,8 @@ ROM_START( k28m2 ) ROM_LOAD( "cm62084.vsm", 0x0000, 0x4000, CRC(cd1376f7) SHA1(96fa484c392c451599bc083b8376cad9c998df7d) ) ROM_END +} // anonymous namespace + // YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS