Bit blit

Bit blit

Bit blit ("bitblt", "blitting" etc.) is a computer graphics operation in which several bitmap patterns are combined into one using a "raster operator".

Origins

The name derives from the "BitBLT" machine instruction for the Xerox Alto computer, standing for "Bit Block Transfer". This operation was created by Dan Ingalls at Xerox PARC in late 1974 for the Smalltalk-72 system. For the Smalltalk-74 system, Dan Ingalls implemented a redesigned version in microcode.

The development of fast methods for various bit blit operations was key in the evolution of computer displays from using character graphics, to using bitmap graphics for everything. Machines that rely heavily on the performance of 2D graphics (such as video game consoles) often have special-purpose circuitry called a "blitter".

Bit blit techniques and uses

A classic use for blitting is to render transparent sprites onto a background. It is usually not feasible to go through every

What first is needed are the bitmaps for the sprites and the corresponding masks. The colours are very important as the sprite background and the mask foreground are black, stored in binary as 0's. The maskbackground is white, stored in binary as 1's. For example:

The first blit uses the raster operator of AND with the background and the mask of the sprites. Because any value ANDed with 0 equals 0, and any value ANDed with 1 is unchanged, we can create black areas where the actual sprites will appear, and leave the rest of the background alone.

The second blit uses the raster operator of OR with the altered background and the actual sprite. Because any value OR'd with 0 is unchanged, the background is unaffected and the black areas are filled with the actual sprite image.

It is also possible to achieve the same effect using a sprite with a white background and a white-on-black mask. In this case, the mask would be ORed first, and the sprite ANDed next.

Blitting vs. sprites

Blitting is similar to hardware-sprite drawing, in that both systems reproduce a pattern, typically a square area, at different locations on the screen. Sprites have the advantage of being stored in separate memory, and therefore don't disturb the main display memory. This allows them to be moved about the display, covering the "background", with no effect on it.

Blitting moves the same types of patterns about the screen, but does so by writing into the same memory as the rest of the display. This means every time the pattern is placed on the screen, the display "under" it is overwritten, or "damaged". It is up to the software to clean this damage up by blitting twice, once to remove the damage, and then again to place the bit in its new location. However, there are several ways to optimize this. If large areas of the screen are taken over by the patterns, it may be more efficient to blit the background to the screen instead of erasing each pattern individually. A variation involves dividing the screen into segments and erasing only the segments where patterns have been drawn on. This technique is known as dirty rectangles.

As one might imagine, this makes blitting significantly slower than sprite manipulation. However blitting has one very big advantage: there's no physical limit to the number of patterns you can blit, or to the size of the patterns. Thus you can use blitting to display anything on the screen, including simulating sprites (through the double-write pattern noted above), or even text.

ee also

* Block-transfer instruction
* Blitter

External links

* [http://www.bitsavers.org/pdf/xerox/alto/BitBLT_Nov1975.pdf Dan Ingall's November 19, 1975 BitBLT memo]
* [http://gagne.homedns.org/~tgagne/contrib/EarlyHistoryST.html Alan Kay. "The Early History of Smalltalk." 1993.]
* [http://wiki.squeak.org/squeak/189 A BitBlt explanation]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • Bit blit — Saltar a navegación, búsqueda En computación gráfica, BIT BLIT (bitblt, blitting, etc) es una primitiva gráfica consistente en que dos mapas de bit son combinados en uno. Se trata de una de las primitivas gráficas más básicas y por tanto más… …   Wikipedia Español

  • Bit blit — Als Bit blit (für Bit Block Image Transfer; auch als BitBlt oder ähnlich bezeichnet für bit block transfer) bezeichnet man eine Computeroperation, die für das schnelle Kopieren und Verschieben von Speicherinhalten (Blitting) zuständig ist. Bit… …   Deutsch Wikipedia

  • Blit — can mean:* BLock Image Transfer from Bit blit ( Bit Block Transfer , BitBLT , blitting etc.) is a computer graphics operation in which two bitmap patterns are combined. Sometimes, this is done in hardware by means of a Blitter chip. * The Blit… …   Wikipedia

  • Blit — steht für:: die Computeroperation Bit blit BLIT ist die Abkürzung für: den Brandenburger Linux Infotag, ein in Potsdam stattfindender Linuxtag …   Deutsch Wikipedia

  • Blit (computer terminal) — In computing, the Blit was a programmable bitmap graphics terminal designed by Rob Pike and Bart Locanthi Jr. of Bell Labs in 1982. When initially switched on, the Blit looked like an ordinary textual terminal, although taller than usual: Similar …   Wikipedia

  • Bit Block Transfer — Als Bit blit (für Bit Block Image Transfer; auch als BitBlt oder ähnlich bezeichnet für bit block transfer) bezeichnet man eine Computeroperation, die für das schnelle Kopieren und Verschieben von Speicherinhalten (Blitting) zuständig ist. Bit… …   Deutsch Wikipedia

  • Bit — This article is about the unit of information. For other uses, see Bit (disambiguation). Fundamental units of information bit (binary) nat (base e) ban (decimal) qubit (quantum) This box …   Wikipedia

  • BitBLT — Als Bit blit (für Bit Block Image Transfer; auch als BitBlt oder ähnlich bezeichnet für bit block transfer) bezeichnet man eine Computeroperation, die für das schnelle Kopieren und Verschieben von Speicherinhalten (Blitting) zuständig ist. Bit… …   Deutsch Wikipedia

  • BitBlt — Als Bit blit (für Bit Block Image Transfer; auch als BitBlt oder ähnlich bezeichnet für bit block transfer) bezeichnet man eine Computeroperation, die für das schnelle Kopieren und Verschieben von Speicherinhalten (Blitting) zuständig ist. Bit… …   Deutsch Wikipedia

  • Bitblit — Als Bit blit (für Bit Block Image Transfer; auch als BitBlt oder ähnlich bezeichnet für bit block transfer) bezeichnet man eine Computeroperation, die für das schnelle Kopieren und Verschieben von Speicherinhalten (Blitting) zuständig ist. Bit… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”