All Topics  
Texas Instruments TMS9918

 

   Email Print
   Bookmark   Link






 

Texas Instruments TMS9918



 
 
The TMS9918 is a Video Display Controller
Video Display Controller

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 Television Composite video in a computing or game system....
 (VDC) manuafactured by Texas Instruments
Texas Instruments

Texas Instruments , better known in the electronics industry as TI, is an United States company based in Dallas, Texas, Texas, United States, renowned for developing and commercializing semiconductor and computer technology....
.

TMS9918 was used in systems like MSX
MSX

MSX was the name of a standardized home computer architecture in the 1980s. It was a Microsoft-led attempt to create unified standards among hardware makers, conceived by one-time Microsoft Japan executive Kazuhiko Nishi....
, ColecoVision
ColecoVision

The ColecoVision is Coleco' History of video game consoles home video game console and was released August 1982. The ColecoVision offered arcade game graphics and gaming style, the ability to play Atari 2600 video games, and the means to expand the system's basic hardware....
, Texas Instruments TI-99/4, Memotech MTX, Spectravideo
Spectravideo

Spectravideo, or SVI, was a U.S. computer company founded in 1981 as "SpectraVision" by Harry Fox. They originally made video games for Atari 2600 and VIC-20....
, Sord M5
Sord M5

The Sord M5 , was a Japanese home computer launched by Sord Computer Corporation in 1982.It had keys similar to the ZX Spectrum, but with the bottom right corner chopped off....
 and Sega SG-1000
SG-1000

The , which stands for Sega Game 1000, is a cartridge-based video game console manufactured by Sega. This system marked Sega's first entry into the home video game hardware business, and while the system was not popular, it provided the basis for the more successful Sega Master System....
/SC-3000. Modified versions with additional display modes and registers were used in the Sega Master System
Sega Master System

The Sega Master System is an 8-bit cartridge-based video game console that was manufactured by Sega and was first released in 1986 in video gaming....
, Sega Game Gear
Sega Game Gear

The Sega Game Gear is a handheld game console which was Sega's response to Nintendo's Game Boy. It was the third commercially available color handheld console, after the Atari Lynx and the TurboExpress....
, and Sega Genesis. (Note that the Genesis VDP cannot access any of the TMS9918 display modes discussed below.)

There are several variants called TMS9918A, TMS9928A and TMS9929A, where the 'A' indicates a second version of the chip which added new features, most prominently the addition of a bitmap
Bitmap

In computer graphics, a bitmap or pixmap is a type of computer storage organization or used to store digital images. The term bitmap comes from the computer programming terminology, meaning just a map of bits, a spatially mapped bit array....
 mode (Graphic II).






Discussion
Ask a question about 'Texas Instruments TMS9918'
Start a new discussion about 'Texas Instruments TMS9918'
Answer questions from other users
Full Discussion Forum



Encyclopedia


The TMS9918 is a Video Display Controller
Video Display Controller

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 Television Composite video in a computing or game system....
 (VDC) manuafactured by Texas Instruments
Texas Instruments

Texas Instruments , better known in the electronics industry as TI, is an United States company based in Dallas, Texas, Texas, United States, renowned for developing and commercializing semiconductor and computer technology....
.

General information

The TMS9918 was used in systems like MSX
MSX

MSX was the name of a standardized home computer architecture in the 1980s. It was a Microsoft-led attempt to create unified standards among hardware makers, conceived by one-time Microsoft Japan executive Kazuhiko Nishi....
, ColecoVision
ColecoVision

The ColecoVision is Coleco' History of video game consoles home video game console and was released August 1982. The ColecoVision offered arcade game graphics and gaming style, the ability to play Atari 2600 video games, and the means to expand the system's basic hardware....
, Texas Instruments TI-99/4, Memotech MTX, Spectravideo
Spectravideo

Spectravideo, or SVI, was a U.S. computer company founded in 1981 as "SpectraVision" by Harry Fox. They originally made video games for Atari 2600 and VIC-20....
, Sord M5
Sord M5

The Sord M5 , was a Japanese home computer launched by Sord Computer Corporation in 1982.It had keys similar to the ZX Spectrum, but with the bottom right corner chopped off....
 and Sega SG-1000
SG-1000

The , which stands for Sega Game 1000, is a cartridge-based video game console manufactured by Sega. This system marked Sega's first entry into the home video game hardware business, and while the system was not popular, it provided the basis for the more successful Sega Master System....
/SC-3000. Modified versions with additional display modes and registers were used in the Sega Master System
Sega Master System

