summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/cop01.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/cop01.c')
-rw-r--r--src/mame/video/cop01.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/mame/video/cop01.c b/src/mame/video/cop01.c
index ccde97cde43..79183de2ac0 100644
--- a/src/mame/video/cop01.c
+++ b/src/mame/video/cop01.c
@@ -10,14 +10,11 @@
#include "includes/cop01.h"
-void cop01_state::palette_init()
+PALETTE_INIT_MEMBER(cop01_state, cop01)
{
const UINT8 *color_prom = memregion("proms")->base();
int i;
- /* allocate the colortable */
- machine().colortable = colortable_alloc(machine(), 0x100);
-
/* create a lookup table for the palette */
for (i = 0; i < 0x100; i++)
{
@@ -25,7 +22,7 @@ void cop01_state::palette_init()
int g = pal4bit(color_prom[i + 0x100]);
int b = pal4bit(color_prom[i + 0x200]);
- colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
+ palette.set_indirect_color(i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
@@ -33,7 +30,7 @@ void cop01_state::palette_init()
/* characters use colors 0x00-0x0f (or 0x00-0x7f, but the eight rows are identical) */
for (i = 0; i < 0x10; i++)
- colortable_entry_set_value(machine().colortable, i, i);
+ palette.set_pen_indirect(i, i);
/* background tiles use colors 0xc0-0xff */
/* I don't know how much of the lookup table PROM is hooked up, */
@@ -42,14 +39,14 @@ void cop01_state::palette_init()
{
UINT8 ctabentry = 0xc0 | ((i - 0x10) & 0x30) |
(color_prom[(((i - 0x10) & 0x40) >> 2) | ((i - 0x10) & 0x0f)] & 0x0f);
- colortable_entry_set_value(machine().colortable, i, ctabentry);
+ palette.set_pen_indirect(i, ctabentry);
}
/* sprites use colors 0x80-0x8f (or 0x80-0xbf, but the four rows are identical) */
for (i = 0x90; i < 0x190; i++)
{
UINT8 ctabentry = 0x80 | (color_prom[i - 0x90 + 0x100] & 0x0f);
- colortable_entry_set_value(machine().colortable, i, ctabentry);
+ palette.set_pen_indirect(i, ctabentry);
}
}
@@ -191,7 +188,7 @@ void cop01_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect
if (code & 0x80)
code += (m_vreg[0] & 0x30) << 3;
- m_gfxdecode->gfx(2)->transpen(bitmap,cliprect,
+ m_gfxdecode->gfx(2)->transpen(m_palette,bitmap,cliprect,
code,
color,
flipx,flipy,