CHDK firmware hack discussion (13)

Started Jun 29, 2007 | Discussions
rlx
rlx
Regular MemberPosts: 182
Like?
Re: Additions: edit number and print_screen
In reply to Russel_Sprouts, Jul 8, 2007

Russel_Sprouts wrote:

rlx wrote:

There is one problem with print_screen. If the file PR_SCREEN.TXT
already is on the card, when the camera is turned on, it seems that
the 'open file' does not write over the existing file. After

I wondered earlier, but didn't ask, why the (one) static filename
instead of writing to a sequential name? Or, a filename derived frorm
the datestamp? I guess the principal use of printing the screen is to
dump the "benchmarks" results page, eh?

There are many possibilities here, and one wants to keep that as simple
as possible and with a minimum number of additions to UBASIC. So,
as a first step I did the simplest thing.

Following your suggestion, one needs a file counter. So that would be
one couter per SD card I guess.

Regarding the problem I mentioned, I don't know why it was not raised before.

Richard

Reply   Reply with quote   Complain
fingalo
Junior MemberPosts: 41
Like?
Re: Additions: edit number and print_screen
In reply to rlx, Jul 8, 2007

I merged all changes, all is OK, working as expected!

I tested the problem you experience with open PR_SCREEN.TXT, but as far as I can see I do not get that problem?!

I turn on the camera, execute the script, all new info is written to the file, every time. I tested with a script where I can change the info written.

In MSDOS you would use create instead of open if you would overwrite an existing file always (if I remember correctly such ancient technology...).

And again, the number edit function is REALLY useful.

fingalo

Reply   Reply with quote   Complain
rlx
rlx
Regular MemberPosts: 182
Like?
Re: Additions: edit number and print_screen
In reply to fingalo, Jul 8, 2007

fingalo wrote:

I merged all changes, all is OK, working as expected!

I tested the problem you experience with open PR_SCREEN.TXT, but as
far as I can see I do not get that problem?!

The problem bacame apparent to me when I overwrote a larger file with
a smaller file. The fix is to add 'O_TRUNC' to the 'open' call as follows,

print_screen_d = open(print_screen_file, O_WRONLY~O_CREAT~O_TRUNC, 0777);

I uploaded the corrected code in the tar file. Everything should be fine now.

Russel is suggesting that newly created files be numbered. What is your feeling?

Thanks again for the feedback

Richard

Reply   Reply with quote   Complain
fingalo
Junior MemberPosts: 41
Like?
Re: Additions: edit number and print_screen
In reply to Russel_Sprouts, Jul 9, 2007

I made a fast test of a cls command. Very promising.

Regarding memory consumtion, I do not know! My knowledge of the inner workings of the SW is very limited.
I think GrAnd would have an idea of the memory constraints for adding features.

fingalo

Reply   Reply with quote   Complain
John NA87
Senior MemberPosts: 1,641
Like?
Why aren't jpgs and raws numbered the same?
In reply to zdravko, Jul 9, 2007

When I saved a pic with the A620, it saved the jpeg as img_0001.jpg and the raw as crw_0009.crw. I would think the two numbers should match up when saved. I emptied the card but left the 100CANON folder there and shot 3 more pictures. The jpegs were numbered 1,2,3 and the raws were numbered 2,3,4. I deleted all but the first jpeg and the first raw and renamed them both to 0001 and then shot a bunch of pictures and the jpegs and raws both ended up getting numbered the same this time. Seems like if you start with a blank card or turn on raw when there are a number of jpegs already on the card, the raw filename numbers won't match up exactly to the jpeg filename numbers. I find that really confusing.

Reply   Reply with quote   Complain
GrAnd
Regular MemberPosts: 325
Like?
Re: Additions: edit number and print_screen
In reply to fingalo, Jul 9, 2007

rlx wrote:

I have implemented a couple of additions to the CHDK.
EDIT NUMBERS. When editing a number in a menu,
PRINT SCREEN. I added function 'print_screen' to UBASIC.

