5

8-bit home computers, and contemporary third-generation consoles, commonly displayed graphics with an array of character cells, a.k.a. character names, character pointers, name table etc, each of which was one byte. For example, the Commodore 64 used 40x25 = 1000 character names.

Each of these referred to one of 256 tile bitmaps.

Having only two or even four colors on the screen would've been a little drab, so several machines also provided a second array of color memory that could specify a slightly different palette for each position on the screen. For example, the Commodore 64 had 40x25 color memory values, each of which was only four bits (the hardware actually used a separate static RAM chip for this), but that was enough to replace one of the four palette entries, with one of 16 colors. The NES used a more complex but fundamentally similar system.

This had nontrivial cost, e.g. the above mentioned extra static RAM chip, or Andrew Braybrook's remark

I liked the C64 multi-colour modes and used any number of wacky combinations for Gribbly's Day Out. The game used a single constant foreground colour as I couldn`t afford to scroll the colour map.

Thinking this over, it seems to me there is an alternative way it could have been done.

To start with, I argue that generally speaking, the color of something is determined more often by what it is than where it is. (There are exceptions, but I think this is typically true.) So instead of a different color for each location on the screen, we really want one for each character name. Of course, 256 color registers would be too many to put on the chip (as far as I know, that didn't start happening until VGA in 1987), but we could do them in groups. Say character names 0-63 get one foreground color, 64-127 another, etc. That's just four color registers on the chip, which would be easy to afford.

Did any 8-bit machine actually use something like this system?

1

2 Answers 2

9

Community Wiki'd from comments above: the TMS9918's mode 1 (also sometimes documented as GRAPHIC 1) is an example.

As captured in the MSX handbook, the colour table structure in that mode is:

enter image description here

i.e. characters 0–7 use the 4-bit foreground and background colours defined by the first byte in the colour table, characters 8–15 use those defined by the second, etc, giving a 32-byte colour table that specifies a unique foreground and background colour for each group of eight characters in the character set — i.e. colour palette is selected solely based on character index.

1
  • 1
    Right. Note that the TMS9918 was used in a variety of machines, and had various modes (not all of which worked this way), but this was the default mode used in the TI-99/4A's BASIC interpreter, as can be seen in the definition of the CALL COLOR procedure, which associates colours with a specified group of characters.
    – occipita
    Commented Jul 5 at 18:28
7

The Chroma 81 interface for the ZX81 is a modern example. It has two ways of adding colour support to the ZX81's monochrome display:

  1. A separate attribute file similar to that used by the Spectrum;
  2. The ability to assign foreground and background colours to each of the 128 characters that the ZX81 can draw.

The second option is intended for adding colour support to existing games without modifying their code.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .