Skip to content

Commit

Permalink
Cleanups for 0.124. Marked Mermaid as working per checkin comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronsgiles committed Mar 24, 2008
1 parent 4442fcc commit 9476c50
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 50 deletions.
38 changes: 19 additions & 19 deletions src/emu/drawgfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,7 @@ INLINE void common_drawgfxzoom( bitmap_t *dest_bmp,const gfx_element *gfx,
{
if (((1 << pri[x]) & pri_mask) == 0)
dest[x] = pal[(source[x_index>>17] >> ((x_index & 0x10000) >> 14)) & 0x0f];
// dest[x] = colorbase + ((source[x_index>>17] >> ((x_index & 0x10000) >> 14)) & 0x0f);
// dest[x] = colorbase + ((source[x_index>>17] >> ((x_index & 0x10000) >> 14)) & 0x0f);
pri[x] = 31;
x_index += dx;
}
Expand All @@ -1286,7 +1286,7 @@ INLINE void common_drawgfxzoom( bitmap_t *dest_bmp,const gfx_element *gfx,
{
if (((1 << pri[x]) & pri_mask) == 0)
dest[x] = pal[source[x_index>>16]];
// dest[x] = colorbase + source[x_index>>16];
// dest[x] = colorbase + source[x_index>>16];
pri[x] = 31;
x_index += dx;
}
Expand All @@ -1306,7 +1306,7 @@ INLINE void common_drawgfxzoom( bitmap_t *dest_bmp,const gfx_element *gfx,
for (x = sx; x < ex; x++)
{
dest[x] = pal[(source[x_index>>17] >> ((x_index & 0x10000) >> 14)) & 0x0f];
// dest[x] = colorbase + ((source[x_index>>17] >> ((x_index & 0x10000) >> 14)) & 0x0f);
// dest[x] = colorbase + ((source[x_index>>17] >> ((x_index & 0x10000) >> 14)) & 0x0f);
x_index += dx;
}

Expand All @@ -1322,7 +1322,7 @@ INLINE void common_drawgfxzoom( bitmap_t *dest_bmp,const gfx_element *gfx,
for (x = sx; x < ex; x++)
{
dest[x] = pal[source[x_index>>16]];
// dest[x] = colorbase + source[x_index>>16];
// dest[x] = colorbase + source[x_index>>16];
x_index += dx;
}

Expand Down Expand Up @@ -1351,7 +1351,7 @@ INLINE void common_drawgfxzoom( bitmap_t *dest_bmp,const gfx_element *gfx,
{
if (((1 << pri[x]) & pri_mask) == 0)
dest[x] = pal[c];
// dest[x] = colorbase + c;
// dest[x] = colorbase + c;
pri[x] = 31;
}
x_index += dx;
Expand All @@ -1374,7 +1374,7 @@ INLINE void common_drawgfxzoom( bitmap_t *dest_bmp,const gfx_element *gfx,
{
if (((1 << pri[x]) & pri_mask) == 0)
dest[x] = pal[c];
// dest[x] = colorbase + c;
// dest[x] = colorbase + c;
pri[x] = 31;
}
x_index += dx;
Expand All @@ -1396,7 +1396,7 @@ INLINE void common_drawgfxzoom( bitmap_t *dest_bmp,const gfx_element *gfx,
{
int c = (source[x_index>>17] >> ((x_index & 0x10000) >> 14)) & 0x0f;
if( c != transparent_color ) dest[x] = pal[c];
// if (c != transparent_color) dest[x] = colorbase + c;
// if (c != transparent_color) dest[x] = colorbase + c;
x_index += dx;
}

Expand All @@ -1413,7 +1413,7 @@ INLINE void common_drawgfxzoom( bitmap_t *dest_bmp,const gfx_element *gfx,
{
int c = source[x_index>>16];
if( c != transparent_color ) dest[x] = pal[c];
// if (c != transparent_color) dest[x] = colorbase + c;
// if (c != transparent_color) dest[x] = colorbase + c;
x_index += dx;
}

Expand Down Expand Up @@ -1483,7 +1483,7 @@ INLINE void common_drawgfxzoom( bitmap_t *dest_bmp,const gfx_element *gfx,
{
if (((1 << pri[x]) & pri_mask) == 0)
dest[x] = pal[c];
// dest[x] = colorbase + c;
// dest[x] = colorbase + c;
pri[x] = 31;
}
x_index += dx;
Expand All @@ -1503,7 +1503,7 @@ INLINE void common_drawgfxzoom( bitmap_t *dest_bmp,const gfx_element *gfx,
int c = source[x_index>>16];
if (((1 << c) & transparent_color) == 0)
dest[x] = pal[c];
// dest[x] = colorbase + c;
// dest[x] = colorbase + c;
x_index += dx;
}

Expand Down Expand Up @@ -1541,10 +1541,10 @@ INLINE void common_drawgfxzoom( bitmap_t *dest_bmp,const gfx_element *gfx,
{
if (ah & 0x80)
dest[x] = palette_shadow_table[pal[c]];
// dest[x] = palette_shadow_table[colorbase + c];
// dest[x] = palette_shadow_table[colorbase + c];
else
dest[x] = pal[c];
// dest[x] = colorbase + c;
// dest[x] = colorbase + c;
}
pri[x] = (ah & 0x7f) | 31;
break;
Expand Down Expand Up @@ -1578,7 +1578,7 @@ INLINE void common_drawgfxzoom( bitmap_t *dest_bmp,const gfx_element *gfx,
{
case DRAWMODE_SOURCE:
dest[x] = pal[c];
// dest[x] = colorbase + c;
// dest[x] = colorbase + c;
break;
case DRAWMODE_SHADOW:
dest[x] = palette_shadow_table[dest[x]];
Expand Down Expand Up @@ -1611,7 +1611,7 @@ INLINE void common_drawgfxzoom( bitmap_t *dest_bmp,const gfx_element *gfx,
{
if (((1 << pri[x]) & pri_mask) == 0)
dest[x] = alpha_blend16(dest[x], pal[c]);
// dest[x] = alpha_blend16(dest[x], colorbase + c);
// dest[x] = alpha_blend16(dest[x], colorbase + c);
pri[x] = 31;
}
x_index += dx;
Expand All @@ -1630,7 +1630,7 @@ INLINE void common_drawgfxzoom( bitmap_t *dest_bmp,const gfx_element *gfx,
{
int c = source[x_index>>16];
if( c != transparent_color ) dest[x] = alpha_blend16(dest[x], pal[c]);
// if (c != transparent_color) dest[x] = alpha_blend16(dest[x], colorbase + c);
// if (c != transparent_color) dest[x] = alpha_blend16(dest[x], colorbase + c);
x_index += dx;
}

Expand Down Expand Up @@ -1658,10 +1658,10 @@ INLINE void common_drawgfxzoom( bitmap_t *dest_bmp,const gfx_element *gfx,
{
if (gfx_alpharange_table[c] == 0xff)
dest[x] = pal[c];
// dest[x] = colorbase + c;
// dest[x] = colorbase + c;
else
dest[x] = alpha_blend_r16(dest[x], pal[c], gfx_alpharange_table[c]);
// dest[x] = alpha_blend_r16(dest[x], colorbase + c, gfx_alpharange_table[c]);
// dest[x] = alpha_blend_r16(dest[x], colorbase + c, gfx_alpharange_table[c]);
}
pri[x] = 31;
}
Expand All @@ -1684,10 +1684,10 @@ INLINE void common_drawgfxzoom( bitmap_t *dest_bmp,const gfx_element *gfx,
{
if (gfx_alpharange_table[c] == 0xff)
dest[x] = pal[c];
// dest[x] = colorbase + c;
// dest[x] = colorbase + c;
else
dest[x] = alpha_blend_r16(dest[x], pal[c], gfx_alpharange_table[c]);
// dest[x] = alpha_blend_r16(dest[x], colorbase + c, gfx_alpharange_table[c]);
// dest[x] = alpha_blend_r16(dest[x], colorbase + c, gfx_alpharange_table[c]);
}
x_index += dx;
}
Expand Down
2 changes: 1 addition & 1 deletion src/emu/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,7 @@ static void memory_init_cpudata(const machine_config *config)
space->read.handlers[entrynum].handler.generic = get_static_handler(space->dbits, 0, spacenum, entrynum);
space->write.handlers[entrynum].handler.generic = get_static_handler(space->dbits, 1, spacenum, entrynum);
}

/* make sure we fix up the mask for the unmap handler */
space->read.handlers[STATIC_UNMAP].bytemask = ~0;
space->write.handlers[STATIC_UNMAP].bytemask = ~0;
Expand Down
2 changes: 1 addition & 1 deletion src/emu/sound/msm5232.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ static void MSM5232_update_one(void *param, stream_sample_t **inputs, stream_sam
cnt--;
}
}

bufnoise[i] = (chip->noise_rng & (1<<16)) ? 32767 : 0;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/emu/validity.c
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ static int validate_inputs(int drivnum, const machine_config *config, input_port
for (inp = *memory; inp->type != IPT_END; inp++)
{
int strindex = 0;

/* check for duplicate tags */
if (inp->type == IPT_PORT)
{
Expand Down
6 changes: 3 additions & 3 deletions src/emu/video/cdp1869.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

/*
TODO:
TODO:
- convert CDP1869 into a device with video/sound
- add predisplay/display timers
- convert CDP1869 into a device with video/sound
- add predisplay/display timers
*/

Expand Down
8 changes: 4 additions & 4 deletions src/lib/util/xmlfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,9 @@ const char *xml_normalize_string(const char *string)
***************************************************************************/

/*-------------------------------------------------
expat_malloc/expat_realloc/expat_free -
wrappers for memory allocation functions so
that they pass through out memory tracking
expat_malloc/expat_realloc/expat_free -
wrappers for memory allocation functions so
that they pass through out memory tracking
systems
-------------------------------------------------*/

Expand All @@ -563,7 +563,7 @@ static void expat_free(void *ptr)
static int expat_setup_parser(xml_parse_info *parse_info, xml_parse_options *opts)
{
XML_Memory_Handling_Suite memcallbacks;

/* setup parse_info structure */
memset(parse_info, 0, sizeof(*parse_info));
if (opts != NULL)
Expand Down
4 changes: 2 additions & 2 deletions src/mame/drivers/cidelsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
TODO:
- auto_malloc cidelsa_pcb
- move set_cpu_mode timer call to MDRV
- auto_malloc cidelsa_pcb
- move set_cpu_mode timer call to MDRV
- fix COP420 core to get sound in Draco
*/
Expand Down
8 changes: 4 additions & 4 deletions src/mame/drivers/equites.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,10 +517,10 @@ if (data & ~ay_port_b & 0x04) hihat++;

// FIXME I'm just enabling the MSM5232 Noise Output for now. Proper emulation
// of the analog circuitry should be done instead.
// if (data & ~ay_port_b & 0x08) cymbal hit trigger
// if (data & ~ay_port_b & 0x04) hi-hat hit trigger
// data & 3 cymbal volume
// data & 0x40 hi-hat enable
// if (data & ~ay_port_b & 0x08) cymbal hit trigger
// if (data & ~ay_port_b & 0x04) hi-hat hit trigger
// data & 3 cymbal volume
// data & 0x40 hi-hat enable

if (data & ~ay_port_b & 0x08)
cymvol = 1.0f;
Expand Down
4 changes: 2 additions & 2 deletions src/mame/drivers/mermaid.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,6 @@ ROM_END

/* Game Drivers */

GAME( 1982, mermaid, 0, mermaid, mermaid, 0, ROT0, "[Sanritsu] Rock-Ola", "Mermaid", GAME_NOT_WORKING )
GAME( 1982, yachtmn, mermaid, mermaid, mermaid, 0, ROT0, "[Sanritsu] Esco", "Yachtsman", GAME_NOT_WORKING )
GAME( 1982, mermaid, 0, mermaid, mermaid, 0, ROT0, "[Sanritsu] Rock-Ola", "Mermaid", 0 )
GAME( 1982, yachtmn, mermaid, mermaid, mermaid, 0, ROT0, "[Sanritsu] Esco", "Yachtsman", 0 )
GAME( 1982, rougien, 0, mermaid, mermaid, 0, ROT0, "Sanritsu", "Rougien", 0 )
4 changes: 2 additions & 2 deletions src/mame/drivers/orbit.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ static const gfx_layout orbit_lower_sprite_layout =

static const gfx_layout orbit_tile_layout =
{
8, 8,
8, 8,
RGN_FRAC(1,1),
1,
{ 0 },
Expand Down Expand Up @@ -294,7 +294,7 @@ static MACHINE_DRIVER_START( orbit )
MDRV_CPU_ADD(M6800, MASTER_CLOCK / 16)
MDRV_CPU_PROGRAM_MAP(orbit_map, 0)
MDRV_CPU_VBLANK_INT("main", orbit_interrupt)

MDRV_TIMER_ADD_SCANLINE("32V", nmi_32v, "main", 0, 32)

MDRV_MACHINE_RESET(orbit)
Expand Down
10 changes: 5 additions & 5 deletions src/mame/video/cps1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,7 @@ static void cps1_render_sprites(running_machine *machine, bitmap_t *bitmap, cons
sy = (y+nys*16) & 0x1ff;

DRAWSPRITE(
// code+(nx-1)-nxs+0x10*(ny-1-nys),
// code+(nx-1)-nxs+0x10*(ny-1-nys),
(code & ~0xf) + ((code + (nx-1) - nxs) & 0xf) + 0x10*(ny-1-nys),
(col&0x1f) + palette_basecolor[0],
1,1,
Expand All @@ -1402,7 +1402,7 @@ static void cps1_render_sprites(running_machine *machine, bitmap_t *bitmap, cons
sy = (y+nys*16) & 0x1ff;

DRAWSPRITE(
// code+nxs+0x10*(ny-1-nys),
// code+nxs+0x10*(ny-1-nys),
(code & ~0xf) + ((code + nxs) & 0xf) + 0x10*(ny-1-nys),
(col&0x1f) + palette_basecolor[0],
0,1,
Expand All @@ -1423,7 +1423,7 @@ static void cps1_render_sprites(running_machine *machine, bitmap_t *bitmap, cons
sy = (y+nys*16) & 0x1ff;

DRAWSPRITE(
// code+(nx-1)-nxs+0x10*nys,
// code+(nx-1)-nxs+0x10*nys,
(code & ~0xf) + ((code + (nx-1) - nxs) & 0xf) + 0x10*nys,
(col&0x1f) + palette_basecolor[0],
1,0,
Expand All @@ -1441,8 +1441,8 @@ static void cps1_render_sprites(running_machine *machine, bitmap_t *bitmap, cons
sy = (y+nys*16) & 0x1ff;

DRAWSPRITE(
// code+nxs+0x10*nys,
(code & ~0xf) + ((code + nxs) & 0xf) + 0x10*nys, // fix 00406: qadj: When playing as the ninja, there is one broekn frame in his animation loop when walking.
// code+nxs+0x10*nys,
(code & ~0xf) + ((code + nxs) & 0xf) + 0x10*nys, // fix 00406: qadj: When playing as the ninja, there is one broekn frame in his animation loop when walking.
(col&0x1f) + palette_basecolor[0],
0,0,
sx,sy);
Expand Down
12 changes: 6 additions & 6 deletions src/mame/video/mermaid.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ READ8_HANDLER( mermaid_collision_r )
Bit 5
Bit 6 - Sprite (Boat) - Sprite
Bit 7
*/
*/

int collision = 0xff;

Expand Down Expand Up @@ -245,7 +245,7 @@ VIDEO_EOF( mermaid )
int attr = spriteram[offs + 2];
int bank = (attr & 0x30) >> 4;
int code = (spriteram[offs] & 0x3f) | (bank << 6);
// int color = attr & 0x0f;
// int color = attr & 0x0f;
int flipx = spriteram[offs] & 0x40;
int flipy = spriteram[offs] & 0x80;
int sx = spriteram[offs + 3] + 1;
Expand Down Expand Up @@ -317,7 +317,7 @@ VIDEO_EOF( mermaid )
int attr2 = spriteram[offs2 + 2];
int bank2 = (attr2 & 0x30) >> 4;
int code2 = (spriteram[offs2] & 0x3f) | (bank2 << 6);
// int color2 = attr2 & 0x0f;
// int color2 = attr2 & 0x0f;
int flipx2 = spriteram[offs2] & 0x40;
int flipy2 = spriteram[offs2] & 0x80;
int sx2 = spriteram[offs2 + 3] + 1;
Expand Down Expand Up @@ -355,7 +355,7 @@ VIDEO_EOF( mermaid )
int attr = spriteram[offs + 2];
int bank = (attr & 0x30) >> 4;
int code = (spriteram[offs] & 0x3f) | (bank << 6);
// int color = attr & 0x0f;
// int color = attr & 0x0f;
int flipx = spriteram[offs] & 0x40;
int flipy = spriteram[offs] & 0x80;
int sx = spriteram[offs + 3] + 1;
Expand Down Expand Up @@ -392,7 +392,7 @@ VIDEO_EOF( mermaid )
if (rect.max_y > visarea->max_y)
rect.max_y = visarea->max_y;

// check collision sprite "sail" - sprite
// check collision sprite "sail" - sprite

fillbitmap(helper,0,&rect);
fillbitmap(helper2,0,&rect);
Expand All @@ -403,7 +403,7 @@ VIDEO_EOF( mermaid )
int attr2 = spriteram[offs2 + 2];
int bank2 = (attr2 & 0x30) >> 4;
int code2 = (spriteram[offs2] & 0x3f) | (bank2 << 6);
// int color2 = attr2 & 0x0f;
// int color2 = attr2 & 0x0f;
int flipx2 = spriteram[offs2] & 0x40;
int flipy2 = spriteram[offs2] & 0x80;
int sx2 = spriteram[offs2 + 3] + 1;
Expand Down

0 comments on commit 9476c50

Please sign in to comment.