Canon-hack Development Kit (CHDK)

During the second half of 2006, programmer 'VitalyB' studied a disassembly of the firmware update for an ixus camera in order to understand the Canon firmware-update procedure.
With that knowledge, he was able to write his own programme that installed itself and then downloaded a copy of the Canon firmware by blinking an LED.
The programme was installed in playback mode via the standard 'Firmware Update' option.
The hack copies the original initialisation firmware and modifies it so that less ram is available to the OS.
A custom process is then run in an area of ram that is not accessible to the OS.
After studying the camera firmware, he developed the "RAW enabler" that allowed A610 users to save uncompressed 10-bit RAW images as well as the JPG images.
Adam Dunkel's uBASIC intepreter was included to allow support for scripting and Pablo d'Angelo improved the parser to replace line-numbers with labels.
The initial builds provided a 'live' histogram,scripting, three-exposure-bracketing and , to the irritation of many users, displayed "hello world" on the screen.
Support for A620, A630 and A710is quickly followed.
Log/linear histograms were added followed by RGB histograms and a layout editor for the on-screen displays (OSD) allowed the user to move them to the most convenient locations.
Future development would rely on cameras and their firmware dumps being available.
It was published on a Russian website and when 'discovered' in mid December, a poster on DP Review forum 'Canon Talk' said "sounds very interesting. surprised no interest in it."
That would soon change ... in February 2007 'DP Review' reported another programmer 'GrAnd' had added display of miscellaneous values (focal distance,zoom step and factor, hyperfocal distance) and a battery meter.
Users were initially wary that this 'hack' may damage their cameras but after others had tested it they became enthusiastic about each new feature.
GrAnd added shadow and highlight-clipping warnings to the histogram, a DOF calculator (based on the real aperture-value) displayed on shutter half-press and percentage-capacity indication for the battery with adjustable min/max volatage.
A file-browser and text-reader followed together with 'flash-light', choice of prefix, extension and save-location for RAW files.
Instead of loading each time the camera was turned-on, CHDK was next made autoloading by using a 'locked' SD card containing a DISKBOOT.BIN file.
After booting, the file DISKBOOT.BIN is 'hidden' so that the camera is not in a permanent boot-state.
A calendar and clock were added together with text-reader autoscroll, support of RBF fonts and initial support for the s3is.
The DOF calculator for the s3is was based on interpolation of the lens focal-lengths.
By request,GrAnd started an English-language WIKI and also provided a very convenient, ready-to-use Windows environment for would-be CHDK developers.
'GrAnd' also developed all the essential tools and functions that we now regard as the basic CHDK.
This major innovation made it possible for relatively inexperienced programmers to develop their own specialised builds.
The first was SDM in June 2007, followed in September by MX3's motion-detection and then Fingalo's enhanced uBasic scripting commands.
Other people provided downloads of firmware and ports of the basic CHDK to additional camera models.
The A640, A700, A710, G7, IXUS700, A570 (by Rossig/MX3)and IXUS800 were soon supported and new video features added.
Tv bracketing in continuous-shooting mode, long-exposure feature by Fingalo and A560 support followed.
The first cameras to be supported were all based on the Canon Digic II processor using the VxWorks operating system.
Later 'hacks' included Digic III cameras with VxWorks or DRYOS operating system.
Richard Lemieux investigated the limited accuracy of the camera's distance reading.
EWAVR (aka 'Zosim') had already discovered how to read the memory-mapped hardware registers that the camera's keys, SD card status and USB-connection status were connected to.
On certain cameras, it was then possible for the software to prevent the camera going into download mode when a voltage (+3 to +5V) was applied to the USB connection (by plugging into the PC, for example).
The USB status could be read like any key on the camera.
This feature was included in the SDM and Fingalo builds and this release of SDM takes the concept further by allowing two cameras to be highly synchronised for stereo photography.
New cameras were ported, the original WIKI transferred to the current one and in November 2007 a CHDK forum opened to continue discussion outside of 'DP Review'.
If you are interested in the discussions that occurred on 'DP Review', see the links below.

The basic CHDK provides the following features :-

The scripts allow you to 'virtually-press' any button, as many times as you like, with time delays.
This enables you to implement an intervalometer for time-lapse, exposure-bracketing (for high-dynamic-range stereo images, including 360 degree cylindrical panoramas), focus-bracketing (maybe for extended depth-of-field macro images), zoom and ISO bracketing, etc., etc.


WIKI Main Page

CHDK Forum

CHDK discussions on 'DP Review'

  1. Dec 14 2006
  2. Feb 9 2007
  3. Apr 2 2007
  4. Apr 19 2007
  5. Apr 23 2007
  6. Apr 30 2007
  7. May 11 2007
  8. May 19 2007
  9. May 25 2007
10. Jun 1 2007
11. Jun 9 2007
12. Jun 15 2007
13. Jun 29 2007
14. Jul 31 2007
15. Sep 3 2007
16. Sep 22 2007
17. Oct 2 2007
18. Oct 11 2007
19. Oct 18 2007
20. Oct 26 2007
21. Nov 10 2007
22. Nov 26 2007

At the end of December 2007, discussion transferred to the 'CHDK Forum'.