diff options
Diffstat (limited to 'src/mame/drivers/hh_tms1k.cpp')
-rw-r--r-- | src/mame/drivers/hh_tms1k.cpp | 158 |
1 files changed, 142 insertions, 16 deletions
diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp index bd4d6191b61..6a202910716 100644 --- a/src/mame/drivers/hh_tms1k.cpp +++ b/src/mame/drivers/hh_tms1k.cpp @@ -19,6 +19,7 @@ @CP0904A TMS0970 1977, Milton Bradley Comp IV @MP0905B TMS0970 1977, Parker Brothers Codename Sector *MP0057 TMS1000 1978, APH Student Speech+ (same ROM contents as TSI Speech+?) + @MP0154 TMS1000 1979, Fonas 2 Player Baseball @MP0158 TMS1000 1979, Entex Soccer (6003) @MP0163 TMS1000 1979, A-One LSI Match Number/LJN Electronic Concentration @MP0168 TMS1000 1979, Conic Multisport/Tandy Sports Arena (model 60-2158) @@ -166,6 +167,7 @@ #include "elecdet.lh" #include "esbattle.lh" #include "esoccer.lh" +//#include "f2pbball.lh" #include "fxmcr165.lh" // clickable #include "gjackpot.lh" #include "gpoker.lh" @@ -1466,7 +1468,6 @@ INPUT_CHANGED_MEMBER(h2hbaseb_state::skill_switch) set_clock(); } - void h2hbaseb_state::set_clock() { // MCU clock is from an RC circuit with C=47pF, and R value is depending on @@ -2748,7 +2749,6 @@ INPUT_CHANGED_MEMBER(ebball3_state::skill_switch) set_clock(); } - void ebball3_state::set_clock() { // MCU clock is from an RC circuit(R=47K, C=33pF) oscillating by default at ~340kHz, @@ -2969,7 +2969,6 @@ INPUT_CHANGED_MEMBER(einvader_state::skill_switch) set_clock(); } - void einvader_state::set_clock() { // MCU clock is from an RC circuit(R=47K, C=56pF) oscillating by default at ~320kHz, @@ -3347,7 +3346,6 @@ INPUT_CHANGED_MEMBER(raisedvl_state::skill_switch) set_clock(); } - void raisedvl_state::set_clock() { // MCU clock is from an RC circuit with C=47pF, R=47K by default. Skills @@ -3388,6 +3386,125 @@ MACHINE_CONFIG_END /*************************************************************************** + Fonas 2 Player Baseball + * TMS1000NLL MP0154 (die label 1000B, MP0154) + * 4 7seg LEDs, 37 other LEDs, 1-bit sound + + known releases: + - World: 2 Player Baseball + - USA: 2 Player Baseball, distributed by Sears + - Canada: 2 Player Baseball, distributed by Talbot Electronics + +***************************************************************************/ + +class f2pbball_state : public hh_tms1k_state +{ +public: + f2pbball_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_tms1k_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE16_MEMBER(write_r); + DECLARE_WRITE16_MEMBER(write_o); + DECLARE_READ8_MEMBER(read_k); + + DECLARE_INPUT_CHANGED_MEMBER(reset_button); +}; + +// handlers + +void f2pbball_state::prepare_display() +{ + // R5-R8 are 7segs + set_display_segmask(0x1e0, 0xff); + display_matrix(8, 9, m_o, m_r); +} + +WRITE16_MEMBER(f2pbball_state::write_r) +{ + // R4,R9,R10: input mux + m_inp_mux = (data >> 4 & 1) | (data >> 8 & 6); + + // R9,R10(ANDed together): speaker out + m_speaker->level_w(data >> 10 & data >> 9 & 1); + + // R0-R8: led select + m_r = data; + prepare_display(); +} + +WRITE16_MEMBER(f2pbball_state::write_o) +{ + // O0-O7: led state + m_o = BITSWAP8(data,0,7,2,6,5,4,3,1); + prepare_display(); +} + +READ8_MEMBER(f2pbball_state::read_k) +{ + // K: multiplexed inputs + return read_inputs(3); +} + + +// config + +static INPUT_PORTS_START( f2pbball ) + PORT_START("IN.0") // R4 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_COCKTAIL PORT_NAME("Pick Off") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_CONFNAME( 0x0c, 0x04, "Players" ) + PORT_CONFSETTING( 0x04, "1" ) + PORT_CONFSETTING( 0x00, "Practice" ) + PORT_CONFSETTING( 0x08, "2" ) + + PORT_START("IN.1") // R9 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Score") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Steal") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Pitch") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Swing") + + PORT_START("IN.2") // R10 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_COCKTAIL PORT_NAME("Curve Left") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL PORT_NAME("Slow") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_NAME("Curve Right") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_COCKTAIL PORT_NAME("Fast") + + PORT_START("RESET") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Reset") PORT_CHANGED_MEMBER(DEVICE_SELF, f2pbball_state, reset_button, 0) +INPUT_PORTS_END + +INPUT_CHANGED_MEMBER(f2pbball_state::reset_button) +{ + // reset button is directly wired to TMS1000 INIT pin + m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? ASSERT_LINE : CLEAR_LINE); +} + +static MACHINE_CONFIG_START( f2pbball, f2pbball_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", TMS1000, 325000) // approximation - RC osc. R=51K, C=39pF + MCFG_TMS1XXX_READ_K_CB(READ8(f2pbball_state, read_k)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(f2pbball_state, write_r)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(f2pbball_state, write_o)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_hh_tms1k_test) + //MCFG_DEFAULT_LAYOUT(layout_f2pbball) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + Gakken Poker * PCB label POKER. gakken * TMS1370 MP2105 (die label same) @@ -4823,7 +4940,6 @@ WRITE16_MEMBER(comp4_state::write_o) // O0: leds common // other bits: N/C m_o = data; - display_matrix(11, 1, m_r, m_o); } READ8_MEMBER(comp4_state::read_k) @@ -5350,7 +5466,6 @@ INPUT_CHANGED_MEMBER(ssimon_state::speed_switch) set_clock(); } - void ssimon_state::set_clock() { // MCU clock is from an RC circuit with C=100pF, R=x depending on speed switch: @@ -5875,28 +5990,28 @@ static INPUT_PORTS_START( cnsector ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Z) PORT_NAME("Range") PORT_START("IN.1") // O1 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_X) PORT_NAME("Aim") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_S) PORT_NAME("Right") PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_X) PORT_NAME("Aim") PORT_START("IN.2") // O2 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_NAME("Fire") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_NAME("Recall") PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_J) PORT_NAME("Evasive Sub") // expert button PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_NAME("Recall") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_NAME("Fire") PORT_START("IN.3") // O3 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_M) PORT_NAME("Sub Finder") // expert button + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_F) PORT_NAME("Slower") PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_M) PORT_NAME("Sub Finder") // expert button PORT_START("IN.4") // O4 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_B) PORT_NAME("Teach Mode") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_T) PORT_NAME("Move Ship") PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_G) PORT_NAME("Faster") PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_T) PORT_NAME("Move Ship") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_B) PORT_NAME("Teach Mode") INPUT_PORTS_END static MACHINE_CONFIG_START( cnsector, cnsector_state ) @@ -7664,7 +7779,6 @@ INPUT_CHANGED_MEMBER(tbreakup_state::skill_switch) set_clock(); } - void tbreakup_state::set_clock() { // MCU clock is from an analog circuit with resistor of 73K, PRO2 adds 100K @@ -7817,7 +7931,6 @@ INPUT_CHANGED_MEMBER(phpball_state::flipper_button) output().set_lamp_value(90 + (int)(uintptr_t)param, newval); } - static MACHINE_CONFIG_START( phpball, phpball_state ) /* basic machine hardware */ @@ -8237,6 +8350,17 @@ ROM_START( raisedvl ) ROM_END +ROM_START( f2pbball ) + ROM_REGION( 0x0400, "maincpu", 0 ) + ROM_LOAD( "mp0154", 0x0000, 0x0400, CRC(c5b45ace) SHA1(b2de32e83ab447b22d6828f0081843f364040b01) ) + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1000_common2_micro.pla", 0, 867, CRC(d33da3cf) SHA1(13c4ebbca227818db75e6db0d45b66ba5e207776) ) + ROM_REGION( 365, "maincpu:opla", 0 ) + ROM_LOAD( "tms1000_f2pbball_output.pla", 0, 365, CRC(30c2f28f) SHA1(db969b22475f37f083c3594f5e4f5759048377b8) ) +ROM_END + + ROM_START( gpoker ) ROM_REGION( 0x0800, "maincpu", 0 ) ROM_LOAD( "mp2105", 0x0000, 0x0800, CRC(95a8f5b4) SHA1(d14f00ba9f57e437264d972baa14a14a28ff8719) ) @@ -8707,6 +8831,8 @@ CONS( 1980, efootb4 , 0, 0, efootb4, efootb4, driver_device, 0, "Ent CONS( 1980, ebaskb2 , 0, 0, ebaskb2, ebaskb2, driver_device, 0, "Entex", "Electronic Basketball 2 (Entex)", MACHINE_SUPPORTS_SAVE ) CONS( 1980, raisedvl, 0, 0, raisedvl, raisedvl, driver_device, 0, "Entex", "Raise The Devil", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1979, f2pbball, 0, 0, f2pbball, f2pbball, driver_device, 0, "Fonas", "2 Player Baseball (Fonas)", MACHINE_SUPPORTS_SAVE ) + CONS( 1979, gpoker, 0, 0, gpoker, gpoker, driver_device, 0, "Gakken", "Poker (Gakken, 1979 version)", MACHINE_SUPPORTS_SAVE ) CONS( 1980, gjackpot, 0, 0, gjackpot, gjackpot, driver_device, 0, "Gakken", "Jackpot: Gin Rummy & Black Jack", MACHINE_SUPPORTS_SAVE ) CONS( 1982, ginv1000, 0, 0, ginv1000, ginv1000, driver_device, 0, "Gakken", "Galaxy Invader 1000", MACHINE_SUPPORTS_SAVE ) |