mirror of
https://github.com/holub/mame
synced 2025-07-01 08:18:59 +03:00
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)
This commit is contained in:
parent
045eaae387
commit
a60f8ba71d
@ -966,9 +966,6 @@ void ay8910_device::ay8910_write_reg(int r, int v)
|
|||||||
if ((m_last_enable == -1) ||
|
if ((m_last_enable == -1) ||
|
||||||
((m_last_enable & 0x40) != (m_regs[AY_ENABLE] & 0x40)))
|
((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 */
|
/* write out 0xff if port set to input */
|
||||||
if (!m_port_a_write_cb.isnull())
|
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);
|
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) ||
|
if ((m_last_enable == -1) ||
|
||||||
((m_last_enable & 0x80) != (m_regs[AY_ENABLE] & 0x80)))
|
((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 */
|
/* write out 0xff if port set to input */
|
||||||
if (!m_port_b_write_cb.isnull())
|
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);
|
m_port_b_write_cb((offs_t)0, (m_regs[AY_ENABLE] & 0x80) ? m_regs[AY_PORTB] : 0xff);
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
|
|
||||||
driver by Phil Bennett
|
driver by Phil Bennett
|
||||||
|
|
||||||
Known bugs:
|
TODO:
|
||||||
* None
|
* 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.irq_handler().set(FUNC(lockon_state::ym2203_irq));
|
||||||
ymsnd.port_a_read_callback().set_ioport("YM2203");
|
ymsnd.port_a_read_callback().set_ioport("YM2203");
|
||||||
ymsnd.port_b_write_callback().set(FUNC(lockon_state::ym2203_out_b));
|
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, "lspeaker", 0.40);
|
||||||
ymsnd.add_route(0, "rspeaker", 0.40);
|
ymsnd.add_route(0, "rspeaker", 0.40);
|
||||||
ymsnd.add_route(1, "f2203.1l", 1.0);
|
ymsnd.add_route(1, "f2203.1l", 1.0);
|
||||||
|
@ -419,13 +419,15 @@ K28 modules:
|
|||||||
#include "snspellsp.lh"
|
#include "snspellsp.lh"
|
||||||
#include "tntell.lh" // keyboard overlay
|
#include "tntell.lh" // keyboard overlay
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
// The master clock is a single stage RC oscillator into TMS5100 RCOSC:
|
// 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
|
// 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.
|
// (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,
|
// 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.
|
// 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
|
class tispeak_state : public hh_tms1k_state
|
||||||
@ -505,7 +507,6 @@ private:
|
|||||||
u8 m_overlay;
|
u8 m_overlay;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void tispeak_state::machine_start()
|
void tispeak_state::machine_start()
|
||||||
{
|
{
|
||||||
hh_tms1k_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_LOAD( "cm62084.vsm", 0x0000, 0x4000, CRC(cd1376f7) SHA1(96fa484c392c451599bc083b8376cad9c998df7d) )
|
||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
|
} // anonymous namespace
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
|
// YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
|
||||||
|
Loading…
Reference in New Issue
Block a user