mirror of
https://github.com/holub/mame
synced 2025-05-23 22:20:01 +03:00
Change 'screen' parameter in SCREEN_UPDATE and SCREEN_EOF callbacks to a
reference. Remove redundant machine parameter from SCREEN_EOF. Remove old vestiges of driver_device video_eof override since it wasn't being used. Update all multi-screen games to use separate functions for each screen (calling into common code where appropriate). [Aaron Giles] (nw: equivalent MESS changes are ready, will send along shortly)
This commit is contained in:
parent
87c11a79d7
commit
06da0b9b9f
@ -1080,26 +1080,26 @@ void tms34010_get_display_params(device_t *cpu, tms34010_display_params *params)
|
||||
|
||||
SCREEN_UPDATE( tms340x0 )
|
||||
{
|
||||
pen_t blackpen = get_black_pen(screen->machine());
|
||||
pen_t blackpen = get_black_pen(screen.machine());
|
||||
tms34010_display_params params;
|
||||
tms34010_state *tms = NULL;
|
||||
device_t *cpu;
|
||||
int x;
|
||||
|
||||
/* find the owning CPU */
|
||||
for (cpu = screen->machine().devicelist().first(); cpu != NULL; cpu = cpu->next())
|
||||
for (cpu = screen.machine().devicelist().first(); cpu != NULL; cpu = cpu->next())
|
||||
{
|
||||
device_type type = cpu->type();
|
||||
if (type == TMS34010 || type == TMS34020)
|
||||
{
|
||||
tms = get_safe_token(cpu);
|
||||
if (tms->config != NULL && tms->config->scanline_callback != NULL && tms->screen == screen)
|
||||
if (tms->config != NULL && tms->config->scanline_callback != NULL && tms->screen == &screen)
|
||||
break;
|
||||
tms = NULL;
|
||||
}
|
||||
}
|
||||
if (tms == NULL)
|
||||
fatalerror("Unable to locate matching CPU for screen '%s'\n", screen->tag());
|
||||
fatalerror("Unable to locate matching CPU for screen '%s'\n", screen.tag());
|
||||
|
||||
/* get the display parameters for the screen */
|
||||
tms34010_get_display_params(tms->device, ¶ms);
|
||||
@ -1109,7 +1109,7 @@ SCREEN_UPDATE( tms340x0 )
|
||||
{
|
||||
/* call through to the callback */
|
||||
LOG((" Update: scan=%3d ROW=%04X COL=%04X\n", cliprect->min_y, params.rowaddr, params.coladdr));
|
||||
(*tms->config->scanline_callback)(*screen, bitmap, cliprect->min_y, ¶ms);
|
||||
(*tms->config->scanline_callback)(screen, bitmap, cliprect->min_y, ¶ms);
|
||||
}
|
||||
|
||||
/* otherwise, just blank the current scanline */
|
||||
@ -1270,7 +1270,7 @@ WRITE16_HANDLER( tms34010_io_register_w )
|
||||
}
|
||||
|
||||
// if (LOG_CONTROL_REGS)
|
||||
// logerror("%s: %s = %04X (%d)\n", tms->device->machine().describe_context(), ioreg_name[offset], IOREG(tms, offset), tms->screen->vpos());
|
||||
// logerror("%s: %s = %04X (%d)\n", tms->device->machine().describe_context(), ioreg_name[offset], IOREG(tms, offset), tms->screen.vpos());
|
||||
}
|
||||
|
||||
|
||||
@ -1307,7 +1307,7 @@ WRITE16_HANDLER( tms34020_io_register_w )
|
||||
IOREG(tms, offset) = data;
|
||||
|
||||
// if (LOG_CONTROL_REGS)
|
||||
// logerror("%s: %s = %04X (%d)\n", device->machine().describe_context(), ioreg020_name[offset], IOREG(tms, offset), tms->screen->vpos());
|
||||
// logerror("%s: %s = %04X (%d)\n", device->machine().describe_context(), ioreg020_name[offset], IOREG(tms, offset), tms->screen.vpos());
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
|
@ -1121,16 +1121,6 @@ bool driver_device::screen_update(screen_device &screen, bitmap_t &bitmap, const
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// video_eof - default implementation which
|
||||
// calls to the legacy video_eof function
|
||||
//-------------------------------------------------
|
||||
|
||||
void driver_device::screen_eof()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_rom_region - return a pointer to the
|
||||
// game's ROMs
|
||||
|
@ -561,7 +561,6 @@ public:
|
||||
|
||||
// additional video helpers
|
||||
virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect);
|
||||
virtual void screen_eof();
|
||||
|
||||
// generic helpers
|
||||
|
||||
|
@ -1192,10 +1192,10 @@ void laserdisc_overlay_enable(device_t *device, int enable)
|
||||
|
||||
SCREEN_UPDATE( laserdisc )
|
||||
{
|
||||
device_t *laserdisc = screen->machine().device("laserdisc"); // TODO: allow more than one laserdisc
|
||||
device_t *laserdisc = screen.machine().device("laserdisc"); // TODO: allow more than one laserdisc
|
||||
if (laserdisc != NULL)
|
||||
{
|
||||
const rectangle &visarea = screen->visible_area();
|
||||
const rectangle &visarea = screen.visible_area();
|
||||
laserdisc_state *ld = (laserdisc_state *)downcast<legacy_device_base *>(laserdisc)->token();
|
||||
ldcore_data *ldcore = ld->core;
|
||||
bitmap_t *overbitmap = ldcore->overbitmap[ldcore->overindex];
|
||||
@ -1234,11 +1234,11 @@ SCREEN_UPDATE( laserdisc )
|
||||
ldcore->videotex->set_bitmap(vidbitmap, NULL, TEXFORMAT_YUY16, ldcore->videopalette);
|
||||
|
||||
/* reset the screen contents */
|
||||
screen->container().empty();
|
||||
screen.container().empty();
|
||||
|
||||
/* add the video texture */
|
||||
if (ldcore->videoenable)
|
||||
screen->container().add_quad(0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0xff,0xff,0xff), ldcore->videotex, PRIMFLAG_BLENDMODE(BLENDMODE_NONE) | PRIMFLAG_SCREENTEX(1));
|
||||
screen.container().add_quad(0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0xff,0xff,0xff), ldcore->videotex, PRIMFLAG_BLENDMODE(BLENDMODE_NONE) | PRIMFLAG_SCREENTEX(1));
|
||||
|
||||
/* add the overlay */
|
||||
if (ldcore->overenable && overbitmap != NULL)
|
||||
@ -1247,7 +1247,7 @@ SCREEN_UPDATE( laserdisc )
|
||||
float y0 = 0.5f - 0.5f * ldcore->config.overscaley + ldcore->config.overposy;
|
||||
float x1 = x0 + ldcore->config.overscalex;
|
||||
float y1 = y0 + ldcore->config.overscaley;
|
||||
screen->container().add_quad(x0, y0, x1, y1, MAKE_ARGB(0xff,0xff,0xff,0xff), ldcore->overtex, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_SCREENTEX(1));
|
||||
screen.container().add_quad(x0, y0, x1, y1, MAKE_ARGB(0xff,0xff,0xff,0xff), ldcore->overtex, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_SCREENTEX(1));
|
||||
}
|
||||
|
||||
/* swap to the next bitmap */
|
||||
|
@ -39,7 +39,7 @@ VIDEO_START( s3c2400 )
|
||||
|
||||
SCREEN_UPDATE( s3c2400 )
|
||||
{
|
||||
device_t *device = screen->machine().device( S3C2400_TAG);
|
||||
device_t *device = screen.machine().device( S3C2400_TAG);
|
||||
return s3c24xx_video_update( device, screen, bitmap, cliprect);
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ VIDEO_START( s3c2410 )
|
||||
|
||||
SCREEN_UPDATE( s3c2410 )
|
||||
{
|
||||
device_t *device = screen->machine().device( S3C2410_TAG);
|
||||
device_t *device = screen.machine().device( S3C2410_TAG);
|
||||
return s3c24xx_video_update( device, screen, bitmap, cliprect);
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ VIDEO_START( s3c2440 )
|
||||
|
||||
SCREEN_UPDATE( s3c2440 )
|
||||
{
|
||||
device_t *device = screen->machine().device( S3C2440_TAG);
|
||||
device_t *device = screen.machine().device( S3C2440_TAG);
|
||||
return s3c24xx_video_update( device, screen, bitmap, cliprect);
|
||||
}
|
||||
|
||||
|
@ -758,7 +758,7 @@ static void bitmap_blend( bitmap_t *bitmap_dst, bitmap_t *bitmap_src_1, bitmap_t
|
||||
}
|
||||
}
|
||||
|
||||
static UINT32 s3c24xx_video_update( device_t *device, screen_device *screen, bitmap_t *bitmap, const rectangle *cliprect)
|
||||
static UINT32 s3c24xx_video_update( device_t *device, screen_device &screen, bitmap_t *bitmap, const rectangle *cliprect)
|
||||
{
|
||||
s3c24xx_t *s3c24xx = get_token( device);
|
||||
if (s3c24xx->lcd.framerate >= 1195)
|
||||
|
@ -1074,7 +1074,7 @@ void screen_device::load_effect_overlay(const char *filename)
|
||||
bool screen_device::screen_update(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
if (m_screen_update != NULL) {
|
||||
return (*m_screen_update)(this, &bitmap, &cliprect);
|
||||
return (*m_screen_update)(*this, &bitmap, &cliprect);
|
||||
} else {
|
||||
return machine().driver_data<driver_device>()->screen_update(*this, bitmap, cliprect);
|
||||
}
|
||||
@ -1087,9 +1087,6 @@ bool screen_device::screen_update(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
|
||||
void screen_device::screen_eof()
|
||||
{
|
||||
if (m_screen_eof != NULL) {
|
||||
return (*m_screen_eof)(this, machine());
|
||||
} else {
|
||||
machine().driver_data<driver_device>()->screen_eof();
|
||||
}
|
||||
if (m_screen_eof != NULL)
|
||||
return (*m_screen_eof)(*this);
|
||||
}
|
||||
|
@ -74,8 +74,8 @@ class screen_device;
|
||||
// callback that is called to notify of a change in the VBLANK state
|
||||
typedef delegate<void (screen_device &, bool)> vblank_state_delegate;
|
||||
|
||||
typedef UINT32 (*screen_update_func)(screen_device *screen, bitmap_t *bitmap, const rectangle *cliprect);
|
||||
typedef void (*screen_eof_func)(screen_device *screen, running_machine &machine);
|
||||
typedef UINT32 (*screen_update_func)(screen_device &screen, bitmap_t *bitmap, const rectangle *cliprect);
|
||||
typedef void (*screen_eof_func)(screen_device &screen);
|
||||
|
||||
|
||||
// ======================> screen_device
|
||||
@ -255,12 +255,12 @@ extern const device_type SCREEN;
|
||||
//**************************************************************************
|
||||
|
||||
#define SCREEN_UPDATE_NAME(name) screen_update_##name
|
||||
#define SCREEN_UPDATE(name) UINT32 SCREEN_UPDATE_NAME(name)(screen_device *screen, bitmap_t *bitmap, const rectangle *cliprect)
|
||||
#define SCREEN_UPDATE(name) UINT32 SCREEN_UPDATE_NAME(name)(screen_device &screen, bitmap_t *bitmap, const rectangle *cliprect)
|
||||
#define SCREEN_UPDATE_CALL(name) SCREEN_UPDATE_NAME(name)(screen, bitmap, cliprect)
|
||||
|
||||
#define SCREEN_EOF_NAME(name) screen_eof_##name
|
||||
#define SCREEN_EOF(name) void SCREEN_EOF_NAME(name)(screen_device *screen, running_machine &machine)
|
||||
#define SCREEN_EOF_CALL(name) SCREEN_EOF_NAME(name)(screen, machine)
|
||||
#define SCREEN_EOF(name) void SCREEN_EOF_NAME(name)(screen_device &screen)
|
||||
#define SCREEN_EOF_CALL(name) SCREEN_EOF_NAME(name)(screen)
|
||||
|
||||
#define screen_eof_0 NULL
|
||||
|
||||
|
@ -287,7 +287,7 @@ VIDEO_START( generic_bitmapped )
|
||||
|
||||
SCREEN_UPDATE( generic_bitmapped )
|
||||
{
|
||||
copybitmap(bitmap, screen->machine().generic.tmpbitmap, 0, 0, 0, 0, cliprect);
|
||||
copybitmap(bitmap, screen.machine().generic.tmpbitmap, 0, 0, 0, 0, cliprect);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -387,8 +387,8 @@ static VIDEO_START( pc_cga32k )
|
||||
|
||||
SCREEN_UPDATE( mc6845_cga )
|
||||
{
|
||||
UINT8 *gfx = screen->machine().region("gfx1")->base();
|
||||
mc6845_device *mc6845 = screen->machine().device<mc6845_device>(CGA_MC6845_NAME);
|
||||
UINT8 *gfx = screen.machine().region("gfx1")->base();
|
||||
mc6845_device *mc6845 = screen.machine().device<mc6845_device>(CGA_MC6845_NAME);
|
||||
mc6845->update( bitmap, cliprect);
|
||||
|
||||
/* Check for changes in font dipsetting */
|
||||
@ -413,8 +413,8 @@ static VIDEO_START( cga_poisk2 )
|
||||
|
||||
static SCREEN_UPDATE( cga_poisk2 )
|
||||
{
|
||||
UINT8 *gfx = screen->machine().region("gfx1")->base();
|
||||
mc6845_device *mc6845 = screen->machine().device<mc6845_device>(CGA_MC6845_NAME);
|
||||
UINT8 *gfx = screen.machine().region("gfx1")->base();
|
||||
mc6845_device *mc6845 = screen.machine().device<mc6845_device>(CGA_MC6845_NAME);
|
||||
mc6845->update( bitmap, cliprect);
|
||||
|
||||
/* Check for changes in font dipsetting */
|
||||
@ -1619,8 +1619,8 @@ static VIDEO_START( pc1512 )
|
||||
|
||||
static SCREEN_UPDATE( mc6845_pc1512 )
|
||||
{
|
||||
UINT8 *gfx = screen->machine().region("gfx1")->base();
|
||||
mc6845_device *mc6845 = screen->machine().device<mc6845_device>(CGA_MC6845_NAME);
|
||||
UINT8 *gfx = screen.machine().region("gfx1")->base();
|
||||
mc6845_device *mc6845 = screen.machine().device<mc6845_device>(CGA_MC6845_NAME);
|
||||
mc6845->update(bitmap, cliprect);
|
||||
|
||||
/* Check for changes in font dipsetting */
|
||||
|
@ -83,14 +83,14 @@ SCREEN_UPDATE( pc_video )
|
||||
{
|
||||
UINT32 rc = 0;
|
||||
int w = 0, h = 0;
|
||||
pc_video_update_proc video_update = pc_choosevideomode(screen->machine(), &w, &h);
|
||||
pc_video_update_proc video_update = pc_choosevideomode(screen.machine(), &w, &h);
|
||||
|
||||
if (video_update)
|
||||
{
|
||||
if ((pc_current_width != w) || (pc_current_height != h))
|
||||
{
|
||||
int width = screen->width();
|
||||
int height = screen->height();
|
||||
int width = screen.width();
|
||||
int height = screen.height();
|
||||
|
||||
pc_current_width = w;
|
||||
pc_current_height = h;
|
||||
@ -101,7 +101,7 @@ SCREEN_UPDATE( pc_video )
|
||||
pc_current_height = height;
|
||||
|
||||
if ((pc_current_width > 100) && (pc_current_height > 100))
|
||||
screen->set_visible_area(0, pc_current_width-1, 0, pc_current_height-1);
|
||||
screen.set_visible_area(0, pc_current_width-1, 0, pc_current_height-1);
|
||||
|
||||
bitmap_fill(bitmap, cliprect, 0);
|
||||
}
|
||||
|
@ -3690,7 +3690,7 @@ PALETTE_INIT( psx )
|
||||
|
||||
SCREEN_UPDATE( psx )
|
||||
{
|
||||
psxgpu_device *gpu = downcast<psxgpu_device *>(screen->owner());
|
||||
psxgpu_device *gpu = downcast<psxgpu_device *>(screen.owner());
|
||||
gpu->update_screen( bitmap, cliprect );
|
||||
return 0;
|
||||
}
|
||||
|
@ -256,8 +256,8 @@ void vector_clear_list (void)
|
||||
|
||||
SCREEN_UPDATE( vector )
|
||||
{
|
||||
UINT32 flags = PRIMFLAG_ANTIALIAS(screen->machine().options().antialias() ? 1 : 0) | PRIMFLAG_BLENDMODE(BLENDMODE_ADD);
|
||||
const rectangle &visarea = screen->visible_area();
|
||||
UINT32 flags = PRIMFLAG_ANTIALIAS(screen.machine().options().antialias() ? 1 : 0) | PRIMFLAG_BLENDMODE(BLENDMODE_ADD);
|
||||
const rectangle &visarea = screen.visible_area();
|
||||
float xscale = 1.0f / (65536 * (visarea.max_x - visarea.min_x));
|
||||
float yscale = 1.0f / (65536 * (visarea.max_y - visarea.min_y));
|
||||
float xoffs = (float)visarea.min_x;
|
||||
@ -269,8 +269,8 @@ SCREEN_UPDATE( vector )
|
||||
|
||||
curpoint = vector_list;
|
||||
|
||||
screen->container().empty();
|
||||
screen->container().add_rect(0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0x00,0x00,0x00), PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
|
||||
screen.container().empty();
|
||||
screen.container().add_rect(0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0x00,0x00,0x00), PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
|
||||
|
||||
clip.x0 = clip.y0 = 0.0f;
|
||||
clip.x1 = clip.y1 = 1.0f;
|
||||
@ -300,7 +300,7 @@ SCREEN_UPDATE( vector )
|
||||
|
||||
if (curpoint->intensity != 0)
|
||||
if (!render_clip_line(&coords, &clip))
|
||||
screen->container().add_line(coords.x0, coords.y0, coords.x1, coords.y1,
|
||||
screen.container().add_line(coords.x0, coords.y0, coords.x1, coords.y1,
|
||||
beam_width * (1.0f / (float)VECTOR_WIDTH_DENOM),
|
||||
(curpoint->intensity << 24) | (curpoint->col & 0xffffff),
|
||||
flags);
|
||||
|
@ -118,9 +118,9 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
|
||||
|
||||
static SCREEN_UPDATE(k3)
|
||||
{
|
||||
k3_state *state = screen->machine().driver_data<k3_state>();
|
||||
k3_state *state = screen.machine().driver_data<k3_state>();
|
||||
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
|
||||
draw_sprites(screen->machine(), bitmap, cliprect);
|
||||
draw_sprites(screen.machine(), bitmap, cliprect);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1514,7 +1514,7 @@ INPUT_PORTS_END
|
||||
|
||||
static SCREEN_UPDATE( 39in1 )
|
||||
{
|
||||
_39in1_state *state = screen->machine().driver_data<_39in1_state>();
|
||||
_39in1_state *state = screen.machine().driver_data<_39in1_state>();
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
|
||||
|
@ -523,7 +523,7 @@ static VIDEO_START(fclown)
|
||||
|
||||
static SCREEN_UPDATE( fclown )
|
||||
{
|
||||
_5clown_state *state = screen->machine().driver_data<_5clown_state>();
|
||||
_5clown_state *state = screen.machine().driver_data<_5clown_state>();
|
||||
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -84,25 +84,25 @@ static VIDEO_START( ace )
|
||||
|
||||
static SCREEN_UPDATE( ace )
|
||||
{
|
||||
ace_state *state = screen->machine().driver_data<ace_state>();
|
||||
ace_state *state = screen.machine().driver_data<ace_state>();
|
||||
int offs;
|
||||
|
||||
/* first of all, fill the screen with the background color */
|
||||
bitmap_fill(bitmap, cliprect, 0);
|
||||
|
||||
drawgfx_opaque(bitmap, cliprect, screen->machine().gfx[1],
|
||||
drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[1],
|
||||
0,
|
||||
0,
|
||||
0, 0,
|
||||
state->m_objpos[0], state->m_objpos[1]);
|
||||
|
||||
drawgfx_opaque(bitmap, cliprect, screen->machine().gfx[2],
|
||||
drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[2],
|
||||
0,
|
||||
0,
|
||||
0, 0,
|
||||
state->m_objpos[2], state->m_objpos[3]);
|
||||
|
||||
drawgfx_opaque(bitmap, cliprect, screen->machine().gfx[3],
|
||||
drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[3],
|
||||
0,
|
||||
0,
|
||||
0, 0,
|
||||
@ -111,7 +111,7 @@ static SCREEN_UPDATE( ace )
|
||||
for (offs = 0; offs < 8; offs++)
|
||||
{
|
||||
drawgfx_opaque(bitmap,/* ?? */
|
||||
cliprect, screen->machine().gfx[4],
|
||||
cliprect, screen.machine().gfx[4],
|
||||
offs,
|
||||
0,
|
||||
0, 0,
|
||||
|
@ -78,7 +78,7 @@ static INTERRUPT_GEN( acefruit_vblank )
|
||||
|
||||
static SCREEN_UPDATE( acefruit )
|
||||
{
|
||||
acefruit_state *state = screen->machine().driver_data<acefruit_state>();
|
||||
acefruit_state *state = screen.machine().driver_data<acefruit_state>();
|
||||
int startrow = cliprect->min_y / 8;
|
||||
int endrow = cliprect->max_y / 8;
|
||||
int row;
|
||||
@ -98,7 +98,7 @@ static SCREEN_UPDATE( acefruit )
|
||||
|
||||
if( color < 0x4 )
|
||||
{
|
||||
drawgfx_opaque( bitmap, cliprect, screen->machine().gfx[ 1 ], code, color, 0, 0, col * 16, row * 8 );
|
||||
drawgfx_opaque( bitmap, cliprect, screen.machine().gfx[ 1 ], code, color, 0, 0, col * 16, row * 8 );
|
||||
}
|
||||
else if( color >= 0x5 && color <= 0x7 )
|
||||
{
|
||||
@ -106,7 +106,7 @@ static SCREEN_UPDATE( acefruit )
|
||||
int x;
|
||||
static const int spriteskip[] = { 1, 2, 4 };
|
||||
int spritesize = spriteskip[ color - 5 ];
|
||||
const gfx_element *gfx = screen->machine().gfx[ 0 ];
|
||||
const gfx_element *gfx = screen.machine().gfx[ 0 ];
|
||||
|
||||
for( x = 0; x < 16; x++ )
|
||||
{
|
||||
|
@ -240,9 +240,9 @@ static void draw_led(bitmap_t *bitmap, int x, int y,UINT8 value)
|
||||
|
||||
static SCREEN_UPDATE( acommand )
|
||||
{
|
||||
acommand_state *state = screen->machine().driver_data<acommand_state>();
|
||||
acommand_state *state = screen.machine().driver_data<acommand_state>();
|
||||
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap,0,0);
|
||||
draw_sprites(screen->machine(),bitmap,cliprect,0,0);
|
||||
draw_sprites(screen.machine(),bitmap,cliprect,0,0);
|
||||
tilemap_draw(bitmap,cliprect,state->m_tx_tilemap,0,0);
|
||||
|
||||
/*Order might be wrong,but these for sure are the led numbers tested*/
|
||||
|
@ -200,12 +200,12 @@ bool adp_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rec
|
||||
#if 0
|
||||
static SCREEN_UPDATE( adp )
|
||||
{
|
||||
adp_state *state = screen->machine().driver_data<adp_state>();
|
||||
adp_state *state = screen.machine().driver_data<adp_state>();
|
||||
|
||||
state->m_h63484->update_screen(bitmap, cliprect);
|
||||
|
||||
#if 0
|
||||
adp_state *state = screen->machine().driver_data<adp_state>();
|
||||
adp_state *state = screen.machine().driver_data<adp_state>();
|
||||
int x, y, b, src;
|
||||
|
||||
b = ((hd63484_regs_r(state->m_hd63484, 0xcc/2, 0xffff) & 0x000f) << 16) + hd63484_regs_r(state->m_hd63484, 0xce/2, 0xffff);
|
||||
@ -223,7 +223,7 @@ static SCREEN_UPDATE( adp )
|
||||
b++;
|
||||
}
|
||||
}
|
||||
if (!screen->machine().input().code_pressed(KEYCODE_O)) // debug: toggle window
|
||||
if (!screen.machine().input().code_pressed(KEYCODE_O)) // debug: toggle window
|
||||
if ((hd63484_regs_r(state->m_hd63484, 0x06/2, 0xffff) & 0x0300) == 0x0300)
|
||||
{
|
||||
int sy = (hd63484_regs_r(state->m_hd63484, 0x94/2, 0xffff) & 0x0fff) - (hd63484_regs_r(state->m_hd63484, 0x88/2, 0xffff) >> 8);
|
||||
|
@ -80,7 +80,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
|
||||
static SCREEN_UPDATE(hanaroku)
|
||||
{
|
||||
bitmap_fill(bitmap, cliprect, 0x1f0); // ???
|
||||
draw_sprites(screen->machine(), bitmap, cliprect);
|
||||
draw_sprites(screen.machine(), bitmap, cliprect);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ static VIDEO_START( yumefuda )
|
||||
|
||||
static SCREEN_UPDATE( yumefuda )
|
||||
{
|
||||
albazg_state *state = screen->machine().driver_data<albazg_state>();
|
||||
albazg_state *state = screen.machine().driver_data<albazg_state>();
|
||||
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -333,8 +333,8 @@ INLINE void uBackgroundColour(running_machine &machine)
|
||||
|
||||
static SCREEN_UPDATE(aristmk4)
|
||||
{
|
||||
aristmk4_state *state = screen->machine().driver_data<aristmk4_state>();
|
||||
const gfx_element *gfx = screen->machine().gfx[0];
|
||||
aristmk4_state *state = screen.machine().driver_data<aristmk4_state>();
|
||||
const gfx_element *gfx = screen.machine().gfx[0];
|
||||
int x,y;
|
||||
int count = 0;
|
||||
int color;
|
||||
@ -350,7 +350,7 @@ static SCREEN_UPDATE(aristmk4)
|
||||
color = ((state->m_mkiv_vram[count]) & 0xe0) >> 5;
|
||||
tile = (state->m_mkiv_vram[count+1]|state->m_mkiv_vram[count]<<8) & 0x3ff;
|
||||
bgtile = (state->m_mkiv_vram[count+1]|state->m_mkiv_vram[count]<<8) & 0xff; // first 256 tiles
|
||||
uBackgroundColour(screen->machine()); // read sw7
|
||||
uBackgroundColour(screen.machine()); // read sw7
|
||||
gfx_element_decode(gfx, bgtile); // force the machine to update only the first 256 tiles.
|
||||
// as we only update the background, not the entire display.
|
||||
flipx = ((state->m_mkiv_vram[count]) & 0x04);
|
||||
|
@ -29,41 +29,41 @@ VIDEO_START(aristmk6)
|
||||
|
||||
SCREEN_UPDATE(aristmk6)
|
||||
{
|
||||
aristmk6_state *state = screen->machine().driver_data<aristmk6_state>();
|
||||
aristmk6_state *state = screen.machine().driver_data<aristmk6_state>();
|
||||
|
||||
int x,y,count;
|
||||
const UINT8 *blit_ram = screen->machine().region("maincpu")->base();
|
||||
const UINT8 *blit_ram = screen.machine().region("maincpu")->base();
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_Z))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_Z))
|
||||
state->m_test_x++;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_X))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_X))
|
||||
state->m_test_x--;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_A))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_A))
|
||||
state->m_test_y++;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_S))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_S))
|
||||
state->m_test_y--;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_Q))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_Q))
|
||||
state->m_start_offs+=0x2000;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_W))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_W))
|
||||
state->m_start_offs-=0x2000;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_E))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_E))
|
||||
state->m_start_offs++;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_R))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_R))
|
||||
state->m_start_offs--;
|
||||
|
||||
if(screen->machine().input().code_pressed_once(KEYCODE_L))
|
||||
if(screen.machine().input().code_pressed_once(KEYCODE_L))
|
||||
state->m_type^=1;
|
||||
|
||||
popmessage("%d %d %04x %d",state->m_test_x,state->m_test_y,state->m_start_offs,state->m_type);
|
||||
|
||||
bitmap_fill(bitmap,cliprect,get_black_pen(screen->machine()));
|
||||
bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
|
||||
|
||||
count = (state->m_start_offs);
|
||||
|
||||
@ -86,7 +86,7 @@ SCREEN_UPDATE(aristmk6)
|
||||
g = (g << 2) | (g & 3);
|
||||
b = (b << 3) | (b & 0x7);
|
||||
|
||||
if((x)<screen->visible_area().max_x && ((y)+0)<screen->visible_area().max_y)
|
||||
if((x)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
|
||||
*BITMAP_ADDR32(bitmap, y, x) = r | g<<8 | b<<16;
|
||||
|
||||
count+=2;
|
||||
@ -97,8 +97,8 @@ SCREEN_UPDATE(aristmk6)
|
||||
|
||||
color = blit_ram[count];
|
||||
|
||||
if((x)<screen->visible_area().max_x && ((y)+0)<screen->visible_area().max_y)
|
||||
*BITMAP_ADDR32(bitmap, y, x) = screen->machine().pens[color];
|
||||
if((x)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
|
||||
*BITMAP_ADDR32(bitmap, y, x) = screen.machine().pens[color];
|
||||
|
||||
count++;
|
||||
}
|
||||
|
@ -153,8 +153,8 @@ static void plot_byte( running_machine &machine, bitmap_t *bitmap, UINT8 y, UINT
|
||||
|
||||
static SCREEN_UPDATE( astinvad )
|
||||
{
|
||||
astinvad_state *state = screen->machine().driver_data<astinvad_state>();
|
||||
const UINT8 *color_prom = screen->machine().region("proms")->base();
|
||||
astinvad_state *state = screen.machine().driver_data<astinvad_state>();
|
||||
const UINT8 *color_prom = screen.machine().region("proms")->base();
|
||||
UINT8 yoffs = state->m_flip_yoffs & state->m_screen_flip;
|
||||
int x, y;
|
||||
|
||||
@ -164,7 +164,7 @@ static SCREEN_UPDATE( astinvad )
|
||||
{
|
||||
UINT8 color = color_prom[((y & 0xf8) << 2) | (x >> 3)] >> (state->m_screen_flip ? 0 : 4);
|
||||
UINT8 data = state->m_videoram[(((y ^ state->m_screen_flip) + yoffs) << 5) | ((x ^ state->m_screen_flip) >> 3)];
|
||||
plot_byte(screen->machine(), bitmap, y, x, data, state->m_screen_red ? 1 : color);
|
||||
plot_byte(screen.machine(), bitmap, y, x, data, state->m_screen_red ? 1 : color);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -173,8 +173,8 @@ static SCREEN_UPDATE( astinvad )
|
||||
|
||||
static SCREEN_UPDATE( spaceint )
|
||||
{
|
||||
astinvad_state *state = screen->machine().driver_data<astinvad_state>();
|
||||
const UINT8 *color_prom = screen->machine().region("proms")->base();
|
||||
astinvad_state *state = screen.machine().driver_data<astinvad_state>();
|
||||
const UINT8 *color_prom = screen.machine().region("proms")->base();
|
||||
int offs;
|
||||
|
||||
for (offs = 0; offs < state->m_videoram_size; offs++)
|
||||
@ -189,7 +189,7 @@ static SCREEN_UPDATE( spaceint )
|
||||
offs_t n = ((offs >> 5) & 0xf0) | color;
|
||||
color = color_prom[n] & 0x07;
|
||||
|
||||
plot_byte(screen->machine(), bitmap, y, x, data, color);
|
||||
plot_byte(screen.machine(), bitmap, y, x, data, color);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -140,12 +140,12 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
|
||||
|
||||
static SCREEN_UPDATE(astrocorp)
|
||||
{
|
||||
astrocorp_state *state = screen->machine().driver_data<astrocorp_state>();
|
||||
astrocorp_state *state = screen.machine().driver_data<astrocorp_state>();
|
||||
|
||||
if (state->m_screen_enable & 1)
|
||||
copybitmap(bitmap, state->m_bitmap, 0,0,0,0, cliprect);
|
||||
else
|
||||
bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine()));
|
||||
bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -425,9 +425,9 @@ static SCREEN_UPDATE( astrof )
|
||||
{
|
||||
pen_t pens[ASTROF_NUM_PENS];
|
||||
|
||||
astrof_get_pens(screen->machine(), pens);
|
||||
astrof_get_pens(screen.machine(), pens);
|
||||
|
||||
video_update_common(screen->machine(), bitmap, cliprect, pens);
|
||||
video_update_common(screen.machine(), bitmap, cliprect, pens);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -437,9 +437,9 @@ static SCREEN_UPDATE( tomahawk )
|
||||
{
|
||||
pen_t pens[TOMAHAWK_NUM_PENS];
|
||||
|
||||
tomahawk_get_pens(screen->machine(), pens);
|
||||
tomahawk_get_pens(screen.machine(), pens);
|
||||
|
||||
video_update_common(screen->machine(), bitmap, cliprect, pens);
|
||||
video_update_common(screen.machine(), bitmap, cliprect, pens);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -876,7 +876,7 @@ static MACHINE_RESET( asuka )
|
||||
|
||||
static SCREEN_EOF( asuka )
|
||||
{
|
||||
asuka_state *state = machine.driver_data<asuka_state>();
|
||||
asuka_state *state = screen.machine().driver_data<asuka_state>();
|
||||
pc090oj_eof_callback(state->m_pc090oj);
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ static VIDEO_RESET( atarisy4 )
|
||||
|
||||
static SCREEN_UPDATE( atarisy4 )
|
||||
{
|
||||
atarisy4_state *state = screen->machine().driver_data<atarisy4_state>();
|
||||
atarisy4_state *state = screen.machine().driver_data<atarisy4_state>();
|
||||
int y;
|
||||
UINT32 offset = 0;
|
||||
|
||||
@ -161,8 +161,8 @@ static SCREEN_UPDATE( atarisy4 )
|
||||
{
|
||||
UINT16 data = *src++;
|
||||
|
||||
*dest++ = screen->machine().pens[data & 0xff];
|
||||
*dest++ = screen->machine().pens[data >> 8];
|
||||
*dest++ = screen.machine().pens[data & 0xff];
|
||||
*dest++ = screen.machine().pens[data >> 8];
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -162,7 +162,7 @@ static INTERRUPT_GEN( attckufo_raster_interrupt )
|
||||
|
||||
static SCREEN_UPDATE( attckufo )
|
||||
{
|
||||
attckufo_state *state = screen->machine().driver_data<attckufo_state>();
|
||||
attckufo_state *state = screen.machine().driver_data<attckufo_state>();
|
||||
mos6560_video_update(state->m_mos6560, bitmap, cliprect);
|
||||
return 0;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
static SCREEN_UPDATE( avalnche )
|
||||
{
|
||||
avalnche_state *state = screen->machine().driver_data<avalnche_state>();
|
||||
avalnche_state *state = screen.machine().driver_data<avalnche_state>();
|
||||
offs_t offs;
|
||||
|
||||
for (offs = 0; offs < state->m_videoram_size; offs++)
|
||||
|
@ -503,10 +503,10 @@ static VIDEO_START( avt )
|
||||
|
||||
static SCREEN_UPDATE( avt )
|
||||
{
|
||||
avt_state *state = screen->machine().driver_data<avt_state>();
|
||||
avt_state *state = screen.machine().driver_data<avt_state>();
|
||||
int x,y;
|
||||
int count;
|
||||
const gfx_element *gfx = screen->machine().gfx[0];
|
||||
const gfx_element *gfx = screen.machine().gfx[0];
|
||||
|
||||
count = 0;
|
||||
|
||||
|
@ -82,59 +82,69 @@ static VIDEO_START( backfire )
|
||||
|
||||
|
||||
|
||||
static SCREEN_UPDATE( backfire )
|
||||
static SCREEN_UPDATE( backfire_left )
|
||||
{
|
||||
backfire_state *state = screen->machine().driver_data<backfire_state>();
|
||||
backfire_state *state = screen.machine().driver_data<backfire_state>();
|
||||
|
||||
//FIXME: flip_screen_x should not be written!
|
||||
flip_screen_set_no_update(screen->machine(), 1);
|
||||
flip_screen_set_no_update(screen.machine(), 1);
|
||||
|
||||
/* screen 1 uses pf1 as the forground and pf3 as the background */
|
||||
/* screen 2 uses pf2 as the foreground and pf4 as the background */
|
||||
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
|
||||
deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf4_rowscroll);
|
||||
|
||||
if (screen == state->m_lscreen)
|
||||
{
|
||||
|
||||
bitmap_fill(screen->machine().priority_bitmap, NULL, 0);
|
||||
bitmap_fill(screen.machine().priority_bitmap, NULL, 0);
|
||||
bitmap_fill(bitmap, cliprect, 0x100);
|
||||
|
||||
if (state->m_left_priority[0] == 0)
|
||||
{
|
||||
deco16ic_tilemap_1_draw(state->m_deco_tilegen2, bitmap, cliprect, 0, 1);
|
||||
deco16ic_tilemap_1_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 2);
|
||||
screen->machine().device<decospr_device>("spritegen")->draw_sprites(screen->machine(), bitmap, cliprect, state->m_spriteram_1, 0x800);
|
||||
screen.machine().device<decospr_device>("spritegen")->draw_sprites(screen.machine(), bitmap, cliprect, state->m_spriteram_1, 0x800);
|
||||
}
|
||||
else if (state->m_left_priority[0] == 2)
|
||||
{
|
||||
deco16ic_tilemap_1_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 2);
|
||||
deco16ic_tilemap_1_draw(state->m_deco_tilegen2, bitmap, cliprect, 0, 4);
|
||||
screen->machine().device<decospr_device>("spritegen")->draw_sprites(screen->machine(), bitmap, cliprect, state->m_spriteram_1, 0x800);
|
||||
screen.machine().device<decospr_device>("spritegen")->draw_sprites(screen.machine(), bitmap, cliprect, state->m_spriteram_1, 0x800);
|
||||
}
|
||||
else
|
||||
popmessage( "unknown left priority %08x", state->m_left_priority[0]);
|
||||
}
|
||||
else if (screen == state->m_rscreen)
|
||||
{
|
||||
bitmap_fill(screen->machine().priority_bitmap, NULL, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static SCREEN_UPDATE( backfire_right )
|
||||
{
|
||||
backfire_state *state = screen.machine().driver_data<backfire_state>();
|
||||
|
||||
//FIXME: flip_screen_x should not be written!
|
||||
flip_screen_set_no_update(screen.machine(), 1);
|
||||
|
||||
/* screen 1 uses pf1 as the forground and pf3 as the background */
|
||||
/* screen 2 uses pf2 as the foreground and pf4 as the background */
|
||||
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
|
||||
deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf4_rowscroll);
|
||||
|
||||
bitmap_fill(screen.machine().priority_bitmap, NULL, 0);
|
||||
bitmap_fill(bitmap, cliprect, 0x500);
|
||||
|
||||
if (state->m_right_priority[0] == 0)
|
||||
{
|
||||
deco16ic_tilemap_2_draw(state->m_deco_tilegen2, bitmap, cliprect, 0, 1);
|
||||
deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 2);
|
||||
screen->machine().device<decospr_device>("spritegen2")->draw_sprites(screen->machine(), bitmap, cliprect, state->m_spriteram_2, 0x800);
|
||||
screen.machine().device<decospr_device>("spritegen2")->draw_sprites(screen.machine(), bitmap, cliprect, state->m_spriteram_2, 0x800);
|
||||
}
|
||||
else if (state->m_right_priority[0] == 2)
|
||||
{
|
||||
deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 2);
|
||||
deco16ic_tilemap_2_draw(state->m_deco_tilegen2, bitmap, cliprect, 0, 4);
|
||||
screen->machine().device<decospr_device>("spritegen2")->draw_sprites(screen->machine(), bitmap, cliprect, state->m_spriteram_2, 0x800);
|
||||
screen.machine().device<decospr_device>("spritegen2")->draw_sprites(screen.machine(), bitmap, cliprect, state->m_spriteram_2, 0x800);
|
||||
}
|
||||
else
|
||||
popmessage( "unknown right priority %08x", state->m_right_priority[0]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -486,7 +496,7 @@ static MACHINE_CONFIG_START( backfire, backfire_state )
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
|
||||
MCFG_SCREEN_SIZE(40*8, 32*8)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 1*8, 31*8-1)
|
||||
MCFG_SCREEN_UPDATE(backfire)
|
||||
MCFG_SCREEN_UPDATE(backfire_left)
|
||||
|
||||
MCFG_SCREEN_ADD("rscreen", RASTER)
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
@ -494,7 +504,7 @@ static MACHINE_CONFIG_START( backfire, backfire_state )
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
|
||||
MCFG_SCREEN_SIZE(40*8, 32*8)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 1*8, 31*8-1)
|
||||
MCFG_SCREEN_UPDATE(backfire)
|
||||
MCFG_SCREEN_UPDATE(backfire_right)
|
||||
|
||||
MCFG_VIDEO_START(backfire)
|
||||
|
||||
|
@ -693,9 +693,9 @@ static void scanline_update_bootleg(screen_device &screen, int scanline)
|
||||
{
|
||||
/* sound IRQ is on 32V */
|
||||
// if (scanline & 32)
|
||||
// atarigen_6502_irq_ack_r(screen->machine(), 0);
|
||||
// atarigen_6502_irq_ack_r(screen.machine(), 0);
|
||||
// else if (!(input_port_read(machine, "FE4000") & 0x40))
|
||||
// atarigen_6502_irq_gen(screen->machine().device("audiocpu"));
|
||||
// atarigen_6502_irq_gen(screen.machine().device("audiocpu"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -666,7 +666,7 @@ static const ym2610_interface ym2610_config =
|
||||
|
||||
static SCREEN_EOF( bbuster )
|
||||
{
|
||||
address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM);
|
||||
address_space *space = screen.machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
|
||||
buffer_spriteram16_w(space,0,0,0xffff);
|
||||
buffer_spriteram16_2_w(space,0,0,0xffff);
|
||||
@ -674,7 +674,7 @@ static SCREEN_EOF( bbuster )
|
||||
|
||||
static SCREEN_EOF( mechatt )
|
||||
{
|
||||
address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM);
|
||||
address_space *space = screen.machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
buffer_spriteram16_w(space,0,0,0xffff);
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,7 @@ static MACHINE_RESET( beaminv )
|
||||
|
||||
static SCREEN_UPDATE( beaminv )
|
||||
{
|
||||
beaminv_state *state = screen->machine().driver_data<beaminv_state>();
|
||||
beaminv_state *state = screen.machine().driver_data<beaminv_state>();
|
||||
offs_t offs;
|
||||
|
||||
for (offs = 0; offs < state->m_videoram_size; offs++)
|
||||
|
@ -446,11 +446,11 @@ static void get_pens(running_machine &machine, pen_t *pens)
|
||||
|
||||
static SCREEN_UPDATE( berzerk )
|
||||
{
|
||||
berzerk_state *state = screen->machine().driver_data<berzerk_state>();
|
||||
berzerk_state *state = screen.machine().driver_data<berzerk_state>();
|
||||
pen_t pens[NUM_PENS];
|
||||
offs_t offs;
|
||||
|
||||
get_pens(screen->machine(), pens);
|
||||
get_pens(screen.machine(), pens);
|
||||
|
||||
for (offs = 0; offs < state->m_videoram_size; offs++)
|
||||
{
|
||||
|
@ -165,7 +165,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta
|
||||
|
||||
static SCREEN_UPDATE(bestleag)
|
||||
{
|
||||
bestleag_state *state = screen->machine().driver_data<bestleag_state>();
|
||||
bestleag_state *state = screen.machine().driver_data<bestleag_state>();
|
||||
tilemap_set_scrollx(state->m_bg_tilemap,0,(state->m_vregs[0x00/2] & 0xfff) + (state->m_vregs[0x08/2] & 0x7) - 3);
|
||||
tilemap_set_scrolly(state->m_bg_tilemap,0,state->m_vregs[0x02/2]);
|
||||
tilemap_set_scrollx(state->m_tx_tilemap,0,state->m_vregs[0x04/2]);
|
||||
@ -175,14 +175,14 @@ static SCREEN_UPDATE(bestleag)
|
||||
|
||||
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap,0,0);
|
||||
tilemap_draw(bitmap,cliprect,state->m_fg_tilemap,0,0);
|
||||
draw_sprites(screen->machine(),bitmap,cliprect);
|
||||
draw_sprites(screen.machine(),bitmap,cliprect);
|
||||
tilemap_draw(bitmap,cliprect,state->m_tx_tilemap,0,0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static SCREEN_UPDATE(bestleaw)
|
||||
{
|
||||
bestleag_state *state = screen->machine().driver_data<bestleag_state>();
|
||||
bestleag_state *state = screen.machine().driver_data<bestleag_state>();
|
||||
tilemap_set_scrollx(state->m_bg_tilemap,0,state->m_vregs[0x08/2]);
|
||||
tilemap_set_scrolly(state->m_bg_tilemap,0,state->m_vregs[0x0a/2]);
|
||||
tilemap_set_scrollx(state->m_tx_tilemap,0,state->m_vregs[0x00/2]);
|
||||
@ -192,7 +192,7 @@ static SCREEN_UPDATE(bestleaw)
|
||||
|
||||
tilemap_draw(bitmap,cliprect,state->m_bg_tilemap,0,0);
|
||||
tilemap_draw(bitmap,cliprect,state->m_fg_tilemap,0,0);
|
||||
draw_sprites(screen->machine(),bitmap,cliprect);
|
||||
draw_sprites(screen.machine(),bitmap,cliprect);
|
||||
tilemap_draw(bitmap,cliprect,state->m_tx_tilemap,0,0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -341,7 +341,7 @@ static VIDEO_START( bfcobra )
|
||||
|
||||
static SCREEN_UPDATE( bfcobra )
|
||||
{
|
||||
bfcobra_state *state = screen->machine().driver_data<bfcobra_state>();
|
||||
bfcobra_state *state = screen.machine().driver_data<bfcobra_state>();
|
||||
int x, y;
|
||||
UINT8 *src;
|
||||
UINT32 *dest;
|
||||
@ -385,13 +385,13 @@ static SCREEN_UPDATE( bfcobra )
|
||||
|
||||
if ( ( state->m_videomode & 0x81 ) == 1 || (state->m_videomode & 0x80 && pen & 0x80) )
|
||||
{
|
||||
*dest++ = screen->machine().pens[hirescol[pen & 0x0f]];
|
||||
*dest++ = screen->machine().pens[hirescol[(pen >> 4) & 0x0f]];
|
||||
*dest++ = screen.machine().pens[hirescol[pen & 0x0f]];
|
||||
*dest++ = screen.machine().pens[hirescol[(pen >> 4) & 0x0f]];
|
||||
}
|
||||
else
|
||||
{
|
||||
*dest++ = screen->machine().pens[lorescol[pen]];
|
||||
*dest++ = screen->machine().pens[lorescol[pen]];
|
||||
*dest++ = screen.machine().pens[lorescol[pen]];
|
||||
*dest++ = screen.machine().pens[lorescol[pen]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1403,10 +1403,10 @@ static MACHINE_RESET( init )
|
||||
|
||||
static SCREEN_UPDATE( addersc2 )
|
||||
{
|
||||
bfm_sc2_state *state = screen->machine().driver_data<bfm_sc2_state>();
|
||||
bfm_sc2_state *state = screen.machine().driver_data<bfm_sc2_state>();
|
||||
if ( state->m_sc2_show_door )
|
||||
{
|
||||
output_set_value("door",( Scorpion2_GetSwitchState(screen->machine(),state->m_sc2_door_state>>4, state->m_sc2_door_state & 0x0F) ) );
|
||||
output_set_value("door",( Scorpion2_GetSwitchState(screen.machine(),state->m_sc2_door_state>>4, state->m_sc2_door_state & 0x0F) ) );
|
||||
}
|
||||
|
||||
return SCREEN_UPDATE_CALL(adder2);
|
||||
|
@ -459,10 +459,10 @@ static VIDEO_START(bingor)
|
||||
|
||||
static SCREEN_UPDATE(bingor)
|
||||
{
|
||||
bingor_state *state = screen->machine().driver_data<bingor_state>();
|
||||
bingor_state *state = screen.machine().driver_data<bingor_state>();
|
||||
int x,y,count;
|
||||
|
||||
bitmap_fill(bitmap,cliprect,get_black_pen(screen->machine()));
|
||||
bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
|
||||
|
||||
count = (0x2000/2);
|
||||
|
||||
@ -474,23 +474,23 @@ static SCREEN_UPDATE(bingor)
|
||||
|
||||
color = (state->m_blit_ram[count] & 0xf000)>>12;
|
||||
|
||||
if((x+3)<screen->visible_area().max_x && ((y)+0)<screen->visible_area().max_y)
|
||||
*BITMAP_ADDR32(bitmap, y, x+3) = screen->machine().pens[color];
|
||||
if((x+3)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
|
||||
*BITMAP_ADDR32(bitmap, y, x+3) = screen.machine().pens[color];
|
||||
|
||||
color = (state->m_blit_ram[count] & 0x0f00)>>8;
|
||||
|
||||
if((x+2)<screen->visible_area().max_x && ((y)+0)<screen->visible_area().max_y)
|
||||
*BITMAP_ADDR32(bitmap, y, x+2) = screen->machine().pens[color];
|
||||
if((x+2)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
|
||||
*BITMAP_ADDR32(bitmap, y, x+2) = screen.machine().pens[color];
|
||||
|
||||
color = (state->m_blit_ram[count] & 0x00f0)>>4;
|
||||
|
||||
if((x+1)<screen->visible_area().max_x && ((y)+0)<screen->visible_area().max_y)
|
||||
*BITMAP_ADDR32(bitmap, y, x+1) = screen->machine().pens[color];
|
||||
if((x+1)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
|
||||
*BITMAP_ADDR32(bitmap, y, x+1) = screen.machine().pens[color];
|
||||
|
||||
color = (state->m_blit_ram[count] & 0x000f)>>0;
|
||||
|
||||
if((x+0)<screen->visible_area().max_x && ((y)+0)<screen->visible_area().max_y)
|
||||
*BITMAP_ADDR32(bitmap, y, x+0) = screen->machine().pens[color];
|
||||
if((x+0)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
|
||||
*BITMAP_ADDR32(bitmap, y, x+0) = screen.machine().pens[color];
|
||||
|
||||
count++;
|
||||
}
|
||||
|
@ -130,15 +130,15 @@ static void draw_main(running_machine &machine, bitmap_t *bitmap, const rectangl
|
||||
|
||||
static SCREEN_UPDATE( blackt96 )
|
||||
{
|
||||
blackt96_state *state = screen->machine().driver_data<blackt96_state>();
|
||||
blackt96_state *state = screen.machine().driver_data<blackt96_state>();
|
||||
int count;
|
||||
int x,y;
|
||||
const gfx_element *gfx = screen->machine().gfx[2];
|
||||
const gfx_element *gfx = screen.machine().gfx[2];
|
||||
|
||||
bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine()));
|
||||
bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
|
||||
|
||||
draw_main(screen->machine(),bitmap,cliprect,1);
|
||||
draw_main(screen->machine(),bitmap,cliprect,0);
|
||||
draw_main(screen.machine(),bitmap,cliprect,1);
|
||||
draw_main(screen.machine(),bitmap,cliprect,0);
|
||||
|
||||
/* Text Layer */
|
||||
count = 0;
|
||||
|
@ -354,7 +354,7 @@ static VIDEO_START( megadpkr )
|
||||
|
||||
static SCREEN_UPDATE( megadpkr )
|
||||
{
|
||||
blitz_state *state = screen->machine().driver_data<blitz_state>();
|
||||
blitz_state *state = screen.machine().driver_data<blitz_state>();
|
||||
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ static VIDEO_START(blitz68k_addr_factor1)
|
||||
|
||||
static SCREEN_UPDATE(blitz68k)
|
||||
{
|
||||
blitz68k_state *state = screen->machine().driver_data<blitz68k_state>();
|
||||
blitz68k_state *state = screen.machine().driver_data<blitz68k_state>();
|
||||
int x,y;
|
||||
|
||||
UINT8 *src = state->m_blit_buffer;
|
||||
@ -101,7 +101,7 @@ static SCREEN_UPDATE(blitz68k)
|
||||
{
|
||||
for(x = 0; x < 512; x++)
|
||||
{
|
||||
*BITMAP_ADDR32(bitmap, y, x) = screen->machine().pens[*src++];
|
||||
*BITMAP_ADDR32(bitmap, y, x) = screen.machine().pens[*src++];
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ static SCREEN_UPDATE(blitz68k)
|
||||
|
||||
static SCREEN_UPDATE(blitz68k_noblit)
|
||||
{
|
||||
blitz68k_state *state = screen->machine().driver_data<blitz68k_state>();
|
||||
blitz68k_state *state = screen.machine().driver_data<blitz68k_state>();
|
||||
int x,y;
|
||||
|
||||
UINT16 *src = state->m_frame_buffer;
|
||||
@ -123,10 +123,10 @@ static SCREEN_UPDATE(blitz68k_noblit)
|
||||
for(x = 0; x < 512; )
|
||||
{
|
||||
UINT16 pen = *src++;
|
||||
*BITMAP_ADDR32(bitmap, y, x++) = screen->machine().pens[(pen >> 8) & 0xf];
|
||||
*BITMAP_ADDR32(bitmap, y, x++) = screen->machine().pens[(pen >> 12) & 0xf];
|
||||
*BITMAP_ADDR32(bitmap, y, x++) = screen->machine().pens[(pen >> 0) & 0xf];
|
||||
*BITMAP_ADDR32(bitmap, y, x++) = screen->machine().pens[(pen >> 4) & 0xf];
|
||||
*BITMAP_ADDR32(bitmap, y, x++) = screen.machine().pens[(pen >> 8) & 0xf];
|
||||
*BITMAP_ADDR32(bitmap, y, x++) = screen.machine().pens[(pen >> 12) & 0xf];
|
||||
*BITMAP_ADDR32(bitmap, y, x++) = screen.machine().pens[(pen >> 0) & 0xf];
|
||||
*BITMAP_ADDR32(bitmap, y, x++) = screen.machine().pens[(pen >> 4) & 0xf];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,14 +133,14 @@ static VIDEO_START( bmcbowl )
|
||||
|
||||
static SCREEN_UPDATE( bmcbowl )
|
||||
{
|
||||
bmcbowl_state *state = screen->machine().driver_data<bmcbowl_state>();
|
||||
bmcbowl_state *state = screen.machine().driver_data<bmcbowl_state>();
|
||||
/*
|
||||
280x230,4 bitmap layers, 8bpp,
|
||||
missing scroll and priorities (maybe fixed ones)
|
||||
*/
|
||||
|
||||
int x,y,z,pixdat;
|
||||
bitmap_fill(bitmap,cliprect,get_black_pen(screen->machine()));
|
||||
bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
|
||||
|
||||
z=0;
|
||||
for (y=0;y<230;y++)
|
||||
|
@ -511,16 +511,12 @@ static VIDEO_START(bnstars)
|
||||
|
||||
|
||||
|
||||
static SCREEN_UPDATE(bnstars)
|
||||
static SCREEN_UPDATE(bnstars_left)
|
||||
{
|
||||
bnstars_state *state = screen->machine().driver_data<bnstars_state>();
|
||||
device_t *left_screen = screen->machine().device("lscreen");
|
||||
device_t *right_screen = screen->machine().device("rscreen");
|
||||
bnstars_state *state = screen.machine().driver_data<bnstars_state>();
|
||||
|
||||
bitmap_fill(screen->machine().priority_bitmap,cliprect,0);
|
||||
bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
|
||||
|
||||
if (screen==left_screen)
|
||||
{
|
||||
bitmap_fill(bitmap,cliprect,0); /* bg color */
|
||||
|
||||
|
||||
@ -528,17 +524,24 @@ static SCREEN_UPDATE(bnstars)
|
||||
tilemap_set_scrolly(state->m_ms32_bg_tilemap[0], 0, state->m_ms32_bg0_scroll[0x0c/4] + state->m_ms32_bg0_scroll[0x14/4] );
|
||||
tilemap_draw(bitmap,cliprect,state->m_ms32_bg_tilemap[0],0,1);
|
||||
|
||||
draw_roz(screen->machine(),bitmap,cliprect,2,0);
|
||||
draw_roz(screen.machine(),bitmap,cliprect,2,0);
|
||||
|
||||
tilemap_set_scrollx(state->m_ms32_tx_tilemap[0], 0, state->m_ms32_tx0_scroll[0x00/4] + state->m_ms32_tx0_scroll[0x08/4] + 0x18);
|
||||
tilemap_set_scrolly(state->m_ms32_tx_tilemap[0], 0, state->m_ms32_tx0_scroll[0x0c/4] + state->m_ms32_tx0_scroll[0x14/4]);
|
||||
tilemap_draw(bitmap,cliprect,state->m_ms32_tx_tilemap[0],0,4);
|
||||
|
||||
|
||||
draw_sprites(screen->machine(),bitmap,cliprect, state->m_ms32_spram, 0x20000, 0);
|
||||
}
|
||||
else if (screen == right_screen)
|
||||
{
|
||||
draw_sprites(screen.machine(),bitmap,cliprect, state->m_ms32_spram, 0x20000, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static SCREEN_UPDATE(bnstars_right)
|
||||
{
|
||||
bnstars_state *state = screen.machine().driver_data<bnstars_state>();
|
||||
|
||||
bitmap_fill(screen.machine().priority_bitmap,cliprect,0);
|
||||
|
||||
bitmap_fill(bitmap,cliprect,0x8000+0); /* bg color */
|
||||
|
||||
|
||||
@ -546,14 +549,13 @@ static SCREEN_UPDATE(bnstars)
|
||||
tilemap_set_scrolly(state->m_ms32_bg_tilemap[1], 0, state->m_ms32_bg1_scroll[0x0c/4] + state->m_ms32_bg1_scroll[0x14/4] );
|
||||
tilemap_draw(bitmap,cliprect,state->m_ms32_bg_tilemap[1],0,1);
|
||||
|
||||
draw_roz(screen->machine(),bitmap,cliprect,2,1);
|
||||
draw_roz(screen.machine(),bitmap,cliprect,2,1);
|
||||
|
||||
tilemap_set_scrollx(state->m_ms32_tx_tilemap[1], 0, state->m_ms32_tx1_scroll[0x00/4] + state->m_ms32_tx1_scroll[0x08/4] + 0x18);
|
||||
tilemap_set_scrolly(state->m_ms32_tx_tilemap[1], 0, state->m_ms32_tx1_scroll[0x0c/4] + state->m_ms32_tx1_scroll[0x14/4]);
|
||||
tilemap_draw(bitmap,cliprect,state->m_ms32_tx_tilemap[1],0,4);
|
||||
|
||||
draw_sprites(screen->machine(),bitmap,cliprect, state->m_ms32_spram+(0x20000/4), 0x20000, 4);
|
||||
}
|
||||
draw_sprites(screen.machine(),bitmap,cliprect, state->m_ms32_spram+(0x20000/4), 0x20000, 4);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1379,7 +1381,7 @@ static MACHINE_CONFIG_START( bnstars, bnstars_state )
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MCFG_SCREEN_SIZE(40*8, 32*8)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
|
||||
MCFG_SCREEN_UPDATE(bnstars)
|
||||
MCFG_SCREEN_UPDATE(bnstars_left)
|
||||
|
||||
MCFG_SCREEN_ADD("rscreen", RASTER)
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
@ -1387,7 +1389,7 @@ static MACHINE_CONFIG_START( bnstars, bnstars_state )
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MCFG_SCREEN_SIZE(40*8, 32*8)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
|
||||
MCFG_SCREEN_UPDATE(bnstars)
|
||||
MCFG_SCREEN_UPDATE(bnstars_right)
|
||||
|
||||
MCFG_VIDEO_START(bnstars)
|
||||
|
||||
|
@ -159,7 +159,7 @@ static void draw_boxer( running_machine &machine, bitmap_t* bitmap, const rectan
|
||||
|
||||
static SCREEN_UPDATE( boxer )
|
||||
{
|
||||
boxer_state *state = screen->machine().driver_data<boxer_state>();
|
||||
boxer_state *state = screen.machine().driver_data<boxer_state>();
|
||||
int i, j;
|
||||
|
||||
bitmap_fill(bitmap, cliprect, 1);
|
||||
@ -171,7 +171,7 @@ static SCREEN_UPDATE( boxer )
|
||||
UINT8 code = state->m_tile_ram[32 * i + j];
|
||||
|
||||
drawgfx_transpen(bitmap, cliprect,
|
||||
screen->machine().gfx[2],
|
||||
screen.machine().gfx[2],
|
||||
code,
|
||||
0,
|
||||
code & 0x40, code & 0x40,
|
||||
@ -180,7 +180,7 @@ static SCREEN_UPDATE( boxer )
|
||||
}
|
||||
}
|
||||
|
||||
draw_boxer(screen->machine(), bitmap, cliprect);
|
||||
draw_boxer(screen.machine(), bitmap, cliprect);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -28,8 +28,8 @@ static VIDEO_START(buster)
|
||||
|
||||
static SCREEN_UPDATE(buster)
|
||||
{
|
||||
buster_state *state = screen->machine().driver_data<buster_state>();
|
||||
const gfx_element *gfx = screen->machine().gfx[0];
|
||||
buster_state *state = screen.machine().driver_data<buster_state>();
|
||||
const gfx_element *gfx = screen.machine().gfx[0];
|
||||
int count = 0x0000;
|
||||
|
||||
int y,x;
|
||||
|
@ -106,8 +106,8 @@ static VIDEO_START(cabaret)
|
||||
|
||||
static SCREEN_UPDATE(cabaret)
|
||||
{
|
||||
cabaret_state *state = screen->machine().driver_data<cabaret_state>();
|
||||
bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine()));
|
||||
cabaret_state *state = screen.machine().driver_data<cabaret_state>();
|
||||
bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
|
||||
|
||||
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
|
||||
|
||||
|
@ -164,10 +164,10 @@ static VIDEO_START(calchase)
|
||||
/*GRULL-ADDVGA
|
||||
static SCREEN_UPDATE(calchase)
|
||||
{
|
||||
calchase_state *state = screen->machine().driver_data<calchase_state>();
|
||||
calchase_state *state = screen.machine().driver_data<calchase_state>();
|
||||
int x,y,count,i;
|
||||
|
||||
bitmap_fill(bitmap,cliprect,get_black_pen(screen->machine()));
|
||||
bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
|
||||
|
||||
count = (0);
|
||||
|
||||
@ -181,8 +181,8 @@ static SCREEN_UPDATE(calchase)
|
||||
|
||||
color = (state->m_vga_vram[count])>>(32-i) & 0x1;
|
||||
|
||||
if((x+i)<screen->visible_area().max_x && ((y)+0)<screen->visible_area().max_y)
|
||||
*BITMAP_ADDR32(bitmap, y, x+(32-i)) = screen->machine().pens[color];
|
||||
if((x+i)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
|
||||
*BITMAP_ADDR32(bitmap, y, x+(32-i)) = screen.machine().pens[color];
|
||||
|
||||
}
|
||||
|
||||
|
@ -141,7 +141,7 @@ static VIDEO_START( calorie )
|
||||
|
||||
static SCREEN_UPDATE( calorie )
|
||||
{
|
||||
calorie_state *state = screen->machine().driver_data<calorie_state>();
|
||||
calorie_state *state = screen.machine().driver_data<calorie_state>();
|
||||
int x;
|
||||
|
||||
if (state->m_bg_bank & 0x10)
|
||||
@ -166,7 +166,7 @@ static SCREEN_UPDATE( calorie )
|
||||
ypos = 0xff - state->m_sprites[x + 2];
|
||||
xpos = state->m_sprites[x + 3];
|
||||
|
||||
if (flip_screen_get(screen->machine()))
|
||||
if (flip_screen_get(screen.machine()))
|
||||
{
|
||||
if (state->m_sprites[x + 1] & 0x10)
|
||||
ypos = 0xff - ypos + 32;
|
||||
@ -181,12 +181,12 @@ static SCREEN_UPDATE( calorie )
|
||||
if (state->m_sprites[x + 1] & 0x10)
|
||||
{
|
||||
/* 32x32 sprites */
|
||||
drawgfx_transpen(bitmap, cliprect, screen->machine().gfx[3], tileno | 0x40, color, flipx, flipy, xpos, ypos - 31, 0);
|
||||
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[3], tileno | 0x40, color, flipx, flipy, xpos, ypos - 31, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 16x16 sprites */
|
||||
drawgfx_transpen(bitmap, cliprect, screen->machine().gfx[2], tileno, color, flipx, flipy, xpos, ypos - 15, 0);
|
||||
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[2], tileno, color, flipx, flipy, xpos, ypos - 15, 0);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
|
||||
static SCREEN_UPDATE( cardline )
|
||||
{
|
||||
cardline_state *state = screen->machine().driver_data<cardline_state>();
|
||||
cardline_state *state = screen.machine().driver_data<cardline_state>();
|
||||
int x,y;
|
||||
bitmap_fill(bitmap,cliprect,0);
|
||||
for(y=0;y<32;y++)
|
||||
@ -56,14 +56,14 @@ static SCREEN_UPDATE( cardline )
|
||||
int index=y*64+x;
|
||||
if(state->m_video&1)
|
||||
{
|
||||
DRAW_TILE(screen->machine(),0,0);
|
||||
DRAW_TILE(screen->machine(),0x800,1);
|
||||
DRAW_TILE(screen.machine(),0,0);
|
||||
DRAW_TILE(screen.machine(),0x800,1);
|
||||
}
|
||||
|
||||
if(state->m_video&2)
|
||||
{
|
||||
DRAW_TILE(screen->machine(),0x1000,0);
|
||||
DRAW_TILE(screen->machine(),0x1800,1);
|
||||
DRAW_TILE(screen.machine(),0x1000,0);
|
||||
DRAW_TILE(screen.machine(),0x1800,1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ GFXDECODE_END
|
||||
|
||||
static SCREEN_UPDATE(carrera)
|
||||
{
|
||||
carrera_state *state = screen->machine().driver_data<carrera_state>();
|
||||
carrera_state *state = screen.machine().driver_data<carrera_state>();
|
||||
|
||||
int x,y;
|
||||
int count = 0;
|
||||
@ -257,7 +257,7 @@ static SCREEN_UPDATE(carrera)
|
||||
{
|
||||
int tile = state->m_tileram[count&0x7ff] | state->m_tileram[(count&0x7ff)+0x800]<<8;
|
||||
|
||||
drawgfx_opaque(bitmap,cliprect,screen->machine().gfx[0],tile,0,0,0,x*8,y*8);
|
||||
drawgfx_opaque(bitmap,cliprect,screen.machine().gfx[0],tile,0,0,0,x*8,y*8);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ static VIDEO_START(vvillage)
|
||||
|
||||
static SCREEN_UPDATE(vvillage)
|
||||
{
|
||||
caswin_state *state = screen->machine().driver_data<caswin_state>();
|
||||
caswin_state *state = screen.machine().driver_data<caswin_state>();
|
||||
tilemap_draw(bitmap,cliprect,state->m_sc0_tilemap,0,0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -328,9 +328,9 @@ static const rectangle visible3 = { 0*8, (14+48)*8-1, 17*8, (17+7)*8-1 };
|
||||
|
||||
static SCREEN_UPDATE(cb2001)
|
||||
{
|
||||
cb2001_state *state = screen->machine().driver_data<cb2001_state>();
|
||||
cb2001_state *state = screen.machine().driver_data<cb2001_state>();
|
||||
int count,x,y;
|
||||
bitmap_fill(bitmap,cliprect,get_black_pen(screen->machine()));
|
||||
bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
|
||||
|
||||
count = 0x0000;
|
||||
|
||||
@ -351,7 +351,7 @@ static SCREEN_UPDATE(cb2001)
|
||||
tile += state->m_videobank*0x2000;
|
||||
|
||||
|
||||
drawgfx_opaque(bitmap,cliprect,screen->machine().gfx[0],tile,colour,0,0,x*8,y*8);
|
||||
drawgfx_opaque(bitmap,cliprect,screen.machine().gfx[0],tile,colour,0,0,x*8,y*8);
|
||||
|
||||
count++;
|
||||
}
|
||||
@ -412,7 +412,7 @@ static SCREEN_UPDATE(cb2001)
|
||||
tile += 0x1000;
|
||||
}
|
||||
|
||||
drawgfx_transpen(bitmap,cliprect,screen->machine().gfx[0],tile,colour,0,0,x*8,y*8,0);
|
||||
drawgfx_transpen(bitmap,cliprect,screen.machine().gfx[0],tile,colour,0,0,x*8,y*8,0);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
@ -52,13 +52,13 @@ static VIDEO_START( cball )
|
||||
|
||||
static SCREEN_UPDATE( cball )
|
||||
{
|
||||
cball_state *state = screen->machine().driver_data<cball_state>();
|
||||
cball_state *state = screen.machine().driver_data<cball_state>();
|
||||
|
||||
/* draw playfield */
|
||||
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
|
||||
|
||||
/* draw sprite */
|
||||
drawgfx_transpen(bitmap, cliprect, screen->machine().gfx[1],
|
||||
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[1],
|
||||
state->m_video_ram[0x399] >> 4,
|
||||
0,
|
||||
0, 0,
|
||||
|
@ -288,7 +288,7 @@ static VIDEO_START( cham24 )
|
||||
static SCREEN_UPDATE( cham24 )
|
||||
{
|
||||
/* render the ppu */
|
||||
ppu2c0x_render(screen->machine().device("ppu"), bitmap, 0, 0, 0, 0);
|
||||
ppu2c0x_render(screen.machine().device("ppu"), bitmap, 0, 0, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -97,11 +97,11 @@ TODO:
|
||||
|
||||
static SCREEN_EOF( champbas )
|
||||
{
|
||||
champbas_state *state = machine.driver_data<champbas_state>();
|
||||
champbas_state *state = screen.machine().driver_data<champbas_state>();
|
||||
state->m_watchdog_count++;
|
||||
|
||||
if (state->m_watchdog_count == 0x10)
|
||||
machine.schedule_soft_reset();
|
||||
screen.machine().schedule_soft_reset();
|
||||
}
|
||||
|
||||
|
||||
|
@ -453,16 +453,16 @@ SCREEN_UPDATE( champbwl )
|
||||
{
|
||||
bitmap_fill(bitmap, cliprect, 0x1f0);
|
||||
|
||||
screen->machine().device<seta001_device>("spritegen")->set_fg_yoffsets( -0x12, 0x0e );
|
||||
screen->machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x1, -0x1 );
|
||||
screen.machine().device<seta001_device>("spritegen")->set_fg_yoffsets( -0x12, 0x0e );
|
||||
screen.machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x1, -0x1 );
|
||||
|
||||
screen->machine().device<seta001_device>("spritegen")->seta001_draw_sprites(screen->machine(), bitmap, cliprect, 0x800, 1 );
|
||||
screen.machine().device<seta001_device>("spritegen")->seta001_draw_sprites(screen.machine(), bitmap, cliprect, 0x800, 1 );
|
||||
return 0;
|
||||
}
|
||||
|
||||
SCREEN_EOF( champbwl )
|
||||
{
|
||||
machine.device<seta001_device>("spritegen")->tnzs_eof();
|
||||
screen.machine().device<seta001_device>("spritegen")->tnzs_eof();
|
||||
}
|
||||
|
||||
|
||||
@ -511,16 +511,16 @@ static SCREEN_UPDATE( doraemon )
|
||||
{
|
||||
bitmap_fill(bitmap, cliprect, 0x1f0);
|
||||
|
||||
screen->machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x00, 0x01 );
|
||||
screen->machine().device<seta001_device>("spritegen")->set_fg_yoffsets( 0x00, 0x10 );
|
||||
screen.machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x00, 0x01 );
|
||||
screen.machine().device<seta001_device>("spritegen")->set_fg_yoffsets( 0x00, 0x10 );
|
||||
|
||||
screen->machine().device<seta001_device>("spritegen")->seta001_draw_sprites(screen->machine(), bitmap, cliprect, 0x800, 1 );
|
||||
screen.machine().device<seta001_device>("spritegen")->seta001_draw_sprites(screen.machine(), bitmap, cliprect, 0x800, 1 );
|
||||
return 0;
|
||||
}
|
||||
|
||||
static SCREEN_EOF( doraemon )
|
||||
{
|
||||
machine.device<seta001_device>("spritegen")->setac_eof();
|
||||
screen.machine().device<seta001_device>("spritegen")->setac_eof();
|
||||
}
|
||||
|
||||
static MACHINE_START( doraemon )
|
||||
|
@ -194,11 +194,11 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
|
||||
|
||||
static SCREEN_UPDATE( chanbara )
|
||||
{
|
||||
chanbara_state *state = screen->machine().driver_data<chanbara_state>();
|
||||
chanbara_state *state = screen.machine().driver_data<chanbara_state>();
|
||||
|
||||
tilemap_set_scrolly(state->m_bg2_tilemap, 0, state->m_scroll | (state->m_scrollhi << 8));
|
||||
tilemap_draw(bitmap, cliprect, state->m_bg2_tilemap, 0, 0);
|
||||
draw_sprites(screen->machine(), bitmap, cliprect);
|
||||
draw_sprites(screen.machine(), bitmap, cliprect);
|
||||
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ static VIDEO_START( chinsan )
|
||||
|
||||
static SCREEN_UPDATE( chinsan )
|
||||
{
|
||||
chinsan_state *state = screen->machine().driver_data<chinsan_state>();
|
||||
chinsan_state *state = screen.machine().driver_data<chinsan_state>();
|
||||
int y, x, count;
|
||||
count = 0;
|
||||
for (y = 0; y < 32; y++)
|
||||
@ -96,7 +96,7 @@ static SCREEN_UPDATE( chinsan )
|
||||
int tileno, colour;
|
||||
tileno = state->m_video[count] | (state->m_video[count + 0x800] << 8);
|
||||
colour = state->m_video[count + 0x1000] >> 3;
|
||||
drawgfx_opaque(bitmap,cliprect,screen->machine().gfx[0],tileno,colour,0,0,x*8,y*8);
|
||||
drawgfx_opaque(bitmap,cliprect,screen.machine().gfx[0],tileno,colour,0,0,x*8,y*8);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ static MACHINE_START( clayshoo )
|
||||
|
||||
static SCREEN_UPDATE( clayshoo )
|
||||
{
|
||||
clayshoo_state *state = screen->machine().driver_data<clayshoo_state>();
|
||||
clayshoo_state *state = screen.machine().driver_data<clayshoo_state>();
|
||||
offs_t offs;
|
||||
|
||||
for (offs = 0; offs < state->m_videoram_size; offs++)
|
||||
|
@ -657,7 +657,7 @@ static TMS9928A_INTERFACE(cliffhgr_tms9928a_interface)
|
||||
|
||||
static SCREEN_UPDATE( cliffhgr )
|
||||
{
|
||||
tms9928a_device *tms9928a = screen->machine().device<tms9928a_device>( "tms9928a" );
|
||||
tms9928a_device *tms9928a = screen.machine().device<tms9928a_device>( "tms9928a" );
|
||||
|
||||
tms9928a->update( bitmap, cliprect );
|
||||
return 0;
|
||||
|
@ -63,9 +63,9 @@ static VIDEO_START( cmmb )
|
||||
|
||||
static SCREEN_UPDATE( cmmb )
|
||||
{
|
||||
cmmb_state *state = screen->machine().driver_data<cmmb_state>();
|
||||
cmmb_state *state = screen.machine().driver_data<cmmb_state>();
|
||||
UINT8 *videoram = state->m_videoram;
|
||||
const gfx_element *gfx = screen->machine().gfx[0];
|
||||
const gfx_element *gfx = screen.machine().gfx[0];
|
||||
int count = 0x00000;
|
||||
|
||||
int y,x;
|
||||
|
@ -255,10 +255,10 @@ static void cntsteer_draw_sprites( running_machine &machine, bitmap_t *bitmap, c
|
||||
|
||||
static SCREEN_UPDATE( zerotrgt )
|
||||
{
|
||||
cntsteer_state *state = screen->machine().driver_data<cntsteer_state>();
|
||||
cntsteer_state *state = screen.machine().driver_data<cntsteer_state>();
|
||||
|
||||
if (state->m_disable_roz)
|
||||
bitmap_fill(bitmap, cliprect, screen->machine().pens[8 * state->m_bg_color_bank]);
|
||||
bitmap_fill(bitmap, cliprect, screen.machine().pens[8 * state->m_bg_color_bank]);
|
||||
else
|
||||
{
|
||||
int p1, p2, p3, p4;
|
||||
@ -298,7 +298,7 @@ static SCREEN_UPDATE( zerotrgt )
|
||||
0, 0);
|
||||
}
|
||||
|
||||
zerotrgt_draw_sprites(screen->machine(), bitmap, cliprect);
|
||||
zerotrgt_draw_sprites(screen.machine(), bitmap, cliprect);
|
||||
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 0);
|
||||
|
||||
return 0;
|
||||
@ -306,10 +306,10 @@ static SCREEN_UPDATE( zerotrgt )
|
||||
|
||||
static SCREEN_UPDATE( cntsteer )
|
||||
{
|
||||
cntsteer_state *state = screen->machine().driver_data<cntsteer_state>();
|
||||
cntsteer_state *state = screen.machine().driver_data<cntsteer_state>();
|
||||
|
||||
if (state->m_disable_roz)
|
||||
bitmap_fill(bitmap, cliprect, screen->machine().pens[8 * state->m_bg_color_bank]);
|
||||
bitmap_fill(bitmap, cliprect, screen.machine().pens[8 * state->m_bg_color_bank]);
|
||||
else
|
||||
{
|
||||
int p1, p2, p3, p4;
|
||||
@ -347,7 +347,7 @@ static SCREEN_UPDATE( cntsteer )
|
||||
0, 0);
|
||||
}
|
||||
|
||||
cntsteer_draw_sprites(screen->machine(), bitmap, cliprect);
|
||||
cntsteer_draw_sprites(screen.machine(), bitmap, cliprect);
|
||||
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 0);
|
||||
|
||||
return 0;
|
||||
|
@ -141,7 +141,7 @@ VIDEO_START( cobra )
|
||||
|
||||
SCREEN_UPDATE( cobra )
|
||||
{
|
||||
cobra_state *cobra = screen->machine().driver_data<cobra_state>();
|
||||
cobra_state *cobra = screen.machine().driver_data<cobra_state>();
|
||||
|
||||
if (cobra->polybuffer_ptr > 0)
|
||||
{
|
||||
@ -149,7 +149,7 @@ SCREEN_UPDATE( cobra )
|
||||
|
||||
for (i=0; i < cobra->polybuffer_ptr; i++)
|
||||
{
|
||||
poly_render_triangle(cobra->poly, cobra->framebuffer, &screen->machine().primary_screen->visible_area(), render_texture_scan, 2,
|
||||
poly_render_triangle(cobra->poly, cobra->framebuffer, &screen.machine().primary_screen->visible_area(), render_texture_scan, 2,
|
||||
&cobra->polybuffer[i].v[0], &cobra->polybuffer[i].v[1], &cobra->polybuffer[i].v[2]);
|
||||
poly_wait(cobra->poly, "Finished render");
|
||||
}
|
||||
|
@ -916,7 +916,7 @@ static VIDEO_START( coinmstr )
|
||||
|
||||
static SCREEN_UPDATE( coinmstr )
|
||||
{
|
||||
coinmstr_state *state = screen->machine().driver_data<coinmstr_state>();
|
||||
coinmstr_state *state = screen.machine().driver_data<coinmstr_state>();
|
||||
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -242,8 +242,8 @@ static VIDEO_START( coinmvga )
|
||||
|
||||
static SCREEN_UPDATE( coinmvga )
|
||||
{
|
||||
coinmvga_state *state = screen->machine().driver_data<coinmvga_state>();
|
||||
const gfx_element *gfx = screen->machine().gfx[0];
|
||||
coinmvga_state *state = screen.machine().driver_data<coinmvga_state>();
|
||||
const gfx_element *gfx = screen.machine().gfx[0];
|
||||
int count = 0x04000/2;
|
||||
|
||||
int y,x;
|
||||
|
@ -302,35 +302,35 @@ static VIDEO_START(coolridr)
|
||||
|
||||
static SCREEN_UPDATE(coolridr)
|
||||
{
|
||||
coolridr_state *state = screen->machine().driver_data<coolridr_state>();
|
||||
coolridr_state *state = screen.machine().driver_data<coolridr_state>();
|
||||
/* planes seems to basically be at 0x8000 and 0x28000... */
|
||||
const gfx_element *gfx = screen->machine().gfx[2];
|
||||
const gfx_element *gfx = screen.machine().gfx[2];
|
||||
UINT32 count;
|
||||
int y,x;
|
||||
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_Z))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_Z))
|
||||
state->m_test_offs+=4;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_X))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_X))
|
||||
state->m_test_offs-=4;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_C))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_C))
|
||||
state->m_test_offs+=0x40;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_V))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_V))
|
||||
state->m_test_offs-=0x40;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_B))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_B))
|
||||
state->m_test_offs+=0x400;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_N))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_N))
|
||||
state->m_test_offs-=0x400;
|
||||
|
||||
if(screen->machine().input().code_pressed_once(KEYCODE_A))
|
||||
if(screen.machine().input().code_pressed_once(KEYCODE_A))
|
||||
state->m_color++;
|
||||
|
||||
if(screen->machine().input().code_pressed_once(KEYCODE_S))
|
||||
if(screen.machine().input().code_pressed_once(KEYCODE_S))
|
||||
state->m_color--;
|
||||
|
||||
if(state->m_test_offs > 0x100000*4)
|
||||
|
@ -449,7 +449,7 @@ static VIDEO_START(winner)
|
||||
|
||||
static SCREEN_UPDATE(winner)
|
||||
{
|
||||
corona_state *state = screen->machine().driver_data<corona_state>();
|
||||
corona_state *state = screen.machine().driver_data<corona_state>();
|
||||
int x, y;
|
||||
|
||||
for (y = 0; y < 256; y++)
|
||||
@ -461,7 +461,7 @@ static SCREEN_UPDATE(winner)
|
||||
|
||||
static SCREEN_UPDATE(luckyrlt)
|
||||
{
|
||||
corona_state *state = screen->machine().driver_data<corona_state>();
|
||||
corona_state *state = screen.machine().driver_data<corona_state>();
|
||||
int x, y;
|
||||
|
||||
for (y = 0; y < 256; y++)
|
||||
|
@ -959,10 +959,10 @@ static void cps3_draw_tilemapsprite_line(running_machine &machine, int tmnum, in
|
||||
|
||||
static SCREEN_UPDATE(cps3)
|
||||
{
|
||||
cps3_state *state = screen->machine().driver_data<cps3_state>();
|
||||
cps3_state *state = screen.machine().driver_data<cps3_state>();
|
||||
int y,x, count;
|
||||
attoseconds_t period = screen->frame_period().attoseconds;
|
||||
rectangle visarea = screen->visible_area();
|
||||
attoseconds_t period = screen.frame_period().attoseconds;
|
||||
rectangle visarea = screen.visible_area();
|
||||
|
||||
int bg_drawn[4] = { 0, 0, 0, 0 };
|
||||
|
||||
@ -982,7 +982,7 @@ static SCREEN_UPDATE(cps3)
|
||||
state->m_screenwidth = 496;
|
||||
visarea.min_x = 0; visarea.max_x = 496-1;
|
||||
visarea.min_y = 0; visarea.max_y = 224-1;
|
||||
screen->configure(496, 224, visarea, period);
|
||||
screen.configure(496, 224, visarea, period);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -992,7 +992,7 @@ static SCREEN_UPDATE(cps3)
|
||||
state->m_screenwidth = 384;
|
||||
visarea.min_x = 0; visarea.max_x = 384-1;
|
||||
visarea.min_y = 0; visarea.max_y = 224-1;
|
||||
screen->configure(384, 224, visarea, period);
|
||||
screen.configure(384, 224, visarea, period);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1109,7 +1109,7 @@ static SCREEN_UPDATE(cps3)
|
||||
{
|
||||
for (uu=0;uu<1023;uu++)
|
||||
{
|
||||
cps3_draw_tilemapsprite_line(screen->machine(), tilemapnum, uu, state->m_renderbuffer_bitmap, &state->m_renderbuffer_clip );
|
||||
cps3_draw_tilemapsprite_line(screen.machine(), tilemapnum, uu, state->m_renderbuffer_bitmap, &state->m_renderbuffer_clip );
|
||||
}
|
||||
}
|
||||
bg_drawn[tilemapnum] = 1;
|
||||
@ -1182,13 +1182,13 @@ static SCREEN_UPDATE(cps3)
|
||||
/* use the bpp value from the main list or the sublists? */
|
||||
if (whichbpp)
|
||||
{
|
||||
if (!global_bpp) screen->machine().gfx[1]->color_granularity=256;
|
||||
else screen->machine().gfx[1]->color_granularity=64;
|
||||
if (!global_bpp) screen.machine().gfx[1]->color_granularity=256;
|
||||
else screen.machine().gfx[1]->color_granularity=64;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!bpp) screen->machine().gfx[1]->color_granularity=256;
|
||||
else screen->machine().gfx[1]->color_granularity=64;
|
||||
if (!bpp) screen.machine().gfx[1]->color_granularity=256;
|
||||
else screen.machine().gfx[1]->color_granularity=64;
|
||||
}
|
||||
|
||||
{
|
||||
@ -1196,11 +1196,11 @@ static SCREEN_UPDATE(cps3)
|
||||
|
||||
if (global_alpha || alpha)
|
||||
{
|
||||
cps3_drawgfxzoom(state->m_renderbuffer_bitmap,&state->m_renderbuffer_clip,screen->machine().gfx[1],realtileno,actualpal,0^flipx,0^flipy,current_xpos,current_ypos,CPS3_TRANSPARENCY_PEN_INDEX_BLEND,0,xinc,yinc, NULL, 0);
|
||||
cps3_drawgfxzoom(state->m_renderbuffer_bitmap,&state->m_renderbuffer_clip,screen.machine().gfx[1],realtileno,actualpal,0^flipx,0^flipy,current_xpos,current_ypos,CPS3_TRANSPARENCY_PEN_INDEX_BLEND,0,xinc,yinc, NULL, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
cps3_drawgfxzoom(state->m_renderbuffer_bitmap,&state->m_renderbuffer_clip,screen->machine().gfx[1],realtileno,actualpal,0^flipx,0^flipy,current_xpos,current_ypos,CPS3_TRANSPARENCY_PEN_INDEX,0,xinc,yinc, NULL, 0);
|
||||
cps3_drawgfxzoom(state->m_renderbuffer_bitmap,&state->m_renderbuffer_clip,screen.machine().gfx[1],realtileno,actualpal,0^flipx,0^flipy,current_xpos,current_ypos,CPS3_TRANSPARENCY_PEN_INDEX,0,xinc,yinc, NULL, 0);
|
||||
}
|
||||
count++;
|
||||
}
|
||||
@ -1266,7 +1266,7 @@ static SCREEN_UPDATE(cps3)
|
||||
pal += state->m_ss_pal_base << 5;
|
||||
tile+=0x200;
|
||||
|
||||
cps3_drawgfxzoom(bitmap, cliprect, screen->machine().gfx[0],tile,pal,flipx,flipy,x*8,y*8,CPS3_TRANSPARENCY_PEN,0,0x10000,0x10000,NULL,0);
|
||||
cps3_drawgfxzoom(bitmap, cliprect, screen.machine().gfx[0],tile,pal,flipx,flipy,x*8,y*8,CPS3_TRANSPARENCY_PEN,0,0x10000,0x10000,NULL,0);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
@ -635,8 +635,8 @@ static void SetVidReg( address_space *space, UINT16 reg, UINT16 val )
|
||||
|
||||
static SCREEN_UPDATE( crystal )
|
||||
{
|
||||
crystal_state *state = screen->machine().driver_data<crystal_state>();
|
||||
address_space *space = screen->machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
crystal_state *state = screen.machine().driver_data<crystal_state>();
|
||||
address_space *space = screen.machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
int DoFlip;
|
||||
|
||||
UINT32 B0 = 0x0;
|
||||
@ -646,7 +646,7 @@ static SCREEN_UPDATE( crystal )
|
||||
UINT16 *srcline;
|
||||
int y;
|
||||
UINT16 head, tail;
|
||||
UINT32 width = screen->width();
|
||||
UINT32 width = screen.width();
|
||||
|
||||
if (GetVidReg(space, 0x8e) & 1)
|
||||
{
|
||||
@ -696,8 +696,8 @@ static SCREEN_UPDATE( crystal )
|
||||
|
||||
static SCREEN_EOF(crystal)
|
||||
{
|
||||
crystal_state *state = machine.driver_data<crystal_state>();
|
||||
address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM);
|
||||
crystal_state *state = screen.machine().driver_data<crystal_state>();
|
||||
address_space *space = screen.machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
UINT16 head, tail;
|
||||
int DoFlip = 0;
|
||||
|
||||
|
@ -137,8 +137,8 @@ static VIDEO_START(cshooter)
|
||||
|
||||
static SCREEN_UPDATE(cshooter)
|
||||
{
|
||||
cshooter_state *state = screen->machine().driver_data<cshooter_state>();
|
||||
bitmap_fill(bitmap, cliprect, 0/*get_black_pen(screen->screen->machine())*/);
|
||||
cshooter_state *state = screen.machine().driver_data<cshooter_state>();
|
||||
bitmap_fill(bitmap, cliprect, 0/*get_black_pen(screen.screen.machine())*/);
|
||||
tilemap_mark_all_tiles_dirty(state->m_txtilemap);
|
||||
|
||||
//sprites
|
||||
@ -151,25 +151,25 @@ static SCREEN_UPDATE(cshooter)
|
||||
{
|
||||
int tile=0x30+((spriteram[i]>>2)&0x1f);
|
||||
|
||||
drawgfx_transpen(bitmap,cliprect,screen->machine().gfx[0],
|
||||
drawgfx_transpen(bitmap,cliprect,screen.machine().gfx[0],
|
||||
tile,
|
||||
spriteram[i+1],
|
||||
0, 0,
|
||||
spriteram[i+3],spriteram[i+2],3);
|
||||
|
||||
drawgfx_transpen(bitmap,cliprect,screen->machine().gfx[0],
|
||||
drawgfx_transpen(bitmap,cliprect,screen.machine().gfx[0],
|
||||
tile,
|
||||
spriteram[i+1],
|
||||
0, 0,
|
||||
spriteram[i+3]+8,spriteram[i+2],3);
|
||||
|
||||
drawgfx_transpen(bitmap,cliprect,screen->machine().gfx[0],
|
||||
drawgfx_transpen(bitmap,cliprect,screen.machine().gfx[0],
|
||||
tile,
|
||||
spriteram[i+1],
|
||||
0, 0,
|
||||
spriteram[i+3]+8,spriteram[i+2]+8,3);
|
||||
|
||||
drawgfx_transpen(bitmap,cliprect,screen->machine().gfx[0],
|
||||
drawgfx_transpen(bitmap,cliprect,screen.machine().gfx[0],
|
||||
tile,
|
||||
spriteram[i+1],
|
||||
0, 0,
|
||||
|
@ -69,8 +69,8 @@ static VIDEO_START( csplayh5 )
|
||||
|
||||
static SCREEN_UPDATE( csplayh5 )
|
||||
{
|
||||
csplayh5_state *state = screen->machine().driver_data<csplayh5_state>();
|
||||
bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine()));
|
||||
csplayh5_state *state = screen.machine().driver_data<csplayh5_state>();
|
||||
bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
|
||||
|
||||
copybitmap(bitmap, state->m_vdp0_bitmap, 0, 0, 0, 0, cliprect);
|
||||
|
||||
|
@ -97,7 +97,7 @@ static WRITE16_HANDLER( palette_w )
|
||||
/* TODO: This is a simplified version of what actually happens */
|
||||
static SCREEN_UPDATE( cubeqst )
|
||||
{
|
||||
cubeqst_state *state = screen->machine().driver_data<cubeqst_state>();
|
||||
cubeqst_state *state = screen.machine().driver_data<cubeqst_state>();
|
||||
int y;
|
||||
|
||||
/*
|
||||
@ -112,8 +112,8 @@ static SCREEN_UPDATE( cubeqst )
|
||||
for (y = cliprect->min_y; y <= cliprect->max_y; ++y)
|
||||
{
|
||||
int i;
|
||||
int num_entries = cubeqcpu_get_ptr_ram_val(screen->machine().device("line_cpu"), y);
|
||||
UINT32 *stk_ram = cubeqcpu_get_stack_ram(screen->machine().device("line_cpu"));
|
||||
int num_entries = cubeqcpu_get_ptr_ram_val(screen.machine().device("line_cpu"), y);
|
||||
UINT32 *stk_ram = cubeqcpu_get_stack_ram(screen.machine().device("line_cpu"));
|
||||
UINT32 *dest = BITMAP_ADDR32(bitmap, y, 0);
|
||||
UINT32 pen;
|
||||
|
||||
@ -155,7 +155,7 @@ static SCREEN_UPDATE( cubeqst )
|
||||
}
|
||||
|
||||
/* Draw the span, testing for depth */
|
||||
pen = state->m_colormap[screen->machine().generic.paletteram.u16[color]];
|
||||
pen = state->m_colormap[screen.machine().generic.paletteram.u16[color]];
|
||||
for (x = h1; x <= h2; ++x)
|
||||
{
|
||||
if (!(state->m_depth_buffer[x] < depth))
|
||||
|
@ -87,7 +87,7 @@ static VIDEO_START( cultures )
|
||||
|
||||
static SCREEN_UPDATE( cultures )
|
||||
{
|
||||
cultures_state *state = screen->machine().driver_data<cultures_state>();
|
||||
cultures_state *state = screen.machine().driver_data<cultures_state>();
|
||||
int attr;
|
||||
|
||||
// tilemaps attributes
|
||||
|
@ -464,14 +464,14 @@ static MACHINE_CONFIG_START( cyberbal, cyberbal_state )
|
||||
/* note: these parameters are from published specs, not derived */
|
||||
/* the board uses an SOS-2 chip to generate video signals */
|
||||
MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz, 456*2, 0, 336*2, 262, 0, 240)
|
||||
MCFG_SCREEN_UPDATE(cyberbal)
|
||||
MCFG_SCREEN_UPDATE(cyberbal_left)
|
||||
|
||||
MCFG_SCREEN_ADD("rscreen", RASTER)
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
/* note: these parameters are from published specs, not derived */
|
||||
/* the board uses an SOS-2 chip to generate video signals */
|
||||
MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz, 456*2, 0, 336*2, 262, 0, 240)
|
||||
MCFG_SCREEN_UPDATE(cyberbal)
|
||||
MCFG_SCREEN_UPDATE(cyberbal_right)
|
||||
|
||||
MCFG_VIDEO_START(cyberbal)
|
||||
|
||||
@ -512,7 +512,7 @@ static MACHINE_CONFIG_START( cyberbal2p, cyberbal_state )
|
||||
/* note: these parameters are from published specs, not derived */
|
||||
/* the board uses an SOS-2 chip to generate video signals */
|
||||
MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz, 456*2, 0, 336*2, 262, 0, 240)
|
||||
MCFG_SCREEN_UPDATE(cyberbal)
|
||||
MCFG_SCREEN_UPDATE(cyberbal2p)
|
||||
|
||||
MCFG_VIDEO_START(cyberbal2p)
|
||||
|
||||
|
@ -216,31 +216,18 @@ static void draw_pixel( bitmap_t* bitmap, const rectangle *cliprect, int y, int
|
||||
*BITMAP_ADDR16(bitmap, y, x) = pen;
|
||||
}
|
||||
|
||||
static SCREEN_UPDATE( cybertnk )
|
||||
static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const rectangle *cliprect, int screen_shift)
|
||||
{
|
||||
cybertnk_state *state = screen->machine().driver_data<cybertnk_state>();
|
||||
device_t *left_screen = screen->machine().device("lscreen");
|
||||
device_t *right_screen = screen->machine().device("rscreen");
|
||||
int screen_shift = 0;
|
||||
|
||||
if (screen==left_screen)
|
||||
{
|
||||
screen_shift = 0;
|
||||
|
||||
}
|
||||
else if (screen==right_screen)
|
||||
{
|
||||
screen_shift = -256;
|
||||
}
|
||||
cybertnk_state *state = screen.machine().driver_data<cybertnk_state>();
|
||||
|
||||
tilemap_set_scrolldx(state->m_tx_tilemap, screen_shift, screen_shift);
|
||||
|
||||
|
||||
bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine()));
|
||||
bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
|
||||
|
||||
{
|
||||
int i;
|
||||
const gfx_element *gfx = screen->machine().gfx[3];
|
||||
const gfx_element *gfx = screen.machine().gfx[3];
|
||||
|
||||
|
||||
for (i=0;i<0x1000/4;i+=4)
|
||||
@ -258,7 +245,7 @@ static SCREEN_UPDATE( cybertnk )
|
||||
|
||||
{
|
||||
int count,x,y;
|
||||
const gfx_element *gfx = screen->machine().gfx[2];
|
||||
const gfx_element *gfx = screen.machine().gfx[2];
|
||||
|
||||
count = 0;
|
||||
|
||||
@ -279,7 +266,7 @@ static SCREEN_UPDATE( cybertnk )
|
||||
|
||||
{
|
||||
int count,x,y;
|
||||
const gfx_element *gfx = screen->machine().gfx[1];
|
||||
const gfx_element *gfx = screen.machine().gfx[1];
|
||||
|
||||
count = 0;
|
||||
|
||||
@ -301,7 +288,7 @@ static SCREEN_UPDATE( cybertnk )
|
||||
/* non-tile based spriteram (BARE-BONES, looks pretty complex) */
|
||||
if(1)
|
||||
{
|
||||
const UINT8 *blit_ram = screen->machine().region("spr_gfx")->base();
|
||||
const UINT8 *blit_ram = screen.machine().region("spr_gfx")->base();
|
||||
int offs,x,y,z,xsize,ysize,yi,xi,col_bank,fx,zoom;
|
||||
UINT32 spr_offs,spr_offs_helper;
|
||||
int xf,yf,xz,yz;
|
||||
@ -354,11 +341,11 @@ static SCREEN_UPDATE( cybertnk )
|
||||
dot|= col_bank<<4;
|
||||
if(fx)
|
||||
{
|
||||
draw_pixel(bitmap, cliprect, y+yz, x+xsize-(xz)+screen_shift, screen->machine().pens[dot]);
|
||||
draw_pixel(bitmap, cliprect, y+yz, x+xsize-(xz)+screen_shift, screen.machine().pens[dot]);
|
||||
}
|
||||
else
|
||||
{
|
||||
draw_pixel(bitmap, cliprect, y+yz, x+xz+screen_shift, screen->machine().pens[dot]);
|
||||
draw_pixel(bitmap, cliprect, y+yz, x+xz+screen_shift, screen.machine().pens[dot]);
|
||||
}
|
||||
}
|
||||
xf+=zoom;
|
||||
@ -386,11 +373,11 @@ static SCREEN_UPDATE( cybertnk )
|
||||
dot|= col_bank<<4;
|
||||
if(fx)
|
||||
{
|
||||
draw_pixel(bitmap, cliprect, y+yz, x+xsize-(xz)+screen_shift, screen->machine().pens[dot]);
|
||||
draw_pixel(bitmap, cliprect, y+yz, x+xsize-(xz)+screen_shift, screen.machine().pens[dot]);
|
||||
}
|
||||
else
|
||||
{
|
||||
draw_pixel(bitmap, cliprect, y+yz, x+xz+screen_shift, screen->machine().pens[dot]);
|
||||
draw_pixel(bitmap, cliprect, y+yz, x+xz+screen_shift, screen.machine().pens[dot]);
|
||||
}
|
||||
}
|
||||
xf+=zoom;
|
||||
@ -428,52 +415,52 @@ static SCREEN_UPDATE( cybertnk )
|
||||
//0x62 0x9a 1c2d0
|
||||
//0x62 0x9a 1e1e4
|
||||
//0x20 0x9c 2011c
|
||||
if (screen==left_screen)
|
||||
if (screen_shift == 0)
|
||||
{
|
||||
if(0) //sprite gfx debug viewer
|
||||
{
|
||||
int x,y,count;
|
||||
const UINT8 *blit_ram = screen->machine().region("spr_gfx")->base();
|
||||
const UINT8 *blit_ram = screen.machine().region("spr_gfx")->base();
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_Z))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_Z))
|
||||
state->m_test_x++;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_X))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_X))
|
||||
state->m_test_x--;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_A))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_A))
|
||||
state->m_test_y++;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_S))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_S))
|
||||
state->m_test_y--;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_Q))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_Q))
|
||||
state->m_start_offs+=0x200;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_W))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_W))
|
||||
state->m_start_offs-=0x200;
|
||||
|
||||
if(screen->machine().input().code_pressed_once(KEYCODE_T))
|
||||
if(screen.machine().input().code_pressed_once(KEYCODE_T))
|
||||
state->m_start_offs+=0x20000;
|
||||
|
||||
if(screen->machine().input().code_pressed_once(KEYCODE_Y))
|
||||
if(screen.machine().input().code_pressed_once(KEYCODE_Y))
|
||||
state->m_start_offs-=0x20000;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_E))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_E))
|
||||
state->m_start_offs+=4;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_R))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_R))
|
||||
state->m_start_offs-=4;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_D))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_D))
|
||||
state->m_color_pen++;
|
||||
|
||||
if(screen->machine().input().code_pressed(KEYCODE_F))
|
||||
if(screen.machine().input().code_pressed(KEYCODE_F))
|
||||
state->m_color_pen--;
|
||||
|
||||
popmessage("%02x %02x %04x %02x",state->m_test_x,state->m_test_y,state->m_start_offs,state->m_color_pen);
|
||||
|
||||
bitmap_fill(bitmap,cliprect,get_black_pen(screen->machine()));
|
||||
bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
|
||||
|
||||
count = (state->m_start_offs);
|
||||
|
||||
@ -490,28 +477,28 @@ static SCREEN_UPDATE( cybertnk )
|
||||
color|= ((blit_ram[count+3] & 0xff) << 0);
|
||||
|
||||
dot = (color & 0xf0000000) >> 28;
|
||||
*BITMAP_ADDR16(bitmap, y, x+0) = screen->machine().pens[dot+(state->m_color_pen<<4)];
|
||||
*BITMAP_ADDR16(bitmap, y, x+0) = screen.machine().pens[dot+(state->m_color_pen<<4)];
|
||||
|
||||
dot = (color & 0x0f000000) >> 24;
|
||||
*BITMAP_ADDR16(bitmap, y, x+4) = screen->machine().pens[dot+(state->m_color_pen<<4)];
|
||||
*BITMAP_ADDR16(bitmap, y, x+4) = screen.machine().pens[dot+(state->m_color_pen<<4)];
|
||||
|
||||
dot = (color & 0x00f00000) >> 20;
|
||||
*BITMAP_ADDR16(bitmap, y, x+1) = screen->machine().pens[dot+(state->m_color_pen<<4)];
|
||||
*BITMAP_ADDR16(bitmap, y, x+1) = screen.machine().pens[dot+(state->m_color_pen<<4)];
|
||||
|
||||
dot = (color & 0x000f0000) >> 16;
|
||||
*BITMAP_ADDR16(bitmap, y, x+5) = screen->machine().pens[dot+(state->m_color_pen<<4)];
|
||||
*BITMAP_ADDR16(bitmap, y, x+5) = screen.machine().pens[dot+(state->m_color_pen<<4)];
|
||||
|
||||
dot = (color & 0x0000f000) >> 12;
|
||||
*BITMAP_ADDR16(bitmap, y, x+2) = screen->machine().pens[dot+(state->m_color_pen<<4)];
|
||||
*BITMAP_ADDR16(bitmap, y, x+2) = screen.machine().pens[dot+(state->m_color_pen<<4)];
|
||||
|
||||
dot = (color & 0x00000f00) >> 8;
|
||||
*BITMAP_ADDR16(bitmap, y, x+6) = screen->machine().pens[dot+(state->m_color_pen<<4)];
|
||||
*BITMAP_ADDR16(bitmap, y, x+6) = screen.machine().pens[dot+(state->m_color_pen<<4)];
|
||||
|
||||
dot = (color & 0x000000f0) >> 4;
|
||||
*BITMAP_ADDR16(bitmap, y, x+3) = screen->machine().pens[dot+(state->m_color_pen<<4)];
|
||||
*BITMAP_ADDR16(bitmap, y, x+3) = screen.machine().pens[dot+(state->m_color_pen<<4)];
|
||||
|
||||
dot = (color & 0x0000000f) >> 0;
|
||||
*BITMAP_ADDR16(bitmap, y, x+7) = screen->machine().pens[dot+(state->m_color_pen<<4)];
|
||||
*BITMAP_ADDR16(bitmap, y, x+7) = screen.machine().pens[dot+(state->m_color_pen<<4)];
|
||||
|
||||
count+=4;
|
||||
}
|
||||
@ -523,6 +510,9 @@ static SCREEN_UPDATE( cybertnk )
|
||||
return 0;
|
||||
}
|
||||
|
||||
static SCREEN_UPDATE( cybertnk_left ) { return update_screen(screen, bitmap, cliprect, 0); }
|
||||
static SCREEN_UPDATE( cybertnk_right ) { return update_screen(screen, bitmap, cliprect, -256); }
|
||||
|
||||
|
||||
static WRITE16_HANDLER( tx_vram_w )
|
||||
{
|
||||
@ -890,7 +880,7 @@ static MACHINE_CONFIG_START( cybertnk, cybertnk_state )
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MCFG_SCREEN_SIZE(32*8, 32*8)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 28*8-1)
|
||||
MCFG_SCREEN_UPDATE(cybertnk)
|
||||
MCFG_SCREEN_UPDATE(cybertnk_left)
|
||||
|
||||
MCFG_SCREEN_ADD("rscreen", RASTER)
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
@ -898,7 +888,7 @@ static MACHINE_CONFIG_START( cybertnk, cybertnk_state )
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MCFG_SCREEN_SIZE(32*8, 32*8)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 28*8-1)
|
||||
MCFG_SCREEN_UPDATE(cybertnk)
|
||||
MCFG_SCREEN_UPDATE(cybertnk_right)
|
||||
|
||||
MCFG_GFXDECODE(cybertnk)
|
||||
MCFG_PALETTE_LENGTH(0x4000)
|
||||
|
@ -123,10 +123,10 @@ static VIDEO_START( cyclemb )
|
||||
|
||||
static SCREEN_UPDATE( cyclemb )
|
||||
{
|
||||
cyclemb_state *state = screen->machine().driver_data<cyclemb_state>();
|
||||
cyclemb_state *state = screen.machine().driver_data<cyclemb_state>();
|
||||
int x,y,count;
|
||||
const gfx_element *gfx = screen->machine().gfx[0];
|
||||
UINT8 flip_screen = flip_screen_get(screen->machine());
|
||||
const gfx_element *gfx = screen.machine().gfx[0];
|
||||
UINT8 flip_screen = flip_screen_get(screen.machine());
|
||||
|
||||
count = 0;
|
||||
|
||||
@ -208,7 +208,7 @@ static SCREEN_UPDATE( cyclemb )
|
||||
fx = !fx;
|
||||
fy = !fy;
|
||||
}
|
||||
drawgfx_transpen(bitmap,cliprect,screen->machine().gfx[region],spr_offs,col,fx,fy,x,y,0);
|
||||
drawgfx_transpen(bitmap,cliprect,screen.machine().gfx[region],spr_offs,col,fx,fy,x,y,0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ static VIDEO_START(d9final)
|
||||
|
||||
static SCREEN_UPDATE(d9final)
|
||||
{
|
||||
d9final_state *state = screen->machine().driver_data<d9final_state>();
|
||||
d9final_state *state = screen.machine().driver_data<d9final_state>();
|
||||
tilemap_draw(bitmap,cliprect,state->m_sc0_tilemap,0,0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -138,9 +138,9 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
|
||||
|
||||
static SCREEN_UPDATE(dacholer)
|
||||
{
|
||||
dacholer_state *state = screen->machine().driver_data<dacholer_state>();
|
||||
dacholer_state *state = screen.machine().driver_data<dacholer_state>();
|
||||
|
||||
if (flip_screen_get(screen->machine()))
|
||||
if (flip_screen_get(screen.machine()))
|
||||
{
|
||||
tilemap_set_scrollx(state->m_bg_tilemap, 0, 256 - state->m_scroll_x);
|
||||
tilemap_set_scrolly(state->m_bg_tilemap, 0, 256 - state->m_scroll_y);
|
||||
@ -152,7 +152,7 @@ static SCREEN_UPDATE(dacholer)
|
||||
}
|
||||
|
||||
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
|
||||
draw_sprites(screen->machine(), bitmap, cliprect);
|
||||
draw_sprites(screen.machine(), bitmap, cliprect);
|
||||
tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ static void dai3wksi_get_pens(pen_t *pens)
|
||||
|
||||
static SCREEN_UPDATE( dai3wksi )
|
||||
{
|
||||
dai3wksi_state *state = screen->machine().driver_data<dai3wksi_state>();
|
||||
dai3wksi_state *state = screen.machine().driver_data<dai3wksi_state>();
|
||||
offs_t offs;
|
||||
pen_t pens[8];
|
||||
|
||||
@ -147,7 +147,7 @@ static SCREEN_UPDATE( dai3wksi )
|
||||
}
|
||||
else
|
||||
{
|
||||
if (input_port_read(screen->machine(), "IN2") & 0x03)
|
||||
if (input_port_read(screen.machine(), "IN2") & 0x03)
|
||||
color = vr_prom2[value];
|
||||
else
|
||||
color = vr_prom1[value];
|
||||
|
@ -964,7 +964,7 @@ static MACHINE_CONFIG_START( darius, darius_state )
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MCFG_SCREEN_SIZE(36*8, 32*8)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 1*8, 29*8-1)
|
||||
MCFG_SCREEN_UPDATE(darius)
|
||||
MCFG_SCREEN_UPDATE(darius_left)
|
||||
|
||||
MCFG_SCREEN_ADD("mscreen", RASTER)
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
@ -972,7 +972,7 @@ static MACHINE_CONFIG_START( darius, darius_state )
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MCFG_SCREEN_SIZE(36*8, 32*8)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 1*8, 29*8-1)
|
||||
MCFG_SCREEN_UPDATE(darius)
|
||||
MCFG_SCREEN_UPDATE(darius_middle)
|
||||
|
||||
MCFG_SCREEN_ADD("rscreen", RASTER)
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
@ -980,7 +980,7 @@ static MACHINE_CONFIG_START( darius, darius_state )
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MCFG_SCREEN_SIZE(36*8, 32*8)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 1*8, 29*8-1)
|
||||
MCFG_SCREEN_UPDATE(darius)
|
||||
MCFG_SCREEN_UPDATE(darius_right)
|
||||
|
||||
MCFG_VIDEO_START(darius)
|
||||
|
||||
|
@ -181,21 +181,21 @@ static VIDEO_START( darkhors )
|
||||
|
||||
static SCREEN_UPDATE( darkhors )
|
||||
{
|
||||
darkhors_state *state = screen->machine().driver_data<darkhors_state>();
|
||||
darkhors_state *state = screen.machine().driver_data<darkhors_state>();
|
||||
int layers_ctrl = -1;
|
||||
|
||||
#if DARKHORS_DEBUG
|
||||
if (screen->machine().input().code_pressed(KEYCODE_Z))
|
||||
if (screen.machine().input().code_pressed(KEYCODE_Z))
|
||||
{
|
||||
int mask = 0;
|
||||
if (screen->machine().input().code_pressed(KEYCODE_Q)) mask |= 1;
|
||||
if (screen->machine().input().code_pressed(KEYCODE_W)) mask |= 2;
|
||||
if (screen->machine().input().code_pressed(KEYCODE_A)) mask |= 4;
|
||||
if (screen.machine().input().code_pressed(KEYCODE_Q)) mask |= 1;
|
||||
if (screen.machine().input().code_pressed(KEYCODE_W)) mask |= 2;
|
||||
if (screen.machine().input().code_pressed(KEYCODE_A)) mask |= 4;
|
||||
if (mask != 0) layers_ctrl &= mask;
|
||||
}
|
||||
#endif
|
||||
|
||||
bitmap_fill(bitmap,cliprect,get_black_pen(screen->machine()));
|
||||
bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
|
||||
|
||||
tilemap_set_scrollx(state->m_tmap,0, (state->m_tmapscroll[0] >> 16) - 5);
|
||||
tilemap_set_scrolly(state->m_tmap,0, (state->m_tmapscroll[0] & 0xffff) - 0xff );
|
||||
@ -205,7 +205,7 @@ static SCREEN_UPDATE( darkhors )
|
||||
tilemap_set_scrolly(state->m_tmap2,0, (state->m_tmapscroll2[0] & 0xffff) - 0xff );
|
||||
if (layers_ctrl & 2) tilemap_draw(bitmap,cliprect, state->m_tmap2, 0, 0);
|
||||
|
||||
if (layers_ctrl & 4) draw_sprites(screen->machine(),bitmap,cliprect);
|
||||
if (layers_ctrl & 4) draw_sprites(screen.machine(),bitmap,cliprect);
|
||||
|
||||
#if DARKHORS_DEBUG
|
||||
#if 0
|
||||
|
@ -95,18 +95,18 @@ UINT16 dblwings_pri_callback(UINT16 x)
|
||||
|
||||
static SCREEN_UPDATE(dblewing)
|
||||
{
|
||||
dblewing_state *state = screen->machine().driver_data<dblewing_state>();
|
||||
dblewing_state *state = screen.machine().driver_data<dblewing_state>();
|
||||
UINT16 flip = deco16ic_pf_control_r(state->m_deco_tilegen1, 0, 0xffff);
|
||||
|
||||
flip_screen_set(screen->machine(), BIT(flip, 7));
|
||||
flip_screen_set(screen.machine(), BIT(flip, 7));
|
||||
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
|
||||
|
||||
bitmap_fill(bitmap, cliprect, 0); /* not Confirmed */
|
||||
bitmap_fill(screen->machine().priority_bitmap, NULL, 0);
|
||||
bitmap_fill(screen.machine().priority_bitmap, NULL, 0);
|
||||
|
||||
deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 2);
|
||||
deco16ic_tilemap_1_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 4);
|
||||
screen->machine().device<decospr_device>("spritegen")->draw_sprites(screen->machine(), bitmap, cliprect, state->m_spriteram, 0x400);
|
||||
screen.machine().device<decospr_device>("spritegen")->draw_sprites(screen.machine(), bitmap, cliprect, state->m_spriteram, 0x400);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -382,7 +382,7 @@ static VIDEO_START( ddayjlc )
|
||||
|
||||
static SCREEN_UPDATE( ddayjlc )
|
||||
{
|
||||
ddayjlc_state *state = screen->machine().driver_data<ddayjlc_state>();
|
||||
ddayjlc_state *state = screen.machine().driver_data<ddayjlc_state>();
|
||||
UINT32 i;
|
||||
tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0);
|
||||
|
||||
@ -398,7 +398,7 @@ static SCREEN_UPDATE( ddayjlc )
|
||||
|
||||
code = (code & 0x7f) | ((flags & 0x30) << 3);
|
||||
|
||||
drawgfx_transpen(bitmap, cliprect, screen->machine().gfx[0], code, color, xflip, yflip, x, y, 0);
|
||||
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[0], code, color, xflip, yflip, x, y, 0);
|
||||
}
|
||||
|
||||
{
|
||||
@ -409,9 +409,9 @@ static SCREEN_UPDATE( ddayjlc )
|
||||
{
|
||||
c = state->m_videoram[y * 32 + x];
|
||||
if (x > 1 && x < 30)
|
||||
drawgfx_transpen(bitmap, cliprect, screen->machine().gfx[1], c + state->m_char_bank * 0x100, 2, 0, 0, x*8, y*8, 0);
|
||||
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[1], c + state->m_char_bank * 0x100, 2, 0, 0, x*8, y*8, 0);
|
||||
else
|
||||
drawgfx_opaque(bitmap, cliprect, screen->machine().gfx[1], c + state->m_char_bank * 0x100, 2, 0, 0, x*8, y*8);
|
||||
drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[1], c + state->m_char_bank * 0x100, 2, 0, 0, x*8, y*8);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -251,7 +251,7 @@ static void ddealer_draw_video_layer( running_machine &machine, UINT16* vreg_bas
|
||||
|
||||
static SCREEN_UPDATE( ddealer )
|
||||
{
|
||||
ddealer_state *state = screen->machine().driver_data<ddealer_state>();
|
||||
ddealer_state *state = screen.machine().driver_data<ddealer_state>();
|
||||
tilemap_set_scrollx(state->m_back_tilemap, 0, state->m_flipscreen ? -192 : -64);
|
||||
tilemap_set_flip(state->m_back_tilemap, state->m_flipscreen ? TILEMAP_FLIPY | TILEMAP_FLIPX : 0);
|
||||
tilemap_draw(bitmap, cliprect, state->m_back_tilemap, 0, 0);
|
||||
@ -266,24 +266,24 @@ static SCREEN_UPDATE( ddealer )
|
||||
{
|
||||
if (state->m_vregs[0xcc / 2] & 0x80)
|
||||
{
|
||||
ddealer_draw_video_layer(screen->machine(), &state->m_vregs[0x1e0 / 2], state->m_left_fg_vram_top, state->m_left_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
|
||||
ddealer_draw_video_layer(screen->machine(), &state->m_vregs[0xcc / 2], state->m_right_fg_vram_top, state->m_right_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
|
||||
ddealer_draw_video_layer(screen.machine(), &state->m_vregs[0x1e0 / 2], state->m_left_fg_vram_top, state->m_left_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
|
||||
ddealer_draw_video_layer(screen.machine(), &state->m_vregs[0xcc / 2], state->m_right_fg_vram_top, state->m_right_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
|
||||
}
|
||||
else
|
||||
{
|
||||
ddealer_draw_video_layer(screen->machine(), &state->m_vregs[0x1e0 / 2], state->m_left_fg_vram_top, state->m_left_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
|
||||
ddealer_draw_video_layer(screen.machine(), &state->m_vregs[0x1e0 / 2], state->m_left_fg_vram_top, state->m_left_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (state->m_vregs[0xcc / 2] & 0x80)
|
||||
{
|
||||
ddealer_draw_video_layer(screen->machine(), &state->m_vregs[0xcc / 2], state->m_left_fg_vram_top, state->m_left_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
|
||||
ddealer_draw_video_layer(screen->machine(), &state->m_vregs[0x1e0 / 2], state->m_right_fg_vram_top, state->m_right_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
|
||||
ddealer_draw_video_layer(screen.machine(), &state->m_vregs[0xcc / 2], state->m_left_fg_vram_top, state->m_left_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
|
||||
ddealer_draw_video_layer(screen.machine(), &state->m_vregs[0x1e0 / 2], state->m_right_fg_vram_top, state->m_right_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
|
||||
}
|
||||
else
|
||||
{
|
||||
ddealer_draw_video_layer(screen->machine(), &state->m_vregs[0x1e0 / 2], state->m_left_fg_vram_top, state->m_left_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
|
||||
ddealer_draw_video_layer(screen.machine(), &state->m_vregs[0x1e0 / 2], state->m_left_fg_vram_top, state->m_left_fg_vram_bottom, bitmap, cliprect, state->m_flipscreen);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1303,7 +1303,7 @@ static void copylayer(running_machine &machine, bitmap_t *bitmap, const rectangl
|
||||
|
||||
SCREEN_UPDATE(ddenlovr)
|
||||
{
|
||||
dynax_state *state = screen->machine().driver_data<dynax_state>();
|
||||
dynax_state *state = screen.machine().driver_data<dynax_state>();
|
||||
|
||||
static const int order[24][4] =
|
||||
{
|
||||
@ -1320,7 +1320,7 @@ SCREEN_UPDATE(ddenlovr)
|
||||
|
||||
#if 0
|
||||
static int base = 0x0;
|
||||
const UINT8 *gfx = screen->machine().region("blitter")->base();
|
||||
const UINT8 *gfx = screen.machine().region("blitter")->base();
|
||||
int next;
|
||||
memset(state->m_ddenlovr_pixmap[0], 0, 512 * 512);
|
||||
memset(state->m_ddenlovr_pixmap[1], 0, 512 * 512);
|
||||
@ -1331,38 +1331,38 @@ SCREEN_UPDATE(ddenlovr)
|
||||
state->m_ddenlovr_blit_pen_mode = 0;
|
||||
state->m_ddenlovr_blit_y = 5;
|
||||
state->m_ddenlovr_clip_ctrl = 0x0f;
|
||||
next = blit_draw(screen->machine(), base, 0);
|
||||
next = blit_draw(screen.machine(), base, 0);
|
||||
popmessage("GFX %06x", base);
|
||||
if (screen->machine().input().code_pressed(KEYCODE_S)) base = next;
|
||||
if (screen->machine().input().code_pressed_once(KEYCODE_X)) base = next;
|
||||
if (screen->machine().input().code_pressed(KEYCODE_C)) { base--; while ((gfx[base] & 0xf0) != 0x30) base--; }
|
||||
if (screen->machine().input().code_pressed(KEYCODE_V)) { base++; while ((gfx[base] & 0xf0) != 0x30) base++; }
|
||||
if (screen->machine().input().code_pressed_once(KEYCODE_D)) { base--; while ((gfx[base] & 0xf0) != 0x30) base--; }
|
||||
if (screen->machine().input().code_pressed_once(KEYCODE_F)) { base++; while ((gfx[base] & 0xf0) != 0x30) base++; }
|
||||
if (screen.machine().input().code_pressed(KEYCODE_S)) base = next;
|
||||
if (screen.machine().input().code_pressed_once(KEYCODE_X)) base = next;
|
||||
if (screen.machine().input().code_pressed(KEYCODE_C)) { base--; while ((gfx[base] & 0xf0) != 0x30) base--; }
|
||||
if (screen.machine().input().code_pressed(KEYCODE_V)) { base++; while ((gfx[base] & 0xf0) != 0x30) base++; }
|
||||
if (screen.machine().input().code_pressed_once(KEYCODE_D)) { base--; while ((gfx[base] & 0xf0) != 0x30) base--; }
|
||||
if (screen.machine().input().code_pressed_once(KEYCODE_F)) { base++; while ((gfx[base] & 0xf0) != 0x30) base++; }
|
||||
#endif
|
||||
|
||||
bitmap_fill(bitmap, cliprect, state->m_ddenlovr_bgcolor);
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
if (screen->machine().input().code_pressed(KEYCODE_Z))
|
||||
if (screen.machine().input().code_pressed(KEYCODE_Z))
|
||||
{
|
||||
int mask, mask2;
|
||||
|
||||
mask = 0;
|
||||
|
||||
if (screen->machine().input().code_pressed(KEYCODE_Q)) mask |= 1;
|
||||
if (screen->machine().input().code_pressed(KEYCODE_W)) mask |= 2;
|
||||
if (screen->machine().input().code_pressed(KEYCODE_E)) mask |= 4;
|
||||
if (screen->machine().input().code_pressed(KEYCODE_R)) mask |= 8;
|
||||
if (screen.machine().input().code_pressed(KEYCODE_Q)) mask |= 1;
|
||||
if (screen.machine().input().code_pressed(KEYCODE_W)) mask |= 2;
|
||||
if (screen.machine().input().code_pressed(KEYCODE_E)) mask |= 4;
|
||||
if (screen.machine().input().code_pressed(KEYCODE_R)) mask |= 8;
|
||||
|
||||
mask2 = 0;
|
||||
|
||||
if (state->m_extra_layers)
|
||||
{
|
||||
if (screen->machine().input().code_pressed(KEYCODE_A)) mask2 |= 1;
|
||||
if (screen->machine().input().code_pressed(KEYCODE_S)) mask2 |= 2;
|
||||
if (screen->machine().input().code_pressed(KEYCODE_D)) mask2 |= 4;
|
||||
if (screen->machine().input().code_pressed(KEYCODE_F)) mask2 |= 8;
|
||||
if (screen.machine().input().code_pressed(KEYCODE_A)) mask2 |= 1;
|
||||
if (screen.machine().input().code_pressed(KEYCODE_S)) mask2 |= 2;
|
||||
if (screen.machine().input().code_pressed(KEYCODE_D)) mask2 |= 4;
|
||||
if (screen.machine().input().code_pressed(KEYCODE_F)) mask2 |= 8;
|
||||
}
|
||||
|
||||
if (mask || mask2)
|
||||
@ -1381,10 +1381,10 @@ SCREEN_UPDATE(ddenlovr)
|
||||
pri = 0;
|
||||
}
|
||||
|
||||
copylayer(screen->machine(), bitmap, cliprect, order[pri][0]);
|
||||
copylayer(screen->machine(), bitmap, cliprect, order[pri][1]);
|
||||
copylayer(screen->machine(), bitmap, cliprect, order[pri][2]);
|
||||
copylayer(screen->machine(), bitmap, cliprect, order[pri][3]);
|
||||
copylayer(screen.machine(), bitmap, cliprect, order[pri][0]);
|
||||
copylayer(screen.machine(), bitmap, cliprect, order[pri][1]);
|
||||
copylayer(screen.machine(), bitmap, cliprect, order[pri][2]);
|
||||
copylayer(screen.machine(), bitmap, cliprect, order[pri][3]);
|
||||
|
||||
if (state->m_extra_layers)
|
||||
{
|
||||
@ -1396,10 +1396,10 @@ SCREEN_UPDATE(ddenlovr)
|
||||
pri = 0;
|
||||
}
|
||||
|
||||
copylayer(screen->machine(), bitmap, cliprect, order[pri][0] + 4);
|
||||
copylayer(screen->machine(), bitmap, cliprect, order[pri][1] + 4);
|
||||
copylayer(screen->machine(), bitmap, cliprect, order[pri][2] + 4);
|
||||
copylayer(screen->machine(), bitmap, cliprect, order[pri][3] + 4);
|
||||
copylayer(screen.machine(), bitmap, cliprect, order[pri][0] + 4);
|
||||
copylayer(screen.machine(), bitmap, cliprect, order[pri][1] + 4);
|
||||
copylayer(screen.machine(), bitmap, cliprect, order[pri][2] + 4);
|
||||
copylayer(screen.machine(), bitmap, cliprect, order[pri][3] + 4);
|
||||
}
|
||||
|
||||
state->m_ddenlovr_layer_enable = enab;
|
||||
|
@ -67,7 +67,7 @@ static WRITE8_HANDLER( dec8_mxc06_karn_buffer_spriteram_w)
|
||||
/* Only used by ghostb, gondo, garyoret, other games can control buffering */
|
||||
static SCREEN_EOF( dec8 )
|
||||
{
|
||||
address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM);
|
||||
address_space *space = screen.machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
dec8_mxc06_karn_buffer_spriteram_w(space, 0, 0);
|
||||
}
|
||||
|
||||
|
@ -59,17 +59,17 @@ static VIDEO_START( wcvol95 )
|
||||
static SCREEN_UPDATE( wcvol95 )
|
||||
{
|
||||
//FIXME: flip_screen_x should not be written!
|
||||
flip_screen_set_no_update(screen->machine(), 1);
|
||||
flip_screen_set_no_update(screen.machine(), 1);
|
||||
|
||||
deco156_state *state = screen->machine().driver_data<deco156_state>();
|
||||
deco156_state *state = screen.machine().driver_data<deco156_state>();
|
||||
|
||||
bitmap_fill(screen->machine().priority_bitmap, NULL, 0);
|
||||
bitmap_fill(screen.machine().priority_bitmap, NULL, 0);
|
||||
bitmap_fill(bitmap, NULL, 0);
|
||||
|
||||
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
|
||||
|
||||
deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
|
||||
screen->machine().device<decospr_device>("spritegen")->draw_sprites(screen->machine(), bitmap, cliprect, state->m_spriteram, 0x800);
|
||||
screen.machine().device<decospr_device>("spritegen")->draw_sprites(screen.machine(), bitmap, cliprect, state->m_spriteram, 0x800);
|
||||
deco16ic_tilemap_1_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -124,9 +124,9 @@ public:
|
||||
|
||||
static SCREEN_UPDATE( rblaster )
|
||||
{
|
||||
deco_ld_state *state = screen->machine().driver_data<deco_ld_state>();
|
||||
deco_ld_state *state = screen.machine().driver_data<deco_ld_state>();
|
||||
UINT8 *videoram = state->m_videoram;
|
||||
const gfx_element *gfx = screen->machine().gfx[0];
|
||||
const gfx_element *gfx = screen.machine().gfx[0];
|
||||
int count = 0x0000;
|
||||
|
||||
int y,x;
|
||||
|
@ -41,7 +41,7 @@ static VIDEO_START( deshoros )
|
||||
|
||||
static SCREEN_UPDATE( deshoros )
|
||||
{
|
||||
deshoros_state *state = screen->machine().driver_data<deshoros_state>();
|
||||
deshoros_state *state = screen.machine().driver_data<deshoros_state>();
|
||||
popmessage("%s",state->m_led_array);
|
||||
return 0;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ public:
|
||||
|
||||
static SCREEN_UPDATE( destroyr )
|
||||
{
|
||||
destroyr_state *state = screen->machine().driver_data<destroyr_state>();
|
||||
destroyr_state *state = screen.machine().driver_data<destroyr_state>();
|
||||
int i, j;
|
||||
|
||||
bitmap_fill(bitmap, cliprect, 0);
|
||||
@ -70,7 +70,7 @@ static SCREEN_UPDATE( destroyr )
|
||||
continue;
|
||||
}
|
||||
|
||||
drawgfx_transpen(bitmap, cliprect, screen->machine().gfx[2], num, 0, flipx, 0, horz, 16 * i, 0);
|
||||
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[2], num, 0, flipx, 0, horz, 16 * i, 0);
|
||||
}
|
||||
|
||||
/* draw alpha numerics */
|
||||
@ -80,7 +80,7 @@ static SCREEN_UPDATE( destroyr )
|
||||
{
|
||||
int num = state->m_alpha_num_ram[32 * i + j];
|
||||
|
||||
drawgfx_transpen(bitmap, cliprect, screen->machine().gfx[0], num, 0, 0, 0, 8 * j, 8 * i, 0);
|
||||
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[0], num, 0, 0, 0, 8 * j, 8 * i, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,13 +91,13 @@ static SCREEN_UPDATE( destroyr )
|
||||
int horz = 256 - state->m_minor_obj_ram[i + 2];
|
||||
int vert = 256 - state->m_minor_obj_ram[i + 4];
|
||||
|
||||
drawgfx_transpen(bitmap, cliprect, screen->machine().gfx[1], num, 0, 0, 0, horz, vert, 0);
|
||||
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[1], num, 0, 0, 0, horz, vert, 0);
|
||||
}
|
||||
|
||||
/* draw waves */
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
drawgfx_transpen(bitmap, cliprect, screen->machine().gfx[3], state->m_wavemod ? 1 : 0, 0, 0, 0, 64 * i, 0x4e, 0);
|
||||
drawgfx_transpen(bitmap, cliprect, screen.machine().gfx[3], state->m_wavemod ? 1 : 0, 0, 0, 0, 64 * i, 0x4e, 0);
|
||||
}
|
||||
|
||||
/* draw cursor */
|
||||
|
@ -287,7 +287,7 @@ static VIDEO_START( dgpix )
|
||||
|
||||
static SCREEN_UPDATE( dgpix )
|
||||
{
|
||||
dgpix_state *state = screen->machine().driver_data<dgpix_state>();
|
||||
dgpix_state *state = screen.machine().driver_data<dgpix_state>();
|
||||
int y;
|
||||
|
||||
for (y = 0; y < 240; y++)
|
||||
|
@ -126,7 +126,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
|
||||
|
||||
static SCREEN_UPDATE( discoboy )
|
||||
{
|
||||
discoboy_state *state = screen->machine().driver_data<discoboy_state>();
|
||||
discoboy_state *state = screen.machine().driver_data<discoboy_state>();
|
||||
UINT16 x, y;
|
||||
int i;
|
||||
int count = 0;
|
||||
@ -141,7 +141,7 @@ static SCREEN_UPDATE( discoboy )
|
||||
g = ((pal >> 4) & 0xf) << 4;
|
||||
r = ((pal >> 8) & 0xf) << 4;
|
||||
|
||||
palette_set_color(screen->machine(), i / 2, MAKE_RGB(r, g, b));
|
||||
palette_set_color(screen.machine(), i / 2, MAKE_RGB(r, g, b));
|
||||
}
|
||||
|
||||
for (i = 0; i < 0x800; i += 2)
|
||||
@ -154,7 +154,7 @@ static SCREEN_UPDATE( discoboy )
|
||||
g = ((pal >> 4) & 0xf) << 4;
|
||||
r = ((pal >> 8) & 0xf) << 4;
|
||||
|
||||
palette_set_color(screen->machine(), (i / 2) + 0x400, MAKE_RGB(r, g, b));
|
||||
palette_set_color(screen.machine(), (i / 2) + 0x400, MAKE_RGB(r, g, b));
|
||||
}
|
||||
|
||||
bitmap_fill(bitmap, cliprect, 0x3ff);
|
||||
@ -173,12 +173,12 @@ static SCREEN_UPDATE( discoboy )
|
||||
tileno = 0x2000 + (tileno & 0x1fff) + 0x0000;
|
||||
}
|
||||
|
||||
drawgfx_opaque(bitmap, cliprect, screen->machine().gfx[1], tileno, state->m_ram_att[count / 2], 0, 0, x*8, y*8);
|
||||
drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[1], tileno, state->m_ram_att[count / 2], 0, 0, x*8, y*8);
|
||||
count += 2;
|
||||
}
|
||||
}
|
||||
|
||||
draw_sprites(screen->machine(), bitmap, cliprect);
|
||||
draw_sprites(screen.machine(), bitmap, cliprect);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -111,8 +111,8 @@ static void draw_sprites( running_machine& machine, bitmap_t *bitmap, const rect
|
||||
|
||||
static SCREEN_UPDATE(diverboy)
|
||||
{
|
||||
// bitmap_fill(bitmap,cliprect,get_black_pen(screen->machine()));
|
||||
draw_sprites(screen->machine(), bitmap, cliprect);
|
||||
// bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine()));
|
||||
draw_sprites(screen.machine(), bitmap, cliprect);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ static PALETTE_INIT( dleuro )
|
||||
|
||||
static SCREEN_UPDATE( dleuro )
|
||||
{
|
||||
dlair_state *state = screen->machine().driver_data<dlair_state>();
|
||||
dlair_state *state = screen.machine().driver_data<dlair_state>();
|
||||
UINT8 *videoram = state->m_videoram;
|
||||
int x, y;
|
||||
|
||||
@ -183,7 +183,7 @@ static SCREEN_UPDATE( dleuro )
|
||||
for (x = 0; x < 32; x++)
|
||||
{
|
||||
UINT8 *base = &videoram[y * 64 + x * 2 + 1];
|
||||
drawgfx_opaque(bitmap, cliprect, screen->machine().gfx[0], base[0], base[1], 0, 0, 10 * x, 16 * y);
|
||||
drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[0], base[0], base[1], 0, 0, 10 * x, 16 * y);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -340,14 +340,14 @@ static VIDEO_START(dderby)
|
||||
|
||||
static SCREEN_UPDATE(dderby)
|
||||
{
|
||||
dmndrby_state *state = screen->machine().driver_data<dmndrby_state>();
|
||||
dmndrby_state *state = screen.machine().driver_data<dmndrby_state>();
|
||||
int x,y,count;
|
||||
int off,scrolly;
|
||||
const gfx_element *gfx = screen->machine().gfx[0];
|
||||
const gfx_element *sprites = screen->machine().gfx[1];
|
||||
const gfx_element *track = screen->machine().gfx[2];
|
||||
const gfx_element *gfx = screen.machine().gfx[0];
|
||||
const gfx_element *sprites = screen.machine().gfx[1];
|
||||
const gfx_element *track = screen.machine().gfx[2];
|
||||
|
||||
bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine()));
|
||||
bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine()));
|
||||
|
||||
|
||||
/* Draw racetrack
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user