diff options
author | 2018-09-26 18:24:17 +0200 | |
---|---|---|
committer | 2018-09-26 18:24:17 +0200 | |
commit | 0cd1758e544f3f89df226b9861b7201be7fd4b3a (patch) | |
tree | 8961c7c056ec734a3d2f16e7620b132b52d53360 /src/devices/machine/upd4701.h | |
parent | 0ab6ef3f39e7fc5a2a136d24137e09b8e7859a2a (diff) |
upd1990a, upd4701, upd4992, upd7002: removed MCFG macros (nw)
Diffstat (limited to 'src/devices/machine/upd4701.h')
-rw-r--r-- | src/devices/machine/upd4701.h | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/src/devices/machine/upd4701.h b/src/devices/machine/upd4701.h index 9fab9024f2c..dcf389ff1c1 100644 --- a/src/devices/machine/upd4701.h +++ b/src/devices/machine/upd4701.h @@ -27,29 +27,16 @@ #pragma once -/*************************************************************************** - MACROS / CONSTANTS -***************************************************************************/ - -#define MCFG_UPD4701_PORTX(_tag) \ - downcast<upd4701_device &>(*device).set_portx_tag(_tag); -#define MCFG_UPD4701_PORTY(_tag) \ - downcast<upd4701_device &>(*device).set_porty_tag(_tag); -#define MCFG_UPD4701_CF_CALLBACK(_devcb) \ - devcb = downcast<upd4701_device &>(*device).set_cf_cb(DEVCB_##_devcb); -#define MCFG_UPD4701_SF_CALLBACK(_devcb) \ - devcb = downcast<upd4701_device &>(*device).set_sf_cb(DEVCB_##_devcb); - class upd4701_device : public device_t { public: - upd4701_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upd4701_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); // configuration - void set_portx_tag(const char *tag) { m_portx.set_tag(tag); } - void set_porty_tag(const char *tag) { m_porty.set_tag(tag); } - template<class Object> devcb_base &set_cf_cb(Object &&cb) { return m_cf_cb.set_callback(std::forward<Object>(cb)); } - template<class Object> devcb_base &set_sf_cb(Object &&cb) { return m_sf_cb.set_callback(std::forward<Object>(cb)); } + template <typename T> void set_portx_tag(T &&tag) { m_portx.set_tag(std::forward<T>(tag)); } + template <typename T> void set_porty_tag(T &&tag) { m_porty.set_tag(std::forward<T>(tag)); } + auto cf_cb() { return m_cf_cb.bind(); } + auto sf_cb() { return m_sf_cb.bind(); } void x_add(s16 data); void y_add(s16 data); |