Attribute clash

Last updated
The effect of attribute clash on MSX 1 systems when using the 256x192 Highres mode of MSX 1 (in this example blocks of 8x1 pixels share the same foreground colour, so the effect is similar to a ZX Spectrum) MSX Computer Color Limit.gif
The effect of attribute clash on MSX 1 systems when using the 256×192 Highres mode of MSX 1 (in this example blocks of 8×1 pixels share the same foreground colour, so the effect is similar to a ZX Spectrum)

Attribute clash (also known as colour clash or bleeding) is a display artifact caused by limits in the graphics circuitry of some colour 8-bit home computers, most notably the ZX Spectrum, where it meant that only two colours could be used in any 8×8 tile of pixels. The effect was also noticeable on MSX software and in some Commodore 64 titles. Workarounds to prevent this limit from becoming apparent have since been considered an element of Spectrum programmer culture.


This problem also happens with the "semigraphic modes" (text modes with graphics features) of the Color Computer and Dragon, but those computers also have non-attributed graphics and with better resolution. Several video game consoles of the era had such video modes that caused such limitations, but usually allowed more than two colours per tile: the NES (Famicom) had only one mode, which was also "semigraphic", and allowed four colours per 16×16 "block" (group of four 8×8 tile) but 16 per screen. The Super NES allowed 16 colours per tile but 256 per screen (among other improvements), and this made the artefact much harder to notice, if at all (except for those who had to program the device).


Attribute clash on the ZX Spectrum was caused by its idiosyncratic display memory layout, designed in such a way as to minimise memory use of the frame buffer, and optimise for text display instead of graphics. Rather than limit the colour palette to conserve memory, Sinclair's design stored pixel bitmap and colour information in separate areas of memory. While the bitmap specified the state of individual pixels (either on or off), the colour information (or "attributes") corresponded to the text character matrix—24 rows of 32 columns—with one byte per 8x8 pixel character cell. This byte encoded two 3-bit values, known as INK (foreground colour) and PAPER (background colour) after the BASIC instructions used to define the colour values. Two other binary values were included in an attribute; a BRIGHT bit indicating one of two brightness levels for the two colours, and a FLASH bit, which, when set, caused the two colours to be swapped at regular intervals. This scheme provided 15 different colours: the eight combinations of red, green and blue at two brightness levels (except for black, which appeared the same at both brightness). Thus, each 8x8 pixel block could only contain 2 colours from the 15 available, which must both be from either the BRIGHT or non-BRIGHT halves of the palette. Trying to add a third colour in an 8x8 pixel area would overwrite one of the previous colours.

The ZX Spectrum used 6144 bytes for the bitmap, with one byte representing eight pixels, and used 768 bytes for the colour attributes. This gives a total of 6912 bytes for the entire graphics display, a relatively small total for a computer of the Spectrum's era with "colour" capabilities. This graphics architecture was retained right through to Sinclair and Amstrad's later redesigns of the Spectrum, up until Amstrad's final model, the ZX Spectrum +3, despite subsequent models having contained 128  KiB of RAM, reducing the need to save memory in this manner. The architecture was retained to prevent loss of backward compatibility.

Attributes were used by a variety of other computers and consoles, including the Commodore 64, the MSX and NES, although the size of the attribute blocks and the number of colours per block varied. However, with the use of hardware sprites, attribute clash could be avoided.

The Thomson MO5 and TO7 microcomputers, the Oric 1, the MSX 1 architecture, and other systems based on the Texas Instruments TMS9918 video display controller display a very similar constraint: for each group of eight pixels horizontally, only two colours out of 16 are available, giving a similar but less severe effect than with the Spectrum. The MSX 1 did not have just one single colour attribute byte available for a whole 8x8 pixel area, as was the case with the Sinclair Spectrum, but eight, with one attribute byte for each 8×1 pixel group. Thus, while the Spectrum was limited to one colour pair for a square area of 8x8 pixels, the MSX 1 was only limited to one colour pair for a "line" of eight adjacent pixels. In addition MSX1 could use sprites which were not bound to any attribute clash problems (although MSX 1 sprites did have their own limitations, such as being monochrome).

In practice this technical advantage often did not help MSX 1 systems to produce better pictures. The problem for the MSX 1 was that many European software companies who converted Spectrum games to MSX 1 ignored all the improvements the MSX 1 had over the Spectrum, and thus the resulting MSX 1 versions had the same amount of attribute clash as the original Spectrum games ( Jack the Nipper II: In Coconut Capers is one example of this). To ease conversion, the software developers simply copied the single attribute byte value of the Spectrum to all eight corresponding attribute bytes of the MSX 1. For the same reason, the software companies also ignored the sprite capabilities of the MSX 1, and because the video display capabilities were otherwise quite similar (256×192 resolution, 16 colours), both systems produced virtually identical displays for the same game. In contrast, Japanese MSX 1 games[ which? ] did use all the capabilities of MSX 1, often resulting in better looking games[ citation needed ].


