Convert INPUT_CHANGED to INPUT_CHANGED_MEMBER (no whatsnew)

Also drivers/galaxian.c and video/dkong.c changes for compile
This commit is contained in:
Miodrag Milanovic 2012-04-12 09:28:12 +00:00
parent 4976bd3d8b
commit 3d8c64b677
94 changed files with 473 additions and 450 deletions

View File

@ -65,6 +65,7 @@ public:
UINT8 coin_counter[2];
DECLARE_WRITE16_MEMBER(arcadia_multibios_change_game);
DECLARE_CUSTOM_INPUT_MEMBER(coin_counter_r);
DECLARE_INPUT_CHANGED_MEMBER(coin_changed_callback);
};
@ -166,10 +167,9 @@ CUSTOM_INPUT_MEMBER(arcadia_amiga_state::coin_counter_r)
}
static INPUT_CHANGED( coin_changed_callback )
INPUT_CHANGED_MEMBER(arcadia_amiga_state::coin_changed_callback)
{
int coin = (FPTR)param;
UINT8 *coin_counter = field.machine().driver_data<arcadia_amiga_state>()->coin_counter;
/* check for a 0 -> 1 transition */
if (!oldval && newval && coin_counter[coin] < 3)
@ -260,8 +260,8 @@ static INPUT_PORTS_START( arcadia )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_changed_callback, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(coin_changed_callback, 1)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, arcadia_amiga_state,coin_changed_callback, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, arcadia_amiga_state,coin_changed_callback, 1)
INPUT_PORTS_END

View File

@ -68,6 +68,7 @@ public:
DECLARE_WRITE8_MEMBER(kamikaze_ppi_w);
DECLARE_WRITE8_MEMBER(spaceint_sound1_w);
DECLARE_WRITE8_MEMBER(spaceint_sound2_w);
DECLARE_INPUT_CHANGED_MEMBER(spaceint_coin_inserted);
};
@ -277,11 +278,10 @@ static MACHINE_RESET( spaceint )
}
static INPUT_CHANGED( spaceint_coin_inserted )
INPUT_CHANGED_MEMBER(astinvad_state::spaceint_coin_inserted)
{
astinvad_state *state = field.machine().driver_data<astinvad_state>();
/* coin insertion causes an NMI */
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
}
@ -528,7 +528,7 @@ static INPUT_PORTS_START( spaceint )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(spaceint_coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, astinvad_state,spaceint_coin_inserted, 0)
PORT_START("CABINET")
PORT_DIPNAME( 0xff, 0x00, DEF_STR( Cabinet ) )

View File

@ -832,13 +832,12 @@ static INPUT_PORTS_START( ebases )
INPUT_PORTS_END
static INPUT_CHANGED( spacezap_monitor )
INPUT_CHANGED_MEMBER(astrocde_state::spacezap_monitor)
{
astrocde_state *state = field.machine().driver_data<astrocde_state>();
if (newval)
state->m_video_config &= ~AC_MONITOR_BW;
m_video_config &= ~AC_MONITOR_BW;
else
state->m_video_config |= AC_MONITOR_BW;
m_video_config |= AC_MONITOR_BW;
}
static INPUT_PORTS_START( spacezap )
@ -889,7 +888,7 @@ static INPUT_PORTS_START( spacezap )
PORT_START("FAKE")
/* Dedicated cabinets had a B/W monitor and color overlay,
some (unofficial/repaired?) cabinets had a color monitor. */
PORT_CONFNAME( 0x01, 0x00, "Monitor" ) PORT_CHANGED(spacezap_monitor, 0)
PORT_CONFNAME( 0x01, 0x00, "Monitor" ) PORT_CHANGED_MEMBER(DEVICE_SELF, astrocde_state,spacezap_monitor, 0)
PORT_CONFSETTING( 0x00, "B/W" )
PORT_CONFSETTING( 0x01, "Color" )
INPUT_PORTS_END

View File

@ -101,22 +101,20 @@ static TIMER_DEVICE_CALLBACK( irq_callback )
*
*************************************/
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(astrof_state::coin_inserted)
{
astrof_state *state = field.machine().driver_data<astrof_state>();
/* coin insertion causes an NMI */
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
coin_counter_w(field.machine(), 0, newval);
device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
coin_counter_w(machine(), 0, newval);
}
static INPUT_CHANGED( service_coin_inserted )
INPUT_CHANGED_MEMBER(astrof_state::service_coin_inserted)
{
astrof_state *state = field.machine().driver_data<astrof_state>();
/* service coin insertion causes an NMI */
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
}
@ -701,8 +699,8 @@ static INPUT_PORTS_START( astrof )
PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED(service_coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, astrof_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, astrof_state,service_coin_inserted, 0)
PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
@ -756,8 +754,8 @@ static INPUT_PORTS_START( abattle )
PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED(service_coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, astrof_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, astrof_state,service_coin_inserted, 0)
PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
@ -808,8 +806,8 @@ static INPUT_PORTS_START( spfghmk2 )
PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED(service_coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, astrof_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, astrof_state,service_coin_inserted, 0)
PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
@ -863,8 +861,8 @@ static INPUT_PORTS_START( spfghmk22 )
PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED(service_coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, astrof_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, astrof_state,service_coin_inserted, 0)
PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
@ -922,8 +920,8 @@ static INPUT_PORTS_START( tomahawk )
PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED(service_coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, astrof_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, astrof_state,service_coin_inserted, 0)
PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END

View File

@ -96,13 +96,12 @@ WRITE8_MEMBER(brkthru_state::brkthru_soundlatch_w)
device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE);
}
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(brkthru_state::coin_inserted)
{
brkthru_state *state = field.machine().driver_data<brkthru_state>();
/* coin insertion causes an IRQ */
if(oldval)
device_set_input_line(state->m_maincpu, 0, ASSERT_LINE);
device_set_input_line(m_maincpu, 0, ASSERT_LINE);
}
@ -227,9 +226,9 @@ static INPUT_PORTS_START( brkthru )
// PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
// PORT_DIPSETTING( 0x00, DEF_STR( On ) )
/* SW2:7,8 ALWAYS OFF according to the manual */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, brkthru_state,coin_inserted, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, brkthru_state,coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, brkthru_state,coin_inserted, 0)
INPUT_PORTS_END
static INPUT_PORTS_START( brkthruj )
@ -269,9 +268,9 @@ static INPUT_PORTS_START( darwin )
// PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
// PORT_DIPSETTING( 0x00, DEF_STR( On ) )
/* SW2:5,7,8 ALWAYS OFF according to the manual */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, brkthru_state,coin_inserted, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, brkthru_state,coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, brkthru_state,coin_inserted, 0)
INPUT_PORTS_END

View File

@ -516,26 +516,23 @@ static ADDRESS_MAP_START( disco_audio_map, AS_PROGRAM, 8, btime_state )
ADDRESS_MAP_END
static INPUT_CHANGED( coin_inserted_irq_hi )
INPUT_CHANGED_MEMBER(btime_state::coin_inserted_irq_hi)
{
btime_state *state = field.machine().driver_data<btime_state>();
if (newval)
device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
device_set_input_line(m_maincpu, 0, HOLD_LINE);
}
static INPUT_CHANGED( coin_inserted_irq_lo )
INPUT_CHANGED_MEMBER(btime_state::coin_inserted_irq_lo)
{
btime_state *state = field.machine().driver_data<btime_state>();
if (!newval)
device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
device_set_input_line(m_maincpu, 0, HOLD_LINE);
}
static INPUT_CHANGED( coin_inserted_nmi_lo )
INPUT_CHANGED_MEMBER(btime_state::coin_inserted_nmi_lo)
{
btime_state *state = field.machine().driver_data<btime_state>();
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
@ -584,8 +581,8 @@ static INPUT_PORTS_START( btime )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted_irq_hi, 0)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(coin_inserted_irq_hi, 0)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_hi, 0)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_hi, 0)
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("15D:1,2")
@ -664,8 +661,8 @@ static INPUT_PORTS_START( cookrace )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted_nmi_lo, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted_nmi_lo, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
@ -740,8 +737,8 @@ static INPUT_PORTS_START( zoar )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted_irq_lo, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted_irq_lo, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_lo, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_lo, 0)
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2")
@ -811,8 +808,8 @@ static INPUT_PORTS_START( lnc )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted_nmi_lo, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted_nmi_lo, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2")
@ -876,8 +873,8 @@ static INPUT_PORTS_START( wtennis )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted_nmi_lo, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted_nmi_lo, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_B ) )
@ -951,8 +948,8 @@ static INPUT_PORTS_START( mmonkey )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted_nmi_lo, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted_nmi_lo, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
@ -1024,8 +1021,8 @@ static INPUT_PORTS_START( bnj )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted_nmi_lo, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted_nmi_lo, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("8D:1,2")
@ -1096,8 +1093,8 @@ static INPUT_PORTS_START( disco )
PORT_START("SYSTEM")
PORT_BIT( 0x1f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_HIGH,IPT_COIN1 ) PORT_CHANGED(coin_inserted_irq_hi, 0)
PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_COIN2 ) PORT_CHANGED(coin_inserted_irq_hi, 0)
PORT_BIT( 0x40, IP_ACTIVE_HIGH,IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_hi, 0)
PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_irq_hi, 0)
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2")
@ -1175,8 +1172,8 @@ static INPUT_PORTS_START( sdtennis )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted_nmi_lo, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted_nmi_lo, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, btime_state,coin_inserted_nmi_lo, 0)
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )

View File

@ -191,14 +191,14 @@ ADDRESS_MAP_END
//****************************************************************************
// I/O Port Maps
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(bwing_state::coin_inserted)
{
cputag_set_input_line(field.machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
static INPUT_CHANGED( tilt_pressed )
INPUT_CHANGED_MEMBER(bwing_state::tilt_pressed)
{
cputag_set_input_line(field.machine(), "maincpu", M6809_FIRQ_LINE, newval ? ASSERT_LINE : CLEAR_LINE);
cputag_set_input_line(machine(), "maincpu", M6809_FIRQ_LINE, newval ? ASSERT_LINE : CLEAR_LINE);
}
static INPUT_PORTS_START( bwing )
@ -272,8 +272,8 @@ static INPUT_PORTS_START( bwing )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, bwing_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, bwing_state,coin_inserted, 0)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -282,7 +282,7 @@ static INPUT_PORTS_START( bwing )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
PORT_START("IN3")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_TILT ) PORT_CHANGED(tilt_pressed,0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_TILT ) PORT_CHANGED_MEMBER(DEVICE_SELF, bwing_state,tilt_pressed,0)
PORT_START("VBLANK")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_VBLANK )

View File

@ -25,6 +25,7 @@ public:
required_device<cpu_device> m_videocpu;
required_device<cpu_device> m_pia;
DECLARE_INPUT_CHANGED_MEMBER(test_switch_press);
// UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
protected:
@ -56,18 +57,17 @@ static ADDRESS_MAP_START( by133_video_map, AS_PROGRAM, 8, by133_state )
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
static INPUT_CHANGED( test_switch_press )
INPUT_CHANGED_MEMBER(by133_state::test_switch_press)
{
by133_state *state = field.machine().driver_data<by133_state>();
if(newval)
device_set_input_line(state->m_videocpu, INPUT_LINE_NMI, PULSE_LINE);
device_set_input_line(m_videocpu, INPUT_LINE_NMI, PULSE_LINE);
}
static INPUT_PORTS_START( by133 )
/* service switch is directly hard-wired with the NMI signal */
PORT_START("TEST")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_IMPULSE(1) PORT_CHANGED(test_switch_press, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, by133_state,test_switch_press, 0)
INPUT_PORTS_END
void by133_state::machine_reset()

View File

