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
v2: - Reword commit message for first patch as suggested by Tarl
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 are described using a limit and start value. Fix the limit so palette entry 255 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 21/04/17 07:48, 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
v2:
- Reword commit message for first patch as suggested by Tarl
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(-)
Amazingly enough this seems to solve nearly all of the bootloader color issues across all of SPARC32/SPARC64/PPC so I've pushed it to git master in preparation for a pull request tomorrow (I'm clearing the stable part of my patch backlog before I head off on holiday).
ATB,
Mark.