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

  • 1479 Replies
  • 180733 Views
*

Offline philmoz

  • *****
  • 2936
    • Photos
Advertisements
Code cleanup in ubasic.c and script.c
This looks like a nice memory saving (>1k in my build.)

How thoroughly has this been tested ? The short/int conversion concerns me slightly: for signed values the difference between casting and simply passing an int to a function that expects a short will be significant, even though they both use a full register. Most of the APEX96 values can legitimately be negative.

Good point - I didn't test every function; but tested quite a few.
Let me retest the APEX96 stuff and make sure negative values work as expected.

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)

*

Offline reyalp

  • ******
  • 10069
If it is an issue, you can probably make the shooting* functions take and int and do any required casting there. The lua side probably won't need any adjustment if the prototypes match what the function actually expects.
Don't forget what the H stands for.

IXUS120-SD940 :  Updates to the stub_entry_2.S files for all firmware versions and stubs_min.S for 1.00e firmware.  Thanks to philmoz for the use of his new gensig2 software.

Also corrected modemap[] in shooting.c based on testing with actual camera.


*

Offline reyalp

  • ******
  • 10069
IXUS120-SD940 :  Updates to the stub_entry_2.S files for all firmware versions and stubs_min.S for 1.00e firmware.  Thanks to philmoz for the use of his new gensig2 software.

Also corrected modemap[] in shooting.c based on testing with actual camera.
Added, chdk changeset 1216
Don't forget what the H stands for.


*

Offline philmoz

  • *****
  • 2936
    • Photos
If it is an issue, you can probably make the shooting* functions take and int and do any required casting there. The lua side probably won't need any adjustment if the prototypes match what the function actually expects.

Updated patch attached.
Added additional helper functions with correct signatures for the passed in function pointer.
Should avoid any casting / conversion issues.

Tested get_user_tv96 and set_user_tv96, and negative values handled correctly (both returned and as parameters).

Didn't want to change the shooting functions just yet - need to leave something to cleanup up for the next rainy winter weekend :)

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)

A495 firmware 1.00d, 1.00e, 1.00f

Updates to stubs_entry_2.S & stub_min.S for all versions.


IXUS200_SD980 fw 1.01C : fix for shooting_get_drive_mode() to allow bracketing with auto timer

Trivial but overdue small cleanup for core/kbd.c.  (been meaning to submit this for a while)


*

Offline reyalp

  • ******
  • 10069
IXUS200_SD980 fw 1.01C : fix for shooting_get_drive_mode() to allow bracketing with auto timer
added, chdk changeset 1217

Not that this also made the same change for a495. I'm guessing that needs it as well, so I've left it in.

A495 firmware 1.00d, 1.00e, 1.00f

Updates to stubs_entry_2.S & stub_min.S for all versions.
added, chdk changeset 1218
« Last Edit: 27 / June / 2011, 23:43:11 by reyalp »
Don't forget what the H stands for.

Note that this also made the same change for a495. I'm guessing that needs it as well, so I've left it in.
Thanks - it seemed like a low risk guess given that the A480 has the same change.  And sorry to say, its not like anyone has actually reported playing with that yet.  If we get a complaint,  we can change it back.


 

Related Topics