The TED (Text Editing Device)

The TED (Text Editing Device), specifically known as the MOS Technology 7360, is the integrated circuit chip responsible for generating video graphics and sound in the Commodore 16 and Plus/4 home computers. It also incorporated the computer's DRAM refresh circuitry, interval timers and keyboard input handling.

Its features include:

  • video capabilities including 40x25 text, multi-colour text (4x8 pixels per char, double pixel width in 'x' direction), extended background colour mode (8x8 pixels per char), multi-colour graphics (160x200 pixels) and hi-res graphics (320x200 pixels)
  • 2 channel sound- 1) a square wave and 2) either another square wave or white noise
  • DRAM memory bank switching (used to maximise the amount of RAM available to CBM BASIC)
  • 3 16-bit interval timers consisting of down counters operating at the master clock frequency. They can generate IRQs on underflow.
  • an I/O port which is used on the Plus/4 and 16 to scan the keyboard and joystick.
  • hardware cursor
  • hardware text blinking
  • hardware inverse characters

These were largely unchanged from the corresponding VIC-II modes aside from different register and memory mapping (see the article on the VIC-II for information on graphics modes). However, the TED lacked the sprite capabilities of the VIC-II, and so game animation had to be done with programmable characters like on the VIC-20. This tended to restrict the graphics of C16/Plus 4 games versus the C64. The TED did include two features that the VIC-II lacked: luminance control and blinking text. 15 of its 16 colours (black being the exception) could be assigned one of 8 luminance values, thus making the TED capable of displaying a far wider array of colours than the VIC-II.

Programming

Character sets, screen and colour memory, and graphics bitplanes can be addressed directly on the TED, without additional logic as found on the C64. In fact, even RAM/ROM selection requires change of a single bit.

Character modes need $800 bytes of RAM for screen and colour memory. The first $400 bytes act as colour memory (the memory permanently located at $D800 on the C64), with the lower 4 bits containing colour codes, exactly as found on the C64. Bits 4-6 denote the intensity level of the colour, while the high bit select flashing/no-flashing attributes. The other $400 bytes contain the screen codes for the displayed characters. If hardware character inversion is selected, the lower 7 bits hold the screen code and the high bit selects inversion for the character. If character inversion is not selected, all 8 bits denote the screen code. Extended Color Mode (ECM) and Multi Color Mode (MCM) modes work exactly as described on the 64. While these two modes are in effect, inversion and blinking are disabled.

Things get a bit more complex in graphics mode, where the bitplane occupies $2000 bytes and is handled just like a VIC-II bitplane. The colours are handled differently. $800 bytes are needed for colour memory, which is laid out in $400 bytes of intensity memory and $400 bytes of colour memory. An "off" bit in the bitplane uses the lowest nybble (half-byte) of the appropriate colour memory location as the colour and retrieves the intensity from bits 4-6 of the appropriate intensity memory location. For an "on" bit, the colour is taken from the high nybble of the appropriate colour memory location, while the intensity is taken from bits 0-2 of the intensity memory location. Bits 3 and 7 in intensity memory are unused.

In multicolour mode, differences abound. The 64's VIC-II enabled one to utilize 3 different colours in each 8x8 cell and a single background. The TED simply cannot accomplish this due to the lack of adequate colour memory. So, TED allows only 2 varying colours per 8x8 cell. Those colours are chosen from the palette of 121. The remaining 2 colours are chosen for the entire screen, again from the 121 colour palette. The mapping is as follows:

   00   background color     01   same as "off" color in hires mode     10   same as "on" color in hires mode     11   another "background" color  

The TED IC is able to generate both PAL and NTSC compatible signals from a single IC. Only the crystal need be changed to go from one standard to the other. In PAL mode, there are 312 lines shown, while NTSC only has 262 lines of display. The line synchronization is the same in either PAL or NTSC mode. It's always 57 clock cycles per rasterline. The TED divides the supplied crystal frequency by 20 for PAL display and by 16 for NTSC.

For the serious video programmer, raster interrupts are implemented as on the VIC-II. However, the 0 line of the register corresponds to the first line of the character screen area, not the top of the border. In addition, the current raster line can be read from TED registers. You can modify the counter as well. Doing so will most likely affect the screen display. As a bonus, the horizontal location of the raster can be read and modified in the same way. Unfortunately, these registers provide the basis for most effects, as the TED can't handle sprites.

 

Colours

The TED chip produces a 121-colour palette.

hue / luminance 0 1 2 3 4 5 6 7
1 black 1,0 1,1 1,2 1,3 1,4 1,5 1,6 1,7
2 white 2,0 2,1 2,2 2,3 2,4 2,5 2,6 2,7
3 red 3,0 3,1 3,2 3,3 3,4 3,5 3,6 3,7
4 cyan 4,0 4,1 4,2 4,3 4,4 4,5 4,6 4,7
5 purple 5,0 5,1 5,2 5,3 5,4 5,5 5,6 5,7
6 green 6,0 6,1 6,2 6,3 6,4 6,5 6,6 6,7
7 blue 7,0 7,1 7,2 7,3 7,4 7,5 7,6 7,7
8 yellow 8,0 8,1 8,2 8,3 8,4 8,5 8,6 8,7
9 orange 9,0 9,1 9,2 9,3 9,4 9,5 9,6 9,7
10 brown 10,0 10,1 10,2 10,3 10,4 10,5 10,6 10,7
11 yellow-green 11,0 11,1 11,2 11,3 11,4 11,5 11,6 11,7
12 pink 12,0 12,1 12,2 12,3 12,4 12,5 12,6 12,7
13 blue-green 13,0 13,1 13,2 13,3 13,4 13,5 13,6 13,7
14 light blue 14,0 14,1 14,2 14,3 14,4 14,5 14,6 14,7
15 dark blue 15,0 15,1 15,2 15,3 15,4 15,5 15,6 15,7
16 light green 16,0 16,1 16,2 16,3 16,4 16,5 16,6 16,7

Pinouts

MOS Technology 7360 (TED) pinout

The TED chip is packaged in a JEDEC-standard 48-pin DIP.
An undesirable feature of the chip is its well-known tendency to destroy itself though overheating. To preserve a computer which employs this chip in working order, it is recommended to improve its cooling.

List of TED versions

The Different TED chips are as follows:-

  • MOS Technology 7360 (supports both PAL and NTSC video output)
 

Special thanks to Levente Harsfalvi for TED technical details on this page, taken from his page entitled 'Talking to TED'.

This page was last updated on 15th March 2014.