summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers')
-rw-r--r--src/mame/drivers/taito_b.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/mame/drivers/taito_b.cpp b/src/mame/drivers/taito_b.cpp
index 9ce94e177cb..93c3fe445f7 100644
--- a/src/mame/drivers/taito_b.cpp
+++ b/src/mame/drivers/taito_b.cpp
@@ -3186,6 +3186,36 @@ ROM_START( hitice ) /* 4 Player version */
ROM_LOAD( "pal16r4b-c59-07.61", 0x600, 0x104, CRC(cf64bd95) SHA1(5acada8bd6da40b5342bdd7ec494ee0e615492f0) )
ROM_END
+ROM_START( hiticerb ) /* 4 Player version */
+ ROM_REGION( 0x80000, "maincpu", 0 ) /* 512k for 68000 code */
+ ROM_LOAD16_BYTE( "c59-10.42", 0x00000, 0x20000, CRC(e4ffad15) SHA1(87da85e1489fe57bd012177a70434152e5475009) )
+ ROM_LOAD16_BYTE( "c59-12.64", 0x00001, 0x20000, CRC(a080d7af) SHA1(9c68b78fbcc42a2f748d1b7f84f138be79f7c0c9) )
+ ROM_LOAD16_BYTE( "c59-09.41", 0x40000, 0x10000, CRC(e243e3b0) SHA1(a7daf96ef70e9a92bb3ee4a151ce674a187c15a2) )
+ ROM_LOAD16_BYTE( "c59-11.63", 0x40001, 0x10000, CRC(4d4dfa52) SHA1(8ecd62dc2a2f35850340469afa54862b46053ce0) )
+
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for Z80 code */
+ ROM_LOAD( "c59-08.50", 0x00000, 0x10000, CRC(d3cbc10b) SHA1(75305e264300e0ebd15ada45a6d222fee75bd8e4) )
+
+ ROM_REGION( 0x100000, "gfx1", 0 )
+ ROM_LOAD16_BYTE( "IC5.bin", 0x00000, 0x20000, CRC(55698bbc) SHA1(ba0e0de12e3e52ef026d37d667060e8ba6925340) )
+ ROM_LOAD16_BYTE( "IC1.bin", 0x40000, 0x20000, CRC(fca01c22) SHA1(94d7d521ea6fdab752939c1f2087b16a2b2922a8) )
+ ROM_LOAD16_BYTE( "IC6.bin", 0x00001, 0x20000, CRC(a7cb863f) SHA1(f749d38c2164bb9833e653bc1253a336c0043daa) )
+ ROM_LOAD16_BYTE( "IC2.bin", 0x40001, 0x20000, CRC(f1c09244) SHA1(68d67db5398c92699022f86fa53a1cbda344c375) )
+ ROM_LOAD16_BYTE( "IC8.bin", 0x80000, 0x20000, CRC(7cd3aa29) SHA1(78279db96b4f913b60a866d4fcbde46e5608fe0d) )
+ ROM_LOAD16_BYTE( "IC4.bin", 0xc0000, 0x20000, CRC(d0f2fd35) SHA1(e705e6d889a01bca6a33efcb36ef13a5f43bcd17) )
+ ROM_LOAD16_BYTE( "IC7.bin", 0x80001, 0x20000, CRC(6b2979c7) SHA1(6154cee3796aea637114a771e4c773013b28b362) )
+ ROM_LOAD16_BYTE( "IC3.bin", 0xc0001, 0x20000, CRC(51621004) SHA1(86980acdba4380f8682ace0e0f0543312304d451) )
+
+ ROM_REGION( 0x80000, "oki", 0 )
+ ROM_LOAD( "IC30.bin", 0x00000, 0x20000, CRC(46ae291d) SHA1(d36ab48cfa393a6a1eae5caa2a397087eb098f7f) )
+
+ ROM_REGION( 0x800, "plds", 0 )
+ ROM_LOAD( "pal20l8b-c59-04.25", 0x000, 0x144, CRC(2ebcf07c) SHA1(b73396fff8cde51e8a429843cd6dc3386f777f3b) )
+ ROM_LOAD( "pal16l8b-c59-05.26", 0x200, 0x104, CRC(37b67c5c) SHA1(a4bf3532774bcd285a6e0e24a9e9a3b28684f724) )
+ ROM_LOAD( "pal20l8b-c59-06.53", 0x400, 0x144, CRC(bf176875) SHA1(d7073ff7bf8f905dc8a6d3cf51543a572fa87f2f) )
+ ROM_LOAD( "pal16r4b-c59-07.61", 0x600, 0x104, CRC(cf64bd95) SHA1(5acada8bd6da40b5342bdd7ec494ee0e615492f0) )
+ROM_END
+
ROM_START( hiticej ) /* 2 Player version */
ROM_REGION( 0x80000, "maincpu", 0 ) /* 512k for 68000 code */
ROM_LOAD16_BYTE( "c59-23.42", 0x00000, 0x20000, CRC(01958fcc) SHA1(adaf9b0a4658d4d8eb8cdd343b40643b4c05d09e) )
@@ -3712,6 +3742,7 @@ GAME( 1990, ashuraj, ashura, ashura, ashuraj, taitob_state, taito_b, ROT27
GAME( 1990, ashurau, ashura, ashura, ashurau, taitob_state, taito_b, ROT270, "Taito America Corporation", "Ashura Blaster (US)", MACHINE_SUPPORTS_SAVE )
GAME( 1990, hitice, 0, hitice, hitice, taitob_state, taito_b, ROT0, "Taito Corporation (Williams license)", "Hit the Ice (US)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1990, hiticerb, hitice, hitice, hitice, taitob_state, taito_b, ROT0, "Taito Corporation (Williams license)", "Hit the Ice (US, with riser board)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
GAME( 1990, hiticej, hitice, hitice, hiticej, taitob_state, taito_b, ROT0, "Taito Corporation (licensed from Midway)", "Hit the Ice (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
GAME( 1991, selfeena, 0, selfeena, selfeena, taitob_state, taito_b, ROT0, "East Technology", "Sel Feena", MACHINE_SUPPORTS_SAVE )
id='n205' href='#n205'>205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229
/***************************************************************************

  video.c

  Functions to emulate the video hardware of the machine.

***************************************************************************/

#include "emu.h"
#include "includes/vulgus.h"


/***************************************************************************

  Convert the color PROMs into a more useable format.

***************************************************************************/

PALETTE_INIT( vulgus )
{
	int i;

	machine->colortable = colortable_alloc(machine, 256);

	for (i = 0;i < 256;i++)
	{
		int bit0,bit1,bit2,bit3,r,g,b;

		bit0 = (color_prom[0] >> 0) & 0x01;
		bit1 = (color_prom[0] >> 1) & 0x01;
		bit2 = (color_prom[0] >> 2) & 0x01;
		bit3 = (color_prom[0] >> 3) & 0x01;
		r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
		bit0 = (color_prom[256] >> 0) & 0x01;
		bit1 = (color_prom[256] >> 1) & 0x01;
		bit2 = (color_prom[256] >> 2) & 0x01;
		bit3 = (color_prom[256] >> 3) & 0x01;
		g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
		bit0 = (color_prom[2*256] >> 0) & 0x01;
		bit1 = (color_prom[2*256] >> 1) & 0x01;
		bit2 = (color_prom[2*256] >> 2) & 0x01;
		bit3 = (color_prom[2*256] >> 3) & 0x01;
		b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;

		colortable_palette_set_color(machine->colortable,i,MAKE_RGB(r,g,b));
		color_prom++;
	}

	color_prom += 2*256;
	/* color_prom now points to the beginning of the lookup table */


	/* characters use colors 32-47 (?) */
	for (i = 0;i < machine->gfx[0]->total_colors * machine->gfx[0]->color_granularity;i++)
		colortable_entry_set_value(machine->colortable, machine->gfx[0]->color_base + i, 32 + *color_prom++);

	/* sprites use colors 16-31 */
	for (i = 0;i < machine->gfx[2]->total_colors * machine->gfx[2]->color_granularity;i++)
		colortable_entry_set_value(machine->colortable, machine->gfx[2]->color_base + i, 16 + *color_prom++);

	/* background tiles use colors 0-15, 64-79, 128-143, 192-207 in four banks */
	for (i = 0;i < machine->gfx[1]->total_colors * machine->gfx[1]->color_granularity / 4;i++)
	{
		colortable_entry_set_value(machine->colortable, machine->gfx[1]->color_base + 0*32*8 + i, *color_prom);
		colortable_entry_set_value(machine->colortable, machine->gfx[1]->color_base + 1*32*8 + i, *color_prom + 64);
		colortable_entry_set_value(machine->colortable, machine->gfx[1]->color_base + 2*32*8 + i, *color_prom + 128);
		colortable_entry_set_value(machine->colortable, machine->gfx[1]->color_base + 3*32*8 + i, *color_prom + 192);
		color_prom++;
	}
}


/***************************************************************************

  Callbacks for the TileMap code

***************************************************************************/

static TILE_GET_INFO( get_fg_tile_info )
{
	vulgus_state *state = machine->driver_data<vulgus_state>();
	int code, color;

	code = state->fgvideoram[tile_index];
	color = state->fgvideoram[tile_index + 0x400];
	SET_TILE_INFO(
			0,
			code + ((color & 0x80) << 1),
			color & 0x3f,
			0);
	tileinfo->group = color & 0x3f;
}

static TILE_GET_INFO( get_bg_tile_info )
{
	vulgus_state *state = machine->driver_data<vulgus_state>();
	int code, color;

	code = state->bgvideoram[tile_index];
	color = state->bgvideoram[tile_index + 0x400];
	SET_TILE_INFO(
			1,
			code + ((color & 0x80) << 1),
			(color & 0x1f) + (0x20 * state->palette_bank),
			TILE_FLIPYX((color & 0x60) >> 5));
}


/***************************************************************************

  Start the video hardware emulation.

***************************************************************************/

VIDEO_START( vulgus )
{
	vulgus_state *state = machine->driver_data<vulgus_state>();
	state->fg_tilemap = tilemap_create(machine, get_fg_tile_info,tilemap_scan_rows, 8, 8,32,32);
	state->bg_tilemap = tilemap_create(machine, get_bg_tile_info,tilemap_scan_cols,16,16,32,32);

	colortable_configure_tilemap_groups(machine->colortable, state->fg_tilemap, machine->gfx[0], 47);
}


/***************************************************************************

  Memory handlers

***************************************************************************/

WRITE8_HANDLER( vulgus_fgvideoram_w )
{
	vulgus_state *state = space->machine->driver_data<vulgus_state>();
	state->fgvideoram[offset] = data;
	tilemap_mark_tile_dirty(state->fg_tilemap,offset & 0x3ff);
}

WRITE8_HANDLER( vulgus_bgvideoram_w )
{
	vulgus_state *state = space->machine->driver_data<vulgus_state>();
	state->bgvideoram[offset] = data;
	tilemap_mark_tile_dirty(state->bg_tilemap,offset & 0x3ff);
}


WRITE8_HANDLER( vulgus_c804_w )
{
	/* bits 0 and 1 are coin counters */
	coin_counter_w(space->machine, 0, data & 0x01);
	coin_counter_w(space->machine, 1, data & 0x02);

	/* bit 7 flips screen */
	flip_screen_set(space->machine, data & 0x80);
}


WRITE8_HANDLER( vulgus_palette_bank_w )
{
	vulgus_state *state = space->machine->driver_data<vulgus_state>();
	if (state->palette_bank != (data & 3))
	{
		state->palette_bank = data & 3;
		tilemap_mark_all_tiles_dirty(state->bg_tilemap);
	}
}


/***************************************************************************

  Display refresh

***************************************************************************/

static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect)
{
	UINT8 *spriteram = machine->generic.spriteram.u8;
	int offs;


	for (offs = machine->generic.spriteram_size - 4;offs >= 0;offs -= 4)
	{
		int code,i,col,sx,sy,dir;


		code = spriteram[offs];
		col = spriteram[offs + 1] & 0x0f;
		sx = spriteram[offs + 3];
		sy = spriteram[offs + 2];
		dir = 1;
		if (flip_screen_get(machine))
		{
			sx = 240 - sx;
			sy = 240 - sy;
			dir = -1;
		}

		i = (spriteram[offs + 1] & 0xc0) >> 6;
		if (i == 2) i = 3;

		do
		{
			drawgfx_transpen(bitmap,cliprect,machine->gfx[2],
					code + i,
					col,
					flip_screen_get(machine),flip_screen_get(machine),
					sx, sy + 16 * i * dir,15);

			/* draw again with wraparound */
			drawgfx_transpen(bitmap,cliprect,machine->gfx[2],
					code + i,
					col,
					flip_screen_get(machine),flip_screen_get(machine),
					sx, sy + 16 * i * dir -  dir * 256,15);
			i--;
		} while (i >= 0);
	}
}

SCREEN_UPDATE( vulgus )
{
	vulgus_state *state = screen->machine->driver_data<vulgus_state>();
	tilemap_set_scrollx(state->bg_tilemap, 0, state->scroll_low[1] + 256 * state->scroll_high[1]);
	tilemap_set_scrolly(state->bg_tilemap, 0, state->scroll_low[0] + 256 * state->scroll_high[0]);

	tilemap_draw(bitmap,cliprect,state->bg_tilemap,0,0);
	draw_sprites(screen->machine, bitmap,cliprect);
	tilemap_draw(bitmap,cliprect,state->fg_tilemap,0,0);
	return 0;
}