summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/einstein/userport/userport.h
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
committer Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
commit97b67170277437131adf6ed4d60139c172529e4f (patch)
tree7a5cbf608f191075f1612b1af15832c206a3fe2d /src/devices/bus/einstein/userport/userport.h
parentb380514764cf857469bae61c11143a19f79a74c5 (diff)
(nw) Clean up the mess on master
This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
Diffstat (limited to 'src/devices/bus/einstein/userport/userport.h')
-rw-r--r--src/devices/bus/einstein/userport/userport.h29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/devices/bus/einstein/userport/userport.h b/src/devices/bus/einstein/userport/userport.h
index 4bdbaed36d2..f5bd8dcfeb3 100644
--- a/src/devices/bus/einstein/userport/userport.h
+++ b/src/devices/bus/einstein/userport/userport.h
@@ -24,32 +24,32 @@
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_EINSTEIN_USERPORT_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, EINSTEIN_USERPORT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(einstein_userport_cards, nullptr, false)
-
-#define MCFG_EINSTEIN_USERPORT_BSTB_HANDLER(_devcb) \
- downcast<einstein_userport_device &>(*device).set_bstb_handler(DEVCB_##_devcb);
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
class device_einstein_userport_interface;
+// supported devices
+void einstein_userport_cards(device_slot_interface &device);
+
class einstein_userport_device : public device_t, public device_slot_interface
{
public:
// construction/destruction
+ einstein_userport_device(machine_config const &mconfig, char const *tag, device_t *owner)
+ : einstein_userport_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ einstein_userport_cards(*this);
+ set_default_option(nullptr);
+ set_fixed(false);
+ }
+
einstein_userport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~einstein_userport_device();
// callbacks
- template <class Object> devcb_base &set_bstb_handler(Object &&cb) { return m_bstb_handler.set_callback(std::forward<Object>(cb)); }
+ auto bstb_handler() { return m_bstb_handler.bind(); }
// called from card device
DECLARE_WRITE_LINE_MEMBER( bstb_w ) { m_bstb_handler(state); }
@@ -89,7 +89,4 @@ protected:
// device type definition
DECLARE_DEVICE_TYPE(EINSTEIN_USERPORT, einstein_userport_device)
-// supported devices
-void einstein_userport_cards(device_slot_interface &device);
-
#endif // MAME_BUS_EINSTEIN_USERPORT_USERPORT_H