summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/netlist.cpp
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2020-01-29 19:00:10 +0100
committer couriersud <couriersud@gmx.org>2020-01-29 19:00:10 +0100
commitfceee50c8bd6d930fc1f152ede4185ce7dc44c40 (patch)
tree71a0f8d6d43ddbe1fc98a078d3baddecd6e5d953 /src/devices/machine/netlist.cpp
parentd7fd89afe1a384e268cb8a9fbd0f6c4c994e195d (diff)
netlist: Parameters evaluated when netlist is created. [Couriersud]
Parameters are now passed to the netlist core as strings. During netlist creation they are evaluated as functions. This opens the path to parameters on subdevice level. Examples: PARAM(device.XY, (1+2*0.005)) RES(R1, 2.05*RES_K(1)+1) In addition the commit contains dead code removal.
Diffstat (limited to 'src/devices/machine/netlist.cpp')
-rw-r--r--src/devices/machine/netlist.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp
index 01aa2170dff..799dbe7d640 100644
--- a/src/devices/machine/netlist.cpp
+++ b/src/devices/machine/netlist.cpp
@@ -991,9 +991,9 @@ void netlist_mame_stream_input_device::custom_netlist_additions(netlist::netlist
pstring sparam = plib::pfmt("STREAM_INPUT.CHAN{1}")(m_channel);
nlstate.setup().register_param(sparam, pstring(m_param_name));
sparam = plib::pfmt("STREAM_INPUT.MULT{1}")(m_channel);
- nlstate.setup().register_param(sparam, m_mult);
+ nlstate.setup().register_param_val(sparam, m_mult);
sparam = plib::pfmt("STREAM_INPUT.OFFSET{1}")(m_channel);
- nlstate.setup().register_param(sparam, m_offset);
+ nlstate.setup().register_param_val(sparam, m_offset);
}
// ----------------------------------------------------------------------------------------
@@ -1027,9 +1027,9 @@ void netlist_mame_stream_output_device::custom_netlist_additions(netlist::netlis
//snd_out = dynamic_cast<NETLIB_NAME(sound_out) *>(setup.register_dev("nld_sound_out", sname));
nlstate.setup().register_dev("NETDEV_SOUND_OUT", sname);
- nlstate.setup().register_param(sname + ".CHAN" , m_channel);
- nlstate.setup().register_param(sname + ".MULT", m_mult);
- nlstate.setup().register_param(sname + ".OFFSET", m_offset);
+ nlstate.setup().register_param_val(sname + ".CHAN" , m_channel);
+ nlstate.setup().register_param_val(sname + ".MULT", m_mult);
+ nlstate.setup().register_param_val(sname + ".OFFSET", m_offset);
nlstate.setup().register_link(sname + ".IN", pstring(m_out_name));
}