[OpenBIOS] [PATCH 09/16] display.fs: pass the colour depth in bytes to the Forth terminal routines.

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Sun Mar 10 17:50:39 CET 2013


Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
 openbios-devel/forth/device/display.fs    |    2 ++
 openbios-devel/libopenbios/video_common.c |    2 ++
 2 files changed, 4 insertions(+)

diff --git a/openbios-devel/forth/device/display.fs b/openbios-devel/forth/device/display.fs
index 0df7165..fd4ae78 100644
--- a/openbios-devel/forth/device/display.fs
+++ b/openbios-devel/forth/device/display.fs
@@ -44,6 +44,8 @@ hex
 0 value foreground-color
 0 value background-color
 
+0 value depth-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..71cca24 100644
--- a/openbios-devel/libopenbios/video_common.c
+++ b/openbios-devel/libopenbios/video_common.c
@@ -282,6 +282,8 @@ 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((ucell)fontdata);
 	feval("to (romfont)");
 	PUSH(FONT_HEIGHT);
-- 
1.7.10.4




More information about the OpenBIOS mailing list