fingalo wrote:

I have been working on the task to fix the problem of Ubasic
if ... then gosub ... else gosub ...
as decsribed on CHDK wiki, and also added a few more logical operators.

Your additions will be added in the next build.
Richard and fingalo - thank you for the great effort.

Reply   Reply with quote   Complain
GrAnd
Regular MemberPosts: 325
Like?
Re: Why aren't jpgs and raws numbered the same?
In reply to John NA87, Jul 9, 2007

John NA87 wrote:

When I saved a pic with the A620, it saved the jpeg as img_0001.jpg
and the raw as crw_0009.crw. I would think the two numbers should
match up when saved. I emptied the card but left the 100CANON folder
there and shot 3 more pictures. The jpegs were numbered 1,2,3 and
the raws were numbered 2,3,4. [snip]

Try to set "File No. Reset" option in the camera menu to "Off".

Reply   Reply with quote   Complain
GrAnd
Regular MemberPosts: 325
Like?
Build #144
In reply to zdravko, Jul 9, 2007

Build #144
+ Added new RAW support (from test branch)
+ Grid colors overridding

+ Menu: Increment for numbers is controlled by zoom rocker (1,10,100,1000,10000).

+ uBasic: Added "print_screen" command. Following "print_screen 1" whatever the script prints on the screen is also written to file ' CHDK/SCRIPTS/PR_SCREEN.TXT'. (Author: rlx)
+ uBasic: Added "cls" command. Clears mini-console.

  • uBasic: Fixed "if" "else" issue. (Author: fingalo)

+ uBasic: Added logical operations ("and", "or", "not"). Added relation operations ("=", ""). (Author: fingalo)

Reply   Reply with quote   Complain
rlx
rlx
Regular MemberPosts: 182
Like?
Re: Build #144
In reply to GrAnd, Jul 9, 2007

Indeed, thanks to Fingalo for fixing the IF command.

Reply   Reply with quote   Complain
alvevind
Forum MemberPosts: 66
Like?
Will macro_DOFstacker work with S3IS too?
In reply to Russel_Sprouts, Jul 9, 2007

Russel_Sprouts wrote:

macro DOFstacker script (for A6xx series cameras)

The S3IS also has 1 cm macro.
Should this script work for that camera too?
Or will the DOFstacker only work on the A6xx series?

Reply   Reply with quote   Complain
Russel_Sprouts
Regular MemberPosts: 257
Like?
Re: Will macro_DOFstacker work with S3IS too?
In reply to alvevind, Jul 9, 2007

alvevind wrote:

The S3IS also has 1 cm macro.
Should this script work for that camera too?
Or will the DOFstacker only work on the A6xx series?

Without modification, I cannot guess whether the script would support the S3IS.

AFAIK, the S3IS has two macro "modes". The "macro" mode can achieve focus down to 10cm. The "supermacro" mode can achieve focus down to 0cm (subject touching lens). So, unless you have the cam in supermacro mode, I'm not sure it will be able to address steps 0-100 (the nearest ten centimeters) and successfully achieve focus.

So, you'll try it out and let us know, eh?

Reply   Reply with quote   Complain
microfunguy
Regular MemberPosts: 234
Like?
Re: Build #144
In reply to GrAnd, Jul 10, 2007

GrAnd wrote:

+ Grid colors overridding

Thanks !

That will be very useful.

David

Reply   Reply with quote   Complain
alvevind
Forum MemberPosts: 66
Like?
3IS owners please test DOF stacker script
In reply to Russel_Sprouts, Jul 10, 2007

Unfortunately I do not own any Canon camera at this moment, but am about to buy one because of the features of the CHDK hack. Trying do decide between S3IS and A640, leaning towards S3IS.

