summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-03-28 21:04:50 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-03-28 21:04:50 -0400
commit28e8cc6674b643406257bb98af0f8e4037cfa38a (patch)
tree15e2f7f612d89e69101b1c3fe6d81cad45760d5c
parent1e5666734dd35ad50a86c816f3f6747cd65739f3 (diff)
ondra.cpp, primo.cpp: Replace MCFG_CPU_VBLANK_INT with line callbacks (nw)
-rw-r--r--src/mame/drivers/ondra.cpp8
-rw-r--r--src/mame/drivers/primo.cpp2
-rw-r--r--src/mame/includes/ondra.h2
-rw-r--r--src/mame/includes/primo.h2
-rw-r--r--src/mame/machine/primo.cpp6
5 files changed, 10 insertions, 10 deletions
diff --git a/src/mame/drivers/ondra.cpp b/src/mame/drivers/ondra.cpp
index 14c73cfabec..7e59755e6e2 100644
--- a/src/mame/drivers/ondra.cpp
+++ b/src/mame/drivers/ondra.cpp
@@ -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")
diff --git a/src/mame/drivers/primo.cpp b/src/mame/drivers/primo.cpp
index 9dc3f5d31ed..9fa8669b9cc 100644
--- a/src/mame/drivers/primo.cpp
+++ b/src/mame/drivers/primo.cpp
@@ -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")
diff --git a/src/mame/includes/ondra.h b/src/mame/includes/ondra.h
index 7d630a570ec..e19db297b92 100644
--- a/src/mame/includes/ondra.h
+++ b/src/mame/includes/ondra.h
@@ -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);
diff --git a/src/mame/includes/primo.h b/src/mame/includes/primo.h
index 3624b6fc8f3..4e8c74c7f9c 100644
--- a/src/mame/includes/primo.h
+++ b/src/mame/includes/primo.h
@@ -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);
diff --git a/src/mame/machine/primo.cpp b/src/mame/machine/primo.cpp
index 1f78baa3ada..ef94752adba 100644
--- a/src/mame/machine/primo.cpp
+++ b/src/mame/machine/primo.cpp
@@ -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);
}
/*******************************************************************************