summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Zsolt Vasvari <zsoltvas@mamedev.org>2008-02-21 03:22:33 +0000
committer Zsolt Vasvari <zsoltvas@mamedev.org>2008-02-21 03:22:33 +0000
commit10d998271654018ae46208002d1b835930a978aa (patch)
treef94275d5893281fb240eb88cf5dd254a1c78f002
parente5bcee449d8fffefc5303eb1c40ff77040c3a6d5 (diff)
Removed some unneccassary lookups through machine->pens
-rw-r--r--src/mame/drivers/ace.c2
-rw-r--r--src/mame/drivers/backfire.c4
-rw-r--r--src/mame/drivers/bnstars.c4
-rw-r--r--src/mame/drivers/cardline.c2
-rw-r--r--src/mame/drivers/cowrace.c2
-rw-r--r--src/mame/drivers/dblewing.c2
-rw-r--r--src/mame/drivers/eolith16.c4
-rw-r--r--src/mame/drivers/fcrash.c2
-rw-r--r--src/mame/drivers/filetto.c2
-rw-r--r--src/mame/drivers/fortecar.c2
-rw-r--r--src/mame/drivers/galaxia.c2
-rw-r--r--src/mame/drivers/hal21.c2
-rw-r--r--src/mame/drivers/hanaroku.c2
-rw-r--r--src/mame/drivers/jollyjgr.c14
-rw-r--r--src/mame/drivers/laserbas.c8
-rw-r--r--src/mame/drivers/laserbat.c6
-rw-r--r--src/mame/drivers/marinedt.c22
-rw-r--r--src/mame/drivers/mazerbla.c24
-rw-r--r--src/mame/drivers/midas.c2
-rw-r--r--src/mame/drivers/mirage.c2
-rw-r--r--src/mame/drivers/missb2.c2
-rw-r--r--src/mame/drivers/mpu4drvr.c2
-rw-r--r--src/mame/drivers/pasha2.c8
-rw-r--r--src/mame/drivers/quizo.c54
-rw-r--r--src/mame/drivers/sbowling.c2
-rw-r--r--src/mame/drivers/shanghai.c4
-rw-r--r--src/mame/drivers/skylncr.c2
-rw-r--r--src/mame/drivers/trvmadns.c2
-rw-r--r--src/mame/drivers/vamphalf.c2
-rw-r--r--src/mame/drivers/vegaeo.c8
-rw-r--r--src/mame/video/atari.c2
-rw-r--r--src/mame/video/exerion.c15
-rw-r--r--src/mame/video/exidy440.c2
-rw-r--r--src/mame/video/irobot.c2
-rw-r--r--src/mame/video/itech32.c4
-rw-r--r--src/mame/video/magmax.c14
-rw-r--r--src/mame/video/polepos.c18
-rw-r--r--src/mame/video/toypop.c18
38 files changed, 128 insertions, 143 deletions
diff --git a/src/mame/drivers/ace.c b/src/mame/drivers/ace.c
index 8b3aee5d11c..4c6471901ef 100644
--- a/src/mame/drivers/ace.c
+++ b/src/mame/drivers/ace.c
@@ -74,7 +74,7 @@ static VIDEO_UPDATE( ace )
}
/* first of all, fill the screen with the background color */
- fillbitmap(bitmap, machine->pens[0], cliprect);
+ fillbitmap(bitmap, 0, cliprect);
drawgfx(bitmap,machine->gfx[1],
diff --git a/src/mame/drivers/backfire.c b/src/mame/drivers/backfire.c
index d65252b5c4d..6d34475628b 100644
--- a/src/mame/drivers/backfire.c
+++ b/src/mame/drivers/backfire.c
@@ -182,7 +182,7 @@ static VIDEO_UPDATE(backfire)
{
fillbitmap(priority_bitmap,0,NULL);
- fillbitmap(bitmap,machine->pens[0x100],cliprect);
+ fillbitmap(bitmap,0x100,cliprect);
if (backfire_left_priority[0] == 0)
{
@@ -204,7 +204,7 @@ static VIDEO_UPDATE(backfire)
else if (screen==1)
{
fillbitmap(priority_bitmap,0,NULL);
- fillbitmap(bitmap,machine->pens[0x500],cliprect);
+ fillbitmap(bitmap,0x500,cliprect);
if (backfire_right_priority[0] == 0)
{
diff --git a/src/mame/drivers/bnstars.c b/src/mame/drivers/bnstars.c
index c8d5513aaf5..af58fe7570c 100644
--- a/src/mame/drivers/bnstars.c
+++ b/src/mame/drivers/bnstars.c
@@ -496,7 +496,7 @@ static VIDEO_UPDATE(bnstars)
if (screen==0)
{
- fillbitmap(bitmap,machine->pens[0],cliprect); /* bg color */
+ fillbitmap(bitmap,0,cliprect); /* bg color */
tilemap_set_scrollx(ms32_bg_tilemap[0], 0, ms32_bg0_scroll[0x00/4] + ms32_bg0_scroll[0x08/4] + 0x10 );
@@ -514,7 +514,7 @@ static VIDEO_UPDATE(bnstars)
}
else
{
- fillbitmap(bitmap,machine->pens[0x8000+0],cliprect); /* bg color */
+ fillbitmap(bitmap,0x8000+0,cliprect); /* bg color */
tilemap_set_scrollx(ms32_bg_tilemap[1], 0, ms32_bg1_scroll[0x00/4] + ms32_bg1_scroll[0x08/4] + 0x10 );
diff --git a/src/mame/drivers/cardline.c b/src/mame/drivers/cardline.c
index 892cb563b29..150d784f5a4 100644
--- a/src/mame/drivers/cardline.c
+++ b/src/mame/drivers/cardline.c
@@ -35,7 +35,7 @@ static int cardline_video;
static VIDEO_UPDATE( cardline )
{
int x,y;
- fillbitmap(bitmap,machine->pens[0],cliprect);
+ fillbitmap(bitmap,0,cliprect);
for(y=0;y<32;y++)
{
for(x=0;x<64;x++)
diff --git a/src/mame/drivers/cowrace.c b/src/mame/drivers/cowrace.c
index 6f676677721..8a9412c05d4 100644
--- a/src/mame/drivers/cowrace.c
+++ b/src/mame/drivers/cowrace.c
@@ -41,7 +41,7 @@ static VIDEO_START( cowrace )
static VIDEO_UPDATE( cowrace )
{
- fillbitmap(bitmap,machine->pens[0],cliprect);
+ fillbitmap(bitmap,0,cliprect);
tilemap_draw(bitmap,cliprect, tmap, 0, 0);
return 0;
}
diff --git a/src/mame/drivers/dblewing.c b/src/mame/drivers/dblewing.c
index 8e6de3c88d5..67a95181d90 100644
--- a/src/mame/drivers/dblewing.c
+++ b/src/mame/drivers/dblewing.c
@@ -153,7 +153,7 @@ static VIDEO_UPDATE(dblewing)
flip_screen_set( deco16_pf12_control[0]&0x80 );
deco16_pf12_update(deco16_pf1_rowscroll,deco16_pf2_rowscroll);
- fillbitmap(bitmap,machine->pens[0x0],cliprect); /* not Confirmed */
+ fillbitmap(bitmap,0,cliprect); /* not Confirmed */
fillbitmap(priority_bitmap,0,NULL);
deco16_tilemap_2_draw(bitmap,cliprect,0,2);
diff --git a/src/mame/drivers/eolith16.c b/src/mame/drivers/eolith16.c
index 25856e3647c..92bdd223cdd 100644
--- a/src/mame/drivers/eolith16.c
+++ b/src/mame/drivers/eolith16.c
@@ -114,10 +114,10 @@ static VIDEO_UPDATE( eolith16 )
for (x=0;x < 320/2;x++)
{
color = vram[count + (0x10000/2) * (vbuffer ^ 1)] & 0xff;
- *BITMAP_ADDR16(bitmap, y, x*2 + 0) = machine->pens[color];
+ *BITMAP_ADDR16(bitmap, y, x*2 + 0) = color;
color = (vram[count + (0x10000/2) * (vbuffer ^ 1)] & 0xff00) >> 8;
- *BITMAP_ADDR16(bitmap, y, x*2 + 1) = machine->pens[color];
+ *BITMAP_ADDR16(bitmap, y, x*2 + 1) = color;
count++;
}
diff --git a/src/mame/drivers/fcrash.c b/src/mame/drivers/fcrash.c
index d7ad5daade6..824967cb9c6 100644
--- a/src/mame/drivers/fcrash.c
+++ b/src/mame/drivers/fcrash.c
@@ -172,7 +172,7 @@ static VIDEO_UPDATE( fcrash )
tilemap_set_enable(cps1_bg_tilemap[2],1);
/* Blank screen */
- fillbitmap(bitmap,machine->pens[4095],cliprect);
+ fillbitmap(bitmap,4095,cliprect);
fillbitmap(priority_bitmap,0,cliprect);
l0 = (layercontrol >> 0x06) & 03;
diff --git a/src/mame/drivers/filetto.c b/src/mame/drivers/filetto.c
index a983630f41c..c2ecae19b99 100644
--- a/src/mame/drivers/filetto.c
+++ b/src/mame/drivers/filetto.c
@@ -245,7 +245,7 @@ static VIDEO_UPDATE( filetto )
xxxx xx1x Select graphics
xxxx xxx1 80x25 text
*/
- fillbitmap(bitmap, machine->pens[0], cliprect);
+ fillbitmap(bitmap, 0, cliprect);
if(vga_mode[0] & 8)
{
diff --git a/src/mame/drivers/fortecar.c b/src/mame/drivers/fortecar.c
index 86acb5ad6bf..08be545f1f2 100644
--- a/src/mame/drivers/fortecar.c
+++ b/src/mame/drivers/fortecar.c
@@ -123,7 +123,7 @@ static VIDEO_UPDATE(fortecar)
{
int x,y,count;
count = 0;
- fillbitmap(bitmap,machine->pens[0],cliprect);
+ fillbitmap(bitmap,0,cliprect);
for (y=0;y<32;y++)
{
for(x=0;x<64;x++)
diff --git a/src/mame/drivers/galaxia.c b/src/mame/drivers/galaxia.c
index e76eeb0ba81..881cab68b87 100644
--- a/src/mame/drivers/galaxia.c
+++ b/src/mame/drivers/galaxia.c
@@ -35,7 +35,7 @@ static VIDEO_UPDATE( galaxia )
{
int x,y, count;
- fillbitmap(bitmap,machine->pens[0],cliprect);
+ fillbitmap(bitmap,0,cliprect);
count = 0;
for (y=0;y<256/8;y++)
diff --git a/src/mame/drivers/hal21.c b/src/mame/drivers/hal21.c
index 534755a2977..723bc790e3b 100644
--- a/src/mame/drivers/hal21.c
+++ b/src/mame/drivers/hal21.c
@@ -188,7 +188,7 @@ static void hal21_draw_background(running_machine *machine, mame_bitmap *bitmap,
bankbase = attrs<<3 & 0x100;
c = attrs & 0x0f;
- if (c > 11) { fillbitmap(bitmap,machine->pens[(c<<4)+8], cliprect); return; }
+ if (c > 11) { fillbitmap(bitmap,(c<<4)+8, cliprect); return; }
if (c<8 || color[0]<14 || bankbase)
{
c ^= 0x08;
diff --git a/src/mame/drivers/hanaroku.c b/src/mame/drivers/hanaroku.c
index f28d080f5ea..ab5debf1d8d 100644
--- a/src/mame/drivers/hanaroku.c
+++ b/src/mame/drivers/hanaroku.c
@@ -67,7 +67,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
static VIDEO_UPDATE(hanaroku)
{
- fillbitmap(bitmap, machine->pens[0x1f0], cliprect); // ???
+ fillbitmap(bitmap, 0x1f0, cliprect); // ???
draw_sprites(machine, bitmap, cliprect);
return 0;
}
diff --git a/src/mame/drivers/jollyjgr.c b/src/mame/drivers/jollyjgr.c
index 511160392f5..57a874ce4df 100644
--- a/src/mame/drivers/jollyjgr.c
+++ b/src/mame/drivers/jollyjgr.c
@@ -279,7 +279,7 @@ static VIDEO_START( jollyjgr )
tilemap_set_scroll_cols(bg_tilemap, 32);
}
-static void draw_bitmap(running_machine *machine, mame_bitmap *bitmap)
+static void draw_bitmap(mame_bitmap *bitmap)
{
int x,y,count;
int i, bit0, bit1, bit2;
@@ -300,13 +300,13 @@ static void draw_bitmap(running_machine *machine, mame_bitmap *bitmap)
if(color)
{
if(jullyjgr_flip_screen_x && jullyjgr_flip_screen_y)
- *BITMAP_ADDR16(bitmap, y, x*8 + i) = machine->pens[color + 32];
+ *BITMAP_ADDR16(bitmap, y, x*8 + i) = color + 32;
else if(jullyjgr_flip_screen_x && !jullyjgr_flip_screen_y)
- *BITMAP_ADDR16(bitmap, 255 - y, x*8 + i) = machine->pens[color + 32];
+ *BITMAP_ADDR16(bitmap, 255 - y, x*8 + i) = color + 32;
else if(!jullyjgr_flip_screen_x && jullyjgr_flip_screen_y)
- *BITMAP_ADDR16(bitmap, y, 255 - x*8 - i) = machine->pens[color + 32];
+ *BITMAP_ADDR16(bitmap, y, 255 - x*8 - i) = color + 32;
else
- *BITMAP_ADDR16(bitmap, 255 - y, 255 - x*8 - i) = machine->pens[color + 32];
+ *BITMAP_ADDR16(bitmap, 255 - y, 255 - x*8 - i) = color + 32;
}
}
@@ -319,11 +319,11 @@ static VIDEO_UPDATE( jollyjgr )
{
int offs;
- fillbitmap(bitmap,machine->pens[32],cliprect);
+ fillbitmap(bitmap,32,cliprect);
tilemap_draw(bitmap,cliprect,bg_tilemap,0,0);
- draw_bitmap(machine, bitmap);
+ draw_bitmap(bitmap);
/* Sprites are the same as in Galaxian */
for(offs = 0; offs < 0x40; offs += 4)
diff --git a/src/mame/drivers/laserbas.c b/src/mame/drivers/laserbas.c
index 2e0844cb094..4da2429247b 100644
--- a/src/mame/drivers/laserbas.c
+++ b/src/mame/drivers/laserbas.c
@@ -35,14 +35,14 @@ static VIDEO_UPDATE(laserbas)
for(x=0;x<128;x++)
{
if (vram2[y*128+x]&0xf)
- *BITMAP_ADDR16(bitmap, y, x*2) = machine->pens[vram2[y*128+x]&0xf]+16;
+ *BITMAP_ADDR16(bitmap, y, x*2) = (vram2[y*128+x]&0xf)+16;
else
- *BITMAP_ADDR16(bitmap, y, x*2) = machine->pens[vram1[y*128+x]&0xf]+16;
+ *BITMAP_ADDR16(bitmap, y, x*2) = (vram1[y*128+x]&0xf)+16;
if (vram2[y*128+x]>>4)
- *BITMAP_ADDR16(bitmap, y, x*2+1) = machine->pens[vram2[y*128+x]>>4]+16;
+ *BITMAP_ADDR16(bitmap, y, x*2+1) = (vram2[y*128+x]>>4)+16;
else
- *BITMAP_ADDR16(bitmap, y, x*2+1) = machine->pens[vram1[y*128+x]>>4]+16;
+ *BITMAP_ADDR16(bitmap, y, x*2+1) = (vram1[y*128+x]>>4)+16;
}
return 0;
}
diff --git a/src/mame/drivers/laserbat.c b/src/mame/drivers/laserbat.c
index d116f2ad0f7..dab8e4123bb 100644
--- a/src/mame/drivers/laserbat.c
+++ b/src/mame/drivers/laserbat.c
@@ -539,13 +539,13 @@ static VIDEO_UPDATE( laserbat )
int pixel2 = *BITMAP_ADDR8(s2636_2_bitmap, y, x);
if (S2636_IS_PIXEL_DRAWN(pixel0))
- *BITMAP_ADDR16(bitmap, y, x) = machine->pens[S2636_PIXEL_COLOR(pixel0)];
+ *BITMAP_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel0);
if (S2636_IS_PIXEL_DRAWN(pixel1))
- *BITMAP_ADDR16(bitmap, y, x) = machine->pens[S2636_PIXEL_COLOR(pixel1)];
+ *BITMAP_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel1);
if (S2636_IS_PIXEL_DRAWN(pixel2))
- *BITMAP_ADDR16(bitmap, y, x) = machine->pens[S2636_PIXEL_COLOR(pixel2)];
+ *BITMAP_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel2);
}
}
diff --git a/src/mame/drivers/marinedt.c b/src/mame/drivers/marinedt.c
index 084b029d953..796913cf075 100644
--- a/src/mame/drivers/marinedt.c
+++ b/src/mame/drivers/marinedt.c
@@ -479,10 +479,10 @@ static VIDEO_UPDATE( marinedt )
{
int sx, sy;
- fillbitmap(tile, machine->pens[0], NULL);
+ fillbitmap(tile, 0, NULL);
tilemap_draw(tile, cliprect, tx_tilemap, 0, 0);
- fillbitmap(obj1, machine->pens[0], NULL);
+ fillbitmap(obj1, 0, NULL);
drawgfx(obj1, machine->gfx[1],
OBJ_CODE(marinedt_obj1_a),
OBJ_COLOR(marinedt_obj1_a),
@@ -490,7 +490,7 @@ static VIDEO_UPDATE( marinedt )
0, 0,
NULL, TRANSPARENCY_PEN, 0);
- fillbitmap(obj2, machine->pens[0], NULL);
+ fillbitmap(obj2, 0, NULL);
drawgfx(obj2, machine->gfx[2],
OBJ_CODE(marinedt_obj2_a),
OBJ_COLOR(marinedt_obj2_a),
@@ -498,15 +498,15 @@ static VIDEO_UPDATE( marinedt )
0, 0,
NULL, TRANSPARENCY_PEN, 0);
- fillbitmap(bitmap, machine->pens[0], NULL);
+ fillbitmap(bitmap, 0, NULL);
if (marinedt_pd & 0x02)
- copybitmap_trans(bitmap, obj2, 0, 0, OBJ_X(marinedt_obj2_x), OBJ_Y(marinedt_obj2_y), cliprect, machine->pens[0]);
+ copybitmap_trans(bitmap, obj2, 0, 0, OBJ_X(marinedt_obj2_x), OBJ_Y(marinedt_obj2_y), cliprect, 0);
if (marinedt_pd & 0x01)
- copybitmap_trans(bitmap, obj1, 0, 0, OBJ_X(marinedt_obj1_x), OBJ_Y(marinedt_obj1_y), cliprect, machine->pens[0]);
+ copybitmap_trans(bitmap, obj1, 0, 0, OBJ_X(marinedt_obj1_x), OBJ_Y(marinedt_obj1_y), cliprect, 0);
- copybitmap_trans(bitmap, tile, 0, 0, 0, 0, cliprect, machine->pens[0]);
+ copybitmap_trans(bitmap, tile, 0, 0, 0, 0, cliprect, 0);
coll = cx = cyr = cyq = 0;
if (marinedt_pd & 0x01)
@@ -521,10 +521,10 @@ static VIDEO_UPDATE( marinedt )
|| y < cliprect->min_y || y > cliprect->max_y)
continue;
- if (*BITMAP_ADDR16(obj1, sy, sx) == machine->pens[0])
+ if (*BITMAP_ADDR16(obj1, sy, sx) == 0)
continue;
- if (*BITMAP_ADDR16(tile, y, x) != machine->pens[0])
+ if (*BITMAP_ADDR16(tile, y, x) != 0)
{
coll = 0x08;
@@ -558,10 +558,10 @@ static VIDEO_UPDATE( marinedt )
|| yy < 0 || yy >= 32)
continue;
- if (*BITMAP_ADDR16(obj1, sy, sx) == machine->pens[0])
+ if (*BITMAP_ADDR16(obj1, sy, sx) == 0)
continue;
- if (*BITMAP_ADDR16(obj2, yy, xx) != machine->pens[0])
+ if (*BITMAP_ADDR16(obj2, yy, xx) != 0)
{
collh = 0x80;
diff --git a/src/mame/drivers/mazerbla.c b/src/mame/drivers/mazerbla.c
index cbe69519ce0..6192c935f1a 100644
--- a/src/mame/drivers/mazerbla.c
+++ b/src/mame/drivers/mazerbla.c
@@ -144,18 +144,18 @@ VIDEO_UPDATE( test_vcu )
if (planes_enabled[2])
- copybitmap_trans(bitmap,tmpbitmaps[2],0,0,0,0,cliprect,machine->pens[color_base] );
- fillbitmap(tmpbitmaps[2],machine->pens[color_base],NULL);
+ copybitmap_trans(bitmap,tmpbitmaps[2],0,0,0,0,cliprect,color_base);
+ fillbitmap(tmpbitmaps[2],color_base,NULL);
if (planes_enabled[1])
- copybitmap_trans(bitmap,tmpbitmaps[1],0,0,0,0,cliprect,machine->pens[color_base] );
- fillbitmap(tmpbitmaps[1],machine->pens[color_base],NULL);
+ copybitmap_trans(bitmap,tmpbitmaps[1],0,0,0,0,cliprect,color_base);
+ fillbitmap(tmpbitmaps[1],color_base,NULL);
if (planes_enabled[0])
- copybitmap_trans(bitmap,tmpbitmaps[0],0,0,0,0,cliprect,machine->pens[color_base] );
- fillbitmap(tmpbitmaps[0],machine->pens[color_base],NULL);
+ copybitmap_trans(bitmap,tmpbitmaps[0],0,0,0,0,cliprect,color_base);
+ fillbitmap(tmpbitmaps[0],color_base,NULL);
if (input_code_pressed_once(KEYCODE_1)) /* plane 1 */
{
@@ -251,9 +251,9 @@ static VIDEO_UPDATE( greatgun )
//fillbitmap(bitmap,0,NULL);
copybitmap (bitmap,tmpbitmaps[3],0,0,0,0,cliprect);
- copybitmap_trans(bitmap,tmpbitmaps[2],0,0,0,0,cliprect,machine->pens[color_base] );
- copybitmap_trans(bitmap,tmpbitmaps[1],0,0,0,0,cliprect,machine->pens[color_base] );
- copybitmap_trans(bitmap,tmpbitmaps[0],0,0,0,0,cliprect,machine->pens[color_base] );
+ copybitmap_trans(bitmap,tmpbitmaps[2],0,0,0,0,cliprect,color_base);
+ copybitmap_trans(bitmap,tmpbitmaps[1],0,0,0,0,cliprect,color_base);
+ copybitmap_trans(bitmap,tmpbitmaps[0],0,0,0,0,cliprect,color_base);
return 0;
}
@@ -271,9 +271,9 @@ static VIDEO_UPDATE( mazerbla )
//fillbitmap(bitmap,0,NULL);
copybitmap (bitmap,tmpbitmaps[3],0,0,0,0,cliprect); //text
- copybitmap_trans(bitmap,tmpbitmaps[2],0,0,0,0,cliprect,machine->pens[0] );
- copybitmap_trans(bitmap,tmpbitmaps[1],0,0,0,0,cliprect,machine->pens[0] ); //haircross
- copybitmap_trans(bitmap,tmpbitmaps[0],0,0,0,0,cliprect,machine->pens[0] ); //sprites
+ copybitmap_trans(bitmap,tmpbitmaps[2],0,0,0,0,cliprect,0);
+ copybitmap_trans(bitmap,tmpbitmaps[1],0,0,0,0,cliprect,0); //haircross
+ copybitmap_trans(bitmap,tmpbitmaps[0],0,0,0,0,cliprect,0); //sprites
return 0;
}
diff --git a/src/mame/drivers/midas.c b/src/mame/drivers/midas.c
index 5d58268093f..db0c941495e 100644
--- a/src/mame/drivers/midas.c
+++ b/src/mame/drivers/midas.c
@@ -170,7 +170,7 @@ static VIDEO_UPDATE( livequiz )
}
#endif
- fillbitmap(bitmap,machine->pens[4095],cliprect);
+ fillbitmap(bitmap,4095,cliprect);
if (layers_ctrl & 2) draw_sprites(machine, bitmap,cliprect);
if (layers_ctrl & 1) tilemap_draw(bitmap,cliprect, tmap, 0, 0);
diff --git a/src/mame/drivers/mirage.c b/src/mame/drivers/mirage.c
index 285ec65ee37..275fca3d45f 100644
--- a/src/mame/drivers/mirage.c
+++ b/src/mame/drivers/mirage.c
@@ -121,7 +121,7 @@ static VIDEO_UPDATE(mirage)
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);
diff --git a/src/mame/drivers/missb2.c b/src/mame/drivers/missb2.c
index d11eb98d2b8..c3f4e5201d3 100644
--- a/src/mame/drivers/missb2.c
+++ b/src/mame/drivers/missb2.c
@@ -47,7 +47,7 @@ static VIDEO_UPDATE( missb2 )
/* the background character columns is stored in the area dd00-dd3f */
/* This clears & redraws the entire screen each pass */
- fillbitmap(bitmap,machine->pens[255],&machine->screen[0].visarea);
+ fillbitmap(bitmap,255,&machine->screen[0].visarea);
if (!bublbobl_video_enable) return 0;
diff --git a/src/mame/drivers/mpu4drvr.c b/src/mame/drivers/mpu4drvr.c
index 47a1c177d7b..6f0af84ec33 100644
--- a/src/mame/drivers/mpu4drvr.c
+++ b/src/mame/drivers/mpu4drvr.c
@@ -454,7 +454,7 @@ static VIDEO_UPDATE( mpu4_vid )
int x,y,count = 0;
- fillbitmap(bitmap,machine->pens[0],cliprect);
+ fillbitmap(bitmap,0,cliprect);
for (i=0; i < 0x1000; i++)
{
diff --git a/src/mame/drivers/pasha2.c b/src/mame/drivers/pasha2.c
index a321630534f..e3a4590156a 100644
--- a/src/mame/drivers/pasha2.c
+++ b/src/mame/drivers/pasha2.c
@@ -353,10 +353,10 @@ static VIDEO_UPDATE( pasha2 )
if(x*2 < cliprect->max_x)
{
color = (bitmap0[count + (vbuffer^1)*0x20000/2] & 0xff00) >> 8;
- *BITMAP_ADDR16(bitmap, y, x*2 + 0) = machine->pens[(color + 0x100)];
+ *BITMAP_ADDR16(bitmap, y, x*2 + 0) = color + 0x100;
color = bitmap0[count + (vbuffer^1)*0x20000/2] & 0xff;
- *BITMAP_ADDR16(bitmap, y, x*2 + 1) = machine->pens[(color + 0x100)];
+ *BITMAP_ADDR16(bitmap, y, x*2 + 1) = color + 0x100;
}
count++;
@@ -372,11 +372,11 @@ static VIDEO_UPDATE( pasha2 )
{
color = bitmap1[count + (vbuffer^1)*0x20000/2] & 0xff;
if(color != 0)
- *BITMAP_ADDR16(bitmap, y, x*2 + 1) = machine->pens[(color)];
+ *BITMAP_ADDR16(bitmap, y, x*2 + 1) = color;
color = (bitmap1[count + (vbuffer^1)*0x20000/2] & 0xff00) >> 8;
if(color != 0)
- *BITMAP_ADDR16(bitmap, y, x*2 + 0) = machine->pens[(color)];
+ *BITMAP_ADDR16(bitmap, y, x*2 + 0) = color;
}
count++;
diff --git a/src/mame/drivers/quizo.c b/src/mame/drivers/quizo.c
index ea564f35031..1faff688a4a 100644
--- a/src/mame/drivers/quizo.c
+++ b/src/mame/drivers/quizo.c
@@ -33,7 +33,6 @@ Xtals 8MHz, 21.47727MHz
static UINT8 port60;
static UINT8 port70;
-static UINT8 dirty;
static const UINT8 rombankLookup[]={ 2, 3, 4, 4, 4, 4, 4, 5, 0, 1};
@@ -64,43 +63,33 @@ static PALETTE_INIT(quizo)
}
}
-static VIDEO_START( quizo )
-{
- tmpbitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
-}
-
static VIDEO_UPDATE( quizo )
{
int x,y;
- if(dirty)
+ for(y=0;y<200;y++)
{
- for(y=0;y<200;y++)
+ for(x=0;x<80;x++)
{
- for(x=0;x<80;x++)
- {
- int data=videoram[y*80+x];
- int data1=videoram[y*80+x+0x4000];
- int pix;
-
- pix=(data&1)|(((data>>4)&1)<<1)|((data1&1)<<2)|(((data1>>4)&1)<<3);
- *BITMAP_ADDR16(tmpbitmap, y, x*4+3) = machine->pens[pix];
- data>>=1;
- data1>>=1;
- pix=(data&1)|(((data>>4)&1)<<1)|((data1&1)<<2)|(((data1>>4)&1)<<3);
- *BITMAP_ADDR16(tmpbitmap, y, x*4+2) = machine->pens[pix];
- data>>=1;
- data1>>=1;
- pix=(data&1)|(((data>>4)&1)<<1)|((data1&1)<<2)|(((data1>>4)&1)<<3);
- *BITMAP_ADDR16(tmpbitmap, y, x*4+1) = machine->pens[pix];
- data>>=1;
- data1>>=1;
- pix=(data&1)|(((data>>4)&1)<<1)|((data1&1)<<2)|(((data1>>4)&1)<<3);
- *BITMAP_ADDR16(tmpbitmap, y, x*4+0) = machine->pens[pix];
- }
+ int data=videoram[y*80+x];
+ int data1=videoram[y*80+x+0x4000];
+ int pix;
+
+ pix=(data&1)|(((data>>4)&1)<<1)|((data1&1)<<2)|(((data1>>4)&1)<<3);
+ *BITMAP_ADDR16(bitmap, y, x*4+3) = pix;
+ data>>=1;
+ data1>>=1;
+ pix=(data&1)|(((data>>4)&1)<<1)|((data1&1)<<2)|(((data1>>4)&1)<<3);
+ *BITMAP_ADDR16(bitmap, y, x*4+2) = pix;
+ data>>=1;
+ data1>>=1;
+ pix=(data&1)|(((data>>4)&1)<<1)|((data1&1)<<2)|(((data1>>4)&1)<<3);
+ *BITMAP_ADDR16(bitmap, y, x*4+1) = pix;
+ data>>=1;
+ data1>>=1;
+ pix=(data&1)|(((data>>4)&1)<<1)|((data1&1)<<2)|(((data1>>4)&1)<<3);
+ *BITMAP_ADDR16(bitmap, y, x*4+0) = pix;
}
}
- copybitmap(bitmap,tmpbitmap,0,0,0,0,cliprect);
- dirty=0;
return 0;
}
@@ -108,7 +97,6 @@ static WRITE8_HANDLER(vram_w)
{
int bank=(port70&8)?1:0;
videoram[offset+bank*0x4000]=data;
- dirty=1;
}
static WRITE8_HANDLER(port70_w)
@@ -219,7 +207,6 @@ static MACHINE_DRIVER_START( quizo )
MDRV_PALETTE_LENGTH(16)
MDRV_PALETTE_INIT(quizo)
- MDRV_VIDEO_START(quizo)
MDRV_VIDEO_UPDATE(quizo)
/* sound hardware */
@@ -246,7 +233,6 @@ ROM_END
static DRIVER_INIT(quizo)
{
videoram=auto_malloc(0x4000*2);
- dirty=1;
}
GAME( 1985, quizo, 0, quizo, quizo, quizo, ROT0, "Seoul Coin Corp.", "Quiz Olympic", 0 )
diff --git a/src/mame/drivers/sbowling.c b/src/mame/drivers/sbowling.c
index 2bbe8ba65b8..544dbfbd81e 100644
--- a/src/mame/drivers/sbowling.c
+++ b/src/mame/drivers/sbowling.c
@@ -93,7 +93,7 @@ static WRITE8_HANDLER( sbw_videoram_w )
static VIDEO_UPDATE(sbowling)
{
- fillbitmap(bitmap,machine->pens[0x18],cliprect);
+ fillbitmap(bitmap,0x18,cliprect);
tilemap_draw(bitmap,cliprect,sb_tilemap,0,0);
copybitmap_trans(bitmap,tmpbitmap,0,0,0,0,cliprect, color_prom_address);
return 0;
diff --git a/src/mame/drivers/shanghai.c b/src/mame/drivers/shanghai.c
index e2dc3cd5071..ba374038de0 100644
--- a/src/mame/drivers/shanghai.c
+++ b/src/mame/drivers/shanghai.c
@@ -704,7 +704,7 @@ static VIDEO_UPDATE( shanghai )
for (x = 0;x < 384;x++)
{
b &= (HD63484_RAM_SIZE-1);
- *BITMAP_ADDR16(bitmap, y, x) = machine->pens[HD63484_ram[b]];
+ *BITMAP_ADDR16(bitmap, y, x) = HD63484_ram[b];
b++;
}
}
@@ -724,7 +724,7 @@ static VIDEO_UPDATE( shanghai )
{
b &= (HD63484_RAM_SIZE-1);
if (x <= w && x + sx >= 0 && x+sx < 384)
- *BITMAP_ADDR16(bitmap, y, x+sx) = machine->pens[HD63484_ram[b]];
+ *BITMAP_ADDR16(bitmap, y, x+sx) = HD63484_ram[b];
b++;
}
diff --git a/src/mame/drivers/skylncr.c b/src/mame/drivers/skylncr.c
index e8de2c55c46..9448f527637 100644
--- a/src/mame/drivers/skylncr.c
+++ b/src/mame/drivers/skylncr.c
@@ -84,7 +84,7 @@ static VIDEO_START( skylncr )
static VIDEO_UPDATE( skylncr )
{
- fillbitmap(bitmap,machine->pens[0],cliprect);
+ fillbitmap(bitmap,0,cliprect);
tilemap_draw(bitmap,cliprect, tmap2, 0, 0);
tilemap_draw(bitmap,cliprect, tmap, 0, 0);
return 0;
diff --git a/src/mame/drivers/trvmadns.c b/src/mame/drivers/trvmadns.c
index 927ba4e94ec..93561ba7756 100644
--- a/src/mame/drivers/trvmadns.c
+++ b/src/mame/drivers/trvmadns.c
@@ -271,7 +271,7 @@ static VIDEO_START( trvmadns )
static VIDEO_UPDATE( trvmadns )
{
- fillbitmap(bitmap,machine->pens[0xd],cliprect);
+ fillbitmap(bitmap,0xd,cliprect);
tilemap_draw(bitmap,cliprect,bg_tilemap,0,0);
diff --git a/src/mame/drivers/vamphalf.c b/src/mame/drivers/vamphalf.c
index cc51a22fa4c..69a4c810cfe 100644
--- a/src/mame/drivers/vamphalf.c
+++ b/src/mame/drivers/vamphalf.c
@@ -429,7 +429,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, int scrn
static VIDEO_UPDATE( common )
{
- fillbitmap(bitmap,machine->pens[0],cliprect);
+ fillbitmap(bitmap,0,cliprect);
draw_sprites(machine, bitmap, screen);
return 0;
}
diff --git a/src/mame/drivers/vegaeo.c b/src/mame/drivers/vegaeo.c
index f66e1ddea9c..c99bd98655a 100644
--- a/src/mame/drivers/vegaeo.c
+++ b/src/mame/drivers/vegaeo.c
@@ -142,16 +142,16 @@ static VIDEO_UPDATE( vega )
for (x=0;x < 320/4;x++)
{
color = vega_vram[count + (0x14000/4) * (vega_vbuffer ^ 1)] & 0xff;
- *BITMAP_ADDR16(bitmap, y, x*4 + 3) = machine->pens[color];
+ *BITMAP_ADDR16(bitmap, y, x*4 + 3) = color;
color = (vega_vram[count + (0x14000/4) * (vega_vbuffer ^ 1)] & 0xff00) >> 8;
- *BITMAP_ADDR16(bitmap, y, x*4 + 2) = machine->pens[color];
+ *BITMAP_ADDR16(bitmap, y, x*4 + 2) = color;
color = (vega_vram[count + (0x14000/4) * (vega_vbuffer ^ 1)] & 0xff0000) >> 16;
- *BITMAP_ADDR16(bitmap, y, x*4 + 1) = machine->pens[color];
+ *BITMAP_ADDR16(bitmap, y, x*4 + 1) = color;
color = (vega_vram[count + (0x14000/4) * (vega_vbuffer ^ 1)] & 0xff000000) >> 24;
- *BITMAP_ADDR16(bitmap, y, x*4 + 0) = machine->pens[color];
+ *BITMAP_ADDR16(bitmap, y, x*4 + 0) = color;
count++;
}
diff --git a/src/mame/video/atari.c b/src/mame/video/atari.c
index 4b865e827a3..36ead2eba9e 100644
--- a/src/mame/video/atari.c
+++ b/src/mame/video/atari.c
@@ -1052,7 +1052,7 @@ static void antic_linerefresh(void)
dst[2] = antic.color_lookup[PBK] | antic.color_lookup[PBK] << 16;
dst[3] = antic.color_lookup[PBK] | antic.color_lookup[PBK] << 16;
- draw_scanline8(tmpbitmap, 12, y, sizeof(scanline), (const UINT8 *) scanline, Machine->pens, -1);
+ draw_scanline8(tmpbitmap, 12, y, sizeof(scanline), (const UINT8 *) scanline, NULL, -1);
}
static int cycle(void)
diff --git a/src/mame/video/exerion.c b/src/mame/video/exerion.c
index b35211b9993..cac795fff2b 100644
--- a/src/mame/video/exerion.c
+++ b/src/mame/video/exerion.c
@@ -236,7 +236,7 @@ READ8_HANDLER( exerion_video_timing_r )
*
*************************************/
-static void draw_background(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
+static void draw_background(mame_bitmap *bitmap, const rectangle *cliprect)
{
int x, y;
@@ -260,8 +260,8 @@ static void draw_background(running_machine *machine, mame_bitmap *bitmap, const
int stop2 = background_latches[10] >> 4;
int stop3 = background_latches[11] >> 4;
UINT8 *mixer = &background_mixer[(background_latches[12] << 4) & 0xf0];
- UINT8 scanline[VISIBLE_X_MAX];
- const pen_t *pens;
+ UINT16 scanline[VISIBLE_X_MAX];
+ int pen_base = 0x200 + ((background_latches[12] >> 4) << 4);
/* the cocktail flip flag controls whether we count up or down in X */
if (!exerion_cocktail_flip)
@@ -292,7 +292,7 @@ static void draw_background(running_machine *machine, mame_bitmap *bitmap, const
lookupval = mixer[combined >> 8] & 3;
/* the color index comes from the looked up value combined with the pixel data */
- scanline[x] = (lookupval << 2) | ((combined >> (2 * lookupval)) & 3);
+ scanline[x] = pen_base | (lookupval << 2) | ((combined >> (2 * lookupval)) & 3);
/* the start/stop counters are clocked when the low 5 bits of the X counter overflow */
if (!(++xoffs0 & 0x1f)) start0++, stop0++;
@@ -329,7 +329,7 @@ static void draw_background(running_machine *machine, mame_bitmap *bitmap, const
lookupval = mixer[combined >> 8] & 3;
/* the color index comes from the looked up value combined with the pixel data */
- scanline[x] = (lookupval << 2) | ((combined >> (2 * lookupval)) & 3);
+ scanline[x] = pen_base | (lookupval << 2) | ((combined >> (2 * lookupval)) & 3);
/* the start/stop counters are clocked when the low 5 bits of the X counter overflow */
if (!(xoffs0-- & 0x1f)) start0++, stop0++;
@@ -340,8 +340,7 @@ static void draw_background(running_machine *machine, mame_bitmap *bitmap, const
}
/* draw the scanline */
- pens = &machine->pens[0x200 + ((background_latches[12] >> 4) << 4)];
- draw_scanline8(bitmap, cliprect->min_x, y, cliprect->max_x - cliprect->min_x + 1, &scanline[cliprect->min_x], pens, -1);
+ draw_scanline16(bitmap, cliprect->min_x, y, cliprect->max_x - cliprect->min_x + 1, &scanline[cliprect->min_x], NULL, -1);
}
}
@@ -357,7 +356,7 @@ VIDEO_UPDATE( exerion )
int sx, sy, offs, i;
/* draw background */
- draw_background(machine, bitmap, cliprect);
+ draw_background(bitmap, cliprect);
/* draw sprites */
for (i = 0; i < spriteram_size; i += 4)
diff --git a/src/mame/video/exidy440.c b/src/mame/video/exidy440.c
index efae24598a8..1f813cb007a 100644
--- a/src/mame/video/exidy440.c
+++ b/src/mame/video/exidy440.c
@@ -400,7 +400,7 @@ static void update_screen(running_machine *machine, mame_bitmap *bitmap, const r
sy -= (EXIDY440_VBSTART - EXIDY440_VBEND);
/* draw line */
- draw_scanline8(bitmap, 0, y, (EXIDY440_HBSTART - EXIDY440_HBEND), &local_videoram[sy * 512], machine->pens, -1);
+ draw_scanline8(bitmap, 0, y, (EXIDY440_HBSTART - EXIDY440_HBEND), &local_videoram[sy * 512], NULL, -1);
}
/* draw the sprites */
diff --git a/src/mame/video/irobot.c b/src/mame/video/irobot.c
index 6394b11db36..8168588978f 100644
--- a/src/mame/video/irobot.c
+++ b/src/mame/video/irobot.c
@@ -353,7 +353,7 @@ VIDEO_UPDATE( irobot )
/* copy the polygon bitmap */
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
- draw_scanline8(bitmap, 0, y, BITMAP_WIDTH, &bitmap_base[y * BITMAP_WIDTH], machine->pens, -1);
+ draw_scanline8(bitmap, 0, y, BITMAP_WIDTH, &bitmap_base[y * BITMAP_WIDTH], NULL, -1);
/* redraw the non-zero characters in the alpha layer */
for (y = offs = 0; y < 32; y++)
diff --git a/src/mame/video/itech32.c b/src/mame/video/itech32.c
index 3afb2c78ddb..6d0262369a6 100644
--- a/src/mame/video/itech32.c
+++ b/src/mame/video/itech32.c
@@ -1476,12 +1476,12 @@ VIDEO_UPDATE( itech32 )
}
/* draw from the buffer */
- draw_scanline16(bitmap, cliprect->min_x, y, cliprect->max_x - cliprect->min_x + 1, &scanline[cliprect->min_x], machine->pens, -1);
+ draw_scanline16(bitmap, cliprect->min_x, y, cliprect->max_x - cliprect->min_x + 1, &scanline[cliprect->min_x], NULL, -1);
}
/* otherwise, draw directly from VRAM */
else
- draw_scanline16(bitmap, cliprect->min_x, y, cliprect->max_x - cliprect->min_x + 1, &src1[cliprect->min_x], machine->pens, -1);
+ draw_scanline16(bitmap, cliprect->min_x, y, cliprect->max_x - cliprect->min_x + 1, &src1[cliprect->min_x], NULL, -1);
}
return 0;
}
diff --git a/src/mame/video/magmax.c b/src/mame/video/magmax.c
index 724b760322c..5ccc30a322b 100644
--- a/src/mame/video/magmax.c
+++ b/src/mame/video/magmax.c
@@ -112,14 +112,14 @@ VIDEO_UPDATE( magmax )
for (v = 2*8; v < 30*8; v++) /*only for visible area*/
{
int h;
- UINT8 line_data[256];
+ UINT16 line_data[256];
UINT32 map_v_scr_100 = (scroll_v + v) & 0x100;
UINT32 rom18D_addr = ((scroll_v + v) & 0xf8) + (map_v_scr_100<<5);
UINT32 rom15F_addr = (((scroll_v + v) & 0x07)<<2) + (map_v_scr_100<<5);
UINT32 map_v_scr_1fe_6 =((scroll_v + v) & 0x1fe)<<6;
- const pen_t *pens = &machine->pens[0x110 + 0x20 + (map_v_scr_100>>1)];
+ int pen_base = 0x110 + 0x20 + (map_v_scr_100>>1);
for (h = 0; h < 0x100; h++)
{
@@ -154,23 +154,23 @@ VIDEO_UPDATE( magmax )
graph_data >>= 4;
graph_data &= 0x0f;
- line_data[h] = graph_color + graph_data;
+ line_data[h] = pen_base + graph_color + graph_data;
/*priority: background over sprites*/
if (map_v_scr_100 && ((graph_data & 0x0c)==0x0c))
- *BITMAP_ADDR16(tmpbitmap, v, h) = pens[graph_color + graph_data];
+ *BITMAP_ADDR16(tmpbitmap, v, h) = line_data[h];
}
if (flipscreen)
{
int i;
- UINT8 line_data_flip_x[256];
+ UINT16 line_data_flip_x[256];
for (i=0; i<256; i++)
line_data_flip_x[i] = line_data[255-i];
- draw_scanline8(bitmap, 0, 255-v, 256, line_data_flip_x, pens, -1);
+ draw_scanline16(bitmap, 0, 255-v, 256, line_data_flip_x, NULL , -1);
}
else
- draw_scanline8(bitmap, 0, v, 256, line_data, pens, -1);
+ draw_scanline16(bitmap, 0, v, 256, line_data, NULL, -1);
}
}
diff --git a/src/mame/video/polepos.c b/src/mame/video/polepos.c
index 80604a1e83b..bd615732d7f 100644
--- a/src/mame/video/polepos.c
+++ b/src/mame/video/polepos.c
@@ -351,7 +351,7 @@ WRITE8_HANDLER( polepos_alpha_w )
***************************************************************************/
-static void draw_road(running_machine *machine, mame_bitmap *bitmap)
+static void draw_road(mame_bitmap *bitmap)
{
const UINT8 *road_control = memory_region(REGION_GFX5);
const UINT8 *road_bits1 = memory_region(REGION_GFX5) + 0x2000;
@@ -362,9 +362,9 @@ static void draw_road(running_machine *machine, mame_bitmap *bitmap)
for (y = 128; y < 256; y++)
{
int xoffs, yoffs, xscroll, roadpal;
- UINT8 scanline[256 + 8];
- UINT8 *dest = scanline;
- const pen_t *colortable;
+ UINT16 scanline[256 + 8];
+ UINT16 *dest = scanline;
+ int pen_base;
/* first add the vertical position modifier and the vertical scroll */
yoffs = ((polepos_vertical_position_modifier[y] + road16_vscroll) >> 3) & 0x1ff;
@@ -373,7 +373,7 @@ static void draw_road(running_machine *machine, mame_bitmap *bitmap)
roadpal = polepos_road16_memory[yoffs] & 15;
/* this becomes the palette base for the scanline */
- colortable = &machine->pens[0x0b00 + (roadpal << 6)];
+ pen_base = 0x0b00 + (roadpal << 6);
/* now fetch the horizontal scroll offset for this scanline */
xoffs = polepos_road16_memory[0x380 + (y & 0x7f)] & 0x3ff;
@@ -392,7 +392,7 @@ static void draw_road(running_machine *machine, mame_bitmap *bitmap)
{
/* in this case, it looks like we just fill with 0 */
for (i = 0; i < 8; i++)
- *dest++ = 0;
+ *dest++ = pen_base | 0;
}
/* otherwise, we clock in the bits and compute the road value */
@@ -415,14 +415,14 @@ static void draw_road(running_machine *machine, mame_bitmap *bitmap)
{
int bits = BIT(bits1,i) + (BIT(bits2,i) << 1);
if (!carin && bits) bits++;
- *dest++ = roadval & 0x3f;
+ *dest++ = pen_base | (roadval & 0x3f);
roadval += bits;
}
}
}
/* draw the scanline */
- draw_scanline8(bitmap, 0, y, 256, &scanline[xscroll], colortable, -1);
+ draw_scanline16(bitmap, 0, y, 256, &scanline[xscroll], NULL, -1);
}
}
@@ -511,7 +511,7 @@ VIDEO_UPDATE( polepos )
rectangle clip = *cliprect;
clip.max_y = 127;
tilemap_draw(bitmap,&clip,bg_tilemap,0,0);
- draw_road(machine, bitmap);
+ draw_road(bitmap);
draw_sprites(machine, bitmap,cliprect);
tilemap_draw(bitmap,cliprect,tx_tilemap,0,0);
/* following code should be enabled only in a debug build */
diff --git a/src/mame/video/toypop.c b/src/mame/video/toypop.c
index 063e72512b7..025934ebe8e 100644
--- a/src/mame/video/toypop.c
+++ b/src/mame/video/toypop.c
@@ -7,7 +7,6 @@
***************************************************************************/
#include "driver.h"
-#include "deprecat.h"
UINT8 *toypop_videoram;
@@ -177,8 +176,9 @@ WRITE16_HANDLER( toypop_merged_background_w )
static void draw_background(mame_bitmap *bitmap)
{
- register int offs, x, y;
- UINT8 scanline[288];
+ int offs, x, y;
+ UINT16 scanline[288];
+ int pen_base = 0x300 + 0x10*palettebank;
// copy the background image from RAM (0x190200-0x19FDFF) to bitmap
if (bitmapflip)
@@ -189,11 +189,11 @@ static void draw_background(mame_bitmap *bitmap)
for (x = 0; x < 288; x+=2)
{
UINT16 data = toypop_bg_image[offs];
- scanline[x] = data;
- scanline[x+1] = data >> 8;
+ scanline[x] = pen_base | (data & 0x0f);
+ scanline[x+1] = pen_base | (data >> 8);
offs--;
}
- draw_scanline8(bitmap, 0, y, 288, scanline, &Machine->pens[0x300 + 0x10*palettebank], -1);
+ draw_scanline16(bitmap, 0, y, 288, scanline, NULL, -1);
}
}
else
@@ -204,11 +204,11 @@ static void draw_background(mame_bitmap *bitmap)
for (x = 0; x < 288; x+=2)
{
UINT16 data = toypop_bg_image[offs];
- scanline[x] = data >> 8;
- scanline[x+1] = data;
+ scanline[x] = pen_base | (data >> 8);
+ scanline[x+1] = pen_base | (data & 0x0f);
offs++;
}
- draw_scanline8(bitmap, 0, y, 288, scanline, &Machine->pens[0x300 + 0x10*palettebank], -1);
+ draw_scanline16(bitmap, 0, y, 288, scanline, NULL, -1);
}
}
}