The Sega Master System is an 8-bit cartridge-based video game console that was manufactured by Sega and was first released in 1986 in video gaming....
, Sega Game Gear
Sega Game Gear

The Sega Game Gear is a handheld game console which was Sega's response to Nintendo's Game Boy. It was the third commercially available color handheld console, after the Atari Lynx and the TurboExpress....
, and Sega Genesis. (Note that the Genesis VDP cannot access any of the TMS9918 display modes discussed below.)

There are several variants called TMS9918A, TMS9928A and TMS9929A, where the 'A' indicates a second version of the chip which added new features, most prominently the addition of a bitmap
Bitmap

In computer graphics, a bitmap or pixmap is a type of computer storage organization or used to store digital images. The term bitmap comes from the computer programming terminology, meaning just a map of bits, a spatially mapped bit array....
 mode (Graphic II). The non-A version was only used in the TI-99/4; the TI-99/4A and the other computers had the A version VDC. The TMS9918A and TMS9928A output a 60Hz video signal, while the TMS9929A outputs 50Hz. The difference between '1' and the '2' in 'TMS9918A' and 'TMS9928A' is that the '1' version outputs composite
Composite video

Composite video is the format of an analog television signal before it is combined with a sound signal and modulation onto an Radio Frequency carrier wave....
 NTSC
NTSC

NTSC is the analog television system used in most of the Americas, Japan, South Korea, Taiwan, the Philippines, Burma, and some Pacific island nations and territories ....
 video, while the '2' versions (including the TMS9929A) outputs YPbPr
YPbPr

YPBPR is a color space used in video electronics, in particular in reference to component video cables. YPBPR is the analog signal version of the YCbCr color space; the two are numerically equivalent, but YPBPR is designed for use in analogue electronics whereas YCB
, more precisely the Y, R-Y and B-Y colour differences (luminance
Luma (video)

As applied to video signals, luma represents the brightness in an image . Luma is typically paired with Chrominance. Luma represents the achromatic image without any color, while the chroma components represent the color information....
 and colour difference signals). The need for the latter was predominant in the 50Hz world, including Europe, due to the different video signal standards PAL
PAL

PAL, short for Phase Alternating Line, is a color-encoding system used in broadcast television systems in large parts of the world. Other common analog television systems are SECAM and NTSC....
 and SECAM
SECAM

SECAM, also written S?CAM , is an analog television system first used in France.A team led by Henri de France working at Compagnie Fran?aise de T?l?vision invented 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
RF modulator

An RF modulator is a device that takes a baseband input signal and outputs a radio frequency-modulated signal.This is often a preliminary step in transmitting signals, either across open air via an Antenna or transmission to another device such as a television....
, than to try and have a different console for every different color standard. All of the ICs in this family are usually referred to by the TMS9918 name, sometimes with an 'A' postfix.

Texas Instruments' TMS9918A was succeeded by Yamaha's V9938
Yamaha V9938

The Yamaha V9938 is a Video Display Controller used in the Geneve 9640 enhanced TI-99/4A clone, as well as MSX 1980s home computers .The Yamaha V9938, also known as MSX-Video or VDP , is the successor of the Texas Instruments TMS9918 ....
, which added additional bitmap modes, more colorful sprites
Sprite (computer graphics)

In computer graphics, a sprite is a two-dimensional/three-dimensional or animation that is integrated into a larger scene.Sprites were originally invented as a method of quickly compositing several images together in two-dimensional video games using special hardware....
, a vertical scroll register and a customizable palette
Palette (computing)

In computer graphics, a palette is either a given, finite set of colors for the management of digital images , or a small on-screen graphical element for choosing from a limited set of choices, not necessarily colors ....
. The V9938 was used in a third-party upgrade to the TI-99/4A — the Geneve 9640
Geneve 9640

Geneve 9640The Geneve 9640 is an enhanced TI-99/4A clone which was built by Myarc as a card to fit into the TI Peripheral Expansion System and used an IBM PC XT detached keyboard as well as a mouse....
 'computer-on-a-card'. The V9938, in turn, was succeeded by the V9958
Yamaha V9958

The Yamaha V9958 is a Video Display Controller used in MSX 1980s home computers. More specifically, the "TIM" upgrade to the TI-99/4A, MSX2plus and MSX turbo R....
, which added some additional high-colour modes and a horizontal scroll register. These chips were used in the "TIM" upgrade card for the TI-99/4A, as well as on the MSX 2 and MSX 2+/turboR systems, although rumor has it that the V9958 was also used in a generation of the Photo Play arcades. Yamaha also produced a V9990, which is considered the follow-up of the V9958 by some, but it is not backwards compatible. A graphic chip extension utilizing the V9990 exists for the MSX in the form of the 'Graphics9000' cartridge by .

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 a different mapping of the 16k x 8 bit block of video memory is supported. Otherwise the chips are completely identical to the TMS9918A, TMS9928A and TMS9929A respectively.

