summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-03-28 19:04:03 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-03-28 19:04:03 -0400
commit77494b51b49ccdade0c8b9a4229f4cce0a1aae73 (patch)
treec10711f5198f491938eb4a4d7faca973d1cdad0e
parent46e70f8c2652f18876be3f593d4d48b435d98ecf (diff)
karnov.cpp: Use MCFG_SCREEN_VBLANK_CALLBACK instead of MCFG_CPU_VBLANK_INT (nw)
-rw-r--r--src/mame/drivers/karnov.cpp13
-rw-r--r--src/mame/includes/karnov.h2
2 files changed, 9 insertions, 6 deletions
diff --git a/src/mame/drivers/karnov.cpp b/src/mame/drivers/karnov.cpp
index 825ad79d0b7..2ee1dc17258 100644
--- a/src/mame/drivers/karnov.cpp
+++ b/src/mame/drivers/karnov.cpp
@@ -741,8 +741,11 @@ GFXDECODE_END
*
*************************************/
-INTERRUPT_GEN_MEMBER(karnov_state::karnov_interrupt)
+WRITE_LINE_MEMBER(karnov_state::vbint_w)
{
+ if (!state)
+ return;
+
uint8_t port = ioport("FAKE")->read();
/* Coin input to the i8751 generates an interrupt to the main cpu */
@@ -759,14 +762,14 @@ INTERRUPT_GEN_MEMBER(karnov_state::karnov_interrupt)
else
{
m_i8751_return = port | 0x8000;
- device.execute().set_input_line(6, HOLD_LINE);
+ m_maincpu->set_input_line(6, ASSERT_LINE);
m_i8751_needs_ack = 1;
}
m_latch = 0;
}
- device.execute().set_input_line(7, HOLD_LINE); /* VBL */
+ m_maincpu->set_input_line(7, ASSERT_LINE);
}
/*************************************
@@ -811,7 +814,6 @@ MACHINE_CONFIG_START(karnov_state::karnov)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz */
MCFG_CPU_PROGRAM_MAP(karnov_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", karnov_state, karnov_interrupt)
MCFG_CPU_ADD("audiocpu", M6502, 1500000) /* Accurate */
MCFG_CPU_PROGRAM_MAP(karnov_sound_map)
@@ -827,6 +829,7 @@ MACHINE_CONFIG_START(karnov_state::karnov)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
MCFG_SCREEN_UPDATE_DRIVER(karnov_state, screen_update_karnov)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(karnov_state, vbint_w))
MCFG_GFXDECODE_ADD("gfxdecode", "palette", karnov)
MCFG_DECO_RMC3_ADD_PROMS("palette","proms",1024) // xxxxBBBBGGGGRRRR with custom weighting
@@ -889,7 +892,6 @@ MACHINE_CONFIG_START(karnov_state::wndrplnt)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz */
MCFG_CPU_PROGRAM_MAP(karnov_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", karnov_state, karnov_interrupt)
MCFG_CPU_ADD("audiocpu", M6502, 1500000) /* Accurate */
MCFG_CPU_PROGRAM_MAP(karnov_sound_map)
@@ -905,6 +907,7 @@ MACHINE_CONFIG_START(karnov_state::wndrplnt)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
MCFG_SCREEN_UPDATE_DRIVER(karnov_state, screen_update_karnov)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(karnov_state, vbint_w))
MCFG_GFXDECODE_ADD("gfxdecode", "palette", karnov)
MCFG_DECO_RMC3_ADD_PROMS("palette","proms",1024) // xxxxBBBBGGGGRRRR with custom weighting
diff --git a/src/mame/includes/karnov.h b/src/mame/includes/karnov.h
index 5df877e91eb..c0a7c0608c7 100644
--- a/src/mame/includes/karnov.h
+++ b/src/mame/includes/karnov.h
@@ -73,7 +73,7 @@ public:
DECLARE_VIDEO_START(karnov);
DECLARE_VIDEO_START(wndrplnt);
uint32_t screen_update_karnov(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(karnov_interrupt);
+ DECLARE_WRITE_LINE_MEMBER(vbint_w);
void karnov_flipscreen_w( int data );
void draw_background( bitmap_ind16 &bitmap, const rectangle &cliprect );
void karnov_i8751_w( int data );