mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
machine->pen lookup removal
This commit is contained in:
parent
0696fc6da2
commit
4c67395bc6
@ -190,6 +190,6 @@ VIDEO_UPDATE( tail2nos )
|
||||
tilemap_draw(bitmap,cliprect,bg_tilemap,0,0);
|
||||
}
|
||||
else
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect);
|
||||
fillbitmap(bitmap,0,cliprect);
|
||||
return 0;
|
||||
}
|
||||
|
@ -491,7 +491,7 @@ static void TC0180VCU_tilemap_draw(mame_bitmap *bitmap,const rectangle *cliprect
|
||||
}
|
||||
|
||||
|
||||
static void draw_framebuffer(running_machine *machine, mame_bitmap *bitmap,const rectangle *cliprect,int priority)
|
||||
static void draw_framebuffer(mame_bitmap *bitmap,const rectangle *cliprect,int priority)
|
||||
{
|
||||
rectangle myclip = *cliprect;
|
||||
int x,y;
|
||||
@ -520,7 +520,7 @@ profiler_mark(PROFILER_USER1);
|
||||
UINT16 c = *src++;
|
||||
|
||||
if (c != 0)
|
||||
*dst = machine->pens[b_sp_color_base + c];
|
||||
*dst = b_sp_color_base + c;
|
||||
|
||||
dst--;
|
||||
}
|
||||
@ -538,7 +538,7 @@ profiler_mark(PROFILER_USER1);
|
||||
UINT16 c = *src++;
|
||||
|
||||
if (c != 0)
|
||||
*dst = machine->pens[b_sp_color_base + c];
|
||||
*dst = b_sp_color_base + c;
|
||||
|
||||
dst++;
|
||||
}
|
||||
@ -562,7 +562,7 @@ profiler_mark(PROFILER_USER1);
|
||||
UINT16 c = *src++;
|
||||
|
||||
if (c != 0 && (c & 0x10) == priority)
|
||||
*dst = machine->pens[b_sp_color_base + c];
|
||||
*dst = b_sp_color_base + c;
|
||||
|
||||
dst--;
|
||||
}
|
||||
@ -580,7 +580,7 @@ profiler_mark(PROFILER_USER1);
|
||||
UINT16 c = *src++;
|
||||
|
||||
if (c != 0 && (c & 0x10) == priority)
|
||||
*dst = machine->pens[b_sp_color_base + c];
|
||||
*dst = b_sp_color_base + c;
|
||||
|
||||
dst++;
|
||||
}
|
||||
@ -594,14 +594,14 @@ VIDEO_UPDATE( taitob )
|
||||
{
|
||||
if ((video_control & 0x20) == 0)
|
||||
{
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect);
|
||||
fillbitmap(bitmap,0,cliprect);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Draw playfields */
|
||||
TC0180VCU_tilemap_draw(bitmap,cliprect,bg_tilemap,1);
|
||||
|
||||
draw_framebuffer(machine, bitmap,cliprect,1);
|
||||
draw_framebuffer(bitmap,cliprect,1);
|
||||
|
||||
TC0180VCU_tilemap_draw(bitmap,cliprect,fg_tilemap,0);
|
||||
|
||||
@ -611,10 +611,10 @@ VIDEO_UPDATE( taitob )
|
||||
int scrolly = -pixel_scroll[1]; //+240;
|
||||
/* bit 15 of pixel_scroll[0] is probably flip screen */
|
||||
|
||||
copyscrollbitmap_trans(bitmap,pixel_bitmap,1,&scrollx,1,&scrolly,cliprect,machine->pens[b_fg_color_base * 16]);
|
||||
copyscrollbitmap_trans(bitmap,pixel_bitmap,1,&scrollx,1,&scrolly,cliprect,b_fg_color_base * 16);
|
||||
}
|
||||
|
||||
draw_framebuffer(machine, bitmap,cliprect,0);
|
||||
draw_framebuffer(bitmap,cliprect,0);
|
||||
|
||||
tilemap_draw(bitmap,cliprect,tx_tilemap,0,0);
|
||||
return 0;
|
||||
|
@ -1051,7 +1051,7 @@ VIDEO_UPDATE( ssi )
|
||||
/* SSI only uses sprites, the tilemap registers are not even initialized.
|
||||
(they are in Majestic 12, but the tilemaps are not used anyway) */
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect);
|
||||
fillbitmap(bitmap,0,cliprect);
|
||||
draw_sprites(machine, bitmap,cliprect,NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
@ -1064,7 +1064,7 @@ VIDEO_UPDATE( yesnoj )
|
||||
TC0100SCN_tilemap_update(machine);
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect); /* wrong color? */
|
||||
fillbitmap(bitmap,0,cliprect); /* wrong color? */
|
||||
draw_sprites(machine, bitmap,cliprect,NULL, 0);
|
||||
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,TC0100SCN_bottomlayer(0),0,0);
|
||||
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,TC0100SCN_bottomlayer(0)^1,0,0);
|
||||
@ -1080,7 +1080,7 @@ VIDEO_UPDATE( taitof2 )
|
||||
TC0100SCN_tilemap_update(machine);
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect); /* wrong color? */
|
||||
fillbitmap(bitmap,0,cliprect); /* wrong color? */
|
||||
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,TC0100SCN_bottomlayer(0),0,0);
|
||||
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,TC0100SCN_bottomlayer(0)^1,0,0);
|
||||
draw_sprites(machine, bitmap,cliprect,NULL, 0);
|
||||
@ -1112,7 +1112,7 @@ VIDEO_UPDATE( taitof2_pri )
|
||||
f2_spriteblendmode = TC0360PRI_regs[0]&0xc0;
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect); /* wrong color? */
|
||||
fillbitmap(bitmap,0,cliprect); /* wrong color? */
|
||||
|
||||
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,layer[0],0,1);
|
||||
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,layer[1],0,2);
|
||||
@ -1171,7 +1171,7 @@ VIDEO_UPDATE( taitof2_pri_roz )
|
||||
f2_spriteblendmode = TC0360PRI_regs[0]&0xc0;
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect); /* wrong color? */
|
||||
fillbitmap(bitmap,0,cliprect); /* wrong color? */
|
||||
|
||||
drawn=0;
|
||||
for (i=0; i<16; i++)
|
||||
@ -1234,7 +1234,7 @@ VIDEO_UPDATE( thundfox )
|
||||
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect); /* wrong color? */
|
||||
fillbitmap(bitmap,0,cliprect); /* wrong color? */
|
||||
|
||||
|
||||
/*
|
||||
@ -1367,7 +1367,7 @@ VIDEO_UPDATE( metalb )
|
||||
f2_spriteblendmode = TC0360PRI_regs[0]&0xc0;
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect);
|
||||
fillbitmap(bitmap,0,cliprect);
|
||||
|
||||
TC0480SCP_tilemap_draw(bitmap,cliprect,layer[0],0,1);
|
||||
TC0480SCP_tilemap_draw(bitmap,cliprect,layer[1],0,2);
|
||||
@ -1414,7 +1414,7 @@ VIDEO_UPDATE( deadconx )
|
||||
spritepri[3] = TC0360PRI_regs[7] >> 4;
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect);
|
||||
fillbitmap(bitmap,0,cliprect);
|
||||
|
||||
TC0480SCP_tilemap_draw(bitmap,cliprect,layer[0],0,1);
|
||||
TC0480SCP_tilemap_draw(bitmap,cliprect,layer[1],0,2);
|
||||
|
@ -427,7 +427,7 @@ VIDEO_UPDATE( syvalion )
|
||||
taitoh_log_vram();
|
||||
#endif
|
||||
|
||||
fillbitmap(bitmap, machine->pens[0], cliprect);
|
||||
fillbitmap(bitmap, 0, cliprect);
|
||||
|
||||
TC0080VCO_tilemap_draw(machine,bitmap,cliprect,0,TILEMAP_DRAW_OPAQUE,0);
|
||||
TC0080VCO_tilemap_draw(machine,bitmap,cliprect,1,0,0);
|
||||
@ -445,7 +445,7 @@ VIDEO_UPDATE( recordbr )
|
||||
taitoh_log_vram();
|
||||
#endif
|
||||
|
||||
fillbitmap(bitmap, machine->pens[0], cliprect);
|
||||
fillbitmap(bitmap, 0, cliprect);
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
if ( !input_code_pressed(KEYCODE_A) )
|
||||
@ -476,7 +476,7 @@ VIDEO_UPDATE( dleague )
|
||||
taitoh_log_vram();
|
||||
#endif
|
||||
|
||||
fillbitmap(bitmap, machine->pens[0], cliprect);
|
||||
fillbitmap(bitmap, 0, cliprect);
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
if ( !input_code_pressed(KEYCODE_A) )
|
||||
|
@ -857,7 +857,7 @@ VIDEO_UPDATE( contcirc )
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
|
||||
fillbitmap(bitmap, machine->pens[0], cliprect);
|
||||
fillbitmap(bitmap, 0, cliprect);
|
||||
|
||||
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,layer[0],0,0);
|
||||
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,layer[1],0,1);
|
||||
@ -884,7 +884,7 @@ VIDEO_UPDATE( chasehq )
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
|
||||
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
|
||||
fillbitmap(bitmap, machine->pens[0], cliprect);
|
||||
fillbitmap(bitmap, 0, cliprect);
|
||||
|
||||
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,layer[0],TILEMAP_DRAW_OPAQUE,0);
|
||||
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,layer[1],0,1);
|
||||
@ -909,7 +909,7 @@ VIDEO_UPDATE( bshark )
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
|
||||
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
|
||||
fillbitmap(bitmap, machine->pens[0],cliprect);
|
||||
fillbitmap(bitmap, 0,cliprect);
|
||||
|
||||
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,layer[0],TILEMAP_DRAW_OPAQUE,0);
|
||||
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,layer[1],0,1);
|
||||
@ -934,7 +934,7 @@ VIDEO_UPDATE( sci )
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
|
||||
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
|
||||
fillbitmap(bitmap, machine->pens[0], cliprect);
|
||||
fillbitmap(bitmap, 0, cliprect);
|
||||
|
||||
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,layer[0],TILEMAP_DRAW_OPAQUE,0);
|
||||
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,layer[1],0,1);
|
||||
@ -959,7 +959,7 @@ VIDEO_UPDATE( aquajack )
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
|
||||
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
|
||||
fillbitmap(bitmap, machine->pens[0], cliprect);
|
||||
fillbitmap(bitmap, 0, cliprect);
|
||||
|
||||
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,layer[0],TILEMAP_DRAW_OPAQUE,0);
|
||||
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,layer[1],0,1);
|
||||
@ -984,7 +984,7 @@ VIDEO_UPDATE( spacegun )
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
|
||||
/* Ensure screen blanked even when bottom layer not drawn due to disable bit */
|
||||
fillbitmap(bitmap, machine->pens[0], cliprect);
|
||||
fillbitmap(bitmap, 0, cliprect);
|
||||
|
||||
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,layer[0],TILEMAP_DRAW_OPAQUE,1);
|
||||
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,layer[1],0,2);
|
||||
@ -1014,7 +1014,7 @@ VIDEO_UPDATE( dblaxle )
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
|
||||
/* Ensure screen blanked - this shouldn't be necessary! */
|
||||
fillbitmap(bitmap, machine->pens[0], cliprect);
|
||||
fillbitmap(bitmap, 0, cliprect);
|
||||
|
||||
TC0480SCP_tilemap_draw(bitmap,cliprect,layer[0],TILEMAP_DRAW_OPAQUE,0);
|
||||
TC0480SCP_tilemap_draw(bitmap,cliprect,layer[1],0,0);
|
||||
|
@ -366,7 +366,7 @@ VIDEO_UPDATE( taitoair )
|
||||
{
|
||||
TC0080VCO_tilemap_update(machine);
|
||||
|
||||
fillbitmap(bitmap, machine->pens[0x41], cliprect);
|
||||
fillbitmap(bitmap, 0x41, cliprect);
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
if ( !input_code_pressed(KEYCODE_A) )
|
||||
|
@ -2687,7 +2687,7 @@ void TC0100SCN_tilemap_update(running_machine *machine)
|
||||
}
|
||||
}
|
||||
|
||||
static void TC0100SCN_tilemap_draw_fg(running_machine *machine, mame_bitmap *bitmap,const rectangle *cliprect, int chip, tilemap* tmap ,int flags, UINT32 priority)
|
||||
static void TC0100SCN_tilemap_draw_fg(mame_bitmap *bitmap,const rectangle *cliprect, int chip, tilemap* tmap ,int flags, UINT32 priority)
|
||||
{
|
||||
const mame_bitmap *src_bitmap = tilemap_get_pixmap(tmap);
|
||||
int width_mask, height_mask, x, y, p;
|
||||
@ -2717,7 +2717,7 @@ static void TC0100SCN_tilemap_draw_fg(running_machine *machine, mame_bitmap *bit
|
||||
|
||||
if ((p&0xf)!=0 || (flags & TILEMAP_DRAW_OPAQUE))
|
||||
{
|
||||
*BITMAP_ADDR16(bitmap, y, x + cliprect->min_x) = machine->pens[p];
|
||||
*BITMAP_ADDR16(bitmap, y, x + cliprect->min_x) = p;
|
||||
if (priority_bitmap)
|
||||
{
|
||||
UINT8 *pri = BITMAP_ADDR8(priority_bitmap, y, 0);
|
||||
@ -2749,7 +2749,7 @@ if (disable != 0 && disable != 3 && disable != 7)
|
||||
break;
|
||||
case 1:
|
||||
if (disable & 0x02) return 1;
|
||||
TC0100SCN_tilemap_draw_fg(machine,bitmap,&clip,chip,TC0100SCN_tilemap[chip][1][TC0100SCN_dblwidth[chip]],flags,priority);
|
||||
TC0100SCN_tilemap_draw_fg(bitmap,&clip,chip,TC0100SCN_tilemap[chip][1][TC0100SCN_dblwidth[chip]],flags,priority);
|
||||
break;
|
||||
case 2:
|
||||
if (disable & 0x04) return 1;
|
||||
|
@ -771,7 +771,7 @@ static void copy_layers(running_machine *machine, mame_bitmap *bitmap, const rec
|
||||
int i = 0;
|
||||
|
||||
/* fill the screen with the background color */
|
||||
fillbitmap(bitmap, machine->pens[8 * (taitosj_colorbank[1] & 0x07)], cliprect);
|
||||
fillbitmap(bitmap, 8 * (taitosj_colorbank[1] & 0x07), cliprect);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ VIDEO_UPDATE( taxidrvr )
|
||||
|
||||
if (taxidrvr_bghide)
|
||||
{
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect);
|
||||
fillbitmap(bitmap,0,cliprect);
|
||||
|
||||
|
||||
/* kludge to fix scroll after death */
|
||||
|
@ -242,7 +242,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap,const rec
|
||||
VIDEO_UPDATE( tecmo )
|
||||
{
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
fillbitmap(bitmap,machine->pens[0x100],cliprect);
|
||||
fillbitmap(bitmap,0x100,cliprect);
|
||||
tilemap_draw(bitmap,cliprect,bg_tilemap,0,1);
|
||||
tilemap_draw(bitmap,cliprect,fg_tilemap,0,2);
|
||||
tilemap_draw(bitmap,cliprect,tx_tilemap,0,4);
|
||||
|
@ -113,7 +113,6 @@ VIDEO_START( thief ){
|
||||
VIDEO_UPDATE( thief ){
|
||||
UINT32 offs;
|
||||
int flipscreen = thief_video_control&1;
|
||||
const pen_t *pal_data = machine->pens;
|
||||
const UINT8 *source = videoram;
|
||||
|
||||
if( thief_video_control&4 ) /* visible page */
|
||||
@ -130,21 +129,19 @@ VIDEO_UPDATE( thief ){
|
||||
if( flipscreen ){
|
||||
for( bit=0; bit<8; bit++ ){
|
||||
*BITMAP_ADDR16(bitmap, 0xff - ypos, 0xff - (xpos+bit)) =
|
||||
pal_data[
|
||||
(((plane0<<bit)&0x80)>>7) |
|
||||
(((plane1<<bit)&0x80)>>6) |
|
||||
(((plane2<<bit)&0x80)>>5) |
|
||||
(((plane3<<bit)&0x80)>>4)];
|
||||
(((plane3<<bit)&0x80)>>4);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for( bit=0; bit<8; bit++ ){
|
||||
*BITMAP_ADDR16(bitmap, ypos, xpos+bit) =
|
||||
pal_data[
|
||||
(((plane0<<bit)&0x80)>>7) |
|
||||
(((plane1<<bit)&0x80)>>6) |
|
||||
(((plane2<<bit)&0x80)>>5) |
|
||||
(((plane3<<bit)&0x80)>>4)];
|
||||
(((plane3<<bit)&0x80)>>4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ VIDEO_UPDATE( thoop2 )
|
||||
|
||||
thoop2_sort_sprites();
|
||||
|
||||
fillbitmap( bitmap, machine->pens[0], cliprect );
|
||||
fillbitmap( bitmap, 0, cliprect );
|
||||
|
||||
tilemap_draw(bitmap,cliprect,pant[1],TILEMAP_DRAW_LAYER1 | 3,0);
|
||||
tilemap_draw(bitmap,cliprect,pant[0],TILEMAP_DRAW_LAYER1 | 3,0);
|
||||
|
@ -73,7 +73,7 @@ VIDEO_UPDATE( scontra )
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
|
||||
/* The background color is always from layer 1 - but it's always black anyway */
|
||||
// fillbitmap(bitmap,machine->pens[16 * layer_colorbase[1]],cliprect);
|
||||
// fillbitmap(bitmap,16 * layer_colorbase[1],cliprect);
|
||||
if (scontra_priority)
|
||||
{
|
||||
tilemap_draw(bitmap,cliprect,K052109_tilemap[2],TILEMAP_DRAW_OPAQUE,1);
|
||||
|
@ -653,7 +653,7 @@ VIDEO_UPDATE( lgtnfght )
|
||||
sortlayers(sorted_layer,layerpri);
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
fillbitmap(bitmap,machine->pens[16 * bg_colorbase],cliprect);
|
||||
fillbitmap(bitmap,16 * bg_colorbase,cliprect);
|
||||
tilemap_draw(bitmap,cliprect,K052109_tilemap[sorted_layer[0]],0,1);
|
||||
tilemap_draw(bitmap,cliprect,K052109_tilemap[sorted_layer[1]],0,2);
|
||||
tilemap_draw(bitmap,cliprect,K052109_tilemap[sorted_layer[2]],0,4);
|
||||
@ -698,7 +698,7 @@ VIDEO_UPDATE( glfgreat )
|
||||
/* not sure about the 053936 priority, but it seems to work */
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
fillbitmap(bitmap,machine->pens[16 * bg_colorbase],cliprect);
|
||||
fillbitmap(bitmap,16 * bg_colorbase,cliprect);
|
||||
tilemap_draw(bitmap,cliprect,K052109_tilemap[sorted_layer[0]],0,1);
|
||||
if (layerpri[0] >= 0x30 && layerpri[1] < 0x30)
|
||||
{
|
||||
@ -793,7 +793,7 @@ VIDEO_UPDATE( thndrx2 )
|
||||
sortlayers(sorted_layer,layerpri);
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
fillbitmap(bitmap,machine->pens[16 * bg_colorbase],cliprect);
|
||||
fillbitmap(bitmap,16 * bg_colorbase,cliprect);
|
||||
tilemap_draw(bitmap,cliprect,K052109_tilemap[sorted_layer[0]],0,1);
|
||||
tilemap_draw(bitmap,cliprect,K052109_tilemap[sorted_layer[1]],0,2);
|
||||
tilemap_draw(bitmap,cliprect,K052109_tilemap[sorted_layer[2]],0,4);
|
||||
|
@ -197,7 +197,7 @@ VIDEO_UPDATE( tnzs )
|
||||
|
||||
|
||||
/* Fill the background */
|
||||
fillbitmap(bitmap, machine->pens[0x1f0], cliprect);
|
||||
fillbitmap(bitmap, 0x1f0, cliprect);
|
||||
|
||||
/* Redraw the background tiles (c400-c5ff) */
|
||||
draw_background(machine, bitmap, cliprect, tnzs_objram + 0x400);
|
||||
|
@ -1151,7 +1151,7 @@ VIDEO_UPDATE( rallybik )
|
||||
toaplan1_log_vram();
|
||||
#endif
|
||||
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect);
|
||||
fillbitmap(bitmap,0,cliprect);
|
||||
|
||||
tilemap_draw(bitmap,cliprect,pf1_tilemap,TILEMAP_DRAW_OPAQUE | 0,0);
|
||||
tilemap_draw(bitmap,cliprect,pf1_tilemap,TILEMAP_DRAW_OPAQUE | 1,0);
|
||||
@ -1176,7 +1176,7 @@ VIDEO_UPDATE( toaplan1 )
|
||||
#endif
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
fillbitmap(bitmap,machine->pens[0x120],cliprect);
|
||||
fillbitmap(bitmap,0x120,cliprect);
|
||||
|
||||
tilemap_draw(bitmap,cliprect,pf4_tilemap,TILEMAP_DRAW_OPAQUE,0);
|
||||
for (priority = 8; priority < 16; priority++)
|
||||
@ -1203,7 +1203,7 @@ VIDEO_UPDATE( demonwld )
|
||||
#endif
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
fillbitmap(bitmap,machine->pens[0x120],cliprect);
|
||||
fillbitmap(bitmap,0x120,cliprect);
|
||||
|
||||
tilemap_draw(bitmap,cliprect,pf1_tilemap,TILEMAP_DRAW_OPAQUE | 0,0);
|
||||
tilemap_draw(bitmap,cliprect,pf1_tilemap,TILEMAP_DRAW_OPAQUE | 1,0);
|
||||
|
@ -1431,7 +1431,7 @@ VIDEO_UPDATE( toaplan2_0 )
|
||||
mark_sprite_priority(0);
|
||||
mark_tile_priority(0);
|
||||
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect);
|
||||
fillbitmap(bitmap,0,cliprect);
|
||||
|
||||
for (priority = 0; priority < 16; priority++)
|
||||
{
|
||||
@ -1458,7 +1458,7 @@ VIDEO_UPDATE( dogyuun_1 )
|
||||
mark_tile_priority(0);
|
||||
mark_tile_priority(1);
|
||||
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect);
|
||||
fillbitmap(bitmap,0,cliprect);
|
||||
|
||||
for (priority = 0; priority < 16; priority++)
|
||||
{
|
||||
@ -1493,7 +1493,7 @@ VIDEO_UPDATE( batsugun_1 )
|
||||
mark_tile_priority(0);
|
||||
mark_tile_priority(1);
|
||||
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect);
|
||||
fillbitmap(bitmap,0,cliprect);
|
||||
|
||||
for (priority = 0; priority < 16; priority++)
|
||||
{
|
||||
@ -1546,7 +1546,7 @@ VIDEO_UPDATE( batrider_0 )
|
||||
objectbank_dirty = 0;
|
||||
}
|
||||
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect);
|
||||
fillbitmap(bitmap,0,cliprect);
|
||||
|
||||
for (priority = 0; priority < 16; priority++)
|
||||
{
|
||||
@ -1585,7 +1585,7 @@ VIDEO_UPDATE( mahoudai_0 )
|
||||
mark_sprite_priority(0);
|
||||
mark_tile_priority(0);
|
||||
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect);
|
||||
fillbitmap(bitmap,0,cliprect);
|
||||
|
||||
if (bg_tile_priority[0][0]) tilemap_draw(bitmap,cliprect,bg_tilemap[0],0,0);
|
||||
if (fg_tile_priority[0][0]) tilemap_draw(bitmap,cliprect,fg_tilemap[0],0,0);
|
||||
|
@ -166,7 +166,7 @@ VIDEO_UPDATE( topspeed )
|
||||
layer[3] = 0;
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
fillbitmap(bitmap, machine->pens[0], cliprect);
|
||||
fillbitmap(bitmap, 0, cliprect);
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
if (dislayer[3]==0)
|
||||
|
@ -35,17 +35,18 @@ VIDEO_UPDATE( truco )
|
||||
UINT8 *vid = videoram;
|
||||
int x, y;
|
||||
|
||||
for( y = 0; y < 192; y++ ) {
|
||||
for( x = 0; x < 256; x++ ) {
|
||||
for( y = 0; y < 192; y++ )
|
||||
{
|
||||
for( x = 0; x < 256; x++ )
|
||||
{
|
||||
int pixel;
|
||||
|
||||
if ( x & 1 ) {
|
||||
if ( x & 1 )
|
||||
pixel = vid[x>>1] & 0x0f;
|
||||
} else {
|
||||
else
|
||||
pixel = ( vid[x>>1] >> 4 ) & 0x0f;
|
||||
}
|
||||
|
||||
*BITMAP_ADDR16(bitmap, y, x) = machine->pens[pixel];
|
||||
*BITMAP_ADDR16(bitmap, y, x) = pixel;
|
||||
}
|
||||
|
||||
vid += 0x80;
|
||||
|
@ -216,7 +216,7 @@ VIDEO_UPDATE( tsamurai )
|
||||
Note that the background color register isn't well understood
|
||||
(screenshots would be helpful)
|
||||
*/
|
||||
fillbitmap(bitmap,machine->pens[bgcolor],cliprect);
|
||||
fillbitmap(bitmap,bgcolor,cliprect);
|
||||
tilemap_draw(bitmap,cliprect,background,0,0);
|
||||
draw_sprites(machine, bitmap,cliprect);
|
||||
tilemap_draw(bitmap,cliprect,foreground,0,0);
|
||||
|
@ -582,7 +582,7 @@ VIDEO_UPDATE( tubep )
|
||||
{
|
||||
int DISP_ = DISP^1;
|
||||
|
||||
const pen_t *pens = &machine->pens[ 32 ]; //change it later
|
||||
pen_t pen_base = 32; //change it later
|
||||
|
||||
UINT32 v;
|
||||
UINT8 *text_gfx_base = memory_region(REGION_GFX1);
|
||||
@ -609,7 +609,7 @@ VIDEO_UPDATE( tubep )
|
||||
text_gfx_data = text_gfx_base[(text_code << 3) | (v & 0x07)];
|
||||
|
||||
if (text_gfx_data & (0x80 >> (h & 0x07)))
|
||||
*BITMAP_ADDR16(bitmap, v, h) = machine->pens[(tubep_textram[text_offs + 1] & 0x0f) | color_A4];
|
||||
*BITMAP_ADDR16(bitmap, v, h) = (tubep_textram[text_offs + 1] & 0x0f) | color_A4;
|
||||
else
|
||||
{
|
||||
UINT32 bg_data;
|
||||
@ -650,7 +650,7 @@ VIDEO_UPDATE( tubep )
|
||||
if (sp_data != 0x0f)
|
||||
bg_data = prom2[sp_data | color_A4];
|
||||
|
||||
*BITMAP_ADDR16(bitmap, v, h) = pens[ bg_data*64 + romB_data_h ];
|
||||
*BITMAP_ADDR16(bitmap, v, h) = pen_base + bg_data*64 + romB_data_h;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -737,8 +737,6 @@ VIDEO_UPDATE( rjammer )
|
||||
{
|
||||
int DISP_ = DISP^1;
|
||||
|
||||
const pen_t *pens = &machine->pens[ 0x00 ];
|
||||
|
||||
UINT32 v;
|
||||
UINT8 *text_gfx_base = memory_region(REGION_GFX1);
|
||||
UINT8 *rom13D = memory_region(REGION_USER1);
|
||||
@ -779,7 +777,7 @@ VIDEO_UPDATE( rjammer )
|
||||
text_gfx_data = text_gfx_base[(text_code << 3) | (v & 0x07)];
|
||||
|
||||
if (text_gfx_data & (0x80 >> (h & 0x07)))
|
||||
*BITMAP_ADDR16(bitmap, v, h) = machine->pens[0x10 | (tubep_textram[text_offs + 1] & 0x0f)];
|
||||
*BITMAP_ADDR16(bitmap, v, h) = 0x10 | (tubep_textram[text_offs + 1] & 0x0f);
|
||||
else
|
||||
{
|
||||
UINT32 sp_data;
|
||||
@ -790,7 +788,7 @@ VIDEO_UPDATE( rjammer )
|
||||
sp_data = sp_data1;
|
||||
|
||||
if (sp_data != 0x0f)
|
||||
*BITMAP_ADDR16(bitmap, v, h) = pens[0x00+ sp_data ];
|
||||
*BITMAP_ADDR16(bitmap, v, h) = 0x00 + sp_data;
|
||||
else
|
||||
{
|
||||
UINT32 bg_data;
|
||||
@ -843,7 +841,7 @@ VIDEO_UPDATE( rjammer )
|
||||
color_bank = (pal14h4_pin13 & ((bg_data&0x08)>>3) & ((bg_data&0x04)>>2) & (((bg_data&0x02)>>1)^1) & (bg_data&0x01) )
|
||||
| (pal14h4_pin18 & ((bg_data&0x08)>>3) & ((bg_data&0x04)>>2) & ((bg_data&0x02)>>1) & ((bg_data&0x01)^1) )
|
||||
| (pal14h4_pin19);
|
||||
*BITMAP_ADDR16(bitmap, v, h) = pens[0x20+ color_bank*0x10 + bg_data ];
|
||||
*BITMAP_ADDR16(bitmap, v, h) = 0x20 + color_bank*0x10 + bg_data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ VIDEO_UPDATE(tumblep)
|
||||
flip_screen_set( deco16_pf12_control[0]&0x80 );
|
||||
deco16_pf12_update(deco16_pf1_rowscroll,deco16_pf2_rowscroll);
|
||||
|
||||
fillbitmap(bitmap,machine->pens[256],cliprect); /* not verified */
|
||||
fillbitmap(bitmap,256,cliprect); /* not verified */
|
||||
|
||||
deco16_tilemap_2_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE,0);
|
||||
deco16_tilemap_1_draw(bitmap,cliprect,0,0);
|
||||
|
@ -196,7 +196,7 @@ static void set_pens(colortable_t *colortable)
|
||||
}
|
||||
}
|
||||
|
||||
static void draw_motion_object(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
|
||||
static void draw_motion_object(mame_bitmap *bitmap, const rectangle *cliprect)
|
||||
{
|
||||
/*
|
||||
* VSTRLO 0x1202
|
||||
@ -229,10 +229,10 @@ static void draw_motion_object(running_machine *machine, mame_bitmap *bitmap, co
|
||||
color = ((span_data>>6)&0x3)^0x3;
|
||||
count = (span_data&0x1f)+1;
|
||||
while( count-- && x < 256 )
|
||||
*BITMAP_ADDR16(tmpbitmap, line, x++) = machine->pens[color];
|
||||
*BITMAP_ADDR16(tmpbitmap, line, x++) = color;
|
||||
}
|
||||
while( x<256 )
|
||||
*BITMAP_ADDR16(tmpbitmap, line, x++) = machine->pens[0];
|
||||
*BITMAP_ADDR16(tmpbitmap, line, x++) = 0;
|
||||
} /* next line */
|
||||
|
||||
switch( tunhunt_ram[VSTRLO] )
|
||||
@ -260,12 +260,12 @@ static void draw_motion_object(running_machine *machine, mame_bitmap *bitmap, co
|
||||
scaley,/* incyy */
|
||||
0, /* no wraparound */
|
||||
cliprect,
|
||||
TRANSPARENCY_PEN,machine->pens[0],
|
||||
TRANSPARENCY_PEN,0,
|
||||
0 /* priority */
|
||||
);
|
||||
}
|
||||
|
||||
static void draw_box(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
|
||||
static void draw_box(mame_bitmap *bitmap, const rectangle *cliprect)
|
||||
{
|
||||
/*
|
||||
This is unnecessarily slow, but the box priorities aren't completely understood,
|
||||
@ -311,7 +311,7 @@ static void draw_box(running_machine *machine, mame_bitmap *bitmap, const rectan
|
||||
}
|
||||
}
|
||||
if (x >= cliprect->min_x && x <= cliprect->max_x)
|
||||
*BITMAP_ADDR16(bitmap, 0xff-y, x) = machine->pens[color];
|
||||
*BITMAP_ADDR16(bitmap, 0xff-y, x) = color;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -373,9 +373,9 @@ VIDEO_UPDATE( tunhunt )
|
||||
{
|
||||
set_pens(machine->colortable);
|
||||
|
||||
draw_box(machine, bitmap, cliprect);
|
||||
draw_box(bitmap, cliprect);
|
||||
|
||||
draw_motion_object(machine, bitmap, cliprect);
|
||||
draw_motion_object(bitmap, cliprect);
|
||||
|
||||
draw_shell(machine, bitmap, cliprect,
|
||||
tunhunt_ram[SHL0PC], /* picture code */
|
||||
|
@ -500,7 +500,7 @@ VIDEO_UPDATE( toaplan0 )
|
||||
|
||||
if (wardner_sprite_hack) wardner_sprite_priority_hack();
|
||||
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect);
|
||||
fillbitmap(bitmap,0,cliprect);
|
||||
|
||||
tilemap_draw(bitmap,cliprect,bg_tilemap,TILEMAP_DRAW_OPAQUE,0);
|
||||
draw_sprites(machine, bitmap,cliprect,0x0400);
|
||||
|
@ -290,7 +290,7 @@ VIDEO_UPDATE( undrfire )
|
||||
pivlayer[2] = 2;
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
fillbitmap(bitmap,machine->pens[0],cliprect); /* wrong color? */
|
||||
fillbitmap(bitmap,0,cliprect); /* wrong color? */
|
||||
|
||||
|
||||
/* The "PIV" chip seems to be a renamed TC0100SCN. It has a
|
||||
|
@ -359,7 +359,7 @@ if ( input_code_pressed(KEYCODE_Z) || input_code_pressed(KEYCODE_X) )
|
||||
#endif
|
||||
|
||||
/* The background color is the first of the last palette */
|
||||
fillbitmap(bitmap,machine->pens[0x1f00],cliprect);
|
||||
fillbitmap(bitmap,0x1f00,cliprect);
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
|
||||
if (layers_ctrl & 1) tilemap_draw(bitmap,cliprect,tilemap_0,0,1);
|
||||
@ -398,7 +398,7 @@ if ( input_code_pressed(KEYCODE_Z) || input_code_pressed(KEYCODE_X) )
|
||||
#endif
|
||||
|
||||
/* The background color is the first of the last palette */
|
||||
fillbitmap(bitmap,machine->pens[0x1f00],cliprect);
|
||||
fillbitmap(bitmap,0x1f00,cliprect);
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
|
||||
if (layers_ctrl & 1) tilemap_draw(bitmap,cliprect,tilemap_0,0,1);
|
||||
|
@ -73,10 +73,10 @@ static VPC vpc;
|
||||
|
||||
static void vdc_advance_line(running_machine *machine, int which);
|
||||
static void draw_black_line(running_machine *machine, int line);
|
||||
static void draw_overscan_line(const pen_t *pens, int line);
|
||||
static void draw_sgx_overscan_line(const pen_t *pens, int line);
|
||||
static void pce_refresh_line(int which, int line, int external_input, UINT8 *drawn, UINT16 *line_buffer, const pen_t *pens);
|
||||
static void pce_refresh_sprites(running_machine *machine, int which, int line, UINT8 *drawn, UINT16 *line_buffer, const pen_t *pens);
|
||||
static void draw_overscan_line(int line);
|
||||
static void draw_sgx_overscan_line(int line);
|
||||
static void pce_refresh_line(int which, int line, int external_input, UINT8 *drawn, UINT16 *line_buffer);
|
||||
static void pce_refresh_sprites(running_machine *machine, int which, int line, UINT8 *drawn, UINT16 *line_buffer);
|
||||
static void vdc_do_dma(int which);
|
||||
static void vpc_init( void );
|
||||
|
||||
@ -86,7 +86,7 @@ INTERRUPT_GEN( pce_interrupt )
|
||||
if ( vce.current_bitmap_line >= 14 && vce.current_bitmap_line < 14 + 242 ) {
|
||||
/* We are in the active display area */
|
||||
/* First fill the line with the overscan color */
|
||||
draw_overscan_line(machine->pens, vce.current_bitmap_line );
|
||||
draw_overscan_line(vce.current_bitmap_line );
|
||||
|
||||
/* Check if we need to draw more just the overscan color */
|
||||
if ( vdc[0].current_segment == STATE_VDW ) {
|
||||
@ -103,11 +103,11 @@ INTERRUPT_GEN( pce_interrupt )
|
||||
vdc[0].y_scroll = ( vdc[0].current_segment_line == 0 ) ? vdc[0].vdc_data[BYR].w : ( vdc[0].y_scroll + 1 );
|
||||
|
||||
/* Draw VDC #0 background layer */
|
||||
pce_refresh_line( 0, vdc[0].current_segment_line, 0, drawn, line_buffer, machine->pens);
|
||||
pce_refresh_line( 0, vdc[0].current_segment_line, 0, drawn, line_buffer);
|
||||
|
||||
/* Draw VDC #0 sprite layer */
|
||||
if(vdc[0].vdc_data[CR].w & CR_SB) {
|
||||
pce_refresh_sprites(machine, 0, vdc[0].current_segment_line, drawn, line_buffer, machine->pens);
|
||||
pce_refresh_sprites(machine, 0, vdc[0].current_segment_line, drawn, line_buffer);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -126,7 +126,7 @@ INTERRUPT_GEN( sgx_interrupt )
|
||||
if ( vce.current_bitmap_line >= 14 && vce.current_bitmap_line < 14 + 242 ) {
|
||||
/* We are in the active display area */
|
||||
/* First fill the line with the overscan color */
|
||||
draw_sgx_overscan_line(machine->pens, vce.current_bitmap_line );
|
||||
draw_sgx_overscan_line(vce.current_bitmap_line );
|
||||
|
||||
/* Check if we need to draw more just the overscan color */
|
||||
if ( vdc[0].current_segment == STATE_VDW ) {
|
||||
@ -145,19 +145,19 @@ INTERRUPT_GEN( sgx_interrupt )
|
||||
vdc[1].y_scroll = ( vdc[1].current_segment_line == 0 ) ? vdc[1].vdc_data[BYR].w : ( vdc[1].y_scroll + 1 );
|
||||
|
||||
/* Draw VDC #0 background layer */
|
||||
pce_refresh_line( 0, vdc[0].current_segment_line, 0, drawn[0], temp_buffer[0], machine->pens);
|
||||
pce_refresh_line( 0, vdc[0].current_segment_line, 0, drawn[0], temp_buffer[0]);
|
||||
|
||||
/* Draw VDC #0 sprite layer */
|
||||
if(vdc[0].vdc_data[CR].w & CR_SB) {
|
||||
pce_refresh_sprites(machine, 0, vdc[0].current_segment_line, drawn[0], temp_buffer[0], machine->pens);
|
||||
pce_refresh_sprites(machine, 0, vdc[0].current_segment_line, drawn[0], temp_buffer[0]);
|
||||
}
|
||||
|
||||
/* Draw VDC #1 background layer */
|
||||
pce_refresh_line( 1, vdc[1].current_segment_line, 1, drawn[1], temp_buffer[1], machine->pens);
|
||||
pce_refresh_line( 1, vdc[1].current_segment_line, 1, drawn[1], temp_buffer[1]);
|
||||
|
||||
/* Draw VDC #1 sprite layer */
|
||||
if ( vdc[1].vdc_data[CR].w & CR_SB ) {
|
||||
pce_refresh_sprites(machine, 1, vdc[1].current_segment_line, drawn[1], temp_buffer[1], machine->pens);
|
||||
pce_refresh_sprites(machine, 1, vdc[1].current_segment_line, drawn[1], temp_buffer[1]);
|
||||
}
|
||||
|
||||
line_buffer = BITMAP_ADDR16( vce.bmp, vce.current_bitmap_line, 86 );
|
||||
@ -388,7 +388,7 @@ static void draw_black_line(running_machine *machine, int line)
|
||||
line_buffer[i] = get_black_pen( machine );
|
||||
}
|
||||
|
||||
static void draw_overscan_line(const pen_t *pens, int line)
|
||||
static void draw_overscan_line(int line)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -399,10 +399,10 @@ static void draw_overscan_line(const pen_t *pens, int line)
|
||||
UINT16 *line_buffer = BITMAP_ADDR16( vce.bmp, line, 0 );
|
||||
|
||||
for ( i = 0; i < VDC_WPF; i++ )
|
||||
line_buffer[i] = pens[color_base + vce.vce_data[0x100].w];
|
||||
line_buffer[i] = color_base + vce.vce_data[0x100].w;
|
||||
}
|
||||
|
||||
static void draw_sgx_overscan_line(const pen_t *pens, int line) {
|
||||
static void draw_sgx_overscan_line(int line) {
|
||||
int i;
|
||||
|
||||
/* Are we in greyscale mode or in color mode? */
|
||||
@ -412,7 +412,7 @@ static void draw_sgx_overscan_line(const pen_t *pens, int line) {
|
||||
UINT16 *line_buffer = BITMAP_ADDR16( vce.bmp, line, 0 );
|
||||
|
||||
for ( i = 0; i < VDC_WPF; i++ )
|
||||
line_buffer[i] = pens[color_base + vce.vce_data[0].w];
|
||||
line_buffer[i] = color_base + vce.vce_data[0].w;
|
||||
}
|
||||
|
||||
static void vram_write(int which, offs_t offset, UINT8 data)
|
||||
@ -627,7 +627,7 @@ WRITE8_HANDLER ( vce_w )
|
||||
}
|
||||
|
||||
|
||||
static void pce_refresh_line(int which, int line, int external_input, UINT8 *drawn, UINT16 *line_buffer, const pen_t *pens)
|
||||
static void pce_refresh_line(int which, int line, int external_input, UINT8 *drawn, UINT16 *line_buffer)
|
||||
{
|
||||
static const int width_table[4] = {5, 6, 7, 7};
|
||||
|
||||
@ -705,13 +705,13 @@ static void pce_refresh_line(int which, int line, int external_input, UINT8 *dra
|
||||
if ( phys_x >= 0 && phys_x < vdc[which].physical_width ) {
|
||||
drawn[ pixel ] = c ? 1 : 0;
|
||||
if ( c || ! external_input )
|
||||
line_buffer[ pixel ] = pens[color_base + vce.vce_data[c].w];
|
||||
line_buffer[ pixel ] = color_base + vce.vce_data[c].w;
|
||||
pixel++;
|
||||
if ( vdc[which].physical_width != 512 ) {
|
||||
while ( pixel < ( ( ( phys_x + 1 ) * 512 ) / vdc[which].physical_width ) ) {
|
||||
drawn[ pixel ] = c ? 1 : 0;
|
||||
if ( c || ! external_input )
|
||||
line_buffer[ pixel ] = pens[color_base + vce.vce_data[c].w];
|
||||
line_buffer[ pixel ] = color_base + vce.vce_data[c].w;
|
||||
pixel++;
|
||||
}
|
||||
}
|
||||
@ -755,7 +755,7 @@ static void conv_obj(int which, int i, int l, int hf, int vf, char *buf)
|
||||
}
|
||||
}
|
||||
|
||||
static void pce_refresh_sprites(running_machine *machine, int which, int line, UINT8 *drawn, UINT16 *line_buffer, const pen_t *pens)
|
||||
static void pce_refresh_sprites(running_machine *machine, int which, int line, UINT8 *drawn, UINT16 *line_buffer)
|
||||
{
|
||||
int i;
|
||||
UINT8 sprites_drawn=0;
|
||||
@ -828,12 +828,12 @@ static void pce_refresh_sprites(running_machine *machine, int which, int line, U
|
||||
if ( buf[x] ) {
|
||||
if( drawn[pixel_x] < 2 ) {
|
||||
if( priority || drawn[pixel_x] == 0 ) {
|
||||
line_buffer[pixel_x] = machine->pens[color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w];
|
||||
line_buffer[pixel_x] = color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w;
|
||||
if ( vdc[which].physical_width != 512 ) {
|
||||
int dp = 1;
|
||||
while ( pixel_x + dp < ( ( ( obj_x + x + 1 ) * 512 ) / vdc[which].physical_width ) ) {
|
||||
drawn[pixel_x + dp] = i + 2;
|
||||
line_buffer[pixel_x + dp] = pens[color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w];
|
||||
line_buffer[pixel_x + dp] = color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w;
|
||||
dp++;
|
||||
}
|
||||
}
|
||||
@ -870,12 +870,12 @@ static void pce_refresh_sprites(running_machine *machine, int which, int line, U
|
||||
if ( buf[x] ) {
|
||||
if( drawn[pixel_x] < 2 ) {
|
||||
if ( priority || drawn[pixel_x] == 0 ) {
|
||||
line_buffer[pixel_x] = pens[color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w];
|
||||
line_buffer[pixel_x] = color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w;
|
||||
if ( vdc[which].physical_width != 512 ) {
|
||||
int dp = 1;
|
||||
while ( pixel_x + dp < ( ( ( obj_x + x + 1 ) * 512 ) / vdc[which].physical_width ) ) {
|
||||
drawn[pixel_x + dp] = i + 2;
|
||||
line_buffer[pixel_x + dp] = pens[color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w];
|
||||
line_buffer[pixel_x + dp] = color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w;
|
||||
dp++;
|
||||
}
|
||||
}
|
||||
@ -914,12 +914,12 @@ static void pce_refresh_sprites(running_machine *machine, int which, int line, U
|
||||
if ( buf[x] ) {
|
||||
if( drawn[pixel_x] < 2 ) {
|
||||
if( priority || drawn[pixel_x] == 0 ) {
|
||||
line_buffer[pixel_x] = pens[color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w];
|
||||
line_buffer[pixel_x] = color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w;
|
||||
if ( vdc[which].physical_width != 512 ) {
|
||||
int dp = 1;
|
||||
while ( pixel_x + dp < ( ( ( obj_x + x + 17 ) * 512 ) / vdc[which].physical_width ) ) {
|
||||
drawn[pixel_x + dp] = i + 2;
|
||||
line_buffer[pixel_x + dp] = pens[color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w];
|
||||
line_buffer[pixel_x + dp] = color_base + vce.vce_data[0x100 + (palette << 4) + buf[x]].w;
|
||||
dp++;
|
||||
}
|
||||
}
|
||||
|
@ -1130,7 +1130,7 @@ VIDEO_UPDATE( victory )
|
||||
}
|
||||
|
||||
/* draw the scanline */
|
||||
draw_scanline8(bitmap, 0, y, 256, scanline, machine->pens, -1);
|
||||
draw_scanline8(bitmap, 0, y, 256, scanline, NULL, -1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -97,9 +97,7 @@ static void refresh_pixel_layer(running_machine *machine, mame_bitmap *bitmap)
|
||||
UINT16* p = video_ram;
|
||||
|
||||
if (video_ctrl & 1)
|
||||
{
|
||||
p += 0x20000;
|
||||
}
|
||||
|
||||
for (y = 0; y < machine->screen[0].height; y++)
|
||||
{
|
||||
@ -112,16 +110,12 @@ static void refresh_pixel_layer(running_machine *machine, mame_bitmap *bitmap)
|
||||
color |= 0x800 | ((p[x] >> 9) & 0xf);
|
||||
|
||||
if (p[x] & 0x2000)
|
||||
{
|
||||
color &= ~0xf; /* hack */
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
color |= p[x] & 0xf;
|
||||
}
|
||||
|
||||
*BITMAP_ADDR16(bitmap, y, x - 1) = machine->pens[color];
|
||||
*BITMAP_ADDR16(bitmap, y, x - 1) = color;
|
||||
}
|
||||
|
||||
p += 512;
|
||||
|
@ -701,7 +701,7 @@ VIDEO_UPDATE( wgp )
|
||||
|
||||
TC0100SCN_tilemap_update(machine);
|
||||
|
||||
fillbitmap(bitmap, machine->pens[0], cliprect);
|
||||
fillbitmap(bitmap, 0, cliprect);
|
||||
|
||||
layer[0] = 0;
|
||||
layer[1] = 1;
|
||||
|
@ -226,7 +226,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap,
|
||||
|
||||
VIDEO_UPDATE( kungfut )
|
||||
{
|
||||
fillbitmap(bitmap,machine->pens[bgpen],cliprect);
|
||||
fillbitmap(bitmap,bgpen,cliprect);
|
||||
draw_background(machine, bitmap, cliprect, 2 + char_bank[0] , 0);
|
||||
draw_foreground(machine, bitmap, cliprect, 0);
|
||||
draw_sprites(machine, bitmap, cliprect, spriteram_2, 4);
|
||||
@ -239,7 +239,7 @@ VIDEO_UPDATE( wiz )
|
||||
int bank;
|
||||
const rectangle* visible_area;
|
||||
|
||||
fillbitmap(bitmap,machine->pens[bgpen],cliprect);
|
||||
fillbitmap(bitmap,bgpen,cliprect);
|
||||
draw_background(machine, bitmap, cliprect, 2 + ((char_bank[0] << 1) | char_bank[1]), 0);
|
||||
draw_foreground(machine, bitmap, cliprect, 0);
|
||||
|
||||
@ -255,7 +255,7 @@ VIDEO_UPDATE( wiz )
|
||||
|
||||
VIDEO_UPDATE( stinger )
|
||||
{
|
||||
fillbitmap(bitmap,machine->pens[bgpen],cliprect);
|
||||
fillbitmap(bitmap,bgpen,cliprect);
|
||||
draw_background(machine, bitmap, cliprect, 2 + char_bank[0], 1);
|
||||
draw_foreground(machine, bitmap, cliprect, 1);
|
||||
draw_sprites(machine, bitmap, cliprect, spriteram_2, 4);
|
||||
|
@ -163,7 +163,7 @@ VIDEO_UPDATE( wrally )
|
||||
tilemap_set_scrolly(pant[1], 0, wrally_vregs[2]);
|
||||
tilemap_set_scrollx(pant[1], 0, wrally_vregs[3]);
|
||||
|
||||
fillbitmap( bitmap, machine->pens[0], cliprect );
|
||||
fillbitmap( bitmap, 0, cliprect );
|
||||
|
||||
tilemap_draw(bitmap,cliprect,pant[1],0,0);
|
||||
tilemap_draw(bitmap,cliprect,pant[0],0,0);
|
||||
|
@ -118,7 +118,7 @@ VIDEO_UPDATE( xmen )
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
/* note the '+1' in the background color!!! */
|
||||
fillbitmap(bitmap,machine->pens[16 * bg_colorbase+1],cliprect);
|
||||
fillbitmap(bitmap,16 * bg_colorbase+1,cliprect);
|
||||
tilemap_draw(bitmap,cliprect,K052109_tilemap[layer[0]],0,1);
|
||||
tilemap_draw(bitmap,cliprect,K052109_tilemap[layer[1]],0,2);
|
||||
tilemap_draw(bitmap,cliprect,K052109_tilemap[layer[2]],0,4);
|
||||
@ -246,7 +246,7 @@ VIDEO_EOF( xmen6p )
|
||||
|
||||
fillbitmap(priority_bitmap,0,&cliprect);
|
||||
/* note the '+1' in the background color!!! */
|
||||
fillbitmap(renderbitmap,machine->pens[16 * bg_colorbase+1],&cliprect);
|
||||
fillbitmap(renderbitmap,16 * bg_colorbase+1,&cliprect);
|
||||
tilemap_draw(renderbitmap,&cliprect,K052109_tilemap[layer[0]],0,1);
|
||||
tilemap_draw(renderbitmap,&cliprect,K052109_tilemap[layer[1]],0,2);
|
||||
tilemap_draw(renderbitmap,&cliprect,K052109_tilemap[layer[2]],0,4);
|
||||
|
@ -809,7 +809,7 @@ VIDEO_UPDATE( ygv608 )
|
||||
tilemap_set_scroll_cols( tilemap_B, ygv608.page_x );
|
||||
|
||||
// now clear the screen in case we change to 1-plane mode
|
||||
fillbitmap( work_bitmap, machine->pens[0], cliprect );
|
||||
fillbitmap( work_bitmap, 0, cliprect );
|
||||
|
||||
// reset resize flag
|
||||
ygv608.tilemap_resize = 0;
|
||||
@ -862,7 +862,7 @@ VIDEO_UPDATE( ygv608 )
|
||||
if ((ygv608.regs.s.r7 & r7_md) & MD_1PLANE)
|
||||
{
|
||||
// If the background tilemap is disabled, we need to clear the bitmap to black
|
||||
fillbitmap (work_bitmap,machine->pens[0],cliprect);
|
||||
fillbitmap (work_bitmap,0,cliprect);
|
||||
// fillbitmap (work_bitmap,1,&machine->screen[0].visarea);
|
||||
}
|
||||
else
|
||||
@ -900,9 +900,7 @@ VIDEO_UPDATE( ygv608 )
|
||||
// for some reason we can't use an opaque tilemap_A
|
||||
// so use a transparent but clear the work bitmap first
|
||||
// - look at why this is the case?!?
|
||||
fillbitmap( work_bitmap,
|
||||
machine->pens[0],
|
||||
&machine->screen[0].visarea );
|
||||
fillbitmap( work_bitmap,0,&machine->screen[0].visarea );
|
||||
|
||||
if ((ygv608.regs.s.r11 & r11_prm) == PRM_ASBDEX ||
|
||||
(ygv608.regs.s.r11 & r11_prm) == PRM_ASEBDX )
|
||||
@ -917,10 +915,10 @@ VIDEO_UPDATE( ygv608 )
|
||||
ygv608.ay, // + ( machine->screen[0].visarea.min_y << 16 ),
|
||||
ygv608.dx, ygv608.dxy, ygv608.dyx, ygv608.dy, 0,
|
||||
cliprect,
|
||||
TRANSPARENCY_PEN, machine->pens[0], 0 );
|
||||
TRANSPARENCY_PEN, 0, 0 );
|
||||
else
|
||||
#endif
|
||||
copybitmap_trans( bitmap, work_bitmap, 0, 0, 0, 0, cliprect, machine->pens[0] );
|
||||
copybitmap_trans( bitmap, work_bitmap, 0, 0, 0, 0, cliprect, 0 );
|
||||
|
||||
if ((ygv608.regs.s.r11 & r11_prm) == PRM_SABDEX ||
|
||||
(ygv608.regs.s.r11 & r11_prm) == PRM_SEABDX)
|
||||
|
@ -200,7 +200,7 @@ if (input_code_pressed(KEYCODE_Z))
|
||||
#endif
|
||||
|
||||
if (layers_ctrl&1) tilemap_draw(bitmap,cliprect, tilemap_0, 0,0);
|
||||
else fillbitmap(bitmap,machine->pens[0],cliprect);
|
||||
else fillbitmap(bitmap,0,cliprect);
|
||||
|
||||
if (layers_ctrl&2) tilemap_draw(bitmap,cliprect, tilemap_1, 0,0);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user