summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2019-08-30 19:25:12 -0400
committerGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2019-08-30 20:49:03 -0400
commit29b1313b59725120b6fb83ce707d02b744aceb8b (patch)
tree47d432194c3f3a0c4c578cb8d0a5cf5725c38e2e
parent5beba499fa99bc9181c9940c97f5f1bd6ec40216 (diff)
k052109: Use callback to generate IRQ for most drivers (nw)
- Fix IRQ enable logic (otherwise simpsons is very broken) - Use device_video_interface to hook screen k051960: Use device_video_interface to hook screen (nw)
-rw-r--r--src/mame/drivers/88games.cpp11
-rw-r--r--src/mame/drivers/ajax.cpp4
-rw-r--r--src/mame/drivers/aliens.cpp3
-rw-r--r--src/mame/drivers/blockhl.cpp4
-rw-r--r--src/mame/drivers/bottom9.cpp11
-rw-r--r--src/mame/drivers/chqflag.cpp2
-rw-r--r--src/mame/drivers/crimfght.cpp3
-rw-r--r--src/mame/drivers/gradius3.cpp3
-rw-r--r--src/mame/drivers/konmedal.cpp3
-rw-r--r--src/mame/drivers/mainevt.cpp16
-rw-r--r--src/mame/drivers/parodius.cpp9
-rw-r--r--src/mame/drivers/simpsons.cpp5
-rw-r--r--src/mame/drivers/spy.cpp13
-rw-r--r--src/mame/drivers/surpratk.cpp9
-rw-r--r--src/mame/drivers/thunderx.cpp15
-rw-r--r--src/mame/drivers/tmnt.cpp22
-rw-r--r--src/mame/drivers/ultraman.cpp2
-rw-r--r--src/mame/drivers/xmen.cpp2
-rw-r--r--src/mame/includes/88games.h1
-rw-r--r--src/mame/includes/bottom9.h1
-rw-r--r--src/mame/includes/mainevt.h1
-rw-r--r--src/mame/includes/parodius.h1
-rw-r--r--src/mame/includes/spy.h1
-rw-r--r--src/mame/includes/surpratk.h1
-rw-r--r--src/mame/includes/thunderx.h1
-rw-r--r--src/mame/video/88games.cpp2
-rw-r--r--src/mame/video/aliens.cpp2
-rw-r--r--src/mame/video/bottom9.cpp2
-rw-r--r--src/mame/video/chqflag.cpp1
-rw-r--r--src/mame/video/crimfght.cpp2
-rw-r--r--src/mame/video/gradius3.cpp2
-rw-r--r--src/mame/video/k051960.cpp14
-rw-r--r--src/mame/video/k051960.h6
-rw-r--r--src/mame/video/k052109.cpp19
-rw-r--r--src/mame/video/k052109.h10
-rw-r--r--src/mame/video/mainevt.cpp1
-rw-r--r--src/mame/video/parodius.cpp2
-rw-r--r--src/mame/video/spy.cpp2
-rw-r--r--src/mame/video/surpratk.cpp2
-rw-r--r--src/mame/video/thunderx.cpp2
-rw-r--r--src/mame/video/tmnt.cpp2
-rw-r--r--src/mame/video/ultraman.cpp2
42 files changed, 107 insertions, 110 deletions
diff --git a/src/mame/drivers/88games.cpp b/src/mame/drivers/88games.cpp
index bf8bdb921d2..ff8e7a553e3 100644
--- a/src/mame/drivers/88games.cpp
+++ b/src/mame/drivers/88games.cpp
@@ -26,12 +26,6 @@
*
*************************************/
-WRITE_LINE_MEMBER(_88games_state::vblank_irq)
-{
- if (state && m_k052109->is_irq_enabled())
- m_maincpu->set_input_line(0, HOLD_LINE);
-}
-
READ8_MEMBER(_88games_state::bankedram_r)
{
if (m_videobank)
@@ -323,17 +317,18 @@ void _88games_state::_88games(machine_config &config)
screen.set_visarea(12*8, (64-12)*8-1, 2*8, 30*8-1);
screen.set_screen_update(FUNC(_88games_state::screen_update_88games));
screen.set_palette("palette");
- screen.screen_vblank().set(FUNC(_88games_state::vblank_irq));
PALETTE(config, "palette").set_format(palette_device::xBGR_555, 2048).enable_shadows();
K052109(config, m_k052109, 0);
m_k052109->set_palette("palette");
+ m_k052109->set_screen("screen");
m_k052109->set_tile_callback(FUNC(_88games_state::tile_callback), this);
+ m_k052109->irq_handler().set_inputline(m_maincpu, KONAMI_IRQ_LINE);
K051960(config, m_k051960, 0);
m_k051960->set_palette("palette");
- m_k051960->set_screen_tag("screen");
+ m_k051960->set_screen("screen");
m_k051960->set_sprite_callback(FUNC(_88games_state::sprite_callback), this);
K051316(config, m_k051316, 0);
diff --git a/src/mame/drivers/ajax.cpp b/src/mame/drivers/ajax.cpp
index 44f90bdb3f3..c92f94623dc 100644
--- a/src/mame/drivers/ajax.cpp
+++ b/src/mame/drivers/ajax.cpp
@@ -199,11 +199,13 @@ void ajax_state::ajax(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette(m_palette);
+ m_k052109->set_screen("screen");
m_k052109->set_tile_callback(FUNC(ajax_state::tile_callback), this);
+ m_k052109->irq_handler().set_inputline(m_subcpu, M6809_IRQ_LINE);
K051960(config, m_k051960, 0);
m_k051960->set_palette("palette");
- m_k051960->set_screen_tag("screen");
+ m_k051960->set_screen("screen");
m_k051960->set_sprite_callback(FUNC(ajax_state::sprite_callback), this);
m_k051960->irq_handler().set_inputline(m_maincpu, KONAMI_IRQ_LINE);
diff --git a/src/mame/drivers/aliens.cpp b/src/mame/drivers/aliens.cpp
index 5d48c4e37d1..33fbe27facb 100644
--- a/src/mame/drivers/aliens.cpp
+++ b/src/mame/drivers/aliens.cpp
@@ -220,11 +220,12 @@ void aliens_state::aliens(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette("palette");
+ m_k052109->set_screen(nullptr);
m_k052109->set_tile_callback(FUNC(aliens_state::tile_callback), this);
K051960(config, m_k051960, 0);
m_k051960->set_palette("palette");
- m_k051960->set_screen_tag("screen");
+ m_k051960->set_screen("screen");
m_k051960->set_sprite_callback(FUNC(aliens_state::sprite_callback), this);
m_k051960->irq_handler().set_inputline(m_maincpu, KONAMI_IRQ_LINE);
diff --git a/src/mame/drivers/blockhl.cpp b/src/mame/drivers/blockhl.cpp
index bf86cf3489a..c81c35e66fb 100644
--- a/src/mame/drivers/blockhl.cpp
+++ b/src/mame/drivers/blockhl.cpp
@@ -305,13 +305,13 @@ void blockhl_state::blockhl(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette("palette");
- m_k052109->set_screen_tag("screen");
+ m_k052109->set_screen("screen");
m_k052109->set_tile_callback(FUNC(blockhl_state::tile_callback), this);
m_k052109->irq_handler().set_inputline(m_maincpu, KONAMI_IRQ_LINE);
K051960(config, m_k051960, 0);
m_k051960->set_palette("palette");
- m_k051960->set_screen_tag("screen");
+ m_k051960->set_screen("screen");
m_k051960->set_sprite_callback(FUNC(blockhl_state::sprite_callback), this);
// sound hardware
diff --git a/src/mame/drivers/bottom9.cpp b/src/mame/drivers/bottom9.cpp
index 21629332586..321a07fe2ad 100644
--- a/src/mame/drivers/bottom9.cpp
+++ b/src/mame/drivers/bottom9.cpp
@@ -25,12 +25,6 @@
#include "speaker.h"
-WRITE_LINE_MEMBER(bottom9_state::vblank_irq)
-{
- if (state && m_k052109->is_irq_enabled())
- m_maincpu->set_input_line(0, HOLD_LINE);
-}
-
READ8_MEMBER(bottom9_state::k052109_051960_r)
{
if (m_k052109->get_rmrd_line() == CLEAR_LINE)
@@ -319,7 +313,6 @@ void bottom9_state::bottom9(machine_config &config)
screen.set_size(64*8, 32*8);
screen.set_visarea(14*8, (64-14)*8-1, 2*8, 30*8-1);
screen.set_screen_update(FUNC(bottom9_state::screen_update_bottom9));
- screen.screen_vblank().set(FUNC(bottom9_state::vblank_irq));
screen.set_palette(m_palette);
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 1024);
@@ -327,11 +320,13 @@ void bottom9_state::bottom9(machine_config &config)
K052109(config, m_k052109, 0); // 051961 on schematics
m_k052109->set_palette(m_palette);
+ m_k052109->set_screen("screen");
m_k052109->set_tile_callback(FUNC(bottom9_state::tile_callback), this);
+ m_k052109->irq_handler().set_inputline(m_maincpu, M6809_IRQ_LINE);
K051960(config, m_k051960, 0);
m_k051960->set_palette(m_palette);
- m_k051960->set_screen_tag("screen");
+ m_k051960->set_screen("screen");
m_k051960->set_sprite_callback(FUNC(bottom9_state::sprite_callback), this);
K051316(config, m_k051316, 0);
diff --git a/src/mame/drivers/chqflag.cpp b/src/mame/drivers/chqflag.cpp
index 444ebb873fa..ee63dabf483 100644
--- a/src/mame/drivers/chqflag.cpp
+++ b/src/mame/drivers/chqflag.cpp
@@ -344,7 +344,7 @@ void chqflag_state::chqflag(machine_config &config)
K051960(config, m_k051960, 0);
m_k051960->set_palette(m_palette);
- m_k051960->set_screen_tag("screen");
+ m_k051960->set_screen("screen");
m_k051960->set_sprite_callback(FUNC(chqflag_state::sprite_callback), this);
m_k051960->irq_handler().set_inputline(m_maincpu, KONAMI_IRQ_LINE);
m_k051960->nmi_handler().set_inputline(m_maincpu, INPUT_LINE_NMI);
diff --git a/src/mame/drivers/crimfght.cpp b/src/mame/drivers/crimfght.cpp
index 0460d850fd0..8a9fbcd2cc1 100644
--- a/src/mame/drivers/crimfght.cpp
+++ b/src/mame/drivers/crimfght.cpp
@@ -327,11 +327,12 @@ void crimfght_state::crimfght(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette(m_palette);
+ m_k052109->set_screen(nullptr);
m_k052109->set_tile_callback(FUNC(crimfght_state::tile_callback), this);
K051960(config, m_k051960, 0);
m_k051960->set_palette(m_palette);
- m_k051960->set_screen_tag("screen");
+ m_k051960->set_screen("screen");
m_k051960->set_sprite_callback(FUNC(crimfght_state::sprite_callback), this);
m_k051960->irq_handler().set_inputline(m_maincpu, KONAMI_IRQ_LINE);
diff --git a/src/mame/drivers/gradius3.cpp b/src/mame/drivers/gradius3.cpp
index e30e9786288..d7eb5ece4de 100644
--- a/src/mame/drivers/gradius3.cpp
+++ b/src/mame/drivers/gradius3.cpp
@@ -289,12 +289,13 @@ void gradius3_state::gradius3(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette("palette");
+ m_k052109->set_screen(nullptr);
m_k052109->set_tile_callback(FUNC(gradius3_state::tile_callback), this);
m_k052109->set_char_ram(true);
K051960(config, m_k051960, 0);
m_k051960->set_palette("palette");
- m_k051960->set_screen_tag("screen");
+ m_k051960->set_screen("screen");
m_k051960->set_sprite_callback(FUNC(gradius3_state::sprite_callback), this);
m_k051960->set_plane_order(K051960_PLANEORDER_GRADIUS3);
diff --git a/src/mame/drivers/konmedal.cpp b/src/mame/drivers/konmedal.cpp
index 0ed55c61f03..0e7dc948fae 100644
--- a/src/mame/drivers/konmedal.cpp
+++ b/src/mame/drivers/konmedal.cpp
@@ -563,6 +563,7 @@ void konmedal_state::shuriboy(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette(m_palette);
+ m_k052109->set_screen(nullptr);
m_k052109->set_tile_callback(FUNC(konmedal_state::shuriboy_tile_callback), this);
MCFG_MACHINE_START_OVERRIDE(konmedal_state, shuriboy)
@@ -587,8 +588,6 @@ void konmedal_state::fuusenpn(machine_config &config)
screen.set_screen_update(FUNC(konmedal_state::screen_update_fuusenpn));
screen.set_palette(m_palette);
- K052109(config.replace(), m_k052109, 0);
- m_k052109->set_palette(m_palette);
m_k052109->set_tile_callback(FUNC(konmedal_state::fuusenpn_tile_callback), this);
}
diff --git a/src/mame/drivers/mainevt.cpp b/src/mame/drivers/mainevt.cpp
index 6808f854784..47c2ec7f72a 100644
--- a/src/mame/drivers/mainevt.cpp
+++ b/src/mame/drivers/mainevt.cpp
@@ -43,15 +43,10 @@ Both games run on Konami's PWB351024A PCB
#include "machine/gen_latch.h"
#include "sound/ym2151.h"
#include "emupal.h"
+#include "screen.h"
#include "speaker.h"
-INTERRUPT_GEN_MEMBER(mainevt_state::mainevt_interrupt)
-{
- if (m_k052109->is_irq_enabled())
- irq0_line_hold(device);
-}
-
WRITE8_MEMBER(mainevt_state::dv_nmienable_w)
{
m_nmi_enable = data;
@@ -428,7 +423,6 @@ void mainevt_state::mainevt(machine_config &config)
/* basic machine hardware */
HD6309E(config, m_maincpu, 24_MHz_XTAL / 8); // E & Q generated by 052109
m_maincpu->set_addrmap(AS_PROGRAM, &mainevt_state::mainevt_map);
- m_maincpu->set_vblank_int("screen", FUNC(mainevt_state::mainevt_interrupt));
Z80(config, m_audiocpu, 3.579545_MHz_XTAL); /* 3.579545 MHz */
m_audiocpu->set_addrmap(AS_PROGRAM, &mainevt_state::mainevt_sound_map);
@@ -448,11 +442,13 @@ void mainevt_state::mainevt(machine_config &config)
K052109(config, m_k052109, 24_MHz_XTAL);
m_k052109->set_palette("palette");
+ m_k052109->set_screen("screen");
m_k052109->set_tile_callback(FUNC(mainevt_state::mainevt_tile_callback), this);
+ m_k052109->irq_handler().set_inputline(m_maincpu, M6809_IRQ_LINE);
K051960(config, m_k051960, 24_MHz_XTAL);
m_k051960->set_palette("palette");
- m_k051960->set_screen_tag("screen");
+ m_k051960->set_screen("screen");
m_k051960->set_sprite_callback(FUNC(mainevt_state::mainevt_sprite_callback), this);
/* sound hardware */
@@ -495,11 +491,13 @@ void mainevt_state::devstors(machine_config &config)
K052109(config, m_k052109, 24_MHz_XTAL);
m_k052109->set_palette("palette");
+ m_k052109->set_screen("screen");
m_k052109->set_tile_callback(FUNC(mainevt_state::dv_tile_callback), this);
+ m_k052109->irq_handler().set_inputline(m_maincpu, M6809_IRQ_LINE);
K051960(config, m_k051960, 24_MHz_XTAL);
m_k051960->set_palette("palette");
- m_k051960->set_screen_tag("screen");
+ m_k051960->set_screen("screen");
m_k051960->set_sprite_callback(FUNC(mainevt_state::dv_sprite_callback), this);
K051733(config, "k051733", 0);
diff --git a/src/mame/drivers/parodius.cpp b/src/mame/drivers/parodius.cpp
index ff8e3f9d787..a79d49cda8d 100644
--- a/src/mame/drivers/parodius.cpp
+++ b/src/mame/drivers/parodius.cpp
@@ -20,12 +20,6 @@
#include "speaker.h"
-INTERRUPT_GEN_MEMBER(parodius_state::parodius_interrupt)
-{
- if (m_k052109->is_irq_enabled())
- device.execute().set_input_line(0, HOLD_LINE);
-}
-
WRITE8_MEMBER(parodius_state::parodius_videobank_w)
{
if (data & 0xf8)
@@ -233,7 +227,6 @@ void parodius_state::parodius(machine_config &config)
/* basic machine hardware */
KONAMI(config, m_maincpu, 3000000); /* 053248 */
m_maincpu->set_addrmap(AS_PROGRAM, &parodius_state::parodius_map);
- m_maincpu->set_vblank_int("screen", FUNC(parodius_state::parodius_interrupt));
m_maincpu->line().set(FUNC(parodius_state::banking_callback));
Z80(config, m_audiocpu, 3579545);
@@ -257,7 +250,9 @@ void parodius_state::parodius(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette("palette");
+ m_k052109->set_screen("screen");
m_k052109->set_tile_callback(FUNC(parodius_state::tile_callback), this);
+ m_k052109->irq_handler().set_inputline(m_maincpu, KONAMI_IRQ_LINE);
K053245(config, m_k053245, 0);
m_k053245->set_palette("palette");
diff --git a/src/mame/drivers/simpsons.cpp b/src/mame/drivers/simpsons.cpp
index 4a81b67113d..33c3b1ae671 100644
--- a/src/mame/drivers/simpsons.cpp
+++ b/src/mame/drivers/simpsons.cpp
@@ -316,9 +316,6 @@ INTERRUPT_GEN_MEMBER(simpsons_state::simpsons_irq)
// 32+256us delay at 8MHz dotclock; artificially shortened since actual V-blank length is unknown
timer_set(attotime::from_usec(30), TIMER_DMAEND);
}
-
- if (m_k052109->is_irq_enabled())
- device.execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE);
}
void simpsons_state::simpsons(machine_config &config)
@@ -352,7 +349,9 @@ void simpsons_state::simpsons(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette("palette");
+ m_k052109->set_screen("screen");
m_k052109->set_tile_callback(FUNC(simpsons_state::tile_callback), this);
+ m_k052109->irq_handler().set_inputline(m_maincpu, KONAMI_IRQ_LINE);
K053246(config, m_k053246, 0);
m_k053246->set_sprite_callback(FUNC(simpsons_state::sprite_callback), this);
diff --git a/src/mame/drivers/spy.cpp b/src/mame/drivers/spy.cpp
index 16e1e56fc30..856919cec3e 100644
--- a/src/mame/drivers/spy.cpp
+++ b/src/mame/drivers/spy.cpp
@@ -31,12 +31,6 @@
#include "speaker.h"
-INTERRUPT_GEN_MEMBER(spy_state::spy_interrupt)
-{
- if (m_k052109->is_irq_enabled())
- device.execute().set_input_line(0, HOLD_LINE);
-}
-
READ8_MEMBER(spy_state::spy_bankedram1_r)
{
if (m_rambank & 1)
@@ -499,7 +493,6 @@ void spy_state::spy(machine_config &config)
/* basic machine hardware */
MC6809E(config, m_maincpu, XTAL(24'000'000) / 8); // 3 MHz? (divided by 051961)
m_maincpu->set_addrmap(AS_PROGRAM, &spy_state::spy_map);
- m_maincpu->set_vblank_int("screen", FUNC(spy_state::spy_interrupt));
Z80(config, m_audiocpu, XTAL(3'579'545));
m_audiocpu->set_addrmap(AS_PROGRAM, &spy_state::spy_sound_map); /* nmi by the sound chip */
@@ -518,13 +511,15 @@ void spy_state::spy(machine_config &config)
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 1024);
m_palette->enable_shadows();
- K052109(config, m_k052109, 0);
+ K052109(config, m_k052109, 0); // 051961 on schematics
m_k052109->set_palette(m_palette);
+ m_k052109->set_screen("screen");
m_k052109->set_tile_callback(FUNC(spy_state::tile_callback), this);
+ m_k052109->irq_handler().set_inputline(m_maincpu, M6809_IRQ_LINE);
K051960(config, m_k051960, 0);
m_k051960->set_palette(m_palette);
- m_k051960->set_screen_tag("screen");
+ m_k051960->set_screen("screen");
m_k051960->set_sprite_callback(FUNC(spy_state::sprite_callback), this);
/* sound hardware */
diff --git a/src/mame/drivers/surpratk.cpp b/src/mame/drivers/surpratk.cpp
index 99a13015cdc..814e6c2c830 100644
--- a/src/mame/drivers/surpratk.cpp
+++ b/src/mame/drivers/surpratk.cpp
@@ -19,12 +19,6 @@
#include "speaker.h"
-INTERRUPT_GEN_MEMBER(surpratk_state::surpratk_interrupt)
-{
- if (m_k052109->is_irq_enabled())
- device.execute().set_input_line(0, HOLD_LINE);
-}
-
WRITE8_MEMBER(surpratk_state::surpratk_videobank_w)
{
if (data & 0xf8)
@@ -172,7 +166,6 @@ void surpratk_state::surpratk(machine_config &config)
/* basic machine hardware */
KONAMI(config, m_maincpu, XTAL(24'000'000)/2/4); /* 053248, the clock input is 12MHz, and internal CPU divider of 4 */
m_maincpu->set_addrmap(AS_PROGRAM, &surpratk_state::surpratk_map);
- m_maincpu->set_vblank_int("screen", FUNC(surpratk_state::surpratk_interrupt));
m_maincpu->line().set(FUNC(surpratk_state::banking_callback));
ADDRESS_MAP_BANK(config, "bank0000").set_map(&surpratk_state::bank0000_map).set_options(ENDIANNESS_BIG, 8, 13, 0x800);
@@ -193,7 +186,9 @@ void surpratk_state::surpratk(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette(m_palette);
+ m_k052109->set_screen("screen");
m_k052109->set_tile_callback(FUNC(surpratk_state::tile_callback), this);
+ m_k052109->irq_handler().set_inputline(m_maincpu, KONAMI_IRQ_LINE);
K053244(config, m_k053244, 0);
m_k053244->set_palette(m_palette);
diff --git a/src/mame/drivers/thunderx.cpp b/src/mame/drivers/thunderx.cpp
index d6ce845f5b3..0358d968d0a 100644
--- a/src/mame/drivers/thunderx.cpp
+++ b/src/mame/drivers/thunderx.cpp
@@ -43,12 +43,6 @@
#include "speaker.h"
-INTERRUPT_GEN_MEMBER(thunderx_state::vblank_interrupt)
-{
- if (m_k052109->is_irq_enabled())
- device.execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE);
-}
-
void thunderx_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
switch (id)
@@ -642,7 +636,6 @@ void thunderx_state::scontra(machine_config &config)
/* basic machine hardware */
KONAMI(config, m_maincpu, XTAL(24'000'000)/2/4); /* 052001 (verified on pcb) */
m_maincpu->set_addrmap(AS_PROGRAM, &thunderx_state::scontra_map);
- m_maincpu->set_vblank_int("screen", FUNC(thunderx_state::vblank_interrupt));
Z80(config, m_audiocpu, XTAL(3'579'545)); /* verified on pcb */
m_audiocpu->set_addrmap(AS_PROGRAM, &thunderx_state::scontra_sound_map);
@@ -663,13 +656,15 @@ void thunderx_state::scontra(machine_config &config)
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 1024);
m_palette->enable_shadows();
- K052109(config, m_k052109, 0);
+ K052109(config, m_k052109, 0); // 051961 on Super Contra and Thunder Cross schematics
m_k052109->set_palette(m_palette);
+ m_k052109->set_screen("screen");
m_k052109->set_tile_callback(FUNC(thunderx_state::tile_callback), this);
+ m_k052109->irq_handler().set_inputline(m_maincpu, KONAMI_IRQ_LINE);
K051960(config, m_k051960, 0);
m_k051960->set_palette(m_palette);
- m_k051960->set_screen_tag("screen");
+ m_k051960->set_screen("screen");
m_k051960->set_sprite_callback(FUNC(thunderx_state::sprite_callback), this);
/* sound hardware */
@@ -705,6 +700,8 @@ void thunderx_state::thunderx(machine_config &config)
m_bank5800->set_map(&thunderx_state::thunderx_bank5800_map).set_addr_width(13);
+ m_k052109->nmi_handler().set_inputline(m_maincpu, INPUT_LINE_NMI);
+
config.device_remove("k007232");
}
diff --git a/src/mame/drivers/tmnt.cpp b/src/mame/drivers/tmnt.cpp
index 569396d2093..c6491d387da 100644
--- a/src/mame/drivers/tmnt.cpp
+++ b/src/mame/drivers/tmnt.cpp
@@ -1935,11 +1935,12 @@ void tmnt_state::cuebrick(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette(m_palette);
+ m_k052109->set_screen(nullptr);
m_k052109->set_tile_callback(FUNC(tmnt_state::cuebrick_tile_callback), this);
K051960(config, m_k051960, 0);
m_k051960->set_palette(m_palette);
- m_k051960->set_screen_tag("screen");
+ m_k051960->set_screen("screen");
m_k051960->set_sprite_callback(FUNC(tmnt_state::mia_sprite_callback), this);
m_k051960->set_plane_order(K051960_PLANEORDER_MIA);
@@ -1985,11 +1986,12 @@ void tmnt_state::mia(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette(m_palette);
+ m_k052109->set_screen(nullptr);
m_k052109->set_tile_callback(FUNC(tmnt_state::mia_tile_callback), this);
K051960(config, m_k051960, 0);
m_k051960->set_palette(m_palette);
- m_k051960->set_screen_tag("screen");
+ m_k051960->set_screen("screen");
m_k051960->set_sprite_callback(FUNC(tmnt_state::mia_sprite_callback), this);
m_k051960->set_plane_order(K051960_PLANEORDER_MIA);
@@ -2048,11 +2050,12 @@ void tmnt_state::tmnt(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette(m_palette);
+ m_k052109->set_screen(nullptr);
m_k052109->set_tile_callback(FUNC(tmnt_state::tmnt_tile_callback), this);
K051960(config, m_k051960, 0);
m_k051960->set_palette(m_palette);
- m_k051960->set_screen_tag("screen");
+ m_k051960->set_screen("screen");
m_k051960->set_sprite_callback(FUNC(tmnt_state::tmnt_sprite_callback), this);
m_k051960->set_plane_order(K051960_PLANEORDER_MIA);
@@ -2108,11 +2111,12 @@ void tmnt_state::punkshot(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette(m_palette);
+ m_k052109->set_screen(nullptr);
m_k052109->set_tile_callback(FUNC(tmnt_state::tmnt_tile_callback), this);
K051960(config, m_k051960, 0);
m_k051960->set_palette(m_palette);
- m_k051960->set_screen_tag("screen");
+ m_k051960->set_screen("screen");
m_k051960->set_sprite_callback(FUNC(tmnt_state::punkshot_sprite_callback), this);
K053251(config, m_k053251, 0);
@@ -2159,6 +2163,7 @@ void tmnt_state::lgtnfght(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette(m_palette);
+ m_k052109->set_screen(nullptr);
m_k052109->set_tile_callback(FUNC(tmnt_state::tmnt_tile_callback), this);
K053245(config, m_k053245, 0);
@@ -2215,6 +2220,7 @@ void tmnt_state::blswhstl(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette(m_palette);
+ m_k052109->set_screen(nullptr);
m_k052109->set_tile_callback(FUNC(tmnt_state::blswhstl_tile_callback), this);
K053245(config, m_k053245, 0);
@@ -2289,6 +2295,7 @@ void tmnt_state::glfgreat(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette(m_palette);
+ m_k052109->set_screen(nullptr);
m_k052109->set_tile_callback(FUNC(tmnt_state::tmnt_tile_callback), this);
K053245(config, m_k053245, 0);
@@ -2355,6 +2362,7 @@ void tmnt_state::prmrsocr(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette(m_palette);
+ m_k052109->set_screen(nullptr);
m_k052109->set_tile_callback(FUNC(tmnt_state::tmnt_tile_callback), this);
K053245(config, m_k053245, 0);
@@ -2417,6 +2425,7 @@ void tmnt_state::tmnt2(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette(m_palette);
+ m_k052109->set_screen(nullptr);
m_k052109->set_tile_callback(FUNC(tmnt_state::tmnt_tile_callback), this);
K053245(config, m_k053245, 0);
@@ -2472,6 +2481,7 @@ void tmnt_state::ssriders(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette(m_palette);
+ m_k052109->set_screen(nullptr);
m_k052109->set_tile_callback(FUNC(tmnt_state::tmnt_tile_callback), this);
K053245(config, m_k053245, 0);
@@ -2519,6 +2529,7 @@ void tmnt_state::sunsetbl(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette(m_palette);
+ m_k052109->set_screen(nullptr);
m_k052109->set_tile_callback(FUNC(tmnt_state::ssbl_tile_callback), this);
K053245(config, m_k053245, 0);
@@ -2567,11 +2578,12 @@ void tmnt_state::thndrx2(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette(m_palette);
+ m_k052109->set_screen(nullptr);
m_k052109->set_tile_callback(FUNC(tmnt_state::tmnt_tile_callback), this);
K051960(config, m_k051960, 0);
m_k051960->set_palette(m_palette);
- m_k051960->set_screen_tag("screen");
+ m_k051960->set_screen("screen");
m_k051960->set_sprite_callback(FUNC(tmnt_state::thndrx2_sprite_callback), this);
K053251(config, m_k053251, 0);
diff --git a/src/mame/drivers/ultraman.cpp b/src/mame/drivers/ultraman.cpp
index a459ca3d2ea..112f532b91e 100644
--- a/src/mame/drivers/ultraman.cpp
+++ b/src/mame/drivers/ultraman.cpp
@@ -205,7 +205,7 @@ void ultraman_state::ultraman(machine_config &config)
K051960(config, m_k051960, 0);
m_k051960->set_palette("palette");
- m_k051960->set_screen_tag("screen");
+ m_k051960->set_screen("screen");
m_k051960->set_sprite_callback(FUNC(ultraman_state::sprite_callback), this);
K051316(config, m_k051316[0], 0);
diff --git a/src/mame/drivers/xmen.cpp b/src/mame/drivers/xmen.cpp
index 870add938bf..46c9ef7c47d 100644
--- a/src/mame/drivers/xmen.cpp
+++ b/src/mame/drivers/xmen.cpp
@@ -326,6 +326,7 @@ void xmen_state::xmen(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette("palette");
+ m_k052109->set_screen(nullptr);
m_k052109->set_tile_callback(FUNC(xmen_state::tile_callback), this);
K053246(config, m_k053246, 0);
@@ -388,6 +389,7 @@ void xmen_state::xmen6p(machine_config &config)
K052109(config, m_k052109, 0);
m_k052109->set_palette("palette");
+ m_k052109->set_screen(nullptr);
m_k052109->set_tile_callback(FUNC(xmen_state::tile_callback), this);
K053246(config, m_k053246, 0);
diff --git a/src/mame/includes/88games.h b/src/mame/includes/88games.h
index 6c66f536d11..b26fdbd041c 100644
--- a/src/mame/includes/88games.h
+++ b/src/mame/includes/88games.h
@@ -68,7 +68,6 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
uint32_t screen_update_88games(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- 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/bottom9.h b/src/mame/includes/bottom9.h
index 34f8901c2f0..a132758868d 100644
--- a/src/mame/includes/bottom9.h
+++ b/src/mame/includes/bottom9.h
@@ -61,7 +61,6 @@ 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);
- 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/mainevt.h b/src/mame/includes/mainevt.h
index 81ec701f3ce..7707546427f 100644
--- a/src/mame/includes/mainevt.h
+++ b/src/mame/includes/mainevt.h
@@ -49,7 +49,6 @@ private:
DECLARE_WRITE8_MEMBER(dv_sh_bankswitch_w);
uint32_t screen_update_mainevt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_dv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(mainevt_interrupt);
INTERRUPT_GEN_MEMBER(dv_interrupt);
INTERRUPT_GEN_MEMBER(mainevt_sound_timer_irq);
INTERRUPT_GEN_MEMBER(devstors_sound_timer_irq);
diff --git a/src/mame/includes/parodius.h b/src/mame/includes/parodius.h
index 681bf5db30b..da6d0160fca 100644
--- a/src/mame/includes/parodius.h
+++ b/src/mame/includes/parodius.h
@@ -59,7 +59,6 @@ public:
virtual void machine_start() override;
virtual void machine_reset() override;
uint32_t screen_update_parodius(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(parodius_interrupt);
K05324X_CB_MEMBER(sprite_callback);
K052109_CB_MEMBER(tile_callback);
DECLARE_WRITE8_MEMBER(banking_callback);
diff --git a/src/mame/includes/spy.h b/src/mame/includes/spy.h
index 3335eea48d3..df2012af954 100644
--- a/src/mame/includes/spy.h
+++ b/src/mame/includes/spy.h
@@ -64,7 +64,6 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
uint32_t screen_update_spy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(spy_interrupt);
void spy_collision( );
DECLARE_WRITE8_MEMBER(volume_callback0);
DECLARE_WRITE8_MEMBER(volume_callback1);
diff --git a/src/mame/includes/surpratk.h b/src/mame/includes/surpratk.h
index 5e7d8a8cd8e..ad2f593bcc6 100644
--- a/src/mame/includes/surpratk.h
+++ b/src/mame/includes/surpratk.h
@@ -52,7 +52,6 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
uint32_t screen_update_surpratk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(surpratk_interrupt);
K05324X_CB_MEMBER(sprite_callback);
K052109_CB_MEMBER(tile_callback);
diff --git a/src/mame/includes/thunderx.h b/src/mame/includes/thunderx.h
index 7b908f97949..65f2a56183e 100644
--- a/src/mame/includes/thunderx.h
+++ b/src/mame/includes/thunderx.h
@@ -82,7 +82,6 @@ private:
virtual void video_start() override;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(vblank_interrupt);
void run_collisions( int s0, int e0, int s1, int e1, int cm, int hm );
void calculate_collisions( );
DECLARE_WRITE8_MEMBER(volume_callback);
diff --git a/src/mame/video/88games.cpp b/src/mame/video/88games.cpp
index 4d9c43b29c4..438ebfe5aba 100644
--- a/src/mame/video/88games.cpp
+++ b/src/mame/video/88games.cpp
@@ -1,7 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
+
#include "emu.h"
#include "includes/88games.h"
+#include "screen.h"
/***************************************************************************
diff --git a/src/mame/video/aliens.cpp b/src/mame/video/aliens.cpp
index 1b931864cf2..8f759509b63 100644
--- a/src/mame/video/aliens.cpp
+++ b/src/mame/video/aliens.cpp
@@ -1,7 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Manuel Abadia
+
#include "emu.h"
#include "includes/aliens.h"
+#include "screen.h"
/***************************************************************************
diff --git a/src/mame/video/bottom9.cpp b/src/mame/video/bottom9.cpp
index 4fd121f8d72..c5011e42c9f 100644
--- a/src/mame/video/bottom9.cpp
+++ b/src/mame/video/bottom9.cpp
@@ -1,7 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
+
#include "emu.h"
#include "includes/bottom9.h"
+#include "screen.h"
/***************************************************************************
diff --git a/src/mame/video/chqflag.cpp b/src/mame/video/chqflag.cpp
index c34cf757c8e..75f775a0fb3 100644
--- a/src/mame/video/chqflag.cpp
+++ b/src/mame/video/chqflag.cpp
@@ -10,6 +10,7 @@
#include "emu.h"
#include "includes/chqflag.h"
+#include "screen.h"
/***************************************************************************
diff --git a/src/mame/video/crimfght.cpp b/src/mame/video/crimfght.cpp
index 1422cd5b843..82c6e281610 100644
--- a/src/mame/video/crimfght.cpp
+++ b/src/mame/video/crimfght.cpp
@@ -1,7 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Manuel Abadia
+
#include "emu.h"
#include "includes/crimfght.h"
+#include "screen.h"
/***************************************************************************
diff --git a/src/mame/video/gradius3.cpp b/src/mame/video/gradius3.cpp
index b4acf326de0..6080c378cc3 100644
--- a/src/mame/video/gradius3.cpp
+++ b/src/mame/video/gradius3.cpp
@@ -1,7 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
+
#include "emu.h"
#include "includes/gradius3.h"
+#include "screen.h"
/***************************************************************************
diff --git a/src/mame/video/k051960.cpp b/src/mame/video/k051960.cpp
index c154b5fe958..40023ce2914 100644
--- a/src/mame/video/k051960.cpp
+++ b/src/mame/video/k051960.cpp
@@ -61,6 +61,8 @@ memory map:
#include "emu.h"
#include "k051960.h"
+#include "screen.h"
+
#define VERBOSE 0
#include "logmacro.h"
@@ -130,9 +132,9 @@ GFXDECODE_END
k051960_device::k051960_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, K051960, tag, owner, clock)
, device_gfx_interface(mconfig, *this, gfxinfo)
+ , device_video_interface(mconfig, *this)
, m_ram(nullptr)
, m_sprite_rom(*this, DEVICE_SELF)
- , m_screen(*this, finder_base::DUMMY_TAG)
, m_scanline_timer(nullptr)
, m_irq_handler(*this)
, m_firq_handler(*this)
@@ -173,14 +175,14 @@ void k051960_device::set_plane_order(int order)
void k051960_device::device_start()
{
// make sure our screen is started
- if (!m_screen->started())
+ if (!screen().started())
throw device_missing_dependencies();
if (!palette().device().started())
throw device_missing_dependencies();
// allocate scanline timer and start at first scanline
m_scanline_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(k051960_device::scanline_callback), this));
- m_scanline_timer->adjust(m_screen->time_until_pos(0));
+ m_scanline_timer->adjust(screen().time_until_pos(0));
decode_gfx();
gfx(0)->set_colors(palette().entries() / gfx(0)->depth());
@@ -232,7 +234,7 @@ void k051960_device::device_reset()
TIMER_CALLBACK_MEMBER( k051960_device::scanline_callback )
{
// range 0..255
- uint8_t y = m_screen->vpos();
+ uint8_t y = screen().vpos();
// 32v
if ((y % 32 == 0) && m_nmi_enabled)
@@ -243,7 +245,7 @@ TIMER_CALLBACK_MEMBER( k051960_device::scanline_callback )
m_irq_handler(ASSERT_LINE);
// wait for next line
- m_scanline_timer->adjust(m_screen->time_until_pos(y + 1));
+ m_scanline_timer->adjust(screen().time_until_pos(y + 1));
}
int k051960_device::k051960_fetchromdata( int byte )
@@ -290,7 +292,7 @@ u8 k051960_device::k051937_r(offs_t offset)
if (m_readroms && offset >= 4 && offset < 8)
return k051960_fetchromdata(offset & 3);
else if (offset == 0)
- return m_screen->vblank() ? 1 : 0; // vblank?
+ return screen().vblank() ? 1 : 0; // vblank?
//logerror("%s: read unknown 051937 address %x\n", m_maincpu->pc(), offset);
return 0;
diff --git a/src/mame/video/k051960.h b/src/mame/video/k051960.h
index ae8d59cf57d..ca3c114f478 100644
--- a/src/mame/video/k051960.h
+++ b/src/mame/video/k051960.h
@@ -5,8 +5,6 @@
#pragma once
-#include "screen.h"
-
enum
{
K051960_PLANEORDER_BASE = 0,
@@ -19,7 +17,7 @@ typedef device_delegate<void (int *code, int *color, int *priority, int *shadow)
#define K051960_CB_MEMBER(_name) void _name(int *code, int *color, int *priority, int *shadow)
-class k051960_device : public device_t, public device_gfx_interface
+class k051960_device : public device_t, public device_gfx_interface, public device_video_interface
{
static const gfx_layout spritelayout;
static const gfx_layout spritelayout_reverse;
@@ -41,7 +39,6 @@ public:
// static configuration
template <typename... T> void set_sprite_callback(T &&... args) { m_k051960_cb = k051960_cb_delegate(std::forward<T>(args)...); }
void set_plane_order(int order);
- template <typename T> void set_screen_tag(T &&tag) { m_screen.set_tag(std::forward<T>(tag)); }
/*
The callback is passed:
@@ -78,7 +75,6 @@ private:
required_region_ptr<uint8_t> m_sprite_rom;
- required_device<screen_device> m_screen;
emu_timer *m_scanline_timer;
k051960_cb_delegate m_k051960_cb;
diff --git a/src/mame/video/k052109.cpp b/src/mame/video/k052109.cpp
index ac29b7d9c37..4c856ce8169 100644
--- a/src/mame/video/k052109.cpp
+++ b/src/mame/video/k052109.cpp
@@ -123,6 +123,8 @@ to through the chip.
#include "emu.h"
#include "k052109.h"
+#include "screen.h"
+
#define VERBOSE 0
#include "logmacro.h"
@@ -163,6 +165,7 @@ GFXDECODE_END
k052109_device::k052109_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, K052109, tag, owner, clock),
device_gfx_interface(mconfig, *this, gfxinfo),
+ device_video_interface(mconfig, *this, false),
m_ram(nullptr),
m_videoram_F(nullptr),
m_videoram_A(nullptr),
@@ -180,7 +183,6 @@ k052109_device::k052109_device(const machine_config &mconfig, const char *tag, d
m_romsubbank(0),
m_scrollctrl(0),
m_char_rom(*this, DEVICE_SELF),
- m_screen(*this, finder_base::DUMMY_TAG),
m_irq_handler(*this),
m_firq_handler(*this),
m_nmi_handler(*this)
@@ -203,14 +205,14 @@ void k052109_device::set_char_ram(bool ram)
void k052109_device::device_start()
{
- if (m_screen.found())
+ if (has_screen())
{
// make sure our screen is started
- if (!m_screen->started())
+ if (!screen().started())
throw device_missing_dependencies();
// and register a callback for vblank state
- m_screen->register_vblank_callback(vblank_state_delegate(&k052109_device::vblank_callback, this));
+ screen().register_vblank_callback(vblank_state_delegate(&k052109_device::vblank_callback, this));
}
decode_gfx();
@@ -289,7 +291,7 @@ void k052109_device::device_post_load()
void k052109_device::vblank_callback(screen_device &screen, bool state)
{
- if (state)
+ if (state && m_irq_enabled)
m_irq_handler(ASSERT_LINE);
}
@@ -375,7 +377,7 @@ void k052109_device::write(offs_t offset, u8 data)
/* bit 2 = irq enable */
/* the custom chip can also generate NMI and FIRQ, for use with a 6809 */
m_irq_enabled = data & 0x04;
- if (m_irq_enabled)
+ if (!m_irq_enabled)
m_irq_handler(CLEAR_LINE);
}
else if (offset == 0x1d80)
@@ -657,11 +659,6 @@ void k052109_device::tilemap_draw( screen_device &screen, bitmap_ind16 &bitmap,
m_tilemap[tmap_num]->draw(screen, bitmap, cliprect, flags, priority);
}
-int k052109_device::is_irq_enabled( )
-{
- return m_irq_enabled;
-}
-
/***************************************************************************
diff --git a/src/mame/video/k052109.h b/src/mame/video/k052109.h
index 1cb9aa5c358..1721ade5083 100644
--- a/src/mame/video/k052109.h
+++ b/src/mame/video/k052109.h
@@ -5,14 +5,13 @@
#pragma once
-#include "screen.h"
#include "tilemap.h"
typedef device_delegate<void (int layer, int bank, int *code, int *color, int *flags, int *priority)> k052109_cb_delegate;
#define K052109_CB_MEMBER(_name) void _name(int layer, int bank, int *code, int *color, int *flags, int *priority)
-class k052109_device : public device_t, public device_gfx_interface
+class k052109_device : public device_t, public device_gfx_interface, public device_video_interface
{
static const gfx_layout charlayout;
static const gfx_layout charlayout_ram;
@@ -24,9 +23,10 @@ public:
~k052109_device() {}
auto irq_handler() { return m_irq_handler.bind(); }
+ auto firq_handler() { return m_firq_handler.bind(); }
+ auto nmi_handler() { return m_nmi_handler.bind(); }
template <typename... T> void set_tile_callback(T &&... args) { m_k052109_cb = k052109_cb_delegate(std::forward<T>(args)...); }
void set_char_ram(bool ram);
- template <typename T> void set_screen_tag(T &&tag) { m_screen.set_tag(std::forward<T>(tag)); }
/*
The callback is passed:
@@ -51,7 +51,7 @@ public:
void set_rmrd_line(int state);
int get_rmrd_line();
void tilemap_update();
- int is_irq_enabled();
+ int is_irq_enabled() { return m_irq_enabled; } // FIXME: remove
void tilemap_mark_dirty(int tmap_num);
void tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int tmap_num, uint32_t flags, uint8_t priority);
@@ -87,8 +87,6 @@ private:
optional_region_ptr<uint8_t> m_char_rom;
- optional_device<screen_device> m_screen;
-
k052109_cb_delegate m_k052109_cb;
devcb_write_line m_irq_handler;
diff --git a/src/mame/video/mainevt.cpp b/src/mame/video/mainevt.cpp
index 08aee6f1a7d..27dc728af8c 100644
--- a/src/mame/video/mainevt.cpp
+++ b/src/mame/video/mainevt.cpp
@@ -10,6 +10,7 @@
#include "emu.h"
#include "includes/mainevt.h"
+#include "screen.h"
/***************************************************************************
diff --git a/src/mame/video/parodius.cpp b/src/mame/video/parodius.cpp
index d830ec7c562..f1ad727f21d 100644
--- a/src/mame/video/parodius.cpp
+++ b/src/mame/video/parodius.cpp
@@ -1,7 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
+
#include "emu.h"
#include "includes/parodius.h"
+#include "screen.h"
/***************************************************************************
diff --git a/src/mame/video/spy.cpp b/src/mame/video/spy.cpp
index dd2b42bb3ea..a20356a0c37 100644
--- a/src/mame/video/spy.cpp
+++ b/src/mame/video/spy.cpp
@@ -1,7 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
+
#include "emu.h"
#include "includes/spy.h"
+#include "screen.h"
/***************************************************************************
diff --git a/src/mame/video/surpratk.cpp b/src/mame/video/surpratk.cpp
index a88c327d468..d5ecc5b088f 100644
--- a/src/mame/video/surpratk.cpp
+++ b/src/mame/video/surpratk.cpp
@@ -1,7 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
+
#include "emu.h"
#include "includes/surpratk.h"
+#include "screen.h"
/***************************************************************************
diff --git a/src/mame/video/thunderx.cpp b/src/mame/video/thunderx.cpp
index 09a2d61d983..df9e800a917 100644
--- a/src/mame/video/thunderx.cpp
+++ b/src/mame/video/thunderx.cpp
@@ -1,7 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Bryan McPhail, Manuel Abadia
+
#include "emu.h"
#include "includes/thunderx.h"
+#include "screen.h"
/***************************************************************************
diff --git a/src/mame/video/tmnt.cpp b/src/mame/video/tmnt.cpp
index f168d9b026c..c50eab7e87b 100644
--- a/src/mame/video/tmnt.cpp
+++ b/src/mame/video/tmnt.cpp
@@ -1,7 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
+
#include "emu.h"
#include "includes/tmnt.h"
+#include "screen.h"
TILE_GET_INFO_MEMBER(tmnt_state::glfgreat_get_roz_tile_info)
{
diff --git a/src/mame/video/ultraman.cpp b/src/mame/video/ultraman.cpp
index 89455909f53..d6fca6ffb25 100644
--- a/src/mame/video/ultraman.cpp
+++ b/src/mame/video/ultraman.cpp
@@ -1,7 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Manuel Abadia
+
#include "emu.h"
#include "includes/ultraman.h"
+#include "screen.h"
/***************************************************************************