Index: kernel/arch/ia32/src/drivers/vesa.c
===================================================================
--- kernel/arch/ia32/src/drivers/vesa.c	(revision 33dc0ad0aebb55613931db0ffbc62d460aa82f79)
+++ kernel/arch/ia32/src/drivers/vesa.c	(revision 2bc137c2ead5aef4703a85727d96bf8f99c6f418)
@@ -38,4 +38,5 @@
 
 #include <genarch/fb/fb.h>
+#include <genarch/fb/visuals.h>
 #include <arch/drivers/vesa.h>
 #include <putchar.h>
@@ -68,5 +69,24 @@
 void vesa_init(void)
 {
-	fb_init(vesa_ph_addr, vesa_width, vesa_height, vesa_bpp, vesa_scanline, false);
+	unsigned int visual;
+	
+	switch (vesa_bpp) {
+	case 8:
+		visual = VISUAL_INDIRECT_8;
+		break;
+	case 16:
+		visual = VISUAL_RGB_5_6_5;
+		break;
+	case 24:
+		visual = VISUAL_RGB_8_8_8;
+		break;
+	case 32:
+		visual = VISUAL_RGB_0_8_8_8;
+		break;
+	default:
+		panic("Unsupported bits per pixel");
+	}
+	
+	fb_init(vesa_ph_addr, vesa_width, vesa_height, vesa_scanline, visual);
 }
 
Index: kernel/arch/mips32/src/mips32.c
===================================================================
--- kernel/arch/mips32/src/mips32.c	(revision 33dc0ad0aebb55613931db0ffbc62d460aa82f79)
+++ kernel/arch/mips32/src/mips32.c	(revision 2bc137c2ead5aef4703a85727d96bf8f99c6f418)
@@ -54,4 +54,5 @@
 #include <arch/debugger.h>
 #include <genarch/fb/fb.h>
+#include <genarch/fb/visuals.h>
 #include <macros.h>
 #include <ddi/device.h>
@@ -123,5 +124,5 @@
 	console_init(device_assign_devno());
 #ifdef CONFIG_FB
-	fb_init(0x12000000, 640, 480, 24, 1920, false); // gxemul framebuffer
+	fb_init(0x12000000, 640, 480, 1920, VISUAL_RGB_8_8_8); // gxemul framebuffer
 #endif
 	sysinfo_set_item_val("machine." STRING(MACHINE), NULL, 1);
Index: kernel/arch/ppc32/src/ppc32.c
===================================================================
--- kernel/arch/ppc32/src/ppc32.c	(revision 33dc0ad0aebb55613931db0ffbc62d460aa82f79)
+++ kernel/arch/ppc32/src/ppc32.c	(revision 2bc137c2ead5aef4703a85727d96bf8f99c6f418)
@@ -39,4 +39,5 @@
 #include <arch/interrupt.h>
 #include <genarch/fb/fb.h>
+#include <genarch/fb/visuals.h>
 #include <userspace.h>
 #include <proc/uarg.h>
@@ -76,5 +77,23 @@
 	if (config.cpu_active == 1) {
 		/* Initialize framebuffer */
-		fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline, false);
+		unsigned int visual;
+		
+		switch (bootinfo.screen.bpp) {
+		case 8:
+			visual = VISUAL_INDIRECT_8;
+			break;
+		case 16:
+			visual = VISUAL_RGB_5_5_5;
+			break;
+		case 24:
+			visual = VISUAL_RGB_8_8_8;
+			break;
+		case 32:
+			visual = VISUAL_RGB_0_8_8_8;
+			break;
+		default:
+			panic("Unsupported bits per pixel");
+		}
+		fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.scanline, visual);
 		
 		/* Initialize IRQ routing */
Index: kernel/arch/ppc64/src/ppc64.c
===================================================================
--- kernel/arch/ppc64/src/ppc64.c	(revision 33dc0ad0aebb55613931db0ffbc62d460aa82f79)
+++ kernel/arch/ppc64/src/ppc64.c	(revision 2bc137c2ead5aef4703a85727d96bf8f99c6f418)
@@ -38,4 +38,5 @@
 #include <arch/interrupt.h>
 #include <genarch/fb/fb.h>
