CHDK firmware hack discussion (8)

Started May 19, 2007 | Discussions
GrAnd Regular Member • Posts: 325
CHDK firmware hack discussion (8)

This is a sequel to the old threads discussing the CHDK firmware.

The CHDK fw is a hacked firmware for DIGIC II cameras. Currently supported cams are A610, A620, A630, A640, A710IS and S3IS (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. 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://scratchpad.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!
Some screenshots:

Main menu

Histogram (Blended) and Zebra overexposure indicator

Script menu

The old discussion threads:
1. http://forums.dpreview.com/forums/readflat.asp?forum=1010&thread=21263144
2. http://forums.dpreview.com/forums/readflat.asp?forum=1010&thread=21995907
3. http://forums.dpreview.com/forums/readflat.asp?forum=1010&thread=22706343
4. http://forums.dpreview.com/forums/readflat.asp?forum=1010&thread=22915656
5. http://forums.dpreview.com/forums/readflat.asp?forum=1010&thread=22966768
6. http://forums.dpreview.com/forums/readflat.asp?forum=1010&thread=23051418
7. http://forums.dpreview.com/forums/readflat.asp?forum=1010&thread=23185668

harvester Contributing Member • Posts: 693
Re: CHDK firmware hack discussion (8)

GrAnd wrote:

Build #67
+ Scripts: Added support of xor operation ('^') and unary plus/minus

May I ask what this exactly means? I've found an 'xor' explanation here
http://en.wikipedia.org/wiki/XOR
but what is 'unary plus/minus'?

microfunguy Regular Member • Posts: 234
Re: Compiling CHDK under Windows

I will remove Cygwin as I do not need it.

When I type 'gmake' it prints the 'Usage' text and then :-

'i was unexpected at this time'
gmake: [all-recursive] Error 255.

OP GrAnd Regular Member • Posts: 325
Re: CHDK firmware hack discussion (8)

harvester wrote:

GrAnd wrote:

Build #67
+ Scripts: Added support of xor operation ('^') and unary plus/minus

May I ask what this exactly means? I've found an 'xor' explanation
here
http://en.wikipedia.org/wiki/XOR
but what is 'unary plus/minus'?

Just plus and minus operations which do not have left operand. For example:
a = -1;
http://en.wikipedia.org/wiki/Unary_operation

microfunguy Regular Member • Posts: 234
Re: Compiling CHDK under Windows

Excellent !

That now compiles for the A620.

The environment variable used by all other programmes on my system is 'path'.

For CHDK, I had to create a new variable 'PATH' !!

Now all I need to do is find out how to remove Cygwin from my system.

I will do that next.

microfunguy Regular Member • Posts: 234
Re: Compiling CHDK under Windows

For CHDK, I had to create a new variable 'PATH'

Hmmm .... that has deleted my existing 'path' variable, that should mess-up a lot of applications.

If I can find-out where the environment variables are stored, I should be able to copy 'path' from my mirror disk.

Many aplications require 'path', CHDK requires 'PATH'.

What is the answer to this problem ?

OP GrAnd Regular Member • Posts: 325
Re: Compiling CHDK under Windows

microfunguy wrote:

For CHDK, I had to create a new variable 'PATH'

Hmmm .... that has deleted my existing 'path' variable, that should
mess-up a lot of applications.

If I can find-out where the environment variables are stored, I
should be able to copy 'path' from my mirror disk.

Many aplications require 'path', CHDK requires 'PATH'.

What is the answer to this problem ?

Sorry, I hardly understand what the problem is.
You do not have to delete any old PATH variables.

BTW. Environment variables in Windows are cese insensitive.

microfunguy Regular Member • Posts: 234
Re: Compiling CHDK under Windows

You do not have to delete any old PATH variables.

I did not delete the two 'path' (lower-case) variables, the system deleted them when I added the new 'PATH' (upper-case) variables !

I do not know how.

I am trying to read NTUSER.dat from my mirror drive so that I can look at HKU/Environment and see what the value of 'path' was.

So far, I am unable to read it.

microfunguy Regular Member • Posts: 234
Re: Compiling CHDK under Windows

I am trying to read NTUSER.dat from my mirror drive so that I can
look at HKU/Environment

The environment variables are in HKCU/Environment.

harvester Contributing Member • Posts: 693
Re: Compiling CHDK under Windows

microfunguy wrote:

I did not delete the two 'path' (lower-case) variables, the system
deleted them when I added the new 'PATH' (upper-case) variables !

I do not know how.

I also tried the instructions out of curiosity and it works perfectly for me. I now compiled my own CHDK version

I did not have any problems with the path variables.

There was no such user variable, but a system variable called "Path" (value: C:\WINDOWS\system32;C:\WINDOWS;...).

Then I added a user variable called "PATH" (value: D:\CHDK\gcc\bin) and this worked great. My normal "Path" system variable was not deleted.

OP GrAnd Regular Member • Posts: 325
Re: Compiling CHDK under Windows

microfunguy wrote:

You do not have to delete any old PATH variables.

I did not delete the two 'path' (lower-case) variables, the system
deleted them when I added the new 'PATH' (upper-case) variables !
I do not know how.

I am trying to read NTUSER.dat from my mirror drive so that I can
look at HKU/Environment and see what the value of 'path' was.

So far, I am unable to read it.

I hope you did modify User Variables section. On my system in this section there were no meaningful values in PATH variable.

In System Variables my PATH variable is the following:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\QuickTime\QTSystem

microfunguy Regular Member • Posts: 234
Re: Compiling CHDK under Windows

I hope you did modify User Variables section.

I changed it in User and System, 'path' was also deleted from them.

It is not important, as soon as I get a problem with an application I will know where to look.

I have now added a third line to depth-of-field display to show stereo deviation.

At the moment it says 'inf', that is OK I will sort it out.

When I have checked the result of al the calculated values I will send you the details.

For now, I am using fixed values for two parameters that ideally would be user variables.

My next task is to see how to print a word in a red colour.

microfunguy Regular Member • Posts: 234
Re: Compiling CHDK under Windows

My next task is to see how to print a word in a red colour.

Well, that was easy enough, I will now check the displayed results against some hand-calculations.

I will do a more precise calculation of depth-of-field that is accurate at macro distances.

I will use a circle-of-confusion value of 0.006mm for the A620, the same value that you use.

I am guessing image-width on 1/1.8" cameras (such as A620) is about 7.15mm.

*******************************************************
On all the cameras CHDK works with, do they all have 1/1.8" sensors ?
*******************************************************

If not, I guess that information would have to be added at compile time.

harvester Contributing Member • Posts: 693
Re: Compiling CHDK under Windows

microfunguy wrote:

On all the cameras CHDK works with, do they all have 1/1.8" sensors ?

No, A710 and S3 have smaller 1/2.5" sensors.

ursamajorRO
ursamajorRO Regular Member • Posts: 267
Re: Compiling CHDK under Windows

Excuse my lamer question, but what are for that compilated versions? I made the compilation, it works until the end without errors, but I don't obtain nothing... The result was a A610.FIR file, but I don't find it. Where that file is?
Can you explain me the process? Thank you.

 ursamajorRO's gear list:ursamajorRO's gear list
Fujifilm FinePix F40fd Canon PowerShot SX510 HS Canon EOS 550D Olympus PEN E-PL3 Canon EF 50mm f/1.8 II +5 more
microfunguy Regular Member • Posts: 234
Re: Compiling CHDK under Windows

I don't obtain nothing... The result was a A610.FIR
file, but I don't find it. Where that file is?

In the folder that has folders core, doc, lib, include, etc do you have a 'bin' folder ?

If not, create one and run gmake again.

In the 'bin' folder you should then find diskboot.bin and the FIR file.

If necessary, rename the FIR file to PS.FIR and copy both to your SD card.

Frank43 Senior Member • Posts: 1,912
Re: CHDK firmware hack discussion (8)

harvester wrote:

What is 'unary plus/minus'?

Normally + or - require two parameters as in 4 + 3 or 4 - 3

unary +- applies to a single parameter as in -5 or +5. Unary + is not very useful but is usually provided to be consistent.

Frank

ursamajorRO
ursamajorRO Regular Member • Posts: 267
Re: Compiling CHDK under Windows

Yes, you've right. I don't had the BIN folder. I have now both, the .FIR and the .BIN file. And...? They are differences between that files and GrAnd's files? Can I modify some options into the .FIR file (for example my old request , saving only in RAW mode)?

 ursamajorRO's gear list:ursamajorRO's gear list
Fujifilm FinePix F40fd Canon PowerShot SX510 HS Canon EOS 550D Olympus PEN E-PL3 Canon EF 50mm f/1.8 II +5 more
harvester Contributing Member • Posts: 693
Re: Compiling CHDK under Windows

ursamajorRO wrote:

Yes, you've right. I don't had the BIN folder. I have now both, the
.FIR and the .BIN file. And...? They are differences between that
files and GrAnd's files?

If you compile GrAnd's files without modyfing them, there are no differences.

Can I modify some options into the .FIR
file (for example my old request , saving only in RAW mode)?

Yes, if you know C. I guess you would have to tell the cam that it should delete every new JPG file directly after taking the picture. Please remember that you will also loose EXIF info that way, since they are only stored in JPG files, but not in RAW files.

Mato34 Contributing Member • Posts: 920
About S2

Excuse me if this has been discussed before in other thread (there is A LOT of info!!), but I've noticed that there is a version for the Canon S2, and I think that the S2 was using another program/hack rather than the HDK.

Is this right? There is an HDK version for the S2 now?

Thanks in advance!

-- hide signature --

Please, excuse my poor english...

 Mato34's gear list:Mato34's gear list
Nikon 1 J5
Keyboard shortcuts:
FForum MMy threads