Cleaner method for hiding Canon's bottom bar (same method for all cameras)

#734 Open
Repository
Branch
cleaner-lvapp-hack
Repository
Branch
unified

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

hg update 7a3b5fa3f4c6
# Note: This will create a new head!
hg merge 4335299b4eb2
hg commit -m 'Merged in cleaner-lvapp-hack (pull request #734)'
Author
  1. Alex
Reviewers
Description

Continuation of https://bitbucket.org/hudson/magic-lantern/pull-requests/665

This method uses the patch manager to apply the same modification to LiveViewApp that was used for most DIGIC 4 cameras. Before, this function was relocated to RAM and patched there, but the method did not work on DIGIC 5 cameras (don't remember exactly why; probably the code was more complex than the relocation routine could handle).

It should fix the following issues:

  • 60D err80 with the RscMgr_memory branch (the reloc method relies on short jumps, so the relocated code must be placed at very low addresses, not in RscMgr)
  • 650D/700D crash when processing raw images in camera (issue #2434); it looks like overriding DebugMsg causes that issue, no idea why, but...

So, the DebugMsg hack is no longer required for the bottom bar. It's still enabled on 5D3 and 6D for other purposes (ADTG shutter speed controls for FPS override, and - on 5D3 - a workaround for some troublesome CF cards).

Note: EOS M needs a new stub (LiveViewApp_handler_BL_JudgeBottomInfoDispTimerState). 650D, 700D and 6D already have it, but may have to be checked again, as it was not used for anything else.

TBD on 70D and 100D as well.

I'd still like to get a version that doesn't require ROM patching, but so far, this method seems to be the best compromise.

  • Issues #2434: ML Crash when resizing image EOS 650D new

Comments (20)

  1. nikfreak

    On 70D this doesn't work. Fixed the handler stubs (compared to 5D3) but after trying it out the camera does only show a blackscreen when in LV/MV. In photo mode it's ok. But more annoying is that even with or w/o fixing the handler stub the camera won't power off. It will shut down when switching power button to off position but if you press a button (e.g. shutter button) camera will indicate some continous led for about a second. Need to take battery out.

    Going to try on SL1 too.

    1. Alex author

      Ouch.

      If you uncomment CONFIG_LVAPP_HACK_PATCH, do you get clean shutdown?

      Same question, if you uncomment only the two patch/unpatch calls from liveview.c.

      1. nikfreak

        When uncommenting CONFIG_LVAPP_HACK_PATCH everything is ok. No shutdown bug. Additionally 100d is fine with this PR.

        We got a conversation lately where you asked me to hg bisect. Running it pointed me some things. Might have f'd up my 70D branch and maybe that might also be the reason why we got 2 ppl lately with problems?

        1. nikfreak
          ml@ml-VirtualBox:~/clh/magic-lantern$ hg bisect --bad
          ml@ml-VirtualBox:~/clh/magic-lantern$ hg bisect --good 4e546b4bc020
          Testing changeset 12193:591ba5bf7c75 (18 changesets remaining, ~4 tests)
          abort: outstanding uncommitted changes
          
          1. nikfreak

            Ya I rechecked now but the branch for 70D is ok. recompiling and merging this PR still results in:

            • PR functionality is ok (cannot see the overlays)
            • no more black screen issue in LV/MV
            • shutdown bug still existing (LV/MV only)
            • cannot open Canon menu with this PR in LV/MV. Pressing INFO button also has no effect in LV/MV.
            • ML menu opens fine everywhere / all modes
            1. Alex author

              With this change, I assume there's no shutdown bug, and Canon menu works fine, right?

              --- a/src/liveview.c
              +++ b/src/liveview.c
              @@ -65,7 +65,6 @@
              
                   if (should_hide)
                   {
              -        liveviewapp_patch();
              
                       if (get_halfshutter_pressed())
                       {
              @@ -90,7 +89,6 @@
                   }
                   else
                   {
              -        liveviewapp_unpatch();
                       bottom_bar_dirty = 0;
                   }
              

              Can you print the value of cache_info from cache_get_size, in cache_hacks.h? You may call it from anywhere, just add a printf.

              Also, can you run the cache benchmarks from bench.mo?

              1. nikfreak

                Yes both: the shutdown bug is gone and Canon menu works fine with your suggested changes.

                cache_info prints "F192192"

                All of the 3 cache benchmarks run fine, I assume I don't need to add the screenshots.

        2. nikfreak

          Like already reported: Approved for 100D

          No reason to hold this back. 70D draws the short straw for the moment but can live with CONFIG_LVAPP_HACK_PATCH uncommented until a solution is found

          1. nikfreak

            Can you merge unified into this PR? Now that we use new boot method with correct task adresses I would like to retest the PR for 70D.

    1. Alex author

      Unsure; it was reported not to work on 70D, but I have no idea how to diagnose it. Best guess: it might not be the only camera with issues.