Subject: Re: PMAG-AA frame buffer woes
To: None <entropy@zippy.bernstein.com>
From: maximum entropy <entropy@zippy.bernstein.com>
List: port-pmax
Date: 04/03/1997 11:32:21
>From: maximum entropy <entropy@zippy.bernstein.com>
>
>I've got a DECstation 5000/120 with PMAG-AA monochrome frame buffer.
>The machine runs NetBSD (1.2 and recent -current kernels) just fine
>with a serial console, but the frame buffer raster console seems to
>not work at all.  The first few messages from the bootstrap (kernel
>sizes and start offset) print OK and then the display goes haywire.

My original guesses as to the cause turned out to be wrong.  I did
some debugging last night, and came up with a fix.

There were two problems.  The frame buffer dimensions were set
incorrectly, and there's also something going wrong with the palette
such that when it is supposed to become black-on-white it becomes
black-on-black instead.

My fix for the palette problem isn't ideal...I'm simply forcing the
palette to always stay white-on-black.  

Anyway, here's the result of my work last night.  Enjoy.

--- /usr/src/sys/arch/pmax/dev/mfb.c-orig	Thu Jan 23 07:21:09 1997
+++ /usr/src/sys/arch/pmax/dev/mfb.c	Thu Apr  3 11:16:59 1997
@@ -308,13 +308,13 @@
 	fi->fi_base = (caddr_t)(mfbaddr + MFB_OFFSET_BT431);
 	fi->fi_vdac = (caddr_t)(mfbaddr + MFB_OFFSET_BT455);
 	fi->fi_size = (fi->fi_pixels + MFB_FB_SIZE) - fi->fi_base;
-	fi->fi_linebytes = 1280;
+	fi->fi_linebytes = 2048;
 	fi->fi_driver = &mfb_driver;
 	fi->fi_blanked = 0;
 
 	/* Fill in Frame Buffer Type struct. */
 	fi->fi_type.fb_boardtype = PMAX_FBTYPE_MFB;
-	fi->fi_type.fb_width = 1280;
+	fi->fi_type.fb_width = 2048;
 	fi->fi_type.fb_height = 1024;
 	fi->fi_type.fb_depth = 8;
 	fi->fi_type.fb_cmsize = 0;
@@ -521,6 +521,7 @@
 	u_char rgb [3];
 	register int i;
 
+	blackpix = 1; /* XXX */
 	if (blackpix)
 		rgb [0] = rgb [1] = rgb [2] = 0xff;
 	else



--
entropy -- it's not just a good idea, it's the second law.