G7 X porting thread - page 7 - DryOS Development - CHDK Forum

G7 X porting thread

  • 167 Replies
  • 151813 Views
Re: G7 X porting thread
« Reply #60 on: 02 / October / 2016, 21:35:25 »
Advertisements
Sorry,
I didn't think there had been changes.  There were no posts to the thread.  I should have checked elsewhere.

Jon

Re: G7 X porting thread
« Reply #61 on: 05 / October / 2016, 13:01:23 »
Hi,
Are there any examples of how to use the new gui buffer that has full color with alpha?  It occurs to me that (for Digic6) edgeoverlay could be replaced by a function that overlays a previous image (shifted) into the gui at (say)50%alpha with the current record output.

Another question: How do people typically track down recreview_hold?  Are there special tools?

Jon

*

Offline reyalp

  • ******
  • 14080
Re: G7 X porting thread
« Reply #62 on: 05 / October / 2016, 16:18:12 »
Hi,
Are there any examples of how to use the new gui buffer that has full color with alpha?  It occurs to me that (for Digic6) edgeoverlay could be replaced by a function that overlays a previous image (shifted) into the gui at (say)50%alpha with the current record output.
On g7x, the GUI buffer is in exactly the same format as as the viewport. The alpha buffer is just a separate 8 bit opacity (0=transparent, 255 = fully opaque). So in principle, you could just dump the viewport to a file and load it later.

Both are defined in lib.c, and you can see examples of accessing them in gui_draw.c.

However, it would need to be updated every time the display updates, and you would want both the canon and CHDK ui to appear on top of it. Keeping a full copy of your overlay loaded would take up a lot of RAM too.

Having a full color UI opens up a lot of possibilities, but making it play nice with the existing code and not break the portability of CHDK is going to take some thought and effort.

Quote
Another question: How do people typically track down recreview_hold?  Are there special tools?
My usual approach for most of these things is to look for references in known ports and find equivalent code.
Don't forget what the H stands for.

Re: G7 X porting thread
« Reply #63 on: 07 / October / 2016, 12:18:36 »
On this camera the CHDK gui does not appear in recreview mode.  Perhaps there are more than one gui bitmaps?
The alt button works, but no menu shows.  My build is 4701


*

Offline reyalp

  • ******
  • 14080
Re: G7 X porting thread
« Reply #64 on: 07 / October / 2016, 12:43:14 »
On this camera the CHDK gui does not appear in recreview mode.  Perhaps there are more than one gui bitmaps?
Note that recreview_hold is currently FAKEDEF'd on this port. From the logic in core/main.c, this will probably prevent CHDK from drawing when it thinks shooting is in progress.
Don't forget what the H stands for.

Re: G7 X porting thread
« Reply #65 on: 08 / October / 2016, 17:53:36 »
Quote
Note that recreview_hold is currently FAKEDEF'd on this port. From the logic in core/main.c, this will probably prevent CHDK from drawing when it thinks shooting is in progress.
I believe 0x91c0 will work to detect ReviewHold on g7x (100d)...There are actually several nearby addresses which are switched between zero and one's during ReviewHold mode.
« Last Edit: 08 / October / 2016, 18:10:20 by 62ndidiot »

*

Offline reyalp

  • ******
  • 14080
Re: G7 X porting thread
« Reply #66 on: 08 / October / 2016, 18:42:49 »
Quote
Note that recreview_hold is currently FAKEDEF'd on this port. From the logic in core/main.c, this will probably prevent CHDK from drawing when it thinks shooting is in progress.
I believe 0x91c0 will work to detect ReviewHold on g7x (100d)...There are actually several nearby addresses which are switched between zero and one's during ReviewHold mode.
This does not seem correct to me, always 0.

I did find 0x91D4 0x91c0 (near 0xfc33be5e, ref to "StartRecReviewTimer"), which is 1 post shoot review, regardless of whether the setting is hold or one of the time based settings.

The normal recreview_hold used in other ports is only 1 when the mode is set to hold. SX280 and the pre-digic 6 sig finder use a variable that's near ShootCon_NotifyStartReviewHold, but the code seems a bit different in g7x.

edit:
pasted the wrong address
« Last Edit: 08 / October / 2016, 19:06:44 by reyalp »
Don't forget what the H stands for.

Re: G7 X porting thread
« Reply #67 on: 08 / October / 2016, 18:53:55 »
On sx60 100f it's 914c, which appears frequently in the disassembly. I agree the code at notifystartreviewhold doesn't seem to directly reference this or a related value, but it appears about 20 lines down for all sorts of cases.
I verified on my cam it is one during hold along with about five other candidates..915c 91a4 91a8 91f0


Re: G7 X porting thread
« Reply #68 on: 09 / October / 2016, 13:36:49 »
Hi,
On my g7x 100d I think recreview_hold is 0x9194.
I found it by monitoring memory around that area and checking which long words went from zero to non-zero only in recreview mode.
« Last Edit: 09 / October / 2016, 15:15:03 by hiker_jon »

*

Offline reyalp

  • ******
  • 14080
Re: G7 X porting thread
« Reply #69 on: 09 / October / 2016, 17:51:00 »
Hi,
On my g7x 100d I think recreview_hold is 0x9194.
I found it by monitoring memory around that area and checking which long words went from zero to non-zero only in recreview mode.
Thanks. Like the one I posted earlier, this is 1 in any recreview, not just "hold". This may be more desirable behavior for some uses, but the normal CHDK implementation is only on "hold"

edit:
0x9194 is slightly different, it stays 1 if the button is held down, while 0x91D4 goes back to zero if you set a fixed review time and hold the button down.
« Last Edit: 09 / October / 2016, 18:55:55 by reyalp »
Don't forget what the H stands for.

 

Related Topics