summaryrefslogtreecommitdiffstatshomepage
path: root/nl_examples
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2015-05-27 13:47:22 +0200
committer couriersud <couriersud@arcor.de>2015-05-27 23:18:44 +0200
commitcef370aa13953c3bcfa185c818c76812c34f13fc (patch)
tree6ecc90526c03f1e2411328ac2e3d635f9b952922 /nl_examples
parente9fe1e74c46f40379bcdc472b97c4aef4d3a91e6 (diff)
Moved all files in src/emu/netlist starting with p into plib folder.
This is a first step to ease synchronisation with a stand alone, e.g. outside mame, netlist implementation. More signed/unsigned cleanups and started work on generic truthtable devices. (nw)
Diffstat (limited to 'nl_examples')
-rw-r--r--nl_examples/todo.c56
1 files changed, 55 insertions, 1 deletions
diff --git a/nl_examples/todo.c b/nl_examples/todo.c
index 9da1a2c66f6..9d7765ea925 100644
--- a/nl_examples/todo.c
+++ b/nl_examples/todo.c
@@ -3,6 +3,60 @@
*
*/
+#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)
+ NET_REGISTER_DEV(7400, s3)
+ NET_REGISTER_DEV(7400, s4)
+
+ ALIAS(1, s1.A);
+ ALIAS(2, s1.B);
+ ALIAS(3, s1.Q);
+
+ ALIAS(4, s2.A);
+ ALIAS(5, s2.B);
+ ALIAS(6, s2.Q);
+
+ ALIAS(9, s3.A);
+ ALIAS(10, s3.B)
+ ALIAS(8, s3.Q);
+
+ ALIAS(12, s4.A);
+ ALIAS(13, s4.B);
+ ALIAS(11, s4.Q);
+
+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()
+NETLIST_END()
+
+
+
#if 0
RES(R1, 10)
RES(R2, 10)
@@ -98,4 +152,4 @@
LOG(logY, 4V)
#endif
-d
+