THE HERO TECHNIQUE
I think i have invented a new technique to get more colors in CGA mode on the PC1.
CGA 320x200x4 mode with per-scanline V6355D palette reprogramming.
As we can see it has it's limitations. But it better then only 3 (+ black) colors.
THE TECHNIQUE:
THE HERO TECHNIQUE (optimized with 0x44 start + OUTSB + skip-unchanged):
CGA mode 4: 2 bits per pixel, values 0-3.
Always uses palette 0 (no palette flip). Mapping:
Pixel 0 = entry 0 = black (background/border), fixed
--> Pixel 1 = entry 2 = per-scanline "hero" color (changes every line)
Pixel 2 = entry 4 = global color A (most common, fixed)
Pixel 3 = entry 6 = global color B (2nd most common, fixed)
During each HBLANK (~80 cycles), only palette entry 2 is updated.
Starting at register 0x44 skips entries 0-1 entirely (proven on V6355D hardware). OUTSB replaces LODSB+OUT for faster streaming.
The two global colors (entries 4 and 6) are programmed once before the display loop begins and remain constant throughout.