Fixing short shutter press overrides: 56 Cams || 9 fixed || 43 fine || 4 open - General Discussion and Assistance - CHDK Forum supplierdeeply

Fixing short shutter press overrides: 56 Cams || 9 fixed || 43 fine || 4 open

  • 43 Replies
  • 20476 Views
*

Offline koshy

  • *****
  • 1096
Advertisements
Initial research shows there are many cameras that might need this. So, a dedicated thread might make sense.

Cameras:

a410 tested; problem didn't show
a420 tested; problem didn't show
a430 tested; problem didn't show
a440 tested; problem didn't show
a450 tested; problem didn't show
a460 tested; problem didn't show
a470 tested; problem didn't show
a480 tested; problem didn't show
a490 tested; problem didn't show
a530 tested; problem didn't show
a540 tested; problem didn't show
a550 tested; problem didn't show only powers on with play button
a560 tested; problem didn't show only powers on with play button
a570 tested; problem didn't show
a580 tested; problem didn't show
a590 tested; problem didn't show
a610 tested; problem didn't show
a620 tested; problem occurs; need help
a630 fixed
a640 fixed
a700 tested; problem didn't show
a710 tested; problem didn't show
a720 tested; problem didn't show
a800 tested; problem didn't show
a810 tested; problem didn't show
a1000 tested; problem didn't show
a1100 tested; problem didn't show
a1200 tested; problem didn't show
a1300 tested; problem didn't show
a2000 tested; problem didn't show
a2100 tested; problem didn't show
a3100 tested; problem occurs; need help
a3200 fixed

ixusizoom_sd30 tested; problem didn't show
ixusw_sd430 tested; problem didn't show
ixus30_sd200 tested; problem didn't show
ixus40_sd300 tested; problem didn't show
ixus50_sd400 tested; problem didn't show
ixus55_sd450 tested; problem didn't show
ixus85_sd770 fixed
ixus90_sd790 fixed
ixus95_sd1200 fixed
ixus105_sd1300 tested; problem occurs; need help
ixus130_sd1400 tested; problem occurs; same dryos as A3100
ixus700_sd500 tested; problem didn't show
ixus750_sd550 tested; problem didn't show
ixus850_sd800 fixed
ixus900_sd900 tested; problem didn't show
ixus950_sd850 fixed
ixus970_sd890 fixed

s2is tested; problem didn't show
s3is tested; problem didn't show
s5is tested; problem didn't show
s80 tested; problem didn't show
sx100is tested; problem didn't show
sx110is tested; problem didn't show
sx120is tested; problem didn't show


Cameras I do not have for which I did not find evidence of the override fix in the source code on coarse check:
g16
g7x
g9
m10
m3
sx60hs
sx130is
sx150is
sx280hs
sx700hs
sx710hs


Prerequisite for me:
Very good, that worked in fixing it. SD850 can be checked in.
Thanks. Checked in for 1.5 and 1.4
Quote
What would be the easiest way to see what other cameras are affected? Testing the behaviour or looking at the code? Care to extend the fix to others? Seems worthwhile...
You can whether the workaround is present by looking in the source capt_seq.c around shooting_expo_param_override. You can see this in the change for sd850:
https://app.assembla.com/spaces/chdk/subversion/commits/5028

Note some ports have a simpler version of the workaround that doesn't call captseq_hack_override_active, like (from sx1)
Code: [Select]
//  this code added to avoid some incorrect behavior if overrides are used.
 //  but it can cause some unexpected side effects. In this case, remove this code!

            "MOV     R0, #0\n"
            "STR     R0, [R4,#0x24]\n"  // fixes overrides  behavior at short shutter press
 
 //  end of my code

The normal code that the workaround affects is the immediately following
Code: [Select]
                 "LDR     R0, [R4,#0x24]\n"
                 "CMP     R0, #0\n"
                 "BEQ     loc_FF86CEF4\n"
(registers, offsets and addresses vary by camera)

Not all cameras appear to need the workaround. Some ports have a note to this effect in the relevant part of the code.

So if you wanted to go through your cameras and check, I'd suggest looking at capt_seq.c, and testing if there is no comment or workaround.
« Last Edit: 15 / June / 2018, 20:46:48 by koshy »
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

*

Offline koshy

  • *****
  • 1096
Re: Fixing short shutter press overrides: ?? Cams || 1 done || ?? to go
« Reply #1 on: 05 / June / 2018, 20:07:48 »
I started with ixus970_sd890 - It has the problem, the attached patch to capt_seq.c of FW 100C seems to fix the problem. Now for the big question: Does that get all of it or did I ruin anything? All I did in comparison to SD950 was to edit in "R6" where applicable and remove two of the original lines of code as was the case for SD950.
« Last Edit: 05 / June / 2018, 20:21:48 by koshy »
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

*

Offline reyalp

  • ******
  • 14080
Re: Fixing short shutter press overrides: ?? Cams || 1 done || ?? to go
« Reply #2 on: 05 / June / 2018, 23:33:57 »
I started with ixus970_sd890 - It has the problem, the attached patch to capt_seq.c of FW 100C seems to fix the problem. Now for the big question: Does that get all of it or did I ruin anything? All I did in comparison to SD950 was to edit in "R6" where applicable and remove two of the original lines of code as was the case for SD950.
Yes, that looks correct. The things that vary per camera will mostly likely be the register (R6 in your example) and the offset (0x24)

