mirror of
https://github.com/holub/mame
synced 2025-10-04 16:34:53 +03:00
More work on pong doubles. Working again (if enabled).
This commit is contained in:
parent
2ca54e049f
commit
962bf9df8b
@ -2,8 +2,12 @@
|
|||||||
// copyright-holders:DICE Team,couriersud
|
// copyright-holders:DICE Team,couriersud
|
||||||
/*
|
/*
|
||||||
* Changelog:
|
* Changelog:
|
||||||
* - Original version imported from DICE
|
* - Added discrete paddle potentiometers (couriersud)
|
||||||
* - Changes made to run in MAME (couriersud)
|
* - Changes made to run in MAME (couriersud)
|
||||||
|
* - Original version imported from DICE
|
||||||
|
*
|
||||||
|
* TODO:
|
||||||
|
* - implement trimmers
|
||||||
*
|
*
|
||||||
* The MAME team has asked for and received written confirmation from the
|
* The MAME team has asked for and received written confirmation from the
|
||||||
* author of DICE to use, modify and redistribute code under
|
* author of DICE to use, modify and redistribute code under
|
||||||
@ -68,11 +72,11 @@
|
|||||||
|
|
||||||
static Mono555Desc a3_555_desc(K_OHM(100.0), U_FARAD(0.1));
|
static Mono555Desc a3_555_desc(K_OHM(100.0), U_FARAD(0.1));
|
||||||
|
|
||||||
static Mono555Desc a10_555_desc(K_OHM(70.0), U_FARAD(0.1));
|
static Mono555Desc a10_555_desc(K_OHM(70.0), U_FARAD(0.1)); // actually 56k + 50k trimmer
|
||||||
static Mono555Desc b10_555_desc(K_OHM(70.0), U_FARAD(0.1));
|
static Mono555Desc b10_555_desc(K_OHM(70.0), U_FARAD(0.1)); // actually 56k + 50k trimmer
|
||||||
|
|
||||||
static Mono555Desc b9a_555_desc(K_OHM(70.0), U_FARAD(0.1));
|
static Mono555Desc b9a_555_desc(K_OHM(70.0), U_FARAD(0.1)); // actually 56k + 50k trimmer
|
||||||
static Mono555Desc b9b_555_desc(K_OHM(70.0), U_FARAD(0.1));
|
static Mono555Desc b9b_555_desc(K_OHM(70.0), U_FARAD(0.1)); // actually 56k + 50k trimmer
|
||||||
|
|
||||||
static Mono555Desc f5_555_desc(K_OHM(330.0), U_FARAD(4.7));
|
static Mono555Desc f5_555_desc(K_OHM(330.0), U_FARAD(4.7));
|
||||||
static Mono555Desc g5_555_desc(K_OHM(220.0), U_FARAD(1.0));
|
static Mono555Desc g5_555_desc(K_OHM(220.0), U_FARAD(1.0));
|
||||||
@ -137,6 +141,18 @@ CIRCUIT_LAYOUT( pongdoubles )
|
|||||||
//CHIP("B10", 555_Mono, &b10_555_desc)
|
//CHIP("B10", 555_Mono, &b10_555_desc)
|
||||||
CHIP_555_Mono(B10, &b10_555_desc)
|
CHIP_555_Mono(B10, &b10_555_desc)
|
||||||
|
|
||||||
|
// NETLIST - analog start
|
||||||
|
POT(B10_POT, RES_K(1)) // This is a guess!!
|
||||||
|
PARAM(B10_POT.DIALLOG, 1) // Log Dial ...
|
||||||
|
RES(B10_RPRE, 470)
|
||||||
|
|
||||||
|
NET_C(B10_POT.1, V5)
|
||||||
|
NET_C(B10_POT.3, GND)
|
||||||
|
NET_C(B10_POT.2, B10_RPRE.1)
|
||||||
|
NET_C(B10_RPRE.2, B10.5)
|
||||||
|
// NETLIST - analog end
|
||||||
|
|
||||||
|
|
||||||
CHIP("C10", 7404)
|
CHIP("C10", 7404)
|
||||||
CHIP("A7", 7493)
|
CHIP("A7", 7493)
|
||||||
CHIP("B8", 7400)
|
CHIP("B8", 7400)
|
||||||
@ -144,7 +160,19 @@ CIRCUIT_LAYOUT( pongdoubles )
|
|||||||
|
|
||||||
//CHIP("A10", 555_Mono, &a10_555_desc)
|
//CHIP("A10", 555_Mono, &a10_555_desc)
|
||||||
CHIP_555_Mono(A10, &a10_555_desc)
|
CHIP_555_Mono(A10, &a10_555_desc)
|
||||||
CHIP("A9", 7493)
|
|
||||||
|
// NETLIST - analog start
|
||||||
|
POT(A10_POT, RES_K(1)) // This is a guess!!
|
||||||
|
PARAM(A10_POT.DIALLOG, 1) // Log Dial ...
|
||||||
|
RES(A10_RPRE, 470)
|
||||||
|
|
||||||
|
NET_C(A10_POT.1, V5)
|
||||||
|
NET_C(A10_POT.3, GND)
|
||||||
|
NET_C(A10_POT.2, A10_RPRE.1)
|
||||||
|
NET_C(A10_RPRE.2, A10.5)
|
||||||
|
// NETLIST - analog end
|
||||||
|
|
||||||
|
CHIP("A9", 7493)
|
||||||
|
|
||||||
CHIP("H4", 7474)
|
CHIP("H4", 7474)
|
||||||
|
|
||||||
@ -208,9 +236,32 @@ CIRCUIT_LAYOUT( pongdoubles )
|
|||||||
|
|
||||||
//CHIP("B9A", 555_Mono, &b9a_555_desc)
|
//CHIP("B9A", 555_Mono, &b9a_555_desc)
|
||||||
CHIP_555_Mono(B9A, &b9a_555_desc)
|
CHIP_555_Mono(B9A, &b9a_555_desc)
|
||||||
|
|
||||||
|
// NETLIST - analog start
|
||||||
|
POT(B9A_POT, RES_K(1)) // This is a guess!!
|
||||||
|
PARAM(B9A_POT.DIALLOG, 1) // Log Dial ...
|
||||||
|
RES(B9A_RPRE, 470)
|
||||||
|
|
||||||
|
NET_C(B9A_POT.1, V5)
|
||||||
|
NET_C(B9A_POT.3, GND)
|
||||||
|
NET_C(B9A_POT.2, B9A_RPRE.1)
|
||||||
|
NET_C(B9A_RPRE.2, B9A.5)
|
||||||
|
// NETLIST - analog end
|
||||||
|
|
||||||
//CHIP("B9B", 555_Mono, &b9b_555_desc)
|
//CHIP("B9B", 555_Mono, &b9b_555_desc)
|
||||||
CHIP_555_Mono(B9B, &b9b_555_desc)
|
CHIP_555_Mono(B9B, &b9b_555_desc)
|
||||||
|
|
||||||
|
// NETLIST - analog start
|
||||||
|
POT(B9B_POT, RES_K(1)) // This is a guess!!
|
||||||
|
PARAM(B9B_POT.DIALLOG, 1) // Log Dial ...
|
||||||
|
RES(B9B_RPRE, 470)
|
||||||
|
|
||||||
|
NET_C(B9B_POT.1, V5)
|
||||||
|
NET_C(B9B_POT.3, GND)
|
||||||
|
NET_C(B9B_POT.2, B9B_RPRE.1)
|
||||||
|
NET_C(B9B_RPRE.2, B9B.5)
|
||||||
|
// NETLIST - analog end
|
||||||
|
|
||||||
CHIP_SERIES_RC(C33, &c33_desc)
|
CHIP_SERIES_RC(C33, &c33_desc)
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@ -235,11 +286,11 @@ CIRCUIT_LAYOUT( pongdoubles )
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//CHIP("COIN", COIN_INPUT)
|
//CHIP("COIN", COIN_INPUT)
|
||||||
CHIP_INPUT(COIN)
|
CHIP_INPUT_ACTIVE_LOW(COIN)
|
||||||
//CHIP("LATCH", LATCH)
|
//CHIP("LATCH", LATCH)
|
||||||
CHIP_LATCH(LATCH)
|
CHIP_LATCH(LATCH)
|
||||||
//CHIP("START", START_INPUT)
|
//CHIP("START", START_INPUT)
|
||||||
CHIP_INPUT(START)
|
CHIP_INPUT_ACTIVE_HIGH(START)
|
||||||
//CHIP("DIPSW1", DIPSWITCH, &dipswitch1_desc)
|
//CHIP("DIPSW1", DIPSWITCH, &dipswitch1_desc)
|
||||||
SWITCH2(DIPSW1)
|
SWITCH2(DIPSW1)
|
||||||
SWITCH2(DIPSW2)
|
SWITCH2(DIPSW2)
|
||||||
|
@ -841,17 +841,18 @@ ATTR_COLD void NETLIB_NAME(solver)::post_start()
|
|||||||
|
|
||||||
m_mat_solvers.add(ms);
|
m_mat_solvers.add(ms);
|
||||||
|
|
||||||
SOLVER_VERBOSE_OUT(("%d ==> %d nets %s\n", i, groups[i].count(), (*groups[i].first())->m_head->name().cstr()));
|
netlist().log("Solver %s", ms->name().cstr());
|
||||||
SOLVER_VERBOSE_OUT((" has %s elements\n", ms->is_dynamic() ? "dynamic" : "no dynamic"));
|
netlist().log(" # %d ==> %d nets %s", i, groups[i].count(), (*(*groups[i].first())->m_core_terms.first())->name().cstr());
|
||||||
SOLVER_VERBOSE_OUT((" has %s elements\n", ms->is_timestep() ? "timestep" : "no timestep"));
|
netlist().log(" has %s elements", ms->is_dynamic() ? "dynamic" : "no dynamic");
|
||||||
|
netlist().log(" has %s elements", ms->is_timestep() ? "timestep" : "no timestep");
|
||||||
for (int j=0; j<groups[i].count(); j++)
|
for (int j=0; j<groups[i].count(); j++)
|
||||||
{
|
{
|
||||||
SOLVER_VERBOSE_OUT(("Net %d: %s\n", j, groups[i][j]->name().cstr()));
|
netlist().log("Net %d: %s", j, groups[i][j]->name().cstr());
|
||||||
netlist_net_t *n = groups[i][j];
|
netlist_net_t *n = groups[i][j];
|
||||||
for (int k = 0; k < n->m_core_terms.count(); k++)
|
for (int k = 0; k < n->m_core_terms.count(); k++)
|
||||||
{
|
{
|
||||||
ATTR_UNUSED netlist_core_terminal_t *p = n->m_core_terms[k];
|
const netlist_core_terminal_t *p = n->m_core_terms[k];
|
||||||
SOLVER_VERBOSE_OUT((" %s\n", p->name().cstr()));
|
netlist().log(" %s", p->name().cstr());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,14 +22,14 @@ NETLIB_RESET(nicRSFF)
|
|||||||
|
|
||||||
NETLIB_UPDATE(nicRSFF)
|
NETLIB_UPDATE(nicRSFF)
|
||||||
{
|
{
|
||||||
if (INPLOGIC(m_S))
|
if (!INPLOGIC(m_S))
|
||||||
|
{
|
||||||
|
OUTLOGIC(m_Q, 1, NLTIME_FROM_NS(20));
|
||||||
|
OUTLOGIC(m_QQ, 0, NLTIME_FROM_NS(20));
|
||||||
|
}
|
||||||
|
else if (!INPLOGIC(m_R))
|
||||||
{
|
{
|
||||||
OUTLOGIC(m_Q, 1, NLTIME_FROM_NS(10));
|
OUTLOGIC(m_Q, 0, NLTIME_FROM_NS(20));
|
||||||
OUTLOGIC(m_QQ, 0, NLTIME_FROM_NS(10));
|
OUTLOGIC(m_QQ, 1, NLTIME_FROM_NS(20));
|
||||||
}
|
|
||||||
else if (INPLOGIC(m_R))
|
|
||||||
{
|
|
||||||
OUTLOGIC(m_Q, 0, NLTIME_FROM_NS(10));
|
|
||||||
OUTLOGIC(m_QQ, 1, NLTIME_FROM_NS(10));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,16 +62,22 @@ public:
|
|||||||
ALIAS(_name.2, _name ## _R.2) \
|
ALIAS(_name.2, _name ## _R.2) \
|
||||||
ALIAS(_name.1, _name ## _C.1)
|
ALIAS(_name.1, _name ## _C.1)
|
||||||
|
|
||||||
#define CHIP_INPUT(_name) \
|
#define CHIP_INPUT_ACTIVE_LOW(_name) \
|
||||||
SWITCH2(_name ## _SW) \
|
SWITCH2(_name ## _SW) \
|
||||||
NET_C(_name ## _SW.2, V5) \
|
NET_C(_name ## _SW.1, V5) \
|
||||||
NET_CSTR(# _name "_SW.1", "GND") \
|
NET_CSTR(# _name "_SW.2", "GND") \
|
||||||
ALIAS(_name.1, _name ## _SW.Q)
|
ALIAS(_name.1, _name ## _SW.Q)
|
||||||
|
|
||||||
|
#define CHIP_INPUT_ACTIVE_HIGH(_name) \
|
||||||
|
SWITCH2(_name ## _SW) \
|
||||||
|
NET_C(_name ## _SW.2, V5) \
|
||||||
|
NET_CSTR(# _name "_SW.1", "GND") \
|
||||||
|
ALIAS(_name.1, _name ## _SW.Q)
|
||||||
|
|
||||||
#define CHIP_LATCH(_name) \
|
#define CHIP_LATCH(_name) \
|
||||||
NETDEV_RSFF(_name) \
|
NETDEV_RSFF(_name) \
|
||||||
ALIAS(_name.1, _name.S) \
|
ALIAS(_name.1, _name.R) \
|
||||||
ALIAS(_name.2, _name.R) \
|
ALIAS(_name.2, _name.S) \
|
||||||
ALIAS(_name.3, _name.QQ)
|
ALIAS(_name.3, _name.QQ)
|
||||||
|
|
||||||
|
|
||||||
|
@ -393,7 +393,7 @@ nld_base_d_to_a_proxy *netlist_setup_t::get_d_a_proxy(netlist_output_t &out)
|
|||||||
{
|
{
|
||||||
// create a new one ...
|
// create a new one ...
|
||||||
proxy = new nld_d_to_a_proxy(out);
|
proxy = new nld_d_to_a_proxy(out);
|
||||||
pstring x = pstring::sprintf("proxy_da_%d", m_proxy_cnt);
|
pstring x = pstring::sprintf("proxy_da_%s_%d", out.name().cstr(), m_proxy_cnt);
|
||||||
m_proxy_cnt++;
|
m_proxy_cnt++;
|
||||||
|
|
||||||
register_dev(proxy, x);
|
register_dev(proxy, x);
|
||||||
@ -423,7 +423,7 @@ void netlist_setup_t::connect_input_output(netlist_input_t &in, netlist_output_t
|
|||||||
if (out.isFamily(netlist_terminal_t::ANALOG) && in.isFamily(netlist_terminal_t::LOGIC))
|
if (out.isFamily(netlist_terminal_t::ANALOG) && in.isFamily(netlist_terminal_t::LOGIC))
|
||||||
{
|
{
|
||||||
nld_a_to_d_proxy *proxy = new nld_a_to_d_proxy(in);
|
nld_a_to_d_proxy *proxy = new nld_a_to_d_proxy(in);
|
||||||
pstring x = pstring::sprintf("proxy_ad_%d", m_proxy_cnt);
|
pstring x = pstring::sprintf("proxy_ad_%s_%d", in.name().cstr(), m_proxy_cnt);
|
||||||
m_proxy_cnt++;
|
m_proxy_cnt++;
|
||||||
|
|
||||||
register_dev(proxy, x);
|
register_dev(proxy, x);
|
||||||
@ -456,7 +456,7 @@ void netlist_setup_t::connect_terminal_input(netlist_terminal_t &term, netlist_i
|
|||||||
{
|
{
|
||||||
NL_VERBOSE_OUT(("connect_terminal_input: connecting proxy\n"));
|
NL_VERBOSE_OUT(("connect_terminal_input: connecting proxy\n"));
|
||||||
nld_a_to_d_proxy *proxy = new nld_a_to_d_proxy(inp);
|
nld_a_to_d_proxy *proxy = new nld_a_to_d_proxy(inp);
|
||||||
pstring x = pstring::sprintf("proxy_da_%d", m_proxy_cnt);
|
pstring x = pstring::sprintf("proxy_ad_%s_%d", inp.name().cstr(), m_proxy_cnt);
|
||||||
m_proxy_cnt++;
|
m_proxy_cnt++;
|
||||||
|
|
||||||
register_dev(proxy, x);
|
register_dev(proxy, x);
|
||||||
|
@ -830,13 +830,17 @@ INPUT_PORTS_END
|
|||||||
|
|
||||||
#if PONGD
|
#if PONGD
|
||||||
static INPUT_PORTS_START( pongd )
|
static INPUT_PORTS_START( pongd )
|
||||||
#if 0
|
|
||||||
PORT_START( "PADDLE0" ) /* fake input port for player 1 paddle */
|
PORT_START( "PADDLE0" ) /* fake input port for player 1 paddle */
|
||||||
PORT_BIT( 0xff, 0x00, IPT_PADDLE ) PORT_SENSITIVITY(2) PORT_KEYDELTA(100) PORT_CENTERDELTA(0) NETLIST_ANALOG_PORT_CHANGED("maincpu", "pot0")
|
PORT_BIT( 0xff, 0x00, IPT_PADDLE ) PORT_SENSITIVITY(2) PORT_KEYDELTA(100) PORT_CENTERDELTA(0) NETLIST_ANALOG_PORT_CHANGED("maincpu", "pot0")
|
||||||
|
|
||||||
PORT_START( "PADDLE1" ) /* fake input port for player 2 paddle */
|
PORT_START( "PADDLE1" ) /* fake input port for player 2 paddle */
|
||||||
PORT_BIT( 0xff, 0x00, IPT_PADDLE ) PORT_SENSITIVITY(2) PORT_KEYDELTA(100) PORT_CENTERDELTA(0) PORT_PLAYER(2) NETLIST_ANALOG_PORT_CHANGED("maincpu", "pot1")
|
PORT_BIT( 0xff, 0x00, IPT_PADDLE ) PORT_SENSITIVITY(2) PORT_KEYDELTA(100) PORT_CENTERDELTA(0) PORT_PLAYER(2) NETLIST_ANALOG_PORT_CHANGED("maincpu", "pot1")
|
||||||
#endif
|
|
||||||
|
PORT_START( "PADDLE2" ) /* fake input port for player 3 paddle */
|
||||||
|
PORT_BIT( 0xff, 0x00, IPT_PADDLE ) PORT_SENSITIVITY(2) PORT_KEYDELTA(100) PORT_CENTERDELTA(0) PORT_PLAYER(3) NETLIST_ANALOG_PORT_CHANGED("maincpu", "pot2")
|
||||||
|
|
||||||
|
PORT_START( "PADDLE3" ) /* fake input port for player 4 paddle */
|
||||||
|
PORT_BIT( 0xff, 0x00, IPT_PADDLE ) PORT_SENSITIVITY(2) PORT_KEYDELTA(100) PORT_CENTERDELTA(0) PORT_PLAYER(4) NETLIST_ANALOG_PORT_CHANGED("maincpu", "pot3")
|
||||||
|
|
||||||
PORT_START("IN0") /* fake as well */
|
PORT_START("IN0") /* fake as well */
|
||||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) NETLIST_LOGIC_PORT_CHANGED("maincpu", "coinsw")
|
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) NETLIST_LOGIC_PORT_CHANGED("maincpu", "coinsw")
|
||||||
@ -931,9 +935,11 @@ static MACHINE_CONFIG_START( pongd, pong_state )
|
|||||||
MCFG_NETLIST_ANALOG_INPUT_MULT_OFFSET(1.0 / 100.0 * RES_K(50), RES_K(56) )
|
MCFG_NETLIST_ANALOG_INPUT_MULT_OFFSET(1.0 / 100.0 * RES_K(50), RES_K(56) )
|
||||||
MCFG_NETLIST_ANALOG_INPUT("maincpu", "vr1", "ic_a9_R.R")
|
MCFG_NETLIST_ANALOG_INPUT("maincpu", "vr1", "ic_a9_R.R")
|
||||||
MCFG_NETLIST_ANALOG_INPUT_MULT_OFFSET(1.0 / 100.0 * RES_K(50), RES_K(56) )
|
MCFG_NETLIST_ANALOG_INPUT_MULT_OFFSET(1.0 / 100.0 * RES_K(50), RES_K(56) )
|
||||||
MCFG_NETLIST_ANALOG_INPUT("maincpu", "pot0", "ic_b9_POT.DIAL")
|
|
||||||
MCFG_NETLIST_ANALOG_INPUT("maincpu", "pot1", "ic_a9_POT.DIAL")
|
|
||||||
#endif
|
#endif
|
||||||
|
MCFG_NETLIST_ANALOG_INPUT("maincpu", "pot0", "A10_POT.DIAL")
|
||||||
|
MCFG_NETLIST_ANALOG_INPUT("maincpu", "pot1", "B10_POT.DIAL")
|
||||||
|
MCFG_NETLIST_ANALOG_INPUT("maincpu", "pot2", "B9B_POT.DIAL")
|
||||||
|
MCFG_NETLIST_ANALOG_INPUT("maincpu", "pot3", "B9A_POT.DIAL")
|
||||||
MCFG_NETLIST_LOGIC_INPUT("maincpu", "sw1a", "DIPSW1.POS", 0, 0x01)
|
MCFG_NETLIST_LOGIC_INPUT("maincpu", "sw1a", "DIPSW1.POS", 0, 0x01)
|
||||||
MCFG_NETLIST_LOGIC_INPUT("maincpu", "sw1b", "DIPSW2.POS", 0, 0x01)
|
MCFG_NETLIST_LOGIC_INPUT("maincpu", "sw1b", "DIPSW2.POS", 0, 0x01)
|
||||||
MCFG_NETLIST_LOGIC_INPUT("maincpu", "coinsw", "COIN_SW.POS", 0, 0x01)
|
MCFG_NETLIST_LOGIC_INPUT("maincpu", "coinsw", "COIN_SW.POS", 0, 0x01)
|
||||||
|
Loading…
Reference in New Issue
Block a user