示例#1
0
文件: nl_base.cpp 项目: rfka01/mame
core_device_t::core_device_t(core_device_t &owner, const pstring &name)
	: object_t(owner.name() + "." + name)
	, logic_family_t()
	, netlist_ref(owner.state())
	, m_hint_deactivate(false)
	, m_active_outputs(*this, "m_active_outputs", 1)
{
	set_logic_family(owner.logic_family());
	if (logic_family() == nullptr)
		set_logic_family(family_TTL());
	state().add_dev(this->name(), pool_owned_ptr<core_device_t>(this, false));
}
示例#2
0
文件: nl_base.cpp 项目: bmunger/mame
core_device_t::core_device_t(core_device_t &owner, const pstring &name)
	: object_t(owner.name() + "." + name)
	, logic_family_t()
	, netlist_ref(owner.netlist())
	, m_hint_deactivate(false)
#if (NL_PMF_TYPE > NL_PMF_TYPE_VIRTUAL)
	, m_static_update()
#endif
{
	set_logic_family(owner.logic_family());
	if (logic_family() == nullptr)
		set_logic_family(family_TTL());
	owner.netlist().m_devices.push_back(plib::owned_ptr<core_device_t>(this, false));
}
示例#3
0
文件: nl_base.cpp 项目: bmunger/mame
logic_input_t::logic_input_t(core_device_t &dev, const pstring &aname)
		: logic_t(dev, aname, INPUT)
{
	set_state(STATE_INP_ACTIVE);
	set_logic_family(dev.logic_family());
	netlist().setup().register_term(*this);
}
示例#4
0
文件: nl_base.cpp 项目: rfka01/mame
logic_input_t::logic_input_t(core_device_t &dev, const pstring &aname,
		nldelegate delegate)
		: logic_t(dev, aname, STATE_INP_ACTIVE, delegate)
{
	set_logic_family(dev.logic_family());
	state().setup().register_term(*this);
}
示例#5
0
文件: nl_base.cpp 项目: bmunger/mame
logic_output_t::logic_output_t(core_device_t &dev, const pstring &aname)
	: logic_t(dev, aname, OUTPUT)
	, m_my_net(dev.netlist(), name() + ".net", this)
{
	set_state(STATE_OUT);
	this->set_net(&m_my_net);
	set_logic_family(dev.logic_family());
	netlist().setup().register_term(*this);
}
示例#6
0
文件: nl_base.cpp 项目: rfka01/mame
logic_output_t::logic_output_t(core_device_t &dev, const pstring &aname)
	: logic_t(dev, aname, STATE_OUT)
	, m_my_net(dev.state(), name() + ".net", this)
{
	this->set_net(&m_my_net);
	state().register_net(pool_owned_ptr<logic_net_t>(&m_my_net, false));
	set_logic_family(dev.logic_family());
	state().setup().register_term(*this);
}
示例#7
0
文件: nl_base.cpp 项目: rfka01/mame
core_device_t::core_device_t(netlist_state_t &owner, const pstring &name)
	: object_t(name)
	, logic_family_t()
	, netlist_ref(owner)
	, m_hint_deactivate(false)
	, m_active_outputs(*this, "m_active_outputs", 1)
{
	if (logic_family() == nullptr)
		set_logic_family(family_TTL());
}
示例#8
0
文件: nl_base.cpp 项目: bmunger/mame
core_device_t::core_device_t(netlist_t &owner, const pstring &name)
	: object_t(name)
	, logic_family_t()
	, netlist_ref(owner)
	, m_hint_deactivate(false)
#if (NL_PMF_TYPE > NL_PMF_TYPE_VIRTUAL)
	, m_static_update()
#endif
{
	if (logic_family() == nullptr)
		set_logic_family(family_TTL());
}
示例#9
0
文件: nl_base.c 项目: vorlenko/mame
ATTR_COLD void netlist_core_device_t::init(netlist_base_t &anetlist, const pstring &name)
{
	set_logic_family(this->default_logic_family());
	init_object(anetlist, name);

#if USE_PMFDELEGATES
	void (netlist_core_device_t::* pFunc)() = &netlist_core_device_t::update;
#if NO_USE_PMFCONVERSION
	static_update = pFunc;
#else
	static_update = reinterpret_cast<net_update_delegate>((this->*pFunc));
#endif
#endif

}
示例#10
0
文件: nl_base.cpp 项目: NULUSIOS/mame
ATTR_COLD void core_device_t::init(netlist_t &anetlist, const pstring &name)
{
	if (logic_family() == nullptr)
		set_logic_family(this->default_logic_family());
	init_object(anetlist, name);

#if (NL_PMF_TYPE == NL_PMF_TYPE_GNUC_PMF)
	void (core_device_t::* pFunc)() = &core_device_t::update;
	m_static_update = pFunc;
#elif (NL_PMF_TYPE == NL_PMF_TYPE_GNUC_PMF_CONV)
	void (core_device_t::* pFunc)() = &core_device_t::update;
	m_static_update = reinterpret_cast<net_update_delegate>((this->*pFunc));
#elif (NL_PMF_TYPE == NL_PMF_TYPE_INTERNAL)
	m_static_update = pmfp::get_mfp<net_update_delegate>(&core_device_t::update, this);
#endif
}