summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/vcs/compumat.cpp
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-11-08 12:56:12 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2015-11-08 12:56:12 +0100
commit7c19aac60e12d6f5ea301bdb34d7826a01e0b06f (patch)
treef310d86aa2c6bfc19d115307dedde4eb0cd52dad /src/devices/bus/vcs/compumat.cpp
parenta57b46ae933badd7441ce1644711dbb851e2b504 (diff)
Rename *.c -> *.cpp in our source (nw)
Diffstat (limited to 'src/devices/bus/vcs/compumat.cpp')
-rw-r--r--src/devices/bus/vcs/compumat.cpp53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/devices/bus/vcs/compumat.cpp b/src/devices/bus/vcs/compumat.cpp
new file mode 100644
index 00000000000..4fc7d9cba5b
--- /dev/null
+++ b/src/devices/bus/vcs/compumat.cpp
@@ -0,0 +1,53 @@
+// license:BSD-3-Clause
+// copyright-holders:Fabio Priuli
+/***************************************************************************
+
+ Atari 2600 cart Spectravideo Compumate (Cart + keyboard!)
+
+ This is tricky to implement and it is only a skeleton ATM.
+ The device needs to interface with both the TIA and the RIOT.
+
+***************************************************************************/
+
+
+#include "emu.h"
+#include "compumat.h"
+
+const device_type A26_ROM_COMPUMATE = &device_creator<a26_rom_cm_device>;
+
+
+a26_rom_cm_device::a26_rom_cm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : a26_rom_f6_device(mconfig, A26_ROM_COMPUMATE, "Atari 2600 ROM Cart Compumate", tag, owner, clock, "a2600_cm", __FILE__)
+{
+}
+
+//-------------------------------------------------
+// mapper specific start/reset
+//-------------------------------------------------
+
+void a26_rom_cm_device::device_start()
+{
+ save_item(NAME(m_base_bank));
+}
+
+void a26_rom_cm_device::device_reset()
+{
+ m_base_bank = 3;
+}
+
+
+static INPUT_PORTS_START( keyboard )
+INPUT_PORTS_END
+
+
+ioport_constructor a26_rom_cm_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME( keyboard );
+}
+
+
+
+READ8_MEMBER(a26_rom_cm_device::read_rom)
+{
+ return m_rom[offset + (m_base_bank * 0x1000)];
+}