summaryrefslogtreecommitdiffstats
path: root/src/devices/video/mc6847.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/video/mc6847.h')
-rw-r--r--src/devices/video/mc6847.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/devices/video/mc6847.h b/src/devices/video/mc6847.h
index 4cbe7be2e9e..763ef0c65f5 100644
--- a/src/devices/video/mc6847.h
+++ b/src/devices/video/mc6847.h
@@ -36,16 +36,16 @@
MCFG_SCREEN_VBLANK_TIME(0)
#define MCFG_MC6847_HSYNC_CALLBACK(_write) \
- devcb = &downcast<mc6847_friend_device &>(*device).set_hsync_wr_callback(DEVCB_##_write);
+ downcast<mc6847_friend_device &>(*device).set_hsync_wr_callback(DEVCB_##_write);
#define MCFG_MC6847_FSYNC_CALLBACK(_write) \
- devcb = &downcast<mc6847_friend_device &>(*device).set_fsync_wr_callback(DEVCB_##_write);
+ downcast<mc6847_friend_device &>(*device).set_fsync_wr_callback(DEVCB_##_write);
#define MCFG_MC6847_CHARROM_CALLBACK(_class, _method) \
downcast<mc6847_friend_device &>(*device).set_get_char_rom(mc6847_friend_device::get_char_rom_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_MC6847_INPUT_CALLBACK(_read) \
- devcb = &downcast<mc6847_base_device &>(*device).set_input_callback(DEVCB_##_read);
+ downcast<mc6847_base_device &>(*device).set_input_callback(DEVCB_##_read);
#define MCFG_MC6847_FIXED_MODE(_mode) \
downcast<mc6847_base_device &>(*device).set_get_fixed_mode(_mode);
@@ -88,6 +88,8 @@ public:
template <class Object> devcb_base &set_hsync_wr_callback(Object &&cb) { return m_write_hsync.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_fsync_wr_callback(Object &&cb) { return m_write_fsync.set_callback(std::forward<Object>(cb)); }
+ auto hsync_wr_callback() { return m_write_hsync.bind(); }
+ auto fsync_wr_callback() { return m_write_fsync.bind(); }
template <typename Object> void set_get_char_rom(Object &&cb) { m_charrom_cb = std::forward<Object>(cb); }
@@ -512,6 +514,7 @@ class mc6847_base_device : public mc6847_friend_device
{
public:
template <class Object> devcb_base &set_input_callback(Object &&cb) { return m_input_cb.set_callback(std::forward<Object>(cb)); }
+ auto input_callback() { return m_input_cb.bind(); }
void set_get_fixed_mode(uint8_t mode) { m_fixed_mode = mode; }
void set_black_and_white(bool bw) { m_black_and_white = bw; }