Hubbry Logo
TMS9918TMS9918Main
Open search
TMS9918
Community hub
TMS9918
logo
8 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
TMS9918
TMS9918
from Wikipedia
TMS9918
TMS9918A VDP
Component typevideo display controller
First produced1979

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

The TMS9918 was an advanced design for the era. It had four graphics modes based on an underlying 256 wide by 192 high pixel layout, which could be used as a 40 by 24 character display, a 256 by 192 pixel display, or a 64 by 48 pixel display which used less memory. It had a fixed color palette with 15 colors plus transparent. It also supported 32 single-color 8x8 or 16x16 pixel sprites, numbered 0 to 31, with lower-numbered sprites appearing on top of higher-numbered ones. This allowed for layering and perspective effects. It also featured a video input and sync pin, which allowed video from another source to appear under the graphics being created by the chip. This could be used to layer the output from multiple 9918's, or to use the 9918 as a system for titling and overlays on other video sources.

To support this advanced feature set, the 9918 required fast access to memory. To allow this, it was given a dedicated 16 KB pool of RAM that was separate from the main memory of the computer that it was part of. TI referred to this as VRAM. This meant that the CPU could only update the video display over a separate 8-bit data bus with the VDP moving data on the bus to and from its dedicated RAM. This limited the speed at which the CPU and 9918 could communicate. It also meant that the common solution of using the video chip to refresh memory could not be used and had to be implemented in separate hardware. While these represented minor complications compared to systems that shared memory in a single pool, the result was a display that was much more colorful and offered some parity with arcade game-level displays.

The Yamaha V9938 is an enhanced version of the TMS9918.

Description

[edit]

General information

[edit]
VDP TMS9918A
TMS9918A pinout diagram[2]

The TMS9918 was packaged in a 40-pin dual in-line package (DIP). Power was provided as +5V on pin 33, VCC, and ground on pin 12, VSS. A quartz crystal running at 10.7386 MHz, three times the NTSC colorburst frequency, was connected across pins 40, XT1, and 39, XT2. Video output was on pin 36, COMVID, and input, if used, on pin 35, EXTV, with their connector's shield connection connected to ground.[3]

In order to achieve the memory performance needed to support full-color operation, the system used a dedicated area of DRAM they referred to as VRAM. To operate this memory, the system included a separate set of pins forming an 8-bit address bus on pins 3 (AD7) through 10 (AD0) and an 8-bit data bus on pins 25 (RD7) through 32 (RD0), supported by a read/write control on pin 11, and RAS and CAS on pins 1 and 2.[3]

Communications with the host computer were through a separate 8-bit data bus on pins 17 through 24, D7 to D0. Pin 13, MODE, controls whether the data on that bus is an address or data. To write to the TMS9918, the CPU first sets the mode and writes data to an internal address register, then writes the data to the bus and changes the mode to cause the data to be deposited into that address. After the data byte is read, the TMS9918 increments the pointer in the address register, allowing a series of bytes to be written in succession.[4]

The TMS9918 logically arranges graphics in a number of layers, 32 sprite layers on top, a graphics or text layer, a "backdrop" with a single solid color filling the screen, and finally an external video layer. The backdrop plane is slightly larger than the others, so it completely fills the screen. The system uses a 15-color palette, along with color 0 which is transparent. At any pixel location on the screen, the system sees if a particular object is in that location, and whether or not it is set to transparent. If it is transparent it looks at the next object, and so on, until it reaches the external video layer (which is often not used).[5] The following descriptions are ordered in this same fashion.

Sprites

[edit]

A key feature of the 9918 series was its powerful sprite support. It used a series of 8 bytes in VRAM to store patterns for 8 by 8 pixel sprites, one byte for each line of 8 pixels. It also had a second mode with 16 by 16 pixel sprites, 2 bytes per row and 16 rows.[6] Additionally, either size of sprite could be magnified two times to make the spites larger on the screen. The pattern data for the sprites, in 8 or 32 byte long entries, was held in a block of memory known as the sprite generator table (SGT).[7]

In addition to the 8 or 32 byte long entries holding the patterns, there was a separate sprite attribute table (SAT) that defined how the data was interpreted and displayed. This included 8-bit values for the horizontal and vertical position of the sprite, a pointer to the start of the data for that sprite in the SGT (which they called the name), and a color code in the lower four bits, for a total of 4 bytes per sprite for a total of 128 bytes in the SAT.[6]

To determine what color to display at any given pixel on the screen, the system looked to see which sprites were visible at that location, and then searched down the patterns until it found the first one that held a 1 in that location, then drew the color found in the SAT at that pixel. This caused the sprites to be displayed in order, such that lower numbered sprites appeared on top of higher numbered ones. That meant, for instance, that sprite 0 always appeared on top. If there was no sprite on the screen at that location with a 1, that pixel was transparent, and the background graphics would be displayed instead.[8]

As the sprites were drawn in order, it is sometimes necessary to change that order to produce the desired layering effects. This is the purpose of the "name" field entries in the SAT. For instance, if one wants to change the display so sprite 10 appears in front of 5, the values in the name field entries of the two can be swapped, avoiding the need to move the pattern data. Through careful arrangement of the sprite ordering, the system can easily produce pseudo-3D and parallax scrolling effects.[9]

Due to performance issues, only four sprites can be displayed on any one scan line. If more are specified on a given line, they will simply not be displayed. The VDP has a status register that reports the number of the first sprite that had to be dropped. It is up to the programmer to design their system to ensure this limit is not reached. One trick to emulate more sprites on a line can be achieved by changing the priorities by swapping the name values every other frame so that one set of four is displayed on one frame and then another on the next. This allows up to eight sprites on a line, but results in noticeable flickering.

The sprite collision flag is set when non-zero pattern bits of two sprites coincide, even if either sprite has transparent colour. The VDP does not indicate which sprites have collided, simply that at least two have done so. This is normally used to trigger more advanced collision detection routines inside the software, which can then determine the exact location of the collision and act upon it.

Graphics modes

[edit]

The graphics of the 9918 were based on an underlying 256 wide by 192 high pixel layout.[5] These numbers are typical for systems of the era which used analog video signals for output in a progressive scan display. This is close to the maximum resolution achieved on television sets of the era, which was around 320 by 240, due to the complexity of the NTSC radio-frequency signals.[a]

There were four ways the graphics layer could be used:

Mode 0, or Text Mode, broke the screen into a 40 by 24 layout of "blocks", each 6 pixels wide and 8 high. Each block could hold a value from 0 to 255, normally representing an expanded ASCII character set. The patterns for each of the 256 characters was stored in VRAM and could be changed by loading the VRAM values using the CPU. Each line of the characters was defined as a series of "on" or "off" pixels stored in one byte per line, and 8 bytes per character. Because the blocks were 6 by 8 on the screen, it was up to the designer to lay out the characters in a 5 by 7 grid to leave space between them. The color for the "on" and "off" bits in the patterns could be any of the 15 colors available, and stored in VRAM.[3]

Mode 1, or Graphics I, was essentially a modification of Text Mode that broke the screen into a 32 by 24 layout, so that each block was 8 by 8 pixels instead of 6 by 8. The pattern for any given pixel on the screen was looked up from the same 256-entry table of bit patterns as the one holding characters in Text Mode. As there were 768 possible locations and only 256 possible patterns, this mode was limited in the sorts of displays it could produce. Graphics I also added a separate section of VRAM that held the color values for the on and off pixels for any given block, with 768 entries. This meant every block of 8 by 8 pixels could have its own two colors, but the pixels within any block all had to be the same.[7] This is not an uncommon solution for the era, and leads to a well-known problem known as attribute clash when it is not possible to choose colors that to not result in the edges of the cells being visible.

