Author Topic: DIGIC 8 'PowerShot' development (M50, SX70, SX740)  (Read 195936 times)

kitor

  • Developer
  • Senior
  • *****
  • Posts: 361
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #325 on: May 11, 2021, 01:42:54 PM »
Is it possible to put this code on the M6 ​​mkII?

https://www.magiclantern.fm/forum/index.php?action=profile;area=showposts;u=87780

If you ask 10 more times in 5 more threads, maybe some miracle will happen. Until then - wait for information, and stop asking the same question over and over again.
Too many Canon cameras.

jo.meatloaf

  • New to the forum
  • *
  • Posts: 5
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #326 on: May 20, 2021, 08:34:38 AM »
Actually no: M6 II is ours. Firmware file name: 6200111.FIR
you can link to the file, I want to check?

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8492
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #327 on: May 20, 2021, 08:42:23 AM »

kitor

  • Developer
  • Senior
  • *****
  • Posts: 361
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #328 on: May 28, 2021, 11:11:03 PM »
Same stuff as EOS R and 200D: Menus, nothing more. Even funnier as if you open any submenu in ML menus and then exit to Canon GUI - a wild ERR70 appears.

(it may have something to do with messages on UART, seems that there's some memory leak?)
Code: [Select]
ERROR [MEM] Over Permanet Memory cache 48 17348

Just a tiny update - tested by @br - crash was due to bad _FreeMemory stub (I traced it on R after triggering it there too), it is fixed on dev already. The errors in UART log with typo included in ROM ( ;) ) are probably still there, as we play on the edge of tiny amount of memory that we can allocate right now.
Too many Canon cameras.

anykill

  • New to the forum
  • *
  • Posts: 18
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #329 on: August 06, 2021, 02:21:51 PM »
Do we have any test build?
Is there something working with ML on m50?
Thank you

kitor

  • Developer
  • Senior
  • *****
  • Posts: 361
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #330 on: August 06, 2021, 02:59:00 PM »
No. Asking over and over again in thread with no replies won't change it.

I guarantee you that when we will have something to share, it will be a huge news. And it probably still won't do anything really useful except menus and some camera info.
Too many Canon cameras.

anykill

  • New to the forum
  • *
  • Posts: 18
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #331 on: August 06, 2021, 03:52:09 PM »
Thank you Kitor, you know... any news bad or good is news!

COMMANDES

  • New to the forum
  • *
  • Posts: 24
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #332 on: August 21, 2021, 09:07:29 PM »
I recently became the owner of the m50, so if I can help with testing - let me know)
Canon 650D, EOSM 2.02, M50 1.1.0

anykill

  • New to the forum
  • *
  • Posts: 18
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #333 on: December 08, 2021, 12:12:29 AM »
Do we have any develop going?
I have my M50 and I can help with something if needed...

lorenzo353

  • New to the forum
  • *
  • Posts: 31
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #334 on: February 20, 2022, 01:20:06 PM »
Hi,

Could you please run this script on Digic8 and Digic10 cameras?
https://discord.com/channels/671072748985909258/936696899120005230/944929235070484511

Code: [Select]
model_id : 0x80000453
rom version: 4.9.0
GetFirmwareVersion: 150
fw signature from 0xe0100000: 0x129372a8
fw signature from 0xe0040000: 0xce84b41f
at e0100000: 09480cee100fbff36f8f42f20000c0f20000854610eeb05f15f00f0001
at e0040000: cef81cc143f2300cddf81ce0cef820c14ef22e7cddf81ce0cef824c1dd


I am thinking about something like this (pseudo code):

Code: [Select]
dim model_name        = "Canon EOS RP"
dim firmware_version  = "1.6.0"
dim model_name_addr   = 0xe121d57c
dim firmware_ver_addr = 0xe00408e0

public sub check_compat()
    if model_name_addr == model_name and firmware_ver_addr == firmware_version then
        check_compat = 1
    else
        check_compat = 0
    end if
end sub

That way the code would self document for what model the script is for. I Just need to find a way to do a strncmp in canon basic for that.

kitor

  • Developer
  • Senior
  • *****
  • Posts: 361
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #335 on: March 11, 2022, 06:48:48 PM »


I guess this is the final confirmation?

SX740 HS indeed runs what appears (at least on surface) very similar to regular EOS ROM.
Looks like it have 1GB RAM. No MPU (everything handled on ICU)
Interface is stretched vertically from 3:2 (720x480) into 4:3 (640x480), thus it looks a bit odd (vertical scaling ratio 8/9).
Interesting is that it doesn't have raw photo capabilities at all (in the firmware).
Also, it seems to have ROM0 only (32MB)

Unfortunately that photo marks my first case in a long time where semi-broken device ended up worse in my hands than it arrived.
It was slightly water damaged - lens was making high pitched noises. Both aperture and IS ribbons just snapped in half when I attempted to disassemble it ::)
Thus right now it just gets ERR60 if booted in regular mode...

If you have a broken SX740 (SX730 might work as it seems they might just updated the pcb) that lens is still intact, please contact me on priv - we may make a deal.
Too many Canon cameras.

kitor

  • Developer
  • Senior
  • *****
  • Posts: 361
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #336 on: March 24, 2022, 11:27:22 PM »


So far firmware is very similar to EOS R. SX740 runs DryOS +p3, while R/RP does use +p4.

