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

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8890
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #300 on: February 04, 2021, 10:45:24 PM »
Subject should get enhanced, I suppose: G5 X Mark II, G7 X Mark III firmware have *.FIR suffix. M200 still without confirmation but listed as compatible to EOS Webcam Utility and "real" PowerShot doesn't seem to be supported at all.

coon

  • Developer
  • Member
  • *****
  • Posts: 112
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #301 on: February 05, 2021, 08:09:13 PM »



Hello !

Do you need coding skills to install this feature on the m50 ?

GUI_SetSilentShutter sets a property which is persistent (survives a battery pull) until it is deactivated. Therefore this could also be done via Canon Basic script. Silent shutter mode can also be deactivated by entering SCN mode and leaving it again.
EOS RP

ArcziPL

  • Contributor
  • Member
  • *****
  • Posts: 191
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #302 on: February 05, 2021, 11:52:58 PM »
Sounds cool!

Will it be as simple as this?

Code: [Select]
private sub Initialize()
GUI_SetSilentShutter(1)
end sub
M50.110 [main cam] | G7X III [pocket cam] | 70D.112 [gathers dust] | M.202 [gathers dust] | waiting for M5II

coon

  • Developer
  • Member
  • *****
  • Posts: 112
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #303 on: February 06, 2021, 12:26:11 AM »
No, GUI_SetSilentShutter is not an Event Procedure and you need to export it first.
The following script meight work on M50 v1.0.2 (untested, use at own risk!):

Code: [Select]
private sub Initialize()
    ExportToEventProcedure("GUI_SetSilentShutter", 0xe053607f)
    GUI_SetSilentShutter(1)
end sub


EOS RP

ArcziPL

  • Contributor
  • Member
  • *****
  • Posts: 191
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #304 on: February 06, 2021, 12:40:53 AM »
Thanks! I'm on 1.1.0, so need the new adress first (and add +1, for setting the THUMB flag).
M50.110 [main cam] | G7X III [pocket cam] | 70D.112 [gathers dust] | M.202 [gathers dust] | waiting for M5II

coon

  • Developer
  • Member
  • *****
  • Posts: 112
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #305 on: February 06, 2021, 12:51:09 AM »
Script for M50 v1.1.0 is:

Code: [Select]
private sub Initialize()
    ExportToEventProcedure("GUI_SetSilentShutter", 0xe0536113)
    GUI_SetSilentShutter(1)
end sub
EOS RP

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #306 on: February 06, 2021, 08:11:37 AM »
When sharing scripts that are likely to be run by regular users, I strongly recommend performing some kind of camera model / firmware version checking. CHDK do this for scripts meant to be run by users (look up "check_compat").

Most of the time, the effect of calling an invalid stub - which would usually jump in the middle of some random Canon function - will be a crash, but if one is unlucky enough, that crash might lead to a memory write that will end up written back into main ROM at camera shutdown (yes, Canon firmware does this). Or, what if - on some different camera model - that stub might be in the middle of EraseSectorOfRom? Very unlikely, but still...

I've got a fair amount of backlash in the past for recommending this timeless article to other developers, but I still believe the advice there is very good (long answer). And I have no experience unbricking recent Canon models, btw ;)

ArcziPL

  • Contributor
  • Member
  • *****
  • Posts: 191
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #307 on: February 06, 2021, 12:03:57 PM »
Script for M50 v1.1.0 is:

Code: [Select]
private sub Initialize()
    ExportToEventProcedure("GUI_SetSilentShutter", 0xe0536113)
    GUI_SetSilentShutter(1)
end sub

It works, thank you! This feature is fantastic! :)

Thanks Greg for finding this function and trying out.
M50.110 [main cam] | G7X III [pocket cam] | 70D.112 [gathers dust] | M.202 [gathers dust] | waiting for M5II

coon

  • Developer
  • Member
  • *****
  • Posts: 112
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #308 on: February 06, 2021, 01:50:39 PM »
[...] (untested, use at own risk!):

But I agree that having some check_compat function in our scripts would be better, especially on code which modifies properties.
Model name and version number in string representation are stored somewhere in the ROM. I may try to compare against those in future.
EOS RP

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8890
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #309 on: February 06, 2021, 02:07:34 PM »
As mentioned/ranted some time ago: Some users will intentionally disregard such warnings and trying to mess with any script available -> Unable or unwilling to take risks into consideration. (I can provide examples showing a lack of understanding and jackass attitude which will ripple your foot nails, as we say here).
Please consider some checks, at least. Won't prevent worst kind users from getting their hair burned to the skin but majority will not get a clue why a script won't work because of said checks.

And please add some comment why these checks are implemented and the risks involved. Leaving only people wanting to see the world burn wanting to remove them.

coon

  • Developer
  • Member
  • *****
  • Posts: 112
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #310 on: February 06, 2021, 03:21:04 PM »
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.
EOS RP

ArcziPL

  • Contributor
  • Member
  • *****
  • Posts: 191
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #311 on: February 06, 2021, 06:34:48 PM »
Does anyone have an idea if there is a function to change ISO selection steps from 1/3EV to 1EV? On 70D it's an option in Canon menu but it's not present on M50.

I personally find the 1/3EV steps a disadvantage. They make changing ISO with the dial way too slow for my taste and it's just a digital push/pull which can be done in post.

