Originally Posted by Ensjo
The change of the shift from ">> 5" to ">> 6" was right, but it comes out that more of MC6847's code still needs to be changed to behave properly. frown The most significative bit of the VRAM byte is lost somewhere, so only two colors are displayed twice, instead of four colors. Gotta check better to find what to change (without breaking what's working, glup).

The Semigraphics 6 mode uses all of the bits of the byte read from the VRAM. Bits 7~6 code the foreground color; bits 5~0 code the block pattern. After trying to understand how m6847.c works, I guess that these changes would make Semigraphis 6 work correctly:
Code
  150     /* 2^7 modes, 256/16 character groups, background/foreground */
  151     UINT8 colordata[128][256/16][2];
  152 
  153     /* 2^7 modes, 256 characters, 12 scanlines */
  154     UINT8 fontdata[128][256][12];
Code
 1200         bg_color = color(m6847->colordata[attr_index][byte / 16][0]);
 1201         fg_color = color(m6847->colordata[attr_index][byte / 16][1]);
Code
 1210             char_data = m6847->fontdata[attr_index][byte][scanline % 12];
Code
 1798         for (byte = 0; byte < 256; byte++)
Try these, then type and run this BASIC program to see if there are four colors:
Code
10 GR : OUT 128, 96
20 FOR A = 0 TO 255
30 POKE 32768 + A, A
40 NEXT
50 CALL 49158 : REM PRESS ANY KEY TO EXIT
60 TEXT