+#include <genarch/fb/visuals.h>
 #include <userspace.h>
 #include <proc/uarg.h>
@@ -69,5 +70,25 @@
 {
 	if (config.cpu_active == 1) {
-		fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline, false);
+		/* Initialize framebuffer */
+		unsigned int visual;
+		
+		switch (bootinfo.screen.bpp) {
+		case 8:
+			visual = VISUAL_INDIRECT_8;
+			break;
+		case 16:
+			visual = VISUAL_RGB_5_5_5;
+			break;
+		case 24:
+			visual = VISUAL_RGB_8_8_8;
+			break;
+		case 32:
+			visual = VISUAL_RGB_0_8_8_8;
+			break;
+		default:
+			panic("Unsupported bits per pixel");
+		}
+		fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.scanline, visual);
+		
 	
 		/* Merge all zones to 1 big zone */
Index: kernel/arch/sparc64/src/drivers/scr.c
===================================================================
--- kernel/arch/sparc64/src/drivers/scr.c	(revision 33dc0ad0aebb55613931db0ffbc62d460aa82f79)
+++ kernel/arch/sparc64/src/drivers/scr.c	(revision 2bc137c2ead5aef4703a85727d96bf8f99c6f418)
@@ -36,4 +36,5 @@
 #include <genarch/ofw/ofw_tree.h>
 #include <genarch/fb/fb.h>
+#include <genarch/fb/visuals.h>
 #include <arch/types.h>
 #include <typedefs.h>
@@ -76,4 +77,5 @@
 	uint32_t fb_linebytes = 0;
 	uint32_t fb_scanline = 0;
+	unsigned int visual;
 
 	prop = ofw_tree_getprop(node, "width");
@@ -116,14 +118,31 @@
 			return;
 		}
-
-		if (fb_depth == 24)
+		
+		switch (fb_depth) {
+		case 8:
+			fb_scanline = fb_linebytes * (fb_depth >> 3);
+			visual = VISUAL_INDIRECT_8;
+			break;
+		case 16:
+			fb_scanline = fb_linebytes * (fb_depth >> 3);
+			visual = VISUAL_RGB_5_6_5;
+			break;
+		case 24:
 			fb_scanline = fb_linebytes * 4;
-		else
+			visual = VISUAL_RGB_8_8_8_0;
+			break;
+		case 32:
 			fb_scanline = fb_linebytes * (fb_depth >> 3);
+			visual = VISUAL_RGB_0_8_8_8;
+			break;
+		default:
+			printf("Unsupported bits per pixel.\n");
+			return;
+		}
 		
 		break;
 	case SCR_FFB:	
-		fb_depth = 32;
 		fb_scanline = 8192;
+		visual = VISUAL_RGB_0_8_8_8;
 
 		ofw_upa_reg_t *reg = &((ofw_upa_reg_t *) prop->value)[FFB_REG_24BPP];
@@ -138,5 +157,5 @@
 	}
 
-	fb_init(fb_addr, fb_width, fb_height, fb_depth, fb_scanline, true);
+	fb_init(fb_addr, fb_width, fb_height, fb_scanline, visual);
 }
 
Index: kernel/genarch/include/fb/fb.h
===================================================================
--- kernel/genarch/include/fb/fb.h	(revision 33dc0ad0aebb55613931db0ffbc62d460aa82f79)
+++ kernel/genarch/include/fb/fb.h	(revision 2bc137c2ead5aef4703a85727d96bf8f99c6f418)
@@ -40,5 +40,5 @@
 
 extern spinlock_t fb_lock;
-void fb_init(uintptr_t addr, unsigned int x, unsigned int y, unsigned int bpp, unsigned int scan, bool align);
+void fb_init(uintptr_t addr, unsigned int x, unsigned int y, unsigned int scan, unsigned int visual);
 
 #endif