Mode 2, or Graphics II, was a further modification of Graphics I, allowing separate patterns for all 768 blocks, as well as separate color settings for each line within the blocks. This meant any block could use all 15 colors, although only two per line. This display allows any image to be drawn and more colors to be displayed, producing a display that is pixel-addressable and suitable for high-resolution drawing of arbitrary images. The cost is that it requires 32 color entries for each of the 192 lines, as well as an extended pattern map with 768 separate entries, increasing the VRAM needed to hold all of the data to about 12 KB.[10]

Mode 3, or Multicolor Mode, broke the screen into 64 by 48 blocks, for a total of 3072 blocks. There were no patterns in this mode, the entire cell was either on or off. There was a color table entry for each block, so every block could select its own color. This produced a low-resolution but high-color display using less than 3 KB of VRAM.[11]

One limitation of the system is that it did not include hardware fine scrolling support, and could only scroll along cell boundaries, normally 8 lines high. Scrolling was accomplished by moving the pattern already stored in VRAM and then adding data for the new line or column, which took some time to perform. Additionally, as all of the graphics modes were essentially character modes with custom characters in each cell, patterns that spanned cells, like lines or circles, had to calculate the pixels for each line of any given cell and upload those values into the character sets.

Screen Mode 2 details

[edit]

Technically, mode 2 is a character mode with a colorful character set. The screen is horizontally divided into three 256×64 pixel areas, each of which gets its own character set. By sequentially printing the characters 0 through 255 in all three areas, the program can simulate a graphics mode where each pixel can be set individually. However, the resulting framebuffer is non-linear.

The program can also use three identical character sets, and then deal with the screen like a text mode with a colorful character set. Background patterns and sprites then consist of colorful characters. This was commonly used in games, because only 32×24 bytes would have to be moved to fill and scroll the entire screen.

The challenge of using TMS9918 mode 2 was that every 8×1 pixel area could have only two colors, foreground and background. They could be freely picked out of the 16 color palette, but for each 8×1 area, only two colors could exist. When rendering a straight line diagonally, one easily could exceed the maximum 2 colors per 8×1 area and end up with "color spill".

Undocumented modes

[edit]

Texas Instruments originally only documented the four modes listed above. However, the bit that enables mode 2 is actually a modifier bit for the other modes. Enabling it does three things:[12]

  1. Expands the color table size to hold entries for each cell.
  2. Divides the screen horizontally into thirds.
  3. Changes two address bits of the pattern and color tables into mask bits, which controls whether each third of the screen has its own pattern and color table (mode 2) or not (mode 1).

By toggling this bit in code, three additional modes are possible. Note that although genuine TMS9918A chips support these modes, clones and emulators may not.

  • Mode 0 (Text) + Mode 2 (Graphic 2): Known as Bitmap Text Mode. This mode allows for two-color bitmap images, with no color table. This saves memory, at the expense of a slightly reduced horizontal resolution (text mode has a horizontal resolution of 240 pixels instead of 256 pixels like the graphic modes do).
  • Mode 1 (Graphic 1) + Mode 2 (Graphic 2): Known as Half-Bitmap Mode. Texas Instruments actually documented this "undocumented" screen mode in their manual titled "Video Display Processors Programmers Guide SPPU004".[13] In section 8.4.2, "Playing Games with VRAM Addressing",[13] they discuss how this mode combines the memory savings of mode 1 with the color detail of mode 2. However, as they go on to say this mode limits the number of sprites that can be displayed to 8 instead of 32. Therefore, the term "undocumented" used to describe this mode is a misnomer. However, because this manual was not widely known, this mode is generally considered to be one of the undocumented modes. Generally, the only reason to use this mode over Mode 2 is to reduce memory consumption.
  • Mode 3 (Multicolor) + Mode 2 (Graphic 2): Known as Bitmap Multicolor Mode. This mode is more of a novelty, as it offers nothing beyond what the standard Multicolor mode can already do.

External video

[edit]

Another key feature of the 9918 series was its ability to read an external video source and pass that signal through to the output assuming all of the objects above it are transparent. This allows the system to produce graphics which could then be overlaid on an analog source like a video camera or videotape. To make sure the two displays line up properly, the clock from the external source needs to be fed in as well, replacing the clock signal that would normally be generated by a quartz crystal. Some system to match the output strength of the input signal to the output also needs to be provided so one signal does not overwhelm the other.[14]

Colors

[edit]

The TMS9918 family chips used a composite video palette. Colors were generated based on a combination of luminance and chrominance values for the TMS9918A and Y, and R-Y (Pr) and B-Y (Pb)values are for the TMS9928A/9929A.[15]

Datasheet values

[edit]

The TMS9918 has a fixed 16-color palette, composed of 15 displayed colors and a "transparent" color, color 0.

  • When "transparent" is used for sprites, it will show the graphics plane.
  • When "transparent" is used for the text/graphics plane, it will show the backdrop.
  • When "transparent" is used for the backdrop, it will show the external video signal (if enabled) otherwise black.

According to "Table 2.3 - Color Assignments" on the datasheet outputs levels are the following:[15]

Color code Color TMS9918A TMS9928A/9929A
Luminance Chrominance Y R-Y (Pr) B-Y (Pb)
0 transparent 0% - - - -
1 black 0% - 0% 47% 47%
2 medium green 53% 53% 53% 7% 20%
3 light green 67% 40% 67% 17% 27%
4 dark blue 40% 60% 40% 40% 100%
5 light blue 53% 53% 53% 43% 93%
6 dark red 47% 47% 47% 83% 30%
7 cyan 67% 60% 73% 0% 70%
8 medium red 53% 60% 53% 93% 27%
9 light red 67% 60% 67% 93% 27%
10 dark yellow 73% 47% 73% 57% 7%
11 light yellow 80% 33% 80% 57% 17%
12 dark green 46% 47% 47% 13% 23%
13 magenta 53% 40% 53% 73% 67%
14 gray 80% - 80% 47% 47%
15 white 100% - 100% 47% 47%

Notes: Colors are merely illustrative, using automated YPbPr to sRGB conversion assuming SMPTE C colorimetry - see the next section for alternate color conversions.

Product family

[edit]

All of the ICs in this family are usually referred to by the TMS9918 name, sometimes with an "A" postfix. The "A" indicates a second version of the chip which added new features, most prominently the addition of a bitmap mode (Graphic II).

Texas Instruments TMS9918 Product Family Summary
Chip Variant Video Out Video In Video Frequency Mode 2 Support
9918 Composite Composite 60 Hz No
9918A / 9118 Composite Composite 60 Hz Yes
9928A / 9128 YPbPr (None) 60 Hz Yes
9929A / 9129 YPbPr (None) 50 Hz Yes

The key features of this chip are, as highlighted in a 1980 presentation by Karl Guttag (one of the designers):[1]

  • 256 by 192 full color pixels per screen
  • 15 different colors and/or shades
  • Non-interlaced color composite video output
  • Direct wiring to RAS/CAS type dynamic RAMs
  • Automatic refresh of dynamic RAMs
  • General 8-bit memory mapped type CPU interface
  • CPU accesses RAM via VDP (no need for DMA)
  • 32 dynamic characters per screen
  • Thirty-two 8×8 patterns per row, 24 rows per screen
  • Text mode with forty 6×8 patterns per row
  • Multicolor mode with 64 by 48 memory mappable color squares
  • External video input and control
  • Single supply +5 volt operation
  • Standard N-Channel silicon gate technology

TMS9918

[edit]

The TMS9918 was only used in the TI-99/4; the TI-99/4A and the other computers had the A version VDC.

TMS9918A, TMS9928A and TMS9929A

[edit]
VDP TMS9928A

The TMS9918A and TMS9928A output a 60 Hz video signal, while the TMS9929A outputs 50 Hz. The difference between "1" and the "2" in "TMS9918A" and "TMS9928A" is that the "1" version outputs composite NTSC video, while the "2" versions (including the TMS9929A) outputs analog Y luminance and R-Y and B-Y colour difference signals. The need for the latter was predominant in the 50 Hz world, including Europe, due to the different video signal standards PAL and SECAM. It was more cost-effective to output Y, R-Y and B-Y and encode them into PAL or SECAM in the RF modulator, than to try to have a different console for every different color standard. The "1" version also features an external composite video input which made it a handy chip to use in video "titlers" that could overlay text or graphics on video, while the "2" version does not.

The original variants of the TMS9918 were depletion-load NMOS and manufactured on a 4.5 μm process; it was one of the first depletion load NMOS chips Texas Instruments manufactured in contrast to the TMS9900 microprocessor which used the older enhancement load NMOS process that required three supply voltages. Due to the large die size and relatively high internal speed, the TMS9918 ran warm enough to necessitate a heat sink; some devices such as the Taiwanese DINA console (a hybrid Colecovision/SG-1000) neglected to install sinks and suffered from malfunctions of the chip. By 1983 Texas Instruments had shrunk the die size to 3 μm which ran cooler and no longer required a sink; MSX machines and the Sega SG-1000 used the newer 3 μm TMS9918 while most Colecovisions had the original 4.5 μm variant (the final run of the consoles produced in 1985 had the newer model TMS9918).

TMS9118, TMS9128 and TMS9129

[edit]
VDP TMP9118NL prototype

A later variant of the TMS9918 series chips, the TMS9118, TMS9128, and TMS9129, were released in the mid-late 1980s, but were never very popular. The function of one pin is changed, and the mapping of the video memory allows two 16K×4-bit chips to be used instead of the eight 16K×1-bit chips the TMS99xx needs. Otherwise the chips are completely identical to the TMS9918A, TMS9928A and TMS9929A respectively.


CRT display

[edit]

[original research?]

Converting Y, R-Y and B-Y to RGB requires considering how Y originated:

 Y = R * 0.30 + G * 0.59 + B * 0.11

This leads to the following formulas:

 R = R-Y + Y
 B = B-Y + Y
 G = (Y - 0.30 * R - 0.11 * B) / 0.59

But for all colors that have no chrominance - thus black, gray and white - R-Y and B-Y are not 0% but all have an offset of 47%. So this offset has to be subtracted from all R-Y and B-Y values at first. Due to the fact that in practice this one step will never be done alone, it's no problem that some results will be negative:

Color code Color Y R-Y B-Y
1 black 0% 0% 0%
2 medium green 53% -40% -27%
3 light green 67% -30% -20%
4 dark blue 40% -7% 53%
5 light blue 53% -4% 46%
6 dark red 47% 36% -17%
7 cyan 73% -47% 23%
8 medium red 53% 46% -20%
9 light red 67% 46% -20%
10 dark yellow 73% 10% -40%
11 light yellow 80% 10% -30%
12 dark green 47% -34% -24%
13 magenta 53% 26% 20%
14 gray 80% 0% 0%
15 white 100% 0% 0%

Next comes the conversion to RGB. All results must be in the range from 0% to 100%:

Color code Color R G B
1 black 0% 0.0000% 0%
2 medium green 13% 78.3729% 26%
3 light green 37% 85.9831% 47%
4 dark blue 33% 33.6780% 93%
5 light blue 49% 46.4576% 99%
6 dark red 83% 31.8644% 30%
7 cyan 26% 92.6102% 96%
8 medium red 99% 33.3390% 33%
9 light red 113% 53.9492% 47%
10 dark yellow 83% 75.3729% 33%
11 light yellow 90% 80.5085% 50%
12 dark green 13% 68.7627% 23%
13 magenta 79% 36.0508% 73%
14 gray 80% 80.0000% 80%
15 white 100% 100.0000% 100%

The erroneous value of 113% for R of color "light red" might seem to come from a typo within the datasheet and there R-Y must not be greater than 80%. But measuring the output signals of the chip with an oscilloscope shows that all values in the table are correct. So the error is inside the chip and drives the red signal into saturation. For this reason this value is to be corrected to 100%.

Up to that time only cathode ray tubes had been available for computer monitors as well as for televisions, and that these CRTs had a gamma. The TMS9918 series chips had been designed to work with televisions and their CRTs had a gamma of 1.6 (remark: CRTs of Macintosh monitors had 1.8 and the CRTs of PC monitors had 2.2). Digital flat panels do not have gamma. For this reason the colors of the TMS9918 look somewhat pale here as in the first table above. The below table uses the gamma-corrected values, which are (written in hexadecimal):

Color code Color R G B
1 black 00 00 00
2 medium green 0A AD 1E
3 light green 34 C8 4C
4 dark blue 2B 2D E3
5 light blue 51 4B FB
6 dark red BD 29 25
7 cyan 1E E2 EF
8 medium red FB 2C 2B
9 light red FF 5F 4C
10 dark yellow BD A2 2B
11 light yellow D7 B4 54
12 dark green 0A 8C 18
13 magenta AF 32 9A
14 gray B2 B2 B2
15 white FF FF FF

The used steps are: Round all values to two decimal places, then raise to the power of 1.6 for gamma correction and finally transform the range of values from 0...100 to 0...255.

Specifications

[edit]
  • Video RAM: direct wiring to 4, 8, or 16 KB
  • Text modes: 40 × 24 and 32 × 24
  • Resolution: 256 × 192
  • Colours: 15 colours + transparent
  • Sprites: 32, 1 colour, max 4 per horizontal line

Legacy

[edit]

Texas Instruments' TMS9918A was succeeded by the Yamaha V9938, which added additional bitmap modes, more colorful sprites, a vertical full-screen scroll register, vertical and horizontal offset registers, a hardware blitter and a customizable palette. The V9938 was designed for the MSX2 standard of computers, and later used in a third-party upgrade to the TI-99/4A: the Geneve 9640 "computer-on-a-card".

The V9938, in turn, was succeeded by the V9958 which added some additional high-colour modes and a horizontal two-page scroll register. These chips were used in the MSX2+/turboR systems.

Toshiba made a clone called the T6950 which does not support the undocumented pattern / color table masking feature in graphics 2 mode.[16][better source needed] Later, Toshiba released the T7937A MSX-Engine with a built-in VDP with working masking features. Both VDPs by Toshiba feature a palette which is slightly different (more vivid colors) from the TI VDPs.

The VDP of the Master System game console is an evolution of the TMS9918. This was further evolved into the VDP of the Genesis/Mega Drive game console, which replaces most of the graphics modes from the Master System VDP with more capable versions.

See also

[edit]

Notes

[edit]

References

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
The TMS9918 is a video display processor (VDP) chip developed by and introduced in 1979, designed to generate raster-scanned color graphics and video signals for early home computers and consoles with minimal external components. It interfaces with a host CPU via an 8-bit bidirectional bus, manages up to 16 KB of dynamic video RAM (VRAM), and supports resolutions up to 256 × 192 pixels, a 16-color palette (15 colors plus transparent), and hardware sprites for animated objects. The chip, engineered by TI's Karl Guttag, was pivotal in the TI-99/4 , marking it as a key enabler for affordable color graphics in during the late 1970s and 1980s. Key operational modes include (40 × 24 characters, using 6 × 8 patterns with two colors), Graphics I (32 × 24 , each 8 × 8 pixels with two colors per ), and Multicolor mode (64 × 48 blocks, each 4 × 4 pixels with individual block coloring). Sprite support allows up to 32 hardware sprites (in 8 × 8, 16 × 16, or enlarged sizes) per frame, with a limit of four per scanline to prevent overflow, enabling smooth animations without CPU overhead; is also built-in for sprite-to-sprite interactions. The VDP handles VRAM refresh automatically and provides output for televisions in its base form, operating at a 10.738635 MHz clock for standard displays. Widely adopted for its cost-effectiveness and versatility, the TMS9918 powered graphics in systems like the TI-99/4A computer, ColecoVision console, MSX standard (where it became central to the platform's specification), and Sega's SG-1000 and SC-3000 consoles. Variants such as the TMS9918A added a bitmap mode and improved compatibility, while the TMS9928A and TMS9929A provided separate luminance/chrominance outputs for RGB monitors and supported PAL (625-line) timing, extending its use into international markets and later derivatives in Sega's Master System and beyond.

