summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/nl_base.cpp
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2020-07-28 20:40:56 +0200
committer couriersud <couriersud@gmx.org>2020-07-28 20:40:59 +0200
commitffb37e9ae8d93808c51e11484a060a7a99ac57f3 (patch)
tree3974df3168e0a85b4b8d3acddf99adb65eab50a3 /src/lib/netlist/nl_base.cpp
parentcbba06308f56adfd9441a70f8f5b17d183ef4c55 (diff)
netlist: further nl_base.h splitting into headers in core subdir.
Diffstat (limited to 'src/lib/netlist/nl_base.cpp')
-rw-r--r--src/lib/netlist/nl_base.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/netlist/nl_base.cpp b/src/lib/netlist/nl_base.cpp
index 22baf636461..3b07912a8d4 100644
--- a/src/lib/netlist/nl_base.cpp
+++ b/src/lib/netlist/nl_base.cpp
@@ -759,6 +759,16 @@ namespace netlist
net().initial(val);
}
+ // -----------------------------------------------------------------------------
+ // tristate_output_t
+ // -----------------------------------------------------------------------------
+ tristate_output_t::tristate_output_t(device_t &dev, const pstring &aname, bool force_logic)
+ : logic_output_t(dev, aname)
+ , m_last_logic(dev, name() + "." + "m_last_logic", 1) // force change
+ , m_tristate(dev, name() + "." + "m_tristate", force_logic ? 0 : 2) // force change
+ , m_force_logic(force_logic)
+ {}
+
// ----------------------------------------------------------------------------------------
// analog_input_t
// ----------------------------------------------------------------------------------------
@@ -939,6 +949,17 @@ namespace netlist
nlparse_t &netlist_state_t::parser() { return m_setup->parser(); }
const nlparse_t &netlist_state_t::parser() const { return m_setup->parser(); }
+ void netlist_state_t::remove_device(core_device_t *dev)
+ {
+ for (auto it = m_devices.begin(); it != m_devices.end(); it++)
+ if (it->second.get() == dev)
+ {
+ m_state.remove_save_items(dev);
+ m_devices.erase(it);
+ return;
+ }
+ }
+
template struct state_var<std::uint8_t>;
template struct state_var<std::uint16_t>;
template struct state_var<std::uint32_t>;