diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp index e96465bd854..208398c8cd1 100644 --- a/src/mame/drivers/hh_cop400.cpp +++ b/src/mame/drivers/hh_cop400.cpp @@ -43,7 +43,9 @@ TODO: #include "lafootb.lh" #include "lchicken.lh" // clickable #include "lightfgt.lh" // clickable +#include "mbaskb2.lh" #include "mdallas.lh" +#include "msoccer2.lh" #include "qkracer.lh" #include "scat.lh" #include "unkeinv.lh" @@ -274,6 +276,7 @@ public: void write_g(u8 data); void write_l(u8 data); u8 read_in(); + void h2hsoccerc(machine_config &config); void h2hbaskbc(machine_config &config); void h2hhockeyc(machine_config &config); @@ -561,7 +564,6 @@ public: void write_d(u8 data); void write_l(u8 data); u8 read_l(); - void unkeinv(machine_config &config); }; @@ -815,7 +817,7 @@ ROM_END /*************************************************************************** Mattel Funtronics: Jacks (model 1603) - * COP410L MCU bonded directly to PCB (die label COP410L/B NGS) + * COP410L MCU die bonded directly to PCB (die label COP410L/B NGS) * 8 LEDs, 1-bit sound ***************************************************************************/ @@ -936,7 +938,7 @@ ROM_END /*************************************************************************** Mattel Funtronics: Red Light Green Light (model 1604) - * COP410L MCU bonded directly to PCB (die label COP410L/B NHZ) + * COP410L MCU die bonded directly to PCB (die label COP410L/B NHZ) * 14 LEDs, 1-bit sound known releases: @@ -1037,7 +1039,7 @@ ROM_END /*************************************************************************** Mattel Funtronics: Tag (model 1497) - * COP410L MCU bonded directly to PCB (die label COP410L/B GTJ) + * COP410L MCU die bonded directly to PCB (die label COP410L/B GTJ) * 7 LEDs, 7 buttons, 1-bit sound ***************************************************************************/ @@ -1154,10 +1156,208 @@ ROM_END +/*************************************************************************** + + Mattel Basketball 2 (model 1645), Soccer 2 (model 1642) + * PCB label: MA6037/38 + * dual COP420L MCUs, dies bonded to PCB (see romdefs for rom serials) + * 4001, die also bonded to PCB + * 2-digit 7seg display, 36 other leds, 1-bit sound + + The clock generator was measured ~527kHz for mbaskb2, ~483kHz for msoccer2, + meaning that the internal divider is 8. Main MCU SK connects to the other + MCU CKO pin, probably for syncing serial I/O. + + These two are on the same hardware, see patents US4341383 and US4372556 + for detailed descriptions of the games. + +***************************************************************************/ + +class mbaskb2_state : public hh_cop400_state +{ +public: + mbaskb2_state(const machine_config &mconfig, device_type type, const char *tag) : + hh_cop400_state(mconfig, type, tag), + m_subcpu(*this, "subcpu"), + m_on_timer(*this, "on_timer") + { } + + DECLARE_CUSTOM_INPUT_MEMBER(switch_r); + + required_device m_subcpu; + required_device m_on_timer; + + void update_display(); + void shared_write_l(u8 data); + void main_write_g(u8 data); + void sub_write_g(u8 data); + void sub_write_d(u8 data); + u8 sub_read_in(); + + void mbaskb2(machine_config &config); + void msoccer2(machine_config &config); + +protected: + virtual void machine_reset() override; +}; + +void mbaskb2_state::machine_reset() +{ + hh_cop400_state::machine_reset(); + m_on_timer->adjust(attotime::from_msec(5)); +} + +// handlers + +void mbaskb2_state::update_display() +{ + m_display->matrix(~(m_d << 4 | m_g), m_l); +} + +void mbaskb2_state::shared_write_l(u8 data) +{ + // L: led data (though it's unlikely that maincpu will write valid led data to it) + m_l = m_maincpu->l_r() | m_subcpu->l_r(); + update_display(); +} + +void mbaskb2_state::main_write_g(u8 data) +{ + // G1: speaker out + m_speaker->level_w(data >> 1 & 1); +} + +void mbaskb2_state::sub_write_g(u8 data) +{ + // G: led select (low), input mux + m_g = m_inp_mux = data & 0xf; + update_display(); +} + +void mbaskb2_state::sub_write_d(u8 data) +{ + // D: led select (high) + m_d = data & 0xf; + update_display(); +} + +u8 mbaskb2_state::sub_read_in() +{ + // IN: multiplexed inputs + return read_inputs(3, 0xf); +} + +// config + +CUSTOM_INPUT_MEMBER(mbaskb2_state::switch_r) +{ + // The power switch is off-1-2, and the game relies on power-on starting at 1, + // otherwise msoccer2 boots up to what looks like a factory test mode. + return (m_inputs[3]->read() & 1) | (m_on_timer->enabled() ? 1 : 0); +} + +static INPUT_PORTS_START( mbaskb2 ) + PORT_START("IN.0") // G0 port IN + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_16WAY + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_16WAY + + PORT_START("IN.1") // G1 port IN + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Pass") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Shoot") + PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN.2") // G2 port IN + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("Defense: Man") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("Defense: Zone") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("Defense: Press") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mbaskb2_state, switch_r) + + PORT_START("IN.3") + PORT_CONFNAME( 0x01, 0x01, DEF_STR( Difficulty ) ) + PORT_CONFSETTING( 0x01, "1" ) + PORT_CONFSETTING( 0x00, "2" ) +INPUT_PORTS_END + +static INPUT_PORTS_START( msoccer2 ) + PORT_INCLUDE( mbaskb2 ) + + PORT_MODIFY("IN.2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("Low/High Kick") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("Score") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("Teammate") +INPUT_PORTS_END + +void mbaskb2_state::mbaskb2(machine_config &config) +{ + /* basic machine hardware */ + COP420(config, m_maincpu, 500000); // approximation + m_maincpu->set_config(COP400_CKI_DIVISOR_8, COP400_CKO_SYNC_INPUT, false); // guessed + m_maincpu->write_g().set(FUNC(mbaskb2_state::main_write_g)); + m_maincpu->write_l().set(FUNC(mbaskb2_state::shared_write_l)); + m_maincpu->read_l().set(m_subcpu, FUNC(cop400_cpu_device::l_r)); + m_maincpu->read_l_tristate().set_constant(0x80); + m_maincpu->read_si().set(m_subcpu, FUNC(cop400_cpu_device::so_r)); + + COP420(config, m_subcpu, 500000); // same as maincpu + m_subcpu->set_config(COP400_CKI_DIVISOR_8, COP400_CKO_SYNC_INPUT, false); // guessed + m_subcpu->write_d().set(FUNC(mbaskb2_state::sub_write_d)); + m_subcpu->write_g().set(FUNC(mbaskb2_state::sub_write_g)); + m_subcpu->write_l().set(FUNC(mbaskb2_state::shared_write_l)); + m_subcpu->read_l().set(m_maincpu, FUNC(cop400_cpu_device::l_r)); + m_subcpu->read_l_tristate().set_constant(0x80); + m_subcpu->read_in().set(FUNC(mbaskb2_state::sub_read_in)); + m_subcpu->read_si().set(m_maincpu, FUNC(cop400_cpu_device::so_r)); + m_subcpu->read_cko().set(m_maincpu, FUNC(cop400_cpu_device::sk_r)); + + config.set_perfect_quantum(m_maincpu); + + TIMER(config, "on_timer").configure_generic(nullptr); + + /* video hardware */ + PWM_DISPLAY(config, m_display).set_size(8, 7); + m_display->set_segmask(0xc0, 0x7f); + m_display->set_bri_levels(0.008, 0.04); // offense is brighter + config.set_default_layout(layout_mbaskb2); + + /* sound hardware */ + SPEAKER(config, "mono").front_center(); + SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25); +} + +void mbaskb2_state::msoccer2(machine_config &config) +{ + mbaskb2(config); + config.set_default_layout(layout_msoccer2); +} + +// roms + +ROM_START( mbaskb2 ) + ROM_REGION( 0x0400, "maincpu", 0 ) + ROM_LOAD( "cop420l_nmp", 0x0000, 0x0400, CRC(afc44378) SHA1(e96435bd1d0b2bea5140efdfe21f4684f2525075) ) + + ROM_REGION( 0x0400, "subcpu", 0 ) + ROM_LOAD( "cop420l_nmq", 0x0000, 0x0400, CRC(70943f6f) SHA1(3f711d8b7c7c5dd13c68bf1ef980d2f784b748f4) ) +ROM_END + +ROM_START( msoccer2 ) + ROM_REGION( 0x0400, "maincpu", 0 ) + ROM_LOAD( "cop420l_nnm", 0x0000, 0x0400, CRC(c9169aca) SHA1(525486e8a18ec6132e53f9be582b2667172230a9) ) + + ROM_REGION( 0x0400, "subcpu", 0 ) + ROM_LOAD( "cop420l_nnk", 0x0000, 0x0400, CRC(a84dd5f4) SHA1(5d269816248319a2bca1708d5022af455d52682d) ) +ROM_END + + + + + /*************************************************************************** Mattel Look Alive! Football (model 1998) - * COP421L MCU bonded directly to PCB (rom serial HCJ) + * COP421L MCU die bonded directly to PCB (rom serial HCJ) * 2 7seg LEDs, LED matrix and overlay mask, 1-bit sound For a detailed description, see patent US4582323. 1st-person view versions @@ -1256,8 +1456,8 @@ void lafootb_state::lafootb(machine_config &config) // roms ROM_START( lafootb ) - ROM_REGION( 0x0800, "maincpu", 0 ) - ROM_LOAD( "cop421l-hcj", 0x0000, 0x0400, CRC(a9cc1e94) SHA1(7a39f5a5f10b8a2bd72da3ff3f3fcfaad35ead5f) ) + ROM_REGION( 0x0400, "maincpu", 0 ) + ROM_LOAD( "cop421l_hcj", 0x0000, 0x0400, CRC(a9cc1e94) SHA1(7a39f5a5f10b8a2bd72da3ff3f3fcfaad35ead5f) ) ROM_REGION( 38608, "mask", 0) ROM_LOAD( "lafootb.svg", 0, 38608, CRC(35387445) SHA1(7cd9db170820fc84d47545c3db8d991b2c5f4f7f) ) @@ -2194,6 +2394,8 @@ CONS( 1980, lchicken, 0, 0, lchicken, lchicken, lchicken_state, e CONS( 1979, funjacks, 0, 0, funjacks, funjacks, funjacks_state, empty_init, "Mattel", "Funtronics: Jacks", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) CONS( 1979, funrlgl, 0, 0, funrlgl, funrlgl, funrlgl_state, empty_init, "Mattel", "Funtronics: Red Light Green Light", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) CONS( 1980, funtag, 0, 0, funtag, funtag, funtag_state, empty_init, "Mattel", "Funtronics: Tag", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1979, mbaskb2, 0, 0, mbaskb2, mbaskb2, mbaskb2_state, empty_init, "Mattel", "Basketball 2 (Mattel)", MACHINE_SUPPORTS_SAVE ) +CONS( 1979, msoccer2, 0, 0, msoccer2, msoccer2, mbaskb2_state, empty_init, "Mattel", "Soccer 2 (Mattel)", MACHINE_SUPPORTS_SAVE ) CONS( 1980, lafootb, 0, 0, lafootb, lafootb, lafootb_state, empty_init, "Mattel", "Look Alive! Football", MACHINE_SUPPORTS_SAVE ) CONS( 1981, mdallas, 0, 0, mdallas, mdallas, mdallas_state, empty_init, "Mattel", "Dalla$ (J.R. handheld)", MACHINE_SUPPORTS_SAVE ) // *** @@ -2203,7 +2405,7 @@ CONS( 1982, bship82, bship, 0, bship82, bship82, bship82_state, e CONS( 1979, qkracer, 0, 0, qkracer, qkracer, qkracer_state, empty_init, "National Semiconductor", "QuizKid Racer (COP420 version)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) -CONS( 1984, solution, 0, 0, scat, solution, scat_state, empty_init, "SCAT", "The Solution", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) +COMP( 1984, solution, 0, 0, scat, solution, scat_state, empty_init, "SCAT", "The Solution", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) CONS( 1987, vidchal, 0, 0, vidchal, vidchal, vidchal_state, empty_init, "Select Merchandise", "Video Challenger", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/hh_cops1.cpp b/src/mame/drivers/hh_cops1.cpp index 4e8207c551c..e36cfc0d8fe 100644 --- a/src/mame/drivers/hh_cops1.cpp +++ b/src/mame/drivers/hh_cops1.cpp @@ -124,7 +124,7 @@ namespace { Mattel Basketball (model 2437) * PCB label: MA 6017/18/19 - * MM5799 MCU bonded directly to PCB (die label MM4799 C NCX) + * MM5799 MCU die bonded directly to PCB (die label MM4799 C NCX) * 4001 and 74145, also bonded to PCB * 2-digit 7seg led display, 21 leds, 2-bit sound @@ -333,7 +333,7 @@ ROM_END /*************************************************************************** National Semiconductor QuizKid Racer (MM5799 version) - * MM5799 MCU bonded directly to PCB (die label MM4799 C DUZ) + * MM5799 MCU die bonded directly to PCB (die label MM4799 C DUZ) * DS8874 LED driver, die bonded to PCB as well * 8-digit 7seg led display(1 custom digit), 1 green led, no sound * optional link cable to compete with another player (see patent US4051605) @@ -488,7 +488,7 @@ ROM_END /*************************************************************************** National Semiconductor QuizKid Speller - * MM5799 MCU bonded directly to PCB (die label MM4799 C NDF) + * MM5799 MCU die bonded directly to PCB (die label MM4799 C NDF) * 2-digit 7seg led display, green led, red led, no sound The manual included 99 pictures for matching the words, with increased diff --git a/src/mame/drivers/hh_sm510.cpp b/src/mame/drivers/hh_sm510.cpp index 73292c27642..aa9284ed815 100644 --- a/src/mame/drivers/hh_sm510.cpp +++ b/src/mame/drivers/hh_sm510.cpp @@ -107,7 +107,7 @@ BF-803 cs SM511 Balloon Fight " YM-901-S* x SM511 Super Mario Bros. " RGW-001 (2010 Ball remake) is on different hardware, ATmega169PV MCU. -The "Mini Classics" keychains are by Nelsonic, not Nintendo. +The "Mini Classics" keychains are by Stadlbauer, not Nintendo. Bassmate Computer (BM-501) is on identical hardware as G&W Multi Screen, but it's not part of the game series. diff --git a/src/mame/layout/mbaskb2.lay b/src/mame/layout/mbaskb2.lay new file mode 100644 index 00000000000..c3f3bd05871 --- /dev/null +++ b/src/mame/layout/mbaskb2.lay @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/layout/msoccer2.lay b/src/mame/layout/msoccer2.lay new file mode 100644 index 00000000000..3e4b939a9dd --- /dev/null +++ b/src/mame/layout/msoccer2.lay @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/mame.lst b/src/mame/mame.lst index ea183f66581..ab518847885 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -16408,7 +16408,9 @@ h2hsoccerc // Coleco lafootb // Mattel lchicken // LJN lightfgt // Milton Bradley +mbaskb2 // Mattel mdallas // Mattel +msoccer2 // Mattel plus1 // Milton Bradley qkracer // National Semiconductor solution // SCAT