From 97c4947ec9af1664e81ee797834a32d3ca2f74fe Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Wed, 28 Apr 2004 05:37:36 +0000 Subject: Changes for btext and etherboot and filo merge support git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1540 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/console/btext_console.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'src/console') diff --git a/src/console/btext_console.c b/src/console/btext_console.c index 5961a8ab3b..6601b0f668 100644 --- a/src/console/btext_console.c +++ b/src/console/btext_console.c @@ -48,7 +48,13 @@ static u32 g_loc_Y; static u32 g_max_loc_X; static u32 g_max_loc_Y; +#define CHAR_256 0 + +#if CHAR_256==1 #define cmapsz (16*256) +#else +#define cmapsz (16*96) +#endif static unsigned char vga_font[cmapsz]; @@ -285,7 +291,7 @@ void BTEXT btext_drawchar(char c) } #endif } - +#if 0 void BTEXT btext_drawstring(const char *c) { @@ -312,13 +318,17 @@ btext_drawhex(u32 v) btext_drawchar(hex_table[(v >> 0) & 0x0000000FUL]); btext_drawchar(' '); } - +#endif static void BTEXT draw_byte(unsigned char c, u32 locX, u32 locY) { boot_infos_t* bi = &disp_bi; unsigned char *base = calc_base(bi, locX << 3, locY << 4); - unsigned char *font = &vga_font[((u32)c) * 16]; +#if CHAR_256==1 + unsigned char *font = &vga_font[((u32)c) * 16]; +#else + unsigned char *font = &vga_font[((u32)c-0x20) * 16]; // skip the first 0x20 +#endif u32 rb = bi->dispDeviceRowBytes; switch(bi->dispDeviceDepth) { @@ -451,7 +461,7 @@ static struct console_driver btext_console __console = { static unsigned char vga_font[cmapsz] BTDATA = { - +#if CHAR_256==1 /* 0 0x00 '^@' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -1027,7 +1037,7 @@ static unsigned char vga_font[cmapsz] BTDATA = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ - +#endif /* 32 0x20 ' ' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -2755,7 +2765,7 @@ static unsigned char vga_font[cmapsz] BTDATA = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ - +#if CHAR_256==1 /* 128 0x80 '€' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -5059,6 +5069,6 @@ static unsigned char vga_font[cmapsz] BTDATA = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ - +#endif }; -- cgit v1.2.3