summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/pofo/exp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/pofo/exp.cpp')
-rw-r--r--src/devices/bus/pofo/exp.cpp98
1 files changed, 98 insertions, 0 deletions
diff --git a/src/devices/bus/pofo/exp.cpp b/src/devices/bus/pofo/exp.cpp
new file mode 100644
index 00000000000..663f1860193
--- /dev/null
+++ b/src/devices/bus/pofo/exp.cpp
@@ -0,0 +1,98 @@
+// license:BSD-3-Clause
+// copyright-holders:Curt Coder
+/**********************************************************************
+
+ Atari Portfolio Expansion Port emulation
+
+**********************************************************************/
+
+#include "exp.h"
+
+
+
+//**************************************************************************
+// GLOBAL VARIABLES
+//**************************************************************************
+
+const device_type PORTFOLIO_EXPANSION_SLOT = &device_creator<portfolio_expansion_slot_t>;
+
+
+
+//**************************************************************************
+// CARD INTERFACE
+//**************************************************************************
+
+//-------------------------------------------------
+// device_portfolio_expansion_slot_interface - constructor
+//-------------------------------------------------
+
+device_portfolio_expansion_slot_interface::device_portfolio_expansion_slot_interface(const machine_config &mconfig, device_t &device) :
+ device_slot_card_interface(mconfig,device)
+{
+ m_slot = dynamic_cast<portfolio_expansion_slot_t *>(device.owner());
+}
+
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// portfolio_expansion_slot_t - constructor
+//-------------------------------------------------
+
+portfolio_expansion_slot_t::portfolio_expansion_slot_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, PORTFOLIO_EXPANSION_SLOT, "Atari Portfolio expansion port", tag, owner, clock, "portfolio_expansion_slot", __FILE__),
+ device_slot_interface(mconfig, *this),
+ m_write_iint(*this),
+ m_write_eint(*this),
+ m_write_nmio(*this),
+ m_write_wake(*this),
+ m_card(nullptr)
+{
+}
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void portfolio_expansion_slot_t::device_start()
+{
+ m_card = dynamic_cast<device_portfolio_expansion_slot_interface *>(get_card_device());
+
+ // resolve callbacks
+ m_write_iint.resolve_safe();
+ m_write_eint.resolve_safe();
+ m_write_nmio.resolve_safe();
+ m_write_wake.resolve_safe();
+}
+
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void portfolio_expansion_slot_t::device_reset()
+{
+ if (m_card != nullptr)
+ {
+ m_card->device().reset();
+ }
+}
+
+
+
+//-------------------------------------------------
+// SLOT_INTERFACE( portfolio_expansion_cards )
+//-------------------------------------------------
+
+// slot devices
+#include "hpc101.h"
+#include "hpc102.h"
+
+SLOT_INTERFACE_START( portfolio_expansion_cards )
+ SLOT_INTERFACE("lpt", HPC101)
+ SLOT_INTERFACE("uart", HPC102)
+SLOT_INTERFACE_END