summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/tonton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/tonton.cpp')
-rw-r--r--src/mame/drivers/tonton.cpp11
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")