mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
netlist: bug fixing.
- fix sound route dependency - add "K" as a valid Kilo multiplier. - Fix current source parameter update.
This commit is contained in:
parent
858d84c4bc
commit
d1602bd9f1
@ -467,6 +467,8 @@ private:
|
||||
|
||||
netlist::setup_t &netlist_mame_device::setup()
|
||||
{
|
||||
if (!m_netlist)
|
||||
throw device_missing_dependencies();
|
||||
return m_netlist->nlstate().setup();
|
||||
}
|
||||
|
||||
@ -548,6 +550,14 @@ void netlist_mame_sub_interface::set_mult_offset(const double mult, const double
|
||||
m_offset = offset;
|
||||
}
|
||||
|
||||
netlist_mame_analog_input_device::netlist_mame_analog_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *param_name)
|
||||
: device_t(mconfig, NETLIST_ANALOG_INPUT, tag, owner, 0)
|
||||
, netlist_mame_sub_interface(*owner)
|
||||
, m_param(nullptr)
|
||||
, m_auto_port(true)
|
||||
, m_param_name(param_name)
|
||||
{
|
||||
}
|
||||
|
||||
netlist_mame_analog_input_device::netlist_mame_analog_input_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, NETLIST_ANALOG_INPUT, tag, owner, clock)
|
||||
|
@ -300,6 +300,8 @@ class netlist_mame_analog_input_device : public device_t, public netlist_mame_su
|
||||
public:
|
||||
|
||||
// construction/destruction
|
||||
netlist_mame_analog_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *param_name);
|
||||
|
||||
netlist_mame_analog_input_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
|
||||
|
||||
void set_name(const char *param_name) { m_param_name = param_name; }
|
||||
|
@ -56,22 +56,6 @@ NETLIB_RESET(R_base)
|
||||
set_R(1.0 / exec().gmin());
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// nld_R
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
NETLIB_UPDATE_PARAM(R)
|
||||
{
|
||||
solve_now();
|
||||
set_R(std::max(m_R(), exec().gmin()));
|
||||
}
|
||||
|
||||
NETLIB_RESET(R)
|
||||
{
|
||||
NETLIB_NAME(twoterm)::reset();
|
||||
set_R(std::max(m_R(), exec().gmin()));
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// nld_POT
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
@ -149,9 +149,18 @@ namespace analog
|
||||
|
||||
protected:
|
||||
|
||||
NETLIB_RESETI();
|
||||
//NETLIB_UPDATEI() { }
|
||||
NETLIB_UPDATE_PARAMI();
|
||||
NETLIB_RESETI()
|
||||
{
|
||||
NETLIB_NAME(twoterm)::reset();
|
||||
set_R(std::max(m_R(), exec().gmin()));
|
||||
}
|
||||
|
||||
NETLIB_UPDATE_PARAMI()
|
||||
{
|
||||
solve_now();
|
||||
set_R(std::max(m_R(), exec().gmin()));
|
||||
}
|
||||
|
||||
private:
|
||||
param_double_t m_R;
|
||||
@ -465,6 +474,14 @@ namespace analog
|
||||
0.0, 0.0, m_I());
|
||||
}
|
||||
|
||||
NETLIB_UPDATE_PARAMI()
|
||||
{
|
||||
solve_now();
|
||||
set_mat(0.0, 0.0, -m_I(),
|
||||
0.0, 0.0, m_I());
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
state_var<double> m_t;
|
||||
param_double_t m_I;
|
||||
|
@ -912,6 +912,7 @@ nl_double models_t::value(pstring model, pstring entity)
|
||||
{
|
||||
case 'M': factor = 1e6; break;
|
||||
case 'k': factor = 1e3; break;
|
||||
case 'K': factor = 1e3; break;
|
||||
case 'm': factor = 1e-3; break;
|
||||
case 'u': factor = 1e-6; break;
|
||||
case 'n': factor = 1e-9; break;
|
||||
|
Loading…
Reference in New Issue
Block a user