Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- openbios-devel/forth/device/display.fs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/openbios-devel/forth/device/display.fs b/openbios-devel/forth/device/display.fs index a0a182c..3b6e3fa 100644 --- a/openbios-devel/forth/device/display.fs +++ b/openbios-devel/forth/device/display.fs @@ -44,6 +44,7 @@ hex 0 value foreground-color 0 value background-color
+2 value font-spacing 0 value depth-bytes
\ internal values read from QEMU firmware interface @@ -81,7 +82,7 @@ defer fb-emit ( x -- ) to char-num to char-min to fontbytes - to char-height + font-spacing + to char-height to char-width to font ; @@ -191,12 +192,17 @@ defer fb8-invertrect ;
: fb8-draw-character ( char -- ) + \ erase the current character + background-color + column# char-width * window-left + + line# char-height * window-top + + char-width char-height fb8-fillrect \ draw the character:
font
line# char-height * window-top + screen-width * depth-bytes * column# char-width * depth-bytes * window-left depth-bytes * + + frame-buffer-adr + - swap char-width char-height + swap char-width char-height font-spacing - \ normal or inverse? foreground-color background-color inverse? if @@ -233,7 +239,7 @@ defer fb8-invertrect : fb8-toggle-cursor ( -- ) column# char-width * window-left + line# char-height * window-top + - char-width char-height + char-width char-height font-spacing - foreground-color background-color fb8-invertrect ;