summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/netlist/devices/nld_system.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/netlist/devices/nld_system.h')
-rw-r--r--src/emu/netlist/devices/nld_system.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/emu/netlist/devices/nld_system.h b/src/emu/netlist/devices/nld_system.h
index 644264eea13..40edb1eb310 100644
--- a/src/emu/netlist/devices/nld_system.h
+++ b/src/emu/netlist/devices/nld_system.h
@@ -43,6 +43,14 @@
NET_REGISTER_DEV(frontier, _name) \
NET_C(_IN, _name.I) \
NET_C(_OUT, _name.Q)
+
+#define RES_SWITCH(_name, _IN, _P1, _P2) \
+ NET_REGISTER_DEV(res_sw, _name) \
+ NET_C(_IN, _name.I) \
+ NET_C(_P1, _name.1) \
+ NET_C(_P2, _name.2) \
+
+
// -----------------------------------------------------------------------------
// mainclock
// -----------------------------------------------------------------------------
@@ -186,6 +194,34 @@ private:
};
+// -----------------------------------------------------------------------------
+// nld_res_sw
+// -----------------------------------------------------------------------------
+
+class NETLIB_NAME(res_sw) : public netlist_device_t
+{
+public:
+ ATTR_COLD NETLIB_NAME(res_sw)()
+ : netlist_device_t() { }
+
+ ATTR_COLD virtual ~NETLIB_NAME(res_sw)() {}
+
+ netlist_param_double_t m_RON;
+ netlist_param_double_t m_ROFF;
+ netlist_ttl_input_t m_I;
+ NETLIB_NAME(R) m_R;
+
+protected:
+
+ ATTR_COLD void start();
+ ATTR_COLD void reset();
+ ATTR_HOT ATTR_ALIGN void update();
+ ATTR_HOT ATTR_ALIGN void update_param();
+
+private:
+ netlist_state_t<UINT8> m_last_state;
+};
+
// -----------------------------------------------------------------------------
// netdev_a_to_d