Removed the pen array lookup from some INDEXED16 drivers
This commit is contained in:
parent
288a0adbe1
commit
e5bcee449d
@ -38,7 +38,6 @@ PROMs : NEC B406 (1kx4) x2
|
||||
***********************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/i8039/i8039.h"
|
||||
#include "video/resnet.h"
|
||||
#include "sound/ay8910.h"
|
||||
@ -67,7 +66,7 @@ static void plot_pixel_sbw(int x, int y, int col)
|
||||
y = 255-y;
|
||||
x = 247-x;
|
||||
}
|
||||
*BITMAP_ADDR16(tmpbitmap, y, x) = Machine->pens[col];
|
||||
*BITMAP_ADDR16(tmpbitmap, y, x) = col;
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( sbw_videoram_w )
|
||||
|
@ -244,7 +244,7 @@ static WRITE8_HANDLER( zvideoram_w )
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
if (x >= 0 && y < tmpbitmap->width)
|
||||
*BITMAP_ADDR16(tmpbitmap, y, x) = (data&1)?Machine->pens[col]:Machine->pens[0];
|
||||
*BITMAP_ADDR16(tmpbitmap, y, x) = (data&1)? col : 0;
|
||||
x++;
|
||||
data >>= 1;
|
||||
}
|
||||
@ -310,7 +310,7 @@ static WRITE8_HANDLER(spaceg_colorram_w)
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
if (x >= 0 && x < tmpbitmap->width)
|
||||
*BITMAP_ADDR16(tmpbitmap, y, x) = (data&1)?Machine->pens[col]:Machine->pens[0];
|
||||
*BITMAP_ADDR16(tmpbitmap, y, x) = (data&1)? col : 0;
|
||||
x++;
|
||||
data >>= 1;
|
||||
}
|
||||
|
@ -222,7 +222,6 @@ READ8_HANDLER( pc10_in1_r )
|
||||
int x = readinputport( 5 );
|
||||
int y = readinputport( 6 );
|
||||
UINT32 pix, color_base;
|
||||
const pen_t *pens = Machine->pens;
|
||||
|
||||
/* no sprite hit (yet) */
|
||||
ret |= 0x08;
|
||||
@ -234,8 +233,8 @@ READ8_HANDLER( pc10_in1_r )
|
||||
color_base = ppu2c0x_get_colorbase( 0 );
|
||||
|
||||
/* look at the screen and see if the cursor is over a bright pixel */
|
||||
if ( ( pix == pens[color_base+0x20] ) || ( pix == pens[color_base+0x30] ) ||
|
||||
( pix == pens[color_base+0x33] ) || ( pix == pens[color_base+0x34] ) )
|
||||
if ( ( pix == color_base+0x20 ) || ( pix == color_base+0x30 ) ||
|
||||
( pix == color_base+0x33 ) || ( pix == color_base+0x34 ) )
|
||||
{
|
||||
ret &= ~0x08; /* sprite hit */
|
||||
}
|
||||
|
@ -354,7 +354,6 @@ static WRITE8_HANDLER( gun_in0_w )
|
||||
int x = readinputport( 4 );
|
||||
int y = readinputport( 5 );
|
||||
UINT32 pix, color_base;
|
||||
const pen_t *pens = Machine->pens;
|
||||
|
||||
/* get the pixel at the gun position */
|
||||
pix = ppu2c0x_get_pixel( 0, x, y );
|
||||
@ -363,8 +362,8 @@ static WRITE8_HANDLER( gun_in0_w )
|
||||
color_base = ppu2c0x_get_colorbase( 0 );
|
||||
|
||||
/* look at the screen and see if the cursor is over a bright pixel */
|
||||
if ( ( pix == pens[color_base+0x20] ) || ( pix == pens[color_base+0x30] ) ||
|
||||
( pix == pens[color_base+0x33] ) || ( pix == pens[color_base+0x34] ) )
|
||||
if ( ( pix == color_base+0x20 ) || ( pix == color_base+0x30 ) ||
|
||||
( pix == color_base+0x33 ) || ( pix == color_base+0x34 ) )
|
||||
{
|
||||
input_latch[0] |= 0x40;
|
||||
}
|
||||
|
@ -804,10 +804,10 @@ static void artifacts_gfx(UINT8 *src, UINT8 *dst, int width)
|
||||
UINT8 n, bits = 0;
|
||||
UINT8 b = gtia.w.colbk & 0xf0;
|
||||
UINT8 c = gtia.w.colpf1 & 0x0f;
|
||||
UINT8 atari_A = Machine->pens[((b+0x30)&0xf0)+c];
|
||||
UINT8 atari_B = Machine->pens[((b+0x70)&0xf0)+c];
|
||||
UINT8 atari_C = Machine->pens[b+c];
|
||||
UINT8 atari_D = Machine->pens[gtia.w.colbk];
|
||||
UINT8 atari_A = ((b+0x30)&0xf0)+c;
|
||||
UINT8 atari_B = ((b+0x70)&0xf0)+c;
|
||||
UINT8 atari_C = b+c;
|
||||
UINT8 atari_D = gtia.w.colbk;
|
||||
|
||||
for( x = 0; x < width * 4; x++ )
|
||||
{
|
||||
@ -878,10 +878,10 @@ static void artifacts_txt(UINT8 * src, UINT8 * dst, int width)
|
||||
UINT8 n, bits = 0;
|
||||
UINT8 b = gtia.w.colpf2 & 0xf0;
|
||||
UINT8 c = gtia.w.colpf1 & 0x0f;
|
||||
UINT8 atari_A = Machine->pens[((b+0x30)&0xf0)+c];
|
||||
UINT8 atari_B = Machine->pens[((b+0x70)&0xf0)+c];
|
||||
UINT8 atari_C = Machine->pens[b+c];
|
||||
UINT8 atari_D = Machine->pens[gtia.w.colpf2];
|
||||
UINT8 atari_A = ((b+0x30)&0xf0)+c;
|
||||
UINT8 atari_B = ((b+0x70)&0xf0)+c;
|
||||
UINT8 atari_C = b+c;
|
||||
UINT8 atari_D = gtia.w.colpf2;
|
||||
|
||||
for( x = 0; x < width * 4; x++ )
|
||||
{
|
||||
|
@ -84,11 +84,11 @@ static void updatepixels(int x,int y)
|
||||
|
||||
if (front>>8) color = front>>8;
|
||||
else color = (back>>8) + 256;
|
||||
*BITMAP_ADDR16(tmpbitmap, y, x) = Machine->pens[color];
|
||||
*BITMAP_ADDR16(tmpbitmap, y, x) = color;
|
||||
|
||||
if (front&0xff) color = front&0xff;
|
||||
else color = (back&0xff) + 256;
|
||||
*BITMAP_ADDR16(tmpbitmap, y, x+1) = Machine->pens[color];
|
||||
*BITMAP_ADDR16(tmpbitmap, y, x+1) = color;
|
||||
}
|
||||
|
||||
|
||||
|
@ -103,7 +103,7 @@ static void draw_obj0(mame_bitmap *bitmap, int sy)
|
||||
data = (ROM[rom_addr] & 0xf0) >> 4;
|
||||
|
||||
if((data != 0x0f) && (data != 0))
|
||||
*BITMAP_ADDR16(bitmap, sy, xpos+i) = Machine->pens[data | 0x10];
|
||||
*BITMAP_ADDR16(bitmap, sy, xpos+i) = data | 0x10;
|
||||
|
||||
if(hs)
|
||||
{
|
||||
@ -113,7 +113,7 @@ static void draw_obj0(mame_bitmap *bitmap, int sy)
|
||||
data = (ROM[rom_addr ^ 0x100] & 0xf0) >> 4;
|
||||
|
||||
if((data != 0x0f) && (data != 0))
|
||||
*BITMAP_ADDR16(bitmap, sy, xpos+i+16) = Machine->pens[data | 0x10];
|
||||
*BITMAP_ADDR16(bitmap, sy, xpos+i+16) = data | 0x10;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -326,7 +326,7 @@ static void draw_river(mame_bitmap *bitmap, int sy)
|
||||
else
|
||||
col = (TILE_ROM[rom_addr] & 0xf0) >> 4;
|
||||
|
||||
*BITMAP_ADDR16(bitmap, sy, sx) = Machine->pens[col];
|
||||
*BITMAP_ADDR16(bitmap, sy, sx) = col;
|
||||
}
|
||||
|
||||
for(sx = 16; sx < 256; sx++)
|
||||
@ -357,7 +357,7 @@ static void draw_river(mame_bitmap *bitmap, int sy)
|
||||
else
|
||||
col = (TILE_ROM[rom_addr] & 0xf0) >> 4;
|
||||
|
||||
*BITMAP_ADDR16(bitmap, sy, sx) = Machine->pens[col];
|
||||
*BITMAP_ADDR16(bitmap, sy, sx) = col;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -567,7 +567,7 @@ static void draw_tree(mame_bitmap *bitmap, int sy, int tree_num)
|
||||
all_ff = 0;
|
||||
|
||||
if(col != 0x0f && col != 0x00)
|
||||
*BITMAP_ADDR16(bitmap, sy, sx) = Machine->pens[col | 0x30];
|
||||
*BITMAP_ADDR16(bitmap, sy, sx) = col | 0x30;
|
||||
}
|
||||
}
|
||||
|
||||
@ -607,7 +607,7 @@ static void draw_tree(mame_bitmap *bitmap, int sy, int tree_num)
|
||||
all_ff = 0;
|
||||
|
||||
if(col != 0x0f && col != 0x00)
|
||||
*BITMAP_ADDR16(bitmap, sy, sx) = Machine->pens[col | 0x30];
|
||||
*BITMAP_ADDR16(bitmap, sy, sx) = col | 0x30;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,12 +78,12 @@ WRITE8_HANDLER( cloak_clearbmp_w )
|
||||
{
|
||||
if (bmap)
|
||||
{
|
||||
fillbitmap(tmpbitmap, Machine->pens[16], &Machine->screen[0].visarea);
|
||||
fillbitmap(tmpbitmap, 16, &Machine->screen[0].visarea);
|
||||
memset(tmpvideoram, 0, 256*256);
|
||||
}
|
||||
else
|
||||
{
|
||||
fillbitmap(tmpbitmap2, Machine->pens[16], &Machine->screen[0].visarea);
|
||||
fillbitmap(tmpbitmap2, 16, &Machine->screen[0].visarea);
|
||||
memset(tmpvideoram2, 0, 256*256);
|
||||
}
|
||||
}
|
||||
@ -133,12 +133,12 @@ WRITE8_HANDLER( graph_processor_w )
|
||||
|
||||
if (bmap)
|
||||
{
|
||||
*BITMAP_ADDR16(tmpbitmap, y, (x-6)&0xff) = Machine->pens[16 + color];
|
||||
*BITMAP_ADDR16(tmpbitmap, y, (x-6)&0xff) = 16 + color;
|
||||
tmpvideoram[y*256+x] = color;
|
||||
}
|
||||
else
|
||||
{
|
||||
*BITMAP_ADDR16(tmpbitmap2, y, (x-6)&0xff) = Machine->pens[16 + color];
|
||||
*BITMAP_ADDR16(tmpbitmap2, y, (x-6)&0xff) = 16 + color;
|
||||
tmpvideoram2[y*256+x] = color;
|
||||
}
|
||||
|
||||
@ -173,8 +173,8 @@ static void refresh_bitmaps(void)
|
||||
{
|
||||
for (lx = 0; lx < 256; lx++)
|
||||
{
|
||||
*BITMAP_ADDR16(tmpbitmap, ly, (lx-6)&0xff) = Machine->pens[16 + tmpvideoram[ly*256+lx]];
|
||||
*BITMAP_ADDR16(tmpbitmap2, ly, (lx-6)&0xff) = Machine->pens[16 + tmpvideoram2[ly*256+lx]];
|
||||
*BITMAP_ADDR16(tmpbitmap, ly, (lx-6)&0xff) = 16 + tmpvideoram[ly*256+lx];
|
||||
*BITMAP_ADDR16(tmpbitmap2, ly, (lx-6)&0xff) = 16 + tmpvideoram2[ly*256+lx];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ WRITE16_HANDLER( galpani2_bg8_##_n_##_w ) \
|
||||
pen = newword & 0xff; \
|
||||
x = (offset % 512); /* 512 x 256 */ \
|
||||
y = (offset / 512); \
|
||||
*BITMAP_ADDR16(galpani2_bg8_bitmap_##_n_, y, x) = Machine->pens[0x4000 + pen]; \
|
||||
*BITMAP_ADDR16(galpani2_bg8_bitmap_##_n_, y, x) = 0x4000 + pen; \
|
||||
}
|
||||
|
||||
#define galpani2_BG8_PALETTE_W( _n_ ) \
|
||||
@ -108,7 +108,7 @@ WRITE16_HANDLER( galpani2_bg15_w )
|
||||
int x = (offset % 256) + (offset / (256*256)) * 256 ;
|
||||
int y = (offset / 256) % 256;
|
||||
|
||||
*BITMAP_ADDR16(galpani2_bg15_bitmap, y, x) = Machine->pens[0x4200 + (newword & 0x7fff)];
|
||||
*BITMAP_ADDR16(galpani2_bg15_bitmap, y, x) = 0x4200 + (newword & 0x7fff);
|
||||
}
|
||||
|
||||
|
||||
|
@ -38,7 +38,7 @@ WRITE16_HANDLER( galpanic_bgvideoram_w )
|
||||
sy = offset / 256;
|
||||
sx = offset % 256;
|
||||
|
||||
*BITMAP_ADDR16(tmpbitmap, sy, sx) = Machine->pens[1024 + (data >> 1)];
|
||||
*BITMAP_ADDR16(tmpbitmap, sy, sx) = 1024 + (data >> 1);
|
||||
}
|
||||
|
||||
WRITE16_HANDLER( galpanic_paletteram_w )
|
||||
|
@ -28,7 +28,7 @@ WRITE16_HANDLER( galspnbl_bgvideoram_w )
|
||||
sx = offset % 512;
|
||||
sy = offset / 512;
|
||||
|
||||
*BITMAP_ADDR16(tmpbitmap, sy, sx) = Machine->pens[1024 + (data >> 1)];
|
||||
*BITMAP_ADDR16(tmpbitmap, sy, sx) = 1024 + (data >> 1);
|
||||
}
|
||||
|
||||
WRITE16_HANDLER( galspnbl_scroll_w )
|
||||
|
@ -7,7 +7,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
|
||||
UINT16 *glass_spriteram;
|
||||
UINT16 *glass_vregs;
|
||||
@ -101,11 +100,11 @@ WRITE16_HANDLER( glass_blitter_w )
|
||||
for (i = 0; i < 320; i++){
|
||||
int color = *gfx;
|
||||
gfx++;
|
||||
*BITMAP_ADDR16(screen_bitmap, j, i) = Machine->pens[color & 0xff];
|
||||
*BITMAP_ADDR16(screen_bitmap, j, i) = color & 0xff;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
fillbitmap(screen_bitmap, Machine->pens[0], 0);
|
||||
fillbitmap(screen_bitmap, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -42,19 +42,19 @@ static void gtia_state_postload(void);
|
||||
* set both color clocks equal for one color
|
||||
**********************************************/
|
||||
#define SETCOL_B(o,d) \
|
||||
antic.color_lookup[o] = (Machine->pens[d] << 8) | Machine->pens[d]
|
||||
antic.color_lookup[o] = ((d) << 8) | (d)
|
||||
|
||||
/**********************************************
|
||||
* set left color clock for one color
|
||||
**********************************************/
|
||||
#define SETCOL_L(o,d) \
|
||||
*((UINT8*)&antic.color_lookup[o] + 0) = Machine->pens[d]
|
||||
*((UINT8*)&antic.color_lookup[o] + 0) = d
|
||||
|
||||
/**********************************************
|
||||
* set right color clock for one color
|
||||
**********************************************/
|
||||
#define SETCOL_R(o,d) \
|
||||
*((UINT8*)&antic.color_lookup[o] + 1) = Machine->pens[d]
|
||||
*((UINT8*)&antic.color_lookup[o] + 1) = d
|
||||
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "includes/lemmings.h"
|
||||
#include "lemmings.h"
|
||||
|
||||
UINT16 *lemmings_pixel_0_data,*lemmings_pixel_1_data,*lemmings_vram_data,*lemmings_control_data;
|
||||
static UINT16 *sprite_triple_buffer_0,*sprite_triple_buffer_1;
|
||||
@ -130,8 +130,8 @@ WRITE16_HANDLER( lemmings_pixel_0_w )
|
||||
if (sx>2047 || sy>255)
|
||||
return;
|
||||
|
||||
*BITMAP_ADDR16(bitmap0, sy, sx+0) = Machine->pens[((src>>8)&0xf)|0x100];
|
||||
*BITMAP_ADDR16(bitmap0, sy, sx+1) = Machine->pens[((src>>0)&0xf)|0x100];
|
||||
*BITMAP_ADDR16(bitmap0, sy, sx+0) = ((src>>8)&0xf)|0x100;
|
||||
*BITMAP_ADDR16(bitmap0, sy, sx+1) = ((src>>0)&0xf)|0x100;
|
||||
}
|
||||
|
||||
WRITE16_HANDLER( lemmings_pixel_1_w )
|
||||
|
@ -283,7 +283,7 @@ static void scene_draw(void)
|
||||
| (((d1 >> x_gran) & 1) << 1)
|
||||
| ( (d0 >> x_gran) & 1);
|
||||
|
||||
*bmpaddr++ = Machine->pens[0xa00 + col];
|
||||
*bmpaddr++ = 0xa00 + col;
|
||||
|
||||
x_offs = (x_offs + 1) & 0x1ff;
|
||||
}
|
||||
@ -411,7 +411,7 @@ static void ground_draw(void)
|
||||
color += ((rom_data2 >> gpbal2_0) & 0x1) << 1;
|
||||
color += ((rom_data3 >> gpbal2_0) & 0x1) << 2;
|
||||
|
||||
*bmpaddr++ = Machine->pens[0x800 + color];
|
||||
*bmpaddr++ = 0x800 + color;
|
||||
|
||||
/* Update the counters */
|
||||
tz2213_cy = (UINT8)tz2213_dx > (UINT8)~(tz2213_x);
|
||||
@ -468,7 +468,7 @@ do { \
|
||||
UINT8 clr = obj_pal_ram[(pal << 4) + COLOR]; \
|
||||
UINT16 *pix = (line + px); \
|
||||
if (!(clr == 0xff && ((*pix & 0xe00) == 0xa00))) \
|
||||
*pix = Machine->pens[0x400 + clr]; \
|
||||
*pix = 0x400 + clr; \
|
||||
} \
|
||||
px = (px + 1) & 0x7ff; \
|
||||
} while(0)
|
||||
@ -859,7 +859,7 @@ static void hud_draw(mame_bitmap *bitmap, const rectangle *cliprect)
|
||||
x_pos = lockon_hud_ram[offs + 1] & 0x1ff;
|
||||
x_size = (lockon_hud_ram[offs + 1] >> 12) & 7;
|
||||
code = (lockon_hud_ram[offs] >> 9) & 0x7f;
|
||||
colour = Machine->pens[0x200 + ((lockon_hud_ram[offs + 1] >> 9) & 7)];
|
||||
colour = 0x200 + ((lockon_hud_ram[offs + 1] >> 9) & 7);
|
||||
layout = (code >> 5) & 3;
|
||||
|
||||
rom_a12_7 = (code & 0xfe) << 6;
|
||||
|
@ -8,7 +8,6 @@ Video hardware
|
||||
*****************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
|
||||
int mjsister_screen_redraw;
|
||||
int mjsister_flip_screen;
|
||||
@ -40,8 +39,8 @@ static void mjsister_plot0(int offset,UINT8 data)
|
||||
c1 = (data & 0x0f) + mjsister_colorbank * 0x20;
|
||||
c2 = ((data & 0xf0) >> 4) + mjsister_colorbank * 0x20;
|
||||
|
||||
*BITMAP_ADDR16(mjsister_tmpbitmap0, y, x*2+0) = Machine->pens[c1];
|
||||
*BITMAP_ADDR16(mjsister_tmpbitmap0, y, x*2+1) = Machine->pens[c2];
|
||||
*BITMAP_ADDR16(mjsister_tmpbitmap0, y, x*2+0) = c1;
|
||||
*BITMAP_ADDR16(mjsister_tmpbitmap0, y, x*2+1) = c2;
|
||||
}
|
||||
|
||||
static void mjsister_plot1(int offset,UINT8 data)
|
||||
@ -59,8 +58,8 @@ static void mjsister_plot1(int offset,UINT8 data)
|
||||
if (c2)
|
||||
c2 += mjsister_colorbank * 0x20 + 0x10;
|
||||
|
||||
*BITMAP_ADDR16(mjsister_tmpbitmap1, y, x*2+0) = Machine->pens[c1];
|
||||
*BITMAP_ADDR16(mjsister_tmpbitmap1, y, x*2+1) = Machine->pens[c2];
|
||||
*BITMAP_ADDR16(mjsister_tmpbitmap1, y, x*2+0) = c1;
|
||||
*BITMAP_ADDR16(mjsister_tmpbitmap1, y, x*2+1) = c2;
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( mjsister_videoram_w )
|
||||
|
@ -7,7 +7,6 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "nb1413m3.h"
|
||||
|
||||
|
||||
@ -269,7 +268,7 @@ void mjsikaku_vramflip(void)
|
||||
static void update_pixel(int x, int y)
|
||||
{
|
||||
int color = mjsikaku_videoram[(y * 512) + x];
|
||||
*BITMAP_ADDR16(mjsikaku_tmpbitmap, y, x) = Machine->pens[color];
|
||||
*BITMAP_ADDR16(mjsikaku_tmpbitmap, y, x) = color;
|
||||
}
|
||||
|
||||
static void writeram_low(int x, int y, int color)
|
||||
@ -554,9 +553,9 @@ static void mbmj8688_gfxdraw(int gfxtype)
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
static void common_video_start(void)
|
||||
static void common_video_start(running_machine *machine)
|
||||
{
|
||||
mjsikaku_tmpbitmap = auto_bitmap_alloc(512, 256, Machine->screen[0].format);
|
||||
mjsikaku_tmpbitmap = auto_bitmap_alloc(512, 256, machine->screen[0].format);
|
||||
mjsikaku_videoram = auto_malloc(512 * 256 * sizeof(UINT16));
|
||||
nbmj8688_clut = auto_malloc(0x20 * sizeof(UINT8));
|
||||
memset(mjsikaku_videoram, 0, (512 * 256 * sizeof(UINT16)));
|
||||
@ -567,31 +566,31 @@ static void common_video_start(void)
|
||||
VIDEO_START( mbmj8688_8bit )
|
||||
{
|
||||
mjsikaku_gfxmode = GFXTYPE_8BIT;
|
||||
common_video_start();
|
||||
common_video_start(machine);
|
||||
}
|
||||
|
||||
VIDEO_START( mbmj8688_hybrid_12bit )
|
||||
{
|
||||
mjsikaku_gfxmode = GFXTYPE_HYBRID_12BIT;
|
||||
common_video_start();
|
||||
common_video_start(machine);
|
||||
}
|
||||
|
||||
VIDEO_START( mbmj8688_pure_12bit )
|
||||
{
|
||||
mjsikaku_gfxmode = GFXTYPE_PURE_12BIT;
|
||||
common_video_start();
|
||||
common_video_start(machine);
|
||||
}
|
||||
|
||||
VIDEO_START( mbmj8688_hybrid_16bit )
|
||||
{
|
||||
mjsikaku_gfxmode = GFXTYPE_HYBRID_16BIT;
|
||||
common_video_start();
|
||||
common_video_start(machine);
|
||||
}
|
||||
|
||||
VIDEO_START( mbmj8688_pure_16bit )
|
||||
{
|
||||
mjsikaku_gfxmode = GFXTYPE_PURE_16BIT;
|
||||
common_video_start();
|
||||
common_video_start(machine);
|
||||
}
|
||||
|
||||
VIDEO_START( mbmj8688_pure_16bit_LCD )
|
||||
@ -601,7 +600,7 @@ VIDEO_START( mbmj8688_pure_16bit_LCD )
|
||||
HD61830B_ram[0] = auto_malloc(0x10000);
|
||||
HD61830B_ram[1] = auto_malloc(0x10000);
|
||||
|
||||
common_video_start();
|
||||
common_video_start(machine);
|
||||
}
|
||||
|
||||
|
||||
|
@ -318,13 +318,13 @@ void nbmj8891_vramflip(int vram)
|
||||
static void update_pixel0(int x, int y)
|
||||
{
|
||||
UINT8 color = nbmj8891_videoram0[(y * Machine->screen[0].width) + x];
|
||||
*BITMAP_ADDR16(nbmj8891_tmpbitmap0, y, x) = Machine->pens[color];
|
||||
*BITMAP_ADDR16(nbmj8891_tmpbitmap0, y, x) = color;
|
||||
}
|
||||
|
||||
static void update_pixel1(int x, int y)
|
||||
{
|
||||
UINT8 color = nbmj8891_videoram1[(y * Machine->screen[0].width) + x];
|
||||
*BITMAP_ADDR16(nbmj8891_tmpbitmap1, y, x) = Machine->pens[(color == 0x7f) ? 0xff : color];
|
||||
*BITMAP_ADDR16(nbmj8891_tmpbitmap1, y, x) = (color == 0x7f) ? 0xff : color;
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( blitter_timer_callback )
|
||||
|
@ -180,7 +180,7 @@ static void nbmj8991_vramflip(void)
|
||||
static void update_pixel(int x, int y)
|
||||
{
|
||||
UINT8 color = nbmj8991_videoram[(y * Machine->screen[0].width) + x];
|
||||
*BITMAP_ADDR16(nbmj8991_tmpbitmap, y, x) = Machine->pens[color];
|
||||
*BITMAP_ADDR16(nbmj8991_tmpbitmap, y, x) = color;
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( blitter_timer_callback )
|
||||
|
@ -220,7 +220,7 @@ static void nbmj9195_vramflip(int vram)
|
||||
static void update_pixel(int vram, int x, int y)
|
||||
{
|
||||
UINT16 color = nbmj9195_videoram[vram][(y * Machine->screen[0].width) + x];
|
||||
*BITMAP_ADDR16(nbmj9195_tmpbitmap[vram], y, x) = Machine->pens[color];
|
||||
*BITMAP_ADDR16(nbmj9195_tmpbitmap[vram], y, x) = color;
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( blitter_timer_callback )
|
||||
|
@ -185,7 +185,7 @@ static void niyanpai_vramflip(int vram)
|
||||
static void update_pixel(int vram, int x, int y)
|
||||
{
|
||||
UINT16 color = niyanpai_videoram[vram][(y * Machine->screen[0].width) + x];
|
||||
*BITMAP_ADDR16(niyanpai_tmpbitmap[vram], y, x) = Machine->pens[color];
|
||||
*BITMAP_ADDR16(niyanpai_tmpbitmap[vram], y, x) = color;
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( blitter_timer_callback )
|
||||
|
@ -263,7 +263,7 @@ WRITE8_HANDLER( ojankoc_videoram_w )
|
||||
px = x + (i ^ xx);
|
||||
py = y;
|
||||
|
||||
*BITMAP_ADDR16(ojankoc_tmpbitmap, py, px) = Machine->pens[color];
|
||||
*BITMAP_ADDR16(ojankoc_tmpbitmap, py, px) = color;
|
||||
|
||||
color1 >>= 1;
|
||||
color2 >>= 1;
|
||||
|
@ -143,7 +143,7 @@ static void pastelg_vramflip(void)
|
||||
static void update_pixel(int x,int y)
|
||||
{
|
||||
int color = pastelg_videoram[(y * Machine->screen[0].width) + x];
|
||||
*BITMAP_ADDR16(pastelg_tmpbitmap, y, x) = Machine->pens[color];
|
||||
*BITMAP_ADDR16(pastelg_tmpbitmap, y, x) = color;
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( blitter_timer_callback )
|
||||
|
@ -199,7 +199,7 @@ WRITE8_HANDLER( popeye_bitmap_w )
|
||||
if (flip_screen)
|
||||
sy = 512-8 - sy;
|
||||
|
||||
colour = Machine->pens[data & 0x0f];
|
||||
colour = data & 0x0f;
|
||||
for (y = 0; y < 8; y++)
|
||||
{
|
||||
for (x = 0; x < 8; x++)
|
||||
@ -216,7 +216,7 @@ WRITE8_HANDLER( popeye_bitmap_w )
|
||||
if (flip_screen)
|
||||
sy = 512-4 - sy;
|
||||
|
||||
colour = Machine->pens[data & 0x0f];
|
||||
colour = data & 0x0f;
|
||||
for (y = 0; y < 4; y++)
|
||||
{
|
||||
for (x = 0; x < 8; x++)
|
||||
|
@ -7,7 +7,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
|
||||
UINT8 *superqix_videoram;
|
||||
UINT8 *superqix_bitmapram,*superqix_bitmapram2;
|
||||
@ -92,8 +91,8 @@ WRITE8_HANDLER( superqix_bitmapram_w )
|
||||
|
||||
superqix_bitmapram[offset] = data;
|
||||
|
||||
*BITMAP_ADDR16(fg_bitmap[0], y, x + 0) = Machine->pens[data >> 4];
|
||||
*BITMAP_ADDR16(fg_bitmap[0], y, x + 1) = Machine->pens[data & 0x0f];
|
||||
*BITMAP_ADDR16(fg_bitmap[0], y, x + 0) = data >> 4;
|
||||
*BITMAP_ADDR16(fg_bitmap[0], y, x + 1) = data & 0x0f;
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,8 +105,8 @@ WRITE8_HANDLER( superqix_bitmapram2_w )
|
||||
|
||||
superqix_bitmapram2[offset] = data;
|
||||
|
||||
*BITMAP_ADDR16(fg_bitmap[1], y, x + 0) = Machine->pens[data >> 4];
|
||||
*BITMAP_ADDR16(fg_bitmap[1], y, x + 1) = Machine->pens[data & 0x0f];
|
||||
*BITMAP_ADDR16(fg_bitmap[1], y, x + 0) = data >> 4;
|
||||
*BITMAP_ADDR16(fg_bitmap[1], y, x + 1) = data & 0x0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -256,7 +256,7 @@ static void draw_sprite(mame_bitmap *bitmap,int spr_number)
|
||||
{
|
||||
int sy,row,height,src,bank;
|
||||
UINT8 *sprite_base;
|
||||
const pen_t *sprite_palette;
|
||||
int sprite_palette_base;
|
||||
INT16 skip; /* bytes to skip before drawing each row (can be negative) */
|
||||
UINT8 *gfx;
|
||||
|
||||
@ -269,7 +269,7 @@ static void draw_sprite(mame_bitmap *bitmap,int spr_number)
|
||||
skip = sprite_base[SPR_SKIP_LO] + (sprite_base[SPR_SKIP_HI] << 8);
|
||||
|
||||
height = sprite_base[SPR_Y_BOTTOM] - sprite_base[SPR_Y_TOP];
|
||||
sprite_palette = Machine->pens + 0x10 * spr_number;
|
||||
sprite_palette_base = 0x10 * spr_number;
|
||||
|
||||
sy = sprite_base[SPR_Y_TOP] + 1;
|
||||
|
||||
@ -320,13 +320,13 @@ static void draw_sprite(mame_bitmap *bitmap,int spr_number)
|
||||
|
||||
if (color1 == 15) break;
|
||||
if (color1)
|
||||
draw_pixel(bitmap,x,y,x_flipped,y_flipped,spr_number,sprite_palette[color1]);
|
||||
draw_pixel(bitmap,x,y,x_flipped,y_flipped,spr_number,sprite_palette_base+color1);
|
||||
x++;
|
||||
x_flipped += flip_screen ? -1 : 1;
|
||||
|
||||
if (color2 == 15) break;
|
||||
if (color2)
|
||||
draw_pixel(bitmap,x,y,x_flipped,y_flipped,spr_number,sprite_palette[color2]);
|
||||
draw_pixel(bitmap,x,y,x_flipped,y_flipped,spr_number,sprite_palette_base+color2);
|
||||
x++;
|
||||
x_flipped += flip_screen ? -1 : 1;
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "profiler.h"
|
||||
|
||||
UINT16 *taitob_scroll;
|
||||
@ -148,8 +147,8 @@ WRITE16_HANDLER( hitice_pixelram_w )
|
||||
{
|
||||
/* bit 15 of pixel_scroll[0] is probably flip screen */
|
||||
|
||||
*BITMAP_ADDR16(pixel_bitmap, sy, 2*sx+0) = Machine->pens[b_fg_color_base * 16 + (data & 0xff)];
|
||||
*BITMAP_ADDR16(pixel_bitmap, sy, 2*sx+1) = Machine->pens[b_fg_color_base * 16 + (data & 0xff)];
|
||||
*BITMAP_ADDR16(pixel_bitmap, sy, 2*sx+0) = b_fg_color_base * 16 + (data & 0xff);
|
||||
*BITMAP_ADDR16(pixel_bitmap, sy, 2*sx+1) = b_fg_color_base * 16 + (data & 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "video/taitoic.h"
|
||||
#include "includes/taito_f2.h"
|
||||
|
||||
@ -374,7 +373,7 @@ static void taito_f2_tc360_spritemixdraw( mame_bitmap *dest_bmp,const gfx_elemen
|
||||
UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy,
|
||||
const rectangle *clip,int scalex, int scaley)
|
||||
{
|
||||
const pen_t *pal = &Machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)];
|
||||
int pal_base = gfx->color_base + gfx->color_granularity * (color % gfx->total_colors);
|
||||
UINT8 *source_base = gfx->gfxdata + (code % gfx->total_elements) * gfx->char_modulo;
|
||||
|
||||
int sprite_screen_height = (scaley*gfx->height+0x8000)>>16;
|
||||
@ -480,15 +479,15 @@ static void taito_f2_tc360_spritemixdraw( mame_bitmap *dest_bmp,const gfx_elemen
|
||||
// Blend mode 1 - Sprite under tilemap, use sprite palette with tilemap data
|
||||
if ((f2_spriteblendmode&0xc0)==0xc0 && sprite_priority==(tilemap_priority-1))
|
||||
{
|
||||
dest[x]=(pal[c]&0xfff0)|(dest[x]&0xf);
|
||||
dest[x]=((pal_base+c)&0xfff0)|(dest[x]&0xf);
|
||||
}
|
||||
// Blend mode 1 - Sprite over tilemap, use sprite data with tilemap palette
|
||||
else if ((f2_spriteblendmode&0xc0)==0xc0 && sprite_priority==(tilemap_priority+1))
|
||||
{
|
||||
if (dest[x]&0xf)
|
||||
dest[x]=(dest[x]&0xfff0)|(pal[c]&0xf);
|
||||
dest[x]=(dest[x]&0xfff0)|((pal_base+c)&0xf);
|
||||
else
|
||||
dest[x]=pal[c];
|
||||
dest[x]=pal_base+c;
|
||||
}
|
||||
// Blend mode 2 - Sprite under tilemap, use sprite data with tilemap palette
|
||||
else if ((f2_spriteblendmode&0xc0)==0x80 && sprite_priority==(tilemap_priority-1))
|
||||
@ -498,13 +497,13 @@ static void taito_f2_tc360_spritemixdraw( mame_bitmap *dest_bmp,const gfx_elemen
|
||||
// Blend mode 2 - Sprite over tilemap, alternate sprite palette, confirmed in Pulirula level 2
|
||||
else if ((f2_spriteblendmode&0xc0)==0x80 && sprite_priority==(tilemap_priority+1))
|
||||
{
|
||||
dest[x]=(pal[c]&0xffef); // Pulirula level 2, Liquid Kids attract mode
|
||||
dest[x]=((pal_base+c)&0xffef); // Pulirula level 2, Liquid Kids attract mode
|
||||
}
|
||||
// No blending
|
||||
else
|
||||
{
|
||||
if (sprite_priority>tilemap_priority) // Ninja Kids confirms tilemap takes priority in equal value case
|
||||
dest[x]=pal[c];
|
||||
dest[x]=pal_base+c;
|
||||
}
|
||||
pri[x] |= 0x80;
|
||||
}
|
||||
|
@ -119,7 +119,6 @@ Abnormalities:
|
||||
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "toaplan1.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
|
||||
@ -946,7 +945,7 @@ static void toaplan1_draw_sprite_custom(mame_bitmap *dest_bmp,const gfx_element
|
||||
UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy,
|
||||
const rectangle *clip,int priority)
|
||||
{
|
||||
const pen_t *pal = &Machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)];
|
||||
int pal_base = gfx->color_base + gfx->color_granularity * (color % gfx->total_colors);
|
||||
UINT8 *source_base = gfx->gfxdata + (code % gfx->total_elements) * gfx->char_modulo;
|
||||
|
||||
int sprite_screen_height = ((1<<16)*gfx->height+0x8000)>>16;
|
||||
@ -1028,7 +1027,7 @@ static void toaplan1_draw_sprite_custom(mame_bitmap *dest_bmp,const gfx_element
|
||||
if( c != 0 )
|
||||
{
|
||||
if (pri[x] < priority)
|
||||
dest[x] = pal[c];
|
||||
dest[x] = pal_base+c;
|
||||
pri[x] = 0xff; // mark it "already drawn"
|
||||
}
|
||||
x_index += dx;
|
||||
|
@ -89,7 +89,7 @@ WRITE16_HANDLER( twin16_video_register_w )
|
||||
static void draw_sprite( /* slow slow slow, but it's ok for now */
|
||||
mame_bitmap *bitmap,
|
||||
const UINT16 *pen_data,
|
||||
const pen_t *pal_data,
|
||||
int pal_base,
|
||||
int xpos, int ypos,
|
||||
int width, int height,
|
||||
int flipx, int flipy, int pri )
|
||||
@ -127,7 +127,7 @@ static void draw_sprite( /* slow slow slow, but it's ok for now */
|
||||
|
||||
if( pen )
|
||||
{
|
||||
if(pdest[sx]<pval) { dest[sx] = pal_data[pen]; }
|
||||
if(pdest[sx]<pval) { dest[sx] = pal_base + pen; }
|
||||
|
||||
pdest[sx]|=0x10;
|
||||
}
|
||||
@ -211,7 +211,7 @@ static void draw_sprites( mame_bitmap *bitmap )
|
||||
int xpos = source[1];
|
||||
int ypos = source[2];
|
||||
|
||||
const pen_t *pal_data = Machine->pens+((attributes&0xf)+0x10)*16;
|
||||
int pal_base = ((attributes&0xf)+0x10)*16;
|
||||
int height = 16<<((attributes>>6)&0x3);
|
||||
int width = 16<<((attributes>>4)&0x3);
|
||||
const UINT16 *pen_data = 0;
|
||||
@ -275,7 +275,7 @@ static void draw_sprites( mame_bitmap *bitmap )
|
||||
}
|
||||
|
||||
//if( sprite_which==count || !input_code_pressed( KEYCODE_B ) )
|
||||
draw_sprite( bitmap, pen_data, pal_data, xpos, ypos, width, height, flipx, flipy, (attributes&0x4000) );
|
||||
draw_sprite( bitmap, pen_data, pal_base, xpos, ypos, width, height, flipx, flipy, (attributes&0x4000) );
|
||||
}
|
||||
|
||||
count++;
|
||||
@ -362,7 +362,7 @@ static void draw_layer( mame_bitmap *bitmap, int opaque ){
|
||||
*/
|
||||
const UINT16 *gfx_data = gfx_base + (code&0x7ff)*16 + bank_table[(code>>11)&0x3]*0x8000;
|
||||
int color = (code>>13);
|
||||
const pen_t *pal_data = Machine->pens + 16*(0x20+color+8*palette);
|
||||
int pal_base = 16*(0x20+color+8*palette);
|
||||
int x, y;
|
||||
|
||||
if( opaque )
|
||||
@ -377,7 +377,7 @@ static void draw_layer( mame_bitmap *bitmap, int opaque ){
|
||||
{
|
||||
int effx = (x - xpos) ^ xxor;
|
||||
UINT16 data = gfxptr[effx / 4];
|
||||
dest[x] = pal_data[(data >> 4*(~effx & 3)) & 0x0f];
|
||||
dest[x] = pal_base + ((data >> 4*(~effx & 3)) & 0x0f);
|
||||
pdest[x] |= 1;
|
||||
}
|
||||
}
|
||||
@ -397,7 +397,7 @@ static void draw_layer( mame_bitmap *bitmap, int opaque ){
|
||||
UINT8 pen = (data >> 4*(~effx & 3)) & 0x0f;
|
||||
if (pen)
|
||||
{
|
||||
dest[x] = pal_data[pen];
|
||||
dest[x] = pal_base + pen;
|
||||
pdest[x] |= 4;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user