summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/8950intf.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/8950intf.h')
-rw-r--r--src/devices/sound/8950intf.h25
1 files changed, 5 insertions, 20 deletions
diff --git a/src/devices/sound/8950intf.h b/src/devices/sound/8950intf.h
index 258e27ccdb2..fd65a036ef8 100644
--- a/src/devices/sound/8950intf.h
+++ b/src/devices/sound/8950intf.h
@@ -6,21 +6,6 @@
#pragma once
-#define MCFG_Y8950_IRQ_HANDLER(cb) \
- downcast<y8950_device &>(*device).set_irq_handler((DEVCB_##cb));
-
-#define MCFG_Y8950_KEYBOARD_READ_HANDLER(cb) \
- downcast<y8950_device &>(*device).set_keyboard_read_handler((DEVCB_##cb));
-
-#define MCFG_Y8950_KEYBOARD_WRITE_HANDLER(cb) \
- downcast<y8950_device &>(*device).set_keyboard_write_handler((DEVCB_##cb));
-
-#define MCFG_Y8950_IO_READ_HANDLER(cb) \
- downcast<y8950_device &>(*device).set_io_read_handler((DEVCB_##cb));
-
-#define MCFG_Y8950_IO_WRITE_HANDLER(cb) \
- downcast<y8950_device &>(*device).set_io_write_handler((DEVCB_##cb));
-
class y8950_device : public device_t,
public device_sound_interface,
public device_rom_interface
@@ -29,11 +14,11 @@ public:
y8950_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration helpers
- template <class Object> devcb_base &set_irq_handler(Object &&cb) { return m_irq_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_keyboard_read_handler(Object &&cb) { return m_keyboard_read_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_keyboard_write_handler(Object &&cb) { return m_keyboard_write_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_io_read_handler(Object &&cb) { return m_io_read_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_io_write_handler(Object &&cb) { return m_io_write_handler.set_callback(std::forward<Object>(cb)); }
+ auto irq() { return m_irq_handler.bind(); }
+ auto keyboard_read() { return m_keyboard_read_handler.bind(); }
+ auto keyboard_write() { return m_keyboard_write_handler.bind(); }
+ auto io_read() { return m_io_read_handler.bind(); }
+ auto io_write() { return m_io_write_handler.bind(); }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );