Machine promoted to WORKING

-------------
Castle Toy Einstein [hap, Sean Riddle]
This commit is contained in:
hap 2016-03-05 12:26:22 +01:00
parent 50372db24a
commit b18ebd99ce
2 changed files with 107 additions and 27 deletions

View File

@ -237,6 +237,8 @@ UINT8 hh_cop400_state::read_inputs(int columns)
Castle Toy Einstein
* COP421 MCU label ~/927 COP421-NEZ/N
* 4 lamps, 1-bit sound
This is a Simon clone, the tones are not harmonic.
***************************************************************************/
@ -263,8 +265,9 @@ WRITE8_MEMBER(ctstein_state::write_g)
WRITE8_MEMBER(ctstein_state::write_l)
{
// L0-L3: button lamps
display_matrix(4, 1, data & 0xf, 1);
// L0-L3: button lamps (strobed)
display_matrix(4, 1, data, 1);
display_matrix(4, 1, data, 0);
}
READ8_MEMBER(ctstein_state::read_l)
@ -283,30 +286,30 @@ WRITE_LINE_MEMBER(ctstein_state::write_sk)
// config
static INPUT_PORTS_START( ctstein )
PORT_START("IN.0") // D0 port L
PORT_CONFNAME( 0x0f, 0x01, DEF_STR( Difficulty ) )
PORT_CONFSETTING( 0x01, "1" )
PORT_CONFSETTING( 0x02, "2" )
PORT_CONFSETTING( 0x04, "3" )
PORT_CONFSETTING( 0x08, "4" )
PORT_START("IN.0") // G0 port L
PORT_CONFNAME( 0x0f, 0x01^0x0f, DEF_STR( Difficulty ) )
PORT_CONFSETTING( 0x01^0x0f, "1" )
PORT_CONFSETTING( 0x02^0x0f, "2" )
PORT_CONFSETTING( 0x04^0x0f, "3" )
PORT_CONFSETTING( 0x08^0x0f, "4" )
PORT_START("IN.1") // D1 port L
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON6 )
PORT_START("IN.1") // G1 port L
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SELECT ) PORT_NAME("Best Score")
PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN.2") // D2 port L
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 )
PORT_START("IN.2") // G2 port L
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Red Button")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Yellow Button")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Green Button")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Blue Button")
INPUT_PORTS_END
static MACHINE_CONFIG_START( ctstein, ctstein_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", COP421, 2000000) // approximation - RC osc. R=12K to +6V, C=100pf to GND
MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false) // guessed
MCFG_CPU_ADD("maincpu", COP421, 850000) // approximation - RC osc. R=12K to +6V, C=100pf to GND
MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false) // guessed
MCFG_COP400_WRITE_G_CB(WRITE8(ctstein_state, write_g))
MCFG_COP400_WRITE_L_CB(WRITE8(ctstein_state, write_l))
MCFG_COP400_WRITE_SK_CB(WRITELINE(ctstein_state, write_sk))
@ -729,6 +732,7 @@ static INPUT_PORTS_START( plus1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
static MACHINE_CONFIG_START( plus1, plus1_state )
@ -939,7 +943,7 @@ ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
CONS( 1979, ctstein, 0, 0, ctstein, ctstein, driver_device, 0, "Castle Toy", "Einstein (Castle Toy)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
CONS( 1979, ctstein, 0, 0, ctstein, ctstein, driver_device, 0, "Castle Toy", "Einstein (Castle Toy)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
CONS( 1979, h2hbaskb, 0, 0, h2hbaskb, h2hbaskb, driver_device, 0, "Coleco", "Head to Head Basketball (COP420L)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )

View File

@ -3,21 +3,97 @@
<!-- define elements -->
<element name="led" defstate="0">
<disk state="0"><color red="0.2" green="0.04" blue="0.046" /></disk>
<disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk>
<element name="static_white"><rect><color red="0.75" green="0.73" blue="0.7" /></rect></element>
<element name="static_white2"><rect><color red="0.6" green="0.59" blue="0.57" /></rect></element>
<element name="text_best">
<rect><color red="0.6" green="0.59" blue="0.57" /></rect>
<text string="BEST"><color red="0.0" green="0.0" blue="0.0" /></text>
</element>
<element name="text_score">
<rect><color red="0.6" green="0.59" blue="0.57" /></rect>
<text string="SCORE"><color red="0.0" green="0.0" blue="0.0" /></text>
</element>
<element name="text_start">
<rect><color red="0.6" green="0.59" blue="0.57" /></rect>
<text string="START"><color red="0.0" green="0.0" blue="0.0" /></text>
</element>
<element name="text_game">
<rect><color red="0.6" green="0.59" blue="0.57" /></rect>
<text string="GAME"><color red="0.0" green="0.0" blue="0.0" /></text>
</element>
<element name="lamp_r" defstate="0">
<rect state="0"><color red="0.5" green="0.15" blue="0.1" /></rect>
<rect state="1"><color red="1.0" green="0.4" blue="0.28" /></rect>
</element>
<element name="lamp_b" defstate="0">
<rect state="0"><color red="0.1" green="0.15" blue="0.5" /></rect>
<rect state="1"><color red="0.3" green="0.42" blue="1.0" /></rect>
</element>
<element name="lamp_g" defstate="0">
<rect state="0"><color red="0.15" green="0.5" blue="0.1" /></rect>
<rect state="1"><color red="0.52" green="1.0" blue="0.4" /></rect>
</element>
<element name="lamp_y" defstate="0">
<rect state="0"><color red="0.5" green="0.45" blue="0.1" /></rect>
<rect state="1"><color red="1.0" green="0.93" blue="0.4" /></rect>
</element>
<element name="button_r" defstate="0">
<disk><color red="0.0" green="0.0" blue="0.0" /></disk>
<disk state="0">
<color red="0.8" green="0.35" blue="0.1" />
<bounds x="0.2" y="0.2" width="0.6" height="0.6" />
</disk>
<disk state="1">
<color red="0.8" green="0.35" blue="0.1" />
<bounds x="0.28" y="0.28" width="0.44" height="0.44" />
</disk>
</element>
<element name="button_b" defstate="0">
<disk><color red="0.0" green="0.0" blue="0.0" /></disk>
<disk state="0">
<color red="0.2" green="0.25" blue="0.8" />
<bounds x="0.2" y="0.2" width="0.6" height="0.6" />
</disk>
<disk state="1">
<color red="0.2" green="0.25" blue="0.8" />
<bounds x="0.28" y="0.28" width="0.44" height="0.44" />
</disk>
</element>
<!-- build screen -->
<view name="Internal Layout">
<bounds left="0" right="100" top="0" bottom="100" />
<bounds left="0" right="50" top="0" bottom="22" />
<bezel element="static_white">
<bounds left="-1" right="51" top="-1" bottom="23" />
</bezel>
<bezel name="0.0" element="led"><bounds x="1" y="1" width="1" height="1" /></bezel>
<bezel name="0.1" element="led"><bounds x="2" y="1" width="1" height="1" /></bezel>
<bezel name="0.2" element="led"><bounds x="3" y="1" width="1" height="1" /></bezel>
<bezel name="0.3" element="led"><bounds x="4" y="1" width="1" height="1" /></bezel>
<bezel name="0.0" element="lamp_r" inputtag="IN.2" inputmask="0x01">
<bounds x="-1" y="-1" width="21" height="11" />
</bezel>
<bezel name="0.1" element="lamp_y" inputtag="IN.2" inputmask="0x02">
<bounds x="30" y="12" width="21" height="11" />
</bezel>
<bezel name="0.2" element="lamp_g" inputtag="IN.2" inputmask="0x04">
<bounds x="-1" y="12" width="21" height="11" />
</bezel>
<bezel name="0.3" element="lamp_b" inputtag="IN.2" inputmask="0x08">
<bounds x="30" y="-1" width="21" height="11" />
</bezel>
<bezel element="static_white2"><bounds x="21" y="1" width="8" height="20" /></bezel>
<bezel element="text_best"><bounds x="21.4" y="3.5" width="3" height="0.75" /></bezel>
<bezel element="text_score"><bounds x="25.9" y="3.5" width="3" height="0.75" /></bezel>
<bezel element="button_b" inputtag="IN.1" inputmask="0x02"><bounds x="24" y="3" width="2" height="2" /></bezel>
<bezel element="text_start"><bounds x="21.2" y="18.5" width="3" height="0.75" /></bezel>
<bezel element="text_game"><bounds x="25.8" y="18.5" width="3" height="0.75" /></bezel>
<bezel element="button_r" inputtag="IN.1" inputmask="0x01"><bounds x="24" y="18" width="2" height="2" /></bezel>
</view>
</mamelayout>