EOS M3 porting - page 55 - DryOS Development - CHDK Forum

EOS M3 porting

  • 726 Replies
  • 342192 Views
Re: EOS M3 porting
« Reply #540 on: 14 / July / 2019, 10:08:47 »
Advertisements
@c_joerg

Great info.

No more questions until I get my camera and start playing with it ;-)

Now back to Wimbledon :-)

Cheers

Garry

Re: EOS M3 porting
« Reply #541 on: 14 / July / 2019, 10:45:56 »
@reyalp

Trying to get up to speed with using event procs on my soon to arrive M3.

This post, https://chdk.fandom.com/wiki/User:ReyalP/EventProcNotes, gives an idea of what should be possible, but where do I find the info about the call’s name, eg what does MoveFocusToFarRelative actually do and how do I use it in Lua.

Obviously, I appreciate that this kind of info might not be available, and if that is the case, then my next best ask is to look at others’ scripts that exploit event procs.

As usual I welcome any hints/insight/ knowledge you may have.

Cheers

Garry
« Last Edit: 14 / July / 2019, 10:55:05 by pigeonhill »

*

Offline reyalp

  • ******
  • 13880
Re: EOS M3 porting
« Reply #542 on: 14 / July / 2019, 15:43:38 »
@reyalp

This post, https://chdk.fandom.com/wiki/User:ReyalP/EventProcNotes, gives an idea of what should be possible, but where do I find the info about the call’s name, eg what does MoveFocusToFarRelative actually do and how do I use it in Lua.

Obviously, I appreciate that this kind of info might not be available, and if that is the case, then my next best ask is to look at others’ scripts that exploit event procs.
That's pretty much it. Unless someone else has already figured it out, to use an event proc you need to either reverse engineer from disassembly or experiment.

For the EOS M cameras, the lens / focus eventprocs are quite different from P&S. Many of the ones from the P&S exist, but are no-op in the EOS firmware i.e. just a return, return 0 etc.

You can find many of the eventprocs that exist in a port from the funcs_by_*.csv files like https://app.assembla.com/spaces/chdk/subversion/source/HEAD/trunk/platform/m3/sub/120f/funcs_by_name.csv

A few notes
* Not everything in there is an eventproc. Generally stuff with camel case names and ending in _FW is (don't include the _FW when using call_event_proc, it's a suffix the sig finders add so we can distinguish the firmware version of a function and one we call in CHDK)
* Functions that appear in stubs may be no-op as described above.
* Most of the eventprocs need to be registered by calling another event proc (e.g. System.Create gets you malloc, some file IO functions etc)
* Calling an unregistered eventproc returns -1. Registered eventprocs might ALSO return -1, but usually they return 0 on success or some specific value they are intended to get.
* The registration functions are often named like Foo.Create or FooRegister... or InitializeFoo...
* You can call functions directly using the address from the csv with call_func_ptr, but you must use the address for your specific firmware version, and for eventprocs, you may need to pass arguments by reference rather than value.
Don't forget what the H stands for.

Re: EOS M3 porting
« Reply #543 on: 14 / July / 2019, 16:46:45 »
@c_joerg

After reading your test script, and insight from @reyalp, I’ve got a good idea how I’ll convert my PowerShot landscape focus stacking script to the m3.

However, I’m still struggling to understand what the various calls do, ie MoveFocus vs FocusSearchNear etc.

If you find time, could you give me a hint at what each event proc call achieves in your script.

Cheers

Garry


*

Offline c_joerg

  • *****
  • 1240
Re: EOS M3 porting
« Reply #544 on: 14 / July / 2019, 17:16:09 »
However, I’m still struggling to understand what the various calls do, ie MoveFocus vs FocusSearchNear etc.
Move Focus shifts the focus from the current position.
FocusSearchNear goes to the minimum focus distance.
FocusSearchNear goes to infinity.
90% of the code is just logging stuff.
M100 100a, M3 121a, G9x II (1.00c), 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 #545 on: 14 / July / 2019, 17:40:42 »
@c_joerg

Thanks for the confirmation, I thought that was the case, but don't have my camera yet to experiment with.

Cheers

Garry

Re: EOS M3 porting
« Reply #546 on: 15 / July / 2019, 07:30:01 »
@anyone

My M3 is on its way :-)

I know I have to format for FAT32 (single partition) but I'm a little confused (through reading the web), what is the maximum card size I can use with my M3.

I have formatted a 64Gb card to FAT32 on my G7X, and all looks good.

Hopefully someone with 'the knowledge’ will educate me, ie the max card size I can use on my M3 ;-)

Cheers

Garry
« Last Edit: 15 / July / 2019, 07:45:32 by pigeonhill »

Re: EOS M3 porting
« Reply #547 on: 15 / July / 2019, 12:26:50 »
Camera arrived this afternoon  :D

First problem is, despite loading CHDK on my G1X and G7X, I can't seem to load it on my 'new' M3.

4Gb card, formatted to FAT32, low level format in camera, used EOSCard to make bootable, unlocked card placed in cam with 120 version on (as required), cam turned on with play, shutter pressed to turn fully on, menu to get to Firmware update, update message says "memory card containing firmware required.."

I must say, I think I've done all the right things, but prepared to be made to look like a fool, by someone in the know: as I'm clearly missing a trick.


*

Offline c_joerg

  • *****
  • 1240
Re: EOS M3 porting
« Reply #548 on: 15 / July / 2019, 14:10:09 »
4Gb card, formatted to FAT32, low level format in camera, used EOSCard to make bootable, unlocked card placed in cam with 120 version on (as required), cam turned on with play, shutter pressed to turn fully on, menu to get to Firmware update, update message says "memory card containing firmware required.."
The firmware update method does not work on M3. Only Bootable SD Card Method works. You have to lock your SD Card
https://chdk.fandom.com/wiki/Prepare_your_SD_card#Bootable_SD_Card_Method

M100 100a, M3 121a, G9x II (1.00c), 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 #549 on: 15 / July / 2019, 14:42:50 »
Duh!

Thanks, feel stupid.

Cheers

Garry

 

Related Topics