For ports like this that use code_gen, the code_gen.txt file needs to be updated to fix it in svn, but editing capt_seq directly is fine for testing.

edit:
I checked this in for all the ixus970_sd890 subs, r5033 https://app.assembla.com/spaces/chdk/subversion/commits/5033

When you are testing these, it would be good to check whether raw is saved in quick press too.
« Last Edit: 06 / June / 2018, 00:44:08 by reyalp »
Don't forget what the H stands for.

*

Offline koshy

  • *****
  • 1096
Re: Fixing short shutter press overrides: ?? Cams || 1 done || ?? to go
« Reply #3 on: 06 / June / 2018, 12:23:19 »
Yes, that looks correct. The things that vary per camera will mostly likely be the register (R6 in your example) and the offset (0x24)

For ports like this that use code_gen, the code_gen.txt file needs to be updated to fix it in svn, but editing capt_seq directly is fine for testing.
Very good. Can we keep doing that like this?
Out of curiosity though what is the "FW 21 >> FW 1" change in code_gen.txt about? (in https://app.assembla.com/spaces/chdk/subversion/commits/5033)

When you are testing these, it would be good to check whether raw is saved in quick press too.
I think I did test that before but since I have it set to shoot DNG and JPEG I'll look for failures before clearing the card.

Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)


*

Offline reyalp

  • ******
  • 14080
Re: Fixing short shutter press overrides: ?? Cams || 1 done || ?? to go
« Reply #4 on: 06 / June / 2018, 14:00:13 »
Very good. Can we keep doing that like this?
Yes, that works for me. If you run into cameras where the capt_seq code significantly different, it may be better to just post if they have the problem rather than trying to adapt the workaround.
Quote
Out of curiosity though what is the "FW 21 >> FW 1" change in code_gen.txt about? (in https://app.assembla.com/spaces/chdk/subversion/commits/5033)
There's some documentation for code_gen at the top of the main source file:
https://app.assembla.com/spaces/chdk/subversion/source/HEAD/trunk/tools/code_gen.c

FW N means output N of instructions from the original firmware. So in the change above, I switched from outputting 21 instructions to outputting one, adding some code, replacing 2 instructions, and outputting 18.

If you change the code gen file, you must re-generate the .c files with using

make <platform etc> run-code-gen

This will overwrite any changes made directly in the .c files.
Don't forget what the H stands for.

*

Offline koshy

  • *****
  • 1096
Re: Fixing short shutter press overrides: ?? Cams || 1 done || ?? to go
« Reply #5 on: 06 / June / 2018, 14:35:17 »
Yes, that works for me.
Great and thanks for the explaination. I'll look at it even if I don't touch it it sounds like a neat arrangement.

Currently working on ixus800_sd700
Something curious: In an empty folder the first DNG does not get written. Is that something old? I vaguely think to remember having found something like that before...
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

*

Offline koshy

  • *****
  • 1096
Re: Fixing short shutter press overrides: ?? Cams || 1 done || ?? to go
« Reply #6 on: 06 / June / 2018, 14:42:11 »
Currently working on ixus800_sd700
...I mixed that up, wanted SD800 but the DNG No. 1 issue was with ixus800_sd700

Another curious aside:
On ixus800_sd700 if short shutter press and the AF can't lock onto anything (e. g. blank screen close up) the override fails even though the fix is present.

Edit: looked it up, it did happen before https://chdk.setepontos.com/index.php?topic=11734.0
« Last Edit: 06 / June / 2018, 15:22:11 by koshy »
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

*

Offline koshy

  • *****
  • 1096
Re: Fixing short shutter press overrides: ?? Cams || 2 done || ?? to go
« Reply #7 on: 06 / June / 2018, 15:08:04 »
Patch for ixus850_sd800_100e
Had the problem, this fixed it.

By the way the failure I noted on ixus 800 is not present in this, or anywhere else I tested as out of focus blank screen is a typical thing to shoot in testing this - simply as I know at first glance what my override shall look like and what failure looks like.
« Last Edit: 06 / June / 2018, 15:40:39 by koshy »
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)


*

Offline koshy

  • *****
  • 1096
Re: Fixing short shutter press overrides: ?? Cams || 6 done || ?? to go
« Reply #8 on: 06 / June / 2018, 15:59:41 »
ixus105_sd1300 has the problem but I could not fix it.
It looks different, lacks one "LDR" line. Attaching what didn't do it.
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

*

Offline koshy

  • *****
  • 1096
Re: Fixing short shutter press overrides: ?? Cams || 6 done || 1 to go
« Reply #9 on: 06 / June / 2018, 16:11:20 »
ixus95_sd1200 also shows the problem.

EDIT: The attached fixed it.
EDIT 2: The attached codegen.txt equivalent (hopefully) is untested.
« Last Edit: 06 / June / 2018, 19:10:16 by koshy »
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

 

Related Topics