buf=call_event_proc("AllocateMemory",4)if buf > 0 then poke(buf,tv) --ret=call_event_proc("SetAE_ShutterSpeed",buf) ret=call_func_ptr(0xffe0b70c,buf) --SetAE_ShutterSpeed(&tv) on a570 100e print("AE_ShutterSpeed=" .. ret) call_event_proc("FreeMemory",buf)end
From what I gather, you'll need to "roll your own" CHDK to include the "native call" support, (required to run this LUA script). I'm not overly confident in doing this, I'd like to know if anyone else has compiled CHDK with "Native Call Support" for a Canon G7?
Tested on a Canon IXUS 100IS or SD780, (DIGIC 4 processor). - It seems the "native calls" need to be updated to work on DIGIC 4 based cameras
s ISO control has such a huge impact on video quality, it'd be great to see this incorporated in the main CHDK build...?
This one is no longer camera model dependent, but it's possible that it will still only work (without modification) on a some cameras from the same era (FYI, the a570 is a Digic III vxworks camera from year 2008 or so). To debug you may want to print + sleep after each call_event_proc command to see if they return -1, which for this script quite likely means the event procedure was not found (doesn't mean it doesn't exist, it may just be unregistered).
Line 95. if (call_event_proc("InitializeAdjustmentFunction") == -1) thenLine 96. error("InitializeAdjustmentFunction failed")Line 130. ret=call_event_proc("SetAE_ShutterSpeed",tv96)Line 154. ret=call_event_proc("MoveIrisToAv",av96)Line 177. ret=call_event_proc("SetCDSGain",sv96)Are we to assume these particular event procedures have yet to be "enabled" or "mapped out" on the newer Digic4 cameras? How to move forward? - Is there something a non-dev, such as myself, could investigate?
if (call_event_proc("InitializeAdjustmentFunction") == -1) then error("InitializeAdjustmentFunction failed")end
bi=get_buildinfo()print("platform: ",bi.platform," ",bi.platsub)if bi.platform~="ixus100_sd780" then error("wrong camera model")elseif bi.platsub~="100c" then error("wrong firmware version")endret=call_func_ptr(0xff91d4fc) print("InitAdjFunc=",ret)