summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/intv/ecs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/intv/ecs.cpp')
-rw-r--r--src/devices/bus/intv/ecs.cpp67
1 files changed, 65 insertions, 2 deletions
diff --git a/src/devices/bus/intv/ecs.cpp b/src/devices/bus/intv/ecs.cpp
index 006de780b73..d591a34f570 100644
--- a/src/devices/bus/intv/ecs.cpp
+++ b/src/devices/bus/intv/ecs.cpp
@@ -26,10 +26,10 @@
// intv_ecs_device - constructor
//-------------------------------------------------
-const device_type INTV_ROM_ECS = device_creator<intv_ecs_device>;
+DEFINE_DEVICE_TYPE(INTV_ROM_ECS, intv_ecs_device, "intv_ecs", "Intellivision ECS Expansion")
intv_ecs_device::intv_ecs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : intv_rom_device(mconfig, INTV_ROM_ECS, "Intellivision ECS Expansion", tag, owner, clock, "intv_ecs", __FILE__),
+ : intv_rom_device(mconfig, INTV_ROM_ECS, tag, owner, clock),
m_snd(*this, "ay8914"),
m_subslot(*this, "subslot"),
m_voice_enabled(false),
@@ -186,3 +186,66 @@ WRITE16_MEMBER(intv_ecs_device::write_ay)
if (ACCESSING_BITS_0_7)
return m_snd->write(space, offset, data, mem_mask);
}
+
+
+READ16_MEMBER(intv_ecs_device::read_rom80)
+{
+ if (m_ram88_enabled && offset >= 0x800)
+ return m_subslot->read_ram(space, offset & 0x7ff, mem_mask);
+ else
+ return m_subslot->read_rom80(space, offset, mem_mask);
+}
+
+
+READ16_MEMBER(intv_ecs_device::read_romd0)
+{
+ if (m_ramd0_enabled && offset < 0x800)
+ return m_subslot->read_ram(space, offset, mem_mask);
+ else
+ return m_subslot->read_romd0(space, offset, mem_mask);
+}
+
+
+WRITE16_MEMBER(intv_ecs_device::write_rom20)
+{
+ if (offset == 0xfff)
+ {
+ if (data == 0x2a50)
+ m_bank_base[2] = 0;
+ else if (data == 0x2a51)
+ m_bank_base[2] = 1;
+ }
+}
+
+WRITE16_MEMBER(intv_ecs_device::write_rom70)
+{
+ if (offset == 0xfff)
+ {
+ if (data == 0x7a50)
+ m_bank_base[7] = 0;
+ else if (data == 0x7a51)
+ m_bank_base[7] = 1;
+ }
+}
+
+WRITE16_MEMBER(intv_ecs_device::write_rome0)
+{
+ if (offset == 0xfff)
+ {
+ if (data == 0xea50)
+ m_bank_base[14] = 0;
+ else if (data == 0xea51)
+ m_bank_base[14] = 1;
+ }
+}
+
+WRITE16_MEMBER(intv_ecs_device::write_romf0)
+{
+ if (offset == 0xfff)
+ {
+ if (data == 0xfa50)
+ m_bank_base[15] = 0;
+ else if (data == 0xfa51)
+ m_bank_base[15] = 1;
+ }
+}