remove tms5220 read/write handler trampolines (nw)

This commit is contained in:
smf- 2018-09-13 19:01:46 +01:00
parent 7b752230e3
commit c59d3e2c88
18 changed files with 35 additions and 38 deletions

View File

@ -133,7 +133,7 @@ uint8_t a2bus_echoii_device::read_c0nx(uint8_t offset)
// upon the falling edge of /DEVREAD, the active part of the read...
if (m_readlatch_flag == false) // /RS was low, so we need to return a value from the tms5220
{
retval = 0x1f | m_tms->status_r(machine().dummy_space(), 0, 0xff);
retval = 0x1f | m_tms->status_r();
LOGMASKED(LOG_READ,"Returning status of speech chip, which is %02x\n", retval);
}
else
@ -157,7 +157,7 @@ void a2bus_echoii_device::write_c0nx(uint8_t offset, uint8_t data)
m_writelatch_flag = false; // /DEVWRITE clears the latch on its falling edge
m_tms->wsq_w(m_writelatch_flag);
m_tms->data_w(machine().dummy_space(), 0, m_writelatch_data);
m_tms->data_w(m_writelatch_data);
}
bool a2bus_echoii_device::take_c800()

View File

@ -414,7 +414,7 @@ uint8_t a2bus_echoplus_device::read_c0nx(uint8_t offset)
switch (offset)
{
case 0:
return 0x1f | m_tms->status_r(machine().dummy_space(), 0, 0xff);
return 0x1f | m_tms->status_r();
}
return 0;
@ -425,7 +425,7 @@ void a2bus_echoplus_device::write_c0nx(uint8_t offset, uint8_t data)
switch (offset)
{
case 0:
m_tms->write_data(data);
m_tms->data_w(data);
break;
}
}

View File

@ -77,10 +77,10 @@ bool a2bus_ssb_device::take_c800()
uint8_t a2bus_ssb_device::read_cnxx(uint8_t offset)
{
return 0x1f | m_tms->read_status();
return 0x1f | m_tms->status_r();
}
void a2bus_ssb_device::write_cnxx(uint8_t offset, uint8_t data)
{
m_tms->write_data(data);
m_tms->data_w(data);
}

View File

@ -101,7 +101,7 @@ uint8_t a2bus_ssprite_device::read_c0nx(uint8_t offset)
case 1:
return m_tms->register_read();
case 2:
return 0x1f | m_tms5220->read_status(); // copied this line from a2echoii.cpp
return 0x1f | m_tms5220->status_r();
case 14:
case 15:
return m_ay->read_data();
@ -121,7 +121,7 @@ void a2bus_ssprite_device::write_c0nx(uint8_t offset, uint8_t data)
m_tms->register_write(data);
break;
case 2:
m_tms5220->write_data(data);
m_tms5220->data_w(data);
break;
case 12:
case 13:

View File

@ -749,7 +749,7 @@ READ8_MEMBER( mainboard8_device::read )
// Speech
if (m_vaquerro->sprd_out()==ASSERT_LINE)
{
value = m_speech->status_r(space, 0) & 0xff;
value = m_speech->status_r() & 0xff;
what = "speech";
goto readdone;
}
@ -947,7 +947,7 @@ WRITE8_MEMBER( mainboard8_device::write )
if (m_vaquerro->spwt_out()==ASSERT_LINE)
{
LOGMASKED(LOG_MEM, "Write %04x (speech) <- %02x\n", m_logical_address, data);
m_speech->data_w(space, 0, data);
m_speech->data_w(data);
m_pending_write = false;
}

View File

@ -61,7 +61,7 @@ READ8Z_MEMBER( ti_speech_synthesizer_device::readz )
if (m_sbe)
{
*value = m_vsp->status_r(space, 0, 0xff) & 0xff;
*value = m_vsp->status_r() & 0xff;
LOGMASKED(LOG_MEM, "read value = %02x\n", *value);
// We should clear the lines at this point. The TI-99/4A clears the
// lines by setting the address bus to a different value, but the
@ -81,7 +81,7 @@ WRITE8_MEMBER( ti_speech_synthesizer_device::write )
if (m_sbe)
{
LOGMASKED(LOG_MEM, "write value = %02x\n", data);
m_vsp->data_w(space, 0, data);
m_vsp->data_w(data);
// Note that we must NOT clear the lines here. Find the lines in the
// READY callback below.
}

View File

@ -1963,7 +1963,7 @@ WRITE8_MEMBER( tms5220_device::combined_rsq_wsq_w )
***********************************************************************************************/
void tms5220_device::write_data(uint8_t data)
void tms5220_device::data_w(uint8_t data)
{
LOGMASKED(LOG_RS_WS, "tms5220_write_data: data %02x\n", data);
/* bring up to date first */
@ -1987,7 +1987,7 @@ void tms5220_device::write_data(uint8_t data)
***********************************************************************************************/
uint8_t tms5220_device::read_status()
uint8_t tms5220_device::status_r()
{
// prevent debugger from changing the internal state
if (!machine().side_effects_disabled())

View File

@ -91,11 +91,9 @@ public:
/RS is bit 1, /WS is bit 0
Note this is a hack and probably can be removed later, once the 'real'
line handlers above defer by at least 4 clock cycles before taking effect */
DECLARE_WRITE8_MEMBER( data_w ) { write_data(data); }
DECLARE_READ8_MEMBER( status_r ) { return read_status(); }
void write_data(uint8_t data);
uint8_t read_status();
void data_w(uint8_t data);
uint8_t status_r();
READ_LINE_MEMBER( readyq_r );
READ_LINE_MEMBER( intq_r );

View File

@ -662,7 +662,7 @@ WRITE8_MEMBER( atari_jsa_i_device::mix_w )
WRITE8_MEMBER( atari_jsa_i_device::tms5220_voice )
{
if (m_tms5220 != nullptr)
m_tms5220->data_w(space, 0, data);
m_tms5220->data_w(data);
}

View File

@ -397,7 +397,7 @@ WRITE8_MEMBER(exidy_sh8253_sound_device::r6532_porta_w)
if (m_tms.found())
{
logerror("(%f)%s:TMS5220 data write = %02X\n", machine().time().as_double(), machine().describe_context(), m_riot->porta_out_get());
m_tms->data_w(space, 0, data);
m_tms->data_w(data);
}
}
@ -405,8 +405,8 @@ READ8_MEMBER(exidy_sh8253_sound_device::r6532_porta_r)
{
if (m_tms.found())
{
logerror("(%f)%s:TMS5220 status read = %02X\n", machine().time().as_double(), machine().describe_context(), m_tms->status_r(space, 0));
return m_tms->status_r(space, 0);
logerror("(%f)%s:TMS5220 status read = %02X\n", machine().time().as_double(), machine().describe_context(), m_tms->status_r());
return m_tms->status_r();
}
else
return 0xff;

View File

@ -879,7 +879,7 @@ WRITE8_MEMBER(midway_squawk_n_talk_device::portb2_w)
// write strobe -- pass the current command to the TMS5200
if (((data ^ m_tms_strobes) & 0x02) && !(data & 0x02))
{
m_tms5200->data_w(space, offset, m_tms_command);
m_tms5200->data_w(m_tms_command);
// DoT expects the ready line to transition on a command/write here, so we oblige
m_pia1->ca2_w(1);
@ -889,7 +889,7 @@ WRITE8_MEMBER(midway_squawk_n_talk_device::portb2_w)
// read strobe -- read the current status from the TMS5200
else if (((data ^ m_tms_strobes) & 0x01) && !(data & 0x01))
{
m_pia1->write_porta(m_tms5200->status_r(space, offset));
m_pia1->write_porta(m_tms5200->status_r());
// DoT expects the ready line to transition on a command/write here, so we oblige
m_pia1->ca2_w(1);

View File

@ -369,13 +369,13 @@ READ8_MEMBER(atarisy1_state::switch_6502_r)
WRITE8_MEMBER(atarisy1_state::via_pa_w)
{
m_tms->data_w(space, 0, data);
m_tms->data_w(data);
}
READ8_MEMBER(atarisy1_state::via_pa_r)
{
return m_tms->status_r(space, 0);
return m_tms->status_r();
}

View File

@ -700,7 +700,7 @@ WRITE8_MEMBER(atarisy2_state::tms5220_w)
{
if (m_tms5220.found())
{
m_tms5220->data_w(space, 0, data);
m_tms5220->data_w(data);
}
}

View File

@ -512,7 +512,7 @@ READ8_MEMBER(esripsys_state::tms5220_r)
if (offset == 0)
{
/* TMS5220 core returns status bits in D7-D6 */
uint8_t status = m_tms->status_r(space, 0);
uint8_t status = m_tms->status_r();
status = ((status & 0x80) >> 5) | ((status & 0x40) >> 5) | ((status & 0x20) >> 5);
return (m_tms->readyq_r() << 7) | (m_tms->intq_r() << 6) | status;
@ -527,7 +527,7 @@ WRITE8_MEMBER(esripsys_state::tms5220_w)
if (offset == 0)
{
m_tms_data = data;
m_tms->data_w(space, 0, m_tms_data);
m_tms->data_w(m_tms_data);
}
#if 0
if (offset == 1)

View File

@ -359,9 +359,8 @@ WRITE8_MEMBER(exelv_state::tms7041_portc_w)
*/
READ8_MEMBER(exelv_state::tms7041_portd_r)
{
uint8_t data = 0xff;
data=m_tms5220c->status_r(space, 0, data);
logerror("tms7041_portd_r\n");
uint8_t data = m_tms5220c->status_r();
logerror("tms7041_portd_r: data = 0x%02x\n", data);
return data;
}
@ -370,7 +369,7 @@ WRITE8_MEMBER(exelv_state::tms7041_portd_w)
{
logerror("tms7041_portd_w: data = 0x%02x\n", data);
m_tms5220c->data_w(space, 0, data);
m_tms5220c->data_w(data);
m_tms7041_portd = data;
}

View File

@ -131,14 +131,14 @@ WRITE8_MEMBER( pes_state::port1_w )
#ifdef DEBUG_PORTS
logerror("port1 write: tms5220 data written: %02X\n", data);
#endif
m_speech->data_w(space, 0, data);
m_speech->data_w(data);
}
READ8_MEMBER( pes_state::port1_r )
{
uint8_t data = 0xFF;
data = m_speech->status_r(space, 0);
data = m_speech->status_r();
#ifdef DEBUG_PORTS
logerror("port1 read: tms5220 data read: 0x%02X\n", data);
#endif

View File

@ -718,13 +718,13 @@ WRITE8_MEMBER(bbc_state::bbcb_via_system_write_porta)
}
if (m_b1_speech_read == 0)
{
if (m_tms) m_via_system_porta = m_tms->status_r(space, 0);
if (m_tms) m_via_system_porta = m_tms->status_r();
//logerror("Doing an unsafe read to the speech chip %d \n",m_via_system_porta);
}
if (m_b2_speech_write == 0)
{
//logerror("Doing an unsafe write to the speech chip %d \n",data);
if (m_tms) m_tms->data_w(space, 0, m_via_system_porta);
if (m_tms) m_tms->data_w(m_via_system_porta);
}
if (m_b3_keyboard == 0)
{

View File

@ -314,7 +314,7 @@ WRITE8_MEMBER(mhavoc_state::mhavocrv_speech_data_w)
WRITE8_MEMBER(mhavoc_state::mhavocrv_speech_strobe_w)
{
m_tms->data_w(space, 0, m_speech_write_buffer);
m_tms->data_w(m_speech_write_buffer);
}
/*************************************