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
This commit is contained in:
Aaron Giles 2013-07-24 19:20:59 +00:00
parent 4719b9707a
commit 25a100d773
428 changed files with 817 additions and 1358 deletions

2
.gitattributes vendored
View File

@ -1048,6 +1048,8 @@ src/emu/disound.c svneol=native#text/plain
src/emu/disound.h svneol=native#text/plain
src/emu/distate.c svneol=native#text/plain
src/emu/distate.h svneol=native#text/plain
src/emu/divideo.c svneol=native#text/plain
src/emu/divideo.h svneol=native#text/plain
src/emu/drawgfx.c svneol=native#text/plain
src/emu/drawgfx.h svneol=native#text/plain
src/emu/drawgfxm.h svneol=native#text/plain

144
src/emu/divideo.c Normal file
View File

@ -0,0 +1,144 @@
/***************************************************************************
divideo.c
Device video interfaces.
****************************************************************************
Copyright Aaron Giles
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name 'MAME' nor the names of its contributors may be
used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
#include "emu.h"
//**************************************************************************
// DEVICE VIDEO INTERFACE
//**************************************************************************
//-------------------------------------------------
// device_video_interface - constructor
//-------------------------------------------------
device_video_interface::device_video_interface(const machine_config &mconfig, device_t &device, bool screen_required)
: device_interface(device),
m_screen_required(screen_required),
m_screen_tag(NULL),
m_screen(NULL)
{
}
//-------------------------------------------------
// ~device_video_interface - destructor
//-------------------------------------------------
device_video_interface::~device_video_interface()
{
}
//-------------------------------------------------
// static_add_route - configuration helper to add
// a new route to the device
//-------------------------------------------------
void device_video_interface::static_set_screen(device_t &device, const char *tag)
{
// find our video interface
device_video_interface *video;
if (!device.interface(video))
throw emu_fatalerror("MCFG_VIDEO_SET_SCREEN called on device '%s' with no video interface", device.tag());
video->m_screen_tag = tag;
}
//-------------------------------------------------
// interface_validity_check - validation for a
// device after the configuration has been
// constructed
//-------------------------------------------------
void device_video_interface::interface_validity_check(validity_checker &valid) const
{
// find the screen device
screen_device *screen = NULL;
if (m_screen_tag != NULL)
{
screen = device().siblingdevice<screen_device>(m_screen_tag);
if (screen == NULL)
mame_printf_error("Screen '%s' not found, explicitly set for device '%s'", m_screen_tag, device().tag());
}
// if no device, look for a single match
if (screen == NULL)
{
screen_device_iterator iter(device().mconfig().root_device());
screen = iter.first();
if (screen == NULL && m_screen_required)
mame_printf_error("Device '%s' requires a screen", device().tag());
if (iter.next() != NULL)
mame_printf_error("No screen specified for device '%s', but multiple screens found", device().tag());
}
}
//-------------------------------------------------
// interface_pre_start - make sure all our input
// devices are started
//-------------------------------------------------
void device_video_interface::interface_pre_start()
{
// find the screen device
if (m_screen_tag != NULL)
{
m_screen = device().siblingdevice<screen_device>(m_screen_tag);
if (m_screen == NULL)
throw emu_fatalerror("Screen '%s' not found, explicitly set for device '%s'", m_screen_tag, device().tag());
}
// if no device, look for a single match
if (m_screen == NULL)
{
screen_device_iterator iter(device().machine().root_device());
m_screen = iter.first();
if (m_screen == NULL && m_screen_required)
throw emu_fatalerror("Device '%s' requires a screen", device().tag());
if (iter.next() != NULL)
throw emu_fatalerror("No screen specified for device '%s', but multiple screens found", device().tag());
}
// if we have a screen and it's not started, wait for it
if (m_screen != NULL && !m_screen->started())
throw device_missing_dependencies();
}

95
src/emu/divideo.h Normal file
View File

@ -0,0 +1,95 @@
/***************************************************************************
divideo.h
Device video interfaces.
****************************************************************************
Copyright Aaron Giles
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name 'MAME' nor the names of its contributors may be
used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
#pragma once
#ifndef __EMU_H__
#error Dont include this file directly; include emu.h instead.
#endif
#ifndef __DIVIDEO_H__
#define __DIVIDEO_H__
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_VIDEO_SET_SCREEN(_tag) \
device_video_interface::static_set_screen(*device, _tag);
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> device_video_interface
class device_video_interface : public device_interface
{
public:
// construction/destruction
device_video_interface(const machine_config &mconfig, device_t &device, bool screen_required = true);
virtual ~device_video_interface();
// static configuration
static void static_set_screen(device_t &device, const char *tag);
// getters
screen_device &screen() const { return *m_screen; }
protected:
// optional operation overrides
virtual void interface_validity_check(validity_checker &valid) const;
virtual void interface_pre_start();
// configuration state
bool m_screen_required; // is a screen required?
const char * m_screen_tag; // configured tag for the target screen
// internal state
screen_device * m_screen; // pointer to the screen device
};
// iterator
typedef device_interface_iterator<device_video_interface> video_interface_iterator;
#endif /* __DIVIDEO_H__ */

View File

@ -63,6 +63,7 @@ ADDRESS_MAP_END
driver_device::driver_device(const machine_config &mconfig, device_type type, const char *tag)
: device_t(mconfig, type, "Driver Device", tag, NULL, 0, "", __FILE__),
device_memory_interface(mconfig, *this),
m_screen(*this, "screen"),
m_generic_paletteram_8(*this, "paletteram"),
m_generic_paletteram2_8(*this, "paletteram2"),
m_generic_paletteram_16(*this, "paletteram"),

View File

@ -422,6 +422,9 @@ protected:
inline UINT32 paletteram32_be(offs_t offset) const { return m_generic_paletteram_16[offset | 1] | (m_generic_paletteram_16[offset & ~1] << 16); }
public:
// generic devices
optional_device<screen_device> m_screen;
// generic pointers
optional_shared_ptr<UINT8> m_generic_paletteram_8;
optional_shared_ptr<UINT8> m_generic_paletteram2_8;

View File

@ -101,6 +101,7 @@ typedef device_t * (*machine_config_constructor)(machine_config &config, device_
#include "diserial.h"
#include "dislot.h"
#include "disound.h"
#include "divideo.h"
#include "dinvram.h"
#include "dirtc.h"
#include "didisasm.h"

View File

@ -71,6 +71,7 @@ EMUOBJS = \
$(EMUOBJ)/dislot.o \
$(EMUOBJ)/disound.o \
$(EMUOBJ)/distate.o \
$(EMUOBJ)/divideo.o \
$(EMUOBJ)/drawgfx.o \
$(EMUOBJ)/driver.o \
$(EMUOBJ)/drivenum.o \

View File

@ -59,7 +59,8 @@ TODO:
const device_type K053252 = &device_creator<k053252_device>;
k053252_device::k053252_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K053252, "Konami 053252", tag, owner, clock, "k053252", __FILE__)
: device_t(mconfig, K053252, "Konami 053252", tag, owner, clock, "k053252", __FILE__),
device_video_interface(mconfig, *this)
{
}
@ -79,7 +80,6 @@ void k053252_device::device_config_complete()
// or initialize to defaults if none provided
else
{
m_screen_tag = "";
memset(&m_int1_en, 0, sizeof(m_int1_en));
memset(&m_int2_en, 0, sizeof(m_int2_en));
memset(&m_int1_ack, 0, sizeof(m_int1_ack));
@ -95,7 +95,6 @@ void k053252_device::device_config_complete()
void k053252_device::device_start()
{
save_item(NAME(m_regs));
m_screen = machine().device<screen_device>(m_screen_tag);
m_int1_en_func.resolve(m_int1_en, *this);
m_int2_en_func.resolve(m_int2_en, *this);
m_int1_ack_func.resolve(m_int1_ack, *this);
@ -141,28 +140,25 @@ READ8_MEMBER( k053252_device::read )
void k053252_device::res_change()
{
if(m_screen != NULL)
if(m_hc && m_vc &&
m_hbp && m_hfp &&
m_vbp && m_vfp &&
m_hsw && m_vsw) //safety checks
{
if(m_hc && m_vc &&
m_hbp && m_hfp &&
m_vbp && m_vfp &&
m_hsw && m_vsw) //safety checks
{
rectangle visarea;
//(HC+1) - HFP - HBP - 8*(HSW+1)
//VC - VFP - VBP - (VSW+1)
attoseconds_t refresh = HZ_TO_ATTOSECONDS(clock()) * (m_hc) * m_vc;
rectangle visarea;
//(HC+1) - HFP - HBP - 8*(HSW+1)
//VC - VFP - VBP - (VSW+1)
attoseconds_t refresh = HZ_TO_ATTOSECONDS(clock()) * (m_hc) * m_vc;
//printf("H %d %d %d %d\n",m_hc,m_hfp,m_hbp,m_hsw);
//printf("V %d %d %d %d\n",m_vc,m_vfp,m_vbp,m_vsw);
//printf("H %d %d %d %d\n",m_hc,m_hfp,m_hbp,m_hsw);
//printf("V %d %d %d %d\n",m_vc,m_vfp,m_vbp,m_vsw);
visarea.min_x = m_offsx;
visarea.min_y = m_offsy;
visarea.max_x = m_offsx + m_hc - m_hfp - m_hbp - 8*(m_hsw) - 1;
visarea.max_y = m_offsy + m_vc - m_vfp - m_vbp - (m_vsw) - 1;
visarea.min_x = m_offsx;
visarea.min_y = m_offsy;
visarea.max_x = m_offsx + m_hc - m_hfp - m_hbp - 8*(m_hsw) - 1;
visarea.max_y = m_offsy + m_vc - m_vfp - m_vbp - (m_vsw) - 1;
m_screen->configure(m_hc, m_vc, visarea, refresh);
}
m_screen->configure(m_hc, m_vc, visarea, refresh);
}
}

View File

@ -8,7 +8,6 @@
struct k053252_interface
{
const char *m_screen_tag;
devcb_write_line m_int1_en;
devcb_write_line m_int2_en;
devcb_write_line m_int1_ack;
@ -19,6 +18,7 @@ struct k053252_interface
};
class k053252_device : public device_t,
public device_video_interface,
public k053252_interface
{
public:
@ -43,7 +43,6 @@ protected:
UINT16 m_vc,m_vfp,m_vbp;
UINT8 m_vsw,m_hsw;
screen_device *m_screen;
devcb_resolved_write_line m_int1_en_func;
devcb_resolved_write_line m_int2_en_func;
devcb_resolved_write_line m_int1_ack_func;

View File

@ -89,7 +89,7 @@ const UINT32 VIRTUAL_LEAD_OUT_TRACKS = LEAD_OUT_MIN_SIZE_IN_UM * 1000 / NOMINAL_
laserdisc_device::laserdisc_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_sound_interface(mconfig, *this),
m_screen_name(NULL),
device_video_interface(mconfig, *this),
m_overwidth(0),
m_overheight(0),
m_overclip(0, -1, 0, -1),
@ -235,16 +235,6 @@ UINT32 laserdisc_device::screen_update(screen_device &screen, bitmap_rgb32 &bitm
}
//-------------------------------------------------
// static_set_screen - set the screen name
//-------------------------------------------------
void laserdisc_device::static_set_screen(device_t &device, const char *screen)
{
downcast<laserdisc_device &>(device).m_screen_name = screen;
}
//-------------------------------------------------
// static_set_get_disc - set the get disc
// delegate
@ -340,12 +330,6 @@ void laserdisc_device::static_set_overlay_scale(device_t &device, float scalex,
void laserdisc_device::device_start()
{
// ensure that our screen is started first
m_screen = machine().device<screen_device>(m_screen_name);
assert(m_screen != NULL);
if (!m_screen->started())
throw device_missing_dependencies();
// initialize the various pieces
init_disc();
init_video();

View File

@ -158,6 +158,7 @@ struct laserdisc_overlay_config
// base laserdisc class
class laserdisc_device : public device_t,
public device_sound_interface,
public device_video_interface,
public laserdisc_overlay_config
{
protected:
@ -186,7 +187,6 @@ public:
void set_overlay_config(const laserdisc_overlay_config &config) { static_cast<laserdisc_overlay_config &>(*this) = config; }
// static configuration helpers
static void static_set_screen(device_t &device, const char *screen);
static void static_set_get_disc(device_t &device, laserdisc_get_disc_delegate callback);
static void static_set_audio(device_t &device, laserdisc_audio_delegate callback);
static void static_set_overlay(device_t &device, UINT32 width, UINT32 height, screen_update_ind16_delegate update);
@ -270,7 +270,6 @@ protected:
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
// subclass helpers
screen_device &screen() { assert(m_screen != NULL); return *m_screen; }
void set_audio_squelch(bool squelchleft, bool squelchright) { m_stream->update(); m_audiosquelch = (squelchleft ? 1 : 0) | (squelchright ? 2 : 0); }
void set_video_squelch(bool squelch) { m_videosquelch = squelch; }
void set_slider_speed(INT32 tracks_per_vsync);
@ -314,7 +313,6 @@ private:
// configuration
laserdisc_get_disc_delegate m_getdisc_callback;
laserdisc_audio_delegate m_audio_callback; // audio streaming callback
const char * m_screen_name; // name of the screen device
laserdisc_overlay_config m_orig_config; // original overlay configuration
UINT32 m_overwidth; // overlay screen width
UINT32 m_overheight; // overlay screen height
@ -347,7 +345,6 @@ private:
attotime m_sliderupdate; // time of last slider update
// video data
screen_device * m_screen; // pointer to the screen device
frame_data m_frame[3]; // circular list of frames
UINT8 m_videoindex; // index of the current video buffer
bitmap_yuy16 m_emptyframe; // blank frame

View File

@ -100,6 +100,7 @@ inline void cdp1864_device::initialize_palette()
cdp1864_device::cdp1864_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CDP1864, "CDP1864", tag, owner, clock, "cdp1864", __FILE__),
device_sound_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_read_inlace(*this),
m_read_rdata(*this),
m_read_bdata(*this),
@ -147,7 +148,6 @@ void cdp1864_device::device_start()
m_hsync_timer = timer_alloc(TIMER_HSYNC);
// find devices
m_screen = machine().device<screen_device>(m_screen_tag);
m_screen->register_screen_bitmap(m_bitmap);
// register for state saving

View File

@ -82,7 +82,7 @@
#define MCFG_CDP1864_ADD(_tag, _screen_tag, _clock, _inlace, _irq, _dma_out, _efx, _hsync, _rdata, _bdata, _gdata) \
MCFG_SOUND_ADD(_tag, CDP1864, _clock) \
downcast<cdp1864_device *>(device)->set_screen_tag(_screen_tag); \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
downcast<cdp1864_device *>(device)->set_inlace_callback(DEVCB2_##_inlace); \
downcast<cdp1864_device *>(device)->set_irq_callback(DEVCB2_##_irq); \
downcast<cdp1864_device *>(device)->set_dma_out_callback(DEVCB2_##_dma_out); \
@ -108,13 +108,13 @@
// ======================> cdp1864_device
class cdp1864_device : public device_t,
public device_sound_interface
public device_sound_interface,
public device_video_interface
{
public:
// construction/destruction
cdp1864_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 _inlace> void set_inlace_callback(_inlace inlace) { m_read_inlace.set_callback(inlace); }
template<class _irq> void set_irq_callback(_irq irq) { m_write_irq.set_callback(irq); }
template<class _dma_out> void set_dma_out_callback(_dma_out dma_out) { m_write_dma_out.set_callback(dma_out); }
@ -168,8 +168,6 @@ private:
devcb2_write_line m_write_efx;
devcb2_write_line m_write_hsync;
const char *m_screen_tag;
screen_device *m_screen; // screen
bitmap_rgb32 m_bitmap; // bitmap
sound_stream *m_stream; // sound output

View File

@ -344,6 +344,7 @@ inline int cdp1869_device::get_pen(int ccb0, int ccb1, int pcb)
cdp1869_device::cdp1869_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CDP1869, "RCA CDP1869", tag, owner, clock, "cdp1869", __FILE__),
device_sound_interface(mconfig, *this),
device_video_interface(mconfig, *this),
device_memory_interface(mconfig, *this),
m_stream(NULL),
m_space_config("pageram", ENDIANNESS_LITTLE, 8, 11, 0, NULL, *ADDRESS_MAP_NAME(cdp1869))
@ -382,10 +383,6 @@ void cdp1869_device::device_config_complete()
void cdp1869_device::device_start()
{
// get the screen device
m_screen = machine().device<screen_device>(screen_tag);
assert(m_screen != NULL);
// resolve callbacks
m_in_pal_ntsc_func.resolve(in_pal_ntsc_cb, *this);
m_out_prd_func.resolve(out_prd_cb, *this);

View File

@ -155,6 +155,8 @@
#define CDP1869_INTERFACE(_name) \
const cdp1869_interface (_name) =
#define MCFG_CDP1869_SET_SCREEN MCFG_VIDEO_SET_SCREEN
#define CDP1869_CHAR_RAM_READ(name) UINT8 name(device_t *device, UINT16 pma, UINT8 cma, UINT8 pmd)
#define CDP1869_CHAR_RAM_WRITE(name) void name(device_t *device, UINT16 pma, UINT8 cma, UINT8 pmd, UINT8 data)
#define CDP1869_PCB_READ(name) int name(device_t *device, UINT16 pma, UINT8 cma, UINT8 pmd)
@ -180,8 +182,6 @@ typedef int (*cdp1869_pcb_read_func)(device_t *device, UINT16 pma, UINT8 cma, UI
struct cdp1869_interface
{
const char *screen_tag; // screen we are acting on
// pixel clock of the chip is the device clock
int color_clock; // the chroma clock of the chip
@ -207,6 +207,7 @@ struct cdp1869_interface
class cdp1869_device : public device_t,
public device_sound_interface,
public device_video_interface,
public device_memory_interface,
public cdp1869_interface
{
@ -272,7 +273,6 @@ private:
cdp1869_char_ram_read_func m_in_char_ram_func;
cdp1869_char_ram_write_func m_out_char_ram_func;
screen_device *m_screen;
//address_space *m_page_ram;
emu_timer *m_prd_timer;
sound_stream *m_stream;

View File

@ -690,6 +690,7 @@ mos6560_device::mos6560_device(const machine_config &mconfig, device_type type,
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_memory_interface(mconfig, *this),
device_sound_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_variant(variant),
m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, NULL, *ADDRESS_MAP_NAME(mos6560_videoram_map)),
m_colorram_space_config("colorram", ENDIANNESS_LITTLE, 8, 10, 0, NULL, *ADDRESS_MAP_NAME(mos6560_colorram_map)),
@ -702,6 +703,7 @@ mos6560_device::mos6560_device(const machine_config &mconfig, const char *tag, d
: device_t(mconfig, MOS6560, "MOS6560", tag, owner, clock, "mos6560", __FILE__),
device_memory_interface(mconfig, *this),
device_sound_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_variant(TYPE_6560),
m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, NULL, *ADDRESS_MAP_NAME(mos6560_videoram_map)),
m_colorram_space_config("colorram", ENDIANNESS_LITTLE, 8, 10, 0, NULL, *ADDRESS_MAP_NAME(mos6560_colorram_map)),
@ -739,9 +741,7 @@ const address_space_config *mos6560_device::memory_space_config(address_spacenum
void mos6560_device::device_start()
{
m_screen = machine().device<screen_device>(m_screen_tag);
m_screen->register_screen_bitmap(m_bitmap);
assert(m_screen);
// resolve callbacks
m_read_potx.resolve_safe(0xff);

View File

@ -51,7 +51,8 @@
MCFG_SCREEN_VISIBLE_AREA(MOS6560_MAME_XPOS, MOS6560_MAME_XPOS + MOS6560_MAME_XSIZE - 1, MOS6560_MAME_YPOS, MOS6560_MAME_YPOS + MOS6560_MAME_YSIZE - 1) \
MCFG_SCREEN_UPDATE_DEVICE(_tag, mos6560_device, screen_update) \
MCFG_SOUND_ADD(_tag, MOS6560, _clock) \
downcast<mos6560_device *>(device)->set_callbacks(_screen_tag, DEVCB2_##_potx, DEVCB2_##_poty); \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
downcast<mos6560_device *>(device)->set_callbacks(DEVCB2_##_potx, DEVCB2_##_poty); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map)
@ -63,7 +64,8 @@
MCFG_SCREEN_VISIBLE_AREA(MOS6561_MAME_XPOS, MOS6561_MAME_XPOS + MOS6561_MAME_XSIZE - 1, MOS6561_MAME_YPOS, MOS6561_MAME_YPOS + MOS6561_MAME_YSIZE - 1) \
MCFG_SCREEN_UPDATE_DEVICE(_tag, mos6560_device, screen_update) \
MCFG_SOUND_ADD(_tag, MOS6561, _clock) \
downcast<mos6560_device *>(device)->set_callbacks(_screen_tag, DEVCB2_##_potx, DEVCB2_##_poty); \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
downcast<mos6560_device *>(device)->set_callbacks(DEVCB2_##_potx, DEVCB2_##_poty); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map)
@ -75,7 +77,8 @@
MCFG_SCREEN_VISIBLE_AREA(0, 23*8 - 1, 0, 22*8 - 1) \
MCFG_SCREEN_UPDATE_DEVICE(_tag, mos6560_device, screen_update) \
MCFG_SOUND_ADD(_tag, MOS656X_ATTACK_UFO, _clock) \
downcast<mos6560_device *>(device)->set_callbacks(_screen_tag, DEVCB2_NULL, DEVCB2_NULL); \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
downcast<mos6560_device *>(device)->set_callbacks(DEVCB2_NULL, DEVCB2_NULL); \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map)
@ -125,14 +128,14 @@
class mos6560_device : public device_t,
public device_memory_interface,
public device_sound_interface
public device_sound_interface,
public device_video_interface
{
public:
mos6560_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);
mos6560_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
template<class _potx, class _poty> void set_callbacks(const char *screen_tag, _potx potx, _poty poty) {
m_screen_tag = screen_tag;
template<class _potx, class _poty> void set_callbacks(_potx potx, _poty poty) {
m_read_potx.set_callback(potx);
m_read_poty.set_callback(poty);
}
@ -187,9 +190,6 @@ protected:
devcb2_read8 m_read_potx;
devcb2_read8 m_read_poty;
const char *m_screen_tag;
screen_device *m_screen;
UINT8 m_reg[16];
bitmap_rgb32 m_bitmap;

View File

@ -258,6 +258,7 @@ mos7360_device::mos7360_device(const machine_config &mconfig, const char *tag, d
: device_t(mconfig, MOS7360, "MOS7360", tag, owner, clock, "mos7360", __FILE__),
device_memory_interface(mconfig, *this),
device_sound_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, NULL, *ADDRESS_MAP_NAME(mos7360_videoram_map)),
m_write_irq(*this),
m_read_k(*this),
@ -272,10 +273,6 @@ mos7360_device::mos7360_device(const machine_config &mconfig, const char *tag, d
void mos7360_device::device_start()
{
// get the screen device
m_screen = machine().device<screen_device>(m_screen_tag);
assert(m_screen != NULL);
// get the CPU device
m_cpu = machine().device<cpu_device>(m_cpu_tag);
assert(m_cpu != NULL);

View File

@ -52,7 +52,8 @@
MCFG_SCREEN_UPDATE_DEVICE(_tag, mos7360_device, screen_update) \
MCFG_DEVICE_ADD(_tag, MOS7360, _clock) \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
downcast<mos7360_device *>(device)->set_callbacks(_screen_tag, _cpu_tag, DEVCB2_##_irq, DEVCB2_##_k);
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
downcast<mos7360_device *>(device)->set_callbacks(_cpu_tag, DEVCB2_##_irq, DEVCB2_##_k);
@ -89,15 +90,15 @@
class mos7360_device : public device_t,
public device_memory_interface,
public device_sound_interface
public device_sound_interface,
public device_video_interface
{
public:
// construction/destruction
//mos7360_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
mos7360_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_read_k.set_callback(k);
@ -156,9 +157,7 @@ protected:
devcb2_write_line m_write_irq;
devcb2_read8 m_read_k;
const char *m_screen_tag;
const char *m_cpu_tag;
screen_device *m_screen; // screen which sets bitmap properties
cpu_device *m_cpu;
sound_stream *m_stream;

View File

@ -141,6 +141,7 @@ ADDRESS_MAP_END
sega315_5124_device::sega315_5124_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t( mconfig, SEGA315_5124, "Sega 315-5124", tag, owner, clock, "sega315_5124", __FILE__)
, device_memory_interface(mconfig, *this)
, device_video_interface(mconfig, *this)
, m_cram_size( SEGA315_5124_CRAM_SIZE )
, m_palette_offset( 0 )
, m_supports_224_240( false )
@ -152,6 +153,7 @@ sega315_5124_device::sega315_5124_device(const machine_config &mconfig, const ch
sega315_5124_device::sega315_5124_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 cram_size, UINT8 palette_offset, bool supports_224_240, 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)
, m_cram_size( cram_size )
, m_palette_offset( palette_offset )
, m_supports_224_240( supports_224_240 )
@ -1703,8 +1705,6 @@ void sega315_5124_device::vdp_postload()
void sega315_5124_device::device_start()
{
m_screen = machine().device<screen_device>( m_screen_tag );
/* Resolve callbacks */
m_cb_int.resolve( m_int_callback, *this );
m_cb_pause.resolve( m_pause_callback, *this );

View File

@ -53,7 +53,6 @@ PALETTE_INIT( sega315_5378 );
struct sega315_5124_interface
{
bool m_is_pal; /* false = NTSC, true = PAL */
const char *m_screen_tag;
devcb_write_line m_int_callback; /* Interrupt callback function */
devcb_write_line m_pause_callback; /* Pause callback function */
};
@ -66,7 +65,8 @@ extern const device_type SEGA315_5378; /* aka Gamegear vdp */
class sega315_5124_device : public device_t,
public sega315_5124_interface,
public device_memory_interface
public device_memory_interface,
public device_video_interface
{
public:
// construction/destruction
@ -158,7 +158,6 @@ protected:
emu_timer *m_check_hint_timer;
emu_timer *m_check_vint_timer;
emu_timer *m_draw_timer;
screen_device *m_screen;
const address_space_config m_space_config;
@ -204,12 +203,18 @@ protected:
MCFG_DEVICE_ADD(_tag, SEGA315_5124, 0) \
MCFG_DEVICE_CONFIG(_interface)
#define MCFG_SEGA315_5124_SET_SCREEN MCFG_VIDEO_SET_SCREEN
#define MCFG_SEGA315_5246_ADD(_tag, _interface) \
MCFG_DEVICE_ADD(_tag, SEGA315_5246, 0) \
MCFG_DEVICE_CONFIG(_interface)
#define MCFG_SEGA315_5246_SET_SCREEN MCFG_VIDEO_SET_SCREEN
#define MCFG_SEGA315_5378_ADD(_tag, _interface) \
MCFG_DEVICE_ADD(_tag, SEGA315_5378, 0) \
MCFG_DEVICE_CONFIG(_interface)
#define MCFG_SEGA315_5378_SET_SCREEN MCFG_VIDEO_SET_SCREEN
#endif /* __SEGA315_5124_H__ */

View File

@ -41,6 +41,7 @@ const device_type CDP1861 = &device_creator<cdp1861_device>;
cdp1861_device::cdp1861_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CDP1861, "CDP1861", tag, owner, clock, "cdp1861", __FILE__),
device_video_interface(mconfig, *this),
m_write_irq(*this),
m_write_dma_out(*this),
m_write_efx(*this)
@ -65,7 +66,6 @@ void cdp1861_device::device_start()
m_dma_timer = timer_alloc(TIMER_DMA);
// find devices
m_screen = machine().device<screen_device>(m_screen_tag);
m_screen->register_screen_bitmap(m_bitmap);
// register for state saving

View File

@ -67,7 +67,7 @@
#define MCFG_CDP1861_ADD(_tag, _screen_tag, _clock, _irq, _dma_out, _efx) \
MCFG_DEVICE_ADD(_tag, CDP1861, _clock) \
downcast<cdp1861_device *>(device)->set_screen_tag(_screen_tag); \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
downcast<cdp1861_device *>(device)->set_irq_callback(DEVCB2_##_irq); \
downcast<cdp1861_device *>(device)->set_dma_out_callback(DEVCB2_##_dma_out); \
downcast<cdp1861_device *>(device)->set_efx_callback(DEVCB2_##_efx);
@ -85,13 +85,13 @@
// ======================> cdp1861_device
class cdp1861_device : public device_t
class cdp1861_device : public device_t,
public device_video_interface
{
public:
// construction/destruction
cdp1861_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 _irq> void set_irq_callback(_irq irq) { m_write_irq.set_callback(irq); }
template<class _dma_out> void set_dma_out_callback(_dma_out dma_out) { m_write_dma_out.set_callback(dma_out); }
template<class _efx> void set_efx_callback(_efx efx) { m_write_efx.set_callback(efx); }
@ -120,8 +120,6 @@ private:
devcb2_write_line m_write_dma_out;
devcb2_write_line m_write_efx;
const char *m_screen_tag;
screen_device *m_screen; // screen
bitmap_rgb32 m_bitmap; // bitmap
int m_disp; // display enabled

View File

@ -78,6 +78,7 @@ inline void cdp1862_device::initialize_palette()
cdp1862_device::cdp1862_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CDP1862, "CDP1862", tag, owner, clock, "cdp1862", __FILE__),
device_video_interface(mconfig, *this),
m_read_rd(*this),
m_read_bd(*this),
m_read_gd(*this)
@ -97,7 +98,6 @@ void cdp1862_device::device_start()
m_read_gd.resolve_safe(0);
// find devices
m_screen = machine().device<screen_device>(m_screen_tag);
m_screen->register_screen_bitmap(m_bitmap);
// init palette

View File

@ -45,7 +45,7 @@
#define MCFG_CDP1862_ADD(_tag, _screen_tag, _clock, _rd, _bd, _gd) \
MCFG_DEVICE_ADD(_tag, CDP1862, _clock) \
downcast<cdp1862_device *>(device)->set_screen_tag(_screen_tag); \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
downcast<cdp1862_device *>(device)->set_rd_callback(DEVCB2_##_rd); \
downcast<cdp1862_device *>(device)->set_bd_callback(DEVCB2_##_bd); \
downcast<cdp1862_device *>(device)->set_gd_callback(DEVCB2_##_gd);
@ -64,13 +64,13 @@
// ======================> cdp1862_device
class cdp1862_device : public device_t
class cdp1862_device : public device_t,
public device_video_interface
{
public:
// construction/destruction
cdp1862_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 _rd> void set_rd_callback(_rd rd) { m_read_rd.set_callback(rd); }
template<class _bd> void set_bd_callback(_bd bd) { m_read_bd.set_callback(bd); }
template<class _gd> void set_gd_callback(_gd gd) { m_read_gd.set_callback(gd); }
@ -95,8 +95,6 @@ private:
devcb2_read_line m_read_bd;
devcb2_read_line m_read_gd;
const char *m_screen_tag;
screen_device *m_screen; // screen
bitmap_rgb32 m_bitmap; // bitmap
double m_lum_r; // red luminance resistor value

View File

@ -448,6 +448,7 @@ inline void crt9007_device::recompute_parameters()
crt9007_device::crt9007_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CRT9007, "SMC CRT9007", tag, owner, clock, "crt9007", __FILE__),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, NULL, *ADDRESS_MAP_NAME(crt9007))
{
for (int i = 0; i < 0x3d; i++)
@ -511,10 +512,6 @@ void crt9007_device::device_start()
m_out_slg_func.resolve(m_out_slg_cb, *this);
m_out_sld_func.resolve(m_out_sld_cb, *this);
// get the screen device
m_screen = machine().device<screen_device>(m_screen_tag);
assert(m_screen != NULL);
// set horizontal pixels per column
m_hpixels_per_column = hpixels_per_column;

View File

@ -70,7 +70,6 @@
struct crt9007_interface
{
const char *m_screen_tag; /* screen we are acting on */
int hpixels_per_column; /* number of pixels per video memory address */
devcb_write_line m_out_int_cb;
@ -94,6 +93,7 @@ struct crt9007_interface
class crt9007_device : public device_t,
public device_memory_interface,
public device_video_interface,
public crt9007_interface
{
public:
@ -152,8 +152,6 @@ private:
devcb_resolved_write_line m_out_slg_func;
devcb_resolved_write_line m_out_sld_func;
screen_device *m_screen;
// registers
UINT8 m_reg[0x3d];
UINT8 m_status;

View File

@ -82,7 +82,8 @@ enum
//-------------------------------------------------
crt9021_device::crt9021_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CRT9021, "SMC CRT9021", tag, owner, clock, "crt9021", __FILE__)
: device_t(mconfig, CRT9021, "SMC CRT9021", tag, owner, clock, "crt9021", __FILE__),
device_video_interface(mconfig, *this)
{
}
@ -123,10 +124,6 @@ void crt9021_device::device_start()
m_in_attr_func.resolve(in_attr_cb, *this);
m_in_atten_func.resolve(in_atten_cb, *this);
// get the screen device
m_screen = machine().device<screen_device>(screen_tag);
assert(m_screen != NULL);
// register for state saving
save_item(NAME(m_slg));
save_item(NAME(m_sld));

View File

@ -63,8 +63,6 @@
struct crt9021_interface
{
const char *screen_tag; /* screen we are acting on */
devcb_read8 in_data_cb;
devcb_read8 in_attr_cb;
@ -76,6 +74,7 @@ struct crt9021_interface
// ======================> crt9021_device
class crt9021_device : public device_t,
public device_video_interface,
public crt9021_interface
{
public:
@ -102,8 +101,6 @@ private:
devcb_resolved_read8 m_in_attr_func;
devcb_resolved_read_line m_in_atten_func;
screen_device *m_screen;
int m_slg;
int m_sld;
int m_cursor;

View File

@ -23,8 +23,7 @@ static const UINT8 bgr2rgb[8] =
ef9340_1_device::ef9340_1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, EF9340_1, "EF9340+EF9341", tag, owner, clock, "ef9340_1", __FILE__)
, m_screen_tag(NULL)
, m_screen(NULL)
, device_video_interface(mconfig, *this)
//, m_start_vpos(START_Y)
//, m_start_vblank(START_Y + SCREEN_HEIGHT)
//, m_screen_lines(LINES)
@ -34,10 +33,6 @@ ef9340_1_device::ef9340_1_device(const machine_config &mconfig, const char *tag,
void ef9340_1_device::device_start()
{
assert( m_screen_tag != NULL );
m_screen = machine().device<screen_device>(m_screen_tag);
assert( m_screen != NULL );
// Let the screen create our temporary bitmap with the screen's dimensions
m_screen->register_screen_bitmap(m_tmp_bitmap);

View File

@ -17,17 +17,15 @@
#define MCFG_EF9340_1_ADD(_tag, _clock, _screen_tag) \
MCFG_DEVICE_ADD(_tag, EF9340_1, _clock) \
ef9340_1_device::set_screen_tag(*device, _screen_tag);
MCFG_VIDEO_SET_SCREEN(_screen_tag)
class ef9340_1_device : public device_t
class ef9340_1_device : public device_t,
public device_video_interface
{
public:
// construction/destruction
ef9340_1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// static configuration helpers
static void set_screen_tag(device_t &device, const char *screen_tag) { downcast<ef9340_1_device &>(device).m_screen_tag = screen_tag; }
inline bitmap_ind16 *get_bitmap() { return &m_tmp_bitmap; }
void ef9341_write( UINT8 command, UINT8 b, UINT8 data );
@ -52,9 +50,6 @@ protected:
emu_timer *m_line_timer;
const char *m_screen_tag;
screen_device *m_screen;
bitmap_ind16 m_tmp_bitmap;
struct

View File

@ -27,7 +27,8 @@ ADDRESS_MAP_END
h63484_device::h63484_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, H63484, "H63484", tag, owner, clock, "h63484", __FILE__),
device_memory_interface(mconfig, *this),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_ar(0),
m_sr(0),
m_fifo_ptr(-1),
@ -1139,8 +1140,6 @@ WRITE16_MEMBER( h63484_device::data_w )
void h63484_device::device_start()
{
m_screen = machine().device<screen_device>(m_screen_tag);
//h63484->space = device->memory().space(AS_0);
m_vram = auto_alloc_array_clear(machine(), UINT8, 1 << 20);
}

View File

@ -33,7 +33,6 @@ typedef void (*h63484_display_pixels_func)(device_t *device, bitmap_ind16 &bitma
struct h63484_interface
{
const char *m_screen_tag; /* screen we are acting on */
h63484_display_pixels_func m_display_cb;
};
@ -41,6 +40,7 @@ struct h63484_interface
class h63484_device : public device_t,
public device_memory_interface,
public device_video_interface,
public h63484_interface
{
public:
@ -92,8 +92,6 @@ private:
void draw_graphics_line(bitmap_ind16 &bitmap, const rectangle &cliprect, int y, int layer_n);
screen_device *m_screen;
UINT8 *m_vram;
UINT8 m_ar;
UINT8 m_vreg[0x100];

View File

@ -70,6 +70,7 @@ inline void hd44102_device::count_up_or_down()
hd44102_device::hd44102_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, HD44102, "HD44102", tag, owner, clock, "hd44102", __FILE__),
device_video_interface(mconfig, *this),
m_cs2(0),
m_page(0),
m_x(0),
@ -82,13 +83,10 @@ hd44102_device::hd44102_device(const machine_config &mconfig, const char *tag, d
// static_set_config - configuration helper
//-------------------------------------------------
void hd44102_device::static_set_config(device_t &device, const char *screen_tag, int sx, int sy)
void hd44102_device::static_set_config(device_t &device, int sx, int sy)
{
hd44102_device &hd44102 = downcast<hd44102_device &>(device);
assert(screen_tag != NULL);
hd44102.m_screen_tag = screen_tag;
hd44102.m_sx = sx;
hd44102.m_sy = sy;
}
@ -100,9 +98,6 @@ void hd44102_device::static_set_config(device_t &device, const char *screen_tag,
void hd44102_device::device_start()
{
// find screen
m_screen = machine().device<screen_device>(m_screen_tag);
// register for state saving
save_item(NAME(m_ram[0]));
save_item(NAME(m_ram[1]));

View File

@ -22,7 +22,8 @@
#define MCFG_HD44102_ADD(_tag, _screen_tag, _sx, _sy) \
MCFG_DEVICE_ADD(_tag, HD44102, 0) \
hd44102_device::static_set_config(*device, _screen_tag, _sx, _sy);
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
hd44102_device::static_set_config(*device, _sx, _sy);
@ -32,14 +33,15 @@
// ======================> hd44102_device
class hd44102_device : public device_t
class hd44102_device : public device_t,
public device_video_interface
{
public:
// construction/destruction
hd44102_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// inline configuration helpers
static void static_set_config(device_t &device, const char *screen_tag, int sx, int sy);
static void static_set_config(device_t &device, int sx, int sy);
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
@ -62,8 +64,6 @@ private:
inline void count_up_or_down();
screen_device *m_screen; // screen
UINT8 m_ram[4][50]; // display memory
UINT8 m_status; // status register
@ -74,7 +74,6 @@ private:
int m_x; // X address
int m_y; // Y address
const char *m_screen_tag;
int m_sx;
int m_sy;
};

View File

@ -108,6 +108,7 @@ inline void hd61830_device::writebyte(offs_t address, UINT8 data)
hd61830_device::hd61830_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, HD61830, "Hitachi HD61830", tag, owner, clock, "hd61830", __FILE__),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_bf(false),
m_cac(0),
m_blink(0),
@ -161,8 +162,6 @@ void hd61830_device::device_start()
// resolve callbacks
m_in_rd_func.resolve(m_in_rd_cb, *this);
m_screen = machine().device<screen_device>(screen_tag);
// register for state saving
save_item(NAME(m_bf));
save_item(NAME(m_ir));

View File

@ -45,8 +45,6 @@
struct hd61830_interface
{
const char *screen_tag;
devcb_read8 m_in_rd_cb;
};
@ -56,6 +54,7 @@ struct hd61830_interface
class hd61830_device : public device_t,
public device_memory_interface,
public device_video_interface,
public hd61830_interface
{
public:
@ -94,7 +93,6 @@ private:
devcb_resolved_read8 m_in_rd_func;
screen_device *m_screen;
emu_timer *m_busy_timer;
//address_space *m_data;

View File

@ -62,7 +62,8 @@ void huc6260_device::device_config_complete()
huc6260_device::huc6260_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, HUC6260, "HuC6260", tag, owner, clock, "huc6260", __FILE__)
: device_t(mconfig, HUC6260, "HuC6260", tag, owner, clock, "huc6260", __FILE__),
device_video_interface(mconfig, *this)
{
}
@ -250,11 +251,7 @@ WRITE8_MEMBER( huc6260_device::write )
void huc6260_device::device_start()
{
/* Make sure we are supplied a screen tag */
assert( screen_tag != NULL );
m_timer = timer_alloc();
m_screen = machine().device<screen_device>( screen_tag );
m_bmp = auto_bitmap_ind16_alloc( machine(), HUC6260_WPF, HUC6260_LPF );
/* Resolve callbacks */
@ -264,7 +261,6 @@ void huc6260_device::device_start()
m_get_time_til_next_event.resolve( get_time_til_next_event, *this );
/* We want to have a valid screen and valid callbacks */
assert( m_screen != NULL );
assert( ! m_hsync_changed.isnull() );
assert( ! m_vsync_changed.isnull() );
assert( ! m_get_next_pixel_data.isnull() );

View File

@ -28,9 +28,6 @@ PALETTE_INIT( huc6260 );
struct huc6260_interface
{
/* Tag for the screen we will be drawing on */
const char *screen_tag;
/* Callback function to retrieve pixel data */
devcb_read16 get_next_pixel_data;
@ -47,6 +44,7 @@ struct huc6260_interface
class huc6260_device : public device_t,
public device_video_interface,
public huc6260_interface
{
public:
@ -65,7 +63,6 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
private:
screen_device *m_screen;
int m_last_h;
int m_last_v;
int m_height;

View File

@ -38,7 +38,8 @@ void huc6261_device::device_config_complete()
huc6261_device::huc6261_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, HUC6261, "HuC6261", tag, owner, clock, "huc6261", __FILE__)
: device_t(mconfig, HUC6261, "HuC6261", tag, owner, clock, "huc6261", __FILE__),
device_video_interface(mconfig, *this)
{
// Set up UV lookup table
for ( int ur = 0; ur < 256; ur++ )
@ -402,19 +403,16 @@ WRITE16_MEMBER( huc6261_device::write )
void huc6261_device::device_start()
{
/* Make sure we are supplied all our mandatory tags */
assert( screen_tag != NULL );
assert( huc6270_a_tag != NULL );
assert( huc6270_b_tag != NULL );
m_timer = timer_alloc();
m_screen = machine().device<screen_device>( screen_tag );
m_huc6270_a = machine().device<huc6270_device>( huc6270_a_tag );
m_huc6270_b = machine().device<huc6270_device>( huc6270_b_tag );
m_bmp = auto_bitmap_rgb32_alloc( machine(), HUC6261_WPF, HUC6261_LPF );
/* We want to have valid devices */
assert( m_screen != NULL );
assert( m_huc6270_a != NULL );
assert( m_huc6270_b != NULL );

View File

@ -24,9 +24,6 @@
struct huc6261_interface
{
/* Tag for the screen we will be drawing on */
const char *screen_tag;
/* Tags for the 2 HuC6270 devices */
const char *huc6270_a_tag;
const char *huc6270_b_tag;
@ -34,6 +31,7 @@ struct huc6261_interface
class huc6261_device : public device_t,
public device_video_interface,
public huc6261_interface
{
public:
@ -54,7 +52,6 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
private:
screen_device *m_screen;
huc6270_device *m_huc6270_a;
huc6270_device *m_huc6270_b;
int m_last_h;

View File

@ -100,10 +100,9 @@ static const UINT8 bgr2rgb[8] =
i8244_device::i8244_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, I8244, "I8244", tag, owner, clock, "i8244", __FILE__)
, device_sound_interface(mconfig, *this)
, device_video_interface(mconfig, *this)
, m_irq_func(*this)
, m_postprocess_func(*this)
, m_screen_tag(NULL)
, m_screen(NULL)
, m_start_vpos(START_Y)
, m_start_vblank(START_Y + SCREEN_HEIGHT)
, m_screen_lines(LINES)
@ -114,10 +113,9 @@ i8244_device::i8244_device(const machine_config &mconfig, const char *tag, devic
i8244_device::i8244_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, int lines, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source)
, device_sound_interface(mconfig, *this)
, device_video_interface(mconfig, *this)
, m_irq_func(*this)
, m_postprocess_func(*this)
, m_screen_tag(NULL)
, m_screen(NULL)
, m_start_vpos(START_Y)
, m_start_vblank(START_Y + SCREEN_HEIGHT)
, m_screen_lines(lines)
@ -137,10 +135,6 @@ i8245_device::i8245_device(const machine_config &mconfig, const char *tag, devic
void i8244_device::device_start()
{
assert( m_screen_tag != NULL );
m_screen = machine().device<screen_device>(m_screen_tag);
assert( m_screen != NULL );
// Let the screen create our temporary bitmap with the screen's dimensions
m_screen->register_screen_bitmap(m_tmp_bitmap);

View File

@ -20,18 +20,16 @@
#define MCFG_I8244_ADD(_tag, _clock, _screen_tag, _irq_cb, _postprocess_cb) \
MCFG_DEVICE_ADD(_tag, I8244, _clock) \
MCFG_I8244_SCREEN_TAG(_screen_tag) \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
MCFG_I8244_IRQ_CB(_irq_cb) \
MCFG_I8244_POSTPROCESS_CB(_postprocess_cb)
#define MCFG_I8244_SCREEN_TAG(_screen_tag) \
i8244_device::set_screen_tag(*device, _screen_tag);
#define MCFG_I8244_IRQ_CB(_devcb) \
devcb = &i8244_device::set_irq_cb(*device, DEVCB2_##_devcb);
#define MCFG_I8244_POSTPROCESS_CB(_devcb) \
devcb = &i8244_device::set_postprocess_cb(*device, DEVCB2_##_devcb);
#define MCFG_I8245_ADD(_tag, _clock, _screen_tag, _irq_cb, _postprocess_cb) \
MCFG_DEVICE_ADD(_tag, I8245, _clock) \
MCFG_I8244_SCREEN_TAG(_screen_tag) \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
MCFG_I8244_IRQ_CB(_irq_cb) \
MCFG_I8244_POSTPROCESS_CB(_postprocess_cb )
@ -76,6 +74,7 @@ union vdc_t {
class i8244_device : public device_t
, public device_sound_interface
, public device_video_interface
{
public:
// construction/destruction
@ -132,8 +131,6 @@ protected:
devcb2_write_line m_irq_func;
devcb2_write16 m_postprocess_func;
const char *m_screen_tag;
screen_device *m_screen;
bitmap_ind16 m_tmp_bitmap;
emu_timer *m_line_timer;
emu_timer *m_hblank_timer;

View File

@ -410,7 +410,8 @@ UINT32 i8275_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
const device_type I8275 = &device_creator<i8275_device>;
i8275_device::i8275_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, I8275, "Intel 8275", tag, owner, clock, "i8275", __FILE__)
: device_t(mconfig, I8275, "Intel 8275", tag, owner, clock, "i8275", __FILE__),
device_video_interface(mconfig, *this)
{
}
@ -446,8 +447,6 @@ void i8275_device::device_config_complete()
void i8275_device::device_start()
{
/* get the screen device */
m_screen = machine().device<screen_device>(m_screen_tag);
assert(m_screen != NULL);
m_screen->register_screen_bitmap(m_bitmap);
/* resolve callbacks */

View File

@ -46,7 +46,6 @@ typedef void (*i8275_display_pixels_func)(i8275_device *device, bitmap_rgb32 &bi
struct i8275_interface
{
const char *m_screen_tag; /* screen we are acting on */
int m_width; /* char width in pixels */
int m_char_delay; /* delay of display char */
@ -60,7 +59,8 @@ struct i8275_interface
};
class i8275_device : public device_t,
class i8275_device : public device_t,
public device_video_interface,
public i8275_interface
{
public:
@ -90,7 +90,6 @@ protected:
devcb_resolved_write_line m_out_hrtc_func;
devcb_resolved_write_line m_out_vrtc_func;
screen_device *m_screen;
bitmap_rgb32 m_bitmap;
UINT8 m_status_reg; /* value of status reggister */

View File

@ -81,6 +81,7 @@ const device_type I8275x = &device_creator<i8275x_device>;
i8275x_device::i8275x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, I8275x, "I8275", tag, owner, clock, "i8275x", __FILE__),
device_video_interface(mconfig, *this),
m_status(0),
m_param_idx(0),
m_param_end(0),
@ -132,8 +133,6 @@ void i8275x_device::device_config_complete()
void i8275x_device::device_start()
{
// get the screen device
m_screen = machine().device<screen_device>(m_screen_tag);
assert(m_screen != NULL);
m_screen->register_screen_bitmap(m_bitmap);
// resolve callbacks

View File

@ -70,7 +70,6 @@ typedef void (*i8275_display_pixels_func)(i8275x_device *device, bitmap_rgb32 &b
struct i8275_interface
{
const char *m_screen_tag;
int m_hpixels_per_column;
int m_dummy;
@ -88,6 +87,7 @@ struct i8275_interface
// ======================> i8275x_device
class i8275x_device : public device_t,
public device_video_interface,
public i8275_interface
{
public:
@ -177,7 +177,6 @@ protected:
devcb_resolved_write_line m_out_hrtc_func;
devcb_resolved_write_line m_out_vrtc_func;
screen_device *m_screen;
bitmap_rgb32 m_bitmap;
UINT8 m_status;

View File

@ -173,6 +173,7 @@ inline void m50458_device::write_word(offs_t address, UINT16 data)
m50458_device::m50458_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, M50458, "m50458", tag, owner, clock, "m50458", __FILE__),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_space_config("videoram", ENDIANNESS_LITTLE, 16, 16, 0, NULL, *ADDRESS_MAP_NAME(m50458_vram))
{
}
@ -188,20 +189,6 @@ void m50458_device::device_validity_check(validity_checker &valid) const
}
void m50458_device::device_config_complete()
{
// inherit a copy of the static data
const m50458_interface *intf = reinterpret_cast<const m50458_interface *>(static_config());
if (intf != NULL)
*static_cast<m50458_interface *>(this) = *intf;
// or initialize to defaults if none provided
else
{
// ...
}
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@ -249,14 +236,6 @@ void m50458_device::device_start()
m_shadow_gfx[dst] |= (tmp >> 8);
}
}
// find screen
m_screen = machine().device<screen_device>(m_screen_tag);
if (m_screen == NULL)
{
m_screen = owner()->subdevice<screen_device>(m_screen_tag);
}
}

View File

@ -15,12 +15,9 @@ Mitsubishi M50458 OSD chip
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_M50458_ADD(_tag,_config,_freq) \
#define MCFG_M50458_ADD(_tag,_freq,_screen) \
MCFG_DEVICE_ADD(_tag, M50458,_freq) \
MCFG_DEVICE_CONFIG(_config)
#define M50458_INTERFACE(name) \
const m50458_interface (name) =
MCFG_VIDEO_SET_SCREEN(_screen)
//**************************************************************************
@ -33,18 +30,11 @@ enum m50458_state_t
OSD_SET_DATA
};
// ======================> upd7220_interface
struct m50458_interface
{
const char *m_screen_tag;
};
// ======================> m50458_device
class m50458_device : public device_t,
public device_memory_interface,
public m50458_interface
public device_video_interface
{
public:
// construction/destruction
@ -72,9 +62,6 @@ protected:
virtual void device_start();
virtual void device_reset();
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const;
virtual void device_config_complete();
screen_device *m_screen;
int m_latch;
int m_reset_line;

View File

@ -99,7 +99,6 @@ void mc6845_device::device_config_complete()
}
else
{
m_screen_tag = NULL;
m_show_border_area = false;
m_hpixels_per_column = 0;
m_begin_update = NULL;
@ -115,12 +114,14 @@ void mc6845_device::device_config_complete()
mc6845_device::mc6845_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, false)
{
}
mc6845_device::mc6845_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MC6845, "mc6845", tag, owner, clock, "mc6845", __FILE__)
: device_t(mconfig, MC6845, "mc6845", tag, owner, clock, "mc6845", __FILE__),
device_video_interface(mconfig, *this, false)
{
}
@ -1000,16 +1001,6 @@ void mc6845_device::device_start()
m_res_out_hsync_func.resolve(m_out_hsync_func, *this);
m_res_out_vsync_func.resolve(m_out_vsync_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);

View File

@ -16,12 +16,14 @@
#define MC6845_INTERFACE(name) \
const mc6845_interface (name) =
#define MCFG_MC6845_ADD(_tag, _variant, _clock, _config) \
#define MCFG_MC6845_ADD(_tag, _variant, _screen_tag, _clock, _config) \
MCFG_DEVICE_ADD(_tag, _variant, _clock) \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
MCFG_DEVICE_CONFIG(_config)
#define MCFG_MOS8563_ADD(_tag, _screen_tag, _clock, _config, _map) \
MCFG_DEVICE_ADD(_tag, MOS8563, _clock) \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
MCFG_DEVICE_CONFIG(_config) \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@ -32,6 +34,7 @@
#define MCFG_MOS8568_ADD(_tag, _screen_tag, _clock, _config, _map) \
MCFG_DEVICE_ADD(_tag, MOS8568, _clock) \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
MCFG_DEVICE_CONFIG(_config) \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@ -69,7 +72,6 @@ typedef void (*mc6845_on_update_addr_changed_func)(mc6845_device *device, int ad
/* interface */
struct mc6845_interface
{
const char *m_screen_tag; /* screen we are acting on */
bool m_show_border_area; /* visible screen area (false) active display (true) active display + blanking */
int m_hpixels_per_column; /* number of pixels per video memory address */
@ -108,6 +110,7 @@ struct mc6845_interface
class mc6845_device : public device_t,
public device_video_interface,
public mc6845_interface
{
friend class mc6845_1_device;
@ -189,8 +192,6 @@ protected:
devcb_resolved_write_line m_res_out_hsync_func;
devcb_resolved_write_line m_res_out_vsync_func;
screen_device *m_screen;
/* register file */
UINT8 m_horiz_char_total; /* 0x00 */
UINT8 m_horiz_disp; /* 0x01 */

View File

@ -120,6 +120,7 @@ inline UINT8 msm6255_device::read_byte(UINT16 ma, UINT8 ra)
msm6255_device::msm6255_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MSM6255, "MSM6255", tag, owner, clock, "msm6255", __FILE__),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_space_config("videoram", ENDIANNESS_LITTLE, 8, 20, 0, NULL, *ADDRESS_MAP_NAME(msm6255)),
m_cursor(0)
{
@ -130,14 +131,11 @@ msm6255_device::msm6255_device(const machine_config &mconfig, const char *tag, d
// static_set_config - configuration helper
//-------------------------------------------------
void msm6255_device::static_set_config(device_t &device, int char_clock, const char *screen_tag)
void msm6255_device::static_set_config(device_t &device, int char_clock)
{
msm6255_device &msm6255 = downcast<msm6255_device &>(device);
assert(screen_tag != NULL);
msm6255.m_char_clock = char_clock;
msm6255.m_screen_tag = screen_tag;
}
@ -147,9 +145,6 @@ void msm6255_device::static_set_config(device_t &device, int char_clock, const c
void msm6255_device::device_start()
{
// find screen
m_screen = machine().device<screen_device>(m_screen_tag);
// register for state saving
save_item(NAME(m_ir));
save_item(NAME(m_mor));

View File

@ -23,7 +23,8 @@
#define MCFG_MSM6255_ADD(_tag, _clock, _char_clock, _screen_tag, _map) \
MCFG_DEVICE_ADD(_tag, MSM6255, _clock) \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _map) \
msm6255_device::static_set_config(*device, _char_clock, _screen_tag);
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
msm6255_device::static_set_config(*device, _char_clock);
@ -34,14 +35,15 @@
// ======================> msm6255_device
class msm6255_device : public device_t,
public device_memory_interface
public device_memory_interface,
public device_video_interface
{
public:
// construction/destruction
msm6255_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// inline configuration helpers
static void static_set_config(device_t &device, int char_clock, const char *screen_tag);
static void static_set_config(device_t &device, int char_clock);
virtual DECLARE_ADDRESS_MAP(map, 8);
@ -70,8 +72,6 @@ private:
void update_text(bitmap_ind16 &bitmap, const rectangle &cliprect);
const address_space_config m_space_config;
const char *m_screen_tag;
screen_device *m_screen;
int m_char_clock;
UINT8 m_ir; // instruction register

View File

@ -184,7 +184,6 @@ static VIDEO_START( cga_mc1502 );
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 */
@ -209,7 +208,7 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_cga )
MCFG_PALETTE_LENGTH(/* CGA_PALETTE_SETS * 16*/ 65536 )
MCFG_PALETTE_INIT(pc_cga)
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)
MCFG_VIDEO_START( pc_cga )
MACHINE_CONFIG_END
@ -234,7 +233,7 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_mc1502 )
MCFG_PALETTE_LENGTH(/* CGA_PALETTE_SETS * 16*/ 65536 )
MCFG_PALETTE_INIT(pc_cga)
MCFG_MC6845_ADD(CGA_MC6845_NAME, MC6845, XTAL_16MHz/8, mc6845_cga_intf)
MCFG_MC6845_ADD(CGA_MC6845_NAME, MC6845, CGA_SCREEN_NAME, XTAL_16MHz/8, mc6845_cga_intf)
MCFG_VIDEO_START( cga_mc1502 )
MACHINE_CONFIG_END

View File

@ -142,26 +142,13 @@ inline void sed1330_device::increment_csr()
sed1330_device::sed1330_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SED1330, "SED1330", tag, owner, clock, "sed1330", __FILE__),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_bf(0),
m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, NULL, *ADDRESS_MAP_NAME(sed1330))
{
}
//-------------------------------------------------
// static_set_config - configuration helper
//-------------------------------------------------
void sed1330_device::static_set_config(device_t &device, const char *screen_tag)
{
sed1330_device &sed1330 = downcast<sed1330_device &>(device);
assert(screen_tag != NULL);
sed1330.m_screen_tag = screen_tag;
}
//-------------------------------------------------
// rom_region - device-specific ROM region
//-------------------------------------------------

View File

@ -23,7 +23,7 @@
#define MCFG_SED1330_ADD(_tag, _clock, _screen_tag, _map) \
MCFG_DEVICE_ADD(_tag, SED1330, _clock) \
MCFG_DEVICE_ADDRESS_MAP(AS_0, _map) \
sed1330_device::static_set_config(*device, _screen_tag);
MCFG_VIDEO_SET_SCREEN(_screen_tag)
@ -34,15 +34,13 @@
// ======================> sed1330_device
class sed1330_device : public device_t,
public device_memory_interface
public device_memory_interface,
public device_video_interface
{
public:
// construction/destruction
sed1330_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// inline configuration helpers
static void static_set_config(device_t &device, const char *screen_tag);
// optional information overrides
virtual const rom_entry *device_rom_region() const;
@ -116,12 +114,8 @@ private:
int m_dm; // display mode for pages 1, 3
int m_ov; // graphics mode layer composition
// devices
//screen_device *m_screen;
// address space configurations
const address_space_config m_space_config;
const char *m_screen_tag;
};

View File

@ -29,6 +29,7 @@ const device_type TMS34061 = &device_creator<tms34061_device>;
tms34061_device::tms34061_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TMS34061, "tms34061", tag, owner, clock, "tms34061", __FILE__),
device_video_interface(mconfig, *this),
//m_regs[TMS34061_REGCOUNT],
m_xmask(0),
m_yshift(0),
@ -63,7 +64,6 @@ void tms34061_device::device_config_complete()
// or initialize to defaults if none provided
else
{
m_screen_tag = "";
m_rowshift = 0;
m_vramsize = 0;
//(*m_interrupt)(int state)
@ -77,7 +77,6 @@ void tms34061_device::device_config_complete()
void tms34061_device::device_start()
{
/* reset the data */
m_screen = machine().device<screen_device>(m_screen_tag);
m_vrammask = m_vramsize - 1;
/* allocate memory for VRAM */

View File

@ -38,7 +38,6 @@ enum
/* interface structure */
struct tms34061_interface
{
const char *m_screen_tag; /* the screen we are acting on */
UINT8 m_rowshift; /* VRAM address is (row << rowshift) | col */
UINT32 m_vramsize; /* size of video RAM */
void (*m_interrupt)(running_machine &machine, int state); /* interrupt gen callback */
@ -60,7 +59,8 @@ struct tms34061_display
// ======================> tms34061_device
class tms34061_device : public device_t,
public tms34061_interface
public device_video_interface,
public tms34061_interface
{
public:
// construction/destruction
@ -95,7 +95,6 @@ private:
UINT8 m_latchdata;
UINT8 * m_shiftreg;
emu_timer * m_timer;
screen_device *m_screen;
void update_interrupts(void);
TIMER_CALLBACK_MEMBER( interrupt );

View File

@ -36,12 +36,14 @@ const device_type CRT5037 = &device_creator<crt5037_device>;
const device_type CRT5057 = &device_creator<crt5057_device>;
tms9927_device::tms9927_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TMS9927, "TMS9927", tag, owner, clock, "tms9927", __FILE__)
: device_t(mconfig, TMS9927, "TMS9927", tag, owner, clock, "tms9927", __FILE__),
device_video_interface(mconfig, *this)
{
}
tms9927_device::tms9927_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)
{
}
@ -89,10 +91,6 @@ void tms9927_device::device_start()
/* copy the initial parameters */
m_clock = clock();
/* get the screen device */
m_screen = downcast<screen_device *>(machine().device(m_screen_tag));
assert(m_screen != NULL);
/* get the self-load PROM */
if (m_selfload_region != NULL)
{

View File

@ -13,13 +13,13 @@
/* interface */
struct tms9927_interface
{
const char *m_screen_tag; /* screen we are acting on */
int m_hpixels_per_column; /* number of pixels per video memory address */
const char *m_selfload_region; /* name of the region with self-load data */
};
class tms9927_device : public device_t,
public device_video_interface,
public tms9927_interface
{
public:
@ -48,7 +48,6 @@ private:
void generic_access(address_space &space, offs_t offset);
// internal state
screen_device *m_screen;
const UINT8 *m_selfload;
/* live state */

View File

@ -93,6 +93,7 @@ static const rgb_t tms9928a_palette[TMS9928A_PALETTE_SIZE] =
tms9928a_device::tms9928a_device( const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, bool is_50hz, bool is_reva, bool is_99, 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),
m_space_config("vram",ENDIANNESS_BIG, 8, 14, 0, NULL, *ADDRESS_MAP_NAME(memmap))
{
m_50hz = is_50hz;
@ -105,6 +106,7 @@ tms9928a_device::tms9928a_device( const machine_config &mconfig, device_type typ
tms9928a_device::tms9928a_device( const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock )
: device_t( mconfig, TMS9928A, "TMS9928A", tag, owner, clock, "tms9928a", __FILE__),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_space_config("vram",ENDIANNESS_BIG, 8, 14, 0, NULL, *ADDRESS_MAP_NAME(memmap))
{
m_50hz = false;
@ -629,8 +631,6 @@ void tms9928a_device::device_config_complete()
void tms9928a_device::device_start()
{
astring tempstring;
m_screen = downcast<screen_device *>(machine().device(siblingtag(tempstring,m_screen_tag)));
assert( m_screen != NULL );
m_top_border = m_50hz ? TMS9928A_VERT_DISPLAY_START_PAL : TMS9928A_VERT_DISPLAY_START_NTSC;
m_vertical_size = m_50hz ? TMS9928A_TOTAL_VERT_PAL : TMS9928A_TOTAL_VERT_NTSC;

View File

@ -48,6 +48,8 @@
MCFG_DEVICE_ADD(_tag, _variant, XTAL_10_738635MHz / 2 ) \
MCFG_DEVICE_CONFIG(_config)
#define MCFG_TMS9928A_SET_SCREEN MCFG_VIDEO_SET_SCREEN
#define MCFG_TMS9928A_SCREEN_ADD_NTSC(_screen_tag) \
MCFG_SCREEN_ADD( _screen_tag, RASTER ) \
@ -73,7 +75,6 @@ extern const device_type TMS9129;
struct tms9928a_interface
{
const char *m_screen_tag;
int m_vram_size; /* 4K, 8K, or 16K. This should be replaced by fetching data from an address space? */
devcb_write_line m_out_int_line; /* Callback is called whenever the state of the INT output changes */
const char *m_regionname; // Alternatively, get the name of the region (if vram size is 0)
@ -82,6 +83,7 @@ struct tms9928a_interface
class tms9928a_device : public device_t,
public device_memory_interface,
public device_video_interface,
public tms9928a_interface
{
public:
@ -119,8 +121,6 @@ private:
static const device_timer_id TIMER_LINE = 0;
screen_device *m_screen;
/* TMS9928A internal settings */
UINT8 m_ReadAhead;
UINT8 m_Regs[8];

View File

@ -194,6 +194,7 @@ inline void upd3301_device::recompute_parameters()
upd3301_device::upd3301_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, UPD3301, "UPD3301", tag, owner, clock, "upd3301", __FILE__),
device_video_interface(mconfig, *this),
m_status(0),
m_param_count(0),
m_data_fifo_pos(0),
@ -257,10 +258,6 @@ void upd3301_device::device_start()
m_out_hrtc_func.resolve(m_out_hrtc_cb, *this);
m_out_vrtc_func.resolve(m_out_vrtc_cb, *this);
// get the screen device
m_screen = machine().device<screen_device>(m_screen_tag);
assert(m_screen != NULL);
// state saving
save_item(NAME(m_y));
save_item(NAME(m_hrtc));

View File

@ -74,7 +74,6 @@ typedef void (*upd3301_display_pixels_func)(device_t *device, bitmap_rgb32 &bitm
struct upd3301_interface
{
const char *m_screen_tag; // screen we are acting on
int m_width; // char width in pixels
upd3301_display_pixels_func m_display_cb;
@ -90,6 +89,7 @@ struct upd3301_interface
// ======================> upd3301_device
class upd3301_device : public device_t,
public device_video_interface,
public upd3301_interface
{
public:
@ -133,8 +133,6 @@ private:
devcb_resolved_write_line m_out_hrtc_func;
devcb_resolved_write_line m_out_vrtc_func;
screen_device *m_screen;
// screen drawing
bitmap_rgb32 *m_bitmap; // bitmap
int m_y; // current scanline

View File

@ -682,6 +682,7 @@ inline void upd7220_device::get_graphics_partition(int index, UINT32 *sad, UINT1
upd7220_device::upd7220_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, UPD7220, "uPD7220", tag, owner, clock, "upd7220", __FILE__),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_mask(0),
m_pitch(0),
m_ead(0),
@ -756,16 +757,6 @@ void upd7220_device::device_start()
m_out_vsync_func.resolve(m_out_vsync_cb, *this);
m_out_blank_func.resolve(m_out_blank_cb, *this);
// find screen
m_screen = machine().device<screen_device>(m_screen_tag);
if (m_screen == NULL)
{
m_screen = owner()->subdevice<screen_device>(m_screen_tag);
}
assert(m_screen);
// register for state saving
save_item(NAME(m_ra));
save_item(NAME(m_sr));

View File

@ -75,8 +75,6 @@ typedef void (*upd7220_draw_text_line)(device_t *device, bitmap_rgb32 &bitmap, U
struct upd7220_interface
{
const char *m_screen_tag;
upd7220_display_pixels_func m_display_cb;
upd7220_draw_text_line m_draw_text_cb;
@ -90,6 +88,7 @@ struct upd7220_interface
class upd7220_device : public device_t,
public device_memory_interface,
public device_video_interface,
public upd7220_interface
{
public:
@ -159,8 +158,6 @@ private:
devcb_resolved_write_line m_out_vsync_func;
devcb_resolved_write_line m_out_blank_func;
screen_device *m_screen;
UINT16 m_mask; // mask register
UINT8 m_pitch; // number of word addresses in display memory in the horizontal direction
UINT32 m_ead; // execute word address

View File

@ -65,6 +65,7 @@ const device_type V9958 = &device_creator<v9958_device>;
v99x8_device::v99x8_device(const machine_config &mconfig, device_type type, const char *name, const char *shortname, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_space_config("vram", ENDIANNESS_BIG, 8, 18),
m_model(0),
m_offset_x(0),
@ -90,8 +91,6 @@ v99x8_device::v99x8_device(const machine_config &mconfig, device_type type, cons
m_mx_delta(0),
m_my_delta(0),
m_button_state(0),
m_screen(NULL),
m_screen_name(NULL),
m_vdp_ops_count(0),
m_vdp_engine(NULL)
{
@ -568,11 +567,6 @@ void v99x8_device::register_w(UINT8 data)
m_cont_reg[17] = (m_cont_reg[17] + 1) & 0x3f;
}
void v99x8_device::static_set_screen(device_t &device, const char *screen_name)
{
downcast<v99x8_device &>(device).m_screen_name = screen_name;
}
void v99x8_device::static_set_vram_size(device_t &device, UINT32 vram_size)
{
downcast<v99x8_device &>(device).m_vram_size = vram_size;
@ -586,12 +580,6 @@ void v99x8_device::static_set_vram_size(device_t &device, UINT32 vram_size)
void v99x8_device::device_start()
{
// find our devices
m_screen = machine().device<screen_device>(m_screen_name);
assert(m_screen != NULL);
if (!m_screen->started())
throw device_missing_dependencies();
m_int_callback.resolve_safe();
m_vdp_ops_count = 1;
m_vdp_engine = NULL;

View File

@ -17,11 +17,11 @@
#define MCFG_V9938_ADD(_tag, _screen, _vramsize) \
MCFG_DEVICE_ADD(_tag, V9938, 0) \
v9938_device::static_set_screen(*device, _screen); \
MCFG_VIDEO_SET_SCREEN(_screen) \
v9938_device::static_set_vram_size(*device, _vramsize);
#define MCFG_V9958_ADD(_tag, _screen, _vramsize) \
MCFG_DEVICE_ADD(_tag, V9958, 0) \
v9938_device::static_set_screen(*device, _screen); \
MCFG_VIDEO_SET_SCREEN(_screen) \
v9938_device::static_set_vram_size(*device, _vramsize);
#define MCFG_V99X8_INTERRUPT_CALLBACK(_irq) \
@ -55,7 +55,9 @@ extern const device_type V9958;
// ======================> v99x8_device
class v99x8_device : public device_t, public device_memory_interface
class v99x8_device : public device_t,
public device_memory_interface,
public device_video_interface
{
friend PALETTE_INIT( v9958 );
@ -85,7 +87,6 @@ public:
void command_w(UINT8 data);
void register_w(UINT8 data);
static void static_set_screen(device_t &device, const char *screen_name);
static void static_set_vram_size(device_t &device, UINT32 vram_size);
/* RESET pin */
@ -204,9 +205,6 @@ private:
// palette
UINT16 m_pal_ind16[16];
UINT16 m_pal_ind256[256];
// render screen
screen_device *m_screen;
const char *m_screen_name;
// render bitmap
bitmap_ind16 m_bitmap;
// Command unit

View File

@ -364,7 +364,6 @@ static const ay8910_interface ay8910_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 */
@ -405,7 +404,7 @@ static MACHINE_CONFIG_START( 4roses, _4roses_state )
MCFG_PALETTE_INIT_OVERRIDE(_4roses_state,funworld)
MCFG_VIDEO_START_OVERRIDE(_4roses_state,funworld)
// MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/8, mc6845_intf) /* 2MHz, guess */
// MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK/8, mc6845_intf) /* 2MHz, guess */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")

View File

@ -997,7 +997,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 */
@ -1094,7 +1093,7 @@ static MACHINE_CONFIG_START( fclown, _5clown_state )
MCFG_PALETTE_LENGTH(256)
MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/16, mc6845_intf) /* guess */
MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK/16, mc6845_intf) /* guess */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")

View File

@ -628,7 +628,6 @@ ADDRESS_MAP_END
static H63484_INTERFACE( adp_h63484_intf )
{
"screen",
acrtc_display_pixels
};

View File

@ -601,7 +601,6 @@ void airbustr_state::machine_reset()
static const kaneko_pandora_interface airbustr_pandora_config =
{
"screen", /* screen tag */
1, /* gfx_region */
0, 0 /* x_offs, y_offs */
};

View File

@ -211,7 +211,6 @@ static const ay8910_interface ay8910_config =
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 */
@ -400,7 +399,7 @@ static MACHINE_CONFIG_START( yumefuda, albazg_state )
MCFG_SCREEN_VISIBLE_AREA(0, 32*8-1, 0, 32*8-1)
MCFG_SCREEN_UPDATE_DRIVER(albazg_state, screen_update_yumefuda)
MCFG_MC6845_ADD("crtc", H46505, MASTER_CLOCK/16, mc6845_intf) /* hand tuned to get ~60 fps */
MCFG_MC6845_ADD("crtc", H46505, "screen", MASTER_CLOCK/16, mc6845_intf) /* hand tuned to get ~60 fps */
MCFG_GFXDECODE( yumefuda )
MCFG_PALETTE_LENGTH(0x80)

View File

@ -795,7 +795,6 @@ GFXDECODE_END
static MC6845_INTERFACE( mc6845_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@ -878,7 +877,7 @@ static MACHINE_CONFIG_START( amaticmg, amaticmg_state )
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
MCFG_SCREEN_UPDATE_DRIVER(amaticmg_state, screen_update_amaticmg)
MCFG_MC6845_ADD("crtc", MC6845, CRTC_CLOCK, mc6845_intf)
MCFG_MC6845_ADD("crtc", MC6845, "screen", CRTC_CLOCK, mc6845_intf)
MCFG_GFXDECODE(amaticmg)

View File

@ -1565,7 +1565,6 @@ static MC6845_INTERFACE( mc6845_intf )
/* in fact is a mc6845 driving 4 pixels by memory address.
that's why the big horizontal parameters */
"screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@ -1707,7 +1706,7 @@ static MACHINE_CONFIG_START( aristmk4, aristmk4_state )
MCFG_I8255A_ADD( "ppi8255_0", ppi8255_intf )
MCFG_VIA6522_ADD("via6522_0", 0, via_interface) /* 1 MHz.(only 1 or 2 MHz.are valid) */
MCFG_PIA6821_ADD("pia6821_0", aristmk4_pia1_intf)
MCFG_MC6845_ADD("crtc", C6545_1, MAIN_CLOCK/8, mc6845_intf) // TODO: type is unknown
MCFG_MC6845_ADD("crtc", C6545_1, "screen", MAIN_CLOCK/8, mc6845_intf) // TODO: type is unknown
MCFG_MC146818_ADD("rtc", MC146818_IGNORE_CENTURY)
MCFG_SPEAKER_STANDARD_MONO("mono")

View File

@ -787,7 +787,6 @@ static const msm5205_interface msm5205_config =
static const tc0100scn_interface asuka_tc0100scn_intf =
{
"screen",
1, 2, /* gfxnum, txnum */
0, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */
@ -797,7 +796,6 @@ static const tc0100scn_interface asuka_tc0100scn_intf =
static const tc0100scn_interface cadash_tc0100scn_intf =
{
"screen",
1, 2, /* gfxnum, txnum */
1, 0, /* x_offset, y_offset */
0, 0, /* flip_xoff, flip_yoff */

View File

@ -849,7 +849,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 */
@ -909,7 +908,7 @@ static MACHINE_CONFIG_START( avt, avt_state )
MCFG_PALETTE_LENGTH(8*16)
MCFG_MC6845_ADD("crtc", MC6845, CRTC_CLOCK, mc6845_intf) /* guess */
MCFG_MC6845_ADD("crtc", MC6845, "screen", CRTC_CLOCK, mc6845_intf) /* guess */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")

View File

@ -456,7 +456,6 @@ static int backfire_bank_callback( int bank )
static const deco16ic_interface backfire_deco16ic_tilegen1_intf =
{
"lscreen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0x00, 0x40, /* color base */
@ -468,7 +467,6 @@ static const deco16ic_interface backfire_deco16ic_tilegen1_intf =
static const deco16ic_interface backfire_deco16ic_tilegen2_intf =
{
"lscreen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0x10, 0x50, /* color base */
@ -525,7 +523,9 @@ static MACHINE_CONFIG_START( backfire, backfire_state )
MCFG_DECO16IC_ADD("tilegen1", backfire_deco16ic_tilegen1_intf)
MCFG_DECO16IC_SET_SCREEN("lscreen")
MCFG_DECO16IC_ADD("tilegen2", backfire_deco16ic_tilegen2_intf)
MCFG_DECO16IC_SET_SCREEN("lscreen")
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
decospr_device::set_gfx_region(*device, 4);

View File

@ -374,7 +374,6 @@ static const k056832_interface bishi_k056832_intf =
static const k054338_interface bishi_k054338_intf =
{
"screen",
0,
"none"
};

View File

@ -742,7 +742,6 @@ static const pia6821_interface megadpkr_pia1_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 */
@ -815,7 +814,7 @@ static MACHINE_CONFIG_START( megadpkr, blitz_state )
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
MCFG_SCREEN_UPDATE_DRIVER(blitz_state, screen_update_megadpkr)
MCFG_MC6845_ADD("crtc", MC6845, CPU_CLOCK, mc6845_intf)
MCFG_MC6845_ADD("crtc", MC6845, "screen", CPU_CLOCK, mc6845_intf)
MCFG_GFXDECODE(megadpkr)
MCFG_PALETTE_LENGTH(256)

View File

@ -1667,7 +1667,6 @@ WRITE_LINE_MEMBER(blitz68k_state::crtc_vsync_irq5)
static MC6845_INTERFACE( mc6845_intf_irq1 )
{
"screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */ /* Horizontal Display programmed to 160 characters */
NULL, /* before pixel update callback */
@ -1682,7 +1681,6 @@ static MC6845_INTERFACE( mc6845_intf_irq1 )
static MC6845_INTERFACE( mc6845_intf_irq3 )
{
"screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */ /* Horizontal Display programmed to 160 characters */
NULL, /* before pixel update callback */
@ -1697,7 +1695,6 @@ static MC6845_INTERFACE( mc6845_intf_irq3 )
static MC6845_INTERFACE( mc6845_intf_irq5 )
{
"screen", /* screen we are acting on */
false, /* show border area */
4, /* number of pixels per video memory address */ /* Horizontal Display programmed to 160 characters */
NULL, /* before pixel update callback */
@ -1805,7 +1802,7 @@ static MACHINE_CONFIG_START( cjffruit, blitz68k_state )
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-8-1)
MCFG_SCREEN_UPDATE_DRIVER(blitz68k_state, screen_update_blitz68k)
MCFG_MC6845_ADD("crtc", R6545_1, XTAL_22_1184MHz/8, mc6845_intf_irq1)
MCFG_MC6845_ADD("crtc", R6545_1, "screen", XTAL_22_1184MHz/8, mc6845_intf_irq1)
MCFG_PALETTE_LENGTH(0x100)
@ -1837,7 +1834,7 @@ static MACHINE_CONFIG_START( bankrob, blitz68k_state )
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0+4, 256-1-4)
MCFG_SCREEN_UPDATE_DRIVER(blitz68k_state, screen_update_blitz68k)
MCFG_MC6845_ADD("crtc", H46505, XTAL_11_0592MHz/4, mc6845_intf_irq3)
MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_11_0592MHz/4, mc6845_intf_irq3)
MCFG_PALETTE_LENGTH(0x100)
@ -1867,7 +1864,7 @@ static MACHINE_CONFIG_START( bankroba, blitz68k_state )
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0+7, 256-1)
MCFG_SCREEN_UPDATE_DRIVER(blitz68k_state, screen_update_blitz68k)
MCFG_MC6845_ADD("crtc", H46505, XTAL_11_0592MHz/4, mc6845_intf_irq5)
MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_11_0592MHz/4, mc6845_intf_irq5)
MCFG_PALETTE_LENGTH(0x100)
@ -1896,7 +1893,7 @@ static MACHINE_CONFIG_START( deucesw2, blitz68k_state )
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
MCFG_SCREEN_UPDATE_DRIVER(blitz68k_state, screen_update_blitz68k)
MCFG_MC6845_ADD("crtc", R6545_1, XTAL_22_1184MHz/8, mc6845_intf_irq3)
MCFG_MC6845_ADD("crtc", R6545_1, "screen", XTAL_22_1184MHz/8, mc6845_intf_irq3)
MCFG_PALETTE_LENGTH(0x100)
@ -1927,7 +1924,7 @@ static MACHINE_CONFIG_START( dualgame, blitz68k_state )
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0+4, 256-1-4)
MCFG_SCREEN_UPDATE_DRIVER(blitz68k_state, screen_update_blitz68k)
MCFG_MC6845_ADD("crtc", H46505, XTAL_11_0592MHz/4, mc6845_intf_irq3)
MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_11_0592MHz/4, mc6845_intf_irq3)
MCFG_PALETTE_LENGTH(0x100)
@ -1956,7 +1953,7 @@ static MACHINE_CONFIG_START( hermit, blitz68k_state )
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0+4, 256-1-4)
MCFG_SCREEN_UPDATE_DRIVER(blitz68k_state, screen_update_blitz68k)
MCFG_MC6845_ADD("crtc", H46505, XTAL_22_1184MHz/8, mc6845_intf_irq1)
MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_22_1184MHz/8, mc6845_intf_irq1)
MCFG_PALETTE_LENGTH(0x100)
@ -1990,7 +1987,7 @@ static MACHINE_CONFIG_START( maxidbl, blitz68k_state )
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
MCFG_SCREEN_UPDATE_DRIVER(blitz68k_state, screen_update_blitz68k_noblit)
MCFG_MC6845_ADD("crtc", H46505, XTAL_11_0592MHz/4, mc6845_intf_irq3)
MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL_11_0592MHz/4, mc6845_intf_irq3)
MCFG_PALETTE_LENGTH(0x100)
MCFG_RAMDAC_ADD("ramdac", ramdac_intf, ramdac_map)

View File

@ -453,7 +453,6 @@ WRITE16_MEMBER( bloodbro_state::layer_scroll_w )
SEIBU_CRTC_INTERFACE(crtc_intf)
{
"screen",
DEVCB_DRIVER_MEMBER16(bloodbro_state, layer_en_w),
DEVCB_DRIVER_MEMBER16(bloodbro_state, layer_scroll_w),
};

View File

@ -311,14 +311,8 @@ static int boogwing_bank_callback2( const int bank )
return offset;
}
static const decocomn_interface boogwing_decocomn_intf =
{
"screen",
};
static const deco16ic_interface boogwing_deco16ic_tilegen1_intf =
{
"screen",
0, 1,
0x0f, 0x1f, /* trans masks (pf2 has 5bpp graphics) */
0, 0, /* color base (pf2 is non default) */
@ -330,7 +324,6 @@ static const deco16ic_interface boogwing_deco16ic_tilegen1_intf =
static const deco16ic_interface boogwing_deco16ic_tilegen2_intf =
{
"screen",
0, 1,
0x0f, 0x0f,
0, 16,
@ -366,7 +359,7 @@ static MACHINE_CONFIG_START( boogwing, boogwing_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram2")
MCFG_DECOCOMN_ADD("deco_common", boogwing_decocomn_intf)
MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", boogwing_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", boogwing_deco16ic_tilegen2_intf)

View File

@ -310,7 +310,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 */
@ -345,7 +344,7 @@ static MACHINE_CONFIG_START( buster, buster_state )
MCFG_SCREEN_SIZE(256, 256)
MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 16, 256-16-1)
MCFG_SCREEN_UPDATE_DRIVER(buster_state, screen_update_buster)
MCFG_MC6845_ADD("crtc", MC6845, XTAL_3_579545MHz/4, mc6845_intf) //unknown clock / type
MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_3_579545MHz/4, mc6845_intf) //unknown clock / type
MCFG_GFXDECODE(buster)
MCFG_PALETTE_LENGTH(8)

View File

@ -109,7 +109,6 @@ WRITE_LINE_MEMBER(by133_state::vdp_interrupt)
static TMS9928A_INTERFACE(byvid_tms9928a_interface)
{
"screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(by133_state,vdp_interrupt)
};

View File

@ -2716,7 +2716,6 @@ static const ay8910_interface sys906_ay8912_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 */
@ -2757,7 +2756,7 @@ static MACHINE_CONFIG_START( sys903, calomega_state )
MCFG_PALETTE_LENGTH(1024)
MCFG_MC6845_ADD("crtc", MC6845, CPU_CLOCK, mc6845_intf) /* 6845 @ CPU clock */
MCFG_MC6845_ADD("crtc", MC6845, "screen", CPU_CLOCK, mc6845_intf) /* 6845 @ CPU clock */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")

View File

@ -348,7 +348,6 @@ static void generate_interrupt( running_machine &machine, int state )
static const struct tms34061_interface tms34061intf =
{
"screen", /* the screen we are acting on */
8, /* VRAM address is (row << rowshift) | col */
0x10000, /* size of video RAM */
generate_interrupt /* interrupt gen callback */

View File

@ -313,7 +313,6 @@ void carrera_state::palette_init()
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 */
@ -342,7 +341,7 @@ static MACHINE_CONFIG_START( carrera, carrera_state )
MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
MCFG_SCREEN_UPDATE_DRIVER(carrera_state, screen_update_carrera)
MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK / 16, mc6845_intf)
MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK / 16, mc6845_intf)
MCFG_GFXDECODE(carrera)
MCFG_PALETTE_LENGTH(32)

View File

@ -265,7 +265,6 @@ static int twocrude_bank_callback( const int bank )
static const deco16ic_interface twocrude_deco16ic_tilegen1_intf =
{
"screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0x00, 0x20, /* color base (default values) */
@ -277,7 +276,6 @@ static const deco16ic_interface twocrude_deco16ic_tilegen1_intf =
static const deco16ic_interface twocrude_deco16ic_tilegen2_intf =
{
"screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0x30, 0x40, /* color base (default values) */

View File

@ -295,7 +295,6 @@ void cham24_state::ppu_irq(int *ppu_regs)
static const ppu2c0x_interface ppu_interface =
{
"maincpu",
"screen",
0, /* gfxlayout num */
0, /* color base */
PPU_MIRROR_NONE /* mirroring */

View File

@ -448,7 +448,6 @@ void chance32_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 */
@ -480,7 +479,7 @@ static MACHINE_CONFIG_START( chance32, chance32_state )
MCFG_SCREEN_VISIBLE_AREA(0, 35*16-1, 0, 29*8-1)
MCFG_SCREEN_UPDATE_DRIVER(chance32_state, screen_update_chance32)
MCFG_MC6845_ADD("crtc", H46505, 12000000/16, mc6845_intf) /* 52.786 Hz (similar to Major Poker) */
MCFG_MC6845_ADD("crtc", H46505, "screen", 12000000/16, mc6845_intf) /* 52.786 Hz (similar to Major Poker) */
MCFG_GFXDECODE(chance32)
MCFG_PALETTE_LENGTH(0x800)

View File

@ -677,7 +677,6 @@ INPUT_PORTS_END
static TMS9928A_INTERFACE(cliffhgr_tms9928a_interface)
{
"screen",
0x4000,
DEVCB_DRIVER_LINE_MEMBER(cliffhgr_state,vdp_interrupt)
};

View File

@ -813,14 +813,8 @@ static int mutantf_2_bank_callback( const int bank )
return ((bank >> 5) & 0x1) << 14;
}
static const decocomn_interface cninja_decocomn_intf =
{
"screen",
};
static const deco16ic_interface cninja_deco16ic_tilegen1_intf =
{
"screen",
1, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base */
@ -832,7 +826,6 @@ static const deco16ic_interface cninja_deco16ic_tilegen1_intf =
static const deco16ic_interface cninja_deco16ic_tilegen2_intf =
{
"screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 48, /* color base */
@ -846,7 +839,6 @@ static const deco16ic_interface cninja_deco16ic_tilegen2_intf =
static const deco16ic_interface edrandy_deco16ic_tilegen1_intf =
{
"screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base */
@ -858,7 +850,6 @@ static const deco16ic_interface edrandy_deco16ic_tilegen1_intf =
static const deco16ic_interface edrandy_deco16ic_tilegen2_intf =
{
"screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 48, /* color base */
@ -871,7 +862,6 @@ static const deco16ic_interface edrandy_deco16ic_tilegen2_intf =
static const deco16ic_interface robocop2_deco16ic_tilegen1_intf =
{
"screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base */
@ -883,7 +873,6 @@ static const deco16ic_interface robocop2_deco16ic_tilegen1_intf =
static const deco16ic_interface robocop2_deco16ic_tilegen2_intf =
{
"screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 48, /* color base */
@ -896,7 +885,6 @@ static const deco16ic_interface robocop2_deco16ic_tilegen2_intf =
static const deco16ic_interface mutantf_deco16ic_tilegen1_intf =
{
"screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 0x30, /* color base */
@ -908,7 +896,6 @@ static const deco16ic_interface mutantf_deco16ic_tilegen1_intf =
static const deco16ic_interface mutantf_deco16ic_tilegen2_intf =
{
"screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0x20, 0x40, /* color base */
@ -972,7 +959,7 @@ static MACHINE_CONFIG_START( cninja, cninja_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
MCFG_DECOCOMN_ADD("deco_common", cninja_decocomn_intf)
MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", cninja_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", cninja_deco16ic_tilegen2_intf)
@ -1031,7 +1018,7 @@ static MACHINE_CONFIG_START( stoneage, cninja_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
MCFG_DECOCOMN_ADD("deco_common", cninja_decocomn_intf)
MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", cninja_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", cninja_deco16ic_tilegen2_intf)
@ -1085,7 +1072,7 @@ static MACHINE_CONFIG_START( cninjabl, cninja_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
MCFG_DECOCOMN_ADD("deco_common", cninja_decocomn_intf)
MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", cninja_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", cninja_deco16ic_tilegen2_intf)
@ -1128,7 +1115,7 @@ static MACHINE_CONFIG_START( edrandy, cninja_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
MCFG_DECOCOMN_ADD("deco_common", cninja_decocomn_intf)
MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", edrandy_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", edrandy_deco16ic_tilegen2_intf)
@ -1184,7 +1171,7 @@ static MACHINE_CONFIG_START( robocop2, cninja_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
MCFG_DECOCOMN_ADD("deco_common", cninja_decocomn_intf)
MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", robocop2_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", robocop2_deco16ic_tilegen2_intf)
@ -1246,7 +1233,7 @@ static MACHINE_CONFIG_START( mutantf, cninja_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram2")
MCFG_DECOCOMN_ADD("deco_common", cninja_decocomn_intf)
MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", mutantf_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", mutantf_deco16ic_tilegen2_intf)

View File

@ -996,7 +996,6 @@ static const ay8910_interface ay8912_interface =
static MC6845_INTERFACE( h46505_intf )
{
"screen", /* screen we are acting on */
false, /* show border area */
8, /* number of pixels per video memory address */
NULL, /* before pixel update callback */
@ -1031,7 +1030,7 @@ static MACHINE_CONFIG_START( coinmstr, coinmstr_state )
MCFG_PALETTE_LENGTH(46*32*4)
MCFG_MC6845_ADD("crtc", H46505, 14000000 / 16, h46505_intf)
MCFG_MC6845_ADD("crtc", H46505, "screen", 14000000 / 16, h46505_intf)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")

View File

@ -222,7 +222,6 @@ GFXDECODE_END
static const deco16ic_interface darkseal_deco16ic_tilegen1_intf =
{
"screen",
0, 3, // both these tilemaps need to be twice the y size of usual!
0x0f, 0x0f, /* trans masks (default values) */
0x00, 0x00, /* color base */
@ -235,7 +234,6 @@ static const deco16ic_interface darkseal_deco16ic_tilegen1_intf =
static const deco16ic_interface darkseal_deco16ic_tilegen2_intf =
{
"screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0x00, 0x00, /* color base */

View File

@ -450,11 +450,6 @@ WRITE8_MEMBER(dassault_state::sound_bankswitch_w)
/**********************************************************************************/
static const decocomn_interface dassault_decocomn_intf =
{
"screen",
};
static int dassault_bank_callback( const int bank )
{
return ((bank >> 4) & 0xf) << 12;
@ -462,7 +457,6 @@ static int dassault_bank_callback( const int bank )
static const deco16ic_interface dassault_deco16ic_tilegen1_intf =
{
"screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base (default values) */
@ -474,7 +468,6 @@ static const deco16ic_interface dassault_deco16ic_tilegen1_intf =
static const deco16ic_interface dassault_deco16ic_tilegen2_intf =
{
"screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base (default values) */
@ -517,7 +510,7 @@ static MACHINE_CONFIG_START( dassault, dassault_state )
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram2")
MCFG_DECOCOMN_ADD("deco_common", dassault_decocomn_intf)
MCFG_DECOCOMN_ADD("deco_common")
MCFG_DECO16IC_ADD("tilegen1", dassault_deco16ic_tilegen1_intf)
MCFG_DECO16IC_ADD("tilegen2", dassault_deco16ic_tilegen2_intf)

View File

@ -346,7 +346,6 @@ static int dblewing_bank_callback( const int bank )
static const deco16ic_interface dblewing_deco16ic_tilegen1_intf =
{
"screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base (default values) */

View File

@ -300,7 +300,6 @@ static const k056832_interface dbz_k056832_intf =
static const k053247_interface dbz_k053246_intf =
{
"screen",
"gfx2", 3,
NORMAL_PLANE_ORDER,
-52, 16,
@ -322,7 +321,6 @@ WRITE_LINE_MEMBER(dbz_state::dbz_irq2_ack_w)
static const k053252_interface dbz_k053252_intf =
{
"screen",
DEVCB_NULL,
DEVCB_NULL,
DEVCB_DRIVER_LINE_MEMBER(dbz_state,dbz_irq2_ack_w),

View File

@ -258,7 +258,6 @@ WRITE16_MEMBER( dcon_state::layer_scroll_w )
SEIBU_CRTC_INTERFACE(crtc_intf)
{
"screen",
DEVCB_DRIVER_MEMBER16(dcon_state, layer_en_w),
DEVCB_DRIVER_MEMBER16(dcon_state, layer_scroll_w),
};

View File

@ -326,7 +326,6 @@ static int deco156_bank_callback(const int bank)
static const deco16ic_interface deco156_deco16ic_tilegen1_intf =
{
"screen",
0, 1,
0x0f, 0x0f, /* trans masks (default values) */
0, 16, /* color base (default values) */

Some files were not shown because too many files have changed in this diff Show More