Introduction

History and Development

The TMS9918 video display processor (VDP) was introduced by in 1979 as a dedicated chip to enable cost-effective color graphics in 8-bit home computers and game consoles. Developed in the late , it addressed the need for an affordable solution that could interface a general-purpose with a raster-scanned , generating all necessary video signals, timing, and synchronization while managing display data stored in dynamic RAM. The core architecture, including sprite handling and character-based rendering, was formalized in a key filed in 1979 and issued in 1981 to inventors at . Fabricated as an N-channel metal-oxide-semiconductor (MOS) large-scale integration (LSI) device, the TMS9918 was among the first consumer video chips to directly connect to dynamic RAM, eliminating the need for complex external memory controllers and supporting up to 16 KB of video RAM. This design choice optimized bandwidth for both CPU access and video refresh, making it suitable for resource-constrained 8-bit systems of the era. In the early 1980s, iterated on the original design with variants like the TMS9918A ( composite output), TMS9928A ( component outputs), and TMS9929A (PAL component outputs), which offered pin compatibility where possible and supported evolving memory standards such as 16K DRAM. These updates reduced power requirements and thermal output compared to the initial model, while shifting from composite to separate and color-difference signals for improved video quality in compatible displays. Production of the TMS9918 family persisted through the to meet demand in systems like the TI-99/4A and , but tapered off in the early 1990s as advancements enabled integrated processors, rendering dedicated VDPs less necessary.

Key Features

The TMS9918 video display processor supports a resolution of 256×192 pixels in its modes, enabling detailed bitmap-like rendering through 8×8 tiles arranged in a 32×24 grid. This configuration provides a balance of visual fidelity and memory efficiency suitable for early home computing and gaming applications. It features a 16-color palette, comprising 15 visible colors plus a transparent option, which allows for flexible overlay effects particularly in sprite rendering. The colors are generated from three primary signals ( and two color differences) that can be combined to produce the full set, ensuring compatibility with standard color displays. The processor requires 16 KB of external video RAM (VRAM) to store definitions, name tables for screen layout, and attribute data for colors and sprites, with allocations such as up to 6 KB for patterns in high-detail modes and 768 bytes for name tables. This dedicated offloads handling from the host CPU, supporting efficient real-time updates. The TMS9918 provides output compatible with standards, while variants such as the TMS9929A support PAL, facilitating direct connection to consumer televisions without additional encoding in many setups. Additionally, it includes a input via an external video plane, allowing synchronization with external video sources for overlay applications. Hardware sprite processing includes built-in , where overlapping sprite pixels set a coincidence flag to alert the CPU, and overflow handling that limits display to four sprites per scanline, triggering a fifth sprite flag if exceeded to prevent visual artifacts. These mechanisms enable smooth animation of up to 32 sprites without software intervention for basic conflict resolution.

Product Variants

Original TMS9918

The original TMS9918, introduced by in 1979, served as the foundational video display processor (VDP) in the company's early graphics hardware lineup, specifically optimized for 60 Hz television systems prevalent in . This chip enabled basic raster-scan video generation for home computers and consoles, but it imposed notable constraints on graphical flexibility, lacking a true mode where Mode 2 was limited exclusively to tile-based rendering without pixel-level addressing. Additionally, its video output was restricted to composite signals only, without support for separate RGB or other advanced interfaces that would emerge later. A distinctive feature of the original TMS9918 was its inclusion of a video input pin, allowing genlocking to external sources such as color burst signals from broadcast equipment, which facilitated integration into or overlay applications. Manufactured using a 4.5 μm depletion-load NMOS , the chip exhibited higher power demands compared to subsequent iterations, typically consuming around 1 W at a 5 V supply due to the less efficient fabrication technology. Early adoption of the TMS9918 occurred in systems like the TI-99/4 , released the same year, which leveraged the chip for its display capabilities. These implementations highlighted the chip's role in pioneering affordable sprite and character , though its limitations spurred the development of enhanced variants like the A-series for broader compatibility.

TMS9918A, TMS9928A, and TMS9929A

The TMS9918A, TMS9928A, and TMS9929A represent enhanced variants of the original TMS9918 video display processor, introduced by in the early to address limitations in video output quality and international compatibility while maintaining software and interface compatibility with prior models. These "A-series" chips added support for a graphics mode (Graphics II, or Mode 2), enabling 6×8 pixel patterns for more flexible screen rendering without relying solely on character tiles, which expanded creative possibilities for developers in systems like the standard. All variants operate on N-channel MOS LSI technology, with a typical power dissipation of around 1.25 W at 5 V and 250 mA, facilitating integration into . The TMS9918A builds directly on the original design by incorporating Mode 2 bitmap capabilities and retaining the output for compatibility, producing a , 60 Hz signal suitable for North American televisions. It supports external video input mixing but lacks advanced component outputs, making it a cost-effective for existing NTSC-based systems. In contrast, the TMS9928A improves video quality by replacing the composite output with separate Y (), R-Y, and B-Y () signals, allowing external encoding to RGB or higher-fidelity composite for sharper images without the artifacts common in direct composite generation. This variant also operates at 60 Hz but omits the external video input pin, shifting mixing responsibilities externally to simplify the chip while prioritizing output clarity. The TMS9929A extends the TMS9928A's design for European markets, delivering the same Y, R-Y, and B-Y outputs but at 50 Hz with 625-line PAL timing to align with broadcast standards in PAL/ regions. Like its sibling, it excludes video input and fully supports Mode 2, enabling bitmap graphics in international applications.
VariantOutput TypeVideo FrequencyMode 2 (Bitmap) Support
TMS9918AComposite 60 Hz (525 lines)Yes
TMS9928AY, R-Y, B-Y ()60 Hz (525 lines)Yes
TMS9929AY, R-Y, B-Y (PAL)50 Hz (625 lines)Yes

TMS9118, TMS9128, and TMS9129

