trunk/src/mame/includes/mcr.h
| r17818 | r17819 | |
| 27 | 27 | m_chip_squeak_deluxe(*this, "csd"), |
| 28 | 28 | m_sounds_good(*this, "sg"), |
| 29 | 29 | m_turbo_chip_squeak(*this, "tcs"), |
| 30 | | m_squawk_n_talk(*this, "snt") |
| 30 | m_squawk_n_talk(*this, "snt"), |
| 31 | m_dpoker_coin_in_timer(*this, "dp_coinin"), |
| 32 | m_dpoker_hopper_timer(*this, "dp_hopper") |
| 31 | 33 | { } |
| 32 | 34 | |
| 33 | 35 | // these should be required but can't because mcr68 shares with us |
| r17818 | r17819 | |
| 41 | 43 | optional_device<midway_sounds_good_device> m_sounds_good; |
| 42 | 44 | optional_device<midway_turbo_chip_squeak_device> m_turbo_chip_squeak; |
| 43 | 45 | optional_device<midway_squawk_n_talk_device> m_squawk_n_talk; |
| 46 | optional_device<timer_device> m_dpoker_coin_in_timer; |
| 47 | optional_device<timer_device> m_dpoker_hopper_timer; |
| 44 | 48 | |
| 45 | 49 | DECLARE_WRITE8_MEMBER(mcr_control_port_w); |
| 46 | 50 | DECLARE_WRITE8_MEMBER(mcr_ipu_laserdisk_w); |
| r17818 | r17819 | |
| 54 | 58 | DECLARE_WRITE8_MEMBER(mcr_91490_videoram_w); |
| 55 | 59 | DECLARE_READ8_MEMBER(solarfox_ip0_r); |
| 56 | 60 | DECLARE_READ8_MEMBER(solarfox_ip1_r); |
| 61 | DECLARE_READ8_MEMBER(dpoker_ip0_r); |
| 62 | DECLARE_WRITE8_MEMBER(dpoker_p2c_w); |
| 63 | DECLARE_WRITE8_MEMBER(dpoker_p30_w); |
| 64 | DECLARE_WRITE8_MEMBER(dpoker_p34_w); |
| 57 | 65 | DECLARE_READ8_MEMBER(kick_ip1_r); |
| 58 | 66 | DECLARE_WRITE8_MEMBER(wacko_op4_w); |
| 59 | 67 | DECLARE_READ8_MEMBER(wacko_ip1_r); |
| r17818 | r17819 | |
| 69 | 77 | DECLARE_READ8_MEMBER(demoderb_ip2_r); |
| 70 | 78 | DECLARE_WRITE8_MEMBER(demoderb_op4_w); |
| 71 | 79 | |
| 80 | DECLARE_INPUT_CHANGED_MEMBER(dpoker_coin_in_hit); |
| 81 | |
| 72 | 82 | DECLARE_DRIVER_INIT(mcr_91490); |
| 73 | 83 | DECLARE_DRIVER_INIT(kroozr); |
| 84 | DECLARE_DRIVER_INIT(solarfox); |
| 74 | 85 | DECLARE_DRIVER_INIT(kick); |
| 86 | DECLARE_DRIVER_INIT(dpoker); |
| 75 | 87 | DECLARE_DRIVER_INIT(twotiger); |
| 76 | 88 | DECLARE_DRIVER_INIT(demoderb); |
| 77 | 89 | DECLARE_DRIVER_INIT(wacko); |
| r17818 | r17819 | |
| 79 | 91 | DECLARE_DRIVER_INIT(dotrone); |
| 80 | 92 | DECLARE_DRIVER_INIT(nflfoot); |
| 81 | 93 | DECLARE_DRIVER_INIT(journey); |
| 82 | | DECLARE_DRIVER_INIT(solarfox); |
| 83 | | DECLARE_DRIVER_INIT(dpoker); |
| 84 | 94 | |
| 85 | 95 | TILE_GET_INFO_MEMBER(mcr_90009_get_tile_info); |
| 86 | 96 | TILE_GET_INFO_MEMBER(mcr_90010_get_tile_info); |
trunk/src/mame/drivers/mcr.c
| r17818 | r17819 | |
| 21 | 21 | * Demolition Derby (Turbo Chip Squeak) |
| 22 | 22 | * Draw Poker |
| 23 | 23 | |
| 24 | | Known bugs: |
| 25 | | * dpoker needs coincounters and hopper |
| 26 | | |
| 27 | 24 | **************************************************************************** |
| 28 | 25 | |
| 29 | 26 | Early MCR systems have three PCBs, which can be intermixed to a certain |
| r17818 | r17819 | |
| 294 | 291 | static UINT8 input_mux; |
| 295 | 292 | static UINT8 last_op4; |
| 296 | 293 | |
| 294 | static UINT8 dpoker_coin_status; |
| 295 | static UINT8 dpoker_output_34; |
| 296 | |
| 297 | 297 | static UINT8 nflfoot_serial_out_active; |
| 298 | 298 | static UINT8 nflfoot_serial_out_bits; |
| 299 | 299 | static UINT8 nflfoot_serial_out_numbits; |
| r17818 | r17819 | |
| 327 | 327 | |
| 328 | 328 | /************************************* |
| 329 | 329 | * |
| 330 | | * Solar Fox input ports |
| 330 | * Solar Fox I/O ports |
| 331 | 331 | * |
| 332 | 332 | *************************************/ |
| 333 | 333 | |
| r17818 | r17819 | |
| 358 | 358 | |
| 359 | 359 | /************************************* |
| 360 | 360 | * |
| 361 | | * Kick input ports |
| 361 | * Kick I/O ports |
| 362 | 362 | * |
| 363 | 363 | *************************************/ |
| 364 | 364 | |
| r17818 | r17819 | |
| 371 | 371 | |
| 372 | 372 | /************************************* |
| 373 | 373 | * |
| 374 | | * Wacko input ports |
| 374 | * Draw Poker I/O ports |
| 375 | 375 | * |
| 376 | 376 | *************************************/ |
| 377 | 377 | |
| 378 | TIMER_DEVICE_CALLBACK( dpoker_hopper_callback ) |
| 379 | { |
| 380 | mcr_state *state = timer.machine().driver_data<mcr_state>(); |
| 381 | |
| 382 | if (dpoker_output_34 & 0x40) |
| 383 | { |
| 384 | // hopper timing is a guesstimate |
| 385 | dpoker_coin_status ^= 8; |
| 386 | state->m_dpoker_hopper_timer->adjust(attotime::from_msec((dpoker_coin_status & 8) ? 100 : 250)); |
| 387 | } |
| 388 | else |
| 389 | { |
| 390 | dpoker_coin_status &= ~8; |
| 391 | } |
| 392 | |
| 393 | coin_counter_w(timer.machine(), 0, dpoker_output_34 & 8); |
| 394 | } |
| 395 | |
| 396 | TIMER_DEVICE_CALLBACK( dpoker_coin_in_callback ) |
| 397 | { |
| 398 | dpoker_coin_status &= ~2; |
| 399 | } |
| 400 | |
| 401 | INPUT_CHANGED_MEMBER(mcr_state::dpoker_coin_in_hit) |
| 402 | { |
| 403 | if (newval) |
| 404 | { |
| 405 | // The game waits for coin release before it accepts another. |
| 406 | // It probably does this to prevent tampering, good old coin-on-a-string won't work here. |
| 407 | dpoker_coin_status |= 2; |
| 408 | m_dpoker_coin_in_timer->adjust(attotime::from_msec(100)); |
| 409 | } |
| 410 | } |
| 411 | |
| 412 | READ8_MEMBER(mcr_state::dpoker_ip0_r) |
| 413 | { |
| 414 | // d0: Coin-in Hit |
| 415 | // d1: Coin-in Release |
| 416 | // d2: Coin-out Up |
| 417 | // d3: Coin-out Down |
| 418 | // d6: Coin-drop Hit |
| 419 | // d7: Coin-drop Release |
| 420 | UINT8 p0 = ioport("ssio:IP0")->read(); |
| 421 | p0 |= (dpoker_coin_status >> 1 & 1); |
| 422 | p0 ^= (p0 << 1 & 0x80) | dpoker_coin_status; |
| 423 | return p0; |
| 424 | } |
| 425 | |
| 426 | |
| 427 | WRITE8_MEMBER(mcr_state::dpoker_p2c_w) |
| 428 | { |
| 429 | // cpanel button lamps |
| 430 | output_set_lamp_value(0, data >> 0 & 1); // hold 0 |
| 431 | output_set_lamp_value(1, data >> 4 & 1); // hold 1 |
| 432 | output_set_lamp_value(2, data >> 5 & 1); // hold 2 |
| 433 | output_set_lamp_value(3, data >> 6 & 1); // hold 3 |
| 434 | output_set_lamp_value(4, data >> 7 & 1); // hold 4 |
| 435 | output_set_lamp_value(5, data >> 1 & 1); // deal |
| 436 | output_set_lamp_value(6, data >> 2 & 1); // cancel |
| 437 | output_set_lamp_value(7, data >> 3 & 1); // stand |
| 438 | } |
| 439 | |
| 440 | WRITE8_MEMBER(mcr_state::dpoker_p30_w) |
| 441 | { |
| 442 | // d5: button lamp: service or change |
| 443 | output_set_lamp_value(8, data >> 1 & 1); |
| 444 | |
| 445 | // d0-d4: marquee lamps: coin 1 to 5 --> output lamps 9 to 13 |
| 446 | for (int i = 0; i < 5; i++) |
| 447 | output_set_lamp_value(9 + i, data >> i & 1); |
| 448 | |
| 449 | // d6, d7: unused? |
| 450 | } |
| 451 | |
| 452 | WRITE8_MEMBER(mcr_state::dpoker_p34_w) |
| 453 | { |
| 454 | // d0: ? coin return |
| 455 | // d1: ? divertor (active low) |
| 456 | // d3: coin counter? |
| 457 | |
| 458 | // d6: assume hopper coin flow |
| 459 | // d7: assume hopper motor |
| 460 | if (data & 0x40 & ~dpoker_output_34) |
| 461 | m_dpoker_hopper_timer->adjust(attotime::from_msec(500)); |
| 462 | |
| 463 | // other bits: unused? |
| 464 | } |
| 465 | |
| 466 | |
| 467 | |
| 468 | /************************************* |
| 469 | * |
| 470 | * Wacko I/O ports |
| 471 | * |
| 472 | *************************************/ |
| 473 | |
| 378 | 474 | WRITE8_MEMBER(mcr_state::wacko_op4_w) |
| 379 | 475 | { |
| 380 | 476 | input_mux = data & 1; |
| r17818 | r17819 | |
| 402 | 498 | |
| 403 | 499 | /************************************* |
| 404 | 500 | * |
| 405 | | * Kozmik Krooz'r input ports |
| 501 | * Kozmik Krooz'r I/O ports |
| 406 | 502 | * |
| 407 | 503 | *************************************/ |
| 408 | 504 | |
| r17818 | r17819 | |
| 897 | 993 | |
| 898 | 994 | static INPUT_PORTS_START( dpoker ) |
| 899 | 995 | PORT_START("ssio:IP0") |
| 900 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) // Coin-in Hit - cursor down in testmode |
| 901 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) // Coin-in Release (to register a coin for now, press 5 and 6 is succession) |
| 902 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) // Coin-out Up |
| 903 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) // Coin-out Down |
| 996 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, mcr_state, dpoker_coin_in_hit, NULL) |
| 997 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) // see dpoker_ip0_r |
| 998 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) // " |
| 999 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) // " |
| 904 | 1000 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) |
| 905 | 1001 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) |
| 906 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // Coin-drop Hit - select item in testmode |
| 907 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) // Coin-drop Release |
| 1002 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Coin-drop") |
| 1003 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) // " |
| 908 | 1004 | |
| 909 | 1005 | PORT_START("ssio:IP1") |
| 910 | 1006 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) |
| r17818 | r17819 | |
| 917 | 1013 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_STAND ) |
| 918 | 1014 | |
| 919 | 1015 | PORT_START("ssio:IP2") |
| 920 | | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1016 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) // only in test mode input test |
| 921 | 1017 | |
| 922 | 1018 | // 10-position DIP switch on the sound pcb |
| 923 | | // settings and defaults are from a sticker inside the cabinet, I don't know where 9 or 10 are connected |
| 1019 | // settings and defaults are verified from a sticker inside the cabinet, I don't know where 9 or 10 are connected |
| 924 | 1020 | PORT_START("ssio:IP3") |
| 925 | 1021 | PORT_DIPNAME( 0x01, 0x01, "Hopper" ) PORT_DIPLOCATION("B3:1") |
| 926 | 1022 | PORT_DIPSETTING( 0x01, "Relay Pulse" ) |
| r17818 | r17819 | |
| 957 | 1053 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 958 | 1054 | |
| 959 | 1055 | PORT_START("ssio:DIP") |
| 960 | | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1056 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) // only in test mode input test |
| 961 | 1057 | |
| 962 | 1058 | PORT_START("P24") |
| 963 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) // Hopper Full |
| 1059 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) // Hopper Full (not implemented) |
| 964 | 1060 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 965 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) // Coin Return |
| 1061 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // Coin Return |
| 966 | 1062 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 967 | 1063 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Door 1 Open") PORT_CODE(KEYCODE_A) // CAM OPEN |
| 968 | 1064 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Door 1 Lock") PORT_CODE(KEYCODE_S) // CAM LOCK |
| r17818 | r17819 | |
| 970 | 1066 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Door 2 Lock") PORT_CODE(KEYCODE_F) // HNG LOCK |
| 971 | 1067 | |
| 972 | 1068 | PORT_START("P28") |
| 973 | | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1069 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 974 | 1070 | |
| 975 | 1071 | PORT_START("P2C") |
| 976 | 1072 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? ARM HIT |
| r17818 | r17819 | |
| 1754 | 1850 | MACHINE_CONFIG_END |
| 1755 | 1851 | |
| 1756 | 1852 | |
| 1853 | /* as above, but in a casino cabinet */ |
| 1854 | static MACHINE_CONFIG_DERIVED( mcr_90009_dp, mcr_90009 ) |
| 1855 | |
| 1856 | /* basic machine hardware */ |
| 1857 | MCFG_TIMER_ADD("dp_coinin", dpoker_coin_in_callback) |
| 1858 | MCFG_TIMER_ADD("dp_hopper", dpoker_hopper_callback) |
| 1859 | MACHINE_CONFIG_END |
| 1860 | |
| 1861 | |
| 1757 | 1862 | /* 90010 CPU board plus 90908/90913/91483 sound board */ |
| 1758 | 1863 | static MACHINE_CONFIG_DERIVED( mcr_90010, mcr_90009 ) |
| 1759 | 1864 | |
| r17818 | r17819 | |
| 2662 | 2767 | DRIVER_INIT_MEMBER(mcr_state,solarfox) |
| 2663 | 2768 | { |
| 2664 | 2769 | mcr_init(machine(), 90009, 91399, 90908); |
| 2770 | mcr12_sprite_xoffs = 16; |
| 2665 | 2771 | |
| 2666 | 2772 | machine().device<midway_ssio_device>("ssio")->set_custom_input(0, 0x1c, read8_delegate(FUNC(mcr_state::solarfox_ip0_r),this)); |
| 2667 | 2773 | machine().device<midway_ssio_device>("ssio")->set_custom_input(1, 0xff, read8_delegate(FUNC(mcr_state::solarfox_ip1_r),this)); |
| 2668 | | |
| 2669 | | mcr12_sprite_xoffs = 16; |
| 2670 | 2774 | } |
| 2671 | 2775 | |
| 2672 | 2776 | |
| 2673 | 2777 | DRIVER_INIT_MEMBER(mcr_state,kick) |
| 2674 | 2778 | { |
| 2675 | 2779 | mcr_init(machine(), 90009, 91399, 90908); |
| 2780 | mcr12_sprite_xoffs_flip = 16; |
| 2676 | 2781 | |
| 2677 | 2782 | machine().device<midway_ssio_device>("ssio")->set_custom_input(1, 0xf0, read8_delegate(FUNC(mcr_state::kick_ip1_r),this)); |
| 2678 | | |
| 2679 | | mcr12_sprite_xoffs_flip = 16; |
| 2680 | 2783 | } |
| 2681 | 2784 | |
| 2682 | 2785 | |
| 2683 | 2786 | DRIVER_INIT_MEMBER(mcr_state,dpoker) |
| 2684 | 2787 | { |
| 2685 | 2788 | mcr_init(machine(), 90009, 91399, 90908); |
| 2789 | mcr12_sprite_xoffs_flip = 16; |
| 2686 | 2790 | |
| 2791 | machine().device<midway_ssio_device>("ssio")->set_custom_input(0, 0x8e, read8_delegate(FUNC(mcr_state::dpoker_ip0_r),this)); |
| 2792 | |
| 2687 | 2793 | machine().device("maincpu")->memory().space(AS_IO)->install_read_port(0x24, 0x24, "P24"); |
| 2688 | 2794 | machine().device("maincpu")->memory().space(AS_IO)->install_read_port(0x28, 0x28, "P28"); |
| 2689 | 2795 | machine().device("maincpu")->memory().space(AS_IO)->install_read_port(0x2c, 0x2c, "P2C"); |
| 2690 | 2796 | |
| 2691 | | mcr12_sprite_xoffs_flip = 16; |
| 2797 | machine().device("maincpu")->memory().space(AS_IO)->install_write_handler(0x2c, 0x2c, write8_delegate(FUNC(mcr_state::dpoker_p2c_w),this)); |
| 2798 | machine().device("maincpu")->memory().space(AS_IO)->install_write_handler(0x30, 0x30, write8_delegate(FUNC(mcr_state::dpoker_p30_w),this)); |
| 2799 | machine().device("maincpu")->memory().space(AS_IO)->install_write_handler(0x34, 0x34, write8_delegate(FUNC(mcr_state::dpoker_p34_w),this)); |
| 2800 | |
| 2801 | dpoker_coin_status = 0; |
| 2802 | dpoker_output_34 = 0; |
| 2803 | |
| 2804 | state_save_register_global(machine(), dpoker_coin_status); |
| 2805 | state_save_register_global(machine(), dpoker_output_34); |
| 2692 | 2806 | } |
| 2693 | 2807 | |
| 2694 | 2808 | |
| r17818 | r17819 | |
| 2792 | 2906 | GAME( 1981, kick, 0, mcr_90009, kick, mcr_state, kick, ORIENTATION_SWAP_XY, "Midway", "Kick (upright)", GAME_SUPPORTS_SAVE ) |
| 2793 | 2907 | GAME( 1981, kickman, kick, mcr_90009, kick, mcr_state, kick, ORIENTATION_SWAP_XY, "Midway", "Kickman (upright)", GAME_SUPPORTS_SAVE ) |
| 2794 | 2908 | GAME( 1981, kickc, kick, mcr_90009, kickc, mcr_state, kick, ROT90, "Midway", "Kick (cocktail)", GAME_SUPPORTS_SAVE ) |
| 2795 | | GAME( 1985, dpoker, 0, mcr_90009, dpoker, mcr_state, dpoker, 0, "Bally", "Draw Poker (Bally, 03-20)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
| 2909 | GAME( 1985, dpoker, 0, mcr_90009_dp, dpoker, mcr_state, dpoker, ROT0, "Bally", "Draw Poker (Bally, 03-20)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| 2796 | 2910 | |
| 2797 | 2911 | /* 90010 CPU board + 91399 video gen + 90913 sound I/O */ |
| 2798 | 2912 | GAME( 1981, shollow, 0, mcr_90010, shollow, mcr_state, mcr_90010, ROT90, "Bally Midway", "Satan's Hollow (set 1)", GAME_SUPPORTS_SAVE ) |