Raster bar


The raster bar is an effect used in demos and older video games that displays animated bars of colour, usually horizontal, which additionally might extend into the border, a.k.a. the otherwise unalterable area of the display. Raster bar-style effects were common on the Atari 2600 and Atari 8-bit family and then later in demos for the Commodore 64, Amiga, Atari ST, ZX Spectrum and Amstrad CPC.
The term copperbar comes from a graphics coprocessor on the Amiga home computer referred to as the Copper. It can be programmed to change the display colors per scan line without requiring the CPU, except to update the position of the bars once per frame.

Horizontal raster bars

Such computers had limited graphical abilities and usually a fixed number of colours or inks that could be displayed at any one time, which were often assigned from a colour look-up table, which maps each displayable colour to one of a larger selection of possible colours of which the hardware was capable. Raster bars and similar effects are achieved by changing the entries in the CLUT at specific times while the screen is being drawn, in order to display a different set of colours in the subsequent portion of the screen. The most basic raster bar simply affects a single scanline by changing the value in the CLUT for the colour covering that line just before the electron gun draws it, and then changes it back to the previous colour once the line is finished. By using multiple colours in succession and carefully gradating the changes, an effect of metallic-looking horizontal bars can be achieved.
Many graphics chips can trigger an interrupt, specifically called a raster interrupt, when the horizontal blanking interval or the vertical sync begins; thus, an interrupt handler can precisely time and perform the task of updating CLUT entries for raster bars and other colour-changing effects.

Vertical raster bars

A similar effect can be generated vertically, although it often does not extend into the border area. To generate vertical bars, the same line of video memory is repeatedly output every scanline. At the top of the frame, the video memory is typically blank, and every horizontal blanking interval it is updated with a new "bar" in a slightly different position, creating a "stepped" effect.

Code examples