Unintended Features of the Dakota Digital Camera
In the course of hacking the camera, a number of bonus features were discovered that Ritz / Wolf Camera probably never intended. These are mostly features of the underlying chipset (used in a variety of similar cameras) which were never explicitly crippled for the Dakota single-use camera.
Webcam mode
The Dakota camera supports streaming continuous video in a variety of formats, ranging from raw 8-bit (B&W) to compressed raw YUV (color) data. Varying sizes are available, including 352x288 and standard 640x480. This feature can be enabled by setting the camera's mode to 3 (Webcam) via USB command, and the resulting data can be read on the camera's Isochronous (ISO) USB pipe. This feature is already implemented and working in Linux; see the SPCA50x USB Camera Linux Driver homepage for a Dakota-ready Webcam driver module.
Unfortunately, most of the world runs Windows, and lack of a generic ISO driver or the necessary time/skill to write one (especially one that will interface with Windows' WDM video stream thingy or Video for Windows) has prevented this feature from appearing in the Windows software.
Here is a sample image grabbed from gqcam in Linux; here is one frame of the raw B&W data streamed to a file in Windows with a time-limited demo of a commercial generic driver, then converted from RAW with Paintshop Pro. There are extraneous header bytes before each line of image data (I didn't feel like writing any program to remove these), so the image is a bit skewed (and there are little dots all over). And yes, I know I changed the import image size to *641*x480; at the correct ratio the tearing is even a bit worse due to those header bytes.
Technical notes: Webcam mode image format is set by adjusting register 0x270c before enabling Webcam mode. Available values are:
- 0: RawData10bit (line-by-line data with a short header at the beginning of each line and a longer one between frames)
- 1: RawData8bit (black and white) (line-by-line data with a short header at the beginning of each line and a longer one between frames)
- 2: YUV422Ncomp
- 3: YUV422Comp
- 4: YUV420Ncomp
- 5: YUV420Comp
Brightness, contrast and similar settings are set by registers as described in the reverse-engineered hardware documentation collected (in some instances discovered?) by John Maushammer.
AVI VideoClip mode
The camera's chipset supports the ability to record short AVI movies in addition to still images. At this time, however, this feature is only available by forcing this mode while tethered to the USB port, where picture-taking features are unavailable*. This could potentially be made to work, but would require uploading modified firmware to the camera. Also interesting to note; the chip would theoretically support simultaneous audio (microphone) recording, but the audio-in pins are unavailable on the particular small-form-factor chip package used in the Dakota.
* There is an exception to this, as reported below.
'Take pictures while tethered to the computer' mode
When this command is issued, the camera will take one or more pictures while attached to the computer's USB port. Only USB power will be drawn; this should work even if the camera has no batteries - however, the flash will not be used, regardless of lighting conditions. The USB command for this is 0x51 (Out), wIndex=0. wValue specifies the number of pictures to take in succession (0 = 1 picture, 1 = 2 pictures, etc.).
Notes:
- Images taken on USB power are of significantly reduced quality compared to images taken the 'normal' way, probably due to the (lack of) power available for the image sensor while running from USB power. They will have that typical grainy 'Webcammy' look, and color/brightness may be less than consistent. See the difference between images taken on battery and USB power.
- This feature can be used to bypass the camera's hard-coded 25-picture limit, and take pictures up until the camera's memory is actually used up. If there are 25 pictures on the camera, it won't allow any more to be taken by any means, either manually or via USB request. However, if there are (for example) 24 pictures, and you use a single USB request to take 2 more, the check at the 25th picture is bypassed. Now you can continue taking shots (either via USB or the usual way) until the memory is filled. Note, however, that the "Pictures Remaining" count on the camera will not be valid while more than 25 pictures are stored.
- The camera appears to have trouble storing more than 254 filenames in its internal filesystem. If more than 254 pictures are taken, their filenames will be duplicates of existing ones, resulting in hassles while downloading and corrupted/lost pictures. (Luckily, in normal use, it is highly unlikely that anywhere near this number of pictures can be stored. This test was performed by covering the lens completely, resulting in highly compressible all-black images. In this manner, 353 pictures were stored, but those after the 254th were corrupted.)