Interface

The TMS9918 has its own 16k x 8 bit block of video memory, outside the address space of the CPU
Central processing unit

A central processing unit is an electronic circuit that can execute computer programs. This broad definition can easily be applied to many early computers that existed long before the term "CPU" ever came into widespread usage....
. This memory is not mapped onto the CPU memory space - the VDC's data memory bus is a private (although external) bus, separated from that of the CPU. A separate addressing space means that the CPU has to write a two-byte command word to the VDC's control port to set the address register, but it also means that the VDC doesn't slow the main processor down when it reads data out of its memory, and since the memory is not mapped onto the CPU's addressing space, there is more address space available for other memory and memory-mapped hardware.

The CPU communicates with the VDC through an additional 8-bit port on the VDC, and data is transferred between the two via port writes. As a byte is written, the TMS9918 increments its internal address register - this is important, because the CPU does not have to send an address update for every byte access. This facilitates quicker reads and writes of blocks of data. Writes to other ports can set various internal registers.

Screen modes

There are 4 different screen modes available in the TMS9918A (as mentioned before, the TMS9918 lacks mode Graphic II):

Mode 0 (Text): 40×24 characters monochrome. As the display is 256 pixels width, the character set is only 6 pixels wide. This mode doesn't support sprites, nor a separate border color setting.

Mode 1 (Graphic 1): 32×24 characters (256×192 bitmap), where for each 8 characters in the character set the foreground and background color can be set. The chars "0"-"7" for example all have the same attributes.

Mode 2 (Graphic 2): 32×24 characters (256×192 bitmap), with a 2-color limitation for each 8 pixel wide line inside a character.

Mode 3 (Multicolor): 64×48 mode, very blocky and rarely used. Each 'pixel' can have its own color defined though, hence the name. Its sprites still have the same resolution as in screen modes 1 and 2.

The TMS9918 has a fixed 16-color palette (actually 15 colors + transparent).

Sprites

In modes 1, 2, and 3, the VDC can render sprites. There can be 32 monochrome sprites of either 8×8 or 16×16 pixels on screen, each of which can have its own color. There can be no more than 4 sprites on a single scanline; any additional sprites' horizontal pixels are dropped. Sprites with a higher priority are drawn first. The VDP reports in a status register the number of the first dropped sprite. The CPU can get around this limitation by rotating sprite priorities so that a different set of sprites is drawn on every frame. Instead of disappearing entirely, the sprites will flicker. This technique is known as sprite multiplexing.

Automatic sprite movement is not handled by the VDC. What is done, in practice, is that the CPU will pick up on the VDC's 'vertical interrupt' - a standard VDC output, which is triggered automatically once every 50th or 60th of a second (depending on chip variant), during the VBI (vertical blanking interval). The CPU then jumps to some sprite-handling routine in software, which in turn tells the VDC where to reposition the sprites.

When two non-transparent pixels in any pair of sprites collide, the sprite collision flag is set. This is useful for triggering more advanced collision detection routines inside the software which can then determine the exact location and act upon it. Note that unlike the Atari 2600's Television Interface Adapter
Television Interface Adapter

The Television Interface Adapter is the custom chip that is the heart of the Atari 2600 game console and was created by Jay Miner of Amiga fame....
 and the Commodore 64's VIC-II
MOS Technology VIC-II

The VIC-II , specifically known as the MOS Technology 6567/8562/8564 , 6569/8565/8566 , is the integrated circuit tasked with generating S-Video/composite video graphics and dynamic random access memory memory refresh signals in the Commodore 64 and Commodore 128 home computers....
, the VDC cannot tell the program which two sprites have collided, just that individual sprites have been involved in a collision.

Screen mode 2 detail

Technically, mode 2 is a character mode with a colorful character set. The screen is vertically 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
Framebuffer

A framebuffer is a video output device that drives a video display from a memory buffer containing a complete video frame of data. The information in the buffer typically consists of color values for every pixel on the screen....
 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 to fill/scroll the entire screen, only 32×24 bytes had to be moved. Games on other home computers such as the Commodore 64
Commodore 64

The Commodore 64 is an 8-bit home computer released by Commodore International in August, 1982, at a price of United States dollar595. Preceded by the Commodore VIC-20 and Commodore MAX Machine, the C64 features 64 kilobytes of Random-access memory with sound and graphics performance that were superior to IBM-compatible computers of tha...
 also worked on a character basis. The graphics have to be drawn such that the 8×8 pixel borders are not too obvious, an art where Konami
