Adding new cameras, applying patches into trunk (with source code prepared) - page 40 - General Discussion and Assistance - CHDK Forum

Adding new cameras, applying patches into trunk (with source code prepared)

  • 1685 Replies
  • 863171 Views
*

Offline srsa_4c

  • ******
  • 4451
Advertisements
Hi!

Attached a diff (against trunk rev. 1239) for the A410, contains the following:
- USB power sensing corrected (USB remote should work, tested with remote.bas)
(I threw away most of /platform/a410/kbd.c, used "#ifdef"s in /platform/generic/kbd.c instead)
- modemap filled with correct values
- changes noted to /platform/a410/notes.txt

(GNU patch chokes on notes.txt because of the line endings, but other tools may work correctly)

This is actually a re-post, from here:http://chdk.setepontos.com/index.php?topic=2597.msg70165#msg70165.

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Attached a diff (against trunk rev. 1239) for the A410, contains the following:
- USB power sensing corrected (USB remote should work, tested with remote.bas)
(I threw away most of /platform/a410/kbd.c, used "#ifdef"s in /platform/generic/kbd.c instead)
- modemap filled with correct values
- changes noted to /platform/a410/notes.txt

Thx, added in changeset 1240.

msl
CHDK-DE:  CHDK-DE links

*

Offline philmoz

  • *****
  • 3450
    • Photos
Cleanup of 'capt_seq.c' for G12 (all firmware versions).

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline philmoz

  • *****
  • 3450
    • Photos
Change to lib/lang/lang.c to use malloc/free instead of umalloc/ufree to store the language strings.

The umalloc function incurs an extra 64 bytes overhead per block allocated (thx reyalp) - there are over 450 strings allocated so this wastes ~30K of Canon heap memory.

Changing to malloc/free removes this memory overhead. Note you won't see any change in the free memory shown in the 'Miscellaneous stuff' / 'Show memory info' menu option - this shows the largest free block of memory available, not the total amount of memory available.

If using EXMEM this change also means the strings are stored in extended memory freeing up more of the Canon heap.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Cleanup of 'capt_seq.c' for G12 (all firmware versions).
Added in changset 1241.

Change to lib/lang/lang.c to use malloc/free instead of umalloc/ufree to store the language strings.
Added in changeset 1242.


Thx for your work.

msl
CHDK-DE:  CHDK-DE links

*

Offline philmoz

  • *****
  • 3450
    • Photos
Patch for G12/SX30/IXUS 310/SX220.
Fixes AV override causing camera to crash if the shutter button half pressed repeatedly too quickly.

(Thx funnel for testing on SX220)

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Patch for G12/SX30/IXUS 310/SX220.
Fixes AV override causing camera to crash if the shutter button half pressed repeatedly too quickly.

Thx, added in changset 1243.

msl
CHDK-DE:  CHDK-DE links

*

Offline philmoz

  • *****
  • 3450
    • Photos
Patch for S95, all firmware versions (thx maverick for testing and getting all the modemap values)
- updated stub addresses and added stubs entries or strrchr, rand and srand. removed custom S95 versions from code
- fixed get_flash_params_count
- changed display aspect ratio setting from 9/4 to x2 (http://chdk.setepontos.com/index.php?topic=6395.0)
- removed redundant values from platform_camera.h
- updated DNG active area values
- updated modemap
- fixed option to save RAW/DNG in same folder as JPEG

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline reyalp

  • ******
  • 14128
Patch for S95, all firmware versions (thx maverick for testing and getting all the modemap values)
- updated stub addresses and added stubs entries or strrchr, rand and srand. removed custom S95 versions from code
- fixed get_flash_params_count
- changed display aspect ratio setting from 9/4 to x2 (http://chdk.setepontos.com/index.php?topic=6395.0)
- removed redundant values from platform_camera.h
- updated DNG active area values
- updated modemap
- fixed option to save RAW/DNG in same folder as JPEG
Added, changeset 1244.

Thanks msl for keeping up with the patches, real work has been keeping me very busy :(
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Patch to disable raw/dng saving in 'low light' mode on G12 & SX30 (can be enabled for other cameras using '#define CAM_DISABLE_RAW_IN_LOW_LIGHT_MODE 1' in platform_camera.h).
The raw files in this mode are corrupted and not usable.

This patch also moves some common code (to determine if RAW/DNG saving is disabled), from raw.c and gui_osd.c into conf.c (seemed like a reasonable place to put it). I've also commented the code a bit.

Also tidied the #ifdef DNG_SUPPORT code blocks in raw_savefile and the gui_osd_draw_raw_info function.

Phil.
« Last Edit: 23 / July / 2011, 03:49:11 by philmoz »
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

 

Related Topics


SimplePortal © 2008-2014, SimplePortal