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

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

  • 1679 Replies
  • 788116 Views
*

Offline funnel

  • ****
  • 349
Advertisements
No problem. I think I fixed it now. So, I removed the changes in the games and fixed the Makefile, I hope. I also removed AFScan from the port to keep the gui.c in the original state. I also removed the useless comment in sx220hs/shooting.c (the mode list is not copy/pasted), I also added some new modes to modelist.h.


*

Offline philmoz

  • *****
  • 3450
    • Photos
Minor patch - modemap update for SX30.

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
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.

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
Minor patch - modemap update for SX30.
Added, changeset 1227

Note, if the new generation finsig could find the canon modelist, that would be handy :)
Don't forget what the H stands for.


*

Offline philmoz

  • *****
  • 3450
    • Photos
Minor patch - modemap update for SX30.
Added, changeset 1227

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

Thanks, any pointers on how to find the modelist. I took a look; but haven't found anything so far.

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
Minor patch - modemap update for SX30.
Added, changeset 1227

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

Thanks, any pointers on how to find the modelist. I took a look; but haven't found anything so far.
I find it starting with "AC:PTM_Init" and several layers of function calls. You can see this easily by going to one of the known table addresses (commented in many cameras modemaps), finding the function that references it and working backwards. Might be hard to automate unless you can match one of the deeper calls.

You might be able to find or sanity check it by looking for common mode values together as 16 bit ints.
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Minor patch - modemap update for SX30.
Added, changeset 1227

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

Thanks, any pointers on how to find the modelist. I took a look; but haven't found anything so far.
I find it starting with "AC:PTM_Init" and several layers of function calls. You can see this easily by going to one of the known table addresses (commented in many cameras modemaps), finding the function that references it and working backwards. Might be hard to automate unless you can match one of the deeper calls.

You might be able to find or sanity check it by looking for common mode values together as 16 bit ints.

Thanks, I may be able to find that table ok; but do the mode numbers always mean the same thing for all cameras?
I thought they changed between cameras which is why the modemap table is needed (I read another thread which seemed to imply they were different)?

There's some values in the tables for G12 and SX30 - 8240 & 8241. Can't seem to find what these modes are for - they don't seem to be defined in any camera modemap table in CHDK. Have you come across these before?

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
Thanks, I may be able to find that table ok; but do the mode numbers always mean the same thing for all cameras?
For recent cameras (everything but some very early vxworks ones like s2is) the number for common modes like P, M, Tv etc seem to be the same. Note that the "manual" mode of cameras without a true manual use the "P" mode number. I'm not sure if all the scene / special modes are the same, or whether the values get re-used for different things on different cameras.
Quote
I thought they changed between cameras which is why the modemap table is needed (I read another thread which seemed to imply they were different)?
Aside from the old cameras mentioned above, the modemap predates the discovery of the table. The table is useful for verifying that all the canon modes are accounted for.
Quote
There's some values in the tables for G12 and SX30 - 8240 & 8241. Can't seem to find what these modes are for - they don't seem to be defined in any camera modemap table in CHDK. Have you come across these before?
I think these correspond to C1 and C2, but these values aren't returned by the propcase we use for shooting mode. They are available in a different propcase if used.

Thread that covers most of this is http://chdk.setepontos.com/index.php?topic=3228.0
Don't forget what the H stands for.


*

Offline philmoz

  • *****
  • 3450
    • Photos
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).

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
Patch to reduce size of compiled CHDK - saves approx 8.6K (on G12 & SX30).

- changed some struct values from int to short (conf.c, gui_menu.h, platform.h)
- gui code cleanup plus some helper functions in gui_draw
- changed palette display under Miscellaneous stuff menu to use the same UI as the color picker in Visual settings (better and consistent UI, plus removes a chunk of code)
- packed version of font_8x16_uni.h default font, plus new tool to create packed version (this is done during the build so if changes are need to the font they can be done in font_8x16_uni.h).
- Change 'strings' pointer table in lang.c to an offset table (halves table size).
- Changes lang.c to use one buffer for the strings instead of allocating a new buffer for each string,

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)

 

Related Topics