@ -79,51 +79,50 @@ ADDRESS_MAP_END
* Input ports *
*************************/
static INPUT_CHANGED( mcu_input )
INPUT_CHANGED_MEMBER(cdi_state::mcu_input)
{
cdi_state *state = field.machine().driver_data<cdi_state>();
scc68070_regs_t *scc68070 = &state->m_scc68070_regs;
scc68070_regs_t *scc68070 = &m_scc68070_regs;
bool send = false;
switch((FPTR)param)
{
case 0x39:
if(input_port_read(field.machine(), "INPUT1") & 0x01) send = true;
if(input_port_read(machine(), "INPUT1") & 0x01) send = true;
break;
case 0x37:
if(input_port_read(field.machine(), "INPUT1") & 0x02) send = true;
if(input_port_read(machine(), "INPUT1") & 0x02) send = true;
break;
case 0x31:
if(input_port_read(field.machine(), "INPUT1") & 0x04) send = true;
if(input_port_read(machine(), "INPUT1") & 0x04) send = true;
break;
case 0x32:
if(input_port_read(field.machine(), "INPUT1") & 0x08) send = true;
if(input_port_read(machine(), "INPUT1") & 0x08) send = true;
break;
case 0x33:
if(input_port_read(field.machine(), "INPUT1") & 0x10) send = true;
if(input_port_read(machine(), "INPUT1") & 0x10) send = true;
break;
case 0x30:
if(input_port_read(field.machine(), "INPUT2") & 0x01) send = true;
if(input_port_read(machine(), "INPUT2") & 0x01) send = true;
break;
case 0x38:
if(input_port_read(field.machine(), "INPUT2") & 0x02) send = true;
if(input_port_read(machine(), "INPUT2") & 0x02) send = true;
break;
case 0x34:
if(input_port_read(field.machine(), "INPUT2") & 0x04) send = true;
if(input_port_read(machine(), "INPUT2") & 0x04) send = true;
break;
case 0x35:
if(input_port_read(field.machine(), "INPUT2") & 0x08) send = true;
if(input_port_read(machine(), "INPUT2") & 0x08) send = true;
break;
case 0x36:
if(input_port_read(field.machine(), "INPUT2") & 0x10) send = true;
if(input_port_read(machine(), "INPUT2") & 0x10) send = true;
break;
}
if(send)
{
UINT8 data = (UINT8)((FPTR)param & 0x000000ff);
scc68070_quizard_rx(field.machine(), scc68070, data);
scc68070_quizard_rx(machine(), scc68070, data);
}
}
@ -173,19 +172,19 @@ static INPUT_PORTS_START( quizard )
PORT_INCLUDE( cdi )
PORT_START("INPUT1")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("Coin 1") PORT_CHANGED(mcu_input, (void*)0x39)
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Start 1") PORT_CHANGED(mcu_input, (void*)0x37)
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("Player 1 A") PORT_CHANGED(mcu_input, (void*)0x31)
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_BUTTON4) PORT_NAME("Player 1 B") PORT_CHANGED(mcu_input, (void*)0x32)
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON5) PORT_NAME("Player 1 C") PORT_CHANGED(mcu_input, (void*)0x33)
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_COIN1) PORT_NAME("Coin 1") PORT_CHANGED_MEMBER(DEVICE_SELF, cdi_state,mcu_input, (void*)0x39)
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_START1) PORT_NAME("Start 1") PORT_CHANGED_MEMBER(DEVICE_SELF, cdi_state,mcu_input, (void*)0x37)
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("Player 1 A") PORT_CHANGED_MEMBER(DEVICE_SELF, cdi_state,mcu_input, (void*)0x31)
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_BUTTON4) PORT_NAME("Player 1 B") PORT_CHANGED_MEMBER(DEVICE_SELF, cdi_state,mcu_input, (void*)0x32)
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON5) PORT_NAME("Player 1 C") PORT_CHANGED_MEMBER(DEVICE_SELF, cdi_state,mcu_input, (void*)0x33)
PORT_BIT(0xe0, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_START("INPUT2")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_SERVICE1) PORT_NAME("Service") PORT_CHANGED(mcu_input, (void*)0x30)
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_START2) PORT_NAME("Start 2") PORT_CHANGED(mcu_input, (void*)0x38)
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_BUTTON6) PORT_NAME("Player 2 A") PORT_CHANGED(mcu_input, (void*)0x34)
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_BUTTON7) PORT_NAME("Player 2 B") PORT_CHANGED(mcu_input, (void*)0x35)
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON8) PORT_NAME("Player 2 C") PORT_CHANGED(mcu_input, (void*)0x36)
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_SERVICE1) PORT_NAME("Service") PORT_CHANGED_MEMBER(DEVICE_SELF, cdi_state,mcu_input, (void*)0x30)
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_START2) PORT_NAME("Start 2") PORT_CHANGED_MEMBER(DEVICE_SELF, cdi_state,mcu_input, (void*)0x38)
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_BUTTON6) PORT_NAME("Player 2 A") PORT_CHANGED_MEMBER(DEVICE_SELF, cdi_state,mcu_input, (void*)0x34)
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_BUTTON7) PORT_NAME("Player 2 B") PORT_CHANGED_MEMBER(DEVICE_SELF, cdi_state,mcu_input, (void*)0x35)
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON8) PORT_NAME("Player 2 C") PORT_CHANGED_MEMBER(DEVICE_SELF, cdi_state,mcu_input, (void*)0x36)
PORT_BIT(0xe0, IP_ACTIVE_HIGH, IPT_UNUSED)
INPUT_PORTS_END

View File

@ -12,13 +12,12 @@
#include "includes/cheekyms.h"
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(cheekyms_state::coin_inserted)
{
cheekyms_state *state = field.machine().driver_data<cheekyms_state>();
/* this starts a 556 one-shot timer (and triggers a sound effect) */
if (newval)
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
device_set_input_line(m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
}
@ -73,7 +72,7 @@ static INPUT_PORTS_START( cheekyms )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cheekyms_state,coin_inserted, 0)
INPUT_PORTS_END

View File

@ -276,9 +276,9 @@ CUSTOM_INPUT_MEMBER(cidelsa_state::cdp1869_pcb_r)
return m_cdp1869_pcb;
}
static INPUT_CHANGED( ef_w )
INPUT_CHANGED_MEMBER(cidelsa_state::ef_w)
{
cputag_set_input_line(field.machine(), CDP1802_TAG, (int)(FPTR)param, newval);
cputag_set_input_line(machine(), CDP1802_TAG, (int)(FPTR)param, newval);
}
static INPUT_PORTS_START( destryer )
@ -316,9 +316,9 @@ static INPUT_PORTS_START( destryer )
PORT_START("EF")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) // inverted CDP1869 PRD, pushed
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_CHANGED(ef_w, (void*)COSMAC_INPUT_LINE_EF2)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(ef_w, (void*)COSMAC_INPUT_LINE_EF3)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(ef_w, (void*)COSMAC_INPUT_LINE_EF4)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_CHANGED_MEMBER(DEVICE_SELF, cidelsa_state,ef_w, (void*)COSMAC_INPUT_LINE_EF2)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cidelsa_state,ef_w, (void*)COSMAC_INPUT_LINE_EF3)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cidelsa_state,ef_w, (void*)COSMAC_INPUT_LINE_EF4)
INPUT_PORTS_END
static INPUT_PORTS_START( altair )
@ -366,9 +366,9 @@ static INPUT_PORTS_START( altair )
PORT_START("EF")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) // inverted CDP1869 PRD, pushed
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_CHANGED(ef_w, (void*)COSMAC_INPUT_LINE_EF2)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(ef_w, (void*)COSMAC_INPUT_LINE_EF3)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(ef_w, (void*)COSMAC_INPUT_LINE_EF4)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_CHANGED_MEMBER(DEVICE_SELF, cidelsa_state,ef_w, (void*)COSMAC_INPUT_LINE_EF2)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cidelsa_state,ef_w, (void*)COSMAC_INPUT_LINE_EF3)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cidelsa_state,ef_w, (void*)COSMAC_INPUT_LINE_EF4)
INPUT_PORTS_END
static INPUT_PORTS_START( draco )
@ -418,9 +418,9 @@ static INPUT_PORTS_START( draco )
PORT_START("EF")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) // CDP1869 PRD, pushed
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_CHANGED(ef_w, (void*)COSMAC_INPUT_LINE_EF2)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(ef_w, (void*)COSMAC_INPUT_LINE_EF3)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(ef_w, (void*)COSMAC_INPUT_LINE_EF4)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_CHANGED_MEMBER(DEVICE_SELF, cidelsa_state,ef_w, (void*)COSMAC_INPUT_LINE_EF2)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cidelsa_state,ef_w, (void*)COSMAC_INPUT_LINE_EF3)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cidelsa_state,ef_w, (void*)COSMAC_INPUT_LINE_EF4)
INPUT_PORTS_END
/* Machine Start */

View File

@ -97,12 +97,11 @@ READ8_MEMBER(cinemat_state::switches_r)
*
*************************************/
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(cinemat_state::coin_inserted)
{
cinemat_state *state = field.machine().driver_data<cinemat_state>();
/* on the falling edge of a new coin, set the coin_detected flag */
if (newval == 0)
state->m_coin_detected = 1;
m_coin_detected = 1;
}
@ -366,7 +365,7 @@ static INPUT_PORTS_START( spacewar )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cinemat_state,coin_inserted, 0)
INPUT_PORTS_END
@ -426,7 +425,7 @@ static INPUT_PORTS_START( barrier )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cinemat_state,coin_inserted, 0)
INPUT_PORTS_END
@ -459,7 +458,7 @@ static INPUT_PORTS_START( speedfrk )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cinemat_state,coin_inserted, 0)
PORT_START("WHEEL")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_RESET
@ -504,7 +503,7 @@ static INPUT_PORTS_START( starhawk )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cinemat_state,coin_inserted, 0)
INPUT_PORTS_END
@ -548,7 +547,7 @@ static INPUT_PORTS_START( sundance )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cinemat_state,coin_inserted, 0)
PORT_START("PAD1")
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P1 Pad 1") PORT_CODE(KEYCODE_7_PAD) PORT_PLAYER(1)
@ -604,7 +603,7 @@ static INPUT_PORTS_START( tailg )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cinemat_state,coin_inserted, 0)
PORT_START("ANALOGX")
PORT_BIT( 0xfff, 0x800, IPT_AD_STICK_X ) PORT_MINMAX(0x200,0xe00) PORT_SENSITIVITY(100) PORT_KEYDELTA(50)
@ -649,7 +648,7 @@ static INPUT_PORTS_START( warrior )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cinemat_state,coin_inserted, 0)
INPUT_PORTS_END
@ -685,7 +684,7 @@ static INPUT_PORTS_START( armora )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_SERVICE( 0x40, IP_ACTIVE_HIGH )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cinemat_state,coin_inserted, 0)
INPUT_PORTS_END
@ -721,7 +720,7 @@ static INPUT_PORTS_START( ripoff )
PORT_DIPSETTING( 0x00, "Individual" )
PORT_DIPSETTING( 0x20, "Combined" )
PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cinemat_state,coin_inserted, 0)
INPUT_PORTS_END
@ -758,7 +757,7 @@ static INPUT_PORTS_START( starcas )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_SERVICE( 0x40, IP_ACTIVE_HIGH )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cinemat_state,coin_inserted, 0)
INPUT_PORTS_END
@ -790,7 +789,7 @@ static INPUT_PORTS_START( solarq )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_SERVICE( 0x40, IP_ACTIVE_HIGH )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cinemat_state,coin_inserted, 0)
INPUT_PORTS_END
@ -824,7 +823,7 @@ static INPUT_PORTS_START( boxingb )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cinemat_state,coin_inserted, 0)
PORT_START("DIAL")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_REVERSE PORT_SENSITIVITY(100) PORT_KEYDELTA(5)
@ -866,7 +865,7 @@ static INPUT_PORTS_START( wotw )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cinemat_state,coin_inserted, 0)
INPUT_PORTS_END
@ -908,7 +907,7 @@ static INPUT_PORTS_START( demon )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Free_Play ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cinemat_state,coin_inserted, 0)
INPUT_PORTS_END
@ -954,7 +953,7 @@ static INPUT_PORTS_START( qb3 )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cinemat_state,coin_inserted, 0)
INPUT_PORTS_END

