mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
netlist: added parameter STARTUP_STRATEGY to switch between ...
startup strategies. This determines the order of device triggering. 0: Full - trigger all delegates. Next all devices not touched. 1: Backwards - trigger all devices backwards (only update delegate) 2: Forward - trigger all devices forward (only update delegate)
This commit is contained in:
parent
8f94739f65
commit
8daa6e0a0d
@ -28,6 +28,7 @@ namespace netlist
|
||||
{
|
||||
NETLIB_CONSTRUCTOR(netlistparams)
|
||||
, m_use_deactivate(*this, "USE_DEACTIVATE", false)
|
||||
, m_startup_strategy(*this, "STARTUP_STRATEGY", 1)
|
||||
{
|
||||
}
|
||||
NETLIB_UPDATEI() { }
|
||||
@ -35,6 +36,7 @@ namespace netlist
|
||||
//NETLIB_UPDATE_PARAMI() { }
|
||||
public:
|
||||
param_logic_t m_use_deactivate;
|
||||
param_int_t m_startup_strategy;
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -359,9 +359,9 @@ void netlist_state_t::reset()
|
||||
* variations are explicitly stated in the breakout manual.
|
||||
*/
|
||||
|
||||
const unsigned startup_strategy = 1; //! \note make this a parameter
|
||||
auto *netlist_params = get_single_device<devices::NETLIB_NAME(netlistparams)>("parameter");
|
||||
|
||||
switch (startup_strategy)
|
||||
switch (netlist_params->m_startup_strategy())
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
@ -384,8 +384,10 @@ void netlist_state_t::reset()
|
||||
log().verbose("Devices not yet updated:");
|
||||
for (auto &dev : m_devices)
|
||||
if (!plib::container::contains(d, dev.second.get()))
|
||||
{
|
||||
log().verbose("\t ...{1}", dev.second->name());
|
||||
//x->update_dev();
|
||||
dev.second->update();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1: // brute force backward
|
||||
|
Loading…
Reference in New Issue
Block a user