summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/scsi
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-11-01 00:47:41 +1100
committer Vas Crabb <vas@vastheman.com>2019-11-01 00:47:41 +1100
commit6f4c1f6e5b2525ac8b700b3a0754f5e99c4223e1 (patch)
tree4b0e0ac5cf1c3a7fd518a7d8f4d12f39291b2629 /src/devices/bus/scsi
parent0be348c7fbc8c0478f724ba098dabeb9eb3aab8c (diff)
Spring cleaning:
* Changed emu_fatalerror to use util::string_format semantics * Fixed some incorrectly marked up stuff in build scripts * Make internal layout compression type a scoped enum (only zlib is supported still, but at least the values aren't magic numbers now) * Fixed memory leaks in Xbox USB * There can only be one "perfect quantum" device - enforce that only the root machine can set it, as allowing subdevices to will cause weird issues with slot cards overiding it * Allow multiple devices to set maximum quantum and use the most restrictive one (it's maximum quantum, it would be minimum interleave) * Got rid of device_slot_card_interface as it wasn't providing value * Added a helper template to reduce certain kinds of boilerplate in slots/buses * Cleaned up some particularly bad slot code (plenty more of that to do), and made some slots more idiomatic
Diffstat (limited to 'src/devices/bus/scsi')
-rw-r--r--src/devices/bus/scsi/scsi.cpp10
-rw-r--r--src/devices/bus/scsi/scsi.h5
2 files changed, 7 insertions, 8 deletions
diff --git a/src/devices/bus/scsi/scsi.cpp b/src/devices/bus/scsi/scsi.cpp
index 5997266b84d..a4477483766 100644
--- a/src/devices/bus/scsi/scsi.cpp
+++ b/src/devices/bus/scsi/scsi.cpp
@@ -4,8 +4,8 @@
#include "emu.h"
#include "scsi.h"
-scsi_port_device::scsi_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, SCSI_PORT, tag, owner, clock),
+scsi_port_device::scsi_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ device_t(mconfig, SCSI_PORT, tag, owner, clock),
m_bsy_handler(*this),
m_sel_handler(*this),
m_cd_handler(*this),
@@ -673,7 +673,7 @@ DEFINE_DEVICE_TYPE(SCSI_PORT, scsi_port_device, "scsi", "SCSI Port")
scsi_port_slot_device::scsi_port_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, SCSI_PORT_SLOT, tag, owner, clock),
- device_slot_interface(mconfig, *this),
+ device_single_card_slot_interface<scsi_port_interface>(mconfig, *this),
m_dev(nullptr),
m_bsy(0),
m_sel(0),
@@ -706,8 +706,8 @@ void scsi_port_slot_device::device_start()
DEFINE_DEVICE_TYPE(SCSI_PORT_SLOT, scsi_port_slot_device, "scsi_slot", "SCSI Connector")
-scsi_port_interface::scsi_port_interface(const machine_config &mconfig, device_t &device)
- : device_slot_card_interface(mconfig, device)
+scsi_port_interface::scsi_port_interface(const machine_config &mconfig, device_t &device) :
+ device_interface(device, "scsi")
{
m_slot = dynamic_cast<scsi_port_slot_device *>(device.owner());
}
diff --git a/src/devices/bus/scsi/scsi.h b/src/devices/bus/scsi/scsi.h
index 66ddae370d6..07e64d5f102 100644
--- a/src/devices/bus/scsi/scsi.h
+++ b/src/devices/bus/scsi/scsi.h
@@ -168,8 +168,7 @@ DECLARE_DEVICE_TYPE(SCSI_PORT, scsi_port_device)
class scsi_port_interface;
-class scsi_port_slot_device : public device_t,
- public device_slot_interface
+class scsi_port_slot_device : public device_t, public device_single_card_slot_interface<scsi_port_interface>
{
friend class scsi_port_device;
friend class scsi_port_interface;
@@ -210,7 +209,7 @@ protected:
DECLARE_DEVICE_TYPE(SCSI_PORT_SLOT, scsi_port_slot_device)
-class scsi_port_interface : public device_slot_card_interface
+class scsi_port_interface : public device_interface
{
public:
virtual ~scsi_port_interface();