diff --git a/src/devices/bus/interpro/sr/edge.cpp b/src/devices/bus/interpro/sr/edge.cpp index 1228450375a..4c6453a5341 100644 --- a/src/devices/bus/interpro/sr/edge.cpp +++ b/src/devices/bus/interpro/sr/edge.cpp @@ -755,9 +755,9 @@ u32 edge2plus_framebuffer_device_base::screen_update(screen_device &screen, bitm const u8 index = *pixel_data++; bitmap.pix(y, x) = rgb_t( - m_ramdac[0]->palette_lookup(index), - m_ramdac[1]->palette_lookup(index), - m_ramdac[2]->palette_lookup(index)); + m_ramdac[0]->lookup(index), + m_ramdac[1]->lookup(index), + m_ramdac[2]->lookup(index)); } return 0; diff --git a/src/devices/video/bt45x.cpp b/src/devices/video/bt45x.cpp index 4ab4f687e67..acf60ce238d 100644 --- a/src/devices/video/bt45x.cpp +++ b/src/devices/video/bt45x.cpp @@ -29,7 +29,7 @@ * * TODO * - refactor to separate devices with registers - * - implement blinking and overlay + * - implement blinking and rgb device overlay * - unsure about address masking when accessing overlay colors */ diff --git a/src/devices/video/bt45x.h b/src/devices/video/bt45x.h index df1114f74dd..f6d3a3144ab 100644 --- a/src/devices/video/bt45x.h +++ b/src/devices/video/bt45x.h @@ -97,9 +97,14 @@ protected: class bt45x_mono_device_base : public bt45x_device_base { public: - // helpers instead of a device_palette_interface - u8 palette_lookup(u8 index) const { return m_color_ram[index & m_read_mask]; } - u8 overlay_lookup(u8 index) const { return m_color_ram[m_palette_colors + index]; } + // helper instead of device_palette_interface + u8 lookup(u8 pixel, u8 overlay = 0) const + { + if (overlay & 3) + return m_color_ram[m_palette_colors + (overlay & (m_command & (CR1|CR0)))]; + else + return (m_command & CR6) ? m_color_ram[pixel & m_read_mask] : m_color_ram[m_palette_colors + 0]; + } protected: bt45x_mono_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const u32 palette_colors, const u32 overlay_colors); diff --git a/src/mame/drivers/ncd68k.cpp b/src/mame/drivers/ncd68k.cpp index e1a4e99e3fb..7e458e3e566 100644 --- a/src/mame/drivers/ncd68k.cpp +++ b/src/mame/drivers/ncd68k.cpp @@ -231,7 +231,7 @@ u32 ncd17c_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, rec for (unsigned x = 0; x < 1024; x++) { u8 const pixels = m_vram->read((y * 1024) + BYTE4_XOR_BE(x)); - *scanline++ = m_ramdac->palette_lookup(pixels); + *scanline++ = m_ramdac->lookup(pixels); } }