ondra.cpp, primo.cpp: Replace MCFG_CPU_VBLANK_INT with line callbacks (nw)

This commit is contained in:
AJR 2018-03-28 21:04:50 -04:00
parent 1e5666734d
commit 28e8cc6674
5 changed files with 10 additions and 10 deletions

View File

@ -114,9 +114,10 @@ static INPUT_PORTS_START( ondra )
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("NMI") PORT_CODE(KEYCODE_ESC)
INPUT_PORTS_END
INTERRUPT_GEN_MEMBER(ondra_state::ondra_interrupt)
WRITE_LINE_MEMBER(ondra_state::vblank_irq)
{
device.execute().set_input_line(0, HOLD_LINE);
if (state)
m_maincpu->set_input_line(0, HOLD_LINE);
}
/* Machine driver */
@ -125,8 +126,6 @@ MACHINE_CONFIG_START(ondra_state::ondra)
MCFG_CPU_ADD("maincpu", Z80, 2000000)
MCFG_CPU_PROGRAM_MAP(ondra_mem)
MCFG_CPU_IO_MAP(ondra_io)
MCFG_CPU_VBLANK_INT_DRIVER("screen", ondra_state, ondra_interrupt)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@ -136,6 +135,7 @@ MACHINE_CONFIG_START(ondra_state::ondra)
MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 256-1)
MCFG_SCREEN_UPDATE_DRIVER(ondra_state, screen_update_ondra)
MCFG_SCREEN_PALETTE("palette")
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(ondra_state, vblank_irq))
MCFG_PALETTE_ADD_MONOCHROME("palette")

View File

@ -250,7 +250,6 @@ MACHINE_CONFIG_START(primo_state::primoa32)
MCFG_CPU_ADD( "maincpu", Z80, 2500000 )
MCFG_CPU_PROGRAM_MAP( primo32_mem)
MCFG_CPU_IO_MAP( primoa_port)
MCFG_CPU_VBLANK_INT_DRIVER("screen", primo_state, primo_vblank_interrupt)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@ -260,6 +259,7 @@ MACHINE_CONFIG_START(primo_state::primoa32)
MCFG_SCREEN_VISIBLE_AREA( 0, 256-1, 0, 192-1 )
MCFG_SCREEN_UPDATE_DRIVER(primo_state, screen_update_primo)
MCFG_SCREEN_PALETTE("palette")
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(primo_state, vblank_irq))
MCFG_PALETTE_ADD_MONOCHROME("palette")

View File

@ -39,7 +39,7 @@ public:
DECLARE_WRITE8_MEMBER(ondra_port_09_w);
DECLARE_WRITE8_MEMBER(ondra_port_0a_w);
uint32_t screen_update_ondra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(ondra_interrupt);
DECLARE_WRITE_LINE_MEMBER(vblank_irq);
TIMER_CALLBACK_MEMBER(nmi_check_callback);
void ondra(machine_config &config);

View File

@ -56,7 +56,7 @@ protected:
virtual void machine_start() override;
DECLARE_MACHINE_RESET(primob);
uint32_t screen_update_primo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(primo_vblank_interrupt);
DECLARE_WRITE_LINE_MEMBER(vblank_irq);
void primo_draw_scanline(bitmap_ind16 &bitmap, int primo_scanline);
void primo_update_memory();
void primo_common_driver_init (primo_state *state);

View File

@ -27,10 +27,10 @@
*******************************************************************************/
INTERRUPT_GEN_MEMBER(primo_state::primo_vblank_interrupt)
WRITE_LINE_MEMBER(primo_state::vblank_irq)
{
if (m_nmi)
device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
if (state && m_nmi)
m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
/*******************************************************************************