X11 Unix squeak on B&W displays

Bert Freudenberg bert at isg.cs.uni-magdeburg.de
Fri Apr 5 12:00:25 UTC 2002


On Fri, 5 Apr 2002, Bruce O'Neel wrote:

> Hi,
> 
> After a bit of work, I have NetBSD running on my old 68k powerbook.
> Ian's Squeak-3.1beta-4478-src.tar.gz builds and runs just fine (well,
> for carefully selected definitions of fine), as long as I send the
> display to another system because NetBSD on my hardware only supports
> B&W.  I can see in sqXWindow.c in SetUpPixmap where the visual class
> is checked and then errors when it is B&W.
> 
> How hard would it be to make X11 B&W displays work?  Is this really
> impossible, or, is it pretty easy (ie copy the code for PseudoColor
> say).  My X11 knowledge is somewhat less than 0 here though weighting
> down my desk are three thick O'Reilly X11 books just waiting to be
> read. 

Should be rather easy. After adding the 1 bpp Visual support to
SetUpWindow(), you just have to implement a copyImage1To1() function and
add a special case to ioShowDisplay():

      if (depth == 1)
	{
	  if (stBitsPerPixel == 1)
	    {
	      copyImage1To1((int *)dispBitsIndex, (int *)stDisplayBitmap,
			    width, height,
			    affectedL, affectedT, affectedR, affectedB);
	    }

And don't forget to update ioHasDisplayDepth().

That should be about it.

-- Bert




More information about the Squeak-dev mailing list