CHDK firmware hack discussion (20)

zdravko

Member
Messages
48
Reaction score
1
Location
Bracknell/Berkshire, UK
This is a sequel to the old threads discussing the CHDK firmware. The CHDK fw is a hacked firmware for DIGIC II and DIGIC III cameras. Currently supported DIGIC II cameras are A610, A620, A630, A640, A710 IS, S2 IS and S3 IS. For now the supported DIGIC III cameras are G7 and A570, but there are attempts to port CHDK to G9 and S5 IS too. (See the FAQ for a complete list).

The CHDK fw implements new features like RAW, battery indicator, live histogram (RGB/luminance), zebra mode (blinking areas of over- underexposure), DOF calculator, scripts (intervalometer, exposure/focus ... bracketing etc.), text reader, file browser, calendar, games and much more. There are now several different builds, implementing features assisting taking 3D-Stereo photos, motion detection etc. New features get implemented frequently, so check the timeline for the latest changes, or the FAQ for a complete list.

The CHDK firmware does not touch the original firmware of your camera. It is an additional program which gets loaded into the memory of the cam. If you have a problem, just turn your cam off or remove the batteries, and the CHDK fw is gone.

For further information, a guide, download links and FAQ see the English WIKI:
http://chdk.wikia.com/wiki/CHDK

Timeline:
http://tools.assembla.com/chdk/timeline

Dear Vitalyb, GrAnd and all the others: Thank you so much for creating this wonderful piece of software!
http://chdk.wikia.com/wiki/Talk:THANKS

Some screenshots:

Main menu



Histogram (Blended) and Zebra overexposure indicator



Script menu



Link to the previous thread:
http://forums.dpreview.com/forums/readflat.asp?forum=1010&thread=25259569
 
Hopefully this isn't too silly of a question but...

Is it in the realm of CHDK to force the Auto mode on an S3IS to choose a lower ISO than it normally would?

I prefer to leave my camera in Auto mode (I got it so I could have Auto P&S a lot of the time, then have a lot of manual controls for when I really care) but the Auto on my S3IS chooses a pretty high ISO for almost any given situation (leading to Noise) and it would be nice is if there was a way to make the S3IS choose 2 step down from what it does out of the box for ISO to help avoid grain.

Thanks for any input!
 
CHDK currently won't allow you to limit the ISO range in the auto setting.

But I am curious why you don't use P-mode. Its nearly the same.

P-mode allows you to set the ISO, but still lets the camera to set the exposure and aperture. It also gives to access to more controls (although you can leave them in auto mode if you want; like the white balance control, ISO, etc).

Other than a test shot, I don't know if I actually ever used auto mode.
Hopefully this isn't too silly of a question but...

Is it in the realm of CHDK to force the Auto mode on an S3IS to
choose a lower ISO than it normally would?

I prefer to leave my camera in Auto mode (I got it so I could have
Auto P&S a lot of the time, then have a lot of manual controls for
when I really care) but the Auto on my S3IS chooses a pretty high ISO
for almost any given situation (leading to Noise) and it would be
nice is if there was a way to make the S3IS choose 2 step down from
what it does out of the box for ISO to help avoid grain.

Thanks for any input!
 
Mr Cat,

you are not doing anything wrong! This is a limitation in Ubasic_test.exe. There has simply not been implemented any support for the param and default commands. These are treated as REM instructions.

Maybe a future implementation.. Hmm.
 
Hi Divalent,

Playing again with the bracketing script I've found something else on prop 205 when flash is set no picture is taken with the bracketing script : the loop is performed 5 times (with default params) and exits within less than one second without picture ...

Therefore, I've added a flash test (using prop 16). The new script is given here after

bye
Alain

@title HDR bracketing
@param a delta en 1/3
@default a 3
@param b (nb images-1) 2
@default b 2


rem test de cohérence des valeurs

if b
if a
if a> 6 then a=6
if b > 6 then b = 6

rem on récupère la valeur du mode pdv
rem if not equal P, Tv, Av exit
get_prop 0 i
if i = -32764 then goto "ok"
if i = -32765 then goto "ok"
if i = -32766 then goto "ok"

print "P, Tv ou Av ..."
goto "lend"

