summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2022-02-14 03:22:21 +1100
committer Vas Crabb <vas@vastheman.com>2022-02-14 03:22:21 +1100
commit886ff87b56e6ca4be11065acd98373ba04d774cf (patch)
treee466022545dc2602e18829cb7afd1cf5c93acb7f /src/devices/sound
parentbd7f27c6f258f4a2f2703bd5a250baf5131d3e8f (diff)
sound/st0016.cpp: Don't try copying memory access caches.
Diffstat (limited to 'src/devices/sound')
-rw-r--r--src/devices/sound/st0016.cpp5
-rw-r--r--src/devices/sound/st0016.h4
2 files changed, 4 insertions, 5 deletions
diff --git a/src/devices/sound/st0016.cpp b/src/devices/sound/st0016.cpp
index d3bae6b0ad7..39d85aed58b 100644
--- a/src/devices/sound/st0016.cpp
+++ b/src/devices/sound/st0016.cpp
@@ -33,6 +33,7 @@ st0016_device::st0016_device(const machine_config &mconfig, const char *tag, dev
, device_memory_interface(mconfig, *this)
, m_data_config("data", ENDIANNESS_LITTLE, 8, 21) // shares character RAM area?
, m_stream(nullptr)
+ , m_voice{ m_cache, m_cache, m_cache, m_cache, m_cache, m_cache, m_cache, m_cache }
{
}
@@ -49,10 +50,6 @@ void st0016_device::device_start()
// allocate stream
m_stream = stream_alloc(0, 2, clock() / 128);
- // set host device to each voices
- for (auto & elem : m_voice)
- elem.m_host = m_cache;
-
save_item(STRUCT_MEMBER(m_voice, m_regs));
save_item(STRUCT_MEMBER(m_voice, m_start));
save_item(STRUCT_MEMBER(m_voice, m_end));
diff --git a/src/devices/sound/st0016.h b/src/devices/sound/st0016.h
index b98c5a0b72a..c965687732e 100644
--- a/src/devices/sound/st0016.h
+++ b/src/devices/sound/st0016.h
@@ -35,12 +35,14 @@ protected:
private:
struct voice_t
{
+ voice_t(memory_access<21, 0, 0, ENDIANNESS_LITTLE>::cache &host) : m_host(host) { }
+
bool update();
u8 reg_r(offs_t offset);
void reg_w(offs_t offset, u8 data, int voice);
- memory_access<21, 0, 0, ENDIANNESS_LITTLE>::cache m_host; // host device
+ memory_access<21, 0, 0, ENDIANNESS_LITTLE>::cache &m_host; // host device
u8 m_regs[0x20] = {0}; // 32 registers per voices
u32 m_start = 0; // Start position
u32 m_end = 0; // End position