trunk/src/mame/drivers/s8.c
| r32489 | r32490 | |
| 2 | 2 | // copyright-holders:Robbbert |
| 3 | 3 | /*********************************************************************************** |
| 4 | 4 | |
| 5 | | PINBALL |
| 6 | | Williams System 8 |
| 5 | PINBALL |
| 6 | Williams System 8 |
| 7 | These are not true pinballs in the normal sense, but are unusual novelty |
| 8 | machines. Unfortunately they were mostly cancelled before production could |
| 9 | begin. |
| 7 | 10 | |
| 8 | | Only 2 games used this system. |
| 9 | | The very first time run, the display will show the model number (526 or 543). |
| 10 | | Press F3 to clear this, then follow instructions below. |
| 11 | Games: |
| 12 | - Pennant Fever (#526) |
| 13 | - Gridiron (#538) |
| 14 | - Still Crazy (#543) |
| 15 | - Break Street |
| 11 | 16 | |
| 12 | | - Pennant Fever, which isn't a true pinball, it is a baseball game where you aim |
| 13 | | for targets at the top of the playfield, and the players advance towards a |
| 14 | | home run. There are no bumpers or other 'usual' pinball items. 1 or 2 players. |
| 15 | | How to play: |
| 16 | | - Insert coin (credits shows in innings) |
| 17 | | - Start game |
| 18 | | - Player 1 is 'Visitors'; optional Player 2 is 'Home' |
| 19 | | - Press one of L,B,C,V to hit the ball; or comma,period,slash for a home run; |
| 20 | | or (F then A) for a Strike; or N,Z for Out. |
| 21 | | - Wait for score to start flashing |
| 22 | | - Press another key, etc |
| 23 | | - When you have 3 strikes, you are Out |
| 24 | | - When you have 3 Outs, your Innings ends (other player gets a turn) |
| 25 | | - After 3 Innings, it's game over. |
| 26 | | - Match digit appears in Outs digit. |
| 17 | The first time run, the display will show the model number. Press F3 to clear this. |
| 27 | 18 | |
| 28 | | - Still Crazy, a novelty game where the playfield is completely vertical. It has |
| 29 | | 4 flippers and the idea is to get the ball up to the alcohol 'still' before |
| 30 | | the 'revenuers' do. The idea didn't catch on, and the game was not officially |
| 31 | | released. 1 player. The display shows Score and Batch. There is no credit |
| 32 | | display. |
| 19 | Pennant Fever is a baseball game where you aim for targets at the top of the |
| 20 | playfield, and the players advance towards a home run. There are no bumpers |
| 21 | or other 'usual' pinball items. 1 or 2 players. |
| 22 | How to play: |
| 23 | - Insert coin (credits shows in innings) |
| 24 | - Start game |
| 25 | - Player 1 is 'Visitors'; optional Player 2 is 'Home' |
| 26 | - Press one of L,B,C,V to hit the ball; or comma,period,slash for a home run; |
| 27 | or (F then A) for a Strike; or N,Z for Out. |
| 28 | - Wait for score to start flashing |
| 29 | - Press another key, etc |
| 30 | - When you have 3 strikes, you are Out |
| 31 | - When you have 3 Outs, your Innings ends (other player gets a turn) |
| 32 | - After 3 Innings, it's game over. |
| 33 | - Match digit appears in Outs digit. |
| 33 | 34 | |
| 35 | Gridiron, a conversion kit for Pennant Fever. Didn't get past the prototype stage. |
| 36 | |
| 37 | Still Crazy, also only a prototype. See s8a.c for more. |
| 38 | |
| 39 | Break Street, another failed novelty, not much is known about it. Seems it |
| 40 | features a break-dancing toy and a spinning disk. |
| 41 | |
| 34 | 42 | ToDo: |
| 35 | | - Make Still Crazy layout. |
| 36 | | - Get Still Crazy coin-in to register. |
| 37 | | Workaround: |
| 38 | | - Start in debug mode, g to run the game, go to memory view and enter credits |
| 39 | | into location 0x738. (example: 90 gives 90 credits). Quit. |
| 40 | | - Start in non-debug mode. Press 1 to start, it works fine, apart from the |
| 41 | | knocker making a lot of noise. Keys to use: A then any key on that row. |
| 43 | - Diagnostic buttons not working |
| 42 | 44 | |
| 45 | |
| 43 | 46 | ************************************************************************************/ |
| 44 | 47 | |
| 45 | 48 | |
| r32489 | r32490 | |
| 54 | 57 | { |
| 55 | 58 | public: |
| 56 | 59 | s8_state(const machine_config &mconfig, device_type type, const char *tag) |
| 57 | | : genpin_class(mconfig, type, tag), |
| 58 | | m_maincpu(*this, "maincpu"), |
| 59 | | m_audiocpu(*this, "audiocpu"), |
| 60 | | m_dac(*this, "dac"), |
| 61 | | m_pias(*this, "pias"), |
| 62 | | m_pia21(*this, "pia21"), |
| 63 | | m_pia24(*this, "pia24"), |
| 64 | | m_pia28(*this, "pia28"), |
| 65 | | m_pia30(*this, "pia30") |
| 60 | : genpin_class(mconfig, type, tag) |
| 61 | , m_maincpu(*this, "maincpu") |
| 62 | , m_audiocpu(*this, "audiocpu") |
| 63 | , m_dac(*this, "dac") |
| 64 | , m_pias(*this, "pias") |
| 65 | , m_pia21(*this, "pia21") |
| 66 | , m_pia24(*this, "pia24") |
| 67 | , m_pia28(*this, "pia28") |
| 68 | , m_pia30(*this, "pia30") |
| 66 | 69 | { } |
| 67 | 70 | |
| 68 | 71 | DECLARE_READ8_MEMBER(dac_r); |
| 69 | | DECLARE_WRITE8_MEMBER(dac_w); |
| 70 | 72 | DECLARE_WRITE8_MEMBER(dig0_w); |
| 71 | 73 | DECLARE_WRITE8_MEMBER(dig1_w); |
| 72 | 74 | DECLARE_WRITE8_MEMBER(lamp0_w); |
| r32489 | r32490 | |
| 80 | 82 | DECLARE_READ_LINE_MEMBER(pia21_ca1_r); |
| 81 | 83 | DECLARE_READ_LINE_MEMBER(pia28_ca1_r); |
| 82 | 84 | DECLARE_READ_LINE_MEMBER(pia28_cb1_r); |
| 83 | | DECLARE_WRITE_LINE_MEMBER(pias_ca2_w); |
| 84 | | DECLARE_WRITE_LINE_MEMBER(pias_cb2_w); |
| 85 | 85 | DECLARE_WRITE_LINE_MEMBER(pia21_ca2_w); |
| 86 | 86 | DECLARE_WRITE_LINE_MEMBER(pia21_cb2_w) { }; // enable solenoids |
| 87 | 87 | DECLARE_WRITE_LINE_MEMBER(pia24_cb2_w) { }; // dummy to stop error log filling up |
| r32489 | r32490 | |
| 91 | 91 | DECLARE_INPUT_CHANGED_MEMBER(main_nmi); |
| 92 | 92 | DECLARE_INPUT_CHANGED_MEMBER(audio_nmi); |
| 93 | 93 | DECLARE_MACHINE_RESET(s8); |
| 94 | | protected: |
| 95 | | |
| 96 | | // devices |
| 94 | private: |
| 95 | UINT8 m_t_c; |
| 96 | UINT8 m_sound_data; |
| 97 | UINT8 m_strobe; |
| 98 | UINT8 m_kbdrow; |
| 99 | bool m_data_ok; |
| 97 | 100 | required_device<cpu_device> m_maincpu; |
| 98 | 101 | required_device<cpu_device> m_audiocpu; |
| 99 | 102 | required_device<dac_device> m_dac; |
| r32489 | r32490 | |
| 102 | 105 | required_device<pia6821_device> m_pia24; |
| 103 | 106 | required_device<pia6821_device> m_pia28; |
| 104 | 107 | required_device<pia6821_device> m_pia30; |
| 105 | | private: |
| 106 | | UINT8 m_t_c; |
| 107 | | UINT8 m_sound_data; |
| 108 | | UINT8 m_strobe; |
| 109 | | UINT8 m_kbdrow; |
| 110 | | bool m_data_ok; |
| 111 | 108 | }; |
| 112 | 109 | |
| 113 | 110 | static ADDRESS_MAP_START( s8_main_map, AS_PROGRAM, 8, s8_state ) |
| r32489 | r32490 | |
| 118 | 115 | AM_RANGE(0x2400, 0x2403) AM_DEVREADWRITE("pia24", pia6821_device, read, write) // lamps |
| 119 | 116 | AM_RANGE(0x2800, 0x2803) AM_DEVREADWRITE("pia28", pia6821_device, read, write) // display |
| 120 | 117 | AM_RANGE(0x3000, 0x3003) AM_DEVREADWRITE("pia30", pia6821_device, read, write) // inputs |
| 121 | | AM_RANGE(0x5000, 0x7fff) AM_ROM |
| 118 | AM_RANGE(0x5000, 0x7fff) AM_ROM AM_REGION("roms", 0) |
| 122 | 119 | ADDRESS_MAP_END |
| 123 | 120 | |
| 124 | 121 | static ADDRESS_MAP_START( s8_audio_map, AS_PROGRAM, 8, s8_state ) |
| 125 | 122 | AM_RANGE(0x0000, 0x00ff) AM_RAM |
| 126 | | AM_RANGE(0x2000, 0x2003) AM_DEVREADWRITE("pias", pia6821_device, read, write) // scrzy_l1 sounds |
| 127 | | AM_RANGE(0x4000, 0x4003) AM_DEVREADWRITE("pias", pia6821_device, read, write) // pfevr sounds |
| 128 | | AM_RANGE(0x8000, 0xffff) AM_ROM |
| 123 | AM_RANGE(0x4000, 0x4003) AM_DEVREADWRITE("pias", pia6821_device, read, write) |
| 124 | AM_RANGE(0xc000, 0xffff) AM_ROM AM_REGION("audioroms", 0) |
| 129 | 125 | ADDRESS_MAP_END |
| 130 | 126 | |
| 131 | 127 | static INPUT_PORTS_START( s8 ) |
| r32489 | r32490 | |
| 144 | 140 | |
| 145 | 141 | PORT_START("X2") |
| 146 | 142 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) |
| 147 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) |
| 148 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) |
| 149 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F) |
| 150 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_G) |
| 151 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_H) |
| 152 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_J) |
| 153 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_K) |
| 143 | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 154 | 144 | |
| 155 | 145 | PORT_START("X4") |
| 156 | 146 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_L) |
| r32489 | r32490 | |
| 165 | 155 | PORT_START("X8") |
| 166 | 156 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_STOP) |
| 167 | 157 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_SLASH) |
| 168 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_COLON) |
| 169 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_QUOTE) |
| 170 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_X) |
| 171 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_MINUS) |
| 172 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_EQUALS) |
| 173 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSPACE) |
| 158 | PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 174 | 159 | |
| 175 | 160 | PORT_START("X10") |
| 176 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_OPENBRACE) |
| 177 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_CLOSEBRACE) |
| 178 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSLASH) |
| 179 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_ENTER) |
| 180 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_LEFT) |
| 181 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_RIGHT) |
| 182 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_UP) |
| 183 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_DOWN) |
| 161 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 184 | 162 | |
| 185 | 163 | PORT_START("X20") |
| 186 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Q) |
| 187 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_W) |
| 188 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_E) |
| 189 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_R) |
| 190 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Y) |
| 191 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_U) |
| 192 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_I) |
| 193 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_O) |
| 164 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 194 | 165 | |
| 195 | 166 | PORT_START("X40") |
| 196 | 167 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r32489 | r32490 | |
| 273 | 244 | |
| 274 | 245 | WRITE8_MEMBER( s8_state::dig1_w ) |
| 275 | 246 | { |
| 276 | | static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0, 0, 0, 0, 0, 0 }; // MC14558 |
| 247 | static const UINT8 patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0,0,0,0,0,0 }; // MC14543 |
| 277 | 248 | if (m_data_ok) |
| 278 | 249 | { |
| 279 | 250 | output_set_digit_value(m_strobe+16, patterns[data&15]); |
| r32489 | r32490 | |
| 286 | 257 | { |
| 287 | 258 | char kbdrow[8]; |
| 288 | 259 | sprintf(kbdrow,"X%X",m_kbdrow); |
| 289 | | return ~ioport(kbdrow)->read(); |
| 260 | return ioport(kbdrow)->read() ^ 0xff; |
| 290 | 261 | } |
| 291 | 262 | |
| 292 | 263 | WRITE8_MEMBER( s8_state::switch_w ) |
| r32489 | r32490 | |
| 294 | 265 | m_kbdrow = data; |
| 295 | 266 | } |
| 296 | 267 | |
| 297 | | WRITE_LINE_MEMBER( s8_state::pias_ca2_w ) |
| 298 | | { |
| 299 | | // speech clock |
| 300 | | } |
| 301 | | |
| 302 | | WRITE_LINE_MEMBER( s8_state::pias_cb2_w ) |
| 303 | | { |
| 304 | | // speech data |
| 305 | | } |
| 306 | | |
| 307 | 268 | READ8_MEMBER( s8_state::dac_r ) |
| 308 | 269 | { |
| 309 | 270 | return m_sound_data; |
| 310 | 271 | } |
| 311 | 272 | |
| 312 | | WRITE8_MEMBER( s8_state::dac_w ) |
| 273 | TIMER_DEVICE_CALLBACK_MEMBER( s8_state::irq ) |
| 313 | 274 | { |
| 314 | | m_dac->write_unsigned8(data); |
| 315 | | } |
| 316 | | |
| 317 | | TIMER_DEVICE_CALLBACK_MEMBER( s8_state::irq) |
| 318 | | { |
| 319 | 275 | if (m_t_c > 0x70) |
| 320 | 276 | m_maincpu->set_input_line(M6800_IRQ_LINE, ASSERT_LINE); |
| 321 | 277 | else |
| r32489 | r32490 | |
| 324 | 280 | |
| 325 | 281 | static MACHINE_CONFIG_START( s8, s8_state ) |
| 326 | 282 | /* basic machine hardware */ |
| 327 | | MCFG_CPU_ADD("maincpu", M6802, 4000000) |
| 283 | MCFG_CPU_ADD("maincpu", M6802, XTAL_4MHz) |
| 328 | 284 | MCFG_CPU_PROGRAM_MAP(s8_main_map) |
| 329 | 285 | MCFG_TIMER_DRIVER_ADD_PERIODIC("irq", s8_state, irq, attotime::from_hz(250)) |
| 330 | 286 | MCFG_MACHINE_RESET_OVERRIDE(s8_state, s8) |
| r32489 | r32490 | |
| 372 | 328 | MCFG_NVRAM_ADD_1FILL("nvram") |
| 373 | 329 | |
| 374 | 330 | /* Add the soundcard */ |
| 375 | | MCFG_CPU_ADD("audiocpu", M6808, 4000000) |
| 331 | MCFG_CPU_ADD("audiocpu", M6808, XTAL_4MHz) |
| 376 | 332 | MCFG_CPU_PROGRAM_MAP(s8_audio_map) |
| 377 | 333 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 378 | 334 | MCFG_SOUND_ADD("dac", DAC, 0) |
| 379 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 335 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 380 | 336 | |
| 381 | 337 | MCFG_DEVICE_ADD("pias", PIA6821, 0) |
| 382 | 338 | MCFG_PIA_READPA_HANDLER(READ8(s8_state, dac_r)) |
| 383 | | MCFG_PIA_WRITEPA_HANDLER(WRITE8(s8_state, sound_w)) |
| 384 | | MCFG_PIA_WRITEPB_HANDLER(WRITE8(s8_state, dac_w)) |
| 385 | | MCFG_PIA_CA2_HANDLER(WRITELINE(s8_state, pias_ca2_w)) |
| 386 | | MCFG_PIA_CB2_HANDLER(WRITELINE(s8_state, pias_cb2_w)) |
| 339 | MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8("dac", dac_device, write_unsigned8)) |
| 387 | 340 | MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("audiocpu", m6808_cpu_device, irq_line)) |
| 388 | 341 | MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("audiocpu", m6808_cpu_device, irq_line)) |
| 389 | 342 | MACHINE_CONFIG_END |
| r32489 | r32490 | |
| 392 | 345 | / Pennant Fever (#526) 05/1984 |
| 393 | 346 | /-------------------------------*/ |
| 394 | 347 | ROM_START(pfevr_l2) |
| 395 | | ROM_REGION(0x10000, "maincpu", 0) |
| 396 | | ROM_LOAD("pf-rom1.u19", 0x5000, 0x1000, CRC(00be42bd) SHA1(72ca21c96e3ffa3c43499165f3339b669c8e94a5)) |
| 397 | | ROM_LOAD("pf-rom2.u20", 0x6000, 0x2000, CRC(7b101534) SHA1(21e886d5872104d71bb528b9affb12230268597a)) |
| 348 | ROM_REGION(0x3000, "roms", 0) |
| 349 | ROM_LOAD("pf-rom1.u19", 0x0000, 0x1000, CRC(00be42bd) SHA1(72ca21c96e3ffa3c43499165f3339b669c8e94a5)) |
| 350 | ROM_LOAD("pf-rom2.u20", 0x1000, 0x2000, CRC(7b101534) SHA1(21e886d5872104d71bb528b9affb12230268597a)) |
| 398 | 351 | |
| 399 | | ROM_REGION(0x10000, "audiocpu", 0) |
| 400 | | ROM_LOAD("cpu_u49.128", 0xc000, 0x4000, CRC(b0161712) SHA1(5850f1f1f11e3ac9b9629cff2b26c4ad32436b55)) |
| 352 | ROM_REGION(0x4000, "audioroms", 0) |
| 353 | ROM_LOAD("cpu_u49.128", 0x0000, 0x4000, CRC(b0161712) SHA1(5850f1f1f11e3ac9b9629cff2b26c4ad32436b55)) |
| 401 | 354 | ROM_END |
| 402 | 355 | |
| 403 | 356 | ROM_START(pfevr_p3) |
| 404 | | ROM_REGION(0x10000, "maincpu", 0) |
| 405 | | ROM_LOAD("cpu_u19.732", 0x5000, 0x1000, CRC(03796c6d) SHA1(38c95fcce9d0f357a74f041f0df006b9c6f6efc7)) |
| 406 | | ROM_LOAD("cpu_u20.764", 0x6000, 0x2000, CRC(3a3acb39) SHA1(7844cc30a9486f718a556850fc9cef3be82f26b7)) |
| 357 | ROM_REGION(0x3000, "roms", 0) |
| 358 | ROM_LOAD("cpu_u19.732", 0x0000, 0x1000, CRC(03796c6d) SHA1(38c95fcce9d0f357a74f041f0df006b9c6f6efc7)) |
| 359 | ROM_LOAD("cpu_u20.764", 0x1000, 0x2000, CRC(3a3acb39) SHA1(7844cc30a9486f718a556850fc9cef3be82f26b7)) |
| 407 | 360 | |
| 408 | | ROM_REGION(0x10000, "audiocpu", 0) |
| 409 | | ROM_LOAD("cpu_u49.128", 0xc000, 0x4000, CRC(b0161712) SHA1(5850f1f1f11e3ac9b9629cff2b26c4ad32436b55)) |
| 361 | ROM_REGION(0x4000, "audioroms", 0) |
| 362 | ROM_LOAD("cpu_u49.128", 0x0000, 0x4000, CRC(b0161712) SHA1(5850f1f1f11e3ac9b9629cff2b26c4ad32436b55)) |
| 410 | 363 | ROM_END |
| 411 | 364 | |
| 412 | 365 | |
trunk/src/mame/drivers/s8a.c
| r32489 | r32490 | |
| 5 | 5 | PINBALL |
| 6 | 6 | Williams System 8: Still Crazy |
| 7 | 7 | |
| 8 | | The very first time run, the display will show the model number (526 or 543). |
| 9 | | Press F3 to clear this, then follow instructions below. |
| 8 | The first time run, the display will show the model number (543). |
| 9 | Press F3 to clear this. |
| 10 | 10 | |
| 11 | | A novelty game where the playfield is completely vertical. It has |
| 12 | | 4 flippers and the idea is to get the ball up to the alcohol 'still' before |
| 13 | | the 'revenuers' do. The idea didn't catch on, and the game was not officially |
| 14 | | released. 1 player. The display shows Score and Batch. There is no credit |
| 15 | | display. |
| 11 | A novelty game where the playfield is completely vertical. It has 4 flippers and the |
| 12 | idea is to get the ball up to the alcohol 'still' before the 'revenuers' do. The |
| 13 | idea didn't catch on, and the game was not officially released. 1 player. |
| 14 | The display shows Score and Batch. There is no credit display. |
| 15 | If the number of batches exceeds 9, the 'hidden digit' will show the tens. |
| 16 | You cannot get more than 99 batches. |
| 17 | The score only has 5 digits, but the game stores the 100,000 digit internally. |
| 16 | 18 | |
| 17 | 19 | ToDo: |
| 18 | | - Make Still Crazy layout. |
| 19 | | - Get Still Crazy coin-in to register. |
| 20 | | Workaround: |
| 21 | | - Start in debug mode, g to run the game, go to memory view and enter credits |
| 22 | | into location 0x738. (example: 90 gives 90 credits). Quit. |
| 23 | | - Start in non-debug mode. Press 1 to start, it works fine, apart from the |
| 24 | | knocker making a lot of noise. Keys to use: A then any key on that row. |
| 20 | - Diagnostic buttons not working |
| 25 | 21 | |
| 26 | 22 | ************************************************************************************/ |
| 27 | 23 | |
| r32489 | r32490 | |
| 49 | 45 | { } |
| 50 | 46 | |
| 51 | 47 | DECLARE_READ8_MEMBER(dac_r); |
| 52 | | DECLARE_WRITE8_MEMBER(dac_w); |
| 53 | 48 | DECLARE_WRITE8_MEMBER(dig0_w); |
| 54 | 49 | DECLARE_WRITE8_MEMBER(dig1_w); |
| 55 | 50 | DECLARE_WRITE8_MEMBER(lamp0_w); |
| r32489 | r32490 | |
| 63 | 58 | DECLARE_READ_LINE_MEMBER(pia21_ca1_r); |
| 64 | 59 | DECLARE_READ_LINE_MEMBER(pia28_ca1_r); |
| 65 | 60 | DECLARE_READ_LINE_MEMBER(pia28_cb1_r); |
| 66 | | DECLARE_WRITE_LINE_MEMBER(pias_ca2_w); |
| 67 | | DECLARE_WRITE_LINE_MEMBER(pias_cb2_w); |
| 68 | 61 | DECLARE_WRITE_LINE_MEMBER(pia21_ca2_w); |
| 69 | 62 | DECLARE_WRITE_LINE_MEMBER(pia21_cb2_w) { }; // enable solenoids |
| 70 | 63 | DECLARE_WRITE_LINE_MEMBER(pia24_cb2_w) { }; // dummy to stop error log filling up |
| r32489 | r32490 | |
| 73 | 66 | TIMER_DEVICE_CALLBACK_MEMBER(irq); |
| 74 | 67 | DECLARE_INPUT_CHANGED_MEMBER(main_nmi); |
| 75 | 68 | DECLARE_INPUT_CHANGED_MEMBER(audio_nmi); |
| 76 | | DECLARE_MACHINE_RESET(s8); |
| 69 | DECLARE_MACHINE_RESET(s8a); |
| 77 | 70 | private: |
| 78 | 71 | UINT8 m_t_c; |
| 79 | 72 | UINT8 m_sound_data; |
| r32489 | r32490 | |
| 98 | 91 | AM_RANGE(0x2400, 0x2403) AM_DEVREADWRITE("pia24", pia6821_device, read, write) // lamps |
| 99 | 92 | AM_RANGE(0x2800, 0x2803) AM_DEVREADWRITE("pia28", pia6821_device, read, write) // display |
| 100 | 93 | AM_RANGE(0x3000, 0x3003) AM_DEVREADWRITE("pia30", pia6821_device, read, write) // inputs |
| 101 | | AM_RANGE(0x5000, 0x7fff) AM_ROM |
| 94 | AM_RANGE(0x6000, 0x7fff) AM_ROM AM_REGION("roms", 0) |
| 102 | 95 | ADDRESS_MAP_END |
| 103 | 96 | |
| 104 | 97 | static ADDRESS_MAP_START( s8_audio_map, AS_PROGRAM, 8, s8a_state ) |
| 105 | 98 | AM_RANGE(0x0000, 0x00ff) AM_RAM |
| 106 | 99 | AM_RANGE(0x2000, 0x2003) AM_DEVREADWRITE("pias", pia6821_device, read, write) |
| 107 | | AM_RANGE(0x8000, 0xffff) AM_ROM |
| 100 | AM_RANGE(0xc000, 0xffff) AM_ROM AM_REGION("audioroms", 0) |
| 108 | 101 | ADDRESS_MAP_END |
| 109 | 102 | |
| 110 | 103 | static INPUT_PORTS_START( s8 ) |
| r32489 | r32490 | |
| 113 | 106 | |
| 114 | 107 | PORT_START("X1") |
| 115 | 108 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT ) |
| 116 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) |
| 109 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 117 | 110 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START ) |
| 118 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 119 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 120 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 121 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) |
| 122 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) |
| 111 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_V) |
| 112 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_B) |
| 113 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_N) |
| 114 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_M) |
| 115 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_L) |
| 123 | 116 | |
| 124 | 117 | PORT_START("X2") |
| 125 | 118 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) |
| r32489 | r32490 | |
| 132 | 125 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_K) |
| 133 | 126 | |
| 134 | 127 | PORT_START("X4") |
| 135 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_L) |
| 136 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Z) |
| 137 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_C) |
| 138 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_V) |
| 139 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_B) |
| 140 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_N) |
| 141 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_M) |
| 142 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_COMMA) |
| 128 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 143 | 129 | |
| 144 | 130 | PORT_START("X8") |
| 145 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_STOP) |
| 146 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_SLASH) |
| 147 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_COLON) |
| 148 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_QUOTE) |
| 149 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_X) |
| 150 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_MINUS) |
| 151 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_EQUALS) |
| 152 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSPACE) |
| 131 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 153 | 132 | |
| 154 | 133 | PORT_START("X10") |
| 155 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_OPENBRACE) |
| 156 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_CLOSEBRACE) |
| 157 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSLASH) |
| 158 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_ENTER) |
| 159 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_LEFT) |
| 160 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_RIGHT) |
| 161 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_UP) |
| 162 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_DOWN) |
| 134 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 163 | 135 | |
| 164 | 136 | PORT_START("X20") |
| 165 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Q) |
| 166 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_W) |
| 167 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_E) |
| 168 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_R) |
| 169 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Y) |
| 170 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_U) |
| 171 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_I) |
| 172 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_O) |
| 137 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 173 | 138 | |
| 174 | 139 | PORT_START("X40") |
| 175 | 140 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r32489 | r32490 | |
| 184 | 149 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Up/Down") PORT_CODE(KEYCODE_9) |
| 185 | 150 | INPUT_PORTS_END |
| 186 | 151 | |
| 187 | | MACHINE_RESET_MEMBER( s8a_state, s8 ) |
| 152 | MACHINE_RESET_MEMBER( s8a_state, s8a ) |
| 188 | 153 | { |
| 189 | 154 | m_t_c = 0; |
| 190 | 155 | } |
| r32489 | r32490 | |
| 205 | 170 | |
| 206 | 171 | WRITE8_MEMBER( s8a_state::sol3_w ) |
| 207 | 172 | { |
| 208 | | if (BIT(data, 1)) |
| 209 | | m_samples->start(0, 6); // knocker |
| 173 | if (data==0x0a) |
| 174 | m_samples->start(0, 7); // mechanical drum when you have 2 or more batches |
| 210 | 175 | } |
| 211 | 176 | |
| 212 | 177 | WRITE8_MEMBER( s8a_state::sound_w ) |
| r32489 | r32490 | |
| 252 | 217 | |
| 253 | 218 | WRITE8_MEMBER( s8a_state::dig1_w ) |
| 254 | 219 | { |
| 255 | | static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0, 0, 0, 0, 0, 0 }; // MC14558 |
| 220 | static const UINT8 patterns[16] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0,0,0,0,0,0 }; // MC14543 |
| 256 | 221 | if (m_data_ok) |
| 257 | 222 | { |
| 258 | 223 | output_set_digit_value(m_strobe+16, patterns[data&15]); |
| r32489 | r32490 | |
| 265 | 230 | { |
| 266 | 231 | char kbdrow[8]; |
| 267 | 232 | sprintf(kbdrow,"X%X",m_kbdrow); |
| 268 | | return ~ioport(kbdrow)->read(); |
| 233 | return ioport(kbdrow)->read() ^ 0xff; |
| 269 | 234 | } |
| 270 | 235 | |
| 271 | 236 | WRITE8_MEMBER( s8a_state::switch_w ) |
| r32489 | r32490 | |
| 278 | 243 | return m_sound_data; |
| 279 | 244 | } |
| 280 | 245 | |
| 281 | | WRITE8_MEMBER( s8a_state::dac_w ) |
| 246 | TIMER_DEVICE_CALLBACK_MEMBER( s8a_state::irq ) |
| 282 | 247 | { |
| 283 | | m_dac->write_unsigned8(data); |
| 284 | | } |
| 285 | | |
| 286 | | TIMER_DEVICE_CALLBACK_MEMBER( s8a_state::irq) |
| 287 | | { |
| 288 | 248 | if (m_t_c > 0x70) |
| 289 | 249 | m_maincpu->set_input_line(M6800_IRQ_LINE, ASSERT_LINE); |
| 290 | 250 | else |
| r32489 | r32490 | |
| 293 | 253 | |
| 294 | 254 | static MACHINE_CONFIG_START( s8, s8a_state ) |
| 295 | 255 | /* basic machine hardware */ |
| 296 | | MCFG_CPU_ADD("maincpu", M6802, 4000000) |
| 256 | MCFG_CPU_ADD("maincpu", M6802, XTAL_4MHz) |
| 297 | 257 | MCFG_CPU_PROGRAM_MAP(s8_main_map) |
| 298 | 258 | MCFG_TIMER_DRIVER_ADD_PERIODIC("irq", s8a_state, irq, attotime::from_hz(250)) |
| 299 | | MCFG_MACHINE_RESET_OVERRIDE(s8a_state, s8) |
| 259 | MCFG_MACHINE_RESET_OVERRIDE(s8a_state, s8a) |
| 300 | 260 | |
| 301 | 261 | /* Video */ |
| 302 | 262 | MCFG_DEFAULT_LAYOUT(layout_s8a) |
| r32489 | r32490 | |
| 341 | 301 | MCFG_NVRAM_ADD_1FILL("nvram") |
| 342 | 302 | |
| 343 | 303 | /* Add the soundcard */ |
| 344 | | MCFG_CPU_ADD("audiocpu", M6808, 4000000) |
| 304 | MCFG_CPU_ADD("audiocpu", M6808, XTAL_4MHz) |
| 345 | 305 | MCFG_CPU_PROGRAM_MAP(s8_audio_map) |
| 346 | 306 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 347 | 307 | MCFG_SOUND_ADD("dac", DAC, 0) |
| 348 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 308 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 349 | 309 | |
| 350 | 310 | MCFG_DEVICE_ADD("pias", PIA6821, 0) |
| 351 | 311 | MCFG_PIA_READPA_HANDLER(READ8(s8a_state, dac_r)) |
| 352 | | MCFG_PIA_WRITEPA_HANDLER(WRITE8(s8a_state, sound_w)) |
| 353 | | MCFG_PIA_WRITEPB_HANDLER(WRITE8(s8a_state, dac_w)) |
| 354 | | MCFG_PIA_CA2_HANDLER(NULL) |
| 355 | | MCFG_PIA_CB2_HANDLER(NULL) |
| 312 | MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8("dac", dac_device, write_unsigned8)) |
| 356 | 313 | MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("audiocpu", m6808_cpu_device, irq_line)) |
| 357 | 314 | MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("audiocpu", m6808_cpu_device, irq_line)) |
| 358 | 315 | MACHINE_CONFIG_END |
| r32489 | r32490 | |
| 362 | 319 | / Still Crazy (#543) 06/1984 |
| 363 | 320 | /-----------------------------*/ |
| 364 | 321 | ROM_START(scrzy_l1) |
| 365 | | ROM_REGION(0x10000, "maincpu", 0) |
| 366 | | ROM_LOAD("ic20.bin", 0x6000, 0x2000, CRC(b0df42e6) SHA1(bb10268d7b820d1de0c20e1b79aba558badd072b) ) |
| 322 | ROM_REGION(0x2000, "roms", 0) |
| 323 | ROM_LOAD("ic20.bin", 0x0000, 0x2000, CRC(b0df42e6) SHA1(bb10268d7b820d1de0c20e1b79aba558badd072b) ) |
| 367 | 324 | |
| 368 | | ROM_REGION(0x10000, "audiocpu", 0) |
| 369 | | ROM_LOAD("ic49.bin", 0xc000, 0x4000, CRC(bcc8ccc4) SHA1(2312f9cc4f5a2dadfbfa61d13c31bb5838adf152) ) |
| 325 | ROM_REGION(0x4000, "audioroms", 0) |
| 326 | // 1st and 2nd halves are identical |
| 327 | ROM_LOAD("ic49.bin", 0x0000, 0x4000, CRC(bcc8ccc4) SHA1(2312f9cc4f5a2dadfbfa61d13c31bb5838adf152) ) |
| 370 | 328 | ROM_END |
| 371 | 329 | |
| 372 | | GAME(1984,scrzy_l1, 0, s8, s8, driver_device, 0, ROT0, "Williams", "Still Crazy", GAME_MECHANICAL | GAME_NOT_WORKING) |
| 330 | GAME(1984,scrzy_l1, 0, s8, s8, driver_device, 0, ROT0, "Williams", "Still Crazy", GAME_MECHANICAL ) |