summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/saturn
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/saturn
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/saturn')
-rw-r--r--src/devices/bus/saturn/sat_slot.cpp7
-rw-r--r--src/devices/bus/saturn/sat_slot.h4
2 files changed, 6 insertions, 5 deletions
diff --git a/src/devices/bus/saturn/sat_slot.cpp b/src/devices/bus/saturn/sat_slot.cpp
index defdd4d025b..a7357681958 100644
--- a/src/devices/bus/saturn/sat_slot.cpp
+++ b/src/devices/bus/saturn/sat_slot.cpp
@@ -37,7 +37,7 @@ DEFINE_DEVICE_TYPE(SATURN_CART_SLOT, sat_cart_slot_device, "sat_cart_slot", "Sat
//-------------------------------------------------
device_sat_cart_interface::device_sat_cart_interface(const machine_config &mconfig, device_t &device, int cart_type) :
- device_slot_card_interface(mconfig, device),
+ device_interface(device, "saturncart"),
m_cart_type(cart_type),
m_rom(nullptr),
m_rom_size(0)
@@ -105,7 +105,8 @@ void device_sat_cart_interface::dram1_alloc(uint32_t size)
sat_cart_slot_device::sat_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, SATURN_CART_SLOT, tag, owner, clock),
device_image_interface(mconfig, *this),
- device_slot_interface(mconfig, *this), m_cart(nullptr)
+ device_single_card_slot_interface<device_sat_cart_interface>(mconfig, *this),
+ m_cart(nullptr)
{
}
@@ -124,7 +125,7 @@ sat_cart_slot_device::~sat_cart_slot_device()
void sat_cart_slot_device::device_start()
{
- m_cart = dynamic_cast<device_sat_cart_interface *>(get_card_device());
+ m_cart = get_card_device();
}
diff --git a/src/devices/bus/saturn/sat_slot.h b/src/devices/bus/saturn/sat_slot.h
index 63a9ae0dbca..51f8ef3a2aa 100644
--- a/src/devices/bus/saturn/sat_slot.h
+++ b/src/devices/bus/saturn/sat_slot.h
@@ -13,7 +13,7 @@
// ======================> device_sat_cart_interface
-class device_sat_cart_interface : public device_slot_card_interface
+class device_sat_cart_interface : public device_interface
{
public:
virtual ~device_sat_cart_interface();
@@ -63,7 +63,7 @@ protected:
class sat_cart_slot_device : public device_t,
public device_image_interface,
- public device_slot_interface
+ public device_single_card_slot_interface<device_sat_cart_interface>
{
public:
// construction/destruction