summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/philips/mcd212.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/philips/mcd212.cpp')
-rw-r--r--src/mame/philips/mcd212.cpp41
1 files changed, 21 insertions, 20 deletions
diff --git a/src/mame/philips/mcd212.cpp b/src/mame/philips/mcd212.cpp
index 3f90fffa8c3..b1e65211854 100644
--- a/src/mame/philips/mcd212.cpp
+++ b/src/mame/philips/mcd212.cpp
@@ -488,24 +488,24 @@ void mcd212_device::process_dca()
}
template <int Path>
-static inline uint8_t BYTE_TO_CLUT(int icm, uint8_t byte)
+static inline uint8_t BYTE_TO_CLUT(int icm, uint8_t byte, bool clut_select)
{
switch (icm)
{
- case 1:
- return byte;
- case 3:
- return (Path ? 0x80 : 0) | (byte & 0x7f);
- case 4:
- if (Path == 0)
- {
- return byte & 0x7f;
- }
- break;
- case 11:
- return (Path ? 0x80 : 0) | (byte & 0x0f);
- default:
- break;
+ case 1:
+ return byte;
+ case 3:
+ return (Path ? 0x80 : 0) | (byte & 0x7f);
+ case 4:
+ if (Path == 0)
+ {
+ return (clut_select ? 0x80 : 0) | (byte & 0x7f);
+ }
+ break;
+ case 11:
+ return (Path ? 0x80 : 0) | (byte & 0x0f);
+ default:
+ break;
}
return 0;
}
@@ -621,6 +621,7 @@ void mcd212_device::process_vsr(uint32_t *pixels, bool *transparent)
}
else
{
+ bool clut_select = BIT(m_image_coding_method, ICM_CS_BIT);
if (icm == ICM_RGB555 && Path == 1)
{
const uint8_t byte1 = data2[(vsr2++ & 0x0007ffff) ^ 1];
@@ -633,12 +634,12 @@ void mcd212_device::process_vsr(uint32_t *pixels, bool *transparent)
else if (icm == ICM_CLUT4)
{
const uint8_t mask = (decodingMode == DDR_FT_RLE) ? 0x7 : 0xf;
- color0 = m_clut[BYTE_TO_CLUT<Path>(icm, mask & (byte >> 4))];
- color1 = m_clut[BYTE_TO_CLUT<Path>(icm, mask & byte)];
+ color0 = m_clut[BYTE_TO_CLUT<Path>(icm, mask & (byte >> 4), clut_select)];
+ color1 = m_clut[BYTE_TO_CLUT<Path>(icm, mask & byte, clut_select)];
}
else
{
- color1 = color0 = m_clut[BYTE_TO_CLUT<Path>(icm, byte)];
+ color1 = color0 = m_clut[BYTE_TO_CLUT<Path>(icm, byte, clut_select)];
}
int length_m = mosaic_enable ? (mosaic_factor * 2) : 2;
@@ -1002,7 +1003,7 @@ uint32_t mcd212_device::screen_update(screen_device &screen, bitmap_rgb32 &bitma
// If PAL and 'Standard' bit set, insert a 20-line border on the top/bottom
if ((scanline - m_ica_height < 20) || (scanline >= (m_total_height - 20)))
{
- std::fill_n(out, 768, 0xff101010);
+ std::fill_n(out, 768, s_4bpp_color[0]);
draw_line = false;
}
}
@@ -1014,7 +1015,7 @@ uint32_t mcd212_device::screen_update(screen_device &screen, bitmap_rgb32 &bitma
// If PAL and 'Standard' bit set, insert a 24px border on the left/right
if (!BIT(m_dcr[0], DCR_CF_BIT) || BIT(m_csrw[0], CSR1W_ST_BIT))
{
- std::fill_n(out, 24, 0xff101010);
+ std::fill_n(out, 24, s_4bpp_color[0]);
out += 24;
}