From d27de747d3ec88fe0b47a773cde211d7e7c67f5a Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 30 Dec 2017 21:42:57 +0100 Subject: [PATCH] New working machines ----------- Alphie - The Electronic Robot (patent) [hap] --- src/mame/drivers/hh_sm510.cpp | 6 +- src/mame/drivers/hh_tms1k.cpp | 136 ++++++++++++++++++++++++++++++++++ src/mame/layout/alphie.lay | 53 +++++++++++++ src/mame/mame.lst | 1 + 4 files changed, 193 insertions(+), 3 deletions(-) create mode 100644 src/mame/layout/alphie.lay diff --git a/src/mame/drivers/hh_sm510.cpp b/src/mame/drivers/hh_sm510.cpp index 56db31c249a..0c9296f5339 100644 --- a/src/mame/drivers/hh_sm510.cpp +++ b/src/mame/drivers/hh_sm510.cpp @@ -3498,7 +3498,7 @@ MACHINE_CONFIG_END /*************************************************************************** VTech Electronic Number Muncher - * Sharp SM511 under epoxy (die label ?) + * Sharp SM511 under epoxy (die label 772) * lcd screen with custom segments, 1-bit sound ***************************************************************************/ @@ -4020,10 +4020,10 @@ ROM_END ROM_START( nummunch ) ROM_REGION( 0x1000, "maincpu", 0 ) - ROM_LOAD( "nummunch.program", 0x0000, 0x1000, CRC(2f7ff516) SHA1(132e7c5c4d69170953b2e51731992d6d6ba829f9) ) + ROM_LOAD( "772.program", 0x0000, 0x1000, CRC(2f7ff516) SHA1(132e7c5c4d69170953b2e51731992d6d6ba829f9) ) ROM_REGION( 0x100, "maincpu:melody", 0 ) - ROM_LOAD( "nummunch.melody", 0x000, 0x100, CRC(96fe463a) SHA1(dcef5eee15a3f6d21e0db1b8ae3fbddc81633fc8) ) + ROM_LOAD( "772.melody", 0x000, 0x100, CRC(96fe463a) SHA1(dcef5eee15a3f6d21e0db1b8ae3fbddc81633fc8) ) ROM_REGION( 140664, "svg", 0) ROM_LOAD( "nummunch.svg", 0, 140664, CRC(879df7e2) SHA1(78d8500a445cbbea0090d4e97b781c1e4ed11dd3) ) diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp index a3d9bb19aea..9f36de6f056 100644 --- a/src/mame/drivers/hh_tms1k.cpp +++ b/src/mame/drivers/hh_tms1k.cpp @@ -158,6 +158,7 @@ // internal artwork #include "7in1ss.lh" +#include "alphie.lh" #include "amaztron.lh" // clickable #include "arcmania.lh" // clickable #include "arrball.lh" @@ -7525,6 +7526,128 @@ MACHINE_CONFIG_END +/*************************************************************************** + + Playskool Alphie + * TMS1000 (label not known yet) + * 5 LEDs, 1-bit sound + + This is an educational toy robot for young kids. It has 2 sliding arms: + the left arm(Alphie's right arm) is for questions, the other for answers. + Cardboard inlays are used for arm position labels. + + There are 4 play modes: + - S symbol: Alphie answers questions. The answers are always the same, + no matter the inlay: Q1=A3, Q2=A5, Q3=A4, Q4=A1, Q5=A2. + - * symbol: used with Lunar Landing board game + - X symbol: used with Robot Land board game + - music note: play a selection of 5 tunes + +***************************************************************************/ + +class alphie_state : public hh_tms1k_state +{ +public: + alphie_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_tms1k_state(mconfig, type, tag) + { } + + TIMER_DEVICE_CALLBACK_MEMBER(show_arm_position); + + DECLARE_WRITE16_MEMBER(write_r); + DECLARE_WRITE16_MEMBER(write_o); + DECLARE_READ8_MEMBER(read_k); +}; + +// handlers + +TIMER_DEVICE_CALLBACK_MEMBER(alphie_state::show_arm_position) +{ + // arm position 1(up) to 5(down) + output().set_value("q_pos", 32 - count_leading_zeros(m_inp_matrix[1]->read())); + output().set_value("a_pos", 32 - count_leading_zeros(m_inp_matrix[2]->read())); +} + +WRITE16_MEMBER(alphie_state::write_r) +{ + // R1-R5, input mux (using d5 for Vss) + m_inp_mux = (data >> 1 & 0x1f) | 0x20; + + // R6-R10: leds + display_matrix(5, 1, data >> 6, 1); + + // R0: power off on falling edge (turn back on with button) + if (~data & m_r & 1) + power_off(); + + m_r = data; +} + +WRITE16_MEMBER(alphie_state::write_o) +{ + // O?: speaker out + m_speaker->level_w(data & 1); +} + +READ8_MEMBER(alphie_state::read_k) +{ + // K: multiplexed inputs, rotated matrix + return read_rotated_inputs(6); +} + + +// config + +static const ioport_value alphie_armpos_table[5] = { 0x01, 0x02, 0x04, 0x08, 0x10 }; + +static INPUT_PORTS_START( alphie ) + PORT_START("IN.0") // K1 + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)true) + + PORT_START("IN.1") // K2 + PORT_BIT( 0x1f, 0x00, IPT_POSITIONAL_V ) PORT_PLAYER(2) PORT_POSITIONS(5) PORT_REMAP_TABLE(alphie_armpos_table) PORT_SENSITIVITY(10) PORT_KEYDELTA(1) PORT_CENTERDELTA(0) PORT_NAME("Question Arm") + + PORT_START("IN.2") // K4 + PORT_BIT( 0x1f, 0x00, IPT_POSITIONAL_V ) PORT_POSITIONS(5) PORT_REMAP_TABLE(alphie_armpos_table) PORT_SENSITIVITY(10) PORT_KEYDELTA(1) PORT_CENTERDELTA(0) PORT_NAME("Answer Arm") + + PORT_START("IN.3") // K8 + PORT_CONFNAME( 0x0f, 0x01, "Activity" ) + PORT_CONFSETTING( 0x01, "Questions" ) + PORT_CONFSETTING( 0x02, "Lunar Landing" ) + PORT_CONFSETTING( 0x04, "Robot Land" ) + PORT_CONFSETTING( 0x08, "Tunes" ) +INPUT_PORTS_END + +// output PLA is guessed +static const u16 alphie_output_pla[0x20] = +{ + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 +}; + +static MACHINE_CONFIG_START( alphie ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", TMS1000, 350000) // approximation + MCFG_TMS1XXX_OUTPUT_PLA(alphie_output_pla) + MCFG_TMS1XXX_READ_K_CB(READ8(alphie_state, read_k)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(alphie_state, write_r)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(alphie_state, write_o)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("arm_position", alphie_state, show_arm_position, attotime::from_msec(50)) + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_alphie) + + /* 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 + + + + + /*************************************************************************** Tandy Radio Shack Championship Football (model 60-2150) @@ -9776,6 +9899,17 @@ ROM_START( lostreas ) ROM_END +ROM_START( alphie ) + ROM_REGION( 0x0400, "maincpu", 0 ) + ROM_LOAD( "us4280809", 0x0000, 0x0400, CRC(f8f14013) SHA1(bf31b929fcbcb189bbe4623104e1da0a639b5954) ) // from patent US4280809, should be good + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1000_common2_micro.pla", 0, 867, BAD_DUMP CRC(d33da3cf) SHA1(13c4ebbca227818db75e6db0d45b66ba5e207776) ) // not in patent description + ROM_REGION( 365, "maincpu:opla", 0 ) + ROM_LOAD( "tms1000_alphie_output.pla", 0, 365, NO_DUMP ) // " +ROM_END + + ROM_START( tcfball ) ROM_REGION( 0x0800, "maincpu", 0 ) ROM_LOAD( "mp1193", 0x0000, 0x0800, CRC(7d9f446f) SHA1(bb6af47b42d989494f21475a73f072cddf58c99f) ) @@ -9994,6 +10128,8 @@ CONS( 1980, splitsec, 0, 0, splitsec, splitsec, splitsec_state, 0, CONS( 1982, mmerlin, 0, 0, mmerlin, mmerlin, mmerlin_state, 0, "Parker Brothers", "Master Merlin", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) CONS( 1982, lostreas, 0, 0, lostreas, lostreas, lostreas_state, 0, "Parker Brothers", "Lost Treasure - The Electronic Deep-Sea Diving Game (Electronic Dive-Control Center)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // *** +CONS( 1978, alphie, 0, 0, alphie, alphie, alphie_state, 0, "Playskool", "Alphie - The Electronic Robot (patent)", MACHINE_SUPPORTS_SAVE ) // *** + CONS( 1980, tcfball, 0, 0, tcfball, tcfball, tcfball_state, 0, "Tandy Radio Shack", "Championship Football (model 60-2150)", MACHINE_SUPPORTS_SAVE ) CONS( 1980, tcfballa, tcfball, 0, tcfballa, tcfballa, tcfballa_state, 0, "Tandy Radio Shack", "Championship Football (model 60-2151)", MACHINE_SUPPORTS_SAVE ) CONS( 1981, tandy12, 0, 0, tandy12, tandy12, tandy12_state, 0, "Tandy Radio Shack", "Tandy-12: Computerized Arcade", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // some of the minigames: *** diff --git a/src/mame/layout/alphie.lay b/src/mame/layout/alphie.lay new file mode 100644 index 00000000000..259af608f92 --- /dev/null +++ b/src/mame/layout/alphie.lay @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 18016060c7e..199ee358066 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -14777,6 +14777,7 @@ tswampt // Tiger @source:hh_tms1k.cpp 7in1ss // Tiger Electronics +alphie // Playskool arcmania // Milton Bradley arrball // A-One LSI amaztron // Coleco