summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/ti99/gromport/singleconn.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/ti99/gromport/singleconn.cpp')
-rw-r--r--src/devices/bus/ti99/gromport/singleconn.cpp95
1 files changed, 95 insertions, 0 deletions
diff --git a/src/devices/bus/ti99/gromport/singleconn.cpp b/src/devices/bus/ti99/gromport/singleconn.cpp
new file mode 100644
index 00000000000..95628a97315
--- /dev/null
+++ b/src/devices/bus/ti99/gromport/singleconn.cpp
@@ -0,0 +1,95 @@
+// license:LGPL-2.1+
+// copyright-holders:Michael Zapf
+/***************************************************************************
+
+ Single: the standard console connector, one cartridge
+
+***************************************************************************/
+
+#include "singleconn.h"
+
+DEFINE_DEVICE_TYPE_NS(TI99_GROMPORT_SINGLE, bus::ti99::gromport, ti99_single_cart_conn_device, "ti99_scartconn", "TI-99 Standard cartridge connector")
+
+namespace bus { namespace ti99 { namespace gromport {
+
+ti99_single_cart_conn_device::ti99_single_cart_conn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : cartridge_connector_device(mconfig, TI99_GROMPORT_SINGLE, tag, owner, clock),
+ m_cartridge(nullptr)
+{
+}
+
+READ8Z_MEMBER(ti99_single_cart_conn_device::readz)
+{
+ // Pass through
+ m_cartridge->readz(space, offset, value);
+}
+
+WRITE8_MEMBER(ti99_single_cart_conn_device::write)
+{
+ // Pass through
+ m_cartridge->write(space, offset, data);
+}
+
+READ8Z_MEMBER(ti99_single_cart_conn_device::crureadz)
+{
+ // Pass through
+ m_cartridge->crureadz(space, offset, value);
+}
+
+WRITE8_MEMBER(ti99_single_cart_conn_device::cruwrite)
+{
+ // Pass through
+ m_cartridge->cruwrite(space, offset, data);
+}
+
+WRITE_LINE_MEMBER(ti99_single_cart_conn_device::romgq_line)
+{
+ // Pass through
+ m_cartridge->romgq_line(state);
+}
+
+/*
+ Combined select lines
+*/
+WRITE8_MEMBER(ti99_single_cart_conn_device::set_gromlines)
+{
+ // Pass through
+ m_cartridge->set_gromlines(space, offset, data);
+}
+
+
+WRITE_LINE_MEMBER(ti99_single_cart_conn_device::gclock_in)
+{
+ // Pass through
+ m_cartridge->gclock_in(state);
+}
+
+/*
+ Check whether the GROMs are idle.
+*/
+bool ti99_single_cart_conn_device::is_grom_idle()
+{
+ return m_cartridge->is_grom_idle();
+}
+
+void ti99_single_cart_conn_device::device_start()
+{
+ m_cartridge = static_cast<ti99_cartridge_device*>(subdevices().first());
+}
+
+void ti99_single_cart_conn_device::device_reset()
+{
+ m_cartridge->set_slot(0);
+}
+
+static MACHINE_CONFIG_START( single_slot )
+ MCFG_DEVICE_ADD("cartridge", TI99_CART, 0)
+MACHINE_CONFIG_END
+
+machine_config_constructor ti99_single_cart_conn_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME( single_slot );
+}
+
+} } } // end namespace bus::ti99::gromport
+