:ok
rem test du flash
get_prop 16 i
if i = 2 then goto "ok2"
print "flash OFF ..."
goto "lend"
:ok2

rem on récupère la valeur de Exp compensation
get_prop 25 i

rem on fait la mise au point
press "shoot_half"

rem passage en valeur "physique" du nb steps diaph
a=a*32
rem calcul du EV de départ
s=i-b*a
b=b*2

rem attente du focus (prop 67)
p = 0
do
p = p +1
get_prop 67 j
if p = 200 then
print "focus impossible"
goto "lend"
endif
until j = 1

rem passage en manual focus
sleep 500
click "down"
sleep 500
release "shoot_half"
sleep 300

rem boucle de prise de vue durée controlée par prop 205
rem initial set of 25 & 26 for the first shot
set_prop 25 s
set_prop 26 s

for n=0 to b
click "shoot_full"
do
get_prop 205 w
until w=1
s=s+a
set_prop 25 s
set_prop 26 s

do
get_prop 205 w
until w1 ============= w not equal 1
next n

rem remise en focus auto
sleep 1000

click "down"
rem reset des valeurs intiales de EV
set_prop 25 i
set_prop 26 i
sleep 300

:lend
end
 
Alain,

if the flash is not off (i.e., not = 2), try just setting that property to "2". I found (IIRC) that this is effective in blocking a flash even when the flash mode was on. It doesn't mean it will work in this application, but worth a try rather than just booting you out of the script.

Cheers,

Divalent
 
Thanks for the response!

I am aware of P mode and the reason I don't like to use it is two fold:

The first (and silliest reason) is that it just plain bothers me that there is an auto setting that is basically broken. It basically seems to me a large part of the cameras supposed functionality simply isn't functional and (I guess you would call the the OCD) part of me wants it working as it should. Especially considering this hasn't been a problem in previous cameras (Canon and otherwise) that I have owned that were much lower end (and had no IS - which would make you think THOSE would be the ones to err in favor of high ISO to compensate for no IS).

The second (and real reason) is that I did buy this camera in large part for a P&S and as such I don't want to have to worry about ISO settings. While I am aware I can set P to be whatever ISO I want, I don't want to even have to do that. In simple situations (decent lighting, nothing odd like shooting out through a window etc) I want the camera to just do it's job: Take a decent shot.

I want to be able to hand the camera over to someone who doesn't know cameras without having to worry what ISO I left it at... isn't that the point of a point and shoot? It makes all the decisions for you?

It bothers me that what is aguably near the top of Canons consumer line of cameras fails to perform such a simple task, and not even through lack of ability (I understand this many pixels on such a small sensor is asking for noise in many situations, but when it's possible to get a shot with no noise, it really should).

Anyhow, that's my very long winded answer as to why I don't use P mode... As small an issue as setting one thing (ISO) on a camera with as many settings as the S3IS has would seem, it's 1 more than I want to have to worry about, especially when the camera is entirely capable of doing what I want of it, it was just programmed not to.
CHDK currently won't allow you to limit the ISO range in the auto
setting.

But I am curious why you don't use P-mode. Its nearly the same.

P-mode allows you to set the ISO, but still lets the camera to set
the exposure and aperture. It also gives to access to more controls
(although you can leave them in auto mode if you want; like the white
balance control, ISO, etc).

Other than a test shot, I don't know if I actually ever used auto mode.
 
I am aware of P mode and the reason I don't like to use it is two fold:

The first (and silliest reason) is that it just plain bothers me that
there is an auto setting that is basically broken.
Actually, it's not broken, its just that this camera has noise issues at 400 and 800. I suspect when its using 400 and 800 the aperture is wide open and the shutter is no faster than 1/50 or 1/60, and it really has no choice but to use them. (It doesn't know you have a tripod or are braced against a tree or car). It would be great if we could somehow limit the ISO auto range to 80-200 (that's the range I work with, unless I'm in a cave :) but unfortunately CHDK can't fix that (at least now). An ISO-auto-LO setting would be great.
... In simple situations (decent
lighting, nothing odd like shooting out through a window etc) I want
the camera to just do it's job: Take a decent shot.

