summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/namco51.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/namco51.h')
-rw-r--r--src/mame/machine/namco51.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mame/machine/namco51.h b/src/mame/machine/namco51.h
index 3f94482c9ce..0ee64727137 100644
--- a/src/mame/machine/namco51.h
+++ b/src/mame/machine/namco51.h
@@ -15,22 +15,22 @@
downcast<namco_51xx_device &>(*device).set_screen_tag(screen_tag);
#define MCFG_NAMCO_51XX_INPUT_0_CB(_devcb) \
- devcb = &downcast<namco_51xx_device &>(*device).set_input_callback<0>(DEVCB_##_devcb);
+ downcast<namco_51xx_device &>(*device).set_input_callback<0>(DEVCB_##_devcb);
#define MCFG_NAMCO_51XX_INPUT_1_CB(_devcb) \
- devcb = &downcast<namco_51xx_device &>(*device).set_input_callback<1>(DEVCB_##_devcb);
+ downcast<namco_51xx_device &>(*device).set_input_callback<1>(DEVCB_##_devcb);
#define MCFG_NAMCO_51XX_INPUT_2_CB(_devcb) \
- devcb = &downcast<namco_51xx_device &>(*device).set_input_callback<2>(DEVCB_##_devcb);
+ downcast<namco_51xx_device &>(*device).set_input_callback<2>(DEVCB_##_devcb);
#define MCFG_NAMCO_51XX_INPUT_3_CB(_devcb) \
- devcb = &downcast<namco_51xx_device &>(*device).set_input_callback<3>(DEVCB_##_devcb);
+ downcast<namco_51xx_device &>(*device).set_input_callback<3>(DEVCB_##_devcb);
#define MCFG_NAMCO_51XX_OUTPUT_0_CB(_devcb) \
- devcb = &downcast<namco_51xx_device &>(*device).set_output_callback<0>(DEVCB_##_devcb);
+ downcast<namco_51xx_device &>(*device).set_output_callback<0>(DEVCB_##_devcb);
#define MCFG_NAMCO_51XX_OUTPUT_1_CB(_devcb) \
- devcb = &downcast<namco_51xx_device &>(*device).set_output_callback<1>(DEVCB_##_devcb);
+ downcast<namco_51xx_device &>(*device).set_output_callback<1>(DEVCB_##_devcb);
class namco_51xx_device : public device_t
{
@@ -40,6 +40,8 @@ public:
template <typename T> void set_screen_tag(T &&tag) { m_screen.set_tag(std::forward<T>(tag)); }
template <unsigned N, class Object> devcb_base &set_input_callback(Object &&cb) { return m_in[N].set_callback(std::forward<Object>(cb)); }
template <unsigned N, class Object> devcb_base &set_output_callback(Object &&cb) { return m_out[N].set_callback(std::forward<Object>(cb)); }
+ template <unsigned N> auto input_callback() { return m_in[N].bind(); }
+ template <unsigned N> auto output_callback() { return m_out[N].bind(); }
DECLARE_WRITE8_MEMBER( write );
DECLARE_READ8_MEMBER( read );