Previous 199869 Revisions Next

r34467 Sunday 18th January, 2015 at 19:34:29 UTC by Couriersud
Fix nltool "-ld" listdevices. (nw)
[src/tools]nltool.c

trunk/src/tools/nltool.c
r242978r242979
1818#include "netlist/nl_base.h"
1919#include "netlist/nl_setup.h"
2020#include "netlist/nl_parser.h"
21#include "netlist/nl_factory.h"
2122#include "netlist/nl_util.h"
23#include "netlist/devices/net_lib.h"
2224#include "options.h"
2325
2426/***************************************************************************
25    MAME COMPATIBILITY ...
26***************************************************************************/
27 * MAME COMPATIBILITY ...
28 *
29 * These are needed if we link without libutil
30 ***************************************************************************/
2731
2832#if 0
2933void ATTR_PRINTF(1,2) osd_printf_warning(const char *format, ...)
r242978r242979
3539   vprintf(format, argptr);
3640   va_end(argptr);
3741}
38#endif
3942
4043void *malloc_file_line(size_t size, const char *file, int line)
4144{
r242978r242979
7275         src_type.name(), dst_type.name());
7376   throw;
7477}
78#endif
7579
7680struct options_entry oplist[] =
7781{
r242978r242979
8387   { NULL }
8488};
8589
90NETLIST_START(dummy)
91    /* Standard stuff */
92
93    CLOCK(clk, 1000) // 1000 Hz
94    SOLVER(Solver, 48000)
95
96NETLIST_END()
97
8698/***************************************************************************
8799    CORE IMPLEMENTATION
88100***************************************************************************/
r242978r242979
160172      nl_util::pstring_list ll = nl_util::split(m_logs, ":");
161173      for (int i=0; i < ll.count(); i++)
162174      {
163         netlist_device_t *nc = m_setup->factory().new_device_by_classname("nld_log", *m_setup);
164         pstring name = "log_" + ll[i];
165         m_setup->register_dev(nc, name);
175            pstring name = "log_" + ll[i];
176         netlist_device_t *nc = m_setup->register_dev("nld_log", name);
166177         m_setup->register_link(name + ".I", ll[i]);
167178      }
168179   }
r242978r242979
230241   nt.init();
231242   const netlist_factory_t::list_t &list = nt.setup().factory().list();
232243
244    netlist_sources_t sources;
245
246    sources.add(netlist_source_t("dummy", &netlist_dummy));
247    sources.parse(nt.setup(),"dummy");
248
233249   nt.setup().start_devices();
234250   nt.setup().resolve_inputs();
235251


Previous 199869 Revisions Next


© 1997-2024 The MAME Team