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

G7 X porting thread

  • 167 Replies
  • 161842 Views
Re: G7 X porting thread
« Reply #120 on: 16 / November / 2017, 13:15:40 »
Advertisements
Thanks,
I will be gone for a week, hope to continue this after Thanksgiving.  For both of my cameras the ver is 100d.
So this is what I think I must do:
Create a new variable set_pressed and set it inside of  kbd_update_key_state to be the actual state of the set key.  My software will look at that variable to detect a set press.  Then in  kbd_update_key_state if the camera is in play or rec_review mode I will zero out the set key in physw_status.
One problem is to decipher what kbd_is_key_pressed() is doing in order to find where the bit is.  EDIT:
Can I use kbd_key_release?  Nope, tried it and it didn't work.
But how do I detect that the camera is in a Canon menu.  The set button is needed there.

Jon


1. Happens when not running CHDK.  I have two cameras, happens in both.  Not all the time, though.  Randomly and rarely.  Camera is dead with lens out.  You have to repeatedly press power and play to get it to reboot (or remove the batteries).
I have not experienced this. What canon firmware versions do your cameras have?
Quote
2. When it happens half press does not work.  You cannot focus the camera.  This can last for a while then mysteriously it goes away.
Or this. Possibly mode / settings dependent?

Quote
Set button when zoomed:  I am writing c-code, but have limited understanding of CHDK.  I've looked at core/kbd_common.c and kbd_update_key_state, but have no clue how it works or where alt mode is tested and how the key press is ignored in that mode.  Is it the return value of kbd_process?
Yes, the return value of kbd_process tells it whether the keyboard should be blocked (this doesn't exactly correspond to "alt" mode, but close enough). If it is, then the key mask is used to force the bits in kbd_new_state into the unpressed state, and then combined with the values in override state (for scripted keypresses etc)

If you simply wanted to hide the set button, you could just OR that bit value into the appropriate bit in physw_status.
« Last Edit: 16 / November / 2017, 15:09:29 by hiker_jon »

*

Offline reyalp

  • ******
  • 14126
Re: G7 X porting thread
« Reply #121 on: 16 / November / 2017, 16:41:11 »
Then in  kbd_update_key_state if the camera is in play or rec_review mode I will zero out the set key in physw_status.
Note that most buttons (including SET on g7x) the bit is 0 when the key is pressed and 1 when it is not.

The bits and index into physw_status are defined in each platform kbd.c keymap

So to force the firmware to think the SET button was not pressed, you could use something like
Code: [Select]
physw_status[0] |= 0x00000200;
kbd_update_physw_bits does similar things for various bits.

The logic of when/how you decide to do that is up to you...

Quote
Can I use kbd_key_release?  Nope, tried it and it didn't work.
kbd_key_release modifies kbd_mod_state, which is used to implement CHDK scripted key presses. This is only applied when the keyboard is "blocked" (i.e. in alt mode)
Don't forget what the H stands for.

Re: G7 X porting thread
« Reply #122 on: 16 / November / 2017, 17:34:56 »
Thanks,
Your code works.  Unfortunately blocking the set key causes many other issues (i.e. can't delete the image, perform some menu options)
So I need to rethink this.  Maybe create a "no-set-mode" when in play or rec_review that gets cancelled by hitting the delete or menu key.  How to
get into this mode is the problem, perhaps by hitting the set key.
Jon

Re: G7 X porting thread
« Reply #123 on: 29 / November / 2017, 12:17:50 »
In this camera, unlike others I have, when zoomed in on an image the set key centers the view on the focus point.  I want to disable this Canon routine and stop the camera from moving the view when set is pressed.  Anyway to do that?
I wonder where this info is stored. Presumably in the exif, but I notice that if I create a jpg image from raw data using DPP4 and load it back into the camera then the focus point info is lost, but not the other exposure info.
Edit: There are several differences in the exif between DPP4 and the original jpg.  Silly of Canon to not keep all the exif info when the image is created from raw on a computer.
Jon
« Last Edit: 29 / November / 2017, 12:33:13 by hiker_jon »

*

Offline reyalp

  • ******
  • 14126
Re: G7 X porting thread
« Reply #124 on: 29 / November / 2017, 16:38:12 »
In this camera, unlike others I have, when zoomed in on an image the set key centers the view on the focus point.  I want to disable this Canon routine and stop the camera from moving the view when set is pressed.  Anyway to do that?
I don't know of any way to detect that the camera is zoomed on an image in playback mode.

Finding one would require reverse engineering. If I were doing this, I'd probably start either with memory dumping (looking at the firmware BSS and DATA) and/or reverse engineering from LogCameraEvent messages.

Once you've found variable(s) that tell you if the camera is in the desired state, ignoring a key should be trivial with the stuff discussed earlier.
Don't forget what the H stands for.

Re: G7 X porting thread
« Reply #125 on: 17 / February / 2018, 06:25:01 »
Hi,
I have a G7X and tested 100d-1.5.0-4995; 100b-1.5.0-4995; and 100c-1.5.0-4805. I could only get the B version to boot and work quite well, however both C and D just give me a black screen (without backlight) and the green LED flashes. I also have the issue with the flickering and I'm pretty it happens when the Canon UI updates the screen (which includes when the rotation/angle indicator changes, moving around in the Canon menus, focusing and other changes in Canon's overlay). I'd like to further test the firmware.
« Last Edit: 17 / February / 2018, 06:33:24 by SparkyCola »

Re: G7 X porting thread
« Reply #126 on: 17 / February / 2018, 10:22:05 »
I have a G7X and tested 100d-1.5.0-4995; 100b-1.5.0-4995; and 100c-1.5.0-4805.
Testing CHDK compliled for three different Canon firmware versions is pretty much pointless.  The version of CHDK you install must match the firmware in your camera. In your case, that appears to be f/w 1.00b.  Using anything else is 100% guaranteed not to work (like 1.00d and 1.00c) and could potentially even brick your camera.

Quote
I also have the issue with the flickering and I'm pretty it happens when the Canon UI updates the screen (which includes when the rotation/angle indicator changes, moving around in the Canon menus, focusing and other changes in Canon's overlay).
This is unfortunately a well know issue.  Nobody has found a good way to make the Canon UI play nicely with the CHDK UI so it writes to the LCD buffers whenever it wants to and overwrites the CHDK displayed information.  FWIW it's much worse on Digic6 cameras than older models.  About the only "work around" is to try and do most of your CHDK menu work while the camera is in playback mode.

