From 6000d9f9fbeed90da444c87338154ef2e339efa0 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 6 Mar 2015 18:07:16 +0100 Subject: elecbowl hardware is too complex to be in generic driver --- src/mess/drivers/elecbowl.c | 192 ++++++++++++++++++++++++++++++++++++++++++++ src/mess/drivers/hh_tms1k.c | 114 +------------------------- src/mess/mess.lst | 2 +- src/mess/mess.mak | 6 +- 4 files changed, 199 insertions(+), 115 deletions(-) create mode 100644 src/mess/drivers/elecbowl.c diff --git a/src/mess/drivers/elecbowl.c b/src/mess/drivers/elecbowl.c new file mode 100644 index 00000000000..33418b6d84f --- /dev/null +++ b/src/mess/drivers/elecbowl.c @@ -0,0 +1,192 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/*************************************************************************** + + Marx Series 300 Electronic Bowling Game + * TMS1100NLL MP3403 DBS 7836 SINGAPORE + + 10 lamps for bowling pins + 3 more bulbs, and 7segs for frame number and + scores. Board size is 10-12" by 6-8". + + some clues: + - it's from 1978 + - Merlin is MP3404, Amaze-A-Tron is MP3405, this one is MP3403 + - it plays some short jingles (you need to be lucky with button mashing) + +***************************************************************************/ + +#include "emu.h" +#include "cpu/tms0980/tms0980.h" +#include "sound/speaker.h" + +// internal artwork +#include "elecbowl.lh" + + +class elecbowl_state : public driver_device +{ +public: + elecbowl_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_inp_matrix(*this, "IN"), + m_speaker(*this, "speaker") + { } + + // devices + required_device m_maincpu; + required_ioport_array<4> m_inp_matrix; + required_device m_speaker; + + UINT16 m_r; + UINT16 m_o; + UINT16 m_inp_mux; + + DECLARE_READ8_MEMBER(read_k); + DECLARE_WRITE16_MEMBER(write_r); + DECLARE_WRITE16_MEMBER(write_o); + + virtual void machine_start(); +}; + + + +/*************************************************************************** + + I/O + +***************************************************************************/ + +READ8_MEMBER(elecbowl_state::read_k) +{ + UINT8 k = 0; + + // read selected input rows + for (int i = 0; i < 4; i++) + if (m_inp_mux >> i & 1) + k |= m_inp_matrix[i]->read(); + + return k; +} + +WRITE16_MEMBER(elecbowl_state::write_r) +{ + // R4-R7: input mux + m_inp_mux = data >> 4 & 0xf; + + // R9: speaker out + m_speaker->level_w(data >> 9 & 1); + + // R10: maybe a switch or other button row? + // others: ? +} + +WRITE16_MEMBER(elecbowl_state::write_o) +{ + // ? +} + + + +/*************************************************************************** + + Inputs + +***************************************************************************/ + +static INPUT_PORTS_START( elecbowl ) + PORT_START("IN.0") // R4 + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) + + PORT_START("IN.1") // R5 + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) + + PORT_START("IN.2") // R6 + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) // reset/newgame? + + PORT_START("IN.3") // R7 + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) +INPUT_PORTS_END + + + +/*************************************************************************** + + Machine Config + +***************************************************************************/ + +void elecbowl_state::machine_start() +{ + // zerofill + m_o = 0; + m_r = 0; + m_inp_mux = 0; + + // register for savestates + save_item(NAME(m_o)); + save_item(NAME(m_r)); + save_item(NAME(m_inp_mux)); +} + + +static const UINT16 elecbowl_output_pla[0x20] = +{ + /* O output PLA configuration currently unknown */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f +}; + +static MACHINE_CONFIG_START( elecbowl, elecbowl_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", TMS1100, 300000) // approximation - unknown freq + MCFG_TMS1XXX_OUTPUT_PLA(elecbowl_output_pla) + MCFG_TMS1XXX_READ_K_CB(READ8(elecbowl_state, read_k)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(elecbowl_state, write_r)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(elecbowl_state, write_o)) + + MCFG_DEFAULT_LAYOUT(layout_elecbowl) + + /* no video! */ + + /* 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 + + + +/*************************************************************************** + + Game driver(s) + +***************************************************************************/ + +ROM_START( elecbowl ) + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "mp3403", 0x0000, 0x0800, CRC(9eabaa7d) SHA1(b1f54587ed7f2bbf3a5d49075c807296384c2b06) ) + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1100_default_mpla.pla", 0, 867, BAD_DUMP CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) // not verified + ROM_REGION( 365, "maincpu:opla", 0 ) + ROM_LOAD( "tms1100_elecbowl_opla.pla", 0, 365, NO_DUMP ) +ROM_END + + +CONS( 1978, elecbowl, 0, 0, elecbowl, elecbowl, driver_device, 0, "Marx", "Electronic Bowling", GAME_SUPPORTS_SAVE | GAME_MECHANICAL | GAME_NOT_WORKING ) diff --git a/src/mess/drivers/hh_tms1k.c b/src/mess/drivers/hh_tms1k.c index e7bd81fadfd..109cc6100b1 100644 --- a/src/mess/drivers/hh_tms1k.c +++ b/src/mess/drivers/hh_tms1k.c @@ -16,7 +16,7 @@ @MP0914 TMS1000 1978, Entex Baseball 1 @MP1030 TMS1100 1980, APF Mathemagician @MP3226 TMS1000 1978, Milton Bradley Simon - @MP3403 TMS1100 1978, Marx Electronic Bowling + MP3403 TMS1100 1978, Marx Electronic Bowling @MP3404 TMS1100 1978, Parker Brothers Merlin @MP3405 TMS1100 1979, Coleco Amaze-A-Tron @MP3438A TMS1100 1979, Kenner Star Wars Electronic Battle Command @@ -68,7 +68,6 @@ #include "bankshot.lh" #include "cnsector.lh" #include "ebball.lh" -#include "elecbowl.lh" #include "elecdet.lh" #include "comp4.lh" #include "mathmagi.lh" @@ -156,10 +155,6 @@ public: DECLARE_WRITE16_MEMBER(starwbc_write_r); DECLARE_WRITE16_MEMBER(starwbc_write_o); - DECLARE_READ8_MEMBER(elecbowl_read_k); - DECLARE_WRITE16_MEMBER(elecbowl_write_r); - DECLARE_WRITE16_MEMBER(elecbowl_write_o); - DECLARE_READ8_MEMBER(comp4_read_k); DECLARE_WRITE16_MEMBER(comp4_write_r); DECLARE_WRITE16_MEMBER(comp4_write_o); @@ -1146,100 +1141,6 @@ MACHINE_CONFIG_END -/*************************************************************************** - - Marx Series 300 Electronic Bowling Game - * TMS1100NLL MP3403 DBS 7836 SINGAPORE - - 10 lamps for bowling pins + 3 more bulbs, and 7segs for frame number and - scores. Board size is 10-12" by 6-8". - - some clues: - - it's from 1978 - - Merlin is MP3404, Amaze-A-Tron is MP3405, this one is MP3403 - - it plays some short jingles (you need to be lucky with button mashing) - -***************************************************************************/ - -READ8_MEMBER(hh_tms1k_state::elecbowl_read_k) -{ - return read_inputs(4); -} - -WRITE16_MEMBER(hh_tms1k_state::elecbowl_write_r) -{ - // R4-R7: input mux - m_inp_mux = data >> 4 & 0xf; - - // R9: speaker out - m_speaker->level_w(data >> 9 & 1); - - // R10: maybe a switch or other button row? - // others: ? -} - -WRITE16_MEMBER(hh_tms1k_state::elecbowl_write_o) -{ - // ? -} - -static INPUT_PORTS_START( elecbowl ) - PORT_START("IN.0") // R4 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) - - PORT_START("IN.1") // R5 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) - - PORT_START("IN.2") // R6 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) // reset/newgame? - - PORT_START("IN.3") // R7 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) -INPUT_PORTS_END - - -static const UINT16 elecbowl_output_pla[0x20] = -{ - /* O output PLA configuration currently unknown */ - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f -}; - -static MACHINE_CONFIG_START( elecbowl, hh_tms1k_state ) - - /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1100, 300000) // approximation - unknown freq - MCFG_TMS1XXX_OUTPUT_PLA(elecbowl_output_pla) - MCFG_TMS1XXX_READ_K_CB(READ8(hh_tms1k_state, elecbowl_read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(hh_tms1k_state, elecbowl_write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(hh_tms1k_state, elecbowl_write_o)) - - /* no video! */ - - /* 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 - - - - - /*************************************************************************** Milton Bradley Comp IV @@ -2138,17 +2039,6 @@ ROM_START( starwbcp ) ROM_END -ROM_START( elecbowl ) - ROM_REGION( 0x0800, "maincpu", 0 ) - ROM_LOAD( "mp3403", 0x0000, 0x0800, CRC(9eabaa7d) SHA1(b1f54587ed7f2bbf3a5d49075c807296384c2b06) ) - - ROM_REGION( 867, "maincpu:mpla", 0 ) - ROM_LOAD( "tms1100_default_mpla.pla", 0, 867, BAD_DUMP CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) // not verified - ROM_REGION( 365, "maincpu:opla", 0 ) - ROM_LOAD( "tms1100_elecbowl_opla.pla", 0, 365, NO_DUMP ) -ROM_END - - ROM_START( comp4 ) ROM_REGION( 0x0400, "maincpu", 0 ) ROM_LOAD( "tmc0904nl_cp0904a", 0x0000, 0x0400, CRC(6233ee1b) SHA1(738e109b38c97804b4ec52bed80b00a8634ad453) ) @@ -2277,8 +2167,6 @@ CONS( 1979, elecdet, 0, 0, elecdet, elecdet, driver_device, 0, "Ide CONS( 1979, starwbc, 0, 0, starwbc, starwbc, driver_device, 0, "Kenner", "Star Wars - Electronic Battle Command", GAME_SUPPORTS_SAVE ) CONS( 1979, starwbcp, starwbc, 0, starwbc, starwbc, driver_device, 0, "Kenner", "Star Wars - Electronic Battle Command (prototype)", GAME_SUPPORTS_SAVE ) -CONS( 1978, elecbowl, 0, 0, elecbowl, elecbowl, driver_device, 0, "Marx", "Electronic Bowling", GAME_SUPPORTS_SAVE | GAME_MECHANICAL | GAME_NOT_WORKING ) - CONS( 1977, comp4, 0, 0, comp4, comp4, driver_device, 0, "Milton Bradley", "Comp IV", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) CONS( 1978, simon, 0, 0, simon, simon, driver_device, 0, "Milton Bradley", "Simon (Rev. A)", GAME_SUPPORTS_SAVE ) diff --git a/src/mess/mess.lst b/src/mess/mess.lst index 983b59f7491..47f41aab2d1 100644 --- a/src/mess/mess.lst +++ b/src/mess/mess.lst @@ -2185,7 +2185,6 @@ ebball // Entex elecdet // Ideal starwbc // Kenner starwbcp // Kenner (prototype) -elecbowl // Marx comp4 // Milton Bradley simon // Milton Bradley cnsector // Parker Bros @@ -2201,6 +2200,7 @@ tmpacman // Tomy tmtennis // Tomy alnchase // Tomy +elecbowl // Marx wildfire // Parker Bros diff --git a/src/mess/mess.mak b/src/mess/mess.mak index 135a9906275..8977d24236b 100644 --- a/src/mess/mess.mak +++ b/src/mess/mess.mak @@ -748,6 +748,7 @@ DRVLIBS += \ $(MESSOBJ)/luxor.a \ $(MESSOBJ)/magnavox.a \ $(MESSOBJ)/makerbot.a \ + $(MESSOBJ)/marx.a \ $(MESSOBJ)/matsushi.a \ $(MESSOBJ)/mattel.a \ $(MESSOBJ)/mb.a \ @@ -1368,6 +1369,9 @@ $(MESSOBJ)/magnavox.a: \ $(MESSOBJ)/makerbot.a: \ $(MESS_DRIVERS)/replicator.o\ +$(MESSOBJ)/marx.a: \ + $(MESS_DRIVERS)/elecbowl.o \ + $(MESSOBJ)/mattel.a: \ $(MESS_DRIVERS)/aquarius.o $(MESS_VIDEO)/aquarius.o \ $(MESS_DRIVERS)/juicebox.o \ @@ -2114,6 +2118,7 @@ $(MESS_DRIVERS)/digel804.o: $(MESS_LAYOUT)/digel804.lh $(MESS_DRIVERS)/dmv.o: $(MESS_LAYOUT)/dmv.lh $(MESS_DRIVERS)/dolphunk.o: $(MESS_LAYOUT)/dolphunk.lh $(MESS_DRIVERS)/eacc.o: $(MESS_LAYOUT)/eacc.lh +$(MESS_DRIVERS)/elecbowl.o: $(MESS_LAYOUT)/elecbowl.lh $(MESS_DRIVERS)/elekscmp.o: $(MESS_LAYOUT)/elekscmp.lh $(MESS_DRIVERS)/elf.o: $(MESS_LAYOUT)/elf2.lh $(MESS_MACHINE)/esqvfd.o: $(MESS_LAYOUT)/esq2by40.lh \ @@ -2134,7 +2139,6 @@ $(MESS_DRIVERS)/hh_tms1k.o: $(MESS_LAYOUT)/amaztron.lh \ $(MESS_LAYOUT)/cnsector.lh \ $(MESS_LAYOUT)/comp4.lh \ $(MESS_LAYOUT)/ebball.lh \ - $(MESS_LAYOUT)/elecbowl.lh \ $(MESS_LAYOUT)/elecdet.lh \ $(MESS_LAYOUT)/mathmagi.lh \ $(MESS_LAYOUT)/merlin.lh \ -- cgit v1.2.3