trunk/src/mame/includes/mcr.h
| r17827 | r17828 | |
| 59 | 59 | DECLARE_READ8_MEMBER(solarfox_ip0_r); |
| 60 | 60 | DECLARE_READ8_MEMBER(solarfox_ip1_r); |
| 61 | 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); |
| 65 | | DECLARE_WRITE8_MEMBER(dpoker_p3c_w); |
| 62 | DECLARE_WRITE8_MEMBER(dpoker_lamps1_w); |
| 63 | DECLARE_WRITE8_MEMBER(dpoker_lamps2_w); |
| 64 | DECLARE_WRITE8_MEMBER(dpoker_output_w); |
| 65 | DECLARE_WRITE8_MEMBER(dpoker_meters_w); |
| 66 | 66 | DECLARE_READ8_MEMBER(kick_ip1_r); |
| 67 | |
| 68 | DECLARE_WRITE8_MEMBER(dpoker_burp_w); |
| 69 | DECLARE_READ8_MEMBER(dpoker_burp_r); |
| 70 | |
| 67 | 71 | DECLARE_WRITE8_MEMBER(wacko_op4_w); |
| 68 | 72 | DECLARE_READ8_MEMBER(wacko_ip1_r); |
| 69 | 73 | DECLARE_READ8_MEMBER(wacko_ip2_r); |
trunk/src/mame/drivers/mcr.c
| r17827 | r17828 | |
| 292 | 292 | static UINT8 last_op4; |
| 293 | 293 | |
| 294 | 294 | static UINT8 dpoker_coin_status; |
| 295 | | static UINT8 dpoker_output_34; |
| 295 | static UINT8 dpoker_output; |
| 296 | 296 | |
| 297 | 297 | static UINT8 nflfoot_serial_out_active; |
| 298 | 298 | static UINT8 nflfoot_serial_out_bits; |
| r17827 | r17828 | |
| 379 | 379 | { |
| 380 | 380 | mcr_state *state = timer.machine().driver_data<mcr_state>(); |
| 381 | 381 | |
| 382 | | if (dpoker_output_34 & 0x40) |
| 382 | if (dpoker_output & 0x40) |
| 383 | 383 | { |
| 384 | 384 | // hopper timing is a guesstimate |
| 385 | 385 | dpoker_coin_status ^= 8; |
| r17827 | r17828 | |
| 424 | 424 | } |
| 425 | 425 | |
| 426 | 426 | |
| 427 | | WRITE8_MEMBER(mcr_state::dpoker_p2c_w) |
| 427 | WRITE8_MEMBER(mcr_state::dpoker_lamps1_w) |
| 428 | 428 | { |
| 429 | 429 | // cpanel button lamps |
| 430 | 430 | output_set_lamp_value(0, data >> 0 & 1); // hold 0 |
| r17827 | r17828 | |
| 437 | 437 | output_set_lamp_value(7, data >> 3 & 1); // stand |
| 438 | 438 | } |
| 439 | 439 | |
| 440 | | WRITE8_MEMBER(mcr_state::dpoker_p30_w) |
| 440 | WRITE8_MEMBER(mcr_state::dpoker_lamps2_w) |
| 441 | 441 | { |
| 442 | 442 | // d5: button lamp: service or change |
| 443 | 443 | output_set_lamp_value(8, data >> 1 & 1); |
| r17827 | r17828 | |
| 449 | 449 | // d6, d7: unused? |
| 450 | 450 | } |
| 451 | 451 | |
| 452 | | WRITE8_MEMBER(mcr_state::dpoker_p34_w) |
| 452 | WRITE8_MEMBER(mcr_state::dpoker_output_w) |
| 453 | 453 | { |
| 454 | 454 | // d0: ? coin return |
| 455 | 455 | // d1: ? divertor (active low) |
| r17827 | r17828 | |
| 457 | 457 | |
| 458 | 458 | // d6: assume hopper coin flow |
| 459 | 459 | // d7: assume hopper motor |
| 460 | | if (data & 0x40 & ~dpoker_output_34) |
| 460 | if (data & 0x40 & ~dpoker_output) |
| 461 | 461 | m_dpoker_hopper_timer->adjust(attotime::from_msec(500)); |
| 462 | 462 | |
| 463 | 463 | // other bits: unused? |
| 464 | 464 | |
| 465 | | dpoker_output_34 = data; |
| 465 | dpoker_output = data; |
| 466 | 466 | } |
| 467 | 467 | |
| 468 | | WRITE8_MEMBER(mcr_state::dpoker_p3c_w) |
| 468 | WRITE8_MEMBER(mcr_state::dpoker_meters_w) |
| 469 | 469 | { |
| 470 | 470 | // meters? |
| 471 | 471 | } |
| r17827 | r17828 | |
| 2798 | 2798 | machine().device<midway_ssio_device>("ssio")->set_custom_input(0, 0x8e, read8_delegate(FUNC(mcr_state::dpoker_ip0_r),this)); |
| 2799 | 2799 | |
| 2800 | 2800 | // meter ram, is it battery backed? |
| 2801 | | machine().device("maincpu")->memory().space(AS_PROGRAM)->install_ram(0x8000, 0x81ff, 0, 0x0200); |
| 2801 | machine().device("maincpu")->memory().space(AS_PROGRAM)->install_ram(0x8000, 0x81ff); |
| 2802 | 2802 | |
| 2803 | 2803 | // extra I/O |
| 2804 | | machine().device("maincpu")->memory().space(AS_IO)->install_read_port(0x24, 0x24, 0, 0x03, "P24"); |
| 2805 | | machine().device("maincpu")->memory().space(AS_IO)->install_read_port(0x28, 0x28, 0, 0x03, "P28"); |
| 2806 | | machine().device("maincpu")->memory().space(AS_IO)->install_read_port(0x2c, 0x2c, 0, 0x03, "P2C"); |
| 2804 | machine().device("maincpu")->memory().space(AS_IO)->install_read_port(0x24, 0x24, "P24"); |
| 2805 | machine().device("maincpu")->memory().space(AS_IO)->install_read_port(0x28, 0x28, "P28"); |
| 2806 | machine().device("maincpu")->memory().space(AS_IO)->install_read_port(0x2c, 0x2c, "P2C"); |
| 2807 | 2807 | |
| 2808 | | machine().device("maincpu")->memory().space(AS_IO)->install_write_handler(0x2c, 0x2c, 0, 0x03, write8_delegate(FUNC(mcr_state::dpoker_p2c_w),this)); |
| 2809 | | machine().device("maincpu")->memory().space(AS_IO)->install_write_handler(0x30, 0x30, 0, 0x03, write8_delegate(FUNC(mcr_state::dpoker_p30_w),this)); |
| 2810 | | machine().device("maincpu")->memory().space(AS_IO)->install_write_handler(0x34, 0x34, 0, 0x03, write8_delegate(FUNC(mcr_state::dpoker_p34_w),this)); |
| 2811 | | machine().device("maincpu")->memory().space(AS_IO)->install_write_handler(0x3c, 0x3c, 0, 0x03, write8_delegate(FUNC(mcr_state::dpoker_p3c_w),this)); |
| 2808 | machine().device("maincpu")->memory().space(AS_IO)->install_write_handler(0x2c, 0x2c, write8_delegate(FUNC(mcr_state::dpoker_lamps1_w),this)); |
| 2809 | machine().device("maincpu")->memory().space(AS_IO)->install_write_handler(0x30, 0x30, write8_delegate(FUNC(mcr_state::dpoker_lamps2_w),this)); |
| 2810 | machine().device("maincpu")->memory().space(AS_IO)->install_write_handler(0x34, 0x34, write8_delegate(FUNC(mcr_state::dpoker_output_w),this)); |
| 2811 | machine().device("maincpu")->memory().space(AS_IO)->install_write_handler(0x3f, 0x3f, write8_delegate(FUNC(mcr_state::dpoker_meters_w),this)); |
| 2812 | 2812 | |
| 2813 | 2813 | dpoker_coin_status = 0; |
| 2814 | | dpoker_output_34 = 0; |
| 2814 | dpoker_output = 0; |
| 2815 | 2815 | |
| 2816 | 2816 | state_save_register_global(machine(), dpoker_coin_status); |
| 2817 | | state_save_register_global(machine(), dpoker_output_34); |
| 2817 | state_save_register_global(machine(), dpoker_output); |
| 2818 | 2818 | } |
| 2819 | 2819 | |
| 2820 | 2820 | |