From 8c63e2ddbae9974592bcfc45531dfce0ffc08625 Mon Sep 17 00:00:00 2001 From: AJR Date: Tue, 19 Feb 2019 10:57:28 -0500 Subject: votrax: Simplify write handlers (nw) --- src/devices/bus/c64/speakeasy.cpp | 4 ++-- src/devices/bus/vic20/speakeasy.cpp | 4 ++-- src/devices/sound/votrax.cpp | 4 ++-- src/devices/sound/votrax.h | 4 ++-- src/mame/audio/gottlieb.cpp | 4 ++-- src/mame/drivers/astrocde.cpp | 4 ++-- src/mame/drivers/k28.cpp | 2 +- src/mame/drivers/taito.cpp | 3 +-- 8 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/devices/bus/c64/speakeasy.cpp b/src/devices/bus/c64/speakeasy.cpp index 4639ab47f1e..23caee3488f 100644 --- a/src/devices/bus/c64/speakeasy.cpp +++ b/src/devices/bus/c64/speakeasy.cpp @@ -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); } } diff --git a/src/devices/bus/vic20/speakeasy.cpp b/src/devices/bus/vic20/speakeasy.cpp index 3d56d833ac6..6128852d540 100644 --- a/src/devices/bus/vic20/speakeasy.cpp +++ b/src/devices/bus/vic20/speakeasy.cpp @@ -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); } } diff --git a/src/devices/sound/votrax.cpp b/src/devices/sound/votrax.cpp index d2741b0a7dc..720df7d2ca9 100644 --- a/src/devices/sound/votrax.cpp +++ b/src/devices/sound/votrax.cpp @@ -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; diff --git a/src/devices/sound/votrax.h b/src/devices/sound/votrax.h index a7122c561af..aa3b88cc7e3 100644 --- a/src/devices/sound/votrax.h +++ b/src/devices/sound/votrax.h @@ -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: diff --git a/src/mame/audio/gottlieb.cpp b/src/mame/audio/gottlieb.cpp index 9769cc9263a..8eab2d6b027 100644 --- a/src/mame/audio/gottlieb.cpp +++ b/src/mame/audio/gottlieb.cpp @@ -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); } diff --git a/src/mame/drivers/astrocde.cpp b/src/mame/drivers/astrocde.cpp index 087a24728d5..9008ba5b7aa 100644 --- a/src/mame/drivers/astrocde.cpp +++ b/src/mame/drivers/astrocde.cpp @@ -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 */ } diff --git a/src/mame/drivers/k28.cpp b/src/mame/drivers/k28.cpp index 3f8d00aa468..8f3131ccfbc 100644 --- a/src/mame/drivers/k28.cpp +++ b/src/mame/drivers/k28.cpp @@ -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 diff --git a/src/mame/drivers/taito.cpp b/src/mame/drivers/taito.cpp index 4e2e8590ecd..c5a723dae68 100644 --- a/src/mame/drivers/taito.cpp +++ b/src/mame/drivers/taito.cpp @@ -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 ) -- cgit v1.2.3