To avoid attribute clash, static graphic displays had to be constructed with care. Finely-detailed colour graphics were impossible, as colour could only be applied in 8×8 pixel blocks. Careful design could achieve impressive results, as could synchronising colour changes to the refresh rate of the display—usually a television set.

However, animated displays were more difficult—a distinct drawback in a machine whose primary use was playing video games. If just one pixel in an 8×8 block was recoloured because a moving part of the display touched it, the entire block would change colour. Thus detailed moving graphics caused large ugly fringes of rapidly changing colours to follow them around.


Early software simply ignored the problem. Later, the standard workaround was to use colour for static display elements—such as a decorative border around the edges of the screen, which might include score displays and so on, or some form of instrumentation—with a smaller central monochrome area containing all the animated graphics. This also made graphics faster, as less of the screen had to be updated—both a smaller region, plus only changing pixel information and leaving the colour area untouched.

Some Spectrum software, such as FTL's Light Force , used extremely careful graphics design to achieve full-colour moving graphics, essentially by limiting both the design of the onscreen elements and their paths of motion to 8×8 colour resolution boundaries. The moving elements were thus relatively large and rather blocky or squarish, and their movement was constrained, but this was not visually obvious and the sight of moving full-colour graphics was hugely impressive to Spectrum owners.

No mainstream developers were able to find a suitable all-round fix for the attribute clash problem, instead preferring to use the monochrome graphics method when fast, clear graphics were needed, and full-colour graphics when the situation permitted.

It was possible by paying careful attention to timing to modify the attribute area of RAM at certain specific times as the display was drawn - let the display hardware draw one line of the display, then change the attribute RAM before the next line is drawn to give the effect of different attributes for each individual line. These changes had to be done in software and were time-consuming to program, meaning that this technique was usually limited to special effects. This technique was also very popular in the demoscene.

The problem and solutions

Most games before 1987 ignored attribute clash. Some later games, such as Knight Tyme and Three Weeks in Paradise allowed players to select between two modes of attribute clash: one which ignored main character attributes, blending the character into the background and vice versa, prioritising the characters colour scheme over the background imagery.

Another workaround was to simply render the graphics in two colours, otherwise known as monochrome, as done with the Spectrum version of Knight Lore in 1984.

Many games used full-colour backgrounds and "character scrolling" (where the environment was scrolled eight pixels at a time), but monochrome sprites that were effectively transparent, as in Double Dragon , were drawn in such a way so they stand out, avoiding dependence on colour. Many games used this method with smooth pixel-by-pixel scrolling, but the attribute clash as elements of one character block were "passed" to the next were clearly visible.

A prominent (and less successful) example of the use of full-colour graphics was the Spectrum conversion of Altered Beast . The game suffers from considerable attribute clash.

Programmer Don Priestley developed a distinctive style for several of his games by using large, cartoon-like sprites which were carefully designed to span whole character blocks without appearing unduly square. A disadvantage of this technique was that the gameplay had to be designed around the graphics, and so it was not useful for ports from other platforms. Games that used this technique included Popeye, The Trap Door , Through the Trapdoor, and Flunky . Other developers who used a similar technique included Mike Singleton, with Dark Sceptre , and Gang of Five, with Dan Dare: Pilot of the Future .

In 1994, programmer Igor Maznitsa developed a multi-CPU concept platform "ZX-Poly" based on ZX-Spectrum-128; the platform allows for avoidance of attribute clash, and can even colourise many old games without changes in executable code.

Related Research Articles

<span class="mw-page-title-main">SAM Coupé</span> 8-bit British home computer released in late 1989

The SAM Coupé is an 8-bit British home computer that was first released in late 1989. It was based on and designed to have compatibility with the Sinclair ZX Spectrum 48K and marketed as a logical upgrade from the Spectrum. It was originally manufactured by Miles Gordon Technology (MGT), based in Swansea in the United Kingdom.

<span class="mw-page-title-main">ILBM</span> File format

Interleaved Bitmap (ILBM) is an image file format conforming to the Interchange File Format (IFF) standard. The format originated on the Amiga platform, and on IBM-compatible systems, files in this format or the related PBM format are typically encountered in games from late 1980s and early 1990s that were either Amiga ports or had their graphical assets designed on Amiga machines.

<span class="mw-page-title-main">Commodore 64 demos</span>

The Commodore 64 (C64) demos are demonstrations of what can be done to push the limits of the Commodore 64 computer, made by programmers, musicians and artists.

<span class="mw-page-title-main">Timex Sinclair 2068</span>

The Timex Sinclair 2068, released in November 1983, was Timex Sinclair's third and last home computer for the United States market. It was also marketed in Canada, Argentina, Portugal and Poland, as Timex Computer 2068.

<span class="mw-page-title-main">MOS Technology VIC-II</span> Video microchip in the Commodore 64 and C128 home computers

