summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Zsolt Vasvari <zsoltvas@mamedev.org>2008-02-01 01:05:23 +0000
committer Zsolt Vasvari <zsoltvas@mamedev.org>2008-02-01 01:05:23 +0000
commit75e7fdd1af9a13dc31f8700f1cc6cf7a680ad030 (patch)
treea1e799c7f04029b648735ae4a954013cbc6f9b51
parente7a2e72273537049e5eda166d087a07f16d5aafd (diff)
- Circus Charlie, Champion Base Ball and Fire Battle use the colortable object to get rid of TRANSPARENT_COLOR
- resnet usage in Circus Charlie and Champion Base Ball. Finally a pure white in circusc, after all these years
-rw-r--r--src/mame/drivers/circusc.c29
-rw-r--r--src/mame/drivers/clshroad.c3
-rw-r--r--src/mame/video/champbas.c64
-rw-r--r--src/mame/video/circusc.c102
-rw-r--r--src/mame/video/clshroad.c62
5 files changed, 142 insertions, 118 deletions
diff --git a/src/mame/drivers/circusc.c b/src/mame/drivers/circusc.c
index 51c38e1a3e5..b1ef01f1942 100644
--- a/src/mame/drivers/circusc.c
+++ b/src/mame/drivers/circusc.c
@@ -321,8 +321,7 @@ static MACHINE_DRIVER_START( circusc )
MDRV_SCREEN_SIZE(32*8, 32*8)
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MDRV_GFXDECODE(circusc)
- MDRV_PALETTE_LENGTH(32)
- MDRV_COLORTABLE_LENGTH(16*16+16*16)
+ MDRV_PALETTE_LENGTH(16*16+16*16)
MDRV_PALETTE_INIT(circusc)
MDRV_VIDEO_START(circusc)
@@ -383,8 +382,8 @@ ROM_START( circusc )
ROM_REGION( 0x0220, REGION_PROMS, 0 )
ROM_LOAD( "380_j18.2a", 0x0000, 0x020, CRC(10dd4eaa) SHA1(599acd25f36445221c553510a5de23ddba5ecc15) ) /* palette */
- ROM_LOAD( "380_j16.10c", 0x0020, 0x100, CRC(c244f2aa) SHA1(86df21c8e0b1ed51a0a4bd33dbb33f6efdea7d39) ) /* character lookup table */
- ROM_LOAD( "380_j17.7b", 0x0120, 0x100, CRC(13989357) SHA1(0d61d468f6d3e1570fd18d236ec8cab92db4ed5c) ) /* sprite lookup table */
+ ROM_LOAD( "380_j17.7b", 0x0020, 0x100, CRC(13989357) SHA1(0d61d468f6d3e1570fd18d236ec8cab92db4ed5c) ) /* character lookup table */
+ ROM_LOAD( "380_j16.10c", 0x0120, 0x100, CRC(c244f2aa) SHA1(86df21c8e0b1ed51a0a4bd33dbb33f6efdea7d39) ) /* sprite lookup table */
ROM_END
ROM_START( circusc2 )
@@ -413,8 +412,8 @@ ROM_START( circusc2 )
ROM_REGION( 0x0220, REGION_PROMS, 0 )
ROM_LOAD( "380_j18.2a", 0x0000, 0x020, CRC(10dd4eaa) SHA1(599acd25f36445221c553510a5de23ddba5ecc15) ) /* palette */
- ROM_LOAD( "380_j16.10c", 0x0020, 0x100, CRC(c244f2aa) SHA1(86df21c8e0b1ed51a0a4bd33dbb33f6efdea7d39) ) /* character lookup table */
- ROM_LOAD( "380_j17.7b", 0x0120, 0x100, CRC(13989357) SHA1(0d61d468f6d3e1570fd18d236ec8cab92db4ed5c) ) /* sprite lookup table */
+ ROM_LOAD( "380_j17.7b", 0x0020, 0x100, CRC(13989357) SHA1(0d61d468f6d3e1570fd18d236ec8cab92db4ed5c) ) /* character lookup table */
+ ROM_LOAD( "380_j16.10c", 0x0120, 0x100, CRC(c244f2aa) SHA1(86df21c8e0b1ed51a0a4bd33dbb33f6efdea7d39) ) /* sprite lookup table */
ROM_END
ROM_START( circusc3 )
@@ -443,8 +442,8 @@ ROM_START( circusc3 )
ROM_REGION( 0x0220, REGION_PROMS, 0 )
ROM_LOAD( "380_j18.2a", 0x0000, 0x020, CRC(10dd4eaa) SHA1(599acd25f36445221c553510a5de23ddba5ecc15) ) /* palette */
- ROM_LOAD( "380_j16.10c", 0x0020, 0x100, CRC(c244f2aa) SHA1(86df21c8e0b1ed51a0a4bd33dbb33f6efdea7d39) ) /* character lookup table */
- ROM_LOAD( "380_j17.7b", 0x0120, 0x100, CRC(13989357) SHA1(0d61d468f6d3e1570fd18d236ec8cab92db4ed5c) ) /* sprite lookup table */
+ ROM_LOAD( "380_j17.7b", 0x0020, 0x100, CRC(13989357) SHA1(0d61d468f6d3e1570fd18d236ec8cab92db4ed5c) ) /* character lookup table */
+ ROM_LOAD( "380_j16.10c", 0x0120, 0x100, CRC(c244f2aa) SHA1(86df21c8e0b1ed51a0a4bd33dbb33f6efdea7d39) ) /* sprite lookup table */
ROM_END
ROM_START( circuscc ) /* Version U */
@@ -473,8 +472,8 @@ ROM_START( circuscc ) /* Version U */
ROM_REGION( 0x0220, REGION_PROMS, 0 )
ROM_LOAD( "380_j18.2a", 0x0000, 0x020, CRC(10dd4eaa) SHA1(599acd25f36445221c553510a5de23ddba5ecc15) ) /* palette */
- ROM_LOAD( "380_j16.10c", 0x0020, 0x100, CRC(c244f2aa) SHA1(86df21c8e0b1ed51a0a4bd33dbb33f6efdea7d39) ) /* character lookup table */
- ROM_LOAD( "380_j17.7b", 0x0120, 0x100, CRC(13989357) SHA1(0d61d468f6d3e1570fd18d236ec8cab92db4ed5c) ) /* sprite lookup table */
+ ROM_LOAD( "380_j17.7b", 0x0020, 0x100, CRC(13989357) SHA1(0d61d468f6d3e1570fd18d236ec8cab92db4ed5c) ) /* character lookup table */
+ ROM_LOAD( "380_j16.10c", 0x0120, 0x100, CRC(c244f2aa) SHA1(86df21c8e0b1ed51a0a4bd33dbb33f6efdea7d39) ) /* sprite lookup table */
ROM_END
ROM_START( circusce ) /* Version P */
@@ -503,8 +502,8 @@ ROM_START( circusce ) /* Version P */
ROM_REGION( 0x0220, REGION_PROMS, 0 )
ROM_LOAD( "380_j18.2a", 0x0000, 0x020, CRC(10dd4eaa) SHA1(599acd25f36445221c553510a5de23ddba5ecc15) ) /* palette */
- ROM_LOAD( "380_j16.10c", 0x0020, 0x100, CRC(c244f2aa) SHA1(86df21c8e0b1ed51a0a4bd33dbb33f6efdea7d39) ) /* character lookup table */
- ROM_LOAD( "380_j17.7b", 0x0120, 0x100, CRC(13989357) SHA1(0d61d468f6d3e1570fd18d236ec8cab92db4ed5c) ) /* sprite lookup table */
+ ROM_LOAD( "380_j17.7b", 0x0020, 0x100, CRC(13989357) SHA1(0d61d468f6d3e1570fd18d236ec8cab92db4ed5c) ) /* character lookup table */
+ ROM_LOAD( "380_j16.10c", 0x0120, 0x100, CRC(c244f2aa) SHA1(86df21c8e0b1ed51a0a4bd33dbb33f6efdea7d39) ) /* sprite lookup table */
ROM_END
@@ -514,8 +513,8 @@ static DRIVER_INIT( circusc )
}
-GAME( 1984, circusc, 0, circusc, circusc, circusc, ROT90, "Konami", "Circus Charlie (Selectable level set 1)", GAME_SUPPORTS_SAVE )
-GAME( 1984, circusc2, circusc, circusc, circusc, circusc, ROT90, "Konami", "Circus Charlie (Selectable level set 2)", GAME_SUPPORTS_SAVE )
-GAME( 1984, circusc3, circusc, circusc, circusc, circusc, ROT90, "Konami", "Circus Charlie (No level select)", GAME_SUPPORTS_SAVE )
+GAME( 1984, circusc, 0, circusc, circusc, circusc, ROT90, "Konami", "Circus Charlie (level select, set 1)", GAME_SUPPORTS_SAVE )
+GAME( 1984, circusc2, circusc, circusc, circusc, circusc, ROT90, "Konami", "Circus Charlie (level select, set 2)", GAME_SUPPORTS_SAVE )
+GAME( 1984, circusc3, circusc, circusc, circusc, circusc, ROT90, "Konami", "Circus Charlie (no level select)", GAME_SUPPORTS_SAVE )
GAME( 1984, circuscc, circusc, circusc, circusc, circusc, ROT90, "Konami (Centuri license)", "Circus Charlie (Centuri)", GAME_SUPPORTS_SAVE )
GAME( 1984, circusce, circusc, circusc, circusc, circusc, ROT90, "Konami (Centuri license)", "Circus Charlie (Centuri, earlier)", GAME_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/clshroad.c b/src/mame/drivers/clshroad.c
index a3e947f3bb8..bd0847087e6 100644
--- a/src/mame/drivers/clshroad.c
+++ b/src/mame/drivers/clshroad.c
@@ -324,8 +324,7 @@ static MACHINE_DRIVER_START( firebatl )
MDRV_SCREEN_SIZE(0x120, 0x100)
MDRV_SCREEN_VISIBLE_AREA(0, 0x120-1, 0x0+16, 0x100-16-1)
MDRV_GFXDECODE(firebatl)
- MDRV_PALETTE_LENGTH(512)
- MDRV_COLORTABLE_LENGTH(512+64*4)
+ MDRV_PALETTE_LENGTH(512+64*4)
MDRV_PALETTE_INIT(firebatl)
MDRV_VIDEO_START(firebatl)
diff --git a/src/mame/video/champbas.c b/src/mame/video/champbas.c
index c03256409e9..a17c767edef 100644
--- a/src/mame/video/champbas.c
+++ b/src/mame/video/champbas.c
@@ -7,12 +7,12 @@
***************************************************************************/
#include "driver.h"
+#include "video/resnet.h"
static UINT8 gfxbank;
static UINT8 palette_bank;
static tilemap *bg_tilemap;
-static UINT8 *pen_mask;
/***************************************************************************
@@ -31,42 +31,57 @@ static UINT8 *pen_mask;
bit 0 -- 1 kohm resistor -- RED
***************************************************************************/
+
PALETTE_INIT( champbas )
{
+ static const int resistances_rg[3] = { 1000, 470, 220 };
+ static const int resistances_b [2] = { 470, 220 };
+ double rweights[3], gweights[3], bweights[2];
int i;
- pen_mask = auto_malloc(128 * sizeof(UINT8));
- memset(pen_mask, 0, 128 * sizeof(UINT8));
+ /* compute the color output resistor weights */
+ compute_resistor_weights(0, 255, -1.0,
+ 3, &resistances_rg[0], rweights, 0, 0,
+ 3, &resistances_rg[0], gweights, 0, 0,
+ 2, &resistances_b[0], bweights, 0, 0);
- for (i = 0; i < machine->drv->total_colors; i++)
- {
- int bit0, bit1, bit2, r, g, b;
+ /* allocate the colortable */
+ machine->colortable = colortable_alloc(machine, 32);
- UINT8 pen = ((i & 0x100) >> 4) | (color_prom[0x20 + (i & 0xff)] & 0x0f);
+ /* create a lookup table for the palette */
+ for (i = 0; i < 0x20; i++)
+ {
+ int bit0, bit1, bit2;
+ int r, g, b;
/* red component */
- bit0 = (color_prom[pen] >> 0) & 0x01;
- bit1 = (color_prom[pen] >> 1) & 0x01;
- bit2 = (color_prom[pen] >> 2) & 0x01;
- r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+ bit0 = (color_prom[i] >> 0) & 0x01;
+ bit1 = (color_prom[i] >> 1) & 0x01;
+ bit2 = (color_prom[i] >> 2) & 0x01;
+ r = combine_3_weights(rweights, bit0, bit1, bit2);
/* green component */
- bit0 = (color_prom[pen] >> 3) & 0x01;
- bit1 = (color_prom[pen] >> 4) & 0x01;
- bit2 = (color_prom[pen] >> 5) & 0x01;
- g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+ bit0 = (color_prom[i] >> 3) & 0x01;
+ bit1 = (color_prom[i] >> 4) & 0x01;
+ bit2 = (color_prom[i] >> 5) & 0x01;
+ g = combine_3_weights(gweights, bit0, bit1, bit2);
/* blue component */
- bit0 = 0;
- bit1 = (color_prom[pen] >> 6) & 0x01;
- bit2 = (color_prom[pen] >> 7) & 0x01;
- b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+ bit0 = (color_prom[i] >> 6) & 0x01;
+ bit1 = (color_prom[i] >> 7) & 0x01;
+ b = combine_2_weights(bweights, bit0, bit1);
- palette_set_color(machine, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b));
+ }
+
+ /* color_prom now points to the beginning of the lookup table */
+ color_prom += 32;
- /* set the mask, color 0 is transparent */
- if (color_prom[pen] == 0)
- pen_mask[i >> 2] |= (1 << (i & 0x03));
+ /* character lookup table - sprites use the same color lookup table as characters */
+ for (i = 0; i < 0x200; i++)
+ {
+ UINT8 ctabentry = ((i & 0x100) >> 4) | (color_prom[i & 0xff] & 0x0f);
+ colortable_entry_set_value(machine->colortable, i, ctabentry);
}
}
@@ -141,7 +156,8 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
flipx, flipy,
sx, sy,
cliprect,
- TRANSPARENCY_PENS, pen_mask[color]);
+ TRANSPARENCY_PENS,
+ colortable_get_transpen_mask(machine->colortable, machine->gfx[2 + gfxbank], color, 0));
}
}
diff --git a/src/mame/video/circusc.c b/src/mame/video/circusc.c
index 242ef0111d2..b94b2d46d2e 100644
--- a/src/mame/video/circusc.c
+++ b/src/mame/video/circusc.c
@@ -7,6 +7,7 @@
***************************************************************************/
#include "driver.h"
+#include "video/resnet.h"
@@ -36,46 +37,65 @@ UINT8 *circusc_scroll;
bit 0 -- 1 kohm resistor -- RED
***************************************************************************/
+
PALETTE_INIT( circusc )
{
+ static const int resistances_rg[3] = { 1000, 470, 220 };
+ static const int resistances_b [2] = { 470, 220 };
+ double rweights[3], gweights[3], bweights[2];
int i;
- #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity)
- #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs])
+ /* compute the color output resistor weights */
+ compute_resistor_weights(0, 255, -1.0,
+ 3, &resistances_rg[0], rweights, 0, 0,
+ 3, &resistances_rg[0], gweights, 0, 0,
+ 2, &resistances_b[0], bweights, 0, 0);
+
+ /* allocate the colortable */
+ machine->colortable = colortable_alloc(machine, 32);
- for (i = 0;i < machine->drv->total_colors;i++)
+ /* create a lookup table for the palette */
+ for (i = 0; i < 0x20; i++)
{
- int bit0,bit1,bit2,r,g,b;
+ int bit0, bit1, bit2;
+ int r, g, b;
/* red component */
- bit0 = (*color_prom >> 0) & 0x01;
- bit1 = (*color_prom >> 1) & 0x01;
- bit2 = (*color_prom >> 2) & 0x01;
- r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+ bit0 = (color_prom[i] >> 0) & 0x01;
+ bit1 = (color_prom[i] >> 1) & 0x01;
+ bit2 = (color_prom[i] >> 2) & 0x01;
+ r = combine_3_weights(rweights, bit0, bit1, bit2);
+
/* green component */
- bit0 = (*color_prom >> 3) & 0x01;
- bit1 = (*color_prom >> 4) & 0x01;
- bit2 = (*color_prom >> 5) & 0x01;
- g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+ bit0 = (color_prom[i] >> 3) & 0x01;
+ bit1 = (color_prom[i] >> 4) & 0x01;
+ bit2 = (color_prom[i] >> 5) & 0x01;
+ g = combine_3_weights(gweights, bit0, bit1, bit2);
+
/* blue component */
- bit0 = 0;
- bit1 = (*color_prom >> 6) & 0x01;
- bit2 = (*color_prom >> 7) & 0x01;
- b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+ bit0 = (color_prom[i] >> 6) & 0x01;
+ bit1 = (color_prom[i] >> 7) & 0x01;
+ b = combine_2_weights(bweights, bit0, bit1);
- palette_set_color(machine,i,MAKE_RGB(r,g,b));
- color_prom++;
+ colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
+ color_prom += 32;
- /* sprites */
- for (i = 0;i < TOTAL_COLORS(1);i++)
- COLOR(1,i) = *(color_prom++) & 0x0f;
+ /* characters map to the upper 16 palette entries */
+ for (i = 0; i < 0x100; i++)
+ {
+ UINT8 ctabentry = color_prom[i] & 0x0f;
+ colortable_entry_set_value(machine->colortable, i, ctabentry + 0x10);
+ }
- /* characters */
- for (i = 0;i < TOTAL_COLORS(0);i++)
- COLOR(0,i) = (*(color_prom++) & 0x0f) + 0x10;
+ /* sprites map to the lower 16 palette entries */
+ for (i = 0x100; i < 0x200; i++)
+ {
+ UINT8 ctabentry = color_prom[i] & 0x0f;
+ colortable_entry_set_value(machine->colortable, i, ctabentry);
+ }
}
@@ -90,11 +110,12 @@ static TILE_GET_INFO( get_tile_info )
{
UINT8 attr = circusc_colorram[tile_index];
tileinfo->category = (attr & 0x10) >> 4;
- SET_TILE_INFO(
- 0,
- circusc_videoram[tile_index] + ((attr & 0x20) << 3),
- attr & 0x0f,
- TILE_FLIPYX((attr & 0xc0) >> 6));
+ tileinfo->group = attr & 0x0f;
+
+ SET_TILE_INFO(0,
+ circusc_videoram[tile_index] + ((attr & 0x20) << 3),
+ attr & 0x0f,
+ TILE_FLIPYX((attr & 0xc0) >> 6));
}
@@ -153,17 +174,18 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
if ((*circusc_spritebank & 0x01) != 0)
sr = spriteram;
- else sr = spriteram_2;
+ else
+ sr = spriteram_2;
for (offs = 0; offs < spriteram_size;offs += 4)
{
- int sx,sy,flipx,flipy;
+ int code = sr[offs + 0] + 8 * (sr[offs + 1] & 0x20);
+ int color = sr[offs + 1] & 0x0f;
+ int sx = sr[offs + 2];
+ int sy = sr[offs + 3];
+ int flipx = sr[offs + 1] & 0x40;
+ int flipy = sr[offs + 1] & 0x80;
-
- sx = sr[offs + 2];
- sy = sr[offs + 3];
- flipx = sr[offs + 1] & 0x40;
- flipy = sr[offs + 1] & 0x80;
if (flip_screen)
{
sx = 240 - sx;
@@ -174,12 +196,11 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
drawgfx(bitmap,machine->gfx[1],
- sr[offs + 0] + 8 * (sr[offs + 1] & 0x20),
- sr[offs + 1] & 0x0f,
+ code, color,
flipx,flipy,
sx,sy,
- cliprect,TRANSPARENCY_COLOR,0);
-
+ cliprect,TRANSPARENCY_PENS,
+ colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0));
}
}
@@ -192,6 +213,7 @@ VIDEO_UPDATE( circusc )
for (i = 10;i < 32;i++)
tilemap_set_scrolly(bg_tilemap,i,*circusc_scroll);
+ fillbitmap(bitmap, machine->pens[0], cliprect);
tilemap_draw(bitmap,cliprect,bg_tilemap,1,0);
draw_sprites(machine,bitmap,cliprect);
tilemap_draw(bitmap,cliprect,bg_tilemap,0,0);
diff --git a/src/mame/video/clshroad.c b/src/mame/video/clshroad.c
index 88b0ca995c5..9ba1a1f0383 100644
--- a/src/mame/video/clshroad.c
+++ b/src/mame/video/clshroad.c
@@ -64,45 +64,32 @@ PALETTE_INIT( clshroad )
PALETTE_INIT( firebatl )
{
int i;
- #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity)
- #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs])
+ /* allocate the colortable */
+ machine->colortable = colortable_alloc(machine, 0x100);
-#if 1
- for (i = 0;i < 256;i++)
+ /* create a lookup table for the palette */
+ for (i = 0; i < 0x100; i++)
{
- int bit0,bit1,bit2,bit3,r,g,b;
-
-
- /* red component */
- bit0 = (color_prom[i] >> 0) & 0x01;
- bit1 = (color_prom[i] >> 1) & 0x01;
- bit2 = (color_prom[i] >> 2) & 0x01;
- bit3 = (color_prom[i] >> 3) & 0x01;
- r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- /* green component */
- bit0 = (color_prom[i + 256] >> 0) & 0x01;
- bit1 = (color_prom[i + 256] >> 1) & 0x01;
- bit2 = (color_prom[i + 256] >> 2) & 0x01;
- bit3 = (color_prom[i + 256] >> 3) & 0x01;
- g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- /* blue component */
- bit0 = (color_prom[i + 2*256] >> 0) & 0x01;
- bit1 = (color_prom[i + 2*256] >> 1) & 0x01;
- bit2 = (color_prom[i + 2*256] >> 2) & 0x01;
- bit3 = (color_prom[i + 2*256] >> 3) & 0x01;
- b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
-
- palette_set_color(machine,i,MAKE_RGB(r,g,b));
+ int r = pal4bit(color_prom[i + 0x000]);
+ int g = pal4bit(color_prom[i + 0x100]);
+ int b = pal4bit(color_prom[i + 0x200]);
+
+ colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b));
}
-#endif
- color_prom += 3*256;
/* color_prom now points to the beginning of the lookup table */
+ color_prom += 0x300;
+ for (i = 0; i < 0x200; i++)
+ colortable_entry_set_value(machine->colortable, i, i & 0xff);
- for (i = 0;i < TOTAL_COLORS(2);i++)
- COLOR(2,i) = ((color_prom[i] & 0x0f) << 4) + (color_prom[i+256] & 0x0f);
+ for (i = 0x200; i < 0x300; i++)
+ {
+ UINT8 ctabentry = ((color_prom[(i - 0x200) + 0x000] & 0x0f) << 4) |
+ (color_prom[(i - 0x200) + 0x100] & 0x0f);
+ colortable_entry_set_value(machine->colortable, i, ctabentry);
+ }
}
@@ -200,11 +187,12 @@ static TILEMAP_MAPPER( tilemap_scan_rows_extra )
static TILE_GET_INFO( get_tile_info_fb1 )
{
UINT8 code = clshroad_vram_1[ tile_index + 0x000 ];
- UINT8 color = clshroad_vram_1[ tile_index + 0x400 ];
+ UINT8 color = clshroad_vram_1[ tile_index + 0x400 ] & 0x3f;
+ tileinfo->group = color;
SET_TILE_INFO(
2,
code,
- color & 0x3f,
+ color,
0);
}
@@ -229,10 +217,10 @@ WRITE8_HANDLER( clshroad_vram_1_w )
VIDEO_START( firebatl )
{
/* These 2 use the graphics and scroll value */
- tilemap_0a = tilemap_create(get_tile_info_0a,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,0x20,0x10);
+ tilemap_0a = tilemap_create(get_tile_info_0a,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,0x20,0x10);
tilemap_0b = tilemap_create(get_tile_info_0b,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,0x20,0x10);
/* Text (No scrolling) */
- tilemap_1 = tilemap_create(get_tile_info_fb1,tilemap_scan_rows_extra,TILEMAP_TYPE_COLORTABLE,8,8,0x24,0x20);
+ tilemap_1 = tilemap_create(get_tile_info_fb1,tilemap_scan_rows_extra,TILEMAP_TYPE_PEN,8,8,0x24,0x20);
tilemap_set_scroll_rows( tilemap_0a, 1);
tilemap_set_scroll_rows( tilemap_0b, 1);
@@ -246,13 +234,13 @@ VIDEO_START( firebatl )
tilemap_set_scrolldx( tilemap_0b, -0x30, -0xb5);
tilemap_set_transparent_pen( tilemap_0b, 0 );
- tilemap_set_transparent_pen( tilemap_1, 0x0f );
+ colortable_configure_tilemap_groups(machine->colortable, tilemap_1, machine->gfx[2], 0x0f);
}
VIDEO_START( clshroad )
{
/* These 2 use the graphics and scroll value */
- tilemap_0a = tilemap_create(get_tile_info_0a,tilemap_scan_rows,TILEMAP_TYPE_PEN, 16,16,0x20,0x10);
+ tilemap_0a = tilemap_create(get_tile_info_0a,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,0x20,0x10);
tilemap_0b = tilemap_create(get_tile_info_0b,tilemap_scan_rows,TILEMAP_TYPE_PEN,16,16,0x20,0x10);
/* Text (No scrolling) */
tilemap_1 = tilemap_create(get_tile_info_1,tilemap_scan_rows_extra,TILEMAP_TYPE_PEN,8,8,0x24,0x20);