diff --git a/src/devices/sound/2610intf.cpp b/src/devices/sound/2610intf.cpp index 94d8758c5f8..84598507274 100644 --- a/src/devices/sound/2610intf.cpp +++ b/src/devices/sound/2610intf.cpp @@ -109,11 +109,8 @@ void ym2610_device::device_start() if (m_adpcm_a_region) space(0).install_rom(0, m_adpcm_a_region->bytes() - 1, m_adpcm_a_region->base()); - const std::string name("^" + std::string(basetag()) + ".deltat"); - memory_region *adpcm_b_region = memregion(name.c_str()); - - if (adpcm_b_region) - space(1).install_rom(0, adpcm_b_region->bytes() - 1, adpcm_b_region->base()); + if (m_adpcm_b_region) + space(1).install_rom(0, m_adpcm_b_region->bytes() - 1, m_adpcm_b_region->base()); else if (m_adpcm_a_region) space(1).install_rom(0, m_adpcm_a_region->bytes() - 1, m_adpcm_a_region->base()); } @@ -193,7 +190,9 @@ ym2610_device::ym2610_device(const machine_config &mconfig, device_type type, co , m_stream(nullptr) , m_timer{ nullptr, nullptr } , m_irq_handler(*this) + , m_adpcm_b_region_name("^" + std::string(basetag()) + ".deltat") , m_adpcm_a_region(*this, DEVICE_SELF) + , m_adpcm_b_region(*this, m_adpcm_b_region_name.c_str()) { } diff --git a/src/devices/sound/2610intf.h b/src/devices/sound/2610intf.h index cf90c835186..9f9dc69c123 100644 --- a/src/devices/sound/2610intf.h +++ b/src/devices/sound/2610intf.h @@ -65,7 +65,9 @@ private: sound_stream * m_stream; emu_timer * m_timer[2]; devcb_write_line m_irq_handler; + const std::string m_adpcm_b_region_name; optional_memory_region m_adpcm_a_region; + optional_memory_region m_adpcm_b_region; static const ssg_callbacks psgintf; };