View File

@ -79,6 +79,7 @@ public:
DECLARE_WRITE8_MEMBER(cntsteer_main_irq_w);
DECLARE_READ8_MEMBER(cntsteer_adx_r);
DECLARE_WRITE8_MEMBER(nmimask_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};
@ -677,10 +678,9 @@ static INPUT_PORTS_START( zerotrgta )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) )
INPUT_PORTS_END
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(cntsteer_state::coin_inserted)
{
cntsteer_state *state = field.machine().driver_data<cntsteer_state>();
device_set_input_line(state->m_subcpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
device_set_input_line(m_subcpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
static INPUT_PORTS_START( cntsteer )
@ -701,9 +701,9 @@ static INPUT_PORTS_START( cntsteer )
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x01,0xff) PORT_SENSITIVITY(10) PORT_KEYDELTA(2)
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_IMPULSE(1) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, cntsteer_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, cntsteer_state,coin_inserted, 0)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, cntsteer_state,coin_inserted, 0)
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) //unused
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )

View File

@ -409,10 +409,9 @@ ADDRESS_MAP_END
static INPUT_CHANGED( panic_coin_inserted )
INPUT_CHANGED_MEMBER(cosmic_state::panic_coin_inserted)
{
cosmic_state *state = field.machine().driver_data<cosmic_state>();
state->panic_sound_output_w(*field.machine().device("maincpu")->memory().space(AS_PROGRAM), 17, newval == 0);
panic_sound_output_w(*machine().device("maincpu")->memory().space(AS_PROGRAM), 17, newval == 0);
}
static INPUT_PORTS_START( panic )
@ -467,13 +466,13 @@ static INPUT_PORTS_START( panic )
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_COIN1 ) PORT_CHANGED(panic_coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(panic_coin_inserted, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cosmic_state,panic_coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cosmic_state,panic_coin_inserted, 0)
INPUT_PORTS_END
static INPUT_CHANGED( cosmica_coin_inserted )
INPUT_CHANGED_MEMBER(cosmic_state::cosmica_coin_inserted)
{
cputag_set_input_line(field.machine(), "maincpu", INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
}
static INPUT_PORTS_START( cosmica )
@ -518,7 +517,7 @@ static INPUT_PORTS_START( cosmica )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_START("FAKE")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(cosmica_coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cosmic_state,cosmica_coin_inserted, 0)
INPUT_PORTS_END
/* These are used for the CR handling - This can be used to */
@ -526,9 +525,9 @@ INPUT_PORTS_END
/* Offsets are in BYTES, so bits 0-7 are at offset 0 etc. */
static INPUT_CHANGED( cosmicg_coin_inserted )
INPUT_CHANGED_MEMBER(cosmic_state::cosmicg_coin_inserted)
{
cputag_set_input_line_and_vector(field.machine(), "maincpu", 0, newval ? ASSERT_LINE : CLEAR_LINE, 6);
cputag_set_input_line_and_vector(machine(), "maincpu", 0, newval ? ASSERT_LINE : CLEAR_LINE, 6);
}
static INPUT_PORTS_START( cosmicg )
@ -557,7 +556,7 @@ static INPUT_PORTS_START( cosmicg )
PORT_DIPSETTING( 0x80, "5" )
PORT_START("IN2") /* Hard wired settings */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(cosmicg_coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cosmic_state,cosmicg_coin_inserted, 0)
/* This dip switch is not read by the program at any time */
/* but is wired to enable or disable the flip screen output */
@ -573,14 +572,14 @@ static INPUT_PORTS_START( cosmicg )
PORT_DIPUNUSED_DIPLOC( 0x04, 0x00, "SW:6" )
INPUT_PORTS_END
static INPUT_CHANGED( coin_inserted_irq0 )
INPUT_CHANGED_MEMBER(cosmic_state::coin_inserted_irq0)
{
cputag_set_input_line(field.machine(), "maincpu", 0, newval ? HOLD_LINE : CLEAR_LINE);
cputag_set_input_line(machine(), "maincpu", 0, newval ? HOLD_LINE : CLEAR_LINE);
}
static INPUT_CHANGED( coin_inserted_nmi )
INPUT_CHANGED_MEMBER(cosmic_state::coin_inserted_nmi)
{
cputag_set_input_line(field.machine(), "maincpu", INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
}
static INPUT_PORTS_START( magspot )
@ -639,8 +638,8 @@ static INPUT_PORTS_START( magspot )
/* Fake port to handle coins */
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted_irq0, 0) PORT_IMPULSE(1)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(coin_inserted_nmi, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cosmic_state,coin_inserted_irq0, 0) PORT_IMPULSE(1)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cosmic_state,coin_inserted_nmi, 0)
/* Fake port to handle coinage dip switches. Each bit goes to 3800-3807 */
PORT_START("DSW")
@ -723,8 +722,8 @@ static INPUT_PORTS_START( devzone )
/* Fake port to handle coins */
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted_irq0, 0) PORT_IMPULSE(1)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(coin_inserted_nmi, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cosmic_state,coin_inserted_irq0, 0) PORT_IMPULSE(1)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cosmic_state,coin_inserted_nmi, 0)
PORT_START("DSW")
PORT_DIPNAME( 0x0f, 0x00, DEF_STR( Coin_A ) )
@ -820,7 +819,7 @@ static INPUT_PORTS_START( nomnlnd )
/* Fake port to handle coin */
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted_nmi, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cosmic_state,coin_inserted_nmi, 0)
INPUT_PORTS_END

View File

@ -402,25 +402,23 @@ WRITE8_MEMBER(esripsys_state::g_ioadd_w)
}
}
static INPUT_CHANGED( keypad_interrupt )
INPUT_CHANGED_MEMBER(esripsys_state::keypad_interrupt)
{
esripsys_state *state = field.machine().driver_data<esripsys_state>();
if (newval == 0)
{
state->m_io_firq_status |= 2;
state->m_keypad_status |= 0x20;
cputag_set_input_line(field.machine(), "game_cpu", M6809_FIRQ_LINE, HOLD_LINE);
m_io_firq_status |= 2;
m_keypad_status |= 0x20;
cputag_set_input_line(machine(), "game_cpu", M6809_FIRQ_LINE, HOLD_LINE);
}
}
static INPUT_CHANGED( coin_interrupt )
INPUT_CHANGED_MEMBER(esripsys_state::coin_interrupt)
{
esripsys_state *state = field.machine().driver_data<esripsys_state>();
if (newval == 1)
{
state->m_io_firq_status |= 2;
state->m_coin_latch = input_port_read(field.machine(), "COINS") << 2;
cputag_set_input_line(field.machine(), "game_cpu", M6809_FIRQ_LINE, HOLD_LINE);
m_io_firq_status |= 2;
m_coin_latch = input_port_read(machine(), "COINS") << 2;
cputag_set_input_line(machine(), "game_cpu", M6809_FIRQ_LINE, HOLD_LINE);
}
}
@ -432,24 +430,24 @@ static INPUT_CHANGED( coin_interrupt )
static INPUT_PORTS_START( turbosub )
PORT_START("KEYPAD_A")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Keypad 0") PORT_CHANGED(keypad_interrupt, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Keypad 1") PORT_CHANGED(keypad_interrupt, 0)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Keypad 2") PORT_CHANGED(keypad_interrupt, 0)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Keypad 3") PORT_CHANGED(keypad_interrupt, 0)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Keypad 4") PORT_CHANGED(keypad_interrupt, 0)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Keypad 5") PORT_CHANGED(keypad_interrupt, 0)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Keypad 0") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Keypad 1") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Keypad 2") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Keypad 3") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Keypad 4") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Keypad 5") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
PORT_START("KEYPAD_B")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Keypad 6") PORT_CHANGED(keypad_interrupt, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("Keypad 7") PORT_CHANGED(keypad_interrupt, 0)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Keypad 8") PORT_CHANGED(keypad_interrupt, 0)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("Keypad 9") PORT_CHANGED(keypad_interrupt, 0)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME("Keypad *") PORT_CHANGED(keypad_interrupt, 0)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Keypad 6") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("Keypad 7") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Keypad 8") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("Keypad 9") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_PLAYER(3) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME("Keypad *") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
PORT_START("COINS")
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(coin_interrupt, 0)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_interrupt, 0)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,coin_interrupt, 0)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,coin_interrupt, 0)
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IO_1")

View File

@ -137,11 +137,10 @@ CUSTOM_INPUT_MEMBER(exerion_state::exerion_controls_r)
}
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(exerion_state::coin_inserted)
{
exerion_state *state = field.machine().driver_data<exerion_state>();
/* coin insertion causes an NMI */
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
@ -275,7 +274,7 @@ static INPUT_PORTS_START( exerion )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exerion_state,coin_inserted, 0)
PORT_START("P1") /* fake input port */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY

View File

@ -252,11 +252,11 @@ Who Dunnit 1988 6809
*
*************************************/
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(exidy440_state::coin_inserted)
{
/* if we got a coin, set the IRQ on the main CPU */
if (newval == 0)
cputag_set_input_line(field.machine(), "maincpu", 0, ASSERT_LINE);
cputag_set_input_line(machine(), "maincpu", 0, ASSERT_LINE);
}
@ -545,8 +545,8 @@ static INPUT_PORTS_START( crossbow )
PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN3") /* coin counters */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("AN0") /* fake analog X */
@ -586,8 +586,8 @@ static INPUT_PORTS_START( cheyenne )
PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN3") /* coin counters */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("AN0") /* fake analog X */
@ -627,8 +627,8 @@ static INPUT_PORTS_START( combat )
PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN3") /* coin counters */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("AN0") /* fake analog X */
@ -668,8 +668,8 @@ static INPUT_PORTS_START( catch22 )
PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN3") /* coin counters */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) */
/* PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNKNOWN ) */
@ -711,8 +711,8 @@ static INPUT_PORTS_START( cracksht )
PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN3") /* coin counters */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -749,8 +749,8 @@ static INPUT_PORTS_START( claypign )
PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN3") /* coin counters */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -788,8 +788,8 @@ static INPUT_PORTS_START( chiller )
PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN3") /* coin counters */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -827,8 +827,8 @@ static INPUT_PORTS_START( topsecex )
PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN3") /* coin counters */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -878,8 +878,8 @@ static INPUT_PORTS_START( hitnmiss )
PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN3") /* coin counters */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -920,8 +920,8 @@ static INPUT_PORTS_START( whodunit )
PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN3") /* coin counters */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -976,8 +976,8 @@ static INPUT_PORTS_START( showdown )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN3") /* coin counters */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exidy440_state,coin_inserted, 0)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNKNOWN )

View File

