Jump to content

Raster bar

From Wikipedia, the free encyclopedia
Example of rasterbars moving behind text, from an intro by The Replicants on Atari ST

The raster bar (also referred to as rasterbar or copperbar) 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 (assuming no overscan) of the display. Raster bar-style effects were common on the Atari 2600 and Atari 8-bit computers (because they could be easily displayed using the hardware of those systems) and then later in demos for the Commodore 64, Amiga, Atari ST, and Amstrad CPC.

The term copperbar comes from a graphics coprocessor on the Amiga home computer referred to as the Copper (a shortened form of coprocessor). 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

[edit]

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 (CLUT), 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.

Vertical raster bars

[edit]
Example of vertical raster bars from Angel's "Coppermaster" Amiga demo, with horizontal raster bars in the background

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

[edit]