summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-04-24 05:46:31 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-04-24 05:46:31 +0000
commit25487d5e5429c647b85caecbd7e2d161599b0286 (patch)
treedfa63ac123ad60404bb56f1a45ecf353b3ca83ed
parent9a7173f503db8b8865861f9baa25b961d2a63428 (diff)
Fix:
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
-rw-r--r--src/mame/drivers/vicdual.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mame/drivers/vicdual.c b/src/mame/drivers/vicdual.c
index c6ae035e31a..2a2698fc228 100644
--- a/src/mame/drivers/vicdual.c
+++ b/src/mame/drivers/vicdual.c
@@ -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 )