CHDK Forum

CHDK Development => General Discussion and Assistance => Firmware Dumping => Topic started by: c_joerg on 19 / February / 2019, 13:00:34

Title: Canon EOS M100 firmware dump
Post by: c_joerg on 19 / February / 2019, 13:00:34
I just got an M100. The camera is now available including EF-M 15-45mm for less than 250€. I just could not say no ...  :)
The dual pixel autofocus is really fantastic. I have never had such a fast autofocus. The functionality of the camera is very limited. There is not even a exposure series function. The camera would really win by CHDK. I am not sure if I should keep it…

I have first done a firmware dump. I took an older extend.m for it which I already used with my G1X.
https://drive.google.com/open?id=1yOjTvYthPinBR9yeXyjXfRc63mPG90-V

But I always have problems with it when I make a dump. Even with the G1x it does not always work. Sometimes a clock comes or it does nothing happens. Is there a specific timing when using the set button?
Title: Re: Canon EOS M100 firmware dump
Post by: srsa_4c on 19 / February / 2019, 18:02:49
I have first done a firmware dump.
//   DRYOS R59 (DRYOS version 2.3, release #0059+p4)
//   Firmware Ver GM1.00A   // Found @ 0xe047b5a4, "GM1.00A" @ 0xe047b5b1

If you have time, can you retry with the "Improved universal dumper" script from here (http://chdk.wikia.com/wiki/Canon_Basic/Scripts/Dumper)? Don't need to post the dump again, I'm only interested to know if it's running and whether you see the script messages on screen.
Quote
Is there a specific timing when using the set button?
If a prepared card (complete with the script installed) works once in a camera, it should in theory always work.
The older dumper scripts (such as the one at the top of this (http://chdk.wikia.com/wiki/Canon_Basic/Scripts/Dumper) page) can misbehave (they reportedly crash some D7 cams and can have problems with the visibility of messages on others).
Title: Re: Canon EOS M100 firmware dump
Post by: c_joerg on 20 / February / 2019, 11:59:46
If you have time, can you retry with the "Improved universal dumper" script from?
Yes, I got a dump.

I'm only interested to know if it's running and whether you see the script messages on screen.
I don’t see any message on screen while dumping. I did not even notice that a dump is done.

But when I switch to record mode, I see a ‘done’ on the screen. But the message is only there when I use a EFM Lens which is locked. When I solve the lock, the message is gone. When I lock the lens again, then the message is back.

But again, I got only a dump after third attempt. There must be a special timing between camera on in playback mode and pressing set.

Title: Re: Canon EOS M100 firmware dump
Post by: srsa_4c on 20 / February / 2019, 19:15:44
I don’t see any message on screen while dumping. I did not even notice that a dump is done.

But when I switch to record mode, I see a ‘done’ on the screen. But the message is only there when I use a EFM Lens which is locked. When I solve the lock, the message is gone. When I lock the lens again, then the message is back.
Yeah, there are multiple issues with the method used to display messages. One is that the color(s) used by that text seem to be different on every camera model. The other is that this text disappears when certain Canon screens are shown. For example, on the m10, the text becomes invisible when the Canon menu is active. In your case, the lens related message either "uncovers" the script message or it alters the palette.
Quote
But again, I got only a dump after third attempt. There must be a special timing between camera on in playback mode and pressing set.
What do you mean by "attempt"? Do you need to press SET three times or you need to (re)start the camera multiple times before the camera is willing to start the script? Have you experienced any crashes (camera switching off after script starts)?
Title: Re: Canon EOS M100 firmware dump
Post by: c_joerg on 20 / February / 2019, 23:32:41
Do you need to press SET three times
No
or you need to (re)start the camera multiple times before the camera is willing to start the script?
Yes,
but not only with the M100. I had this also with my G1x.
Have you experienced any crashes (camera switching off after script starts)?
No crashes at all. Simple dumps were not made…
But basically, it works with the dump…
Title: Re: Canon EOS M100 firmware dump
Post by: srsa_4c on 22 / February / 2019, 17:01:58
Do you need to press SET three times
No
or you need to (re)start the camera multiple times before the camera is willing to start the script?
Yes,
but not only with the M100. I had this also with my G1x.
Have you experienced any crashes (camera switching off after script starts)?
No crashes at all. Simple dumps were not made…
But basically, it works with the dump…
Thanks.
Unfortunately, I don't know the reasons behind the unreliable script start - the responsible parts of the firmware are too hard to decipher.
Title: Re: Canon EOS M100 firmware dump
Post by: eliasthompson on 24 / February / 2019, 04:52:33
Hello there, I'm new to all of this but it seems like the M100 might be similar to the M10 in terms of getting it to be CHDK compatible. Has anyone looked into what it would take to get this model on the list yet? I'm trying to get my screen to stay on indefinitely and it seems like this would be my best bet.
Title: Re: Canon EOS M100 firmware dump
Post by: srsa_4c on 24 / February / 2019, 05:54:19
it seems like the M100 might be similar to the M10 in terms of getting it to be CHDK compatible.
The M100 is a DIGIC 7 based camera that runs a PowerShot-based firmware. In theory, it would likely be possible to port CHDK to it (and other DIGIC 7 PowerShots), but it appears that no-one is interested enough to start such an effort.

I'm trying to get my screen to stay on indefinitely and it seems like this would be my best bet.
If that's all you want, that might be doable with a Canon Basic script. The only annoyance is that Canon Basic scripts need to be started manually.

https://chdk.fandom.com/wiki/Canon_Basic
https://chdk.fandom.com/wiki/Canon_Basic/Card_Setup

The most basic way to do it is this:
Code: [Select]
' Prevent camera shutdown
 
private sub RegisterProcs()
    System.Create()
    ExecuteEventProcedure("UI.CreatePublic")
end sub
 
private sub Initialize()
    RegisterProcs()
    LockMainPower()
end sub

Out of curiosity, what is your firmware version?
To find out, you can either run exiftool on an image taken by your cam and look for "Firmware Revision" in its output. Or, you can just make a firmware dump and look for a string starting with "GM1." in the binary. Running the dumper script would also ensure that the card is correctly set up to run scripts. If you decide to dump use the "improved" script from here (https://chdk.fandom.com/wiki/Canon_Basic/Scripts/Dumper#Improved_universal_dumper). Oh, in case it's not GM1.00a, your could then share it with us.
Title: Re: Canon EOS M100 firmware dump
Post by: eliasthompson on 24 / February / 2019, 06:32:12
Thanks for the heads up. My firmware version is 1.00 (seems to be the only one out for this model).

I'll take a look at Canon Basic scripting in the morning. For clarity, there's a setting in my camera to keep the power on forever, just not the LCD display, and the screen affects the HDMI out which is what I'm really after to be consistent over long periods of time.
Title: Re: Canon EOS M100 firmware dump
Post by: srsa_4c on 24 / February / 2019, 08:04:49
the screen affects the HDMI out which is what I'm really after to be consistent over long periods of time.
In case you also need clean HDMI, that's likely doable too.
Title: Re: Canon EOS M100 firmware dump
Post by: c_joerg on 24 / February / 2019, 08:54:41
In theory, it would likely be possible to port CHDK to it (and other DIGIC 7 PowerShots), but it appears that no-one is interested enough to start such an effort.

I'm not lacking in interest ...

Lack of knowledge and the time factor deter me. I always wanted to download the development environment and build a version for the M3.
Title: Re: Canon EOS M100 firmware dump
Post by: srsa_4c on 24 / February / 2019, 10:26:57
I'm not lacking in interest ...
I know, the remark was not directed toward you (or any other forum member). It's about the hypothetical person(s) who could do it but don't find it worth their time. Unlike ~ ten years ago.
Title: Re: Canon EOS M100 firmware dump
Post by: Ant on 24 / February / 2019, 10:35:13
who could do it but don't find it worth their time. Unlike ~ ten years ago.


Nine in my case (https://www.magiclantern.fm/forum/index.php?topic=8119.msg212429#msg212429)...  :)
Title: Re: Canon EOS M100 firmware dump
Post by: fe50 on 09 / March / 2019, 03:45:22
Added the
  • EOS M100 1.00A
full 32MB dump by c_joerg from  this forum post  (https://chdk.setepontos.com/index.php?topic=13699.msg139557#msg139557) to the  CHDK DSLR FW dumps (https://drive.google.com/open?id=0B08pqRtyrObjWVdWVGVwakVmcjQ#list) repository.
Title: Re: Canon EOS M100 firmware dump
Post by: jackgene on 14 / March / 2020, 09:52:58
Hi all,
I own a Canon EOS M100 and M6, and am thinking I'd take a stab at porting CHDK to these. I'm pretty new to all this though, so for my first day, I just figured out how to write and run Canon BASIC scripts, and I've also executed the "Improved Universal Dumper" (https://chdk.fandom.com/wiki/Canon_Basic/Scripts/Dumper#Improved_universal_dumper) on both my cameras and got the dumps out of both.

The "Improved Universal Dumper" ran flawlessly for me, but I do have some questions:
1. When I compared the checksum of the dump from my camera, vs the copy posted here, they are not the same. Is this to be expected? Both firmwares are the same version "100a", and so I was expecting the dumps to be identical. The first 20mb or so are identical, but after that it's different:
Code: [Select]
head -c 21000000 PRIMARY.BIN | shasumProduces the same shasum for both copies, but this does not:
Code: [Select]
head -c 22000000 PRIMARY.BIN | shasum
2. I see in the uploaded 7z file a Strings.txt with what appears to be strings in the dump. Could you point me to how that file is generated? I tried something like:
Code: [Select]
strings -10 -t x PRIMARY.BINBut the output appears different:
Code: [Select]
5272 !!!!Mount SD-Card ERROR
5292 [email protected]
52a7 @--- DISKBOOT.BIN start ABORT!!! ---
52d0 DISKBOOT.BIN is started.
52ec ROMWRITE.BIN
(I'm on a Mac, which may be the problem).


Finally, I'm going to try and figure out what my next steps should be, based on this:
https://chdk.fandom.com/wiki/Adding_support_for_a_new_camera

But please let me know if you have any pointers.

Thanks!
Title: Re: Canon EOS M100 firmware dump
Post by: srsa_4c on 14 / March / 2020, 10:15:24
Hi,
1. When I compared the checksum of the dump from my camera, vs the copy posted here, they are not the same. Is this to be expected? Both firmwares are the same version "100a", and so I was expecting the dumps to be identical. The first 20mb or so are identical, but after that it's different:
Code: [Select]
head -c 21000000 PRIMARY.BIN | shasumProduces the same shasum for both copies, but this does not:
Code: [Select]
head -c 22000000 PRIMARY.BIN | shasum
The differences are due to camera specific things. Either calibration related (sensor defects, etc), or camera specific settings (set in Canon menus and elsewhere).

Quote
Finally, I'm going to try and figure out what my next steps should be, based on this:
https://chdk.fandom.com/wiki/Adding_support_for_a_new_camera
Well. There already is an unfinished port for the M100, see here (https://chdk.setepontos.com/index.php?topic=13943.0). That patch will no longer apply cleanly because parts of that code have already been committed. My development efforts are currently put on hold due to the corruption issue I mentioned in that thread.

For development, see these threads:
https://chdk.setepontos.com/index.php?topic=13718.0
https://chdk.setepontos.com/index.php?topic=11316.0
https://chdk.fandom.com/wiki/Digic_6_Porting

I skipped answering the strings question because I don't know how that list is made and GHidra creates a list of strings anyway.
Title: Re: Canon EOS M100 firmware dump
Post by: jackgene on 14 / March / 2020, 11:45:41
Hi,
1. When I compared the checksum of the dump from my camera, vs the copy posted here, they are not the same. Is this to be expected? Both firmwares are the same version "100a", and so I was expecting the dumps to be identical. The first 20mb or so are identical, but after that it's different:
Code: [Select]
head -c 21000000 PRIMARY.BIN | shasumProduces the same shasum for both copies, but this does not:
Code: [Select]
head -c 22000000 PRIMARY.BIN | shasum
The differences are due to camera specific things. Either calibration related (sensor defects, etc), or camera specific settings (set in Canon menus and elsewhere).

Quote
Finally, I'm going to try and figure out what my next steps should be, based on this:
https://chdk.fandom.com/wiki/Adding_support_for_a_new_camera
Well. There already is an unfinished port for the M100, see here (https://chdk.setepontos.com/index.php?topic=13943.0). That patch will no longer apply cleanly because parts of that code have already been committed. My development efforts are currently put on hold due to the corruption issue I mentioned in that thread.

For development, see these threads:
https://chdk.setepontos.com/index.php?topic=13718.0
https://chdk.setepontos.com/index.php?topic=11316.0
https://chdk.fandom.com/wiki/Digic_6_Porting

I skipped answering the strings question because I don't know how that list is made and GHidra creates a list of strings anyway.

Thanks for the quick response. The dump differences makes sense now.

I'm going to have a look at the existing M100 efforts, and go from there!
Title: Re: Canon EOS M100 firmware dump
Post by: fe50 on 22 / March / 2020, 04:37:37
...
2. I see in the uploaded 7z file a Strings.txt with what appears to be strings in the dump. Could you point me to how that file is generated?

I included the "Strings.txt" file in the archiv files just for convenience for developers, they are not needed for development.

The file is generated with the "BinText file text scanner" by Foundstone Inc, now McAfee.
This (free) tool is only available for MS Windows, but there are many other similar tools to extract strings from any given file.

The BinText tool is still available for download from the McAfee site, the download link with a short description can be found here:

https://www.aldeid.com/wiki/BinText