Monday, December 2, 2013

The 8-bit TMS9918 "Not Quite a Standard"

Released in 1979, the Texas Instrument TMS9918 Video Display Controller chip or its derivatives and successors was used in an enormous number of home computing devices, starting with the unsuccessful TI-99/4.  It was the nucleus of devices as varied from the MSX computers to the Colecovision and the Sega SG-1000.  The base design called for a common 8-bit CPU, some ROM and RAM, a 3-voice sound chip and some IO.  For the CPU, the 8-bit Z-80 processor, running at 3.58MHz, was by far the most common used.  For the sound chip, the TI, Coleco and Sega systems used a TI SN76489 3-voice PSG while the MSX standard called for the slightly more capable AY-3-8910 chip.

The resolution of the VDP chip is fixed at 256x192, there are 16 colors available in its palette, the text mode uses 40x24 pixel tiles, two of the graphics modes uses 32x24 pixel tiles and the other graphics mode uses 64x32 pixel tiles.  The chip supports 32 one-color sprites on the screen at a time with no more than 4 sprites on a line. The chip  requires 16KB of Video RAM, which is on a separate bus from the CPU RAM.  RAM in those days was at a premium, so main CPU RAM was often smaller (256 bytes for the TI 99/A and /4A, 1K for the Colecovision).

The chips biggest weakness going forward was its lack of support for hardware scrolling.  Scrolling in a game was usually by tile, 8 pixels.  This is not smooth and scrolling looked jerky on these machines.  While this was not a huge issue in the late seventies and early eighties, where one-screen videogames were the norm, when sidescrollers and vertical shooters became popular, the systems with the bare TMS9918 looked jerky.  Smoother scrolling could be done in software, but this was rarely attempted due to the performance penalties incurred.

The TI-99/4 used the TMS-9918, whereas the TI-99/4A used the TMS-9918A.  The "A" version of the chip adds support for graphics mode 2, which is what most games used.  Both systems only had 256bytes of RAM, which was an extreme hinderance for programmers.  Unlike most other machines, this system had a 3MHz 16-bit TMS9900 CPU.  However, only the system ROM and first 256 bytes of RAM were accessed in 16-bit on the TI computers, any official RAM expansions were accessed in 8-bit form.  The programmers usually had to obtain more RAM from the Video Memory, the access of which was terribly slow.

The Colecovision used a 3.58MHz Z80 and a TI SN 76489 sound chip.  It had 1K of RAM, 8K of ROM.  The home computer version, the Coleco Adam, added 80KB of RAM, 32KB of ROM, a keyboard and a dual cassette tape recorder.  The Adam used a 6801 to handle all the additional IO.

Sega's SG-1000 and SG-3000 used the standard VDP and 3.58MHz Z80.  It also uses the TI SN76489 but provided 8K for the CPU RAM.  Sega added support for hardware, doubled the sprite limits, allowed for colorful sprites and a 64 color palette in its VDP upgrade first seen in the Sega Mark III/Master System.  A YM-2143 FM Upgrade was also released for this system.  Sega eventually allowed a palette of 4,096 colors for the VDP variant in the Sega Game Gear.  The VDP of the Sega Mega Drive/Genesis extended this even further, but the original modes no longer work.  By that time the Z80 had been relegated to sound coprocessor status and the TI sound chip was secondary to the Yamaha 4-op FM OPN2 YM-2612.

The Spectravideo SV-318 and SV-328 were the models upon which Microsoft based the MSX standard.  The SV-328 came with 32KB of ROM, half for BIOS and half for BASIC, and 64KB of RAM.  The SV-318 is compatible but has only 16KB of RAM.  They use an Intel 8255 for IO handling and an AY-3-8910 for sound processing duties.  These machines successor, the SV-378, is only slightly different but fully MSX compatible and uses different, MSX-compatible, cartridges.  The MSX had no chance in North America, but did see success in Japan and in some European countries.  While MSX machines could offer 8-64KB of RAM, most offered at least 32KB.  RAM could upgraded beyond 64KB.

The MSX2 standard called for the V9938 VDP variant to be used.  This upgrade allowed for 256 colors, 80-column text modes, 16/256 color paletized modes, more colorful sprites and hardware vertical scrolling.  It required more Video RAM, 128KB.  Some systems also had support for more than 64KB of CPU RAM.  Horizontal hardware scrolling had to wait for the MSX2+ and the V9958 VDP.  The MSX2 and MSX2+ standards still called for the Z80 at 3.58MHz to be used.  Some MSX2+ machines had the YM-2143 OPLL (MSX-Music) chip.  The MSX turbo R was the last iteration of the MSX line and used an R800 @ 7.16MHz as the main CPU with a Z80 for compatibility and had 256-512KB of RAM.

In addition to MSX-Music, there were other musical upgrades for the MSX machines.  MSX-Audio used the Y8950 chip, which was an improvement over the YM2143 and the Adlib OPL2 YM3812 chip.  Certain of Konami's cartridge games had a SCC or SCC+ chip, which could use small waveforms.  Moonsound was a sound board that was released late in the MSX's life and used a YMF-278 chip.  Yamaha built in the equilavent of a FB-01 into its CX5M MSX System.

All the above systems have at least 16KB of Video RAM, all support the Atari-style 9-pin joystick port (often with support for a second button) and all support cartridges of some type or another.  Other systems with the TMS-9918 or its derivatives and similar architecture include the CreatiVision, Memotech MTX, Sord M5, Tatung Einstein and Tomy Tutor/Pyuuta.

4 comments:

  1. This the best one can get in terms of scrolling on tms9918

    http://www.youtube.com/watch?v=g9xi5iobIHw

    All tiles are pre-computed and stored in vram.
    It is using some undocumented features to double the number of available tiles.

    ReplyDelete
  2. Nice, except that the TI99/4(A) was anything but unsuccessful. Maybe in Euope, but in early 1980s US, the 99 sold in large numbers and TI was a top player.

    ReplyDelete
  3. Sold many units but TI took a loss on each one due to the price war with Commodore.

    ReplyDelete
  4. https://youtu.be/novuWsQ24-U shows there is still mileage in the 9929/A...

    ReplyDelete