Previous 199869 Revisions Next

r17480 Sunday 26th August, 2012 at 08:58:49 UTC by Robbbert
Flicker: fixed coins
[src/mame/drivers]flicker.c

trunk/src/mame/drivers/flicker.c
r17479r17480
6666static INPUT_PORTS_START( flicker )
6767   PORT_START("TEST")
6868   PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Door Slam") PORT_CODE(KEYCODE_HOME)
69   PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_COIN1) // 1 credit
70   PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_COIN2)
71   PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_COIN3)
72   PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_COIN4)
73   PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_COIN5)
74   PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_COIN6) // 6 credits
7569   PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_TILT)
7670   PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_START)
7771   PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Test")
7872
73   PORT_START("COIN")
74   // The coin slot would be connected to one of six lines via a wire jumper on a terminal strip
75   PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_COIN1)
76   PORT_DIPNAME( 0x07e0, 0x0020, DEF_STR( Coinage ) )
77   PORT_DIPSETTING(      0x0020, DEF_STR( 1C_1C ) )
78   PORT_DIPSETTING(      0x0040, DEF_STR( 1C_2C ) )
79   PORT_DIPSETTING(      0x0080, DEF_STR( 1C_3C ) )
80   PORT_DIPSETTING(      0x0100, DEF_STR( 1C_4C ) )
81   PORT_DIPSETTING(      0x0200, DEF_STR( 1C_5C ) )
82   PORT_DIPSETTING(      0x0400, DEF_STR( 1C_6C ) )
83
7984   PORT_START("B0")
8085   PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Left Lane Target") PORT_CODE(KEYCODE_W)
8186   PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("/B Target") PORT_CODE(KEYCODE_E)
r17479r17480
134139// The output lines operate the various lamps (44 of them)
135140   offset = cpu_get_reg(m_maincpu, I4004_RAM) & 0x0f; // we need the full address
136141
137   i4004_set_test(m_maincpu, BIT(ioport("TEST")->read(), offset));
142   UINT16 test_port = ioport("TEST")->read() & 0xf81e;
143   UINT16 coin_port = ioport("COIN")->read() & 0x07e0;
144
145   if (BIT(ioport("COIN")->read(), 0) )
146      test_port |= coin_port;
147
148   i4004_set_test(m_maincpu, BIT(test_port, offset));
138149}
139150
140151WRITE8_MEMBER( flicker_state::port10_w )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team