griffith@eecs.cs.pdx.edu (Michael Griffith) (09/02/90)
I need to know if it is possible to clear bit-wise areas of memory with the blitter. For example, if I wanted to clear a three bit wide swath in memory with the blitter without disturbing the bits to the right and left could I do it in a single blit? In the case of normal clearing this would involve leaving all channels except the destination (D) cleared and using a minterm byte of 0. However, it seems that it would be more complicated to clear an area that is not an increment of 16 bits wide. What I need to know is if any of your bright programmers out there have a solution to my dilema. Here is a description of the reason why I'm trying to do this: In "Computer Graphics: Systems & Concepts" by Rod Salmon and Mel Slater, Chapter 11, there is a discussion of a generic black and white blitting routine called BitBLT. BitBLT takes the following parameters: BitBLT(Op, SourceForm, SourcePos, SourceSize, DestForm, DestPos, DestSize) The operation is a 4-bit value describing the method to use in combining the source and destination forms (forms being black and white bitmaps with a header describing their size). A partial table for the combination rules follows: Bit Pattern Boolean Expression Name of Operation 0000 d := 0 CR_0 0001 d := s & d CR_AND 0010 d := s & (~d) CR_SND 0011 d := s CR_S . . . 1110 d := ~(s & d) CR_NAND 1111 d := 1 CR_1 The pos and size variables all consist of a pair of integers. The idea being to take the source and destination bitmaps, align and clip them according to the pos and size variables and combine them using the operation storing the result in the destination. The book mentions the fact that different architectures may make different requirements as to the alignment of the bit planes. Yet I would like to make the routine function on non-aligned blocks for use in clearing space for windows, etc., which is what the routine is intended to be used for. I would greatly appreciate if if some kind soul could point me in the right direction. | Michael Griffith | If I had an opinion it certainly | | griffith@eecs.ee.pdx.edu | wouldn't be the same one as | | ...!tektronix!psueea!eecs!griffith | Portland State University anyways. |