diff --git a/src/add-ons/accelerants/via/engine/crtc.c b/src/add-ons/accelerants/via/engine/crtc.c index 2798016bb1..45dbfc0173 100644 --- a/src/add-ons/accelerants/via/engine/crtc.c +++ b/src/add-ons/accelerants/via/engine/crtc.c @@ -424,8 +424,11 @@ status_t eng_crtc_depth(int mode) /* set VCLK scaling */ /* genctrl bit use: - b7: PAL assignment stuff (color-lookup (0) versus gamma (1))? - %1 = very dark image (tested 8-bit mode) + b7: %0 = PAL is 6-bit wide (on b0-5) + %1 = PAL is 8-bit wide + Note: + 3123Ax chips only support 6-bits. If we support that chip, + update PAL programming! b6: ? b5: %0 = distortions (stripes) only (tested 8-bit mode) %1 = OK @@ -443,7 +446,7 @@ status_t eng_crtc_depth(int mode) { case BPP8: /* indexed mode */ - genctrl = 0x22; //%0010 0010 + genctrl = 0xa2; //%1010 0010 break; case BPP15: /* direct mode */ diff --git a/src/add-ons/accelerants/via/engine/dac.c b/src/add-ons/accelerants/via/engine/dac.c index 5c3e63b70a..c06b624af5 100644 --- a/src/add-ons/accelerants/via/engine/dac.c +++ b/src/add-ons/accelerants/via/engine/dac.c @@ -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 */ for (i = 0; i < 256; i++) { - /* the 6 implemented bits are on b0-b5 of the bus */ - ENG_REG8(RG8_PALDATA) = (r[i] >> 2); - ENG_REG8(RG8_PALDATA) = (g[i] >> 2); - ENG_REG8(RG8_PALDATA) = (b[i] >> 2); + ENG_REG8(RG8_PALDATA) = r[i]; + ENG_REG8(RG8_PALDATA) = g[i]; + ENG_REG8(RG8_PALDATA) = b[i]; } if (ENG_REG8(RG8_PALINDW) != 0x00) { @@ -129,11 +128,11 @@ if (1) ENG_REG8(RG8_PALINDR) = 0x00; for (i = 0; i < 256; i++) { - R = (ENG_REG8(RG8_PALDATA) << 2); - G = (ENG_REG8(RG8_PALDATA) << 2); - B = (ENG_REG8(RG8_PALDATA) << 2); + R = ENG_REG8(RG8_PALDATA); + G = ENG_REG8(RG8_PALDATA); + B = ENG_REG8(RG8_PALDATA); /* 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 } }