Here are a couple of fixes that correct the display colors in the Solaris console login screen. It seems that the Solaris drivers assume the foreground and background colors are in different palette entries to those currently used by OpenBIOS causing the console to appear invisible as white text on a white background.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Mark Cave-Ayland (2): display.fs: fix off-by-one errors in color palette initialisation display.fs: fix palette entries for foreground and background colors
forth/device/display.fs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
Loops in Forth should be inclusive of both the start and end indices. Fix the uppermost index so that the last entry in the color palette is actually set.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- forth/device/display.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/forth/device/display.fs b/forth/device/display.fs index fff44e0..f7fa2a7 100644 --- a/forth/device/display.fs +++ b/forth/device/display.fs @@ -386,7 +386,7 @@ defer fb8-invertrect to foreground-color to background-color
\ setup palette - 10101 ['] color-palette cell+ ff 0 do + 10101 ['] color-palette cell+ 100 0 do dup 2 pick i * swap ! cell+ loop 2drop
@@ -394,7 +394,7 @@ defer fb8-invertrect ffffcc ['] color-palette cell+ fe cells + !
\ load palette onto the hardware - ['] color-palette cell+ ff 0 do + ['] color-palette cell+ 100 0 do dup @ ff0000 and d# 16 rshift 1 pick @ ff00 and d# 8 rshift 2 pick @ ff and
Some versions of Solaris assume that the foreground color is stored in palette index 255 and the background color is stored in index 0. Make sure we do the same otherwise the Solaris video driver picks the background color for console text which ends up being invisible.
Note that this already matches the default palettes in cgthree.fs and tcx.fs which were obtained from Sun documentation.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- forth/device/display.fs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/forth/device/display.fs b/forth/device/display.fs index f7fa2a7..010f9af 100644 --- a/forth/device/display.fs +++ b/forth/device/display.fs @@ -229,8 +229,8 @@ defer fb8-invertrect d# 15 to background-color
\ override with OpenBIOS defaults - fe to background-color - 0 to foreground-color + 0 to background-color + ff to foreground-color ;
: fb8-toggle-cursor ( -- ) @@ -390,8 +390,9 @@ defer fb8-invertrect dup 2 pick i * swap ! cell+ loop 2drop
- \ special background color - ffffcc ['] color-palette cell+ fe cells + ! + \ special foreground and background colors + ffffcc ['] color-palette cell+ 0 cells + ! + 000000 ['] color-palette cell+ ff cells + !
\ load palette onto the hardware ['] color-palette cell+ 100 0 do @@ -408,8 +409,8 @@ defer fb8-invertrect loop drop
\ ... but let's override with some better defaults - fe to background-color - 0 to foreground-color + 0 to background-color + ff to foreground-color
fb8-erase-screen
On Apr 20, 2017, at 5:25 PM, Mark Cave-Ayland wrote:
Here are a couple of fixes that correct the display colors in the Solaris console login screen. It seems that the Solaris drivers assume the foreground and background colors are in different palette entries to those currently used by OpenBIOS causing the console to appear invisible as white text on a white background.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Mark Cave-Ayland (2): display.fs: fix off-by-one errors in color palette initialisation display.fs: fix palette entries for foreground and background colors
forth/device/display.fs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
-- 1.7.10.4
Is the color problem with Linux effected by these patches?
On 20/04/17 22:43, Programmingkid wrote:
On Apr 20, 2017, at 5:25 PM, Mark Cave-Ayland wrote:
Here are a couple of fixes that correct the display colors in the Solaris console login screen. It seems that the Solaris drivers assume the foreground and background colors are in different palette entries to those currently used by OpenBIOS causing the console to appear invisible as white text on a white background.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Mark Cave-Ayland (2): display.fs: fix off-by-one errors in color palette initialisation display.fs: fix palette entries for foreground and background colors
forth/device/display.fs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
-- 1.7.10.4
Is the color problem with Linux effected by these patches?
It does also seem to fix the color issue within yaboot, although older kernels still appear to use a faint color when switching to the VGA console. Fortunately any improvement is generally better than none ;)
ATB,
Mark.