diff options
| author | 2018-08-11 15:00:54 +0200 | |
|---|---|---|
| committer | 2018-08-11 15:01:20 +0200 | |
| commit | d5d598a1c021c19e992e5f4cd8f56aa8c697076e (patch) | |
| tree | 3deeca26e7b770f0140041a1902d3b9bee21f6f4 /src/devices/machine/74145.cpp | |
| parent | 543e49cc2443e3ab531168ec80e93dd3afeea795 (diff) | |
-7200fifo, 7400, 7404, 74123, 74145, 74148, 74153, 74157, 74161, 74259: [Ryan Holtz]
* Removed MCFG and old devcb macros.
AJR, any breakage? nw
Diffstat (limited to 'src/devices/machine/74145.cpp')
| -rw-r--r-- | src/devices/machine/74145.cpp | 35 |
1 files changed, 5 insertions, 30 deletions
diff --git a/src/devices/machine/74145.cpp b/src/devices/machine/74145.cpp index e6fdd674f97..e2ffeedf9f4 100644 --- a/src/devices/machine/74145.cpp +++ b/src/devices/machine/74145.cpp @@ -61,16 +61,7 @@ DEFINE_DEVICE_TYPE(TTL74145, ttl74145_device, "ttl74145", "TTL74145") ttl74145_device::ttl74145_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, TTL74145, tag, owner, clock) - , m_output_line_0_cb(*this) - , m_output_line_1_cb(*this) - , m_output_line_2_cb(*this) - , m_output_line_3_cb(*this) - , m_output_line_4_cb(*this) - , m_output_line_5_cb(*this) - , m_output_line_6_cb(*this) - , m_output_line_7_cb(*this) - , m_output_line_8_cb(*this) - , m_output_line_9_cb(*this) + , m_output_line_cb{{*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}} , m_number(0) { } @@ -83,16 +74,8 @@ ttl74145_device::ttl74145_device(const machine_config &mconfig, const char *tag, void ttl74145_device::device_start() { /* resolve callbacks */ - m_output_line_0_cb.resolve_safe(); - m_output_line_1_cb.resolve_safe(); - m_output_line_2_cb.resolve_safe(); - m_output_line_3_cb.resolve_safe(); - m_output_line_4_cb.resolve_safe(); - m_output_line_5_cb.resolve_safe(); - m_output_line_6_cb.resolve_safe(); - m_output_line_7_cb.resolve_safe(); - m_output_line_8_cb.resolve_safe(); - m_output_line_9_cb.resolve_safe(); + for (std::size_t bit = 0; bit < 10; bit++) + m_output_line_cb[bit].resolve_safe(); // register for state saving save_item(NAME(m_number)); @@ -119,16 +102,8 @@ void ttl74145_device::write(uint8_t data) /* call output callbacks if the number changed */ if (new_number != m_number) { - m_output_line_0_cb(new_number == 0); - m_output_line_1_cb(new_number == 1); - m_output_line_2_cb(new_number == 2); - m_output_line_3_cb(new_number == 3); - m_output_line_4_cb(new_number == 4); - m_output_line_5_cb(new_number == 5); - m_output_line_6_cb(new_number == 6); - m_output_line_7_cb(new_number == 7); - m_output_line_8_cb(new_number == 8); - m_output_line_9_cb(new_number == 9); + for (std::size_t bit = 0; bit < 10; bit++) + m_output_line_cb[bit](new_number == bit); } /* update state */ |
