CHDK firmware add-on discussion (22)

Started Nov 26, 2007 | Discussions
zdravko
Junior MemberPosts: 48
Like?
CHDK firmware add-on discussion (22)
Nov 26, 2007

This is a sequel to the old threads discussing the CHDK firmware add-on. CHDK is a firmware enhancement that operates on a number of 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 firmware add-on 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, remote triggered shooting, longer exposure times (up to 65 seconds!) etc. New features get implemented frequently, so check the timeline for the latest changes, or the FAQ for a complete list.

The CHDK firmware add-on does not touch the original firmware of your camera. It is an additional program which gets loaded into the memory of the camera. If you have a problem, just turn your camera off or remove the batteries, and the CHDK add-on 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=25564490

Gary Lansing
Regular MemberPosts: 122
Like?
New CHDK Forum
In reply to zdravko, Nov 26, 2007

There is now a new CHDK Forum dedicated to CHDK

http://chdk.setepontos.com/index.php

It's much easier to follow posts and threads on a discussion forum of that type. You can also edit all your posts, instead of the rudimentary editing allowed here.

It's just starting out so the person who is contributing could use your feedback on what topic categories and discussion forums you might like to see there.

Another huge plus is that if you need to post a script or some code, there are the [code] commands to embed your code between. No longer will you be frustrated with this forum stripping out your important characters and end up making things even more confusing for everyone.

Reply   Reply with quote   Complain
GrAnd
Regular MemberPosts: 325
Like?
Media blog
In reply to zdravko, Nov 26, 2007
Reply   Reply with quote   Complain
jeff666
New MemberPosts: 24
Like?
S5IS Firmware and DryOS research going on
In reply to zdravko, Nov 26, 2007

In case people here haven't noticed.

The Firmware of an S5IS has been dumped. It runs DryOS.

See: http://forums.dpreview.com/forums/read.asp?forum=1010&message=25757571
and: http://chdk.wikia.com/wiki/DryOS_Porting

Cheers.

Reply   Reply with quote   Complain
jeff666
New MemberPosts: 24
Like?
Re: New CHDK Forum
In reply to Gary Lansing, Nov 26, 2007

Gary Lansing wrote:

There is now a new CHDK Forum dedicated to CHDK
http://chdk.setepontos.com/index.php

Good thing. The DPreview-Forum is really awful.

There is still one important thing: Create a useful Board structure. I see that this is already being discussed but unless it is done only few people will post.

A minor issue is the color. It's way to bright. That may be personal preference, but I prefer a dark background. Maybe there's a way to change the theme in the user settings.

Cheers.

Reply   Reply with quote   Complain
Gary Lansing
Regular MemberPosts: 122
Like?
Re: New CHDK Forum
In reply to jeff666, Nov 27, 2007

jeff666 wrote:

Gary Lansing wrote:

There is now a new CHDK Forum dedicated to CHDK
http://chdk.setepontos.com/index.php

Good thing. The DPreview-Forum is really awful.

There is still one important thing: Create a useful Board structure.
I see that this is already being discussed but unless it is done only
few people will post.

A minor issue is the color. It's way to bright. That may be personal
preference, but I prefer a dark background. Maybe there's a way to
change the theme in the user settings.

Cheers.

Well, I'm not too crazy about red either. But things like that will come in time. Most BB systems allow all manner of plugins and themes that are user selectable. I've never ran the variety that he's using but I see that there's a theme credit at the bottom, so I'm sure more options will show up as the owner of the system learns their way around. Just having that [code][ code] switch in posts will be a godsend. Finally, scripts can be discussed without having to second guess what characters were truncated or replaced. How confusing and frustrating that is, for all parties concerned, only adding to more misunderstanding.

I'm looking forward to seeing some controlled test sample posts of the new long shutter speeds. (attachments are allowed there!) I randomly tested those again last night, but only did a zoomed in preview on them to see what they were like for noise. In properly exposed areas at 65-second shutter speeds even ISO 800 has no more noise than when taken in daylight. The same noise levels you expect during daylight for each ISO are the same kind you'll find in minute long exposures. What a phenomenal addition that is!

Reply   Reply with quote   Complain
microfunguy
Regular MemberPosts: 234
Like?
Fingalo's 'set_led' with A560 and A570
In reply to zdravko, Nov 27, 2007

I have guessed a few LED locations to try to make Fingalo's 'set_led' command work with the A560 and A570 (not just the s2is and s3is).

You can download here http://rapidshare.com/files/72636086/set_led_Test.zip.html

Please let me know if it works.

David

Reply   Reply with quote   Complain
microfunguy
Regular MemberPosts: 234
Like?
Re: Fingalo's 'set_led' with A560 and A570
In reply to microfunguy, Nov 27, 2007

Fingalo,

I sent you the code for this yesterday but my email has just been returned as it cannot be delivered.

I used the email address that is on your webpage.

David