In the mid-1980s, introduced the TMS9118, TMS9128, and TMS9129 as specialized variants of the TMS9918A video display processor family, primarily targeting embedded systems and custom applications. Released around , these chips featured modifications to the video RAM (VRAM) interface to simplify integration in resource-constrained designs. Unlike the earlier TMS99xx series, which required eight 16K×1-bit DRAM chips for VRAM, these variants supported a configuration using just two 16K×4-bit DRAMs (such as the 4416), reducing pin count and board complexity for easier CPU access to the 16 KB VRAM space. The TMS9118 provided output at 60 Hz for systems, while the TMS9128 offered Y, R-Y, B-Y ( at 60 Hz, and the TMS9129 delivered Y, R-Y, B-Y at 50 Hz for PAL compatibility. These output options catered to professional or industrial video requirements, with the Y, R-Y, B-Y signals enabling higher-quality separation of (Y) and (R-Y, B-Y) compared to . The VRAM addressing was altered to a 14-bit scheme optimized for dynamic RAMs, assuming a fixed 16 KB capacity without the selectable 4/16 KB mode of prior variants, and the register configuration treated the size-selection bit as a "don't care." capabilities remained similar to the A-series, supporting character and sprite modes up to 256×192 resolution, with mode in II retained. Despite these enhancements for niche uses, the TMS9118, TMS9128, and TMS9129 saw limited adoption due to compatibility challenges with software developed for the original TMS9918 or A-series chips, particularly in systems expecting standard DRAM configurations. Bitmap mode in Graphics II was retained but restricted in some setups by the fixed VRAM assumptions, potentially complicating from broader-market VDPs. Production was brief, confined mostly to industrial boards and custom embedded devices like graphing calculators, with few mainstream consumer systems incorporating them.

Interfaces

Video RAM Interface

The TMS9918 video display processor (VDP) interfaces with 16 KB of external Video RAM (VRAM) to store display data, typically implemented using eight dynamic RAM (DRAM) chips such as 4K×1 (TMS4027), 8K×1 (TMS4108), or 16K×1 (TMS4116) devices wired directly to the VDP. This configuration provides a total addressable space of 16,384 bytes via a 14-bit internal address counter in the VDP. The VRAM organization divides this space into dedicated tables for graphics elements, with fixed sizes and alignment boundaries set by VDP registers (2 through 6) to ensure non-overlapping regions without dynamic allocation. Key tables include the Pattern Name Table (768 bytes, aligned to 1 KB boundaries, containing indices for screen positions in graphics modes), Generator Table (2,048 bytes, aligned to 2 KB boundaries, storing 256 8×8 pixel patterns), Color Table (32 bytes, aligned to 64-byte boundaries, defining foreground and background colors per pattern in basic modes), Sprite Attribute Table (128 bytes, aligned to 128-byte boundaries, holding attributes for up to 32 sprites), and Sprite Generator Table (2,048 bytes, aligned to 2 KB boundaries, defining sprite patterns). Table sizes remain fixed across modes, though usage varies (e.g., the Name Table expands to 960 bytes in for 40×24 positions). The VDP automatically manages refresh for these DRAMs using row address strobe (RAS) and column address strobe (CAS) signals, with no CPU involvement required. Access to VRAM occurs through separate buses: an 8-bit multiplexed address/data bus (AD0–AD7) for row and column addressing via RAS/CAS multiplexing, and an 8-bit dedicated read data bus (RD0–RD7) for output. The CPU does not directly connect to VRAM; instead, it commands the VDP via registers, and the VDP performs all read/write operations using its internal autoincrementing 14-bit address register. During active display, the CPU must yield the bus to the VDP for refresh and video fetch cycles, with access windows available every 16 VRAM cycles; this results in mode-dependent delays, such as up to 8 μs in Graphics I and II modes. VRAM read and write cycles operate at approximately 2.7 MHz (372 ns cycle time), driven by the VDP's internal timing derived from a 10.738635 MHz master clock. Each CPU-initiated VRAM access involves a 2-byte address setup followed by 1-byte data transfer, incurring about 2 μs for the VDP to fetch or store the byte, plus synchronization wait states to align with available windows. The interface ensures reliable operation by requiring DRAMs to meet specific timing, such as 200 ns for the write strobe (CSW) and 60 ns data setup before CAS high.

CPU Interface

The TMS9918 communicates with the host CPU through an 8-bit bidirectional data bus, designated as pins CD0 through CD7, which serves as the primary pathway for transferring commands, data, and status information. This bus operates in conjunction with dedicated control signals: CSW (pin 14, active-low write strobe from CPU to VDP), CSR (pin 15, active-low read strobe from VDP to CPU), and MODE (pin 13, a select line typically tied to a CPU address bit to distinguish between data/VRAM operations and command/register operations). The R/W line (pin 11) is not directly part of the CPU interface but relates to internal VRAM write control, while the INT pin (pin 16, active-low output) signals interrupts to the CPU. Register access and VRAM operations are performed using a two-port protocol, where the CPU writes commands or to one port and to another, with the exact port varying by system implementation. In many systems, such as the standard, these are mapped to I/O ports 0x98 ( port for VRAM read/write and register writes) and 0x99 (control port for setup, register selection, and status reads). To write to one of the eight write-only registers (0 through 7), the CPU first outputs the register value to the port, followed by a command byte to the control port with the most significant bit set to 1, the next four bits as 0, and the lower three bits indicating the register number (e.g., 0x80 for register 0). The single read-only status register is accessed by reading from the control port, which also clears pending flags; this register provides bits for vertical blank detection (bit 7) and sprite overflow (bit 6, set if a fifth or subsequent sprite is present on a scanline (4-sprite limit per scanline)). VRAM addressing follows a similar indirect protocol via the control port, using two bytes to set a 14-bit (low byte first, then high byte with appropriate mode bits), after which transfers occur via the port with auto-increment. Interrupt handling is managed through the INT pin, which asserts low at the end of each active display scan (vertical blanking interval, approximately every 1/60 second for systems) if the interrupt enable bit is set in register 1. This provides a periodic signal for the CPU to synchronize operations, such as updating graphics registers. Sprite overflow does not generate a separate but sets the corresponding flag in the , which the CPU can poll during vertical blank interrupt service routines to detect and handle line collisions (e.g., truncating excess sprites). Reading the acknowledges and clears both the vertical blank and overflow flags. To prevent contention on the internal VRAM bus, the TMS9918 employs , allocating specific access windows to the CPU during non-critical periods like horizontal or vertical blanking. When the CPU requests VRAM access, the VDP may impose a delay of up to 8 microseconds (depending on the display mode, such as 2-3.1 μs in or up to 8 μs in Graphics I and II modes) before completing the transfer, as the VDP prioritizes display refresh and rendering. System designs typically incorporate wait-state logic or CPU halting mechanisms to accommodate these delays, ensuring reliable data integrity without shared bus conflicts, since the VRAM interface remains dedicated to the VDP.

Graphics Capabilities

Character-Based Graphics

The TMS9918 video display processor employs tile-based rendering for its character graphics, utilizing a generator table to define tiles that form the screen background. These modes prioritize efficient memory usage within the 16 KB video RAM, enabling text display and low-resolution suitable for early home computers and consoles. The core structure involves a name table that maps tile indices to screen positions, with optional color tables for attribute assignment per tile block. This approach allows for flexible screen composition without direct pixel addressing, distinguishing it from later bitmap-centric systems. In (Mode 0), the display consists of 40 columns by 24 rows of characters, each rendered as a 6×8 , resulting in an effective resolution of 240×192 pixels. The generator table, occupying 2048 bytes, supports 256 unique 6×8 , where each is defined by 8 bytes (one per scanline, with the leftmost unused). The name table spans 960 bytes, assigning one of the 256 indices to each position. Colors are applied globally across the screen using two values set in Register 7: a background color and a foreground color, with bits determining which color is used (0 for background, 1 for foreground). Graphics I Mode (Mode 1) expands to 32×24 character positions, each an 8×8 tile, yielding a full 256×192 resolution. It retains the 2048-byte pattern generator table for 256 unique patterns, but the name table is reduced to 768 bytes to accommodate the grid. A 32-byte color table provides foreground and background color pairs for groups of eight patterns, allowing localized two-color rendering per 8×8 block while reusing the limited pattern set efficiently. This mode balances detail and memory, suitable for simple illustrations or extended text layouts. Graphics II Mode (Mode 2), enhanced in the A-variants for fuller capability, also uses a 32×24 grid of 8×8 tiles at 256×192 pixels but supports up to 768 unique patterns across three segmented sets in the pattern generator table (6144 bytes total, with each set 2048 bytes for 256 patterns). The name table remains 768 bytes, with indices wrapping across the three sets to enable distinct tiles for every screen position. A larger 6144-byte color table assigns two colors per scanline byte within each pattern, facilitating fine-grained control equivalent to a full bitmap display. This configuration allows for 768 distinct 8×8 tiles, maximizing visual variety without exceeding VRAM limits. Multicolor Mode (Mode 3) uses a 32×24 character grid to provide 64×48 blocks of 4×4 pixels each at 256×192 resolution. The name table (768 bytes) indexes one of 256 from the 2048-byte pattern generator table. Each consists of 8 bytes (one per scanline within the character), where each byte has two 4-bit fields assigning a color (0-15, 0=transparent) to the left 4 pixels and right 4 pixels of that scanline. This enables coloring of 64×192 strips of 4×1 pixels, allowing solid 4×4 blocks if colors are uniform over 4 scanlines, prioritizing vibrant, blocky graphics over fine detail. Pattern generation across modes relies on the pattern generator table, which stores bitmaps for tiles: each 8×8 pattern comprises eight bytes, with bits indicating shape (1 for foreground, 0 for background in modes). In Graphics II, the three sets expand this to 768 unique tiles, selected via name table indices that incorporate set numbering (e.g., indices 0–255 for set 1, 256–511 for set 2, 512–767 for set 3). The screen layout centers on the name table, which directly points to pattern indices for each 8×8 (or 6×8) block, while the color table overlays attributes: global in , per-block in Graphics I, per-line in Graphics II, and per-quadrant in Multicolor. Horizontal and vertical scrolling in these modes is facilitated via the name table offset in Register 2, which sets the base address (multiples of bytes) to shift the starting position of the name table readout, enabling line-level adjustments. For 1-pixel , software manipulates pattern data in the generator table to create shifted variants, combining register offsets with recombination for smooth movement across the 256×192 . Sprites can overlay these backgrounds without interfering with the fixed layout.

Sprite Graphics

The TMS9918 includes a hardware sprite system designed for rendering up to 32 movable foreground objects, each capable of independent positioning across the display. Sprites are defined in one of two global sizes—8×8 pixels or 16×16 pixels—set via a , with each sprite employing a single non-transparent color and transparency for background pixels in its pattern. This monochromatic approach per sprite, combined with hardware , enables efficient overlay of dynamic elements atop character-based backgrounds. To prevent display overload, the system enforces a limit of four sprites per horizontal scanline; exceeding this threshold triggers an overflow condition, setting the fifth sprite flag in the and rendering subsequent sprites on that line invisible. The sprite attribute table, a 128-byte structure in Video RAM addressed by register 5, configures all 32 sprites with four bytes each: byte 0 specifies the vertical position (Y-coordinate, range 0–255, where values above the visible screen height place the sprite off-screen); byte 1 sets the horizontal position (X-coordinate, range 0–255); byte 2 holds the index (0–255, selecting from the sprite generator table in Video RAM); and byte 3 encodes the (lower four bits, selecting from 15 available colors) along with an early clock bit (most significant bit set to 1, advancing the horizontal position left by 32 pixels for extended range). Hardware monitors sprite overlaps, setting the coincidence flag in the whenever two or more sprites share the same pixel location during rendering. This flag, readable by the CPU, facilitates software responses to interactions without per-frame pixel checks.

Color System

The TMS9918 employs a fixed palette of 16 colors, comprising 15 distinct hues plus a transparent index (color 0) that reveals underlying content such as the background or other layers when used in sprites or patterns. This palette is defined in the device's technical specifications using (Y) and color-difference signals (R-Y and B-Y), normalized to a range of 0 to 1, to facilitate generation or RGB matrix conversion. These values represent ideal signal levels, but actual displayed colors on CRT monitors vary due to responses and display calibration, often requiring gamma correction (typically around 2.5 for period-accurate reproduction). Common RGB approximations, derived from standard BT.601 conversion matrices applied to the datasheet signals, are used in modern emulations and reproductions to approximate the perceptual output. The following table summarizes the palette from the TMS9918A datasheet, with Y, R-Y, and B-Y values (applicable across variants with minor luminance differences for the TMS9918A's composite output; table uses TMS9928A/TMS9929A values for consistency); approximate 8-bit RGB values (0-255) are included for reference, computed via YPbPr-to-RGB transformation.
Color Code (Hex)NameLuminance (Y)R-YB-YApproximate RGB (R, G, B)
00Transparent----
01Black0.000.470.47(0, 0, 0)
02Medium Green0.300.070.20(0, 136, 0)
03Light Green0.500.170.27(0, 200, 104)
04Dark Blue0.250.600.87(80, 0, 184)
05Light Blue0.400.430.80(80, 104, 184)
06Dark Red0.250.800.47(184, 0, 0)
07Cyan0.500.000.53(0, 200, 200)
08Medium Red0.400.930.27(184, 80, 0)
09Light Red0.500.930.27(184, 136, 80)
0ADark Yellow0.500.570.07(184, 184, 0)
0BLight Yellow0.700.570.17(184, 184, 104)
0CDark Green0.250.130.23(0, 104, 0)
0DMagenta0.400.730.67(184, 0, 136)
0EGray0.500.470.47(136, 136, 136)
0FWhite1.000.470.47(255, 255, 255)
In practice, the palette is applied flexibly across display elements: in graphics modes, individual colors can be assigned per character tile via the color table in VRAM; each sprite receives its own dedicated color from its attribute entry; and a global background color is set via register 7 for the entire screen. The transparent index (0) is particularly useful for sprites and pattern bits, allowing layered composition without overwriting the backdrop. These assignments enable efficient use of the limited palette while supporting the chip's sprite and tile-based rendering. Display variations arise primarily from the composite video output of the TMS9918, which encodes colors via modulation, leading to potential shifts in hue and saturation on CRT televisions compared to the datasheet's ideal values. For instance, actual emissions on period monitors often yield warmer tones or reduced saturation, as captured in gamma-corrected measurements. Furthermore, the composite signal's subcarrier can interact with high-frequency pixel patterns (e.g., alternating 1-bit lines), producing pseudo-colors through artifacting—a technique that exploits TV decoding limitations to simulate hues beyond the native 15 colors. The TMS9928A and TMS9929A mitigate some variations by providing separate Y, R-Y, and B-Y outputs, allowing precise RGB reconstruction via external circuitry for direct monitor connection. Overall, the system lacks native RGB outputs and is optimized specifically for (TMS9918/TMS9918A/TMS9928A) or PAL (TMS9929A) broadcast standards, limiting fidelity on modern digital displays without adaptation.