It would be very helpful if someone owning an S3IS could test whether DOF stacker script will work for supermacro shots. (Hopefully resulting in a stack with focus bands from about 1 cm to infinity, if I've understood the functionality correctly.)

Reply   Reply with quote   Complain
Fragglerock
Forum MemberPosts: 68
Like?
Build 144
In reply to alvevind, Jul 10, 2007

Hi All,

What is new in the last RAW version ? Noise reduction ?

The after Dark Frame... disapeared in build chdk ?

Thanks.

Reply   Reply with quote   Complain
Russel_Sprouts
Regular MemberPosts: 257
Like?
Re: 3IS owners please test DOF stacker script
In reply to alvevind, Jul 10, 2007

alvevind wrote:

(Hopefully resulting in a stack with focus bands from about 1 cm to infinity,
if I've understood the functionality correctly.)

On the near end, the script will produce a stack which reflects apparent continuous DOF (not banding) if shot using an aperture setting in the f5.0 to f8.0 range. Banding (a bad thing) may be apparent if the subject distance is closer than 10cm or so and is shot using f2.8 or other small aperture setting (I didn't test the results at all aperture settings).

As I noted in the wiki docs, you would NOT want to use this script to shoot 0cm to infinity. First, obviously shots from all 65000 steps aren't going to fit on the storage card. Second, you NEED far fewer steps to cover the entire range. By step 400, the DOF for each frame is 5mm deep; past step 1500 or so (hyperfocal distance) one or two additional frames would be required.

A "zero to infinity" script certainly could be written, but plotted points along the DOF overlap scale (curve?) differ for each permutation of focal length x aperture. Even if you choose only one aperture to "support", that would require a table containing predetermined stepping points for each of the 9 variable focal lengths.

Reply   Reply with quote   Complain
dennismullen
Veteran MemberPosts: 8,682
Like?
Please include S80 in hack
In reply to zdravko, Jul 10, 2007

One more plead for the S80, which is also DIGIC II, to be included in the hack.
--
See my gallery at http://www.pbase.com/dennismullen

“Those who would sacrifice liberty for safety deserve neither liberty nor safety.” - Ben Franklin.

Reply   Reply with quote   Complain
fasted58
New MemberPosts: 10
Like?
Re: Can't figure out RAW workflow with A620
In reply to GrAnd, Jul 11, 2007

With the help on this forum I found a raw convertor that works on my macbook and I discovered how to copy the crw files from my memory card and open them. The convertor is called RPP and is a free download. You do your first adjustments right in this program and then save to a tiff file. Iphoto opens the tiff just fine. The detail is fantastic. I can really see why you might want the option of raw format. The 10 mb files are too much for everyday stuff for me but for pics of my family I want the best I can make.

Thanks again to the unselfish people who have written the programs and shared with everyone. I started out just wanting the battery indicator and now I can shoot RAW!!!!! Unbelievable.
EdM.

Reply   Reply with quote   Complain
castaneda363
Junior MemberPosts: 46
Like?
Re: Can't figure out RAW workflow with A620
In reply to fasted58, Jul 11, 2007

What is noise reduction in new release 144 of CHDK?
Is it Dark Frame Subtraction?

Reply   Reply with quote   Complain
amit goyal
Regular MemberPosts: 294
Like?
Re: CHDK firmware hack discussion (13)
In reply to zdravko, Jul 11, 2007

hi all, i am a new user of s3is, i just read about CHDK firmware,can i use this firmware and how, is there a risk to use this and from where i download this and how upload to my S3IS .please tell me in detail .thanks in advance

Reply   Reply with quote   Complain
melado
New MemberPosts: 1
Like?
I want to dump A540 firmware
In reply to zdravko, Jul 11, 2007

Hi.

I have seen recent GrAnd's work in the wiki, about dumping the firmware via the blue LED of some PowerShot cameras. I tried the ps_a540.fir file and it looks like it works fine (the LED flashes very fast, as I can see). What is the PS_A540_test.FIR file for?

So... I would like to dump the A540 firmware via this method, but once dumped... will someone try to adapt the CHDK to it? Because I know almost nothing about programming and locating memory positions and so on...

Thanks for reading.

Reply   Reply with quote   Complain
Keyboard shortcuts:
FForum MMy threads