Reply   Reply with quote   Complain
kangxn
New MemberPosts: 10
Like?
Continue discussion on the universal dumper idea of mx32
In reply to zdravko, Nov 27, 2007

Just want to continue discussion of the universal dumper idea of mx32. I have to admit at the first time I saw it. I thought it was some day dreams, but now I think it is theoretically doable.

The technical problems to have the dumper running in the live OS are:

1: How to prevent the live OS overwriting the space that dumper sits.
2: How to re-gain control when the live OS is running.
3: How to find the FileSystem related API entries in a new live OS.

For 3, it is possible to find the api entry points using function signature, with enough FW dumps we should be able to solve this problem for most of the models.

The hard part is 1 & 2, If we were able to modify the ROM, it could be easy. but it is impossible. mx32's proposal is to use cpu's memory protection unit, I think this is like gamble. I prefer to use the method which CHDK uses currently.

CHDK has the same requirement to hide it self from the live OS. currently, we copy the initialization assembly code from the firmware into CHDK itself. In the initialization code, Canon FW passes the size of its data segment and BSS segment to the init routine. we enlarge the size, and call those routines as original Canon FW does, at last, jump to "the next point" in Canon FW and return control to the FW. so that CHDK cheats the FW and it can hide in Canon FW's data segment.

After some reading on both VXworks and DryOS init code, I found they are mostly identical, I can see the data segment and size at the beginning of the code. So the same trick can work with both vxworks and dryos. problem 1 can be solved if we can use this trick.

How to re-gain control when the OS is running? this is pretty easy, since we copy the code into CHDK, we always have the control before we decide to return it to the OS. A better way may be to create a task using the CreateTask API provided by the FW(thanks god this one is easy to find in Canon FW), after the task system is initialized. so that we can always have cpu time to run during the whole period the OS is running. This is useful if some IO systems like SD card aren't initialized at early stage. problem 2 is solved, too. (Even CHDK for dryos can use this approach, maybe)

So only the most hard problem is left: How can we copy the code like we do in IDA without dumping out the FW? Well. that's why I say this idea is "theoretically doable". It is possible that we write something like a disassembler, it reads the code from the beginning, tracks the execution path and copy the binary opcodes to RAM, then modify the binary codes to fix all the reference to old data and procedures., at last, apply our fix. This sounds like impossible, but it is the major technique used in decent software protectors like StarForce, Themida, ACProtect... Since X86 is a more complex and variable length instruction set, ARM should be much simpler than it. Anyway it require lots of code work, and is not something that can be done quickly....

(In more detail, the idea of copying code is not always doable because sometimes people use LDR PC, reg to do jump, but it seems to be ok for vxworks/dryos initialization code, we don't need to copy all the code in subfunction , we only need to copy the top level code as we do in CHDK, if there is some jump-by-reg code, we don't know how to copy either)

Thanks

Reply   Reply with quote   Complain
ranocchio
Regular MemberPosts: 104
Like?
fingalo 124
In reply to kangxn, Nov 27, 2007

I tested fingalo's 124 on my A610
works perfectly with long exposure times

Reply   Reply with quote   Complain
fingalo
Junior MemberPosts: 41
Like?
Re: Fingalo's 'set_led' with A560 and A570
In reply to microfunguy, Nov 27, 2007

