diff options
Diffstat (limited to 'src/mame/drivers/thief.cpp')
-rw-r--r-- | src/mame/drivers/thief.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mame/drivers/thief.cpp b/src/mame/drivers/thief.cpp index 633257fe6f1..788330d5704 100644 --- a/src/mame/drivers/thief.cpp +++ b/src/mame/drivers/thief.cpp @@ -34,13 +34,16 @@ Credits: -INTERRUPT_GEN_MEMBER(thief_state::thief_interrupt) +WRITE_LINE_MEMBER(thief_state::slam_w) { /* SLAM switch causes an NMI if it's pressed */ - if( (ioport("P2")->read() & 0x10) == 0 ) - device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); - else - device.execute().set_input_line(0, HOLD_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, state ? CLEAR_LINE : ASSERT_LINE); +} + +IRQ_CALLBACK_MEMBER(thief_state::iack) +{ + m_maincpu->set_input_line(0, CLEAR_LINE); + return 0xff; } /**********************************************************/ @@ -213,7 +216,7 @@ static INPUT_PORTS_START( sharkatt ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_TILT ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_TILT ) PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, thief_state, slam_w) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL @@ -282,7 +285,7 @@ static INPUT_PORTS_START( thief ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_TILT ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_TILT ) PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, thief_state, slam_w) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -349,7 +352,7 @@ static INPUT_PORTS_START( natodef ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_TILT ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_TILT ) PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, thief_state, slam_w) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -391,7 +394,7 @@ static MACHINE_CONFIG_START( thief ) MCFG_CPU_ADD("maincpu", Z80, XTAL_8MHz/2) MCFG_CPU_PROGRAM_MAP(thief_main_map) MCFG_CPU_IO_MAP(io_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", thief_state, thief_interrupt) + MCFG_CPU_IRQ_ACKNOWLEDGE_DRIVER(thief_state, iack) MCFG_DEVICE_ADD("ppi", I8255A, 0) MCFG_I8255_OUT_PORTA_CB(WRITE8(thief_state, thief_input_select_w)) @@ -400,16 +403,13 @@ static MACHINE_CONFIG_START( thief ) // video hardware MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_SIZE(32*8, 32*8) - MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) + MCFG_SCREEN_RAW_PARAMS(XTAL_20MHz/4, 320, 0, 256, 272, 0, 256) MCFG_SCREEN_UPDATE_DRIVER(thief_state, screen_update_thief) MCFG_SCREEN_PALETTE("palette") MCFG_DEVICE_ADD("tms", TMS9927, XTAL_20MHz/4) MCFG_TMS9927_CHAR_WIDTH(8) - + MCFG_TMS9927_VSYN_CALLBACK(ASSERTLINE("maincpu", 0)) MCFG_PALETTE_ADD("palette", 16) // sound hardware |