[OpenBIOS] [PATCH 2/2] display.fs: fix palette entries for foreground and background colors
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Thu Apr 20 23:25:42 CEST 2017
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 at 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
--
1.7.10.4
More information about the OpenBIOS
mailing list