fprintf(stderr, "decSfbScreenInit failed\n");
ErrorF("decSfbScreenInit failed\n");
Bool decSFBInit (screen, pScreen, argc, argv)    int	    	  screen;    	/* what screen am I going to be */    ScreenPtr	  pScreen;  	/* The Screen to initialize */    int	    	  argc;	    	/* The number of the Server's arguments. */    char    	  **argv;   	/* The arguments themselves. Don't change! */{	unsigned char *fb = fb = decFbs[screen].fb;	unsigned char *fbr;	int fb_off, realwidth, rowsize;	volatile sfb_reg_t *sfbregs;	decFbs[screen].EnterLeave = (void (*)())NoopDDA;    	if (!decScreenAllocate(pScreen))		return FALSE;	if (!fb) {		if ((fb = decMemoryMap (SFB_SIZE,		    0, decFbs[screen].fd)) == NULL)			return FALSE;	        decFbs[screen].fb = fb;	}	/*	 * Frame buffer RAM always starts at core space size / 2.	 * SFB Registers always start at offset 1M into core space.	 *	 * The actual offset of the displayed screen may vary, because	 * of cursor ram location.  Also, pixel-width of the frame buffer	 * may not be the same as the displayed width.  To figure these	 * things out, we have to look at the SFB registers.	 */ 	sfbregs = (sfb_reg_t *)(fb + SFB_ASIC_OFFSET);	fb_off = (int)decFbs[screen].size / 2;	fbr = fb + SFB_ASIC_OFFSET;	decFbs[screen].regs.sfbregs[0] = (sfb_reg_t *)(fbr + 0 * 64 * 1024);	decFbs[screen].regs.sfbregs[1] = (sfb_reg_t *)(fbr + 1 * 64 * 1024);	decFbs[screen].regs.sfbregs[2] = (sfb_reg_t *)(fbr + 2 * 64 * 1024);	decFbs[screen].regs.sfbregs[3] = (sfb_reg_t *)(fbr + 3 * 64 * 1024);	/* Find out real pixel width of the display. */	realwidth = (sfbregs[SFB_REG_VHCR] & 0x1ff) * 4;	/*	 * Find out how big one 'row' of video is, so that we can tell	 * where the displayed frame buffer actually starts.	 */	rowsize = 2 * 1024;			/* 2k for 128K VRAMs, 8BPP */	if (decFbs[screen].depth == 32)		rowsize *= 4;			/* increase by 4x for 32BPP */	if ((sfbregs[SFB_REG_GDER] & 0x200) == 0) /* 256K VRAMs */		rowsize *= 2;			/* increase by 2x */	/*	 * Finally, calcluate real displayed frame buffer offset.	 */#if 0	/* VVBR is write only, but we always write it as 1. */	fb_off += rowsize * (sfbregs[SFB_REG_VVBR] & 0x1ff);#else	fb_off += rowsize * 1;#endif	if (!decSfbScreenInit(pScreen, fb + fb_off,	    decFbs[screen].width,	    decFbs[screen].height,	    monitorResolution, monitorResolution,	    realwidth,	    decFbs[screen].depth)) {fprintf(stderr, "decSfbScreenInit failed\n");            return FALSE;	}	decColormapScreenInit(pScreen);	if (!decScreenInit(pScreen)) {fprintf(stderr, "decScreenInit failed\n");		return FALSE;	}	pScreen->CloseScreen = decSfbCloseScreen;	(void) decSaveScreen(pScreen, SCREEN_SAVER_OFF);	return cfbCreateDefColormap(pScreen);}