summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus
diff options
context:
space:
mode:
author Dirk Best <mail@dirk-best.de>2016-03-20 12:19:19 +0100
committer Dirk Best <mail@dirk-best.de>2016-03-20 14:23:41 +0100
commit6c9aaf6979c9c1d8ecfe8b2082c8d80687fbe3f0 (patch)
tree769542d7ce4e35040047bb8e5458fc3ac2f4bfa8 /src/devices/bus
parent3d676688cc780631a432ba775548fa23749cf1f1 (diff)
svi318: add the sv602 single slot expander
Diffstat (limited to 'src/devices/bus')
-rw-r--r--src/devices/bus/svi3x8/expander/modules.cpp1
-rw-r--r--src/devices/bus/svi3x8/expander/modules.h1
-rw-r--r--src/devices/bus/svi3x8/expander/sv601.cpp29
-rw-r--r--src/devices/bus/svi3x8/expander/sv601.h1
-rw-r--r--src/devices/bus/svi3x8/expander/sv602.cpp77
-rw-r--r--src/devices/bus/svi3x8/expander/sv602.h58
-rw-r--r--src/devices/bus/svi3x8/slot/cards.cpp10
-rw-r--r--src/devices/bus/svi3x8/slot/cards.h1
-rw-r--r--src/devices/bus/svi3x8/slot/slot.h4
9 files changed, 157 insertions, 25 deletions
diff --git a/src/devices/bus/svi3x8/expander/modules.cpp b/src/devices/bus/svi3x8/expander/modules.cpp
index f613dcf4094..f8da88451e4 100644
--- a/src/devices/bus/svi3x8/expander/modules.cpp
+++ b/src/devices/bus/svi3x8/expander/modules.cpp
@@ -10,4 +10,5 @@
SLOT_INTERFACE_START( svi_expander_modules )
SLOT_INTERFACE("sv601", SV601)
+ SLOT_INTERFACE("sv602", SV602)
SLOT_INTERFACE_END
diff --git a/src/devices/bus/svi3x8/expander/modules.h b/src/devices/bus/svi3x8/expander/modules.h
index 953b7094935..a13e146a26e 100644
--- a/src/devices/bus/svi3x8/expander/modules.h
+++ b/src/devices/bus/svi3x8/expander/modules.h
@@ -13,6 +13,7 @@
#include "emu.h"
#include "sv601.h"
+#include "sv602.h"
SLOT_INTERFACE_EXTERN( svi_expander_modules );
diff --git a/src/devices/bus/svi3x8/expander/sv601.cpp b/src/devices/bus/svi3x8/expander/sv601.cpp
index fadb45f9a26..79538de37ed 100644
--- a/src/devices/bus/svi3x8/expander/sv601.cpp
+++ b/src/devices/bus/svi3x8/expander/sv601.cpp
@@ -10,13 +10,6 @@
//**************************************************************************
-// CONSTANTS/MACROS
-//**************************************************************************
-
-#define VERBOSE 0
-
-
-//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
@@ -32,13 +25,13 @@ static MACHINE_CONFIG_FRAGMENT( sv601 )
MCFG_SVI_SLOT_INT_HANDLER(WRITELINE(sv601_device, int_w))
MCFG_SVI_SLOT_ROMDIS_HANDLER(WRITELINE(sv601_device, romdis_w))
MCFG_SVI_SLOT_RAMDIS_HANDLER(WRITELINE(sv601_device, ramdis_w))
- MCFG_SVI_SLOT_ADD("0", NULL)
- MCFG_SVI_SLOT_ADD("1", NULL)
- MCFG_SVI_SLOT_ADD("2", NULL)
- MCFG_SVI_SLOT_ADD("3", NULL)
- MCFG_SVI_SLOT_ADD("4", NULL)
- MCFG_SVI_SLOT_ADD("5", NULL)
- MCFG_SVI_SLOT_ADD("6", NULL)
+ MCFG_SVI_SLOT_ADD("0", svi_slot_cards, NULL)
+ MCFG_SVI_SLOT_ADD("1", svi_slot_cards, NULL)
+ MCFG_SVI_SLOT_ADD("2", svi_slot_cards, NULL)
+ MCFG_SVI_SLOT_ADD("3", svi_slot_cards, NULL)
+ MCFG_SVI_SLOT_ADD("4", svi_slot_cards, NULL)
+ MCFG_SVI_SLOT_ADD("5", svi_slot_cards, NULL)
+ MCFG_SVI_SLOT_ADD("6", svi_slot_cards, NULL)
MACHINE_CONFIG_END
machine_config_constructor sv601_device::device_mconfig_additions() const
@@ -70,14 +63,6 @@ void sv601_device::device_start()
{
}
-//-------------------------------------------------
-// device_reset - device-specific reset
-//-------------------------------------------------
-
-void sv601_device::device_reset()
-{
-}
-
//**************************************************************************
// IMPLEMENTATION
diff --git a/src/devices/bus/svi3x8/expander/sv601.h b/src/devices/bus/svi3x8/expander/sv601.h
index bf1133cfedb..1e0eb86c507 100644
--- a/src/devices/bus/svi3x8/expander/sv601.h
+++ b/src/devices/bus/svi3x8/expander/sv601.h
@@ -47,7 +47,6 @@ public:
protected:
virtual machine_config_constructor device_mconfig_additions() const override;
virtual void device_start() override;
- virtual void device_reset() override;
private:
required_device<svi_slot_bus_device> m_slotbus;
diff --git a/src/devices/bus/svi3x8/expander/sv602.cpp b/src/devices/bus/svi3x8/expander/sv602.cpp
new file mode 100644
index 00000000000..f9dbb1bfabe
--- /dev/null
+++ b/src/devices/bus/svi3x8/expander/sv602.cpp
@@ -0,0 +1,77 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SV-602 Single Slot Expander for SVI-318/328
+
+***************************************************************************/
+
+#include "sv602.h"
+
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+const device_type SV602 = &device_creator<sv602_device>;
+
+//-------------------------------------------------
+// machine_config_additions - device-specific
+// machine configurations
+//-------------------------------------------------
+
+static MACHINE_CONFIG_FRAGMENT( sv602 )
+ MCFG_SVI_SLOT_BUS_ADD
+ MCFG_SVI_SLOT_INT_HANDLER(WRITELINE(sv602_device, int_w))
+ MCFG_SVI_SLOT_ROMDIS_HANDLER(WRITELINE(sv602_device, romdis_w))
+ MCFG_SVI_SLOT_RAMDIS_HANDLER(WRITELINE(sv602_device, ramdis_w))
+ MCFG_SVI_SLOT_ADD("0", sv602_slot_cards, NULL)
+MACHINE_CONFIG_END
+
+machine_config_constructor sv602_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME( sv602 );
+}
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// sv602_device - constructor
+//-------------------------------------------------
+
+sv602_device::sv602_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, SV601, "SV-602 Single Slot Expander", tag, owner, clock, "sv602", __FILE__),
+ device_svi_expander_interface(mconfig, *this),
+ m_slotbus(*this, "slotbus")
+{
+}
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void sv602_device::device_start()
+{
+}
+
+
+//**************************************************************************
+// IMPLEMENTATION
+//**************************************************************************
+
+WRITE_LINE_MEMBER( sv602_device::int_w ) { m_expander->int_w(state); }
+WRITE_LINE_MEMBER( sv602_device::romdis_w ) { m_expander->romdis_w(state); }
+WRITE_LINE_MEMBER( sv602_device::ramdis_w ) { m_expander->ramdis_w(state); }
+
+READ8_MEMBER( sv602_device::mreq_r ) { return m_slotbus->mreq_r(space, offset); }
+WRITE8_MEMBER( sv602_device::mreq_w ) { m_slotbus->mreq_w(space, offset, data); }
+READ8_MEMBER( sv602_device::iorq_r ) { return m_slotbus->iorq_r(space, offset); }
+WRITE8_MEMBER( sv602_device::iorq_w ) { m_slotbus->iorq_w(space, offset, data); }
+
+void sv602_device::bk21_w(int state) { m_slotbus->bk21_w(state); }
+void sv602_device::bk22_w(int state) { m_slotbus->bk22_w(state); }
+void sv602_device::bk31_w(int state) { m_slotbus->bk31_w(state); }
+void sv602_device::bk32_w(int state) { m_slotbus->bk32_w(state); }
diff --git a/src/devices/bus/svi3x8/expander/sv602.h b/src/devices/bus/svi3x8/expander/sv602.h
new file mode 100644
index 00000000000..2026302d293
--- /dev/null
+++ b/src/devices/bus/svi3x8/expander/sv602.h
@@ -0,0 +1,58 @@
+// license:GPL-2.0+
+// copyright-holders:Dirk Best
+/***************************************************************************
+
+ SV-602 Single Slot Expander for SVI-318/328
+
+***************************************************************************/
+
+#pragma once
+
+#ifndef __SVI3X8_EXPANDER_SV602_H__
+#define __SVI3X8_EXPANDER_SV602_H__
+
+#include "emu.h"
+#include "expander.h"
+#include "bus/svi3x8/slot/slot.h"
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> sv602_device
+
+class sv602_device : public device_t, public device_svi_expander_interface
+{
+public:
+ // construction/destruction
+ sv602_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ // from slots
+ WRITE_LINE_MEMBER( int_w );
+ WRITE_LINE_MEMBER( romdis_w );
+ WRITE_LINE_MEMBER( ramdis_w );
+
+ // from host
+ virtual DECLARE_READ8_MEMBER( mreq_r ) override;
+ virtual DECLARE_WRITE8_MEMBER( mreq_w ) override;
+ virtual DECLARE_READ8_MEMBER( iorq_r ) override;
+ virtual DECLARE_WRITE8_MEMBER( iorq_w ) override;
+
+ virtual void bk21_w(int state) override;
+ virtual void bk22_w(int state) override;
+ virtual void bk31_w(int state) override;
+ virtual void bk32_w(int state) override;
+
+protected:
+ virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_start() override;
+
+private:
+ required_device<svi_slot_bus_device> m_slotbus;
+};
+
+// device type definition
+extern const device_type SV602;
+
+#endif // __SVI3X8_EXPANDER_SV602_H__
diff --git a/src/devices/bus/svi3x8/slot/cards.cpp b/src/devices/bus/svi3x8/slot/cards.cpp
index 1547443b136..095c2eeaa4e 100644
--- a/src/devices/bus/svi3x8/slot/cards.cpp
+++ b/src/devices/bus/svi3x8/slot/cards.cpp
@@ -16,3 +16,13 @@ SLOT_INTERFACE_START( svi_slot_cards )
SLOT_INTERFACE("sv806", SV806)
SLOT_INTERFACE("sv807", SV807)
SLOT_INTERFACE_END
+
+// The single slot expander doesn't support the disk controller, since
+// it requires its own power supply to power the disk drives
+SLOT_INTERFACE_START( sv602_slot_cards )
+ SLOT_INTERFACE("sv802", SV802)
+ SLOT_INTERFACE("sv803", SV803)
+ SLOT_INTERFACE("sv805", SV805)
+ SLOT_INTERFACE("sv806", SV806)
+ SLOT_INTERFACE("sv807", SV807)
+SLOT_INTERFACE_END
diff --git a/src/devices/bus/svi3x8/slot/cards.h b/src/devices/bus/svi3x8/slot/cards.h
index d54b3f11b0b..d27469b08a1 100644
--- a/src/devices/bus/svi3x8/slot/cards.h
+++ b/src/devices/bus/svi3x8/slot/cards.h
@@ -20,5 +20,6 @@
#include "sv807.h"
SLOT_INTERFACE_EXTERN( svi_slot_cards );
+SLOT_INTERFACE_EXTERN( sv602_slot_cards );
#endif // __SVI3X8_SLOT_CARDS_H__
diff --git a/src/devices/bus/svi3x8/slot/slot.h b/src/devices/bus/svi3x8/slot/slot.h
index e41e6c107f1..f7f2be940ef 100644
--- a/src/devices/bus/svi3x8/slot/slot.h
+++ b/src/devices/bus/svi3x8/slot/slot.h
@@ -49,9 +49,9 @@
#define MCFG_SVI_SLOT_BUS_ADD \
MCFG_DEVICE_ADD("slotbus", SVI_SLOT_BUS, 0)
-#define MCFG_SVI_SLOT_ADD(_tag, _def_slot) \
+#define MCFG_SVI_SLOT_ADD(_tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, SVI_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(svi_slot_cards, _def_slot, false) \
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
svi_slot_device::set_bus(*device, owner, "slotbus");
#define MCFG_SVI_SLOT_INT_HANDLER(_devcb) \