|This article does not cite any references or sources. (December 2009)|
|Alternative demo platforms|
The raster bar (also referred to as rasterbar or copperbar) is an effect used in demos that displays animated bars of colour, usually horizontal, which additionally might extend into the border, a.k.a. the otherwise unalterable area (assuming no overscan) of the display. Raster bars, especially horizontal, were very common in demos for the Commodore 64, Commodore Amiga, Atari ST, ZX Spectrum and Amstrad CPC.
Horizontal raster bars
Such computers had limited graphical abilities and usually a fixed number of colours or inks (e.g. a maximum of 16 on the Amstrad CPC) 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 (palette) of which the hardware was capable (e.g. 27 on the CPC). Raster bars and similar effects (e.g. having a HUD that uses a different set of colours than does the playing area) are achieved by changing the entries in the CLUT at specific times while the screen is being drawn (originally by the electron beam), 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.
This effect may have been considered impressive to those who were unfamiliar with how it worked, because the computer appeared to be displaying more colours than are normally possible – potentially in the 'off-limits' border area, too – and because the traditional way of creating and animating such horizontal lines (by colouring pixels individually) would require intensive CPU performance that most CPUs of the time could not attain.
The Commodore Amiga had a graphics coprocessor referred to as the Copper that could be programmed to perform the effect, hence the term "Copper bars". In each frame of the demo, a new Copper list (Copper program) would be generated in order to animate the bars.
Extension into the border
Moreover, horizontal raster bars may be extended into the border of the screen, which usually cannot be drawn to, unless the video hardware has been set to overscan. The border exists because computers of the 8- and 16-bit era typically did not or could not display an image across the entire screen. Early machines were designed to work with low quality TV sets and inexpensive monitors, which often caused the outer regions of the displayed image to be deformed (including distortion and blurred signal) and only expensive CRT monitors had full control over image geometry. So only the center part of the generated video signal could be guaranteed to be properly displayed on every screen. To prevent problems a border was displayed around the actual display area to exclude unsafe space from the use.
The graphics chip commonly used a fixed entry in the CLUT to colour this border area. Raster bars that span the main screen and the border simply extend the ink-changing logic described above to the border, too, albeit with increased requirements for precision: the border's entry in the CLUT should be updated during the horizontal blanking interval, when the TV's electron beam is returning to the left to begin drawing a new scanline, so that the bar begins directly at the left of the screen and not at any other horizontal point in the border.
Changing the CLUT was not the only way that graphics could be displayed in the border area of the screen. The Commodore 64 had a trick in which the programmer could fool the graphics chip to display sprites in the border, and the Atari ST could use other methods to extend the area available for displaying graphics to the borders. In both of these cases, however, the tricks involved triggering features in the graphics chips that were not actually implemented by design.
The scrolling multicoloured border displayed when loading cassette-based software, displayed as standard on the ZX Spectrum and sometimes programmed on other machines of that era, is created by updating the colour of the border rapidly according to the timing of the data that is being read from the tape.
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.
Vertical raster bars are often called Kefrens bars, after the Amiga demo group that popularized them. However, the effect was implemented earlier by the Alcatraz demo group.