From 67dc264e22edad3f2b67bcc3573587ca3b2eb2a0 Mon Sep 17 00:00:00 2001 From: couriersud Date: Sat, 16 Nov 2019 16:08:48 +0100 Subject: netlist: more code maintenance. (nw) - refactor error messages. - Fix some drivers to cope with outputted added my the mame driver for video and sound. - Fix validation. --- src/devices/machine/netlist.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/devices') diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp index 73194b47459..886510ea24f 100644 --- a/src/devices/machine/netlist.cpp +++ b/src/devices/machine/netlist.cpp @@ -216,6 +216,13 @@ private: // ---------------------------------------------------------------------------------------- // logic_callback +// +// This device must be connected to a logic net. It has no power terminals +// and conversion with proxies will not work. +// +// Background: This is inserted later into the driver and should not modify +// the resulting analog representation of the netlist. +// // ---------------------------------------------------------------------------------------- class NETLIB_NAME(logic_callback) : public netlist::device_t @@ -226,7 +233,7 @@ public: , m_in(*this, "IN") , m_cpu_device(nullptr) , m_last(*this, "m_last", 0) - , m_supply(*this) +// , m_supply(*this) { auto *nl = dynamic_cast(&state()); if (nl != nullptr) @@ -263,7 +270,7 @@ private: std::unique_ptr m_callback; // TODO: change to std::optional for C++17 netlist_mame_cpu_device *m_cpu_device; netlist::state_var m_last; - netlist::devices::NETLIB_NAME(power_pins) m_supply; + //netlist::devices::NETLIB_NAME(power_pins) m_supply; }; @@ -383,6 +390,7 @@ plib::unique_ptr netlist_data_memregions_t::stream(const pstring & /* validation */ if (rom_exists(m_dev.mconfig().root_device(), pstring(m_dev.tag()) + ":" + name)) { + // Create an empty stream. auto ret(plib::make_unique(std::ios_base::binary)); ret->imbue(std::locale::classic()); return MOVE_UNIQUE_PTR(ret); @@ -1089,7 +1097,7 @@ plib::unique_ptr netlist_mame_device::base_validity_ch //netlist_mame_t lnetlist(*this, "netlist", plib::make_unique()); auto lnetlist = plib::make_unique("netlist", plib::make_unique()); // enable validation mode - lnetlist->setup().set_extended_validation(true); + lnetlist->set_extended_validation(true); common_dev_start(lnetlist.get()); for (device_t &d : subdevices()) -- cgit v1.2.3