trunk/src/mess/drivers/stopthie.c
| r242225 | r242226 | |
| 3 | 3 | /*************************************************************************** |
| 4 | 4 | |
| 5 | 5 | Parker Brothers Stop Thief |
| 6 | | * MP0905BNL TMS0980NLL MP6101B (die labeled 0980B-01A) |
| 6 | * TMS0980NLL MP6101B (die labeled 0980B-01A) |
| 7 | 7 | |
| 8 | | bla |
| 8 | Stop Thief is actually a board game, the electronic device emulated here |
| 9 | (called Electronic Crime Scanner) is an accessory. To start a game, press |
| 10 | the ON button. Otherwise, it is in test-mode where you can hear all sounds. |
| 9 | 11 | |
| 10 | 12 | |
| 11 | 13 | TODO: |
| 12 | 14 | - ON/OFF button callbacks |
| 13 | 15 | - MCU clock is unknown |
| 16 | - stopthiep: unable to start a game (may be intentional?) |
| 14 | 17 | |
| 15 | 18 | ***************************************************************************/ |
| 16 | 19 | |
| r242225 | r242226 | |
| 21 | 24 | #include "stopthie.lh" |
| 22 | 25 | |
| 23 | 26 | // master clock is unknown, the value below is an approximation |
| 24 | | #define MASTER_CLOCK (350000) |
| 27 | #define MASTER_CLOCK (425000) |
| 25 | 28 | |
| 26 | 29 | |
| 27 | 30 | class stopthief_state : public driver_device |
| r242225 | r242226 | |
| 38 | 41 | required_ioport_array<3> m_button_matrix; |
| 39 | 42 | required_device<speaker_sound_device> m_speaker; |
| 40 | 43 | |
| 41 | | UINT16 m_r; |
| 42 | 44 | UINT16 m_o; |
| 43 | 45 | |
| 44 | 46 | UINT16 m_leds_state[0x10]; |
| r242225 | r242226 | |
| 136 | 138 | WRITE16_MEMBER(stopthief_state::write_r) |
| 137 | 139 | { |
| 138 | 140 | // R0-R2: select digit |
| 139 | | UINT8 o = BITSWAP8(m_o,3,5,0,6,7,2,1,4) & 0x7f; |
| 140 | | for (int i = 0; i < 10; i++) |
| 141 | UINT8 o = BITSWAP8(m_o,3,5,2,1,4,0,6,7) & 0x7f; |
| 142 | for (int i = 0; i < 3; i++) |
| 141 | 143 | m_leds_state[i] = (data >> i & 1) ? o : 0; |
| 142 | 144 | |
| 143 | 145 | leds_update(); |
| 144 | 146 | |
| 145 | | // R3-..: sound |
| 146 | | |
| 147 | | |
| 148 | | m_r = data; |
| 147 | // R3-R8: speaker on |
| 148 | m_speaker->level_w((data & 0x1f8 && m_o & 8) ? 1 : 0); |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | WRITE16_MEMBER(stopthief_state::write_o) |
| 152 | 152 | { |
| 153 | 153 | // O0,O6: input mux |
| 154 | | // O3: sound on |
| 154 | // O3: speaker out |
| 155 | 155 | // O0-O2,O4-O7: led segments A-G |
| 156 | 156 | m_o = data; |
| 157 | 157 | } |
| r242225 | r242226 | |
| 210 | 210 | memset(m_leds_state, 0, sizeof(m_leds_state)); |
| 211 | 211 | memset(m_leds_cache, 0, sizeof(m_leds_cache)); |
| 212 | 212 | memset(m_leds_decay, 0, sizeof(m_leds_decay)); |
| 213 | | m_r = 0; |
| 214 | 213 | m_o = 0; |
| 215 | 214 | |
| 216 | 215 | save_item(NAME(m_leds_state)); |
| 217 | 216 | save_item(NAME(m_leds_cache)); |
| 218 | 217 | save_item(NAME(m_leds_decay)); |
| 219 | | save_item(NAME(m_r)); |
| 220 | 218 | save_item(NAME(m_o)); |
| 221 | 219 | } |
| 222 | 220 | |
| r242225 | r242226 | |
| 251 | 249 | |
| 252 | 250 | ROM_START( stopthie ) |
| 253 | 251 | ROM_REGION( 0x1000, "maincpu", 0 ) |
| 254 | | ROM_LOAD( "tms0980nll_mp6101b", 0x0000, 0x1000, CRC(5b4114af) SHA1(30a9b20dd5f0d57ed34c53e46f5adbf959d47828) ) |
| 252 | ROM_LOAD( "tms0980nll_mp6101b", 0x0000, 0x1000, CRC(8bde5bb4) SHA1(8c318fcce67acc24c7ae361f575f28ec6f94665a) ) |
| 255 | 253 | |
| 256 | 254 | ROM_REGION( 1246, "maincpu:ipla", 0 ) |
| 257 | 255 | ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) ) |
| r242225 | r242226 | |
| 265 | 263 | |
| 266 | 264 | ROM_START( stopthiep ) |
| 267 | 265 | ROM_REGION( 0x1000, "maincpu", 0 ) |
| 268 | | ROM_LOAD16_WORD( "us4341385", 0x0000, 0x1000, CRC(03691115) SHA1(bdcd212aa50bb1c26cb2d0ee97e5cfc04841c108) ) // from patent US4341385, data should be correct (it included checksums) |
| 269 | | // TODO: put in 0980 proper order |
| 266 | ROM_LOAD16_WORD( "us4341385", 0x0000, 0x1000, CRC(07aec38a) SHA1(0a3d0956495c0d6d9ea771feae6c14a473a800dc) ) // from patent US4341385, data should be correct (it included checksums) |
| 270 | 267 | |
| 271 | 268 | ROM_REGION( 1246, "maincpu:ipla", 0 ) |
| 272 | 269 | ROM_LOAD( "tms0980_default_ipla.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) ) |
| r242225 | r242226 | |
| 279 | 276 | ROM_END |
| 280 | 277 | |
| 281 | 278 | |
| 282 | | CONS( 1979, stopthie, 0, 0, stopthief, stopthief, driver_device, 0, "Parker Brothers", "Stop Thief (Electronic Crime Scanner)", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) |
| 279 | CONS( 1979, stopthie, 0, 0, stopthief, stopthief, driver_device, 0, "Parker Brothers", "Stop Thief (Electronic Crime Scanner)", GAME_SUPPORTS_SAVE ) |
| 283 | 280 | CONS( 1979, stopthiep, stopthie, 0, stopthief, stopthief, driver_device, 0, "Parker Brothers", "Stop Thief (Electronic Crime Scanner) (prototype)", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) |
trunk/src/mess/layout/stopthie.lay
| r242225 | r242226 | |
| 1 | 1 | <?xml version="1.0"?> |
| 2 | 2 | <mamelayout version="2"> |
| 3 | 3 | |
| 4 | <!-- define elements --> |
| 5 | |
| 4 | 6 | <element name="digit" defstate="0"> |
| 5 | 7 | <led7seg><color red="1.0" green="0.22" blue="0.18" /></led7seg> |
| 6 | 8 | </element> |
| 7 | 9 | |
| 10 | <element name="text_bldg"><text string="BLDG."><color red="0.7" green="0.7" blue="0.7" /></text></element> |
| 11 | <element name="text_street"><text string="STREET"><color red="0.7" green="0.7" blue="0.7" /></text></element> |
| 12 | <element name="text_loc"><text string="LOC."><color red="0.7" green="0.7" blue="0.7" /></text></element> |
| 13 | |
| 14 | |
| 15 | |
| 16 | <!-- build screen --> |
| 17 | |
| 8 | 18 | <view name="Internal Layout"> |
| 9 | | <bounds left="0" right="200" top="0" bottom="200" /> |
| 19 | <bounds left="0" right="80" top="0" bottom="15" /> |
| 10 | 20 | |
| 11 | | <bezel name="digit0" element="digit"> |
| 12 | | <bounds x="0" y="0" width="10" height="15" /> |
| 13 | | </bezel> |
| 14 | | <bezel name="digit1" element="digit"> |
| 15 | | <bounds x="20" y="0" width="10" height="15" /> |
| 16 | | </bezel> |
| 17 | | <bezel name="digit2" element="digit"> |
| 18 | | <bounds x="30" y="0" width="10" height="15" /> |
| 19 | | </bezel> |
| 21 | <bezel name="digit2" element="digit"><bounds x="20" y="0" width="10" height="15" /></bezel> |
| 22 | <bezel name="digit1" element="digit"><bounds x="40" y="0" width="10" height="15" /></bezel> |
| 23 | <bezel name="digit0" element="digit"><bounds x="50" y="0" width="10" height="15" /></bezel> |
| 20 | 24 | |
| 25 | |
| 26 | <bezel element="text_bldg"><bounds x="0" y="1.5" width="20" height="5.5" /></bezel> |
| 27 | <bezel element="text_street"><bounds x="0" y="7.5" width="20" height="5.5" /></bezel> |
| 28 | |
| 29 | <bezel element="text_loc"><bounds x="60" y="4.5" width="20" height="5.5" /></bezel> |
| 30 | |
| 21 | 31 | </view> |
| 22 | 32 | </mamelayout> |