Konami

is a leading video game developer and video game publisher of numerous popular and strong-selling toys, trading cards, anime, tokusatsu, slot machines, Japanese arcade cabinetss and video games....
 was particularly well known for their excellence.

This is the TMS9918 screen mode 2 challenge: every 8×1 pixel area has two colors, foreground and background. They may be freely picked out of the 16 color palette. But within each 8×1 pixel area, only two different colors can exist. When manipulating the screen in BASIC with the LINE command, one easily could exceed the limit of max 2 colors per 8×1 area and end up with "color spill
Attribute clash

Attribute clash was a display artifact caused by limitations in the graphics circuitry of a number of early colour 8-bit home computers — most notably the Sinclair Research ZX Spectrum....
".

In comparison, the Commodore 64 limit was 4 colors per 4×8 fat-pixel area. This meant that there was less local color pressure, but more global color pressure: only three of the 4 colors actually could be freely picked out of 16, the other color had to be the same over the entire screen. That color could be redefined every scan line for various results.

The TMS9918 does not have any scroll registers. Scrolling must be done in software.

Tradeoffs used in games

Some games tried to get around the 8 pixel scroll limitation, by scrolling the character set itself. This was too slow to be feasible, so the game filled the character set with 8 different versions of a single character.

Circus Charlie
Circus Charlie

Circus Charlie is an action game/platform game originally released by Konami in which you control a clown named Charlie. The game was a hit arcade game in 1984, which also had a successful release on the MSX in 1984, the Nintendo Entertainment System in 1986 by Soft Pro and on the Commodore 64 in 1987....
 (MSX) scrolled horizontally, and hence bumped into the maximum of 2 colors per 8×1 area limit. The graphics were "monochrome-ish" and there were some glitches halfheartedly covered by sprites.

Pippols (MSX) scrolled vertically. Because this isn't affected by the 8×1 area limit, the player character could walk along smoothly scrolling colorful flowers and other such graphical fourishes. However there aren't many distinct objects onscreen, because the character set is cut down by factor 8. Pippols seems to be even below that limit by some factor.

When moving at full speed in Road Fighter
Road Fighter

Road Fighter in Japanese is a car-based arcade game developed by Konami and released in 1984. It also was first car racing game from Konami....
 (MSX, vertically scrolling racing game), the screen moves 8 pixels each frame. This results in a smooth scroller in spite of the 8 pixel jumps. For many games this scrolling speed is not feasible, though.

In Knightmare
Knightmare (video game)

Knightmare is a 1986 MSX vertical Shoot 'em up#Scrolling shooters computer game. The player is a knight, Popolon, who has to fight his way through several levels to defeat Hudnos and rescue Aphrodite....
 (MSX), the scene scrolls vertically so slowly that the 8 pixel jump doesn't disturb much. Zanac scrolls vertically fairly fast, but due to the soft backgrounds which you never collide with it is a minor issue. It is most problematic in Nemesis
Gradius

The Gradius games, first introduced in 1985 in video gaming, is a series of Shoot 'em up#Scrolling shooters video games published by Konami for a variety of portable, console and arcade platforms....
 ("R-Type
R-Type

R-Type is a Shoot 'em up#Scrolling shooters arcade game produced by Irem in 1987. The player controls a space fighter named "Arrowhead" to defend humanity against a mysterious but powerful alien life-form known as "Bydo", which was later discovered to be not entirely alien in origin....
 style" horizontal space shooter). On the other hand, the Nemesis 2 backgrounds are really of "16 bit" beauty.

Specifications

  • Video RAM: 16 KB
  • Text modes: 40 × 24 and 32 × 24
  • Resolution: 256 × 192 (15 colours + transparent)
  • Sprites: 32, 1 colour, max 4 per horizontal line


Amateur's Tool

TMS9918 still has plenty of fans who nowadays create lots of PC tools for character design, sprite design and for converting true color images to screen 2. With respect to this latter application, it is worth to underline the use of dithering algorithms (e.g. Floyd-Steinberg) in order to overcome to the color clash problem and the limitations of the fixed palette.

For tools implementing dithering in screen 2 conversion look at: and to

See also

  • List of home computers by video hardware
    List of home computers by video hardware

    This is a list of home computers, sorted alphanumerically, which lists all relevant details of their Video Display Controller.A home computer was the description of the second generation of desktop computers, entering the market in 1977 and becoming common during the 1980s....


External links