summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/coco/cococart.cpp
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/coco/cococart.cpp
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/coco/cococart.cpp')
-rw-r--r--src/devices/bus/coco/cococart.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/devices/bus/coco/cococart.cpp b/src/devices/bus/coco/cococart.cpp
index 990cbde61c4..c97c770eea7 100644
--- a/src/devices/bus/coco/cococart.cpp
+++ b/src/devices/bus/coco/cococart.cpp
@@ -76,7 +76,7 @@ DEFINE_DEVICE_TYPE(COCOCART_SLOT, cococart_slot_device, "cococart_slot", "CoCo C
//-------------------------------------------------
cococart_slot_device::cococart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, COCOCART_SLOT, tag, owner, clock),
- device_slot_interface(mconfig, *this),
+ device_single_card_slot_interface<device_cococart_interface>(mconfig, *this),
device_image_interface(mconfig, *this),
m_cart_callback(*this),
m_nmi_callback(*this),
@@ -123,7 +123,7 @@ void cococart_slot_device::device_start()
m_halt_callback.resolve();
m_halt_line.callback = &m_halt_callback;
- m_cart = dynamic_cast<device_cococart_interface *>(get_card_device());
+ m_cart = get_card_device();
}
@@ -273,8 +273,8 @@ void cococart_slot_device::set_line_timer(coco_cartridge_line &line, cococart_sl
{
// calculate delay; delay dependant on cycles per second
attotime delay = (line.delay != 0)
- ? clocks_to_attotime(line.delay)
- : attotime::zero;
+ ? clocks_to_attotime(line.delay)
+ : attotime::zero;
line.timer[line.timer_index]->adjust(delay, (int) value);
line.timer_index = (line.timer_index + 1) % TIMER_POOL;
@@ -483,7 +483,7 @@ template class device_finder<device_cococart_interface, true>;
//-------------------------------------------------
device_cococart_interface::device_cococart_interface(const machine_config &mconfig, device_t &device)
- : device_slot_card_interface(mconfig, device)
+ : device_interface(device, "cococart")
, m_owning_slot(nullptr)
, m_host(nullptr)
{
@@ -507,8 +507,8 @@ void device_cococart_interface::interface_config_complete()
{
m_owning_slot = dynamic_cast<cococart_slot_device *>(device().owner());
m_host = m_owning_slot
- ? dynamic_cast<device_cococart_host_interface *>(m_owning_slot->owner())
- : nullptr;
+ ? dynamic_cast<device_cococart_host_interface *>(m_owning_slot->owner())
+ : nullptr;
}