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
The Atari 2600, initially branded as the Atari Video Computer System (Atari VCS) from its release until November 1982, is a home video game console developed and produced by Atari, Inc. Released in September 1977, it popularized microprocess ...
and
Atari 8-bit family
The Atari 8-bit family is a series of 8-bit home computers introduced by Atari, Inc. in 1979 as the Atari 400 and Atari 800. The series was successively upgraded to Atari 1200XL , Atari 600XL, Atari 800XL, Atari 65XE, Atari 130XE, Atari 800XE ...
(because they could be easily displayed using the hardware of those systems) and then later in demos for the
Commodore 64,
Amiga
Amiga is a family of personal computers introduced by Commodore International, Commodore in 1985. The original model is one of a number of mid-1980s computers with 16- or 32-bit processors, 256 KB or more of RAM, mouse-based GUIs, and sign ...
,
Atari ST, and
Amstrad CPC
The Amstrad CPC (short for ''Colour Personal Computer'') is a series of 8-bit home computers produced by Amstrad between 1984 and 1990. It was designed to compete in the mid-1980s home computer market dominated by the Commodore 64 and the S ...
.
The term ''copperbar'' comes from a graphics
coprocessor on the
Amiga
Amiga is a family of personal computers introduced by Commodore International, Commodore in 1985. The original model is one of a number of mid-1980s computers with 16- or 32-bit processors, 256 KB or more of RAM, mouse-based GUIs, and sign ...
home computer referred to as the
Copper
Copper is a chemical element with the symbol Cu (from la, cuprum) and atomic number 29. It is a soft, malleable, and ductile metal with very high thermal and electrical conductivity. A freshly exposed surface of pure copper has a pinkish ...
(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
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
Cathode rays or electron beam (e-beam) are streams of electrons observed in discharge tubes. If an evacuated glass tube is equipped with two electrodes and a voltage is applied, glass behind the positive electrode is observed to glow, due to ele ...
), 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
In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted ...
, specifically called a
raster interrupt, when the
horizontal blanking interval or the
vertical sync begins; thus, an
interrupt handler
In computer systems programming, an interrupt handler, also known as an interrupt service routine or ISR, is a special block of code associated with a specific interrupt condition. Interrupt handlers are initiated by hardware interrupts, softw ...
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
Rasterbars in 16 bytes (Commodore 64)Various Rasterbar effects (Commodore 64)
{{DEFAULTSORT:Raster Bar
Computer graphics
Demo effects