@ -276,16 +276,14 @@ static ADDRESS_MAP_START( slave_map, AS_PROGRAM, 8, exprraid_state )
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
static INPUT_CHANGED( coin_inserted_deco16 )
INPUT_CHANGED_MEMBER(exprraid_state::coin_inserted_deco16)
{
exprraid_state *state = field.machine().driver_data<exprraid_state>();
device_set_input_line(state->m_maincpu, DECO16_IRQ_LINE, newval ? CLEAR_LINE : ASSERT_LINE);
device_set_input_line(m_maincpu, DECO16_IRQ_LINE, newval ? CLEAR_LINE : ASSERT_LINE);
}
static INPUT_CHANGED( coin_inserted_nmi )
INPUT_CHANGED_MEMBER(exprraid_state::coin_inserted_nmi)
{
exprraid_state *state = field.machine().driver_data<exprraid_state>();
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
static INPUT_PORTS_START( exprraid )
@ -339,8 +337,8 @@ static INPUT_PORTS_START( exprraid )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED(coin_inserted_deco16, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1) PORT_CHANGED(coin_inserted_deco16, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, exprraid_state,coin_inserted_deco16, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, exprraid_state,coin_inserted_deco16, 0)
PORT_START("DSW1") /* 0x1803 */
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2")
@ -368,8 +366,8 @@ INPUT_PORTS_END
static INPUT_PORTS_START( exprboot )
PORT_INCLUDE( exprraid )
PORT_MODIFY("IN2") /* 0x1802 */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted_nmi, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted_nmi, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exprraid_state,coin_inserted_nmi, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, exprraid_state,coin_inserted_nmi, 0)
INPUT_PORTS_END
static const gfx_layout charlayout =

View File

@ -100,6 +100,8 @@ public:
DECLARE_READ8_MEMBER(famibox_system_r);
DECLARE_WRITE8_MEMBER(famibox_system_w);
DECLARE_CUSTOM_INPUT_MEMBER(famibox_coin_r);
DECLARE_INPUT_CHANGED_MEMBER(famibox_keyswitch_changed);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};
/******************************************************
@ -394,33 +396,31 @@ ADDRESS_MAP_END
*******************************************************/
static INPUT_CHANGED( famibox_keyswitch_changed )
INPUT_CHANGED_MEMBER(famibox_state::famibox_keyswitch_changed)
{
famibox_state *state = field.machine().driver_data<famibox_state>();
if ( BIT(state->m_exception_mask, 3) )
if ( BIT(m_exception_mask, 3) )
{
state->m_exception_cause &= ~0x08;
famicombox_reset(field.machine());
m_exception_cause &= ~0x08;
famicombox_reset(machine());
}
}
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(famibox_state::coin_inserted)
{
famibox_state *state = field.machine().driver_data<famibox_state>();
if ( newval )
{
state->m_coins++;
if (state->m_attract_timer->start() != attotime::never)
m_coins++;
if (m_attract_timer->start() != attotime::never)
{
state->m_gameplay_timer->adjust(attotime::from_seconds(60*(state->m_money_reg == 0x22 ? 20 : 10)), 0, attotime::never);
m_gameplay_timer->adjust(attotime::from_seconds(60*(m_money_reg == 0x22 ? 20 : 10)), 0, attotime::never);
}
if ( BIT(state->m_exception_mask,4) && (state->m_coins == 1) )
if ( BIT(m_exception_mask,4) && (m_coins == 1) )
{
state->m_exception_cause &= ~0x10;
famicombox_reset(field.machine());
m_exception_cause &= ~0x10;
famicombox_reset(machine());
}
}
}
@ -477,7 +477,7 @@ static INPUT_PORTS_START( famibox )
PORT_START("KEYSWITCH")
PORT_DIPNAME( 0x3f, 0x01, "Key switch" ) PORT_CHANGED(famibox_keyswitch_changed, 0)
PORT_DIPNAME( 0x3f, 0x01, "Key switch" ) PORT_CHANGED_MEMBER(DEVICE_SELF, famibox_state,famibox_keyswitch_changed, 0)
PORT_DIPSETTING( 0x01, "Key position 1" )
PORT_DIPSETTING( 0x02, "Key position 2" )
PORT_DIPSETTING( 0x04, "Key position 3" )
@ -487,7 +487,7 @@ static INPUT_PORTS_START( famibox )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, famibox_state,famibox_coin_r, NULL)
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, famibox_state,coin_inserted, 0)
INPUT_PORTS_END

View File

@ -34,12 +34,11 @@ inputs + notes by stephh
#include "includes/fcombat.h"
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(fcombat_state::coin_inserted)
{
fcombat_state *state = field.machine().driver_data<fcombat_state>();
/* coin insertion causes an NMI */
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
@ -207,7 +206,7 @@ static INPUT_PORTS_START( fcombat )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, fcombat_state,coin_inserted, 0)
INPUT_PORTS_END

View File

@ -405,22 +405,21 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, firetrap_state )
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(firetrap_state::coin_inserted)
{
firetrap_state *state = field.machine().driver_data<firetrap_state>();
/* coin insertion causes an IRQ */
if(newval)
{
state->m_coin_command_pending = (UINT8)(FPTR)(param);
m_coin_command_pending = (UINT8)(FPTR)(param);
/* Make sure coin IRQ's aren't generated when another command is pending, the main cpu
definitely doesn't expect them as it locks out the coin routine */
if (state->m_coin_command_pending && !state->m_i8751_current_command)
if (m_coin_command_pending && !m_i8751_current_command)
{
state->m_i8751_return = state->m_coin_command_pending;
device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0xff);
state->m_coin_command_pending = 0;
m_i8751_return = m_coin_command_pending;
device_set_input_line_and_vector(m_maincpu, 0, HOLD_LINE, 0xff);
m_coin_command_pending = 0;
}
}
}
@ -501,9 +500,9 @@ static INPUT_PORTS_START( firetrap )
PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" )
PORT_START("COIN") /* Connected to i8751 directly */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_CHANGED(coin_inserted, 3)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrap_state,coin_inserted, 1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrap_state,coin_inserted, 2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrap_state,coin_inserted, 3)
INPUT_PORTS_END
/* verified from Z80 code */

View File

@ -27,24 +27,23 @@ static void set_service_mode(running_machine &machine, int enable)
}
static INPUT_CHANGED( service_mode_switch_changed )
INPUT_CHANGED_MEMBER(firetrk_state::service_mode_switch_changed)
{
set_service_mode(field.machine(), newval);
set_service_mode(machine(), newval);
}
static INPUT_CHANGED( firetrk_horn_changed )
INPUT_CHANGED_MEMBER(firetrk_state::firetrk_horn_changed)
{
device_t *discrete = field.machine().device("discrete");
device_t *discrete = machine().device("discrete");
discrete_sound_w(discrete, FIRETRUCK_HORN_EN, newval);
}
static INPUT_CHANGED( gear_changed )
INPUT_CHANGED_MEMBER(firetrk_state::gear_changed)
{
firetrk_state *state = field.machine().driver_data<firetrk_state>();
if (newval)
state->m_gear = (FPTR)param;
m_gear = (FPTR)param;
}
@ -438,7 +437,7 @@ static INPUT_PORTS_START( firetrk )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Bell") PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_TILT )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,skid_r, (void *)2)
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Service_Mode ) ) PORT_CODE(KEYCODE_F2) PORT_TOGGLE PORT_CHANGED(service_mode_switch_changed, 0)
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Service_Mode ) ) PORT_CODE(KEYCODE_F2) PORT_TOGGLE PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,service_mode_switch_changed, 0)
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
@ -465,7 +464,7 @@ static INPUT_PORTS_START( firetrk )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Diag Step") PORT_CODE(KEYCODE_F1)
PORT_START("HORN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Horn") PORT_PLAYER(1) PORT_CHANGED(firetrk_horn_changed, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Horn") PORT_PLAYER(1) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,firetrk_horn_changed, 0)
PORT_START("R27")
PORT_ADJUSTER( 20, "R27 - Motor Frequency" )
@ -523,10 +522,10 @@ static INPUT_PORTS_START( superbug )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Track Select") PORT_CODE(KEYCODE_SPACE)
PORT_START("GEAR")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Gear 1") PORT_CODE(KEYCODE_Z) PORT_CHANGED(gear_changed, (void *)0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Gear 2") PORT_CODE(KEYCODE_X) PORT_CHANGED(gear_changed, (void *)1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Gear 3") PORT_CODE(KEYCODE_C) PORT_CHANGED(gear_changed, (void *)2)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Gear 4") PORT_CODE(KEYCODE_V) PORT_CHANGED(gear_changed, (void *)3)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Gear 1") PORT_CODE(KEYCODE_Z) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,gear_changed, (void *)0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Gear 2") PORT_CODE(KEYCODE_X) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,gear_changed, (void *)1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Gear 3") PORT_CODE(KEYCODE_C) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,gear_changed, (void *)2)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Gear 4") PORT_CODE(KEYCODE_V) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,gear_changed, (void *)3)
PORT_START("R62")
PORT_ADJUSTER( 20, "R62 - Motor Frequency" )
@ -587,7 +586,7 @@ static INPUT_PORTS_START( montecar )
PORT_START("BIT_7")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_TILT )
PORT_SERVICE( 0x04, IP_ACTIVE_HIGH ) PORT_CHANGED(service_mode_switch_changed, 0)
PORT_SERVICE( 0x04, IP_ACTIVE_HIGH ) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,service_mode_switch_changed, 0)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL )
@ -595,10 +594,10 @@ static INPUT_PORTS_START( montecar )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,skid_r, (void *)0)
PORT_START("GEAR")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Gear 1") PORT_CODE(KEYCODE_Z) PORT_CHANGED(gear_changed, (void *)0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Gear 2") PORT_CODE(KEYCODE_X) PORT_CHANGED(gear_changed, (void *)1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Gear 3") PORT_CODE(KEYCODE_C) PORT_CHANGED(gear_changed, (void *)2)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Gear 4") PORT_CODE(KEYCODE_V) PORT_CHANGED(gear_changed, (void *)3)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Gear 1") PORT_CODE(KEYCODE_Z) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,gear_changed, (void *)0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Gear 2") PORT_CODE(KEYCODE_X) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,gear_changed, (void *)1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Gear 3") PORT_CODE(KEYCODE_C) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,gear_changed, (void *)2)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Gear 4") PORT_CODE(KEYCODE_V) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,gear_changed, (void *)3)
PORT_START("R89")
PORT_ADJUSTER( 20, "R89 - Motor Frequency" )

View File

