Subject: Re: ds3100 console busted in 1.5ALPHA2?
To: Chuck Silvers <chuq@chuq.com>
From: Andrew Doran <ad@netbsd.org>
List: port-pmax
Date: 09/12/2000 16:03:00
Chuck Silvers <chuq@chuq.com> wrote:

> so it is just me, or does the graphics console on a ds3100 in 1.5ALPHA2
> just not work at all?  like, it doesn't draw letters.  or at least not
> in the ascii character set.  :-)

Here's a hack. If it compiles, it might fix that:

Index: rcons.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/pmax/dev/rcons.c,v
retrieving revision 1.43
diff -u -r1.43 rcons.c
--- rcons.c	2000/06/28 11:03:26	1.43
+++ rcons.c	2000/09/12 14:59:25
@@ -97,15 +97,29 @@
 	struct fbinfo *info;
 {
 	static struct rasops_info ri;
-	int cookie;
+	int cookie, epwf, bior;
 
-	/* TC mfb has special needs; 8-bits per pel, but monochrome */
-	if (info->fi_type.fb_boardtype == PMAX_FBTYPE_MFB) {
+	/* XXX */
+	switch (info->fi_type.fb_boardtype) {
+	case PMAX_FBTYPE_MFB:
 		ri.ri_depth = 8;
 		ri.ri_flg = RI_CLEAR | RI_FORCEMONO;
-	} else {
+		epwf = 0;
+		bior = WSDISPLAY_FONTORDER_L2R;
+		break;
+	case PMAX_FBTYPE_PM_MONO:
+	case PMAX_FBTYPE_PM_COLOR:
 		ri.ri_depth = info->fi_type.fb_depth;
 		ri.ri_flg = RI_CLEAR;
+		epwf = 1;
+		bior = WSDISPLAY_FONTORDER_R2L;
+		break;
+	default:
+		ri.ri_depth = info->fi_type.fb_depth;
+		ri.ri_flg = RI_CLEAR;
+		epwf = (ri.ri_depth != 8);
+		bior = WSDISPLAY_FONTORDER_L2R;
+		break;
 	}
 
 	ri.ri_width = info->fi_type.fb_width;
@@ -114,11 +128,15 @@
 	ri.ri_bits = (u_char *)info->fi_pixels;
 
 	wsfont_init();
+
+	if (epwf)
+		cookie = wsfont_find(NULL, 8, 0, 0);
+	else
+		cookie = wsfont_find("Gallant", 0, 0, 0)
 
-	/* Choose 'Gallant' font if this is an 8-bit display */
-	if (ri.ri_depth == 8 && (cookie = wsfont_find("Gallant", 0, 0, 0)) > 0)
+	if (cookie > 0)
 		wsfont_lock(cookie, &ri.ri_font, WSDISPLAY_FONTORDER_L2R, 
-		    WSDISPLAY_FONTORDER_L2R);
+		    bior);
 
 	/* Get operations set and set framebugger colormap */
 	if (rasops_init(&ri, 5000, 80))