A4000IS porting thread - page 18 - DryOS Development - CHDK Forum supplierdeeply

A4000IS porting thread

  • 205 Replies
  • 58188 Views
Re: A4000IS porting thread
« Reply #170 on: 14 / July / 2013, 16:26:32 »
Advertisements
There's another method to try... the event procedure method. CHDK uses MoveFocusLensToDistance to set focus.

The following 2 calls are only needed once:
Code: [Select]
call_event_proc("FA.Create")
call_event_proc("InitializeAdjustmentFunction")
After these are executed, MoveFocusLensToDistance becomes available, and can be used like
Code: [Select]
call_event_proc("MoveFocusLensToDistance", <distance>)where <distance> is a 32bit integer. Since this is a Canon function, it has immediate effect. Calling it only makes sense in AF lock.

The call_event_proc() function is only available when "Lua native calls" are enabled in the Misc. menu (CHDK 1.2).

I finally got back to this, and it more or less works!  I lock the autofocus, call MoveFocusLensToDistance, and can then shoot without crashing the camera.  There is some weirdness with the actual values (get_focus() returns some value about 40 or 50 mm below what was passed to the function), but that's okay.  I can experimentally figure out what passed in value gives the best focus in my rig, and I can consistently use it after that.  Thanks!

*

Offline nafraf

  • *****
  • 1308
Re: A4000IS porting thread
« Reply #171 on: 06 / October / 2013, 08:28:56 »
A4000 100d firmware dump by alonsoac: https://www.box.com/shared/jco60ocuna353t5tditg

*

Offline srsa_4c

  • ******
  • 4447
Re: A4000IS porting thread
« Reply #172 on: 06 / October / 2013, 09:30:10 »
A4000 100d firmware dump by alonsoac: https://www.box.com/shared/jco60ocuna353t5tditg
Elph320, but the diagnosis is correct ;)

*

Offline nafraf

  • *****
  • 1308
Re: A4000IS porting thread
« Reply #173 on: 06 / October / 2013, 09:42:19 »
A4000 100d firmware dump by alonsoac: https://www.box.com/shared/jco60ocuna353t5tditg
Elph320, but the diagnosis is correct ;)
:-[ Sorry. elph320 101a works on 100d.  I have to fix that in camera_list.csv. 


Re: A4000IS porting thread
« Reply #174 on: 15 / October / 2013, 04:32:02 »
On exception: If the camera has an MF mode, set_focus() should take immediate effect.
That's good to know.  I'll try using my sucky method for setting the focus, but if it get's too frustrating, I'll buy a couple of cameras with support for manual focusing.  The SX150/160 are pretty cheap these days.

I finally got back to this, and it more or less works!  I lock the autofocus, call MoveFocusLensToDistance, and can then shoot without crashing the camera.  There is some weirdness with the actual values (get_focus() returns some value about 40 or 50 mm below what was passed to the function), but that's okay.  I can experimentally figure out what passed in value gives the best focus in my rig, and I can consistently use it after that.  Thanks!

Hi rkomar.

Now that CHDK usbremote and CHDKPTP seem to be able to co-exist [http://chdk.setepontos.com/index.php?topic=8769.msg105488#msg105488]  i'm interested in investigating a multi-cam setup.

Based on reyalp's most interesting wifi investigations my initial purchase decision is torn between [2 of] a wifi enabled model and [2 of] 'something else'.

Anyway, based on your A4000 IS focus 'challenges' - might you have chosen a couple of SX150/160 [rather than A4000 IS] to begin your investigations ? - i'd be interested in your opinion.

Re: A4000IS porting thread
« Reply #175 on: 15 / October / 2013, 07:55:11 »
Now that CHDK usbremote and CHDKPTP seem to be able to co-exist [http://chdk.setepontos.com/index.php?topic=8769.msg105488#msg105488]  i'm interested in investigating a multi-cam setup.
That link points to a simple hack that lets them co-exist. It's not part of the official CHDK release and requires rebuilding CHDK from source code to use it.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: A4000IS porting thread
« Reply #176 on: 16 / October / 2013, 03:09:07 »
Based on reyalp's most interesting wifi investigations my initial purchase decision is torn between [2 of] a wifi enabled model and [2 of] 'something else'.

Anyway, based on your A4000 IS focus 'challenges' - might you have chosen a couple of SX150/160 [rather than A4000 IS] to begin your investigations ? - i'd be interested in your opinion.

This was my first foray into digital photography with CHDK, so I thought I'd buy some cheap cameras to fool around with in case it turned out that I couldn't make it work (it being a setup to photograph LP record covers and then later books).  The A4000 seemed to be good value for the price ($110 CDN on sale), so I bought a couple, half expecting that I would need to upgrade to better cameras later.  It took a lot of learning and tinkering before I was able to use them to consistently produce images that, while not perfect, are good enough for my needs.  I think a camera with manual focus like the SX150 would have saved me some time and effort, since I didn't understand that I couldn't just set the focus and lock it on the A4000 as I expected, and I took and retook a lot of slightly blurry pictures.  However, now I and everyone else who reads this thread knows how to set the focus, and that problem is solved.  So, I'm not sure what answer I should give to your question.  I can say that I don't regret buying the A4000 cameras to start with.

Re: A4000IS porting thread
« Reply #177 on: 16 / October / 2013, 07:22:41 »
Thanks for your excellent reply rkomar.

I'm trying to short-circuit the investigative process [a little] from the prior experience of others.

Although I shouldn't really have needed your second affirmation [that a focus method exists] seeing it again, at this purchase decision stage, is reassuring.

I'm also forming a view that it may be 'safer' to identify a 'short-list' of purchase candidates based on whether the port was undertaken by someone with a lot of experience / 'guru' status - the reasonably 'clean base' approach [I'm not sure of my technical abilities to necessarily identify problems, never mind 'fix' them  ???].

Then again, rolling the sleeves up and getting really dirty can sometimes, ultimately, be least painful...deisions decisions. 

There's one thing for sure - there's no need to be bored. You could probably spend a few years reading this forum. Just finished '[S90] CHDKPTP - PC Remote Control Performance Analysis' http://chdk.setepontos.com/index.php?topic=8613.0 last night. Haven't read anything so compelling in the last 20 years, veritable 'War & Peace'.

 


Re: A4000IS porting thread
« Reply #178 on: 24 / October / 2013, 21:11:20 »
How many raw framebuffers does the A4000IS have? If it's more than one, how do I get the addresses and ensure that the camera doesn't overwrite the one I'm using while it captures a raw (into another buffer)?

I have some evil stuff I'm trying to do on raw images, but I need to have at least two resident in memory at the same time in order to get reasonable performance.  I don't have a problem directly using the packed pixel data format (or fitting the data in that space).

*

Offline philmoz

  • *****
  • 3407
    • Photos
Re: A4000IS porting thread
« Reply #179 on: 24 / October / 2013, 21:33:33 »
How many raw framebuffers does the A4000IS have? If it's more than one, how do I get the addresses and ensure that the camera doesn't overwrite the one I'm using while it captures a raw (into another buffer)?

I have some evil stuff I'm trying to do on raw images, but I need to have at least two resident in memory at the same time in order to get reasonable performance.  I don't have a problem directly using the packed pixel data format (or fitting the data in that space).

Only one raw buffer.

The camera is 16 megapixel so a raw image requires 24MB of memory.
There is only 64MB of RAM in the camera, and once you take out all the memory needed by the firmware, it's unlikely there would be enough left for another raw buffer.

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