summaryrefslogtreecommitdiffstats
path: root/src/mess
diff options
context:
space:
mode:
authorGravatarGravatar Aaron Giles <aaron@aarongiles.com>2013-07-24 19:20:59 +0000
committerGravatarGravatar Aaron Giles <aaron@aarongiles.com>2013-07-24 19:20:59 +0000
commit25a100d773579751d4dd58c9d4276eabdb648c3a (patch)
treea4945943e8ed7b8146d44bf684dc26138fcdcdff /src/mess
parent4719b9707a1058069a1f0901e4c0c0147a830966 (diff)
Created new device_video_interface. Right now its sole purpose is to
house a screen tag and to find the screen at startup, providing an m_screen object that can be used. One nice feature is that if there is only one screen and no screen has been specified, it will auto configure to that screen. This removes the need to explicitly specify a screen in the configuration for a large chunk of drivers (though doing so never hurts). A new macro MCFG_VIDEO_SET_SCREEN is provided, though devices are encouraged to define their own that maps there so it is obvious which device is being targeted. The device_video_interface's validation function will error if an invalid screen is specified or if no screen is provided but there are multiple screens present. Updated all devices that currently had an m_screen in them to use the device_video_interface instead. This also has the nice benefit of flagging video-related devices for categorization purposes. It also means all these devices inherit the same screen-finding behaviors. For devices that had interfaces that specified a screen tag, those have been removed and all existing structs updated. Added an optional_device<screen_device> m_screen to the base driver_device. If you name your screen "screen" (as most drivers do), you will have free access to your screen this way. Future updates include: * Updating all devices referencing machine.primary_screen to use the device_video_interface instead * Updating all drivers referencing machine.primary_screen to use the m_screen instead * Removing machine.primary_screen entirely
Diffstat (limited to 'src/mess')
-rw-r--r--src/mess/drivers/a5105.c1
-rw-r--r--src/mess/drivers/a6809.c3
-rw-r--r--src/mess/drivers/adam.c1
-rw-r--r--src/mess/drivers/alphatro.c3
-rw-r--r--src/mess/drivers/amstrad.c6
-rw-r--r--src/mess/drivers/apc.c2
-rw-r--r--src/mess/drivers/applix.c3
-rw-r--r--src/mess/drivers/apricot.c3
-rw-r--r--src/mess/drivers/apricotp.c3
-rw-r--r--src/mess/drivers/attache.c1
-rw-r--r--src/mess/drivers/b16.c3
-rw-r--r--src/mess/drivers/bbc.c4
-rw-r--r--src/mess/drivers/bbcbc.c1
-rw-r--r--src/mess/drivers/bigbord2.c3
-rw-r--r--src/mess/drivers/bml3.c3
-rw-r--r--src/mess/drivers/bw12.c3
-rw-r--r--src/mess/drivers/c128.c1
-rw-r--r--src/mess/drivers/c65.c2
-rw-r--r--src/mess/drivers/camplynx.c6
-rw-r--r--src/mess/drivers/cbm2.c3
-rw-r--r--src/mess/drivers/coleco.c1
-rw-r--r--src/mess/drivers/compis.c1
-rw-r--r--src/mess/drivers/cortex.c1
-rw-r--r--src/mess/drivers/crvision.c1
-rw-r--r--src/mess/drivers/dgn_beta.c2
-rw-r--r--src/mess/drivers/dim68k.c3
-rw-r--r--src/mess/drivers/dmv.c1
-rw-r--r--src/mess/drivers/ec65.c5
-rw-r--r--src/mess/drivers/einstein.c5
-rw-r--r--src/mess/drivers/fp1100.c3
-rw-r--r--src/mess/drivers/fp6000.c3
-rw-r--r--src/mess/drivers/h19.c3
-rw-r--r--src/mess/drivers/hp9k.c13
-rw-r--r--src/mess/drivers/if800.c1
-rw-r--r--src/mess/drivers/ipds.c1
-rw-r--r--src/mess/drivers/kaypro.c3
-rw-r--r--src/mess/drivers/m20.c3
-rw-r--r--src/mess/drivers/m5.c1
-rw-r--r--src/mess/drivers/mbc200.c3
-rw-r--r--src/mess/drivers/mbc55x.c2
-rw-r--r--src/mess/drivers/mbee.c14
-rw-r--r--src/mess/drivers/mc10.c7
-rw-r--r--src/mess/drivers/micronic.c1
-rw-r--r--src/mess/drivers/msx.c1
-rw-r--r--src/mess/drivers/mtx.c1
-rw-r--r--src/mess/drivers/multi16.c3
-rw-r--r--src/mess/drivers/multi8.c3
-rw-r--r--src/mess/drivers/myb3k.c3
-rw-r--r--src/mess/drivers/mycom.c3
-rw-r--r--src/mess/drivers/mz3500.c2
-rw-r--r--src/mess/drivers/mz6500.c1
-rw-r--r--src/mess/drivers/nes.c1
-rw-r--r--src/mess/drivers/odyssey2.c2
-rw-r--r--src/mess/drivers/paso1600.c3
-rw-r--r--src/mess/drivers/pasopia.c3
-rw-r--r--src/mess/drivers/pasopia7.c5
-rw-r--r--src/mess/drivers/pc8001.c1
-rw-r--r--src/mess/drivers/pc9801.c2
-rw-r--r--src/mess/drivers/pce.c2
-rw-r--r--src/mess/drivers/pcfx.c1
-rw-r--r--src/mess/drivers/pencil2.c1
-rw-r--r--src/mess/drivers/pet.c4
-rw-r--r--src/mess/drivers/portfoli.c1
-rw-r--r--src/mess/drivers/pv1000.c2
-rw-r--r--src/mess/drivers/pv2000.c1
-rw-r--r--src/mess/drivers/pyl601.c6
-rw-r--r--src/mess/drivers/qx10.c1
-rw-r--r--src/mess/drivers/rainbow.c1
-rw-r--r--src/mess/drivers/rt1715.c1
-rw-r--r--src/mess/drivers/sg1000.c1
-rw-r--r--src/mess/drivers/sm1800.c1
-rw-r--r--src/mess/drivers/smc777.c3
-rw-r--r--src/mess/drivers/sms.c9
-rw-r--r--src/mess/drivers/socrates.c2
-rw-r--r--src/mess/drivers/super80.c3
-rw-r--r--src/mess/drivers/svi318.c5
-rw-r--r--src/mess/drivers/tandy2k.c2
-rw-r--r--src/mess/drivers/tdv2324.c1
-rw-r--r--src/mess/drivers/ti99_4x.c1
-rw-r--r--src/mess/drivers/ti99_8.c1
-rw-r--r--src/mess/drivers/tim100.c1
-rw-r--r--src/mess/drivers/tm990189.c1
-rw-r--r--src/mess/drivers/trs80m2.c5
-rw-r--r--src/mess/drivers/tutor.c1
-rw-r--r--src/mess/drivers/tvc.c3
-rw-r--r--src/mess/drivers/v6809.c3
-rw-r--r--src/mess/drivers/vg5k.c7
-rw-r--r--src/mess/drivers/victor9k.c3
-rw-r--r--src/mess/drivers/vidbrain.c1
-rw-r--r--src/mess/drivers/vii.c18
-rw-r--r--src/mess/drivers/vk100.c5
-rw-r--r--src/mess/drivers/vt100.c1
-rw-r--r--src/mess/drivers/vt240.c1
-rw-r--r--src/mess/drivers/x1.c3
-rw-r--r--src/mess/drivers/x1twin.c3
-rw-r--r--src/mess/drivers/z100.c3
-rw-r--r--src/mess/drivers/zrt80.c3
-rw-r--r--src/mess/includes/a7800.h2
-rw-r--r--src/mess/includes/amstrad.h2
-rw-r--r--src/mess/includes/aquarius.h2
-rw-r--r--src/mess/includes/mac.h2
-rw-r--r--src/mess/includes/macpci.h2
-rw-r--r--src/mess/includes/mz700.h2
-rw-r--r--src/mess/includes/pcw.h2
-rw-r--r--src/mess/includes/zx.h2
-rw-r--r--src/mess/machine/a2arcadebd.c1
-rw-r--r--src/mess/machine/a2videoterm.c3
-rw-r--r--src/mess/machine/amstrad.c2
-rw-r--r--src/mess/machine/c64/xl80.c3
-rw-r--r--src/mess/machine/comx_clm.c3
-rw-r--r--src/mess/machine/ecb_grip.c6
-rw-r--r--src/mess/machine/mz700.c2
-rw-r--r--src/mess/machine/radio86.c4
-rw-r--r--src/mess/machine/sms_lphaser.c2
-rw-r--r--src/mess/machine/sms_lphaser.h2
-rw-r--r--src/mess/machine/wangpc_lvc.c3
-rw-r--r--src/mess/machine/wangpc_mvc.c3
-rw-r--r--src/mess/machine/wangpc_tig.c2
-rw-r--r--src/mess/video/abc1600.c3
-rw-r--r--src/mess/video/abc800.c3
-rw-r--r--src/mess/video/abc802.c3
-rw-r--r--src/mess/video/abc806.c3
-rw-r--r--src/mess/video/bbc.c1
-rw-r--r--src/mess/video/comx35.c4
-rw-r--r--src/mess/video/crtc_ega.c14
-rw-r--r--src/mess/video/crtc_ega.h6
-rw-r--r--src/mess/video/dgn_beta.c1
-rw-r--r--src/mess/video/ef9345.c28
-rw-r--r--src/mess/video/ef9345.h13
-rw-r--r--src/mess/video/gb_lcd.c3
-rw-r--r--src/mess/video/gb_lcd.h4
-rw-r--r--src/mess/video/isa_cga.c3
-rw-r--r--src/mess/video/isa_ega.c2
-rw-r--r--src/mess/video/isa_mda.c6
-rw-r--r--src/mess/video/k1ge.c3
-rw-r--r--src/mess/video/k1ge.h10
-rw-r--r--src/mess/video/kyocera.c1
-rw-r--r--src/mess/video/mbc55x.c1
-rw-r--r--src/mess/video/mikromik.c2
-rw-r--r--src/mess/video/mos6566.c3
-rw-r--r--src/mess/video/mos6566.h27
-rw-r--r--src/mess/video/nick.c2
-rw-r--r--src/mess/video/nick.h8
-rw-r--r--src/mess/video/nubus_m2hires.c13
-rw-r--r--src/mess/video/nubus_m2hires.h2
-rw-r--r--src/mess/video/nubus_m2video.c13
-rw-r--r--src/mess/video/nubus_m2video.h2
-rw-r--r--src/mess/video/nubus_radiustpd.c13
-rw-r--r--src/mess/video/nubus_radiustpd.h2
-rw-r--r--src/mess/video/nubus_spec8.c12
-rw-r--r--src/mess/video/nubus_spec8.h2
-rw-r--r--src/mess/video/nubus_specpdq.c11
-rw-r--r--src/mess/video/nubus_specpdq.h2
-rw-r--r--src/mess/video/nubus_wsportrait.c12
-rw-r--r--src/mess/video/nubus_wsportrait.h2
-rw-r--r--src/mess/video/pc1512.c3
-rw-r--r--src/mess/video/pc8401a.c3
-rw-r--r--src/mess/video/pc_aga.c3
-rw-r--r--src/mess/video/pc_t1t.c6
-rw-r--r--src/mess/video/pds30_30hr.c13
-rw-r--r--src/mess/video/pds30_30hr.h2
-rw-r--r--src/mess/video/pds30_cb264.c13
-rw-r--r--src/mess/video/pds30_cb264.h2
-rw-r--r--src/mess/video/pds30_mc30.c13
-rw-r--r--src/mess/video/pds30_mc30.h2
-rw-r--r--src/mess/video/pds30_procolor816.c13
-rw-r--r--src/mess/video/pds30_procolor816.h2
-rw-r--r--src/mess/video/pds30_sigmalview.c11
-rw-r--r--src/mess/video/pds30_sigmalview.h2
-rw-r--r--src/mess/video/pds_tpdfpd.c12
-rw-r--r--src/mess/video/pds_tpdfpd.h2
-rw-r--r--src/mess/video/pecom.c1
-rw-r--r--src/mess/video/tmc600.c1
-rw-r--r--src/mess/video/uv201.c6
-rw-r--r--src/mess/video/uv201.h6
-rw-r--r--src/mess/video/v1050.c3
-rw-r--r--src/mess/video/vic4567.c31
-rw-r--r--src/mess/video/vic4567.h6
-rw-r--r--src/mess/video/vtvideo.c11
-rw-r--r--src/mess/video/vtvideo.h3
-rw-r--r--src/mess/video/zx8301.c5
-rw-r--r--src/mess/video/zx8301.h2
182 files changed, 247 insertions, 501 deletions
diff --git a/src/mess/drivers/a5105.c b/src/mess/drivers/a5105.c
index 8ccea5953c7..554b8309346 100644
--- a/src/mess/drivers/a5105.c
+++ b/src/mess/drivers/a5105.c
@@ -535,7 +535,6 @@ void a5105_state::video_start()
static UPD7220_INTERFACE( hgdc_intf )
{
- "screen",
hgdc_display_pixels,
hgdc_draw_text,
DEVCB_NULL,
diff --git a/src/mess/drivers/a6809.c b/src/mess/drivers/a6809.c
index 21fe94d0f5a..048e779c48c 100644
--- a/src/mess/drivers/a6809.c
+++ b/src/mess/drivers/a6809.c
@@ -85,7 +85,6 @@ static MC6845_UPDATE_ROW( a6809_update_row )
static MC6845_INTERFACE( a6809_crtc6845_interface )
{
- "screen",
false,
12 /*?*/,
NULL,
@@ -196,7 +195,7 @@ static MACHINE_CONFIG_START( a6809, a6809_state )
/* Devices */
MCFG_VIA6522_ADD("via", XTAL_4MHz / 4, via_intf)
- MCFG_MC6845_ADD("mc6845", MC6845, XTAL_4MHz / 2, a6809_crtc6845_interface)
+ MCFG_MC6845_ADD("mc6845", MC6845, "screen", XTAL_4MHz / 2, a6809_crtc6845_interface)
MCFG_ASCII_KEYBOARD_ADD("keyboard", kb_intf)
MCFG_CASSETTE_ADD( "cassette", default_cassette_interface )
MCFG_TIMER_DRIVER_ADD_PERIODIC("a6809_c", a6809_state, a6809_c, attotime::from_hz(4800))
diff --git a/src/mess/drivers/adam.c b/src/mess/drivers/adam.c
index d9e3de55647..db2bff61282 100644
--- a/src/mess/drivers/adam.c
+++ b/src/mess/drivers/adam.c
@@ -970,7 +970,6 @@ WRITE_LINE_MEMBER( adam_state::vdc_int_w )
static TMS9928A_INTERFACE( vdc_intf )
{
- SCREEN_TAG,
0x4000,
DEVCB_DRIVER_LINE_MEMBER(adam_state, vdc_int_w)
};
diff --git a/src/mess/drivers/alphatro.c b/src/mess/drivers/alphatro.c
index 93d492f4271..54fb6cbc6fc 100644
--- a/src/mess/drivers/alphatro.c
+++ b/src/mess/drivers/alphatro.c
@@ -401,7 +401,6 @@ void alphatro_state::palette_init()
static MC6845_INTERFACE( alphatro_crtc6845_interface )
{
- "screen",
false,
8,
NULL,
@@ -485,7 +484,7 @@ static MACHINE_CONFIG_START( alphatro, alphatro_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
/* Devices */
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_12_288MHz / 8, alphatro_crtc6845_interface) // clk unknown
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_12_288MHz / 8, alphatro_crtc6845_interface) // clk unknown
MCFG_I8251_ADD("usart", alphatro_usart_interface)
diff --git a/src/mess/drivers/amstrad.c b/src/mess/drivers/amstrad.c
index fa987ec7f78..08346a70f79 100644
--- a/src/mess/drivers/amstrad.c
+++ b/src/mess/drivers/amstrad.c
@@ -856,7 +856,7 @@ static MACHINE_CONFIG_START( amstrad_nofdc, amstrad_state )
MCFG_PALETTE_LENGTH(32)
MCFG_PALETTE_INIT_OVERRIDE(amstrad_state,amstrad_cpc)
- MCFG_MC6845_ADD( "mc6845", MC6845, XTAL_16MHz / 16, amstrad_mc6845_intf )
+ MCFG_MC6845_ADD( "mc6845", MC6845, NULL, XTAL_16MHz / 16, amstrad_mc6845_intf )
MCFG_VIDEO_START_OVERRIDE(amstrad_state,amstrad)
@@ -930,7 +930,7 @@ static MACHINE_CONFIG_START( cpcplus, amstrad_state )
MCFG_PALETTE_LENGTH(4096)
MCFG_PALETTE_INIT_OVERRIDE(amstrad_state,amstrad_plus)
- MCFG_MC6845_ADD( "mc6845", MC6845, XTAL_40MHz / 40, amstrad_plus_mc6845_intf )
+ MCFG_MC6845_ADD( "mc6845", MC6845, NULL, XTAL_40MHz / 40, amstrad_plus_mc6845_intf )
MCFG_VIDEO_START_OVERRIDE(amstrad_state,amstrad)
@@ -989,7 +989,7 @@ static MACHINE_CONFIG_START( gx4000, amstrad_state )
MCFG_PALETTE_LENGTH(4096)
MCFG_PALETTE_INIT_OVERRIDE(amstrad_state,amstrad_plus)
- MCFG_MC6845_ADD( "mc6845", MC6845, XTAL_40MHz / 40, amstrad_plus_mc6845_intf )
+ MCFG_MC6845_ADD( "mc6845", MC6845, NULL, XTAL_40MHz / 40, amstrad_plus_mc6845_intf )
MCFG_VIDEO_START_OVERRIDE(amstrad_state,amstrad)
diff --git a/src/mess/drivers/apc.c b/src/mess/drivers/apc.c
index fd6ea279153..0f2c636c823 100644
--- a/src/mess/drivers/apc.c
+++ b/src/mess/drivers/apc.c
@@ -780,7 +780,6 @@ void apc_state::palette_init()
static UPD7220_INTERFACE( hgdc_1_intf )
{
- "screen",
NULL,
hgdc_draw_text,
DEVCB_NULL,
@@ -791,7 +790,6 @@ static UPD7220_INTERFACE( hgdc_1_intf )
static UPD7220_INTERFACE( hgdc_2_intf )
{
- "screen",
hgdc_display_pixels,
NULL,
DEVCB_NULL,
diff --git a/src/mess/drivers/applix.c b/src/mess/drivers/applix.c
index c14a0c6bd58..c0372c0e2b9 100644
--- a/src/mess/drivers/applix.c
+++ b/src/mess/drivers/applix.c
@@ -823,7 +823,6 @@ static MC6845_UPDATE_ROW( applix_update_row )
static MC6845_INTERFACE( applix_crtc )
{
- "screen", /* name of screen */
false, // should show a border
8, /* number of dots per character */
NULL,
@@ -921,7 +920,7 @@ static MACHINE_CONFIG_START( applix, applix_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
/* Devices */
- MCFG_MC6845_ADD("crtc", MC6845, 1875000, applix_crtc) // 6545
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", 1875000, applix_crtc) // 6545
MCFG_VIA6522_ADD("via6522", 0, applix_via)
MCFG_CENTRONICS_PRINTER_ADD("centronics", applix_centronics_config)
MCFG_CASSETTE_ADD("cassette", applix_cassette_interface)
diff --git a/src/mess/drivers/apricot.c b/src/mess/drivers/apricot.c
index 7f91e2b39a4..8cb9f8bd033 100644
--- a/src/mess/drivers/apricot.c
+++ b/src/mess/drivers/apricot.c
@@ -241,7 +241,6 @@ WRITE_LINE_MEMBER( apricot_state::apricot_mc6845_de )
static MC6845_INTERFACE( apricot_mc6845_intf )
{
- "screen",
false,
10,
NULL,
@@ -395,7 +394,7 @@ static MACHINE_CONFIG_START( apricot, apricot_state )
MCFG_RAM_EXTRA_OPTIONS("384k,512k") /* with 1 or 2 128k expansion boards */
/* Devices */
- MCFG_MC6845_ADD("ic30", MC6845, XTAL_15MHz / 10, apricot_mc6845_intf)
+ MCFG_MC6845_ADD("ic30", MC6845, "screen", XTAL_15MHz / 10, apricot_mc6845_intf)
MCFG_I8255A_ADD("ic17", apricot_i8255a_intf)
MCFG_PIC8259_ADD("ic31", INPUTLINE("maincpu",0), VCC, NULL)
MCFG_PIT8253_ADD("ic16", apricot_pit8253_intf)
diff --git a/src/mess/drivers/apricotp.c b/src/mess/drivers/apricotp.c
index 581542fb362..a11a0e498d2 100644
--- a/src/mess/drivers/apricotp.c
+++ b/src/mess/drivers/apricotp.c
@@ -59,7 +59,6 @@ static MC6845_UPDATE_ROW( fp_update_row )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_CRT_TAG,
false,
8,
NULL,
@@ -641,7 +640,7 @@ static MACHINE_CONFIG_START( fp, fp_state )
MCFG_PALETTE_LENGTH(16)
MCFG_GFXDECODE(act_f1)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, 4000000, crtc_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_CRT_TAG, 4000000, crtc_intf)
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mess/drivers/attache.c b/src/mess/drivers/attache.c
index e09ad4b6368..b366c420480 100644
--- a/src/mess/drivers/attache.c
+++ b/src/mess/drivers/attache.c
@@ -940,7 +940,6 @@ static const z80_daisy_config attache_daisy_chain[] =
static const tms9927_interface crtc_interface =
{
- "screen",
8, // guessing for now
NULL
};
diff --git a/src/mess/drivers/b16.c b/src/mess/drivers/b16.c
index e4c60338079..d212238986d 100644
--- a/src/mess/drivers/b16.c
+++ b/src/mess/drivers/b16.c
@@ -253,7 +253,6 @@ void b16_state::machine_reset()
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -305,7 +304,7 @@ static MACHINE_CONFIG_START( b16, b16_state )
MCFG_SCREEN_SIZE(640, 400)
MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 400-1)
- MCFG_MC6845_ADD("crtc", H46505, XTAL_14_31818MHz/5, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_14_31818MHz/5, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_I8237_ADD("8237dma", XTAL_14_31818MHz/2, b16_dma8237_interface)
MCFG_GFXDECODE(b16)
diff --git a/src/mess/drivers/bbc.c b/src/mess/drivers/bbc.c
index af23ee65363..5bfe3b0bc98 100644
--- a/src/mess/drivers/bbc.c
+++ b/src/mess/drivers/bbc.c
@@ -868,7 +868,7 @@ static MACHINE_CONFIG_START( bbca, bbc_state )
MCFG_PALETTE_INIT_OVERRIDE(bbc_state,bbc)
MCFG_SAA5050_ADD("saa505x", XTAL_12MHz/2, trom_intf)
- MCFG_MC6845_ADD("mc6845",MC6845,2000000, bbc_mc6845_intf)
+ MCFG_MC6845_ADD("mc6845",MC6845,"screen",2000000, bbc_mc6845_intf)
MCFG_VIDEO_START_OVERRIDE(bbc_state,bbca)
@@ -963,7 +963,7 @@ static MACHINE_CONFIG_START( bbcm, bbc_state )
MCFG_SAA5050_ADD("saa505x", XTAL_12MHz/2, trom_intf)
- MCFG_MC6845_ADD("mc6845",MC6845,2000000, bbc_mc6845_intf)
+ MCFG_MC6845_ADD("mc6845",MC6845,"screen",2000000, bbc_mc6845_intf)
MCFG_VIDEO_START_OVERRIDE(bbc_state,bbcm)
diff --git a/src/mess/drivers/bbcbc.c b/src/mess/drivers/bbcbc.c
index be99563a245..a21a0e2a56b 100644
--- a/src/mess/drivers/bbcbc.c
+++ b/src/mess/drivers/bbcbc.c
@@ -108,7 +108,6 @@ WRITE_LINE_MEMBER(bbcbc_state::tms_interrupt)
static TMS9928A_INTERFACE(tms9129_interface)
{
- "screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(bbcbc_state, tms_interrupt)
};
diff --git a/src/mess/drivers/bigbord2.c b/src/mess/drivers/bigbord2.c
index 0dda0765d92..1b7a5c98938 100644
--- a/src/mess/drivers/bigbord2.c
+++ b/src/mess/drivers/bigbord2.c
@@ -701,7 +701,6 @@ MC6845_UPDATE_ROW( bigbord2_update_row )
static MC6845_INTERFACE( bigbord2_crtc )
{
- SCREEN_TAG, /* name of screen */
false,
8, /* number of dots per character */
NULL,
@@ -744,7 +743,7 @@ static MACHINE_CONFIG_START( bigbord2, bigbord2_state )
MCFG_Z80CTC_ADD(Z80CTCB_TAG, MAIN_CLOCK / 6, ctcb_intf)
MCFG_FD1793_ADD("fdc", fdc_intf)
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(bigbord2_floppy_interface)
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_16MHz / 8, bigbord2_crtc)
+ MCFG_MC6845_ADD("crtc", MC6845, SCREEN_TAG, XTAL_16MHz / 8, bigbord2_crtc)
MCFG_ASCII_KEYBOARD_ADD(KEYBOARD_TAG, keyboard_intf)
/* sound hardware */
diff --git a/src/mess/drivers/bml3.c b/src/mess/drivers/bml3.c
index b4acc1898a4..53f993e0a5d 100644
--- a/src/mess/drivers/bml3.c
+++ b/src/mess/drivers/bml3.c
@@ -703,7 +703,6 @@ INPUT_PORTS_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -1015,7 +1014,7 @@ static MACHINE_CONFIG_START( bml3_common, bml3_state )
/* Devices */
// CRTC clock should be synchronous with the CPU clock.
- MCFG_MC6845_ADD("crtc", H46505, CPU_CLOCK, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", H46505, "screen", CPU_CLOCK, mc6845_intf)
// fire once per scan of an individual key
// According to the service manual (p.65), the keyboard timer is driven by the horizontal video sync clock.
MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard_timer", bml3_state, keyboard_callback, attotime::from_hz(H_CLOCK/2))
diff --git a/src/mess/drivers/bw12.c b/src/mess/drivers/bw12.c
index 657ac56c3f2..7f3df287ea9 100644
--- a/src/mess/drivers/bw12.c
+++ b/src/mess/drivers/bw12.c
@@ -355,7 +355,6 @@ static MC6845_UPDATE_ROW( bw12_update_row )
static MC6845_INTERFACE( bw12_mc6845_interface )
{
- SCREEN_TAG,
false,
8,
NULL,
@@ -665,7 +664,7 @@ static MACHINE_CONFIG_START( common, bw12_state )
MCFG_GFXDECODE(bw12)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, XTAL_16MHz/8, bw12_mc6845_interface)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, XTAL_16MHz/8, bw12_mc6845_interface)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mess/drivers/c128.c b/src/mess/drivers/c128.c
index 1314dad0d56..350dadc490e 100644
--- a/src/mess/drivers/c128.c
+++ b/src/mess/drivers/c128.c
@@ -873,7 +873,6 @@ GFXDECODE_END
static MC6845_INTERFACE( vdc_intf )
{
- SCREEN_VDC_TAG,
false,
8,
NULL,
diff --git a/src/mess/drivers/c65.c b/src/mess/drivers/c65.c
index 180acf22c53..e834cc20127 100644
--- a/src/mess/drivers/c65.c
+++ b/src/mess/drivers/c65.c
@@ -362,7 +362,6 @@ READ8_MEMBER(c65_state::c65_c64_mem_r)
}
static const vic3_interface c65_vic3_ntsc_intf = {
- "screen",
"maincpu",
VIC4567_NTSC,
DEVCB_DRIVER_MEMBER(c65_state,c65_lightpen_x_cb),
@@ -376,7 +375,6 @@ static const vic3_interface c65_vic3_ntsc_intf = {
};
static const vic3_interface c65_vic3_pal_intf = {
- "screen",
"maincpu",
VIC4567_PAL,
DEVCB_DRIVER_MEMBER(c65_state,c65_lightpen_x_cb),
diff --git a/src/mess/drivers/camplynx.c b/src/mess/drivers/camplynx.c
index dcd17b40cef..89452a913ba 100644
--- a/src/mess/drivers/camplynx.c
+++ b/src/mess/drivers/camplynx.c
@@ -433,7 +433,6 @@ void camplynx_state::video_start()
static MC6845_INTERFACE( lynx48k_crtc6845_interface )
{
- "screen",
false,
8,
NULL,
@@ -449,7 +448,6 @@ static MC6845_INTERFACE( lynx48k_crtc6845_interface )
static MC6845_INTERFACE( lynx128k_crtc6845_interface )
{
- "screen", /* screen name */
false,
8, /* dots per character */
NULL,
@@ -485,7 +483,7 @@ static MACHINE_CONFIG_START( lynx48k, camplynx_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.8)
/* Devices */
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_12MHz / 8 /*? dot clock divided by dots per char */, lynx48k_crtc6845_interface)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_12MHz / 8 /*? dot clock divided by dots per char */, lynx48k_crtc6845_interface)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( lynx128k, camplynx_state )
@@ -512,7 +510,7 @@ static MACHINE_CONFIG_START( lynx128k, camplynx_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.8)
/* Devices */
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_12MHz / 8 /*? dot clock divided by dots per char */, lynx128k_crtc6845_interface)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_12MHz / 8 /*? dot clock divided by dots per char */, lynx128k_crtc6845_interface)
MACHINE_CONFIG_END
DRIVER_INIT_MEMBER(camplynx_state,lynx48k)
diff --git a/src/mess/drivers/cbm2.c b/src/mess/drivers/cbm2.c
index fce11759cda..ff0663b3a74 100644
--- a/src/mess/drivers/cbm2.c
+++ b/src/mess/drivers/cbm2.c
@@ -1130,7 +1130,6 @@ static MC6845_UPDATE_ROW( crtc_update_row )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
9,
NULL,
@@ -2296,7 +2295,7 @@ static MACHINE_CONFIG_START( cbm2lp_ntsc, cbm2_state )
MCFG_SCREEN_SIZE(768, 312)
MCFG_SCREEN_VISIBLE_AREA(0, 768-1, 0, 312-1)
- MCFG_MC6845_ADD(MC68B45_TAG, MC6845, XTAL_18MHz/9, crtc_intf)
+ MCFG_MC6845_ADD(MC68B45_TAG, MC6845, SCREEN_TAG, XTAL_18MHz/9, crtc_intf)
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mess/drivers/coleco.c b/src/mess/drivers/coleco.c
index 04128229adb..f6f69ea7eff 100644
--- a/src/mess/drivers/coleco.c
+++ b/src/mess/drivers/coleco.c
@@ -233,7 +233,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(coleco_state::paddle_update_callback)
static TMS9928A_INTERFACE(coleco_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(coleco_state,coleco_vdp_interrupt)
};
diff --git a/src/mess/drivers/compis.c b/src/mess/drivers/compis.c
index 572fc931b66..fb2451df97f 100644
--- a/src/mess/drivers/compis.c
+++ b/src/mess/drivers/compis.c
@@ -135,7 +135,6 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
static UPD7220_INTERFACE( hgdc_intf )
{
- "screen",
hgdc_display_pixels,
NULL,
DEVCB_NULL,
diff --git a/src/mess/drivers/cortex.c b/src/mess/drivers/cortex.c
index c35520fd656..a4d1ef0f1f5 100644
--- a/src/mess/drivers/cortex.c
+++ b/src/mess/drivers/cortex.c
@@ -81,7 +81,6 @@ static const struct tms9995reset_param cortex_processor_config =
static TMS9928A_INTERFACE(cortex_tms9929a_interface)
{
- "screen", // screen tag
0x4000, // vram size
DEVCB_NULL // write line if int changes
};
diff --git a/src/mess/drivers/crvision.c b/src/mess/drivers/crvision.c
index 2c4417d1a48..cd8d15c93fc 100644
--- a/src/mess/drivers/crvision.c
+++ b/src/mess/drivers/crvision.c
@@ -499,7 +499,6 @@ INPUT_PORTS_END
static TMS9928A_INTERFACE( vdp_intf )
{
- SCREEN_TAG,
0x4000,
DEVCB_CPU_INPUT_LINE(M6502_TAG, INPUT_LINE_IRQ0)
};
diff --git a/src/mess/drivers/dgn_beta.c b/src/mess/drivers/dgn_beta.c
index 88eeb746d38..5ce16d3a115 100644
--- a/src/mess/drivers/dgn_beta.c
+++ b/src/mess/drivers/dgn_beta.c
@@ -348,7 +348,7 @@ static MACHINE_CONFIG_START( dgnbeta, dgn_beta_state )
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(dgnbeta_floppy_interface)
- MCFG_MC6845_ADD("crtc", HD6845, XTAL_12_288MHz / 16, dgnbeta_crtc6845_interface) //XTAL is guessed
+ MCFG_MC6845_ADD("crtc", HD6845, "screen", XTAL_12_288MHz / 16, dgnbeta_crtc6845_interface) //XTAL is guessed
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
diff --git a/src/mess/drivers/dim68k.c b/src/mess/drivers/dim68k.c
index 0d1532644e4..681993679e0 100644
--- a/src/mess/drivers/dim68k.c
+++ b/src/mess/drivers/dim68k.c
@@ -292,7 +292,6 @@ GFXDECODE_END
static MC6845_INTERFACE( dim68k_crtc )
{
- "screen", /* name of screen */
false,
8, /* number of dots per character - switchable 7 or 8 */
NULL,
@@ -344,7 +343,7 @@ static MACHINE_CONFIG_START( dim68k, dim68k_state )
MCFG_UPD765A_ADD("fdc", true, true) // these options unknown
MCFG_FLOPPY_DRIVE_ADD("fdc:0", dim68k_floppies, "525hd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", dim68k_floppies, "525hd", floppy_image_device::default_floppy_formats)
- MCFG_MC6845_ADD("crtc", MC6845, 1790000, dim68k_crtc)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", 1790000, dim68k_crtc)
MCFG_ASCII_KEYBOARD_ADD("keyboard", kb_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/dmv.c b/src/mess/drivers/dmv.c
index dab479967c3..ce91aebd07f 100644
--- a/src/mess/drivers/dmv.c
+++ b/src/mess/drivers/dmv.c
@@ -264,7 +264,6 @@ GFXDECODE_END
static UPD7220_INTERFACE( hgdc_intf )
{
- "screen",
hgdc_display_pixels,
hgdc_draw_text,
DEVCB_NULL,
diff --git a/src/mess/drivers/ec65.c b/src/mess/drivers/ec65.c
index a65a87fc594..e85c285b4c0 100644
--- a/src/mess/drivers/ec65.c
+++ b/src/mess/drivers/ec65.c
@@ -216,7 +216,6 @@ static MC6845_UPDATE_ROW( ec65_update_row )
static MC6845_INTERFACE( ec65_crtc6845_interface )
{
- "screen",
false,
8 /*?*/,
NULL,
@@ -267,7 +266,7 @@ static MACHINE_CONFIG_START( ec65, ec65_state )
MCFG_PALETTE_LENGTH(2)
MCFG_PALETTE_INIT_OVERRIDE(driver_device, black_and_white)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, XTAL_16MHz / 8, ec65_crtc6845_interface)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, "screen", XTAL_16MHz / 8, ec65_crtc6845_interface)
/* devices */
@@ -298,7 +297,7 @@ static MACHINE_CONFIG_START( ec65k, ec65_state )
MCFG_PALETTE_LENGTH(2)
MCFG_PALETTE_INIT_OVERRIDE(driver_device, black_and_white)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, XTAL_16MHz / 8, ec65_crtc6845_interface)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, "screen", XTAL_16MHz / 8, ec65_crtc6845_interface)
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/einstein.c b/src/mess/drivers/einstein.c
index c5e5ddd5b93..f36af1c7ba2 100644
--- a/src/mess/drivers/einstein.c
+++ b/src/mess/drivers/einstein.c
@@ -383,7 +383,6 @@ WRITE8_MEMBER(einstein_state::einstein_fire_int_w)
static TMS9928A_INTERFACE(einstein_tms9929a_interface)
{
- "screen",
0x4000, /* 16k RAM, provided by IC i040 and i041 */
DEVCB_NULL
};
@@ -695,7 +694,6 @@ static const centronics_interface einstein_centronics_config =
static MC6845_INTERFACE( einstein_crtc6845_interface )
{
- "80column",
false,
8,
NULL,
@@ -756,6 +754,7 @@ static MACHINE_CONFIG_START( einstein, einstein_state )
/* video hardware */
MCFG_TMS9928A_ADD( "tms9929a", TMS9929A, einstein_tms9929a_interface )
+ MCFG_TMS9928A_SET_SCREEN( "screen" )
MCFG_TMS9928A_SCREEN_ADD_PAL( "screen" )
MCFG_SCREEN_UPDATE_DEVICE( "tms9929a", tms9929a_device, screen_update )
@@ -810,7 +809,7 @@ static MACHINE_CONFIG_DERIVED( einstei2, einstein )
/* 2 additional colors for the 80 column screen */
MCFG_PALETTE_LENGTH(TMS9928A_PALETTE_SIZE + 2)
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_X002 / 4, einstein_crtc6845_interface)
+ MCFG_MC6845_ADD("crtc", MC6845, "80column", XTAL_X002 / 4, einstein_crtc6845_interface)
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/fp1100.c b/src/mess/drivers/fp1100.c
index 4bdc4bbd2aa..5110b805808 100644
--- a/src/mess/drivers/fp1100.c
+++ b/src/mess/drivers/fp1100.c
@@ -320,7 +320,6 @@ static const UPD7810_CONFIG fp1100_slave_cpu_config = { TYPE_7801, NULL };
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -364,7 +363,7 @@ static MACHINE_CONFIG_START( fp1100, fp1100_state )
MCFG_GFXDECODE(fp1100)
/* Devices */
- MCFG_MC6845_ADD("crtc", H46505, MAIN_CLOCK/2, mc6845_intf) /* hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", MAIN_CLOCK/2, mc6845_intf) /* hand tuned to get ~60 fps */
MACHINE_CONFIG_END
/* ROM definition */
diff --git a/src/mess/drivers/fp6000.c b/src/mess/drivers/fp6000.c
index 5f4ed501f9e..2518acd26ba 100644
--- a/src/mess/drivers/fp6000.c
+++ b/src/mess/drivers/fp6000.c
@@ -284,7 +284,6 @@ void fp6000_state::machine_reset()
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -312,7 +311,7 @@ static MACHINE_CONFIG_START( fp6000, fp6000_state )
MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
MCFG_SCREEN_UPDATE_DRIVER(fp6000_state, screen_update_fp6000)
- MCFG_MC6845_ADD("crtc", H46505, 16000000/5, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", 16000000/5, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_PALETTE_LENGTH(8)
// MCFG_PALETTE_INIT_OVERRIDE(driver_device, black_and_white)
diff --git a/src/mess/drivers/h19.c b/src/mess/drivers/h19.c
index 6f93b5fef31..7f091214cbd 100644
--- a/src/mess/drivers/h19.c
+++ b/src/mess/drivers/h19.c
@@ -367,7 +367,6 @@ static const ins8250_interface h19_ace_interface =
static MC6845_INTERFACE( h19_crtc6845_interface )
{
- "screen",
false,
8 /*?*/,
NULL,
@@ -427,7 +426,7 @@ static MACHINE_CONFIG_START( h19, h19_state )
MCFG_PALETTE_LENGTH(2)
MCFG_PALETTE_INIT_OVERRIDE(driver_device, monochrome_green)
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_12_288MHz / 8, h19_crtc6845_interface) // clk taken from schematics
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_12_288MHz / 8, h19_crtc6845_interface) // clk taken from schematics
MCFG_INS8250_ADD( "ins8250", h19_ace_interface, XTAL_12_288MHz / 4) // 3.072mhz clock which gets divided down for the various baud rates
MCFG_ASCII_KEYBOARD_ADD(KEYBOARD_TAG, keyboard_intf)
diff --git a/src/mess/drivers/hp9k.c b/src/mess/drivers/hp9k.c
index a62e6226d54..86428c1deb7 100644
--- a/src/mess/drivers/hp9k.c
+++ b/src/mess/drivers/hp9k.c
@@ -138,7 +138,7 @@ public:
required_device<mc6845_device> m_6845;
UINT8 m_videoram[0x4000];
- UINT8 m_screen[0x800];
+ UINT8 m_screenram[0x800];
DECLARE_DRIVER_INIT(hp9k);
@@ -271,7 +271,7 @@ WRITE16_MEMBER( hp9k_state::hp9k_videoram_w )
if (mem_mask==0xff00)
{
- m_screen[offset&0x7ff]=data>>8;
+ m_screenram[offset&0x7ff]=data>>8;
m_videoram[offset&0x3fff]=data>>8;
//UINT8 *rom = machine().region("bootrom")->base();
@@ -279,7 +279,7 @@ WRITE16_MEMBER( hp9k_state::hp9k_videoram_w )
}
else
{
- m_screen[offset&0x7ff]=data;
+ m_screenram[offset&0x7ff]=data;
m_videoram[offset&0x3fff]=data;
}
}
@@ -359,7 +359,7 @@ void hp9k_state::putChar(UINT8 thec,int x,int y,bitmap_ind16 &bitmap)
UINT32 hp9k_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- //UINT8* pvram=&m_screen[1];
+ //UINT8* pvram=&m_screenram[1];
int startAddr=((crtc_addrStartLow&0xff)|((crtc_addrStartHi<<8)))&0x3fff;
int chStart=startAddr&0x1fff;
@@ -370,7 +370,7 @@ UINT32 hp9k_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, co
{
//UINT8 thec=pvram[((c+(r*80))+160+47)&0x7ff];
//UINT8 thec=m_videoram[((c+(r*80))+startAddr)];
- UINT8 thec=m_screen[chStart&0x7ff];
+ UINT8 thec=m_screenram[chStart&0x7ff];
putChar(thec,c,r,bitmap);
chStart++;
}
@@ -388,7 +388,6 @@ WRITE8_MEMBER( hp9k_state::kbd_put )
static MC6845_INTERFACE( hp9k_mc6845_intf )
{
- "screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
@@ -420,7 +419,7 @@ static MACHINE_CONFIG_START( hp9k, hp9k_state )
MCFG_PALETTE_LENGTH(2)
MCFG_PALETTE_INIT_OVERRIDE(driver_device, black_and_white)
- MCFG_MC6845_ADD( "mc6845", MC6845, XTAL_16MHz / 16, hp9k_mc6845_intf )
+ MCFG_MC6845_ADD( "mc6845", MC6845, "screen", XTAL_16MHz / 16, hp9k_mc6845_intf )
MACHINE_CONFIG_END
/* ROM definition */
diff --git a/src/mess/drivers/if800.c b/src/mess/drivers/if800.c
index 4b73288909f..eb5004cb9a1 100644
--- a/src/mess/drivers/if800.c
+++ b/src/mess/drivers/if800.c
@@ -74,7 +74,6 @@ void if800_state::machine_reset()
static UPD7220_INTERFACE( hgdc_intf )
{
- "screen",
hgdc_display_pixels,
NULL,
DEVCB_NULL,
diff --git a/src/mess/drivers/ipds.c b/src/mess/drivers/ipds.c
index 451b00a9a3d..c3c00873971 100644
--- a/src/mess/drivers/ipds.c
+++ b/src/mess/drivers/ipds.c
@@ -98,7 +98,6 @@ static I8275_DISPLAY_PIXELS(ipds_display_pixels)
const i8275_interface ipds_i8275_interface =
{
- "screen",
6,
0,
DEVCB_NULL,
diff --git a/src/mess/drivers/kaypro.c b/src/mess/drivers/kaypro.c
index 4da7a62257a..37f9ec3d354 100644
--- a/src/mess/drivers/kaypro.c
+++ b/src/mess/drivers/kaypro.c
@@ -151,7 +151,6 @@ static const z80_daisy_config kaypro2x_daisy_chain[] =
static MC6845_INTERFACE( kaypro2x_crtc )
{
- "screen", /* name of screen */
false,
7, /* number of dots per character */
NULL,
@@ -295,7 +294,7 @@ static MACHINE_CONFIG_START( kaypro2x, kaypro_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
/* devices */
- MCFG_MC6845_ADD("crtc", MC6845, 2000000, kaypro2x_crtc) /* comes out of ULA - needs to be measured */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", 2000000, kaypro2x_crtc) /* comes out of ULA - needs to be measured */
MCFG_QUICKLOAD_ADD("quickload", kaypro_state, kaypro2x, "com,cpm", 3)
MCFG_FD1793_ADD("wd1793", kaypro_wd1793_interface )
MCFG_CENTRONICS_PRINTER_ADD("centronics", standard_centronics)
diff --git a/src/mess/drivers/m20.c b/src/mess/drivers/m20.c
index eb9136dabb7..b1a2ef6b76e 100644
--- a/src/mess/drivers/m20.c
+++ b/src/mess/drivers/m20.c
@@ -835,7 +835,6 @@ void m20_state::machine_reset()
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
16, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -991,7 +990,7 @@ static MACHINE_CONFIG_START( m20, m20_state )
MCFG_FD1797x_ADD("fd1797", 1000000)
MCFG_FLOPPY_DRIVE_ADD("fd1797:0", m20_floppies, "5dd", m20_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fd1797:1", m20_floppies, "5dd", m20_state::floppy_formats)
- MCFG_MC6845_ADD("crtc", MC6845, PIXEL_CLOCK/8, mc6845_intf) /* hand tuned to get ~50 fps */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", PIXEL_CLOCK/8, mc6845_intf) /* hand tuned to get ~50 fps */
MCFG_I8255A_ADD("ppi8255", ppi_interface)
MCFG_I8251_ADD("i8251_1", kbd_i8251_intf)
MCFG_I8251_ADD("i8251_2", tty_i8251_intf)
diff --git a/src/mess/drivers/m5.c b/src/mess/drivers/m5.c
index 4d375d89ef6..612f99ec986 100644
--- a/src/mess/drivers/m5.c
+++ b/src/mess/drivers/m5.c
@@ -440,7 +440,6 @@ WRITE_LINE_MEMBER(m5_state::sordm5_video_interrupt_callback)
static TMS9928A_INTERFACE(m5_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(m5_state,sordm5_video_interrupt_callback)
};
diff --git a/src/mess/drivers/mbc200.c b/src/mess/drivers/mbc200.c
index de11198e8b8..800194f61f7 100644
--- a/src/mess/drivers/mbc200.c
+++ b/src/mess/drivers/mbc200.c
@@ -139,7 +139,6 @@ MC6845_UPDATE_ROW( mbc200_update_row )
static MC6845_INTERFACE( mbc200_crtc )
{
- "screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
@@ -274,7 +273,7 @@ static MACHINE_CONFIG_START( mbc200, mbc200_state )
MCFG_PALETTE_INIT_OVERRIDE(driver_device, black_and_white)
- MCFG_MC6845_ADD("crtc", H46505, XTAL_8MHz / 4, mbc200_crtc) // HD46505SP
+ MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_8MHz / 4, mbc200_crtc) // HD46505SP
MCFG_I8255_ADD("ppi8255_1", mbc200_ppi8255_interface_1) // i8255AC-5
MCFG_I8255_ADD("ppi8255_2", mbc200_ppi8255_interface_2) // i8255AC-5
MCFG_I8251_ADD("i8251_1", default_i8251_interface) // INS8251N
diff --git a/src/mess/drivers/mbc55x.c b/src/mess/drivers/mbc55x.c
index 4e72f8a8e97..e7d8caaa0ce 100644
--- a/src/mess/drivers/mbc55x.c
+++ b/src/mess/drivers/mbc55x.c
@@ -261,7 +261,7 @@ static MACHINE_CONFIG_START( mbc55x, mbc55x_state )
MCFG_PIT8253_ADD( PIT8253_TAG, mbc55x_pit8253_config )
MCFG_PIC8259_ADD( PIC8259_TAG, INPUTLINE(MAINCPU_TAG, INPUT_LINE_IRQ0), VCC, NULL )
MCFG_I8255_ADD( PPI8255_TAG, mbc55x_ppi8255_interface )
- MCFG_MC6845_ADD(VID_MC6845_NAME, MC6845, XTAL_14_31818MHz/8, mb55x_mc6845_intf)
+ MCFG_MC6845_ADD(VID_MC6845_NAME, MC6845, SCREEN_TAG, XTAL_14_31818MHz/8, mb55x_mc6845_intf)
/* Backing storage */
MCFG_FD1793_ADD(FDC_TAG, mbc55x_wd17xx_interface )
diff --git a/src/mess/drivers/mbee.c b/src/mess/drivers/mbee.c
index f0e901a11c9..42e441a0996 100644
--- a/src/mess/drivers/mbee.c
+++ b/src/mess/drivers/mbee.c
@@ -659,7 +659,6 @@ SLOT_INTERFACE_END
static MC6845_INTERFACE( mbee_crtc )
{
- "screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
@@ -675,7 +674,6 @@ static MC6845_INTERFACE( mbee_crtc )
static MC6845_INTERFACE( mbeeic_crtc )
{
- "screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
@@ -690,7 +688,6 @@ static MC6845_INTERFACE( mbeeic_crtc )
static MC6845_INTERFACE( mbeeppc_crtc )
{
- "screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
@@ -705,7 +702,6 @@ static MC6845_INTERFACE( mbeeppc_crtc )
static MC6845_INTERFACE( mbee256_crtc )
{
- "screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
@@ -750,7 +746,7 @@ static MACHINE_CONFIG_START( mbee, mbee_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
/* devices */
- MCFG_MC6845_ADD("crtc", SY6545_1, XTAL_12MHz / 8, mbee_crtc)
+ MCFG_MC6845_ADD("crtc", SY6545_1, "screen", XTAL_12MHz / 8, mbee_crtc)
MCFG_QUICKLOAD_ADD("quickload", mbee_state, mbee, "mwb,com", 2)
MCFG_QUICKLOAD_ADD("quickload2", mbee_state, mbee_z80bin, "bin", 2)
MCFG_CENTRONICS_PRINTER_ADD("centronics", standard_centronics)
@@ -791,7 +787,7 @@ static MACHINE_CONFIG_START( mbeeic, mbee_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
/* devices */
- MCFG_MC6845_ADD("crtc", SY6545_1, XTAL_13_5MHz / 8, mbeeic_crtc)
+ MCFG_MC6845_ADD("crtc", SY6545_1, "screen", XTAL_13_5MHz / 8, mbeeic_crtc)
MCFG_QUICKLOAD_ADD("quickload", mbee_state, mbee, "mwb,com", 2)
MCFG_QUICKLOAD_ADD("quickload2", mbee_state, mbee_z80bin, "bin", 2)
MCFG_CENTRONICS_PRINTER_ADD("centronics", standard_centronics)
@@ -823,7 +819,7 @@ static MACHINE_CONFIG_DERIVED( mbeeppc, mbeeic )
MCFG_PALETTE_LENGTH(16)
MCFG_PALETTE_INIT_OVERRIDE(mbee_state,mbeeppc)
MCFG_DEVICE_REMOVE("crtc")
- MCFG_MC6845_ADD("crtc", SY6545_1, XTAL_13_5MHz / 8, mbeeppc_crtc)
+ MCFG_MC6845_ADD("crtc", SY6545_1, "screen", XTAL_13_5MHz / 8, mbeeppc_crtc)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( mbee56, mbeeic )
@@ -859,7 +855,7 @@ static MACHINE_CONFIG_DERIVED( mbee256, mbee128 )
MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbee256 )
MCFG_MC146818_ADD( "rtc", MC146818_STANDARD )
MCFG_DEVICE_REMOVE("crtc")
- MCFG_MC6845_ADD("crtc", SY6545_1, XTAL_13_5MHz / 8, mbee256_crtc)
+ MCFG_MC6845_ADD("crtc", SY6545_1, "screen", XTAL_13_5MHz / 8, mbee256_crtc)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( mbeett, mbeeppc )
@@ -869,7 +865,7 @@ static MACHINE_CONFIG_DERIVED( mbeett, mbeeppc )
MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbeett )
MCFG_MC146818_ADD( "rtc", MC146818_STANDARD )
MCFG_DEVICE_REMOVE("crtc")
- MCFG_MC6845_ADD("crtc", SY6545_1, XTAL_13_5MHz / 8, mbee256_crtc)
+ MCFG_MC6845_ADD("crtc", SY6545_1, "screen", XTAL_13_5MHz / 8, mbee256_crtc)
MACHINE_CONFIG_END
/* Unused roms:
diff --git a/src/mess/drivers/mc10.c b/src/mess/drivers/mc10.c
index d744884431c..e1d397c873c 100644
--- a/src/mess/drivers/mc10.c
+++ b/src/mess/drivers/mc10.c
@@ -529,11 +529,6 @@ static MACHINE_CONFIG_START( mc10, mc10_state )
MCFG_RAM_EXTRA_OPTIONS("4K")
MACHINE_CONFIG_END
-static const ef9345_interface alice32_ef9345_config =
-{
- "screen" /* screen we are acting on */
-};
-
static MACHINE_CONFIG_START( alice32, mc10_state )
/* basic machine hardware */
@@ -549,7 +544,7 @@ static MACHINE_CONFIG_START( alice32, mc10_state )
MCFG_SCREEN_VISIBLE_AREA(00, 336-1, 00, 270-1)
MCFG_PALETTE_LENGTH(8)
- MCFG_EF9345_ADD("ef9345", alice32_ef9345_config)
+ MCFG_EF9345_ADD("ef9345", "screen")
MCFG_TIMER_DRIVER_ADD_SCANLINE("alice32_sl", mc10_state, alice32_scanline, "screen", 0, 10)
/* sound hardware */
diff --git a/src/mess/drivers/micronic.c b/src/mess/drivers/micronic.c
index ffce7eb7648..ab87ec56dc7 100644
--- a/src/mess/drivers/micronic.c
+++ b/src/mess/drivers/micronic.c
@@ -330,7 +330,6 @@ void micronic_state::palette_init()
static HD61830_INTERFACE( lcdc_intf )
{
- SCREEN_TAG,
DEVCB_NULL
};
diff --git a/src/mess/drivers/msx.c b/src/mess/drivers/msx.c
index 326852541d2..8ee2ca2f1fd 100644
--- a/src/mess/drivers/msx.c
+++ b/src/mess/drivers/msx.c
@@ -1111,7 +1111,6 @@ MACHINE_CONFIG_END
static TMS9928A_INTERFACE(msx_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_IRQ0)
};
diff --git a/src/mess/drivers/mtx.c b/src/mess/drivers/mtx.c
index 4afad71c965..408a1bd4dc3 100644
--- a/src/mess/drivers/mtx.c
+++ b/src/mess/drivers/mtx.c
@@ -323,7 +323,6 @@ WRITE_LINE_MEMBER(mtx_state::mtx_tms9929a_interrupt)
static TMS9928A_INTERFACE(mtx_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(mtx_state,mtx_tms9929a_interrupt)
};
diff --git a/src/mess/drivers/multi16.c b/src/mess/drivers/multi16.c
index f1204faaf38..7766f965795 100644
--- a/src/mess/drivers/multi16.c
+++ b/src/mess/drivers/multi16.c
@@ -141,7 +141,6 @@ void multi16_state::machine_reset()
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -171,7 +170,7 @@ static MACHINE_CONFIG_START( multi16, multi16_state )
MCFG_PALETTE_LENGTH(8)
/* Devices */
- MCFG_MC6845_ADD("crtc", H46505, 16000000/5, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", 16000000/5, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_PIC8259_ADD( "pic8259", WRITELINE(multi16_state, multi16_set_int_line), GND, NULL )
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/multi8.c b/src/mess/drivers/multi8.c
index 66c221704d1..63b940dcb0f 100644
--- a/src/mess/drivers/multi8.c
+++ b/src/mess/drivers/multi8.c
@@ -560,7 +560,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -684,7 +683,7 @@ static MACHINE_CONFIG_START( multi8, multi8_state )
/* Devices */
MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard_timer", multi8_state, keyboard_callback, attotime::from_hz(240/32))
- MCFG_MC6845_ADD("crtc", H46505, XTAL_3_579545MHz/2, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_3_579545MHz/2, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_I8255_ADD( "ppi8255_0", ppi8255_intf_0 )
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/myb3k.c b/src/mess/drivers/myb3k.c
index 1294cbf1cee..fbb81323c0b 100644
--- a/src/mess/drivers/myb3k.c
+++ b/src/mess/drivers/myb3k.c
@@ -232,7 +232,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -287,7 +286,7 @@ static MACHINE_CONFIG_START( myb3k, myb3k_state )
MCFG_PALETTE_INIT_OVERRIDE(driver_device, black_and_white)
/* Devices */
- MCFG_MC6845_ADD("crtc", H46505, XTAL_3_579545MHz/4, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_3_579545MHz/4, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_MB8877_ADD("fdc", myb3k_wd17xx_interface ) //unknown type
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(myb3k_floppy_interface)
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/mycom.c b/src/mess/drivers/mycom.c
index 2508496ee78..c9e09d6a75c 100644
--- a/src/mess/drivers/mycom.c
+++ b/src/mess/drivers/mycom.c
@@ -333,7 +333,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -604,7 +603,7 @@ static MACHINE_CONFIG_START( mycom, mycom_state )
/* Manual states clock is 1.008mhz for 40 cols, and 2.016 mhz for 80 cols.
The CRTC is a HD46505S - same as a 6845. The start registers need to be readable. */
- MCFG_MC6845_ADD("crtc", MC6845, 1008000, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", 1008000, mc6845_intf)
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
diff --git a/src/mess/drivers/mz3500.c b/src/mess/drivers/mz3500.c
index bfa9832e9c3..56b13ce1c8e 100644
--- a/src/mess/drivers/mz3500.c
+++ b/src/mess/drivers/mz3500.c
@@ -238,7 +238,6 @@ UINT32 mz3500_state::screen_update( screen_device &screen, bitmap_rgb32 &bitmap,
static UPD7220_INTERFACE( hgdc_1_intf )
{
- "screen",
NULL,
hgdc_draw_text,
DEVCB_NULL,
@@ -248,7 +247,6 @@ static UPD7220_INTERFACE( hgdc_1_intf )
static UPD7220_INTERFACE( hgdc_2_intf )
{
- "screen",
hgdc_display_pixels,
NULL,
DEVCB_NULL,
diff --git a/src/mess/drivers/mz6500.c b/src/mess/drivers/mz6500.c
index 0507a5cebd9..49720c5bc81 100644
--- a/src/mess/drivers/mz6500.c
+++ b/src/mess/drivers/mz6500.c
@@ -127,7 +127,6 @@ SLOT_INTERFACE_END
static UPD7220_INTERFACE( hgdc_intf )
{
- "screen",
hgdc_display_pixels,
NULL,
DEVCB_NULL,
diff --git a/src/mess/drivers/nes.c b/src/mess/drivers/nes.c
index 713fb515232..0cd4a962a43 100644
--- a/src/mess/drivers/nes.c
+++ b/src/mess/drivers/nes.c
@@ -662,7 +662,6 @@ void nes_state::ppu_nmi(int *ppu_regs)
static const ppu2c0x_interface nes_ppu_interface =
{
"maincpu",
- "screen",
0,
0,
PPU_MIRROR_NONE
diff --git a/src/mess/drivers/odyssey2.c b/src/mess/drivers/odyssey2.c
index 5cb1b874fcb..917f87a0153 100644
--- a/src/mess/drivers/odyssey2.c
+++ b/src/mess/drivers/odyssey2.c
@@ -27,7 +27,6 @@ public:
odyssey2_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_screen(*this, "screen"),
m_i8244(*this, "i8244"),
m_sp0256(*this, "sp0256_speech"),
m_user1(*this, "user1"),
@@ -43,7 +42,6 @@ public:
m_joy1(*this, "JOY1") { }
required_device<cpu_device> m_maincpu;
- required_device<screen_device> m_screen;
required_device<i8244_device> m_i8244;
required_device<sp0256_device> m_sp0256;
diff --git a/src/mess/drivers/paso1600.c b/src/mess/drivers/paso1600.c
index 389ee138232..2aad38c1973 100644
--- a/src/mess/drivers/paso1600.c
+++ b/src/mess/drivers/paso1600.c
@@ -270,7 +270,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -353,7 +352,7 @@ static MACHINE_CONFIG_START( paso1600, paso1600_state )
// MCFG_PALETTE_INIT_OVERRIDE(driver_device, black_and_white)
/* Devices */
- MCFG_MC6845_ADD("crtc", H46505, 16000000/4, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", 16000000/4, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_PIC8259_ADD( "pic8259", WRITELINE(paso1600_state, paso1600_set_int_line), GND, NULL )
MCFG_I8237_ADD("8237dma", 16000000/4, paso1600_dma8237_interface)
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/pasopia.c b/src/mess/drivers/pasopia.c
index 0159cf33b81..a340f841c60 100644
--- a/src/mess/drivers/pasopia.c
+++ b/src/mess/drivers/pasopia.c
@@ -303,7 +303,6 @@ static Z80PIO_INTERFACE( z80pio_intf )
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -373,7 +372,7 @@ static MACHINE_CONFIG_START( pasopia, pasopia_state )
MCFG_PALETTE_LENGTH(8)
/* Devices */
- MCFG_MC6845_ADD("crtc", H46505, XTAL_4MHz/4, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_4MHz/4, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_I8255A_ADD( "ppi8255_0", ppi8255_intf_0 )
MCFG_I8255A_ADD( "ppi8255_1", ppi8255_intf_1 )
MCFG_I8255A_ADD( "ppi8255_2", ppi8255_intf_2 )
diff --git a/src/mess/drivers/pasopia7.c b/src/mess/drivers/pasopia7.c
index 09460118485..101138636a4 100644
--- a/src/mess/drivers/pasopia7.c
+++ b/src/mess/drivers/pasopia7.c
@@ -726,7 +726,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -1033,7 +1032,7 @@ static MACHINE_CONFIG_DERIVED( p7_raster, p7_base )
MCFG_PALETTE_INIT_OVERRIDE(pasopia7_state,p7_raster)
MCFG_GFXDECODE( pasopia7 )
- MCFG_MC6845_ADD("crtc", H46505, VDP_CLOCK, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", VDP_CLOCK, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MACHINE_CONFIG_END
@@ -1049,7 +1048,7 @@ static MACHINE_CONFIG_DERIVED( p7_lcd, p7_base )
MCFG_PALETTE_INIT_OVERRIDE(pasopia7_state,p7_lcd)
MCFG_GFXDECODE( pasopia7 )
- MCFG_MC6845_ADD("crtc", H46505, LCD_CLOCK, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", LCD_CLOCK, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_DEFAULT_LAYOUT( layout_lcd )
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/pc8001.c b/src/mess/drivers/pc8001.c
index 28f220d4e86..d7a5f205e96 100644
--- a/src/mess/drivers/pc8001.c
+++ b/src/mess/drivers/pc8001.c
@@ -391,7 +391,6 @@ static UPD3301_DISPLAY_PIXELS( pc8001_display_pixels )
static UPD3301_INTERFACE( pc8001_upd3301_intf )
{
- SCREEN_TAG,
8,
pc8001_display_pixels,
DEVCB_NULL,
diff --git a/src/mess/drivers/pc9801.c b/src/mess/drivers/pc9801.c
index ffb926767f1..c6b7209f6d0 100644
--- a/src/mess/drivers/pc9801.c
+++ b/src/mess/drivers/pc9801.c
@@ -911,7 +911,6 @@ static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
static UPD7220_INTERFACE( hgdc_1_intf )
{
- "screen",
NULL,
hgdc_draw_text,
DEVCB_NULL,
@@ -921,7 +920,6 @@ static UPD7220_INTERFACE( hgdc_1_intf )
static UPD7220_INTERFACE( hgdc_2_intf )
{
- "screen",
hgdc_display_pixels,
NULL,
DEVCB_NULL,
diff --git a/src/mess/drivers/pce.c b/src/mess/drivers/pce.c
index 780cc3f1cd3..8f45dba660f 100644
--- a/src/mess/drivers/pce.c
+++ b/src/mess/drivers/pce.c
@@ -310,7 +310,6 @@ static const huc6270_interface pce_huc6270_config =
static const huc6260_interface pce_huc6260_config =
{
- "screen",
DEVCB_DEVICE_MEMBER16( "huc6270", huc6270_device, next_pixel ),
DEVCB_DEVICE_MEMBER16( "huc6270", huc6270_device, time_until_next_event ),
DEVCB_DEVICE_LINE_MEMBER( "huc6270", huc6270_device, vsync_changed ),
@@ -351,7 +350,6 @@ static const huc6202_interface sgx_huc6202_config =
static const huc6260_interface sgx_huc6260_config =
{
- "screen",
DEVCB_DEVICE_MEMBER16( "huc6202", huc6202_device, next_pixel ),
DEVCB_DEVICE_MEMBER16( "huc6202", huc6202_device, time_until_next_event ),
DEVCB_DEVICE_LINE_MEMBER( "huc6202", huc6202_device, vsync_changed ),
diff --git a/src/mess/drivers/pcfx.c b/src/mess/drivers/pcfx.c
index d206f9f2ce0..766760df361 100644
--- a/src/mess/drivers/pcfx.c
+++ b/src/mess/drivers/pcfx.c
@@ -459,7 +459,6 @@ WRITE_LINE_MEMBER( pcfx_state::irq15_w )
static const huc6261_interface pcfx_huc6261_config =
{
- "screen",
"huc6270_a",
"huc6270_b"
};
diff --git a/src/mess/drivers/pencil2.c b/src/mess/drivers/pencil2.c
index 3bb4b400690..ca0950378b8 100644
--- a/src/mess/drivers/pencil2.c
+++ b/src/mess/drivers/pencil2.c
@@ -275,7 +275,6 @@ static const sn76496_config psg_intf =
static TMS9928A_INTERFACE(pencil2_tms9929a_interface)
{
- "screen", // screen tag
0x4000, // vram size
DEVCB_NULL // write line if int changes
};
diff --git a/src/mess/drivers/pet.c b/src/mess/drivers/pet.c
index 1e9d1c9fc58..697714102bd 100644
--- a/src/mess/drivers/pet.c
+++ b/src/mess/drivers/pet.c
@@ -1193,7 +1193,6 @@ static MC6845_UPDATE_ROW( pet80_update_row )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
2*8,
NULL,
@@ -1257,7 +1256,6 @@ static MC6845_UPDATE_ROW( cbm8296_update_row )
static MC6845_INTERFACE( cbm8296_crtc_intf )
{
- SCREEN_TAG,
false,
2*8,
NULL,
@@ -1738,7 +1736,7 @@ static MACHINE_CONFIG_START( pet80, pet80_state )
MCFG_SCREEN_SIZE(640, 250)
MCFG_SCREEN_VISIBLE_AREA(0, 640 - 1, 0, 250 - 1)
MCFG_SCREEN_UPDATE_DEVICE(MC6845_TAG, mc6845_device, screen_update)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, XTAL_16MHz/16, crtc_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, XTAL_16MHz/16, crtc_intf)
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mess/drivers/portfoli.c b/src/mess/drivers/portfoli.c
index 0a6f5bc89c7..766c4217ac5 100644
--- a/src/mess/drivers/portfoli.c
+++ b/src/mess/drivers/portfoli.c
@@ -693,7 +693,6 @@ READ8_MEMBER(portfolio_state::hd61830_rd_r)
static HD61830_INTERFACE( lcdc_intf )
{
- SCREEN_TAG,
DEVCB_DRIVER_MEMBER(portfolio_state,hd61830_rd_r)
};
diff --git a/src/mess/drivers/pv1000.c b/src/mess/drivers/pv1000.c
index 4d35938b273..6b1cdf99df2 100644
--- a/src/mess/drivers/pv1000.c
+++ b/src/mess/drivers/pv1000.c
@@ -143,7 +143,6 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_sound(*this, "pv1000_sound"),
- m_screen(*this, "screen"),
m_p_videoram(*this, "p_videoram")
{ }
@@ -165,7 +164,6 @@ public:
required_device<cpu_device> m_maincpu;
required_device<pv1000_sound_device> m_sound;
- required_device<screen_device> m_screen;
required_shared_ptr<UINT8> m_p_videoram;
virtual void machine_start();
virtual void machine_reset();
diff --git a/src/mess/drivers/pv2000.c b/src/mess/drivers/pv2000.c
index c511f15dea0..a6d4ab95535 100644
--- a/src/mess/drivers/pv2000.c
+++ b/src/mess/drivers/pv2000.c
@@ -341,7 +341,6 @@ WRITE_LINE_MEMBER( pv2000_state::pv2000_vdp_interrupt )
static TMS9928A_INTERFACE(pv2000_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(pv2000_state, pv2000_vdp_interrupt)
};
diff --git a/src/mess/drivers/pyl601.c b/src/mess/drivers/pyl601.c
index 253c1cc0be2..90bef623a80 100644
--- a/src/mess/drivers/pyl601.c
+++ b/src/mess/drivers/pyl601.c
@@ -468,7 +468,6 @@ static MC6845_UPDATE_ROW( pyl601a_update_row )
static MC6845_INTERFACE( pyl601_crtc6845_interface )
{
- "screen",
false,
8 /*?*/,
NULL,
@@ -483,7 +482,6 @@ static MC6845_INTERFACE( pyl601_crtc6845_interface )
static MC6845_INTERFACE( pyl601a_crtc6845_interface )
{
- "screen",
false,
8 /*?*/,
NULL,
@@ -574,7 +572,7 @@ static MACHINE_CONFIG_START( pyl601, pyl601_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
/* Devices */
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_2MHz, pyl601_crtc6845_interface)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_2MHz, pyl601_crtc6845_interface)
MCFG_UPD765A_ADD("upd765", true, true)
MCFG_FLOPPY_DRIVE_ADD("upd765:0", pyl601_floppies, "525hd", pyl601_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("upd765:1", pyl601_floppies, "525hd", pyl601_state::floppy_formats)
@@ -591,7 +589,7 @@ static MACHINE_CONFIG_DERIVED( pyl601a, pyl601 )
MCFG_GFXDECODE(pyl601a)
MCFG_DEVICE_REMOVE("crtc")
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_2MHz, pyl601a_crtc6845_interface)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_2MHz, pyl601a_crtc6845_interface)
MACHINE_CONFIG_END
/* ROM definition */
diff --git a/src/mess/drivers/qx10.c b/src/mess/drivers/qx10.c
index 047d4d7925a..901e627e40a 100644
--- a/src/mess/drivers/qx10.c
+++ b/src/mess/drivers/qx10.c
@@ -805,7 +805,6 @@ void qx10_state::video_start()
static UPD7220_INTERFACE( hgdc_intf )
{
- "screen",
hgdc_display_pixels,
hgdc_draw_text,
DEVCB_NULL,
diff --git a/src/mess/drivers/rainbow.c b/src/mess/drivers/rainbow.c
index 960d3ee9bfd..744a49efad9 100644
--- a/src/mess/drivers/rainbow.c
+++ b/src/mess/drivers/rainbow.c
@@ -398,7 +398,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(rainbow_state::keyboard_tick)
static const vt_video_interface video_interface =
{
- "screen",
"chargen",
DEVCB_DRIVER_MEMBER(rainbow_state, read_video_ram_r),
DEVCB_DRIVER_MEMBER(rainbow_state, clear_video_interrupt)
diff --git a/src/mess/drivers/rt1715.c b/src/mess/drivers/rt1715.c
index 3d4442ebfcc..849e7988d46 100644
--- a/src/mess/drivers/rt1715.c
+++ b/src/mess/drivers/rt1715.c
@@ -158,7 +158,6 @@ GFXDECODE_END
static const i8275_interface rt1715_i8275_intf =
{
- "screen",
8,
0,
DEVCB_NULL,
diff --git a/src/mess/drivers/sg1000.c b/src/mess/drivers/sg1000.c
index c0b24fc1603..9594ea4b491 100644
--- a/src/mess/drivers/sg1000.c
+++ b/src/mess/drivers/sg1000.c
@@ -462,7 +462,6 @@ WRITE_LINE_MEMBER(sg1000_state::sg1000_vdp_interrupt)
static TMS9928A_INTERFACE(sg1000_tms9918a_interface)
{
- SCREEN_TAG,
0x4000,
DEVCB_DRIVER_LINE_MEMBER(sg1000_state,sg1000_vdp_interrupt)
};
diff --git a/src/mess/drivers/sm1800.c b/src/mess/drivers/sm1800.c
index 68359c9b70b..5c46f81ebfb 100644
--- a/src/mess/drivers/sm1800.c
+++ b/src/mess/drivers/sm1800.c
@@ -104,7 +104,6 @@ static I8275_DISPLAY_PIXELS(sm1800_display_pixels)
}
const i8275_interface sm1800_i8275_interface = {
- "screen",
8,
0,
DEVCB_NULL,
diff --git a/src/mess/drivers/smc777.c b/src/mess/drivers/smc777.c
index ff7eb069539..f08a93ad7db 100644
--- a/src/mess/drivers/smc777.c
+++ b/src/mess/drivers/smc777.c
@@ -999,7 +999,6 @@ void smc777_state::machine_reset()
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
true, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -1104,7 +1103,7 @@ static MACHINE_CONFIG_START( smc777, smc777_state )
MCFG_PALETTE_LENGTH(0x20) // 16 + 8 colors (SMC-777 + SMC-70) + 8 empty entries (SMC-70)
- MCFG_MC6845_ADD("crtc", H46505, MASTER_CLOCK/2, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
+ MCFG_MC6845_ADD("crtc", H46505, "screen", MASTER_CLOCK/2, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */
MCFG_MB8876_ADD("fdc",smc777_mb8876_interface)
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(smc777_floppy_interface)
diff --git a/src/mess/drivers/sms.c b/src/mess/drivers/sms.c
index 6a524afda20..34953896923 100644
--- a/src/mess/drivers/sms.c
+++ b/src/mess/drivers/sms.c
@@ -424,7 +424,6 @@ WRITE_LINE_MEMBER(sms_state::sms_int_callback)
static const sega315_5124_interface _315_5124_ntsc_intf =
{
false,
- "screen",
DEVCB_DRIVER_LINE_MEMBER(sms_state,sms_int_callback),
DEVCB_DRIVER_LINE_MEMBER(sms_state,sms_pause_callback)
};
@@ -432,7 +431,6 @@ static const sega315_5124_interface _315_5124_ntsc_intf =
static const sega315_5124_interface _315_5124_pal_intf =
{
true,
- "screen",
DEVCB_DRIVER_LINE_MEMBER(sms_state,sms_int_callback),
DEVCB_DRIVER_LINE_MEMBER(sms_state,sms_pause_callback)
};
@@ -440,7 +438,6 @@ static const sega315_5124_interface _315_5124_pal_intf =
static const sega315_5124_interface sms_store_intf =
{
false,
- "screen",
DEVCB_DRIVER_LINE_MEMBER(smssdisp_state,sms_store_int_callback),
DEVCB_DRIVER_LINE_MEMBER(sms_state,sms_pause_callback)
};
@@ -534,6 +531,7 @@ static MACHINE_CONFIG_DERIVED( sms2_ntsc, sms_ntsc_base )
MCFG_PALETTE_INIT(sega315_5124)
MCFG_SEGA315_5246_ADD("sms_vdp", _315_5124_ntsc_intf)
+ MCFG_SEGA315_5246_SET_SCREEN("screen")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( sms1_ntsc, sms_ntsc_base )
@@ -571,6 +569,7 @@ static MACHINE_CONFIG_DERIVED( sms1_ntsc, sms_ntsc_base )
MCFG_VIDEO_START_OVERRIDE(sms_state,sms1)
MCFG_SEGA315_5124_ADD("sms_vdp", _315_5124_ntsc_intf)
+ MCFG_SEGA315_5124_SET_SCREEN("screen")
// cardslot, not present in Master System II
MCFG_SMS_CARD_ADD("mycard", sms_cart, NULL)
@@ -605,6 +604,7 @@ static MACHINE_CONFIG_START( sms_sdisp, smssdisp_state )
MCFG_PALETTE_INIT(sega315_5124)
MCFG_SEGA315_5246_ADD("sms_vdp", sms_store_intf)
+ MCFG_SEGA315_5246_SET_SCREEN("screen")
MCFG_CPU_ADD("control", Z80, XTAL_53_693175MHz/15)
MCFG_CPU_PROGRAM_MAP(sms_store_mem)
@@ -699,6 +699,7 @@ static MACHINE_CONFIG_DERIVED( sms2_pal, sms_pal_base )
MCFG_PALETTE_INIT(sega315_5124)
MCFG_SEGA315_5246_ADD("sms_vdp", _315_5124_pal_intf)
+ MCFG_SEGA315_5246_SET_SCREEN("screen")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( sms1_pal, sms_pal_base )
@@ -736,6 +737,7 @@ static MACHINE_CONFIG_DERIVED( sms1_pal, sms_pal_base )
MCFG_VIDEO_START_OVERRIDE(sms_state,sms1)
MCFG_SEGA315_5124_ADD("sms_vdp", _315_5124_pal_intf)
+ MCFG_SEGA315_5124_SET_SCREEN("screen")
// cardslot, not present in Master System II
MCFG_SMS_CARD_ADD("mycard", sms_cart, NULL)
@@ -787,6 +789,7 @@ static MACHINE_CONFIG_START( gamegear, sms_state )
MCFG_VIDEO_START_OVERRIDE(sms_state,gamegear)
MCFG_SEGA315_5378_ADD("sms_vdp", _315_5124_ntsc_intf)
+ MCFG_SEGA315_5378_SET_SCREEN("screen")
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker","rspeaker")
diff --git a/src/mess/drivers/socrates.c b/src/mess/drivers/socrates.c
index dbfabbd61dc..cbc82427b0a 100644
--- a/src/mess/drivers/socrates.c
+++ b/src/mess/drivers/socrates.c
@@ -88,11 +88,9 @@ public:
socrates_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_screen(*this, "screen"),
m_sound(*this, "soc_snd")
{ }
required_device<cpu_device> m_maincpu;
- required_device<screen_device> m_screen;
required_device<socrates_snd_device> m_sound;
rgb_t m_palette[256];
diff --git a/src/mess/drivers/super80.c b/src/mess/drivers/super80.c
index 5dd74b1e357..c2422b9935b 100644
--- a/src/mess/drivers/super80.c
+++ b/src/mess/drivers/super80.c
@@ -615,7 +615,6 @@ static const cassette_interface super80_cassette_interface =
static MC6845_INTERFACE( super80v_crtc )
{
- "screen", /* name of screen */
false,
SUPER80V_DOTS, /* number of dots per character */
NULL,
@@ -713,7 +712,7 @@ static MACHINE_CONFIG_START( super80v, super80_state )
MCFG_PALETTE_LENGTH(16)
MCFG_PALETTE_INIT_OVERRIDE(super80_state,super80m)
- MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK / SUPER80V_DOTS, super80v_crtc)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK / SUPER80V_DOTS, super80v_crtc)
MCFG_GFXDECODE(super80v)
MCFG_DEFAULT_LAYOUT( layout_super80 )
diff --git a/src/mess/drivers/svi318.c b/src/mess/drivers/svi318.c
index c31171f8d32..3b91184ef43 100644
--- a/src/mess/drivers/svi318.c
+++ b/src/mess/drivers/svi318.c
@@ -267,7 +267,6 @@ WRITE_LINE_MEMBER(svi318_state::vdp_interrupt)
static TMS9928A_INTERFACE(svi318_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(svi318_state,vdp_interrupt)
};
@@ -388,7 +387,6 @@ MACHINE_CONFIG_END
static MC6845_INTERFACE( svi806_crtc6845_interface )
{
- "svi806",
false,
8 /*?*/,
NULL,
@@ -438,6 +436,7 @@ static MACHINE_CONFIG_START( svi328_806, svi318_state )
MCFG_DEFAULT_LAYOUT( layout_dualhsxs )
MCFG_TMS9928A_ADD( "tms9928a", TMS9929A, svi318_tms9928a_interface )
+ MCFG_TMS9928A_SET_SCREEN( "screen" )
MCFG_TMS9928A_SCREEN_ADD_PAL( "screen" )
MCFG_SCREEN_UPDATE_DEVICE( "tms9928a", tms9929a_device, screen_update )
MCFG_PALETTE_LENGTH(TMS9928A_PALETTE_SIZE + 2) /* 2 additional entries for monochrome svi806 output */
@@ -451,7 +450,7 @@ static MACHINE_CONFIG_START( svi328_806, svi318_state )
MCFG_GFXDECODE(svi328)
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_12MHz / 8, svi806_crtc6845_interface)
+ MCFG_MC6845_ADD("crtc", MC6845, "svi806", XTAL_12MHz / 8, svi806_crtc6845_interface)
MCFG_VIDEO_START_OVERRIDE(svi318_state, svi328_806 )
diff --git a/src/mess/drivers/tandy2k.c b/src/mess/drivers/tandy2k.c
index d0466948e2f..45ad3079906 100644
--- a/src/mess/drivers/tandy2k.c
+++ b/src/mess/drivers/tandy2k.c
@@ -354,7 +354,6 @@ WRITE_LINE_MEMBER( tandy2k_state::vpac_drb_w )
static CRT9007_INTERFACE( vpac_intf )
{
- SCREEN_TAG,
10,
DEVCB_DEVICE_LINE_MEMBER(I8259A_1_TAG, pic8259_device, ir1_w),
DEVCB_NULL, // DMAR 80186 HOLD
@@ -388,7 +387,6 @@ static CRT9212_INTERFACE( drb1_intf )
static CRT9021_INTERFACE( vac_intf )
{
- SCREEN_TAG,
DEVCB_DEVICE_MEMBER(CRT9212_0_TAG, crt9212_device, read), // data
DEVCB_DEVICE_MEMBER(CRT9212_1_TAG, crt9212_device, read), // attributes
DEVCB_LINE_VCC // ATTEN
diff --git a/src/mess/drivers/tdv2324.c b/src/mess/drivers/tdv2324.c
index 373ddbf99de..11580fe8aaa 100644
--- a/src/mess/drivers/tdv2324.c
+++ b/src/mess/drivers/tdv2324.c
@@ -347,7 +347,6 @@ static Z80SIO_INTERFACE( sio_intf )
static const tms9927_interface vtac_intf =
{
- SCREEN_TAG,
8,
NULL
};
diff --git a/src/mess/drivers/ti99_4x.c b/src/mess/drivers/ti99_4x.c
index 97c3aad4ffa..d93d67b6868 100644
--- a/src/mess/drivers/ti99_4x.c
+++ b/src/mess/drivers/ti99_4x.c
@@ -703,7 +703,6 @@ WRITE_LINE_MEMBER( ti99_4x_state::notconnected )
static TMS9928A_INTERFACE(ti99_4_tms9928a_interface)
{
- SCREEN_TAG,
0x4000,
DEVCB_DRIVER_LINE_MEMBER(ti99_4x_state, set_tms9901_INT2)
};
diff --git a/src/mess/drivers/ti99_8.c b/src/mess/drivers/ti99_8.c
index b657877a927..dbc1eb7fb62 100644
--- a/src/mess/drivers/ti99_8.c
+++ b/src/mess/drivers/ti99_8.c
@@ -765,7 +765,6 @@ WRITE_LINE_MEMBER( ti99_8_state::notconnected )
static TMS9928A_INTERFACE(ti99_8_tms9118a_interface)
{
- SCREEN_TAG,
0x4000,
DEVCB_DRIVER_LINE_MEMBER(ti99_8_state, set_tms9901_INT2)
};
diff --git a/src/mess/drivers/tim100.c b/src/mess/drivers/tim100.c
index 3618a9ab981..4349137b5e0 100644
--- a/src/mess/drivers/tim100.c
+++ b/src/mess/drivers/tim100.c
@@ -107,7 +107,6 @@ static I8275_DISPLAY_PIXELS(tim100_display_pixels)
}
static const i8275_interface tim100_i8276_interface = {
- "screen",
16, //12
0,
DEVCB_CPU_INPUT_LINE("maincpu", I8085_RST65_LINE),
diff --git a/src/mess/drivers/tm990189.c b/src/mess/drivers/tm990189.c
index e30285cdea9..a52dbef10d7 100644
--- a/src/mess/drivers/tm990189.c
+++ b/src/mess/drivers/tm990189.c
@@ -175,7 +175,6 @@ MACHINE_START_MEMBER(tm990189_state,tm990_189)
static TMS9928A_INTERFACE(tms9918_interface)
{
- "screen",
0x4000,
DEVCB_NULL
};
diff --git a/src/mess/drivers/trs80m2.c b/src/mess/drivers/trs80m2.c
index feae156b73e..78d0e462810 100644
--- a/src/mess/drivers/trs80m2.c
+++ b/src/mess/drivers/trs80m2.c
@@ -428,7 +428,6 @@ WRITE_LINE_MEMBER( trs80m2_state::vsync_w )
static MC6845_INTERFACE( mc6845_intf )
{
- SCREEN_TAG,
false,
8,
NULL,
@@ -825,7 +824,7 @@ static MACHINE_CONFIG_START( trs80m2, trs80m2_state )
MCFG_PALETTE_LENGTH(2)
MCFG_PALETTE_INIT_OVERRIDE(driver_device, black_and_white)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, XTAL_12_48MHz/8, mc6845_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, XTAL_12_48MHz/8, mc6845_intf)
// devices
MCFG_FD1791x_ADD(FD1791_TAG, XTAL_8MHz/4)
@@ -875,7 +874,7 @@ static MACHINE_CONFIG_START( trs80m16, trs80m16_state )
MCFG_SCREEN_SIZE(640, 480)
MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 479)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, XTAL_12_48MHz/8, mc6845_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, XTAL_12_48MHz/8, mc6845_intf)
// devices
MCFG_FD1791x_ADD(FD1791_TAG, XTAL_8MHz/4)
diff --git a/src/mess/drivers/tutor.c b/src/mess/drivers/tutor.c
index 4dcba0d12e9..1c98fd9f52d 100644
--- a/src/mess/drivers/tutor.c
+++ b/src/mess/drivers/tutor.c
@@ -246,7 +246,6 @@ DRIVER_INIT_MEMBER(tutor_state,pyuuta)
static TMS9928A_INTERFACE(tutor_tms9928a_interface)
{
- "screen",
0x4000,
DEVCB_NULL
};
diff --git a/src/mess/drivers/tvc.c b/src/mess/drivers/tvc.c
index 02557bfd84a..c54793420da 100644
--- a/src/mess/drivers/tvc.c
+++ b/src/mess/drivers/tvc.c
@@ -633,7 +633,6 @@ QUICKLOAD_LOAD_MEMBER( tvc_state,tvc64)
static MC6845_INTERFACE( tvc_crtc6845_interface )
{
- "screen",
false,
8 /*?*/,
NULL,
@@ -694,7 +693,7 @@ static MACHINE_CONFIG_START( tvc, tvc_state )
MCFG_PALETTE_LENGTH( 16 )
- MCFG_MC6845_ADD("crtc", MC6845, 3125000/2, tvc_crtc6845_interface) // clk taken from schematics
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", 3125000/2, tvc_crtc6845_interface) // clk taken from schematics
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
diff --git a/src/mess/drivers/v6809.c b/src/mess/drivers/v6809.c
index 3a6b800bb7d..0f35aed9e2f 100644
--- a/src/mess/drivers/v6809.c
+++ b/src/mess/drivers/v6809.c
@@ -176,7 +176,6 @@ void v6809_state::video_start()
static MC6845_INTERFACE( v6809_crtc )
{
- "screen", /* name of screen */
false,
8, /* number of dots per character */
NULL,
@@ -267,7 +266,7 @@ static MACHINE_CONFIG_START( v6809, v6809_state )
MCFG_GFXDECODE(v6809)
/* Devices */
- MCFG_MC6845_ADD("crtc", SY6545_1, XTAL_16MHz / 8, v6809_crtc)
+ MCFG_MC6845_ADD("crtc", SY6545_1, "screen", XTAL_16MHz / 8, v6809_crtc)
MCFG_ASCII_KEYBOARD_ADD(KEYBOARD_TAG, keyboard_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/vg5k.c b/src/mess/drivers/vg5k.c
index bda40943abd..082b96ee44e 100644
--- a/src/mess/drivers/vg5k.c
+++ b/src/mess/drivers/vg5k.c
@@ -349,11 +349,6 @@ DRIVER_INIT_MEMBER(vg5k_state,vg5k)
}
-static const ef9345_interface vg5k_ef9345_config =
-{
- "screen" /* screen we are acting on */
-};
-
static const struct CassetteOptions vg5k_cassette_options =
{
1, /* channels */
@@ -382,7 +377,7 @@ static MACHINE_CONFIG_START( vg5k, vg5k_state )
MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_timer", vg5k_state, z80_irq, attotime::from_msec(20))
- MCFG_EF9345_ADD("ef9345", vg5k_ef9345_config)
+ MCFG_EF9345_ADD("ef9345", "screen")
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mess/drivers/victor9k.c b/src/mess/drivers/victor9k.c
index 43b728e3c12..6476ae5dab4 100644
--- a/src/mess/drivers/victor9k.c
+++ b/src/mess/drivers/victor9k.c
@@ -299,7 +299,6 @@ static MC6845_UPDATE_ROW( victor9k_update_row )
static MC6845_INTERFACE( hd46505s_intf )
{
- SCREEN_TAG,
false,
10,
NULL,
@@ -1257,7 +1256,7 @@ static MACHINE_CONFIG_START( victor9k, victor9k_state )
MCFG_PALETTE_LENGTH(2)
MCFG_PALETTE_INIT_OVERRIDE(driver_device, monochrome_green)
- MCFG_MC6845_ADD(HD46505S_TAG, HD6845, 1000000, hd46505s_intf) // HD6845 == HD46505S
+ MCFG_MC6845_ADD(HD46505S_TAG, HD6845, SCREEN_TAG, 1000000, hd46505s_intf) // HD6845 == HD46505S
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mess/drivers/vidbrain.c b/src/mess/drivers/vidbrain.c
index 9f2b2060f60..b971734d455 100644
--- a/src/mess/drivers/vidbrain.c
+++ b/src/mess/drivers/vidbrain.c
@@ -457,7 +457,6 @@ READ8_MEMBER(vidbrain_state::memory_read_byte)
static UV201_INTERFACE( uv_intf )
{
- SCREEN_TAG,
DEVCB_DRIVER_LINE_MEMBER(vidbrain_state, ext_int_w),
DEVCB_DRIVER_LINE_MEMBER(vidbrain_state, hblank_w),
DEVCB_DRIVER_MEMBER(vidbrain_state, memory_read_byte)
diff --git a/src/mess/drivers/vii.c b/src/mess/drivers/vii.c
index 5cfa21feec9..8db216df407 100644
--- a/src/mess/drivers/vii.c
+++ b/src/mess/drivers/vii.c
@@ -123,7 +123,7 @@ public:
{
UINT8 r, g, b;
}
- m_screen[320*240];
+ m_screenram[320*240];
UINT16 m_io_regs[0x200];
UINT16 m_uart_rx_count;
@@ -225,16 +225,16 @@ inline UINT8 vii_state::vii_mix_channel(UINT8 a, UINT8 b)
void vii_state::vii_mix_pixel(UINT32 offset, UINT16 rgb)
{
- m_screen[offset].r = vii_mix_channel(m_screen[offset].r, expand_rgb5_to_rgb8(rgb >> 10));
- m_screen[offset].g = vii_mix_channel(m_screen[offset].g, expand_rgb5_to_rgb8(rgb >> 5));
- m_screen[offset].b = vii_mix_channel(m_screen[offset].b, expand_rgb5_to_rgb8(rgb));
+ m_screenram[offset].r = vii_mix_channel(m_screenram[offset].r, expand_rgb5_to_rgb8(rgb >> 10));
+ m_screenram[offset].g = vii_mix_channel(m_screenram[offset].g, expand_rgb5_to_rgb8(rgb >> 5));
+ m_screenram[offset].b = vii_mix_channel(m_screenram[offset].b, expand_rgb5_to_rgb8(rgb));
}
void vii_state::vii_set_pixel(UINT32 offset, UINT16 rgb)
{
- m_screen[offset].r = expand_rgb5_to_rgb8(rgb >> 10);
- m_screen[offset].g = expand_rgb5_to_rgb8(rgb >> 5);
- m_screen[offset].b = expand_rgb5_to_rgb8(rgb);
+ m_screenram[offset].r = expand_rgb5_to_rgb8(rgb >> 10);
+ m_screenram[offset].g = expand_rgb5_to_rgb8(rgb >> 5);
+ m_screenram[offset].b = expand_rgb5_to_rgb8(rgb);
}
void vii_state::vii_blit(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT32 xoff, UINT32 yoff, UINT32 attr, UINT32 ctrl, UINT32 bitmap_addr, UINT16 tile)
@@ -439,7 +439,7 @@ UINT32 vii_state::screen_update_vii(screen_device &screen, bitmap_rgb32 &bitmap,
bitmap.fill(0, cliprect);
- memset(m_screen, 0, sizeof(m_screen));
+ memset(m_screenram, 0, sizeof(m_screenram));
for(i = 0; i < 4; i++)
{
@@ -452,7 +452,7 @@ UINT32 vii_state::screen_update_vii(screen_device &screen, bitmap_rgb32 &bitmap,
{
for(x = 0; x < 320; x++)
{
- bitmap.pix32(y, x) = (m_screen[x + 320*y].r << 16) | (m_screen[x + 320*y].g << 8) | m_screen[x + 320*y].b;
+ bitmap.pix32(y, x) = (m_screenram[x + 320*y].r << 16) | (m_screenram[x + 320*y].g << 8) | m_screenram[x + 320*y].b;
}
}
diff --git a/src/mess/drivers/vk100.c b/src/mess/drivers/vk100.c
index f3323842ceb..53d08c3674a 100644
--- a/src/mess/drivers/vk100.c
+++ b/src/mess/drivers/vk100.c
@@ -167,7 +167,6 @@ public:
vk100_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_screen(*this, "screen"),
m_crtc(*this, "crtc"),
m_speaker(*this, "beeper"),
m_uart(*this, "i8251"),
@@ -180,7 +179,6 @@ public:
m_dipsw(*this, "SWITCHES")
{ }
required_device<cpu_device> m_maincpu;
- required_device<screen_device> m_screen;
required_device<mc6845_device> m_crtc;
required_device<beep_device> m_speaker;
required_device<i8251_device> m_uart;
@@ -995,7 +993,6 @@ static MC6845_UPDATE_ROW( vk100_update_row )
static MC6845_INTERFACE( mc6845_intf )
{
- "screen",
false,
12,
NULL,
@@ -1042,7 +1039,7 @@ static MACHINE_CONFIG_START( vk100, vk100_state )
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(XTAL_45_6192Mhz/3, 882, 0, 720, 370, 0, 350 ) // fake screen timings for startup until 6845 sets real ones
MCFG_SCREEN_UPDATE_DEVICE( "crtc", mc6845_device, screen_update )
- MCFG_MC6845_ADD( "crtc", H46505, XTAL_45_6192Mhz/3/12, mc6845_intf)
+ MCFG_MC6845_ADD( "crtc", H46505, "screen", XTAL_45_6192Mhz/3/12, mc6845_intf)
/* i8251 uart */
MCFG_I8251_ADD("i8251", i8251_intf)
diff --git a/src/mess/drivers/vt100.c b/src/mess/drivers/vt100.c
index 8a578b2545a..2205603203f 100644
--- a/src/mess/drivers/vt100.c
+++ b/src/mess/drivers/vt100.c
@@ -376,7 +376,6 @@ WRITE8_MEMBER( vt100_state::vt100_clear_video_interrupt )
static const vt_video_interface vt100_video_interface =
{
- "screen",
"chargen",
DEVCB_DRIVER_MEMBER(vt100_state, vt100_read_video_ram_r),
DEVCB_DRIVER_MEMBER(vt100_state, vt100_clear_video_interrupt)
diff --git a/src/mess/drivers/vt240.c b/src/mess/drivers/vt240.c
index 7aef8f539ba..fd2cc8cd74c 100644
--- a/src/mess/drivers/vt240.c
+++ b/src/mess/drivers/vt240.c
@@ -133,7 +133,6 @@ void vt240_state::machine_reset()
static UPD7220_INTERFACE( hgdc_intf )
{
- "screen",
NULL,
hgdc_draw_text,
DEVCB_NULL,
diff --git a/src/mess/drivers/x1.c b/src/mess/drivers/x1.c
index 1d18ad42b50..348382b9416 100644
--- a/src/mess/drivers/x1.c
+++ b/src/mess/drivers/x1.c
@@ -1882,7 +1882,6 @@ static I8255A_INTERFACE( ppi8255_intf )
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
true, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -2581,7 +2580,7 @@ static MACHINE_CONFIG_START( x1, x1_state )
MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
MCFG_SCREEN_UPDATE_DRIVER(x1_state, screen_update_x1)
- MCFG_MC6845_ADD("crtc", H46505, (VDP_CLOCK/48), mc6845_intf) //unknown divider
+ MCFG_MC6845_ADD("crtc", H46505, "screen", (VDP_CLOCK/48), mc6845_intf) //unknown divider
MCFG_PALETTE_LENGTH(0x10+0x1000)
MCFG_PALETTE_INIT_OVERRIDE(x1_state,x1)
diff --git a/src/mess/drivers/x1twin.c b/src/mess/drivers/x1twin.c
index 4de80432447..08d80ea3c63 100644
--- a/src/mess/drivers/x1twin.c
+++ b/src/mess/drivers/x1twin.c
@@ -90,7 +90,6 @@ static I8255A_INTERFACE( ppi8255_intf )
static MC6845_INTERFACE( mc6845_intf )
{
- "x1_screen", /* screen we are acting on */
false, /* show border area*/
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -556,7 +555,7 @@ static MACHINE_CONFIG_START( x1twin, x1twin_state )
MCFG_SCREEN_RAW_PARAMS(PCE_MAIN_CLOCK/2, VDC_WPF, 70, 70 + 512 + 32, VDC_LPF, 14, 14+242)
MCFG_SCREEN_UPDATE_DRIVER(x1twin_state, screen_update_x1pce)
- MCFG_MC6845_ADD("crtc", H46505, (VDP_CLOCK/48), mc6845_intf) //unknown divider
+ MCFG_MC6845_ADD("crtc", H46505, "x1_screen", (VDP_CLOCK/48), mc6845_intf) //unknown divider
MCFG_PALETTE_LENGTH(0x10+0x1000)
MCFG_PALETTE_INIT_OVERRIDE(x1twin_state,x1)
diff --git a/src/mess/drivers/z100.c b/src/mess/drivers/z100.c
index b324bca9023..7ef6a6d4020 100644
--- a/src/mess/drivers/z100.c
+++ b/src/mess/drivers/z100.c
@@ -616,7 +616,6 @@ READ8_MEMBER( z100_state::get_slave_ack )
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@@ -774,7 +773,7 @@ static MACHINE_CONFIG_START( z100, z100_state )
MCFG_PALETTE_LENGTH(8)
/* Devices */
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_14_31818MHz/8, mc6845_intf) /* unknown clock, hand tuned to get ~50/~60 fps */
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_14_31818MHz/8, mc6845_intf) /* unknown clock, hand tuned to get ~50/~60 fps */
MCFG_PIC8259_ADD( "pic8259_master", WRITELINE(z100_state, z100_pic_irq), VCC, READ8(z100_state, get_slave_ack) )
MCFG_PIC8259_ADD( "pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir3_w), GND, NULL )
diff --git a/src/mess/drivers/zrt80.c b/src/mess/drivers/zrt80.c
index a00efbdcfc3..e4d171f7dba 100644
--- a/src/mess/drivers/zrt80.c
+++ b/src/mess/drivers/zrt80.c
@@ -245,7 +245,6 @@ static MC6845_UPDATE_ROW( zrt80_update_row )
static MC6845_INTERFACE( zrt80_crtc6845_interface )
{
- "screen",
false,
8 /*?*/,
NULL,
@@ -321,7 +320,7 @@ static MACHINE_CONFIG_START( zrt80, zrt80_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
/* Devices */
- MCFG_MC6845_ADD("crtc", MC6845, XTAL_20MHz / 8, zrt80_crtc6845_interface)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_20MHz / 8, zrt80_crtc6845_interface)
MCFG_INS8250_ADD( "ins8250", zrt80_com_interface, 2457600 )
MCFG_ASCII_KEYBOARD_ADD(KEYBOARD_TAG, keyboard_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/includes/a7800.h b/src/mess/includes/a7800.h
index 41ae6739355..7e37f3b068d 100644
--- a/src/mess/includes/a7800.h
+++ b/src/mess/includes/a7800.h
@@ -21,7 +21,6 @@ public:
m_maincpu(*this, "maincpu"),
m_pokey(*this, "pokey"),
m_tia(*this, "tia"),
- m_screen(*this, "screen"),
m_region_maincpu(*this, "maincpu"),
m_bank1(*this, "bank1"),
m_bank2(*this, "bank2"),
@@ -100,7 +99,6 @@ protected:
required_device<cpu_device> m_maincpu;
required_device<pokey_device> m_pokey;
required_device<tia_device> m_tia;
- required_device<screen_device> m_screen;
required_memory_region m_region_maincpu;
required_memory_bank m_bank1;
required_memory_bank m_bank2;
diff --git a/src/mess/includes/amstrad.h b/src/mess/includes/amstrad.h
index cae9910b2ee..d20585d558f 100644
--- a/src/mess/includes/amstrad.h
+++ b/src/mess/includes/amstrad.h
@@ -105,7 +105,6 @@ public:
m_ay(*this, "ay"),
m_fdc(*this, "upd765"),
m_crtc(*this, "mc6845"),
- m_screen(*this, "screen"),
m_ppi(*this, "ppi8255"),
m_centronics(*this, "centronics"),
m_cassette(*this, "cassette"),
@@ -152,7 +151,6 @@ public:
required_device<ay8910_device> m_ay;
optional_device<upd765_family_device> m_fdc; // not on a GX4000
required_device<mc6845_device> m_crtc;
- required_device<screen_device> m_screen;
required_device<i8255_device> m_ppi;
optional_device<centronics_device> m_centronics; // not on a GX4000
optional_device<cassette_image_device> m_cassette; // not on a GX4000, (or technically, the 6128+)
diff --git a/src/mess/includes/aquarius.h b/src/mess/includes/aquarius.h
index f83fe291fbf..d1c61ec9258 100644
--- a/src/mess/includes/aquarius.h
+++ b/src/mess/includes/aquarius.h
@@ -23,7 +23,6 @@ public:
m_maincpu(*this, "maincpu"),
m_cassette(*this, "cassette"),
m_speaker(*this, "speaker"),
- m_screen(*this, "screen"),
m_ram(*this, RAM_TAG),
m_rom(*this, "maincpu"),
m_videoram(*this, "videoram"),
@@ -41,7 +40,6 @@ public:
required_device<legacy_cpu_device> m_maincpu;
required_device<cassette_image_device> m_cassette;
required_device<speaker_sound_device> m_speaker;
- required_device<screen_device> m_screen;
required_device<ram_device> m_ram;
required_memory_region m_rom;
required_shared_ptr<UINT8> m_videoram;
diff --git a/src/mess/includes/mac.h b/src/mess/includes/mac.h
index 77b433f2e0e..837683fe710 100644
--- a/src/mess/includes/mac.h
+++ b/src/mess/includes/mac.h
@@ -201,7 +201,6 @@ public:
m_egret(*this, EGRET_TAG),
m_cuda(*this, CUDA_TAG),
m_ram(*this, RAM_TAG),
- m_screen(*this, MAC_SCREEN_NAME),
m_539x_1(*this, MAC_539X_1_TAG),
m_539x_2(*this, MAC_539X_2_TAG),
m_ncr5380(*this, "scsi:ncr5380"),
@@ -230,7 +229,6 @@ public:
optional_device<egret_device> m_egret;
optional_device<cuda_device> m_cuda;
required_device<ram_device> m_ram;
- optional_device<screen_device> m_screen;
optional_device<ncr539x_device> m_539x_1;
optional_device<ncr539x_device> m_539x_2;
optional_device<ncr5380_device> m_ncr5380;
diff --git a/src/mess/includes/macpci.h b/src/mess/includes/macpci.h
index ba7b47f1185..8fbb1f7e6f4 100644
--- a/src/mess/includes/macpci.h
+++ b/src/mess/includes/macpci.h
@@ -85,7 +85,6 @@ public:
m_awacs(*this, "awacs"),
m_cuda(*this, CUDA_TAG),
m_ram(*this, RAM_TAG),
- m_screen(*this, MAC_SCREEN_NAME),
m_539x_1(*this, MAC_539X_1_TAG),
m_539x_2(*this, MAC_539X_2_TAG)
{ }
@@ -95,7 +94,6 @@ public:
optional_device<awacs_device> m_awacs;
required_device<cuda_device> m_cuda;
required_device<ram_device> m_ram;
- optional_device<screen_device> m_screen;
optional_device<ncr539x_device> m_539x_1;
optional_device<ncr539x_device> m_539x_2;
diff --git a/src/mess/includes/mz700.h b/src/mess/includes/mz700.h
index a22821549b6..e4e3a7095ed 100644
--- a/src/mess/includes/mz700.h
+++ b/src/mess/includes/mz700.h
@@ -49,7 +49,7 @@ public:
int m_mz800_ram_monitor; /* 1 if monitor rom banked in */
int m_hires_mode; /* 1 if in 640x200 mode */
- int m_screen; /* screen designation */
+ int m_screennum; /* screen designation */
UINT8 *m_colorram;
UINT8 *m_videoram;
UINT8 m_speaker_level;
diff --git a/src/mess/includes/pcw.h b/src/mess/includes/pcw.h
index a1b449994ca..0d109503ae1 100644
--- a/src/mess/includes/pcw.h
+++ b/src/mess/includes/pcw.h
@@ -29,7 +29,6 @@ public:
pcw_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_screen(*this, "screen"),
m_fdc(*this, "upd765"),
m_ram(*this, RAM_TAG),
m_beeper(*this, "beeper")
@@ -118,7 +117,6 @@ public:
void pcw_fdc_interrupt(bool state);
required_device<cpu_device> m_maincpu;
- required_device<screen_device> m_screen;
required_device<upd765a_device> m_fdc;
required_device<ram_device> m_ram;
required_device<beep_device> m_beeper;
diff --git a/src/mess/includes/zx.h b/src/mess/includes/zx.h
index bf38c07bd42..b1eb6d26cd6 100644
--- a/src/mess/includes/zx.h
+++ b/src/mess/includes/zx.h
@@ -30,7 +30,6 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_ram(*this, RAM_TAG),
- m_screen(*this, "screen"),
m_cassette(*this, "cassette"),
m_speaker(*this, "speaker"),
m_region_maincpu(*this, "maincpu"),
@@ -88,7 +87,6 @@ public:
protected:
required_device<cpu_device> m_maincpu;
required_device<ram_device> m_ram;
- required_device<screen_device> m_screen;
required_device<cassette_image_device> m_cassette;
required_device<speaker_sound_device> m_speaker;
required_memory_region m_region_maincpu;
diff --git a/src/mess/machine/a2arcadebd.c b/src/mess/machine/a2arcadebd.c
index 393459897b2..7de1209735a 100644
--- a/src/mess/machine/a2arcadebd.c
+++ b/src/mess/machine/a2arcadebd.c
@@ -38,7 +38,6 @@ static const ay8910_interface arcadeboard_ay8910_interface =
static TMS9928A_INTERFACE(arcadeboard_tms9918a_interface)
{
- SCREEN_TAG,
0x4000, // 16k of VRAM
DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, a2bus_arcboard_device, tms_irq_w)
};
diff --git a/src/mess/machine/a2videoterm.c b/src/mess/machine/a2videoterm.c
index ca01d5ad257..35b14f2c3c7 100644
--- a/src/mess/machine/a2videoterm.c
+++ b/src/mess/machine/a2videoterm.c
@@ -50,7 +50,6 @@ static MC6845_UPDATE_ROW( videoterm_update_row );
static MC6845_INTERFACE( mc6845_mda_intf )
{
- VIDEOTERM_SCREEN_NAME, /* screen number */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* begin_update */
@@ -68,7 +67,7 @@ MACHINE_CONFIG_FRAGMENT( a2videoterm )
MCFG_SCREEN_RAW_PARAMS(MDA_CLOCK, 882, 0, 720, 370, 0, 350 )
MCFG_SCREEN_UPDATE_DEVICE( VIDEOTERM_MC6845_NAME, mc6845_device, screen_update )
- MCFG_MC6845_ADD( VIDEOTERM_MC6845_NAME, MC6845, MDA_CLOCK/9, mc6845_mda_intf)
+ MCFG_MC6845_ADD( VIDEOTERM_MC6845_NAME, MC6845, VIDEOTERM_SCREEN_NAME, MDA_CLOCK/9, mc6845_mda_intf)
MACHINE_CONFIG_END
ROM_START( a2videoterm )
diff --git a/src/mess/machine/amstrad.c b/src/mess/machine/amstrad.c
index d735d96646d..aeb0c664953 100644
--- a/src/mess/machine/amstrad.c
+++ b/src/mess/machine/amstrad.c
@@ -1085,7 +1085,6 @@ UINT32 amstrad_state::screen_update_amstrad(screen_device &screen, bitmap_ind16
MC6845_INTERFACE( amstrad_mc6845_intf )
{
- NULL, /* screen name */
false, /* show border area */
16, /* number of pixels per video memory address */
NULL, /* begin_update */
@@ -1101,7 +1100,6 @@ MC6845_INTERFACE( amstrad_mc6845_intf )
MC6845_INTERFACE( amstrad_plus_mc6845_intf )
{
- NULL, /* screen name */
false, /* show border area */
16, /* number of pixels per video memory address */
NULL, /* begin_update */
diff --git a/src/mess/machine/c64/xl80.c b/src/mess/machine/c64/xl80.c
index 488a8f8169a..5f43efe36f4 100644
--- a/src/mess/machine/c64/xl80.c
+++ b/src/mess/machine/c64/xl80.c
@@ -112,7 +112,6 @@ static MC6845_UPDATE_ROW( c64_xl80_update_row )
static MC6845_INTERFACE( crtc_intf )
{
- MC6845_SCREEN_TAG,
false,
8,
NULL,
@@ -149,7 +148,7 @@ static MACHINE_CONFIG_FRAGMENT( c64_xl80 )
//MCFG_GFXDECODE(c64_xl80)
- MCFG_MC6845_ADD(HD46505SP_TAG, H46505, XTAL_14_31818MHz, crtc_intf)
+ MCFG_MC6845_ADD(HD46505SP_TAG, H46505, MC6845_SCREEN_TAG, XTAL_14_31818MHz, crtc_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/machine/comx_clm.c b/src/mess/machine/comx_clm.c
index ad560115dda..7422a52f73c 100644
--- a/src/mess/machine/comx_clm.c
+++ b/src/mess/machine/comx_clm.c
@@ -131,7 +131,6 @@ static MC6845_UPDATE_ROW( comx_clm_update_row )
static MC6845_INTERFACE( crtc_intf )
{
- MC6845_SCREEN_TAG,
false,
8,
NULL,
@@ -168,7 +167,7 @@ static MACHINE_CONFIG_FRAGMENT( comx_clm )
//MCFG_GFXDECODE(comx_clm)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, XTAL_14_31818MHz/7, crtc_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, MC6845_SCREEN_TAG, XTAL_14_31818MHz/7, crtc_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/machine/ecb_grip.c b/src/mess/machine/ecb_grip.c
index f591765e2ad..9893f4247bd 100644
--- a/src/mess/machine/ecb_grip.c
+++ b/src/mess/machine/ecb_grip.c
@@ -284,7 +284,6 @@ static const speaker_interface speaker_intf =
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
8,
NULL,
@@ -300,7 +299,6 @@ static MC6845_INTERFACE( crtc_intf )
static MC6845_INTERFACE( grip5_crtc_intf )
{
- SCREEN_TAG,
false,
8,
NULL,
@@ -550,8 +548,8 @@ static MACHINE_CONFIG_FRAGMENT( grip )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
// devices
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, XTAL_16MHz/4, crtc_intf)
-// MCFG_MC6845_ADD(HD6345_TAG, HD6345, XTAL_16MHz/4, grip5_crtc_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, XTAL_16MHz/4, crtc_intf)
+// MCFG_MC6845_ADD(HD6345_TAG, HD6345, SCREEN_TAG, XTAL_16MHz/4, grip5_crtc_intf)
MCFG_I8255A_ADD(I8255A_TAG, ppi_intf)
MCFG_Z80STI_ADD(Z80STI_TAG, XTAL_16MHz/4, sti_intf)
MCFG_CENTRONICS_PRINTER_ADD(CENTRONICS_TAG, standard_centronics)
diff --git a/src/mess/machine/mz700.c b/src/mess/machine/mz700.c
index bbea4a37fda..4a570205c50 100644
--- a/src/mess/machine/mz700.c
+++ b/src/mess/machine/mz700.c
@@ -610,7 +610,7 @@ WRITE8_MEMBER(mz_state::mz800_display_mode_w)
{
m_mz700_mode = BIT(data, 3);
m_hires_mode = BIT(data, 2);
- m_screen = data & 0x03;
+ m_screennum = data & 0x03;
/* change memory maps if we switched mode */
// if (BIT(data, 3) != m_mz700_mode)
diff --git a/src/mess/machine/radio86.c b/src/mess/machine/radio86.c
index 24aef2220da..448b4f1322b 100644
--- a/src/mess/machine/radio86.c
+++ b/src/mess/machine/radio86.c
@@ -250,7 +250,6 @@ I8255A_INTERFACE( mikrosha_ppi8255_interface_2 )
};
const i8275_interface radio86_i8275_interface = {
- "screen",
6,
0,
DEVCB_DEVICE_LINE_MEMBER("dma8257", i8257_device, i8257_drq2_w),
@@ -261,7 +260,6 @@ const i8275_interface radio86_i8275_interface = {
};
const i8275_interface mikrosha_i8275_interface = {
- "screen",
6,
0,
DEVCB_DEVICE_LINE_MEMBER("dma8257", i8257_device, i8257_drq2_w),
@@ -272,7 +270,6 @@ const i8275_interface mikrosha_i8275_interface = {
};
const i8275_interface apogee_i8275_interface = {
- "screen",
6,
0,
DEVCB_DEVICE_LINE_MEMBER("dma8257", i8257_device, i8257_drq2_w),
@@ -283,7 +280,6 @@ const i8275_interface apogee_i8275_interface = {
};
const i8275_interface partner_i8275_interface = {
- "screen",
6,
1,
DEVCB_DEVICE_LINE_MEMBER("dma8257", i8257_device, i8257_drq2_w),
diff --git a/src/mess/machine/sms_lphaser.c b/src/mess/machine/sms_lphaser.c
index e24a0b5a088..25d5f4273e4 100644
--- a/src/mess/machine/sms_lphaser.c
+++ b/src/mess/machine/sms_lphaser.c
@@ -71,6 +71,7 @@ ioport_constructor sms_light_phaser_device::device_input_ports() const
sms_light_phaser_device::sms_light_phaser_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, SMS_LIGHT_PHASER, "Light Phaser", tag, owner, clock, "sms_light_phaser", __FILE__),
+ device_video_interface(mconfig, *this),
device_sms_control_port_interface(mconfig, *this),
m_lphaser_pins(*this, "CTRL_PORT"),
m_lphaser_x(*this, "LPHASER_X"),
@@ -85,7 +86,6 @@ sms_light_phaser_device::sms_light_phaser_device(const machine_config &mconfig,
void sms_light_phaser_device::device_start()
{
- m_screen = machine().first_screen();
m_lphaser_timer = timer_alloc(TIMER_LPHASER);
m_last_state = 1;
}
diff --git a/src/mess/machine/sms_lphaser.h b/src/mess/machine/sms_lphaser.h
index 8f0c9ea933a..3f115e5f0cf 100644
--- a/src/mess/machine/sms_lphaser.h
+++ b/src/mess/machine/sms_lphaser.h
@@ -25,6 +25,7 @@
// ======================> sms_light_phaser_device
class sms_light_phaser_device : public device_t,
+ public device_video_interface,
public device_sms_control_port_interface
{
public:
@@ -50,7 +51,6 @@ private:
required_ioport m_lphaser_y;
int m_last_state;
- screen_device *m_screen;
emu_timer *m_lphaser_timer;
static const device_timer_id TIMER_LPHASER = 0;
diff --git a/src/mess/machine/wangpc_lvc.c b/src/mess/machine/wangpc_lvc.c
index f2748467970..20c103f0e48 100644
--- a/src/mess/machine/wangpc_lvc.c
+++ b/src/mess/machine/wangpc_lvc.c
@@ -119,7 +119,6 @@ WRITE_LINE_MEMBER( wangpc_lvc_device::vsync_w )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
8,
NULL,
@@ -145,7 +144,7 @@ static MACHINE_CONFIG_FRAGMENT( wangpc_lvc )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845_1, XTAL_14_31818MHz/16, crtc_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845_1, SCREEN_TAG, XTAL_14_31818MHz/16, crtc_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/machine/wangpc_mvc.c b/src/mess/machine/wangpc_mvc.c
index bff1c5a5641..c4a19abda56 100644
--- a/src/mess/machine/wangpc_mvc.c
+++ b/src/mess/machine/wangpc_mvc.c
@@ -139,7 +139,6 @@ WRITE_LINE_MEMBER( wangpc_mvc_device::vsync_w )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
10,
NULL,
@@ -165,7 +164,7 @@ static MACHINE_CONFIG_FRAGMENT( wangpc_mvc )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845_1, XTAL_14_31818MHz/16, crtc_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845_1, SCREEN_TAG, XTAL_14_31818MHz/16, crtc_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/machine/wangpc_tig.c b/src/mess/machine/wangpc_tig.c
index f2d4fd8a613..a0b99469b92 100644
--- a/src/mess/machine/wangpc_tig.c
+++ b/src/mess/machine/wangpc_tig.c
@@ -93,7 +93,6 @@ static UPD7220_DRAW_TEXT_LINE( hgdc_display_text)
static UPD7220_INTERFACE( hgdc0_intf )
{
- SCREEN_TAG,
NULL,
hgdc_display_text,
DEVCB_NULL,
@@ -117,7 +116,6 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
static UPD7220_INTERFACE( hgdc1_intf )
{
- SCREEN_TAG,
hgdc_display_pixels,
NULL,
DEVCB_NULL,
diff --git a/src/mess/video/abc1600.c b/src/mess/video/abc1600.c
index 39b90d06f79..a6084d16670 100644
--- a/src/mess/video/abc1600.c
+++ b/src/mess/video/abc1600.c
@@ -1026,7 +1026,6 @@ static MC6845_ON_UPDATE_ADDR_CHANGED( crtc_update )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
32,
NULL,
@@ -1119,5 +1118,5 @@ MACHINE_CONFIG_FRAGMENT( abc1600_video )
MCFG_SCREEN_SIZE(958, 1067)
MCFG_SCREEN_VISIBLE_AREA(0, 958-1, 0, 1067-1)
- MCFG_MC6845_ADD(SY6845E_TAG, SY6845E, XTAL_64MHz/32, crtc_intf)
+ MCFG_MC6845_ADD(SY6845E_TAG, SY6845E, SCREEN_TAG, XTAL_64MHz/32, crtc_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/video/abc800.c b/src/mess/video/abc800.c
index 869377f16bc..3d28a653c21 100644
--- a/src/mess/video/abc800.c
+++ b/src/mess/video/abc800.c
@@ -273,7 +273,6 @@ static MC6845_UPDATE_ROW( abc800m_update_row )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
ABC800_CHAR_WIDTH,
NULL,
@@ -317,7 +316,7 @@ UINT32 abc800m_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
//-------------------------------------------------
MACHINE_CONFIG_FRAGMENT( abc800m_video )
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, ABC800_CCLK, crtc_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, ABC800_CCLK, crtc_intf)
MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
MCFG_SCREEN_UPDATE_DRIVER(abc800m_state, screen_update)
diff --git a/src/mess/video/abc802.c b/src/mess/video/abc802.c
index b3364eef3eb..b05b9beaffa 100644
--- a/src/mess/video/abc802.c
+++ b/src/mess/video/abc802.c
@@ -189,7 +189,6 @@ WRITE_LINE_MEMBER( abc802_state::vs_w )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
ABC800_CHAR_WIDTH,
NULL,
@@ -237,7 +236,7 @@ UINT32 abc802_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
//-------------------------------------------------
MACHINE_CONFIG_FRAGMENT( abc802_video )
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, ABC800_CCLK, crtc_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, ABC800_CCLK, crtc_intf)
MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
MCFG_SCREEN_UPDATE_DRIVER(abc802_state, screen_update)
diff --git a/src/mess/video/abc806.c b/src/mess/video/abc806.c
index fd5908b3ad8..13ada077d7a 100644
--- a/src/mess/video/abc806.c
+++ b/src/mess/video/abc806.c
@@ -411,7 +411,6 @@ WRITE_LINE_MEMBER( abc806_state::vs_w )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
ABC800_CHAR_WIDTH,
NULL,
@@ -527,7 +526,7 @@ UINT32 abc806_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
//-------------------------------------------------
MACHINE_CONFIG_FRAGMENT( abc806_video )
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, ABC800_CCLK, crtc_intf)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, SCREEN_TAG, ABC800_CCLK, crtc_intf)
MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
MCFG_SCREEN_UPDATE_DRIVER(abc806_state, screen_update)
diff --git a/src/mess/video/bbc.c b/src/mess/video/bbc.c
index 8bf66580a8c..5aadc335da6 100644
--- a/src/mess/video/bbc.c
+++ b/src/mess/video/bbc.c
@@ -257,7 +257,6 @@ WRITE_LINE_MEMBER(bbc_state::bbc_vsync)
MC6845_INTERFACE( bbc_mc6845_intf )
{
- "screen", /* screen number */
false, /* show border area */
8, /* numbers of pixels per video memory address */
NULL, /* begin_update */
diff --git a/src/mess/video/comx35.c b/src/mess/video/comx35.c
index ef6580927f4..ba3e73296f1 100644
--- a/src/mess/video/comx35.c
+++ b/src/mess/video/comx35.c
@@ -80,7 +80,6 @@ WRITE_LINE_MEMBER( comx35_state::prd_w )
static CDP1869_INTERFACE( pal_cdp1869_intf )
{
- SCREEN_TAG,
CDP1869_COLOR_CLK_PAL,
CDP1869_PAL,
comx35_pcb_r,
@@ -91,7 +90,6 @@ static CDP1869_INTERFACE( pal_cdp1869_intf )
static CDP1869_INTERFACE( ntsc_cdp1869_intf )
{
- SCREEN_TAG,
CDP1869_COLOR_CLK_NTSC,
CDP1869_NTSC,
comx35_pcb_r,
@@ -115,6 +113,7 @@ MACHINE_CONFIG_FRAGMENT( comx35_pal_video )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_CDP1869_ADD(CDP1869_TAG, CDP1869_DOT_CLK_PAL, pal_cdp1869_intf, cdp1869_page_ram)
+ MCFG_CDP1869_SET_SCREEN(SCREEN_TAG)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
@@ -128,6 +127,7 @@ MACHINE_CONFIG_FRAGMENT( comx35_ntsc_video )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_CDP1869_ADD(CDP1869_TAG, CDP1869_DOT_CLK_NTSC, ntsc_cdp1869_intf, cdp1869_page_ram)
+ MCFG_CDP1869_SET_SCREEN(SCREEN_TAG)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
diff --git a/src/mess/video/crtc_ega.c b/src/mess/video/crtc_ega.c
index 88bdf7a3932..8aa7237c9cc 100644
--- a/src/mess/video/crtc_ega.c
+++ b/src/mess/video/crtc_ega.c
@@ -26,7 +26,6 @@ void crtc_ega_device::device_config_complete()
}
else
{
- m_screen_tag = NULL;
m_hpixels_per_column = 0;
m_begin_update = NULL;
m_update_row = NULL;
@@ -40,7 +39,8 @@ void crtc_ega_device::device_config_complete()
crtc_ega_device::crtc_ega_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, CRTC_EGA, "crtc_EGA", tag, owner, clock, "crtc_ega", __FILE__)
+ : device_t(mconfig, CRTC_EGA, "crtc_EGA", tag, owner, clock, "crtc_ega", __FILE__),
+ device_video_interface(mconfig, *this, false)
{
}
@@ -600,16 +600,6 @@ void crtc_ega_device::device_start()
m_res_out_vsync_func.resolve(m_out_vsync_func, *this);
m_res_out_vblank_func.resolve(m_out_vblank_func, *this);
- /* get the screen device */
- if ( m_screen_tag != NULL )
- {
- astring tempstring;
- m_screen = downcast<screen_device *>(machine().device(siblingtag(tempstring,m_screen_tag)));
- assert(m_screen != NULL);
- }
- else
- m_screen = NULL;
-
/* create the timers */
m_line_timer = timer_alloc(TIMER_LINE);
m_de_off_timer = timer_alloc(TIMER_DE_OFF);
diff --git a/src/mess/video/crtc_ega.h b/src/mess/video/crtc_ega.h
index ef87ca959c3..d211a63b888 100644
--- a/src/mess/video/crtc_ega.h
+++ b/src/mess/video/crtc_ega.h
@@ -16,6 +16,8 @@
MCFG_DEVICE_ADD(_tag, CRTC_EGA, _clock) \
MCFG_DEVICE_CONFIG(_intrf)
+#define MCFG_CRTC_EGA_SET_SCREEN MCFG_VIDEO_SET_SCREEN
+
class crtc_ega_device;
@@ -37,7 +39,6 @@ typedef void (*crtc_ega_end_update_func)(crtc_ega_device *device, bitmap_ind16 &
/* interface */
struct crtc_ega_interface
{
- const char *m_screen_tag; /* screen we are acting on */
int m_hpixels_per_column; /* number of pixels per video memory address */
/* if specified, this gets called before any pixel update,
@@ -68,6 +69,7 @@ struct crtc_ega_interface
class crtc_ega_device : public device_t,
+ public device_video_interface,
public crtc_ega_interface
{
public:
@@ -111,8 +113,6 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
private:
- screen_device *m_screen;
-
devcb_resolved_write_line m_res_out_de_func;
devcb_resolved_write_line m_res_out_cur_func;
devcb_resolved_write_line m_res_out_hsync_func;
diff --git a/src/mess/video/dgn_beta.c b/src/mess/video/dgn_beta.c
index a93ee936855..77f7cbc78b8 100644
--- a/src/mess/video/dgn_beta.c
+++ b/src/mess/video/dgn_beta.c
@@ -258,7 +258,6 @@ WRITE_LINE_MEMBER(dgn_beta_state::dgnbeta_vsync_changed)
MC6845_INTERFACE( dgnbeta_crtc6845_interface )
{
- "screen",
false,
16 /*?*/,
NULL,
diff --git a/src/mess/video/ef9345.c b/src/mess/video/ef9345.c
index 044d01786bc..50e2f582cac 100644
--- a/src/mess/video/ef9345.c
+++ b/src/mess/video/ef9345.c
@@ -43,29 +43,6 @@ const address_space_config *ef9345_device::memory_space_config(address_spacenum
return (spacenum == AS_0) ? &m_space_config : NULL;
}
-//-------------------------------------------------
-// device_config_complete - perform any
-// operations now that the configuration is
-// complete
-//-------------------------------------------------
-
-void ef9345_device::device_config_complete()
-{
- // inherit a copy of the static data
- const ef9345_interface *intf = reinterpret_cast<const ef9345_interface *>(static_config());
-
- if (intf != NULL)
- {
- *static_cast<ef9345_interface *>(this) = *intf;
- }
- // or initialize to defaults if none provided
- else
- {
- screen_tag = NULL;
- }
-}
-
-
//**************************************************************************
// INLINE HELPERS
//**************************************************************************
@@ -123,6 +100,7 @@ inline void ef9345_device::inc_y(UINT8 r)
ef9345_device::ef9345_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, EF9345, "EF9345", tag, owner, clock, "ef9345", __FILE__),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, NULL, *ADDRESS_MAP_NAME(ef9345))
{
}
@@ -133,10 +111,6 @@ ef9345_device::ef9345_device(const machine_config &mconfig, const char *tag, dev
void ef9345_device::device_start()
{
- m_screen = machine().device<screen_device>(screen_tag);
-
- assert(m_screen != NULL);
-
m_busy_timer = timer_alloc(BUSY_TIMER);
m_blink_timer = timer_alloc(BLINKING_TIMER);
diff --git a/src/mess/video/ef9345.h b/src/mess/video/ef9345.h
index d77ceb483e9..037f3e355fd 100644
--- a/src/mess/video/ef9345.h
+++ b/src/mess/video/ef9345.h
@@ -21,18 +21,11 @@
// TYPE DEFINITIONS
//**************************************************************************
-// ======================> ef9345_interface
-
-struct ef9345_interface
-{
- const char *screen_tag; // screen we are acting on
-};
-
// ======================> ef9345_device
class ef9345_device : public device_t,
public device_memory_interface,
- public ef9345_interface
+ public device_video_interface
{
public:
// construction/destruction
@@ -49,8 +42,6 @@ protected:
virtual void device_start();
virtual void device_reset();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
- // device_config overrides
- virtual void device_config_complete();
// device_config_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const;
@@ -92,8 +83,6 @@ private:
memory_region *m_charset;
address_space *m_videoram;
- screen_device *m_screen; //screen we are acting on
-
UINT8 m_bf; //busy flag
UINT8 m_char_mode; //40 or 80 chars for line
UINT8 m_acc_char[0x2000]; //accented chars
diff --git a/src/mess/video/gb_lcd.c b/src/mess/video/gb_lcd.c
index 6d46cb7dcc7..b72706fb926 100644
--- a/src/mess/video/gb_lcd.c
+++ b/src/mess/video/gb_lcd.c
@@ -180,12 +180,14 @@ const device_type GB_LCD_CGB = &device_creator<cgb_lcd_device>;
gb_lcd_device::gb_lcd_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
m_sgb_border_hack(0)
{
}
gb_lcd_device::gb_lcd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, GB_LCD_DMG, "DMG LCD", tag, owner, clock, "dmg_lcd", __FILE__),
+ device_video_interface(mconfig, *this),
m_sgb_border_hack(0)
{
}
@@ -219,7 +221,6 @@ void gb_lcd_device::common_start()
machine().save().register_postload(save_prepost_delegate(FUNC(gb_lcd_device::videoptr_restore), this));
m_maincpu = machine().device<cpu_device>("maincpu");
- m_screen = machine().device<screen_device>("screen");
save_pointer(NAME(m_oam), 0x100);
save_item(NAME(m_window_lines_drawn));
diff --git a/src/mess/video/gb_lcd.h b/src/mess/video/gb_lcd.h
index 96e257f1104..1ca596aab74 100644
--- a/src/mess/video/gb_lcd.h
+++ b/src/mess/video/gb_lcd.h
@@ -36,7 +36,8 @@ struct layer_struct {
};
-class gb_lcd_device : public device_t
+class gb_lcd_device : public device_t,
+ public device_video_interface
{
public:
gb_lcd_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
@@ -70,7 +71,6 @@ protected:
// pointer to the main system
cpu_device *m_maincpu;
- screen_device *m_screen;
// state variables
bitmap_ind16 m_bitmap;
diff --git a/src/mess/video/isa_cga.c b/src/mess/video/isa_cga.c
index 12b0b1d9329..b8ef7d64183 100644
--- a/src/mess/video/isa_cga.c
+++ b/src/mess/video/isa_cga.c
@@ -606,7 +606,6 @@ static MC6845_UPDATE_ROW( cga_update_row )
static MC6845_INTERFACE( mc6845_cga_intf )
{
- CGA_SCREEN_NAME, /* screen number */
false, /* show border area */
8, /* numbers of pixels per video memory address */
NULL, /* begin_update */
@@ -630,7 +629,7 @@ static MACHINE_CONFIG_FRAGMENT( cga )
MCFG_PALETTE_LENGTH(/* CGA_PALETTE_SETS * 16*/ 65536 )
- MCFG_MC6845_ADD(CGA_MC6845_NAME, MC6845, XTAL_14_31818MHz/8, mc6845_cga_intf)
+ MCFG_MC6845_ADD(CGA_MC6845_NAME, MC6845, CGA_SCREEN_NAME, XTAL_14_31818MHz/8, mc6845_cga_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/video/isa_ega.c b/src/mess/video/isa_ega.c
index 99853b7e618..6fa4f9a23d3 100644
--- a/src/mess/video/isa_ega.c
+++ b/src/mess/video/isa_ega.c
@@ -456,7 +456,6 @@ static CRTC_EGA_UPDATE_ROW( ega_update_row );
static CRTC_EGA_INTERFACE( crtc_ega_ega_intf )
{
- EGA_SCREEN_NAME, /* screen number */
8, /* numbers of pixels per video memory address */
NULL, /* begin_update */
ega_update_row, /* update_row */
@@ -475,6 +474,7 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_ega )
MCFG_PALETTE_LENGTH( 64 )
MCFG_CRTC_EGA_ADD(EGA_CRTC_NAME, 16257000/8, crtc_ega_ega_intf)
+ MCFG_CRTC_EGA_SET_SCREEN(EGA_SCREEN_NAME)
MACHINE_CONFIG_END
ROM_START( ega )
diff --git a/src/mess/video/isa_mda.c b/src/mess/video/isa_mda.c
index 1b8165cb6f0..299daf4536f 100644
--- a/src/mess/video/isa_mda.c
+++ b/src/mess/video/isa_mda.c
@@ -77,7 +77,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_mda_intf )
{
- MDA_SCREEN_NAME, /* screen number */
false, /* show border area */
9, /* number of pixels per video memory address */
NULL, /* begin_update */
@@ -108,7 +107,7 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_mda )
MCFG_PALETTE_LENGTH( 4 )
- MCFG_MC6845_ADD( MDA_MC6845_NAME, MC6845, MDA_CLOCK/9, mc6845_mda_intf)
+ MCFG_MC6845_ADD( MDA_MC6845_NAME, MC6845, MDA_SCREEN_NAME, MDA_CLOCK/9, mc6845_mda_intf)
//MCFG_GFXDECODE(pcmda)
@@ -498,7 +497,6 @@ The divder/pixels per 6845 clock is 9 for text mode and 16 for graphics mode.
static MC6845_INTERFACE( mc6845_hercules_intf )
{
- HERCULES_SCREEN_NAME, /* screen number */
false, /* show border area */
9, /* number of pixels per video memory address */
NULL, /* begin_update */
@@ -522,7 +520,7 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_hercules )
MCFG_PALETTE_LENGTH( 4 )
- MCFG_MC6845_ADD( HERCULES_MC6845_NAME, MC6845, MDA_CLOCK/9, mc6845_hercules_intf)
+ MCFG_MC6845_ADD( HERCULES_MC6845_NAME, MC6845, HERCULES_SCREEN_NAME, MDA_CLOCK/9, mc6845_hercules_intf)
//MCFG_GFXDECODE(pcherc)
diff --git a/src/mess/video/k1ge.c b/src/mess/video/k1ge.c
index c05ee880e13..5282282e448 100644
--- a/src/mess/video/k1ge.c
+++ b/src/mess/video/k1ge.c
@@ -810,7 +810,6 @@ void k1ge_device::device_start()
m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(k1ge_device::timer_callback), this));
m_hblank_on_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(k1ge_device::hblank_on_timer_callback), this));
- m_screen = machine().device<screen_device>(m_screen_tag);
m_vram = auto_alloc_array_clear(machine(), UINT8, 0x4000);
m_bitmap = auto_bitmap_ind16_alloc( machine(), m_screen->width(), m_screen->height() );
@@ -874,6 +873,7 @@ const device_type K1GE = &device_creator<k1ge_device>;
k1ge_device::k1ge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K1GE, "K1GE Monochrome Graphics + LCD", tag, owner, clock, "k1ge", __FILE__)
+ , device_video_interface(mconfig, *this)
, m_vblank_pin_w(*this)
, m_hblank_pin_w(*this)
{
@@ -881,6 +881,7 @@ k1ge_device::k1ge_device(const machine_config &mconfig, const char *tag, device_
k1ge_device::k1ge_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source)
+ , device_video_interface(mconfig, *this)
, m_vblank_pin_w(*this)
, m_hblank_pin_w(*this)
{
diff --git a/src/mess/video/k1ge.h b/src/mess/video/k1ge.h
index 9651f86ad49..66bdd1b97fb 100644
--- a/src/mess/video/k1ge.h
+++ b/src/mess/video/k1ge.h
@@ -5,18 +5,19 @@
#define MCFG_K1GE_ADD(_tag, _clock, _screen, _vblank, _hblank ) \
MCFG_DEVICE_ADD( _tag, K1GE, _clock ) \
- k1ge_device::static_set_screen( *device, _screen ); \
+ MCFG_VIDEO_SET_SCREEN( _screen ) \
devcb = &k1ge_device::static_set_vblank_callback( *device, DEVCB2_##_vblank ); \
devcb = &k1ge_device::static_set_hblank_callback( *device, DEVCB2_##_hblank );
#define MCFG_K2GE_ADD(_tag, _clock, _screen, _vblank, _hblank ) \
MCFG_DEVICE_ADD( _tag, K2GE, _clock ) \
- k1ge_device::static_set_screen( *device, _screen ); \
+ MCFG_VIDEO_SET_SCREEN( _screen ) \
devcb = &k1ge_device::static_set_vblank_callback( *device, DEVCB2_##_vblank ); \
devcb = &k1ge_device::static_set_hblank_callback( *device, DEVCB2_##_hblank );
-class k1ge_device : public device_t
+class k1ge_device : public device_t,
+ public device_video_interface
{
public:
k1ge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
@@ -30,7 +31,6 @@ public:
void update( bitmap_ind16 &bitmap, const rectangle &cliprect );
// Static methods
- static void static_set_screen(device_t &device, const char *screen_name) { downcast<k1ge_device &>(device).m_screen_tag = screen_name; }
template<class _Object> static devcb2_base &static_set_vblank_callback(device_t &device, _Object object) { return downcast<k1ge_device &>(device).m_vblank_pin_w.set_callback(object); }
template<class _Object> static devcb2_base &static_set_hblank_callback(device_t &device, _Object object) { return downcast<k1ge_device &>(device).m_hblank_pin_w.set_callback(object); }
@@ -40,8 +40,6 @@ protected:
virtual void device_start();
virtual void device_reset();
- const char *m_screen_tag;
- screen_device *m_screen;
devcb2_write_line m_vblank_pin_w;
devcb2_write_line m_hblank_pin_w;
UINT8 *m_vram;
diff --git a/src/mess/video/kyocera.c b/src/mess/video/kyocera.c
index 0043b10a33e..dac55133b96 100644
--- a/src/mess/video/kyocera.c
+++ b/src/mess/video/kyocera.c
@@ -37,7 +37,6 @@ UINT32 tandy200_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
static HD61830_INTERFACE( lcdc_intf )
{
- SCREEN_TAG,
DEVCB_NULL
};
diff --git a/src/mess/video/mbc55x.c b/src/mess/video/mbc55x.c
index 64bb0200c40..85b0a0b3447 100644
--- a/src/mess/video/mbc55x.c
+++ b/src/mess/video/mbc55x.c
@@ -160,7 +160,6 @@ WRITE_LINE_MEMBER( mbc55x_state::vid_vsync_changed )
MC6845_INTERFACE( mb55x_mc6845_intf )
{
- SCREEN_TAG, /* screen number */
false, /* show border area */
8, /* numbers of pixels per video memory address */
NULL, /* begin_update */
diff --git a/src/mess/video/mikromik.c b/src/mess/video/mikromik.c
index ba6056de725..516c58a9523 100644
--- a/src/mess/video/mikromik.c
+++ b/src/mess/video/mikromik.c
@@ -35,7 +35,6 @@ static I8275_DISPLAY_PIXELS( crtc_display_pixels )
static const i8275_interface crtc_intf =
{
- SCREEN_TAG,
8,
0,
DEVCB_DEVICE_LINE_MEMBER(I8237_TAG, am9517a_device, dreq0_w),
@@ -74,7 +73,6 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
static UPD7220_INTERFACE( hgdc_intf )
{
- SCREEN_TAG,
hgdc_display_pixels,
NULL,
DEVCB_NULL,
diff --git a/src/mess/video/mos6566.c b/src/mess/video/mos6566.c
index 2c8183197ad..6ee73e4774c 100644
--- a/src/mess/video/mos6566.c
+++ b/src/mess/video/mos6566.c
@@ -582,6 +582,7 @@ inline void mos6566_device::draw_multi( UINT16 p, UINT8 c0, UINT8 c1, UINT8 c2,
mos6566_device::mos6566_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MOS6566, "MOS6566", tag, owner, clock, "mos6566", __FILE__),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
device_execute_interface(mconfig, *this),
m_icount(0),
m_variant(TYPE_6566),
@@ -597,6 +598,7 @@ mos6566_device::mos6566_device(const machine_config &mconfig, const char *tag, d
mos6566_device::mos6566_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
device_execute_interface(mconfig, *this),
m_icount(0),
m_variant(variant),
@@ -657,7 +659,6 @@ void mos6566_device::device_start()
else
m_cpu = machine().firstcpu;
- m_screen = machine().device<screen_device>(m_screen_tag);
m_screen->register_screen_bitmap(m_bitmap);
for (int i = 0; i < 256; i++)
diff --git a/src/mess/video/mos6566.h b/src/mess/video/mos6566.h
index 713ee68c8af..fe4ca992d6a 100644
--- a/src/mess/video/mos6566.h
+++ b/src/mess/video/mos6566.h
@@ -93,7 +93,8 @@
#define MCFG_MOS6566_ADD(_tag, _screen_tag, _clock, _videoram_map, _colorram_map, _irq) \
MCFG_DEVICE_ADD(_tag, MOS6566, _clock) \
- downcast<mos6566_device *>(device)->set_callbacks(_screen_tag, NULL, DEVCB2_##_irq, DEVCB2_NULL); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ downcast<mos6566_device *>(device)->set_callbacks(NULL, DEVCB2_##_irq, DEVCB2_NULL); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@@ -104,7 +105,8 @@
#define MCFG_MOS6567_ADD(_tag, _screen_tag, _clock, _videoram_map, _colorram_map, _irq) \
MCFG_DEVICE_ADD(_tag, MOS6567, _clock) \
- downcast<mos6566_device *>(device)->set_callbacks(_screen_tag, NULL, DEVCB2_##_irq, DEVCB2_NULL); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ downcast<mos6566_device *>(device)->set_callbacks(NULL, DEVCB2_##_irq, DEVCB2_NULL); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@@ -115,7 +117,8 @@
#define MCFG_MOS8562_ADD(_tag, _screen_tag, _clock, _videoram_map, _colorram_map, _irq) \
MCFG_DEVICE_ADD(_tag, MOS8562, _clock) \
- downcast<mos6566_device *>(device)->set_callbacks(_screen_tag, NULL, DEVCB2_##_irq, DEVCB2_NULL); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ downcast<mos6566_device *>(device)->set_callbacks(NULL, DEVCB2_##_irq, DEVCB2_NULL); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@@ -126,7 +129,8 @@
#define MCFG_MOS8564_ADD(_tag, _screen_tag, _cpu_tag, _clock, _videoram_map, _colorram_map, _irq, _k) \
MCFG_DEVICE_ADD(_tag, MOS8564, _clock) \
- downcast<mos6566_device *>(device)->set_callbacks(_screen_tag, _cpu_tag, DEVCB2_##_irq, DEVCB2_##_k); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ downcast<mos6566_device *>(device)->set_callbacks(_cpu_tag, DEVCB2_##_irq, DEVCB2_##_k); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@@ -137,7 +141,8 @@
#define MCFG_MOS6569_ADD(_tag, _screen_tag, _clock, _videoram_map, _colorram_map, _irq) \
MCFG_DEVICE_ADD(_tag, MOS6569, _clock) \
- downcast<mos6566_device *>(device)->set_callbacks(_screen_tag, NULL, DEVCB2_##_irq, DEVCB2_NULL); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ downcast<mos6566_device *>(device)->set_callbacks(NULL, DEVCB2_##_irq, DEVCB2_NULL); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@@ -148,7 +153,8 @@
#define MCFG_MOS8565_ADD(_tag, _screen_tag, _clock, _videoram_map, _colorram_map, _irq) \
MCFG_DEVICE_ADD(_tag, MOS8565, _clock) \
- downcast<mos6566_device *>(device)->set_callbacks(_screen_tag, NULL, DEVCB2_##_irq, DEVCB2_NULL); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ downcast<mos6566_device *>(device)->set_callbacks(NULL, DEVCB2_##_irq, DEVCB2_NULL); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@@ -159,7 +165,8 @@
#define MCFG_MOS8566_ADD(_tag, _screen_tag, _cpu_tag, _clock, _videoram_map, _colorram_map, _irq, _k) \
MCFG_DEVICE_ADD(_tag, MOS8566, _clock) \
- downcast<mos6566_device *>(device)->set_callbacks(_screen_tag, _cpu_tag, DEVCB2_##_irq, DEVCB2_##_k); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ downcast<mos6566_device *>(device)->set_callbacks(_cpu_tag, DEVCB2_##_irq, DEVCB2_##_k); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@@ -269,6 +276,7 @@
class mos6566_device : public device_t,
public device_memory_interface,
+ public device_video_interface,
public device_execute_interface
{
public:
@@ -276,8 +284,7 @@ public:
mos6566_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant, const char *shortname, const char *source);
mos6566_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- template<class _irq, class _k> void set_callbacks(const char *screen_tag, const char *cpu_tag, _irq irq, _k k) {
- m_screen_tag = screen_tag;
+ template<class _irq, class _k> void set_callbacks(const char *cpu_tag, _irq irq, _k k) {
m_cpu_tag = cpu_tag;
m_write_irq.set_callback(irq);
m_write_k.set_callback(k);
@@ -355,9 +362,7 @@ protected:
devcb2_write_line m_write_aec;
devcb2_write8 m_write_k;
- const char *m_screen_tag;
const char *m_cpu_tag;
- screen_device *m_screen; // screen which sets bitmap properties
cpu_device *m_cpu;
int m_phi0;
diff --git a/src/mess/video/nick.c b/src/mess/video/nick.c
index 883feb96708..90a38a2fc22 100644
--- a/src/mess/video/nick.c
+++ b/src/mess/video/nick.c
@@ -105,6 +105,7 @@ ADDRESS_MAP_END
nick_device::nick_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, NICK, "NICK", tag, owner, clock, "nick", __FILE__),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_space_config("vram", ENDIANNESS_LITTLE, 8, 16, 0, *ADDRESS_MAP_NAME(nick_map)),
m_write_virq(*this),
horizontal_clock(0),
@@ -126,7 +127,6 @@ nick_device::nick_device(const machine_config &mconfig, const char *tag, device_
void nick_device::device_start()
{
- m_screen = machine().device<screen_device>(m_screen_tag);
m_screen->register_screen_bitmap(m_bitmap);
calc_visible_clocks(ENTERPRISE_SCREEN_WIDTH);
diff --git a/src/mess/video/nick.h b/src/mess/video/nick.h
index efd6f942a40..f71010cd14d 100644
--- a/src/mess/video/nick.h
+++ b/src/mess/video/nick.h
@@ -30,7 +30,7 @@
MCFG_SCREEN_VISIBLE_AREA(0, ENTERPRISE_SCREEN_WIDTH-1, 0, ENTERPRISE_SCREEN_HEIGHT-1) \
MCFG_SCREEN_UPDATE_DEVICE(_tag, nick_device, screen_update) \
MCFG_DEVICE_ADD(_tag, NICK, _clock) \
- downcast<nick_device *>(device)->set_screen_tag(_screen_tag); \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
downcast<nick_device *>(device)->set_virq_callback(DEVCB2_##_virq);
@@ -66,13 +66,13 @@ struct LPT_ENTRY
// ======================> nick_device
class nick_device : public device_t,
- public device_memory_interface
+ public device_memory_interface,
+ public device_video_interface
{
public:
// construction/destruction
nick_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- void set_screen_tag(const char *screen_tag) { m_screen_tag = screen_tag; }
template<class _virq> void set_virq_callback(_virq virq) { m_write_virq.set_callback(virq); }
virtual DECLARE_ADDRESS_MAP(vram_map, 8);
@@ -161,8 +161,6 @@ private:
int m_virq;
- const char *m_screen_tag;
- screen_device *m_screen;
bitmap_rgb32 m_bitmap;
rgb_t m_palette[256];
diff --git a/src/mess/video/nubus_m2hires.c b/src/mess/video/nubus_m2hires.c
index 81912b13b83..85de8ea3d22 100644
--- a/src/mess/video/nubus_m2hires.c
+++ b/src/mess/video/nubus_m2hires.c
@@ -65,14 +65,18 @@ const rom_entry *nubus_m2hires_device::device_rom_region() const
nubus_m2hires_device::nubus_m2hires_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NUBUS_M2HIRES, "Macintosh II Hi-Resolution video card", tag, owner, clock, "nb_m2hr", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = M2HIRES_SCREEN_NAME;
}
nubus_m2hires_device::nubus_m2hires_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = M2HIRES_SCREEN_NAME;
}
//-------------------------------------------------
@@ -99,7 +103,7 @@ void nubus_m2hires_device::device_start()
m_nubus->install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_m2hires_device::m2hires_r), this), write32_delegate(FUNC(nubus_m2hires_device::m2hires_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
//-------------------------------------------------
@@ -142,13 +146,6 @@ UINT32 nubus_m2hires_device::screen_update(screen_device &screen, bitmap_rgb32 &
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
- }
-
vram = m_vram + 0x20;
switch (m_mode)
diff --git a/src/mess/video/nubus_m2hires.h b/src/mess/video/nubus_m2hires.h
index 18b73226731..6f89514aaaa 100644
--- a/src/mess/video/nubus_m2hires.h
+++ b/src/mess/video/nubus_m2hires.h
@@ -14,6 +14,7 @@
class nubus_m2hires_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
};
diff --git a/src/mess/video/nubus_m2video.c b/src/mess/video/nubus_m2video.c
index 711a1dbfe33..5da60d0c475 100644
--- a/src/mess/video/nubus_m2video.c
+++ b/src/mess/video/nubus_m2video.c
@@ -66,14 +66,18 @@ const rom_entry *nubus_m2video_device::device_rom_region() const
nubus_m2video_device::nubus_m2video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NUBUS_M2VIDEO, "Macintosh II Video Card", tag, owner, clock, "nb_m2vc", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = M2VIDEO_SCREEN_NAME;
}
nubus_m2video_device::nubus_m2video_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = M2VIDEO_SCREEN_NAME;
}
//-------------------------------------------------
@@ -100,7 +104,7 @@ void nubus_m2video_device::device_start()
m_nubus->install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_m2video_device::m2video_r), this), write32_delegate(FUNC(nubus_m2video_device::m2video_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
//-------------------------------------------------
@@ -143,13 +147,6 @@ UINT32 nubus_m2video_device::screen_update(screen_device &screen, bitmap_rgb32 &
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
- }
-
vram = m_vram + 0x20;
switch (m_mode)
diff --git a/src/mess/video/nubus_m2video.h b/src/mess/video/nubus_m2video.h
index 00708d10480..5dcdd15b683 100644
--- a/src/mess/video/nubus_m2video.h
+++ b/src/mess/video/nubus_m2video.h
@@ -14,6 +14,7 @@
class nubus_m2video_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
};
diff --git a/src/mess/video/nubus_radiustpd.c b/src/mess/video/nubus_radiustpd.c
index b4fe9c46ca1..3eaaaa8b643 100644
--- a/src/mess/video/nubus_radiustpd.c
+++ b/src/mess/video/nubus_radiustpd.c
@@ -65,14 +65,18 @@ const rom_entry *nubus_radiustpd_device::device_rom_region() const
nubus_radiustpd_device::nubus_radiustpd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NUBUS_RADIUSTPD, "Radius Two Page Display video card", tag, owner, clock, "nb_rtpd", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = RADIUSTPD_SCREEN_NAME;
}
nubus_radiustpd_device::nubus_radiustpd_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = RADIUSTPD_SCREEN_NAME;
}
//-------------------------------------------------
@@ -100,7 +104,7 @@ void nubus_radiustpd_device::device_start()
m_nubus->install_device(slotspace+0x980000, slotspace+0x9effff, read32_delegate(FUNC(nubus_radiustpd_device::radiustpd_r), this), write32_delegate(FUNC(nubus_radiustpd_device::radiustpd_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
//-------------------------------------------------
@@ -143,13 +147,6 @@ UINT32 nubus_radiustpd_device::screen_update(screen_device &screen, bitmap_rgb32
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
- }
-
vram = m_vram + 0x200;
for (y = 0; y < 880; y++)
diff --git a/src/mess/video/nubus_radiustpd.h b/src/mess/video/nubus_radiustpd.h
index f1e7578a7b8..15dc5454b0e 100644
--- a/src/mess/video/nubus_radiustpd.h
+++ b/src/mess/video/nubus_radiustpd.h
@@ -14,6 +14,7 @@
class nubus_radiustpd_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
};
diff --git a/src/mess/video/nubus_spec8.c b/src/mess/video/nubus_spec8.c
index 59c534b743d..f10cee7b37e 100644
--- a/src/mess/video/nubus_spec8.c
+++ b/src/mess/video/nubus_spec8.c
@@ -67,14 +67,18 @@ const rom_entry *nubus_spec8s3_device::device_rom_region() const
nubus_spec8s3_device::nubus_spec8s3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NUBUS_SPEC8S3, "SuperMac Spectrum/8 Series III video card", tag, owner, clock, "nb_sp8s3", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = SPEC8S3_SCREEN_NAME;
}
nubus_spec8s3_device::nubus_spec8s3_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = SPEC8S3_SCREEN_NAME;
}
//-------------------------------------------------
@@ -100,7 +104,7 @@ void nubus_spec8s3_device::device_start()
m_nubus->install_device(slotspace+0xd0000, slotspace+0xfffff, read32_delegate(FUNC(nubus_spec8s3_device::spec8s3_r), this), write32_delegate(FUNC(nubus_spec8s3_device::spec8s3_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(767, 0), 0);
}
//-------------------------------------------------
@@ -146,12 +150,6 @@ UINT32 nubus_spec8s3_device::screen_update(screen_device &screen, bitmap_rgb32 &
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(767, 0), 0);
- }
vram = m_vram + 0x400;
switch (m_mode)
diff --git a/src/mess/video/nubus_spec8.h b/src/mess/video/nubus_spec8.h
index 87e47f21b09..8dd02cf09b9 100644
--- a/src/mess/video/nubus_spec8.h
+++ b/src/mess/video/nubus_spec8.h
@@ -14,6 +14,7 @@
class nubus_spec8s3_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
private:
diff --git a/src/mess/video/nubus_specpdq.c b/src/mess/video/nubus_specpdq.c
index a2e4befcd40..5c4236b1197 100644
--- a/src/mess/video/nubus_specpdq.c
+++ b/src/mess/video/nubus_specpdq.c
@@ -80,14 +80,18 @@ const rom_entry *nubus_specpdq_device::device_rom_region() const
nubus_specpdq_device::nubus_specpdq_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NUBUS_SPECPDQ, "SuperMac Spectrum PDQ video card", tag, owner, clock, "nb_spdq", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = SPECPDQ_SCREEN_NAME;
}
nubus_specpdq_device::nubus_specpdq_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = SPECPDQ_SCREEN_NAME;
}
//-------------------------------------------------
@@ -112,7 +116,7 @@ void nubus_specpdq_device::device_start()
m_nubus->install_device(slotspace+0x400000, slotspace+0xfbffff, read32_delegate(FUNC(nubus_specpdq_device::specpdq_r), this), write32_delegate(FUNC(nubus_specpdq_device::specpdq_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(843, 0), 0);
}
//-------------------------------------------------
@@ -156,11 +160,6 @@ UINT32 nubus_specpdq_device::screen_update(screen_device &screen, bitmap_rgb32 &
UINT8 pixels, *vram;
// first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(843, 0), 0);
- }
vram = m_vram + 0x9000;
switch (m_mode)
diff --git a/src/mess/video/nubus_specpdq.h b/src/mess/video/nubus_specpdq.h
index a55c8f18b44..30e39e54d6e 100644
--- a/src/mess/video/nubus_specpdq.h
+++ b/src/mess/video/nubus_specpdq.h
@@ -14,6 +14,7 @@
class nubus_specpdq_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
private:
diff --git a/src/mess/video/nubus_wsportrait.c b/src/mess/video/nubus_wsportrait.c
index edaf558710b..b083a7b802b 100644
--- a/src/mess/video/nubus_wsportrait.c
+++ b/src/mess/video/nubus_wsportrait.c
@@ -68,14 +68,18 @@ const rom_entry *nubus_wsportrait_device::device_rom_region() const
nubus_wsportrait_device::nubus_wsportrait_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NUBUS_WSPORTRAIT, "Macintosh II Portrait Video Card", tag, owner, clock, "nb_wspt", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = WSPORTRAIT_SCREEN_NAME;
}
nubus_wsportrait_device::nubus_wsportrait_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = WSPORTRAIT_SCREEN_NAME;
}
//-------------------------------------------------
@@ -102,7 +106,7 @@ void nubus_wsportrait_device::device_start()
m_nubus->install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_wsportrait_device::wsportrait_r), this), write32_delegate(FUNC(nubus_wsportrait_device::wsportrait_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(869, 0), 0);
}
//-------------------------------------------------
@@ -143,12 +147,6 @@ UINT32 nubus_wsportrait_device::screen_update(screen_device &screen, bitmap_rgb3
UINT8 pixels, *vram;
// first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(869, 0), 0);
- }
-
vram = m_vram + 0x80;
switch (m_mode)
diff --git a/src/mess/video/nubus_wsportrait.h b/src/mess/video/nubus_wsportrait.h
index 6c8ee02a43a..2ac3f8b436e 100644
--- a/src/mess/video/nubus_wsportrait.h
+++ b/src/mess/video/nubus_wsportrait.h
@@ -14,6 +14,7 @@
class nubus_wsportrait_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
};
diff --git a/src/mess/video/pc1512.c b/src/mess/video/pc1512.c
index 9a6591ef8ca..623e56d5582 100644
--- a/src/mess/video/pc1512.c
+++ b/src/mess/video/pc1512.c
@@ -528,7 +528,6 @@ static MC6845_UPDATE_ROW( pc1512_update_row )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
8,
NULL,
@@ -623,5 +622,5 @@ MACHINE_CONFIG_FRAGMENT( pc1512_video )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_MC6845_ADD(AMS40041_TAG, AMS40041, XTAL_28_63636MHz/32, crtc_intf)
+ MCFG_MC6845_ADD(AMS40041_TAG, AMS40041, SCREEN_TAG, XTAL_28_63636MHz/32, crtc_intf)
MACHINE_CONFIG_END
diff --git a/src/mess/video/pc8401a.c b/src/mess/video/pc8401a.c
index 8b6a2c34750..f8bee5742aa 100644
--- a/src/mess/video/pc8401a.c
+++ b/src/mess/video/pc8401a.c
@@ -58,7 +58,6 @@ static MC6845_UPDATE_ROW( pc8441a_update_row )
static MC6845_INTERFACE( pc8441a_mc6845_interface )
{
- CRT_SCREEN_TAG,
false,
6,
NULL,
@@ -112,5 +111,5 @@ MACHINE_CONFIG_FRAGMENT( pc8500_video )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_MC6845_ADD(MC6845_TAG, MC6845, 400000, pc8441a_mc6845_interface)
+ MCFG_MC6845_ADD(MC6845_TAG, MC6845, CRT_SCREEN_TAG, 400000, pc8441a_mc6845_interface)
MACHINE_CONFIG_END
diff --git a/src/mess/video/pc_aga.c b/src/mess/video/pc_aga.c
index f46d60a74cd..357ddcca39a 100644
--- a/src/mess/video/pc_aga.c
+++ b/src/mess/video/pc_aga.c
@@ -31,7 +31,6 @@ static VIDEO_START( pc200 );
static MC6845_INTERFACE( mc6845_aga_intf )
{
- AGA_SCREEN_NAME, /* screen number */
false, /* show border area */
8, /* numbers of pixels per video memory address */
NULL, /* begin_update */
@@ -75,7 +74,7 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_aga )
MCFG_PALETTE_LENGTH( CGA_PALETTE_SETS * 16 )
MCFG_PALETTE_INIT( pc_aga )
- MCFG_MC6845_ADD( AGA_MC6845_NAME, MC6845, XTAL_14_31818MHz/8, mc6845_aga_intf )
+ MCFG_MC6845_ADD( AGA_MC6845_NAME, MC6845, AGA_SCREEN_NAME, XTAL_14_31818MHz/8, mc6845_aga_intf )
MCFG_VIDEO_START( pc_aga )
MACHINE_CONFIG_END
diff --git a/src/mess/video/pc_t1t.c b/src/mess/video/pc_t1t.c
index 16da9872fa9..7467fe7f303 100644
--- a/src/mess/video/pc_t1t.c
+++ b/src/mess/video/pc_t1t.c
@@ -32,7 +32,6 @@ static WRITE_LINE_DEVICE_HANDLER( pcjr_vsync_changed );
static MC6845_INTERFACE( mc6845_t1000_intf )
{
- T1000_SCREEN_NAME, /* screen number */
false, /* show border area */
8, /* numbers of pixels per video memory address */
NULL, /* begin_update */
@@ -54,7 +53,7 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_t1000 )
MCFG_PALETTE_LENGTH( 32 )
MCFG_PALETTE_INIT(pcjr)
- MCFG_MC6845_ADD(T1000_MC6845_NAME, MC6845, XTAL_14_31818MHz/8, mc6845_t1000_intf)
+ MCFG_MC6845_ADD(T1000_MC6845_NAME, MC6845, T1000_SCREEN_NAME, XTAL_14_31818MHz/8, mc6845_t1000_intf)
MCFG_VIDEO_START(pc_t1t)
MACHINE_CONFIG_END
@@ -62,7 +61,6 @@ MACHINE_CONFIG_END
static MC6845_INTERFACE( mc6845_pcjr_intf )
{
- T1000_SCREEN_NAME, /* screen number */
false, /* show border area */
8, /* numbers of pixels per video memory address */
NULL, /* begin_update */
@@ -84,7 +82,7 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_pcjr )
MCFG_PALETTE_LENGTH( 32 )
MCFG_PALETTE_INIT(pcjr)
- MCFG_MC6845_ADD(T1000_MC6845_NAME, MC6845, XTAL_14_31818MHz/16, mc6845_pcjr_intf)
+ MCFG_MC6845_ADD(T1000_MC6845_NAME, MC6845, T1000_SCREEN_NAME, XTAL_14_31818MHz/16, mc6845_pcjr_intf)
MCFG_VIDEO_START(pc_pcjr)
MACHINE_CONFIG_END
diff --git a/src/mess/video/pds30_30hr.c b/src/mess/video/pds30_30hr.c
index b18bbaf601b..6aed0e16d76 100644
--- a/src/mess/video/pds30_30hr.c
+++ b/src/mess/video/pds30_30hr.c
@@ -68,14 +68,18 @@ const rom_entry *nubus_xceed30hr_device::device_rom_region() const
nubus_xceed30hr_device::nubus_xceed30hr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PDS030_XCEED30HR, "Micron/XCEED Technology Color 30HR", tag, owner, clock, "pd3_30hr", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = XCEED30HR_SCREEN_NAME;
}
nubus_xceed30hr_device::nubus_xceed30hr_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = XCEED30HR_SCREEN_NAME;
}
//-------------------------------------------------
@@ -101,7 +105,7 @@ void nubus_xceed30hr_device::device_start()
m_nubus->install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(FUNC(nubus_xceed30hr_device::xceed30hr_r), this), write32_delegate(FUNC(nubus_xceed30hr_device::xceed30hr_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
//-------------------------------------------------
@@ -144,13 +148,6 @@ UINT32 nubus_xceed30hr_device::screen_update(screen_device &screen, bitmap_rgb32
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
- }
-
vram = m_vram + 1024;
switch (m_mode)
diff --git a/src/mess/video/pds30_30hr.h b/src/mess/video/pds30_30hr.h
index ec0b561fc02..ce3c6f2723c 100644
--- a/src/mess/video/pds30_30hr.h
+++ b/src/mess/video/pds30_30hr.h
@@ -14,6 +14,7 @@
class nubus_xceed30hr_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
};
diff --git a/src/mess/video/pds30_cb264.c b/src/mess/video/pds30_cb264.c
index 8b1af10f3a7..b4ee6282284 100644
--- a/src/mess/video/pds30_cb264.c
+++ b/src/mess/video/pds30_cb264.c
@@ -61,14 +61,18 @@ const rom_entry *nubus_cb264se30_device::device_rom_region() const
nubus_cb264se30_device::nubus_cb264se30_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PDS030_CB264SE30, "RasterOps Colorboard 264/SE30", tag, owner, clock, "pd3_c264", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = CB264SE30_SCREEN_NAME;
}
nubus_cb264se30_device::nubus_cb264se30_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = CB264SE30_SCREEN_NAME;
}
//-------------------------------------------------
@@ -94,7 +98,7 @@ void nubus_cb264se30_device::device_start()
m_nubus->install_device(slotspace+0xf00000, slotspace+0xfeffff, read32_delegate(FUNC(nubus_cb264se30_device::cb264se30_r), this), write32_delegate(FUNC(nubus_cb264se30_device::cb264se30_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
//-------------------------------------------------
@@ -137,13 +141,6 @@ UINT32 nubus_cb264se30_device::screen_update(screen_device &screen, bitmap_rgb32
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
- }
-
vram = m_vram + (8*1024);
switch (m_mode)
diff --git a/src/mess/video/pds30_cb264.h b/src/mess/video/pds30_cb264.h
index ddf80e5d967..98e4f255d3a 100644
--- a/src/mess/video/pds30_cb264.h
+++ b/src/mess/video/pds30_cb264.h
@@ -14,6 +14,7 @@
class nubus_cb264se30_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
};
diff --git a/src/mess/video/pds30_mc30.c b/src/mess/video/pds30_mc30.c
index 4c63e60b710..6669c407b9c 100644
--- a/src/mess/video/pds30_mc30.c
+++ b/src/mess/video/pds30_mc30.c
@@ -64,14 +64,18 @@ const rom_entry *nubus_xceedmc30_device::device_rom_region() const
nubus_xceedmc30_device::nubus_xceedmc30_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PDS030_XCEEDMC30, "Micron/XCEED Technology MacroColor 30", tag, owner, clock, "pd3_mclr", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = XCEEDMC30_SCREEN_NAME;
}
nubus_xceedmc30_device::nubus_xceedmc30_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = XCEEDMC30_SCREEN_NAME;
}
//-------------------------------------------------
@@ -97,7 +101,7 @@ void nubus_xceedmc30_device::device_start()
m_nubus->install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(FUNC(nubus_xceedmc30_device::xceedmc30_r), this), write32_delegate(FUNC(nubus_xceedmc30_device::xceedmc30_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
//-------------------------------------------------
@@ -140,13 +144,6 @@ UINT32 nubus_xceedmc30_device::screen_update(screen_device &screen, bitmap_rgb32
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
- }
-
vram = m_vram + (4*1024);
switch (m_mode)
diff --git a/src/mess/video/pds30_mc30.h b/src/mess/video/pds30_mc30.h
index 6fcefce41e2..492125c461c 100644
--- a/src/mess/video/pds30_mc30.h
+++ b/src/mess/video/pds30_mc30.h
@@ -14,6 +14,7 @@
class nubus_xceedmc30_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
};
diff --git a/src/mess/video/pds30_procolor816.c b/src/mess/video/pds30_procolor816.c
index 659b68c6218..254cfebb8b8 100644
--- a/src/mess/video/pds30_procolor816.c
+++ b/src/mess/video/pds30_procolor816.c
@@ -67,14 +67,18 @@ const rom_entry *nubus_procolor816_device::device_rom_region() const
nubus_procolor816_device::nubus_procolor816_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PDS030_PROCOLOR816, "Lapis ProColor Server 8*16", tag, owner, clock, "pd3_pc16", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = PROCOLOR816_SCREEN_NAME;
}
nubus_procolor816_device::nubus_procolor816_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
+ m_screen_tag = PROCOLOR816_SCREEN_NAME;
}
//-------------------------------------------------
@@ -101,7 +105,7 @@ void nubus_procolor816_device::device_start()
m_nubus->install_device(slotspace+0xf00000, slotspace+0xff7fff, read32_delegate(FUNC(nubus_procolor816_device::procolor816_r), this), write32_delegate(FUNC(nubus_procolor816_device::procolor816_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
//-------------------------------------------------
@@ -144,13 +148,6 @@ UINT32 nubus_procolor816_device::screen_update(screen_device &screen, bitmap_rgb
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
- }
-
vram = m_vram + 4;
switch (m_mode)
diff --git a/src/mess/video/pds30_procolor816.h b/src/mess/video/pds30_procolor816.h
index c4d9ab1d02e..600ff402f59 100644
--- a/src/mess/video/pds30_procolor816.h
+++ b/src/mess/video/pds30_procolor816.h
@@ -14,6 +14,7 @@
class nubus_procolor816_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_mode, m_vbl_disable, m_toggle;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
};
diff --git a/src/mess/video/pds30_sigmalview.c b/src/mess/video/pds30_sigmalview.c
index 8942af434d3..6fcb2a86115 100644
--- a/src/mess/video/pds30_sigmalview.c
+++ b/src/mess/video/pds30_sigmalview.c
@@ -61,12 +61,14 @@ const rom_entry *nubus_lview_device::device_rom_region() const
nubus_lview_device::nubus_lview_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PDS030_LVIEW, "Sigma Designs L-View", tag, owner, clock, "pd3_lviw", __FILE__),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
}
nubus_lview_device::nubus_lview_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_nubus_card_interface(mconfig, *this)
{
}
@@ -95,7 +97,7 @@ void nubus_lview_device::device_start()
m_nubus->install_device(slotspace+0xb0000, slotspace+0xbffff, read32_delegate(FUNC(nubus_lview_device::lview_r), this), write32_delegate(FUNC(nubus_lview_device::lview_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(599, 0), 0);
}
//-------------------------------------------------
@@ -136,13 +138,6 @@ UINT32 nubus_lview_device::screen_update(screen_device &screen, bitmap_rgb32 &bi
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(599, 0), 0);
- }
-
vram = m_vram + 0x20;
for (y = 0; y < 600; y++)
diff --git a/src/mess/video/pds30_sigmalview.h b/src/mess/video/pds30_sigmalview.h
index 4c8da94dc09..073b05eec83 100644
--- a/src/mess/video/pds30_sigmalview.h
+++ b/src/mess/video/pds30_sigmalview.h
@@ -14,6 +14,7 @@
class nubus_lview_device :
public device_t,
+ public device_video_interface,
public device_nubus_card_interface
{
public:
@@ -42,7 +43,6 @@ public:
UINT32 *m_vram32;
UINT32 m_vbl_disable, m_toggle;
UINT32 m_palette[256];
- screen_device *m_screen;
emu_timer *m_timer;
int m_protstate;
};
diff --git a/src/mess/video/pds_tpdfpd.c b/src/mess/video/pds_tpdfpd.c
index 8692ae26877..1a5c5b2877b 100644
--- a/src/mess/video/pds_tpdfpd.c
+++ b/src/mess/video/pds_tpdfpd.c
@@ -85,14 +85,18 @@ const rom_entry *macpds_sedisplay_device::device_rom_region() const
macpds_sedisplay_device::macpds_sedisplay_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PDS_SEDISPLAY, "Radius SE Full Page Display", tag, owner, clock, "pds_sefp", __FILE__),
+ device_video_interface(mconfig, *this),
device_macpds_card_interface(mconfig, *this)
{
+ m_screen_tag = SEDISPLAY_SCREEN_NAME;
}
macpds_sedisplay_device::macpds_sedisplay_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this),
device_macpds_card_interface(mconfig, *this)
{
+ m_screen_tag = SEDISPLAY_SCREEN_NAME;
}
//-------------------------------------------------
@@ -115,7 +119,7 @@ void macpds_sedisplay_device::device_start()
m_macpds->install_device(0xc10000, 0xc2ffff, read16_delegate(FUNC(macpds_sedisplay_device::sedisplay_r), this), write16_delegate(FUNC(macpds_sedisplay_device::sedisplay_w), this));
m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer->adjust(m_screen->time_until_pos(879, 0), 0);
}
//-------------------------------------------------
@@ -157,12 +161,6 @@ UINT32 macpds_sedisplay_device::screen_update(screen_device &screen, bitmap_rgb3
int x, y;
UINT8 pixels, *vram;
- // first time? kick off the VBL timer
- if (!m_screen)
- {
- m_screen = &screen;
- m_timer->adjust(m_screen->time_until_pos(879, 0), 0);
- }
vram = m_vram;
for (y = 0; y < 870; y++)
diff --git a/src/mess/video/pds_tpdfpd.h b/src/mess/video/pds_tpdfpd.h
index 741a265f709..653d6e92aea 100644
--- a/src/mess/video/pds_tpdfpd.h
+++ b/src/mess/video/pds_tpdfpd.h
@@ -14,6 +14,7 @@
class macpds_sedisplay_device :
public device_t,
+ public device_video_interface,
public device_macpds_card_interface
{
public:
@@ -41,7 +42,6 @@ public:
UINT8 *m_vram;
UINT32 m_vbl_disable;
UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs;
- screen_device *m_screen;
emu_timer *m_timer;
};
diff --git a/src/mess/video/pecom.c b/src/mess/video/pecom.c
index cd91caf901c..5a66bd9d91a 100644
--- a/src/mess/video/pecom.c
+++ b/src/mess/video/pecom.c
@@ -82,7 +82,6 @@ WRITE_LINE_MEMBER(pecom_state::pecom_prd_w)
static CDP1869_INTERFACE( pecom_cdp1869_intf )
{
- SCREEN_TAG,
CDP1869_COLOR_CLK_PAL,
CDP1869_PAL,
pecom_pcb_r,
diff --git a/src/mess/video/tmc600.c b/src/mess/video/tmc600.c
index ebfb18190e2..8bf59846beb 100644
--- a/src/mess/video/tmc600.c
+++ b/src/mess/video/tmc600.c
@@ -98,7 +98,6 @@ static CDP1869_PCB_READ( tmc600_pcb_r )
static CDP1869_INTERFACE( vis_intf )
{
- SCREEN_TAG,
CDP1869_COLOR_CLK_PAL,
CDP1869_PAL,
tmc600_pcb_r,
diff --git a/src/mess/video/uv201.c b/src/mess/video/uv201.c
index f46bd240f51..696e0d25ed1 100644
--- a/src/mess/video/uv201.c
+++ b/src/mess/video/uv201.c
@@ -98,7 +98,8 @@ const device_type UV201 = &device_creator<uv201_device>;
//-------------------------------------------------
uv201_device::uv201_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, UV201, "UV201", tag, owner, clock, "uv201", __FILE__)
+ : device_t(mconfig, UV201, "UV201", tag, owner, clock, "uv201", __FILE__),
+ device_video_interface(mconfig, *this)
{
}
@@ -143,9 +144,6 @@ void uv201_device::device_start()
m_timer_hblank_on = timer_alloc(TIMER_HBLANK_ON);
m_timer_hblank_off = timer_alloc(TIMER_HBLANK_OFF);
- // find devices
- m_screen = machine().device<screen_device>(m_screen_tag);
-
initialize_palette();
memset(m_ram, 0x00, sizeof(m_ram));
diff --git a/src/mess/video/uv201.h b/src/mess/video/uv201.h
index 6abab346dbd..d0d83baf236 100644
--- a/src/mess/video/uv201.h
+++ b/src/mess/video/uv201.h
@@ -67,6 +67,7 @@
#define MCFG_UV201_ADD(_tag, _screen_tag, _clock, _config) \
MCFG_DEVICE_ADD(_tag, UV201, _clock) \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
MCFG_DEVICE_CONFIG(_config) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
MCFG_SCREEN_UPDATE_DEVICE(_tag, uv201_device, screen_update) \
@@ -86,8 +87,6 @@
struct uv201_interface
{
- const char *m_screen_tag;
-
devcb_write_line m_out_ext_int_cb;
devcb_write_line m_out_hblank_cb;
devcb_read8 m_in_db_cb;
@@ -97,6 +96,7 @@ struct uv201_interface
// ======================> uv201_device
class uv201_device : public device_t,
+ public device_video_interface,
public uv201_interface
{
public:
@@ -137,8 +137,6 @@ private:
devcb_resolved_write_line m_out_hblank_func;
devcb_resolved_read8 m_in_db_func;
- screen_device *m_screen;
-
rgb_t m_palette[32];
UINT8 m_ram[0x90];
UINT8 m_y_int;
diff --git a/src/mess/video/v1050.c b/src/mess/video/v1050.c
index f70a2a39395..8d11b9a161d 100644
--- a/src/mess/video/v1050.c
+++ b/src/mess/video/v1050.c
@@ -95,7 +95,6 @@ WRITE_LINE_MEMBER( v1050_state::crtc_vs_w )
static MC6845_INTERFACE( crtc_intf )
{
- SCREEN_TAG,
false,
8,
NULL,
@@ -122,7 +121,7 @@ void v1050_state::video_start()
/* Machine Drivers */
MACHINE_CONFIG_FRAGMENT( v1050_video )
- MCFG_MC6845_ADD(H46505_TAG, H46505, XTAL_15_36MHz/8, crtc_intf)
+ MCFG_MC6845_ADD(H46505_TAG, H46505, SCREEN_TAG, XTAL_15_36MHz/8, crtc_intf)
MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
MCFG_SCREEN_UPDATE_DEVICE(H46505_TAG, h46505_device, screen_update)
diff --git a/src/mess/video/vic4567.c b/src/mess/video/vic4567.c
index 35ef8b4d019..55b629657e6 100644
--- a/src/mess/video/vic4567.c
+++ b/src/mess/video/vic4567.c
@@ -143,7 +143,8 @@
const device_type VIC3 = &device_creator<vic3_device>;
vic3_device::vic3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, VIC3, "4567 VIC III", tag, owner, clock, "vic3", __FILE__)
+ : device_t(mconfig, VIC3, "4567 VIC III", tag, owner, clock, "vic3", __FILE__),
+ device_video_interface(mconfig, *this)
{
}
@@ -171,7 +172,6 @@ void vic3_device::device_config_complete()
memset(&irq, 0, sizeof(irq));
memset(&port_changed, 0, sizeof(port_changed));
memset(&c64_mem_r, 0, sizeof(c64_mem_r));
- screen_tag = "";
cpu_tag = "";
vic_type = VIC4567_NTSC;
}
@@ -186,9 +186,8 @@ void vic3_device::device_start()
int width, height;
m_cpu = machine().device(cpu_tag);
- m_main_screen = machine().device<screen_device>(screen_tag);
- width = m_main_screen->width();
- height = m_main_screen->height();
+ width = m_screen->width();
+ height = m_screen->height();
m_bitmap = auto_bitmap_ind16_alloc(machine(), width, height);
@@ -206,10 +205,10 @@ void vic3_device::device_start()
m_lightpen_x_cb.resolve(x_cb, *this);
m_lightpen_y_cb.resolve(y_cb, *this);
- m_screen[0] = auto_alloc_array(machine(), UINT8, 216 * 656 / 8);
+ m_screenptr[0] = auto_alloc_array(machine(), UINT8, 216 * 656 / 8);
for (int i = 1; i < 216; i++)
- m_screen[i] = m_screen[i - 1] + 656 / 8;
+ m_screenptr[i] = m_screenptr[i - 1] + 656 / 8;
for (int i = 0; i < 256; i++)
{
@@ -385,12 +384,12 @@ void vic3_device::device_reset()
inline int vic3_device::getforeground( int y, int x )
{
- return ((m_screen[y][x >> 3] << 8) | (m_screen[y][(x >> 3) + 1])) >> (8 - (x & 7));
+ return ((m_screenptr[y][x >> 3] << 8) | (m_screenptr[y][(x >> 3) + 1])) >> (8 - (x & 7));
}
inline int vic3_device::getforeground16( int y, int x )
{
- return ((m_screen[y][x >> 3] << 16) | (m_screen[y][(x >> 3) + 1] << 8) | (m_screen[y][(x >> 3) + 2])) >> (8 - (x & 7));
+ return ((m_screenptr[y][x >> 3] << 16) | (m_screenptr[y][(x >> 3) + 1] << 8) | (m_screenptr[y][(x >> 3) + 2])) >> (8 - (x & 7));
}
void vic3_device::set_interrupt( int mask )
@@ -443,7 +442,7 @@ void vic3_device::draw_character( int ybegin, int yend, int ch, int yoff, int xo
for (int y = ybegin; y <= yend; y++)
{
code = m_dma_read(m_chargenaddr + ch * 8 + y);
- m_screen[y + yoff][xoff >> 3] = code;
+ m_screenptr[y + yoff][xoff >> 3] = code;
if ((xoff + 0 > start_x) && (xoff + 0 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 0) = color[code >> 7];
if ((xoff + 1 > start_x) && (xoff + 0 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 1) = color[(code >> 6) & 1];
if ((xoff + 2 > start_x) && (xoff + 0 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 2) = color[(code >> 5) & 1];
@@ -462,7 +461,7 @@ void vic3_device::draw_character_multi( int ybegin, int yend, int ch, int yoff,
for (int y = ybegin; y <= yend; y++)
{
code = m_dma_read(m_chargenaddr + ch * 8 + y);
- m_screen[y + yoff][xoff >> 3] = m_foreground[code];
+ m_screenptr[y + yoff][xoff >> 3] = m_foreground[code];
if ((xoff + 0 > start_x) && (xoff + 0 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 0) = m_multi[code >> 6];
if ((xoff + 1 > start_x) && (xoff + 1 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 1) = m_multi[code >> 6];
if ((xoff + 2 > start_x) && (xoff + 2 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 2) = m_multi[(code >> 4) & 3];
@@ -481,7 +480,7 @@ void vic3_device::draw_bitmap( int ybegin, int yend, int ch, int yoff, int xoff,
for (int y = ybegin; y <= yend; y++)
{
code = m_dma_read((m_chargenaddr & 0x2000) + ch * 8 + y);
- m_screen[y + yoff][xoff >> 3] = code;
+ m_screenptr[y + yoff][xoff >> 3] = code;
if ((xoff + 0 > start_x) && (xoff + 0 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 0) = m_c64_bitmap[code >> 7];
if ((xoff + 1 > start_x) && (xoff + 1 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 1) = m_c64_bitmap[(code >> 6) & 1];
if ((xoff + 2 > start_x) && (xoff + 2 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 2) = m_c64_bitmap[(code >> 5) & 1];
@@ -500,7 +499,7 @@ void vic3_device::draw_bitmap_multi( int ybegin, int yend, int ch, int yoff, int
for (int y = ybegin; y <= yend; y++)
{
code = m_dma_read((m_chargenaddr & 0x2000) + ch * 8 + y);
- m_screen[y + yoff][xoff >> 3] = m_foreground[code];
+ m_screenptr[y + yoff][xoff >> 3] = m_foreground[code];
if ((xoff + 0 > start_x) && (xoff + 0 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 0) = m_bitmapmulti[code >> 6];
if ((xoff + 1 > start_x) && (xoff + 1 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 1) = m_bitmapmulti[code >> 6];
if ((xoff + 2 > start_x) && (xoff + 2 < end_x)) m_bitmap->pix16(y + yoff + FIRSTLINE, xoff + 2) = m_bitmapmulti[(code >> 4) & 3];
@@ -1885,7 +1884,7 @@ void vic3_device::draw_bitplanes()
{
int x, y, y1s, offset;
rectangle vis;
- const rectangle &visarea = m_main_screen->visible_area();
+ const rectangle &visarea = m_screen->visible_area();
if (VIC3_LINES == 400)
{ /* interlaced! */
@@ -1989,13 +1988,13 @@ void vic3_device::raster_interrupt_gen()
m_rows = new_rows;
m_columns = new_columns;
if (m_type == VIC4567_PAL)
- m_main_screen->set_visible_area(
+ m_screen->set_visible_area(
VIC2_STARTVISIBLECOLUMNS + 32,
VIC2_STARTVISIBLECOLUMNS + 32 + m_columns + 16 - 1,
VIC2_STARTVISIBLELINES + 34,
VIC2_STARTVISIBLELINES + 34 + m_rows + 16 - 1);
else
- m_main_screen->set_visible_area(
+ m_screen->set_visible_area(
VIC2_STARTVISIBLECOLUMNS + 34,
VIC2_STARTVISIBLECOLUMNS + 34 + m_columns + 16 - 1,
VIC2_STARTVISIBLELINES + 10,
diff --git a/src/mess/video/vic4567.h b/src/mess/video/vic4567.h
index 0f32ff35f64..350a11b1d15 100644
--- a/src/mess/video/vic4567.h
+++ b/src/mess/video/vic4567.h
@@ -20,7 +20,6 @@ enum vic3_type
struct vic3_interface
{
- const char *screen_tag;
const char *cpu_tag;
vic3_type vic_type;
@@ -140,6 +139,7 @@ struct vic3_sprite
***************************************************************************/
class vic3_device : public device_t,
+ public device_video_interface,
public vic3_interface
{
public:
@@ -185,8 +185,6 @@ private:
vic3_type m_type;
- screen_device *m_main_screen; // screen which sets bitmap properties
-
device_t *m_cpu;
UINT8 m_reg[0x80];
@@ -208,7 +206,7 @@ private:
int m_columns, m_rows;
/* background/foreground for sprite collision */
- UINT8 *m_screen[216], m_shift[216];
+ UINT8 *m_screenptr[216], m_shift[216];
/* convert multicolor byte to background/foreground for sprite collision */
UINT8 m_foreground[256];
diff --git a/src/mess/video/vtvideo.c b/src/mess/video/vtvideo.c
index cc52a033359..d9dca7cd32d 100644
--- a/src/mess/video/vtvideo.c
+++ b/src/mess/video/vtvideo.c
@@ -27,13 +27,15 @@ const device_type RAINBOW_VIDEO = &device_creator<rainbow_video_device>;
vt100_video_device::vt100_video_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
- : device_t(mconfig, type, name, tag, owner, clock, shortname, source)
+ : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
+ device_video_interface(mconfig, *this)
{
}
vt100_video_device::vt100_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, VT100_VIDEO, "VT100 Video", tag, owner, clock, "vt100_video", __FILE__)
+ : device_t(mconfig, VT100_VIDEO, "VT100 Video", tag, owner, clock, "vt100_video", __FILE__),
+ device_video_interface(mconfig, *this)
{
}
@@ -62,7 +64,6 @@ void vt100_video_device::device_config_complete()
{
memset(&m_in_ram_cb, 0, sizeof(m_in_ram_cb));
memset(&m_clear_video_cb, 0, sizeof(m_clear_video_cb));
- m_screen_tag = "";
m_char_rom_tag = "";
}
}
@@ -77,10 +78,6 @@ void vt100_video_device::device_start()
m_in_ram_func.resolve(m_in_ram_cb, *this);
m_clear_video_interrupt.resolve(m_clear_video_cb, *this);
- /* get the screen device */
- m_screen = machine().device<screen_device>(m_screen_tag);
- assert(m_screen != NULL);
-
m_gfx = machine().root_device().memregion(m_char_rom_tag)->base();
assert(m_gfx != NULL);
diff --git a/src/mess/video/vtvideo.h b/src/mess/video/vtvideo.h
index 678697a2074..df6ac5cf8d2 100644
--- a/src/mess/video/vtvideo.h
+++ b/src/mess/video/vtvideo.h
@@ -17,7 +17,6 @@
struct vt_video_interface
{
- const char *m_screen_tag; /* screen we are acting on */
const char *m_char_rom_tag; /* character rom region */
/* this gets called for every memory read */
@@ -27,6 +26,7 @@ struct vt_video_interface
class vt100_video_device : public device_t,
+ public device_video_interface,
public vt_video_interface
{
public:
@@ -55,7 +55,6 @@ protected:
devcb_resolved_read8 m_in_ram_func;
devcb_resolved_write8 m_clear_video_interrupt;
- screen_device *m_screen; /* screen */
UINT8 *m_gfx; /* content of char rom */
int m_lba7;
diff --git a/src/mess/video/zx8301.c b/src/mess/video/zx8301.c
index f8075eb6d32..13a10579d38 100644
--- a/src/mess/video/zx8301.c
+++ b/src/mess/video/zx8301.c
@@ -129,6 +129,7 @@ inline void zx8301_device::writebyte(offs_t address, UINT8 data)
zx8301_device::zx8301_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, ZX8301, "Sinclair ZX8301", tag, owner, clock, "zx8301", __FILE__),
device_memory_interface(mconfig, *this),
+ device_video_interface(mconfig, *this),
m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, NULL, *ADDRESS_MAP_NAME(zx8301)),
m_dispoff(1),
m_mode8(0),
@@ -150,10 +151,6 @@ void zx8301_device::device_start()
m_cpu = machine().device<cpu_device>(cpu_tag);
assert(m_cpu != NULL);
- // get the screen device
- m_screen = machine().device<screen_device>(screen_tag);
- assert(m_screen != NULL);
-
// resolve callbacks
m_out_vsync_func.resolve(out_vsync_cb, *this);
diff --git a/src/mess/video/zx8301.h b/src/mess/video/zx8301.h
index 577fa7ada7c..3fb94c70238 100644
--- a/src/mess/video/zx8301.h
+++ b/src/mess/video/zx8301.h
@@ -76,6 +76,7 @@ struct zx8301_interface
class zx8301_device : public device_t,
public device_memory_interface,
+ public device_video_interface,
public zx8301_interface
{
public:
@@ -113,7 +114,6 @@ private:
devcb_resolved_write_line m_out_vsync_func;
cpu_device *m_cpu;
- screen_device *m_screen;
//address_space *m_data;
int m_dispoff; // display off