summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/tms1024.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/tms1024.h')
-rw-r--r--src/devices/machine/tms1024.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/devices/machine/tms1024.h b/src/devices/machine/tms1024.h
index eae25fca18d..6c11a50eafa 100644
--- a/src/devices/machine/tms1024.h
+++ b/src/devices/machine/tms1024.h
@@ -18,9 +18,9 @@
// 4-bit ports (3210 = DCBA)
// valid ports: 4-7 for TMS1024, 1-7 for TMS1025
#define MCFG_TMS1025_READ_PORT_CB(X, cb) \
- devcb = &downcast<tms1024_device &>(*device).set_read_port_callback<(tms1024_device::X)>((DEVCB_##cb));
+ downcast<tms1024_device &>(*device).set_read_port_callback<(tms1024_device::X)>((DEVCB_##cb));
#define MCFG_TMS1025_WRITE_PORT_CB(X, cb) \
- devcb = &downcast<tms1024_device &>(*device).set_write_port_callback<(tms1024_device::X)>((DEVCB_##cb));
+ downcast<tms1024_device &>(*device).set_write_port_callback<(tms1024_device::X)>((DEVCB_##cb));
// pinout reference
@@ -71,6 +71,14 @@ public:
// configuration helpers
template <unsigned N, class Object> devcb_base &set_read_port_callback(Object &&cb) { return m_read_port[N].set_callback(std::forward<Object>(cb)); }
template <unsigned N, class Object> devcb_base &set_write_port_callback(Object &&cb) { return m_write_port[N].set_callback(std::forward<Object>(cb)); }
+ auto read_port4_callback() { return m_read_port[3].bind(); }
+ auto read_port5_callback() { return m_read_port[4].bind(); }
+ auto read_port6_callback() { return m_read_port[5].bind(); }
+ auto read_port7_callback() { return m_read_port[6].bind(); }
+ auto write_port4_callback() { return m_write_port[3].bind(); }
+ auto write_port5_callback() { return m_write_port[4].bind(); }
+ auto write_port6_callback() { return m_write_port[5].bind(); }
+ auto write_port7_callback() { return m_write_port[6].bind(); }
DECLARE_WRITE8_MEMBER(write_h);
DECLARE_READ8_MEMBER(read_h);
@@ -99,6 +107,13 @@ class tms1025_device : public tms1024_device
{
public:
tms1025_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
+
+ auto read_port1_callback() { return m_read_port[0].bind(); }
+ auto read_port2_callback() { return m_read_port[1].bind(); }
+ auto read_port3_callback() { return m_read_port[2].bind(); }
+ auto write_port1_callback() { return m_write_port[0].bind(); }
+ auto write_port2_callback() { return m_write_port[1].bind(); }
+ auto write_port3_callback() { return m_write_port[2].bind(); }
};