diff options
Diffstat (limited to 'src/devices/bus/intv/ecs.cpp')
-rw-r--r-- | src/devices/bus/intv/ecs.cpp | 55 |
1 files changed, 26 insertions, 29 deletions
diff --git a/src/devices/bus/intv/ecs.cpp b/src/devices/bus/intv/ecs.cpp index e1d7f9b0b98..6fd321af36b 100644 --- a/src/devices/bus/intv/ecs.cpp +++ b/src/devices/bus/intv/ecs.cpp @@ -94,7 +94,8 @@ void intv_ecs_device::late_subslot_setup() //------------------------------------------------- -MACHINE_CONFIG_START(intv_ecs_device::device_add_mconfig) +void intv_ecs_device::device_add_mconfig(machine_config &config) +{ SPEAKER(config, "mono_ecs").front_center(); AY8914(config, m_snd, XTAL(3'579'545)/2); @@ -103,9 +104,9 @@ MACHINE_CONFIG_START(intv_ecs_device::device_add_mconfig) m_snd->port_a_write_callback().set("ctrl_port", FUNC(intvecs_control_port_device::portA_w)); m_snd->add_route(ALL_OUTPUTS, "mono_ecs", 0.33); - MCFG_INTVECS_CONTROL_PORT_ADD("ctrl_port", intvecs_control_port_devices, "keybd") - MCFG_INTV_CARTRIDGE_ADD("subslot", intv_cart, nullptr) -MACHINE_CONFIG_END + INTVECS_CONTROL_PORT(config, "ctrl_port", intvecs_control_port_devices, "keybd"); + INTV_CART_SLOT(config, m_subslot, intv_cart, nullptr); +} ROM_START( ecs ) @@ -125,7 +126,7 @@ const tiny_rom_entry *intv_ecs_device::device_rom_region() const Paged ROM handling -------------------------------------------------*/ -READ16_MEMBER(intv_ecs_device::read_rom20) +uint16_t intv_ecs_device::read_rom20(offs_t offset) { if (m_bank_base[2]) return INTV_ROM16_READ(offset + 0x2000); @@ -133,7 +134,7 @@ READ16_MEMBER(intv_ecs_device::read_rom20) return 0xffff; } -READ16_MEMBER(intv_ecs_device::read_rom70) +uint16_t intv_ecs_device::read_rom70(offs_t offset) { if (m_bank_base[7]) return 0xffff; @@ -141,21 +142,21 @@ READ16_MEMBER(intv_ecs_device::read_rom70) return INTV_ROM16_READ(offset + 0x7000); } -READ16_MEMBER(intv_ecs_device::read_rome0) +uint16_t intv_ecs_device::read_rome0(offs_t offset) { if (m_bank_base[14]) return INTV_ROM16_READ(offset + 0xe000); else // if WSMLB is loaded, it shall go here, otherwise 0xffff - return m_subslot->read_rome0(space, offset, mem_mask); + return m_subslot->read_rome0(offset); } -READ16_MEMBER(intv_ecs_device::read_romf0) +uint16_t intv_ecs_device::read_romf0(offs_t offset) { // only WSMLB should come here with bank_base = 1 if (m_bank_base[15]) - return m_subslot->read_romf0(space, offset + 0x1000, mem_mask); + return m_subslot->read_romf0(offset + 0x1000); else - return m_subslot->read_romf0(space, offset, mem_mask); + return m_subslot->read_romf0(offset); } @@ -163,44 +164,40 @@ READ16_MEMBER(intv_ecs_device::read_romf0) read_audio -------------------------------------------------*/ -READ16_MEMBER(intv_ecs_device::read_ay) +uint16_t intv_ecs_device::read_ay(offs_t offset) { - if (ACCESSING_BITS_0_7) - return m_snd->read(space, offset, mem_mask); - else - return 0xffff; + return 0xff00 | m_snd->read(offset); } /*------------------------------------------------- write_audio -------------------------------------------------*/ -WRITE16_MEMBER(intv_ecs_device::write_ay) +void intv_ecs_device::write_ay(offs_t offset, uint16_t data) { - if (ACCESSING_BITS_0_7) - return m_snd->write(space, offset, data, mem_mask); + return m_snd->write(offset, data & 0x00ff); } -READ16_MEMBER(intv_ecs_device::read_rom80) +uint16_t intv_ecs_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_ecs_device::read_romd0) +uint16_t intv_ecs_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); } -WRITE16_MEMBER(intv_ecs_device::write_rom20) +void intv_ecs_device::write_rom20(offs_t offset, uint16_t data) { if (offset == 0xfff) { @@ -211,7 +208,7 @@ WRITE16_MEMBER(intv_ecs_device::write_rom20) } } -WRITE16_MEMBER(intv_ecs_device::write_rom70) +void intv_ecs_device::write_rom70(offs_t offset, uint16_t data) { if (offset == 0xfff) { @@ -222,7 +219,7 @@ WRITE16_MEMBER(intv_ecs_device::write_rom70) } } -WRITE16_MEMBER(intv_ecs_device::write_rome0) +void intv_ecs_device::write_rome0(offs_t offset, uint16_t data) { if (offset == 0xfff) { @@ -233,7 +230,7 @@ WRITE16_MEMBER(intv_ecs_device::write_rome0) } } -WRITE16_MEMBER(intv_ecs_device::write_romf0) +void intv_ecs_device::write_romf0(offs_t offset, uint16_t data) { if (offset == 0xfff) { |