Greg, maybe you have digged in this direction already?
M50.110 [main cam] | G7X III [pocket cam] | 70D.112 [gathers dust] | M.202 [gathers dust] | waiting for M5II

Greg

  • Contributor
  • Hero Member
  • *****
  • Posts: 607
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #312 on: February 07, 2021, 10:56:44 PM »
The last time I looked at the M50 rom dump was almost a year ago. There was a lot of functionality not visible in the menu but I don't remember.
If the R/RP has this feature, the M50 should also have it, but not visible in the menu.

You can check - "GUI_SetIsoSettingStep"

ArcziPL

  • Contributor
  • Member
  • *****
  • Posts: 191
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #313 on: February 08, 2021, 12:07:50 AM »
Yep, it exists! Thanks!

GUI_SetIsoSettingStep Value(%d)
M50.110 [main cam] | G7X III [pocket cam] | 70D.112 [gathers dust] | M.202 [gathers dust] | waiting for M5II

whitefang

  • Just arrived
  • *
  • Posts: 1
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #314 on: February 28, 2021, 10:07:36 PM »
Hello!
Thanks a lot for your hard work!

I really hope that someday there will be a working magic lantern firmware for this device.
I own this camera a few year.
I am ready to help as much as I can.

Can you please tell me, if it is possible to make a clean hdmi on this camera (by analogy with the m200) using autofocus?
I really want to use it not only for video recording, but also for streaming. Autofocus would be a great helper!
Thank you!

mazzdaddy

  • Just arrived
  • *
  • Posts: 1
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #315 on: March 05, 2021, 10:56:10 PM »
M50 1.0.2 - 7 frames exposure bracketing



Code: [Select]
THUMB_FN(0xE04E05BE, GUI_SetCFnBktSheetsData)

#define BktSheets3                  0x3
#define BktSheets5                  0x5
#define BktSheets7                  0x7

extern int GUI_SetCFnBktSheetsData(int);
GUI_SetCFnBktSheetsData(BktSheets7);
This is all I want to do.  How do I do this, please?  My camera came with 1.1.0.  Do I need to replace with 1.0.2?  And how do I access/change the code to allow 7 brackets?

dbot

  • Just arrived
  • *
  • Posts: 1
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #316 on: April 02, 2021, 09:22:12 PM »
haven't read the whole thread, but will the M50 have similiar hacked capabilities like the original M at some point?

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8890
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #317 on: April 06, 2021, 12:37:25 PM »
Sorry, unable to answer ATM. All devs are busy running a side quest to regain magic balls stolen by the Illuminati!

kitor

  • Developer
  • Senior
  • *****
  • Posts: 464
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #318 on: May 07, 2021, 08:37:43 PM »
When one day you woke up an decided to speedrun a port:



Code is at the moment on my Github: https://github.com/kitor/magiclantern_simplified/tree/M50_110_speedrun
Merged to dev: https://github.com/reticulatedpines/magiclantern_simplified/tree/dev

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. fixed, bad stub ;)

(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
Another caveat: Trash button won't send any keycode in LV until you assign a function in C.fn. And code depends on function assigned.
Touchscreen events works differently than on M/M2, so I mapped ML menu into M.fn button.

Anyway I prepared 2 days before I got M50 in my hands and this is what I leave you - as I just send M50 to its real owner.
Yes, this means I won't proceed any further with M50, R is enough for me. But this bring up M50 to similar status and codebase as R and 200d.

In the process I found UART TX line, more about this in Battery grip pins / UART
Too many Canon cameras.
If you have a dead R, RP, 250D mainboard (e.g. after camera repair) and want to donate for experiments, I'll cover shipping costs.

vlast3k

  • Just arrived
  • *
  • Posts: 1
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #319 on: May 11, 2021, 08:50:22 AM »
I am wondering if there is an option to set minimum shutter speed for AutoISO on M50.
In the rom dump i can find some function
GUI_SetLimitedTvValueAtAutoIso Null

But this null confuses me. e.g. others are like
GUI_SetSilentShutter Value(%d)

jo.meatloaf

  • New to the forum
  • *
  • Posts: 5
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #320 on: May 11, 2021, 12:03:20 PM »
Is it possible to put this code on the M6 ​​mkII?

names_are_hard

  • Developer
  • Hero Member
  • *****
  • Posts: 857
  • Dev: 200D, 750D, 850D, 7D2
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #321 on: May 11, 2021, 12:38:33 PM »
Every camera needs individual work.  Nobody is working on the M6, and I think you'd want CHDK for that, not Magiclantern.

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8890
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #322 on: May 11, 2021, 12:56:41 PM »
I think you'd want CHDK for that, not Magiclantern.
Actually no: M6 II is ours. Firmware file name: 6200111.FIR

names_are_hard

  • Developer
  • Hero Member
  • *****
  • Posts: 857
  • Dev: 200D, 750D, 850D, 7D2
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #323 on: May 11, 2021, 01:06:36 PM »
Thanks - why must the M series be so confusing? :)

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8890
Re: DIGIC 8 'PowerShot' development (M50, SX70, SX740)
« Reply #324 on: May 11, 2021, 01:16:04 PM »
You tell me! And there are at least 2 more PowerShots with EOS inside: G5X II and G7X III.