I want to be able to hand the camera over to someone who doesn't know
cameras without having to worry what ISO I left it at... isn't that
the point of a point and shoot? It makes all the decisions for you?
ah, so that when you switch it into auto! (Thanks for the tip. Now I know what its for :)
Anyhow, that's my very long winded answer as to why I don't use P
mode... As small an issue as setting one thing (ISO) on a camera with
as many settings as the S3IS has would seem, it's 1 more than I want
to have to worry about, especially when the camera is entirely
capable of doing what I want of it, it was just programmed not to.
I can see the merit in wanting simplicity. But I'm wondering a bit about what are these "many settings" you are capable of making in AUTO mode: seems like you are limited to setting red-eye mode on the flash and raising the flash, and selecting the image size and quality; what else can you do? Can't set ISO, can't adjust exposure, can't alter white balance, contrast, sharpening, no color accents, adjust flash intensity, slow sync, flash curtain, alter the metering mode, focus lock, AE lock, etc. Using the auto mode also precludes you from using many of the built in automated functions (bracketing, intervalometer, etc).

OTOH, the initial settings in P-mode are those from AUTO, so your first use of P-mode will be identical (with the exception that now some of those errant button pushes that had no effect in auto mode will have an effect). Before my camera arrived I was alerted to that fact from the friendly folks here, so I just started out in p-mode from day one.

Anyway, just ramblin'

Regards,

Divalent
 
Actually, it's not broken, its just that this camera has noise issues
at 400 and 800. It doesn't know you have a
tripod or are braced against a tree or car).
I consider it broken because auto is supposed to choose the best settings (at least in simple situations) for a picture. Now bear in mind that my A400 picke lower ISOs for the same conditions (yes I know there are a lot of differences in sensor density etc) and it didn't have any IS, my Nikon 5400 picked lower ISO settings on auto, also with no IS, both were able to keep shutter speed high enough that I didn't have blurry photos and this was just hand heald.

Bear in mind that when the S3IS Auto chooses ISO 200 I am easily able to get the shot, blur free at ISO 100 in P mode... there is no reason to go that high at all and I could with IS available there is even LESS reason.

I agree it doesn't know if I am on a tripod or whatnot, but I am talking situations wehre there is enough light that even on an non IS camera at lower ISO, in the average users hand once can routinely get blur free shots... I can forgive a little fudge here and there, but we are talking choosing ISO 200 when ISO 100 is more than enough and even 80 would cut it...

