EOS M3 porting - page 58 - DryOS Development - CHDK Forum supplierdeeply

EOS M3 porting

  • 618 Replies
  • 222680 Views
Re: EOS M3 porting
« Reply #570 on: 17 / July / 2019, 16:40:11 »
Advertisements
I was getting somewhere testing what explicit sleep I needed, then trouble.

I got a memory card error message, no code number.

Tried three different cards, ie camera is the problem :-(

So further testing on hold until I get the camera replaced, ie just purchased it!
« Last Edit: 17 / July / 2019, 16:46:10 by pigeonhill »

*

Offline reyalp

  • ******
  • 12441
Re: EOS M3 porting
« Reply #571 on: 17 / July / 2019, 16:56:29 »
I got a memory card error message, no code number.

Tried three different cards, ie camera is the problem :-(
Did you try cards without CHDK? (Guessing yes, but just in case)
Don't forget what the H stands for.

Re: EOS M3 porting
« Reply #572 on: 17 / July / 2019, 17:01:32 »
Yep :-(

Re: EOS M3 porting
« Reply #573 on: 17 / July / 2019, 17:25:38 »
@c_joerg

Can only think about things until I get my camera replaced, but clearly we need a way to know that upper and lower have been updated after a move call, even when they don't change in actual value, i.e. new value = old value.

Until these are updated and can be accessed to make decisions, the script needs to pause.

I don't like putting a dumb or explicit sleep.

I wonder if there is a way to check this in the backend?

What do you think?


Re: EOS M3 porting
« Reply #574 on: 18 / July / 2019, 04:44:14 »
I don't like putting a dumb or explicit sleep.

I wonder if there is a way to check this in the backend?

What do you think?

It definitely makes sense. But I have no idea if that works. I would look for EFLensCom in this list. Maybe you will find something useful.

https://app.assembla.com/spaces/chdk/subversion/source/HEAD/trunk/platform/m3/sub/120f/funcs_by_name.csv
M100 100a, M3 101a, 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

Re: EOS M3 porting
« Reply #575 on: 18 / July / 2019, 13:11:26 »
@c_joerg

Thanks for the pointer to that page.

As soon as I get a replacement cam I'll start exploring.

There are a few interesting looking hooks, eg:
Code: [Select]
0xfc43e2cf,EFLensCom.DistanceInfo
I assume I just use as:

Code: [Select]
call_event_proc("EEFLensCom.DistanceInfo")

*

Offline reyalp

  • ******
  • 12441
Re: EOS M3 porting
« Reply #576 on: 18 / July / 2019, 16:16:26 »
There are a few interesting looking hooks, eg:
Code: [Select]
0xfc43e2cf,EFLensCom.DistanceInfo
I assume I just use as:

Code: [Select]
call_event_proc("EEFLensCom.DistanceInfo")
From the disassembly, it looks like that prints the info (almost certainly to the camera stdout, which could be captured with UART redirection https://chdk.fandom.com/wiki/Debugging#UART_redirection_.28DryOS.29) so probably not directly useful, but the underlying functions and data structures might be.
It references the strings
Code: [Select]
"\nSubject Distance Near = %ld cm"
"Subject Distance Far  = %ld cm\n"
"Defocus Near = %ld mm\n"
"Defocus Far  = %ld mm\n"
Preceding calls (to fc43cd96 and fc2f2c0e in firmware 101a) appear to get the data those values are derived from.
Don't forget what the H stands for.

Re: EOS M3 porting
« Reply #577 on: 18 / July / 2019, 16:45:36 »
@reyalp

Once again thanks for the insight.
Without a cam at the moment :-(
Also I'm a little lost between looking at the list at https://app.assembla.com/spaces/chdk/subversion/source/HEAD/trunk/platform/m3/sub/120f/funcs_by_name.csv
and not seeing references to fc43cd96 and fc2f2c0.
Just my ignorance.
 


*

Offline reyalp

  • ******
  • 12441
Re: EOS M3 porting
« Reply #578 on: 18 / July / 2019, 17:57:14 »
Also I'm a little lost between looking at the list at https://app.assembla.com/spaces/chdk/subversion/source/HEAD/trunk/platform/m3/sub/120f/funcs_by_name.csv
and not seeing references to fc43cd96 and fc2f2c0.
Just my ignorance.
The funcs_by_name.csv only contains functions recognized by the sig finder.

The functions I mentioned are called by EFLensCom.DistanceInfo, identified by looking at the disassembly of that function (which you could get using capdis or ghidra). Also, as mentioned the addresses I posted are for firmware 101A because that's the one I happened to have a fully disassembly of handy for.

To use them, you'd need to analyze the disassembly of EFLensCom.DistanceInfo to understand how the values you are interested in are returned. It looks like the first one returns a pointer to a structure, and the following call and code does some stuff with it...
Don't forget what the H stands for.

Re: EOS M3 porting
« Reply #579 on: 19 / July / 2019, 02:07:27 »
@reyalp

Understand...I think  ;)

Getting into disassembly land may be a little beyond me at the moment, ie I feel comfortable with Lua scripting.

I guess, if I knew the addresses and structures, I could access the values in Lua by peeking, eg
Code: [Select]
x=peek(0xfc43cd96, 2)
Maybe in time I'll be able to do this.

 

Related Topics