@ -142,14 +142,14 @@ static ADDRESS_MAP_START( flower_sound_cpu, AS_PROGRAM, 8, flower_state )
ADDRESS_MAP_END
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(flower_state::coin_inserted)
{
cputag_set_input_line(field.machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
static INPUT_PORTS_START( flower )
PORT_START("IN0CPU0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, flower_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 )
PORT_DIPNAME( 0x08, 0x08, "Energy Decrease" ) PORT_DIPLOCATION("SW2:4")

View File

@ -1079,23 +1079,22 @@ static const ppi8255_interface scorpion_ppi8255_1_intf =
*
*************************************/
static INPUT_CHANGED( gmgalax_game_changed )
INPUT_CHANGED_MEMBER(galaxian_state::gmgalax_game_changed)
{
galaxian_state *state = field.machine().driver_data<galaxian_state>();
address_space *space = field.machine().device("maincpu")->memory().space(AS_PROGRAM);
address_space *space = machine().device("maincpu")->memory().space(AS_PROGRAM);
/* new value is the selected game */
state->m_gmgalax_selected_game = newval;
m_gmgalax_selected_game = newval;
/* select the bank and graphics bank based on it */
memory_set_bank(field.machine(), "bank1", state->m_gmgalax_selected_game);
state->galaxian_gfxbank_w(*space, 0, state->m_gmgalax_selected_game);
memory_set_bank(machine(), "bank1", m_gmgalax_selected_game);
galaxian_gfxbank_w(*space, 0, m_gmgalax_selected_game);
/* reset the stars */
state->galaxian_stars_enable_w(*space, 0, 0);
galaxian_stars_enable_w(*space, 0, 0);
/* reset the CPU */
cputag_set_input_line(field.machine(), "maincpu", INPUT_LINE_RESET, PULSE_LINE);
cputag_set_input_line(machine(), "maincpu", INPUT_LINE_RESET, PULSE_LINE);
}
@ -2814,7 +2813,7 @@ static DRIVER_INIT( gmgalax )
memory_configure_bank(machine, "bank1", 0, 2, machine.region("maincpu")->base() + 0x10000, 0x4000);
/* callback when the game select is toggled */
gmgalax_game_changed(*state, *machine.m_portlist.first()->fieldlist().first(), NULL, 0, 0);
state->gmgalax_game_changed(*machine.m_portlist.first()->fieldlist().first(), NULL, 0, 0);
state_save_register_global(machine, state->m_gmgalax_selected_game);
}
@ -2937,7 +2936,6 @@ void tenspot_set_game_bank(running_machine& machine, int bank, int from_game)
char tmp[64];
UINT8* srcregion;
UINT8* dstregion;
UINT8* color_prom;
int x;
sprintf(tmp,"game_%d_cpu", bank);
@ -2971,7 +2969,6 @@ void tenspot_set_game_bank(running_machine& machine, int bank, int from_game)
dstregion = machine.region("proms")->base();
memcpy(dstregion, srcregion, 0x20);
color_prom = dstregion;
PALETTE_INIT_CALL(galaxian);
}

View File

@ -973,7 +973,7 @@ static INPUT_PORTS_START( gmgalax )
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("GAMESEL") /* fake - game select */
PORT_DIPNAME( 0x01, 0x00, "Game Select") PORT_CODE(KEYCODE_F1) PORT_TOGGLE PORT_CHANGED(gmgalax_game_changed, NULL)
PORT_DIPNAME( 0x01, 0x00, "Game Select") PORT_CODE(KEYCODE_F1) PORT_TOGGLE PORT_CHANGED_MEMBER(DEVICE_SELF, galaxian_state, gmgalax_game_changed, NULL)
PORT_DIPSETTING( 0x00, "Ghost Muncher" )
PORT_DIPSETTING( 0x01, "Galaxian" )
INPUT_PORTS_END

View File

@ -89,6 +89,7 @@ public:
DECLARE_READ16_MEMBER(wd1770_r);
DECLARE_READ16_MEMBER(io_r);
DECLARE_WRITE16_MEMBER(io_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};
@ -593,12 +594,12 @@ READ16_MEMBER(guab_state::io_r)
}
}
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(guab_state::coin_inserted)
{
if (newval == 0)
{
UINT32 credit;
address_space *space = field.machine().device("maincpu")->memory().space(AS_PROGRAM);
address_space *space = machine().device("maincpu")->memory().space(AS_PROGRAM);
/* Get the current credit value and add the new coin value */
credit = space->read_dword(0x8002c) + (UINT32)(FPTR)param;
@ -707,8 +708,8 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( guab )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("50p") PORT_CHANGED(coin_inserted, (void *)50)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_NAME("100p") PORT_CHANGED(coin_inserted, (void *)100)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("50p") PORT_CHANGED_MEMBER(DEVICE_SELF, guab_state,coin_inserted, (void *)50)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_NAME("100p") PORT_CHANGED_MEMBER(DEVICE_SELF, guab_state,coin_inserted, (void *)100)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Back door") PORT_CODE(KEYCODE_R) PORT_TOGGLE
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Cash door") PORT_CODE(KEYCODE_T) PORT_TOGGLE
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Key switch") PORT_CODE(KEYCODE_Y) PORT_TOGGLE
@ -733,14 +734,14 @@ static INPUT_PORTS_START( guab )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("C")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("D")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("10p") PORT_CHANGED(coin_inserted, (void *)10)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("20p") PORT_CHANGED(coin_inserted, (void *)20)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("10p") PORT_CHANGED_MEMBER(DEVICE_SELF, guab_state,coin_inserted, (void *)10)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("20p") PORT_CHANGED_MEMBER(DEVICE_SELF, guab_state,coin_inserted, (void *)20)
INPUT_PORTS_END
static INPUT_PORTS_START( tenup )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("50p") PORT_CHANGED(coin_inserted, (void *)50)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_NAME("100p") PORT_CHANGED(coin_inserted, (void *)100)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("50p") PORT_CHANGED_MEMBER(DEVICE_SELF, guab_state,coin_inserted, (void *)50)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_NAME("100p") PORT_CHANGED_MEMBER(DEVICE_SELF, guab_state,coin_inserted, (void *)100)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Back door") PORT_CODE(KEYCODE_R) PORT_TOGGLE
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Cash door") PORT_CODE(KEYCODE_T) PORT_TOGGLE
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Key switch") PORT_CODE(KEYCODE_Y) PORT_TOGGLE
@ -765,8 +766,8 @@ static INPUT_PORTS_START( tenup )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("A")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("B")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("C")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("10p") PORT_CHANGED(coin_inserted, (void *)10)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("20p") PORT_CHANGED(coin_inserted, (void *)20)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("10p") PORT_CHANGED_MEMBER(DEVICE_SELF, guab_state,coin_inserted, (void *)10)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("20p") PORT_CHANGED_MEMBER(DEVICE_SELF, guab_state,coin_inserted, (void *)20)
INPUT_PORTS_END

View File

@ -78,6 +78,7 @@ public:
DECLARE_READ16_MEMBER(unk_r);
DECLARE_WRITE16_MEMBER(mux_w);
DECLARE_READ16_MEMBER(mux_r);
DECLARE_INPUT_CHANGED_MEMBER(touchscreen_press);
};
@ -401,22 +402,21 @@ static TIMER_CALLBACK( touch_cb )
}
}
static INPUT_CHANGED( touchscreen_press )
INPUT_CHANGED_MEMBER(jpmsys5_state::touchscreen_press)
{
jpmsys5_state *state = field.machine().driver_data<jpmsys5_state>();
if (newval == 0)
{
attotime rx_period = attotime::from_hz(10000) * 16;
/* Each touch screen packet is 3 bytes */
state->m_touch_data[0] = 0x2a;
state->m_touch_data[1] = 0x7 - (input_port_read(field.machine(), "TOUCH_Y") >> 5) + 0x30;
state->m_touch_data[2] = (input_port_read(field.machine(), "TOUCH_X") >> 5) + 0x30;
m_touch_data[0] = 0x2a;
m_touch_data[1] = 0x7 - (input_port_read(machine(), "TOUCH_Y") >> 5) + 0x30;
m_touch_data[2] = (input_port_read(machine(), "TOUCH_X") >> 5) + 0x30;
/* Start sending the data to the 68000 serially */
state->m_touch_data_count = 0;
state->m_touch_state = START;
state->m_touch_timer->adjust(rx_period, 0, rx_period);
m_touch_data_count = 0;
m_touch_state = START;
m_touch_timer->adjust(rx_period, 0, rx_period);
}
}
@ -481,7 +481,7 @@ static INPUT_PORTS_START( monopoly )
PORT_BIT( 0xc3, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("TOUCH_PUSH")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CHANGED(touchscreen_press, NULL)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, jpmsys5_state,touchscreen_press, NULL)
PORT_START("TOUCH_X")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(45) PORT_KEYDELTA(15)

View File

@ -68,22 +68,20 @@ static ADDRESS_MAP_START( kopunch_io_map, AS_IO, 8, kopunch_state )
AM_RANGE(0x3f, 0x3f) AM_WRITENOP
ADDRESS_MAP_END
static INPUT_CHANGED( left_coin_inserted )
INPUT_CHANGED_MEMBER(kopunch_state::left_coin_inserted)
{
kopunch_state *state = field.machine().driver_data<kopunch_state>();
/* left coin insertion causes a rst6.5 (vector 0x34) */
if (newval)
device_set_input_line(state->m_maincpu, I8085_RST65_LINE, HOLD_LINE);
device_set_input_line(m_maincpu, I8085_RST65_LINE, HOLD_LINE);
}
static INPUT_CHANGED( right_coin_inserted )
INPUT_CHANGED_MEMBER(kopunch_state::right_coin_inserted)
{
kopunch_state *state = field.machine().driver_data<kopunch_state>();
/* right coin insertion causes a rst5.5 (vector 0x2c) */
if (newval)
device_set_input_line(state->m_maincpu, I8085_RST55_LINE, HOLD_LINE);
device_set_input_line(m_maincpu, I8085_RST55_LINE, HOLD_LINE);
}
static INPUT_PORTS_START( kopunch )
@ -99,11 +97,11 @@ static INPUT_PORTS_START( kopunch )
PORT_START("SYSTEM")
PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* punch strength (high 3 bits) */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1) PORT_CHANGED(right_coin_inserted, 0)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, kopunch_state,right_coin_inserted, 0)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON6 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON7 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED(left_coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, kopunch_state,left_coin_inserted, 0)
PORT_START("DSW")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )

View File

@ -182,21 +182,19 @@ ADDRESS_MAP_END
static INPUT_CHANGED( coin1_inserted )
INPUT_CHANGED_MEMBER(ladybug_state::coin1_inserted)
{
ladybug_state *state = field.machine().driver_data<ladybug_state>();
/* left coin insertion causes an NMI */
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
}
static INPUT_CHANGED( coin2_inserted )
INPUT_CHANGED_MEMBER(ladybug_state::coin2_inserted)
{
ladybug_state *state = field.machine().driver_data<ladybug_state>();
/* right coin insertion causes an IRQ */
if (newval)
device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
device_set_input_line(m_maincpu, 0, HOLD_LINE);
}
@ -293,8 +291,8 @@ static INPUT_PORTS_START( ladybug )
/* settings 0x00 through 0x50 all give 1 Coin/1 Credit */
PORT_START("COIN") /* FAKE */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin1_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(coin2_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, ladybug_state,coin1_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, ladybug_state,coin2_inserted, 0)
PORT_START(LADYBUG_P1_CONTROL_PORT_TAG)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
@ -392,8 +390,8 @@ static INPUT_PORTS_START( snapjack )
/* settings 0x00 through 0x04 all give 1 Coin/1 Credit */
PORT_START("COIN") /* FAKE */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin1_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(coin2_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, ladybug_state,coin1_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, ladybug_state,coin2_inserted, 0)
INPUT_PORTS_END
static INPUT_PORTS_START( cavenger )
@ -475,8 +473,8 @@ static INPUT_PORTS_START( cavenger )
/* settings 0x00 through 0x50 all give 1 Coin/1 Credit */
PORT_START("COIN") /* FAKE */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin1_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(coin2_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, ladybug_state,coin1_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, ladybug_state,coin2_inserted, 0)
INPUT_PORTS_END
static INPUT_PORTS_START( dorodon )
@ -558,8 +556,8 @@ static INPUT_PORTS_START( dorodon )
/* settings 0x00 through 0x50 all give 1 Coin/1 Credit */
PORT_START("COIN") /* FAKE */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin1_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(coin2_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, ladybug_state,coin1_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, ladybug_state,coin2_inserted, 0)
INPUT_PORTS_END
static INPUT_PORTS_START( sraider )

View File

@ -37,12 +37,11 @@ DIP locations verified for:
#include "includes/lasso.h"
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(lasso_state::coin_inserted)
{
lasso_state *state = field.machine().driver_data<lasso_state>();
/* coin insertion causes an NMI */
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
@ -266,8 +265,8 @@ static INPUT_PORTS_START( lasso )
PORT_DIPNAME( 0x08, 0x00, "Invulnerability (Cheat)") PORT_DIPLOCATION("SW1:!6") /* Listed as "Test" */
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, lasso_state,coin_inserted, 0)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, lasso_state,coin_inserted, 0)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 )
INPUT_PORTS_END
@ -324,8 +323,8 @@ static INPUT_PORTS_START( wwjgtin )
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW1:!5" ) /* probably unused */
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW1:!6" ) /* probably unused */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, lasso_state,coin_inserted, 0)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, lasso_state,coin_inserted, 0)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 )
INPUT_PORTS_END

View File

