freebsd-nq/sys/dev/vt
Jean-Sébastien Pédron 19e2ce2d83 vt(4): Colors are indexed against a console palette, not a VGA palette
Rename vt_generate_vga_palette() to vt_generate_cons_palette() and
change it to build a palette where the color index is the same than in
terminal escape codes, not the VGA index. That's what TCHAR_CREATE()
uses and passes to vt(4).

The main differences between both orders are:
    o  Blue and red are swapped (1 <-> 4)
    o  Yellow and cyan are swapped (3 <-> 6)

The problem remained unnoticed, because the RGB bit indexes passed to
vt_generate_vga_palette() were reversed. This inversion was cancelled
by the colors inversions in the generated palette. For instance, red
(0xff0000) and blue (0x0000ff) have bytes in opposite order, but were
swapped in the palette. But after changing the value of blue (see last
paragraph), the modified color was in fact the red one.

This commit includes a fix to creator_vt.c, submitted by Nathan
Whitehorn: fb_cmsize is set to 16. Before this, the generated palette
would be overwritte. This fixes colors on sparc64 with a Creator3D
adapter.

While here, tune the palette to better match console colors and improve
the readability (especially the dark blue).

Submitted by:	nwhitehorn (fix to creator_vt.c)
MFC after:	1 week
2014-08-10 17:04:10 +00:00
..
colors vt(4): Colors are indexed against a console palette, not a VGA palette 2014-08-10 17:04:10 +00:00
font Clarify statement on font origin 2014-06-06 18:32:05 +00:00
hw vt(4): Colors are indexed against a console palette, not a VGA palette 2014-08-10 17:04:10 +00:00
logo
vt_buf.c vt(4): Add vtbuf_dirty*_locked() to lock vtbuf once, not twice 2014-08-10 15:02:51 +00:00
vt_consolectl.c Use a common tunable to choose between vt(4)/sc(4) 2014-06-27 17:50:33 +00:00
vt_core.c Retire vd_maskbitbltchr. The same functionality can be obtained by testing 2014-08-07 21:00:16 +00:00
vt_font.c
vt_sysmouse.c Use a common tunable to choose between vt(4)/sc(4) 2014-06-27 17:50:33 +00:00
vt.h Retire vd_maskbitbltchr. The same functionality can be obtained by testing 2014-08-07 21:00:16 +00:00