It would be great if we
could somehow limit the ISO auto range to 80-200 (that's the range I
work with, unless I'm in a cave :) but unfortunately CHDK can't fix
that (at least now). An ISO-auto-LO setting would be great.
I agree, and I was hoping CHDK could do something of the sort. And I think I didn't make it very clear in my last post that even keeping it between ISO 80 and 200 means that if I just shot 200 to get a semi dark spot, I now have to hit the ISO button 6 times to get back down to ISO 100 when I am shooting something brighter... that just seems silly on a camera that has an Auto mode... Auto mode should allow me to not have to hit anything but zoom and shutter in most normal situations.
ah, so that when you switch it into auto! (Thanks for the tip.
Now I know what its for :)
Yeah, yeah I know... "who uses Auto mode anyway?" :P

Well I do... all I can say is for years I pointed and snapped hundreds of good to great pictures with auto mode on my lesser digicams... it seems like a real step backwards that I can't do it on this one.
I can see the merit in wanting simplicity. But I'm wondering a bit
about what are these "many settings" you are capable of making in
AUTO mode
I was referring to P mode... you can set so many things in P mode, whats the difference if you have to set 1 little setting, the rest are all still taken care of automatically right? I am sure for DSLR and pro users only one setting is like buttah... but for me it's the difference between not having to worry about anything, and having to worry about something... it's the difference between a 6 speed and an automatic clutch. You see what I am getting at...

It may sound spoiled but after years of being able to rely on auto, I suddenly find myself with poor shots becuase I forgot to cycle back to ISO 80 from ISO 200 for the second half of my shots. And neither the LCD nor the EVA provide the detail necessary to spot when noise is creeping in to ruin a shot so it is up to spotting that tiny ISO indicator. I know you are probably saying "that's your fault for not keeping track of your settings" well I say that's the cameras fault for not being able to make easy decisions in Auto mode.

Have you ever caught yourself right after shooting something, spinning around, seeing the perfect shot right in front of you, but you missed it becaues you had to button your way through a few settings? Auto should be there (especially for those of us who aren't as smooth at it, or just plain don't have use for it as much) so we don't have to miss those. In the 6 button presses between ISO 200 and 80 (not to mention the time it takes me to figure out I what ISO I need to be at) I could easily miss a great shot... When you go DSLR you kind of give up that option, but the S3IS is supposed to have it.
OTOH, the initial settings in P-mode are those from AUTO, so your
first use of P-mode will be identical (with the exception that now
some of those errant button pushes that had no effect in auto mode
will have an effect). Before my camera arrived I was alerted to that
fact from the friendly folks here, so I just started out in p-mode
from day one.
I can apprecaite the rest of it is the same, but again, it comes down to having to do something or having to do nothing... that's the biggest difference I can think of. The step from having to think about nothing to thinking about even one thing is bigger in my opinion than the difference from thinking about one thing and thinking about 30 things.

As I said before, it could easily require me to hit the ISO button 6 times (assuming I don't accidentally overshoot my desired ISO) just to adjust for shooting from a slightly shady tree area to the patch of grass just outside the shade of the tree.

It's like buying a really nice car that is manumatic and the automatic always puts you one gear too low, so you have to use the manual side. Is it that hard to shift with an electronic shifter and no clutch to worry about? No. But I would sure feel like it was broken if my new $65k Mercedes couldn't even handle shifting as well as a Ford Taraus...
Anyway, just ramblin'
Ramblin right along with ya :)
 
I don't get what the big deal is. Just create your own favorite "Auto" mode and store all its settings for use on the Custom option of your mode-dial.

You like low ISO and frequently shoot in dimmer lighting conditions. So?

Put your camera in Av mode, set the aperture wide open. Set the ISO to 100. Press Menu, and scroll to Safety-Shift. Turn it on. (Set any other favorite auto options, like auto-flash, auto-white-balance, etc.) Scroll down in the Menu to "Save Settings".

There you go. All done. Your own personalized "Auto" mode. Now every time you put your camera in C mode, it will automatically be in Av mode, it'll choose the widest aperture at the fastest possible shutter speed for ISO 100. With Safety-Shift on should lighting conditions be too bright and it can't compensate with a fast enough shutter speed then it will close down the Aperture too to make sure you'll get the right exposure.

You had all you needed right there in front of you, if you would have just read the manual. You don't need CHDK to do this for you. You just need to learn how to use your camera. Asking CHDK do things like this for you would only add fuel to the fire, making things even more confusing for you than they apparently already are.
 
  • With the GrAnd SVN version, it even does not compile..
the functions GetZoomLensCurrentPosition, GetZoomLensCurrentPoint
and VbattGet are missing I have to find them in the IDA.
It's normal situation. Especially for Digic3-based cameras. Because all automatic search based on the procedures information got fot Digic2.
I have read several time the "Adding support for new camera" page...
I've copied the article to the CHDK-wiki: http://chdk.wikia.com/wiki/Adding_support_of_a_new_camera
So, feel free to expand it if you have more detailed description of the process.

The help from guys who already ported any camera will be very appreciated.
 
Our CHDK-wiki fell into top100 of wikia.com by traffic this week.
It's the first time a product-related wiki has achieved that.
Wow, congratulations and thanks to everyone, that's nice to hear! I would not have thought that the CHDK was getting so much user attention.
 
Divalent,
if the flash is not off (i.e., not = 2), try just setting that
property to "2". I found (IIRC) that this is effective in blocking a
flash even when the flash mode was on. It doesn't mean it will work
in this application, but worth a try rather than just booting you out
of the script.
That makes sense ! Here is the updated version.
Thanks.
Bye
Alain

@title HDR bracketing
@param a delta en 1/3
@default a 3
@param b (nb images-1) 2
@default b 2


rem test de cohérence des valeurs

if b
if a
if a> 6 then a=6
if b > 6 then b = 6

rem on récupère la valeur du mode pdv
rem si P, Tv, Av sortie
get_prop 0 i
if i = -32764 then goto "ok"
if i = -32765 then goto "ok"
if i = -32766 then goto "ok"

print "P, Tv ou Av ..."
goto "lend"

:ok
rem test du flash
get_prop 16 f
if f = 2 then goto "ok2"
print "flash OFF ..."
set_prop 16 2
:ok2

rem on récupère la valeur de Exp compensation
get_prop 25 i

rem on fait la mise au point
press "shoot_half"

rem passage en valeur "physique" du nb steps diaph
a=a*32
rem calcul du EV de départ
s=i-b*a
b=b*2

rem attente du focus (prop 67)
p = 0
do
p = p +1
get_prop 67 j
if p = 200 then
print "focus impossible"
goto "lend"
endif
until j = 1

rem passage en manual focus
sleep 500
click "down"
sleep 500
release "shoot_half"
sleep 300

rem boucle de prise de vue durée controlée par prop 205
rem initial set of 25 & 26 for the first shot
set_prop 25 s
set_prop 26 s

for n=0 to b
click "shoot_full"
do
get_prop 205 w
until w=1
s=s+a
set_prop 25 s
set_prop 26 s

do
get_prop 205 w
until w1 ====================== W not equal 1
next n

rem remise en focus auto
sleep 1000

click "down"
rem reset des valeurs intiales de EV et flash
set_prop 25 i
set_prop 26 i
set_prop 16 f
sleep 300

:lend
end
 
My Canon camera, the a710is, dosen't write the used ISO value for the image in its EXIF field in AutoISO mode. I must use program ExifAuto from http://home.wi.rr.com/****/ExifAuto.htm to read and write ISO to Exif my photos.

I want new function in CHDK -write to EXIF field in AutoISO mode- -is possible?
 
Now I must start camera,press PRINT button,press Shoot button to execute script.
Is it possible make the last used scripts execute automatically at startup?
 
next idea

if I plug camera to USB (or use pilot) start script

this option must be switch in menu between:
-shot/execute script
 
A really good idea.

One nice thing with the remote is if the camera is turned off, then it will power up (to play mode) when you press the remote the first time. If you then could autostart the remote script it could enter record mode to take pictures.
 
A really good idea.
One nice thing with the remote is if the camera is turned off, then
it will power up (to play mode) when you press the remote the first
time. If you then could autostart the remote script it could enter
record mode to take pictures.
Oh cool. I didn't realize that would happen with the USB remote signal, but knowing it turns on the camera normally when plugging in the USB cable, I see why it would do that. What a great power-saving feature. Do your wildlife photography set up, but don't press the USB remote until you know a critter is in the area to wake up the camera.

So, what you people are saying is ...

1) A CHDK config option of "Start-Up: [Normal] / [ALT] / [Script]" ([script] being the combo of alt+script, [alt] option only needed in case you want to NOT run a script but still just press the shutter button once to start a script after powering up)

and

2) An accompanying uBASIC command of "exit_alt" (or end_alt, or ...), not just your usual "end" command. Which ... provides for some interesting possibilities, since exiting [ALT] mode while a script is running means it will pick up right where it left off when you enter [ALT] mode again. It could be used with some print statements to tell the user to make some changes manually, and it exits [ALT] mode (putting script on pause), you do those changes, then manually enter [ALT] mode again and the script resumes after that commercial-break words/instructions from your sponsor. :-)

So, when powering up via USB (or on/off switch) it might automatically run a script. Or it might run a script to set as many camera functions as you want, then the script itself could exit [ALT] mode. Thereby giving you an unlimited number of Custom memorized start-up modes and remote shooting functions? One script itself having many user defined variables so just itself could act like a nearly infinite number of custom shooting choices (the settings remembered from one session to the next of course, just like usual script behavior). Example: one person wanted an easy way to set his zoom setting to get rid of some vignetting every time when using a tele-converter. On power-up the camera would do that for him from a simple script, then exit the script and alt mode.

Oh, we'd need one more uBASIC command "camera_sleep", or "power_off".

Very interesting ... :-)
 

Keyboard shortcuts

Back
Top