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

EOS M3 porting

  • 613 Replies
  • 200844 Views
Re: EOS M3 porting
« Reply #490 on: 30 / November / 2018, 01:00:47 »
Advertisements
Oh, thank you very much. And sorry for not reading the camnotes carefully.
But then it's clear to me why all attempts to get the bracketing scripts running was not successful.

I'm a software developer too but have (until now) not looked into the chdk code. I would like to support chdk. But I need to understand the structure, functionality and debugging facilities first.

PS: And I'm still willing to keep on my M3/M10 cams + lenses (and to preserve my EOS 5D IV) and not buying a Panasonic or Olympus M43 cam only to have the focus bracketing functionality.  :)
« Last Edit: 30 / November / 2018, 02:43:19 by darkest_star »
EOS M3 (120f), EOS M10 (110d), PS G1X Mark II

Re: EOS M3 porting
« Reply #491 on: 30 / November / 2018, 03:05:58 »
I would like to support chdk.

You could try to port the  G1X Mark II :)

My attempts to find a working focus control method have not been successful (I would not say it's impossible, it's just substantially different from PowerShots). I don't know if Ant has found something on the M3, but even if, it's not in the source.

What about this?

This command moves the focus 2500 steps forward with speed 10:
lua call_event_proc("EFLensCom.MoveFocus",2500,10)
https://chdk.setepontos.com/index.php?topic=12758.msg135783#msg135783

I always want to try this but never found really the time. Moving the focus would be probably enough to do focus bracketing.
M100 100a, M3 101a, 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), 2*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 #492 on: 30 / November / 2018, 03:28:30 »
You could try to port the  G1X Mark II :)
Yes, I know. This would be a great step ahead. But I'm really "fresh" with chdk. I need deep understanding of that what you brilliant guys have done. I will do some investigations in the current code base. I'm an embedded software developer. So, everything should be possible...  ;)
Is there a kind of "checklist" of what needs to be done for porting a "new" cam? Only for acceleration ...
But, I would also have a second "defective" G1X II where only the lens cover is (mechanically) defective. So, I would have a test object.  :D


This command moves the focus 2500 steps forward with speed 10:
lua call_event_proc("EFLensCom.MoveFocus",2500,10)
https://chdk.setepontos.com/index.php?topic=12758.msg135783#msg135783

I always want to try this but never found really the time. Moving the focus would be probably enough to do focus bracketing.
I will look at this. Thank you for that hint!
« Last Edit: 30 / November / 2018, 03:34:52 by darkest_star »
EOS M3 (120f), EOS M10 (110d), PS G1X Mark II

*

Offline reyalp

  • ******
  • 12075
Re: EOS M3 porting
« Reply #493 on: 01 / December / 2018, 00:38:07 »
You could try to port the  G1X Mark II :)
Yes, I know. This would be a great step ahead. But I'm really "fresh" with chdk. I need deep understanding of that what you brilliant guys have done. I will do some investigations in the current code base. I'm an embedded software developer. So, everything should be possible...  ;)
FWIW, G1x Mk2 should be a relatively easy Digic 6 port. It's been in my test set for finsig_thumb2 (https://chdk.setepontos.com/index.php?topic=12714.0 https://chdk.wikia.com/wiki/Finsig_thumb2) and it's the same dryos version (54p3) as the already ported SX700.

Quote
Is there a kind of "checklist" of what needs to be done for porting a "new" cam? Only for acceleration ...
Not really. Basically, copy an existing port and implement all the platform specific bits... go through every file in the loader/<camera> and platform/<camera>. Generate the inline assembly with capdis.

https://chdk.wikia.com/wiki/Adding_support_for_a_new_camera is pretty out of date, but the same general structure is still valid.

https://chdk.wikia.com/wiki/Digic_6_Porting has some useful resources for digic 6 and later.

If you want some realtime advice, I'm often in the irc channel #chdk on freenode evenings and weekends US/Pacific (GMT-8) time.

« Last Edit: 01 / December / 2018, 00:57:26 by reyalp »
Don't forget what the H stands for.


Re: EOS M3 porting
« Reply #494 on: 01 / December / 2018, 15:30:42 »
If you want some realtime advice, I'm often in the irc channel #chdk on freenode evenings and weekends US/Pacific (GMT-8) time.
Thank you very much! I will start to dig into the code in the next days ....
EOS M3 (120f), EOS M10 (110d), PS G1X Mark II

