diff options
Diffstat (limited to 'src/devices/bus/c64/dela_ep7x8.cpp')
-rw-r--r-- | src/devices/bus/c64/dela_ep7x8.cpp | 48 |
1 files changed, 18 insertions, 30 deletions
diff --git a/src/devices/bus/c64/dela_ep7x8.cpp b/src/devices/bus/c64/dela_ep7x8.cpp index 564e7196449..8841c5b2e3e 100644 --- a/src/devices/bus/c64/dela_ep7x8.cpp +++ b/src/devices/bus/c64/dela_ep7x8.cpp @@ -22,22 +22,16 @@ DEFINE_DEVICE_TYPE(C64_DELA_EP7X8, c64_dela_ep7x8_cartridge_device, "c64_dela_ep // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(c64_dela_ep7x8_cartridge_device::device_add_mconfig) - MCFG_GENERIC_SOCKET_ADD("rom1", generic_linear_slot, nullptr) - MCFG_GENERIC_EXTENSIONS("bin,rom") - MCFG_GENERIC_SOCKET_ADD("rom2", generic_linear_slot, nullptr) - MCFG_GENERIC_EXTENSIONS("bin,rom") - MCFG_GENERIC_SOCKET_ADD("rom3", generic_linear_slot, nullptr) - MCFG_GENERIC_EXTENSIONS("bin,rom") - MCFG_GENERIC_SOCKET_ADD("rom4", generic_linear_slot, nullptr) - MCFG_GENERIC_EXTENSIONS("bin,rom") - MCFG_GENERIC_SOCKET_ADD("rom5", generic_linear_slot, nullptr) - MCFG_GENERIC_EXTENSIONS("bin,rom") - MCFG_GENERIC_SOCKET_ADD("rom6", generic_linear_slot, nullptr) - MCFG_GENERIC_EXTENSIONS("bin,rom") - MCFG_GENERIC_SOCKET_ADD("rom7", generic_linear_slot, nullptr) - MCFG_GENERIC_EXTENSIONS("bin,rom") -MACHINE_CONFIG_END +void c64_dela_ep7x8_cartridge_device::device_add_mconfig(machine_config &config) +{ + GENERIC_SOCKET(config, m_eprom[0], generic_linear_slot, nullptr, "bin,rom"); + GENERIC_SOCKET(config, m_eprom[1], generic_linear_slot, nullptr, "bin,rom"); + GENERIC_SOCKET(config, m_eprom[2], generic_linear_slot, nullptr, "bin,rom"); + GENERIC_SOCKET(config, m_eprom[3], generic_linear_slot, nullptr, "bin,rom"); + GENERIC_SOCKET(config, m_eprom[4], generic_linear_slot, nullptr, "bin,rom"); + GENERIC_SOCKET(config, m_eprom[5], generic_linear_slot, nullptr, "bin,rom"); + GENERIC_SOCKET(config, m_eprom[6], generic_linear_slot, nullptr, "bin,rom"); +} //************************************************************************** @@ -51,13 +45,7 @@ MACHINE_CONFIG_END c64_dela_ep7x8_cartridge_device::c64_dela_ep7x8_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, C64_DELA_EP7X8, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), - m_eprom1(*this, "rom1"), - m_eprom2(*this, "rom2"), - m_eprom3(*this, "rom3"), - m_eprom4(*this, "rom4"), - m_eprom5(*this, "rom5"), - m_eprom6(*this, "rom6"), - m_eprom7(*this, "rom7"), m_bank(0) + m_eprom(*this, "rom%u", 1U) { } @@ -95,13 +83,13 @@ uint8_t c64_dela_ep7x8_cartridge_device::c64_cd_r(address_space &space, offs_t o offs_t addr = offset & 0x1fff; if (!BIT(m_bank, 0)) data |= m_roml[addr]; - if (!BIT(m_bank, 1)) data |= m_eprom1->read_rom(space, addr); - if (!BIT(m_bank, 2)) data |= m_eprom2->read_rom(space, addr); - if (!BIT(m_bank, 3)) data |= m_eprom3->read_rom(space, addr); - if (!BIT(m_bank, 4)) data |= m_eprom4->read_rom(space, addr); - if (!BIT(m_bank, 5)) data |= m_eprom5->read_rom(space, addr); - if (!BIT(m_bank, 6)) data |= m_eprom6->read_rom(space, addr); - if (!BIT(m_bank, 7)) data |= m_eprom7->read_rom(space, addr); + if (!BIT(m_bank, 1)) data |= m_eprom[0]->read_rom(space, addr); + if (!BIT(m_bank, 2)) data |= m_eprom[1]->read_rom(space, addr); + if (!BIT(m_bank, 3)) data |= m_eprom[2]->read_rom(space, addr); + if (!BIT(m_bank, 4)) data |= m_eprom[3]->read_rom(space, addr); + if (!BIT(m_bank, 5)) data |= m_eprom[4]->read_rom(space, addr); + if (!BIT(m_bank, 6)) data |= m_eprom[5]->read_rom(space, addr); + if (!BIT(m_bank, 7)) data |= m_eprom[6]->read_rom(space, addr); } return data; |