Hacking The Commodore 128 To Capture Almost Real-Time Video

A Commodore 128 with a video capture device attached

Although watching and editing videos may be among the primary tasks of many PCs today, it wasn’t that long ago that working with video required powerful processors and expensive video capture hardware. Even in the 1980s, home computer users were looking for ways to connect video sources to their Commodores and Ataris despite their hardware limitations. [Cameron Kaiser] has a mid-1980s consumer-grade video capture device, which he has managed to turn into an almost real-time video capture system.

A distorted video image on a C128's monitor
Allowing the graphics chip to interrupt the CPU mid-capture results in a severely distorted image

His work revolves around a device called “ComputerEyes”, a 1984-vintage hardware interface that made it possible to connect a composite video source to a home computer. The limitations of mid-1980s CPUs meant that it took around six seconds for the computer to do a quick scan of a single video frame, or a multiple of that if you wanted a higher-quality image. Another limitation, at least on Commodore machines, was that the screen had to be turned off during video capture – otherwise, the video chip would interrupt the CPU halfway through the process, causing it to lose its synchronization with the video source.

[Cameron] however, plugged his ComputerEyes into a Commodore 128. This machine, largely designed by Hackaday contributor [Bil Herd], has an unusual hardware architecture consisting of two different CPUs and, crucially, two separate video chips. The primary 8564 “VIC-II” graphics chip is used to keep compatibility with existing Commodore 64 programs, while the secondary 8563 “VDC” is mainly aimed at newer high-resolution text-based software. The VDC is also much more independent from the main system bus than the VIC-II, allowing it to display an image without disturbing the CPU.

More after the break.

Although the VDC was intended for text-mode use only, and therefore lacks some essential graphics features like sprite management, it does support high-resolution bit-mapped graphics. With a bit of digging around in the VDC’s configuration registers, [Cameron] was able to implement a previously-unused 320×200 pixel mode that allowed the C128 to show the captured video image on the screen, while also capturing the next frame in the background.

With a bit of further optimization of the readout code, he also managed to increase the capture speed by almost 25% – though at the cost of losing several pixels on the left edge of the image. As you can see in the time-lapse video below, the final system doesn’t quite reach real-time capture speed, but performs pretty impressively for a mid-1980s consumer product. We’ve already seen that the C128’s video system is hackable, and that the systems can be easily repaired even when things go wrong. If you’re interested in the history behind the C128, look no further than [Bil]’s story on the machine’s development process.

10 thoughts on “Hacking The Commodore 128 To Capture Almost Real-Time Video

  1. Kind of depends on your definition of “Real Time””. It seems to be taking multiple seconds per frame here. There was an example a while back where real time video was converted to PETSCII and displayed on an original PET.

  2. The DRAM memory that the VDC has access to can also be doubled :) This has to be done with chips that quadruple the memory, but the refresh rate is to slow and only manages to keep x2 up to date.

    The VDC memory is also completely separate from the 128K main memory :)

  3. Cool project, nice to seem people playing with this odd tech that nobody could afford at that time. Or at least not the kids in my neighborhood. I did see a C64 based video capture system on a fair where people for 25,- could have their picture taken, with the text “wanted – dead or alive” or “reward $10.000” written under it. It was fun, to see, but unfortunately not many people seemed willing to spend that much money on a faded dot-matrix printout of a pixelated image of themselves. However… as a kid, I always wanted such a system, until I learned how it worked.

    Eventually I got an amiga and after I obtained an old B/W security camera, and a video digitizer, a stuck on a color wheel and had lot’s of fun with it, I had my own full color capture device.

    1. @jo the only difference other than form factor is the 128D came with more VDC RAM. That’s unlikely to be necessary here with only 320×200 images. If it is needed, you can always upgrade your standard 128 to match as a Jaded Hobo says above.

      1. The C128 was an interesting little PC.
        The graphics abilities were almost on eye level with IBM CGA.
        If only the Z80 had been replaced by a NEC V20 instead.
        By 1985 that CPU was affordable and the C128 could have had run both MS-DOS and CP/M programs.
        Via V20’s 8080 emulation mode, even CP/M 80 programs..
        What of a missed opportunity. With DOS compatible, even if merely basic, the C128’s native mode would have had been used much more often. I mean, who needed CP/M Plus? CP/Net, MP/M or MP/M II had a purpose, they could access lots of RAM or do multitasking..

  4. Such a device was also known as “frame grabber” or “digitizer”.
    The latter term was also sometimes used for graphical tablets, light pens and mice, though.

    An Arduino Uno or MS-DOS PC can do the same, too.
    There’s a freeware utility from the early 90s that uses a parallel port device.
    See “Dirt Cheap Frame Grabber (DCFG)”. For Arduino, see “the Video Experimenter Shield”.

    And in an old computer book I’ve got from about same time, there’s a little 8-Bit ISA (PC-Bus) card included.
    It uses a few timer ICs and some ADC/DAC chips. It can digitize NTSC/PAL frames, too.

    1. Maybe. But Ican see where the author is coming from. In the 1980s, it would still have been amazing to be able to connect a camera or VCR to your computer. Even if it’s merely for still frames some applications:

      – SSTV, Slow Scan TV in Robot 8 (was still in use in the 80s)
      – for digitizing scenes of your favorite TV show
      – for digitizing art. Eric W. Schwarz from the Amiga scene did exactly that in the late 80s
      – remote-controlling your camera. Call your PC via modem and take a screenshot of your room
      – as an alarm system. If a switch/sensor was triggered, the PC would take series pictures
      – surveillance. In a hotel or large building, the cameras in each floor could be remotely checked via PC. The frame grabber would be connected like a monitor, maybe in parallel to a monitor, even
      – object recognition. A simple algorithm could recognize forms through the camera’s eye. In combination with a robot arm, a simple AI could be created

      And so on..

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.