Technical Specifications

Electrical and Timing Parameters

The TMS9918 video display processor requires a single 5 V DC power supply with a tolerance of ±5%, corresponding to an operating range of 4.75 V to 5.25 V. The typical supply current draw ranges from 200 mA to 250 mA at 25°C, varying based on operating conditions and variant, with a maximum power dissipation of 1.3 under absolute ratings. The range is 0°C to 70°C, ensuring reliable performance in standard environments. Power dissipation can be calculated as P=VDD×IDDP = V_{DD} \times I_{DD}, where VDDV_{DD} is the supply voltage and IDDI_{DD} is the supply current. The device uses an external crystal oscillator input at a nominal frequency of 10.738635 MHz (±0.005 MHz), which serves as the master clock; this derives the pixel clock at approximately 5.369 MHz for NTSC systems. Timing for video output adheres to NTSC standards at 60 Hz, with a vertical frame period of 16.68 ms. The horizontal sync pulse has an active width of 4.84 μs within a line period of 63.695 μs (corresponding to 342 pixel clocks), while the vertical sync pulse width is 191.1 μs over 262 total lines. VRAM access operates on a fixed cycle time of 372 ns per memory operation, enabling efficient data transfers between the CPU interface and the 16 KB video RAM. This cycle supports read/write commands with address setup times of 25 ns (minimum) to RAS and data setup times of 60 ns (minimum) before CAS high, ensuring compatibility with contemporary speeds of the era.

Pinout and Signal Descriptions

The TMS9918 video display processor is housed in a 40-pin (DIP), with signals designed for TTL-level compatibility across inputs, outputs, and bidirectional lines. The pin assignments support interfaces for power, clock generation, video output, video RAM (VRAM) access, CPU communication, and control functions, enabling the chip's role in generating sprite- and character-based for early home computers and consoles. Variants such as the TMS9918A maintain pin compatibility with the TMS9928A and TMS9929A, though pins 35, 36, and 38 differ in video signal roles: EXTVDP/COMVID/CPUCLK on the TMS9918A versus B-Y/Y/R-Y component outputs on the TMS9928A/TMS9929A. The following table presents the pinout grouped by function, including pin numbers, signal names, directions (I for input, O for output, I/O for bidirectional), and brief descriptions. All control and interface signals operate at TTL levels (0-0.8 V low, 2-5 V high), with active-low signals denoted by an asterisk (*).

