votrax: Simplify write handlers (nw)

This commit is contained in:
AJR 2019-02-19 10:57:28 -05:00
parent 30e3be0bef
commit 8c63e2ddba
8 changed files with 14 additions and 15 deletions

View File

@ -88,7 +88,7 @@ void c64_speakeasy_cartridge_device::c64_cd_w(offs_t offset, uint8_t data, int s
{
if (!io1)
{
m_votrax->write(machine().dummy_space(), 0, data & 0x3f);
m_votrax->inflection_w(machine().dummy_space(), 0, data >> 6);
m_votrax->write(data & 0x3f);
m_votrax->inflection_w(data >> 6);
}
}

View File

@ -90,7 +90,7 @@ void vic20_speakeasy_device::vic20_cd_w(offs_t offset, uint8_t data, int ram1, i
{
if (!io2)
{
m_votrax->write(machine().dummy_space(), 0, data & 0x3f);
m_votrax->inflection_w(machine().dummy_space(), 0, data >> 6);
m_votrax->write(data & 0x3f);
m_votrax->inflection_w(data >> 6);
}
}

View File

@ -84,7 +84,7 @@ votrax_sc01_device::votrax_sc01_device(const machine_config &mconfig, const char
{
}
WRITE8_MEMBER( votrax_sc01_device::write )
void votrax_sc01_device::write(uint8_t data)
{
// flush out anything currently processing
m_stream->update();
@ -114,7 +114,7 @@ WRITE8_MEMBER( votrax_sc01_device::write )
// inflection bits
//-------------------------------------------------
WRITE8_MEMBER( votrax_sc01_device::inflection_w )
void votrax_sc01_device::inflection_w(uint8_t data)
{
// only 2 bits matter
data &= 3;

View File

@ -24,8 +24,8 @@ public:
auto ar_callback() { return m_ar_cb.bind(); }
DECLARE_WRITE8_MEMBER(write);
DECLARE_WRITE8_MEMBER(inflection_w);
void write(uint8_t data);
void inflection_w(uint8_t data);
DECLARE_READ_LINE_MEMBER(request) { m_stream->update(); return m_ar_state; }
protected:

View File

@ -358,8 +358,8 @@ void gottlieb_sound_r1_with_votrax_device::device_post_load()
WRITE8_MEMBER( gottlieb_sound_r1_with_votrax_device::votrax_data_w )
{
m_votrax->inflection_w(space, offset, data >> 6);
m_votrax->write(space, offset, ~data & 0x3f);
m_votrax->inflection_w(data >> 6);
m_votrax->write(~data & 0x3f);
}

View File

@ -394,8 +394,8 @@ WRITE8_MEMBER(tenpindx_state::lights_w)
WRITE8_MEMBER(astrocde_state::votrax_speech_w)
{
m_votrax->inflection_w(space, 0, data >> 6);
m_votrax->write(space, 0, data);
m_votrax->inflection_w(data >> 6);
m_votrax->write(data & 0x3f);
/* Note : We should really also use volume in this as well as frequency */
}

View File

@ -266,7 +266,7 @@ WRITE8_MEMBER(k28_state::mcu_p0_w)
// d3: SC-01 strobe, latch phoneme on rising edge
int strobe = data >> 3 & 1;
if (strobe && !m_speech_strobe)
m_speech->write(space, 0, m_phoneme);
m_speech->write(m_phoneme);
m_speech_strobe = strobe;
// d5: VFD driver data enable

View File

@ -313,8 +313,7 @@ WRITE8_MEMBER( taito_state::io_w )
WRITE_LINE_MEMBER( taito_state::pia_cb2_w )
{
address_space& space = m_maincpu->space(AS_PROGRAM);
m_votrax->write(space, 0, m_votrax_cmd);
m_votrax->write(m_votrax_cmd);
}
READ8_MEMBER( taito_state::pia_pb_r )