Hi tech@, The recent spike of interest around framebuffer consoles has prompted me to revisit a proposal I sent back in early 2017 [1].
Aesthetics considerations aside, kettenis@ raised the concern that colors from the original rasops palette carefully matched what OpenFirmware uses for the console on sparc64. Therefore, I propose to default on using the proper VGA text mode palette RGB values, and to keep the original rasops color palette on sparc64. The differences between the two palettes can be seen here [2]. Comments? OK? [1] https://marc.info/?l=openbsd-tech&m=148374502927423&w=2 [2] https://www.cambus.net/openbsd-framebuffer-console-and-custom-color-palettes/ Index: sys/dev/rasops/rasops.c =================================================================== RCS file: /cvs/src/sys/dev/rasops/rasops.c,v retrieving revision 1.62 diff -u -p -r1.62 rasops.c --- sys/dev/rasops/rasops.c 16 Jun 2020 21:49:30 -0000 1.62 +++ sys/dev/rasops/rasops.c 7 Jul 2020 09:10:08 -0000 @@ -47,7 +47,26 @@ /* ANSI colormap (R,G,B) */ -#define NORMAL_BLACK 0x000000 +#ifndef __sparc64__ +#define NORMAL_BLACK 0x000000 /* VGA text mode palette */ +#define NORMAL_RED 0xaa0000 +#define NORMAL_GREEN 0x00aa00 +#define NORMAL_BROWN 0xaa5500 +#define NORMAL_BLUE 0x0000aa +#define NORMAL_MAGENTA 0xaa00aa +#define NORMAL_CYAN 0x00aaaa +#define NORMAL_WHITE 0xaaaaaa + +#define HILITE_BLACK 0x555555 +#define HILITE_RED 0xff5555 +#define HILITE_GREEN 0x55ff55 +#define HILITE_BROWN 0xffff55 +#define HILITE_BLUE 0x5555ff +#define HILITE_MAGENTA 0xff55ff +#define HILITE_CYAN 0x55ffff +#define HILITE_WHITE 0xffffff +#else +#define NORMAL_BLACK 0x000000 /* Rasops palette */ #define NORMAL_RED 0x7f0000 #define NORMAL_GREEN 0x007f00 #define NORMAL_BROWN 0x7f7f00 @@ -64,6 +83,7 @@ #define HILITE_MAGENTA 0xff00ff #define HILITE_CYAN 0x00ffff #define HILITE_WHITE 0xffffff +#endif const u_char rasops_cmap[256 * 3] = { #define _C(x) ((x) & 0xff0000) >> 16, ((x) & 0x00ff00) >> 8, ((x) & 0x0000ff)