Power and Ground

PinNameDirectionDescription
12VSS-Ground reference for all signals.
33VCCI+5 V power supply.

Clock and Timing

PinNameDirectionDescription
39XTAL1IInput for 10.738635 MHz or external clock oscillator.
40XTAL2IInput for 10.738635 MHz or external clock oscillator (inverted phase).
37GROMCLKODerived output clock (XTAL frequency divided by 24, approximately 0.448 MHz); often unused or pulled high.
38CPUCLKOColor burst clock output (approximately 3.579545 MHz on ); repurposed as R-Y video on TMS9928A/TMS9929A.

Video Interface

PinNameDirectionDescription
35EXTVDPIExternal video input for overlay or ; requires pull-down (e.g., 560 Ω to ground); B-Y output on TMS9928A/TMS9929A.
36COMVIDO output (NTSC or PAL, 1 V peak-to-peak); requires 470 Ω pull-down to ground for level adjustment; Y () on TMS9928A/TMS9929A.

VRAM Interface

The VRAM interface uses a multiplexed 8-bit address/data bus (AD0-AD7) for writing and a separate 8-bit read data bus (RD0-RD7), supporting 16 KB of video RAM using eight 16Kx1 dynamic RAMs (such as the TMS4116) in parallel.
PinNameDirectionDescription
1RAS*ORow address strobe (active low) for VRAM row selection.
2CAS*OColumn address strobe (active low) for VRAM column selection.
3AD7I/OMultiplexed address/data bus least significant bit (connected to RAM A0 and D0).
4AD6I/OMultiplexed address/data bus bit (connected to RAM A1 and D1).
5AD5I/OMultiplexed address/data bus bit (connected to RAM A2 and D2).
6AD4I/OMultiplexed address/data bus bit (connected to RAM A3 and D3).
7AD3I/OMultiplexed address/data bus bit (connected to RAM A4 and D4).
8AD2I/OMultiplexed address/data bus bit (connected to RAM A5 and D5).
9AD1I/OMultiplexed address/data bus bit (connected to RAM A6 and D6).
10AD0I/OMultiplexed address/data bus most significant bit (connected to RAM A7 during address phase and D7 during data phase).
11R/W*ORead/write control (high for read, low for write to VRAM).
25RD7IVRAM read data bus least significant bit (bit 0, from RAM DOUT LSB).
26RD6IVRAM read data bus bit 1.
27RD5IVRAM read data bus bit 2.
28RD4IVRAM read data bus bit 3.
29RD3IVRAM read data bus bit 4.
30RD2IVRAM read data bus bit 5.
31RD1IVRAM read data bus bit 6.
32RD0IVRAM read data bus most significant bit (bit 7, from RAM DOUT MSB).

CPU Interface

The 8-bit bidirectional CPU data bus (CD0-CD7) connects to the host processor, with control signals enabling read/write access similar to memory-mapped I/O.
PinNameDirectionDescription
13MODEIMode select for CPU/VRAM data routing (typically tied to an address line like A14).
14CSW*IChip select for write (active low).
15CSR*IChip select for read (active low).
17CD7I/OCPU data bus bit 7 (MSB).
18CD6I/OCPU data bus bit 6.
19CD5I/OCPU data bus bit 5.
20I/OCPU data bus bit 4.
21CD3I/OCPU data bus bit 3.
22CD2I/OCPU data bus bit 2.
23CD1I/OCPU data bus bit 1.
24CD0I/OCPU data bus bit 0 (LSB).

Control Signals

PinNameDirectionDescription
16INT*OInterrupt output (active low), asserted at the end of each vertical blanking interval to signal frame completion.
34RESET*/SYNCITri-level reset input (low <0.8 V for at least 3 μs to initialize registers; high >9 V for external sync input); active low for reset.
The INT* signal provides vertical synchronization to the host CPU without dedicated horizontal or vertical sync outputs, relying instead on the signal for display timing. The RESET*/SYNC pin requires sharp edges (<30 ns rise/fall time) for reliable operation, and all bidirectional buses (AD and CD) incorporate internal pull-ups for noise immunity.

Programming and Operation

Register Configuration

The TMS9918 video display processor (VDP) includes eight write-only internal registers, labeled R0 through R7, along with a read-only , which collectively configure operational modes, memory addressing, and color settings. Access to these registers occurs via the CPU interface's command register . To write an 8-bit value to register Rn (where n ranges from 0 to 7), the CPU performs two sequential writes to the command : first, the desired byte, followed by a command byte formed by setting the most significant bit (MSB) to 1, the next four bits to 0, and the lowest three bits to the register number n (effectively Rn | 0x80). This protocol ensures the data is latched into the specified register. The is accessed by reading a single byte from the command , which simultaneously clears the , , and fifth-sprite flags. Register 0 (R0) primarily handles video output options, with bit 7 (MSB) enabling external VDP video mixing (1 enables blending with an external signal) and bit 6 selecting the M3 graphics mode (0 for standard modes in TMS9918; 1 enables Graphics II in TMS9918A). All other bits in R0 are unused and should be set to 0. Register 1 (R1) configures core operational parameters: bit 0 selects VRAM size (0 for 4 KB external, 1 for 16 KB); bit 1 controls display blanking (0 blanks the screen, 1 enables display); bit 2 enables frame interrupts (1 enables); bits 3 and 4 set mode bits M1 and M2 (00 for Graphics I, 01 for Multicolor, 10 for Text, 11 for Graphics II when M3=1 in R0 for TMS9918A); bit 6 selects sprite size (1 for 16×16 pixels, 0 for 8×8); and bit 7 enables sprite magnification (1 doubles size, 0 normal). Bit 5 is unused in the TMS9918. Registers 2 through 6 define base addresses in the 16 KB VRAM for key data tables: R2 uses bits 0–5 to set the name table base (multiplied by $400); R3 uses bits 0–5 for the color table base (multiplied by $40); R4 uses bits 0–2 for the generator table base (multiplied by $800, 2 KB blocks); R5 uses bits 0–6 for the sprite attribute table base (multiplied by $80, 128 bytes); and R6 uses bits 0–2 for the sprite generator table base (multiplied by $800, 2 KB blocks). These addresses must align to the specified block sizes to avoid . The reports runtime conditions upon read: bit 7 (F) indicates a frame pending (set at vertical blank end, cleared on read); bit 6 (C) signals sprite-to-sprite collision (set on overlap detection, cleared on read); bit 5 (5S) flags line overflow (set if five or more sprites share a scanline, cleared on read); and bits 4–0 identify the overflowing sprite number (valid when 5S=1). This register has no write access and resets flags only on CPU read. Color configuration is managed through registers R3 to R7, which indirectly or directly influence the 16-color palette (codes 0–15 corresponding to transparent/black, greens, blues, reds, cyans, yellows, magentas, grays, and white, with fixed RGB intensities). R3 locates the color table in VRAM, where each byte specifies foreground and background colors for character patterns in modes (e.g., 4 bits each for fg/bg in Graphics I). R4 and R6 position pattern tables that define pixel data, with color applied via the color table or sprite attributes. R5 positions the sprite attribute table, where each 32-byte entry includes a 4-bit per sprite for independent palette selection. R7 directly sets colors without VRAM reference: bits 7–4 select the text foreground color in (or ignored otherwise), and bits 3–0 set the universal backdrop/border color. These registers enable flexible color mapping while relying on the VDP's internal palette generator for saturation and hue.

Screen Mode Setup

