mirror of
https://github.com/holub/mame
synced 2025-10-07 01:16:22 +03:00
Breakout:
- Added led and lamp components - Start2 works Netlist: - Added led models
This commit is contained in:
parent
101cd369f0
commit
2f0468fa0b
@ -54,6 +54,10 @@
|
|||||||
NETLIST_START(diode_models)
|
NETLIST_START(diode_models)
|
||||||
NET_MODEL(".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)")
|
NET_MODEL(".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)")
|
||||||
NET_MODEL(".model 1N4148 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)")
|
NET_MODEL(".model 1N4148 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)")
|
||||||
|
NET_MODEL(".model LedRed D(IS=93.2p RS=42M N=3.73 BV=4 IBV=10U CJO=2.97P VJ=.75 M=.333 TT=4.32U Iave=40m Vpk=4 type=LED)")
|
||||||
|
NET_MODEL(".model LedGreen D(IS=93.2p RS=42M N=4.61 BV=4 IBV=10U CJO=2.97P VJ=.75 M=.333 TT=4.32U Iave=40m Vpk=4 type=LED)")
|
||||||
|
NET_MODEL(".model LedBlue D(IS=93.2p RS=42M N=7.47 BV=5 IBV=10U CJO=2.97P VJ=.75 M=.333 TT=4.32U Iave=40m Vpk=5 type=LED)")
|
||||||
|
NET_MODEL(".model LedWhite D(Is=0.27n Rs=5.65 N=6.79 Cjo=42p Iave=30m Vpk=5 type=LED)")
|
||||||
NETLIST_END()
|
NETLIST_END()
|
||||||
|
|
||||||
NETLIST_START(bjt_models)
|
NETLIST_START(bjt_models)
|
||||||
|
@ -53,7 +53,7 @@ public:
|
|||||||
m_active = 1;
|
m_active = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ATTR_HOT void inc_active()
|
ATTR_HOT virtual void inc_active()
|
||||||
{
|
{
|
||||||
nl_assert(netlist().use_deactivate());
|
nl_assert(netlist().use_deactivate());
|
||||||
if (++m_active == 1)
|
if (++m_active == 1)
|
||||||
@ -62,7 +62,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ATTR_HOT void dec_active()
|
ATTR_HOT virtual void dec_active()
|
||||||
{
|
{
|
||||||
nl_assert(netlist().use_deactivate());
|
nl_assert(netlist().use_deactivate());
|
||||||
if (--m_active == 0)
|
if (--m_active == 0)
|
||||||
|
@ -500,9 +500,7 @@ ATTR_COLD void netlist_net_t::init_object(netlist_base_t &nl, const pstring &ana
|
|||||||
ATTR_HOT void netlist_net_t::inc_active(netlist_core_terminal_t &term)
|
ATTR_HOT void netlist_net_t::inc_active(netlist_core_terminal_t &term)
|
||||||
{
|
{
|
||||||
m_active++;
|
m_active++;
|
||||||
|
|
||||||
m_list_active.insert(term);
|
m_list_active.insert(term);
|
||||||
|
|
||||||
if (m_active == 1)
|
if (m_active == 1)
|
||||||
{
|
{
|
||||||
if (m_in_queue == 0)
|
if (m_in_queue == 0)
|
||||||
@ -533,7 +531,6 @@ ATTR_HOT void netlist_net_t::dec_active(netlist_core_terminal_t &term)
|
|||||||
{
|
{
|
||||||
m_active--;
|
m_active--;
|
||||||
m_list_active.remove(term);
|
m_list_active.remove(term);
|
||||||
|
|
||||||
if (m_active == 0 && netlist().use_deactivate())
|
if (m_active == 0 && netlist().use_deactivate())
|
||||||
railterminal().netdev().dec_active();
|
railterminal().netdev().dec_active();
|
||||||
}
|
}
|
||||||
@ -582,7 +579,7 @@ ATTR_HOT ATTR_ALIGN inline void netlist_net_t::update_devs()
|
|||||||
//assert(m_num_cons != 0);
|
//assert(m_num_cons != 0);
|
||||||
nl_assert(this->isRailNet());
|
nl_assert(this->isRailNet());
|
||||||
|
|
||||||
const UINT32 masks[4] = { 1, 5, 3, 1 };
|
static const UINT32 masks[4] = { 1, 5, 3, 1 };
|
||||||
const UINT32 mask = masks[ (m_cur_Q << 1) | m_new_Q ];
|
const UINT32 mask = masks[ (m_cur_Q << 1) | m_new_Q ];
|
||||||
netlist_core_terminal_t *p = m_list_active.first();
|
netlist_core_terminal_t *p = m_list_active.first();
|
||||||
|
|
||||||
@ -591,6 +588,7 @@ ATTR_HOT ATTR_ALIGN inline void netlist_net_t::update_devs()
|
|||||||
|
|
||||||
switch (m_active)
|
switch (m_active)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
case 2:
|
case 2:
|
||||||
update_dev(p, mask);
|
update_dev(p, mask);
|
||||||
p = m_list_active.next(p);
|
p = m_list_active.next(p);
|
||||||
@ -598,6 +596,7 @@ ATTR_HOT ATTR_ALIGN inline void netlist_net_t::update_devs()
|
|||||||
case 1:
|
case 1:
|
||||||
update_dev(p, mask);
|
update_dev(p, mask);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
while (p != NULL)
|
while (p != NULL)
|
||||||
{
|
{
|
||||||
|
@ -1323,7 +1323,7 @@ ATTR_HOT inline void netlist_logic_input_t::activate_lh()
|
|||||||
ATTR_HOT inline void netlist_net_t::push_to_queue(const netlist_time &delay)
|
ATTR_HOT inline void netlist_net_t::push_to_queue(const netlist_time &delay)
|
||||||
{
|
{
|
||||||
//if (UNEXPECTED(m_num_cons == 0 || is_queued()))
|
//if (UNEXPECTED(m_num_cons == 0 || is_queued()))
|
||||||
if (!is_queued())
|
if (!is_queued() && (num_cons() > 0))
|
||||||
{
|
{
|
||||||
m_time = netlist().time() + delay;
|
m_time = netlist().time() + delay;
|
||||||
m_in_queue = (m_active > 0); /* queued ? */
|
m_in_queue = (m_active > 0); /* queued ? */
|
||||||
|
@ -2,12 +2,16 @@
|
|||||||
// copyright-holders:DICE Team,couriersud
|
// copyright-holders:DICE Team,couriersud
|
||||||
/*
|
/*
|
||||||
* Changelog:
|
* Changelog:
|
||||||
|
*
|
||||||
|
* - Added led and lamp components (couriersud)
|
||||||
|
* - Start2 works (couriersud)
|
||||||
* - Added discrete paddle potentiometers (couriersud)
|
* - Added discrete paddle potentiometers (couriersud)
|
||||||
* - Changes made to run in MAME (couriersud)
|
* - Changes made to run in MAME (couriersud)
|
||||||
* - Original version imported from DICE
|
* - Original version imported from DICE
|
||||||
*
|
*
|
||||||
* TODO:
|
* TODO:
|
||||||
* - implement trimmers
|
* - implement discrete startup latch
|
||||||
|
* - implement bonus game dip switch
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -74,7 +78,6 @@
|
|||||||
|
|
||||||
// identify unknown devices in IDE
|
// identify unknown devices in IDE
|
||||||
|
|
||||||
#if 1
|
|
||||||
#define NETLIST_DEVELOPMENT 0
|
#define NETLIST_DEVELOPMENT 0
|
||||||
|
|
||||||
#include "netlist/nl_dice_compat.h"
|
#include "netlist/nl_dice_compat.h"
|
||||||
@ -310,30 +313,12 @@ CIRCUIT_LAYOUT( breakout )
|
|||||||
//LM380 //speaker amplifier
|
//LM380 //speaker amplifier
|
||||||
//LM323 //regulator
|
//LM323 //regulator
|
||||||
|
|
||||||
// CHIP("CREDIT_LIGHT1", LAMP)
|
|
||||||
// CHIP("CREDIT_LIGHT2", LAMP)
|
|
||||||
// CHIP("SERVE_LIGHT", LAMP)
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
CHIP("PAD1", PADDLE1_HORIZONTAL_INPUT, &pad1_desc)
|
CHIP("PAD1", PADDLE1_HORIZONTAL_INPUT, &pad1_desc)
|
||||||
PADDLE_CONNECTION("PAD1", "C9")
|
PADDLE_CONNECTION("PAD1", "C9")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CHIP_LATCH(LATCH)
|
CHIP_LATCH(LATCH)
|
||||||
//CHIP("COIN1", COIN_INPUT)
|
|
||||||
//CHIP_INPUT_ACTIVE_LOW(COIN1)
|
|
||||||
|
|
||||||
//CHIP("COIN2", COIN_INPUT)
|
|
||||||
//CHIP_INPUT_ACTIVE_LOW(COIN2)
|
|
||||||
|
|
||||||
//CHIP("START", START_INPUT)
|
|
||||||
//CHIP_INPUT_ACTIVE_LOW(START1)
|
|
||||||
//CHIP_INPUT_ACTIVE_HIGH(START2)
|
|
||||||
|
|
||||||
//CHIP("SERVE", BUTTONS1_INPUT)
|
|
||||||
//CHIP_INPUT_ACTIVE_LOW(SERVE) // Active low?
|
|
||||||
|
|
||||||
//TODO: start 2
|
|
||||||
|
|
||||||
//HSYNC and VSYNC
|
//HSYNC and VSYNC
|
||||||
#define H1_d "L1", 14
|
#define H1_d "L1", 14
|
||||||
@ -1681,20 +1666,6 @@ CIRCUIT_LAYOUT( breakout )
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Not connected pins */
|
|
||||||
|
|
||||||
NET_C(ttlhigh, B4.3, B4.4, B4.5, B4.6)
|
|
||||||
NET_C(ttlhigh, N6.3, N6.4, N6.5, N6.6)
|
|
||||||
NET_C(ttlhigh, M6.3, M6.4, M6.5, M6.6)
|
|
||||||
NET_C(ttlhigh, L6.3, L6.4, L6.5, L6.6)
|
|
||||||
|
|
||||||
NET_C(ttlhigh, H6.3, H6.4, H6.5, H6.6)
|
|
||||||
NET_C(ttlhigh, K6.3, K6.4, K6.5, K6.6)
|
|
||||||
NET_C(ttlhigh, J6.3, J6.4, J6.5, J6.6)
|
|
||||||
|
|
||||||
NET_C(ttlhigh, E1.9, E1.11)
|
|
||||||
NET_C(ttlhigh, E2.1, E2.2)
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
// RAM access
|
// RAM access
|
||||||
/*CONNECTION("LOG1", 3, H4) //A
|
/*CONNECTION("LOG1", 3, H4) //A
|
||||||
@ -1734,11 +1705,81 @@ CIRCUIT_LAYOUT( breakout )
|
|||||||
NET_C(D9.12, E9.8)
|
NET_C(D9.12, E9.8)
|
||||||
NET_C(D9.8, POTP2.2) // Connect P2 dial here
|
NET_C(D9.8, POTP2.2) // Connect P2 dial here
|
||||||
NET_C(D9.11, POTP1.2)
|
NET_C(D9.11, POTP1.2)
|
||||||
|
|
||||||
NET_C(D9.9, D9.10, R33.1)
|
NET_C(D9.9, D9.10, R33.1)
|
||||||
NET_C(R33.2, C9.6)
|
NET_C(R33.2, C9.6)
|
||||||
|
|
||||||
|
//----------------------------------------------------------------
|
||||||
|
// Serve Leds
|
||||||
|
//----------------------------------------------------------------
|
||||||
|
|
||||||
|
RES(R40, 150)
|
||||||
|
RES(R21, 150)
|
||||||
|
DIODE(LED1, "LedRed")
|
||||||
|
|
||||||
|
/* Below is the upright cabinet configuration
|
||||||
|
* cocktail has two leds connected to R40.1 */
|
||||||
|
CONNECTION(SERVE_WAIT_n, "R21", 2)
|
||||||
|
NET_C(R21.1, R40.2)
|
||||||
|
NET_C(LED1.K, R40.1)
|
||||||
|
NET_C(LED1.A, V5)
|
||||||
|
ALIAS(CON_P, R40.1)
|
||||||
|
|
||||||
|
//----------------------------------------------------------------
|
||||||
|
// Credit lamps
|
||||||
|
//----------------------------------------------------------------
|
||||||
|
|
||||||
|
/* The credit lamp circuit uses thyristors and 6VAC. This is
|
||||||
|
* currently not modeled and instead the CREDIT_1_OR_2 and CREDIT2
|
||||||
|
* signals are used.
|
||||||
|
*/
|
||||||
|
|
||||||
|
ALIAS(CON_CREDIT1, L9.3) // CREDIT_1_OR_2
|
||||||
|
ALIAS(CON_CREDIT2, F9.6) // CREDIT2
|
||||||
|
|
||||||
|
//----------------------------------------------------------------
|
||||||
|
// Not connected pins
|
||||||
|
//----------------------------------------------------------------
|
||||||
|
|
||||||
|
NET_C(ttlhigh, B4.3, B4.4, B4.5, B4.6)
|
||||||
|
NET_C(ttlhigh, N6.3, N6.4, N6.5, N6.6)
|
||||||
|
NET_C(ttlhigh, M6.3, M6.4, M6.5, M6.6)
|
||||||
|
NET_C(ttlhigh, L6.3, L6.4, L6.5, L6.6)
|
||||||
|
|
||||||
|
NET_C(ttlhigh, H6.3, H6.4, H6.5, H6.6)
|
||||||
|
NET_C(ttlhigh, K6.3, K6.4, K6.5, K6.6)
|
||||||
|
NET_C(ttlhigh, J6.3, J6.4, J6.5, J6.6)
|
||||||
|
|
||||||
|
NET_C(ttlhigh, E1.9, E1.11)
|
||||||
|
NET_C(ttlhigh, E2.1, E2.2)
|
||||||
|
|
||||||
NET_C(GND, D9.1, D9.2, D9.13, D9.3, D9.4, D9.5)
|
NET_C(GND, D9.1, D9.2, D9.13, D9.3, D9.4, D9.5)
|
||||||
|
|
||||||
CIRCUIT_LAYOUT_END
|
CIRCUIT_LAYOUT_END
|
||||||
|
|
||||||
#endif
|
/*
|
||||||
|
* MCR106-2 model from http://www.duncanamps.com/
|
||||||
|
* MCR106-1 are used to drive lamps for player 1 and player 2
|
||||||
|
* These have a BV of 30 ("-2" has 60, see comments below
|
||||||
|
* Not yet modeled.
|
||||||
|
*
|
||||||
|
* MCR106-2 SCR A G K MCE 7-17-95
|
||||||
|
*MCE MCR106-2 60V 4A pkg:TO-225AA
|
||||||
|
.SUBCKT XMCR1062 1 2 3
|
||||||
|
QP 6 4 1 POUT OFF
|
||||||
|
QN 4 6 5 NOUT OFF
|
||||||
|
RF 6 4 15MEG
|
||||||
|
RR 1 4 10MEG
|
||||||
|
RGK 6 5 6.25K
|
||||||
|
RG 2 6 46.2
|
||||||
|
RK 3 5 16.2M
|
||||||
|
DF 6 4 ZF
|
||||||
|
DR 1 4 ZR
|
||||||
|
DGK 6 5 ZGK
|
||||||
|
.MODEL ZF D (IS=1.6F IBV=800N BV=60 RS=2.25MEG) // BV=30
|
||||||
|
.MODEL ZR D (IS=1.6F IBV=800N BV=80) // BV=80/60*30
|
||||||
|
.MODEL ZGK D (IS=1.6F IBV=800N BV=6)
|
||||||
|
.MODEL POUT PNP (IS=1.6P BF=1 CJE=60.3P)
|
||||||
|
.MODEL NOUT NPN (IS=1.6P BF=100 RC=65M
|
||||||
|
+ CJE=60.3P CJC=12P TF=126N TR=18U)
|
||||||
|
.ENDS XMCR1062
|
||||||
|
*/
|
||||||
|
@ -155,9 +155,30 @@ class breakout_state : public ttl_mono_state
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
breakout_state(const machine_config &mconfig, device_type type, const char *tag)
|
breakout_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: ttl_mono_state(mconfig, type, tag)
|
: ttl_mono_state(mconfig, type, tag),
|
||||||
|
m_led_serve(*this, "maincpu:led_serve"),
|
||||||
|
m_lamp_credit1(*this, "maincpu:lamp_credit1"),
|
||||||
|
m_lamp_credit2(*this, "maincpu:lamp_credit2")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
required_device<netlist_mame_analog_output_t> m_led_serve;
|
||||||
|
required_device<netlist_mame_analog_output_t> m_lamp_credit1;
|
||||||
|
required_device<netlist_mame_analog_output_t> m_lamp_credit2;
|
||||||
|
|
||||||
|
NETDEV_ANALOG_CALLBACK_MEMBER(serve_cb)
|
||||||
|
{
|
||||||
|
output_set_value("serve_led", (data < 3.5) ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
NETDEV_ANALOG_CALLBACK_MEMBER(credit1_cb)
|
||||||
|
{
|
||||||
|
output_set_value("lamp_credit1", (data < 2.0) ? 0 : 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
NETDEV_ANALOG_CALLBACK_MEMBER(credit2_cb)
|
||||||
|
{
|
||||||
|
output_set_value("lamp_credit2", (data < 2.0) ? 0 : 1);
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@ -345,6 +366,12 @@ static MACHINE_CONFIG_START( breakout, breakout_state )
|
|||||||
MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "snd0", "sound", breakout_state, sound_cb, "")
|
MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "snd0", "sound", breakout_state, sound_cb, "")
|
||||||
MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "vid0", "videomix", fixedfreq_device, update_vid, "fixfreq")
|
MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "vid0", "videomix", fixedfreq_device, update_vid, "fixfreq")
|
||||||
|
|
||||||
|
// Leds and lamps
|
||||||
|
|
||||||
|
MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "led_serve", "CON_P", breakout_state, serve_cb, "")
|
||||||
|
MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "lamp_credit1", "CON_CREDIT1", breakout_state, credit1_cb, "")
|
||||||
|
MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "lamp_credit2", "CON_CREDIT2", breakout_state, credit2_cb, "")
|
||||||
|
|
||||||
/* video hardware */
|
/* video hardware */
|
||||||
MCFG_FIXFREQ_ADD("fixfreq", "screen")
|
MCFG_FIXFREQ_ADD("fixfreq", "screen")
|
||||||
MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK_BREAKOUT)
|
MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK_BREAKOUT)
|
||||||
|
@ -35,6 +35,36 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
|
<element name="serve_led" defstate="0">
|
||||||
|
<rect state="1">
|
||||||
|
<color red="1.0" green="0.3" blue="0.3" />
|
||||||
|
</rect>
|
||||||
|
<text string="SERVE" state="1">
|
||||||
|
<color red="0.0" green="0.0" blue="0.0" />
|
||||||
|
<bounds x="0" y="0.1" width="1" height="0.8" />
|
||||||
|
</text>
|
||||||
|
</element>
|
||||||
|
|
||||||
|
<element name="lamp_credit1" defstate="0">
|
||||||
|
<rect state="1">
|
||||||
|
<color red="1.0" green="1.0" blue="1.0" />
|
||||||
|
</rect>
|
||||||
|
<text string="CREDIT1" state="1">
|
||||||
|
<color red="0.0" green="0.0" blue="0.0" />
|
||||||
|
<bounds x="0" y="0.1" width="1" height="0.8" />
|
||||||
|
</text>
|
||||||
|
</element>
|
||||||
|
|
||||||
|
<element name="lamp_credit2" defstate="0">
|
||||||
|
<rect state="1">
|
||||||
|
<color red="1.0" green="1.0" blue="1.0" />
|
||||||
|
</rect>
|
||||||
|
<text string="CREDIT2" state="1">
|
||||||
|
<color red="0.0" green="0.0" blue="0.0" />
|
||||||
|
<bounds x="0" y="0.1" width="1" height="0.8" />
|
||||||
|
</text>
|
||||||
|
</element>
|
||||||
|
|
||||||
<view name="Color Overlay">
|
<view name="Color Overlay">
|
||||||
<screen index="0">
|
<screen index="0">
|
||||||
<bounds left="0" top="0" right="3" bottom="4" />
|
<bounds left="0" top="0" right="3" bottom="4" />
|
||||||
@ -42,5 +72,14 @@
|
|||||||
<overlay name="overlay" element="overlay">
|
<overlay name="overlay" element="overlay">
|
||||||
<bounds left="0" top="0" right="3" bottom="4" />
|
<bounds left="0" top="0" right="3" bottom="4" />
|
||||||
</overlay>
|
</overlay>
|
||||||
|
<bezel name="serve_led" element="serve_led">
|
||||||
|
<bounds x="0.125" y="4.01" width="0.55" height="0.24" />
|
||||||
|
</bezel>
|
||||||
|
<bezel name="lamp_credit1" element="lamp_credit1">
|
||||||
|
<bounds x="0.8" y="4.01" width="0.55" height="0.24" />
|
||||||
|
</bezel>
|
||||||
|
<bezel name="lamp_credit2" element="lamp_credit2">
|
||||||
|
<bounds x="1.5" y="4.01" width="0.55" height="0.24" />
|
||||||
|
</bezel>
|
||||||
</view>
|
</view>
|
||||||
</mamelayout>
|
</mamelayout>
|
||||||
|
Loading…
Reference in New Issue
Block a user