Previous 199869 Revisions Next

r17828 Wednesday 12th September, 2012 at 11:02:47 UTC by hap
on 2nd thought, i shouldn't use address mirroring here when the driver isn't accurate yet
[src/mame/drivers]mcr.c
[src/mame/includes]mcr.h

trunk/src/mame/includes/mcr.h
r17827r17828
5959   DECLARE_READ8_MEMBER(solarfox_ip0_r);
6060   DECLARE_READ8_MEMBER(solarfox_ip1_r);
6161   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);
6666   DECLARE_READ8_MEMBER(kick_ip1_r);
67
68   DECLARE_WRITE8_MEMBER(dpoker_burp_w);
69   DECLARE_READ8_MEMBER(dpoker_burp_r);
70
6771   DECLARE_WRITE8_MEMBER(wacko_op4_w);
6872   DECLARE_READ8_MEMBER(wacko_ip1_r);
6973   DECLARE_READ8_MEMBER(wacko_ip2_r);
trunk/src/mame/drivers/mcr.c
r17827r17828
292292static UINT8 last_op4;
293293
294294static UINT8 dpoker_coin_status;
295static UINT8 dpoker_output_34;
295static UINT8 dpoker_output;
296296
297297static UINT8 nflfoot_serial_out_active;
298298static UINT8 nflfoot_serial_out_bits;
r17827r17828
379379{
380380   mcr_state *state = timer.machine().driver_data<mcr_state>();
381381
382   if (dpoker_output_34 & 0x40)
382   if (dpoker_output & 0x40)
383383   {
384384      // hopper timing is a guesstimate
385385      dpoker_coin_status ^= 8;
r17827r17828
424424}
425425
426426
427WRITE8_MEMBER(mcr_state::dpoker_p2c_w)
427WRITE8_MEMBER(mcr_state::dpoker_lamps1_w)
428428{
429429   // cpanel button lamps
430430   output_set_lamp_value(0, data >> 0 & 1); // hold 0
r17827r17828
437437   output_set_lamp_value(7, data >> 3 & 1); // stand
438438}
439439
440WRITE8_MEMBER(mcr_state::dpoker_p30_w)
440WRITE8_MEMBER(mcr_state::dpoker_lamps2_w)
441441{
442442   // d5: button lamp: service or change
443443   output_set_lamp_value(8, data >> 1 & 1);
r17827r17828
449449   // d6, d7: unused?
450450}
451451
452WRITE8_MEMBER(mcr_state::dpoker_p34_w)
452WRITE8_MEMBER(mcr_state::dpoker_output_w)
453453{
454454   // d0: ? coin return
455455   // d1: ? divertor (active low)
r17827r17828
457457   
458458   // d6: assume hopper coin flow
459459   // d7: assume hopper motor
460   if (data & 0x40 & ~dpoker_output_34)
460   if (data & 0x40 & ~dpoker_output)
461461      m_dpoker_hopper_timer->adjust(attotime::from_msec(500));
462462   
463463   // other bits: unused?
464464
465   dpoker_output_34 = data;
465   dpoker_output = data;
466466}
467467
468WRITE8_MEMBER(mcr_state::dpoker_p3c_w)
468WRITE8_MEMBER(mcr_state::dpoker_meters_w)
469469{
470470   // meters?
471471}
r17827r17828
27982798   machine().device<midway_ssio_device>("ssio")->set_custom_input(0, 0x8e, read8_delegate(FUNC(mcr_state::dpoker_ip0_r),this));
27992799
28002800   // 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);
28022802
28032803   // 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");
28072807
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));
28122812   
28132813   dpoker_coin_status = 0;
2814   dpoker_output_34 = 0;
2814   dpoker_output = 0;
28152815
28162816   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);
28182818}
28192819
28202820

Previous 199869 Revisions Next


© 1997-2024 The MAME Team