mirror of
https://github.com/holub/mame
synced 2025-05-30 01:23:07 +03:00
clpoker: Add coin counter and hopper (nw)
This commit is contained in:
parent
9c873496ab
commit
e844c2a3bc
@ -32,6 +32,7 @@ There also are unpopulated locations that might fit a YM3812 and YM3014.
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/i8255.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/ticket.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "video/ramdac.h"
|
||||
|
||||
@ -42,6 +43,7 @@ public:
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_gfxdecode(*this, "gfxdecode")
|
||||
, m_hopper(*this, "hopper")
|
||||
, m_videoram(*this, "videoram")
|
||||
{
|
||||
}
|
||||
@ -64,6 +66,7 @@ private:
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<ticket_dispenser_device> m_hopper;
|
||||
required_shared_ptr<u8> m_videoram;
|
||||
|
||||
tilemap_t *m_bg_tilemap;
|
||||
@ -97,6 +100,11 @@ ADDRESS_MAP_END
|
||||
|
||||
WRITE8_MEMBER(clpoker_state::output_a_w)
|
||||
{
|
||||
if (data != 0xff)
|
||||
{
|
||||
machine().bookkeeping().coin_counter_w(0, BIT(data, 0));
|
||||
m_hopper->motor_w(BIT(data, 4));
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(clpoker_state::output_b_w)
|
||||
@ -115,21 +123,13 @@ static INPUT_PORTS_START( clpoker )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("hopper", ticket_dispenser_device, line_r)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("INB")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("INC")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start / Double Up")
|
||||
@ -240,6 +240,8 @@ static MACHINE_CONFIG_START( clpoker, clpoker_state )
|
||||
MCFG_I8255_IN_PORTB_CB(IOPORT("INB"))
|
||||
MCFG_I8255_IN_PORTC_CB(IOPORT("INC"))
|
||||
|
||||
MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(60), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW)
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60) // wrong
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) // wrong
|
||||
|
Loading…
Reference in New Issue
Block a user