summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-03-29 11:17:44 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-03-29 11:17:44 -0400
commit16125666f732199946c9634b399980f7783fc752 (patch)
tree6e44e1e7da3c0e316ec5f976813f80694b990bd6
parentd320e9e15620c54838f8b4e5c901a8748b13407d (diff)
Replace MCFG_CPU_VBLANK_INT with line callbacks in more Konami games (nw)
-rw-r--r--src/mame/drivers/88games.cpp8
-rw-r--r--src/mame/drivers/battlnts.cpp8
-rw-r--r--src/mame/drivers/bottom9.cpp8
-rw-r--r--src/mame/drivers/jailbrek.cpp8
-rw-r--r--src/mame/drivers/labyrunr.cpp8
-rw-r--r--src/mame/drivers/nemesis.cpp28
-rw-r--r--src/mame/drivers/rockrage.cpp8
-rw-r--r--src/mame/drivers/twin16.cpp19
-rw-r--r--src/mame/includes/88games.h2
-rw-r--r--src/mame/includes/battlnts.h2
-rw-r--r--src/mame/includes/bottom9.h2
-rw-r--r--src/mame/includes/jailbrek.h2
-rw-r--r--src/mame/includes/labyrunr.h2
-rw-r--r--src/mame/includes/nemesis.h4
-rw-r--r--src/mame/includes/rockrage.h2
-rw-r--r--src/mame/includes/twin16.h2
-rw-r--r--src/mame/video/twin16.cpp6
17 files changed, 52 insertions, 67 deletions
diff --git a/src/mame/drivers/88games.cpp b/src/mame/drivers/88games.cpp
index 098bf939c6b..c2b6e4965ef 100644
--- a/src/mame/drivers/88games.cpp
+++ b/src/mame/drivers/88games.cpp
@@ -26,10 +26,10 @@
*
*************************************/
-INTERRUPT_GEN_MEMBER(_88games_state::k88games_interrupt)
+WRITE_LINE_MEMBER(_88games_state::vblank_irq)
{
- if (m_k052109->is_irq_enabled())
- irq0_line_hold(device);
+ if (state && m_k052109->is_irq_enabled())
+ m_maincpu->set_input_line(0, HOLD_LINE);
}
READ8_MEMBER(_88games_state::bankedram_r)
@@ -309,7 +309,6 @@ MACHINE_CONFIG_START(_88games_state::_88games)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", KONAMI, 3000000) /* ? */
MCFG_CPU_PROGRAM_MAP(main_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", _88games_state, k88games_interrupt)
MCFG_KONAMICPU_LINE_CB(WRITE8(_88games_state, banking_callback))
MCFG_CPU_ADD("audiocpu", Z80, 3579545)
@@ -327,6 +326,7 @@ MACHINE_CONFIG_START(_88games_state::_88games)
MCFG_SCREEN_VISIBLE_AREA(12*8, (64-12)*8-1, 2*8, 30*8-1 )
MCFG_SCREEN_UPDATE_DRIVER(_88games_state, screen_update_88games)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(_88games_state, vblank_irq))
MCFG_PALETTE_ADD("palette", 2048)
MCFG_PALETTE_ENABLE_SHADOWS()
diff --git a/src/mame/drivers/battlnts.cpp b/src/mame/drivers/battlnts.cpp
index 7eb8bb3252a..ef6a652bfe2 100644
--- a/src/mame/drivers/battlnts.cpp
+++ b/src/mame/drivers/battlnts.cpp
@@ -31,10 +31,10 @@
*
*************************************/
-INTERRUPT_GEN_MEMBER(battlnts_state::battlnts_interrupt)
+WRITE_LINE_MEMBER(battlnts_state::vblank_irq)
{
- if (m_k007342->is_int_enabled())
- device.execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE);
+ if (state && m_k007342->is_int_enabled())
+ m_maincpu->set_input_line(HD6309_IRQ_LINE, HOLD_LINE);
}
WRITE8_MEMBER(battlnts_state::battlnts_sh_irqtrigger_w)
@@ -236,7 +236,6 @@ MACHINE_CONFIG_START(battlnts_state::battlnts)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", HD6309, XTAL(24'000'000) / 2 /* 3000000*4? */)
MCFG_CPU_PROGRAM_MAP(battlnts_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", battlnts_state, battlnts_interrupt)
MCFG_CPU_ADD("audiocpu", Z80, XTAL(24'000'000) / 6 /* 3579545? */)
MCFG_CPU_PROGRAM_MAP(battlnts_sound_map)
@@ -251,6 +250,7 @@ MACHINE_CONFIG_START(battlnts_state::battlnts)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(battlnts_state, screen_update_battlnts)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(battlnts_state, vblank_irq))
MCFG_GFXDECODE_ADD("gfxdecode", "palette", battlnts)
MCFG_PALETTE_ADD("palette", 128)
diff --git a/src/mame/drivers/bottom9.cpp b/src/mame/drivers/bottom9.cpp
index df28ae99552..be2272245a9 100644
--- a/src/mame/drivers/bottom9.cpp
+++ b/src/mame/drivers/bottom9.cpp
@@ -25,10 +25,10 @@
#include "speaker.h"
-INTERRUPT_GEN_MEMBER(bottom9_state::bottom9_interrupt)
+WRITE_LINE_MEMBER(bottom9_state::vblank_irq)
{
- if (m_k052109->is_irq_enabled())
- device.execute().set_input_line(0, HOLD_LINE);
+ if (state && m_k052109->is_irq_enabled())
+ m_maincpu->set_input_line(0, HOLD_LINE);
}
READ8_MEMBER(bottom9_state::k052109_051960_r)
@@ -305,7 +305,6 @@ MACHINE_CONFIG_START(bottom9_state::bottom9)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", HD6309E, XTAL(24'000'000) / 8) // 63C09E
MCFG_CPU_PROGRAM_MAP(main_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", bottom9_state, bottom9_interrupt)
MCFG_CPU_ADD("audiocpu", Z80, XTAL(3'579'545))
MCFG_CPU_PROGRAM_MAP(audio_map)
@@ -321,6 +320,7 @@ MACHINE_CONFIG_START(bottom9_state::bottom9)
MCFG_SCREEN_VISIBLE_AREA(14*8, (64-14)*8-1, 2*8, 30*8-1 )
MCFG_SCREEN_UPDATE_DRIVER(bottom9_state, screen_update_bottom9)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(bottom9_state, vblank_irq))
MCFG_PALETTE_ADD("palette", 1024)
MCFG_PALETTE_ENABLE_SHADOWS()
diff --git a/src/mame/drivers/jailbrek.cpp b/src/mame/drivers/jailbrek.cpp
index 52154e471ca..c492ed06f68 100644
--- a/src/mame/drivers/jailbrek.cpp
+++ b/src/mame/drivers/jailbrek.cpp
@@ -111,10 +111,10 @@ WRITE8_MEMBER(jailbrek_state::coin_w)
machine().bookkeeping().coin_counter_w(1, data & 0x02);
}
-INTERRUPT_GEN_MEMBER(jailbrek_state::interrupt)
+WRITE_LINE_MEMBER(jailbrek_state::vblank_irq)
{
- if (m_irq_enable)
- device.execute().set_input_line(0, HOLD_LINE);
+ if (state && m_irq_enable)
+ m_maincpu->set_input_line(0, HOLD_LINE);
}
INTERRUPT_GEN_MEMBER(jailbrek_state::interrupt_nmi)
@@ -266,7 +266,6 @@ MACHINE_CONFIG_START(jailbrek_state::jailbrek)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", KONAMI1, MASTER_CLOCK/12)
MCFG_CPU_PROGRAM_MAP(jailbrek_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", jailbrek_state, interrupt)
MCFG_CPU_PERIODIC_INT_DRIVER(jailbrek_state, interrupt_nmi, 500) /* ? */
MCFG_WATCHDOG_ADD("watchdog")
@@ -281,6 +280,7 @@ MACHINE_CONFIG_START(jailbrek_state::jailbrek)
MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/3, 396, 8, 248, 256, 16, 240)
MCFG_SCREEN_UPDATE_DRIVER(jailbrek_state, screen_update)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(jailbrek_state, vblank_irq))
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/labyrunr.cpp b/src/mame/drivers/labyrunr.cpp
index 5d2bf18ea63..66c3f595cdb 100644
--- a/src/mame/drivers/labyrunr.cpp
+++ b/src/mame/drivers/labyrunr.cpp
@@ -21,10 +21,10 @@
#include "speaker.h"
-INTERRUPT_GEN_MEMBER(labyrunr_state::labyrunr_vblank_interrupt)
+WRITE_LINE_MEMBER(labyrunr_state::vblank_irq)
{
- if (m_k007121->ctrlram_r(7) & 0x02)
- device.execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE);
+ if (state && (m_k007121->ctrlram_r(7) & 0x02))
+ m_maincpu->set_input_line(HD6309_IRQ_LINE, HOLD_LINE);
}
INTERRUPT_GEN_MEMBER(labyrunr_state::labyrunr_timer_interrupt)
@@ -169,7 +169,6 @@ MACHINE_CONFIG_START(labyrunr_state::labyrunr)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", HD6309, 3000000*4) /* 24MHz/8? */
MCFG_CPU_PROGRAM_MAP(labyrunr_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", labyrunr_state, labyrunr_vblank_interrupt)
MCFG_CPU_PERIODIC_INT_DRIVER(labyrunr_state, labyrunr_timer_interrupt, 4*60)
MCFG_WATCHDOG_ADD("watchdog")
@@ -182,6 +181,7 @@ MACHINE_CONFIG_START(labyrunr_state::labyrunr)
MCFG_SCREEN_VISIBLE_AREA(0*8, 35*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(labyrunr_state, screen_update_labyrunr)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(labyrunr_state, vblank_irq))
MCFG_GFXDECODE_ADD("gfxdecode", "palette", labyrunr)
MCFG_PALETTE_ADD("palette", 2*8*16*16)
diff --git a/src/mame/drivers/nemesis.cpp b/src/mame/drivers/nemesis.cpp
index 50d0f5dc630..e1589cd380a 100644
--- a/src/mame/drivers/nemesis.cpp
+++ b/src/mame/drivers/nemesis.cpp
@@ -66,16 +66,16 @@ So this is the correct behavior of real hardware, not an emulation bug.
#include "konamigt.lh"
-INTERRUPT_GEN_MEMBER(nemesis_state::nemesis_interrupt)
+WRITE_LINE_MEMBER(nemesis_state::nemesis_vblank_irq)
{
- if (m_irq_on)
- device.execute().set_input_line(1, HOLD_LINE);
+ if (state && m_irq_on)
+ m_maincpu->set_input_line(1, HOLD_LINE);
}
-INTERRUPT_GEN_MEMBER(nemesis_state::blkpnthr_interrupt)
+WRITE_LINE_MEMBER(nemesis_state::blkpnthr_vblank_irq)
{
- if (m_irq_on)
- device.execute().set_input_line(2, HOLD_LINE);
+ if (state && m_irq_on)
+ m_maincpu->set_input_line(2, HOLD_LINE);
}
TIMER_DEVICE_CALLBACK_MEMBER(nemesis_state::konamigt_interrupt)
@@ -1464,7 +1464,6 @@ MACHINE_CONFIG_START(nemesis_state::nemesis)
MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216 MHz? */
// 14318180/2, /* From schematics, should be accurate */
MCFG_CPU_PROGRAM_MAP(nemesis_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", nemesis_state, nemesis_interrupt)
MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* From schematics, should be accurate */
MCFG_CPU_PROGRAM_MAP(sound_map) /* fixed */
@@ -1489,6 +1488,7 @@ MACHINE_CONFIG_START(nemesis_state::nemesis)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(nemesis_state, screen_update_nemesis)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(nemesis_state, nemesis_vblank_irq))
MCFG_GFXDECODE_ADD("gfxdecode", "palette", nemesis)
MCFG_PALETTE_ADD("palette", 2048)
@@ -1534,7 +1534,6 @@ MACHINE_CONFIG_START(nemesis_state::gx400)
MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
MCFG_CPU_PROGRAM_MAP(gx400_sound_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", nemesis_state, nmi_line_pulse) /* interrupts are triggered by the main CPU */
MCFG_DEVICE_ADD("outlatch", LS259, 0)
MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(nemesis_state, coin1_lockout_w))
@@ -1558,6 +1557,7 @@ MACHINE_CONFIG_START(nemesis_state::gx400)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(nemesis_state, screen_update_nemesis)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("audiocpu", INPUT_LINE_NMI))
MCFG_GFXDECODE_ADD("gfxdecode", "palette", nemesis)
MCFG_PALETTE_ADD("palette", 2048)
@@ -1674,7 +1674,6 @@ MACHINE_CONFIG_START(nemesis_state::rf2_gx400)
MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
MCFG_CPU_PROGRAM_MAP(gx400_sound_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", nemesis_state, nmi_line_pulse) /* interrupts are triggered by the main CPU */
MCFG_DEVICE_ADD("outlatch", LS259, 0)
MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(nemesis_state, coin1_lockout_w))
@@ -1698,6 +1697,7 @@ MACHINE_CONFIG_START(nemesis_state::rf2_gx400)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(nemesis_state, screen_update_nemesis)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("audiocpu", INPUT_LINE_NMI))
MCFG_GFXDECODE_ADD("gfxdecode", "palette", nemesis)
MCFG_PALETTE_ADD("palette", 2048)
@@ -1743,7 +1743,6 @@ MACHINE_CONFIG_START(nemesis_state::salamand)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216MHz */
MCFG_CPU_PROGRAM_MAP(salamand_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", nemesis_state, nemesis_interrupt)
MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* 3.579545 MHz */
MCFG_CPU_PROGRAM_MAP(sal_sound_map)
@@ -1759,6 +1758,7 @@ MACHINE_CONFIG_START(nemesis_state::salamand)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(nemesis_state, screen_update_nemesis)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(nemesis_state, nemesis_vblank_irq))
MCFG_GFXDECODE_ADD("gfxdecode", "palette", nemesis)
MCFG_PALETTE_ADD("palette", 2048)
@@ -1794,7 +1794,6 @@ MACHINE_CONFIG_START(nemesis_state::blkpnthr)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216 MHz? */
MCFG_CPU_PROGRAM_MAP(blkpnthr_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", nemesis_state, blkpnthr_interrupt)
MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* 3.579545 MHz */
MCFG_CPU_PROGRAM_MAP(blkpnthr_sound_map)
@@ -1810,6 +1809,7 @@ MACHINE_CONFIG_START(nemesis_state::blkpnthr)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(nemesis_state, screen_update_nemesis)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(nemesis_state, blkpnthr_vblank_irq))
MCFG_GFXDECODE_ADD("gfxdecode", "palette", nemesis)
MCFG_PALETTE_ADD("palette", 2048)
@@ -1840,7 +1840,6 @@ MACHINE_CONFIG_START(nemesis_state::citybomb)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216 MHz? */
MCFG_CPU_PROGRAM_MAP(citybomb_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", nemesis_state, nemesis_interrupt)
MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* 3.579545 MHz */
MCFG_CPU_PROGRAM_MAP(city_sound_map)
@@ -1856,6 +1855,7 @@ MACHINE_CONFIG_START(nemesis_state::citybomb)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(nemesis_state, screen_update_nemesis)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(nemesis_state, nemesis_vblank_irq))
MCFG_GFXDECODE_ADD("gfxdecode", "palette", nemesis)
MCFG_PALETTE_ADD("palette", 2048)
@@ -1890,7 +1890,6 @@ MACHINE_CONFIG_START(nemesis_state::nyanpani)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216 MHz? */
MCFG_CPU_PROGRAM_MAP(nyanpani_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", nemesis_state, nemesis_interrupt)
MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* 3.579545 MHz */
MCFG_CPU_PROGRAM_MAP(city_sound_map)
@@ -1906,6 +1905,7 @@ MACHINE_CONFIG_START(nemesis_state::nyanpani)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(nemesis_state, screen_update_nemesis)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(nemesis_state, nemesis_vblank_irq))
MCFG_GFXDECODE_ADD("gfxdecode", "palette", nemesis)
MCFG_PALETTE_ADD("palette", 2048)
@@ -2698,7 +2698,6 @@ MACHINE_CONFIG_START(nemesis_state::bubsys)
MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
MCFG_CPU_PROGRAM_MAP(gx400_sound_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", nemesis_state, nmi_line_pulse) /* interrupts are triggered by the main CPU */
MCFG_DEVICE_ADD("outlatch", LS259, 0)
MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(nemesis_state, coin1_lockout_w))
@@ -2722,6 +2721,7 @@ MACHINE_CONFIG_START(nemesis_state::bubsys)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(nemesis_state, screen_update_nemesis)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("audiocpu", INPUT_LINE_NMI))
MCFG_GFXDECODE_ADD("gfxdecode", "palette", nemesis)
MCFG_PALETTE_ADD("palette", 2048)
diff --git a/src/mame/drivers/rockrage.cpp b/src/mame/drivers/rockrage.cpp
index fac614158cd..cfa1a70159a 100644
--- a/src/mame/drivers/rockrage.cpp
+++ b/src/mame/drivers/rockrage.cpp
@@ -61,10 +61,10 @@ Notes:
#include "speaker.h"
-INTERRUPT_GEN_MEMBER(rockrage_state::rockrage_interrupt)
+WRITE_LINE_MEMBER(rockrage_state::vblank_irq)
{
- if (m_k007342->is_int_enabled())
- device.execute().set_input_line(HD6309_IRQ_LINE, HOLD_LINE);
+ if (state && m_k007342->is_int_enabled())
+ m_maincpu->set_input_line(HD6309_IRQ_LINE, HOLD_LINE);
}
WRITE8_MEMBER(rockrage_state::rockrage_bankswitch_w)
@@ -253,7 +253,6 @@ MACHINE_CONFIG_START(rockrage_state::rockrage)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", HD6309E, XTAL(24'000'000) / 8)
MCFG_CPU_PROGRAM_MAP(rockrage_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", rockrage_state, rockrage_interrupt)
MCFG_CPU_ADD("audiocpu", MC6809E, XTAL(24'000'000) / 16)
MCFG_CPU_PROGRAM_MAP(rockrage_sound_map)
@@ -268,6 +267,7 @@ MACHINE_CONFIG_START(rockrage_state::rockrage)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(rockrage_state, screen_update_rockrage)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(rockrage_state, vblank_irq))
MCFG_K007342_ADD("k007342")
MCFG_K007342_GFXNUM(0)
diff --git a/src/mame/drivers/twin16.cpp b/src/mame/drivers/twin16.cpp
index 74a423c1328..71c4d8ae419 100644
--- a/src/mame/drivers/twin16.cpp
+++ b/src/mame/drivers/twin16.cpp
@@ -58,10 +58,6 @@ Known Issues:
#include "speaker.h"
-#define CPUA_IRQ_ENABLE (m_CPUA_register & 0x20)
-#define CPUB_IRQ_ENABLE (m_CPUB_register & 0x02)
-
-
int twin16_state::spriteram_process_enable( )
@@ -638,18 +634,6 @@ WRITE8_MEMBER(twin16_state::volume_callback)
m_k007232->set_volume(1,0,(data & 0x0f) * 0x11);
}
-/* Interrupt Generators */
-
-INTERRUPT_GEN_MEMBER(twin16_state::CPUA_interrupt)
-{
- if (CPUA_IRQ_ENABLE) device.execute().set_input_line(5, HOLD_LINE);
-}
-
-INTERRUPT_GEN_MEMBER(twin16_state::CPUB_interrupt)
-{
- if (CPUB_IRQ_ENABLE) device.execute().set_input_line(5, HOLD_LINE);
-}
-
/* Machine Drivers */
void twin16_state::machine_reset()
@@ -669,11 +653,9 @@ MACHINE_CONFIG_START(twin16_state::twin16)
// basic machine hardware
MCFG_CPU_ADD("maincpu", M68000, XTAL(18'432'000)/2)
MCFG_CPU_PROGRAM_MAP(main_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", twin16_state, CPUA_interrupt)
MCFG_CPU_ADD("sub", M68000, XTAL(18'432'000)/2)
MCFG_CPU_PROGRAM_MAP(sub_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", twin16_state, CPUB_interrupt)
MCFG_CPU_ADD("audiocpu", Z80, XTAL(3'579'545))
MCFG_CPU_PROGRAM_MAP(sound_map)
@@ -728,7 +710,6 @@ MACHINE_CONFIG_START(fround_state::fround)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000, XTAL(18'432'000)/2)
MCFG_CPU_PROGRAM_MAP(fround_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", twin16_state, CPUA_interrupt)
MCFG_CPU_ADD("audiocpu", Z80, XTAL(3'579'545))
MCFG_CPU_PROGRAM_MAP(sound_map)
diff --git a/src/mame/includes/88games.h b/src/mame/includes/88games.h
index 8e61b5e1094..b6e5c9b0d37 100644
--- a/src/mame/includes/88games.h
+++ b/src/mame/includes/88games.h
@@ -60,7 +60,7 @@ public:
virtual void machine_start() override;
virtual void machine_reset() override;
uint32_t screen_update_88games(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(k88games_interrupt);
+ DECLARE_WRITE_LINE_MEMBER(vblank_irq);
K051316_CB_MEMBER(zoom_callback);
K052109_CB_MEMBER(tile_callback);
K051960_CB_MEMBER(sprite_callback);
diff --git a/src/mame/includes/battlnts.h b/src/mame/includes/battlnts.h
index 1150ac3d55a..5d2c53c8de5 100644
--- a/src/mame/includes/battlnts.h
+++ b/src/mame/includes/battlnts.h
@@ -38,7 +38,7 @@ public:
virtual void machine_start() override;
virtual void machine_reset() override;
uint32_t screen_update_battlnts(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(battlnts_interrupt);
+ DECLARE_WRITE_LINE_MEMBER(vblank_irq);
K007342_CALLBACK_MEMBER(battlnts_tile_callback);
K007420_CALLBACK_MEMBER(battlnts_sprite_callback);
void battlnts(machine_config &config);
diff --git a/src/mame/includes/bottom9.h b/src/mame/includes/bottom9.h
index c8c7fc337ea..4ccef0c3b33 100644
--- a/src/mame/includes/bottom9.h
+++ b/src/mame/includes/bottom9.h
@@ -54,7 +54,7 @@ public:
virtual void machine_start() override;
virtual void machine_reset() override;
uint32_t screen_update_bottom9(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(bottom9_interrupt);
+ DECLARE_WRITE_LINE_MEMBER(vblank_irq);
INTERRUPT_GEN_MEMBER(bottom9_sound_interrupt);
DECLARE_WRITE8_MEMBER(volume_callback0);
DECLARE_WRITE8_MEMBER(volume_callback1);
diff --git a/src/mame/includes/jailbrek.h b/src/mame/includes/jailbrek.h
index 0a46b74c964..508d16b43bf 100644
--- a/src/mame/includes/jailbrek.h
+++ b/src/mame/includes/jailbrek.h
@@ -57,7 +57,7 @@ public:
virtual void video_start() override;
DECLARE_PALETTE_INIT(jailbrek);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(interrupt);
+ DECLARE_WRITE_LINE_MEMBER(vblank_irq);
INTERRUPT_GEN_MEMBER(interrupt_nmi);
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
void jailbrek(machine_config &config);
diff --git a/src/mame/includes/labyrunr.h b/src/mame/includes/labyrunr.h
index b2002f4d946..86b92a9fb21 100644
--- a/src/mame/includes/labyrunr.h
+++ b/src/mame/includes/labyrunr.h
@@ -54,7 +54,7 @@ public:
virtual void video_start() override;
DECLARE_PALETTE_INIT(labyrunr);
uint32_t screen_update_labyrunr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(labyrunr_vblank_interrupt);
+ DECLARE_WRITE_LINE_MEMBER(vblank_irq);
INTERRUPT_GEN_MEMBER(labyrunr_timer_interrupt);
void labyrunr(machine_config &config);
void labyrunr_map(address_map &map);
diff --git a/src/mame/includes/nemesis.h b/src/mame/includes/nemesis.h
index 2d7661d4beb..75eefbd6fb8 100644
--- a/src/mame/includes/nemesis.h
+++ b/src/mame/includes/nemesis.h
@@ -120,8 +120,8 @@ public:
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update_nemesis(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(nemesis_interrupt);
- INTERRUPT_GEN_MEMBER(blkpnthr_interrupt);
+ DECLARE_WRITE_LINE_MEMBER(nemesis_vblank_irq);
+ DECLARE_WRITE_LINE_MEMBER(blkpnthr_vblank_irq);
TIMER_DEVICE_CALLBACK_MEMBER(konamigt_interrupt);
TIMER_DEVICE_CALLBACK_MEMBER(gx400_interrupt);
void create_palette_lookups();
diff --git a/src/mame/includes/rockrage.h b/src/mame/includes/rockrage.h
index 70ca39f06ae..2148347f572 100644
--- a/src/mame/includes/rockrage.h
+++ b/src/mame/includes/rockrage.h
@@ -51,7 +51,7 @@ public:
virtual void machine_reset() override;
DECLARE_PALETTE_INIT(rockrage);
uint32_t screen_update_rockrage(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(rockrage_interrupt);
+ DECLARE_WRITE_LINE_MEMBER(vblank_irq);
K007342_CALLBACK_MEMBER(rockrage_tile_callback);
K007420_CALLBACK_MEMBER(rockrage_sprite_callback);
diff --git a/src/mame/includes/twin16.h b/src/mame/includes/twin16.h
index cf8199ba2d0..7d0f5807d9c 100644
--- a/src/mame/includes/twin16.h
+++ b/src/mame/includes/twin16.h
@@ -77,8 +77,6 @@ public:
uint32_t screen_update_twin16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(screen_vblank_twin16);
- INTERRUPT_GEN_MEMBER(CPUA_interrupt);
- INTERRUPT_GEN_MEMBER(CPUB_interrupt);
TIMER_CALLBACK_MEMBER(sprite_tick);
DECLARE_WRITE8_MEMBER(volume_callback);
void devilw(machine_config &config);
diff --git a/src/mame/video/twin16.cpp b/src/mame/video/twin16.cpp
index e5233f19876..03421242f46 100644
--- a/src/mame/video/twin16.cpp
+++ b/src/mame/video/twin16.cpp
@@ -564,5 +564,11 @@ WRITE_LINE_MEMBER(twin16_state::screen_vblank_twin16)
else {
m_spriteram->copy();
}
+
+ // IRQ generation
+ if (m_CPUA_register & 0x20)
+ m_maincpu->set_input_line(5, HOLD_LINE);
+ if (m_subcpu.found() && (m_CPUB_register & 0x02))
+ m_subcpu->set_input_line(5, HOLD_LINE);
}
}