Quote
I'd like to further test the firmware.
:)
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14126
Re: G7 X porting thread
« Reply #127 on: 17 / February / 2018, 15:15:29 »
Don't forget what the H stands for.

Re: G7 X porting thread
« Reply #128 on: 09 / June / 2018, 11:18:48 »
Hello.
Thank you for your enormous work with CHDK for Canon G7X. At the first, sorry for my english, I am writing from Spain and I need a bit of help.
-I am trying to install the CHDK in my Canon G7X but I can´t do it and I tried it a lot of times. If you can help me a bit and try to learn me where is the error.
-I format my 64gb sd card with Fat32 format.
-I copy the zip of the g7x-100d-1.5.0-5041-full_ALPHA.zip to the sd card and unpack it.
-With the program EOS card to do the script in 0x1F0 like http://chdk.wikia.com/wiki/Canon_Basic/Card_Setup#Overview
-I create the file script.req with the text "for DC_scriptdisk" with the notebook.
-I create the file extend.m with the text:
' get firminfo
PRIVATE SUB Initialize()
   UI.Create()
   UIFS_WriteFirmInfoToFile("A/FIRMINFO.TXT");
END SUB

I put the sd card in the camera and turn on with the play button, after I press the button Func.Set and nothing and the RingFunc and nothing.
I go to the menu of the camero to update firmware and it is not appear.

I tried it with the Stick program and I can´t do it, when I press scan sd button the program it is closed.
I don´t have idea whatever more to do.
I am very thank you if you can say me some idea to do to install the CHDK unstable firmware in my camera.
Thank you so much.
Regards.

Re: G7 X porting thread
« Reply #129 on: 09 / June / 2018, 13:05:05 »
Thank you for your enormous work with CHDK for Canon G7X. At the first, sorry for my english, I am writing from Spain and I need a bit of help.
The first step is to verify that there is a firmware version available for your G7X. 

Instructions are here :  FAQ#Q. How can I get the original firmware version number of my camera?

I'd strongly recommend using the ACID utility linked at the top of that page.  There is even a version in Spanish.

Quote
-I format my 64gb sd card with Fat32 format.
-I copy the zip of the g7x-100d-1.5.0-5041-full_ALPHA.zip to the sd card and unpack it.
This is correct assuming you unzipped the installation file so that the original folders in the zip file are recreated on your SD card.

Quote
-With the program EOS card to do the script in 0x1F0 like http://chdk.wikia.com/wiki/Canon_Basic/Card_Setup#Overview
-I create the file script.req with the text "for DC_scriptdisk" with the notebook.
-I create the file extend.m with the text:
' get firminfo
PRIVATE SUB Initialize()
   UI.Create()
   UIFS_WriteFirmInfoToFile("A/FIRMINFO.TXT");
END SUB
I put the sd card in the camera and turn on with the play button, after I press the button Func.Set and nothing and the RingFunc and nothing.
I go to the menu of the camero to update firmware and it is not appear.
You tried to configure your SD card to run Canon BASIC using this procedure. There is no reason to do this - it's a waste of time and not needed.

Quote
I tried it with the Stick program and I can´t do it, when I press scan sd button the program it is closed.
You need to run STICK with administrator privileges - the method of doing so depends on whether you are using a Linux, Windows, or Apple O/S.

There is a complete listing of every way known of installing CHDK here :  Prepare your SD Card
For your camera, you want to use something this section : Cameras Released After 2010


The best method to use depends on your technical skill level.
« Last Edit: 09 / June / 2018, 13:07:12 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal © 2008-2014, SimplePortal