I have updated to my official email address on the web page, same as registered here.
(Now I know why I never got any emails there
Thanks David!

Reply   Reply with quote   Complain
mx32
New MemberPosts: 22
Like?
Re: Continue discussion on the universal dumper idea of mx32
In reply to kangxn, Nov 28, 2007

kangxn wrote:

Just want to continue discussion of the universal dumper idea of
mx32. I have to admit at the first time I saw it. I thought it was
some day dreams, but now I think it is theoretically doable.

lets move this discussion to the new forum http://chdk.setepontos.com/index.php/board,5.0.html

I hate this "sequel threads" thing
I also hope new forum allow email notifications

Reply   Reply with quote   Complain
jonquil
Forum MemberPosts: 59
Like?
Re: Fingalo's 'set_led' with A560 and A570
In reply to microfunguy, Nov 28, 2007

Hi!

I have been disappeared .. I will test the new build this weekend. (A560)

By the way, which are the expected results? any info link about the improvements of that release? I dont know what is "set_led" command for.

Bye!

microfunguy wrote:

I have guessed a few LED locations to try to make Fingalo's 'set_led'
command work with the A560 and A570 (not just the s2is and s3is).

You can download here
http://rapidshare.com/files/72636086/set_led_Test.zip.html

Please let me know if it works.

David

Reply   Reply with quote   Complain
microfunguy
Regular MemberPosts: 234
Like?
Re: Fingalo's 'set_led' with A560 and A570
In reply to jonquil, Nov 28, 2007

jonquil wrote:

I will test the new build this weekend.

Thanks.
Let us know how you get on.

By the way, which are the expected results?

Just turns various camera LED's on and off.

any info link about the improvements of that release?

I dont know what is "set_led" command

http://chdk.wikia.com/wiki/UBASIC/TutorialScratchpad#LED_Lamp_Control

and my alternative LED commands :-

http://chdk.wikia.com/wiki/UBASIC/TutorialScratchpad#Microfunguy.27s_SDM_.28StereoData_Maker.29_Builds

Previously, only the blue LED could be turned on/off.

set_led was only supported on s2is and s3is.

David

Reply   Reply with quote   Complain
kimvette
Senior MemberPosts: 1,254
Like?
Re: Fingalo's 'set_led' with A560 and A570
In reply to microfunguy, Nov 29, 2007

Question if you will pardon the tangent:

Why would Canon not offer some basic info to get a project like this going? One might say it would steal from their SLR sales, but quite honestly I do not think that one person who wants a DSLR will buy the S5 instead. I bought the S5 with the idea of buying a Nikon D200 (or now the D300) later - I am not and will not be a Canon DSLR customer (why? I have used and like Nikon DSLRs. I do not like the Canon DSLRs, even as nice as Canon's lenses are. Likewise, I really dislike Nikon P&S cameras.). I think that supporting projects like this would be a big boon to Canon's P&S sales and take away from their competitors' P&S sales, rather than cannibalize their own DSLR lines.

Has anyone contacted Canon for some basic info? Sure, they will probably cry "proprietary" and "trade secrets" but on the other hand you might encounter someone with a clue who recognizes the possible sales tool CHDK can be, and the "trade secrets" issue is moot since their competitors (Nikon, Ricoh, etc.) are probably buying samples and reverse engineering everything ANYHOW.

The only reason I bought the S5 when I did was I needed a fully manual camera right there and then and the S5 had misleading, glowing reviews which really didn't indicate just how bad the noise is at ISO200 and higher. Had I known about CHDK before buying, I'd have bought the S3 rather than the S5.

Reply   Reply with quote   Complain
Marty Too
Senior MemberPosts: 1,042
Like?
Motion Detection question
In reply to zdravko, Nov 30, 2007

I finally tried this feature with my A620. It seems that the camera's display has to be active for this to work - I could be wrong.

I turned the power off feature to off in the regular menu but the display off has an upper limit of 3 minutes.

If I want to leave the camera in the motion detection mode for more than three minutes what do I need to do? I used the stock script that I found on the wiki with no mods to the values.

http://chdk.wikia.com/wiki/UBASIC/Scripts:_Multipurpose_Motion_Detection

Reply   Reply with quote   Complain
RobHeath
Forum MemberPosts: 59
Like?
Re: Motion Detection question
In reply to Marty Too, Nov 30, 2007

Marty Too wrote:

I finally tried this feature with my A620. It seems that the
camera's display has to be active for this to work - I could be wrong.

I turned the power off feature to off in the regular menu but the
display off has an upper limit of 3 minutes.

If I want to leave the camera in the motion detection mode for more
than three minutes what do I need to do? I used the stock script
that I found on the wiki with no mods to the values.

Go to this section in the Wikia Firmware-Usage page

http://chdk.wikia.com/wiki/CHDK_firmware_usage#Misc

Then scroll down to the section "Disable LCD Off".

There's also a new dedicated CHDK discussion forum where people's questions might be answered more quickly and by more people than read these hit &miss scattered threads at dpreview.

At http://chdk.setepontos.com/index.php

Reply   Reply with quote   Complain
Marty Too
Senior MemberPosts: 1,042
Like?
Re: Motion Detection question
In reply to RobHeath, Nov 30, 2007

Thanks,

I still don't know why it didn't work well this afternoon as it seems it was in the ALT mode for not turning the LCD off. I will try it again to night.

My wife and I are spying on the dog who doesn't seem to do a heck of a lot when we are out of the house.

Reply   Reply with quote   Complain
Marty Too
Senior MemberPosts: 1,042
Like?
LCD auto off not working with pre14.grand148.md.cln.zsm-a620-100f-124.zip
In reply to Marty Too, Nov 30, 2007

I have it set it ALT and am in the ALT mode and the camera is powering down. So either this build is buggy or I need to tweak what is on my card.

pre14.grand148.md.cln.zsm-a620-100f-124.zip

Reply   Reply with quote   Complain
RobHeath
Forum MemberPosts: 59
Like?
Re: LCD auto off not working with pre14.grand148.md.cln.zsm-a620-100f-124.zip
In reply to Marty Too, Nov 30, 2007

Marty Too wrote:

I have it set it ALT and am in the ALT mode and the camera is
powering down. So either this build is buggy or I need to tweak what
is on my card.

pre14.grand148.md.cln.zsm-a620-100f-124.zip

You didn't read that section carefully enough. It won't override turning off when set to [ALT] mode whlie running a script. That's what [Script] mode is for.

Reply   Reply with quote   Complain
Keyboard shortcuts:
FForum MMy threads