In fact I was able to use compositor code that so far I thought was R specific (RP and later have more sane implementation by Canon).
Code is "so much EOS" that it has all the regular lens info structures even though this is point and shoot with fixed lens.

I even found (and successfully poked) some GUI dialogs from R that should not exists here, but this requires a bit more research.
Too many Canon cameras.

kitor

  • Developer
  • Senior
  • *****
  • Posts: 361
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #337 on: March 26, 2022, 09:52:02 PM »
CR3 raw from SX740  8)



Caveats:
 - RAW only works, RAW+JPG L crashes
 - Canon code is confused as it has no settings for RAW modes at all, and screams on UART when it is enabled.
 - File opens fine in Windows preview (including actual RAW render), RawTherapee (missing EXIF data) and http://exif.regex.info/exif.cgi (EXIF data only)
 - File does not open in Lightroom/Photoshop.

To work properly it will most likely require us to understand MMU and patch a ROM in a few places (to make it "understand" RAW).

Right now this can be achieved by
Code: [Select]
GUI_SetImgComposition(1,0,6,3,4); // set RAW only for card1
GUI_SetImgComposition(2,0,6,3,4); // set RAW only for card2

This is C code, I won't share stub (it is easy to find) since we have no idea what are the consequences of leaving camera in that state (other than a ton of debug messages logged).
Thus don't ask how to run that on camera. If you don't know how to do it, you most probably shoudn't try in this state.

If anyone want to dig into cr3 file, here it is: https://kitor.pl/eos/sx740/sx740_raw.cr3

One can reset settings to JPG by just opening menu and setting back to JPG.

===

On the other notes I have a lot of Digic 8 ML code working on SX740, but also have a nasty crash that I can't trace yet. Thus for now it lives on branch in my fork.
Too many Canon cameras.

kitor

  • Developer
  • Senior
  • *****
  • Posts: 361
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #338 on: June 05, 2022, 05:06:41 PM »
On the other notes I have a lot of Digic 8 ML code working on SX740, but also have a nasty crash that I can't trace yet. Thus for now it lives on branch in my fork.

It is always a stub. This time FreeMemory was bad. PR opened, including unsafe CR3 experiment. Merged to dev branch.

Since Names_are_hard is experimenting with MMU and ROM patches, it may become safe(ish) in near future.
Too many Canon cameras.

c_joerg

  • Member
  • ***
  • Posts: 135
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #339 on: June 06, 2022, 01:07:43 PM »
If anyone want to dig into cr3 file, here it is: https://kitor.pl/eos/sx740/sx740_raw.cr3
What focal length was this done with?

- File opens fine in Windows preview (including actual RAW render),
Interesting. I also see the preview image first and after about 3s the RAW data are probably interpreted. I then get wrong colors and the lens correction disappears.

Ever tried to copy the EXIF data from the JPG to the CR3 with EXIFTOOL?


EOS R

kitor

  • Developer
  • Senior
  • *****
  • Posts: 361
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #340 on: June 06, 2022, 01:15:00 PM »
7mm from EXIF should be about right, as it was quite wide and lens is 4.3-172mm.

No, I had no time to dig into that RAW more. Most likely it needs a rom patching in a few places to get it right.
Like enabling CR3+JPG gives ERR70 after a shot attempt, which is for sure code hitting some assert.
Too many Canon cameras.

c_joerg

  • Member
  • ***
  • Posts: 135
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #341 on: June 06, 2022, 01:23:03 PM »
EXIFTOOL shows 71mm.
Adobe DNG Converter shows a parising Error

Update:
Do you see all this E70 with CamInfo_Debug?
EOS R

kitor

  • Developer
  • Senior
  • *****
  • Posts: 361
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #342 on: June 06, 2022, 01:29:52 PM »
No idea, unfortunately now I don't have a lot of time to do any development stuff, I just took the small opportunity I had to upstream SX740/R5 work.

If you have SX740, you can try yourself - code is already on dev branch of magiclantern_simplified repo. I don't remember what params needs to be set to GUI_SetImgComposition to enable JPG+RAW. But I found a partial crash log on Discord, and it was indeed an assert:
Code: [Select]
    10806:  36140.093 [SHTD] ERROR SemTimeOut SetJpegDispEncodePathForRawJpeg
    10807:  36140.144 [STARTUP] ERROR ASSERT : Warp::ShtDevCommon.c
    10808:  36140.323 [STARTUP] ASSERT : Task = ShootEncodeSub
    10809:  36140.330 [STARTUP] ASSERT : Core 0
    10810:  36140.334 [STARTUP] ASSERT : Line 125
    10811:  36140.338 [STARTUP] ASSERT : bFlag
    10812:  36140.346 [STARTUP] < StackDump >

Quote
EXIFTOOL shows 71mm.
Windows shows 7mm, see my screenshot / "Długość ogniskowej" = Focal Length. Though other parameters doesn't make any sense, like 60s expo... yes, for sure.
Too many Canon cameras.

c_joerg

  • Member
  • ***
  • Posts: 135
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #343 on: June 06, 2022, 01:43:53 PM »
I don't have a SX740 and didn't want to have an SX anymore but with CR3 support I would think about it again...

Yes my window shows 7mm as well and EXIFTOOL Focal Length  : 71.45 mm
ISO800 and Exposure Time  1/60s is same on windows and EXIFTOOL (and f4)
EOS R