mirror of
https://github.com/holub/mame
synced 2025-04-25 01:40:16 +03:00
bt45x: overlay for single channel devices (nw)
This commit is contained in:
parent
03dbd1ad3f
commit
a0b9d3729c
@ -755,9 +755,9 @@ u32 edge2plus_framebuffer_device_base::screen_update(screen_device &screen, bitm
|
|||||||
const u8 index = *pixel_data++;
|
const u8 index = *pixel_data++;
|
||||||
|
|
||||||
bitmap.pix(y, x) = rgb_t(
|
bitmap.pix(y, x) = rgb_t(
|
||||||
m_ramdac[0]->palette_lookup(index),
|
m_ramdac[0]->lookup(index),
|
||||||
m_ramdac[1]->palette_lookup(index),
|
m_ramdac[1]->lookup(index),
|
||||||
m_ramdac[2]->palette_lookup(index));
|
m_ramdac[2]->lookup(index));
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
*
|
*
|
||||||
* TODO
|
* TODO
|
||||||
* - refactor to separate devices with registers
|
* - refactor to separate devices with registers
|
||||||
* - implement blinking and overlay
|
* - implement blinking and rgb device overlay
|
||||||
* - unsure about address masking when accessing overlay colors
|
* - unsure about address masking when accessing overlay colors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -97,9 +97,14 @@ protected:
|
|||||||
class bt45x_mono_device_base : public bt45x_device_base
|
class bt45x_mono_device_base : public bt45x_device_base
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// helpers instead of a device_palette_interface
|
// helper instead of device_palette_interface
|
||||||
u8 palette_lookup(u8 index) const { return m_color_ram[index & m_read_mask]; }
|
u8 lookup(u8 pixel, u8 overlay = 0) const
|
||||||
u8 overlay_lookup(u8 index) const { return m_color_ram[m_palette_colors + index]; }
|
{
|
||||||
|
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:
|
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);
|
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);
|
||||||
|
@ -231,7 +231,7 @@ u32 ncd17c_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, rec
|
|||||||
for (unsigned x = 0; x < 1024; x++)
|
for (unsigned x = 0; x < 1024; x++)
|
||||||
{
|
{
|
||||||
u8 const pixels = m_vram->read((y * 1024) + BYTE4_XOR_BE(x));
|
u8 const pixels = m_vram->read((y * 1024) + BYTE4_XOR_BE(x));
|
||||||
*scanline++ = m_ramdac->palette_lookup(pixels);
|
*scanline++ = m_ramdac->lookup(pixels);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user