diff options
author | 2017-12-13 21:31:27 -0700 | |
---|---|---|
committer | 2017-12-13 21:31:27 -0700 | |
commit | 9ece34eb218c5c1960468294c733fd00ac7fa696 (patch) | |
tree | 7160ed8d2cbe2127aaaef0a21f8736403b0f8a7c /src/mame/drivers/tonton.cpp | |
parent | 54155441e9ba9941e85d80c4834a66376a11e791 (diff) |
Revert "Revert "Merge branch 'master' of https://github.com/mamedev/mame""
This reverts commit 54155441e9ba9941e85d80c4834a66376a11e791.
Diffstat (limited to 'src/mame/drivers/tonton.cpp')
-rw-r--r-- | src/mame/drivers/tonton.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mame/drivers/tonton.cpp b/src/mame/drivers/tonton.cpp index b21cd11c0de..d0b6373ed78 100644 --- a/src/mame/drivers/tonton.cpp +++ b/src/mame/drivers/tonton.cpp @@ -43,6 +43,7 @@ public: required_device<v9938_device> m_v9938; DECLARE_WRITE8_MEMBER(tonton_outport_w); + DECLARE_WRITE8_MEMBER(hopper_w); DECLARE_WRITE8_MEMBER(ay_aout_w); DECLARE_WRITE8_MEMBER(ay_bout_w); virtual void machine_start() override; @@ -67,7 +68,6 @@ WRITE8_MEMBER(tonton_state::tonton_outport_w) { machine().bookkeeping().coin_counter_w(offset, data & 0x01); machine().bookkeeping().coin_lockout_global_w(data & 0x02); /* Coin Lock */ - m_hopper->write(space, 0, (data & 0x02)); /* Hopper Motor */ // if(data & 0xfe) // logerror("%02x %02x\n",data,offset); @@ -75,6 +75,11 @@ WRITE8_MEMBER(tonton_state::tonton_outport_w) logerror("tonton_outport_w %02X @ %04X\n", data, space.device().safe_pc()); } +WRITE8_MEMBER(tonton_state::hopper_w) +{ + m_hopper->motor_w(BIT(data, 1)); +} + /************************************************* * Memory Map * @@ -91,7 +96,7 @@ static ADDRESS_MAP_START( tonton_io, AS_IO, 8, tonton_state ) AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_RANGE(0x00, 0x00) AM_WRITE(tonton_outport_w) AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x01, 0x01) AM_WRITENOP // write the same to outport 00h + AM_RANGE(0x01, 0x01) AM_WRITE(hopper_w) AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW1") AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW2") AM_RANGE(0x88, 0x8b) AM_DEVREADWRITE( "v9938", v9938_device, read, write ) @@ -225,7 +230,7 @@ static MACHINE_CONFIG_START( tonton ) MCFG_V99X8_INTERRUPT_CALLBACK(INPUTLINE("maincpu", 0)) MCFG_V99X8_SCREEN_ADD_NTSC("screen", "v9938", MAIN_CLOCK) - MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(HOPPER_PULSE), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW ) + MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(HOPPER_PULSE), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") |