summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/netlist/devices/nld_signal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/netlist/devices/nld_signal.h')
-rw-r--r--src/emu/netlist/devices/nld_signal.h172
1 files changed, 86 insertions, 86 deletions
diff --git a/src/emu/netlist/devices/nld_signal.h b/src/emu/netlist/devices/nld_signal.h
index 24c3854a07d..6580ec0818c 100644
--- a/src/emu/netlist/devices/nld_signal.h
+++ b/src/emu/netlist/devices/nld_signal.h
@@ -47,8 +47,8 @@ public:
ATTR_COLD void reset()
{
- m_Q.initial(1);
- m_active = 1;
+ m_Q.initial(1);
+ m_active = 1;
}
#if (USE_DEACTIVE_DEVICE)
@@ -98,55 +98,55 @@ public:
save(NAME(m_active));
}
- ATTR_COLD void reset()
- {
- m_Q.initial(1);
- m_active = 1;
- }
+ ATTR_COLD void reset()
+ {
+ m_Q.initial(1);
+ m_active = 1;
+ }
#if (USE_DEACTIVE_DEVICE)
- ATTR_HOT void inc_active()
- {
- if (++m_active == 1)
- {
- update();
- }
- }
-
- ATTR_HOT void dec_active()
- {
- if (--m_active == 0)
- {
- for (int i = 0; i< _numdev; i++)
- m_i[i].inactivate();
- }
- }
+ ATTR_HOT void inc_active()
+ {
+ if (++m_active == 1)
+ {
+ update();
+ }
+ }
+
+ ATTR_HOT void dec_active()
+ {
+ if (--m_active == 0)
+ {
+ for (int i = 0; i< _numdev; i++)
+ m_i[i].inactivate();
+ }
+ }
#endif
- virtual void update()
- {
- const netlist_time times[2] = { NLTIME_FROM_NS(22), NLTIME_FROM_NS(15) };
-
- // FIXME: this check is needed because update is called during startup as well
- if (UNEXPECTED(USE_DEACTIVE_DEVICE && m_active == 0))
- return;
-
- for (int i = 0; i< _numdev; i++)
- {
- this->m_i[i].activate();
- if (INPLOGIC(this->m_i[i]) == _check)
- {
- for (int j = 0; j < i; j++)
- this->m_i[j].inactivate();
- for (int j = i + 1; j < _numdev; j++)
- this->m_i[j].inactivate();
-
- OUTLOGIC(this->m_Q, _check ^ (1 ^ _invert), times[_check]);// ? 15000 : 22000);
- return;
- }
- }
- OUTLOGIC(this->m_Q,_check ^ (_invert), times[1-_check]);// ? 22000 : 15000);
- }
+ virtual void update()
+ {
+ const netlist_time times[2] = { NLTIME_FROM_NS(22), NLTIME_FROM_NS(15) };
+
+ // FIXME: this check is needed because update is called during startup as well
+ if (UNEXPECTED(USE_DEACTIVE_DEVICE && m_active == 0))
+ return;
+
+ for (int i = 0; i< _numdev; i++)
+ {
+ this->m_i[i].activate();
+ if (INPLOGIC(this->m_i[i]) == _check)
+ {
+ for (int j = 0; j < i; j++)
+ this->m_i[j].inactivate();
+ for (int j = i + 1; j < _numdev; j++)
+ this->m_i[j].inactivate();
+
+ OUTLOGIC(this->m_Q, _check ^ (1 ^ _invert), times[_check]);// ? 15000 : 22000);
+ return;
+ }
+ }
+ OUTLOGIC(this->m_Q,_check ^ (_invert), times[1-_check]);// ? 22000 : 15000);
+ }
public:
netlist_ttl_input_t m_i[_numdev];
@@ -166,35 +166,35 @@ public:
ATTR_COLD void start()
{
register_output("Q", m_Q);
- register_input("A", m_i[0]);
- register_input("B", m_i[1]);
+ register_input("A", m_i[0]);
+ register_input("B", m_i[1]);
- save(NAME(m_active));
+ save(NAME(m_active));
}
- ATTR_COLD void reset()
- {
- m_Q.initial(1);
- m_active = 1;
- }
+ ATTR_COLD void reset()
+ {
+ m_Q.initial(1);
+ m_active = 1;
+ }
#if (USE_DEACTIVE_DEVICE)
- ATTR_HOT virtual void inc_active()
- {
- if (++m_active == 1)
- {
- update();
- }
- }
-
- ATTR_HOT virtual void dec_active()
- {
- if (--m_active == 0)
- {
- m_i[0].inactivate();
- m_i[1].inactivate();
- }
- }
+ ATTR_HOT virtual void inc_active()
+ {
+ if (++m_active == 1)
+ {
+ update();
+ }
+ }
+
+ ATTR_HOT virtual void dec_active()
+ {
+ if (--m_active == 0)
+ {
+ m_i[0].inactivate();
+ m_i[1].inactivate();
+ }
+ }
#endif
ATTR_HOT ATTR_ALIGN void update()
@@ -202,13 +202,13 @@ public:
const netlist_time times[2] = { NLTIME_FROM_NS(15), NLTIME_FROM_NS(22)};
// FIXME: this check is needed because update is called during startup as well
- if (UNEXPECTED(USE_DEACTIVE_DEVICE && m_active == 0))
- return;
+ if (UNEXPECTED(USE_DEACTIVE_DEVICE && m_active == 0))
+ return;
m_i[0].activate();
m_i[1].activate();
#if 0
- UINT8 res = _invert ^ 1 ^_check;
+ UINT8 res = _invert ^ 1 ^_check;
if (INPLOGIC(m_i[0]) ^ _check)
{
if (INPLOGIC(m_i[1]) ^ _check)
@@ -221,23 +221,23 @@ public:
if (INPLOGIC(m_i[1]) ^ _check)
m_i[1].inactivate();
}
- OUTLOGIC(m_Q, res, times[res & 1]);// ? 22000 : 15000);
+ OUTLOGIC(m_Q, res, times[res & 1]);// ? 22000 : 15000);
#else
const UINT8 val = (INPLOGIC(m_i[0]) ^ _check) | ((INPLOGIC(m_i[1]) ^ _check) << 1);
- UINT8 res = _invert ^ 1 ^_check;
+ UINT8 res = _invert ^ 1 ^_check;
switch (val)
{
- case 1:
- m_i[0].inactivate();
- break;
- case 2:
- m_i[1].inactivate();
- break;
- case 3:
- res = _invert ^ _check;
- break;
+ case 1:
+ m_i[0].inactivate();
+ break;
+ case 2:
+ m_i[1].inactivate();
+ break;
+ case 3:
+ res = _invert ^ _check;
+ break;
}
- OUTLOGIC(m_Q, res, times[res]);// ? 22000 : 15000);
+ OUTLOGIC(m_Q, res, times[res]);// ? 22000 : 15000);
#endif
}