compgolf.cpp, liberate.cpp: Replace MCFG_CPU_VBLANK_INT with line callbacks (nw)

This commit is contained in:
AJR 2018-03-28 20:26:41 -04:00
parent 95dcb83844
commit e4d0df65eb
3 changed files with 20 additions and 18 deletions

View File

@ -227,8 +227,6 @@ MACHINE_CONFIG_START(compgolf_state::compgolf)
/* basic machine hardware */ /* basic machine hardware */
MCFG_CPU_ADD("maincpu", MC6809E, 2000000) // HD68B09EP MCFG_CPU_ADD("maincpu", MC6809E, 2000000) // HD68B09EP
MCFG_CPU_PROGRAM_MAP(compgolf_map) MCFG_CPU_PROGRAM_MAP(compgolf_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", compgolf_state, nmi_line_pulse)
/* video hardware */ /* video hardware */
MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_ADD("screen", RASTER)
@ -238,6 +236,7 @@ MACHINE_CONFIG_START(compgolf_state::compgolf)
MCFG_SCREEN_VISIBLE_AREA(1*8, 32*8-1, 1*8, 31*8-1) MCFG_SCREEN_VISIBLE_AREA(1*8, 32*8-1, 1*8, 31*8-1)
MCFG_SCREEN_UPDATE_DRIVER(compgolf_state, screen_update_compgolf) MCFG_SCREEN_UPDATE_DRIVER(compgolf_state, screen_update_compgolf)
MCFG_SCREEN_PALETTE("palette") MCFG_SCREEN_PALETTE("palette")
MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI))
MCFG_PALETTE_ADD("palette", 0x100) MCFG_PALETTE_ADD("palette", 0x100)
MCFG_PALETTE_INIT_OWNER(compgolf_state, compgolf) MCFG_PALETTE_INIT_OWNER(compgolf_state, compgolf)

View File

