Disabled unused variables and code based on cppcheck and VS2008 Code Analysis [Oliver Stoneberg]
This commit is contained in:
parent
435dedd3fa
commit
3b0cb91d98
@ -103,8 +103,6 @@ static void ssio_compute_ay8910_modulation(running_machine *machine);
|
|||||||
|
|
||||||
void mcr_sound_init(running_machine *machine, UINT8 config)
|
void mcr_sound_init(running_machine *machine, UINT8 config)
|
||||||
{
|
{
|
||||||
int sound_cpu = 1;
|
|
||||||
|
|
||||||
mcr_sound_config = config;
|
mcr_sound_config = config;
|
||||||
|
|
||||||
/* SSIO */
|
/* SSIO */
|
||||||
@ -151,10 +149,7 @@ void mcr_sound_init(running_machine *machine, UINT8 config)
|
|||||||
|
|
||||||
/* Advanced Audio */
|
/* Advanced Audio */
|
||||||
if (mcr_sound_config & MCR_WILLIAMS_SOUND)
|
if (mcr_sound_config & MCR_WILLIAMS_SOUND)
|
||||||
{
|
|
||||||
williams_cvsd_init(machine);
|
williams_cvsd_init(machine);
|
||||||
sound_cpu++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ static int plural;
|
|||||||
READ8_HANDLER( wow_speech_r )
|
READ8_HANDLER( wow_speech_r )
|
||||||
{
|
{
|
||||||
running_device *samples = devtag_get_device(space->machine, "samples");
|
running_device *samples = devtag_get_device(space->machine, "samples");
|
||||||
int Phoneme,Intonation;
|
int Phoneme/*, Intonation*/;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
UINT8 data = offset >> 8;
|
UINT8 data = offset >> 8;
|
||||||
@ -118,7 +118,7 @@ READ8_HANDLER( wow_speech_r )
|
|||||||
totalword_ptr = totalword;
|
totalword_ptr = totalword;
|
||||||
|
|
||||||
Phoneme = data & 0x3F;
|
Phoneme = data & 0x3F;
|
||||||
Intonation = data >> 6;
|
// Intonation = data >> 6;
|
||||||
|
|
||||||
// logerror("Data : %d Speech : %s at intonation %d\n",Phoneme, PhonemeTable[Phoneme],Intonation);
|
// logerror("Data : %d Speech : %s at intonation %d\n",Phoneme, PhonemeTable[Phoneme],Intonation);
|
||||||
|
|
||||||
|
@ -540,13 +540,13 @@ static READ32_HANDLER( hng64_com_share_r )
|
|||||||
|
|
||||||
static WRITE32_HANDLER( hng64_pal_w )
|
static WRITE32_HANDLER( hng64_pal_w )
|
||||||
{
|
{
|
||||||
int r,g,b,a;
|
int r, g, b/*, a*/;
|
||||||
COMBINE_DATA(&space->machine->generic.paletteram.u32[offset]);
|
COMBINE_DATA(&space->machine->generic.paletteram.u32[offset]);
|
||||||
|
|
||||||
b = ((space->machine->generic.paletteram.u32[offset] & 0x000000ff) >>0);
|
b = ((space->machine->generic.paletteram.u32[offset] & 0x000000ff) >>0);
|
||||||
g = ((space->machine->generic.paletteram.u32[offset] & 0x0000ff00) >>8);
|
g = ((space->machine->generic.paletteram.u32[offset] & 0x0000ff00) >>8);
|
||||||
r = ((space->machine->generic.paletteram.u32[offset] & 0x00ff0000) >>16);
|
r = ((space->machine->generic.paletteram.u32[offset] & 0x00ff0000) >>16);
|
||||||
a = ((space->machine->generic.paletteram.u32[offset] & 0xff000000) >>24);
|
//a = ((space->machine->generic.paletteram.u32[offset] & 0xff000000) >>24);
|
||||||
palette_set_color(space->machine,offset,MAKE_RGB(r,g,b));
|
palette_set_color(space->machine,offset,MAKE_RGB(r,g,b));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3986,7 +3986,7 @@ static void genesis_render_spriteline_to_spritebuffer(int scanline)
|
|||||||
int spritenum;
|
int spritenum;
|
||||||
int ypos,xpos,addr;
|
int ypos,xpos,addr;
|
||||||
int drawypos;
|
int drawypos;
|
||||||
int drawwidth,drawheight;
|
int /*drawwidth,*/ drawheight;
|
||||||
int spritemask = 0;
|
int spritemask = 0;
|
||||||
UINT8 height,width=0,link=0,xflip,yflip,colour,pri;
|
UINT8 height,width=0,link=0,xflip,yflip,colour,pri;
|
||||||
|
|
||||||
@ -4042,7 +4042,7 @@ static void genesis_render_spriteline_to_spritebuffer(int scanline)
|
|||||||
addr &=0x7ff;
|
addr &=0x7ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
drawwidth = (width+1)*8;
|
//drawwidth = (width+1)*8;
|
||||||
if (pri==1) pri = 0x80;
|
if (pri==1) pri = 0x80;
|
||||||
else pri = 0x40;
|
else pri = 0x40;
|
||||||
|
|
||||||
|
@ -86,12 +86,12 @@ static VIDEO_UPDATE( missb2 )
|
|||||||
|
|
||||||
for (xc = 0; xc < 2; xc++)
|
for (xc = 0; xc < 2; xc++)
|
||||||
{
|
{
|
||||||
int goffs, code, color, flipx, flipy, x, y;
|
int goffs, code, /*color,*/ flipx, flipy, x, y;
|
||||||
|
|
||||||
goffs = gfx_offs + xc * 0x40 + (yc & 7) * 0x02 +
|
goffs = gfx_offs + xc * 0x40 + (yc & 7) * 0x02 +
|
||||||
(prom_line[yc/2] & 0x03) * 0x10;
|
(prom_line[yc/2] & 0x03) * 0x10;
|
||||||
code = state->videoram[goffs] + 256 * (state->videoram[goffs + 1] & 0x03) + 1024 * (gfx_attr & 0x0f);
|
code = state->videoram[goffs] + 256 * (state->videoram[goffs + 1] & 0x03) + 1024 * (gfx_attr & 0x0f);
|
||||||
color = (state->videoram[goffs + 1] & 0x3c) >> 2;
|
//color = (state->videoram[goffs + 1] & 0x3c) >> 2;
|
||||||
flipx = state->videoram[goffs + 1] & 0x40;
|
flipx = state->videoram[goffs + 1] & 0x40;
|
||||||
flipy = state->videoram[goffs + 1] & 0x80;
|
flipy = state->videoram[goffs + 1] & 0x80;
|
||||||
x = sx + xc * 8;
|
x = sx + xc * 8;
|
||||||
|
@ -495,7 +495,7 @@ static VIDEO_UPDATE( mpu4_vid )
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
int x,y,count = 0;
|
int x, y/*, count = 0*/;
|
||||||
|
|
||||||
bitmap_fill(bitmap,cliprect,0);
|
bitmap_fill(bitmap,cliprect,0);
|
||||||
|
|
||||||
@ -526,7 +526,7 @@ static VIDEO_UPDATE( mpu4_vid )
|
|||||||
|
|
||||||
drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[gfxregion],tiledat,colattr,0,0,x*8,y*8);
|
drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[gfxregion],tiledat,colattr,0,0,x*8,y*8);
|
||||||
|
|
||||||
count++;
|
//count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dbl_size&2) y++; /* skip a row? */
|
if (dbl_size&2) y++; /* skip a row? */
|
||||||
|
@ -1266,7 +1266,7 @@ static DRIVER_INIT( kram3 )
|
|||||||
const address_space *videospace = cputag_get_address_space(machine, "videocpu", ADDRESS_SPACE_PROGRAM);
|
const address_space *videospace = cputag_get_address_space(machine, "videocpu", ADDRESS_SPACE_PROGRAM);
|
||||||
const UINT8 *patch;
|
const UINT8 *patch;
|
||||||
UINT8 *rom, *decrypted;
|
UINT8 *rom, *decrypted;
|
||||||
int i, size;
|
int i;
|
||||||
|
|
||||||
/********************************
|
/********************************
|
||||||
|
|
||||||
@ -1297,7 +1297,6 @@ static DRIVER_INIT( kram3 )
|
|||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
patch = memory_region(machine, "user2");
|
patch = memory_region(machine, "user2");
|
||||||
size = memory_region_length(machine, "user2");
|
|
||||||
rom = memory_region(machine, "videocpu");
|
rom = memory_region(machine, "videocpu");
|
||||||
decrypted = auto_alloc_array(machine, UINT8, 0x6000);
|
decrypted = auto_alloc_array(machine, UINT8, 0x6000);
|
||||||
|
|
||||||
|
@ -177,9 +177,9 @@ static void skimaxx_scanline_update(running_device *screen, bitmap_t *bitmap, in
|
|||||||
UINT16 *fg = &fg_buffer[rowaddr << 8];
|
UINT16 *fg = &fg_buffer[rowaddr << 8];
|
||||||
UINT32 *bg = &skimaxx_bg_buffer_front[rowaddr/2 * 1024/2];
|
UINT32 *bg = &skimaxx_bg_buffer_front[rowaddr/2 * 1024/2];
|
||||||
UINT16 *dest = BITMAP_ADDR16(bitmap, scanline, 0);
|
UINT16 *dest = BITMAP_ADDR16(bitmap, scanline, 0);
|
||||||
int coladdr = params->coladdr;
|
//int coladdr = params->coladdr;
|
||||||
int x;
|
int x;
|
||||||
coladdr = 0;
|
//coladdr = 0;
|
||||||
|
|
||||||
dest += params->heblnk;
|
dest += params->heblnk;
|
||||||
for (x = params->heblnk; x < params->hsblnk; x+=2)
|
for (x = params->heblnk; x < params->hsblnk; x+=2)
|
||||||
|
@ -564,7 +564,7 @@ WRITE64_HANDLER( naomi_maple_w )
|
|||||||
static int jvs_command = 0,jvs_address = 0;
|
static int jvs_command = 0,jvs_address = 0;
|
||||||
int chk;
|
int chk;
|
||||||
int a;
|
int a;
|
||||||
int off,len,func;
|
int off,len/*,func*/;
|
||||||
|
|
||||||
reg = decode_reg32_64(space->machine, offset, mem_mask, &shift);
|
reg = decode_reg32_64(space->machine, offset, mem_mask, &shift);
|
||||||
dat = (UINT32)(data >> shift);
|
dat = (UINT32)(data >> shift);
|
||||||
@ -609,7 +609,7 @@ WRITE64_HANDLER( naomi_maple_w )
|
|||||||
command=buff[2] & 255;
|
command=buff[2] & 255;
|
||||||
dap=(buff[2] >> 8) & 255;
|
dap=(buff[2] >> 8) & 255;
|
||||||
sap=(buff[2] >> 16) & 255;
|
sap=(buff[2] >> 16) & 255;
|
||||||
func = buff[3];
|
//func = buff[3];
|
||||||
//buff[0]=0;
|
//buff[0]=0;
|
||||||
//if(buff[1] == 0x700)
|
//if(buff[1] == 0x700)
|
||||||
// printf("%08x %08x",buff[0],buff[2]);
|
// printf("%08x %08x",buff[0],buff[2]);
|
||||||
|
@ -150,7 +150,7 @@ WRITE16_HANDLER( K055550_word_w )
|
|||||||
WRITE16_HANDLER( K053990_martchmp_word_w )
|
WRITE16_HANDLER( K053990_martchmp_word_w )
|
||||||
{
|
{
|
||||||
int src_addr, src_count, src_skip;
|
int src_addr, src_count, src_skip;
|
||||||
int dst_addr, dst_count, dst_skip;
|
int dst_addr, /*dst_count,*/ dst_skip;
|
||||||
int mod_addr, mod_count, mod_skip, mod_offs;
|
int mod_addr, mod_count, mod_skip, mod_offs;
|
||||||
int mode, i, element_size = 1;
|
int mode, i, element_size = 1;
|
||||||
UINT16 mod_val, mod_data;
|
UINT16 mod_val, mod_data;
|
||||||
@ -171,7 +171,7 @@ WRITE16_HANDLER( K053990_martchmp_word_w )
|
|||||||
dst_addr = prot_data[0x2];
|
dst_addr = prot_data[0x2];
|
||||||
dst_addr |= prot_data[0x3]<<16 & 0xff0000;
|
dst_addr |= prot_data[0x3]<<16 & 0xff0000;
|
||||||
src_count = prot_data[0x8]>>8;
|
src_count = prot_data[0x8]>>8;
|
||||||
dst_count = prot_data[0x9]>>8;
|
//dst_count = prot_data[0x9]>>8;
|
||||||
src_skip = prot_data[0xa] & 0xff;
|
src_skip = prot_data[0xa] & 0xff;
|
||||||
dst_skip = prot_data[0xb] & 0xff;
|
dst_skip = prot_data[0xb] & 0xff;
|
||||||
|
|
||||||
|
@ -1390,14 +1390,14 @@ static TGP_FUNCTION( ram_setadr )
|
|||||||
static TGP_FUNCTION( groundbox_test )
|
static TGP_FUNCTION( groundbox_test )
|
||||||
{
|
{
|
||||||
int out_x, out_y, out_z;
|
int out_x, out_y, out_z;
|
||||||
float x, y, z;
|
float x, /*y,*/ z;
|
||||||
float a = fifoin_pop_f();
|
float a = fifoin_pop_f();
|
||||||
float b = fifoin_pop_f();
|
float b = fifoin_pop_f();
|
||||||
float c = fifoin_pop_f();
|
float c = fifoin_pop_f();
|
||||||
|
|
||||||
logerror("TGP groundbox_test %f, %f, %f (%x)\n", a, b, c, pushpc);
|
logerror("TGP groundbox_test %f, %f, %f (%x)\n", a, b, c, pushpc);
|
||||||
x = cmat[0]*a+cmat[3]*b+cmat[6]*c+cmat[9];
|
x = cmat[0]*a+cmat[3]*b+cmat[6]*c+cmat[9];
|
||||||
y = cmat[1]*a+cmat[4]*b+cmat[7]*c+cmat[10];
|
//y = cmat[1]*a+cmat[4]*b+cmat[7]*c+cmat[10];
|
||||||
z = cmat[2]*a+cmat[5]*b+cmat[8]*c+cmat[11];
|
z = cmat[2]*a+cmat[5]*b+cmat[8]*c+cmat[11];
|
||||||
|
|
||||||
out_x = x < tgp_vf_xmin || x > tgp_vf_xmax;
|
out_x = x < tgp_vf_xmin || x > tgp_vf_xmax;
|
||||||
|
@ -1557,7 +1557,7 @@ void stvcd_exit(running_machine* machine)
|
|||||||
|
|
||||||
static void cd_readTOC(void)
|
static void cd_readTOC(void)
|
||||||
{
|
{
|
||||||
int i, ntrks, toclen, tocptr, fad;
|
int i, ntrks, /*toclen,*/ tocptr, fad;
|
||||||
|
|
||||||
xfertype = XFERTYPE_TOC;
|
xfertype = XFERTYPE_TOC;
|
||||||
xfercount = 0;
|
xfercount = 0;
|
||||||
@ -1571,7 +1571,7 @@ static void cd_readTOC(void)
|
|||||||
ntrks = 0;
|
ntrks = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
toclen = (4 * ntrks); // toclen header entry
|
//toclen = (4 * ntrks); // toclen header entry
|
||||||
|
|
||||||
// data format for Saturn TOC:
|
// data format for Saturn TOC:
|
||||||
// no header.
|
// no header.
|
||||||
|
@ -670,16 +670,16 @@ static void prescan_rle(const atarirle_data *mo, int which)
|
|||||||
while (entry_count-- && base < end)
|
while (entry_count-- && base < end)
|
||||||
{
|
{
|
||||||
int word = *base++;
|
int word = *base++;
|
||||||
int count, value;
|
int count/*, value*/;
|
||||||
|
|
||||||
/* decode the low byte first */
|
/* decode the low byte first */
|
||||||
count = table[word & 0xff];
|
count = table[word & 0xff];
|
||||||
value = count & 0xff;
|
//value = count & 0xff;
|
||||||
tempwidth += count >> 8;
|
tempwidth += count >> 8;
|
||||||
|
|
||||||
/* decode the upper byte second */
|
/* decode the upper byte second */
|
||||||
count = table[word >> 8];
|
count = table[word >> 8];
|
||||||
value = count & 0xff;
|
//value = count & 0xff;
|
||||||
tempwidth += count >> 8;
|
tempwidth += count >> 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -796,13 +796,13 @@ if (count++ == atarirle_hilite_index)
|
|||||||
|
|
||||||
if (hilite)
|
if (hilite)
|
||||||
{
|
{
|
||||||
int scale, code, which;
|
int scale, code/*, which*/;
|
||||||
|
|
||||||
/* extract scale and code */
|
/* extract scale and code */
|
||||||
obj = hilite;
|
obj = hilite;
|
||||||
scale = EXTRACT_DATA(obj, mo->scalemask);
|
scale = EXTRACT_DATA(obj, mo->scalemask);
|
||||||
code = EXTRACT_DATA(obj, mo->codemask);
|
code = EXTRACT_DATA(obj, mo->codemask);
|
||||||
which = EXTRACT_DATA(obj, mo->vrammask);
|
//which = EXTRACT_DATA(obj, mo->vrammask);
|
||||||
|
|
||||||
/* make sure they are in range */
|
/* make sure they are in range */
|
||||||
if (scale > 0 && code < mo->objectcount)
|
if (scale > 0 && code < mo->objectcount)
|
||||||
@ -841,15 +841,13 @@ if (hilite)
|
|||||||
const rectangle *visarea = video_screen_get_visible_area(machine->primary_screen);
|
const rectangle *visarea = video_screen_get_visible_area(machine->primary_screen);
|
||||||
int scaled_width = (scale * info->width + 0x7fff) >> 12;
|
int scaled_width = (scale * info->width + 0x7fff) >> 12;
|
||||||
int scaled_height = (scale * info->height + 0x7fff) >> 12;
|
int scaled_height = (scale * info->height + 0x7fff) >> 12;
|
||||||
int dx, dy, ex, ey, sx = x, sy = y, tx, ty;
|
int ex, ey, sx = x, sy = y, tx, ty;
|
||||||
|
|
||||||
/* make sure we didn't end up with 0 */
|
/* make sure we didn't end up with 0 */
|
||||||
if (scaled_width == 0) scaled_width = 1;
|
if (scaled_width == 0) scaled_width = 1;
|
||||||
if (scaled_height == 0) scaled_height = 1;
|
if (scaled_height == 0) scaled_height = 1;
|
||||||
|
|
||||||
/* compute the remaining parameters */
|
/* compute the remaining parameters */
|
||||||
dx = (info->width << 12) / scaled_width;
|
|
||||||
dy = (info->height << 12) / scaled_height;
|
|
||||||
ex = sx + scaled_width - 1;
|
ex = sx + scaled_width - 1;
|
||||||
ey = sy + scaled_height - 1;
|
ey = sy + scaled_height - 1;
|
||||||
|
|
||||||
|
@ -102,7 +102,6 @@ PALETTE_INIT( carpolo )
|
|||||||
for (i = 0; i < machine->config->total_colors; i++)
|
for (i = 0; i < machine->config->total_colors; i++)
|
||||||
{
|
{
|
||||||
UINT8 pen, r, g, b;
|
UINT8 pen, r, g, b;
|
||||||
int bit0, bit1, bit2;
|
|
||||||
|
|
||||||
if (i < 0x18)
|
if (i < 0x18)
|
||||||
/* sprites */
|
/* sprites */
|
||||||
@ -131,20 +130,12 @@ PALETTE_INIT( carpolo )
|
|||||||
pen = ((i - 0x38) & 0x01) ? ALPHA_COLOR_BASE + ((i - 0x38) >> 1) : 0;
|
pen = ((i - 0x38) & 0x01) ? ALPHA_COLOR_BASE + ((i - 0x38) >> 1) : 0;
|
||||||
|
|
||||||
/* red component */
|
/* red component */
|
||||||
bit0 = (color_prom[pen] >> 7) & 0x01;
|
|
||||||
bit1 = (color_prom[pen] >> 6) & 0x01;
|
|
||||||
bit2 = (color_prom[pen] >> 5) & 0x01;
|
|
||||||
r = ((r_voltage[(color_prom[pen] >> 5) & 0x07] - MIN_VOLTAGE) / (MAX_VOLTAGE - MIN_VOLTAGE)) * 255.;
|
r = ((r_voltage[(color_prom[pen] >> 5) & 0x07] - MIN_VOLTAGE) / (MAX_VOLTAGE - MIN_VOLTAGE)) * 255.;
|
||||||
|
|
||||||
/* green component */
|
/* green component */
|
||||||
bit0 = (color_prom[pen] >> 4) & 0x01;
|
|
||||||
bit1 = (color_prom[pen] >> 3) & 0x01;
|
|
||||||
bit2 = (color_prom[pen] >> 2) & 0x01;
|
|
||||||
g = ((g_voltage[(color_prom[pen] >> 2) & 0x07] - MIN_VOLTAGE) / (MAX_VOLTAGE - MIN_VOLTAGE)) * 255.;
|
g = ((g_voltage[(color_prom[pen] >> 2) & 0x07] - MIN_VOLTAGE) / (MAX_VOLTAGE - MIN_VOLTAGE)) * 255.;
|
||||||
|
|
||||||
/* blue component */
|
/* blue component */
|
||||||
bit0 = (color_prom[pen] >> 1) & 0x01;
|
|
||||||
bit1 = (color_prom[pen] >> 0) & 0x01;
|
|
||||||
b = ((b_voltage[(color_prom[pen] >> 0) & 0x03] - MIN_VOLTAGE) / (MAX_VOLTAGE - MIN_VOLTAGE)) * 255.;
|
b = ((b_voltage[(color_prom[pen] >> 0) & 0x03] - MIN_VOLTAGE) / (MAX_VOLTAGE - MIN_VOLTAGE)) * 255.;
|
||||||
|
|
||||||
palette_set_color(machine, i, MAKE_RGB(r, g, b));
|
palette_set_color(machine, i, MAKE_RGB(r, g, b));
|
||||||
|
@ -228,7 +228,7 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap,const rectan
|
|||||||
{
|
{
|
||||||
UINT32 *index_ptr=0;
|
UINT32 *index_ptr=0;
|
||||||
int offs,fx=0,fy=0,x,y,color,colorOffset,sprite,indx,h,w,bx,by,fx1,fy1;
|
int offs,fx=0,fy=0,x,y,color,colorOffset,sprite,indx,h,w,bx,by,fx1,fy1;
|
||||||
int xmult,ymult,xoffs,yoffs;
|
int xoffs,yoffs;
|
||||||
UINT8 *rom = memory_region(machine, "gfx2") + 0x20000, *index_ptr8;
|
UINT8 *rom = memory_region(machine, "gfx2") + 0x20000, *index_ptr8;
|
||||||
UINT8 *rawrom = memory_region(machine, "gfx2");
|
UINT8 *rawrom = memory_region(machine, "gfx2");
|
||||||
int blockIsTilemapIndex=0;
|
int blockIsTilemapIndex=0;
|
||||||
@ -403,9 +403,6 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap,const rectan
|
|||||||
if(fx1&1) fx^=0x8000;
|
if(fx1&1) fx^=0x8000;
|
||||||
if(fy1&1) fy^=0x4000;
|
if(fy1&1) fy^=0x4000;
|
||||||
|
|
||||||
if (fx) xmult=-1; else xmult=1;
|
|
||||||
if (fy) ymult=-1; else ymult=1;
|
|
||||||
|
|
||||||
ybase=y<<16;
|
ybase=y<<16;
|
||||||
if (fy)
|
if (fy)
|
||||||
ybase+=(yoffs-15) * (yscale<<8);
|
ybase+=(yoffs-15) * (yscale<<8);
|
||||||
|
@ -1027,12 +1027,11 @@ static void hanamai_copylayer( running_machine *machine, bitmap_t *bitmap, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
int dy, length, pen, offs;
|
int dy, length, pen;
|
||||||
UINT8 *src1 = state->pixmap[i][1];
|
UINT8 *src1 = state->pixmap[i][1];
|
||||||
UINT8 *src2 = state->pixmap[i][0];
|
UINT8 *src2 = state->pixmap[i][0];
|
||||||
|
|
||||||
int palbase = 16 * color;
|
int palbase = 16 * color;
|
||||||
offs = 0;
|
|
||||||
|
|
||||||
for (dy = 0; dy < 256; dy++)
|
for (dy = 0; dy < 256; dy++)
|
||||||
{
|
{
|
||||||
@ -1095,12 +1094,11 @@ static void jantouki_copylayer( running_machine *machine, bitmap_t *bitmap, cons
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
int dy, length, pen, offs;
|
int dy, length, pen;
|
||||||
UINT8 *src1 = state->pixmap[i][1];
|
UINT8 *src1 = state->pixmap[i][1];
|
||||||
UINT8 *src2 = state->pixmap[i][0];
|
UINT8 *src2 = state->pixmap[i][0];
|
||||||
|
|
||||||
int palbase = 16 * color;
|
int palbase = 16 * color;
|
||||||
offs = 0;
|
|
||||||
|
|
||||||
for (dy = 0; dy < 256; dy++)
|
for (dy = 0; dy < 256; dy++)
|
||||||
{
|
{
|
||||||
@ -1160,11 +1158,10 @@ static void mjdialq2_copylayer( running_machine *machine, bitmap_t *bitmap, cons
|
|||||||
scrolly = state->blit_scroll_y;
|
scrolly = state->blit_scroll_y;
|
||||||
|
|
||||||
{
|
{
|
||||||
int dy, length, pen, offs;
|
int dy, length, pen;
|
||||||
UINT8 *src = state->pixmap[i][0];
|
UINT8 *src = state->pixmap[i][0];
|
||||||
|
|
||||||
int palbase = 16 * color;
|
int palbase = 16 * color;
|
||||||
offs = 0;
|
|
||||||
|
|
||||||
for (dy = 0; dy < 256; dy++)
|
for (dy = 0; dy < 256; dy++)
|
||||||
{
|
{
|
||||||
|
@ -188,7 +188,7 @@ static void f1gp_draw_sprites( running_machine *machine, bitmap_t *bitmap, const
|
|||||||
for (attr_start = 0x0200 - 8; attr_start >= first; attr_start -= 4)
|
for (attr_start = 0x0200 - 8; attr_start >= first; attr_start -= 4)
|
||||||
{
|
{
|
||||||
int map_start;
|
int map_start;
|
||||||
int ox, oy, x, y, xsize, ysize, zoomx, zoomy, flipx, flipy, color, pri;
|
int ox, oy, x, y, xsize, ysize, zoomx, zoomy, flipx, flipy, color/*, pri*/;
|
||||||
/* table hand made by looking at the ship explosion in attract mode */
|
/* table hand made by looking at the ship explosion in attract mode */
|
||||||
/* it's almost a logarithmic scale but not exactly */
|
/* it's almost a logarithmic scale but not exactly */
|
||||||
static const int zoomtable[16] = { 0,7,14,20,25,30,34,38,42,46,49,52,54,57,59,61 };
|
static const int zoomtable[16] = { 0,7,14,20,25,30,34,38,42,46,49,52,54,57,59,61 };
|
||||||
@ -204,7 +204,7 @@ static void f1gp_draw_sprites( running_machine *machine, bitmap_t *bitmap, const
|
|||||||
flipx = spram[attr_start + 2] & 0x0800;
|
flipx = spram[attr_start + 2] & 0x0800;
|
||||||
flipy = spram[attr_start + 2] & 0x8000;
|
flipy = spram[attr_start + 2] & 0x8000;
|
||||||
color = (spram[attr_start + 2] & 0x000f);// + 16 * spritepalettebank;
|
color = (spram[attr_start + 2] & 0x000f);// + 16 * spritepalettebank;
|
||||||
pri = 0;//spram[attr_start + 2] & 0x0010;
|
//pri = spram[attr_start + 2] & 0x0010;
|
||||||
map_start = spram[attr_start + 3];
|
map_start = spram[attr_start + 3];
|
||||||
|
|
||||||
zoomx = 16 - zoomtable[zoomx] / 8;
|
zoomx = 16 - zoomtable[zoomx] / 8;
|
||||||
|
@ -269,8 +269,8 @@ static void tc0610_rotate_draw(running_machine *machine, bitmap_t *bitmap, bitma
|
|||||||
const int ly = srcbitmap->height;
|
const int ly = srcbitmap->height;
|
||||||
|
|
||||||
static int rsxb=0, rsyb=0, rsxoffs=0, rsyoffs=0;
|
static int rsxb=0, rsyb=0, rsxoffs=0, rsyoffs=0;
|
||||||
int sx, sy, yx, yy, zx, zy, pxx, pxy, pyx, pyy;
|
int yx, /*yy,*/ zx, zy, pxx, pxy, pyx, pyy;
|
||||||
float ssn, scs, ysn, ycs, zsn, zcs;
|
float /*ssn, scs, ysn, ycs,*/ zsn, zcs;
|
||||||
|
|
||||||
|
|
||||||
pxx = 0;
|
pxx = 0;
|
||||||
@ -347,14 +347,12 @@ static void tc0610_rotate_draw(running_machine *machine, bitmap_t *bitmap, bitma
|
|||||||
pxy = 0;
|
pxy = 0;
|
||||||
pyx = 0;
|
pyx = 0;
|
||||||
pyy = 0;
|
pyy = 0;
|
||||||
sx = 0;
|
|
||||||
sy = 0;
|
|
||||||
yx = 0;
|
yx = 0;
|
||||||
yy = 0;
|
//yy = 0;
|
||||||
ssn = 0.0;
|
//ssn = 0.0;
|
||||||
scs = 0.0;
|
//scs = 0.0;
|
||||||
ysn = 0.0;
|
//ysn = 0.0;
|
||||||
ycs = 0.0;
|
//ycs = 0.0;
|
||||||
|
|
||||||
if (galastrm_tc0610_ctrl_reg[1][7])
|
if (galastrm_tc0610_ctrl_reg[1][7])
|
||||||
{
|
{
|
||||||
@ -371,13 +369,13 @@ static void tc0610_rotate_draw(running_machine *machine, bitmap_t *bitmap, bitma
|
|||||||
{
|
{
|
||||||
pyy += ryx;
|
pyy += ryx;
|
||||||
pyx += -ryy;
|
pyx += -ryy;
|
||||||
yy++;
|
//yy++;
|
||||||
}
|
}
|
||||||
if (yx >= 0.0)
|
if (yx >= 0.0)
|
||||||
{
|
{
|
||||||
yx = (int)((8.0 - log((double)yx) / log(2.0)) * 6.0);
|
yx = (int)((8.0 - log((double)yx) / log(2.0)) * 6.0);
|
||||||
ysn = sin(DEGREE_TO_RADIAN(yx));
|
//ysn = sin(DEGREE_TO_RADIAN(yx));
|
||||||
ycs = 1.0 - ysn*ysn;
|
//ycs = 1.0 - ysn*ysn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -392,17 +390,15 @@ static void tc0610_rotate_draw(running_machine *machine, bitmap_t *bitmap, bitma
|
|||||||
{
|
{
|
||||||
pxx += rsx;
|
pxx += rsx;
|
||||||
pxy += rsy;
|
pxy += rsy;
|
||||||
sx++;
|
|
||||||
}
|
}
|
||||||
while (sqrt(pow((float)pyy/65536.0, 2.0) + pow((float)pyx/65536.0, 2.0)) < (float)(ly / 2))
|
while (sqrt(pow((float)pyy/65536.0, 2.0) + pow((float)pyx/65536.0, 2.0)) < (float)(ly / 2))
|
||||||
{
|
{
|
||||||
pyy += rsx;
|
pyy += rsx;
|
||||||
pyx += -rsy;
|
pyx += -rsy;
|
||||||
sy++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ssn = ((float)pxy/65536.0) / (float)(lx / 2);
|
//ssn = ((float)pxy/65536.0) / (float)(lx / 2);
|
||||||
scs = ((float)pyy/65536.0) / (float)(ly / 2);
|
//scs = ((float)pyy/65536.0) / (float)(ly / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ VIDEO_UPDATE( gijoe )
|
|||||||
gijoe_state *state = (gijoe_state *)screen->machine->driver_data;
|
gijoe_state *state = (gijoe_state *)screen->machine->driver_data;
|
||||||
static const int K053251_CI[4] = { K053251_CI1, K053251_CI2, K053251_CI3, K053251_CI4 };
|
static const int K053251_CI[4] = { K053251_CI1, K053251_CI2, K053251_CI3, K053251_CI4 };
|
||||||
int layer[4];
|
int layer[4];
|
||||||
int vrc_mode, vrc_new, colorbase_new, primode, dirty, i;
|
int vrc_mode, vrc_new, colorbase_new, /*primode,*/ dirty, i;
|
||||||
int mask = 0;
|
int mask = 0;
|
||||||
|
|
||||||
// update tile offsets
|
// update tile offsets
|
||||||
@ -145,7 +145,7 @@ VIDEO_UPDATE( gijoe )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// seems to switch the K053251 between different priority modes, detail unknown
|
// seems to switch the K053251 between different priority modes, detail unknown
|
||||||
primode = k053251_get_priority(state->k053251, K053251_CI1);
|
// primode = k053251_get_priority(state->k053251, K053251_CI1);
|
||||||
|
|
||||||
layer[0] = 0;
|
layer[0] = 0;
|
||||||
state->layer_pri[0] = 0; // not sure
|
state->layer_pri[0] = 0; // not sure
|
||||||
|
@ -84,7 +84,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan
|
|||||||
int sprites_flipscreen = 0;
|
int sprites_flipscreen = 0;
|
||||||
int zoomx, zoomy, zx, zy;
|
int zoomx, zoomy, zx, zy;
|
||||||
int sprite_chunk,map_offset,code,j,k,px,py;
|
int sprite_chunk,map_offset,code,j,k,px,py;
|
||||||
int dimension,total_chunks,bad_chunks;
|
int dimension,total_chunks;
|
||||||
static const int primasks[4] = {0xffff, 0xfffc, 0xfff0, 0xff00 };
|
static const int primasks[4] = {0xffff, 0xfffc, 0xfff0, 0xff00 };
|
||||||
|
|
||||||
/* pdrawgfx() needs us to draw sprites front to back, so we have to build a list
|
/* pdrawgfx() needs us to draw sprites front to back, so we have to build a list
|
||||||
@ -128,7 +128,6 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan
|
|||||||
|
|
||||||
x -= x_offs;
|
x -= x_offs;
|
||||||
|
|
||||||
bad_chunks = 0;
|
|
||||||
dimension = ((dblsize*2) + 2); // 2 or 4
|
dimension = ((dblsize*2) + 2); // 2 or 4
|
||||||
total_chunks = ((dblsize*3) + 1) << 2; // 4 or 16
|
total_chunks = ((dblsize*3) + 1) << 2; // 4 or 16
|
||||||
map_offset = tilenum << 2;
|
map_offset = tilenum << 2;
|
||||||
@ -149,7 +148,6 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan
|
|||||||
|
|
||||||
if (code==0xffff)
|
if (code==0xffff)
|
||||||
{
|
{
|
||||||
bad_chunks += 1;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,13 +230,12 @@ WRITE8_HANDLER( hnayayoi_palbank_w )
|
|||||||
static void draw_layer_interleaved( running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int left_pixmap, int right_pixmap, int palbase, int transp )
|
static void draw_layer_interleaved( running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int left_pixmap, int right_pixmap, int palbase, int transp )
|
||||||
{
|
{
|
||||||
hnayayoi_state *state = (hnayayoi_state *)machine->driver_data;
|
hnayayoi_state *state = (hnayayoi_state *)machine->driver_data;
|
||||||
int county, countx, pen, offs;
|
int county, countx, pen;
|
||||||
UINT8 *src1 = state->pixmap[left_pixmap];
|
UINT8 *src1 = state->pixmap[left_pixmap];
|
||||||
UINT8 *src2 = state->pixmap[right_pixmap];
|
UINT8 *src2 = state->pixmap[right_pixmap];
|
||||||
UINT16 *dstbase = (UINT16 *)bitmap->base;
|
UINT16 *dstbase = (UINT16 *)bitmap->base;
|
||||||
|
|
||||||
palbase *= 16;
|
palbase *= 16;
|
||||||
offs = 0;
|
|
||||||
|
|
||||||
for (county = 255; county >= 0; county--, dstbase += bitmap->rowpixels)
|
for (county = 255; county >= 0; county--, dstbase += bitmap->rowpixels)
|
||||||
{
|
{
|
||||||
|
@ -1174,7 +1174,7 @@ void konamigx_mixer(running_machine *machine, bitmap_t *bitmap, const rectangle
|
|||||||
int shadowon[3], shdpri[3], layerid[6], layerpri[6];
|
int shadowon[3], shdpri[3], layerid[6], layerpri[6];
|
||||||
|
|
||||||
struct GX_OBJ *objpool, *objptr;
|
struct GX_OBJ *objpool, *objptr;
|
||||||
int wrapsize, xwraplim, ywraplim, cltc_shdpri, prflp, disp;
|
int wrapsize, xwraplim, ywraplim, cltc_shdpri, /*prflp,*/ disp;
|
||||||
int xa,ya,ox,oy,zw,zh,flipx,flipy,mirrorx,mirrory,zoomx,zoomy,scalex,scaley,nozoom;
|
int xa,ya,ox,oy,zw,zh,flipx,flipy,mirrorx,mirrory,zoomx,zoomy,scalex,scaley,nozoom;
|
||||||
int screenwidth, flipscreenx, flipscreeny, offx, offy;
|
int screenwidth, flipscreenx, flipscreeny, offx, offy;
|
||||||
int nobj, i, j, k, l, temp, temp1, temp2, temp3, temp4, count;
|
int nobj, i, j, k, l, temp, temp1, temp2, temp3, temp4, count;
|
||||||
@ -1238,7 +1238,7 @@ void konamigx_mixer(running_machine *machine, bitmap_t *bitmap, const rectangle
|
|||||||
}
|
}
|
||||||
|
|
||||||
// invert layer priority when this flag is set (not used by any GX game?)
|
// invert layer priority when this flag is set (not used by any GX game?)
|
||||||
prflp = K055555_read_register(K55_CONTROL) & K55_CTL_FLIPPRI;
|
//prflp = K055555_read_register(K55_CONTROL) & K55_CTL_FLIPPRI;
|
||||||
|
|
||||||
layerpri[0] = K055555_read_register(K55_PRIINP_0);
|
layerpri[0] = K055555_read_register(K55_PRIINP_0);
|
||||||
layerpri[1] = K055555_read_register(K55_PRIINP_3);
|
layerpri[1] = K055555_read_register(K55_PRIINP_3);
|
||||||
|
@ -139,9 +139,9 @@ WRITE16_HANDLER( lemmings_pixel_0_w )
|
|||||||
WRITE16_HANDLER( lemmings_pixel_1_w )
|
WRITE16_HANDLER( lemmings_pixel_1_w )
|
||||||
{
|
{
|
||||||
lemmings_state *state = (lemmings_state *)space->machine->driver_data;
|
lemmings_state *state = (lemmings_state *)space->machine->driver_data;
|
||||||
int sx, sy, src, old, tile;
|
int sx, sy, src, /*old,*/ tile;
|
||||||
|
|
||||||
old = state->pixel_1_data[offset];
|
// old = state->pixel_1_data[offset];
|
||||||
COMBINE_DATA(&state->pixel_1_data[offset]);
|
COMBINE_DATA(&state->pixel_1_data[offset]);
|
||||||
src = state->pixel_1_data[offset];
|
src = state->pixel_1_data[offset];
|
||||||
// if (old == src)
|
// if (old == src)
|
||||||
|
@ -104,7 +104,7 @@ VIDEO_UPDATE( kikikai )
|
|||||||
mexico86_state *state = (mexico86_state *)screen->machine->driver_data;
|
mexico86_state *state = (mexico86_state *)screen->machine->driver_data;
|
||||||
int offs;
|
int offs;
|
||||||
int sx, sy, yc;
|
int sx, sy, yc;
|
||||||
int gfx_num, gfx_attr, gfx_offs;
|
int gfx_num, /*gfx_attr,*/ gfx_offs;
|
||||||
int height;
|
int height;
|
||||||
int goffs, code, color, y;
|
int goffs, code, color, y;
|
||||||
int tx, ty;
|
int tx, ty;
|
||||||
@ -119,7 +119,7 @@ VIDEO_UPDATE( kikikai )
|
|||||||
ty = state->objectram[offs];
|
ty = state->objectram[offs];
|
||||||
gfx_num = state->objectram[offs + 1];
|
gfx_num = state->objectram[offs + 1];
|
||||||
tx = state->objectram[offs + 2];
|
tx = state->objectram[offs + 2];
|
||||||
gfx_attr = state->objectram[offs + 3];
|
//gfx_attr = state->objectram[offs + 3];
|
||||||
|
|
||||||
if (gfx_num & 0x80)
|
if (gfx_num & 0x80)
|
||||||
{
|
{
|
||||||
|
@ -739,12 +739,10 @@ INLINE void write_texture8(int xpos, int ypos, int width, int height, int page,
|
|||||||
for(x=xpos; x < xpos+width; x+=8)
|
for(x=xpos; x < xpos+width; x+=8)
|
||||||
{
|
{
|
||||||
UINT16 *texture = &texture_ram[page][y*2048+x];
|
UINT16 *texture = &texture_ram[page][y*2048+x];
|
||||||
int b = 0;
|
|
||||||
for(j=y; j < y+4; j++) {
|
for(j=y; j < y+4; j++) {
|
||||||
for(i=x; i < x+8; i++) {
|
for(i=x; i < x+8; i++) {
|
||||||
*texture = color;
|
*texture = color;
|
||||||
texture++;
|
texture++;
|
||||||
++b;
|
|
||||||
}
|
}
|
||||||
texture += 2048-8;
|
texture += 2048-8;
|
||||||
}
|
}
|
||||||
@ -1130,7 +1128,6 @@ static void draw_model(running_machine *machine, UINT32 addr)
|
|||||||
poly_vertex prev_vertex[4];
|
poly_vertex prev_vertex[4];
|
||||||
poly_vertex clip_vert[10];
|
poly_vertex clip_vert[10];
|
||||||
|
|
||||||
int polynum = 0;
|
|
||||||
MATRIX transform_matrix;
|
MATRIX transform_matrix;
|
||||||
float center_x, center_y;
|
float center_x, center_y;
|
||||||
|
|
||||||
@ -1307,8 +1304,6 @@ static void draw_model(running_machine *machine, UINT32 addr)
|
|||||||
render_one(machine, &tri);
|
render_one(machine, &tri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
++polynum;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1460,7 +1455,7 @@ static void draw_viewport(running_machine *machine, int pri, UINT32 address)
|
|||||||
const UINT32 *node = get_memory_pointer(address);
|
const UINT32 *node = get_memory_pointer(address);
|
||||||
UINT32 link_address;
|
UINT32 link_address;
|
||||||
float viewport_left, viewport_right, viewport_top, viewport_bottom;
|
float viewport_left, viewport_right, viewport_top, viewport_bottom;
|
||||||
float fov_x, fov_y;
|
float /*fov_x,*/ fov_y;
|
||||||
|
|
||||||
link_address = node[1];
|
link_address = node[1];
|
||||||
if (link_address == 0)
|
if (link_address == 0)
|
||||||
@ -1495,7 +1490,7 @@ static void draw_viewport(running_machine *machine, int pri, UINT32 address)
|
|||||||
clip_plane[4].x = 0.0f; clip_plane[4].y = 0.0f; clip_plane[4].z = 1.0f; clip_plane[4].d = 1.0f;
|
clip_plane[4].x = 0.0f; clip_plane[4].y = 0.0f; clip_plane[4].z = 1.0f; clip_plane[4].d = 1.0f;
|
||||||
|
|
||||||
/* compute field of view */
|
/* compute field of view */
|
||||||
fov_x = viewport_left + viewport_right;
|
//fov_x = viewport_left + viewport_right;
|
||||||
fov_y = viewport_top + viewport_bottom;
|
fov_y = viewport_top + viewport_bottom;
|
||||||
viewport_focal_length = (viewport_region_height / 2) / tan( (fov_y * M_PI / 180.0f) / 2.0f );
|
viewport_focal_length = (viewport_region_height / 2) / tan( (fov_y * M_PI / 180.0f) / 2.0f );
|
||||||
|
|
||||||
|
@ -68,9 +68,8 @@ VIDEO_UPDATE(moo)
|
|||||||
moo_state *state = (moo_state *)screen->machine->driver_data;
|
moo_state *state = (moo_state *)screen->machine->driver_data;
|
||||||
static const int K053251_CI[4] = { K053251_CI1, K053251_CI2, K053251_CI3, K053251_CI4 };
|
static const int K053251_CI[4] = { K053251_CI1, K053251_CI2, K053251_CI3, K053251_CI4 };
|
||||||
int layers[3];
|
int layers[3];
|
||||||
int bg_colorbase, new_colorbase, plane, dirty, alpha;
|
int new_colorbase, plane, dirty, alpha;
|
||||||
|
|
||||||
bg_colorbase = k053251_get_palette_index(state->k053251, K053251_CI1);
|
|
||||||
state->sprite_colorbase = k053251_get_palette_index(state->k053251, K053251_CI0);
|
state->sprite_colorbase = k053251_get_palette_index(state->k053251, K053251_CI0);
|
||||||
state->layer_colorbase[0] = 0x70;
|
state->layer_colorbase[0] = 0x70;
|
||||||
|
|
||||||
|
@ -69,15 +69,15 @@ VIDEO_START( oneshot )
|
|||||||
static void draw_crosshairs( running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect )
|
static void draw_crosshairs( running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect )
|
||||||
{
|
{
|
||||||
oneshot_state *state = (oneshot_state *)machine->driver_data;
|
oneshot_state *state = (oneshot_state *)machine->driver_data;
|
||||||
int xpos,ypos;
|
//int xpos,ypos;
|
||||||
|
|
||||||
/* get gun raw coordinates (player 1) */
|
/* get gun raw coordinates (player 1) */
|
||||||
state->gun_x_p1 = (input_port_read(machine, "LIGHT0_X") & 0xff) * 320 / 256;
|
state->gun_x_p1 = (input_port_read(machine, "LIGHT0_X") & 0xff) * 320 / 256;
|
||||||
state->gun_y_p1 = (input_port_read(machine, "LIGHT0_Y") & 0xff) * 240 / 256;
|
state->gun_y_p1 = (input_port_read(machine, "LIGHT0_Y") & 0xff) * 240 / 256;
|
||||||
|
|
||||||
/* compute the coordinates for drawing (from routine at 0x009ab0) */
|
/* compute the coordinates for drawing (from routine at 0x009ab0) */
|
||||||
xpos = state->gun_x_p1;
|
//xpos = state->gun_x_p1;
|
||||||
ypos = state->gun_y_p1;
|
//ypos = state->gun_y_p1;
|
||||||
|
|
||||||
state->gun_x_p1 += state->gun_x_shift;
|
state->gun_x_p1 += state->gun_x_shift;
|
||||||
|
|
||||||
@ -91,8 +91,8 @@ static void draw_crosshairs( running_machine *machine, bitmap_t *bitmap, const r
|
|||||||
state->gun_y_p2 = (input_port_read(machine, "LIGHT1_Y") & 0xff) * 240 / 256;
|
state->gun_y_p2 = (input_port_read(machine, "LIGHT1_Y") & 0xff) * 240 / 256;
|
||||||
|
|
||||||
/* compute the coordinates for drawing (from routine at 0x009b6e) */
|
/* compute the coordinates for drawing (from routine at 0x009b6e) */
|
||||||
xpos = state->gun_x_p2;
|
//xpos = state->gun_x_p2;
|
||||||
ypos = state->gun_y_p2;
|
//ypos = state->gun_y_p2;
|
||||||
|
|
||||||
state->gun_x_p2 += state->gun_x_shift - 0x0a;
|
state->gun_x_p2 += state->gun_x_shift - 0x0a;
|
||||||
if (state->gun_x_p2 < 0)
|
if (state->gun_x_p2 < 0)
|
||||||
|
@ -492,7 +492,7 @@ static void draw_sprites( running_device *device, UINT8 *line_priority )
|
|||||||
int *ppu_regs = &ppu2c0x->regs[0];
|
int *ppu_regs = &ppu2c0x->regs[0];
|
||||||
|
|
||||||
int sprite_xpos, sprite_ypos, sprite_index;
|
int sprite_xpos, sprite_ypos, sprite_index;
|
||||||
int tile, index1, page;
|
int tile, index1;
|
||||||
int pri;
|
int pri;
|
||||||
|
|
||||||
int flipx, flipy, color;
|
int flipx, flipy, color;
|
||||||
@ -551,11 +551,7 @@ static void draw_sprites( running_device *device, UINT8 *line_priority )
|
|||||||
tile &= ~0x01;
|
tile &= ~0x01;
|
||||||
tile |= 0x100;
|
tile |= 0x100;
|
||||||
}
|
}
|
||||||
/* note that the sprite page value has no effect on 8x16 sprites */
|
|
||||||
page = tile >> 6;
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
page = (tile >> 6) | sprite_page;
|
|
||||||
|
|
||||||
if (ppu_latch)
|
if (ppu_latch)
|
||||||
(*ppu_latch)(device, (sprite_page << 10) | ((tile & 0xff) << 4));
|
(*ppu_latch)(device, (sprite_page << 10) | ((tile & 0xff) << 4));
|
||||||
@ -737,7 +733,7 @@ static void render_scanline( running_device *device )
|
|||||||
static void update_scanline( running_device *device )
|
static void update_scanline( running_device *device )
|
||||||
{
|
{
|
||||||
ppu2c0x_state *ppu2c0x = get_token(device);
|
ppu2c0x_state *ppu2c0x = get_token(device);
|
||||||
int scanline = ppu2c0x->scanline;
|
const int scanline = ppu2c0x->scanline;
|
||||||
int *ppu_regs = &ppu2c0x->regs[0];
|
int *ppu_regs = &ppu2c0x->regs[0];
|
||||||
|
|
||||||
if (scanline <= PPU_BOTTOM_VISIBLE_SCANLINE)
|
if (scanline <= PPU_BOTTOM_VISIBLE_SCANLINE)
|
||||||
@ -756,7 +752,6 @@ static void update_scanline( running_device *device )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
bitmap_t *bitmap = ppu2c0x->bitmap;
|
bitmap_t *bitmap = ppu2c0x->bitmap;
|
||||||
const int scanline = ppu2c0x->scanline;
|
|
||||||
UINT8 color_mask;
|
UINT8 color_mask;
|
||||||
UINT16 back_pen;
|
UINT16 back_pen;
|
||||||
int i;
|
int i;
|
||||||
|
@ -263,7 +263,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
gfx_element *gfx = machine->gfx[st0016_ramgfx];
|
gfx_element *gfx = machine->gfx[st0016_ramgfx];
|
||||||
int i,j,lx,ly,x,y,code,offset,length,sx,sy,color,flipx,flipy,scrollx,scrolly,plx,ply;
|
int i,j,lx,ly,x,y,code,offset,length,sx,sy,color,flipx,flipy,scrollx,scrolly/*,plx,ply*/;
|
||||||
|
|
||||||
|
|
||||||
for(i=0;i<ST0016_SPR_BANK_SIZE*ST0016_MAX_SPR_BANK;i+=8)
|
for(i=0;i<ST0016_SPR_BANK_SIZE*ST0016_MAX_SPR_BANK;i+=8)
|
||||||
@ -308,8 +308,8 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
|
|||||||
|
|
||||||
length=st0016_spriteram[i+0]+1+256*(st0016_spriteram[i+1]&1);
|
length=st0016_spriteram[i+0]+1+256*(st0016_spriteram[i+1]&1);
|
||||||
|
|
||||||
plx=(st0016_spriteram[i+5]>>2)&0x3;
|
//plx=(st0016_spriteram[i+5]>>2)&0x3;
|
||||||
ply=(st0016_spriteram[i+7]>>2)&0x3;
|
//ply=(st0016_spriteram[i+7]>>2)&0x3;
|
||||||
|
|
||||||
if(offset<ST0016_SPR_BANK_SIZE*ST0016_MAX_SPR_BANK)
|
if(offset<ST0016_SPR_BANK_SIZE*ST0016_MAX_SPR_BANK)
|
||||||
{
|
{
|
||||||
|
@ -220,7 +220,7 @@ WRITE32_HANDLER ( skns_pal_regs_w )
|
|||||||
WRITE32_HANDLER ( skns_palette_ram_w )
|
WRITE32_HANDLER ( skns_palette_ram_w )
|
||||||
{
|
{
|
||||||
int r,g,b;
|
int r,g,b;
|
||||||
int brightness_r, brightness_g, brightness_b, alpha;
|
int brightness_r, brightness_g, brightness_b/*, alpha*/;
|
||||||
int use_bright;
|
int use_bright;
|
||||||
|
|
||||||
COMBINE_DATA(&skns_palette_ram[offset]);
|
COMBINE_DATA(&skns_palette_ram[offset]);
|
||||||
@ -229,7 +229,7 @@ WRITE32_HANDLER ( skns_palette_ram_w )
|
|||||||
g = ((skns_palette_ram[offset] >> 5 ) & 0x1f);
|
g = ((skns_palette_ram[offset] >> 5 ) & 0x1f);
|
||||||
r = ((skns_palette_ram[offset] >> 10 ) & 0x1f);
|
r = ((skns_palette_ram[offset] >> 10 ) & 0x1f);
|
||||||
|
|
||||||
alpha = ((skns_palette_ram[offset] >> 15 ) & 0x1);
|
//alpha = ((skns_palette_ram[offset] >> 15 ) & 0x1);
|
||||||
|
|
||||||
if(offset<(0x40*256)) { // 1st half is for Sprites
|
if(offset<(0x40*256)) { // 1st half is for Sprites
|
||||||
use_bright = use_spc_bright;
|
use_bright = use_spc_bright;
|
||||||
@ -262,13 +262,13 @@ WRITE32_HANDLER ( skns_palette_ram_w )
|
|||||||
|
|
||||||
static void palette_set_rgb_brightness (running_machine *machine, int offset, UINT8 brightness_r, UINT8 brightness_g, UINT8 brightness_b)
|
static void palette_set_rgb_brightness (running_machine *machine, int offset, UINT8 brightness_r, UINT8 brightness_g, UINT8 brightness_b)
|
||||||
{
|
{
|
||||||
int use_bright, r, g, b, alpha;
|
int use_bright, r, g, b/*, alpha*/;
|
||||||
|
|
||||||
b = ((skns_palette_ram[offset] >> 0 ) & 0x1f);
|
b = ((skns_palette_ram[offset] >> 0 ) & 0x1f);
|
||||||
g = ((skns_palette_ram[offset] >> 5 ) & 0x1f);
|
g = ((skns_palette_ram[offset] >> 5 ) & 0x1f);
|
||||||
r = ((skns_palette_ram[offset] >> 10 ) & 0x1f);
|
r = ((skns_palette_ram[offset] >> 10 ) & 0x1f);
|
||||||
|
|
||||||
alpha = ((skns_palette_ram[offset] >> 15 ) & 0x1);
|
//alpha = ((skns_palette_ram[offset] >> 15 ) & 0x1);
|
||||||
|
|
||||||
if(offset<(0x40*256)) { // 1st half is for Sprites
|
if(offset<(0x40*256)) { // 1st half is for Sprites
|
||||||
use_bright = use_spc_bright;
|
use_bright = use_spc_bright;
|
||||||
|
@ -2922,7 +2922,7 @@ static void get_sprite_info(running_machine *machine, const UINT32 *spriteram32_
|
|||||||
const rectangle *visarea = video_screen_get_visible_area(machine->primary_screen);
|
const rectangle *visarea = video_screen_get_visible_area(machine->primary_screen);
|
||||||
const int min_x=visarea->min_x,max_x=visarea->max_x;
|
const int min_x=visarea->min_x,max_x=visarea->max_x;
|
||||||
const int min_y=visarea->min_y,max_y=visarea->max_y;
|
const int min_y=visarea->min_y,max_y=visarea->max_y;
|
||||||
int offs,spritecont,flipx,flipy,old_x,old_y,color,x,y;
|
int offs,spritecont,flipx,flipy,old_x,color,x,y;
|
||||||
int sprite,global_x=0,global_y=0,subglobal_x=0,subglobal_y=0;
|
int sprite,global_x=0,global_y=0,subglobal_x=0,subglobal_y=0;
|
||||||
int block_x=0, block_y=0;
|
int block_x=0, block_y=0;
|
||||||
int last_color=0,last_x=0,last_y=0,block_zoom_x=0,block_zoom_y=0;
|
int last_color=0,last_x=0,last_y=0,block_zoom_x=0,block_zoom_y=0;
|
||||||
@ -2938,9 +2938,9 @@ static void get_sprite_info(running_machine *machine, const UINT32 *spriteram32_
|
|||||||
int total_sprites=0;
|
int total_sprites=0;
|
||||||
|
|
||||||
color=0;
|
color=0;
|
||||||
flipx=flipy=0;
|
flipx=flipy=0;
|
||||||
old_y=old_x=0;
|
old_x=0;
|
||||||
y=x=0;
|
y=x=0;
|
||||||
|
|
||||||
sprite_top=0x1000;
|
sprite_top=0x1000;
|
||||||
for (offs = 0; offs < sprite_top && (total_sprites < 0x400); offs += 4)
|
for (offs = 0; offs < sprite_top && (total_sprites < 0x400); offs += 4)
|
||||||
|
@ -383,7 +383,6 @@ void tetrisp2_draw_sprites(running_machine *machine, bitmap_t *bitmap, bitmap_t
|
|||||||
int tx, ty, sx, sy, flipx, flipy;
|
int tx, ty, sx, sy, flipx, flipy;
|
||||||
int xsize, ysize;
|
int xsize, ysize;
|
||||||
int code, attr, color, size;
|
int code, attr, color, size;
|
||||||
int flipscreen;
|
|
||||||
int pri;
|
int pri;
|
||||||
int xzoom, yzoom;
|
int xzoom, yzoom;
|
||||||
UINT32 primask;
|
UINT32 primask;
|
||||||
@ -393,8 +392,6 @@ void tetrisp2_draw_sprites(running_machine *machine, bitmap_t *bitmap, bitmap_t
|
|||||||
UINT16 *source = sprram_top;
|
UINT16 *source = sprram_top;
|
||||||
UINT16 *finish = sprram_top + (sprram_size - 0x10) / 2;
|
UINT16 *finish = sprram_top + (sprram_size - 0x10) / 2;
|
||||||
|
|
||||||
flipscreen = flip;
|
|
||||||
|
|
||||||
if (reverseorder == 1)
|
if (reverseorder == 1)
|
||||||
{
|
{
|
||||||
source = sprram_top + (sprram_size - 0x10) / 2;
|
source = sprram_top + (sprram_size - 0x10) / 2;
|
||||||
|
@ -608,9 +608,7 @@ VIDEO_UPDATE( tmnt )
|
|||||||
VIDEO_UPDATE( punkshot )
|
VIDEO_UPDATE( punkshot )
|
||||||
{
|
{
|
||||||
tmnt_state *state = (tmnt_state *)screen->machine->driver_data;
|
tmnt_state *state = (tmnt_state *)screen->machine->driver_data;
|
||||||
int bg_colorbase;
|
|
||||||
|
|
||||||
bg_colorbase = k053251_get_palette_index(state->k053251, K053251_CI0);
|
|
||||||
state->sprite_colorbase = k053251_get_palette_index(state->k053251, K053251_CI1);
|
state->sprite_colorbase = k053251_get_palette_index(state->k053251, K053251_CI1);
|
||||||
state->layer_colorbase[0] = k053251_get_palette_index(state->k053251, K053251_CI2);
|
state->layer_colorbase[0] = k053251_get_palette_index(state->k053251, K053251_CI2);
|
||||||
state->layer_colorbase[1] = k053251_get_palette_index(state->k053251, K053251_CI4);
|
state->layer_colorbase[1] = k053251_get_palette_index(state->k053251, K053251_CI4);
|
||||||
|
@ -55,9 +55,8 @@ void vendetta_sprite_callback( running_machine *machine, int *code, int *color,
|
|||||||
VIDEO_UPDATE( vendetta )
|
VIDEO_UPDATE( vendetta )
|
||||||
{
|
{
|
||||||
vendetta_state *state = (vendetta_state *)screen->machine->driver_data;
|
vendetta_state *state = (vendetta_state *)screen->machine->driver_data;
|
||||||
int layer[3], bg_colorbase;
|
int layer[3];
|
||||||
|
|
||||||
bg_colorbase = k053251_get_palette_index(state->k053251, K053251_CI0);
|
|
||||||
state->sprite_colorbase = k053251_get_palette_index(state->k053251, K053251_CI1);
|
state->sprite_colorbase = k053251_get_palette_index(state->k053251, K053251_CI1);
|
||||||
state->layer_colorbase[0] = k053251_get_palette_index(state->k053251, K053251_CI2);
|
state->layer_colorbase[0] = k053251_get_palette_index(state->k053251, K053251_CI2);
|
||||||
state->layer_colorbase[1] = k053251_get_palette_index(state->k053251, K053251_CI3);
|
state->layer_colorbase[1] = k053251_get_palette_index(state->k053251, K053251_CI3);
|
||||||
|
@ -530,7 +530,7 @@ static void wgp_piv_layer_draw( running_machine *machine, bitmap_t *bitmap, cons
|
|||||||
|
|
||||||
/* I have a fairly strong feeling these should be UINT32's, x_index is
|
/* I have a fairly strong feeling these should be UINT32's, x_index is
|
||||||
falling through from max +ve to max -ve quite a lot in this routine */
|
falling through from max +ve to max -ve quite a lot in this routine */
|
||||||
int sx, x_index, x_step, x_max;
|
int sx, x_index, x_step;
|
||||||
|
|
||||||
UINT32 zoomx, zoomy;
|
UINT32 zoomx, zoomy;
|
||||||
UINT16 scanline[512];
|
UINT16 scanline[512];
|
||||||
@ -604,7 +604,6 @@ static void wgp_piv_layer_draw( running_machine *machine, bitmap_t *bitmap, cons
|
|||||||
x_step += (((0x7f - row_zoom) << 8) & 0xffff);
|
x_step += (((0x7f - row_zoom) << 8) & 0xffff);
|
||||||
}
|
}
|
||||||
|
|
||||||
x_max = x_index + screen_width * x_step;
|
|
||||||
src16 = BITMAP_ADDR16(srcbitmap, src_y_index, 0);
|
src16 = BITMAP_ADDR16(srcbitmap, src_y_index, 0);
|
||||||
tsrc = BITMAP_ADDR8(flagsbitmap, src_y_index, 0);
|
tsrc = BITMAP_ADDR8(flagsbitmap, src_y_index, 0);
|
||||||
dst16 = scanline;
|
dst16 = scanline;
|
||||||
|
Loading…
Reference in New Issue
Block a user