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/bus/hexbus/hexbus.h | |
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/bus/hexbus/hexbus.h')
-rw-r--r-- | src/devices/bus/hexbus/hexbus.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/devices/bus/hexbus/hexbus.h b/src/devices/bus/hexbus/hexbus.h index ca961a39d17..3db73cdb8ea 100644 --- a/src/devices/bus/hexbus/hexbus.h +++ b/src/devices/bus/hexbus/hexbus.h @@ -39,15 +39,14 @@ class hexbus_chained_device; Interface for a device that connects to the Hexbus ********************************************************************/ -class device_hexbus_interface : public device_slot_card_interface +class device_hexbus_interface : public device_interface { public: - virtual uint8_t bus_read(int dir) =0; - virtual void bus_write(int dir, uint8_t data) =0; + virtual uint8_t bus_read(int dir) = 0; + virtual void bus_write(int dir, uint8_t data) = 0; protected: - device_hexbus_interface(const machine_config &mconfig, device_t &device) : - device_slot_card_interface(mconfig, device) { } + device_hexbus_interface(const machine_config &mconfig, device_t &device); }; /******************************************************************** @@ -58,13 +57,13 @@ class hexbus_chained_device : public device_t, public device_hexbus_interface { friend class hexbus_device; -public: +protected: hexbus_chained_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - virtual void device_start() override; -protected: void set_outbound_hexbus(hexbus_device *outbound) { m_hexbus_outbound = outbound; } + virtual void device_start() override; + // Link to the inbound Hexbus (if not null, see Oso chip) hexbus_device *m_hexbus_inbound; @@ -90,7 +89,7 @@ protected: uint8_t hexbus_read(); // Callback for changes on the hexbus - virtual void hexbus_value_changed(uint8_t data) { }; + virtual void hexbus_value_changed(uint8_t data) { } // Levels of the lines at this device. 0 means pull down, 1 means release. uint8_t m_myvalue; @@ -105,7 +104,7 @@ protected: Connector to the Hexbus, offers a slot for Hexbus-chained devices ********************************************************************/ -class hexbus_device : public device_t, public device_slot_interface +class hexbus_device : public device_t, public device_single_card_slot_interface<device_hexbus_interface> { public: template <typename U> |