Converted palette_t and palette_client to classes. General palette.c

cleanup.
This commit is contained in:
Aaron Giles 2014-02-18 08:05:44 +00:00
parent 847cecbadc
commit 3e2995cbba
74 changed files with 717 additions and 980 deletions

View File

@ -349,7 +349,7 @@ void a2bus_videx80_device::write_c800(address_space &space, UINT16 offset, UINT8
static MC6845_UPDATE_ROW( videoterm_update_row ) static MC6845_UPDATE_ROW( videoterm_update_row )
{ {
a2bus_videx80_device *vterm = downcast<a2bus_videx80_device *>(device->owner()); a2bus_videx80_device *vterm = downcast<a2bus_videx80_device *>(device->owner());
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
UINT16 chr_base = ra; //( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra; UINT16 chr_base = ra; //( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
int i; int i;

View File

@ -253,7 +253,7 @@ static MC6845_UPDATE_ROW( grip_update_row )
static MC6845_UPDATE_ROW( grip5_update_row ) static MC6845_UPDATE_ROW( grip5_update_row )
{ {
grip5_state *state = device->machine().driver_data<grip5_state>(); grip5_state *state = device->machine().driver_data<grip5_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int column, bit; int column, bit;
for (column = 0; column < x_count; column++) for (column = 0; column < x_count; column++)

View File

@ -144,7 +144,7 @@ void palette_init(running_machine &machine)
allocate_shadow_tables(machine, palette); allocate_shadow_tables(machine, palette);
/* set up save/restore of the palette */ /* set up save/restore of the palette */
numcolors = palette_get_num_colors(machine.palette); numcolors = machine.palette->num_colors();
palette->save_pen = auto_alloc_array(machine, pen_t, numcolors); palette->save_pen = auto_alloc_array(machine, pen_t, numcolors);
palette->save_bright = auto_alloc_array(machine, float, numcolors); palette->save_bright = auto_alloc_array(machine, float, numcolors);
machine.save().save_pointer(NAME(palette->save_pen), numcolors); machine.save().save_pointer(NAME(palette->save_pen), numcolors);
@ -170,7 +170,7 @@ void palette_set_shadow_factor(running_machine &machine, double factor)
palette_private *palette = machine.palette_data; palette_private *palette = machine.palette_data;
assert(palette->shadow_group != 0); assert(palette->shadow_group != 0);
palette_group_set_contrast(machine.palette, palette->shadow_group, factor); machine.palette->group_set_contrast(palette->shadow_group, factor);
} }
@ -184,7 +184,7 @@ void palette_set_highlight_factor(running_machine &machine, double factor)
palette_private *palette = machine.palette_data; palette_private *palette = machine.palette_data;
assert(palette->hilight_group != 0); assert(palette->hilight_group != 0);
palette_group_set_contrast(machine.palette, palette->hilight_group, factor); machine.palette->group_set_contrast(palette->hilight_group, factor);
} }
@ -530,15 +530,15 @@ pen_t get_white_pen(running_machine &machine)
static void palette_presave(running_machine &machine) static void palette_presave(running_machine &machine)
{ {
int numcolors = palette_get_num_colors(machine.palette); int numcolors = machine.palette->num_colors();
palette_private *palette = machine.palette_data; palette_private *palette = machine.palette_data;
int index; int index;
/* fill the save arrays with updated pen and brightness information */ /* fill the save arrays with updated pen and brightness information */
for (index = 0; index < numcolors; index++) for (index = 0; index < numcolors; index++)
{ {
palette->save_pen[index] = palette_entry_get_color(machine.palette, index); palette->save_pen[index] = machine.palette->entry_color(index);
palette->save_bright[index] = palette_entry_get_contrast(machine.palette, index); palette->save_bright[index] = machine.palette->entry_contrast(index);
} }
} }
@ -550,15 +550,15 @@ static void palette_presave(running_machine &machine)
static void palette_postload(running_machine &machine) static void palette_postload(running_machine &machine)
{ {
int numcolors = palette_get_num_colors(machine.palette); int numcolors = machine.palette->num_colors();
palette_private *palette = machine.palette_data; palette_private *palette = machine.palette_data;
int index; int index;
/* reset the pen and brightness for each entry */ /* reset the pen and brightness for each entry */
for (index = 0; index < numcolors; index++) for (index = 0; index < numcolors; index++)
{ {
palette_entry_set_color(machine.palette, index, palette->save_pen[index]); machine.palette->entry_set_color(index, palette->save_pen[index]);
palette_entry_set_contrast(machine.palette, index, palette->save_bright[index]); machine.palette->entry_set_contrast(index, palette->save_bright[index]);
} }
} }
@ -571,7 +571,7 @@ static void palette_exit(running_machine &machine)
{ {
/* dereference the palette */ /* dereference the palette */
if (machine.palette != NULL) if (machine.palette != NULL)
palette_deref(machine.palette); machine.palette->deref();
} }
@ -593,26 +593,25 @@ static void allocate_palette(running_machine &machine, palette_private *palette)
assert_always(machine.total_colors() * numgroups <= 65536, "Error: palette has more than 65536 colors."); assert_always(machine.total_colors() * numgroups <= 65536, "Error: palette has more than 65536 colors.");
/* allocate a palette object containing all the colors and groups */ /* allocate a palette object containing all the colors and groups */
machine.palette = palette_alloc(machine.total_colors(), numgroups); machine.palette = new palette_t(machine.total_colors(), numgroups);
assert_always(machine.palette != NULL, "Failed to allocate system palette");
/* configure the groups */ /* configure the groups */
if (palette->shadow_group != 0) if (palette->shadow_group != 0)
palette_group_set_contrast(machine.palette, palette->shadow_group, (float)PALETTE_DEFAULT_SHADOW_FACTOR); machine.palette->group_set_contrast(palette->shadow_group, (float)PALETTE_DEFAULT_SHADOW_FACTOR);
if (palette->hilight_group != 0) if (palette->hilight_group != 0)
palette_group_set_contrast(machine.palette, palette->hilight_group, (float)PALETTE_DEFAULT_HIGHLIGHT_FACTOR); machine.palette->group_set_contrast(palette->hilight_group, (float)PALETTE_DEFAULT_HIGHLIGHT_FACTOR);
/* set the initial colors to a standard rainbow */ /* set the initial colors to a standard rainbow */
for (index = 0; index < machine.total_colors(); index++) for (index = 0; index < machine.total_colors(); index++)
palette_entry_set_color(machine.palette, index, MAKE_RGB(pal1bit(index >> 0), pal1bit(index >> 1), pal1bit(index >> 2))); machine.palette->entry_set_color(index, MAKE_RGB(pal1bit(index >> 0), pal1bit(index >> 1), pal1bit(index >> 2)));
/* switch off the color mode */ /* switch off the color mode */
switch (palette->format) switch (palette->format)
{ {
/* 16-bit paletteized case */ /* 16-bit paletteized case */
case BITMAP_FORMAT_IND16: case BITMAP_FORMAT_IND16:
palette->black_pen = palette_get_black_entry(machine.palette); palette->black_pen = machine.palette->black_entry();
palette->white_pen = palette_get_white_entry(machine.palette); palette->white_pen = machine.palette->white_entry();
if (palette->black_pen >= 65536) if (palette->black_pen >= 65536)
palette->black_pen = 0; palette->black_pen = 0;
if (palette->white_pen >= 65536) if (palette->white_pen >= 65536)
@ -640,7 +639,7 @@ static void allocate_palette(running_machine &machine, palette_private *palette)
static void allocate_color_tables(running_machine &machine, palette_private *palette) static void allocate_color_tables(running_machine &machine, palette_private *palette)
{ {
int total_colors = palette_get_num_colors(machine.palette) * palette_get_num_groups(machine.palette); int total_colors = machine.palette->num_colors() * machine.palette->num_groups();
pen_t *pentable; pen_t *pentable;
int i; int i;
@ -655,7 +654,7 @@ static void allocate_color_tables(running_machine &machine, palette_private *pal
break; break;
case BITMAP_FORMAT_RGB32: case BITMAP_FORMAT_RGB32:
machine.pens = palette_entry_list_adjusted(machine.palette); machine.pens = machine.palette->entry_list_adjusted();
break; break;
default: default:

View File

@ -198,7 +198,7 @@ pen_t get_white_pen(running_machine &machine);
INLINE void palette_set_color(running_machine &machine, pen_t pen, rgb_t rgb) INLINE void palette_set_color(running_machine &machine, pen_t pen, rgb_t rgb)
{ {
palette_entry_set_color(machine.palette, pen, rgb); machine.palette->entry_set_color(pen, rgb);
} }
@ -209,7 +209,7 @@ INLINE void palette_set_color(running_machine &machine, pen_t pen, rgb_t rgb)
INLINE void palette_set_color_rgb(running_machine &machine, pen_t pen, UINT8 r, UINT8 g, UINT8 b) INLINE void palette_set_color_rgb(running_machine &machine, pen_t pen, UINT8 r, UINT8 g, UINT8 b)
{ {
palette_entry_set_color(machine.palette, pen, MAKE_RGB(r, g, b)); machine.palette->entry_set_color(pen, MAKE_RGB(r, g, b));
} }
@ -220,7 +220,7 @@ INLINE void palette_set_color_rgb(running_machine &machine, pen_t pen, UINT8 r,
INLINE rgb_t palette_get_color(running_machine &machine, pen_t pen) INLINE rgb_t palette_get_color(running_machine &machine, pen_t pen)
{ {
return palette_entry_get_color(machine.palette, pen); return machine.palette->entry_color(pen);
} }
@ -231,7 +231,7 @@ INLINE rgb_t palette_get_color(running_machine &machine, pen_t pen)
INLINE void palette_set_pen_contrast(running_machine &machine, pen_t pen, double bright) INLINE void palette_set_pen_contrast(running_machine &machine, pen_t pen, double bright)
{ {
palette_entry_set_contrast(machine.palette, pen, bright); machine.palette->entry_set_contrast(pen, bright);
} }
@ -243,7 +243,7 @@ INLINE void palette_set_pen_contrast(running_machine &machine, pen_t pen, double
INLINE void palette_set_colors(running_machine &machine, pen_t color_base, const rgb_t *colors, int color_count) INLINE void palette_set_colors(running_machine &machine, pen_t color_base, const rgb_t *colors, int color_count)
{ {
while (color_count--) while (color_count--)
palette_entry_set_color(machine.palette, color_base++, *colors++); machine.palette->entry_set_color(color_base++, *colors++);
} }

View File

@ -325,7 +325,7 @@ void laserdisc_device::device_stop()
if (m_videotex != NULL) if (m_videotex != NULL)
machine().render().texture_free(m_videotex); machine().render().texture_free(m_videotex);
if (m_videopalette != NULL) if (m_videopalette != NULL)
palette_deref(m_videopalette); m_videopalette->deref();
if (m_overtex != NULL) if (m_overtex != NULL)
machine().render().texture_free(m_overtex); machine().render().texture_free(m_overtex);
} }
@ -769,11 +769,11 @@ void laserdisc_device::init_video()
m_screen->register_vblank_callback(vblank_state_delegate(FUNC(laserdisc_device::vblank_state_changed), this)); m_screen->register_vblank_callback(vblank_state_delegate(FUNC(laserdisc_device::vblank_state_changed), this));
// allocate palette for applying brightness/contrast/gamma // allocate palette for applying brightness/contrast/gamma
m_videopalette = palette_alloc(256, 1); m_videopalette = new palette_t(256);
if (m_videopalette == NULL) if (m_videopalette == NULL)
throw emu_fatalerror("Out of memory allocating video palette"); throw emu_fatalerror("Out of memory allocating video palette");
for (int index = 0; index < 256; index++) for (int index = 0; index < 256; index++)
palette_entry_set_color(m_videopalette, index, MAKE_RGB(index, index, index)); m_videopalette->entry_set_color(index, MAKE_RGB(index, index, index));
// allocate video frames // allocate video frames
for (int index = 0; index < ARRAY_LENGTH(m_frame); index++) for (int index = 0; index < ARRAY_LENGTH(m_frame); index++)

View File

@ -467,7 +467,7 @@ bool render_texture::get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &t
texinfo.osddata = m_osddata; texinfo.osddata = m_osddata;
// are we scaler-free? if so, just return the source bitmap // are we scaler-free? if so, just return the source bitmap
const rgb_t *palbase = (m_format == TEXFORMAT_PALETTE16 || m_format == TEXFORMAT_PALETTEA16) ? palette_entry_list_adjusted(m_bitmap->palette()) : NULL; const rgb_t *palbase = (m_format == TEXFORMAT_PALETTE16 || m_format == TEXFORMAT_PALETTEA16) ? m_bitmap->palette()->entry_list_adjusted() : NULL;
if (m_scaler == NULL || (m_bitmap != NULL && swidth == dwidth && sheight == dheight)) if (m_scaler == NULL || (m_bitmap != NULL && swidth == dwidth && sheight == dheight))
{ {
// add a reference and set up the source bitmap // add a reference and set up the source bitmap
@ -554,7 +554,7 @@ const rgb_t *render_texture::get_adjusted_palette(render_container &container)
// if no adjustment necessary, return the raw palette // if no adjustment necessary, return the raw palette
assert(m_bitmap->palette() != NULL); assert(m_bitmap->palette() != NULL);
adjusted = palette_entry_list_adjusted(m_bitmap->palette()); adjusted = m_bitmap->palette()->entry_list_adjusted();
if (!container.has_brightness_contrast_gamma_changes()) if (!container.has_brightness_contrast_gamma_changes())
return adjusted; return adjusted;
@ -564,7 +564,7 @@ const rgb_t *render_texture::get_adjusted_palette(render_container &container)
return adjusted; return adjusted;
// otherwise, ensure we have memory allocated and compute the adjusted result ourself // otherwise, ensure we have memory allocated and compute the adjusted result ourself
numentries = palette_get_num_colors(m_bitmap->palette()) * palette_get_num_groups(m_bitmap->palette()); numentries = m_bitmap->palette()->num_colors() * m_bitmap->palette()->num_groups();
if (m_bcglookup == NULL || m_bcglookup_entries < numentries) if (m_bcglookup == NULL || m_bcglookup_entries < numentries)
{ {
rgb_t *newlookup = auto_alloc_array(m_manager->machine(), rgb_t, numentries); rgb_t *newlookup = auto_alloc_array(m_manager->machine(), rgb_t, numentries);
@ -637,7 +637,7 @@ render_container::render_container(render_manager &manager, screen_device *scree
// allocate a client to the main palette // allocate a client to the main palette
if (manager.machine().palette != NULL) if (manager.machine().palette != NULL)
m_palclient = palette_client_alloc(manager.machine().palette); m_palclient = global_alloc(palette_client(*manager.machine().palette));
recompute_lookups(); recompute_lookups();
} }
@ -655,8 +655,7 @@ render_container::~render_container()
m_manager.texture_free(m_overlaytexture); m_manager.texture_free(m_overlaytexture);
// release our palette client // release our palette client
if (m_palclient != NULL) global_free(m_palclient);
palette_client_free(m_palclient);
} }
@ -772,7 +771,7 @@ const rgb_t *render_container::bcg_lookup_table(int texformat, palette_t *palett
{ {
case TEXFORMAT_PALETTE16: case TEXFORMAT_PALETTE16:
case TEXFORMAT_PALETTEA16: case TEXFORMAT_PALETTEA16:
return (palette != NULL && palette == palette_client_get_palette(m_palclient)) ? m_bcglookup : NULL; return (palette != NULL && palette == &m_palclient->palette()) ? m_bcglookup : NULL;
case TEXFORMAT_RGB32: case TEXFORMAT_RGB32:
case TEXFORMAT_ARGB32: case TEXFORMAT_ARGB32:
@ -858,9 +857,9 @@ void render_container::recompute_lookups()
// recompute the palette entries // recompute the palette entries
if (m_palclient != NULL) if (m_palclient != NULL)
{ {
palette_t *palette = palette_client_get_palette(m_palclient); palette_t &palette = m_palclient->palette();
const pen_t *adjusted_palette = palette_entry_list_adjusted(palette); const pen_t *adjusted_palette = palette.entry_list_adjusted();
int colors = palette_get_num_colors(palette) * palette_get_num_groups(palette); int colors = palette.num_colors() * palette.num_groups();
for (int i = 0; i < colors; i++) for (int i = 0; i < colors; i++)
{ {
@ -887,13 +886,13 @@ void render_container::update_palette()
// get the dirty list // get the dirty list
UINT32 mindirty, maxdirty; UINT32 mindirty, maxdirty;
const UINT32 *dirty = palette_client_get_dirty_list(m_palclient, &mindirty, &maxdirty); const UINT32 *dirty = m_palclient->dirty_list(mindirty, maxdirty);
// iterate over dirty items and update them // iterate over dirty items and update them
if (dirty != NULL) if (dirty != NULL)
{ {
palette_t *palette = palette_client_get_palette(m_palclient); palette_t &palette = m_palclient->palette();
const pen_t *adjusted_palette = palette_entry_list_adjusted(palette); const pen_t *adjusted_palette = palette.entry_list_adjusted();
// loop over chunks of 32 entries, since we can quickly examine 32 at a time // loop over chunks of 32 entries, since we can quickly examine 32 at a time
for (UINT32 entry32 = mindirty / 32; entry32 <= maxdirty / 32; entry32++) for (UINT32 entry32 = mindirty / 32; entry32 <= maxdirty / 32; entry32++)

View File

@ -880,7 +880,7 @@ void screen_device::update_burnin()
{ {
UINT64 *dst = &m_burnin.pix64(y); UINT64 *dst = &m_burnin.pix64(y);
const UINT16 *src = &srcbitmap.pix16(srcy >> 16); const UINT16 *src = &srcbitmap.pix16(srcy >> 16);
const rgb_t *palette = palette_entry_list_adjusted(machine().palette); const rgb_t *palette = machine().palette->entry_list_adjusted();
for (x = 0, srcx = xstart; x < dstwidth; x++, srcx += xstep) for (x = 0, srcx = xstart; x < dstwidth; x++, srcx += xstep)
{ {
rgb_t pixel = palette[src[srcx >> 16]]; rgb_t pixel = palette[src[srcx >> 16]];

View File

@ -1183,7 +1183,7 @@ void tilemap_t::draw_instance(_BitmapClass &dest, const blit_parameters &blit, i
x_end = MIN(x_end, x2); x_end = MIN(x_end, x2);
// if we're rendering something, compute the pointers // if we're rendering something, compute the pointers
const rgb_t *clut = (dest.palette() != NULL) ? palette_entry_list_raw(dest.palette()) : machine().pens; const rgb_t *clut = (dest.palette() != NULL) ? dest.palette()->entry_list_raw() : machine().pens;
if (prev_trans != WHOLLY_TRANSPARENT) if (prev_trans != WHOLLY_TRANSPARENT)
{ {
const UINT16 *source0 = source_baseaddr + x_start; const UINT16 *source0 = source_baseaddr + x_start;
@ -1277,7 +1277,7 @@ void tilemap_t::draw_roz_core(_BitmapClass &destbitmap, const blit_parameters &b
UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, bool wraparound) UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, bool wraparound)
{ {
// pre-cache all the inner loop values // pre-cache all the inner loop values
const rgb_t *clut = ((destbitmap.palette() != NULL) ? palette_entry_list_raw(destbitmap.palette()) : machine().pens) + (blit.tilemap_priority_code >> 16); const rgb_t *clut = ((destbitmap.palette() != NULL) ? destbitmap.palette()->entry_list_raw() : machine().pens) + (blit.tilemap_priority_code >> 16);
bitmap_ind8 &priority_bitmap = *blit.priority; bitmap_ind8 &priority_bitmap = *blit.priority;
const int xmask = m_pixmap.width() - 1; const int xmask = m_pixmap.width() - 1;
const int ymask = m_pixmap.height() - 1; const int ymask = m_pixmap.height() - 1;

View File

@ -257,7 +257,7 @@ static void palette_handler(running_machine &machine, render_container *containe
{ {
int total = state->palette.which ? colortable_palette_get_size(machine.colortable) : machine.total_colors(); int total = state->palette.which ? colortable_palette_get_size(machine.colortable) : machine.total_colors();
const char *title = state->palette.which ? "COLORTABLE" : "PALETTE"; const char *title = state->palette.which ? "COLORTABLE" : "PALETTE";
const rgb_t *raw_color = palette_entry_list_raw(machine.palette); const rgb_t *raw_color = machine.palette->entry_list_raw();
render_font *ui_font = machine.ui().get_font(); render_font *ui_font = machine.ui().get_font();
float cellwidth, cellheight; float cellwidth, cellheight;
float chwidth, chheight; float chwidth, chheight;
@ -787,7 +787,7 @@ static void gfxset_draw_item(running_machine &machine, gfx_element *gfx, int ind
}; };
int width = (rotate & ORIENTATION_SWAP_XY) ? gfx->height() : gfx->width(); int width = (rotate & ORIENTATION_SWAP_XY) ? gfx->height() : gfx->width();
int height = (rotate & ORIENTATION_SWAP_XY) ? gfx->width() : gfx->height(); int height = (rotate & ORIENTATION_SWAP_XY) ? gfx->width() : gfx->height();
const rgb_t *palette = (machine.total_colors() != 0) ? palette_entry_list_raw(machine.palette) : NULL; const rgb_t *palette = (machine.total_colors() != 0) ? machine.palette->entry_list_raw() : NULL;
UINT32 palette_mask = ~0; UINT32 palette_mask = ~0;
int x, y; int x, y;

View File

@ -310,7 +310,7 @@ void video_manager::save_snapshot(screen_device *screen, emu_file &file)
png_add_text(&pnginfo, "System", text2); png_add_text(&pnginfo, "System", text2);
// now do the actual work // now do the actual work
const rgb_t *palette = (machine().palette != NULL) ? palette_entry_list_adjusted(machine().palette) : NULL; const rgb_t *palette = (machine().palette != NULL) ? machine().palette->entry_list_adjusted() : NULL;
png_error error = png_write_bitmap(file, &pnginfo, m_snap_bitmap, machine().total_colors(), palette); png_error error = png_write_bitmap(file, &pnginfo, m_snap_bitmap, machine().total_colors(), palette);
if (error != PNGERR_NONE) if (error != PNGERR_NONE)
mame_printf_error("Error generating PNG for snapshot: png_error = %d\n", error); mame_printf_error("Error generating PNG for snapshot: png_error = %d\n", error);
@ -1230,7 +1230,7 @@ void video_manager::record_frame()
} }
// write the next frame // write the next frame
const rgb_t *palette = (machine().palette != NULL) ? palette_entry_list_adjusted(machine().palette) : NULL; const rgb_t *palette = (machine().palette != NULL) ? machine().palette->entry_list_adjusted() : NULL;
png_error error = mng_capture_frame(*m_mngfile, &pnginfo, m_snap_bitmap, machine().total_colors(), palette); png_error error = mng_capture_frame(*m_mngfile, &pnginfo, m_snap_bitmap, machine().total_colors(), palette);
png_free(&pnginfo); png_free(&pnginfo);
if (error != PNGERR_NONE) if (error != PNGERR_NONE)
@ -1258,7 +1258,7 @@ bool video_assert_out_of_range_pixels(running_machine &machine, bitmap_ind16 &bi
{ {
#ifdef MAME_DEBUG #ifdef MAME_DEBUG
// iterate over rows // iterate over rows
int maxindex = palette_get_max_index(machine.palette); int maxindex = machine.palette->max_index();
for (int y = 0; y < bitmap.height(); y++) for (int y = 0; y < bitmap.height(); y++)
{ {
UINT16 *rowbase = &bitmap.pix16(y); UINT16 *rowbase = &bitmap.pix16(y);

View File

@ -482,7 +482,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_update_row )
{ {
UINT8 *videoram = cga.videoram; UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -522,7 +522,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_comp_grey_update_row )
{ {
UINT8 *videoram = cga.videoram; UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -561,7 +561,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_alt_update_row )
{ {
UINT8 *videoram = cga.videoram; UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -600,7 +600,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_update_row )
{ {
UINT8 *videoram = cga.videoram; UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -644,7 +644,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_update_row_si )
{ {
UINT8 *videoram = cga.videoram; UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -696,7 +696,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_alt_update_row )
{ {
UINT8 *videoram = cga.videoram; UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -744,7 +744,7 @@ static MC6845_UPDATE_ROW( cga_gfx_4bppl_update_row )
{ {
UINT8 *videoram = cga.videoram; UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -802,7 +802,7 @@ static MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row )
{ {
UINT8 *videoram = cga.videoram; UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -846,7 +846,7 @@ static MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row )
{ {
UINT8 *videoram = cga.videoram; UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -882,7 +882,7 @@ static MC6845_UPDATE_ROW( cga_gfx_1bpp_update_row )
{ {
UINT8 *videoram = cga.videoram; UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 fg = cga.color_select & 0x0F; UINT8 fg = cga.color_select & 0x0F;
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -1460,7 +1460,7 @@ static MC6845_UPDATE_ROW( pc1512_gfx_4bpp_update_row )
{ {
UINT8 *videoram = cga.videoram; UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT16 offset_base = ra << 13; UINT16 offset_base = ra << 13;
int j; int j;
running_machine &machine = device->machine(); running_machine &machine = device->machine();

View File

@ -271,14 +271,14 @@ void bitmap_t::set_palette(palette_t *palette)
// first dereference any existing palette // first dereference any existing palette
if (m_palette != NULL) if (m_palette != NULL)
{ {
palette_deref(m_palette); m_palette->deref();
m_palette = NULL; m_palette = NULL;
} }
// then reference any new palette // then reference any new palette
if (palette != NULL) if (palette != NULL)
{ {
palette_ref(palette); palette->ref();
m_palette = palette; m_palette = palette;
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -14,162 +14,177 @@
#define __PALETTE_H__ #define __PALETTE_H__
#include "osdcore.h" #include "osdcore.h"
#include "coretmpl.h"
/*************************************************************************** //**************************************************************************
TYPE DEFINITIONS // MACROS
***************************************************************************/ //**************************************************************************
/* an rgb_t is a single combined R,G,B (and optionally alpha) value */ // macros to assemble rgb_t values */
typedef UINT32 rgb_t; #define MAKE_ARGB(a,r,g,b) (((rgb_t(a) & 0xff) << 24) | ((rgb_t(r) & 0xff) << 16) | ((rgb_t(g) & 0xff) << 8) | (rgb_t(b) & 0xff))
/* an rgb15_t is a single combined 15-bit R,G,B value */
typedef UINT16 rgb15_t;
/* a palette is an opaque, reference counted object */
struct palette_t;
/* a palette client is someone who is tracking the dirty state of a palette */
struct palette_client;
/***************************************************************************
MACROS
***************************************************************************/
/* macros to assemble rgb_t values */
#define MAKE_ARGB(a,r,g,b) ((((rgb_t)(a) & 0xff) << 24) | (((rgb_t)(r) & 0xff) << 16) | (((rgb_t)(g) & 0xff) << 8) | ((rgb_t)(b) & 0xff))
#define MAKE_RGB(r,g,b) (MAKE_ARGB(255,r,g,b)) #define MAKE_RGB(r,g,b) (MAKE_ARGB(255,r,g,b))
/* macros to extract components from rgb_t values */ // macros to extract components from rgb_t values */
#define RGB_ALPHA(rgb) (((rgb) >> 24) & 0xff) #define RGB_ALPHA(rgb) (((rgb) >> 24) & 0xff)
#define RGB_RED(rgb) (((rgb) >> 16) & 0xff) #define RGB_RED(rgb) (((rgb) >> 16) & 0xff)
#define RGB_GREEN(rgb) (((rgb) >> 8) & 0xff) #define RGB_GREEN(rgb) (((rgb) >> 8) & 0xff)
#define RGB_BLUE(rgb) ((rgb) & 0xff) #define RGB_BLUE(rgb) ((rgb) & 0xff)
/* common colors */ // common colors */
#define RGB_BLACK (MAKE_ARGB(255,0,0,0)) #define RGB_BLACK (MAKE_ARGB(255,0,0,0))
#define RGB_WHITE (MAKE_ARGB(255,255,255,255)) #define RGB_WHITE (MAKE_ARGB(255,255,255,255))
/*************************************************************************** //**************************************************************************
FUNCTION PROTOTYPES // TYPE DEFINITIONS
***************************************************************************/ //**************************************************************************
// an rgb_t is a single combined R,G,B (and optionally alpha) value */
typedef UINT32 rgb_t;
// an rgb15_t is a single combined 15-bit R,G,B value */
typedef UINT16 rgb15_t;
// forward definitions
class palette_t;
// ======================> palette_client
// a single palette client
class palette_client
{
public:
// construction/destruction
palette_client(palette_t &palette);
~palette_client();
// getters
palette_client *next() const { return m_next; }
palette_t &palette() const { return m_palette; }
const UINT32 *dirty_list(UINT32 &mindirty, UINT32 &maxdirty);
// dirty marking
void mark_dirty(UINT32 index) { m_live->mark_dirty(index); }
private:
// internal object to track dirty states
class dirty_state
{
public:
// construction
dirty_state();
// operations
const UINT32 *dirty_list(UINT32 &mindirty, UINT32 &maxdirty);
void resize(UINT32 colors);
void mark_dirty(UINT32 index);
void reset();
private:
// internal state
dynamic_array<UINT32> m_dirty; // bitmap of dirty entries
UINT32 m_mindirty; // minimum dirty entry
UINT32 m_maxdirty; // minimum dirty entry
};
// internal state
palette_t & m_palette; // reference to the palette
palette_client *m_next; // pointer to next client
dirty_state * m_live; // live dirty state
dirty_state * m_previous; // previous dirty state
dirty_state m_dirty[2]; // two dirty states
};
/* ----- palette allocation ----- */ // ======================> palette_t
/* allocate a new palette object and take a single reference on it */ // a palette object
palette_t *palette_alloc(UINT32 numcolors, UINT32 numgroups); class palette_t
{
friend class palette_client;
/* reference a palette object, incrementing its reference count */ public:
void palette_ref(palette_t *palette); // construction/destruction
palette_t(UINT32 numcolors, UINT32 numgroups = 1);
// reference counting
void ref() { m_refcount++; }
void deref();
/* dereference a palette object; if the reference count goes to 0, it is freed */ // getters
void palette_deref(palette_t *palette); int num_colors() const { return m_numcolors; }
int num_groups() const { return m_numgroups; }
int max_index() const { return m_numcolors * m_numgroups + 2; }
UINT32 black_entry() const { return m_numcolors * m_numgroups + 0; }
UINT32 white_entry() const { return m_numcolors * m_numgroups + 1; }
// overall adjustments
void set_brightness(float brightness);
void set_contrast(float contrast);
void set_gamma(float gamma);
// entry getters
rgb_t entry_color(UINT32 index) const { return (index < m_numcolors) ? m_entry_color[index] : RGB_BLACK; }
rgb_t entry_adjusted_color(UINT32 index) const { return (index < m_numcolors * m_numgroups) ? m_adjusted_color[index] : RGB_BLACK; }
float entry_contrast(UINT32 index) const { return (index < m_numcolors) ? m_entry_contrast[index] : 1.0f; }
// entry setters
void entry_set_color(UINT32 index, rgb_t rgb);
void entry_set_contrast(UINT32 index, float contrast);
// entry list getters
const rgb_t *entry_list_raw() const { return m_entry_color; }
const rgb_t *entry_list_adjusted() const { return m_adjusted_color; }
const rgb_t *entry_list_adjusted_rgb15() const { return m_adjusted_rgb15; }
// group adjustments
void group_set_brightness(UINT32 group, float brightness);
void group_set_contrast(UINT32 group, float contrast);
// utilities
void normalize_range(UINT32 start, UINT32 end, int lum_min = 0, int lum_max = 255);
private:
// destructor -- can only destruct via
~palette_t();
// internal helpers
rgb_t adjust_palette_entry(rgb_t entry, float brightness, float contrast, const UINT8 *gamma_map);
void update_adjusted_color(UINT32 group, UINT32 index);
// internal state
UINT32 m_refcount; // reference count on the palette
UINT32 m_numcolors; // number of colors in the palette
UINT32 m_numgroups; // number of groups in the palette
float m_brightness; // overall brightness value
float m_contrast; // overall contrast value
float m_gamma; // overall gamma value
UINT8 m_gamma_map[256]; // gamma map
dynamic_array<rgb_t> m_entry_color; // array of raw colors
dynamic_array<float> m_entry_contrast; // contrast value for each entry
dynamic_array<rgb_t> m_adjusted_color; // array of adjusted colors
dynamic_array<rgb_t> m_adjusted_rgb15; // array of adjusted colors as RGB15
dynamic_array<float> m_group_bright; // brightness value for each group
dynamic_array<float> m_group_contrast; // contrast value for each group
palette_client *m_client_list; // list of clients for this palette
};
/* ----- palette information ----- */ //**************************************************************************
// INLINE FUNCTIONS
//**************************************************************************
/* return the number of colors managed by the palette */ //-------------------------------------------------
int palette_get_num_colors(palette_t *palette); // rgb_to_rgb15 - convert an RGB triplet to
// a 15-bit OSD-specified RGB value
/* return the number of groups managed by the palette */ //-------------------------------------------------
int palette_get_num_groups(palette_t *palette);
/* return the maximum allowed index (i.e., length of arrays returned by palette_entry_list*) */
int palette_get_max_index(palette_t *palette);
/* return the index of the black entry */
UINT32 palette_get_black_entry(palette_t *palette);
/* return the index of the white entry */
UINT32 palette_get_white_entry(palette_t *palette);
/* ----- palette clients ----- */
/* add a new client to a palette */
palette_client *palette_client_alloc(palette_t *palette);
/* remove a client from a palette */
void palette_client_free(palette_client *client);
/* return a pointer to the palette for this client */
palette_t *palette_client_get_palette(palette_client *client);
/* atomically get the current dirty list for a client */
const UINT32 *palette_client_get_dirty_list(palette_client *client, UINT32 *mindirty, UINT32 *maxdirty);
/* ----- color management ----- */
/* set the raw RGB color for a given palette index */
void palette_entry_set_color(palette_t *palette, UINT32 index, rgb_t rgb);
/* return the raw RGB color for a given palette index */
rgb_t palette_entry_get_color(palette_t *palette, UINT32 index);
/* return the adjusted RGB color (after all adjustments) for a given palette index */
rgb_t palette_entry_get_adjusted_color(palette_t *palette, UINT32 index);
/* return the entire palette as an array of raw RGB values */
const rgb_t *palette_entry_list_raw(palette_t *palette);
/* return the entire palette as an array of adjusted RGB values */
const rgb_t *palette_entry_list_adjusted(palette_t *palette);
/* return the entire palette as an array of adjusted RGB-15 values */
const rgb_t *palette_entry_list_adjusted_rgb15(palette_t *palette);
/* ----- palette adjustments ----- */
/* set the overall brightness for the palette */
void palette_set_brightness(palette_t *palette, float brightness);
/* set the overall contrast for the palette */
void palette_set_contrast(palette_t *palette, float contrast);
/* set the overall gamma for the palette */
void palette_set_gamma(palette_t *palette, float gamma);
/* set the contrast adjustment for a single palette index */
void palette_entry_set_contrast(palette_t *palette, UINT32 index, float contrast);
/* return the contrast adjustment for a single palette index */
float palette_entry_get_contrast(palette_t *palette, UINT32 index);
/* configure overall brightness for a palette group */
void palette_group_set_brightness(palette_t *palette, UINT32 group, float brightness);
/* configure overall contrast for a palette group */
void palette_group_set_contrast(palette_t *palette, UINT32 group, float contrast);
/* ----- palette utilities ----- */
/* normalize a range of palette entries, mapping minimum brightness to lum_min and maximum
brightness to lum_max; if either value is < 0, that boundary value is not modified */
void palette_normalize_range(palette_t *palette, UINT32 start, UINT32 end, int lum_min, int lum_max);
/***************************************************************************
INLINE FUNCTIONS
***************************************************************************/
/*-------------------------------------------------
rgb_to_rgb15 - convert an RGB triplet to
a 15-bit OSD-specified RGB value
-------------------------------------------------*/
inline rgb15_t rgb_to_rgb15(rgb_t rgb) inline rgb15_t rgb_to_rgb15(rgb_t rgb)
{ {
@ -177,9 +192,9 @@ inline rgb15_t rgb_to_rgb15(rgb_t rgb)
} }
/*------------------------------------------------- //-------------------------------------------------
rgb_clamp - clamp an RGB component to 0-255 // rgb_clamp - clamp an RGB component to 0-255
-------------------------------------------------*/ //-------------------------------------------------
inline UINT8 rgb_clamp(INT32 value) inline UINT8 rgb_clamp(INT32 value)
{ {
@ -191,9 +206,9 @@ inline UINT8 rgb_clamp(INT32 value)
} }
/*------------------------------------------------- //-------------------------------------------------
pal1bit - convert a 1-bit value to 8 bits // pal1bit - convert a 1-bit value to 8 bits
-------------------------------------------------*/ //-------------------------------------------------
inline UINT8 pal1bit(UINT8 bits) inline UINT8 pal1bit(UINT8 bits)
{ {
@ -201,9 +216,9 @@ inline UINT8 pal1bit(UINT8 bits)
} }
/*------------------------------------------------- //-------------------------------------------------
pal2bit - convert a 2-bit value to 8 bits // pal2bit - convert a 2-bit value to 8 bits
-------------------------------------------------*/ //-------------------------------------------------
inline UINT8 pal2bit(UINT8 bits) inline UINT8 pal2bit(UINT8 bits)
{ {
@ -212,9 +227,9 @@ inline UINT8 pal2bit(UINT8 bits)
} }
/*------------------------------------------------- //-------------------------------------------------
pal3bit - convert a 3-bit value to 8 bits // pal3bit - convert a 3-bit value to 8 bits
-------------------------------------------------*/ //-------------------------------------------------
inline UINT8 pal3bit(UINT8 bits) inline UINT8 pal3bit(UINT8 bits)
{ {
@ -223,9 +238,9 @@ inline UINT8 pal3bit(UINT8 bits)
} }
/*------------------------------------------------- //-------------------------------------------------
pal4bit - convert a 4-bit value to 8 bits // pal4bit - convert a 4-bit value to 8 bits
-------------------------------------------------*/ //-------------------------------------------------
inline UINT8 pal4bit(UINT8 bits) inline UINT8 pal4bit(UINT8 bits)
{ {
@ -234,9 +249,9 @@ inline UINT8 pal4bit(UINT8 bits)
} }
/*------------------------------------------------- //-------------------------------------------------
pal5bit - convert a 5-bit value to 8 bits // pal5bit - convert a 5-bit value to 8 bits
-------------------------------------------------*/ //-------------------------------------------------
inline UINT8 pal5bit(UINT8 bits) inline UINT8 pal5bit(UINT8 bits)
{ {
@ -245,9 +260,9 @@ inline UINT8 pal5bit(UINT8 bits)
} }
/*------------------------------------------------- //-------------------------------------------------
pal6bit - convert a 6-bit value to 8 bits // pal6bit - convert a 6-bit value to 8 bits
-------------------------------------------------*/ //-------------------------------------------------
inline UINT8 pal6bit(UINT8 bits) inline UINT8 pal6bit(UINT8 bits)
{ {
@ -256,9 +271,9 @@ inline UINT8 pal6bit(UINT8 bits)
} }
/*------------------------------------------------- //-------------------------------------------------
pal7bit - convert a 7-bit value to 8 bits // pal7bit - convert a 7-bit value to 8 bits
-------------------------------------------------*/ //-------------------------------------------------
inline UINT8 pal7bit(UINT8 bits) inline UINT8 pal7bit(UINT8 bits)
{ {
@ -285,10 +300,10 @@ inline UINT8 palexpand(UINT8 data)
} }
/*------------------------------------------------- //-------------------------------------------------
pal332 - create a 3-3-2 color by extracting // pal332 - create a 3-3-2 color by extracting
bits from a UINT32 // bits from a UINT32
-------------------------------------------------*/ //-------------------------------------------------
inline rgb_t pal332(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift) inline rgb_t pal332(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift)
{ {
@ -296,10 +311,10 @@ inline rgb_t pal332(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift)
} }
/*------------------------------------------------- //-------------------------------------------------
pal444 - create a 4-4-4 color by extracting // pal444 - create a 4-4-4 color by extracting
bits from a UINT32 // bits from a UINT32
-------------------------------------------------*/ //-------------------------------------------------
inline rgb_t pal444(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift) inline rgb_t pal444(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift)
{ {
@ -307,10 +322,10 @@ inline rgb_t pal444(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift)
} }
/*------------------------------------------------- //-------------------------------------------------
pal555 - create a 5-5-5 color by extracting // pal555 - create a 5-5-5 color by extracting
bits from a UINT32 // bits from a UINT32
-------------------------------------------------*/ //-------------------------------------------------
inline rgb_t pal555(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift) inline rgb_t pal555(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift)
{ {
@ -318,10 +333,10 @@ inline rgb_t pal555(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift)
} }
/*------------------------------------------------- //-------------------------------------------------
pal565 - create a 5-6-5 color by extracting // pal565 - create a 5-6-5 color by extracting
bits from a UINT32 // bits from a UINT32
-------------------------------------------------*/ //-------------------------------------------------
inline rgb_t pal565(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift) inline rgb_t pal565(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift)
{ {
@ -329,10 +344,10 @@ inline rgb_t pal565(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift)
} }
/*------------------------------------------------- //-------------------------------------------------
pal888 - create a 8-8-8 color by extracting // pal888 - create a 8-8-8 color by extracting
bits from a UINT32 // bits from a UINT32
-------------------------------------------------*/ //-------------------------------------------------
inline rgb_t pal888(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift) inline rgb_t pal888(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift)
{ {
@ -340,4 +355,4 @@ inline rgb_t pal888(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift)
} }
#endif /* __PALETTE_H__ */ #endif // __PALETTE_H__ */

View File

@ -105,7 +105,7 @@ public:
static MC6845_UPDATE_ROW( update_row ) static MC6845_UPDATE_ROW( update_row )
{ {
othello_state *state = device->machine().driver_data<othello_state>(); othello_state *state = device->machine().driver_data<othello_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int cx, x; int cx, x;
UINT32 data_address; UINT32 data_address;
UINT32 tmp; UINT32 tmp;

View File

@ -37,7 +37,7 @@ void carjmbre_state::palette_init()
rgb = compute_res_net_all(machine(), color_prom, &carjmbre_decode_info, &carjmbre_net_info); rgb = compute_res_net_all(machine(), color_prom, &carjmbre_decode_info, &carjmbre_net_info);
palette_set_colors(machine(), 0, rgb, 64); palette_set_colors(machine(), 0, rgb, 64);
palette_normalize_range(machine().palette, 0, 63, 0, 255); machine().palette->normalize_range(0, 63);
auto_free(machine(), rgb); auto_free(machine(), rgb);
} }

View File

@ -218,7 +218,7 @@ PALETTE_INIT_MEMBER(dkong_state,dkong2b)
palette_set_color_rgb(machine(),i,r,g,b); palette_set_color_rgb(machine(),i,r,g,b);
} }
palette_normalize_range(machine().palette, 0, 255, 0, 255); machine().palette->normalize_range(0, 255);
color_prom += 512; color_prom += 512;
/* color_prom now points to the beginning of the character color codes */ /* color_prom now points to the beginning of the character color codes */
@ -257,7 +257,7 @@ PALETTE_INIT_MEMBER(dkong_state,dkong4b)
palette_set_color_rgb(machine(),i,r,g,b); palette_set_color_rgb(machine(),i,r,g,b);
} }
palette_normalize_range(machine().palette, 0, 255, 0, 255); machine().palette->normalize_range(0, 255);
color_prom += 256; color_prom += 256;
/* color_prom now points to the beginning of the character color codes */ /* color_prom now points to the beginning of the character color codes */
@ -321,7 +321,7 @@ PALETTE_INIT_MEMBER(dkong_state,radarscp)
palette_set_color_rgb(machine(),RADARSCP_GRID_COL_OFFSET + i,r,g,b); palette_set_color_rgb(machine(),RADARSCP_GRID_COL_OFFSET + i,r,g,b);
} }
palette_normalize_range(machine().palette, 0, RADARSCP_GRID_COL_OFFSET+7, 0, 255); machine().palette->normalize_range(0, RADARSCP_GRID_COL_OFFSET+7);
color_prom += 256; color_prom += 256;
/* color_prom now points to the beginning of the character color codes */ /* color_prom now points to the beginning of the character color codes */
@ -383,7 +383,7 @@ PALETTE_INIT_MEMBER(dkong_state,radarscp1)
palette_set_color_rgb(machine(),RADARSCP_GRID_COL_OFFSET + i,r,g,b); palette_set_color_rgb(machine(),RADARSCP_GRID_COL_OFFSET + i,r,g,b);
} }
palette_normalize_range(machine().palette, 0, RADARSCP_GRID_COL_OFFSET+7, 0, 255); machine().palette->normalize_range(0, RADARSCP_GRID_COL_OFFSET+7);
color_prom += 512; color_prom += 512;
/* color_prom now points to the beginning of the character color codes */ /* color_prom now points to the beginning of the character color codes */
@ -434,7 +434,7 @@ PALETTE_INIT_MEMBER(dkong_state,dkong3)
rgb = compute_res_net_all(machine(), color_prom, &dkong3_decode_info, &dkong3_net_info); rgb = compute_res_net_all(machine(), color_prom, &dkong3_decode_info, &dkong3_net_info);
palette_set_colors(machine(), 0, rgb, 256); palette_set_colors(machine(), 0, rgb, 256);
palette_normalize_range(machine().palette, 0, 255, 0, 255); machine().palette->normalize_range(0, 255);
auto_free(machine(), rgb); auto_free(machine(), rgb);
color_prom += 1024; color_prom += 1024;

View File

@ -249,7 +249,7 @@ void k001604_device::draw_back_layer( bitmap_rgb32 &bitmap, const rectangle &cli
int ex = cliprect.max_x; int ex = cliprect.max_x;
int ey = cliprect.max_y; int ey = cliprect.max_y;
const rgb_t *clut = palette_entry_list_raw(bitmap.palette()); const rgb_t *clut = bitmap.palette()->entry_list_raw();
int window_x, window_y, window_xmask, window_ymask; int window_x, window_y, window_xmask, window_ymask;

View File

@ -184,17 +184,17 @@ void m62_state::m62_amplify_contrast(palette_t *palette, UINT32 numcolors)
{ {
// m62 palette is very dark, so amplify default contrast // m62 palette is very dark, so amplify default contrast
UINT32 i, ymax=1; UINT32 i, ymax=1;
if (!numcolors) numcolors = palette_get_num_colors(palette); if (!numcolors) numcolors = palette->num_colors();
// find maximum brightness // find maximum brightness
for (i=0;i < numcolors;i++) for (i=0;i < numcolors;i++)
{ {
rgb_t rgb = palette_entry_get_color(palette,i); rgb_t rgb = palette->entry_color(i);
UINT32 y = 299 * RGB_RED(rgb) + 587 * RGB_GREEN(rgb) + 114 * RGB_BLUE(rgb); UINT32 y = 299 * RGB_RED(rgb) + 587 * RGB_GREEN(rgb) + 114 * RGB_BLUE(rgb);
ymax = MAX(ymax, y); ymax = MAX(ymax, y);
} }
palette_set_contrast(palette, 255000.0/ymax); palette->set_contrast(255000.0/ymax);
} }
void m62_state::palette_init() void m62_state::palette_init()

View File

@ -18,7 +18,7 @@
UINT32 malzak_state::screen_update_malzak(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) UINT32 malzak_state::screen_update_malzak(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{ {
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int sx, sy; int sx, sy;
int x,y; int x,y;

View File

@ -74,8 +74,8 @@ void mario_state::palette_init()
palette_set_colors(machine(), 256, rgb, 256); palette_set_colors(machine(), 256, rgb, 256);
auto_free(machine(), rgb); auto_free(machine(), rgb);
palette_normalize_range(machine().palette, 0, 255, 0, 255); machine().palette->normalize_range(0, 255);
palette_normalize_range(machine().palette, 256, 511, 0, 255); machine().palette->normalize_range(256, 511);
} }
WRITE8_MEMBER(mario_state::mario_videoram_w) WRITE8_MEMBER(mario_state::mario_videoram_w)

View File

@ -89,7 +89,7 @@ PALETTE_INIT_MEMBER(phoenix_state,phoenix)
col = ((i << 3 ) & 0x18) | ((i>>2) & 0x07) | (i & 0x60); col = ((i << 3 ) & 0x18) | ((i>>2) & 0x07) | (i & 0x60);
palette_set_color(machine(),i,rgb[col]); palette_set_color(machine(),i,rgb[col]);
} }
palette_normalize_range(machine().palette, 0, 255, 0, 255); machine().palette->normalize_range(0, 255);
auto_free(machine(), rgb); auto_free(machine(), rgb);
} }
@ -107,7 +107,7 @@ PALETTE_INIT_MEMBER(phoenix_state,survival)
col = ((i << 3 ) & 0x18) | ((i>>2) & 0x07) | (i & 0x60); col = ((i << 3 ) & 0x18) | ((i>>2) & 0x07) | (i & 0x60);
palette_set_color(machine(),i,rgb[col]); palette_set_color(machine(),i,rgb[col]);
} }
palette_normalize_range(machine().palette, 0, 255, 0, 255); machine().palette->normalize_range(0, 255);
auto_free(machine(), rgb); auto_free(machine(), rgb);
} }
@ -125,7 +125,7 @@ PALETTE_INIT_MEMBER(phoenix_state,pleiads)
col = ((i << 3 ) & 0x18) | ((i>>2) & 0x07) | (i & 0xE0); col = ((i << 3 ) & 0x18) | ((i>>2) & 0x07) | (i & 0xE0);
palette_set_color(machine(),i,rgb[col]); palette_set_color(machine(),i,rgb[col]);
} }
palette_normalize_range(machine().palette, 0, 255, 0, 255); machine().palette->normalize_range(0, 255);
auto_free(machine(), rgb); auto_free(machine(), rgb);
} }

View File

@ -45,7 +45,7 @@ void popper_state::palette_init()
rgb = compute_res_net_all(machine(), color_prom, &popper_decode_info, &popper_net_info); rgb = compute_res_net_all(machine(), color_prom, &popper_decode_info, &popper_net_info);
palette_set_colors(machine(), 0, rgb, 64); palette_set_colors(machine(), 0, rgb, 64);
palette_normalize_range(machine().palette, 0, 63, 0, 255); machine().palette->normalize_range(0, 63);
auto_free(machine(), rgb); auto_free(machine(), rgb);
} }

View File

@ -396,7 +396,7 @@ UINT32 taitob_state::screen_update_taitob(screen_device &screen, bitmap_ind16 &b
UINT32 taitob_state::screen_update_realpunc(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) UINT32 taitob_state::screen_update_realpunc(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{ {
address_space &space = machine().driver_data()->generic_space(); address_space &space = machine().driver_data()->generic_space();
const rgb_t *palette = palette_entry_list_adjusted(machine().palette); const rgb_t *palette = machine().palette->entry_list_adjusted();
UINT8 video_control = m_tc0180vcu->get_videoctrl(space, 0); UINT8 video_control = m_tc0180vcu->get_videoctrl(space, 0);
int x, y; int x, y;

View File

@ -223,7 +223,7 @@ UINT32 toobin_state::screen_update_toobin(screen_device &screen, bitmap_rgb32 &b
/* draw and merge the MO */ /* draw and merge the MO */
bitmap_ind16 &mobitmap = m_mob->bitmap(); bitmap_ind16 &mobitmap = m_mob->bitmap();
const rgb_t *palette = palette_entry_list_adjusted(machine().palette); const rgb_t *palette = machine().palette->entry_list_adjusted();
for (int y = cliprect.min_y; y <= cliprect.max_y; y++) for (int y = cliprect.min_y; y <= cliprect.max_y; y++)
{ {
UINT32 *dest = &bitmap.pix32(y); UINT32 *dest = &bitmap.pix32(y);

View File

@ -92,7 +92,7 @@ public:
static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels ) static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
{ {
a5105_state *state = device->machine().driver_data<a5105_state>(); a5105_state *state = device->machine().driver_data<a5105_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int xi,gfx; int xi,gfx;
UINT8 pen; UINT8 pen;
@ -110,7 +110,7 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text ) static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
{ {
a5105_state *state = device->machine().driver_data<a5105_state>(); a5105_state *state = device->machine().driver_data<a5105_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int x; int x;
int xi,yi; int xi,yi;
int tile,color; int tile,color;

View File

@ -156,7 +156,7 @@ void alphatro_state::video_start()
static MC6845_UPDATE_ROW( alphatro_update_row ) static MC6845_UPDATE_ROW( alphatro_update_row )
{ {
alphatro_state *state = device->machine().driver_data<alphatro_state>(); alphatro_state *state = device->machine().driver_data<alphatro_state>();
const rgb_t *pens = palette_entry_list_raw(bitmap.palette()); const rgb_t *pens = bitmap.palette()->entry_list_raw();
bool palette = BIT(state->ioport("CONFIG")->read(), 5); bool palette = BIT(state->ioport("CONFIG")->read(), 5);
UINT8 chr,gfx,attr,fg,inv; UINT8 chr,gfx,attr,fg,inv;
UINT16 mem,x; UINT16 mem,x;

View File

@ -190,7 +190,7 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text ) static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
{ {
apc_state *state = device->machine().driver_data<apc_state>(); apc_state *state = device->machine().driver_data<apc_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int xi,yi,yi_trans; int xi,yi,yi_trans;
int x; int x;
UINT8 char_size; UINT8 char_size;

View File

@ -774,7 +774,7 @@ static MC6845_UPDATE_ROW( applix_update_row )
// Need to display a border colour. // Need to display a border colour.
// There is a monochrome mode, but no info found as yet. // There is a monochrome mode, but no info found as yet.
applix_state *state = device->machine().driver_data<applix_state>(); applix_state *state = device->machine().driver_data<applix_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 i; UINT8 i;
UINT16 chr,x; UINT16 chr,x;
UINT32 mem, vidbase = (state->m_video_latch & 15) << 14, *p = &bitmap.pix32(y); UINT32 mem, vidbase = (state->m_video_latch & 15) << 14, *p = &bitmap.pix32(y);

View File

@ -585,7 +585,7 @@ GFXDECODE_END
MC6845_UPDATE_ROW( bigbord2_update_row ) MC6845_UPDATE_ROW( bigbord2_update_row )
{ {
bigbord2_state *state = device->machine().driver_data<bigbord2_state>(); bigbord2_state *state = device->machine().driver_data<bigbord2_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 chr,gfx,inv; UINT8 chr,gfx,inv;
UINT16 mem,x; UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);

View File

@ -586,7 +586,7 @@ INPUT_PORTS_END
static MC6845_UPDATE_ROW( update_row ) static MC6845_UPDATE_ROW( update_row )
{ {
bml3_state *state = device->machine().driver_data<bml3_state>(); bml3_state *state = device->machine().driver_data<bml3_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
// The MB-6890 has a 5-bit colour RAM region. The meaning of the bits are: // The MB-6890 has a 5-bit colour RAM region. The meaning of the bits are:
// 0: blue // 0: blue
// 1: red // 1: red

View File

@ -384,7 +384,7 @@ void camplynx_state::palette_init()
static MC6845_UPDATE_ROW( lynx48k_update_row ) static MC6845_UPDATE_ROW( lynx48k_update_row )
{ {
UINT8 *RAM = device->machine().root_device().memregion("maincpu")->base(); UINT8 *RAM = device->machine().root_device().memregion("maincpu")->base();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 r,g,b; UINT8 r,g,b;
UINT32 x, *p = &bitmap.pix32(y); UINT32 x, *p = &bitmap.pix32(y);
@ -408,7 +408,7 @@ static MC6845_UPDATE_ROW( lynx48k_update_row )
static MC6845_UPDATE_ROW( lynx128k_update_row ) static MC6845_UPDATE_ROW( lynx128k_update_row )
{ {
UINT8 *RAM = device->machine().root_device().memregion("maincpu")->base(); UINT8 *RAM = device->machine().root_device().memregion("maincpu")->base();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 r,g,b; UINT8 r,g,b;
UINT32 x, *p = &bitmap.pix32(y); UINT32 x, *p = &bitmap.pix32(y);

View File

@ -225,7 +225,7 @@ void dim68k_state::video_start()
MC6845_UPDATE_ROW( dim68k_update_row ) MC6845_UPDATE_ROW( dim68k_update_row )
{ {
dim68k_state *state = device->machine().driver_data<dim68k_state>(); dim68k_state *state = device->machine().driver_data<dim68k_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 chr,gfx,x,xx,inv; UINT8 chr,gfx,x,xx,inv;
UINT16 chr16=0x2020; // set to spaces if screen is off UINT16 chr16=0x2020; // set to spaces if screen is off
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);

View File

@ -151,7 +151,7 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text ) static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
{ {
dmv_state *state = device->machine().driver_data<dmv_state>(); dmv_state *state = device->machine().driver_data<dmv_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 * chargen = state->memregion("maincpu")->base() + 0x1000; UINT8 * chargen = state->memregion("maincpu")->base() + 0x1000;
for( int x = 0; x < pitch; x++ ) for( int x = 0; x < pitch; x++ )

View File

@ -134,7 +134,7 @@ void ec65_state::video_start()
static MC6845_UPDATE_ROW( ec65_update_row ) static MC6845_UPDATE_ROW( ec65_update_row )
{ {
ec65_state *state = device->machine().driver_data<ec65_state>(); ec65_state *state = device->machine().driver_data<ec65_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 chr,gfx,inv; UINT8 chr,gfx,inv;
UINT16 mem,x; UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);

View File

@ -102,7 +102,7 @@ READ8_MEMBER(einstein_state::einstein_80col_ram_r)
static MC6845_UPDATE_ROW( einstein_6845_update_row ) static MC6845_UPDATE_ROW( einstein_6845_update_row )
{ {
einstein_state *einstein = device->machine().driver_data<einstein_state>(); einstein_state *einstein = device->machine().driver_data<einstein_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 *data = einstein->m_region_gfx1->base(); UINT8 *data = einstein->m_region_gfx1->base();
UINT8 char_code, data_byte; UINT8 char_code, data_byte;
int i, x; int i, x;

View File

@ -321,7 +321,7 @@ void h19_state::video_start()
static MC6845_UPDATE_ROW( h19_update_row ) static MC6845_UPDATE_ROW( h19_update_row )
{ {
h19_state *state = device->machine().driver_data<h19_state>(); h19_state *state = device->machine().driver_data<h19_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 chr,gfx; UINT8 chr,gfx;
UINT16 mem,x; UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);

View File

@ -32,7 +32,7 @@ public:
static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels ) static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
{ {
if800_state *state = device->machine().driver_data<if800_state>(); if800_state *state = device->machine().driver_data<if800_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int xi,gfx; int xi,gfx;
UINT8 pen; UINT8 pen;

View File

@ -81,7 +81,7 @@ static I8275_DISPLAY_PIXELS(ipds_display_pixels)
{ {
int i; int i;
ipds_state *state = device->machine().driver_data<ipds_state>(); ipds_state *state = device->machine().driver_data<ipds_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 *charmap = state->memregion("chargen")->base(); UINT8 *charmap = state->memregion("chargen")->base();
UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;

View File

@ -197,7 +197,7 @@ static MC6845_UPDATE_ROW( lola8a_update_row )
{ {
lola8a_state *state = device->machine().driver_data<lola8a_state>(); lola8a_state *state = device->machine().driver_data<lola8a_state>();
address_space &program = state->m_maincpu->space(AS_PROGRAM); address_space &program = state->m_maincpu->space(AS_PROGRAM);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
for (int sx = 0; sx < x_count; sx++) for (int sx = 0; sx < x_count; sx++)
{ {

View File

@ -106,7 +106,7 @@ static ACIA6850_INTERFACE( acia_intf )
static MC6845_UPDATE_ROW( update_row ) static MC6845_UPDATE_ROW( update_row )
{ {
mx2178_state *state = device->machine().driver_data<mx2178_state>(); mx2178_state *state = device->machine().driver_data<mx2178_state>();
const rgb_t *pens = palette_entry_list_raw(bitmap.palette()); const rgb_t *pens = bitmap.palette()->entry_list_raw();
UINT8 chr,gfx; UINT8 chr,gfx;
UINT16 mem,x; UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);

View File

@ -130,7 +130,7 @@ void mycom_state::video_start()
static MC6845_UPDATE_ROW( mycom_update_row ) static MC6845_UPDATE_ROW( mycom_update_row )
{ {
mycom_state *state = device->machine().driver_data<mycom_state>(); mycom_state *state = device->machine().driver_data<mycom_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 chr,gfx=0,z; UINT8 chr,gfx=0,z;
UINT16 mem,x; UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);

View File

@ -147,7 +147,7 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text ) static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
{ {
mz3500_state *state = device->machine().driver_data<mz3500_state>(); mz3500_state *state = device->machine().driver_data<mz3500_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int x; int x;
int xi,yi; int xi,yi;
int tile; int tile;

View File

@ -37,7 +37,7 @@ public:
static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels ) static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
{ {
mz6500_state *state = device->machine().driver_data<mz6500_state>(); mz6500_state *state = device->machine().driver_data<mz6500_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int gfx[3]; int gfx[3];
UINT8 i,pen; UINT8 i,pen;

View File

@ -86,7 +86,7 @@ void pasopia_state::video_start()
MC6845_UPDATE_ROW( pasopia_update_row ) MC6845_UPDATE_ROW( pasopia_update_row )
{ {
pasopia_state *state = device->machine().driver_data<pasopia_state>(); pasopia_state *state = device->machine().driver_data<pasopia_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 *m_p_chargen = state->memregion("chargen")->base(); UINT8 *m_p_chargen = state->memregion("chargen")->base();
UINT8 chr,gfx,fg=7,bg=0; // colours need to be determined UINT8 chr,gfx,fg=7,bg=0; // colours need to be determined
UINT16 mem,x; UINT16 mem,x;

View File

@ -787,7 +787,7 @@ UINT32 pc9801_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels ) static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
{ {
pc9801_state *state = device->machine().driver_data<pc9801_state>(); pc9801_state *state = device->machine().driver_data<pc9801_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int xi; int xi;
int res_x,res_y; int res_x,res_y;
UINT8 pen; UINT8 pen;
@ -849,7 +849,7 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text ) static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
{ {
pc9801_state *state = device->machine().driver_data<pc9801_state>(); pc9801_state *state = device->machine().driver_data<pc9801_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int xi,yi; int xi,yi;
int x; int x;
UINT8 char_size; UINT8 char_size;

View File

@ -385,7 +385,7 @@ void pyl601_state::video_start()
static MC6845_UPDATE_ROW( pyl601_update_row ) static MC6845_UPDATE_ROW( pyl601_update_row )
{ {
pyl601_state *state = device->machine().driver_data<pyl601_state>(); pyl601_state *state = device->machine().driver_data<pyl601_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 *charrom = state->memregion("chargen")->base(); UINT8 *charrom = state->memregion("chargen")->base();
int column, bit, i; int column, bit, i;
@ -428,7 +428,7 @@ static MC6845_UPDATE_ROW( pyl601_update_row )
static MC6845_UPDATE_ROW( pyl601a_update_row ) static MC6845_UPDATE_ROW( pyl601a_update_row )
{ {
pyl601_state *state = device->machine().driver_data<pyl601_state>(); pyl601_state *state = device->machine().driver_data<pyl601_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 *charrom = state->memregion("chargen")->base(); UINT8 *charrom = state->memregion("chargen")->base();
int column, bit, i; int column, bit, i;

View File

@ -152,7 +152,7 @@ public:
static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels ) static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
{ {
qx10_state *state = device->machine().driver_data<qx10_state>(); qx10_state *state = device->machine().driver_data<qx10_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int xi,gfx[3]; int xi,gfx[3];
UINT8 pen; UINT8 pen;
@ -182,7 +182,7 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text ) static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
{ {
qx10_state *state = device->machine().driver_data<qx10_state>(); qx10_state *state = device->machine().driver_data<qx10_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int x; int x;
int xi,yi; int xi,yi;
int tile; int tile;

View File

@ -508,7 +508,7 @@ void samcoupe_state::palette_init()
palette_set_color(machine(), i, MAKE_RGB(r, g, b)); palette_set_color(machine(), i, MAKE_RGB(r, g, b));
} }
palette_normalize_range(machine().palette, 0, 127, 0, 255); machine().palette->normalize_range(0, 127);
} }

View File

@ -407,7 +407,7 @@ UINT32 sapi1_state::screen_update_sapi3(screen_device &screen, bitmap_ind16 &bit
static MC6845_UPDATE_ROW( update_row ) static MC6845_UPDATE_ROW( update_row )
{ {
sapi1_state *state = device->machine().driver_data<sapi1_state>(); sapi1_state *state = device->machine().driver_data<sapi1_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 chr,gfx,inv; UINT8 chr,gfx,inv;
UINT16 mem,x; UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);

View File

@ -88,7 +88,7 @@ static I8275_DISPLAY_PIXELS(sm1800_display_pixels)
{ {
int i; int i;
sm1800_state *state = device->machine().driver_data<sm1800_state>(); sm1800_state *state = device->machine().driver_data<sm1800_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 *charmap = state->memregion("chargen")->base(); UINT8 *charmap = state->memregion("chargen")->base();
UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
if (vsp) if (vsp)

View File

@ -199,7 +199,7 @@ WRITE8_MEMBER( tavernie_state::ds_w )
static MC6845_UPDATE_ROW( update_row ) static MC6845_UPDATE_ROW( update_row )
{ {
tavernie_state *state = device->machine().driver_data<tavernie_state>(); tavernie_state *state = device->machine().driver_data<tavernie_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 chr,gfx=0; UINT8 chr,gfx=0;
UINT16 mem,x; UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);

View File

@ -394,7 +394,7 @@ INPUT_PORTS_END
UINT32 tiki100_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) UINT32 tiki100_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{ {
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT16 addr = (m_scroll << 7); UINT16 addr = (m_scroll << 7);
int sx, y, pixel, mode = (m_mode >> 4) & 0x03; int sx, y, pixel, mode = (m_mode >> 4) & 0x03;

View File

@ -82,7 +82,7 @@ static I8275_DISPLAY_PIXELS(tim100_display_pixels)
{ {
tim100_state *state = device->machine().driver_data<tim100_state>(); tim100_state *state = device->machine().driver_data<tim100_state>();
int i; int i;
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 *charmap = state->memregion("chargen")->base(); UINT8 *charmap = state->memregion("chargen")->base();
UINT8 pixels = charmap[(linecount & 15) + (charcode << 4)]; UINT8 pixels = charmap[(linecount & 15) + (charcode << 4)];
if (vsp) if (vsp)

View File

@ -513,7 +513,7 @@ void tvc_state::machine_reset()
static MC6845_UPDATE_ROW( tvc_update_row ) static MC6845_UPDATE_ROW( tvc_update_row )
{ {
tvc_state *state = device->machine().driver_data<tvc_state>(); tvc_state *state = device->machine().driver_data<tvc_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
UINT8 *vram = state->memregion("vram")->base() + ((state->m_vram_bank & 0x30)<<10); UINT8 *vram = state->memregion("vram")->base() + ((state->m_vram_bank & 0x30)<<10);
UINT16 offset = ((ma*4 + ra*0x40) & 0x3fff); UINT16 offset = ((ma*4 + ra*0x40) & 0x3fff);

View File

@ -252,7 +252,7 @@ WRITE8_MEMBER( unior_state::scroll_w )
static I8275_DISPLAY_PIXELS(display_pixels) static I8275_DISPLAY_PIXELS(display_pixels)
{ {
unior_state *state = device->machine().driver_data<unior_state>(); unior_state *state = device->machine().driver_data<unior_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 gfx = state->m_p_chargen[(linecount & 7) | (charcode << 3)]; UINT8 gfx = state->m_p_chargen[(linecount & 7) | (charcode << 3)];
if (vsp) if (vsp)
gfx = 0; gfx = 0;

View File

@ -160,7 +160,7 @@ GFXDECODE_END
MC6845_UPDATE_ROW( v6809_update_row ) MC6845_UPDATE_ROW( v6809_update_row )
{ {
v6809_state *state = device->machine().driver_data<v6809_state>(); v6809_state *state = device->machine().driver_data<v6809_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 chr,gfx; UINT8 chr,gfx;
UINT16 mem,x; UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);

View File

@ -268,7 +268,7 @@ static MC6845_UPDATE_ROW( victor9k_update_row )
{ {
victor9k_state *state = device->machine().driver_data<victor9k_state>(); victor9k_state *state = device->machine().driver_data<victor9k_state>();
address_space &program = state->m_maincpu->space(AS_PROGRAM); address_space &program = state->m_maincpu->space(AS_PROGRAM);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
if (BIT(ma, 13)) if (BIT(ma, 13))
{ {

View File

@ -278,7 +278,7 @@ static I8275_DISPLAY_PIXELS( zorba_update_chr )
{ {
int i; int i;
zorba_state *state = device->machine().driver_data<zorba_state>(); zorba_state *state = device->machine().driver_data<zorba_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 gfx = state->m_p_chargen[(linecount & 15) + (charcode << 4)]; UINT8 gfx = state->m_p_chargen[(linecount & 15) + (charcode << 4)];
if (vsp) if (vsp)

View File

@ -214,7 +214,7 @@ void zrt80_state::video_start()
static MC6845_UPDATE_ROW( zrt80_update_row ) static MC6845_UPDATE_ROW( zrt80_update_row )
{ {
zrt80_state *state = device->machine().driver_data<zrt80_state>(); zrt80_state *state = device->machine().driver_data<zrt80_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 chr,gfx,inv; UINT8 chr,gfx,inv;
UINT16 mem,x; UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);

View File

@ -326,7 +326,7 @@ READ8_MEMBER(svi318_state::svi318_fdc_irqdrq_r)
MC6845_UPDATE_ROW( svi806_crtc6845_update_row ) MC6845_UPDATE_ROW( svi806_crtc6845_update_row )
{ {
svi318_state *state = device->machine().driver_data<svi318_state>(); svi318_state *state = device->machine().driver_data<svi318_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int i; int i;
for( i = 0; i < x_count; i++ ) for( i = 0; i < x_count; i++ )

View File

@ -165,7 +165,7 @@ WRITE8_MEMBER(bbc_state::bbc_videoULA_w)
static MC6845_UPDATE_ROW( vid_update_row ) static MC6845_UPDATE_ROW( vid_update_row )
{ {
bbc_state *state = device->machine().driver_data<bbc_state>(); bbc_state *state = device->machine().driver_data<bbc_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
if (state->m_videoULA_teletext_normal_select) if (state->m_videoULA_teletext_normal_select)
{ {

View File

@ -99,7 +99,7 @@ the access to the video memory is unclear to me at the moment.
static MC6845_UPDATE_ROW( dgnbeta_update_row ) static MC6845_UPDATE_ROW( dgnbeta_update_row )
{ {
dgn_beta_state *state = device->machine().driver_data<dgn_beta_state>(); dgn_beta_state *state = device->machine().driver_data<dgn_beta_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 *videoram = state->m_videoram; UINT8 *videoram = state->m_videoram;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
int i; int i;

View File

@ -206,7 +206,7 @@ void ef9345_device::draw_char_40(UINT8 *c, UINT16 x, UINT16 y)
if (y * 10 >= m_screen->height() || x * 8 >= m_screen->width()) if (y * 10 >= m_screen->height() || x * 8 >= m_screen->width())
return; return;
const rgb_t *palette = palette_entry_list_raw(m_screen_out.palette()); const rgb_t *palette = m_screen_out.palette()->entry_list_raw();
for(int i = 0; i < 10; i++) for(int i = 0; i < 10; i++)
for(int j = 0; j < 8; j++) for(int j = 0; j < 8; j++)
m_screen_out.pix32(y * 10 + i, x * 8 + j) = palette[c[8 * i + j] & 0x07]; m_screen_out.pix32(y * 10 + i, x * 8 + j) = palette[c[8 * i + j] & 0x07];
@ -219,7 +219,7 @@ void ef9345_device::draw_char_80(UINT8 *c, UINT16 x, UINT16 y)
if (y * 10 >= m_screen->height() || x * 6 >= m_screen->width()) if (y * 10 >= m_screen->height() || x * 6 >= m_screen->width())
return; return;
const rgb_t *palette = palette_entry_list_raw(m_screen_out.palette()); const rgb_t *palette = m_screen_out.palette()->entry_list_raw();
for(int i = 0; i < 10; i++) for(int i = 0; i < 10; i++)
for(int j = 0; j < 6; j++) for(int j = 0; j < 6; j++)
m_screen_out.pix32(y * 10 + i, x * 6 + j) = palette[c[6 * i + j] & 0x07]; m_screen_out.pix32(y * 10 + i, x * 6 + j) = palette[c[6 * i + j] & 0x07];

View File

@ -841,7 +841,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_update_row )
isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner()); isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner());
UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT8 *videoram = cga->m_vram + cga->m_start_offset;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -882,7 +882,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_comp_grey_update_row )
isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner()); isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner());
UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT8 *videoram = cga->m_vram + cga->m_start_offset;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -922,7 +922,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_alt_update_row )
isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner()); isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner());
UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT8 *videoram = cga->m_vram + cga->m_start_offset;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -962,7 +962,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_update_row )
isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner()); isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner());
UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT8 *videoram = cga->m_vram + cga->m_start_offset;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -1007,7 +1007,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_update_row_si )
isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner()); isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner());
UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT8 *videoram = cga->m_vram + cga->m_start_offset;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -1060,7 +1060,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_alt_update_row )
isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner()); isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner());
UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT8 *videoram = cga->m_vram + cga->m_start_offset;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -1109,7 +1109,7 @@ static MC6845_UPDATE_ROW( cga_gfx_4bppl_update_row )
isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner()); isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner());
UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT8 *videoram = cga->m_vram + cga->m_start_offset;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -1168,7 +1168,7 @@ static MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row )
isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner()); isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner());
UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT8 *videoram = cga->m_vram + cga->m_start_offset;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -1213,7 +1213,7 @@ static MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row )
isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner()); isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner());
UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT8 *videoram = cga->m_vram + cga->m_start_offset;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -1250,7 +1250,7 @@ static MC6845_UPDATE_ROW( cga_gfx_1bpp_update_row )
isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner()); isa8_cga_device *cga = downcast<isa8_cga_device *>(device->owner());
UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT8 *videoram = cga->m_vram + cga->m_start_offset;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 fg = cga->m_color_select & 0x0F; UINT8 fg = cga->m_color_select & 0x0F;
int i; int i;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -1720,7 +1720,7 @@ static MC6845_UPDATE_ROW( pc1512_gfx_4bpp_update_row )
isa8_cga_pc1512_device *cga = downcast<isa8_cga_pc1512_device *>(device->owner()); isa8_cga_pc1512_device *cga = downcast<isa8_cga_pc1512_device *>(device->owner());
UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT8 *videoram = cga->m_vram + cga->m_start_offset;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT16 offset_base = ra << 13; UINT16 offset_base = ra << 13;
int j; int j;
running_machine &machine = device->machine(); running_machine &machine = device->machine();
@ -2084,7 +2084,7 @@ void isa8_wyse700_device::device_reset()
UINT32 isa8_wyse700_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) UINT32 isa8_wyse700_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{ {
if (m_control & 0x08) { if (m_control & 0x08) {
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 fg = m_color_select & 0x0F; UINT8 fg = m_color_select & 0x0F;
UINT32 addr = 0; UINT32 addr = 0;
for (int y = 0; y < 800; y++) { for (int y = 0; y < 800; y++) {

View File

@ -211,7 +211,7 @@ void isa8_mda_device::device_reset()
static MC6845_UPDATE_ROW( mda_text_inten_update_row ) static MC6845_UPDATE_ROW( mda_text_inten_update_row )
{ {
isa8_mda_device *mda = downcast<isa8_mda_device *>(device->owner()); isa8_mda_device *mda = downcast<isa8_mda_device *>(device->owner());
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra; UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
int i; int i;
@ -285,7 +285,7 @@ static MC6845_UPDATE_ROW( mda_text_inten_update_row )
static MC6845_UPDATE_ROW( mda_text_blink_update_row ) static MC6845_UPDATE_ROW( mda_text_blink_update_row )
{ {
isa8_mda_device *mda = downcast<isa8_mda_device *>(device->owner()); isa8_mda_device *mda = downcast<isa8_mda_device *>(device->owner());
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra; UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
int i; int i;
@ -608,7 +608,7 @@ void isa8_hercules_device::device_reset()
static MC6845_UPDATE_ROW( hercules_gfx_update_row ) static MC6845_UPDATE_ROW( hercules_gfx_update_row )
{ {
isa8_hercules_device *herc = downcast<isa8_hercules_device *>(device->owner()); isa8_hercules_device *herc = downcast<isa8_hercules_device *>(device->owner());
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
UINT16 gfx_base = ( ( herc->m_mode_control & 0x80 ) ? 0x8000 : 0x0000 ) | ( ( ra & 0x03 ) << 13 ); UINT16 gfx_base = ( ( herc->m_mode_control & 0x80 ) ? 0x8000 : 0x0000 ) | ( ( ra & 0x03 ) << 13 );
int i; int i;

View File

@ -137,7 +137,7 @@ UINT32 kaypro_state::screen_update_kaypro2x(screen_device &screen, bitmap_rgb32
MC6845_UPDATE_ROW( kaypro2x_update_row ) MC6845_UPDATE_ROW( kaypro2x_update_row )
{ {
kaypro_state *state = device->machine().driver_data<kaypro_state>(); kaypro_state *state = device->machine().driver_data<kaypro_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
UINT16 x; UINT16 x;
UINT8 gfx,fg,bg; UINT8 gfx,fg,bg;

View File

@ -90,7 +90,7 @@ static void video_debug(running_machine &machine, int ref, int params, const cha
static MC6845_UPDATE_ROW( vid_update_row ) static MC6845_UPDATE_ROW( vid_update_row )
{ {
mbc55x_state *mstate = device->machine().driver_data<mbc55x_state>(); mbc55x_state *mstate = device->machine().driver_data<mbc55x_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 *ram = &mstate->m_ram->pointer()[0]; UINT8 *ram = &mstate->m_ram->pointer()[0];
UINT8 *red = &mstate->m_video_mem[RED_PLANE_OFFSET]; UINT8 *red = &mstate->m_video_mem[RED_PLANE_OFFSET];

View File

@ -419,7 +419,7 @@ MC6845_ON_UPDATE_ADDR_CHANGED( mbee256_update_addr )
MC6845_UPDATE_ROW( mbee_update_row ) MC6845_UPDATE_ROW( mbee_update_row )
{ {
mbee_state *state = device->machine().driver_data<mbee_state>(); mbee_state *state = device->machine().driver_data<mbee_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 chr,gfx; UINT8 chr,gfx;
UINT16 mem,x; UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
@ -458,7 +458,7 @@ MC6845_UPDATE_ROW( mbee_update_row )
MC6845_UPDATE_ROW( mbeeic_update_row ) MC6845_UPDATE_ROW( mbeeic_update_row )
{ {
mbee_state *state = device->machine().driver_data<mbee_state>(); mbee_state *state = device->machine().driver_data<mbee_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 chr,gfx,fg,bg; UINT8 chr,gfx,fg,bg;
UINT16 mem,x,col; UINT16 mem,x,col;
UINT16 colourm = (state->m_08 & 0x0e) << 7; UINT16 colourm = (state->m_08 & 0x0e) << 7;
@ -502,7 +502,7 @@ MC6845_UPDATE_ROW( mbeeic_update_row )
MC6845_UPDATE_ROW( mbeeppc_update_row ) MC6845_UPDATE_ROW( mbeeppc_update_row )
{ {
mbee_state *state = device->machine().driver_data<mbee_state>(); mbee_state *state = device->machine().driver_data<mbee_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 gfx,fg,bg; UINT8 gfx,fg,bg;
UINT16 mem,x,col,chr; UINT16 mem,x,col,chr;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);

View File

@ -124,7 +124,7 @@ static WRITE_LINE_DEVICE_HANDLER( aga_vsync_changed ) {
/* colors need fixing in the mda_text_* functions ! */ /* colors need fixing in the mda_text_* functions ! */
static MC6845_UPDATE_ROW( mda_text_inten_update_row ) { static MC6845_UPDATE_ROW( mda_text_inten_update_row ) {
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 *videoram = aga.videoram; UINT8 *videoram = aga.videoram;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra; UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
@ -185,7 +185,7 @@ static MC6845_UPDATE_ROW( mda_text_inten_update_row ) {
static MC6845_UPDATE_ROW( mda_text_blink_update_row ) { static MC6845_UPDATE_ROW( mda_text_blink_update_row ) {
UINT8 *videoram = aga.videoram; UINT8 *videoram = aga.videoram;
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra; UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
int i; int i;
@ -246,7 +246,7 @@ static MC6845_UPDATE_ROW( mda_text_blink_update_row ) {
static MC6845_UPDATE_ROW( cga_text_inten_update_row ) { static MC6845_UPDATE_ROW( cga_text_inten_update_row ) {
UINT8 *videoram = aga.videoram; UINT8 *videoram = aga.videoram;
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
int i; int i;
@ -275,7 +275,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_update_row ) {
} }
static MC6845_UPDATE_ROW( cga_text_inten_alt_update_row ) { static MC6845_UPDATE_ROW( cga_text_inten_alt_update_row ) {
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 *videoram = aga.videoram; UINT8 *videoram = aga.videoram;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
int i; int i;
@ -304,7 +304,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_alt_update_row ) {
} }
static MC6845_UPDATE_ROW( cga_text_blink_update_row ) { static MC6845_UPDATE_ROW( cga_text_blink_update_row ) {
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 *videoram = aga.videoram; UINT8 *videoram = aga.videoram;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
int i; int i;
@ -337,7 +337,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_update_row ) {
} }
static MC6845_UPDATE_ROW( cga_text_blink_alt_update_row ) { static MC6845_UPDATE_ROW( cga_text_blink_alt_update_row ) {
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 *videoram = aga.videoram; UINT8 *videoram = aga.videoram;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
int i; int i;
@ -372,7 +372,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_alt_update_row ) {
} }
static MC6845_UPDATE_ROW( cga_gfx_4bppl_update_row ) { static MC6845_UPDATE_ROW( cga_gfx_4bppl_update_row ) {
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 *videoram = aga.videoram; UINT8 *videoram = aga.videoram;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
int i; int i;
@ -398,7 +398,7 @@ static MC6845_UPDATE_ROW( cga_gfx_4bppl_update_row ) {
static MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row ) { static MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row ) {
UINT8 *videoram = aga.videoram; UINT8 *videoram = aga.videoram;
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
int i; int i;
@ -431,7 +431,7 @@ static MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row ) {
static MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row ) { static MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row ) {
UINT8 *videoram = aga.videoram; UINT8 *videoram = aga.videoram;
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
int i; int i;
@ -456,7 +456,7 @@ static MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row ) {
static MC6845_UPDATE_ROW( cga_gfx_1bpp_update_row ) { static MC6845_UPDATE_ROW( cga_gfx_1bpp_update_row ) {
UINT8 *videoram = aga.videoram; UINT8 *videoram = aga.videoram;
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
UINT8 fg = aga.cga_color_select & 0x0F; UINT8 fg = aga.cga_color_select & 0x0F;
int i; int i;

View File

@ -182,7 +182,7 @@ PALETTE_INIT_MEMBER( pc_t1t_device, pcjr )
static MC6845_UPDATE_ROW( t1000_text_inten_update_row ) static MC6845_UPDATE_ROW( t1000_text_inten_update_row )
{ {
pc_t1t_device *t1t = downcast<pc_t1t_device *>(device->owner()); pc_t1t_device *t1t = downcast<pc_t1t_device *>(device->owner());
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
int i; int i;
@ -216,7 +216,7 @@ static MC6845_UPDATE_ROW( t1000_text_inten_update_row )
static MC6845_UPDATE_ROW( t1000_text_blink_update_row ) static MC6845_UPDATE_ROW( t1000_text_blink_update_row )
{ {
pc_t1t_device *t1t = downcast<pc_t1t_device *>(device->owner()); pc_t1t_device *t1t = downcast<pc_t1t_device *>(device->owner());
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
int i; int i;
@ -258,7 +258,7 @@ static MC6845_UPDATE_ROW( t1000_text_blink_update_row )
static MC6845_UPDATE_ROW( pcjx_text_update_row ) static MC6845_UPDATE_ROW( pcjx_text_update_row )
{ {
pcvideo_pcjr_device *pcjx = downcast<pcvideo_pcjr_device *>(device->owner()); pcvideo_pcjr_device *pcjx = downcast<pcvideo_pcjr_device *>(device->owner());
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
int i; int i;
@ -300,7 +300,7 @@ static MC6845_UPDATE_ROW( pcjx_text_update_row )
static MC6845_UPDATE_ROW( t1000_gfx_4bpp_update_row ) static MC6845_UPDATE_ROW( t1000_gfx_4bpp_update_row )
{ {
pc_t1t_device *t1t = downcast<pc_t1t_device *>(device->owner()); pc_t1t_device *t1t = downcast<pc_t1t_device *>(device->owner());
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
UINT8 *vid = t1t->m_displayram + ( ra << 13 ); UINT8 *vid = t1t->m_displayram + ( ra << 13 );
int i; int i;
@ -328,7 +328,7 @@ static MC6845_UPDATE_ROW( t1000_gfx_4bpp_update_row )
static MC6845_UPDATE_ROW( t1000_gfx_2bpp_update_row ) static MC6845_UPDATE_ROW( t1000_gfx_2bpp_update_row )
{ {
pc_t1t_device *t1t = downcast<pc_t1t_device *>(device->owner()); pc_t1t_device *t1t = downcast<pc_t1t_device *>(device->owner());
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
UINT8 *vid = t1t->m_displayram + ( ra << 13 ); UINT8 *vid = t1t->m_displayram + ( ra << 13 );
int i; int i;
@ -356,7 +356,7 @@ static MC6845_UPDATE_ROW( t1000_gfx_2bpp_update_row )
static MC6845_UPDATE_ROW( pcjr_gfx_2bpp_high_update_row ) static MC6845_UPDATE_ROW( pcjr_gfx_2bpp_high_update_row )
{ {
pcvideo_pcjr_device *pcjr = downcast<pcvideo_pcjr_device *>(device->owner()); pcvideo_pcjr_device *pcjr = downcast<pcvideo_pcjr_device *>(device->owner());
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
UINT8 *vid = pcjr->m_displayram + ( ra << 13 ); UINT8 *vid = pcjr->m_displayram + ( ra << 13 );
int i; int i;
@ -382,7 +382,7 @@ static MC6845_UPDATE_ROW( pcjr_gfx_2bpp_high_update_row )
static MC6845_UPDATE_ROW( t1000_gfx_2bpp_tga_update_row ) static MC6845_UPDATE_ROW( t1000_gfx_2bpp_tga_update_row )
{ {
pc_t1t_device *t1t = downcast<pc_t1t_device *>(device->owner()); pc_t1t_device *t1t = downcast<pc_t1t_device *>(device->owner());
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
UINT8 *vid = t1t->m_displayram + ( ra << 13 ); UINT8 *vid = t1t->m_displayram + ( ra << 13 );
int i; int i;
@ -410,7 +410,7 @@ static MC6845_UPDATE_ROW( t1000_gfx_2bpp_tga_update_row )
static MC6845_UPDATE_ROW( t1000_gfx_1bpp_update_row ) static MC6845_UPDATE_ROW( t1000_gfx_1bpp_update_row )
{ {
pc_t1t_device *t1t = downcast<pc_t1t_device *>(device->owner()); pc_t1t_device *t1t = downcast<pc_t1t_device *>(device->owner());
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);
UINT8 *vid = t1t->m_displayram + ( ra << 13 ); UINT8 *vid = t1t->m_displayram + ( ra << 13 );
UINT8 fg = t1t->m_palette_base + t1t->m_reg.data[0x11]; UINT8 fg = t1t->m_palette_base + t1t->m_reg.data[0x11];

View File

@ -184,7 +184,7 @@ void p1_state::set_palette_luts(void)
POISK1_UPDATE_ROW( p1_state::cga_gfx_2bpp_update_row ) POISK1_UPDATE_ROW( p1_state::cga_gfx_2bpp_update_row )
{ {
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(ra); UINT32 *p = &bitmap.pix32(ra);
UINT16 odd, offset; UINT16 odd, offset;
int i; int i;
@ -211,7 +211,7 @@ POISK1_UPDATE_ROW( p1_state::cga_gfx_2bpp_update_row )
POISK1_UPDATE_ROW( p1_state::cga_gfx_1bpp_update_row ) POISK1_UPDATE_ROW( p1_state::cga_gfx_1bpp_update_row )
{ {
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(ra); UINT32 *p = &bitmap.pix32(ra);
UINT8 fg = 15, bg = BG_COLOR(m_video.color_select_68); UINT8 fg = 15, bg = BG_COLOR(m_video.color_select_68);
UINT16 odd, offset; UINT16 odd, offset;
@ -243,7 +243,7 @@ POISK1_UPDATE_ROW( p1_state::cga_gfx_1bpp_update_row )
POISK1_UPDATE_ROW( p1_state::poisk1_gfx_1bpp_update_row ) POISK1_UPDATE_ROW( p1_state::poisk1_gfx_1bpp_update_row )
{ {
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(ra); UINT32 *p = &bitmap.pix32(ra);
UINT8 fg, bg = BG_COLOR(m_video.color_select_68); UINT8 fg, bg = BG_COLOR(m_video.color_select_68);
UINT16 odd, offset; UINT16 odd, offset;

View File

@ -15,7 +15,7 @@ I8275_DISPLAY_PIXELS(radio86_display_pixels)
{ {
radio86_state *state = device->machine().driver_data<radio86_state>(); radio86_state *state = device->machine().driver_data<radio86_state>();
int i; int i;
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
const UINT8 *charmap = state->m_charmap; const UINT8 *charmap = state->m_charmap;
UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
if (vsp) { if (vsp) {
@ -37,7 +37,7 @@ I8275_DISPLAY_PIXELS(mikrosha_display_pixels)
{ {
radio86_state *state = device->machine().driver_data<radio86_state>(); radio86_state *state = device->machine().driver_data<radio86_state>();
int i; int i;
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
const UINT8 *charmap = state->m_charmap + (state->m_mikrosha_font_page & 1) * 0x400; const UINT8 *charmap = state->m_charmap + (state->m_mikrosha_font_page & 1) * 0x400;
UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
if (vsp) { if (vsp) {
@ -58,7 +58,7 @@ I8275_DISPLAY_PIXELS(apogee_display_pixels)
{ {
radio86_state *state = device->machine().driver_data<radio86_state>(); radio86_state *state = device->machine().driver_data<radio86_state>();
int i; int i;
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
const UINT8 *charmap = state->m_charmap + (gpa & 1) * 0x400; const UINT8 *charmap = state->m_charmap + (gpa & 1) * 0x400;
UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
if (vsp) { if (vsp) {
@ -79,7 +79,7 @@ I8275_DISPLAY_PIXELS(partner_display_pixels)
{ {
radio86_state *state = device->machine().driver_data<radio86_state>(); radio86_state *state = device->machine().driver_data<radio86_state>();
int i; int i;
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
const UINT8 *charmap = state->m_charmap + 0x400 * (gpa * 2 + hlgt); const UINT8 *charmap = state->m_charmap + 0x400 * (gpa * 2 + hlgt);
UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff; UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
if (vsp) { if (vsp) {

View File

@ -389,7 +389,7 @@ UINT32 super80_state::screen_update_super80v(screen_device &screen, bitmap_rgb32
MC6845_UPDATE_ROW( super80v_update_row ) MC6845_UPDATE_ROW( super80v_update_row )
{ {
super80_state *state = device->machine().driver_data<super80_state>(); super80_state *state = device->machine().driver_data<super80_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); const rgb_t *palette = bitmap.palette()->entry_list_raw();
UINT8 chr,col,gfx,fg,bg=0; UINT8 chr,col,gfx,fg,bg=0;
UINT16 mem,x; UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y); UINT32 *p = &bitmap.pix32(y);