summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorGravatarGravatar Couriersud <couriersud@users.noreply.github.com>2014-01-10 19:23:42 +0000
committerGravatarGravatar Couriersud <couriersud@users.noreply.github.com>2014-01-10 19:23:42 +0000
commitf8eac14fa9eb507a7e9374fcd187de311abf68de (patch)
tree1fd6d1a0269e1e3127f1f78b17f0ec6f7480449b /src
parent6efc17f6956392e687b48deeeecea921364033e3 (diff)
Quite a number of simplifications for netlist. Also tested some parallel processing using OpenMP (disabled). No wn
Diffstat (limited to 'src')
-rw-r--r--src/emu/netlist/analog/nld_bjt.c42
-rw-r--r--src/emu/netlist/analog/nld_bjt.h47
-rw-r--r--src/emu/netlist/analog/nld_solver.c78
-rw-r--r--src/emu/netlist/analog/nld_solver.h8
-rw-r--r--src/emu/netlist/analog/nld_twoterm.c4
-rw-r--r--src/emu/netlist/analog/nld_twoterm.h2
-rw-r--r--src/emu/netlist/devices/net_lib.c6
-rw-r--r--src/emu/netlist/devices/nld_system.c3
-rw-r--r--src/emu/netlist/nl_base.c25
-rw-r--r--src/emu/netlist/nl_base.h11
-rw-r--r--src/emu/netlist/nl_config.h41
-rw-r--r--src/emu/netlist/nl_parser.c125
-rw-r--r--src/emu/netlist/nl_parser.h3
-rw-r--r--src/emu/netlist/nl_setup.c7
-rw-r--r--src/mame/drivers/pong.c912
15 files changed, 664 insertions, 650 deletions
diff --git a/src/emu/netlist/analog/nld_bjt.c b/src/emu/netlist/analog/nld_bjt.c
index ba59bb0b954..80444731730 100644
--- a/src/emu/netlist/analog/nld_bjt.c
+++ b/src/emu/netlist/analog/nld_bjt.c
@@ -45,8 +45,7 @@ NETLIB_START(Q)
register_param("model", m_model, "");
}
-template <NETLIB_NAME(Q)::q_type _type>
-NETLIB_START(QBJT_switch<_type>)
+NETLIB_START(QBJT_switch)
{
NETLIB_NAME(Q)::start();
@@ -77,14 +76,15 @@ NETLIB_UPDATE(Q)
netlist().solver()->schedule();
}
-template <NETLIB_NAME(Q)::q_type _type>
-NETLIB_UPDATE_PARAM(QBJT_switch<_type>)
+NETLIB_UPDATE_PARAM(QBJT_switch)
{
- double IS = m_model.dValue("IS", 1e-15);
- double BF = m_model.dValue("BF", 100);
- double NF = m_model.dValue("NF", 1);
+ double IS = m_model.model_value("IS", 1e-15);
+ double BF = m_model.model_value("BF", 100);
+ double NF = m_model.model_value("NF", 1);
//double VJE = m_model.dValue("VJE", 0.75);
+ set_qtype((m_model.model_type() == "NPN") ? BJT_NPN : BJT_PNP);
+
double alpha = BF / (1.0 + BF);
diode d(IS, NF);
@@ -106,17 +106,11 @@ NETLIB_UPDATE_PARAM(QBJT_switch<_type>)
m_RC.set(NETLIST_GMIN, 0.0, 0.0);
}
-template NETLIB_START(QBJT_switch<NETLIB_NAME(Q)::BJT_NPN>);
-template NETLIB_START(QBJT_switch<NETLIB_NAME(Q)::BJT_PNP>);
-template NETLIB_UPDATE_PARAM(QBJT_switch<NETLIB_NAME(Q)::BJT_NPN>);
-template NETLIB_UPDATE_PARAM(QBJT_switch<NETLIB_NAME(Q)::BJT_PNP>);
-
// ----------------------------------------------------------------------------------------
// nld_Q - Ebers Moll
// ----------------------------------------------------------------------------------------
-template <NETLIB_NAME(Q)::q_type _type>
-NETLIB_START(QBJT_EB<_type>)
+NETLIB_START(QBJT_EB)
{
NETLIB_NAME(Q)::start();
@@ -145,16 +139,17 @@ NETLIB_START(QBJT_EB<_type>)
}
-template <NETLIB_NAME(Q)::q_type _type>
-NETLIB_UPDATE_PARAM(QBJT_EB<_type>)
+NETLIB_UPDATE_PARAM(QBJT_EB)
{
- double IS = m_model.dValue("IS", 1e-15);
- double BF = m_model.dValue("BF", 100);
- double NF = m_model.dValue("NF", 1);
- double BR = m_model.dValue("BR", 1);
- double NR = m_model.dValue("NR", 1);
+ double IS = m_model.model_value("IS", 1e-15);
+ double BF = m_model.model_value("BF", 100);
+ double NF = m_model.model_value("NF", 1);
+ double BR = m_model.model_value("BR", 1);
+ double NR = m_model.model_value("NR", 1);
//double VJE = m_model.dValue("VJE", 0.75);
+ set_qtype((m_model.model_type() == "NPN") ? BJT_NPN : BJT_PNP);
+
m_alpha_f = BF / (1.0 + BF);
m_alpha_r = BR / (1.0 + BR);
@@ -163,8 +158,3 @@ NETLIB_UPDATE_PARAM(QBJT_EB<_type>)
}
-template NETLIB_START(QBJT_EB<NETLIB_NAME(Q)::BJT_NPN>);
-template NETLIB_START(QBJT_EB<NETLIB_NAME(Q)::BJT_PNP>);
-template NETLIB_UPDATE_PARAM(QBJT_EB<NETLIB_NAME(Q)::BJT_NPN>);
-template NETLIB_UPDATE_PARAM(QBJT_EB<NETLIB_NAME(Q)::BJT_PNP>);
-
diff --git a/src/emu/netlist/analog/nld_bjt.h b/src/emu/netlist/analog/nld_bjt.h
index a0079895436..c01776f6b2c 100644
--- a/src/emu/netlist/analog/nld_bjt.h
+++ b/src/emu/netlist/analog/nld_bjt.h
@@ -13,21 +13,13 @@
// Macros
// ----------------------------------------------------------------------------------------
-#define NETDEV_QPNP(_name, _model) \
- NET_REGISTER_DEV(QPNP_switch, _name) \
- NETDEV_PARAMI(_name, model, # _model)
+#define NETDEV_QBJT_SW(_name, _model) \
+ NET_REGISTER_DEV(QBJT_switch, _name) \
+ NETDEV_PARAMI(_name, model, _model)
-#define NETDEV_QNPN(_name, _model) \
- NET_REGISTER_DEV(QNPN_switch, _name) \
- NETDEV_PARAMI(_name, model, # _model)
-
-#define NETDEV_QPNP_EB(_name, _model) \
- NET_REGISTER_DEV(QPNP_EB, _name) \
- NETDEV_PARAMI(_name, model, # _model)
-
-#define NETDEV_QNPN_EB(_name, _model) \
- NET_REGISTER_DEV(QNPN_switch, _name) \
- NETDEV_PARAMI(_name, model, # _model)
+#define NETDEV_QBJT_EB(_name, _model) \
+ NET_REGISTER_DEV(QBJT_EB, _name) \
+ NETDEV_PARAMI(_name, model, _model)
// ----------------------------------------------------------------------------------------
@@ -44,12 +36,13 @@ public:
BJT_PNP
};
- ATTR_COLD NETLIB_NAME(Q)(const q_type atype, const family_t afamily)
+ ATTR_COLD NETLIB_NAME(Q)(const family_t afamily)
: netlist_device_t(afamily)
- , m_qtype(atype) { }
+ , m_qtype(BJT_NPN) { }
inline q_type qtype() const { return m_qtype; }
inline bool is_qtype(q_type atype) const { return m_qtype == atype; }
+ inline void set_qtype(q_type atype) { m_qtype = atype; }
protected:
ATTR_COLD virtual void start();
ATTR_HOT ATTR_ALIGN void update();
@@ -63,8 +56,8 @@ class NETLIB_NAME(QBJT) : public NETLIB_NAME(Q)
{
public:
- ATTR_COLD NETLIB_NAME(QBJT)(const q_type atype, const family_t afamily)
- : NETLIB_NAME(Q)(atype, afamily) { }
+ ATTR_COLD NETLIB_NAME(QBJT)(const family_t afamily)
+ : NETLIB_NAME(Q)(afamily) { }
protected:
@@ -92,18 +85,17 @@ private:
* E
*/
-template <NETLIB_NAME(Q)::q_type _type>
class NETLIB_NAME(QBJT_switch) : public NETLIB_NAME(QBJT)
{
public:
ATTR_COLD NETLIB_NAME(QBJT_switch)()
- : NETLIB_NAME(QBJT)(_type, BJT_SWITCH), m_gB(NETLIST_GMIN), m_gC(NETLIST_GMIN), m_V(0.0), m_state_on(0) { }
+ : NETLIB_NAME(QBJT)(BJT_SWITCH), m_gB(NETLIST_GMIN), m_gC(NETLIST_GMIN), m_V(0.0), m_state_on(0) { }
NETLIB_UPDATEI()
{
double vE = INPANALOG(m_EV);
double vB = INPANALOG(m_BV);
- double m = (_type == BJT_NPN) ? 1 : -1;
+ double m = (is_qtype( BJT_NPN) ? 1 : -1);
int new_state = ((vB - vE) * m > m_V ) ? 1 : 0;
if (m_state_on ^ new_state)
@@ -146,22 +138,15 @@ protected:
private:
};
-typedef NETLIB_NAME(QBJT_switch)<NETLIB_NAME(Q)::BJT_PNP> NETLIB_NAME(QPNP_switch);
-typedef NETLIB_NAME(QBJT_switch)<NETLIB_NAME(Q)::BJT_NPN> NETLIB_NAME(QNPN_switch);
-
// ----------------------------------------------------------------------------------------
// nld_QBJT_EB
// ----------------------------------------------------------------------------------------
-
-
-
-template <NETLIB_NAME(Q)::q_type _type>
class NETLIB_NAME(QBJT_EB) : public NETLIB_NAME(QBJT)
{
public:
ATTR_COLD NETLIB_NAME(QBJT_EB)()
- : NETLIB_NAME(QBJT)(_type, BJT_EB),
+ : NETLIB_NAME(QBJT)(BJT_EB),
m_D_BC(netlist_object_t::ANALOG),
m_D_BE(netlist_object_t::ANALOG),
m_I_BC(netlist_object_t::ANALOG),
@@ -200,8 +185,4 @@ protected:
private:
};
-typedef NETLIB_NAME(QBJT_EB)<NETLIB_NAME(Q)::BJT_PNP> NETLIB_NAME(QPNP_EB);
-typedef NETLIB_NAME(QBJT_EB)<NETLIB_NAME(Q)::BJT_NPN> NETLIB_NAME(QNPN_EB);
-
-
#endif /* NLD_BJT_H_ */
diff --git a/src/emu/netlist/analog/nld_solver.c b/src/emu/netlist/analog/nld_solver.c
index f78ef10c88e..26551de46c7 100644
--- a/src/emu/netlist/analog/nld_solver.c
+++ b/src/emu/netlist/analog/nld_solver.c
@@ -6,6 +6,10 @@
#include "nld_solver.h"
#include "nld_twoterm.h"
+#if HAS_OPENMP
+#include "omp.h"
+#endif
+
// ----------------------------------------------------------------------------------------
// netlist_matrix_solver
// ----------------------------------------------------------------------------------------
@@ -15,13 +19,17 @@
ATTR_COLD void netlist_matrix_solver_t::setup(netlist_net_t::list_t &nets, NETLIB_NAME(solver) &aowner)
{
+ /* make sure we loop at least once */
+ m_resched = true;
+
m_owner = &aowner;
for (netlist_net_t::list_t::entry_t *pn = nets.first(); pn != NULL; pn = nets.next(pn))
{
NL_VERBOSE_OUT(("setting up net\n"));
- m_nets.add(pn->object());
- pn->object()->m_solver = this;
+ m_nets.add(pn->object());
+
+ pn->object()->m_solver = this;
for (netlist_core_terminal_t *p = pn->object()->m_head; p != NULL; p = p->m_update_list_next)
{
@@ -35,7 +43,6 @@ ATTR_COLD void netlist_matrix_solver_t::setup(netlist_net_t::list_t &nets, NETLI
m_steps.add(&p->netdev());
break;
case netlist_device_t::BJT_EB:
- printf("Found ebers moll\n");
case netlist_device_t::DIODE:
//case netlist_device_t::VCVS:
//case netlist_device_t::BJT_SWITCH:
@@ -86,11 +93,16 @@ ATTR_HOT inline void netlist_matrix_solver_t::update_inputs()
ATTR_HOT inline int netlist_matrix_solver_t::solve_non_dynamic()
{
- bool resched;
+ bool resched = false;
int resched_cnt = 0;
ATTR_UNUSED netlist_net_t *last_resched_net = NULL;
+ /* over-relaxation not really works on these matrices */
+ const double w = 1.0; //2.0 / (1.0 + sin(3.14159 / (m_nets.count()+1)));
+ const double w1 = 1.0 - w;
+
+ //printf("%f %d\n", w, m_nets.count());
do {
resched = false;
@@ -110,12 +122,11 @@ ATTR_HOT inline int netlist_matrix_solver_t::solve_non_dynamic()
gabs += fabs(terms[i]->m_go);
iIdr += terms[i]->m_Idr + terms[i]->m_go * terms[i]->m_otherterm->net().Q_Analog();
}
-
gabs *= m_convergence_factor;
if (gabs > gtot)
new_val = (net->m_cur.Analog * gabs + iIdr) / (gtot + gabs);
else
- new_val = iIdr / gtot;
+ new_val = w1 * net->m_cur.Analog + w * iIdr / gtot;
if (fabs(new_val - net->m_cur.Analog) > m_accuracy)
{
@@ -129,7 +140,7 @@ ATTR_HOT inline int netlist_matrix_solver_t::solve_non_dynamic()
//NL_VERBOSE_OUT(("New: %lld %f %f\n", netlist().time().as_raw(), netlist().time().as_double(), new_val));
}
resched_cnt++;
- } while (resched && (resched_cnt < m_resched_loops / 2 ));
+ } while (resched && (resched_cnt < m_resched_loops / 3 ));
return resched_cnt;
}
@@ -137,12 +148,11 @@ ATTR_HOT inline int netlist_matrix_solver_t::solve_non_dynamic()
ATTR_HOT inline bool netlist_matrix_solver_t::solve()
{
- bool resched = false;
- // FIXME: There may be situations where we *could* need more than one iteration for dynamic elements
-
int resched_cnt = 0;
ATTR_UNUSED netlist_net_t *last_resched_net = NULL;
+ m_resched = false;
+
if (is_dynamic())
{
int this_resched;
@@ -168,14 +178,12 @@ ATTR_HOT inline bool netlist_matrix_solver_t::solve()
resched_cnt = solve_non_dynamic();
}
if (resched_cnt >= m_resched_loops)
- resched = true;
+ m_resched = true;
- if (!resched)
- update_inputs();
//if (resched)
//printf("Resched on net %s first term %s\n", last_resched_net->name().cstr(), last_resched_net->m_terms[0]->name().cstr());
- return resched;
+ return m_resched;
}
// ----------------------------------------------------------------------------------------
@@ -198,18 +206,18 @@ ATTR_COLD static bool already_processed(net_groups_t groups, int &cur_group, net
ATTR_COLD static void process_net(net_groups_t groups, int &cur_group, netlist_net_t *net)
{
- /* add the net */
if (net->m_head == NULL)
return;
+ /* add the net */
groups[cur_group].add(net);
for (netlist_core_terminal_t *p = net->m_head; p != NULL; p = p->m_update_list_next)
{
if (p->isType(netlist_terminal_t::TERMINAL))
{
netlist_terminal_t *pt = static_cast<netlist_terminal_t *>(p);
- netlist_net_t *nnet = &pt->m_otherterm->net();
- if (!already_processed(groups, cur_group, nnet))
- process_net(groups, cur_group, nnet);
+ netlist_net_t *other_net = &pt->m_otherterm->net();
+ if (!already_processed(groups, cur_group, other_net))
+ process_net(groups, cur_group, other_net);
}
}
}
@@ -230,7 +238,7 @@ NETLIB_START(solver)
//register_param("ACCURACY", m_accuracy, 1e-3);
register_param("ACCURACY", m_accuracy, 1e-6);
register_param("CONVERG", m_convergence, 0.3);
- register_param("RESCHED_LOOPS", m_resched_loops, 15);
+ register_param("RESCHED_LOOPS", m_resched_loops, 35);
// internal staff
@@ -279,10 +287,34 @@ NETLIB_UPDATE(solver)
}
}
bool global_resched = false;
- for (netlist_matrix_solver_t::list_t::entry_t *e = m_mat_solvers.first(); e != NULL; e = m_mat_solvers.next(e))
- {
- global_resched = global_resched || e->object()->solve();
- }
+ bool this_resched[100];
+
+#if HAS_OPENMP && USE_OPENMP
+ int t_cnt = m_mat_solvers.count();
+ omp_set_num_threads(3);
+ omp_set_dynamic(0);
+ #pragma omp parallel
+ {
+ int i;
+ #pragma omp for nowait
+ for (i = 0; i < t_cnt; i++)
+ {
+ this_resched[i] = m_mat_solvers[i]->solve();
+ }
+ }
+#else
+ for (int i = 0; i < m_mat_solvers.count(); i++)
+ {
+ this_resched[i] = m_mat_solvers[i]->solve();
+ }
+#endif
+
+ for (int i = 0; i < m_mat_solvers.count(); i++)
+ {
+ global_resched = global_resched || this_resched[i];
+ if (!this_resched[i])
+ m_mat_solvers[i]->update_inputs();
+ }
if (global_resched)
{
schedule();
diff --git a/src/emu/netlist/analog/nld_solver.h b/src/emu/netlist/analog/nld_solver.h
index 62af5d9ef9e..1f4a1fb6c83 100644
--- a/src/emu/netlist/analog/nld_solver.h
+++ b/src/emu/netlist/analog/nld_solver.h
@@ -22,12 +22,16 @@
class NETLIB_NAME(solver);
+/* FIXME: these should become proper devices */
+
class netlist_matrix_solver_t
{
public:
typedef netlist_list_t<netlist_matrix_solver_t *> list_t;
typedef netlist_core_device_t::list_t dev_list_t;
+ netlist_matrix_solver_t() : m_resched(false) {}
+
ATTR_COLD void setup(netlist_net_t::list_t &nets, NETLIB_NAME(solver) &owner);
// return true if a reschedule is needed ...
@@ -50,8 +54,9 @@ private:
dev_list_t m_dynamic;
netlist_core_terminal_t::list_t m_inps;
dev_list_t m_steps;
+ bool m_resched;
- NETLIB_NAME(solver) *m_owner;
+ NETLIB_NAME(solver) *m_owner;
};
NETLIB_DEVICE_WITH_PARAMS(solver,
@@ -89,7 +94,6 @@ public:
ATTR_HOT inline void NETLIB_NAME(solver)::schedule()
{
- // FIXME: time should be parameter;
if (!m_Q_sync.net().is_queued())
m_Q_sync.net().push_to_queue(m_nt_sync_delay);
}
diff --git a/src/emu/netlist/analog/nld_twoterm.c b/src/emu/netlist/analog/nld_twoterm.c
index c2ebd93f0d8..f8fbd8149d5 100644
--- a/src/emu/netlist/analog/nld_twoterm.c
+++ b/src/emu/netlist/analog/nld_twoterm.c
@@ -134,8 +134,8 @@ NETLIB_START(D)
NETLIB_UPDATE_PARAM(D)
{
- double Is = m_model.dValue("Is", 1e-15);
- double n = m_model.dValue("N", 1);
+ double Is = m_model.model_value("Is", 1e-15);
+ double n = m_model.model_value("N", 1);
m_D.set_param(Is, n);
}
diff --git a/src/emu/netlist/analog/nld_twoterm.h b/src/emu/netlist/analog/nld_twoterm.h
index 74a589ac233..0bb6e162f6e 100644
--- a/src/emu/netlist/analog/nld_twoterm.h
+++ b/src/emu/netlist/analog/nld_twoterm.h
@@ -55,7 +55,7 @@
/* Generic Diode */
#define NETDEV_D(_name, _model) \
NET_REGISTER_DEV(D, _name) \
- NETDEV_PARAMI(_name, model, # _model)
+ NETDEV_PARAMI(_name, model, _model)
// ----------------------------------------------------------------------------------------
// Implementation
diff --git a/src/emu/netlist/devices/net_lib.c b/src/emu/netlist/devices/net_lib.c
index fb501761da9..885059d3258 100644
--- a/src/emu/netlist/devices/net_lib.c
+++ b/src/emu/netlist/devices/net_lib.c
@@ -244,10 +244,8 @@ void netlist_factory_t::initialize()
ENTRY(D, NETDEV_D, "model")
ENTRY(VCVS, NETDEV_VCVS, "-")
ENTRY(VCCS, NETDEV_VCCS, "-")
- ENTRY(QPNP_EB, NETDEV_QPNP_EB, "model")
- ENTRY(QNPN_EB, NETDEV_QNPN_EB, "model")
- ENTRY(QPNP_switch, NETDEV_QPNP, "model")
- ENTRY(QNPN_switch, NETDEV_QNPN, "model")
+ ENTRY(QBJT_EB, NETDEV_QBJT_EB, "model")
+ ENTRY(QBJT_switch, NETDEV_QBJT_SW, "model")
ENTRY(ttl_const, NETDEV_TTL_CONST, "CONST")
ENTRY(analog_const, NETDEV_ANALOG_CONST, "CONST")
ENTRY(logic_input, NETDEV_LOGIC_INPUT, "-")
diff --git a/src/emu/netlist/devices/nld_system.c b/src/emu/netlist/devices/nld_system.c
index a2b02f0f77a..d6cd3ea83b2 100644
--- a/src/emu/netlist/devices/nld_system.c
+++ b/src/emu/netlist/devices/nld_system.c
@@ -37,7 +37,8 @@ NETLIB_UPDATE(analog_const)
NETLIB_UPDATE_PARAM(analog_const)
{
- m_Q.initial(m_const.Value());
+ //m_Q.initial(m_const.Value());
+ OUTANALOG(m_Q, m_const.Value(), NLTIME_IMMEDIATE);
}
// ----------------------------------------------------------------------------------------
diff --git a/src/emu/netlist/nl_base.c b/src/emu/netlist/nl_base.c
index 086c4892410..9407d4e1c7f 100644
--- a/src/emu/netlist/nl_base.c
+++ b/src/emu/netlist/nl_base.c
@@ -629,14 +629,16 @@ ATTR_COLD netlist_ttl_output_t::netlist_ttl_output_t()
ATTR_COLD netlist_analog_output_t::netlist_analog_output_t()
: netlist_output_t(OUTPUT, ANALOG)
{
- net().m_cur.Analog = 0.0;
- net().m_new.Analog = 99.0;
+ net().m_last.Analog = 0.97;
+ net().m_cur.Analog = 0.98;
+ net().m_new.Analog = 0.99;
}
ATTR_COLD void netlist_analog_output_t::initial(const double val)
{
- net().m_cur.Analog = val;
- net().m_new.Analog = 99.0;
+ net().m_cur.Analog = val * 0.98;
+ net().m_cur.Analog = val * 0.99;
+ net().m_new.Analog = val * 1.0;
}
// ----------------------------------------------------------------------------------------
@@ -678,7 +680,20 @@ ATTR_COLD netlist_param_model_t::netlist_param_model_t()
{
}
-ATTR_COLD double netlist_param_model_t::dValue(const pstring &entity, const double defval) const
+ATTR_COLD const pstring netlist_param_model_t::model_type() const
+{
+ pstring tmp = this->Value();
+ // .model 1N914 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)
+ int p = tmp.find("(");
+ int p1 = p;
+ while (--p >= 0 && tmp[p] != ' ')
+ ;
+
+ return tmp.substr(p+1, p1-p-1).ucase();
+}
+
+
+ATTR_COLD double netlist_param_model_t::model_value(const pstring &entity, const double defval) const
{
pstring tmp = this->Value();
// .model 1N914 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)
diff --git a/src/emu/netlist/nl_base.h b/src/emu/netlist/nl_base.h
index bcda8728698..ce993107fb4 100644
--- a/src/emu/netlist/nl_base.h
+++ b/src/emu/netlist/nl_base.h
@@ -822,7 +822,8 @@ public:
ATTR_HOT inline const pstring &Value() const { return m_param; }
/* these should be cached! */
- ATTR_COLD double dValue(const pstring &entity, const double defval = 0.0) const;
+ ATTR_COLD double model_value(const pstring &entity, const double defval = 0.0) const;
+ ATTR_COLD const pstring model_type() const;
private:
pstring m_param;
@@ -1287,6 +1288,14 @@ public:
return nl_util::pstring_list();
}
+ ATTR_COLD const pstring def_param()
+ {
+ if (m_def_param.startsWith("+") || m_def_param.equals("-"))
+ return "";
+ else
+ return m_def_param;
+ }
+
protected:
pstring m_name; /* device name */
pstring m_classname; /* device class name */
diff --git a/src/emu/netlist/nl_config.h b/src/emu/netlist/nl_config.h
index f0c9d3e82dc..4d93e669f5f 100644
--- a/src/emu/netlist/nl_config.h
+++ b/src/emu/netlist/nl_config.h
@@ -28,6 +28,8 @@
#define USE_DEACTIVE_DEVICE (0)
+#define USE_OPENMP (0)
+
// Use nano-second resolution - Sufficient for now
#define NETLIST_INTERNAL_RES (U64(1000000000))
//#define NETLIST_INTERNAL_RES (U64(1000000000000))
@@ -55,14 +57,31 @@ typedef UINT8 netlist_sig_t;
#endif
//============================================================
-// MACROS
+// General Macros
//============================================================
+#define HAS_OPENMP ( _OPENMP >= 200805 )
+
// prevent implicit copying
#define NETLIST_PREVENT_COPYING(_name) \
private: \
_name(const _name &); \
_name &operator=(const _name &);
+
+#if defined(__GNUC__) && (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))
+#if !defined(__ppc__) && !defined (__PPC__) && !defined(__ppc64__) && !defined(__PPC64__)
+#define ATTR_ALIGN __attribute__ ((aligned(128)))
+#else
+#define ATTR_ALIGN
+#endif
+#else
+#define ATTR_ALIGN
+#endif
+
+//============================================================
+// Performance tracking
+//============================================================
+
#if NL_KEEP_STATISTICS
#define add_to_stat(v,x) do { v += (x); } while (0)
#define inc_stat(v) add_to_stat(v, 1)
@@ -75,6 +94,11 @@ typedef UINT8 netlist_sig_t;
#define end_timing(v) do { } while (0)
#endif
+
+//============================================================
+// Performance tracking
+//============================================================
+
// Compiling without mame ?
#ifndef ATTR_HOT
@@ -86,15 +110,14 @@ typedef UINT8 netlist_sig_t;
#define ATTR_COLD
#endif
-#if defined(__GNUC__) && (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))
-#if !defined(__ppc__) && !defined (__PPC__) && !defined(__ppc64__) && !defined(__PPC64__)
-#define ATTR_ALIGN __attribute__ ((aligned(128)))
-#else
-#define ATTR_ALIGN
+//============================================================
+// WARNINGS
+//============================================================
+
+#if (USE_OPENMP)
+#if (!HAS_OPEN_MP)
+#warning To use openmp compile and link with "-fopenmp"
#endif
-#else
-#define ATTR_ALIGN
#endif
-
#endif /* NLCONFIG_H_ */
diff --git a/src/emu/netlist/nl_parser.c b/src/emu/netlist/nl_parser.c
index 2096a249ab2..21ea62fec9e 100644
--- a/src/emu/netlist/nl_parser.c
+++ b/src/emu/netlist/nl_parser.c
@@ -54,24 +54,6 @@ void netlist_parser::parse(const char *buf)
net_c();
else if (n == "NETDEV_PARAM")
netdev_param();
- else if (n == "NETDEV_R")
- netdev_device(n, "R");
- else if (n == "NETDEV_C")
- netdev_device(n, "C");
- else if (n == "NETDEV_POT")
- netdev_device(n, "R");
- else if (n == "NETDEV_D")
- netdev_device(n, "model", true);
- else if (n == "NETDEV_QNPN")
- netdev_device(n, "model", true);
- else if (n == "NETDEV_QPNP")
- netdev_device(n, "model", true);
- else if (n == "NETDEV_QNPN_EB")
- netdev_device(n, "model", true);
- else if (n == "NETDEV_QPNP_EB")
- netdev_device(n, "model", true);
- else if ((n == "NETDEV_TTL_CONST") || (n == "NETDEV_ANALOG_CONST"))
- netdev_const(n);
else if ((n == "NET_MODEL"))
net_model();
else if (n == "NETLIST_START")
@@ -143,89 +125,59 @@ void netlist_parser::netdev_param()
check_char(')');
}
-void netlist_parser::netdev_const(const pstring &dev_name)
-{
- pstring name;
- netlist_device_t *dev;
- pstring paramfq;
- double val;
-
- skipws();
- name = getname(',');
- dev = m_setup.factory().new_device_by_name(dev_name, m_setup);
- m_setup.register_dev(dev, name);
- skipws();
- val = eval_param();
- paramfq = name + ".CONST";
- NL_VERBOSE_OUT(("Parser: Const: %s %f\n", name.cstr(), val));
- check_char(')');
- m_setup.register_param(paramfq, val);
-}
-
void netlist_parser::netdev_device(const pstring &dev_type)
{
pstring devname;
net_device_t_base_factory *f = m_setup.factory().factory_by_name(dev_type, m_setup);
netlist_device_t *dev;
nl_util::pstring_list termlist = f->term_param_list();
+ pstring def_param = f->def_param();
+
int cnt;
skipws();
devname = getname2(',', ')');
dev = f->Create();
m_setup.register_dev(dev, devname);
+
NL_VERBOSE_OUT(("Parser: IC: %s\n", devname.cstr()));
- cnt = 0;
- while (getc() != ')')
+
+ if (def_param != "")
{
+ pstring paramfq = devname + "." + def_param;
+ NL_VERBOSE_OUT(("Defparam: %s\n", def_param.cstr()));
+ check_char(',');
+ skipws();
+ if (peekc() == '"')
+ {
+ pstring val = getstring();
+ m_setup.register_param(paramfq, val);
+ }
+ else
+ {
+ double val = eval_param();
+ m_setup.register_param(paramfq, val);
+ }
+ if (termlist.count() > 0)
+ check_char(',');
+ }
- if (cnt >= termlist.count())
- fatalerror("netlist: input count mismatch for %s - expected %d found %d\n", devname.cstr(), termlist.count(), cnt);
+ cnt = 0;
+ while (getc() != ')' && cnt < termlist.count())
+ {
skipws();
pstring output_name = getname2(',', ')');
-#if 0
- pstring alias = pstring::sprintf("%s.[%d]", devname.cstr(), cnt);
- NL_VERBOSE_OUT(("Parser: ID: %s %s\n", output_name.cstr(), alias.cstr()));
- m_setup.register_link(alias, output_name);
-#else
- m_setup.register_link(devname + "." + termlist[cnt], output_name);
-#endif
- skipws();
- cnt++;
- }
-}
-void netlist_parser::netdev_device(const pstring &dev_type, const pstring &default_param, bool isString)
-{
- netlist_device_t *dev;
+ m_setup.register_link(devname + "." + termlist[cnt], output_name);
- skipws();
- pstring devname = getname2(',', ')');
- pstring defparam = devname + "." + default_param;
- dev = m_setup.factory().new_device_by_name(dev_type, m_setup);
- m_setup.register_dev(dev, devname);
- NL_VERBOSE_OUT(("Parser: IC: %s\n", devname.cstr()));
- if (getc() != ')')
- {
- // have a default param
skipws();
- if (isString)
- {
- pstring val = getname(')');
- ungetc();
- NL_VERBOSE_OUT(("Parser: Default param: %s %s\n", defparam.cstr(), val.cstr()));
- m_setup.register_param(defparam, val);
- }
- else
- {
- double val = eval_param();
- NL_VERBOSE_OUT(("Parser: Default param: %s %f\n", defparam.cstr(), val));
- m_setup.register_param(defparam, val);
- }
+ cnt++;
}
- check_char(')');
+ if (cnt != termlist.count())
+ fatalerror("netlist: input count mismatch for %s - expected %d found %d\n", devname.cstr(), termlist.count(), cnt);
}
+
// ----------------------------------------------------------------------------------------
// private
// ----------------------------------------------------------------------------------------
@@ -360,14 +312,23 @@ double netlist_parser::eval_param()
for (i=1; i<6;i++)
if (strncmp(s.cstr(), macs[i], strlen(macs[i])) == 0)
f = i;
- ret = s.substr(strlen(macs[f])).as_double(&e);
- if ((f>0) && e)
+ if (f>0)
+ check_char(')');
+ s = s.substr(strlen(macs[f]));
+ ret = s.as_double(&e);
+// if ((f>0) && e)
+ if (e)
error("Error with parameter ...\n");
- if (f>0)
- check_char(')');
return ret * facs[f];
}
+unsigned char netlist_parser::peekc()
+{
+ unsigned char c = getc();
+ ungetc();
+ return c;
+}
+
unsigned char netlist_parser::getc()
{
if (*m_px == 10)
diff --git a/src/emu/netlist/nl_parser.h b/src/emu/netlist/nl_parser.h
index c9aa11e8f40..c6aa67410f3 100644
--- a/src/emu/netlist/nl_parser.h
+++ b/src/emu/netlist/nl_parser.h
@@ -21,9 +21,7 @@ public:
void net_alias();
void netdev_param();
void net_c();
- void netdev_const(const pstring &dev_name);
void netdev_device(const pstring &dev_type);
- void netdev_device(const pstring &dev_type, const pstring &default_param, bool isString = false);
void netdev_netlist_start();
void netdev_netlist_end();
void net_model();
@@ -40,6 +38,7 @@ private:
double eval_param();
pstring getstring();
+ unsigned char peekc();
unsigned char getc();
void ungetc();
bool eof() { return *m_px == 0; }
diff --git a/src/emu/netlist/nl_setup.c b/src/emu/netlist/nl_setup.c
index d4409510bea..9b460c48c45 100644
--- a/src/emu/netlist/nl_setup.c
+++ b/src/emu/netlist/nl_setup.c
@@ -207,9 +207,10 @@ void netlist_setup_t::register_object(netlist_device_t &dev, const pstring &name
{
if (m_models[i].ucase().startsWith(search))
{
- int pl=m_models[i].find("(");
- int pr=m_models[i].find("(");
- dynamic_cast<netlist_param_model_t &>(param).initial(m_models[i].substr(pl+1,pr-pl-1));
+ //int pl=m_models[i].find("(");
+ //int pr=m_models[i].find(")");
+ //dynamic_cast<netlist_param_model_t &>(param).initial(m_models[i].substr(pl+1,pr-pl-1));
+ dynamic_cast<netlist_param_model_t &>(param).initial(m_models[i]);
found = true;
break;
}
diff --git a/src/mame/drivers/pong.c b/src/mame/drivers/pong.c
index 64973d51e45..321b80699ac 100644
--- a/src/mame/drivers/pong.c
+++ b/src/mame/drivers/pong.c
@@ -113,15 +113,15 @@ static NETLIST_START(pong_schematics)
NETDEV_PARAM(xclk.FREQ, 7159000.0*2)
#endif
- /* 3V Logic - Just a resistor - the value is not given in schematics */
+ /* 3V Logic - Just a resistor - the value is not given in schematics */
- NETDEV_R(R3V, 50) // Works ...
- NET_C(R3V.1, V5)
- NET_ALIAS(V3, R3V.2)
+ NETDEV_R(R3V, 50) // Works ...
+ NET_C(R3V.1, V5)
+ NET_ALIAS(V3, R3V.2)
- /* Coin, antenna and startup circuit */
+ /* Coin, antenna and startup circuit */
- NETDEV_ANALOG_CONST(STOPG, 0)
+ NETDEV_ANALOG_CONST(STOPG, 0)
NET_ALIAS(SRSTQ, RYf.2)
NET_ALIAS(SRST, RYc.2)
@@ -148,7 +148,7 @@ static NETLIST_START(pong_schematics)
/* Antenna circuit */
/* Has a diode to clamp negative voltages - omitted here */
- NETDEV_QNPN(Q3, BC237B)
+ NETDEV_QBJT_SW(Q3, "BC237B")
NET_C(antenna, Q3.B)
NET_C(GND, Q3.E)
NETDEV_R(RX5, 100)
@@ -158,15 +158,15 @@ static NETLIST_START(pong_schematics)
NET_C(RX5.1, Q3.C)
NET_C(RX5.2, GND)
NET_C(CX1.2, GND)
- NETDEV_QNPN(Q1, BC237B)
+ NETDEV_QBJT_SW(Q1, "BC237B")
NET_C(Q1.B, RX5.1)
NET_C(Q1.E, GND)
- NETDEV_D(D3, 1N914)
+ NETDEV_D(D3, "1N914")
NET_C(D3.A, Q1.C)
NET_C(D3.K, SRSTQ)
- NETDEV_D(D2, 1N914)
+ NETDEV_D(D2, "1N914")
NETDEV_R(RX4, 220)
NET_C(D2.K, e4d.Q)
NET_C(D2.A, RX4.1)
@@ -184,7 +184,7 @@ static NETLIST_START(pong_schematics)
NET_C(RX1.1, CX2.1)
NET_C(RX1.2, CX2.2)
- NETDEV_QPNP(Q2, BC556B)
+ NETDEV_QBJT_SW(Q2, "BC556B")
NET_C(Q2.E, V3)
NET_C(Q2.B, RX1.2)
NET_C(Q2.C, RX2.2)
@@ -193,451 +193,451 @@ static NETLIST_START(pong_schematics)
/* hit logic */
- TTL_7404_INVERT(hitQ, hit)
- TTL_7400_NAND(hit, hit1Q, hit2Q)
-
- TTL_7402_NOR(attractQ, StopG, runQ)
- TTL_7404_INVERT(attract, attractQ)
-
- TTL_7420_NAND(ic_h6a, hvidQ, hvidQ, hvidQ, hvidQ)
- NET_ALIAS(hvid, ic_h6a.Q)
-
- TTL_7400_NAND(ic_e6c, hvid, hblank)
- NET_ALIAS(MissQ, ic_e6c.Q)
-
- TTL_7404_INVERT(ic_d1e, MissQ)
- TTL_7400_NAND(ic_e1a, ic_d1e.Q, attractQ)
- NET_ALIAS(Missed, ic_e1a.Q)
-
- TTL_7400_NAND(rstspeed, SRSTQ, MissQ)
- TTL_7400_NAND(StopG, StopG1Q, StopG2Q)
- NET_ALIAS(L, ic_h3b.Q)
- NET_ALIAS(R, ic_h3b.QQ)
-
- TTL_7400_NAND(hit1Q, pad1, ic_g1b.Q)
- TTL_7400_NAND(hit2Q, pad2, ic_g1b.Q)
-
- TTL_7400_NAND(ic_g3c, 128H, ic_h3a.QQ)
- TTL_7427_NOR(ic_g2c, ic_g3c.Q, 256H, vpad1Q)
- NET_ALIAS(pad1, ic_g2c.Q)
- TTL_7427_NOR(ic_g2a, ic_g3c.Q, 256HQ, vpad2Q)
- NET_ALIAS(pad2, ic_g2a.Q)
-
- // ----------------------------------------------------------------------------------------
- // horizontal counter
- // ----------------------------------------------------------------------------------------
- TTL_7493(ic_f8, clk, ic_f8.QA, ic_e7b.QQ, ic_e7b.QQ) // f8, f9, f6b
- TTL_7493(ic_f9, ic_f8.QD, ic_f9.QA, ic_e7b.QQ, ic_e7b.QQ) // f8, f9, f6b
- TTL_74107(ic_f6b, ic_f9.QD, high, high, ic_e7b.Q)
- TTL_7430_NAND(ic_f7, ic_f8.QB, ic_f8.QC, ic_f9.QC, ic_f9.QD, ic_f6b.Q, high, high, high)
- TTL_7474(ic_e7b, clk, ic_f7, high, high)
-
- NET_ALIAS(hreset, ic_e7b.QQ)
- NET_ALIAS(hresetQ, ic_e7b.Q)
- NET_ALIAS( 4H, ic_f8.QC)
- NET_ALIAS( 8H, ic_f8.QD)
- NET_ALIAS( 16H, ic_f9.QA)
- NET_ALIAS( 32H, ic_f9.QB)
- NET_ALIAS( 64H, ic_f9.QC)
- NET_ALIAS(128H, ic_f9.QD)
- NET_ALIAS(256H, ic_f6b.Q)
- NET_ALIAS(256HQ, ic_f6b.QQ)
-
- // ----------------------------------------------------------------------------------------
- // vertical counter
- // ----------------------------------------------------------------------------------------
- TTL_7493(ic_e8, hreset, ic_e8.QA, ic_e7a.QQ, ic_e7a.QQ) // e8, e9, d9b
- TTL_7493(ic_e9, ic_e8.QD,ic_e9.QA, ic_e7a.QQ, ic_e7a.QQ) // e8, e9, d9b
- TTL_74107(ic_d9b, ic_e9.QD, high, high, ic_e7a.Q)
- TTL_7474(ic_e7a, hreset, e7a_data, high, high)
- TTL_7410_NAND(e7a_data, ic_e8.QA, ic_e8.QC, ic_d9b.Q)
-
- NET_ALIAS(vreset, ic_e7a.QQ)
- NET_ALIAS( 4V, ic_e8.QC)
- NET_ALIAS( 8V, ic_e8.QD)
- NET_ALIAS( 16V, ic_e9.QA)
- NET_ALIAS( 32V, ic_e9.QB)
- NET_ALIAS( 64V, ic_e9.QC)
- NET_ALIAS(128V, ic_e9.QD)
- NET_ALIAS(256V, ic_d9b.Q)
- NET_ALIAS(256VQ, ic_d9b.QQ)
-
-
- // ----------------------------------------------------------------------------------------
- // hblank flip flop
- // ----------------------------------------------------------------------------------------
-
- TTL_7400_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)
-
- NET_ALIAS(hblank, ic_h5c.Q)
- NET_ALIAS(hblankQ, ic_h5b.Q)
- TTL_7400_NAND(hsyncQ, hblank, 32H)
-
- // ----------------------------------------------------------------------------------------
- // vblank flip flop
- // ----------------------------------------------------------------------------------------
- TTL_7402_NOR(ic_f5c, ic_f5d.Q, vreset)
- TTL_7402_NOR(ic_f5d, ic_f5c.Q, 16V)
-
- NET_ALIAS(vblank, ic_f5d.Q)
- NET_ALIAS(vblankQ, ic_f5c.Q)
-
- TTL_7400_NAND(ic_h5a, 8V, 8V)
- TTL_7410_NAND(ic_g5a, vblank, 4V, ic_h5a.Q)
- NET_ALIAS(vsyncQ, ic_g5a.Q)
-
- // ----------------------------------------------------------------------------------------
- // move logic
- // ----------------------------------------------------------------------------------------
-
- TTL_7400_NAND(ic_e1d, hit_sound, ic_e1c.Q)
- TTL_7400_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_7400_NAND(ic_h1c, ic_h1d.Q, vreset)
- TTL_7400_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)
- NET_ALIAS(move, ic_h4a.Q)
-
- TTL_7400_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)
- NET_ALIAS(Aa, ic_h4c.Q)
- NET_ALIAS(Ba, ic_h4b.Q)
-
- // ----------------------------------------------------------------------------------------
- // hvid circuit
- // ----------------------------------------------------------------------------------------
-
- TTL_7400_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)
- TTL_74107(ic_g6b, ic_h7.RC, high, high, hball_resetQ)
- TTL_7410_NAND(ic_g5c, ic_g6b.Q, ic_h7.RC, ic_g7.RC)
- TTL_7420_NAND(ic_h6b, ic_g6b.Q, ic_h7.RC, ic_g7.QC, ic_g7.QD)
- NET_ALIAS(hvidQ, ic_h6b.Q)
-
- // ----------------------------------------------------------------------------------------
- // vvid circuit
- // ----------------------------------------------------------------------------------------
-
- 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_7410_NAND(ic_e2b, ic_a3.RC, ic_b3.QC, ic_b3.QD)
- NET_ALIAS(vvidQ, ic_e2b.Q)
- TTL_7404_INVERT(vvid, vvidQ) // D2D
- NET_ALIAS(vpos256, ic_a3.RC)
- NET_ALIAS(vpos32, ic_a3.QB)
- NET_ALIAS(vpos16, ic_a3.QA)
-
- // ----------------------------------------------------------------------------------------
- // vball ctrl circuit
- // ----------------------------------------------------------------------------------------
-
- TTL_7450_ANDORINVERT(ic_a6a, b1, 256HQ, b2, 256H)
- TTL_7450_ANDORINVERT(ic_a6b, c1, 256HQ, c2, 256H)
- TTL_7450_ANDORINVERT(ic_b6b, d1, 256HQ, d2, 256H)
-
- TTL_7474(ic_a5b, hit, ic_a6a, attractQ, high)
- TTL_7474(ic_a5a, hit, ic_a6b, attractQ, high)
- TTL_7474(ic_b5a, hit, ic_b6b, attractQ, high)
- TTL_74107(ic_h2x, vblank, vvid, vvid, hitQ) // two marked at position h2a ==> this h2x
-
- TTL_7486_XOR(ic_a4c, ic_a5b.Q, ic_h2x.Q)
- TTL_7486_XOR(ic_a4b, ic_a5a.Q, ic_h2x.Q)
-
- TTL_7450_ANDORINVERT(ic_b6a, ic_b5a.Q, ic_h2x.Q, ic_b5a.QQ, ic_h2x.QQ)
-
- TTL_7404_INVERT(ic_c4a, ic_b6a)
-
- TTL_7483(ic_b4, ic_a4c, ic_a4b, ic_b6a, low, ic_c4a, high, high, low, low)
- NET_ALIAS(a6, ic_b4.SA)
- NET_ALIAS(b6, ic_b4.SB)
- NET_ALIAS(c6, ic_b4.SC)
- NET_ALIAS(d6, ic_b4.SD)
-
- // ----------------------------------------------------------------------------------------
- // serve monoflop
- // ----------------------------------------------------------------------------------------
-
- TTL_7404_INVERT(f4_trig, rstspeed)
-
- NETDEV_R(ic_f4_serve_R, RES_K(330))
- NETDEV_C(ic_f4_serve_C, CAP_U(4.7))
- NETDEV_NE555(ic_f4_serve)
-
- NET_C(ic_f4_serve.VCC, V5)
- NET_C(ic_f4_serve.GND, GND)
- NET_C(ic_f4_serve.RESET, V5)
- NET_C(ic_f4_serve_R.1, V5)
- NET_C(ic_f4_serve_R.2, ic_f4_serve.THRESH)
- NET_C(ic_f4_serve_R.2, ic_f4_serve.DISCH)
- NET_C(f4_trig, ic_f4_serve.TRIG)
- NET_C(ic_f4_serve_R.2, ic_f4_serve_C.1)
- NET_C(GND, ic_f4_serve_C.2)
-
- TTL_7427_NOR(ic_e5a, ic_f4_serve.OUT, StopG, runQ)
- TTL_7474(ic_b5b_serve, pad1, ic_e5a, ic_e5a, high)
-
- NET_ALIAS(Serve, ic_b5b_serve.QQ)
- NET_ALIAS(ServeQ, ic_b5b_serve.Q)
-
- // ----------------------------------------------------------------------------------------
- // score logic
- // ----------------------------------------------------------------------------------------
-
- TTL_7474(ic_h3a, 4H, 128H, high, attractQ)
-
- // ----------------------------------------------------------------------------------------
- // sound logic
- // ----------------------------------------------------------------------------------------
- TTL_7474(ic_c2a, vpos256, high, hitQ, high)
- TTL_74107(ic_f3_topbot, vblank, vvid, vvidQ, ServeQ)
-
- // ----------------------------------------------------------------------------------------
- // monoflop with NE555 determines duration of score sound
- // ----------------------------------------------------------------------------------------
-
- NETDEV_R(ic_g4_R, RES_K(220))
- NETDEV_C(ic_g4_C, CAP_U(1))
- NETDEV_NE555(ic_g4_sc)
- NET_ALIAS(SC, ic_g4_sc.OUT)
-
- NET_C(ic_g4_sc.VCC, V5)
- NET_C(ic_g4_sc.GND, GND)
- NET_C(ic_g4_sc.RESET, V5)
- NET_C(ic_g4_R.1, V5)
- NET_C(ic_g4_R.2, ic_g4_sc.THRESH)
- NET_C(ic_g4_R.2, ic_g4_sc.DISCH)
- NET_C(MissQ, ic_g4_sc.TRIG)
- NET_C(ic_g4_R.2, ic_g4_C.1)
- NET_C(GND, ic_g4_C.2)
-
- NET_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_7410_NAND(ic_c4b, topbothitsound, hit_sound, score_sound)
- TTL_7400_NAND(ic_c1b, ic_c4b.Q, attractQ)
- NET_ALIAS(sound, ic_c1b.Q)
-
-
- // ----------------------------------------------------------------------------------------
- // paddle1 logic 1
- // ----------------------------------------------------------------------------------------
-
- NETDEV_POT(ic_b9_POT, RES_K(1)) // This is a guess!!
- NETDEV_PARAM(ic_b9_POT.DIALLOG, 1) // Log Dial ...
- NETDEV_R(ic_b9_RPRE, 470)
-
- NET_C(ic_b9_POT.1, V5)
- NET_C(ic_b9_POT.3, GND)
- NET_C(ic_b9_POT.2, ic_b9_RPRE.1)
- NET_C(ic_b9_RPRE.2, ic_b9.CONT)
-
- NETDEV_R(ic_b9_R, RES_K(81)) // Adjustment pot
- NETDEV_C(ic_b9_C, CAP_U(.1))
- NETDEV_D(ic_b9_D, 1N914)
- NETDEV_NE555(ic_b9)
-
- NET_C(ic_b9.VCC, V5)
- NET_C(ic_b9.GND, GND)
- NET_C(ic_b9.RESET, V5)
- NET_C(ic_b9_R.1, V5)
- NET_C(ic_b9_R.2, ic_b9.THRESH)
- NET_C(ic_b9_R.2, ic_b9_D.A)
- NET_C(ic_b9_D.K, ic_b9.DISCH)
- NET_C(256VQ, ic_b9.TRIG)
- NET_C(ic_b9_R.2, ic_b9_C.1)
- 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_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_7420_NAND(ic_a7b, ic_b8.QA, ic_b8.QB, ic_b8.QC, ic_b8.QD)
- NET_ALIAS(vpad1Q, ic_b7a.Q)
-
- NET_ALIAS(b1, ic_b8.QB)
- NET_ALIAS(c1, ic_b8.QC)
- NET_ALIAS(d1, ic_b8.QD)
-
- // ----------------------------------------------------------------------------------------
- // paddle1 logic 2
- // ----------------------------------------------------------------------------------------
-
- NETDEV_POT(ic_a9_POT, RES_K(1)) // This is a guess!!
+ TTL_7404_INVERT(hitQ, hit)
+ TTL_7400_NAND(hit, hit1Q, hit2Q)
+
+ TTL_7402_NOR(attractQ, StopG, runQ)
+ TTL_7404_INVERT(attract, attractQ)
+
+ TTL_7420_NAND(ic_h6a, hvidQ, hvidQ, hvidQ, hvidQ)
+ NET_ALIAS(hvid, ic_h6a.Q)
+
+ TTL_7400_NAND(ic_e6c, hvid, hblank)
+ NET_ALIAS(MissQ, ic_e6c.Q)
+
+ TTL_7404_INVERT(ic_d1e, MissQ)
+ TTL_7400_NAND(ic_e1a, ic_d1e.Q, attractQ)
+ NET_ALIAS(Missed, ic_e1a.Q)
+
+ TTL_7400_NAND(rstspeed, SRSTQ, MissQ)
+ TTL_7400_NAND(StopG, StopG1Q, StopG2Q)
+ NET_ALIAS(L, ic_h3b.Q)
+ NET_ALIAS(R, ic_h3b.QQ)
+
+ TTL_7400_NAND(hit1Q, pad1, ic_g1b.Q)
+ TTL_7400_NAND(hit2Q, pad2, ic_g1b.Q)
+
+ TTL_7400_NAND(ic_g3c, 128H, ic_h3a.QQ)
+ TTL_7427_NOR(ic_g2c, ic_g3c.Q, 256H, vpad1Q)
+ NET_ALIAS(pad1, ic_g2c.Q)
+ TTL_7427_NOR(ic_g2a, ic_g3c.Q, 256HQ, vpad2Q)
+ NET_ALIAS(pad2, ic_g2a.Q)
+
+ // ----------------------------------------------------------------------------------------
+ // horizontal counter
+ // ----------------------------------------------------------------------------------------
+ TTL_7493(ic_f8, clk, ic_f8.QA, ic_e7b.QQ, ic_e7b.QQ) // f8, f9, f6b
+ TTL_7493(ic_f9, ic_f8.QD, ic_f9.QA, ic_e7b.QQ, ic_e7b.QQ) // f8, f9, f6b
+ TTL_74107(ic_f6b, ic_f9.QD, high, high, ic_e7b.Q)
+ TTL_7430_NAND(ic_f7, ic_f8.QB, ic_f8.QC, ic_f9.QC, ic_f9.QD, ic_f6b.Q, high, high, high)
+ TTL_7474(ic_e7b, clk, ic_f7, high, high)
+
+ NET_ALIAS(hreset, ic_e7b.QQ)
+ NET_ALIAS(hresetQ, ic_e7b.Q)
+ NET_ALIAS( 4H, ic_f8.QC)
+ NET_ALIAS( 8H, ic_f8.QD)
+ NET_ALIAS( 16H, ic_f9.QA)
+ NET_ALIAS( 32H, ic_f9.QB)
+ NET_ALIAS( 64H, ic_f9.QC)
+ NET_ALIAS(128H, ic_f9.QD)
+ NET_ALIAS(256H, ic_f6b.Q)
+ NET_ALIAS(256HQ, ic_f6b.QQ)
+
+ // ----------------------------------------------------------------------------------------
+ // vertical counter
+ // ----------------------------------------------------------------------------------------
+ TTL_7493(ic_e8, hreset, ic_e8.QA, ic_e7a.QQ, ic_e7a.QQ) // e8, e9, d9b
+ TTL_7493(ic_e9, ic_e8.QD,ic_e9.QA, ic_e7a.QQ, ic_e7a.QQ) // e8, e9, d9b
+ TTL_74107(ic_d9b, ic_e9.QD, high, high, ic_e7a.Q)
+ TTL_7474(ic_e7a, hreset, e7a_data, high, high)
+ TTL_7410_NAND(e7a_data, ic_e8.QA, ic_e8.QC, ic_d9b.Q)
+
+ NET_ALIAS(vreset, ic_e7a.QQ)
+ NET_ALIAS( 4V, ic_e8.QC)
+ NET_ALIAS( 8V, ic_e8.QD)
+ NET_ALIAS( 16V, ic_e9.QA)
+ NET_ALIAS( 32V, ic_e9.QB)
+ NET_ALIAS( 64V, ic_e9.QC)
+ NET_ALIAS(128V, ic_e9.QD)
+ NET_ALIAS(256V, ic_d9b.Q)
+ NET_ALIAS(256VQ, ic_d9b.QQ)
+
+
+ // ----------------------------------------------------------------------------------------
+ // hblank flip flop
+ // ----------------------------------------------------------------------------------------
+
+ TTL_7400_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)
+
+ NET_ALIAS(hblank, ic_h5c.Q)
+ NET_ALIAS(hblankQ, ic_h5b.Q)
+ TTL_7400_NAND(hsyncQ, hblank, 32H)
+
+ // ----------------------------------------------------------------------------------------
+ // vblank flip flop
+ // ----------------------------------------------------------------------------------------
+ TTL_7402_NOR(ic_f5c, ic_f5d.Q, vreset)
+ TTL_7402_NOR(ic_f5d, ic_f5c.Q, 16V)
+
+ NET_ALIAS(vblank, ic_f5d.Q)
+ NET_ALIAS(vblankQ, ic_f5c.Q)
+
+ TTL_7400_NAND(ic_h5a, 8V, 8V)
+ TTL_7410_NAND(ic_g5a, vblank, 4V, ic_h5a.Q)
+ NET_ALIAS(vsyncQ, ic_g5a.Q)
+
+ // ----------------------------------------------------------------------------------------
+ // move logic
+ // ----------------------------------------------------------------------------------------
+
+ TTL_7400_NAND(ic_e1d, hit_sound, ic_e1c.Q)
+ TTL_7400_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_7400_NAND(ic_h1c, ic_h1d.Q, vreset)
+ TTL_7400_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)
+ NET_ALIAS(move, ic_h4a.Q)
+
+ TTL_7400_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)
+ NET_ALIAS(Aa, ic_h4c.Q)
+ NET_ALIAS(Ba, ic_h4b.Q)
+
+ // ----------------------------------------------------------------------------------------
+ // hvid circuit
+ // ----------------------------------------------------------------------------------------
+
+ TTL_7400_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)
+ TTL_74107(ic_g6b, ic_h7.RC, high, high, hball_resetQ)
+ TTL_7410_NAND(ic_g5c, ic_g6b.Q, ic_h7.RC, ic_g7.RC)
+ TTL_7420_NAND(ic_h6b, ic_g6b.Q, ic_h7.RC, ic_g7.QC, ic_g7.QD)
+ NET_ALIAS(hvidQ, ic_h6b.Q)
+
+ // ----------------------------------------------------------------------------------------
+ // vvid circuit
+ // ----------------------------------------------------------------------------------------
+
+ 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_7410_NAND(ic_e2b, ic_a3.RC, ic_b3.QC, ic_b3.QD)
+ NET_ALIAS(vvidQ, ic_e2b.Q)
+ TTL_7404_INVERT(vvid, vvidQ) // D2D
+ NET_ALIAS(vpos256, ic_a3.RC)
+ NET_ALIAS(vpos32, ic_a3.QB)
+ NET_ALIAS(vpos16, ic_a3.QA)
+
+ // ----------------------------------------------------------------------------------------
+ // vball ctrl circuit
+ // ----------------------------------------------------------------------------------------
+
+ TTL_7450_ANDORINVERT(ic_a6a, b1, 256HQ, b2, 256H)
+ TTL_7450_ANDORINVERT(ic_a6b, c1, 256HQ, c2, 256H)
+ TTL_7450_ANDORINVERT(ic_b6b, d1, 256HQ, d2, 256H)
+
+ TTL_7474(ic_a5b, hit, ic_a6a, attractQ, high)
+ TTL_7474(ic_a5a, hit, ic_a6b, attractQ, high)
+ TTL_7474(ic_b5a, hit, ic_b6b, attractQ, high)
+ TTL_74107(ic_h2x, vblank, vvid, vvid, hitQ) // two marked at position h2a ==> this h2x
+
+ TTL_7486_XOR(ic_a4c, ic_a5b.Q, ic_h2x.Q)
+ TTL_7486_XOR(ic_a4b, ic_a5a.Q, ic_h2x.Q)
+
+ TTL_7450_ANDORINVERT(ic_b6a, ic_b5a.Q, ic_h2x.Q, ic_b5a.QQ, ic_h2x.QQ)
+
+ TTL_7404_INVERT(ic_c4a, ic_b6a)
+
+ TTL_7483(ic_b4, ic_a4c, ic_a4b, ic_b6a, low, ic_c4a, high, high, low, low)
+ NET_ALIAS(a6, ic_b4.SA)
+ NET_ALIAS(b6, ic_b4.SB)
+ NET_ALIAS(c6, ic_b4.SC)
+ NET_ALIAS(d6, ic_b4.SD)
+
+ // ----------------------------------------------------------------------------------------
+ // serve monoflop
+ // ----------------------------------------------------------------------------------------
+
+ TTL_7404_INVERT(f4_trig, rstspeed)
+
+ NETDEV_R(ic_f4_serve_R, RES_K(330))
+ NETDEV_C(ic_f4_serve_C, CAP_U(4.7))
+ NETDEV_NE555(ic_f4_serve)
+
+ NET_C(ic_f4_serve.VCC, V5)
+ NET_C(ic_f4_serve.GND, GND)
+ NET_C(ic_f4_serve.RESET, V5)
+ NET_C(ic_f4_serve_R.1, V5)
+ NET_C(ic_f4_serve_R.2, ic_f4_serve.THRESH)
+ NET_C(ic_f4_serve_R.2, ic_f4_serve.DISCH)
+ NET_C(f4_trig, ic_f4_serve.TRIG)
+ NET_C(ic_f4_serve_R.2, ic_f4_serve_C.1)
+ NET_C(GND, ic_f4_serve_C.2)
+
+ TTL_7427_NOR(ic_e5a, ic_f4_serve.OUT, StopG, runQ)
+ TTL_7474(ic_b5b_serve, pad1, ic_e5a, ic_e5a, high)
+
+ NET_ALIAS(Serve, ic_b5b_serve.QQ)
+ NET_ALIAS(ServeQ, ic_b5b_serve.Q)
+
+ // ----------------------------------------------------------------------------------------
+ // score logic
+ // ----------------------------------------------------------------------------------------
+
+ TTL_7474(ic_h3a, 4H, 128H, high, attractQ)
+
+ // ----------------------------------------------------------------------------------------
+ // sound logic
+ // ----------------------------------------------------------------------------------------
+ TTL_7474(ic_c2a, vpos256, high, hitQ, high)
+ TTL_74107(ic_f3_topbot, vblank, vvid, vvidQ, ServeQ)
+
+ // ----------------------------------------------------------------------------------------
+ // monoflop with NE555 determines duration of score sound
+ // ----------------------------------------------------------------------------------------
+
+ NETDEV_R(ic_g4_R, RES_K(220))
+ NETDEV_C(ic_g4_C, CAP_U(1))
+ NETDEV_NE555(ic_g4_sc)
+ NET_ALIAS(SC, ic_g4_sc.OUT)
+
+ NET_C(ic_g4_sc.VCC, V5)
+ NET_C(ic_g4_sc.GND, GND)
+ NET_C(ic_g4_sc.RESET, V5)
+ NET_C(ic_g4_R.1, V5)
+ NET_C(ic_g4_R.2, ic_g4_sc.THRESH)
+ NET_C(ic_g4_R.2, ic_g4_sc.DISCH)
+ NET_C(MissQ, ic_g4_sc.TRIG)
+ NET_C(ic_g4_R.2, ic_g4_C.1)
+ NET_C(GND, ic_g4_C.2)
+
+ NET_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_7410_NAND(ic_c4b, topbothitsound, hit_sound, score_sound)
+ TTL_7400_NAND(ic_c1b, ic_c4b.Q, attractQ)
+ NET_ALIAS(sound, ic_c1b.Q)
+
+
+ // ----------------------------------------------------------------------------------------
+ // paddle1 logic 1
+ // ----------------------------------------------------------------------------------------
+
+ NETDEV_POT(ic_b9_POT, RES_K(1)) // This is a guess!!
+ NETDEV_PARAM(ic_b9_POT.DIALLOG, 1) // Log Dial ...
+ NETDEV_R(ic_b9_RPRE, 470)
+
+ NET_C(ic_b9_POT.1, V5)
+ NET_C(ic_b9_POT.3, GND)
+ NET_C(ic_b9_POT.2, ic_b9_RPRE.1)
+ NET_C(ic_b9_RPRE.2, ic_b9.CONT)
+
+ NETDEV_R(ic_b9_R, RES_K(81)) // Adjustment pot
+ NETDEV_C(ic_b9_C, CAP_U(.1))
+ NETDEV_D(ic_b9_D, "1N914")
+ NETDEV_NE555(ic_b9)
+
+ NET_C(ic_b9.VCC, V5)
+ NET_C(ic_b9.GND, GND)
+ NET_C(ic_b9.RESET, V5)
+ NET_C(ic_b9_R.1, V5)
+ NET_C(ic_b9_R.2, ic_b9.THRESH)
+ NET_C(ic_b9_R.2, ic_b9_D.A)
+ NET_C(ic_b9_D.K, ic_b9.DISCH)
+ NET_C(256VQ, ic_b9.TRIG)
+ NET_C(ic_b9_R.2, ic_b9_C.1)
+ 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_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_7420_NAND(ic_a7b, ic_b8.QA, ic_b8.QB, ic_b8.QC, ic_b8.QD)
+ NET_ALIAS(vpad1Q, ic_b7a.Q)
+
+ NET_ALIAS(b1, ic_b8.QB)
+ NET_ALIAS(c1, ic_b8.QC)
+ NET_ALIAS(d1, ic_b8.QD)
+
+ // ----------------------------------------------------------------------------------------
+ // paddle1 logic 2
+ // ----------------------------------------------------------------------------------------
+
+ NETDEV_POT(ic_a9_POT, RES_K(1)) // This is a guess!!
NETDEV_PARAM(ic_a9_POT.DIALLOG, 1) // Log Dial ...
- NETDEV_R(ic_a9_RPRE, 470)
-
- NET_C(ic_a9_POT.1, V5)
- NET_C(ic_a9_POT.3, GND)
- NET_C(ic_a9_POT.2, ic_a9_RPRE.1)
- NET_C(ic_a9_RPRE.2, ic_a9.CONT)
-
- NETDEV_R(ic_a9_R, RES_K(81)) // Adjustment pot
- NETDEV_C(ic_a9_C, CAP_U(.1))
- NETDEV_D(ic_a9_D, 1N914)
- NETDEV_NE555(ic_a9)
-
- NET_C(ic_a9.VCC, V5)
- NET_C(ic_a9.GND, GND)
- NET_C(ic_a9.RESET, V5)
- NET_C(ic_a9_R.1, V5)
- NET_C(ic_a9_R.2, ic_a9.THRESH)
- NET_C(ic_a9_R.2, ic_a9_D.A)
- NET_C(ic_a9_D.K, ic_a9.DISCH)
- NET_C(256VQ, ic_a9.TRIG)
- NET_C(ic_a9_R.2, ic_a9_C.1)
- 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_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_7420_NAND(ic_a7a, ic_a8.QA, ic_a8.QB, ic_a8.QC, ic_a8.QD)
- NET_ALIAS(vpad2Q, ic_b7d.Q)
-
- NET_ALIAS(b2, ic_a8.QB)
- NET_ALIAS(c2, ic_a8.QC)
- NET_ALIAS(d2, ic_a8.QD)
-
- // ----------------------------------------------------------------------------------------
- // C5-EN Logic
- // ----------------------------------------------------------------------------------------
-
- TTL_7404_INVERT(ic_e3a, 128H)
- TTL_7427_NOR( ic_e3b, 256H, 64H, ic_e3a.Q)
- TTL_7410_NAND(ic_e2c, 256H, 64H, ic_e3a.Q)
- TTL_7404_INVERT(ic_e3c, ic_e2c.Q)
- TTL_7402_NOR(ic_d2c, ic_e3c.Q, ic_e3b.Q)
- TTL_7404_INVERT(ic_g1a, 32V)
- TTL_7425_NOR(ic_f2a, ic_g1a.Q, 64V, 128V, ic_d2c.Q)
- NET_ALIAS(c5_en, ic_f2a.Q)
-
- // ----------------------------------------------------------------------------------------
- // Score logic ...
- // ----------------------------------------------------------------------------------------
-
- TTL_7402_NOR(ic_f5b, L, Missed)
- TTL_7490(ic_c7, ic_f5b, SRST, SRST, low, low)
- TTL_74107(ic_c8a, ic_c7.QD, high, high, SRSTQ)
- NETDEV_SWITCH2(sw1a, high, ic_c7.QC)
- NETDEV_PARAM(sw1a.POS, 0)
- TTL_7410_NAND(ic_d8a, ic_c7.QA, sw1a.Q, ic_c8a.Q) // would be nand2 for 11 instead of 15 points, need a switch dev!
-
- NET_ALIAS(StopG1Q, ic_d8a.Q)
- NET_ALIAS(score1_1, ic_c7.QA)
- NET_ALIAS(score1_2, ic_c7.QB)
- NET_ALIAS(score1_4, ic_c7.QC)
- NET_ALIAS(score1_8, ic_c7.QD)
- NET_ALIAS(score1_10, ic_c8a.Q)
- NET_ALIAS(score1_10Q, ic_c8a.QQ)
-
- TTL_7402_NOR(ic_f5a, R, Missed)
- TTL_7490(ic_d7, ic_f5a, SRST, SRST, low, low)
- TTL_74107(ic_c8b, ic_d7.QD, high, high, SRSTQ)
- NETDEV_SWITCH2(sw1b, high, ic_d7.QC)
- NETDEV_PARAM(sw1b.POS, 0)
- TTL_7410_NAND(ic_d8b, ic_d7.QA, sw1b.Q, ic_c8b.Q) // would be nand2 for 11 instead of 15 points, need a switch dev!
-
- NET_ALIAS(StopG2Q, ic_d8b.Q)
- NET_ALIAS(score2_1, ic_d7.QA)
- NET_ALIAS(score2_2, ic_d7.QB)
- NET_ALIAS(score2_4, ic_d7.QC)
- NET_ALIAS(score2_8, ic_d7.QD)
- NET_ALIAS(score2_10, ic_c8b.Q)
- NET_ALIAS(score2_10Q, ic_c8b.QQ)
-
- // ----------------------------------------------------------------------------------------
- // Score display
- // ----------------------------------------------------------------------------------------
-
- TTL_74153(ic_d6a, score1_10Q, score1_4, score2_10Q, score2_4, 32H, 64H, low)
- TTL_74153(ic_d6b, score1_10Q, score1_8, score2_10Q, score2_8, 32H, 64H, low)
-
- TTL_74153(ic_c6a, high, score1_1, high, score2_1, 32H, 64H, low)
- TTL_74153(ic_c6b, score1_10Q, score1_2, score2_10Q, score2_2, 32H, 64H, low)
-
- TTL_7448(ic_c5, ic_c6a.AY, ic_c6b.AY, ic_d6a.AY, ic_d6b.AY, high, c5_en, high)
-
- TTL_7404_INVERT(ic_e4b, 16H)
- TTL_7427_NOR(ic_e5c, ic_e4b.Q, 8H, 4H)
- NET_ALIAS(scoreFE, ic_e5c.Q)
-
- TTL_7400_NAND(ic_c3d, 8H, 4H)
- //TTL_7400_NAND(ic_c3d, 4H, 8H)
- TTL_7402_NOR(ic_d2b, ic_e4b.Q, ic_c3d.Q)
- NET_ALIAS(scoreBC, ic_d2b.Q)
-
- TTL_7427_NOR(ic_e5b, ic_e4b.Q, 8V, 4V)
- NET_ALIAS(scoreA, ic_e5b.Q)
-
- TTL_7410_NAND(ic_e2a, 16H, 8V, 4V)
- TTL_7404_INVERT(ic_e4a, ic_e2a.Q)
- NET_ALIAS(scoreGD, ic_e4a.Q)
-
- TTL_7404_INVERT(ic_e4c, 16V)
-
- TTL_7410_NAND(ic_d4a, ic_e4c.Q, ic_c5.f, scoreFE)
- TTL_7410_NAND(ic_d5c, 16V, ic_c5.e, scoreFE)
- TTL_7410_NAND(ic_c4c, ic_e4c.Q, ic_c5.b, scoreBC)
- TTL_7410_NAND(ic_d5a, 16V, ic_c5.c, scoreBC)
- TTL_7410_NAND(ic_d4c, ic_e4c.Q, ic_c5.a, scoreA)
- TTL_7410_NAND(ic_d4b, ic_e4c.Q, ic_c5.g, scoreGD)
- TTL_7410_NAND(ic_d5b, 16V, ic_c5.d, scoreGD)
-
- TTL_7430_NAND(ic_d3, ic_d4a, ic_d5c, ic_c4c, ic_d5a, ic_d4c, ic_d4b, ic_d5b, high)
- NET_ALIAS(score, ic_d3.Q) //FIXME
-
- // net
- TTL_74107(ic_f3b, clk, 256H, 256HQ, high)
- TTL_7400_NAND(ic_g3b, ic_f3b.QQ, 256H)
- TTL_7427_NOR(ic_g2b, ic_g3b.Q, vblank, 4V)
- NET_ALIAS(net, ic_g2b.Q)
-
- // ----------------------------------------------------------------------------------------
- // video
- // ----------------------------------------------------------------------------------------
-
- TTL_7402_NOR(ic_g1b, hvidQ, vvidQ)
- TTL_7425_NOR(ic_f2b, ic_g1b.Q, pad1, pad2, net)
- TTL_7404_INVERT(ic_e4e, ic_f2b.Q)
- NET_ALIAS(video, ic_e4e.Q)
-
- TTL_7486_XOR(ic_a4d, hsyncQ, vsyncQ)
- TTL_7404_INVERT(ic_e4f, ic_a4d.Q)
-
- NETDEV_R(RV1, RES_K(1))
- NETDEV_R(RV2, RES_K(1.2))
- NETDEV_R(RV3, RES_K(22))
- NET_C(video, RV1.1)
- NET_C(score, RV2.1)
- NET_C(ic_e4f.Q, RV3.1)
- NET_C(RV1.2, RV2.2)
- NET_C(RV2.2, RV3.2)
-
- NET_ALIAS(videomix, RV3.2)
+ NETDEV_R(ic_a9_RPRE, 470)
+
+ NET_C(ic_a9_POT.1, V5)
+ NET_C(ic_a9_POT.3, GND)
+ NET_C(ic_a9_POT.2, ic_a9_RPRE.1)
+ NET_C(ic_a9_RPRE.2, ic_a9.CONT)
+
+ NETDEV_R(ic_a9_R, RES_K(81)) // Adjustment pot
+ NETDEV_C(ic_a9_C, CAP_U(.1))
+ NETDEV_D(ic_a9_D, "1N914")
+ NETDEV_NE555(ic_a9)
+
+ NET_C(ic_a9.VCC, V5)
+ NET_C(ic_a9.GND, GND)
+ NET_C(ic_a9.RESET, V5)
+ NET_C(ic_a9_R.1, V5)
+ NET_C(ic_a9_R.2, ic_a9.THRESH)
+ NET_C(ic_a9_R.2, ic_a9_D.A)
+ NET_C(ic_a9_D.K, ic_a9.DISCH)
+ NET_C(256VQ, ic_a9.TRIG)
+ NET_C(ic_a9_R.2, ic_a9_C.1)
+ 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_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_7420_NAND(ic_a7a, ic_a8.QA, ic_a8.QB, ic_a8.QC, ic_a8.QD)
+ NET_ALIAS(vpad2Q, ic_b7d.Q)
+
+ NET_ALIAS(b2, ic_a8.QB)
+ NET_ALIAS(c2, ic_a8.QC)
+ NET_ALIAS(d2, ic_a8.QD)
+
+ // ----------------------------------------------------------------------------------------
+ // C5-EN Logic
+ // ----------------------------------------------------------------------------------------
+
+ TTL_7404_INVERT(ic_e3a, 128H)
+ TTL_7427_NOR( ic_e3b, 256H, 64H, ic_e3a.Q)
+ TTL_7410_NAND(ic_e2c, 256H, 64H, ic_e3a.Q)
+ TTL_7404_INVERT(ic_e3c, ic_e2c.Q)
+ TTL_7402_NOR(ic_d2c, ic_e3c.Q, ic_e3b.Q)
+ TTL_7404_INVERT(ic_g1a, 32V)
+ TTL_7425_NOR(ic_f2a, ic_g1a.Q, 64V, 128V, ic_d2c.Q)
+ NET_ALIAS(c5_en, ic_f2a.Q)
+
+ // ----------------------------------------------------------------------------------------
+ // Score logic ...
+ // ----------------------------------------------------------------------------------------
+
+ TTL_7402_NOR(ic_f5b, L, Missed)
+ TTL_7490(ic_c7, ic_f5b, SRST, SRST, low, low)
+ TTL_74107(ic_c8a, ic_c7.QD, high, high, SRSTQ)
+ NETDEV_SWITCH2(sw1a, high, ic_c7.QC)
+ NETDEV_PARAM(sw1a.POS, 0)
+ TTL_7410_NAND(ic_d8a, ic_c7.QA, sw1a.Q, ic_c8a.Q) // would be nand2 for 11 instead of 15 points, need a switch dev!
+
+ NET_ALIAS(StopG1Q, ic_d8a.Q)
+ NET_ALIAS(score1_1, ic_c7.QA)
+ NET_ALIAS(score1_2, ic_c7.QB)
+ NET_ALIAS(score1_4, ic_c7.QC)
+ NET_ALIAS(score1_8, ic_c7.QD)
+ NET_ALIAS(score1_10, ic_c8a.Q)
+ NET_ALIAS(score1_10Q, ic_c8a.QQ)
+
+ TTL_7402_NOR(ic_f5a, R, Missed)
+ TTL_7490(ic_d7, ic_f5a, SRST, SRST, low, low)
+ TTL_74107(ic_c8b, ic_d7.QD, high, high, SRSTQ)
+ NETDEV_SWITCH2(sw1b, high, ic_d7.QC)
+ NETDEV_PARAM(sw1b.POS, 0)
+ TTL_7410_NAND(ic_d8b, ic_d7.QA, sw1b.Q, ic_c8b.Q) // would be nand2 for 11 instead of 15 points, need a switch dev!
+
+ NET_ALIAS(StopG2Q, ic_d8b.Q)
+ NET_ALIAS(score2_1, ic_d7.QA)
+ NET_ALIAS(score2_2, ic_d7.QB)
+ NET_ALIAS(score2_4, ic_d7.QC)
+ NET_ALIAS(score2_8, ic_d7.QD)
+ NET_ALIAS(score2_10, ic_c8b.Q)
+ NET_ALIAS(score2_10Q, ic_c8b.QQ)
+
+ // ----------------------------------------------------------------------------------------
+ // Score display
+ // ----------------------------------------------------------------------------------------
+
+ TTL_74153(ic_d6a, score1_10Q, score1_4, score2_10Q, score2_4, 32H, 64H, low)
+ TTL_74153(ic_d6b, score1_10Q, score1_8, score2_10Q, score2_8, 32H, 64H, low)
+
+ TTL_74153(ic_c6a, high, score1_1, high, score2_1, 32H, 64H, low)
+ TTL_74153(ic_c6b, score1_10Q, score1_2, score2_10Q, score2_2, 32H, 64H, low)
+
+ TTL_7448(ic_c5, ic_c6a.AY, ic_c6b.AY, ic_d6a.AY, ic_d6b.AY, high, c5_en, high)
+
+ TTL_7404_INVERT(ic_e4b, 16H)
+ TTL_7427_NOR(ic_e5c, ic_e4b.Q, 8H, 4H)
+ NET_ALIAS(scoreFE, ic_e5c.Q)
+
+ TTL_7400_NAND(ic_c3d, 8H, 4H)
+ //TTL_7400_NAND(ic_c3d, 4H, 8H)
+ TTL_7402_NOR(ic_d2b, ic_e4b.Q, ic_c3d.Q)
+ NET_ALIAS(scoreBC, ic_d2b.Q)
+
+ TTL_7427_NOR(ic_e5b, ic_e4b.Q, 8V, 4V)
+ NET_ALIAS(scoreA, ic_e5b.Q)
+
+ TTL_7410_NAND(ic_e2a, 16H, 8V, 4V)
+ TTL_7404_INVERT(ic_e4a, ic_e2a.Q)
+ NET_ALIAS(scoreGD, ic_e4a.Q)
+
+ TTL_7404_INVERT(ic_e4c, 16V)
+
+ TTL_7410_NAND(ic_d4a, ic_e4c.Q, ic_c5.f, scoreFE)
+ TTL_7410_NAND(ic_d5c, 16V, ic_c5.e, scoreFE)
+ TTL_7410_NAND(ic_c4c, ic_e4c.Q, ic_c5.b, scoreBC)
+ TTL_7410_NAND(ic_d5a, 16V, ic_c5.c, scoreBC)
+ TTL_7410_NAND(ic_d4c, ic_e4c.Q, ic_c5.a, scoreA)
+ TTL_7410_NAND(ic_d4b, ic_e4c.Q, ic_c5.g, scoreGD)
+ TTL_7410_NAND(ic_d5b, 16V, ic_c5.d, scoreGD)
+
+ TTL_7430_NAND(ic_d3, ic_d4a, ic_d5c, ic_c4c, ic_d5a, ic_d4c, ic_d4b, ic_d5b, high)
+ NET_ALIAS(score, ic_d3.Q) //FIXME
+
+ // net
+ TTL_74107(ic_f3b, clk, 256H, 256HQ, high)
+ TTL_7400_NAND(ic_g3b, ic_f3b.QQ, 256H)
+ TTL_7427_NOR(ic_g2b, ic_g3b.Q, vblank, 4V)
+ NET_ALIAS(net, ic_g2b.Q)
+
+ // ----------------------------------------------------------------------------------------
+ // video
+ // ----------------------------------------------------------------------------------------
+
+ TTL_7402_NOR(ic_g1b, hvidQ, vvidQ)
+ TTL_7425_NOR(ic_f2b, ic_g1b.Q, pad1, pad2, net)
+ TTL_7404_INVERT(ic_e4e, ic_f2b.Q)
+ NET_ALIAS(video, ic_e4e.Q)
+
+ TTL_7486_XOR(ic_a4d, hsyncQ, vsyncQ)
+ TTL_7404_INVERT(ic_e4f, ic_a4d.Q)
+
+ NETDEV_R(RV1, RES_K(1))
+ NETDEV_R(RV2, RES_K(1.2))
+ NETDEV_R(RV3, RES_K(22))
+ NET_C(video, RV1.1)
+ NET_C(score, RV2.1)
+ NET_C(ic_e4f.Q, RV3.1)
+ NET_C(RV1.2, RV2.2)
+ NET_C(RV2.2, RV3.2)
+
+ NET_ALIAS(videomix, RV3.2)
NETLIST_END()
@@ -799,7 +799,7 @@ MACHINE_CONFIG_END
ROM_START( pong ) /* dummy to satisfy game entry*/
ROM_REGION( 0x10000, "maincpu", 0 ) /* enough for netlist */
- ROM_LOAD( "pong.netlist", 0x000000, 0x0043d9, CRC(64edd5a0) SHA1(9e661f2fba44f46015fdccffa7766dd4e61cdc7d) )
+ ROM_LOAD( "pong.netlist", 0x000000, 0x004400, CRC(64edd5a0) SHA1(9e661f2fba44f46015fdccffa7766dd4e61cdc7d) )
ROM_END
ROM_START( pongf ) /* dummy to satisfy game entry*/