@ -499,11 +499,10 @@ READ8_MEMBER(m10_state::m11_a700_r)
*
*************************************/
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(m10_state::coin_inserted)
{
m10_state *state = field.machine().driver_data<m10_state>();
/* coin insertion causes an NMI */
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
}
@ -646,7 +645,7 @@ static INPUT_PORTS_START( skychut )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_START("FAKE")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, m10_state,coin_inserted, 0)
CAB_PORTENV
INPUT_PORTS_END
@ -687,7 +686,7 @@ static INPUT_PORTS_START( ipminvad )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_START("FAKE")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, m10_state,coin_inserted, 0)
CAB_PORTENV
INPUT_PORTS_END
@ -721,7 +720,7 @@ static INPUT_PORTS_START( spacbeam )
PORT_DIPSETTING ( 0x20, "1 Coin 2 Plays" )
PORT_START("FAKE")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, m10_state,coin_inserted, 0)
CAB_PORTENV
INPUT_PORTS_END
@ -761,7 +760,7 @@ static INPUT_PORTS_START( headoni )
PORT_DIPSETTING ( 0x20, "1 Coin 2 Plays" )
PORT_START("FAKE")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, m10_state,coin_inserted, 0)
CAB_PORTENV
INPUT_PORTS_END

View File

@ -78,6 +78,8 @@ public:
DECLARE_READ8_MEMBER(input_buttons_r);
DECLARE_WRITE8_MEMBER(test_w);
DECLARE_WRITE8_MEMBER(hopper_w);
DECLARE_INPUT_CHANGED_MEMBER(left_coin_inserted);
DECLARE_INPUT_CHANGED_MEMBER(right_coin_inserted);
};
@ -224,20 +226,18 @@ ADDRESS_MAP_END
*
*************************************/
static INPUT_CHANGED( left_coin_inserted )
INPUT_CHANGED_MEMBER(m14_state::left_coin_inserted)
{
m14_state *state = field.machine().driver_data<m14_state>();
/* left coin insertion causes a rst6.5 (vector 0x34) */
if (newval)
device_set_input_line(state->m_maincpu, I8085_RST65_LINE, HOLD_LINE);
device_set_input_line(m_maincpu, I8085_RST65_LINE, HOLD_LINE);
}
static INPUT_CHANGED( right_coin_inserted )
INPUT_CHANGED_MEMBER(m14_state::right_coin_inserted)
{
m14_state *state = field.machine().driver_data<m14_state>();
/* right coin insertion causes a rst5.5 (vector 0x2c) */
if (newval)
device_set_input_line(state->m_maincpu, I8085_RST55_LINE, HOLD_LINE);
device_set_input_line(m_maincpu, I8085_RST55_LINE, HOLD_LINE);
}
static INPUT_PORTS_START( m14 )
@ -291,8 +291,8 @@ static INPUT_PORTS_START( m14 )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_START("FAKE")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED(left_coin_inserted, 0) //coin x 5
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1) PORT_CHANGED(right_coin_inserted, 0) //coin x 1
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, m14_state,left_coin_inserted, 0) //coin x 5
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, m14_state,right_coin_inserted, 0) //coin x 1
INPUT_PORTS_END
static const gfx_layout charlayout =

View File

@ -16,10 +16,10 @@
#define SOUND_CLOCK XTAL_4MHz
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(madalien_state::coin_inserted)
{
/* coin insertion causes an NMI */
cputag_set_input_line(field.machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
@ -153,7 +153,7 @@ static INPUT_PORTS_START( madalien )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, madalien_state,coin_inserted, 0)
INPUT_PORTS_END

View File

@ -54,6 +54,7 @@ public:
DECLARE_WRITE8_MEMBER(mcu_tdr_w);
DECLARE_READ8_MEMBER(mcu_tcr_r);
DECLARE_WRITE8_MEMBER(mcu_tcr_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};
@ -253,10 +254,10 @@ static MACHINE_RESET(supervisor_board)
output_set_digit_value(2, 0x00);
}
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(maxaflex_state::coin_inserted)
{
if (!newval)
cputag_set_input_line(field.machine(), "mcu", M6805_IRQ_LINE, HOLD_LINE );
cputag_set_input_line(machine(), "mcu", M6805_IRQ_LINE, HOLD_LINE );
}
int atari_input_disabled(running_machine &machine)
@ -337,7 +338,7 @@ static INPUT_PORTS_START( a600xl )
/* Max-A-Flex specific ports */
PORT_START("coin") /* IN4 coin */
PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT(0x1, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, maxaflex_state,coin_inserted, 0)
PORT_START("dsw") /* IN5 DSW */
PORT_DIPNAME(0xf, 0x9, "Coin/Time" )

View File

@ -196,9 +196,9 @@ WRITE8_MEMBER(meadows_state::meadows_audio_w)
*
*************************************/
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(meadows_state::coin_inserted)
{
cputag_set_input_line_and_vector(field.machine(), "maincpu", 0, (newval ? ASSERT_LINE : CLEAR_LINE), 0x82);
cputag_set_input_line_and_vector(machine(), "maincpu", 0, (newval ? ASSERT_LINE : CLEAR_LINE), 0x82);
}
@ -441,7 +441,7 @@ static INPUT_PORTS_START( meadows )
PORT_DIPSETTING( 0x00, DEF_STR( None ))
PORT_START("FAKE")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, meadows_state,coin_inserted, 0)
PORT_BIT( 0x8e, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
@ -493,7 +493,7 @@ static INPUT_PORTS_START( bowl3d )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_START("FAKE")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, meadows_state,coin_inserted, 0)
PORT_BIT( 0x8e, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END

View File

@ -128,10 +128,10 @@ ADDRESS_MAP_END
***************************************************************************/
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(metlclsh_state::coin_inserted)
{
if(newval != oldval)
cputag_set_input_line(field.machine(), "sub", INPUT_LINE_NMI, ASSERT_LINE);
cputag_set_input_line(machine(), "sub", INPUT_LINE_NMI, ASSERT_LINE);
}
static INPUT_PORTS_START( metlclsh )
@ -177,8 +177,8 @@ static INPUT_PORTS_START( metlclsh )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, metlclsh_state,coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, metlclsh_state,coin_inserted, 0)
PORT_START("DSW") /* c003 */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )
@ -197,7 +197,7 @@ static INPUT_PORTS_START( metlclsh )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // cpu2 will clr c040 on startup forever
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_IMPULSE(1) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, metlclsh_state,coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
INPUT_PORTS_END

View File

@ -56,10 +56,10 @@ WRITE8_MEMBER(mystston_state::irq_clear_w)
*
*************************************/
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(mystston_state::coin_inserted)
{
/* coin insertion causes an NMI */
cputag_set_input_line(field.machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
@ -130,8 +130,8 @@ static INPUT_PORTS_START( mystston )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, mystston_state,coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, mystston_state,coin_inserted, 0)
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL

View File

@ -279,9 +279,9 @@ ADDRESS_MAP_END
***************************************************************************/
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(naughtyb_state::coin_inserted)
{
cputag_set_input_line(field.machine(), "maincpu", INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
}
static INPUT_PORTS_START( naughtyb )
@ -329,7 +329,7 @@ static INPUT_PORTS_START( naughtyb )
PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
PORT_START( "FAKE" )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, naughtyb_state,coin_inserted, 0)
// when reading DSW0, bit 7 doesn't read cabinet, but vblank
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK )
INPUT_PORTS_END
@ -377,7 +377,7 @@ static INPUT_PORTS_START( trvmstr )
PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
PORT_START( "FAKE" )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, naughtyb_state,coin_inserted, 0)
// when reading DSW0, bit 7 doesn't read cabinet, but vblank
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK )
INPUT_PORTS_END

View File

@ -149,6 +149,7 @@ public:
DECLARE_READ16_MEMBER(irq1_ack_r);
DECLARE_READ16_MEMBER(irq2_ack_r);
DECLARE_READ16_MEMBER(irq4_ack_r);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};
@ -314,21 +315,20 @@ static ADDRESS_MAP_START( pntnpuzl_map, AS_PROGRAM, 16, pntnpuzl_state )
ADDRESS_MAP_END
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(pntnpuzl_state::coin_inserted)
{
pntnpuzl_state *state = field.machine().driver_data<pntnpuzl_state>();
/* TODO: change this! */
if(newval)
generic_pulse_irq_line(state->m_maincpu, (UINT8)(FPTR)param, 1);
generic_pulse_irq_line(m_maincpu->execute(), (UINT8)(FPTR)param, 1);
}
static INPUT_PORTS_START( pntnpuzl )
PORT_START("IN0") /* fake inputs */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 1) PORT_IMPULSE(1)
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_HIGH )PORT_CHANGED(coin_inserted, 2) PORT_IMPULSE(1)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 4) PORT_IMPULSE(1)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, pntnpuzl_state,coin_inserted, 1) PORT_IMPULSE(1)
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_HIGH )PORT_CHANGED_MEMBER(DEVICE_SELF, pntnpuzl_state,coin_inserted, 2) PORT_IMPULSE(1)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, pntnpuzl_state,coin_inserted, 4) PORT_IMPULSE(1)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
/* game uses a touch screen */

View File

@ -81,6 +81,7 @@ public:
DECLARE_READ8_MEMBER(audio_command_r);
DECLARE_READ8_MEMBER(progolf_videoram_r);
DECLARE_WRITE8_MEMBER(progolf_videoram_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};
@ -269,9 +270,9 @@ static ADDRESS_MAP_START( sound_cpu, AS_PROGRAM, 8, progolf_state )
ADDRESS_MAP_END
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(progolf_state::coin_inserted)
{
cputag_set_input_line(field.machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
/* verified from M6502 code */
@ -302,8 +303,8 @@ static INPUT_PORTS_START( progolf )
PORT_START("IN2")
PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW,IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW,IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW,IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, progolf_state,coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW,IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, progolf_state,coin_inserted, 0)
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_B ) )
@ -322,7 +323,7 @@ static INPUT_PORTS_START( progolf )
PORT_DIPSETTING( 0x10, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_DIPUNUSED( 0x20, IP_ACTIVE_HIGH )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED(coin_inserted, 0) /* same coinage as COIN1 */
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, progolf_state,coin_inserted, 0) /* same coinage as COIN1 */
PORT_SERVICE( 0x80, IP_ACTIVE_HIGH )
PORT_START("DSW2")

View File

@ -57,6 +57,7 @@ public:
DECLARE_READ8_MEMBER(quizshow_tape_signal_r);
DECLARE_WRITE8_MEMBER(quizshow_main_ram_w);
DECLARE_CUSTOM_INPUT_MEMBER(quizshow_tape_headpos_r);
DECLARE_INPUT_CHANGED_MEMBER(quizshow_category_select);
};
@ -242,13 +243,12 @@ CUSTOM_INPUT_MEMBER(quizshow_state::quizshow_tape_headpos_r)
return 1 << m_tape_head_pos;
}
static INPUT_CHANGED(quizshow_category_select)
INPUT_CHANGED_MEMBER(quizshow_state::quizshow_category_select)
{
if (newval)
{
quizshow_state *state = field.machine().driver_data<quizshow_state>();
if (state->m_category_enable)
state->m_tape_head_pos = (state->m_tape_head_pos + 1) & 3;
if (m_category_enable)
m_tape_head_pos = (m_tape_head_pos + 1) & 3;
}
}
@ -319,7 +319,7 @@ static INPUT_PORTS_START( quizshow )
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("CAT")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Category Select") PORT_CHANGED(quizshow_category_select, NULL)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Category Select") PORT_CHANGED_MEMBER(DEVICE_SELF, quizshow_state,quizshow_category_select, NULL)
INPUT_PORTS_END

View File

@ -145,11 +145,11 @@
*
*************************************/
static INPUT_CHANGED( service_switch )
INPUT_CHANGED_MEMBER(segag80r_state::service_switch)
{
/* pressing the service switch sends an NMI */
if (newval)
cputag_set_input_line(field.machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
}
@ -472,7 +472,7 @@ static INPUT_PORTS_START( g80r_generic )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) /* P1.30 */
PORT_START("SERVICESW")
PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_HIGH ) PORT_CHANGED(service_switch, 0)
PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_HIGH ) PORT_CHANGED_MEMBER(DEVICE_SELF, segag80r_state,service_switch, 0)
INPUT_PORTS_END