*

Offline reyalp

  • ******
  • 12075
Re: EOS M3 porting
« Reply #495 on: 01 / December / 2018, 17:34:30 »
Regarding event procs and focusing, you can find a list of known functions in a ports platform/<model>/sub/<fw version>/stubs_by_*.csv

Since Canon nicely leaves a lot of human-readable names around, this is often a useful starting point for testing or reverse engineering. E.g. the "EFLensCom" and "EFLensTool" functions are related to lens control on the EOS cameras.

It's a good idea to check the disassembly of a function to get and idea of what parameters are expected before calling it. Also, some functions aren't actually implemented in the canon firmware and just return 0.

If you call event procs by name, they may need to be registered first, see
https://chdk.wikia.com/wiki/Event_Procedure and https://chdk.wikia.com/wiki/Lua/Lua_Reference/Native_Function_Calls

You can call functions directly by address using call_func_ptr, but you may need change how parameters are passed (e.g. pass by reference instead of value) and the address has to be correct for your specific firmware version. On thumb2 (digic 6 and above) firmware, you also have to set the thumb bit correctly (LSB=1 for thumb code, 0 for ARM)
Don't forget what the H stands for.

Re: EOS M3 porting
« Reply #496 on: 02 / December / 2018, 17:05:53 »
I read in another post the M3 port allows for setting clean overlays during recording.  I have an M6 which has an option for no overlays except for the AF face-tracking rectangle. I'm trying to get clean HDMI out for off camera recording, preferably with the camera in standby vs recording mode.

Do you guys have any initial thoughts from your M3 experience if that AF rectangle can be visually removed while still having the AF face tracking functionality?  I just got the M6 firmware dump and am slowly starting to see how deep this rabbit hole goes before i jump in! 

*

Offline srsa_4c

  • ******
  • 3979
Re: EOS M3 porting
« Reply #497 on: 02 / December / 2018, 18:55:31 »
I read in another post the M3 port allows for setting clean overlays during recording.  I have an M6 which has an option for no overlays except for the AF face-tracking rectangle. I'm trying to get clean HDMI out for off camera recording, preferably with the camera in standby vs recording mode.

Do you guys have any initial thoughts from your M3 experience if that AF rectangle can be visually removed while still having the AF face tracking functionality?  I just got the M6 firmware dump and am slowly starting to see how deep this rabbit hole goes before i jump in! 
If you're lucky, the palette based approach might work even from a Canon Basic script (meaning you don't necessarily need a CHDK port for that camera if your only interest is cleaning the overlay).
The thread discussing the overlay hack is this: https://chdk.setepontos.com/index.php?topic=13489.0
If you have some programming experience, you can peek into the patch I posted there. The hack basically zeroes out the 256-entry palette used in rec mode (and restores it when needed). The palette (AFAIK) is not continuously updated by the firmware, so it's enough to clean it once.
For M6 with the 100b firmware, the addresses are
0x11d44, active_palette_buffer
0x11d4c, palette_buffer_ptr
Code examples for Canon Basic can be found in this thread.
General Canon Basic information is here and here.
If you have questions, please post in the clean overlays thread.


Re: EOS M3 porting
« Reply #498 on: 27 / December / 2018, 21:03:10 »
Hello can someone help me with a issue regarding a .diff file
 I have the EOS M3.   i got CHDK installed (120f)       now im trying to install this script that helps me clear the overlays on the camera so i can finally have CLEAN hdmi
 only problem is....idk how to install this .diff file
 is it a canon basic script?  if so how do i use canon basic ALONG with CHDK?? thats if its actually just some kind of canon basic script

Im so close to getting this to work .-.  only thing left is getting that stupid auto focusing square away and ill have usable live stream footage

*

Offline reyalp

  • ******
  • 12075
Re: EOS M3 porting
« Reply #499 on: 28 / December / 2018, 00:53:19 »
Hello can someone help me with a issue regarding a .diff file
 I have the EOS M3.   i got CHDK installed (120f)       now im trying to install this script that helps me clear the overlays on the camera so i can finally have CLEAN hdmi
 only problem is....idk how to install this .diff file
 is it a canon basic script?
Replied in: https://chdk.setepontos.com/index.php?topic=13489.10
Don't forget what the H stands for.

 

Related Topics