enabled color-PAL to be 8-bits wide instead of just 6-bit. Updated PAL programming accordingly. VIA CMAP8 now supports (indexed) 24-bit color instead of just 18bit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13813 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
8a6f27ebd8
commit
66e18736f6
|
@ -424,8 +424,11 @@ status_t eng_crtc_depth(int mode)
|
||||||
|
|
||||||
/* set VCLK scaling */
|
/* set VCLK scaling */
|
||||||
/* genctrl bit use:
|
/* genctrl bit use:
|
||||||
b7: PAL assignment stuff (color-lookup (0) versus gamma (1))?
|
b7: %0 = PAL is 6-bit wide (on b0-5)
|
||||||
%1 = very dark image (tested 8-bit mode)
|
%1 = PAL is 8-bit wide
|
||||||
|
Note:
|
||||||
|
3123Ax chips only support 6-bits. If we support that chip,
|
||||||
|
update PAL programming!
|
||||||
b6: ?
|
b6: ?
|
||||||
b5: %0 = distortions (stripes) only (tested 8-bit mode)
|
b5: %0 = distortions (stripes) only (tested 8-bit mode)
|
||||||
%1 = OK
|
%1 = OK
|
||||||
|
@ -443,7 +446,7 @@ status_t eng_crtc_depth(int mode)
|
||||||
{
|
{
|
||||||
case BPP8:
|
case BPP8:
|
||||||
/* indexed mode */
|
/* indexed mode */
|
||||||
genctrl = 0x22; //%0010 0010
|
genctrl = 0xa2; //%1010 0010
|
||||||
break;
|
break;
|
||||||
case BPP15:
|
case BPP15:
|
||||||
/* direct mode */
|
/* direct mode */
|
||||||
|
|
|
@ -111,10 +111,9 @@ status_t eng_dac_palette(uint8 r[256],uint8 g[256],uint8 b[256])
|
||||||
/* loop through all 256 to program DAC */
|
/* loop through all 256 to program DAC */
|
||||||
for (i = 0; i < 256; i++)
|
for (i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
/* the 6 implemented bits are on b0-b5 of the bus */
|
ENG_REG8(RG8_PALDATA) = r[i];
|
||||||
ENG_REG8(RG8_PALDATA) = (r[i] >> 2);
|
ENG_REG8(RG8_PALDATA) = g[i];
|
||||||
ENG_REG8(RG8_PALDATA) = (g[i] >> 2);
|
ENG_REG8(RG8_PALDATA) = b[i];
|
||||||
ENG_REG8(RG8_PALDATA) = (b[i] >> 2);
|
|
||||||
}
|
}
|
||||||
if (ENG_REG8(RG8_PALINDW) != 0x00)
|
if (ENG_REG8(RG8_PALINDW) != 0x00)
|
||||||
{
|
{
|
||||||
|
@ -129,11 +128,11 @@ if (1)
|
||||||
ENG_REG8(RG8_PALINDR) = 0x00;
|
ENG_REG8(RG8_PALINDR) = 0x00;
|
||||||
for (i = 0; i < 256; i++)
|
for (i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
R = (ENG_REG8(RG8_PALDATA) << 2);
|
R = ENG_REG8(RG8_PALDATA);
|
||||||
G = (ENG_REG8(RG8_PALDATA) << 2);
|
G = ENG_REG8(RG8_PALDATA);
|
||||||
B = (ENG_REG8(RG8_PALDATA) << 2);
|
B = ENG_REG8(RG8_PALDATA);
|
||||||
/* only compare the most significant 6 bits */
|
/* only compare the most significant 6 bits */
|
||||||
if (((r[i] & 0xfc) != R) || ((g[i] & 0xfc) != G) || ((b[i] & 0xfc) != B))
|
if ((r[i] != R) || (g[i] != G) || (b[i] != B))
|
||||||
LOG(1,("DAC palette %d: w %x %x %x, r %x %x %x\n", i, r[i], g[i], b[i], R, G, B)); // apsed
|
LOG(1,("DAC palette %d: w %x %x %x, r %x %x %x\n", i, r[i], g[i], b[i], R, G, B)); // apsed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue