From b87941b7125b06d1dd4e520b5f314945c5cc0860 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 28 Feb 2019 01:35:13 +0100 Subject: [PATCH] New working clone added ------------ Head to Head: Electronic Basketball (TMS1000 version) [hap, Sean Riddle] --- src/mame/drivers/fidel_card.cpp | 8 +- src/mame/drivers/hh_cop400.cpp | 8 +- src/mame/drivers/hh_sm510.cpp | 1 - src/mame/drivers/hh_tms1k.cpp | 72 +++++++++++----- src/mame/layout/h2hbaskb.lay | 140 ++++++++++++++++++++++++++++++++ src/mame/layout/h2hbaskbc.lay | 15 ++-- src/mame/layout/h2hhockey.lay | 15 ++-- src/mame/layout/h2hhockeyc.lay | 15 ++-- src/mame/layout/h2hsoccerc.lay | 15 ++-- src/mame/mame.lst | 1 + 10 files changed, 234 insertions(+), 56 deletions(-) create mode 100644 src/mame/layout/h2hbaskb.lay diff --git a/src/mame/drivers/fidel_card.cpp b/src/mame/drivers/fidel_card.cpp index 916e41e644d..220dac8cca8 100644 --- a/src/mame/drivers/fidel_card.cpp +++ b/src/mame/drivers/fidel_card.cpp @@ -154,10 +154,12 @@ A detailed description of the hardware can be found also in the patent 4,373,719 cards: ------ -Playing cards have a 9-bit barcode at the edge. Swipe them along the card scanner -and the game will detect the card. +Playing cards have a 9-bit barcode on the face side near the edge. Swipe them downward +against the card scanner and the game will detect the card. +Barcode sync bits(msb and lsb) are the same for each card so that leaves 7 bits of data: +2 for suit, 4 for value, and 1 for parity so the card can't be scanned backwards. -2 card decks exist (red and blue), each has the same set of barcodes. +Two card decks exist (red and blue), each has the same set of barcodes. ******************************************************************************/ diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp index 75e4032081f..84527d33b92 100644 --- a/src/mame/drivers/hh_cop400.cpp +++ b/src/mame/drivers/hh_cop400.cpp @@ -22,7 +22,6 @@ #include "sound/spkrdev.h" #include "sound/dac.h" #include "sound/volt_reg.h" -//#include "rendlay.h" #include "screen.h" #include "speaker.h" @@ -348,6 +347,7 @@ void ctstein_state::ctstein(machine_config &config) An earlier revision of this runs on TMS1000, see hh_tms1k.cpp driver. Model numbers are the same. From the outside, an easy way to spot the difference is the Start/Display button: TMS1000 version button label is D, COP420 one is a *. + This version also plays much slower. ***************************************************************************/ @@ -457,8 +457,8 @@ INPUT_PORTS_END void h2hbaskbc_state::h2hbaskbc(machine_config &config) { /* basic machine hardware */ - COP420(config, m_maincpu, 850000); // approximation - RC osc. R=43K, C=101pF - m_maincpu->set_config(COP400_CKI_DIVISOR_8, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed + COP420(config, m_maincpu, 1000000); // approximation - RC osc. R=43K, C=101pF + m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed m_maincpu->write_d().set(FUNC(h2hbaskbc_state::write_d)); m_maincpu->write_g().set(FUNC(h2hbaskbc_state::write_g)); m_maincpu->write_l().set(FUNC(h2hbaskbc_state::write_l)); @@ -1914,7 +1914,7 @@ ROM_END // YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS CONS( 1979, ctstein, 0, 0, ctstein, ctstein, ctstein_state, empty_init, "Castle Toy", "Einstein (Castle Toy)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1980, h2hbaskbc, 0, 0, h2hbaskbc, h2hbaskbc, h2hbaskbc_state, empty_init, "Coleco", "Head to Head: Electronic Basketball (COP420L version)", MACHINE_SUPPORTS_SAVE ) +CONS( 1980, h2hbaskbc, h2hbaskb, 0, h2hbaskbc, h2hbaskbc, h2hbaskbc_state, empty_init, "Coleco", "Head to Head: Electronic Basketball (COP420L version)", MACHINE_SUPPORTS_SAVE ) CONS( 1980, h2hhockeyc, h2hhockey, 0, h2hhockeyc, h2hhockeyc, h2hbaskbc_state, empty_init, "Coleco", "Head to Head: Electronic Hockey (COP420L version)", MACHINE_SUPPORTS_SAVE ) CONS( 1980, h2hsoccerc, 0, 0, h2hsoccerc, h2hsoccerc, h2hbaskbc_state, empty_init, "Coleco", "Head to Head: Electronic Soccer (COP420L version)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/hh_sm510.cpp b/src/mame/drivers/hh_sm510.cpp index 5408932444c..2aecf87783d 100644 --- a/src/mame/drivers/hh_sm510.cpp +++ b/src/mame/drivers/hh_sm510.cpp @@ -21,7 +21,6 @@ #include "includes/hh_sm510.h" #include "cpu/sm510/sm500.h" -#include "rendlay.h" #include "screen.h" #include "speaker.h" diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp index b4847749c57..a1f612a6e71 100644 --- a/src/mame/drivers/hh_tms1k.cpp +++ b/src/mame/drivers/hh_tms1k.cpp @@ -69,7 +69,7 @@ *MP3232 TMS1000 1979, Fonas 2-Player Baseball (no "MP" on chip label) @MP3300 TMS1000 1979, Milton Bradley Simon (Rev F) @MP3301A TMS1000 1979, Milton Bradley Big Trak - *MP3320A TMS1000 1979, Coleco Head to Head: Electronic Basketball + @MP3320A TMS1000 1979, Coleco Head to Head: Electronic Basketball @MP3321A TMS1000 1979, Coleco Head to Head: Electronic Hockey *MP3352 TMS1200 1979, Tiger Sub Wars (model 7-490) @M32001 TMS1000 1981, Coleco Quiz Wiz Challenger (note: MP3398, MP3399, M3200x?) @@ -198,6 +198,7 @@ #include "gjackpot.lh" #include "gpoker.lh" #include "h2hbaseb.lh" +#include "h2hbaskb.lh" #include "h2hboxing.lh" #include "h2hfootb.lh" #include "h2hhockey.lh" @@ -1475,18 +1476,22 @@ void h2hfootb_state::h2hfootb(machine_config &config) /*************************************************************************** + Coleco Head to Head: Electronic Basketball (model 2150) + * TMS1000NLL MP3320A (die label 1000E MP3320A) + * 2-digit 7seg LED display, LED grid display, 1-bit sound + Coleco Head to Head: Electronic Hockey (model 2160) * TMS1000NLL E MP3321A (die label 1000E MP3321A) - * 2-digit 7seg LED display, LED grid display, 1-bit sound + * same PCB/hardware as above Unlike the COP420 version(see hh_cop400.cpp driver), each game has its own MCU. ***************************************************************************/ -class h2hhockey_state : public hh_tms1k_state +class h2hbaskb_state : public hh_tms1k_state { public: - h2hhockey_state(const machine_config &mconfig, device_type type, const char *tag) + h2hbaskb_state(const machine_config &mconfig, device_type type, const char *tag) : hh_tms1k_state(mconfig, type, tag), m_cap_empty_timer(*this, "cap_empty") { } @@ -1500,6 +1505,7 @@ public: DECLARE_WRITE16_MEMBER(write_r); DECLARE_WRITE16_MEMBER(write_o); DECLARE_READ8_MEMBER(read_k); + void h2hbaskb(machine_config &config); void h2hhockey(machine_config &config); protected: @@ -1508,13 +1514,13 @@ protected: // handlers -TIMER_DEVICE_CALLBACK_MEMBER(h2hhockey_state::cap_empty_callback) +TIMER_DEVICE_CALLBACK_MEMBER(h2hbaskb_state::cap_empty_callback) { if (~m_r & 0x200) m_cap_state = false; } -void h2hhockey_state::prepare_display() +void h2hbaskb_state::prepare_display() { // R6,R7 are commons for R0-R5 u16 sel = 0; @@ -1525,7 +1531,7 @@ void h2hhockey_state::prepare_display() display_matrix(7, 6+6, m_o, sel); } -WRITE16_MEMBER(h2hhockey_state::write_r) +WRITE16_MEMBER(h2hbaskb_state::write_r) { // R0-R3: input mux m_inp_mux = (data & 0xf); @@ -1558,14 +1564,14 @@ WRITE16_MEMBER(h2hhockey_state::write_r) prepare_display(); } -WRITE16_MEMBER(h2hhockey_state::write_o) +WRITE16_MEMBER(h2hbaskb_state::write_o) { // O1-O7: led data m_o = data >> 1 & 0x7f; prepare_display(); } -READ8_MEMBER(h2hhockey_state::read_k) +READ8_MEMBER(h2hbaskb_state::read_k) { // K1-K4: multiplexed inputs, K8: R9 and capacitor return (read_inputs(4) & 7) | (m_cap_state ? 8 : 0); @@ -1573,7 +1579,7 @@ READ8_MEMBER(h2hhockey_state::read_k) // config -static INPUT_PORTS_START( h2hhockey ) +static INPUT_PORTS_START( h2hbaskb ) PORT_START("IN.0") // R0 PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_NAME("P1 Pass CW") // clockwise PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_NAME("P1 Pass CCW") // counter-clockwise @@ -1594,12 +1600,20 @@ static INPUT_PORTS_START( h2hhockey ) PORT_CONFSETTING( 0x04, "2" ) PORT_START("IN.3") // R3 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL PORT_NAME("P2 Goalie Right") - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_NAME("P2 Goalie Left") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END -void h2hhockey_state::machine_start() +static INPUT_PORTS_START( h2hhockey ) + PORT_INCLUDE( h2hbaskb ) + + PORT_MODIFY("IN.3") // R3 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL PORT_NAME("P2 Goalie Right") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_NAME("P2 Goalie Left") +INPUT_PORTS_END + +void h2hbaskb_state::machine_start() { hh_tms1k_state::machine_start(); @@ -1611,18 +1625,18 @@ void h2hhockey_state::machine_start() save_item(NAME(m_cap_charge)); } -void h2hhockey_state::h2hhockey(machine_config &config) +void h2hbaskb_state::h2hbaskb(machine_config &config) { /* basic machine hardware */ TMS1000(config, m_maincpu, 375000); // approximation - RC osc. R=43K, C=100pF - m_maincpu->k().set(FUNC(h2hhockey_state::read_k)); - m_maincpu->r().set(FUNC(h2hhockey_state::write_r)); - m_maincpu->o().set(FUNC(h2hhockey_state::write_o)); + m_maincpu->k().set(FUNC(h2hbaskb_state::read_k)); + m_maincpu->r().set(FUNC(h2hbaskb_state::write_r)); + m_maincpu->o().set(FUNC(h2hbaskb_state::write_o)); - TIMER(config, "cap_empty").configure_generic(FUNC(h2hhockey_state::cap_empty_callback)); + TIMER(config, "cap_empty").configure_generic(FUNC(h2hbaskb_state::cap_empty_callback)); TIMER(config, "display_decay").configure_periodic(FUNC(hh_tms1k_state::display_decay_tick), attotime::from_msec(1)); - config.set_default_layout(layout_h2hhockey); + config.set_default_layout(layout_h2hbaskb); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -1630,6 +1644,12 @@ void h2hhockey_state::h2hhockey(machine_config &config) m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25); } +void h2hbaskb_state::h2hhockey(machine_config &config) +{ + h2hbaskb(config); + config.set_default_layout(layout_h2hhockey); +} + @@ -9586,6 +9606,17 @@ ROM_START( h2hfootb ) ROM_END +ROM_START( h2hbaskb ) + ROM_REGION( 0x0400, "maincpu", 0 ) + ROM_LOAD( "mp3320a", 0x0000, 0x0400, CRC(39a63f43) SHA1(14a765e42a39f8d3a465c990e09dd651e595a1c5) ) + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1000_common1_micro.pla", 0, 867, CRC(4becec19) SHA1(3c8a9be0f00c88c81f378b76886c39b10304f330) ) + ROM_REGION( 365, "maincpu:opla", 0 ) + ROM_LOAD( "tms1000_h2hbaskb_output.pla", 0, 365, CRC(9d1a91e1) SHA1(96303eb22375129b0dfbfcd823c8ca5b919511bc) ) +ROM_END + + ROM_START( h2hhockey ) ROM_REGION( 0x0400, "maincpu", 0 ) ROM_LOAD( "mp3321a", 0x0000, 0x0400, CRC(e974e604) SHA1(ed740c98ce96ad70ee5237eccae1f54a75ad8100) ) @@ -10340,7 +10371,8 @@ CONS( 1978, amaztron, 0, 0, amaztron, amaztron, amaztron_state, emp COMP( 1979, zodiac, 0, 0, zodiac, zodiac, zodiac_state, empty_init, "Coleco", "Zodiac - The Astrology Computer", MACHINE_SUPPORTS_SAVE ) CONS( 1978, cqback, 0, 0, cqback, cqback, cqback_state, empty_init, "Coleco", "Electronic Quarterback", MACHINE_SUPPORTS_SAVE ) CONS( 1979, h2hfootb, 0, 0, h2hfootb, h2hfootb, h2hfootb_state, empty_init, "Coleco", "Head to Head: Electronic Football", MACHINE_SUPPORTS_SAVE ) -CONS( 1979, h2hhockey, 0, 0, h2hhockey, h2hhockey, h2hhockey_state, empty_init, "Coleco", "Head to Head: Electronic Hockey (TMS1000 version)", MACHINE_SUPPORTS_SAVE ) +CONS( 1979, h2hbaskb, 0, 0, h2hbaskb, h2hbaskb, h2hbaskb_state, empty_init, "Coleco", "Head to Head: Electronic Basketball (TMS1000 version)", MACHINE_SUPPORTS_SAVE ) +CONS( 1979, h2hhockey, 0, 0, h2hhockey, h2hhockey, h2hbaskb_state, empty_init, "Coleco", "Head to Head: Electronic Hockey (TMS1000 version)", MACHINE_SUPPORTS_SAVE ) CONS( 1980, h2hbaseb, 0, 0, h2hbaseb, h2hbaseb, h2hbaseb_state, empty_init, "Coleco", "Head to Head: Electronic Baseball", MACHINE_SUPPORTS_SAVE ) CONS( 1981, h2hboxing, 0, 0, h2hboxing, h2hboxing, h2hboxing_state, empty_init, "Coleco", "Head to Head: Electronic Boxing", MACHINE_SUPPORTS_SAVE ) CONS( 1981, quizwizc, 0, 0, quizwizc, quizwizc, quizwizc_state, empty_init, "Coleco", "Quiz Wiz Challenger", MACHINE_SUPPORTS_SAVE ) // *** diff --git a/src/mame/layout/h2hbaskb.lay b/src/mame/layout/h2hbaskb.lay new file mode 100644 index 00000000000..d96cabfd003 --- /dev/null +++ b/src/mame/layout/h2hbaskb.lay @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/layout/h2hbaskbc.lay b/src/mame/layout/h2hbaskbc.lay index a4d2c9e019c..e919638c7de 100644 --- a/src/mame/layout/h2hbaskbc.lay +++ b/src/mame/layout/h2hbaskbc.lay @@ -90,39 +90,40 @@ + - + - + - + - + - + - + @@ -132,7 +133,7 @@ - + diff --git a/src/mame/layout/h2hhockey.lay b/src/mame/layout/h2hhockey.lay index ac67e33f840..fa363570119 100644 --- a/src/mame/layout/h2hhockey.lay +++ b/src/mame/layout/h2hhockey.lay @@ -80,39 +80,40 @@ + - + - + - + - + - + - + @@ -122,7 +123,7 @@ - + diff --git a/src/mame/layout/h2hhockeyc.lay b/src/mame/layout/h2hhockeyc.lay index ab54c6e4cf2..f4dcf0bef24 100644 --- a/src/mame/layout/h2hhockeyc.lay +++ b/src/mame/layout/h2hhockeyc.lay @@ -80,39 +80,40 @@ + - + - + - + - + - + - + @@ -122,7 +123,7 @@ - + diff --git a/src/mame/layout/h2hsoccerc.lay b/src/mame/layout/h2hsoccerc.lay index 569eb129d59..9b5b7325da5 100644 --- a/src/mame/layout/h2hsoccerc.lay +++ b/src/mame/layout/h2hsoccerc.lay @@ -84,39 +84,40 @@ + - + - + - + - + - + - + @@ -126,7 +127,7 @@ - + diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 7e6b46a1718..b7ab7b6bf72 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -15191,6 +15191,7 @@ ginv2000 // Gakken gjackpot // Gakken gpoker // Gakken h2hbaseb // Coleco +h2hbaskb // Coleco h2hboxing // Coleco h2hfootb // Coleco h2hhockey // Coleco