mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
thief: Interrupt modernization; use MCFG_SCREEN_RAW_PARAMS (nw)
This commit is contained in:
parent
83dd83b47a
commit
1b55a2cde9
@ -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 */
|
/* SLAM switch causes an NMI if it's pressed */
|
||||||
if( (ioport("P2")->read() & 0x10) == 0 )
|
m_maincpu->set_input_line(INPUT_LINE_NMI, state ? CLEAR_LINE : ASSERT_LINE);
|
||||||
device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
}
|
||||||
else
|
|
||||||
device.execute().set_input_line(0, HOLD_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( 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( 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( 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( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
||||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) 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( 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( 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( 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( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
PORT_BIT( 0x80, 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( 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( 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( 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( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
||||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
|
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_ADD("maincpu", Z80, XTAL_8MHz/2)
|
||||||
MCFG_CPU_PROGRAM_MAP(thief_main_map)
|
MCFG_CPU_PROGRAM_MAP(thief_main_map)
|
||||||
MCFG_CPU_IO_MAP(io_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_DEVICE_ADD("ppi", I8255A, 0)
|
||||||
MCFG_I8255_OUT_PORTA_CB(WRITE8(thief_state, thief_input_select_w))
|
MCFG_I8255_OUT_PORTA_CB(WRITE8(thief_state, thief_input_select_w))
|
||||||
@ -400,16 +403,13 @@ static MACHINE_CONFIG_START( thief )
|
|||||||
|
|
||||||
// video hardware
|
// video hardware
|
||||||
MCFG_SCREEN_ADD("screen", RASTER)
|
MCFG_SCREEN_ADD("screen", RASTER)
|
||||||
MCFG_SCREEN_REFRESH_RATE(60)
|
MCFG_SCREEN_RAW_PARAMS(XTAL_20MHz/4, 320, 0, 256, 272, 0, 256)
|
||||||
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_UPDATE_DRIVER(thief_state, screen_update_thief)
|
MCFG_SCREEN_UPDATE_DRIVER(thief_state, screen_update_thief)
|
||||||
MCFG_SCREEN_PALETTE("palette")
|
MCFG_SCREEN_PALETTE("palette")
|
||||||
|
|
||||||
MCFG_DEVICE_ADD("tms", TMS9927, XTAL_20MHz/4)
|
MCFG_DEVICE_ADD("tms", TMS9927, XTAL_20MHz/4)
|
||||||
MCFG_TMS9927_CHAR_WIDTH(8)
|
MCFG_TMS9927_CHAR_WIDTH(8)
|
||||||
|
MCFG_TMS9927_VSYN_CALLBACK(ASSERTLINE("maincpu", 0))
|
||||||
MCFG_PALETTE_ADD("palette", 16)
|
MCFG_PALETTE_ADD("palette", 16)
|
||||||
|
|
||||||
// sound hardware
|
// sound hardware
|
||||||
|
@ -43,7 +43,8 @@ public:
|
|||||||
DECLARE_DRIVER_INIT(thief);
|
DECLARE_DRIVER_INIT(thief);
|
||||||
virtual void video_start() override;
|
virtual void video_start() override;
|
||||||
uint32_t screen_update_thief(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
uint32_t screen_update_thief(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
INTERRUPT_GEN_MEMBER(thief_interrupt);
|
DECLARE_WRITE_LINE_MEMBER(slam_w);
|
||||||
|
IRQ_CALLBACK_MEMBER(iack);
|
||||||
uint16_t fetch_image_addr( coprocessor_t &thief_coprocessor );
|
uint16_t fetch_image_addr( coprocessor_t &thief_coprocessor );
|
||||||
void tape_set_audio( int track, int bOn );
|
void tape_set_audio( int track, int bOn );
|
||||||
void tape_set_motor( int bOn );
|
void tape_set_motor( int bOn );
|
||||||
|
Loading…
Reference in New Issue
Block a user