diff options
Diffstat (limited to 'src/devices/bus/intv/voice.cpp')
-rw-r--r-- | src/devices/bus/intv/voice.cpp | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/src/devices/bus/intv/voice.cpp b/src/devices/bus/intv/voice.cpp index 7cc62da7856..b8b07d84d34 100644 --- a/src/devices/bus/intv/voice.cpp +++ b/src/devices/bus/intv/voice.cpp @@ -69,15 +69,16 @@ void intv_voice_device::late_subslot_setup() // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(intv_voice_device::device_add_mconfig) +void intv_voice_device::device_add_mconfig(machine_config &config) +{ SPEAKER(config, "mono_voice").front_center(); SP0256(config, m_speech, 3120000); /* The Intellivoice uses a speaker with its own volume control so the relative volumes to use are subjective */ m_speech->add_route(ALL_OUTPUTS, "mono_voice", 1.00); - MCFG_INTV_CARTRIDGE_ADD("subslot", intv_cart, nullptr) -MACHINE_CONFIG_END + INTV_CART_SLOT(config, m_subslot, intv_cart, nullptr); +} ROM_START( intellivoice ) @@ -95,37 +96,33 @@ const tiny_rom_entry *intv_voice_device::device_rom_region() const read_audio -------------------------------------------------*/ -READ16_MEMBER(intv_voice_device::read_speech) +uint16_t intv_voice_device::read_speech(offs_t offset) { - if (ACCESSING_BITS_0_7) - return m_speech->spb640_r(offset); - else - return 0xff; + return 0xff00 | m_speech->spb640_r(offset); } /*------------------------------------------------- write_audio -------------------------------------------------*/ -WRITE16_MEMBER(intv_voice_device::write_speech) +void intv_voice_device::write_speech(offs_t offset, uint16_t data) { - if (ACCESSING_BITS_0_7) - return m_speech->spb640_w(offset, data); + m_speech->spb640_w(offset, data & 0x00ff); } -READ16_MEMBER(intv_voice_device::read_rom80) +uint16_t intv_voice_device::read_rom80(offs_t offset) { if (m_ram88_enabled && offset >= 0x800) - return m_subslot->read_ram(space, offset & 0x7ff, mem_mask); + return m_subslot->read_ram(offset & 0x7ff); else - return m_subslot->read_rom80(space, offset, mem_mask); + return m_subslot->read_rom80(offset); } -READ16_MEMBER(intv_voice_device::read_romd0) +uint16_t intv_voice_device::read_romd0(offs_t offset) { if (m_ramd0_enabled && offset < 0x800) - return m_subslot->read_ram(space, offset, mem_mask); + return m_subslot->read_ram(offset); else - return m_subslot->read_romd0(space, offset, mem_mask); + return m_subslot->read_romd0(offset); } |