summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2016-05-25 20:28:58 +0200
committer couriersud <couriersud@arcor.de>2016-05-27 01:19:59 +0200
commitfd62273a87b8fe43492e4a466ea97993b88904f8 (patch)
tree896b1aca134a5396e0dedb31aac26875b3466c60 /src/devices/machine
parent111c5a3dc080a4d454dbcadb6c211ccf2c749da7 (diff)
Moved more code into plib namespace. (nw)
Diffstat (limited to 'src/devices/machine')
-rw-r--r--src/devices/machine/netlist.cpp54
-rw-r--r--src/devices/machine/netlist.h8
2 files changed, 31 insertions, 31 deletions
diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp
index b44264478c2..a3936b9e5d4 100644
--- a/src/devices/machine/netlist.cpp
+++ b/src/devices/machine/netlist.cpp
@@ -100,7 +100,7 @@ void netlist_mame_analog_output_t::custom_netlist_additions(netlist::setup_t &se
pstring dname = "OUT_" + m_in;
m_delegate.bind_relative_to(owner()->machine().root_device());
- powned_ptr<netlist::device_t> dev = powned_ptr<netlist::device_t>::Create<NETLIB_NAME(analog_callback)>(setup.netlist(), setup.build_fqn(dname));
+ plib::powned_ptr<netlist::device_t> dev = plib::powned_ptr<netlist::device_t>::Create<NETLIB_NAME(analog_callback)>(setup.netlist(), setup.build_fqn(dname));
static_cast<NETLIB_NAME(analog_callback) *>(dev.get())->register_callback(m_delegate);
setup.register_dev(std::move(dev));
setup.register_link(dname + ".IN", m_in);
@@ -175,11 +175,11 @@ void netlist_mame_stream_input_t::custom_netlist_additions(netlist::setup_t &set
if (!setup.device_exists("STREAM_INPUT"))
setup.register_dev("NETDEV_SOUND_IN", "STREAM_INPUT");
- pstring sparam = pfmt("STREAM_INPUT.CHAN{1}")(m_channel);
+ pstring sparam = plib::pfmt("STREAM_INPUT.CHAN{1}")(m_channel);
setup.register_param(sparam, m_param_name);
- sparam = pfmt("STREAM_INPUT.MULT{1}")(m_channel);
+ sparam = plib::pfmt("STREAM_INPUT.MULT{1}")(m_channel);
setup.register_param(sparam, m_mult);
- sparam = pfmt("STREAM_INPUT.OFFSET{1}")(m_channel);
+ sparam = plib::pfmt("STREAM_INPUT.OFFSET{1}")(m_channel);
setup.register_param(sparam, m_offset);
}
@@ -210,7 +210,7 @@ void netlist_mame_stream_output_t::device_start()
void netlist_mame_stream_output_t::custom_netlist_additions(netlist::setup_t &setup)
{
//NETLIB_NAME(sound_out) *snd_out;
- pstring sname = pfmt("STREAM_OUT_{1}")(m_channel);
+ pstring sname = plib::pfmt("STREAM_OUT_{1}")(m_channel);
//snd_out = dynamic_cast<NETLIB_NAME(sound_out) *>(setup.register_dev("nld_sound_out", sname));
setup.register_dev("NETDEV_SOUND_OUT", sname);
@@ -226,28 +226,28 @@ void netlist_mame_stream_output_t::custom_netlist_additions(netlist::setup_t &se
// netlist_mame_t
// ----------------------------------------------------------------------------------------
-void netlist_mame_t::vlog(const plog_level &l, const pstring &ls) const
+void netlist_mame_t::vlog(const plib::plog_level &l, const pstring &ls) const
{
pstring errstr = ls;
switch (l)
{
- case plog_level::DEBUG:
+ case plib::plog_level::DEBUG:
m_parent.logerror("netlist DEBUG: %s\n", errstr.cstr());
break;
- case plog_level::INFO:
+ case plib::plog_level::INFO:
m_parent.logerror("netlist INFO: %s\n", errstr.cstr());
break;
- case plog_level::VERBOSE:
+ case plib::plog_level::VERBOSE:
m_parent.logerror("netlist VERBOSE: %s\n", errstr.cstr());
break;
- case plog_level::WARNING:
+ case plib::plog_level::WARNING:
m_parent.logerror("netlist WARNING: %s\n", errstr.cstr());
break;
- case plog_level::ERROR:
+ case plib::plog_level::ERROR:
m_parent.logerror("netlist ERROR: %s\n", errstr.cstr());
break;
- case plog_level::FATAL:
+ case plib::plog_level::FATAL:
emu_fatalerror error("netlist ERROR: %s\n", errstr.cstr());
throw error;
}
@@ -404,42 +404,42 @@ ATTR_COLD void netlist_mame_device_t::save_state()
netlist().log().debug("saving state for {1}\n", s->m_name.cstr());
switch (s->m_dt)
{
- case DT_DOUBLE:
+ case pstate_data_type_e::DT_DOUBLE:
{
double *td = s->resolved<double>();
if (td != nullptr) save_pointer(td, s->m_name.cstr(), s->m_count);
}
break;
- case DT_FLOAT:
+ case pstate_data_type_e::DT_FLOAT:
{
float *td = s->resolved<float>();
if (td != nullptr) save_pointer(td, s->m_name.cstr(), s->m_count);
}
break;
#if (PHAS_INT128)
- case DT_INT128:
+ case pstate_data_type_e::DT_INT128:
// FIXME: we are cheating here
save_pointer((char *) s->m_ptr, s->m_name.cstr(), s->m_count * sizeof(INT128));
break;
#endif
- case DT_INT64:
+ case pstate_data_type_e::DT_INT64:
save_pointer((INT64 *) s->m_ptr, s->m_name.cstr(), s->m_count);
break;
- case DT_INT16:
+ case pstate_data_type_e::DT_INT16:
save_pointer((INT16 *) s->m_ptr, s->m_name.cstr(), s->m_count);
break;
- case DT_INT8:
+ case pstate_data_type_e::DT_INT8:
save_pointer((INT8 *) s->m_ptr, s->m_name.cstr(), s->m_count);
break;
- case DT_INT:
+ case pstate_data_type_e::DT_INT:
save_pointer((int *) s->m_ptr, s->m_name.cstr(), s->m_count);
break;
- case DT_BOOLEAN:
+ case pstate_data_type_e::DT_BOOLEAN:
save_pointer((bool *) s->m_ptr, s->m_name.cstr(), s->m_count);
break;
- case DT_CUSTOM:
+ case pstate_data_type_e::DT_CUSTOM:
break;
- case NOT_SUPPORTED:
+ case pstate_data_type_e::NOT_SUPPORTED:
default:
netlist().log().fatal("found unsupported save element %s\n", s->m_name);
break;
@@ -566,7 +566,7 @@ void netlist_mame_sound_device_t::device_start()
// Configure outputs
- pvector_t<nld_sound_out *> outdevs = netlist().get_device_list<nld_sound_out>();
+ plib::pvector_t<nld_sound_out *> outdevs = netlist().get_device_list<nld_sound_out>();
if (outdevs.size() == 0)
fatalerror("No output devices");
@@ -592,7 +592,7 @@ void netlist_mame_sound_device_t::device_start()
m_num_inputs = 0;
m_in = nullptr;
- pvector_t<nld_sound_in *> indevs = netlist().get_device_list<nld_sound_in>();
+ plib::pvector_t<nld_sound_in *> indevs = netlist().get_device_list<nld_sound_in>();
if (indevs.size() > 1)
fatalerror("A maximum of one input device is allowed!");
if (indevs.size() == 1)
@@ -650,9 +650,9 @@ bool netlist_source_memregion_t::parse(netlist::setup_t &setup, const pstring &n
{
// FIXME: preprocessor should be a stream!
memory_region *mem = downcast<netlist_mame_t &>(setup.netlist()).machine().root_device().memregion(m_name.cstr());
- pimemstream istrm(mem->base(),mem->bytes() );
- pomemstream ostrm;
+ plib::pimemstream istrm(mem->base(),mem->bytes() );
+ plib::pomemstream ostrm;
- pimemstream istrm2(ppreprocessor().process(istrm, ostrm));
+ plib::pimemstream istrm2(plib::ppreprocessor().process(istrm, ostrm));
return netlist::parser_t(istrm2, setup).parse(name);
}
diff --git a/src/devices/machine/netlist.h b/src/devices/machine/netlist.h
index d3d850454bf..5340c792573 100644
--- a/src/devices/machine/netlist.h
+++ b/src/devices/machine/netlist.h
@@ -97,7 +97,7 @@ public:
protected:
- void vlog(const plog_level &l, const pstring &ls) const override;
+ void vlog(const plib::plog_level &l, const pstring &ls) const override;
private:
netlist_mame_device_t &m_parent;
@@ -636,9 +636,9 @@ public:
for (int i = 0; i < MAX_INPUT_CHANNELS; i++)
{
- m_param_name[i] = std::make_unique<netlist::param_str_t>(*this, pfmt("CHAN{1}")(i), "");
- m_param_mult[i] = std::make_unique<netlist::param_double_t>(*this, pfmt("MULT{1}")(i), 1.0);
- m_param_offset[i] = std::make_unique<netlist::param_double_t>(*this, pfmt("OFFSET{1}")(i), 0.0);
+ m_param_name[i] = std::make_unique<netlist::param_str_t>(*this, plib::pfmt("CHAN{1}")(i), "");
+ m_param_mult[i] = std::make_unique<netlist::param_double_t>(*this, plib::pfmt("MULT{1}")(i), 1.0);
+ m_param_offset[i] = std::make_unique<netlist::param_double_t>(*this, plib::pfmt("OFFSET{1}")(i), 0.0);
}
m_num_channel = 0;
}