The VIC-II, specifically known as the MOS Technology 6567/8562/8564, 6569/8565/8566 (PAL), is the microchip tasked with generating Y/C video signals and DRAM refresh signals in the Commodore 64 and C128 home computers.

<span class="mw-page-title-main">Color Graphics Adapter</span> IBM graphics card

The Color Graphics Adapter (CGA), originally also called the Color/Graphics Adapter or IBM Color/Graphics Monitor Adapter, introduced in 1981, was IBM's first color graphics card for the IBM PC and established a de facto computer display standard.

<i>Manic Miner</i> 1983 video game

Manic Miner is a platform video game originally written for the ZX Spectrum by Matthew Smith and released by Bug-Byte in 1983. It is the first game in the Miner Willy series and among the early titles in the platform game genre. The game itself was inspired by the Atari 8-bit family game Miner 2049er. It is considered one of the most influential platform games of all time and has been ported to numerous home computers, video game consoles and mobile phones. Original artwork was created by Les Harvey. Later Software Projects artwork was supplied by Roger Tissyman.

<span class="mw-page-title-main">IBM Monochrome Display Adapter</span> Computer display standard

The Monochrome Display Adapter is IBM's standard video display card and computer display standard for the IBM PC introduced in 1981. The MDA does not have any pixel-addressable graphics modes, only a single monochrome text mode which can display 80 columns by 25 lines of high resolution text characters or symbols useful for drawing forms.

<span class="mw-page-title-main">TMS9918</span> Video display controller by Texas Instruments

The TMS9918 is a video display controller (VDC) manufactured by Texas Instruments, in manuals referenced as 'Video Display Processor' (VDP) and introduced in 1979. The TMS9918 and its variants were used in the ColecoVision, CreatiVision, Memotech MTX, MSX, NABU Personal Computer, SG-1000/SC-3000, Spectravideo SV-318, Spectravideo SV-328, Sord M5, Tatung Einstein, Texas Instruments TI-99/4, Casio PV-2000, Coleco Adam, Hanimex Pencil II, and Tomy Tutor.

A display list is a series of graphics commands that define an output image. The image is created (rendered) by executing the commands to combine various primitives. This activity is most often performed by specialized display or processing hardware partly or completely independent of the system's CPU for the purpose of freeing the CPU from the overhead of maintaining the display, and may provide output features or speed beyond the CPU's capability.

<span class="mw-page-title-main">Video display controller</span> Type of integrated circuit

A video display controller or VDC is an integrated circuit which is the main component in a video-signal generator, a device responsible for the production of a TV video signal in a computing or game system. Some VDCs also generate an audio signal, but that is not their main function.

<span class="mw-page-title-main">ZX Spectrum graphic modes</span>

The ZX Spectrum is generally considered to have limited graphical capabilities in comparison to some other home computers of the same era such as the Commodore 64, largely due to its lack of a dedicated graphics chip. Nevertheless, throughout its commercial life and later activity on the demoscene, various techniques have been developed to provide improvements to the Spectrum's graphical output.

<span class="mw-page-title-main">Timex Computer 2048</span> 1984 computer developed by Timex Portugal

The Timex Computer 2048 or TC 2048 is a 1984 computer developed by Timex Portugal, at the time part of Timex Sinclair. It was based on the Timex Sinclair 2048 prototype, with a similar redesign case, composite video output, Kempston joystick interface, and additional video modes, while being highly compatible with the Sinclair ZX Spectrum computer.

<span class="mw-page-title-main">Vector-06C</span>

Vector-06C is a home computer with unique graphics capabilities that was designed and mass-produced in USSR in the late 1980s.

The ColecoVision, SG-1000, CreatiVision, and first-generation MSX computers use the TMS9918A Video Display processor (VDP), which has its own 16 KiB of video memory that was not shared with main memory. Compared to the unified system and video memory used by other 8-bit computers of the time, such as the Apple II, ZX Spectrum, and Commodore 64, separate memory has the advantage of freeing up of the Z80 processor's 64 KiB address space for main RAM, and the VDP does not need to steal CPU cycles to access video memory. The disadvantage is that the program has to use the CPU's dedicated I/O instructions to command the VDP to manipulate the contents of the video RAM. This not only slows down video access but also makes the porting of games from unified-memory platforms more difficult. Attempts of porting ZX Spectrum games were often thwarted by this difference. Also, programmers had to learn to optimally use the more advanced capabilities of the VDP.

Composite artifact colors is a designation commonly used to address several graphic modes of some 1970s and 1980s home computers. With some machines, when connected to an NTSC TV or monitor over composite video outputs, the video signal encoding allowed for extra colors to be displayed, by manipulating the pixel position on screen, not being limited by each machine's hardware color palette.

<span class="mw-page-title-main">Orion-128</span>

The Orion-128 is a DIY computer designed in Soviet Union. It was featured in the Radio magazine in 1990, other materials for the computer were published until 1996. It was the last Intel 8080-based DIY computer in Russia.