@ -686,26 +686,30 @@ GFXDECODE_END
* *
*************************************/ *************************************/
INTERRUPT_GEN_MEMBER(liberate_state::deco16_interrupt) WRITE_LINE_MEMBER(liberate_state::deco16_interrupt)
{ {
int p = ~ioport("IN3")->read(); if (state)
if ((p & 0x43) && !m_latch)
{ {
device.execute().set_input_line(DECO16_IRQ_LINE, ASSERT_LINE); int p = ~ioport("IN3")->read();
m_latch = 1; if ((p & 0x43) && !m_latch)
} {
else m_maincpu->set_input_line(DECO16_IRQ_LINE, ASSERT_LINE);
{ m_latch = 1;
if (!(p & 0x43)) }
m_latch = 0; else
{
if (!(p & 0x43))
m_latch = 0;
}
} }
} }
#if 0 #if 0
INTERRUPT_GEN_MEMBER(liberate_state::prosport_interrupt) WRITE_LINE_MEMBER(liberate_state::prosport_interrupt)
{ {
/* ??? */ /* ??? */
device.execute().set_input_line(DECO16_IRQ_LINE, ASSERT_LINE); if (state)
m_maincpu->set_input_line(DECO16_IRQ_LINE, ASSERT_LINE);
} }
#endif #endif
@ -743,7 +747,6 @@ MACHINE_CONFIG_START(liberate_state::liberate_base)
MCFG_CPU_ADD("maincpu",DECO16, 2000000) MCFG_CPU_ADD("maincpu",DECO16, 2000000)
MCFG_CPU_PROGRAM_MAP(liberate_map) MCFG_CPU_PROGRAM_MAP(liberate_map)
MCFG_CPU_IO_MAP(deco16_io_map) MCFG_CPU_IO_MAP(deco16_io_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", liberate_state, deco16_interrupt)
MCFG_CPU_ADD("audiocpu",DECO_222, 1500000) /* is it a real 222 (M6502 with bitswapped opcodes), or the same thing in external logic? */ MCFG_CPU_ADD("audiocpu",DECO_222, 1500000) /* is it a real 222 (M6502 with bitswapped opcodes), or the same thing in external logic? */
MCFG_CPU_PROGRAM_MAP(liberate_sound_map) MCFG_CPU_PROGRAM_MAP(liberate_sound_map)
@ -762,6 +765,7 @@ MACHINE_CONFIG_START(liberate_state::liberate_base)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
MCFG_SCREEN_UPDATE_DRIVER(liberate_state, screen_update_liberate) MCFG_SCREEN_UPDATE_DRIVER(liberate_state, screen_update_liberate)
MCFG_SCREEN_PALETTE("palette") MCFG_SCREEN_PALETTE("palette")
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(liberate_state, deco16_interrupt))
MCFG_GFXDECODE_ADD("gfxdecode", "palette", liberate) MCFG_GFXDECODE_ADD("gfxdecode", "palette", liberate)
MCFG_PALETTE_ADD("palette", 33) MCFG_PALETTE_ADD("palette", 33)
@ -793,7 +797,6 @@ MACHINE_CONFIG_START(liberate_state::liberatb)
/* basic machine hardware */ /* basic machine hardware */
MCFG_CPU_REPLACE("maincpu", M6502, 2000000) MCFG_CPU_REPLACE("maincpu", M6502, 2000000)
MCFG_CPU_PROGRAM_MAP(liberatb_map) MCFG_CPU_PROGRAM_MAP(liberatb_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", liberate_state, deco16_interrupt)
MACHINE_CONFIG_END MACHINE_CONFIG_END
MACHINE_CONFIG_START(liberate_state::boomrang) MACHINE_CONFIG_START(liberate_state::boomrang)
@ -834,7 +837,6 @@ MACHINE_CONFIG_START(liberate_state::prosport)
MCFG_CPU_ADD("maincpu", DECO16, 2000000) MCFG_CPU_ADD("maincpu", DECO16, 2000000)
MCFG_CPU_PROGRAM_MAP(prosport_map) MCFG_CPU_PROGRAM_MAP(prosport_map)
MCFG_CPU_IO_MAP(deco16_io_map) MCFG_CPU_IO_MAP(deco16_io_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", liberate_state, deco16_interrupt)
MCFG_CPU_ADD("audiocpu", DECO_222, 1500000/2) /* is it a real 222 (M6502 with bitswapped opcodes), or the same thing in external logic? */ MCFG_CPU_ADD("audiocpu", DECO_222, 1500000/2) /* is it a real 222 (M6502 with bitswapped opcodes), or the same thing in external logic? */
MCFG_CPU_PROGRAM_MAP(liberate_sound_map) MCFG_CPU_PROGRAM_MAP(liberate_sound_map)
@ -853,6 +855,7 @@ MACHINE_CONFIG_START(liberate_state::prosport)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
MCFG_SCREEN_UPDATE_DRIVER(liberate_state, screen_update_prosport) MCFG_SCREEN_UPDATE_DRIVER(liberate_state, screen_update_prosport)
MCFG_SCREEN_PALETTE("palette") MCFG_SCREEN_PALETTE("palette")
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(liberate_state, deco16_interrupt))
MCFG_GFXDECODE_ADD("gfxdecode", "palette", prosport) MCFG_GFXDECODE_ADD("gfxdecode", "palette", prosport)
MCFG_PALETTE_ADD("palette", 256) MCFG_PALETTE_ADD("palette", 256)

View File

@ -81,7 +81,7 @@ public:
uint32_t screen_update_prosport(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_prosport(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_boomrang(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_boomrang(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_prosoccr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_prosoccr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(deco16_interrupt); DECLARE_WRITE_LINE_MEMBER(deco16_interrupt);
void liberate_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); void liberate_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
void prosport_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); void prosport_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
void boomrang_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int pri ); void boomrang_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int pri );