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

EOS M3 porting

  • 696 Replies
  • 278881 Views
*

Offline Ant

  • ****
  • 490
Re: EOS M3 porting
« Reply #670 on: 24 / April / 2021, 07:55:08 »
Advertisements
Didn't you need a firmware dump for the port?

Obviously no need. But I will not publish a firmware dump from my camera.

*

Offline c_joerg

  • *****
  • 1102
Re: EOS M3 porting
« Reply #671 on: 24 / April / 2021, 09:38:40 »
But I will not publish a firmware dump from my camera.
I wasn't aware that anything in the dump pointed to my camera (except maybe the serial number)
Can you go back to 101a?
If no one else does it then I can try it at the beginning of May.
M100 100a, M3 101a, 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

*

Offline Ant

  • ****
  • 490
Re: EOS M3 porting
« Reply #672 on: 24 / April / 2021, 10:18:45 »
Can you go back to 101a?

yes

121a port is based on 120f. If that port works without problems, this one should also.
I just used the modern finsig_thumb2 tool.
I did not check RAM addresses. Addresses in ROM were shifted by 12 - 48 bytes

*

Offline c_joerg

  • *****
  • 1102
Re: EOS M3 porting
« Reply #673 on: 29 / April / 2021, 13:17:30 »
I made update to 121a.
I haven't noticed any abnormalities so far.
Have to change some of my scripts.
 
Interval Script with power down
https://chdk.setepontos.com/index.php?topic=13956.0
Looks like I can use same address as for the others firmware versions
Code: [Select]
      if cam_ver=="101a" or cam_ver=="120f" or cam_ver=="121a" then
            func=0xFC0F824F
        end

Whats about upper and lower focus_distace?
https://chdk.setepontos.com/index.php?topic=13756.0
Code: [Select]
function get_focus_distace_upper()
  if (bi.platform=="m3") and (bi.platsub=="101a") then
    x=peek(0x00244916, 2)
  end

function get_focus_distace_lower()
  if (bi.platform=="m3") and (bi.platsub=="101a") then
    x=peek(0x00244918, 2)
  elseif (bi.platform=="m3") and (bi.platsub=="120f") then
    x=peek(0x0024495C, 2)
  end
M100 100a, M3 101a, 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


*

Offline Ant

  • ****
  • 490
Re: EOS M3 porting
« Reply #674 on: 29 / April / 2021, 13:47:43 »
Whats about upper and lower focus_distace?
https://chdk.setepontos.com/index.php?topic=13756.0
Code: [Select]
function get_focus_distace_upper()
  if (bi.platform=="m3") and (bi.platsub=="101a") then
    x=peek(0x00244916, 2)
  end

function get_focus_distace_lower()
  if (bi.platform=="m3") and (bi.platsub=="101a") then
    x=peek(0x00244918, 2)
  elseif (bi.platform=="m3") and (bi.platsub=="120f") then
    x=peek(0x0024495C, 2)
  end

I can't check now because I already flashed 101a firmware.
But looking into RAM and ROM dumps I think that these addresses in RAM are the same for 120f and 121a.
« Last Edit: 29 / April / 2021, 13:50:19 by Ant »

*

Offline c_joerg

  • *****
  • 1102
Re: EOS M3 porting
« Reply #675 on: 29 / April / 2021, 14:22:30 »
But looking into RAM and ROM dumps I think that these addresses in RAM are the same for 120f and 121a.

Looks like...
M100 100a, M3 101a, 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

*

Online reyalp

  • ******
  • 13290
Re: EOS M3 porting
« Reply #676 on: 29 / April / 2021, 16:40:13 »
Couple things I noticed adding the 121a port:

The platform/shooting.c modemap appears to be a copy/paste of G7X. If someone can go through and get the actual modes present on this camera, that would be appreciated.

The procedure is just set each available shooting mode in the canon UI, and note the PROPCASE_SHOOTING_MODE (53) value. You can use the debug menu propcase display. This will allow scripting to correct get and set modes by name, among other things.

Also, boot.c contains contains this thing
Code: [Select]
void CreateTask_spytask()
{
if ( *(int*)(0x9e78) & 0x00600000 ) 
{
if (( *(int*)(0xD20BF4A0) & 0x00002000) == 0) _CreateTask("SpyTaskMY", 0x19, 0x2000, spytask_my, 0);
_CreateTask("SpyTask", 0x19, 0x2000, spytask, 0);
}
}

It appears to only start spytask if the *(int*)(0x9e78) & 0x00600000 condition is true, and appears to have some special shortcut to generate a romlog.

Starting spytask conditionally seems incorrect. CHDK running with all the other hooks but not spytask will be broken in unpredictable ways.

If this is required for some reason, some explanation would be very welcome. If it's a development leftover, it should removed. M10 does not have similar code.

The romlog dump shortcut seems like development thing that should be #if 0'd for normal builds, but if for some reason it is kept, it should be documented.

Thanks
Don't forget what the H stands for.

*

Offline Ant

  • ****
  • 490
Re: EOS M3 porting
« Reply #677 on: 29 / April / 2021, 17:25:17 »
It appears to only start spytask if the *(int*)(0x9e78) & 0x00600000 condition is true
The camera can also wake up briefly after closing the battery cover or after attaching / removing the lens.  In this case we don't need start CHDK.


Quote
development thing that should be #if 0
Maybe there is a special condition for autobuild server?


*

Online reyalp

  • ******
  • 13290
Re: EOS M3 porting
« Reply #678 on: 29 / April / 2021, 17:33:12 »
The camera can also wake up briefly after closing the battery cover or after attaching / removing the lens.  In this case we don't need start CHDK.
Does starting spytask (CHDK is started regardless) cause some problem in these cases? If so, useful to document.
Quote
Quote
development thing that should be #if 0
Maybe there is a special condition for autobuild server?
No, there isn't, and IMHO, shouldn't be. But if you want to put it under #ifdef BOOT_ROMLOG_SHORTCUT or something and set it in your own localbuildconf, that's fine with me.
« Last Edit: 29 / April / 2021, 18:23:41 by reyalp »
Don't forget what the H stands for.

*

Offline Ant

  • ****
  • 490
Re: EOS M3 porting
« Reply #679 on: 29 / April / 2021, 18:09:43 »
Does starting spytask (CHDK is started regardless) cause some problem in these cases?

Yes. The spytask causes "ASSERT!! KerSem.c Line 312"

 

Related Topics