View File

@ -158,11 +158,11 @@
*
*************************************/
static INPUT_CHANGED( service_switch )
INPUT_CHANGED_MEMBER(segag80v_state::service_switch)
{
/* pressing the service switch sends an NMI */
if (newval)
cputag_set_input_line(field.machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
}
@ -480,7 +480,7 @@ static INPUT_PORTS_START( g80v_generic )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) /* P1.30 */
PORT_START("SERVICESW")
PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_HIGH ) PORT_CHANGED(service_switch, 0)
PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_HIGH ) PORT_CHANGED_MEMBER(DEVICE_SELF, segag80v_state,service_switch, 0)
INPUT_PORTS_END

View File

@ -106,9 +106,9 @@ ADDRESS_MAP_END
/*******************************************************************************/
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(shootout_state::coin_inserted)
{
cputag_set_input_line(field.machine(), "maincpu", INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
}
static INPUT_PORTS_START( shootout )
@ -129,8 +129,8 @@ static INPUT_PORTS_START( shootout )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, shootout_state,coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, shootout_state,coin_inserted, 0)
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )

View File

@ -82,10 +82,9 @@ ADDRESS_MAP_END
***************************************************************************/
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(skyfox_state::coin_inserted)
{
skyfox_state *state = field.machine().driver_data<skyfox_state>();
device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
device_set_input_line(m_maincpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
static INPUT_PORTS_START( skyfox )
@ -158,8 +157,8 @@ static INPUT_PORTS_START( skyfox )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("COINS") // Fake input port, coins are directly connected on NMI line
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, skyfox_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, skyfox_state,coin_inserted, 0)
INPUT_PORTS_END

View File

@ -442,9 +442,9 @@ ADDRESS_MAP_END
*
*************************************/
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(snk6502_state::coin_inserted)
{
cputag_set_input_line(field.machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
static INPUT_PORTS_START( snk6502_generic_joy8way )
@ -469,8 +469,8 @@ static INPUT_PORTS_START( snk6502_generic_joy8way )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, snk6502_state,coin_inserted, 0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, snk6502_state,coin_inserted, 0)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
@ -520,7 +520,7 @@ static INPUT_PORTS_START( satansat )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk6502_state,snk6502_music0_r, NULL) /* music0 playing */
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, snk6502_state,coin_inserted, 0)
PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* NC */
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk6502_state,sasuke_count_r, NULL) /* connected to a binary counter */

View File

@ -57,9 +57,9 @@ static ADDRESS_MAP_START( ssozumo_sound_map, AS_PROGRAM, 8, ssozumo_state )
AM_RANGE(0x4000, 0xffff) AM_ROM
ADDRESS_MAP_END
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(ssozumo_state::coin_inserted)
{
cputag_set_input_line(field.machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
static INPUT_PORTS_START( ssozumo )
@ -70,8 +70,8 @@ static INPUT_PORTS_START( ssozumo )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, ssozumo_state,coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, ssozumo_state,coin_inserted, 0)
PORT_START("P2") /* IN1 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)

View File

@ -73,9 +73,9 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, tagteam_state )
ADDRESS_MAP_END
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(tagteam_state::coin_inserted)
{
cputag_set_input_line(field.machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
static INPUT_PORTS_START( bigprowr )
@ -86,8 +86,8 @@ static INPUT_PORTS_START( bigprowr )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, tagteam_state,coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, tagteam_state,coin_inserted, 0)
PORT_START("P2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_8WAY

View File

@ -392,10 +392,9 @@ WRITE16_MEMBER(taitob_state::gain_control_w)
}
}
static INPUT_CHANGED( realpunc_sensor )
INPUT_CHANGED_MEMBER(taitob_state::realpunc_sensor)
{
taitob_state *state = field.machine().driver_data<taitob_state>();
device_set_input_line(state->m_maincpu, 4, HOLD_LINE);
device_set_input_line(m_maincpu, 4, HOLD_LINE);
}
/***************************************************************************
@ -1838,9 +1837,9 @@ static INPUT_PORTS_START( realpunc )
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_BUTTON2 ) PORT_NAME("Pad Photosensor 1 (N)") PORT_CHANGED(realpunc_sensor, 0)
PORT_BIT( 0x20, IP_ACTIVE_LOW,IPT_BUTTON3 ) PORT_NAME("Pad Photosensor 2 (U)") PORT_CHANGED(realpunc_sensor, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW,IPT_BUTTON4 ) PORT_NAME("Pad Photosensor 3 (D)") PORT_CHANGED(realpunc_sensor, 0)
PORT_BIT( 0x10, IP_ACTIVE_LOW,IPT_BUTTON2 ) PORT_NAME("Pad Photosensor 1 (N)") PORT_CHANGED_MEMBER(DEVICE_SELF, taitob_state,realpunc_sensor, 0)
PORT_BIT( 0x20, IP_ACTIVE_LOW,IPT_BUTTON3 ) PORT_NAME("Pad Photosensor 2 (U)") PORT_CHANGED_MEMBER(DEVICE_SELF, taitob_state,realpunc_sensor, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW,IPT_BUTTON4 ) PORT_NAME("Pad Photosensor 3 (D)") PORT_CHANGED_MEMBER(DEVICE_SELF, taitob_state,realpunc_sensor, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW,IPT_UNKNOWN )
INPUT_PORTS_END

View File

@ -185,9 +185,9 @@ static INTERRUPT_GEN( tankbatt_interrupt )
if (state->m_nmi_enable) device_set_input_line(device,INPUT_LINE_NMI,PULSE_LINE);
}
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(tankbatt_state::coin_inserted)
{
cputag_set_input_line(field.machine(), "maincpu", 0, ASSERT_LINE);
cputag_set_input_line(machine(), "maincpu", 0, ASSERT_LINE);
}
static INPUT_PORTS_START( tankbatt )
@ -197,8 +197,8 @@ static INPUT_PORTS_START( tankbatt )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, tankbatt_state,coin_inserted, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, tankbatt_state,coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT )
PORT_START("P2") /* IN1 */

View File

@ -81,10 +81,10 @@ static ADDRESS_MAP_START( sound_cpu, AS_PROGRAM, 8, tryout_state )
AM_RANGE(0xc000, 0xffff) AM_ROM
ADDRESS_MAP_END
static INPUT_CHANGED( coin_inserted )
INPUT_CHANGED_MEMBER(tryout_state::coin_inserted)
{
if(newval != oldval)
cputag_set_input_line(field.machine(), "maincpu", INPUT_LINE_NMI, ASSERT_LINE);
cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, ASSERT_LINE);
}
static INPUT_PORTS_START( tryout )
@ -136,8 +136,8 @@ static INPUT_PORTS_START( tryout )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_IMPULSE(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, tryout_state,coin_inserted, 0)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, tryout_state,coin_inserted, 0)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK )

View File

@ -87,25 +87,25 @@ CUSTOM_INPUT_MEMBER(vicdual_state::vicdual_read_coin_status)
}
static INPUT_CHANGED( coin_changed )
INPUT_CHANGED_MEMBER(vicdual_state::coin_changed)
{
if (newval && !oldval)
{
/* increment the coin counter */
coin_counter_w(field.machine(), 0, 1);
coin_counter_w(field.machine(), 0, 0);
coin_counter_w(machine(), 0, 1);
coin_counter_w(machine(), 0, 0);
cputag_set_input_line(field.machine(), "maincpu", INPUT_LINE_RESET, PULSE_LINE);
cputag_set_input_line(machine(), "maincpu", INPUT_LINE_RESET, PULSE_LINE);
/* simulate the coin switch being closed for a while */
field.machine().scheduler().timer_set(4 * field.machine().primary_screen->frame_period(), FUNC(clear_coin_status));
machine().scheduler().timer_set(4 * machine().primary_screen->frame_period(), FUNC(clear_coin_status));
}
}
#define PORT_COIN \
PORT_START(COIN_PORT_TAG) \
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_changed, NULL) \
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, vicdual_state,coin_changed, NULL) \
PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED )

View File

@ -289,11 +289,11 @@
*
*************************************/
static INPUT_CHANGED( service_switch )
INPUT_CHANGED_MEMBER(zaxxon_state::service_switch)
{
/* pressing the service switch sends an NMI */
if (newval)
cputag_set_input_line(field.machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
cputag_set_input_line(machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE);
}
@ -399,13 +399,11 @@ WRITE8_MEMBER(zaxxon_state::zaxxon_coin_enable_w)
}
static INPUT_CHANGED( zaxxon_coin_inserted )
INPUT_CHANGED_MEMBER(zaxxon_state::zaxxon_coin_inserted)
{
if (newval)
{
zaxxon_state *state = field.machine().driver_data<zaxxon_state>();
state->m_coin_status[(int)(FPTR)param] = state->m_coin_enable[(int)(FPTR)param];
m_coin_status[(int)(FPTR)param] = m_coin_enable[(int)(FPTR)param];
}
}
@ -517,12 +515,12 @@ static INPUT_PORTS_START( zaxxon )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)2)
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(zaxxon_coin_inserted, (void *)0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(zaxxon_coin_inserted, (void *)1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED(zaxxon_coin_inserted, (void *)2)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, (void *)0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, (void *)1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, (void *)2)
PORT_START("SERVICESW")
PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_HIGH ) PORT_CHANGED(service_switch, 0)
PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_HIGH ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,service_switch, 0)
PORT_START("DSW02")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:!1,!2")
@ -706,12 +704,12 @@ static INPUT_PORTS_START( razmataz )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)2)
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(zaxxon_coin_inserted, (void *)0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED(zaxxon_coin_inserted, (void *)1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED(zaxxon_coin_inserted, (void *)2)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, (void *)0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, (void *)1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, (void *)2)
PORT_START("SERVICESW")
PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_HIGH ) PORT_CHANGED(service_switch, 0)
PORT_SERVICE_NO_TOGGLE( 0x01, IP_ACTIVE_HIGH ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,service_switch, 0)
PORT_START("DSW02")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Bonus_Life ) )

View File

@ -102,6 +102,7 @@ public:
DECLARE_WRITE8_MEMBER(profpac_videoram_w);
DECLARE_CUSTOM_INPUT_MEMBER(ebases_trackball_r);
DECLARE_CUSTOM_INPUT_MEMBER(demndragn_joystick_r);
DECLARE_INPUT_CHANGED_MEMBER(spacezap_monitor);
};

View File

@ -55,6 +55,8 @@ public:
DECLARE_WRITE8_MEMBER(astrof_audio_2_w);
DECLARE_WRITE8_MEMBER(spfghmk2_audio_w);
DECLARE_WRITE8_MEMBER(tomahawk_audio_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
DECLARE_INPUT_CHANGED_MEMBER(service_coin_inserted);
};
/*----------- defined in audio/astrof.c -----------*/

View File

@ -37,6 +37,7 @@ public:
DECLARE_WRITE8_MEMBER(brkthru_bgram_w);
DECLARE_WRITE8_MEMBER(brkthru_fgram_w);
DECLARE_WRITE8_MEMBER(brkthru_1800_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -70,6 +70,9 @@ public:
DECLARE_WRITE8_MEMBER(bnj_video_control_w);
DECLARE_WRITE8_MEMBER(zoar_video_control_w);
DECLARE_WRITE8_MEMBER(disco_video_control_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted_irq_hi);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted_irq_lo);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted_nmi_lo);
};

View File

@ -59,6 +59,8 @@ public:
DECLARE_WRITE8_MEMBER(bwing_scrollram_w);
DECLARE_WRITE8_MEMBER(bwing_scrollreg_w);
DECLARE_WRITE8_MEMBER(bwing_paletteram_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
DECLARE_INPUT_CHANGED_MEMBER(tilt_pressed);
};

