Hacking the Commodore 128 to Capture Almost Real-Time Video [Hackaday]

View Article on Hackaday

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.