Configuring the screen modes of the TMS9918 requires a careful sequence of register writes to select the display format and define VRAM table locations, ensuring stable operation without visual artifacts. The process typically starts with disabling the display via register R1 to prevent glitches during initialization, followed by setting table addresses in registers R2 through R6, configuring the palette in R7, and finally enabling the mode bits in R1 and R0. All changes should occur during the vertical blanking (VBLANK) interval to synchronize with the display refresh cycle, which can be detected by monitoring the in the . Mode transitions involve writing to registers R0 through R7 in order, with R1 written last to apply the mode bits. For instance, to enter , set R0 to 0x00 (disabling external video), R1 to 0x28 (16 KB VRAM bit0=1, display enabled bit1=1, M1=1 bit3=1, M2=0 bit4=0, others 0), R2 to 0x00 (name table at 0x0000), R4 to 0x00 (pattern generator at 0x0000), and R7 to 0xF4 ( foreground on background). This setup yields a 40x24 character grid suitable for alphanumeric output, with the entire screen using only two colors defined in R7. In TMS9918A variants supporting bitmap mode (Graphics II), configure by setting R0 to 0x40 (M3=1 bit6=1), R1 to 0x38 (16 KB bit0=1, display bit1=1, IE bit2=1, M1=1 bit3=1, M2=1 bit4=1, others 0), R2 to 0x36 (name table at 0x1800), R3 to 0x00 (color table at 0x0000 for full 16-color per line), and R4 to 0x00 (pattern generator at 0x0000). This provides a 256x192 resolution with 16 colors. Palette setup in R7 remains applicable for initial color assignment. Common pitfalls during mode setup include improper write order, such as setting R1 before other registers, which can result in corrupted or flickering output as partial configurations take effect mid-frame. Another issue is neglecting the VBLANK wait, leading to unsynchronized updates that tear the image; always read the to confirm the before proceeding. To mitigate these, initialize all registers sequentially during VBLANK and verify status after each major change. Scrolling setup in the TMS9918 lacks dedicated hardware registers like R18 and R19 (present in successors such as the V9938); instead, vertical and horizontal offsets are achieved through software by shifting data in the name table or pattern generator during VBLANK, typically one row or column at a time to simulate movement on character boundaries. This method requires careful VRAM writes to maintain , often using the for timing.

Legacy and Influence

Adopted Systems

The TMS9918 video display processor and its variants were integrated into numerous early home computers and consoles during the late and , providing affordable color graphics capabilities that standardized sprite-based rendering across platforms. Its design, which included dedicated video RAM and hardware support for sprites and character tiles, made it a popular choice for manufacturers seeking to deliver television-compatible visuals without complex CPU involvement. One of the earliest adoptions was in ' TI-99/4 home computer, released in 1979, which utilized the original TMS9918 chip for video output at resolutions up to 256x192 pixels with 16 colors. This system marked the chip's debut in consumer computing, enabling and text modes alongside sprite handling for games and applications. The follow-up TI-99/4A in 1981 upgraded to the low-power TMS9918A variant, maintaining compatibility while improving efficiency for broader market appeal. In the space, the , launched in 1982, incorporated the TMS9918A to support its arcade-like graphics, including 32 hardware sprites and multicolored tiles that powered titles like . This integration helped the console achieve strong sales by leveraging the chip's ability to generate smooth animations on standard televisions. Similarly, 's console from 1983 employed the TMS9918A, with later revisions using a custom chip (315-5066) that replicated the original's functionality for sprite and pattern generation in early 8-bit gaming. This design later influenced the Master System, extending the TMS9918's legacy into mid-1980s hardware. The computer standard, introduced in 1983 by and , mandated variants of the TMS9918 family—including the TMS9918A for regions, TMS9928A for enhanced , and TMS9929A for PAL—as its core video display processor, ensuring uniform graphics across diverse manufacturers like , , and Yamaha. These adaptations supported the standard's eight graphic modes, from low-resolution text to sprite-heavy multicolored displays, fostering a shared software ecosystem. MSX systems alone accounted for an estimated 5 to 9 million units sold worldwide by the late , primarily in and . Other notable integrations included the Memotech MTX series of computers from 1983 to 1984, which used the TMS9918 for models and the TMS9929A for PAL versions to deliver 256x192 resolution with 15-color palettes in business and educational applications. The Spectravideo SVI-318, released in 1983, also featured the TMS9918A or TMS9929A, combining it with a Z80 CPU for entry-level with built-in joystick support. Regional PAL adaptations, such as the TMS9929A, were essential for European markets, adjusting scan lines to 625 for compatibility with broadcast standards while preserving the chip's core sprite and tile engines. The widespread adoption of the TMS9918 family fueled the boom in 8-bit , enabling cost-effective color video in over a dozen platforms and influencing through standardized sprite mechanics that prioritized over software rendering. This proliferation democratized advanced visuals for home users, contributing to the era's explosion of interactive entertainment and computing accessibility.

Successors, Clones, and Modern Uses

The Yamaha V9938, introduced in 1985, served as a direct successor to the TMS9918, expanding its capabilities for use in the MSX2 computer standard with enhanced video modes supporting up to 512 colors from a palette of 512, including graphics at 512x212 resolution with 16 selectable colors and improved sprite handling. This chip maintained backward compatibility with TMS9918 modes while adding features like 80-column text display and up to 192 KB of VRAM to address limitations in resolution and . The V9938 was further evolved into the Yamaha V9958, deployed in MSX turboR systems around 1990, which introduced additional high-color modes, horizontal scrolling, and refined sprite attributes for more fluid animations in advanced applications. Several manufacturers produced clones of the TMS9918 to meet demand in compatible systems, often with minor variations in undocumented behaviors. The Toshiba T6950, a functional equivalent used in some MSX1 computers, replicated all documented screen modes and sprite operations but omitted support for the original's undocumented VRAM mirroring and pattern/color table masking in graphics mode 2, potentially affecting certain edge-case software compatibility. Toshiba's T7937A variant, integrated into MSX-Engine chipsets for budget MSX1 implementations, enhanced sprite processing with improved collision detection and attribute handling while preserving the core 16 KB VRAM architecture. The Sega Master System used a customized TMS9918A clone (315-5124) with optimized timing for console-specific needs. Yamaha's YM7101, employed in Sega's early Mega Drive hardware, acted as a customized clone with optimized timing for console-specific needs, extending sprite limits and color modulation beyond the TMS9918 baseline without altering the fundamental register interface. In modern contexts as of 2025, the TMS9918 finds renewed life through FPGA recreations and retro modding projects, enabling integration into contemporary hardware while preserving authentic behavior. The F18A FPGA implementation provides a pin-compatible with added VGA output at 640x480 resolution, supporting all original modes plus enhancements like 80-column text and smoother scrolling, commonly modded into TI-99/4A and systems for modern display compatibility. Similarly, the open-source PICO9918 uses a Raspberry Pi Pico as a low-cost replica, available via surplus markets and replication kits for under $20, facilitating repairs and new builds in enthusiast projects. FPGA platforms feature dedicated cores for TMS9918-based systems like the and , achieving cycle-accurate emulation with output for arcade and revival. Emulation of the TMS9918 has reached high fidelity in tools like MAME for arcade and console simulations, and openMSX for environments, where developers prioritize exact register timing and sprite prioritization to run original software flawlessly. A noted challenge remains simulating composite artifacting effects, where /PAL color bleeding and dot crawl from the original's analog output are approximated through shader-based post-processing, though full hardware-level accuracy requires specialized oscilloscope-verified models. efforts address historical VRAM constraints—limited to 16 KB—via expanders like SRAM-based adapters that interface with the chip's address bus, allowing up to 64 KB for higher-resolution patterns without altering core logic, as demonstrated in open-hardware designs for RC2014 Z80 systems. Compared to VGA-era chips like the IBM 6845 or early controllers, the TMS9918 prioritized sprite hardware acceleration over raw resolution, offering hardware-managed 32-sprite overlays at 256x192—innovative for 1979 but constrained in and palette flexibility relative to VGA's 640x480 monochrome or 320x200 256-color modes, influencing its niche in game consoles rather than general displays.

References

Add your contribution
Related Hubs
User Avatar
No comments yet.