Index: kernel/genarch/include/fb/visuals.h
===================================================================
--- kernel/genarch/include/fb/visuals.h	(revision 2bc137c2ead5aef4703a85727d96bf8f99c6f418)
+++ kernel/genarch/include/fb/visuals.h	(revision 2bc137c2ead5aef4703a85727d96bf8f99c6f418)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2006 Martin Decky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup genarch	
+ * @{
+ */
+/** @file
+ */
+
+#ifndef KERN_VISUALS_H_
+#define KERN_VISUALS_H_
+
+#define VISUAL_INDIRECT_8	0
+#define VISUAL_RGB_5_5_5	1
+#define VISUAL_RGB_5_6_5	2
+#define VISUAL_RGB_8_8_8	3
+#define VISUAL_RGB_8_8_8_0	4
+#define VISUAL_RGB_0_8_8_8	5
+
+#endif
+
+/** @}
+ */
Index: kernel/genarch/src/fb/fb.c
===================================================================
--- kernel/genarch/src/fb/fb.c	(revision 33dc0ad0aebb55613931db0ffbc62d460aa82f79)
+++ kernel/genarch/src/fb/fb.c	(revision 2bc137c2ead5aef4703a85727d96bf8f99c6f418)
@@ -34,4 +34,5 @@
 
 #include <genarch/fb/font-8x16.h>
+#include <genarch/fb/visuals.h>
 #include <genarch/fb/fb.h>
 #include <console/chardev.h>
@@ -59,5 +60,4 @@
 static unsigned int yres = 0;
 static unsigned int scanline = 0;
-static unsigned int bitspp = 0;
 static unsigned int pixelbytes = 0;
 #ifdef FB_INVERT_COLORS
@@ -96,15 +96,15 @@
 
 /* Conversion routines between different color representations */
-static void rgb_4byte(void *dst, int rgb)
+static void rgb_byte0888(void *dst, int rgb)
 {
 	*((int *) dst) = rgb;
 }
 
-static int byte4_rgb(void *src)
+static int byte0888_rgb(void *src)
 {
 	return (*((int *) src)) & 0xffffff;
 }
 
-static void rgb_3byte(void *dst, int rgb)
+static void rgb_byte888(void *dst, int rgb)
 {
 	uint8_t *scr = dst;
@@ -120,5 +120,5 @@
 }
 
-static int byte3_rgb(void *src)
+static int byte888_rgb(void *src)
 {
 	uint8_t *scr = src;
@@ -130,6 +130,20 @@
 }
 
+/**  16-bit depth (5:5:5) */
+static void rgb_byte555(void *dst, int rgb)
+{
+	/* 5-bit, 5-bits, 5-bits */ 
+	*((uint16_t *) dst) = RED(rgb, 5) << 10 | GREEN(rgb, 5) << 5 | BLUE(rgb, 5);
+}
+
+/** 16-bit depth (5:5:5) */
+static int byte555_rgb(void *src)
+{
+	int color = *(uint16_t *)(src);
+	return (((color >> 10) & 0x1f) << (16 + 3)) | (((color >> 5) & 0x1f) << (8 + 3)) | ((color & 0x1f) << 3);
+}
+
 /**  16-bit depth (5:6:5) */
-static void rgb_2byte(void *dst, int rgb)
+static void rgb_byte565(void *dst, int rgb)
 {
 	/* 5-bit, 6-bits, 5-bits */ 
@@ -138,5 +152,5 @@
 
 /** 16-bit depth (5:6:5) */
-static int byte2_rgb(void *src)
+static int byte565_rgb(void *src)
 {
 	int color = *(uint16_t *)(src);
@@ -152,5 +166,5 @@
  * and setting it to simulate the 8-bit truecolor.
  */
-static void rgb_1byte(void *dst, int rgb)
+static void rgb_byte8(void *dst, int rgb)
 {
 	*((uint8_t *) dst) = RED(rgb, 3) << 5 | GREEN(rgb, 2) << 3 | BLUE(rgb, 3);
@@ -159,7 +173,7 @@
 /** Return pixel color - 8-bit depth (color palette/3:2:3)
  *
- * See the comment for rgb_1byte().
- */
-static int byte1_rgb(void *src)
+ * See the comment for rgb_byte().
+ */
+static int byte8_rgb(void *src)
 {
 	int color = *(uint8_t *)src;
@@ -208,5 +222,5 @@
 
 	if (dbbuffer) {
-		memcpy(&dbbuffer[dboffset * scanline], blankline, FONT_SCANLINES * scanline);
+		memcpy(&dbbuffer[dboffset * scanline], blankline, ROW_BYTES);
 		
 		dboffset = (dboffset + FONT_SCANLINES) % yres;
@@ -349,39 +363,46 @@
 /** Initialize framebuffer as a chardev output device
  *
- * @param addr 	Physical address of the framebuffer
- * @param x    	Screen width in pixels
- * @param y    	Screen height in pixels
- * @param bpp  	Bits per pixel (8, 16, 24, 32)
- * @param scan 	Bytes per one scanline
- * @param align	Request alignment for 24bpp mode.
- */
-void fb_init(uintptr_t addr, unsigned int x, unsigned int y, unsigned int bpp, unsigned int scan, bool align)
-{
-	switch (bpp) {
-	case 8:
-		rgb2scr = rgb_1byte;
-		scr2rgb = byte1_rgb;
+ * @param addr   Physical address of the framebuffer
+ * @param x      Screen width in pixels
+ * @param y      Screen height in pixels
+ * @param scan   Bytes per one scanline
+ * @param visual Color model
+ *
+ */
+void fb_init(uintptr_t addr, unsigned int x, unsigned int y, unsigned int scan, unsigned int visual)
+{
+	switch (visual) {
+	case VISUAL_INDIRECT_8:
+		rgb2scr = rgb_byte8;
+		scr2rgb = byte8_rgb;
 		pixelbytes = 1;
 		break;
-	case 16:
-		rgb2scr = rgb_2byte;
-		scr2rgb = byte2_rgb;
+	case VISUAL_RGB_5_5_5:
+		rgb2scr = rgb_byte555;
+		scr2rgb = byte555_rgb;
 		pixelbytes = 2;
 		break;
-	case 24:
-		rgb2scr = rgb_3byte;
-		scr2rgb = byte3_rgb;
-		if (align)
-			pixelbytes = 4;
-		else
-			pixelbytes = 3;
-		break;
-	case 32:
-		rgb2scr = rgb_4byte;
-		scr2rgb = byte4_rgb;
+	case VISUAL_RGB_5_6_5:
+		rgb2scr = rgb_byte565;
+		scr2rgb = byte565_rgb;
+		pixelbytes = 2;
+		break;
+	case VISUAL_RGB_8_8_8:
+		rgb2scr = rgb_byte888;
+		scr2rgb = byte888_rgb;
+		pixelbytes = 3;
+		break;
+	case VISUAL_RGB_8_8_8_0:
+		rgb2scr = rgb_byte888;
+		scr2rgb = byte888_rgb;
 		pixelbytes = 4;
 		break;
+	case VISUAL_RGB_0_8_8_8:
+		rgb2scr = rgb_byte0888;
+		scr2rgb = byte0888_rgb;
+		pixelbytes = 4;
+		break;
 	default:
-		panic("Unsupported bpp.\n");
+		panic("Unsupported visual.\n");
 	}
 	
@@ -393,5 +414,4 @@
 	xres = x;
 	yres = y;
-	bitspp = bpp;
 	scanline = scan;
 	
@@ -403,7 +423,6 @@
 	sysinfo_set_item_val("fb.width", NULL, xres);
 	sysinfo_set_item_val("fb.height", NULL, yres);
-	sysinfo_set_item_val("fb.bpp", NULL, bpp);
-	sysinfo_set_item_val("fb.bpp-align", NULL, align);
 	sysinfo_set_item_val("fb.scanline", NULL, scan);
+	sysinfo_set_item_val("fb.visual", NULL, visual);
 	sysinfo_set_item_val("fb.address.physical", NULL, addr);
 	sysinfo_set_item_val("fb.invert-colors", NULL, invert_colors);
Index: uspace/fb/fb.c
===================================================================
--- uspace/fb/fb.c	(revision 33dc0ad0aebb55613931db0ffbc62d460aa82f79)
+++ uspace/fb/fb.c	(revision 2bc137c2ead5aef4703a85727d96bf8f99c6f418)
@@ -50,5 +50,7 @@
 #include <ipc/services.h>
 #include <kernel/errno.h>
+#include <kernel/genarch/fb/visuals.h>
 #include <async.h>
+#include <bool.h>
 
 #include "font-8x16.h"
@@ -148,15 +150,15 @@
 
 /* Conversion routines between different color representations */
-static void rgb_4byte(void *dst, int rgb)
+static void rgb_byte0888(void *dst, int rgb)
 {
 	*(int *)dst = rgb;
 }
 
-static int byte4_rgb(void *src)
+static int byte0888_rgb(void *src)
 {
 	return (*(int *)src) & 0xffffff;
 }
 
-static void rgb_3byte(void *dst, int rgb)
+static void rgb_byte888(void *dst, int rgb)
 {
 	uint8_t *scr = dst;
@@ -172,5 +174,5 @@
 }
 
-static int byte3_rgb(void *src)
+static int byte888_rgb(void *src)
 {
 	uint8_t *scr = src;
@@ -182,6 +184,20 @@
 }
 
+/**  16-bit depth (5:5:5) */
+static void rgb_byte555(void *dst, int rgb)
+{
+	/* 5-bit, 5-bits, 5-bits */ 
+	*((uint16_t *)(dst)) = RED(rgb, 5) << 10 | GREEN(rgb, 5) << 5 | BLUE(rgb, 5);
+}
+
+/** 16-bit depth (5:5:5) */
+static int byte555_rgb(void *src)
+{
+	int color = *(uint16_t *)(src);
+	return (((color >> 10) & 0x1f) << (16 + 3)) | (((color >> 5) & 0x1f) << (8 + 3)) | ((color & 0x1f) << 3);
+}
+
 /**  16-bit depth (5:6:5) */
-static void rgb_2byte(void *dst, int rgb)
+static void rgb_byte565(void *dst, int rgb)
 {
 	/* 5-bit, 6-bits, 5-bits */ 
@@ -190,5 +206,5 @@
 
 /** 16-bit depth (5:6:5) */
-static int byte2_rgb(void *src)
+static int byte565_rgb(void *src)
 {
 	int color = *(uint16_t *)(src);
@@ -197,5 +213,5 @@
 
 /** Put pixel - 8-bit depth (3:2:3) */
-static void rgb_1byte(void *dst, int rgb)
+static void rgb_byte8(void *dst, int rgb)
 {
 	*(uint8_t *)dst = RED(rgb, 3) << 5 | GREEN(rgb, 2) << 3 | BLUE(rgb, 3);
@@ -203,5 +219,5 @@
 
 /** Return pixel color - 8-bit depth (3:2:3) */
-static int byte1_rgb(void *src)
+static int byte8_rgb(void *src)
 {
 	int color = *(uint8_t *)src;
@@ -453,41 +469,47 @@
 /** Initialize framebuffer as a chardev output device
  *
- * @param addr Address of theframebuffer
- * @param xres Screen width in pixels
- * @param yres Screen height in pixels
- * @param bpp  Bits per pixel (8, 16, 24, 32)
- * @param scan Bytes per one scanline
- * @param align Alignment for 24bpp mode.
+ * @param addr          Address of theframebuffer
+ * @param xres          Screen width in pixels
+ * @param yres          Screen height in pixels
+ * @param visual        Bits per pixel (8, 16, 24, 32)
+ * @param scan          Bytes per one scanline
  * @param invert_colors Inverted colors.
  *
  */
-static void
-screen_init(void *addr, unsigned int xres, unsigned int yres, unsigned int bpp, unsigned int scan,
-	int align, int invert_colors)
-{
-	switch (bpp) {
-	case 8:
-		screen.rgb2scr = rgb_1byte;
-		screen.scr2rgb = byte1_rgb;
+static bool screen_init(void *addr, unsigned int xres, unsigned int yres, unsigned int scan, unsigned int visual, bool invert_colors)
+{
+	switch (visual) {
+	case VISUAL_INDIRECT_8:
+		screen.rgb2scr = rgb_byte8;
+		screen.scr2rgb = byte8_rgb;
 		screen.pixelbytes = 1;
 		break;
-	case 16:
-		screen.rgb2scr = rgb_2byte;
-		screen.scr2rgb = byte2_rgb;
+	case VISUAL_RGB_5_5_5:
+		screen.rgb2scr = rgb_byte555;
+		screen.scr2rgb = byte555_rgb;
 		screen.pixelbytes = 2;
 		break;
-	case 24:
-		screen.rgb2scr = rgb_3byte;
-		screen.scr2rgb = byte3_rgb;
-		if (!align)
-			screen.pixelbytes = 3;
-		else
-			screen.pixelbytes = 4;
-		break;
-	case 32:
-		screen.rgb2scr = rgb_4byte;
-		screen.scr2rgb = byte4_rgb;
+	case VISUAL_RGB_5_6_5:
+		screen.rgb2scr = rgb_byte565;
+		screen.scr2rgb = byte565_rgb;
+		screen.pixelbytes = 2;
+		break;
+	case VISUAL_RGB_8_8_8:
+		screen.rgb2scr = rgb_byte888;
+		screen.scr2rgb = byte888_rgb;
+		screen.pixelbytes = 3;
+		break;
+	case VISUAL_RGB_8_8_8_0:
+		screen.rgb2scr = rgb_byte888;
+		screen.scr2rgb = byte888_rgb;
 		screen.pixelbytes = 4;
 		break;
+	case VISUAL_RGB_0_8_8_8:
+		screen.rgb2scr = rgb_byte0888;
+		screen.scr2rgb = byte0888_rgb;
+		screen.pixelbytes = 4;
+		break;
+	default:
+		return false;
 	}
 
@@ -499,5 +521,7 @@
 	
 	/* Create first viewport */
-	viewport_create(0,0,xres,yres);
+	viewport_create(0, 0, xres, yres);
+	
+	return true;
 }
 
@@ -1227,8 +1251,7 @@
 	unsigned int fb_width;
 	unsigned int fb_height;
-	unsigned int fb_bpp;
-	unsigned int fb_bpp_align;
 	unsigned int fb_scanline;
-	unsigned int fb_invert_colors;
+	unsigned int fb_visual;
+	bool fb_invert_colors;
 	void *fb_addr;
 	size_t asz;
@@ -1239,10 +1262,9 @@
 	fb_width = sysinfo_value("fb.width");
 	fb_height = sysinfo_value("fb.height");
-	fb_bpp = sysinfo_value("fb.bpp");
-	fb_bpp_align = sysinfo_value("fb.bpp-align");
 	fb_scanline = sysinfo_value("fb.scanline");
+	fb_visual = sysinfo_value("fb.visual");
 	fb_invert_colors = sysinfo_value("fb.invert-colors");
 
-	asz = fb_scanline*fb_height;
+	asz = fb_scanline * fb_height;
 	fb_addr = as_get_mappable_page(asz);
 	
@@ -1250,6 +1272,8 @@
 		    AS_AREA_READ | AS_AREA_WRITE);
 
-	screen_init(fb_addr, fb_width, fb_height, fb_bpp, fb_scanline, fb_bpp_align, fb_invert_colors);
-	return 0;
+	if (screen_init(fb_addr, fb_width, fb_height, fb_scanline, fb_visual, fb_invert_colors))
+		return 0;
+	
+	return -1;
 }
 
