diff options
author | 2019-11-01 00:47:41 +1100 | |
---|---|---|
committer | 2019-11-01 00:47:41 +1100 | |
commit | 6f4c1f6e5b2525ac8b700b3a0754f5e99c4223e1 (patch) | |
tree | 4b0e0ac5cf1c3a7fd518a7d8f4d12f39291b2629 /src/devices/machine/nscsi_bus.cpp | |
parent | 0be348c7fbc8c0478f724ba098dabeb9eb3aab8c (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/machine/nscsi_bus.cpp')
-rw-r--r-- | src/devices/machine/nscsi_bus.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/devices/machine/nscsi_bus.cpp b/src/devices/machine/nscsi_bus.cpp index c2274f49c95..489a5b6f171 100644 --- a/src/devices/machine/nscsi_bus.cpp +++ b/src/devices/machine/nscsi_bus.cpp @@ -141,7 +141,7 @@ void nscsi_bus_device::device_resolve_objects() nscsi_connector::nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, NSCSI_CONNECTOR, tag, owner, clock), - device_slot_interface(mconfig, *this) + device_single_card_slot_interface<nscsi_slot_card_interface>(mconfig, *this) { } @@ -149,20 +149,13 @@ nscsi_connector::~nscsi_connector() { } -void nscsi_connector::device_validity_check(validity_checker &valid) const -{ - device_t *const carddev = get_card_device(); - if (carddev && !dynamic_cast<nscsi_slot_card_interface *>(carddev)) - osd_printf_error("Card device %s (%s) does not implement nscsi_slot_card_interface\n", carddev->tag(), carddev->name()); -} - void nscsi_connector::device_start() { } nscsi_device *nscsi_connector::get_device() { - nscsi_slot_card_interface *connected = dynamic_cast<nscsi_slot_card_interface *>(get_card_device()); + nscsi_slot_card_interface *const connected = get_card_device(); if (connected) return connected->device().subdevice<nscsi_device>(connected->m_nscsi.finder_tag()); else @@ -170,7 +163,7 @@ nscsi_device *nscsi_connector::get_device() } nscsi_slot_card_interface::nscsi_slot_card_interface(const machine_config &mconfig, device_t &device, const char *nscsi_tag) : - device_slot_card_interface(mconfig, device), + device_interface(device, "nscsi"), m_nscsi(device, nscsi_tag) { } |