CVS Video Camera: Hacking the Resource partition

Changelog

Oct 30th, 2005 "Freeing up some Space" section added. Updated "Modifying Sounds" with results of some experimentation. Link to WinImage tutorial added.
Oct 29th, 2005 Initial version of this page created, with what I know so far.

File Formats

The CVS Video Camera holds all of it's resources on the P4 partition. This page will show you how to extract that partition, create and inject modified resources, and upload the modified partition image back to the camera.

How to extract (download) P4

  1. Plug the camera in, and fire up Ops-0.13
  2. Click Open Camcorder, then Unlock
  3. Click Download Flash, select "P4", click OK.
  4. Specify a filename ("p4.img" for example), it will be exactly 512kb.
  5. The partition will now be dumped, it should take a couple of seconds.
You can now use
WinImage to open and modify the resulting file, which is a FAT12 filesystem.

Injecting Files into P4

On Windows, the easiest and safest way is to
use WinImage to Inject the file into the P4 image, then upload the entire P4 image back to the camera.

On Linux, it seems that you can just mount the P4 partition and do whatever you like, but I haven't yet played with this. See here.

Freeing up some Space

(Reference:
this forum post)  You can delete PROCESSED.JPG, zbm\PROCESSED.ZBM, zbm\camproce.zbm
They are used only when the camera is "properly" processed, which we're never going to do. This frees up 93kb of space.
TODO: Give a list of files on the P4 partition, with info.

How to upload modified P4 image

  1. Plug the camera in, and fire up Ops-0.13
  2. Click Open Camcorder, then Unlock
  3. Click Upload Flash, click Yes, select "P4", click OK.
  4. Specify the filename of your new p4 image (like "P4_new.img"), click OK
  5. Image will be uploaded and camera will be shut down. Unplug the USB cable, and turn on the camera! Your new resources should now be active.
If you need help creating a modified image, refer to
Injecting Files into P4 above.

Modifying Full-screen Images: .JPG

(Reference:
this forum post)  The camera has the ability to display 280x220 non-progressive 2x1 sampled JPEGs. The easiest way to create these is to use your favorite image editor to create a BMP file, and then use cjpeg (win32 binary package; anyone know where to get a linux version?):
  1. Create an Uncompressed, 280x220, 24-bit Windows BMP file by any method you like.
  2. Download and extract cjpeg, a JPEG compression utility from the JPEG Group's reference implementation.
  3. Execute the following command-line to convert your .BMP into the correct type of .JPG:
    cjpeg -sample 2x1 -quality [Q] [infile] [outfile]
    Where:
    [Q] is a number 0-100 for quality. Use this to make the file smaller or larger.
    [infile] is the source .BMP file
    [outfile] is the destination .JPG file.
You can now name your new .JPG the same as the one you want to replace, and Inject it into your P4 image; see the section Injecting Files into P4 above for details.

If you need some inspiration, check out images others are using with their camera.

Modifying Sounds: .WAV

The camera supports playback only of 16-bit, 8khz and 16khz, Mono, PCM .WAV files; 8-bit definitely doesn't work. Use your favorite sound editor to create and edit these files. Higher sample rates may work, but you don't have enough space on the resource partition for them to be of any use.

Modifying Fonts and Messages: .ZBM

The ZBM file format is very simple; it's a header followed by raw image data. The header is 32 bytes:

OffsetFieldWidth (bytes)Description
0Unknown4All 00h
4Width2Width of the Image
6Height2Height of the Image
8Unknown1Seems to always be 04h
9Unknown23All 00h

Following the header is the raw 4-bit image data, at 2 pixels per byte.

A .ZBM conversion utility and viewer is available:
zbmConvert

TODO: Describe the 2 known palletes.

Comments

Comments/suggestions? E-mail kRYPT (krypt@mountaincable.net)