Wikia

CHDK Wiki

CHDK Development : Which files do what?

Talk1
576pages on
this wiki

IntroductionEdit

This wiki page describes every file used in CHDK development that might need to be customized for a port to a new camera. Each entry briefly describes what information the file contains, has a little bit about where to find that information and some pointers to what might go wrong if those values are wrong. At some point this will probably need to be broken across several pages.

Files Customized for each Firmware Version of a CameraEdit

(in trunk/platform/cameraname/sub/fwversion)

stubs_entry_2.SEdit

This file is used to for all the addresses that are not discovered automatically during the CHDK build process. In the build process, a "find signature" routine is used to examine a dumped file for the camera firmware called "primary.bin". It looks for matches to know code sequences for routines in the camera ROM that CHDK wants to use. If it does not find such a match, or finds a poor match, then the correct address needs to be entered in stubs_entry_2.S. You need to examine stubs_entry.S and find replacements for any routine not identied 100% or satisfy yourself that the found routine is correct.

There may also be addresses not included in stubs_entry.S that need to be added to stubs_entry_2.S - typrically because they are for routines not needed when the original "find signature" code was written.

lib.cEdit

This file contains constant values and addresses related to the camera's LCD size, the image sensor size and the buffers used by the camera to hold image data. These values are used to scale the CHDK GUI and to enable RAW&DNG capture and motion detection.

stubs_min.SEdit

This file contains addresses or offsets in camera RAM when the camera maintains values related to its operation. There are also two values pointing to locations in ROM>

boot.cEdit

This file contains the code for three CHDK task - boot, PhySw and file_modules. The boot task is the first code executed by CHDK after it is loaded into RAM by the boot loader. In addition to setting up CHDK, it initiates the task hooks for the other CHDK tasks. The PhySw task intercepts camera key presses, allowing CHDK to respond to them before the Canon firmware sees them. The file_modules task adds FAT32 capability to CHDK.

Code for these task is dissassembled from the camera firmware and CHDK specific hooks are inserted.

capt_seq.cEdit

movie_rec.cEdit

MakefileEdit

makefile.incEdit

stubs_asm.hEdit

stubs_entry.SEdit

stubs_auto.SEdit

primary.binEdit

Files Customized for all Firmware Versions of a CameraEdit

(in trunk/platform/cameraname)

kdb.cEdit

lib.cEdit

main.cEdit

MakefileEdit

notes.txtEdit

platform_camera.hEdit

shooting.cEdit

wrappers.cEdit

(in trunk/loader/cameraname/)

blobs.SEdit

entry.SEdit

main.cEdit

MakefileEdit

(in trunk/loader/cameraname/resetcode)

entry.SEdit

main.cEdit

MakefileEdit

Files Customized in Main Code Files for Specific Cameras Edit

trunk/core/gui.cEdit

  • short cut key buttons - adjustable ALT button - raw exceptions

trunk/core/gui_menu.cEdit

  • customized menu space

trunk/core/kbd.cEdit

  • ZSTEP_TABLE_SIZE, nTxtbl if camera supports syncable remote
  • custom shoot processing

trunk/core/main.cEdit

  • customized dump_memory for IXUS65 only

trunk/core/raw.cEdit

  • customize gammma value calculations for sx30 & G12

trunk/include/kbd.cEdit

  • customize USB_MASK (belongs elsewhere)

trunk/platform/generic/shooting.cEdit

  • customized shooting_get_drive_mode() for some cameras
  • custom hacks for iris control of sx30 & g12
  • strange vague hack for CAMERA_ixus800_sd700

trunk/platform/generic/wrappers.cEdit

  • assorted hacks for functions not found in stubs_entry.S for G12, SX30, S95

Files Customize to Add a New Camera or Firmware Version to CHDKEdit

MakefileEdit

makefile.incEdit

Around Wikia's network

Random Wiki