summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-03-28 13:39:31 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-03-28 13:39:31 -0400
commit3485a622b5ab5a17321c7c5b5c5a3a48c2b2a1f4 (patch)
tree5f3ce4b0db21ee22ef9d0615c06d53daf6280b05
parent5ab7a863b1592c20457efa610441a77c035a1ca3 (diff)
dynduke, goodejan, raiden, sengokmj: Replace CPU_VBLANK_INT with SCREEN_VBLANK_CALLBACK (nw)
-rw-r--r--src/mame/drivers/dynduke.cpp11
-rw-r--r--src/mame/drivers/goodejan.cpp9
-rw-r--r--src/mame/drivers/raiden.cpp11
-rw-r--r--src/mame/drivers/sengokmj.cpp9
-rw-r--r--src/mame/includes/dynduke.h4
-rw-r--r--src/mame/includes/raiden.h4
6 files changed, 30 insertions, 18 deletions
diff --git a/src/mame/drivers/dynduke.cpp b/src/mame/drivers/dynduke.cpp
index 874070a189d..d36055406d4 100644
--- a/src/mame/drivers/dynduke.cpp
+++ b/src/mame/drivers/dynduke.cpp
@@ -303,9 +303,13 @@ GFXDECODE_END
/* Interrupt Generator */
-INTERRUPT_GEN_MEMBER(dynduke_state::interrupt)
+WRITE_LINE_MEMBER(dynduke_state::vblank_irq)
{
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xc8/4); // VBL
+ if (state)
+ {
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xc8/4);
+ m_slave->set_input_line_and_vector(0, HOLD_LINE, 0xc8/4);
+ }
}
/* Machine Driver */
@@ -314,11 +318,9 @@ MACHINE_CONFIG_START(dynduke_state::dynduke)
// basic machine hardware
MCFG_CPU_ADD("maincpu", V30, 16000000/2) // NEC V30-8 CPU
MCFG_CPU_PROGRAM_MAP(master_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", dynduke_state, interrupt)
MCFG_CPU_ADD("slave", V30, 16000000/2) // NEC V30-8 CPU
MCFG_CPU_PROGRAM_MAP(slave_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", dynduke_state, interrupt)
MCFG_CPU_ADD("audiocpu", Z80, 14318180/4)
MCFG_CPU_PROGRAM_MAP(sound_map)
@@ -340,6 +342,7 @@ MACHINE_CONFIG_START(dynduke_state::dynduke)
MCFG_SCREEN_UPDATE_DRIVER(dynduke_state, screen_update)
MCFG_SCREEN_VBLANK_CALLBACK(DEVWRITELINE("spriteram", buffered_spriteram16_device, vblank_copy_rising))
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(dynduke_state, vblank_irq))
MCFG_GFXDECODE_ADD("gfxdecode", "palette", dynduke)
diff --git a/src/mame/drivers/goodejan.cpp b/src/mame/drivers/goodejan.cpp
index 203c1cca7c5..f4f2b28b199 100644
--- a/src/mame/drivers/goodejan.cpp
+++ b/src/mame/drivers/goodejan.cpp
@@ -132,7 +132,7 @@ public:
TILE_GET_INFO_MEMBER(seibucrtc_sc2_tile_info);
TILE_GET_INFO_MEMBER(seibucrtc_sc3_tile_info);
- INTERRUPT_GEN_MEMBER(irq);
+ DECLARE_WRITE_LINE_MEMBER(vblank_irq);
void seibucrtc_sc0bank_w(uint16_t data);
void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,int pri);
@@ -630,9 +630,10 @@ static GFXDECODE_START( goodejan )
GFXDECODE_ENTRY( "tx_gfx", 0, charlayout, 0x100, 0x10 ) /* Text */
GFXDECODE_END
-INTERRUPT_GEN_MEMBER(goodejan_state::irq)
+WRITE_LINE_MEMBER(goodejan_state::vblank_irq)
{
- device.execute().set_input_line_and_vector(0,HOLD_LINE,0x208/4);
+ if (state)
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x208/4);
/* vector 0x00c is just a reti */
}
@@ -654,7 +655,6 @@ MACHINE_CONFIG_START(goodejan_state::goodejan)
MCFG_CPU_ADD("maincpu", V30, GOODEJAN_MHZ2/2)
MCFG_CPU_PROGRAM_MAP(goodejan_map)
MCFG_CPU_IO_MAP(goodejan_io_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", goodejan_state, irq)
MCFG_CPU_ADD("audiocpu", Z80, GOODEJAN_MHZ1/2)
MCFG_CPU_PROGRAM_MAP(seibu_sound_map)
@@ -667,6 +667,7 @@ MACHINE_CONFIG_START(goodejan_state::goodejan)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) //TODO: dynamic resolution
MCFG_SCREEN_UPDATE_DRIVER(goodejan_state, screen_update)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(goodejan_state, vblank_irq))
MCFG_DEVICE_ADD("crtc", SEIBU_CRTC, 0)
MCFG_SEIBU_CRTC_LAYER_EN_CB(WRITE16(goodejan_state, layer_en_w))
diff --git a/src/mame/drivers/raiden.cpp b/src/mame/drivers/raiden.cpp
index 2612cb215dd..2a5e21b468d 100644
--- a/src/mame/drivers/raiden.cpp
+++ b/src/mame/drivers/raiden.cpp
@@ -325,9 +325,13 @@ GFXDECODE_END
/******************************************************************************/
-INTERRUPT_GEN_MEMBER(raiden_state::raiden_interrupt)
+WRITE_LINE_MEMBER(raiden_state::vblank_irq)
{
- device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xc8/4); /* VBL */
+ if (state)
+ {
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xc8/4);
+ m_subcpu->set_input_line_and_vector(0, HOLD_LINE, 0xc8/4);
+ }
}
MACHINE_CONFIG_START(raiden_state::raiden)
@@ -335,11 +339,9 @@ MACHINE_CONFIG_START(raiden_state::raiden)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", V30,XTAL(20'000'000)/2) /* NEC V30 CPU, 20MHz verified on pcb */
MCFG_CPU_PROGRAM_MAP(main_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", raiden_state, raiden_interrupt)
MCFG_CPU_ADD("sub", V30,XTAL(20'000'000)/2) /* NEC V30 CPU, 20MHz verified on pcb */
MCFG_CPU_PROGRAM_MAP(sub_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", raiden_state, raiden_interrupt)
MCFG_CPU_ADD("audiocpu", Z80, XTAL(14'318'181)/4) /* verified on pcb */
MCFG_CPU_PROGRAM_MAP(seibu_sound_map)
@@ -356,6 +358,7 @@ MACHINE_CONFIG_START(raiden_state::raiden)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(raiden_state, screen_update_raiden)
MCFG_SCREEN_VBLANK_CALLBACK(DEVWRITELINE("spriteram", buffered_spriteram16_device, vblank_copy_rising))
+ MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE(raiden_state, vblank_irq))
MCFG_SCREEN_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", raiden)
diff --git a/src/mame/drivers/sengokmj.cpp b/src/mame/drivers/sengokmj.cpp
index 305a8b88fd3..98960266fbb 100644
--- a/src/mame/drivers/sengokmj.cpp
+++ b/src/mame/drivers/sengokmj.cpp
@@ -115,7 +115,7 @@ public:
TILE_GET_INFO_MEMBER(seibucrtc_sc2_tile_info);
TILE_GET_INFO_MEMBER(seibucrtc_sc3_tile_info);
- INTERRUPT_GEN_MEMBER(interrupt);
+ DECLARE_WRITE_LINE_MEMBER(vblank_irq);
virtual void machine_start() override;
virtual void video_start() override;
@@ -555,9 +555,10 @@ static GFXDECODE_START( sengokmj )
GFXDECODE_ENTRY( "tx_gfx", 0, charlayout, 0x700, 0x10 ) /* Text */
GFXDECODE_END
-INTERRUPT_GEN_MEMBER(sengokmj_state::interrupt)
+WRITE_LINE_MEMBER(sengokmj_state::vblank_irq)
{
- device.execute().set_input_line_and_vector(0,HOLD_LINE,0xc8/4);
+ if (state)
+ m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xc8/4);
}
WRITE16_MEMBER( sengokmj_state::layer_en_w )
@@ -577,7 +578,6 @@ MACHINE_CONFIG_START(sengokmj_state::sengokmj)
MCFG_CPU_ADD("maincpu", V30, 16000000/2) /* V30-8 */
MCFG_CPU_PROGRAM_MAP(sengokmj_map)
MCFG_CPU_IO_MAP(sengokmj_io_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", sengokmj_state, interrupt)
MCFG_CPU_ADD("audiocpu", Z80, 14318180/4)
MCFG_CPU_PROGRAM_MAP(seibu_sound_map)
@@ -592,6 +592,7 @@ MACHINE_CONFIG_START(sengokmj_state::sengokmj)
MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 16, 256-1) //TODO: dynamic resolution
MCFG_SCREEN_UPDATE_DRIVER(sengokmj_state, screen_update)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(sengokmj_state, vblank_irq))
MCFG_DEVICE_ADD("crtc", SEIBU_CRTC, 0)
MCFG_SEIBU_CRTC_LAYER_EN_CB(WRITE16(sengokmj_state, layer_en_w))
diff --git a/src/mame/includes/dynduke.h b/src/mame/includes/dynduke.h
index 9f0e4163a56..fec4de1b5c2 100644
--- a/src/mame/includes/dynduke.h
+++ b/src/mame/includes/dynduke.h
@@ -9,6 +9,7 @@ public:
dynduke_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
+ m_slave(*this, "slave"),
m_seibu_sound(*this, "seibu_sound"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
@@ -19,6 +20,7 @@ public:
m_fore_data(*this, "fore_data") { }
required_device<cpu_device> m_maincpu;
+ required_device<cpu_device> m_slave;
required_device<seibu_sound_device> m_seibu_sound;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
@@ -57,7 +59,7 @@ public:
void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,int pri);
void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect, int pri );
- INTERRUPT_GEN_MEMBER(interrupt);
+ DECLARE_WRITE_LINE_MEMBER(vblank_irq);
void dynduke(machine_config &config);
void dbldyn(machine_config &config);
void master_map(address_map &map);
diff --git a/src/mame/includes/raiden.h b/src/mame/includes/raiden.h
index 68afe14dbe9..02024ae212b 100644
--- a/src/mame/includes/raiden.h
+++ b/src/mame/includes/raiden.h
@@ -15,6 +15,7 @@ public:
raiden_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
+ m_subcpu(*this, "subcpu"),
m_seibu_sound(*this, "seibu_sound"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
@@ -27,6 +28,7 @@ public:
{ }
required_device<cpu_device> m_maincpu;
+ required_device<cpu_device> m_subcpu;
required_device<seibu_sound_device> m_seibu_sound;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
@@ -68,7 +70,7 @@ public:
uint32_t screen_update_raiden(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_raidenb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(raiden_interrupt);
+ DECLARE_WRITE_LINE_MEMBER(vblank_irq);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int pri_mask);
void common_decrypt();