Clean Canon overlays (G7X II, G5X; EOS M10, M3, also M5, M6, M100 via script) - page 3 - General Discussion and Assistance - CHDK Forum

Clean Canon overlays (G7X II, G5X; EOS M10, M3, also M5, M6, M100 via script)

  • 189 Replies
  • 141220 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: Clean Canon overlays (M10, M3)
« Reply #20 on: 03 / June / 2019, 18:28:06 »
Advertisements
are there any other great scripts out there that I can try / modify that might work with the m100?
There are a few in this thread. Unfortunately, only the simpler 'research' ones work more or less reliably, the big script doing actual shooting is completely unstable on DIGIC 7 cameras. The last posts have some discussion about why it fails.

Re: Clean Canon overlays (M10, M3)
« Reply #21 on: 24 / September / 2019, 12:52:06 »
Thanks for trying the script and reporting back.
For the record, the following is very likely a mixup, the script from this thread does not write anything on screen. It was probably the dumper script.
when you switch to camera/record/or auto it will say "done" in green at the top. now you can unlock your lens and have clean hdmi!
I'm also not sure if locking the lens makes any difference (it does not on my M10).
But, it's true that starting a Canon Basic script may not work reliably, for unknown reasons. See c_joerg's posts here for example.

For the request in PM, here's a version of the script that should also prevent the camera from turning off live view.
Code: [Select]
' clean rec mode palette
' EOS M100, 100a

DIM palette_buffer_ptr = 0x116f4
DIM active_palette_buffer = 0x116ec
DIM palette_to_zero = 0

public sub check_compat()
    if Peek16(0xe1f20270) = 0x32d1 then
        check_compat = 1
    else
        check_compat = 0
    end if
    if strcmp("GM1.00A",0xe047b5b1) <> 0 then
        check_compat = 0
    end if
end sub

private sub RegisterProcs()
    System.Create()
    UI.CreatePublic()
end sub

private sub palette_mod()
    adr = *palette_buffer_ptr
    adr = adr + (palette_to_zero * 4)
    if *adr <> 0 then
        adr = *adr + 4
        memset(adr, 0, 256 * 4)
    end if
end sub

private sub Initialize()
    RegisterProcs()
    ret = check_compat()
    if ret=1 then
        LockMainPower()
        palette_mod()
    end if
end sub


I'd like to disable the 30-minute auto-off on Live View for my M6. Would the following code work?

Code: [Select]
' no turn off
' EOS M6, 100b

private sub Initialize()
    RegisterProcs()
    ret = check_compat()
    if ret=1 then
        LockMainPower()
        palette_mod()
    end if
end sub


OR do I need to snag the entire code mentioned earlier for the M6 and add the final bit for power off?

Code: [Select]
' EOS M6, 100b
 
DIM palette_buffer_ptr = 0x11d4c
DIM active_palette_buffer = 0x11d44
DIM palette_to_zero = 0
 
private sub RegisterProcs()
    System.Create()
    'UI.CreatePublic()
end sub
 
private sub Initialize()
    RegisterProcs()
    adr = *palette_buffer_ptr
    adr = adr + (palette_to_zero * 4)
    if *adr <> 0 then
        adr = *adr + 4
        memset(adr, 0, 256 * 4)
    end if
   
private sub Initialize()
    RegisterProcs()
    ret = check_compat()
    if ret=1 then
        LockMainPower()
        palette_mod()
    end if
end sub
« Last Edit: 24 / September / 2019, 12:55:40 by zeerow »

*

Offline srsa_4c

  • ******
  • 4451
Re: Clean Canon overlays (M10, M3)
« Reply #22 on: 24 / September / 2019, 15:58:25 »
I'd like to disable the 30-minute auto-off on Live View for my M6.
If that's the only thing you need, you can use the simple script from this post.

Re: Clean Canon overlays (M10, M3, also M6, M100 via script)
« Reply #23 on: 24 / September / 2019, 16:05:15 »
Thanks for the quick reply! From what I can tell this worked!

Maybe next I'll start digging in to the clean overlays  8)


Re: Clean Canon overlays (M10, M3, also M6, M100 via script)
« Reply #24 on: 24 / September / 2019, 17:00:05 »
Okay, getting a little greedy so I tried combining both the Live View auto-off disable and the clean overlays script.

When I combine the script in this order, I get clean overlays, but the auto-off disable doesn't work:

Code: [Select]
' Prevent camera shutdown
 
private sub RegisterProcs()
    System.Create()
    ExecuteEventProcedure("UI.CreatePublic")
end sub
 
private sub Initialize()
    RegisterProcs()
    LockMainPower()
end sub

' EOS M6, 100b
 
DIM palette_buffer_ptr = 0x11d4c
DIM active_palette_buffer = 0x11d44
DIM palette_to_zero = 0
 
private sub RegisterProcs()
    System.Create()
    'UI.CreatePublic()
end sub
 
private sub Initialize()
    RegisterProcs()
    adr = *palette_buffer_ptr
    adr = adr + (palette_to_zero * 4)
    if *adr <> 0 then
        adr = *adr + 4
        memset(adr, 0, 256 * 4)
    end if
end sub

When I combine the script in this order, neither work:

Code: [Select]
' EOS M6, 100b
 
DIM palette_buffer_ptr = 0x11d4c
DIM active_palette_buffer = 0x11d44
DIM palette_to_zero = 0
 
private sub RegisterProcs()
    System.Create()
    'UI.CreatePublic()
end sub
 
private sub Initialize()
    RegisterProcs()
    adr = *palette_buffer_ptr
    adr = adr + (palette_to_zero * 4)
    if *adr <> 0 then
        adr = *adr + 4
        memset(adr, 0, 256 * 4)
    end if
end sub

' Prevent camera shutdown
 
private sub RegisterProcs()
    System.Create()
    ExecuteEventProcedure("UI.CreatePublic")
end sub
 
private sub Initialize()
    RegisterProcs()
    LockMainPower()
end sub


What am I missing here? Happy to test multiple variants!
« Last Edit: 24 / September / 2019, 17:09:56 by zeerow »

*

Offline reyalp

  • ******
  • 14082
Re: Clean Canon overlays (M10, M3, also M6, M100 via script)
« Reply #25 on: 24 / September / 2019, 17:10:58 »
Okay, getting a little greedy so I tried combining both the Live View auto-off disable and the clean overlays code.
Have you verified that your Canon Firmware is 100b? You should do this before using scripts that reference RAM addresses (palette_buffer_ptr = 0x11d4c etc).

For combining the the scripts, you would at a minimum want to combine the functions with the same names, so there is only one each of "RegisterProcs" and "Initialize", which include the lines from both scripts.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: Clean Canon overlays (M10, M3, also M6, M100 via script)
« Reply #26 on: 24 / September / 2019, 17:15:50 »
Here's the M100 combined script (clean overlay + no auto off), ported to M6 100b.
As reyalp mentioned, this script will only work on firmware version 1.00b.
Code: [Select]
' clean rec mode palette and disabled auto-off
' EOS M6, 100b

DIM palette_buffer_ptr = 0x11d4c
DIM active_palette_buffer = 0x11d44
DIM palette_to_zero = 0

public sub check_compat()
    if Peek16(0xe1f20270) = 0x32c5 then
        check_compat = 1
    else
        check_compat = 0
    end if
    if strcmp("GM1.00B",0xe0431215) <> 0 then
        check_compat = 0
    end if
end sub

private sub RegisterProcs()
    System.Create()
    UI.CreatePublic()
end sub

private sub palette_mod()
    adr = *palette_buffer_ptr
    adr = adr + (palette_to_zero * 4)
    if *adr <> 0 then
        adr = *adr + 4
        memset(adr, 0, 256 * 4)
    end if
end sub

private sub Initialize()
    RegisterProcs()
    ret = check_compat()
    if ret=1 then
        LockMainPower()
        palette_mod()
    end if
end sub
edit:
Side note: the scripts posted here will need an update in future as Canon plans to release firmware updates to all cams mentioned here.
« Last Edit: 24 / September / 2019, 17:17:40 by srsa_4c »

Re: Clean Canon overlays (M10, M3, also M6, M100 via script)
« Reply #27 on: 24 / September / 2019, 17:26:06 »
For combining the the scripts, you would at a minimum want to combine the functions with the same names, so there is only one each of "RegisterProcs" and "Initialize", which include the lines from both scripts.

I think that was it! No overlays, and Display is staying on indefinitely from what I can tell. This is huge for live streaming setups! Here is the script I used for reference:

Canon M6 Clean Overlays (Clean HDMI Out) + Display Off Disable
Code: [Select]
DIM palette_buffer_ptr = 0x11d4c
DIM active_palette_buffer = 0x11d44
DIM palette_to_zero = 0
 
private sub RegisterProcs()
    System.Create()
    ExecuteEventProcedure("UI.CreatePublic")
end sub
 
private sub Initialize()
    RegisterProcs()
    LockMainPower()
    adr = *palette_buffer_ptr
    adr = adr + (palette_to_zero * 4)
    if *adr <> 0 then
        adr = *adr + 4
        memset(adr, 0, 256 * 4)
    end if
end sub
« Last Edit: 24 / September / 2019, 17:36:52 by zeerow »


Re: Clean Canon overlays (M10, M3, also M6, M100 via script)
« Reply #28 on: 24 / September / 2019, 17:39:20 »
Here's the M100 combined script (clean overlay + no auto off), ported to M6 100b.
As reyalp mentioned, this script will only work on firmware version 1.00b.

Thanks for putting that together! If my hackjob starts acting weird, I'll try this one instead.

Re: Clean Canon overlays (M10, M3, also M6, M100 via script)
« Reply #29 on: 28 / September / 2019, 12:36:57 »
This looks quite useful, so I added this as an action in CHIMP.

The code is in https://github.com/CHDKUtil/CHIMP/tree/overlay.

I'm attaching an alpha beta build so people can test it and report any issues.

Thanks!

Edit: Updated to beta.
Edit 2: Updated to second beta.
Edit 3: Removed buggy beta, see newer post.
« Last Edit: 09 / October / 2019, 14:18:35 by dmitrys »
Author of CHIMP, Canon Hack Installation and Management Platform

 

Related Topics