summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2015-05-27 23:15:23 +0200
committer couriersud <couriersud@arcor.de>2015-05-27 23:18:45 +0200
commit1d99211b55ffe6f8c9bf916f6e875287cba90dcd (patch)
tree20d0857e685ebc56716f7e1d33a6fab1d5fcaf40
parentcef370aa13953c3bcfa185c818c76812c34f13fc (diff)
Introduced user definable truth tables:
NETLIST_START(lib) TRUTHTABLE_START(TTL_7400A_NAND, 2, 1, 0, "+A,B") TT_HEAD(" A , B | Q ") TT_LINE(" 0 , X | 1 |22") TT_LINE(" X , 0 | 1 |22") TT_LINE(" 1 , 1 | 0 |15") TRUTHTABLE_END() NETLIST_END() This enables the addition of devices without changing the netlist source code and allows the creation of libraries. Used pong.c as a proof of concept for the time being. [Couriersud]
-rw-r--r--nl_examples/todo.c29
-rw-r--r--src/emu/netlist/devices/net_lib.c2
-rw-r--r--src/emu/netlist/devices/net_lib.h2
-rw-r--r--src/emu/netlist/devices/nld_truthtable.c32
-rw-r--r--src/emu/netlist/devices/nld_truthtable.h37
-rw-r--r--src/emu/netlist/nl_factory.c22
-rw-r--r--src/emu/netlist/nl_factory.h34
-rw-r--r--src/emu/netlist/nl_parser.c2
-rw-r--r--src/emu/netlist/nl_setup.c2
-rw-r--r--src/emu/netlist/nl_setup.h12
-rw-r--r--src/emu/netlist/plib/pparser.c11
-rw-r--r--src/mame/drivers/nl_pong.c90
-rw-r--r--src/tools/nltool.c4
13 files changed, 168 insertions, 111 deletions
diff --git a/nl_examples/todo.c b/nl_examples/todo.c
index 9d7765ea925..1c9815864ed 100644
--- a/nl_examples/todo.c
+++ b/nl_examples/todo.c
@@ -5,23 +5,6 @@
#include "netlist/devices/net_lib.h"
-struct ttd
-{
- nl_util::pstring_list a;
-};
-
-ttd * nl_register_tt(pstring name, int in, int out);
-
-
-#define NETLIST_TT(_name, _in, _out) \
- { \
- ttd *a = setup.register_tt(# _name, _in, _out); \
-
-#define TT_LINE(_x) \
- a->a.add(_x);
-
-#define TT_END() }
-
NETLIST_START(7400_TTL)
NET_REGISTER_DEV(7400, s1)
NET_REGISTER_DEV(7400, s2)
@@ -47,12 +30,12 @@ NETLIST_START(7400_TTL)
NETLIST_END()
NETLIST_START(lib)
- NETLIST_TT(7400, 2, 1)
- TT_LINE("A,B | Q ")
- TT_LINE("0,X|1|22")
- TT_LINE("X,0|1|22")
- TT_LINE("1,1|0|15")
- TT_END()
+ TRUTHTABLE_START(7400A, 2, 1, 0, "+A,B")
+ TT_HEAD(" A , B | Q ")
+ TT_LINE(" 0 , X | 1 |22")
+ TT_LINE(" X , 0 | 1 |22")
+ TT_LINE(" 1 , 1 | 0 |15")
+ TRUTHTABLE_END()
NETLIST_END()
diff --git a/src/emu/netlist/devices/net_lib.c b/src/emu/netlist/devices/net_lib.c
index f17b638c6e1..f239beb1069 100644
--- a/src/emu/netlist/devices/net_lib.c
+++ b/src/emu/netlist/devices/net_lib.c
@@ -41,7 +41,7 @@ NETLIST_END()
#define ENTRY1(_nic, _name, _defparam) factory.register_device<_nic>( # _name, xstr(_nic), _defparam );
#define ENTRY(_nic, _name, _defparam) ENTRY1(NETLIB_NAME(_nic), _name, _defparam)
-void nl_initialize_factory(netlist_factory_t &factory)
+void nl_initialize_factory(netlist_factory_list_t &factory)
{
ENTRY(R, RES, "R")
ENTRY(POT, POT, "R")
diff --git a/src/emu/netlist/devices/net_lib.h b/src/emu/netlist/devices/net_lib.h
index c6ab75fe522..1ae4336f62e 100644
--- a/src/emu/netlist/devices/net_lib.h
+++ b/src/emu/netlist/devices/net_lib.h
@@ -67,6 +67,6 @@
NETLIST_EXTERNAL(diode_models);
NETLIST_EXTERNAL(bjt_models);
-void nl_initialize_factory(netlist_factory_t &factory);
+void nl_initialize_factory(netlist_factory_list_t &factory);
#endif
diff --git a/src/emu/netlist/devices/nld_truthtable.c b/src/emu/netlist/devices/nld_truthtable.c
index 4d32c079ac3..03acc31d4f4 100644
--- a/src/emu/netlist/devices/nld_truthtable.c
+++ b/src/emu/netlist/devices/nld_truthtable.c
@@ -235,3 +235,35 @@ ATTR_COLD void truthtable_desc_t::setup(const pstring_list_t &truthtable, UINT32
*m_initialized = true;
}
+
+#define ENTRYX(_n,_m,_h) case (_n * 1000 + _m * 10 + _h): \
+ { typedef netlist_factory_truthtable_t<_n,_m,_h> xtype; \
+ return palloc(xtype,name,classname,def_param); } break
+
+#define ENTRYY(_n,_m) ENTRYX(_n,_m,0); ENTRYX(_n,_m,1)
+
+#define ENTRY(_n) ENTRYY(_n, 1); ENTRYY(_n, 2); ENTRYY(_n, 3); ENTRYY(_n, 4); ENTRYY(_n, 5); ENTRYY(_n, 6)
+
+netlist_base_factory_truthtable_t *nl_tt_factory_create(const unsigned ni, const unsigned no,
+ const unsigned has_state,
+ const pstring &name, const pstring &classname,
+ const pstring &def_param)
+{
+ switch (ni * 1000 + no * 10 + has_state)
+ {
+ ENTRY(1);
+ ENTRY(2);
+ ENTRY(3);
+ ENTRY(4);
+ ENTRY(5);
+ ENTRY(6);
+ ENTRY(7);
+ ENTRY(8);
+ ENTRY(9);
+ ENTRY(10);
+ default:
+ pstring msg = pstring::sprintf("unable to create truthtable<%d,%d,%d>", ni, no, has_state);
+ nl_assert_always(false, msg.cstr());
+ }
+ return NULL;
+}
diff --git a/src/emu/netlist/devices/nld_truthtable.h b/src/emu/netlist/devices/nld_truthtable.h
index cf52be69164..3f447d28f2e 100644
--- a/src/emu/netlist/devices/nld_truthtable.h
+++ b/src/emu/netlist/devices/nld_truthtable.h
@@ -258,28 +258,28 @@ private:
pstring_list_t m_desc;
};
-class net_device_t_base_factory_tt : public net_device_t_base_factory
+class netlist_base_factory_truthtable_t : public netlist_base_factory_t
{
- NETLIST_PREVENT_COPYING(net_device_t_base_factory_tt)
+ NETLIST_PREVENT_COPYING(netlist_base_factory_truthtable_t)
public:
- ATTR_COLD net_device_t_base_factory_tt(const pstring &name, const pstring &classname,
+ ATTR_COLD netlist_base_factory_truthtable_t(const pstring &name, const pstring &classname,
const pstring &def_param)
- : net_device_t_base_factory(name, classname, def_param)
+ : netlist_base_factory_t(name, classname, def_param)
{}
pstring_list_t m_desc;
};
template<unsigned m_NI, unsigned m_NO, int has_state>
-class net_device_t_factory_tt : public net_device_t_base_factory_tt
+class netlist_factory_truthtable_t : public netlist_base_factory_truthtable_t
{
- NETLIST_PREVENT_COPYING(net_device_t_factory_tt)
+ NETLIST_PREVENT_COPYING(netlist_factory_truthtable_t)
public:
- ATTR_COLD net_device_t_factory_tt(const pstring &name, const pstring &classname,
+ ATTR_COLD netlist_factory_truthtable_t(const pstring &name, const pstring &classname,
const pstring &def_param)
- : net_device_t_base_factory(name, classname, def_param) { }
+ : netlist_base_factory_truthtable_t(name, classname, def_param) { }
- ATTR_COLD netlist_device_t *Create() const
+ ATTR_COLD netlist_device_t *Create()
{
typedef nld_truthtable_t<m_NI, m_NO, has_state> tt_type;
netlist_device_t *r = palloc(tt_type, &m_ttbl, m_desc);
@@ -290,6 +290,25 @@ private:
typename nld_truthtable_t<m_NI, m_NO, has_state>::truthtable_t m_ttbl;
};
+netlist_base_factory_truthtable_t *nl_tt_factory_create(const unsigned ni, const unsigned no,
+ const unsigned has_state,
+ const pstring &name, const pstring &classname,
+ const pstring &def_param);
+
+#define TRUTHTABLE_START(_name, _in, _out, _has_state, _def_params) \
+ { \
+ netlist_base_factory_truthtable_t *ttd = nl_tt_factory_create(_in, _out, _has_state, \
+ # _name, # _name, "+" _def_params);
+
+#define TT_HEAD(_x) \
+ ttd->m_desc.add(_x);
+
+#define TT_LINE(_x) \
+ ttd->m_desc.add(_x);
+
+#define TRUTHTABLE_END() \
+ setup.factory().register_device(ttd); \
+ }
#endif /* NLD_TRUTHTABLE_H_ */
diff --git a/src/emu/netlist/nl_factory.c b/src/emu/netlist/nl_factory.c
index 624b09bf023..15ccbc62b5e 100644
--- a/src/emu/netlist/nl_factory.c
+++ b/src/emu/netlist/nl_factory.c
@@ -15,7 +15,7 @@
// net_device_t_base_factory
// ----------------------------------------------------------------------------------------
-ATTR_COLD const pstring_list_t net_device_t_base_factory::term_param_list()
+ATTR_COLD const pstring_list_t netlist_base_factory_t::term_param_list()
{
if (m_def_param.startsWith("+"))
return pstring_list_t(m_def_param.substr(1), ",");
@@ -23,7 +23,7 @@ ATTR_COLD const pstring_list_t net_device_t_base_factory::term_param_list()
return pstring_list_t();
}
-ATTR_COLD const pstring_list_t net_device_t_base_factory::def_params()
+ATTR_COLD const pstring_list_t netlist_base_factory_t::def_params()
{
if (m_def_param.startsWith("+") || m_def_param.equals("-"))
return pstring_list_t();
@@ -32,25 +32,25 @@ ATTR_COLD const pstring_list_t net_device_t_base_factory::def_params()
}
-netlist_factory_t::netlist_factory_t()
+netlist_factory_list_t::netlist_factory_list_t()
{
}
-netlist_factory_t::~netlist_factory_t()
+netlist_factory_list_t::~netlist_factory_list_t()
{
for (std::size_t i=0; i < m_list.size(); i++)
{
- net_device_t_base_factory *p = m_list[i];
+ netlist_base_factory_t *p = m_list[i];
pfree(p);
}
m_list.clear();
}
-netlist_device_t *netlist_factory_t::new_device_by_classname(const pstring &classname) const
+netlist_device_t *netlist_factory_list_t::new_device_by_classname(const pstring &classname) const
{
for (std::size_t i=0; i < m_list.size(); i++)
{
- net_device_t_base_factory *p = m_list[i];
+ netlist_base_factory_t *p = m_list[i];
if (p->classname() == classname)
{
netlist_device_t *ret = p->Create();
@@ -61,17 +61,17 @@ netlist_device_t *netlist_factory_t::new_device_by_classname(const pstring &clas
return NULL; // appease code analysis
}
-netlist_device_t *netlist_factory_t::new_device_by_name(const pstring &name, netlist_setup_t &setup) const
+netlist_device_t *netlist_factory_list_t::new_device_by_name(const pstring &name, netlist_setup_t &setup) const
{
- net_device_t_base_factory *f = factory_by_name(name, setup);
+ netlist_base_factory_t *f = factory_by_name(name, setup);
return f->Create();
}
-net_device_t_base_factory * netlist_factory_t::factory_by_name(const pstring &name, netlist_setup_t &setup) const
+netlist_base_factory_t * netlist_factory_list_t::factory_by_name(const pstring &name, netlist_setup_t &setup) const
{
for (std::size_t i=0; i < m_list.size(); i++)
{
- net_device_t_base_factory *p = m_list[i];
+ netlist_base_factory_t *p = m_list[i];
if (p->name() == name)
{
return p;
diff --git a/src/emu/netlist/nl_factory.h b/src/emu/netlist/nl_factory.h
index 224e90e7a31..ff4c56ceff1 100644
--- a/src/emu/netlist/nl_factory.h
+++ b/src/emu/netlist/nl_factory.h
@@ -18,18 +18,18 @@
// net_dev class factory
// -----------------------------------------------------------------------------
-class net_device_t_base_factory
+class netlist_base_factory_t
{
- NETLIST_PREVENT_COPYING(net_device_t_base_factory)
+ NETLIST_PREVENT_COPYING(netlist_base_factory_t)
public:
- ATTR_COLD net_device_t_base_factory(const pstring &name, const pstring &classname,
+ ATTR_COLD netlist_base_factory_t(const pstring &name, const pstring &classname,
const pstring &def_param)
: m_name(name), m_classname(classname), m_def_param(def_param)
{}
- /* ATTR_COLD */ virtual ~net_device_t_base_factory() {}
+ /* ATTR_COLD */ virtual ~netlist_base_factory_t() {}
- /* ATTR_COLD */ virtual netlist_device_t *Create() const = 0;
+ /* ATTR_COLD */ virtual netlist_device_t *Create() = 0;
ATTR_COLD const pstring &name() const { return m_name; }
ATTR_COLD const pstring &classname() const { return m_classname; }
@@ -44,15 +44,15 @@ protected:
};
template <class C>
-class net_device_t_factory : public net_device_t_base_factory
+class net_list_factory_t : public netlist_base_factory_t
{
- NETLIST_PREVENT_COPYING(net_device_t_factory)
+ NETLIST_PREVENT_COPYING(net_list_factory_t)
public:
- ATTR_COLD net_device_t_factory(const pstring &name, const pstring &classname,
+ ATTR_COLD net_list_factory_t(const pstring &name, const pstring &classname,
const pstring &def_param)
- : net_device_t_base_factory(name, classname, def_param) { }
+ : netlist_base_factory_t(name, classname, def_param) { }
- ATTR_COLD netlist_device_t *Create() const
+ ATTR_COLD netlist_device_t *Create()
{
netlist_device_t *r = palloc(C);
//r->init(setup, name);
@@ -60,29 +60,29 @@ public:
}
};
-class netlist_factory_t
+class netlist_factory_list_t
{
public:
- typedef plist_t<net_device_t_base_factory *> list_t;
+ typedef plist_t<netlist_base_factory_t *> list_t;
- netlist_factory_t();
- ~netlist_factory_t();
+ netlist_factory_list_t();
+ ~netlist_factory_list_t();
template<class _C>
ATTR_COLD void register_device(const pstring &name, const pstring &classname,
const pstring &def_param)
{
- m_list.add(palloc(net_device_t_factory< _C >, name, classname, def_param));
+ m_list.add(palloc(net_list_factory_t< _C >, name, classname, def_param));
}
- ATTR_COLD void register_device(net_device_t_base_factory *factory)
+ ATTR_COLD void register_device(netlist_base_factory_t *factory)
{
m_list.add(factory);
}
ATTR_COLD netlist_device_t *new_device_by_classname(const pstring &classname) const;
ATTR_COLD netlist_device_t *new_device_by_name(const pstring &name, netlist_setup_t &setup) const;
- ATTR_COLD net_device_t_base_factory * factory_by_name(const pstring &name, netlist_setup_t &setup) const;
+ ATTR_COLD netlist_base_factory_t * factory_by_name(const pstring &name, netlist_setup_t &setup) const;
const list_t &list() { return m_list; }
diff --git a/src/emu/netlist/nl_parser.c b/src/emu/netlist/nl_parser.c
index cb2534222b4..0150d62f5c0 100644
--- a/src/emu/netlist/nl_parser.c
+++ b/src/emu/netlist/nl_parser.c
@@ -223,7 +223,7 @@ void netlist_parser::netdev_param()
void netlist_parser::device(const pstring &dev_type)
{
pstring devname;
- net_device_t_base_factory *f = m_setup.factory().factory_by_name(dev_type, m_setup);
+ netlist_base_factory_t *f = m_setup.factory().factory_by_name(dev_type, m_setup);
netlist_device_t *dev;
pstring_list_t termlist = f->term_param_list();
pstring_list_t def_params = f->def_params();
diff --git a/src/emu/netlist/nl_setup.c b/src/emu/netlist/nl_setup.c
index b286f800945..a2a37bc0e89 100644
--- a/src/emu/netlist/nl_setup.c
+++ b/src/emu/netlist/nl_setup.c
@@ -39,7 +39,7 @@ netlist_setup_t::netlist_setup_t(netlist_base_t &netlist)
, m_proxy_cnt(0)
{
netlist.set_setup(this);
- m_factory = palloc(netlist_factory_t);
+ m_factory = palloc(netlist_factory_list_t);
}
void netlist_setup_t::init()
diff --git a/src/emu/netlist/nl_setup.h b/src/emu/netlist/nl_setup.h
index 311ca0bfa63..9219ee6581c 100644
--- a/src/emu/netlist/nl_setup.h
+++ b/src/emu/netlist/nl_setup.h
@@ -25,6 +25,10 @@
#define NET_REGISTER_DEV(_type, _name) \
setup.register_dev(NETLIB_NAME_STR(_type), # _name);
+/* to be used to reference new library truthtable devices */
+#define NET_REGISTER_DEV_X(_type, _name) \
+ setup.register_dev(# _type, # _name);
+
#define NET_REMOVE_DEV(_name) \
setup.remove_dev(# _name);
@@ -66,7 +70,7 @@ ATTR_COLD void NETLIST_NAME(_name)(netlist_setup_t &setup)
// ----------------------------------------------------------------------------------------
// Forward definition so we keep nl_factory.h out of the public
-class netlist_factory_t;
+class netlist_factory_list_t;
class netlist_setup_t
{
@@ -143,8 +147,8 @@ public:
void namespace_push(const pstring &aname);
void namespace_pop();
- netlist_factory_t &factory() { return *m_factory; }
- const netlist_factory_t &factory() const { return *m_factory; }
+ netlist_factory_list_t &factory() { return *m_factory; }
+ const netlist_factory_list_t &factory() const { return *m_factory; }
/* not ideal, but needed for save_state */
tagmap_terminal_t m_terminals;
@@ -162,7 +166,7 @@ private:
tagmap_link_t m_links;
tagmap_nstring_t m_params_temp;
- netlist_factory_t *m_factory;
+ netlist_factory_list_t *m_factory;
plist_t<pstring> m_models;
diff --git a/src/emu/netlist/plib/pparser.c b/src/emu/netlist/plib/pparser.c
index 6a8c184c0cb..7921cc3c3f2 100644
--- a/src/emu/netlist/plib/pparser.c
+++ b/src/emu/netlist/plib/pparser.c
@@ -376,7 +376,7 @@ pstring ppreprocessor::process(const pstring &contents)
}
else if (lti[0].equals("#pragma"))
{
- if (lti.size() > 3 && lti[1].equals("NETLIST"))
+ if (ifflag == 0 && lti.size() > 3 && lti[1].equals("NETLIST"))
{
if (lti[2].equals("warning"))
error("NETLIST: " + catremainder(lti, 3, " "));
@@ -384,9 +384,12 @@ pstring ppreprocessor::process(const pstring &contents)
}
else if (lti[0].equals("#define"))
{
- if (lti.size() != 3)
- error(pstring::sprintf("PREPRO: only simple defines allowed: %s", line.cstr()));
- m_defines.add(define_t(lti[1], lti[2]));
+ if (ifflag == 0)
+ {
+ if (lti.size() != 3)
+ error(pstring::sprintf("PREPRO: only simple defines allowed: %s", line.cstr()));
+ m_defines.add(define_t(lti[1], lti[2]));
+ }
}
else
error(pstring::sprintf("unknown directive on line %" SIZETFMT ": %s\n", i, line.cstr()));
diff --git a/src/mame/drivers/nl_pong.c b/src/mame/drivers/nl_pong.c
index 187a7eb41d8..f16f80adfb3 100644
--- a/src/mame/drivers/nl_pong.c
+++ b/src/mame/drivers/nl_pong.c
@@ -11,7 +11,23 @@
#define FAST_CLOCK (1)
+#define TTL_7400A_NAND(_name, _A, _B) \
+ NET_REGISTER_DEV_X(TTL_7400A_NAND, _name) \
+ NET_CONNECT(_name, A, _A) \
+ NET_CONNECT(_name, B, _B)
+
+NETLIST_START(lib)
+ TRUTHTABLE_START(TTL_7400A_NAND, 2, 1, 0, "+A,B")
+ TT_HEAD(" A , B | Q ")
+ TT_LINE(" 0 , X | 1 |22")
+ TT_LINE(" X , 0 | 1 |22")
+ TT_LINE(" 1 , 1 | 0 |15")
+ TRUTHTABLE_END()
+NETLIST_END()
+
NETLIST_START(pong_fast)
+
+ INCLUDE(lib)
SOLVER(Solver, 48000)
PARAM(Solver.PARALLEL, 0) // Don't do parallel solvers
PARAM(Solver.ACCURACY, 1e-4) // works and is sufficient
@@ -120,7 +136,7 @@ NETLIST_START(pong_fast)
/* hit logic */
TTL_7404_INVERT(hitQ, hit)
- TTL_7400_NAND(hit, hit1Q, hit2Q)
+ TTL_7400A_NAND(hit, hit1Q, hit2Q)
TTL_7402_NOR(attractQ, StopG, runQ)
TTL_7404_INVERT(attract, attractQ)
@@ -128,22 +144,22 @@ NETLIST_START(pong_fast)
TTL_7420_NAND(ic_h6a, hvidQ, hvidQ, hvidQ, hvidQ)
ALIAS(hvid, ic_h6a.Q)
- TTL_7400_NAND(ic_e6c, hvid, hblank)
+ TTL_7400A_NAND(ic_e6c, hvid, hblank)
ALIAS(MissQ, ic_e6c.Q)
TTL_7404_INVERT(ic_d1e, MissQ)
- TTL_7400_NAND(ic_e1a, ic_d1e.Q, attractQ)
+ TTL_7400A_NAND(ic_e1a, ic_d1e.Q, attractQ)
ALIAS(Missed, ic_e1a.Q)
- TTL_7400_NAND(rstspeed, SRSTQ, MissQ)
- TTL_7400_NAND(StopG, StopG1Q, StopG2Q)
+ TTL_7400A_NAND(rstspeed, SRSTQ, MissQ)
+ TTL_7400A_NAND(StopG, StopG1Q, StopG2Q)
ALIAS(L, ic_h3b.Q)
ALIAS(R, ic_h3b.QQ)
- TTL_7400_NAND(hit1Q, pad1, ic_g1b.Q)
- TTL_7400_NAND(hit2Q, pad2, ic_g1b.Q)
+ TTL_7400A_NAND(hit1Q, pad1, ic_g1b.Q)
+ TTL_7400A_NAND(hit2Q, pad2, ic_g1b.Q)
- TTL_7400_NAND(ic_g3c, 128H, ic_h3a.QQ)
+ TTL_7400A_NAND(ic_g3c, 128H, ic_h3a.QQ)
TTL_7427_NOR(ic_g2c, ic_g3c.Q, 256H, vpad1Q)
ALIAS(pad1, ic_g2c.Q)
TTL_7427_NOR(ic_g2a, ic_g3c.Q, 256HQ, vpad2Q)
@@ -193,15 +209,15 @@ NETLIST_START(pong_fast)
// hblank flip flop
// ----------------------------------------------------------------------------------------
- TTL_7400_NAND(ic_g5b, 16H, 64H)
+ TTL_7400A_NAND(ic_g5b, 16H, 64H)
// the time critical one
- TTL_7400_NAND(ic_h5c, ic_h5b.Q, hresetQ)
- TTL_7400_NAND(ic_h5b, ic_h5c.Q, ic_g5b.Q)
+ TTL_7400A_NAND(ic_h5c, ic_h5b.Q, hresetQ)
+ TTL_7400A_NAND(ic_h5b, ic_h5c.Q, ic_g5b.Q)
ALIAS(hblank, ic_h5c.Q)
ALIAS(hblankQ, ic_h5b.Q)
- TTL_7400_NAND(hsyncQ, hblank, 32H)
+ TTL_7400A_NAND(hsyncQ, hblank, 32H)
// ----------------------------------------------------------------------------------------
// vblank flip flop
@@ -212,7 +228,7 @@ NETLIST_START(pong_fast)
ALIAS(vblank, ic_f5d.Q)
ALIAS(vblankQ, ic_f5c.Q)
- TTL_7400_NAND(ic_h5a, 8V, 8V)
+ TTL_7400A_NAND(ic_h5a, 8V, 8V)
TTL_7410_NAND(ic_g5a, vblank, 4V, ic_h5a.Q)
ALIAS(vsyncQ, ic_g5a.Q)
@@ -220,31 +236,31 @@ NETLIST_START(pong_fast)
// move logic
// ----------------------------------------------------------------------------------------
- TTL_7400_NAND(ic_e1d, hit_sound, ic_e1c.Q)
- TTL_7400_NAND(ic_e1c, ic_f1.QC, ic_f1.QD)
+ TTL_7400A_NAND(ic_e1d, hit_sound, ic_e1c.Q)
+ TTL_7400A_NAND(ic_e1c, ic_f1.QC, ic_f1.QD)
TTL_7493(ic_f1, ic_e1d.Q, ic_f1.QA, rstspeed, rstspeed)
TTL_7402_NOR(ic_g1d, ic_f1.QC, ic_f1.QD)
- TTL_7400_NAND(ic_h1a, ic_g1d.Q, ic_g1d.Q)
- TTL_7400_NAND(ic_h1d, ic_e1c.Q, ic_h1a.Q)
+ TTL_7400A_NAND(ic_h1a, ic_g1d.Q, ic_g1d.Q)
+ TTL_7400A_NAND(ic_h1d, ic_e1c.Q, ic_h1a.Q)
- TTL_7400_NAND(ic_h1c, ic_h1d.Q, vreset)
- TTL_7400_NAND(ic_h1b, ic_h1a.Q, vreset)
+ TTL_7400A_NAND(ic_h1c, ic_h1d.Q, vreset)
+ TTL_7400A_NAND(ic_h1b, ic_h1a.Q, vreset)
TTL_7402_NOR(ic_g1c, 256HQ, vreset)
TTL_74107(ic_h2a, ic_g1c.Q, ic_h2b.Q, low, ic_h1b.Q)
TTL_74107(ic_h2b, ic_g1c.Q, high, move, ic_h1c.Q)
- TTL_7400_NAND(ic_h4a, ic_h2b.Q, ic_h2a.Q)
+ TTL_7400A_NAND(ic_h4a, ic_h2b.Q, ic_h2a.Q)
ALIAS(move, ic_h4a.Q)
- TTL_7400_NAND(ic_c1d, SC, attract)
+ TTL_7400A_NAND(ic_c1d, SC, attract)
TTL_7404_INVERT(ic_d1a, ic_c1d.Q)
TTL_7474(ic_h3b, ic_d1a.Q, ic_h3b.QQ, hit1Q, hit2Q)
- TTL_7400_NAND(ic_h4d, ic_h3b.Q, move)
- TTL_7400_NAND(ic_h4b, ic_h3b.QQ, move)
- TTL_7400_NAND(ic_h4c, ic_h4d.Q, ic_h4b.Q)
+ TTL_7400A_NAND(ic_h4d, ic_h3b.Q, move)
+ TTL_7400A_NAND(ic_h4b, ic_h3b.QQ, move)
+ TTL_7400A_NAND(ic_h4c, ic_h4d.Q, ic_h4b.Q)
ALIAS(Aa, ic_h4c.Q)
ALIAS(Ba, ic_h4b.Q)
@@ -252,7 +268,7 @@ NETLIST_START(pong_fast)
// hvid circuit
// ----------------------------------------------------------------------------------------
- TTL_7400_NAND(hball_resetQ, Serve, attractQ)
+ TTL_7400A_NAND(hball_resetQ, Serve, attractQ)
TTL_9316(ic_g7, clk, high, hblankQ, hball_resetQ, ic_g5c.Q, Aa, Ba, low, high)
TTL_9316(ic_h7, clk, ic_g7.RC, high, hball_resetQ, ic_g5c.Q, low, low, low, high)
@@ -267,7 +283,7 @@ NETLIST_START(pong_fast)
TTL_9316(ic_b3, hsyncQ, high, vblankQ, high, ic_b2b.Q, a6, b6, c6, d6)
TTL_9316(ic_a3, hsyncQ, ic_b3.RC, high, high, ic_b2b.Q, low, low, low, low)
- TTL_7400_NAND(ic_b2b, ic_a3.RC, ic_b3.RC)
+ TTL_7400A_NAND(ic_b2b, ic_a3.RC, ic_b3.RC)
TTL_7410_NAND(ic_e2b, ic_a3.RC, ic_b3.QC, ic_b3.QD)
ALIAS(vvidQ, ic_e2b.Q)
TTL_7404_INVERT(vvid, vvidQ) // D2D
@@ -359,12 +375,12 @@ NETLIST_START(pong_fast)
NET_C(GND, ic_g4_C.2)
ALIAS(hit_sound_en, ic_c2a.QQ)
- TTL_7400_NAND(hit_sound, hit_sound_en, vpos16)
- TTL_7400_NAND(score_sound, SC, vpos32)
- TTL_7400_NAND(topbothitsound, ic_f3_topbot.Q, vpos32)
+ TTL_7400A_NAND(hit_sound, hit_sound_en, vpos16)
+ TTL_7400A_NAND(score_sound, SC, vpos32)
+ TTL_7400A_NAND(topbothitsound, ic_f3_topbot.Q, vpos32)
TTL_7410_NAND(ic_c4b, topbothitsound, hit_sound, score_sound)
- TTL_7400_NAND(ic_c1b, ic_c4b.Q, attractQ)
+ TTL_7400A_NAND(ic_c1b, ic_c4b.Q, attractQ)
ALIAS(sound, ic_c1b.Q)
@@ -398,9 +414,9 @@ NETLIST_START(pong_fast)
NET_C(GND, ic_b9_C.2)
TTL_7404_INVERT(ic_c9b, ic_b9.OUT)
- TTL_7400_NAND(ic_b7b, ic_a7b.Q, hsyncQ)
+ TTL_7400A_NAND(ic_b7b, ic_a7b.Q, hsyncQ)
TTL_7493(ic_b8, ic_b7b.Q, ic_b8.QA, ic_b9.OUT, ic_b9.OUT)
- TTL_7400_NAND(ic_b7a, ic_c9b.Q, ic_a7b.Q)
+ TTL_7400A_NAND(ic_b7a, ic_c9b.Q, ic_a7b.Q)
TTL_7420_NAND(ic_a7b, ic_b8.QA, ic_b8.QB, ic_b8.QC, ic_b8.QD)
ALIAS(vpad1Q, ic_b7a.Q)
@@ -438,9 +454,9 @@ NETLIST_START(pong_fast)
NET_C(GND, ic_a9_C.2)
TTL_7404_INVERT(ic_c9a, ic_a9.OUT)
- TTL_7400_NAND(ic_b7c, ic_a7a.Q, hsyncQ)
+ TTL_7400A_NAND(ic_b7c, ic_a7a.Q, hsyncQ)
TTL_7493(ic_a8, ic_b7c.Q, ic_a8.QA, ic_a9.OUT, ic_a9.OUT)
- TTL_7400_NAND(ic_b7d, ic_c9a.Q, ic_a7a.Q)
+ TTL_7400A_NAND(ic_b7d, ic_c9a.Q, ic_a7a.Q)
TTL_7420_NAND(ic_a7a, ic_a8.QA, ic_a8.QB, ic_a8.QC, ic_a8.QD)
ALIAS(vpad2Q, ic_b7d.Q)
@@ -520,8 +536,8 @@ NETLIST_START(pong_fast)
TTL_7427_NOR(ic_e5c, ic_e4b.Q, 8H, 4H)
ALIAS(scoreFE, ic_e5c.Q)
- TTL_7400_NAND(ic_c3d, 8H, 4H)
- //TTL_7400_NAND(ic_c3d, 4H, 8H)
+ TTL_7400A_NAND(ic_c3d, 8H, 4H)
+ //TTL_7400A_NAND(ic_c3d, 4H, 8H)
TTL_7402_NOR(ic_d2b, ic_e4b.Q, ic_c3d.Q)
ALIAS(scoreBC, ic_d2b.Q)
@@ -547,7 +563,7 @@ NETLIST_START(pong_fast)
// net
TTL_74107(ic_f3b, clk, 256H, 256HQ, high)
- TTL_7400_NAND(ic_g3b, ic_f3b.QQ, 256H)
+ TTL_7400A_NAND(ic_g3b, ic_f3b.QQ, 256H)
TTL_7427_NOR(ic_g2b, ic_g3b.Q, vblank, 4V)
ALIAS(net, ic_g2b.Q)
diff --git a/src/tools/nltool.c b/src/tools/nltool.c
index 78d0633d121..71e26fe5fc9 100644
--- a/src/tools/nltool.c
+++ b/src/tools/nltool.c
@@ -288,7 +288,7 @@ static void listdevices()
{
netlist_tool_t nt;
nt.init();
- const netlist_factory_t::list_t &list = nt.setup().factory().list();
+ const netlist_factory_list_t::list_t &list = nt.setup().factory().list();
netlist_sources_t sources;
@@ -304,7 +304,7 @@ static void listdevices()
list[i]->name().cstr() );
pstring terms("");
- net_device_t_base_factory *f = list[i];
+ netlist_base_factory_t *f = list[i];
netlist_device_t *d = f->Create();
d->init(nt, pstring::sprintf("dummy%d", i));
d->start_dev();