I recently purchased a Commodore 64 off of Craigslist. One of the interesting things that came with it was a Video Byte II cartridge - a still, black-and-white frame grabber that plugs into the User Port.
Fascinated, I cracked open the case and found it to be rather devoid of parts - only four ICS: An LM324N (quad op-amp), a CD4066BCN (quad bilateral switch), and two 555 timers. This was even more impressive, since it uses no ASICs, FPGAs, or anything else traditionally associated with video capturing. In addition to the ICs, there were some transistors, resistors and capacitors, of course. After completing a partial schematic of the device based on PCB scans, I decided to try a different tack: reverse-engineering the software itself by using VICE.
It turned out to be a very simple loop utilizing CIA #2’s ability to time the duration that CNT2 is held high on the User Port by decrementing Timer B each time Timer A underflows. The loop reads pixels in column-by-column by performing a dummy read off of CIA #2 Data Port B, which in turn causes a pulse on the /PC2 handshaking line. This triggers the Video Byte 2 to pull CNT2 high for a duration corresponding to the brightness level of the upcoming pixel. The loop then checks the value in Timer B; 0xDC is Dark Gray, 0xDA is Medium Gray, 0xD8 is Light Gray, and 0xD6 is White.
Simple. Elegant.
My changes to VICE’s source tree are available on request; my implementation is currently highly deficient in that it simply reads in raw pixel data from an image in a hard-coded path with a hard-coded name. However, the actual CIA-related changes and functionality should be there. For what it’s worth, VICE did not actually have proper support for the Timer B mode that is used by the Video Byte. Mode 0×60 should decrement Timer B when Timer A underflows only if the CNT line (attached to the User Port) is held high; by contrast, VICE treats it the same as mode 0×40, which always decrements Timer B when Timer A underflows.
And now, pictures:



