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/7404.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/7404.cpp')
-rw-r--r-- | src/devices/machine/7404.cpp | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/src/devices/machine/7404.cpp b/src/devices/machine/7404.cpp index 1c056c4ccc0..c252823ade6 100644 --- a/src/devices/machine/7404.cpp +++ b/src/devices/machine/7404.cpp @@ -13,12 +13,7 @@ DEFINE_DEVICE_TYPE(TTL7404, ttl7404_device, "7404", "5/7404 Hex Inverters") ttl7404_device::ttl7404_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, TTL7404, tag, owner, clock) - , m_y1_func(*this) - , m_y2_func(*this) - , m_y3_func(*this) - , m_y4_func(*this) - , m_y5_func(*this) - , m_y6_func(*this) + , m_y_func{{*this}, {*this}, {*this}, {*this}, {*this}, {*this}} , m_a(0) , m_y(0x3f) { @@ -26,26 +21,15 @@ ttl7404_device::ttl7404_device(const machine_config &mconfig, const char *tag, d void ttl7404_device::device_start() { - init(); - save_item(NAME(m_a)); save_item(NAME(m_y)); - m_y1_func.resolve_safe(); - m_y2_func.resolve_safe(); - m_y3_func.resolve_safe(); - m_y4_func.resolve_safe(); - m_y5_func.resolve_safe(); - m_y6_func.resolve_safe(); + for (std::size_t bit = 0; bit < 6; bit++) + m_y_func[bit].resolve_safe(); } void ttl7404_device::device_reset() { - init(); -} - -void ttl7404_device::init() -{ m_a = 0; m_y = 0x3f; } @@ -63,15 +47,7 @@ void ttl7404_device::update() if (BIT(m_y, bit) == BIT(last_y, bit)) continue; - switch(bit) - { - case 0: m_y1_func(BIT(m_y, bit)); break; - case 1: m_y2_func(BIT(m_y, bit)); break; - case 2: m_y3_func(BIT(m_y, bit)); break; - case 3: m_y4_func(BIT(m_y, bit)); break; - case 4: m_y5_func(BIT(m_y, bit)); break; - case 5: m_y6_func(BIT(m_y, bit)); break; - } + m_y_func[bit](BIT(m_y, bit)); } } } |