summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/merit.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2013-07-24 19:20:59 +0000
committer Aaron Giles <aaron@aarongiles.com>2013-07-24 19:20:59 +0000
commit25a100d773579751d4dd58c9d4276eabdb648c3a (patch)
treea4945943e8ed7b8146d44bf684dc26138fcdcdff /src/mame/drivers/merit.c
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/mame/drivers/merit.c')
-rw-r--r--src/mame/drivers/merit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mame/drivers/merit.c b/src/mame/drivers/merit.c
index d47c3017bdc..c122c2543b7 100644
--- a/src/mame/drivers/merit.c
+++ b/src/mame/drivers/merit.c
@@ -317,7 +317,6 @@ WRITE_LINE_MEMBER(merit_state::vsync_changed)
static MC6845_INTERFACE( mc6845_intf )
{
- "screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
begin_update, /* before pixel update callback */
@@ -1208,7 +1207,7 @@ static MACHINE_CONFIG_START( pitboss, merit_state )
MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, 512, 0, 512, 256, 0, 256) /* temporary, CRTC will configure screen */
MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
- MCFG_MC6845_ADD("crtc", MC6845, CRTC_CLOCK, mc6845_intf)
+ MCFG_MC6845_ADD("crtc", MC6845, "screen", CRTC_CLOCK, mc6845_intf)
/* sound hardware */