From 7a424e237a2c7b5bc0b69974ca8f9adeaf3a7516 Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 6 Dec 2014 20:17:06 +0100 Subject: [PATCH] (MESS)Game promoted to working ------------------ Stop Thief (Electronic Crime Scanner) [hap, seanriddle] --- src/mess/drivers/cnsector.c | 2 +- src/mess/drivers/stopthie.c | 31 ++++++++++++++----------------- src/mess/layout/stopthie.lay | 32 +++++++++++++++++++++----------- src/mess/mess.lst | 1 + 4 files changed, 37 insertions(+), 29 deletions(-) diff --git a/src/mess/drivers/cnsector.c b/src/mess/drivers/cnsector.c index f32148dc2ea..1af209bb830 100644 --- a/src/mess/drivers/cnsector.c +++ b/src/mess/drivers/cnsector.c @@ -234,7 +234,7 @@ MACHINE_CONFIG_END ROM_START( cnsector ) ROM_REGION( 0x0400, "maincpu", 0 ) - ROM_LOAD( "mp0905bnl_za0379", 0x0000, 0x0400, CRC(564fe1a0) SHA1(825840a73175eee12e9712c871799f00e3be2c53) ) + ROM_LOAD( "mp0905bnl_za0379", 0x0000, 0x0400, CRC(201036e9) SHA1(b37fef86bb2bceaf0ac8bb3745b4702d17366914) ) ROM_REGION( 782, "maincpu:ipla", 0 ) ROM_LOAD( "tms0970_default_ipla.pla", 0, 782, CRC(e038fc44) SHA1(dfc280f6d0a5828d1bb14fcd59ac29caf2c2d981) ) diff --git a/src/mess/drivers/stopthie.c b/src/mess/drivers/stopthie.c index 3d7fac66e77..c30943e7bb0 100644 --- a/src/mess/drivers/stopthie.c +++ b/src/mess/drivers/stopthie.c @@ -3,14 +3,17 @@ /*************************************************************************** Parker Brothers Stop Thief - * MP0905BNL TMS0980NLL MP6101B (die labeled 0980B-01A) + * TMS0980NLL MP6101B (die labeled 0980B-01A) - bla + Stop Thief is actually a board game, the electronic device emulated here + (called Electronic Crime Scanner) is an accessory. To start a game, press + the ON button. Otherwise, it is in test-mode where you can hear all sounds. TODO: - ON/OFF button callbacks - MCU clock is unknown + - stopthiep: unable to start a game (may be intentional?) ***************************************************************************/ @@ -21,7 +24,7 @@ #include "stopthie.lh" // master clock is unknown, the value below is an approximation -#define MASTER_CLOCK (350000) +#define MASTER_CLOCK (425000) class stopthief_state : public driver_device @@ -38,7 +41,6 @@ public: required_ioport_array<3> m_button_matrix; required_device m_speaker; - UINT16 m_r; UINT16 m_o; UINT16 m_leds_state[0x10]; @@ -136,22 +138,20 @@ READ8_MEMBER(stopthief_state::read_k) WRITE16_MEMBER(stopthief_state::write_r) { // R0-R2: select digit - UINT8 o = BITSWAP8(m_o,3,5,0,6,7,2,1,4) & 0x7f; - for (int i = 0; i < 10; i++) + UINT8 o = BITSWAP8(m_o,3,5,2,1,4,0,6,7) & 0x7f; + for (int i = 0; i < 3; i++) m_leds_state[i] = (data >> i & 1) ? o : 0; leds_update(); - // R3-..: sound - - - m_r = data; + // R3-R8: speaker on + m_speaker->level_w((data & 0x1f8 && m_o & 8) ? 1 : 0); } WRITE16_MEMBER(stopthief_state::write_o) { // O0,O6: input mux - // O3: sound on + // O3: speaker out // O0-O2,O4-O7: led segments A-G m_o = data; } @@ -210,13 +210,11 @@ void stopthief_state::machine_start() memset(m_leds_state, 0, sizeof(m_leds_state)); memset(m_leds_cache, 0, sizeof(m_leds_cache)); memset(m_leds_decay, 0, sizeof(m_leds_decay)); - m_r = 0; m_o = 0; save_item(NAME(m_leds_state)); save_item(NAME(m_leds_cache)); save_item(NAME(m_leds_decay)); - save_item(NAME(m_r)); save_item(NAME(m_o)); } @@ -251,7 +249,7 @@ MACHINE_CONFIG_END ROM_START( stopthie ) ROM_REGION( 0x1000, "maincpu", 0 ) - ROM_LOAD( "tms0980nll_mp6101b", 0x0000, 0x1000, CRC(5b4114af) SHA1(30a9b20dd5f0d57ed34c53e46f5adbf959d47828) ) + ROM_LOAD( "tms0980nll_mp6101b", 0x0000, 0x1000, CRC(8bde5bb4) SHA1(8c318fcce67acc24c7ae361f575f28ec6f94665a) ) ROM_REGION( 1246, "maincpu:ipla", 0 ) ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) ) @@ -265,8 +263,7 @@ ROM_END ROM_START( stopthiep ) ROM_REGION( 0x1000, "maincpu", 0 ) - ROM_LOAD16_WORD( "us4341385", 0x0000, 0x1000, CRC(03691115) SHA1(bdcd212aa50bb1c26cb2d0ee97e5cfc04841c108) ) // from patent US4341385, data should be correct (it included checksums) - // TODO: put in 0980 proper order + ROM_LOAD16_WORD( "us4341385", 0x0000, 0x1000, CRC(07aec38a) SHA1(0a3d0956495c0d6d9ea771feae6c14a473a800dc) ) // from patent US4341385, data should be correct (it included checksums) ROM_REGION( 1246, "maincpu:ipla", 0 ) ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) ) @@ -279,5 +276,5 @@ ROM_START( stopthiep ) ROM_END -CONS( 1979, stopthie, 0, 0, stopthief, stopthief, driver_device, 0, "Parker Brothers", "Stop Thief (Electronic Crime Scanner)", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) +CONS( 1979, stopthie, 0, 0, stopthief, stopthief, driver_device, 0, "Parker Brothers", "Stop Thief (Electronic Crime Scanner)", GAME_SUPPORTS_SAVE ) CONS( 1979, stopthiep, stopthie, 0, stopthief, stopthief, driver_device, 0, "Parker Brothers", "Stop Thief (Electronic Crime Scanner) (prototype)", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) diff --git a/src/mess/layout/stopthie.lay b/src/mess/layout/stopthie.lay index 7645d07ef71..8efd28b6f8d 100644 --- a/src/mess/layout/stopthie.lay +++ b/src/mess/layout/stopthie.lay @@ -1,22 +1,32 @@ + + - - + + + - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/src/mess/mess.lst b/src/mess/mess.lst index f19ed895e98..3101241e88f 100644 --- a/src/mess/mess.lst +++ b/src/mess/mess.lst @@ -2240,6 +2240,7 @@ cnsector starwbc starwbcp stopthie +stopthiep amico2k jtc jtces88