SX10 Shutter Speeds - page 5 - General Discussion and Assistance - CHDK Forum

SX10 Shutter Speeds

  • 47 Replies
  • 18607 Views
*

Offline RaduP

  • *****
  • 926
Re: SX10 Shutter Speeds
« Reply #40 on: 10 / October / 2009, 01:50:16 »
Advertisements
Actually, forget about saving and restoring the registers, that's only needed if you want to be able to continue. If you just need the values, just call a function that saves them to the SD card.

Re: SX10 Shutter Speeds
« Reply #41 on: 10 / October / 2009, 09:33:38 »
I had a bit of a brainstorm and realized when I was doing my checks before, I left in the 960 that you were using (1/1024s), but realized that this may be giving me false feedback as the minimum shutter is 1/3200, so I retried my test using 1150 (1/4040s) and found that the min shutter is getting trimmed before reaching apex2us
If it's being trimmed before apex2us, then reinstating the original value in apex2us should do the trick. Unless there is another check later on, or it is a fundamental limit of the hardware or something.


Where can I get the original value from?  Is it set as a global variable?

Re: SX10 Shutter Speeds
« Reply #42 on: 10 / October / 2009, 12:25:01 »
OK, Finally some good news on this.  I did a careful test of a build with hardwired shutter speeds of 300us and 150us (1/3300s and 1/6600s) for shutter speeds selected over or under 1s respectively.  The two photos have an obvious exposure difference, so it looks like higher speed shutters are capable.  Now it's just a matter of figuring out how to do it.  I can either try to get apex2us to reinstate the correct shutter speed as suggested, or it may be better to track down the trimming function (but perhaps more difficult to find).  I also wonder if the same is true for aperture (I do realize that aperture has much more defined physical limitations than shutter speed), but first things first.
Is it also possible that there is a lookup table of some sort in ther firmware that holds the maximum allowable shutter speeds?

Re: SX10 Shutter Speeds
« Reply #43 on: 12 / October / 2009, 21:36:17 »
I found an interesting section of the firmware:

fffe6a80:    04000126    streq   r0, [r0], #-294
fffe6a84:    04200160    strteq   r0, [r0], #-352
fffe6a88:    04400180    strbeq   r0, [r0], #-384
fffe6a8c:    04600240    strbteq   r0, [r0], #-576
fffe6a90:    046002a0    strbteq   r0, [r0], #-672

These values are the apex96 values for AV:
294: 2.8
352: 3.6
384: 4.0
576: 8.0
672: 11.0

Which (except for the 11.0) are coincidentally the cusp values where the shutter speed limits get changed
2.8 = 1/1600
3.6 = 1/2000
4.0 = 1/2500
8.0 = 1/3200

So it could be part of a lookup table, except I haven't found reference to the relative shutter speeds yet.


Re: SX10 Shutter Speeds
« Reply #44 on: 13 / October / 2009, 08:55:24 »
Don't know why I didn't notice before, but the first half of each value is the shutter speed apex96:

04000126 = 0400: 1024 (Tv 1/1625), 0126: 294 (Av 2.89)
04200160 = 0420: 1056 (Tv 1/2048), 0160: 352 (Av 3.56)
04400180 = 0440: 1088 (Tv 1/2580), 0180: 384 (Av 4.00)
04600240 = 0460: 1120 (Tv 1/3251), 0240: 576 (Av 8.00)
046002a0 = 0460: 1120 (Tv 1/3251), 02a0: 672 (Av 11.31)

Which interestingly confirms Av 11 as a valid aperture even though the camera interface doesn't allow it.  This is one of the overrides that I could confirm to work, and it would display on-screen as 11.0.

I can't find a direct reference to these addresses yet.  Because they are each only half the value, would they be loaded as a hald-word instead? (LDRH rather than LDR)


Re: SX10 Shutter Speeds
« Reply #45 on: 13 / October / 2009, 11:32:04 »
Success!  I ended up going back to basics for now and did it the easy way by reinstating the set values as suggested.  I altered apex2us in generic/wrappers.c to:
Code: [Select]
int  apex2us(int apex_tv){
#if CAM_EXT_TV_RANGE
 short tv;
 tv = shooting_get_tv96();
 if (tv<-576 || tv>960) return 1000000.0*pow(2.0, -tv/96.0);
 else return _apex2us(apex_tv);
#else
 return 0;
#endif
}

I suppose I could also simply change the if function evaluation to:
Code: [Select]
if (tv<-576 || tv!=apex_tv) return 1000000.0*pow(2.0, -tv/96.0);

For the generic sense.  Then it would only use it when the apex_tv value has been changed by the code or if a long shutter speed has been selected.  Is this something that should be tested and perhaps added to the trunk for other versions that may encounter the problem.

-tgq

*

Offline fe50

  • ******
  • 3147
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: SX10 Shutter Speeds
« Reply #46 on: 14 / October / 2009, 01:08:45 »
@barberofcivil
Nice !
I hope can do some tests this evening / the next few days...

Re: SX10 Shutter Speeds
« Reply #47 on: 14 / October / 2009, 11:10:07 »
Based on what I have found here, I believe that the aperture is getting limited within the firmware as well and am trying to find it's location to see if something can be done about it (similar to the shutter speed fix).
So for I have found one area in particular that seems suspicious:

fffa06150:    e3700e2a    cmn   r0, #672   ; 0x2a0
fffa06154:    b59f0398    ldrlt   r0, [pc, #920]   ; ffa064f4: (fffffd60)

This checks a value against (-)672 (apex96 value for Av 11 which is what I have found to be the camera set  limit) and if it is less than that, sets it to -672 (fffffd60).  This seems similar in nature to the 64s limit code found for shutter speed and replaced with apex2us.

-tgq


 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal