freebsd-skq/sys/dev/syscons
bde 0bc4f8ada7 Fix bright colors for syscons, and make them work for the first time
for vt.  Restore syscons' rendering of background (bg) brightness as
foreground (fg) blinking and vice versa, and add rendering of blinking
as background brightness to vt.

Bright/saturated is conflated with light/white in the implementation
and in this description.

Bright colors were broken in all cases, but appeared to work in the
only case shown by "vidcontrol show".  A boldness hack was applied
only in 1 layering-violation place (for some syscons sequences) where
it made some cases seem to work but was undone by clearing bold using
ANSI sequences, and more seriously was not undone when setting
ANSI/xterm dark colors so left them bright.  Move this hack to drivers.

The boldness hack is only for fg brightness.  Restore/add a similar hack
for bg brightness rendered as fg blinking and vice versa.  This works
even better for vt, since vt changes the default text mode to give the
more useful bg brightness instead of fg blinking.

The brightness bit in colors was unnecessarily removed by the boldness
hack.  In other cases, it was lost later by teken_256to8().  Use
teken_256to16() to not lose it.  teken_256to8() was intended to be
used for bg colors to allow finer or bg-specific control for the more
difficult reduction to 8; however, since 16 bg colors actually work
on VGA except in syscons text mode and the conversion isn't subtle
enough to significantly in that mode, teken_256to8() is not used now.

There are still bugs, especially in vidcontrol, if bright/blinking
background colors are set.

Restore XOR logic for bold/bright fg in syscons (don't change OR
logic for vt).  Remove broken ifdef on FG_UNDERLINE and its wrong
or missing bit and restore the correct hard-coded bit.  FG_UNDERLINE
is only for mono mode which is not really supported.

Restore XOR logic for blinking/bright bg in syscons (in vt, add
OR logic and render as bright bg).  Remove related broken ifdef
on BG_BLINKING and its missing bit and restore the correct
hard-coded bit.  The same bit means blinking or bright bg depending
on the mode, and we want to ignore the difference everywhere.

Simplify conversions of attributes in syscons.  Don't pretend to
support bold fonts.  Don't support unusual encodings of brightness.
It is as good as possible to map 16 VGA colors to 16 xterm-16
colors.  E.g., VGA brown -> xterm-16 Olive will be converted back
to VGA brown, so we don't need to convert to xterm-256 Brown.  Teken
cons25 compatibility code already does the same, and duplicates some
small tables.  This is mostly for the sc -> te direction.  The other
direction uses teken_256to16() which is too generic.
2017-03-18 11:13:54 +00:00
..
apm
blank
daemon Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
dragon Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
fade
fire Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
green
logo Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
plasma Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
rain Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
snake
star Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
warp Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
scgfbrndr.c
schistory.c
scmouse.c Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
scterm-teken.c Fix bright colors for syscons, and make them work for the first time 2017-03-18 11:13:54 +00:00
scterm.c
scvesactl.c
scvgarndr.c
scvidctl.c Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
scvtb.c
syscons.c The previous fix didn't ifdef out enough for sparc64 to actually work. 2017-03-16 07:40:33 +00:00
syscons.h Add a scteken_set_cursor() (sc to teken) method and use it to fix 2017-03-11 11:31:06 +00:00
sysmouse.c [evdev] Adds evdev support to sysmouse(4) driver 2016-12-10 18:07:16 +00:00