Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!rpi!crdgw1!uunet!brunix!doorknob!dfs From: dfs@cs.brown.edu (David Sklar) Newsgroups: comp.sys.mac.programmer Subject: Access to hardware framebuffer (Color QD) Message-ID: Date: 20 Aug 90 22:41:33 GMT Sender: news@brunix.UUCP Distribution: comp Organization: Department of Computer Science, Brown University Lines: 34 I am attempting to use the MacII to run interactive programs that were written for framebuffers before the days of palettes, virtual LUTs, etc. These programs expect the pixel values they draw to *not* be modified before being placed in the hardware framebuffer. Thus, I am bypassing the Palette Manager and trying to get as close to the hardware as possible. I want to be able to set the hardware color table with extreme precision: to set LUT entry 0 and know that entry 0 (exactly) of the hardware LUT is being set. Likewise, to set a pixel in the screen's pixmap to value X and know that exactly X is being placed in the hardware framebuffer. Let's say I want to draw a line in color 0. I have reason to believe (but no proof) that it's not enough for me to simply: 1) Set the port's "fgColor" field to 0 (manually, not using a QD routine) 2) Call QuickDraw to draw the line. Of course, there's no way to for me to verify that a 0 was not placed in the hardware FB. But I believe my pixel values are getting mapped to different numbers, because XOR'ing is not working as one would expect. For example, 1) I specified a white color for LUT entry 0 2) I specified a black color for LUT entry 1 3) I drew an image using only fgColors 0 and 1 (always manually setting the fgColor field) 4) I set the transfer mode to XOR 5) I draw a line using fgColor 1 THE RESULT was *not* an inversion of all pixels touched by the line. It seems the numbers I specify are being mapped to something else before they are placed in the hardware FB. Any help in furthering my understanding of this under-documented method for using Color QD would be appreciated!