'What' used spare memory on the TMS9918 Video Display Controller?

By 'what', was it

  1. Something pre-installed on the computer like Bios or Basic or something, I assume the main cpu s themselves were not advanced enough to decide when and how to use that spare memory themselves.
  2. Or, was it done by software loaded onto the machine from external memory like disk or cassette .

Quote from the Wikipedia page -

Depending on the screen mode being used, not all of the video memory may be needed to generate the display. In these cases, the CPU may use the extra video memory for other purposes. For example, one use is as a scratch-pad for uncompressing graphics or sound data stored in cartridge ROM into. Another popular use is to create a second copy of some or all of the display data to eliminate flickering and tearing, a technique known as double buffering.

  • The large (at the time) 64KiB of VRAM in the Commodore 128D was frequently re-purposed as a RAM disk, since around 48KiB of it usually went unused by the display.
    – Brian H
    Commented Jun 18, 2020 at 13:30

3 Answers 3



For example the TI-99/4 system did store all BASIC code and variables within the 9918's RAM.

The Long Read:

The TMS 9918 acted on its own video memory, seperate from main memory. The memory could be accessed by an external system (aka main CPU) via a port, by setting an address and reading or writing a byte or stream of bytes. There was no predefined structure. It could be used to store anything within. After all, they are simply byte sized cells :))

It could be used for elements like

  • Screen
  • Text
  • Fonts
  • Graphics
  • Sprites

Well, or, as said, any kind of data.

If used for screen data, they could be arranged (almost) anywhere, as registers and data structures were used to point the 9918 display logic to it's storage. This enabled it to hold several sets of screens, fonts or alike at the same time, making exchanges (flipping) quite easy and ast.

In case of "any data" it's RAM. Is was as with any other memory up to the program what to store where. For example the TI 99/4 used it to store all user data, like the BASIC code and its variables.

The ability to use the 9918's RAM for arbitrary data could enable comparably cheap systems with only a minimum of main RAM, storing all data within the video RAM, thus being able to use cheap dynamic RAM without the need to build add a RAM controller.

  • Right -- with the TI99/4[A]'s specs (16KiB RAM hooked up via the 9918 and 256 bytes connected to the main bus), using the display memory for data storage was the ony option.
    – occipita
    Commented Jun 20, 2020 at 5:45

I assume the main cpu s themselves were not advanced enough to decide when and how to use that spare memory themselves.

A CPU by itself doesn't "decide" to use memory for something. That's the job of a program, whether it's running from ROM ("firmware") or RAM ("software").

The examples you give are clearly examples of programs being aware that they could take advantage of spare memory.

I don't know this particular system, but the uses are well-known in other machines - for example using off-screen video memory for caching bitmaps. This is like paging out to disk, but you're using a much faster storage.

  • 2
    It’s the VDP from the TI-99/4, the original MSX, the ColecoVision and more, if that helps to ring a[n irrelevant] bell. Unusual for the era in having its own RAM in its own address space and giving the CPU only slow indirect access to it.
    – Tommy
    Commented Jun 18, 2020 at 3:46

The processor could access the TMS9918 memory through reading and writing registers on the VDP:


  1. write address to specific registers (14-bit address, so 2 regs)
  2. read byte from another register (which will trigger read from VDP RAM)


  1. write address to specific registers
  2. write byte to register (which will trigger write to VDP RAM)

The "bad" about this was much slower memory access, but the "good" was offloading all memory access synchronization to VDP (which also during this time refreshes the dynamic RAM plus obviously reading it for video signal generation). Some time ago I played with all of this and wrote a simple "demo" program for it:

https://github.com/parallaxinc/propeller/tree/master/libraries/community/p1/All/Spin%20object%20to%20drive%20TMS9918A%20(or%20compatible)%20Video%20Display%20Processor enter link description here

You must log in to answer this question.

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