diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/emu/netlist/devices/nld_7448.c | 39 | ||||
-rw-r--r-- | src/emu/netlist/devices/nld_7448.h | 5 | ||||
-rw-r--r-- | src/emu/netlist/devices/nld_truthtable.c | 9 | ||||
-rw-r--r-- | src/emu/netlist/plists.h | 11 |
4 files changed, 18 insertions, 46 deletions
diff --git a/src/emu/netlist/devices/nld_7448.c b/src/emu/netlist/devices/nld_7448.c index 7807e9a4473..7533449e8c5 100644 --- a/src/emu/netlist/devices/nld_7448.c +++ b/src/emu/netlist/devices/nld_7448.c @@ -154,45 +154,6 @@ NETLIB_UPDATE(7448_sub) update_outputs(v); } -#if 0 -ATTR_HOT void NETLIB_NAME(7448_sub)::inc_active() -{ - const netlist_time delay[2] = { NLTIME_FROM_NS(15), NLTIME_FROM_NS(22) }; - nl_assert(netlist().use_deactivate()); - if (++m_active == 1) - { - m_A.activate(); - m_B.activate(); - m_C.activate(); - m_D.activate(); - m_RBIQ.activate(); - - netlist_time mt = this->m_Q[0].net().time(); - for (int i=1; i<7; i++) - { - if (this->m_Q[i].net().time() > mt) - mt = this->m_Q[i].net().time(); - } - - for (int i=0; i<7; i++) - m_Q[i].net().set_Q_time( tab7448[m_state][i], mt + NLTIME_FROM_NS(100)); - } -} - -ATTR_HOT void NETLIB_NAME(7448_sub)::dec_active() -{ - nl_assert(netlist().use_deactivate()); - if (--m_active == 0) - { - m_A.inactivate(); - m_B.inactivate(); - m_C.inactivate(); - m_D.inactivate(); - m_RBIQ.inactivate(); - } -} -#endif - NETLIB_FUNC_VOID(7448_sub, update_outputs, (UINT8 v)) { nl_assert(v<16); diff --git a/src/emu/netlist/devices/nld_7448.h b/src/emu/netlist/devices/nld_7448.h index d7b1903fe5e..951c7716cdd 100644 --- a/src/emu/netlist/devices/nld_7448.h +++ b/src/emu/netlist/devices/nld_7448.h @@ -63,11 +63,6 @@ NETLIB_SUBDEVICE(7448_sub, netlist_logic_output_t m_Q[7]; /* a .. g */ - // FIXME: doesn't work -/* - ATTR_HOT void inc_active(); - ATTR_HOT void dec_active(); -*/ ); NETLIB_DEVICE(7448, diff --git a/src/emu/netlist/devices/nld_truthtable.c b/src/emu/netlist/devices/nld_truthtable.c index 1cf31392ec6..dc2a31e3cb0 100644 --- a/src/emu/netlist/devices/nld_truthtable.c +++ b/src/emu/netlist/devices/nld_truthtable.c @@ -6,6 +6,7 @@ */ #include "nld_truthtable.h" +#include "../plists.h" int truthtable_desc_t::count_bits(UINT32 v) { @@ -170,7 +171,9 @@ ATTR_COLD void truthtable_desc_t::setup(const char **truthtable, UINT32 disabled nl_assert_always(times.count() == m_NO, "timing count not matching"); UINT16 val = 0; - UINT8 tindex[m_NO]; + plinearlist_t<UINT8> tindex; + tindex.set_count(m_NO); + for (int j=0; j<m_NO; j++) { pstring outs = out[j].trim(); @@ -192,7 +195,9 @@ ATTR_COLD void truthtable_desc_t::setup(const char **truthtable, UINT32 disabled } // determine ignore - UINT32 ign[m_size]; + plinearlist_t<UINT32> ign; + ign.set_count(m_size); + for (int j=0; j < m_size; j++) ign[j] = -1; diff --git a/src/emu/netlist/plists.h b/src/emu/netlist/plists.h index 2165be50196..dd7379713c4 100644 --- a/src/emu/netlist/plists.h +++ b/src/emu/netlist/plists.h @@ -162,6 +162,17 @@ public: clear(); } + ATTR_COLD void set_count(const int new_count) + { + if (new_count < m_count) + m_count = new_count; + else + { + resize(new_count); + m_count = new_count; + } + + } private: ATTR_COLD void resize(const int new_size) { |