01740: carnival, headon, heiankyo, pulsar, samurai, tranqgun : Is not possible to insert any coin
01721: sspaceat, sspacat2, sspacat3, sspacatc : Problems with inserting coins
01710: spacetrk, sptrekct: Cannot insert coins in both sets
This commit is contained in:
Aaron Giles 2008-04-24 05:46:31 +00:00
parent 9a7173f503
commit 25487d5e54

View File

@ -68,7 +68,6 @@
#define COIN_PORT_TAG "COIN"
static UINT32 coin_status;
static UINT32 last_coin_input;
static TIMER_CALLBACK( clear_coin_status )
@ -85,9 +84,13 @@ static void assert_coin_status(void)
static CUSTOM_INPUT( vicdual_read_coin_status )
{
UINT32 coin_input = input_port_read(machine, COIN_PORT_TAG);
return coin_status;
}
if (coin_input && !last_coin_input)
static INPUT_CHANGED( coin_changed )
{
if (newval && !oldval)
{
/* increment the coin counter */
coin_counter_w(0, 1);
@ -98,16 +101,12 @@ static CUSTOM_INPUT( vicdual_read_coin_status )
/* simulate the coin switch being closed for a while */
timer_set(double_to_attotime(4 * attotime_to_double(video_screen_get_frame_period(machine->primary_screen))), NULL, 0, clear_coin_status);
}
last_coin_input = coin_input;
return coin_status;
}
#define PORT_COIN \
PORT_START_TAG(COIN_PORT_TAG) \
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) \
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_changed, NULL) \
PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED )