moved some legacy stuff from screen.h to scrlegcy.h (nw)

This commit is contained in:
Oliver Stöneberg 2013-07-16 12:23:58 +00:00
parent e7efd38115
commit 2dff0feabf
54 changed files with 133 additions and 18 deletions

1
.gitattributes vendored
View File

@ -1530,6 +1530,7 @@ src/emu/schedule.c svneol=native#text/plain
src/emu/schedule.h svneol=native#text/plain
src/emu/screen.c svneol=native#text/plain
src/emu/screen.h svneol=native#text/plain
src/emu/scrlegcy.h svneol=native#text/plain
src/emu/softlist.c svneol=native#text/plain
src/emu/softlist.h svneol=native#text/plain
src/emu/sound.c svneol=native#text/plain

View File

@ -210,7 +210,7 @@ void screen_device::static_set_default_position(device_t &device, double xscale,
//-------------------------------------------------
// static_set_screen_update - set the legacy
// static_set_screen_update - set the legacy(?)
// screen update callback in the device
// configuration
//-------------------------------------------------

View File

@ -356,12 +356,9 @@ typedef device_type_iterator<&device_creator<screen_device>, screen_device> scre
#define SCREEN_UPDATE_NAME(name) screen_update_##name
#define SCREEN_UPDATE_IND16(name) UINT32 SCREEN_UPDATE_NAME(name)(device_t *, screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
#define SCREEN_UPDATE_RGB32(name) UINT32 SCREEN_UPDATE_NAME(name)(device_t *, screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
#define SCREEN_UPDATE16_CALL(name) SCREEN_UPDATE_NAME(name)(NULL, screen, bitmap, cliprect)
#define SCREEN_UPDATE32_CALL(name) SCREEN_UPDATE_NAME(name)(NULL, screen, bitmap, cliprect)
#define SCREEN_VBLANK_NAME(name) screen_vblank_##name
#define SCREEN_VBLANK(name) void SCREEN_VBLANK_NAME(name)(device_t *, screen_device &screen, bool vblank_on)
#define SCREEN_VBLANK_CALL(name) SCREEN_VBLANK_NAME(name)(NULL, screen, vblank_on)
#define MCFG_SCREEN_ADD(_tag, _type) \
MCFG_DEVICE_ADD(_tag, SCREEN, 0) \
@ -384,16 +381,12 @@ typedef device_type_iterator<&device_creator<screen_device>, screen_device> scre
screen_device::static_set_visarea(*device, _minx, _maxx, _miny, _maxy);
#define MCFG_SCREEN_DEFAULT_POSITION(_xscale, _xoffs, _yscale, _yoffs) \
screen_device::static_set_default_position(*device, _xscale, _xoffs, _yscale, _yoffs);
#define MCFG_SCREEN_UPDATE_STATIC(_func) \
screen_device::static_set_screen_update(*device, screen_update_delegate_smart(&screen_update_##_func, "screen_update_" #_func));
#define MCFG_SCREEN_UPDATE_DRIVER(_class, _method) \
screen_device::static_set_screen_update(*device, screen_update_delegate_smart(&_class::_method, #_class "::" #_method, NULL));
#define MCFG_SCREEN_UPDATE_DEVICE(_device, _class, _method) \
screen_device::static_set_screen_update(*device, screen_update_delegate_smart(&_class::_method, #_class "::" #_method, _device));
#define MCFG_SCREEN_VBLANK_NONE() \
screen_device::static_set_screen_vblank(*device, screen_vblank_delegate());
#define MCFG_SCREEN_VBLANK_STATIC(_func) \
screen_device::static_set_screen_vblank(*device, screen_vblank_delegate(&screen_vblank_##_func, "screen_vblank_" #_func));
#define MCFG_SCREEN_VBLANK_DRIVER(_class, _method) \
screen_device::static_set_screen_vblank(*device, screen_vblank_delegate(&_class::_method, #_class "::" #_method, NULL, (_class *)0));
#define MCFG_SCREEN_VBLANK_DEVICE(_device, _class, _method) \
@ -411,16 +404,6 @@ typedef device_type_iterator<&device_creator<screen_device>, screen_device> scre
// function type
//-------------------------------------------------
inline screen_update_ind16_delegate screen_update_delegate_smart(UINT32 (*callback)(device_t *, screen_device &, bitmap_ind16 &, const rectangle &), const char *name)
{
return screen_update_ind16_delegate(callback, name);
}
inline screen_update_rgb32_delegate screen_update_delegate_smart(UINT32 (*callback)(device_t *, screen_device &, bitmap_rgb32 &, const rectangle &), const char *name)
{
return screen_update_rgb32_delegate(callback, name);
}
template<class _FunctionClass>
inline screen_update_ind16_delegate screen_update_delegate_smart(UINT32 (_FunctionClass::*callback)(screen_device &, bitmap_ind16 &, const rectangle &), const char *name, const char *devname)
{

81
src/emu/scrlegcy.h Normal file
View File

@ -0,0 +1,81 @@
/***************************************************************************
scrlegcy.h
Legacy screen helpers.
****************************************************************************
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 __SCRLEGCY_H__
#define __SCRLEGCY_H__
//**************************************************************************
// SCREEN DEVICE CONFIGURATION MACROS
//**************************************************************************
#define SCREEN_UPDATE16_CALL(name) SCREEN_UPDATE_NAME(name)(NULL, screen, bitmap, cliprect)
#define SCREEN_UPDATE32_CALL(name) SCREEN_UPDATE_NAME(name)(NULL, screen, bitmap, cliprect)
#define SCREEN_VBLANK_CALL(name) SCREEN_VBLANK_NAME(name)(NULL, screen, vblank_on)
#define MCFG_SCREEN_UPDATE_STATIC(_func) \
screen_device::static_set_screen_update(*device, screen_update_delegate_smart(&screen_update_##_func, "screen_update_" #_func));
#define MCFG_SCREEN_VBLANK_STATIC(_func) \
screen_device::static_set_screen_vblank(*device, screen_vblank_delegate(&screen_vblank_##_func, "screen_vblank_" #_func));
//**************************************************************************
// INLINE HELPERS
//**************************************************************************
//-------------------------------------------------
// screen_update_delegate_smart - collection of
// inline helpers which create the appropriate
// screen_update_delegate based on the input
// function type
//-------------------------------------------------
inline screen_update_ind16_delegate screen_update_delegate_smart(UINT32 (*callback)(device_t *, screen_device &, bitmap_ind16 &, const rectangle &), const char *name)
{
return screen_update_ind16_delegate(callback, name);
}
inline screen_update_rgb32_delegate screen_update_delegate_smart(UINT32 (*callback)(device_t *, screen_device &, bitmap_rgb32 &, const rectangle &), const char *name)
{
return screen_update_rgb32_delegate(callback, name);
}
#endif /* __SCRLEGCY_H__ */

View File

@ -80,6 +80,7 @@
#include "video/mc6845.h"
#include "video/cgapal.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
#define VERBOSE_CGA 0 /* CGA (Color Graphics Adapter) */

View File

@ -30,6 +30,7 @@
#include "includes/artmagic.h"
#include "sound/okim6295.h"
#include "machine/nvram.h"
#include "scrlegcy.h"
#define MASTER_CLOCK_40MHz (XTAL_40MHz)

View File

@ -192,6 +192,7 @@ There is not a rev 03 known or dumped. An Asteroids rev 03 is not mentioned in a
#include "sound/discrete.h"
#include "sound/pokey.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
#include "astdelux.lh"

View File

@ -20,6 +20,7 @@
#include "includes/aztarac.h"
#include "sound/ay8910.h"
#include "machine/nvram.h"
#include "scrlegcy.h"

View File

@ -22,6 +22,7 @@
#include "sound/pokey.h"
#include "video/gtia.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
class bartop52_state : public driver_device

View File

@ -101,6 +101,7 @@ Optional (on expansion card) (Viper)
#include "machine/nvram.h"
#include "machine/bfm_comn.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
#include "sc1_vfd.lh"
#include "sc1_vid.lh"

View File

@ -172,6 +172,7 @@ Adder hardware:
#include "drwho.lh"
#include "machine/bfm_comn.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
class bfm_sc2_state : public driver_device

View File

@ -27,6 +27,7 @@
#include "cpu/m6502/m6502.h"
#include "includes/bsktball.h"
#include "sound/discrete.h"
#include "scrlegcy.h"
/*************************************

View File

@ -8,6 +8,7 @@
#include "emu.h"
#include "includes/btoads.h"
#include "scrlegcy.h"
#define CPU_CLOCK XTAL_64MHz

View File

@ -227,6 +227,7 @@
#include "includes/bwidow.h"
#include "drivlgcy.h"
#include "scrlegcy.h"

View File

@ -212,6 +212,7 @@
#include "includes/bzone.h"
#include "sound/pokey.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
#include "bzone.lh"
#include "redbaron.lh"

View File

@ -23,6 +23,7 @@
#include "machine/z80ctc.h"
#include "includes/cchasm.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
#define CCHASM_68K_CLOCK (XTAL_8MHz)

View File

@ -31,6 +31,7 @@
#include "sound/dac.h"
#include "machine/nvram.h"
#include "includes/coolpool.h"
#include "scrlegcy.h"

View File

@ -67,6 +67,7 @@
#include "sound/2151intf.h"
#include "machine/nvram.h"
#include "includes/exterm.h"
#include "scrlegcy.h"

View File

@ -233,6 +233,7 @@ Hang Pilot (uses an unknown but similar video board) 12W
#include "video/gticlub.h"
#include "video/k001604.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
#include "rendlay.h"

View File

@ -329,6 +329,7 @@ Notes:
#include "sound/dac.h"
#include "includes/slapstic.h"
#include "includes/harddriv.h"
#include "scrlegcy.h"
/*************************************

View File

@ -111,6 +111,7 @@ Thanks to Tony Friery and JPeMU for I/O routines and documentation.
#include "machine/steppers.h"
#include "machine/roc10937.h"
#include "machine/i8255.h"
#include "scrlegcy.h"
/*************************************
*

View File

@ -143,6 +143,7 @@ Pin #11(+) | | R |
#include "includes/lethalj.h"
#include "machine/ticket.h"
#include "sound/okim6295.h"
#include "scrlegcy.h"
#define MASTER_CLOCK XTAL_40MHz

View File

@ -19,6 +19,7 @@
#include "machine/6821pia.h"
#include "video/gtia.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
#include "maxaflex.lh"

View File

@ -55,6 +55,7 @@ Bugs:
#include "includes/megadriv.h"
#include "includes/segamsys.h"
#include "scrlegcy.h"
#define MASTER_CLOCK 53693100

View File

@ -78,6 +78,7 @@ Sonic Hedgehog 2 171-6215A 837-6963-62 610-0239-62 MPR
#include "imagedev/cartslot.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
#define MASTER_CLOCK 53693100

View File

@ -193,6 +193,7 @@
#include "machine/nvram.h"
#include "includes/mhavoc.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
READ8_MEMBER(mhavoc_state::quad_pokeyn_r)
{

View File

@ -30,6 +30,7 @@
#include "sound/2151intf.h"
#include "machine/nvram.h"
#include "includes/micro3d.h"
#include "scrlegcy.h"
/*************************************

View File

@ -24,6 +24,7 @@
#include "cpu/adsp2100/adsp2100.h"
#include "machine/nvram.h"
#include "includes/midtunit.h"
#include "scrlegcy.h"
#define CPU_CLOCK (50000000)

View File

@ -91,6 +91,7 @@ Notes:
#include "machine/nvram.h"
#include "includes/midtunit.h"
#include "includes/midwunit.h"
#include "scrlegcy.h"
#define PIXEL_CLOCK (8000000)

View File

@ -86,6 +86,7 @@ There's a separate sound board also, but it wasn't available so is not documente
#include "machine/nvram.h"
#include "includes/midtunit.h"
#include "includes/midxunit.h"
#include "scrlegcy.h"
#define PIXEL_CLOCK (8000000)

View File

@ -116,6 +116,7 @@ Notes:
#include "cpu/tms34010/tms34010.h"
#include "sound/okim6295.h"
#include "includes/midyunit.h"
#include "scrlegcy.h"
/* master clocks vary based on game */

View File

@ -74,6 +74,7 @@ Notes:
#include "sound/c352.h"
#include "machine/at28c16.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
/*************************************************************/

View File

@ -220,6 +220,7 @@
#include "sound/ay8910.h"
#include "machine/nvram.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
#include "omegrace.lh"

View File

@ -42,6 +42,7 @@ HuC6280A (Hudson)
#include "cpu/h6280/h6280.h"
#include "sound/c6280.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
class paranoia_state : public pce_common_state

View File

@ -64,6 +64,7 @@ the main program is 9th October 1990.
#include "sound/speaker.h"
#include "video/pc_cga.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
class pcxt_state : public driver_device

View File

@ -19,6 +19,7 @@
#include "emu.h"
#include "cpu/tms34010/tms34010.h"
#include "scrlegcy.h"
class potgold_state : public driver_device

View File

@ -51,6 +51,7 @@
#include "sound/discrete.h"
#include "machine/nvram.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
class quantum_state : public driver_device

View File

@ -12,6 +12,7 @@
#include "cpu/tms34010/tms34010.h"
#include "sound/ay8910.h"
#include "video/tlc34076.h"
#include "scrlegcy.h"
/*************************************

View File

@ -38,6 +38,7 @@
#include "cpu/m68000/m68000.h"
#include "cpu/tms34010/tms34010.h"
#include "sound/okim6295.h"
#include "scrlegcy.h"
class skimaxx_state : public driver_device

View File

@ -32,6 +32,7 @@
#include "includes/starwars.h"
#include "includes/slapstic.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
#define MASTER_CLOCK (12096000)
#define CLOCK_3KHZ (MASTER_CLOCK / 4096)

View File

@ -281,6 +281,7 @@ Note: Roms for Tempest Analog Vector-Generator PCB Assembly A037383-03 or A03738
#include "machine/atari_vg.h"
#include "sound/pokey.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
class tempest_state : public driver_device

View File

@ -26,6 +26,7 @@
#include "sound/ay8910.h"
#include "sound/okim6295.h"
#include "machine/nvram.h"
#include "scrlegcy.h"
class tickee_state : public driver_device

View File

@ -35,6 +35,7 @@
#include "sound/tms5220.h"
#include "sound/2151intf.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
class tomcat_state : public driver_device

View File

@ -186,6 +186,7 @@ I can't tell ATM if units are seconds (even if values in tables seem very relate
#include "sound/c6280.h"
#include "machine/i8155.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
class tourvision_state : public pce_common_state

View File

@ -98,6 +98,7 @@ Alien Crush & Pac_Land: dumps made from PC-Engine dumps of JP versions
#include "video/vdc.h"
#include "sound/discrete.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
class uapce_state : public pce_common_state

View File

@ -19,6 +19,7 @@
#include "audio/exidy440.h"
#include "includes/vertigo.h"
#include "drivlgcy.h"
#include "scrlegcy.h"

View File

@ -12,6 +12,7 @@
#include "machine/ticket.h"
#include "machine/nvram.h"
#include "sound/dac.h"
#include "scrlegcy.h"
class xtheball_state : public driver_device

View File

@ -16,6 +16,7 @@
#include "machine/segacrpt.h"
#include "includes/segamsys.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
//static UINT8* sms_rom;

View File

@ -8,6 +8,7 @@
#include "video/vector.h"
#include "cpu/ccpu/ccpu.h"
#include "includes/cinemat.h"
#include "scrlegcy.h"
/*************************************

View File

@ -7,6 +7,7 @@
#include "emu.h"
#include "video/vector.h"
#include "includes/segag80v.h"
#include "scrlegcy.h"
#define VECTOR_CLOCK 15468480 /* master clock */
#define U34_CLOCK (VECTOR_CLOCK/3) /* clock for interrupt chain */

View File

@ -3,6 +3,7 @@
#include "includes/vectrex.h"
#include "video/vector.h"
#include "cpu/m6809/m6809.h"
#include "scrlegcy.h"
#define ANALOG_DELAY 7800

View File

@ -41,6 +41,7 @@
#include "machine/ram.h"
#include "hashfile.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
/******************************************************************************

View File

@ -24,6 +24,7 @@
#include "includes/tek405x.h"
#include "scrlegcy.h"

View File

@ -18,6 +18,7 @@
#include "includes/apollo.h"
#include "drivlgcy.h"
#include "scrlegcy.h"
#include "apollo.lh"
#include "apollo_15i.lh"