View File

@ -29,6 +29,7 @@ public:
scc68070_regs_t m_scc68070_regs;
mcd212_regs_t m_mcd212_regs;
mcd212_ab_t m_mcd212_ab;
DECLARE_INPUT_CHANGED_MEMBER(mcu_input);
};
/*----------- debug defines -----------*/

View File

@ -27,6 +27,7 @@ public:
UINT8 m_irq_mask;
DECLARE_WRITE8_MEMBER(cheekyms_port_40_w);
DECLARE_WRITE8_MEMBER(cheekyms_port_80_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -71,6 +71,7 @@ public:
UINT8 *m_pcbram;
UINT8 *m_charram;
DECLARE_CUSTOM_INPUT_MEMBER(cdp1869_pcb_r);
DECLARE_INPUT_CHANGED_MEMBER(ef_w);
};
class draco_state : public cidelsa_state

View File

@ -50,6 +50,7 @@ public:
DECLARE_WRITE8_MEMBER(cinemat_vector_control_w);
DECLARE_WRITE8_MEMBER(cinemat_sound_control_w);
DECLARE_WRITE8_MEMBER(qb3_sound_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -51,6 +51,11 @@ public:
DECLARE_WRITE8_MEMBER(flip_screen_w);
DECLARE_WRITE8_MEMBER(cosmic_color_register_w);
DECLARE_WRITE8_MEMBER(cosmic_background_enable_w);
DECLARE_INPUT_CHANGED_MEMBER(panic_coin_inserted);
DECLARE_INPUT_CHANGED_MEMBER(cosmica_coin_inserted);
DECLARE_INPUT_CHANGED_MEMBER(cosmicg_coin_inserted);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted_irq0);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted_nmi);
};

View File

@ -85,6 +85,8 @@ public:
DECLARE_WRITE8_MEMBER(control_w);
DECLARE_WRITE8_MEMBER(volume_dac_w);
DECLARE_WRITE8_MEMBER(esripsys_bg_intensity_w);
DECLARE_INPUT_CHANGED_MEMBER(keypad_interrupt);
DECLARE_INPUT_CHANGED_MEMBER(coin_interrupt);
};

View File

@ -51,6 +51,7 @@ public:
DECLARE_WRITE8_MEMBER(exerion_video_latch_w);
DECLARE_READ8_MEMBER(exerion_video_timing_r);
DECLARE_CUSTOM_INPUT_MEMBER(exerion_controls_r);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -53,6 +53,7 @@ public:
DECLARE_CUSTOM_INPUT_MEMBER(firq_beam_r);
DECLARE_CUSTOM_INPUT_MEMBER(firq_vblank_r);
DECLARE_CUSTOM_INPUT_MEMBER(hitnmiss_button1_r);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -38,6 +38,8 @@ public:
DECLARE_WRITE8_MEMBER(exprraid_bgselect_w);
DECLARE_WRITE8_MEMBER(exprraid_scrollx_w);
DECLARE_WRITE8_MEMBER(exprraid_scrolly_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted_deco16);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted_nmi);
};

View File

@ -59,6 +59,7 @@ public:
DECLARE_READ8_MEMBER(e300_r);
DECLARE_WRITE8_MEMBER(ee00_w);
DECLARE_WRITE8_MEMBER(fcombat_videoreg_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -57,6 +57,7 @@ public:
DECLARE_WRITE8_MEMBER(firetrap_bg1_scrolly_w);
DECLARE_WRITE8_MEMBER(firetrap_bg2_scrollx_w);
DECLARE_WRITE8_MEMBER(firetrap_bg2_scrolly_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -77,6 +77,9 @@ public:
DECLARE_CUSTOM_INPUT_MEMBER(skid_r);
DECLARE_CUSTOM_INPUT_MEMBER(crash_r);
DECLARE_CUSTOM_INPUT_MEMBER(gear_r);
DECLARE_INPUT_CHANGED_MEMBER(service_mode_switch_changed);
DECLARE_INPUT_CHANGED_MEMBER(firetrk_horn_changed);
DECLARE_INPUT_CHANGED_MEMBER(gear_changed);
};

View File

@ -27,6 +27,7 @@ public:
DECLARE_WRITE8_MEMBER(flower_bg0ram_w);
DECLARE_WRITE8_MEMBER(flower_bg1ram_w);
DECLARE_WRITE8_MEMBER(flower_flipscreen_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -144,6 +144,7 @@ public:
DECLARE_WRITE8_MEMBER(tenspot_unk_e000_w);
DECLARE_WRITE8_MEMBER(artic_gfxbank_w);
DECLARE_READ8_MEMBER(tenspot_dsw_read);
DECLARE_INPUT_CHANGED_MEMBER(gmgalax_game_changed);
};

View File

@ -32,6 +32,8 @@ public:
DECLARE_WRITE8_MEMBER(kopunch_scroll_x_w);
DECLARE_WRITE8_MEMBER(kopunch_scroll_y_w);
DECLARE_WRITE8_MEMBER(kopunch_gfxbank_w);
DECLARE_INPUT_CHANGED_MEMBER(left_coin_inserted);
DECLARE_INPUT_CHANGED_MEMBER(right_coin_inserted);
};
/*----------- defined in video/kopunch.c -----------*/

View File

@ -53,6 +53,8 @@ public:
DECLARE_WRITE8_MEMBER(sraider_io_w);
DECLARE_CUSTOM_INPUT_MEMBER(ladybug_p1_control_r);
DECLARE_CUSTOM_INPUT_MEMBER(ladybug_p2_control_r);
DECLARE_INPUT_CHANGED_MEMBER(coin1_inserted);
DECLARE_INPUT_CHANGED_MEMBER(coin2_inserted);
};

View File

@ -42,6 +42,7 @@ public:
DECLARE_WRITE8_MEMBER(lasso_video_control_w);
DECLARE_WRITE8_MEMBER(wwjgtin_video_control_w);
DECLARE_WRITE8_MEMBER(pinbo_video_control_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -72,6 +72,7 @@ public:
DECLARE_WRITE8_MEMBER(m10_colorram_w);
DECLARE_WRITE8_MEMBER(m10_chargen_w);
DECLARE_WRITE8_MEMBER(m15_chargen_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -39,6 +39,7 @@ public:
DECLARE_READ8_MEMBER(madalien_sound_command_r);
DECLARE_WRITE8_MEMBER(madalien_videoram_w);
DECLARE_WRITE8_MEMBER(madalien_charram_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -37,6 +37,7 @@ public:
DECLARE_READ8_MEMBER(audio_hardware_r);
DECLARE_WRITE8_MEMBER(meadows_videoram_w);
DECLARE_WRITE8_MEMBER(meadows_spriteram_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -39,6 +39,7 @@ public:
DECLARE_WRITE8_MEMBER(metlclsh_gfxbank_w);
DECLARE_WRITE8_MEMBER(metlclsh_bgram_w);
DECLARE_WRITE8_MEMBER(metlclsh_fgram_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -33,6 +33,7 @@ public:
DECLARE_WRITE8_MEMBER(irq_clear_w);
DECLARE_WRITE8_MEMBER(mystston_ay8910_select_w);
DECLARE_WRITE8_MEMBER(mystston_video_control_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -23,6 +23,7 @@ public:
DECLARE_WRITE8_MEMBER(trvmstr_questions_w);
DECLARE_WRITE8_MEMBER(naughtyb_videoreg_w);
DECLARE_WRITE8_MEMBER(popflame_videoreg_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -71,6 +71,7 @@ public:
DECLARE_READ8_MEMBER(n7751_rom_r);
DECLARE_READ8_MEMBER(n7751_command_r);
DECLARE_READ8_MEMBER(n7751_t1_r);
DECLARE_INPUT_CHANGED_MEMBER(service_switch);
};

View File

@ -41,6 +41,7 @@ public:
DECLARE_WRITE8_MEMBER(zektor2_sh_w);
DECLARE_WRITE8_MEMBER(spacfury1_sh_w);
DECLARE_WRITE8_MEMBER(spacfury2_sh_w);
DECLARE_INPUT_CHANGED_MEMBER(service_switch);
};

View File

@ -16,6 +16,7 @@ public:
DECLARE_WRITE8_MEMBER(shootout_coin_counter_w);
DECLARE_WRITE8_MEMBER(shootout_videoram_w);
DECLARE_WRITE8_MEMBER(shootout_textram_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -26,6 +26,7 @@ public:
device_t *m_maincpu;
DECLARE_READ8_MEMBER(skyfox_vregs_r);
DECLARE_WRITE8_MEMBER(skyfox_vregs_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};
/*----------- defined in video/skyfox.c -----------*/

View File

@ -42,6 +42,7 @@ public:
DECLARE_WRITE8_MEMBER(satansat_backcolor_w);
DECLARE_CUSTOM_INPUT_MEMBER(snk6502_music0_r);
DECLARE_CUSTOM_INPUT_MEMBER(sasuke_count_r);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -25,6 +25,7 @@ public:
DECLARE_WRITE8_MEMBER(ssozumo_paletteram_w);
DECLARE_WRITE8_MEMBER(ssozumo_scroll_w);
DECLARE_WRITE8_MEMBER(ssozumo_flipscreen_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -21,6 +21,7 @@ public:
DECLARE_WRITE8_MEMBER(tagteam_mirrorcolorram_w);
DECLARE_WRITE8_MEMBER(tagteam_control_w);
DECLARE_WRITE8_MEMBER(tagteam_flipscreen_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -57,6 +57,7 @@ public:
DECLARE_WRITE16_MEMBER(realpunc_video_ctrl_w);
DECLARE_READ16_MEMBER(tc0180vcu_framebuffer_word_r);
DECLARE_WRITE16_MEMBER(tc0180vcu_framebuffer_word_w);
DECLARE_INPUT_CHANGED_MEMBER(realpunc_sensor);
};

View File

@ -23,6 +23,7 @@ public:
DECLARE_WRITE8_MEMBER(tankbatt_coin_counter_w);
DECLARE_WRITE8_MEMBER(tankbatt_coin_lockout_w);
DECLARE_WRITE8_MEMBER(tankbatt_videoram_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -22,6 +22,7 @@ public:
DECLARE_WRITE8_MEMBER(tryout_vram_w);
DECLARE_WRITE8_MEMBER(tryout_vram_bankswitch_w);
DECLARE_WRITE8_MEMBER(tryout_flipscreen_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
};

View File

@ -71,6 +71,7 @@ public:
DECLARE_CUSTOM_INPUT_MEMBER(vicdual_get_timer_value);
DECLARE_CUSTOM_INPUT_MEMBER(brdrline_lives);
DECLARE_CUSTOM_INPUT_MEMBER(samurai_protection_r);
DECLARE_INPUT_CHANGED_MEMBER(coin_changed);
};

View File

@ -50,6 +50,8 @@ public:
DECLARE_WRITE8_MEMBER(congo_sprite_custom_w);
DECLARE_CUSTOM_INPUT_MEMBER(razmataz_dial_r);
DECLARE_CUSTOM_INPUT_MEMBER(zaxxon_coin_r);
DECLARE_INPUT_CHANGED_MEMBER(service_switch);
DECLARE_INPUT_CHANGED_MEMBER(zaxxon_coin_inserted);
};

View File

@ -889,16 +889,13 @@ static void check_palette(running_machine &machine)
newset = input_port_read_direct(port);
if (newset != state->m_vidhw)
{
const UINT8 *color_prom;
state->m_vidhw = newset;
switch (newset)
{
case 0x00:
color_prom = machine.region("proms")->base();
PALETTE_INIT_CALL(radarscp);
break;
case 0x01:
color_prom = machine.region("proms")->base();
PALETTE_INIT_CALL(dkong2b);
break;
}