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

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

  • 1679 Replies
  • 787853 Views
*

Offline reyalp

  • ******
  • 14082
Advertisements
No problem. I think I fixed it now.
Thanks. Added in changeset 1230

Note that the autobuilds will not include FI2 files until I get the autobuild server admin to install the keys.

I noticed in generic/shooting.c _MoveIrisWithAv is used both in the same ifdef as SX30 and G12 in shooting_av_bracketing as well as in shooting_set_av96_direct with an ifdef just for sx220hs

This looks like it will get called 2x in the bracketing case. I'm wondering if all the cameras couldn't just do it in the shooting_set_av96_direct ? Or is this really only needed for bracketing (not script overrides) on the SX30 and G12 ?

Quote
I also removed AFScan from the port to keep the gui.c in the original state.
Some platform specific ifdefs are OK where they are really needed. I just don't want to add a bunch for cosmetic stuff like the games. Feel free to post patches against the trunk for any adjustments that are needed.

Regarding the modemap, I'd rather have new enum values for anything that doesn't correspond directly to an existing ones. Also, mode_is_video should be updated for any new video mode values.

Modemap update for G12 & SX30 (thx reyalp for the pointers to the firmware table).
- Added new modes for 'wink self timer' and 'face self timer'.
- Updated comments
- table order matches firmware (cosmetic change so I can compare them).
Added, changeset 1231
« Last Edit: 10 / July / 2011, 02:19:51 by reyalp »
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Note, if the new generation finsig could find the canon modelist, that would be handy :)

Added validation of the contents of 'modemap' from shooting.c in the latest version (http://chdk.setepontos.com/index.php?topic=6560.0).

I checked across all the current modemap tables and it looks like the mode name / numbers aren't consistent - the same number can be used for different modes on different cameras.

The new code looks for modes in the firmware that aren't in the 'modemap' table, and for entries from 'modemap' that aren't in the firmware mode list. You'll still need to work out the mode names manually on each camera; but this should help identify gaps / errors in the current ports.

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 whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Hi phil,

Re: #359, space_optimization.patch

Works great on ixus570_sd880 (100a) and S95 (100h); tested with r1232 / GCC 451
DISKBOOT.BIN size reduction for both cams ~ 8.1 kB.

thanks,

wim

« Last Edit: 10 / July / 2011, 06:16:42 by whim »

*

Offline philmoz

  • *****
  • 3450
    • Photos
Hi phil,

Re: #359, space_optimization.patch

Works great on ixus570_sd880 (100a) and S95 (100h); tested with r1232 / GCC 451
DISKBOOT.BIN size reduction for both cams ~ 8.1 kB.

thanks,

wim



Thanks wim,

You might want to also look at my new stubs/address finder (http://chdk.setepontos.com/index.php?topic=6560.0).
I noticed the latest version identifies a few problems with the modemap table (shooting.c) for the S95.
It also finds the addresses for strrchr, rand and srand so you could remove the S95 custom versions of these.

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

  • ******
  • 14082
Beta version for A1100 firmware 1.00c.

Converted from CHDKDE version.
Fixed stub addresses, updated values in platform_camera.h etc.
Tested by blackhole (http://chdk.setepontos.com/index.php?topic=4727.msg69830#msg69830).

Note: manual booting (via firmware update) is not working, although I think I have the correct FI2 values. I don't have this camera to do more in depth testing of this feature.
Added changeset 1233. I've disabled FI2 generation in makefile.inc, so that people who download the autobuild won't get a non-working FI2.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14082
Hi phil,

Re: #359, space_optimization.patch

Works great on ixus570_sd880 (100a) and S95 (100h); tested with r1232 / GCC 451
DISKBOOT.BIN size reduction for both cams ~ 8.1 kB.
Have either of you tested this with non-default languages ?

Regarding the patch:
1) As I've mentioned before, I'd rather have the pieces in separate patches. I know it's all reducing memory usage, but the lang, conf and miscellaneous gui drawing changes seem like are distinct, independent changes. Multiple, simpler patches lets me apply the ones I think are obviously safe, while taking more time on anything I have questions about.

2) It looks to me like all the lang strings are accessed from uncached memory. This doesn't seem like a good thing -- I guess it was this way before though.

3) It looks like there some unrelated changes snuck in: Palette for a1100 in gui_draw.h, removing defined (CAMERA_sx30) from an ifdef in gui.c.

In fact I don't understand what's going on with the bitmap palette, a1100 camera.h uses 2, while sx220hs already defined 9 (differently from a1100)

Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos

Hi phil,

Re: #359, space_optimization.patch

Works great on ixus570_sd880 (100a) and S95 (100h); tested with r1232 / GCC 451
DISKBOOT.BIN size reduction for both cams ~ 8.1 kB.
Have either of you tested this with non-default languages ?

Regarding the patch:
1) As I've mentioned before, I'd rather have the pieces in separate patches. I know it's all reducing memory usage, but the lang, conf and miscellaneous gui drawing changes seem like are distinct, independent changes. Multiple, simpler patches lets me apply the ones I think are obviously safe, while taking more time on anything I have questions about.

2) It looks to me like all the lang strings are accessed from uncached memory. This doesn't seem like a good thing -- I guess it was this way before though.

3) It looks like there some unrelated changes snuck in: Palette for a1100 in gui_draw.h, removing defined (CAMERA_sx30) from an ifdef in gui.c.

In fact I don't understand what's going on with the bitmap palette, a1100 camera.h uses 2, while sx220hs already defined 9 (differently from a1100)



Hi reyalp, I'll split it up into smaller pieces tonight and re-post. Some of the changes are dependent on the new functions in gui_draw.c & gui_draw.h and I didn't want to create a broken patch by missing something.

The changes should not affect non-default languages; but I did test by switching to other languages and doing comparisons of some of the menu display before and after. I did not see any issues.

The uncached memory was what the language code was using so I didn't change it.

The palette numbering was a mistake - I'm working on the A1100 which initially used palette 2; but in fact needs a new one. I changed it to 9 and was waiting till the A1100 beta got added to the build before posting a patch; but the sx220 got in first :) This should not have been included in the patch.

The change to gui.c was to remove an un-necessary check for CAMERA_s30 - I thought I'd already done this in a previous patch, sorry.

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 whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95


*

Offline reyalp

  • ******
  • 14082
Hi reyalp, I'll split it up into smaller pieces tonight and re-post. Some of the changes are dependent on the new functions in gui_draw.c & gui_draw.h and I didn't want to create a broken patch by missing something.
No need, I think I can apply this one as is with your clarifications below. More of a reminder for a the future. I understand SVN doesn't make this particularly easy...

My problem is that I feel like I'm barely keeping up with the patches and still not really giving them an adequate level of code review and testing. Anything that can streamline the process is appreciated.

Quote
The uncached memory was what the language code was using so I didn't change it.
Fair enough :)

Quote
The palette numbering was a mistake - I'm working on the A1100 which initially used palette 2; but in fact needs a new one. I changed it to 9 and was waiting till the A1100 beta got added to the build before posting a patch; but the sx220 got in first :) This should not have been included in the patch.

The change to gui.c was to remove an un-necessary check for CAMERA_s30 - I thought I'd already done this in a previous patch, sorry.
Thanks for clearing that up.
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos

I understand SVN doesn't make this particularly easy...


Time to switch to Mercurial  :D
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