Optimizing A QuickTake Image Decoder For The Apple II’s 6502

The idea of using the Apple II home computer for digital photography purposes may seem somewhat daft considering that this is not a purpose that they were ever designed for, yet this is the goal that [Colin Leroy-Mira] had, requiring some image decoder optimizations. That said, it’s less crazy than one might assume at first glance, considering that the Apple II was manufactured until 1993, while the Apple QuickTake digital cameras that [Colin] wanted to use for his nefarious purposes saw their first release in 1994.

These QuickTake cameras feature an astounding image resolution of up to 640×480, using 24-bit color. Using the official QuickTake software for Apple Macintosh System 7 through 9 the photographs in proprietary QTK format could be fetched for display and processing. Doing the same on an Apple II would obviously require a bit more work, not to mention adapting of the image to the limitations of the 8-bit Apple II compared to the Motorola 68K and PowerPC-based Macs that the QuickTake was designed to be used with.

Targeting the typical ~1 MHz 6502 CPU in an Apple II, the dcraw QTK decoder formed the basis for an initial decoder. Many memory and buffer optimizations later, an early conversion to monochrome and various other tweaks later – including a conversion to 6502 ASM for speed reasons – the decoder as it stands today manages to decode and render a QTK image in about a minute, compared to well over an hour previously.

Considering how anemic the Apple II is compared to even a budget Macintosh Classic II system, it’s amazing that displaying bitmap images works at all, though [Colin] reckons that more optimizations are possible.

Digital Photography Comes To The Apple II

Back in the very early days of consumer digital photography, one of the first stars of the new medium came from Apple. The QuickTake 100 used a novel flat form factor and at its highest resolution could only shoot 640×480 images, but at the time it was a genuine object of desire. It came in Windows and Apple versions, and to use the Apple variant required a Mac of the day with appropriate software.

The interface was an Apple serial connector though, so it was quite reasonable for [Colin Leroy-Mira] to wonder whether it could work with Apple’s 8-bit machines. The result is QuickTake for the Apple IIc, the product that perhaps Apple should have brought us in an alternative 1994.

Fortunately the protocol has already been reverse engineered and forms part of the dcraw package, however the process of extracting the code wasn’t easy. The full resolution and colour of the original pictures has to be sacrificed, and of course once the custom serial cable has been made it’s a painfully slow process transferring the pictures. But to get anything running in this way on such elderly hardware which was never intended to  perform this task is an extremely impressive feat. We would have given anything for this, back in the 8-bit days.

If you have a QuickTake and want to use a more modern machine, we’ve got you covered there, too.