[OpenBIOS] [PATCHv2 09/20] display.fs: pass the colour depth and line bytes to the Forth terminal routines.
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Sun May 26 15:02:29 CEST 2013
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
openbios-devel/forth/device/display.fs | 3 +++
openbios-devel/libopenbios/video_common.c | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/openbios-devel/forth/device/display.fs b/openbios-devel/forth/device/display.fs
index 0df7165..4835f0b 100644
--- a/openbios-devel/forth/device/display.fs
+++ b/openbios-devel/forth/device/display.fs
@@ -44,6 +44,9 @@ hex
0 value foreground-color
0 value background-color
+0 value depth-bytes
+0 value line-bytes
+
\ internal values read from QEMU firmware interface
0 value qemu-video-addr
0 value qemu-video-height
diff --git a/openbios-devel/libopenbios/video_common.c b/openbios-devel/libopenbios/video_common.c
index f33286b..43e7126 100644
--- a/openbios-devel/libopenbios/video_common.c
+++ b/openbios-devel/libopenbios/video_common.c
@@ -282,6 +282,10 @@ init_video( unsigned long fb, int width, int height, int depth, int rb )
feval("to frame-buffer-adr");
/* Set global variables ready for fb8-install */
+ PUSH((video.fb.depth + 1) >> 3);
+ feval("to depth-bytes");
+ PUSH(video.fb.rb);
+ feval("to line-bytes");
PUSH((ucell)fontdata);
feval("to (romfont)");
PUSH(FONT_HEIGHT);
--
1.7.10.4
More information about the OpenBIOS
mailing list