CHDK firmware hack discussion (19)

Started Oct 18, 2007 | Discussions
jonquil
Forum MemberPosts: 59
Like?
Re: A560 1.00A porting process.. cont (2)
In reply to GrAnd, Oct 18, 2007

thanks GrAnd and rossig

I guess I am nearer than I expected. Tomorrow I will install IDA pro and disassemble the dump.

Thx again. I will keep you informed.

Reply   Reply with quote   Complain
microfunguy
Regular MemberPosts: 234
Like?
Re: A570 1.00E with MX3 Motion Detection, etc.
In reply to HjvPT, Oct 18, 2007

HjvPT wrote:

So the number 268 is suspicious

It has got to be 268.

Then I run this:

That looks fine, the second parameter exactly as my A620.

and the camera shut down!

Hmmmm ........... I have no idea.

Rossig has played with this to find certain parameters, I wonder if there are any 'tricks' ?

Reply   Reply with quote   Complain
Dave Ingols
Regular MemberPosts: 258
Like?
ATTN: GrAnd or Fingalo - 1GB video limit broken?
In reply to zdravko, Oct 19, 2007

Fingalo, I looked at that page by EWAVR and noticed his breakthrough in finding a way to bypass the 1GB video filesize limit. Do you have any plans of investigating this and incorporating it into your builds? Or will GrAnd?

Here is Ewavr's page ran through Babelfish:

http://babelfish.altavista.com/babelfish/trurl_pagecontent?lp=ru_en&url=http%3A%2F%2Fewavr.nm.ru%2Fchdk%2F

This will be fantastic if it's true. It's the one thing everyone has been needing for the longest time. I wonder if it will change the audio recording limit too, or if there's still that 1-hour limit for both video and audio. Either way, ending that 1G limit for video is going to make a lot of people very happy.

What is he refering to about video compression? Did he find more ways to set video compression?

Reply   Reply with quote   Complain
Dave Ingols
Regular MemberPosts: 258
Like?
Re: ATTN: GrAnd or Fingalo - 1GB video limit broken?
In reply to Dave Ingols, Oct 19, 2007

Dave Ingols wrote:

What is he refering to about video compression? Did he find more ways
to set video compression?

Looking in the "gui.c" source file I see the menu for"Compression quality" has min/max options of 1 to 99.

This is some amzazing stuff he's been working on.

Reply   Reply with quote   Complain
aeropic
Contributing MemberPosts: 511
Like?
A6xx HDR bracketing with Fingalo's special build
In reply to zdravko, Oct 19, 2007

Hi all,

Using the set_prop/get_prop functions coming with Fingalo's special built firmware on my A640, here is a not too slow HDR exposure bracketing script.

It's better to set the "review time" to 0 to improve the speed. Up to now this property is not not found so you have to do it manually ... (or in a button press script)

the first param "a" specifies how many steps you'll get between two pictures

the secon param "b" indicates how many pictures you'll get before and after the correctly exposed one (you'll get 2b + 1 pictures)
The script resets the exposure conpensation to the value it found at start.

It shoots 5 full res pictures in 13 sec. I try'll to find ways to improve again this duration...

Enjoy
Alain

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

get_prop 25 i

for c = 0 to b
d = i - (b-c) a*32
set_prop 25 d
set_prop 26 d
shoot
next c
for c = 1 to b
d = i + c*a*32
set_prop 25 d
set_prop 26 d
shoot
next c

set_prop 25 i
set_prop 26 i

end

Reply   Reply with quote   Complain
rossig
Junior MemberPosts: 49
Like?
Re: ATTN: GrAnd or Fingalo - 1GB video limit broken?
In reply to Dave Ingols, Oct 19, 2007

I downloaded firmware source.

I am curious about using movie routines for zooming when making movies.

Eventually disabling audio recording.

Gio

Reply   Reply with quote   Complain
HjvPT
Junior MemberPosts: 32
Like?
Re: A570 1.00E with MX3 Motion Detection, etc.
In reply to microfunguy, Oct 19, 2007

My bad!!!

Reading the script

@title propcase
@param a propid
@default a 268
@param b value
@default b 0

:loop
wait_click
is_key k "left"
if k=1 then get_prop a b
is_key k "set"
if k=1 then goto "lend"
print a,b
goto "loop"
:lend
end

I understand that only when left is clicked the get_prop function is caled.
So I've done a script test using propid = 268:

When I set white balance to Daylight and run the script, click left I got number 1
When I set white balance to Cloudy and run the script, click left I got number 2

When I set white balance to Tungsten and run the script, click left I got number 3

When I set white balance to Fluorescent and run the script, click left I got number 4

When I set white balance to FluorescentHi and run the script, click left I got number 5

When I set white balance to Underwater and run the script, click left I got number 10
When I set white balance to Custom and run the script, click left I got number 7
When I set white balance to Auto and run the script, click left I got number 0

So the "magic number" for white balance on A570IS is for sure 268!

But everytime I use set_prop function, no matter the prop number or the value number the A570IS always shutdown...

Reply   Reply with quote   Complain
microfunguy
Regular MemberPosts: 234
Like?
Re: A570 1.00E with MX3 Motion Detection, etc.
In reply to HjvPT, Oct 19, 2007

HjvPT wrote:

So the "magic number" for white balance on A570IS is for sure 268!

Hurrah !

the A570IS always shutdown.

Post the exact script you are using.

In the meantime, you couild discover other property values by the same method !

David

Reply   Reply with quote   Complain
aeropic
Contributing MemberPosts: 511
Like?
shoot_half and shoot_full problem on A640
In reply to zdravko, Oct 19, 2007

Hi,

I've just played with shoot_half and shoot_full on my A640 : they don't work. The camera is frozen, you've got to remove the battery to get it work again

==> don't use !!!

Alain

Reply   Reply with quote   Complain
HjvPT
Junior MemberPosts: 32
Like?
Re: A570 1.00E with MX3 Motion Detection, etc.
In reply to microfunguy, Oct 19, 2007

Post the exact script you are using.

@title White Balance
@param a propid
@default a 268

sleep 2000
set_prop a 2
print "Cloudy"

sleep 2000
set_prop a 3
print "Tungsten"

sleep 2000
set_prop a 4
print "Fluorescent"

sleep 2000
set_prop a 5
print "Fluorescent H"

sleep 2000
set_prop a 10
print "Underwater"

sleep 2000
set_prop a 7
print "Custom"

sleep 2000
set_prop a 1
print "Daylight"

end

Reply   Reply with quote   Complain
Divalent
Forum MemberPosts: 99
Like?
property case stuff
In reply to HjvPT, Oct 19, 2007

HjvPT wrote:

So the "magic number" for white balance on A570IS is for sure 268!

But everytime I use set_prop function, no matter the prop number or
the value number the A570IS always shutdown...

A few comments/suggestion/hypotheses/questions

Q: does it shut down with the first change in the property? (your script does a bunch of them spaced 2 sec apart) Or does it shut down after the last? (if the later, maybe do a sleep 2000 before the "end"?) If the former, it may very well be that there is an error in the coding of this function in the A570 build. (if it's every time you set anything , does it shut down even if you set something to the exact same value that it currently has?).

It may be that the property you are attempting to change is a byte value (8 bit), but the set_prop is writing a word or dword (16 or 32 bit). Thus, you may be also overwriting something else.

BTW, to find the parameters for contrast, sat, sharp, red, green, etc, enter custom mode, then set them all to the neutral setting, scan, then set them to the highest, and scan again. on an S3, you'd find 0's for the neutral setting and 2 for the highest.

I'll note, generally, that I've found that on the S3 different property locations can sometimes be just "informational" (in the sense that reading it tells you what the state is, but changing that value has no practical effect), and sometimes they are effective if changed (like the equivalent property you are changing here: on the S3 you can change the color mode).

But as far as I can tell, they aren't permanent: the camera menu settings retain their origianal settings and some actions (changing mode dial, turning off then on again) will cause them to revert to their original state. Thus, the camera does store the original settings somewhere else, and I do wonder what effect if has when we change the "property" copy of the parameter without affecting the other (permanent) setting.

You might want to view this page at the CHDK wiki:

http://chdk.wikia.com/wiki/Talk:UBASIC/TutorialScratchpad#Property_Case_values._A_working_exploration_section

for some additional information (currently its mostly stuff found on an S3), and also please add to it the things you find in the A570.

Good luck,

Divalent

Reply   Reply with quote   Complain
HjvPT
Junior MemberPosts: 32
Like?
Re: property case stuff
In reply to Divalent, Oct 19, 2007

Divalent wrote:

Q: does it shut down with the first change in the property? (your
script does a bunch of them spaced 2 sec apart) Or does it shut down
after the last? (if the later, maybe do a sleep 2000 before the
"end"?) If the former, it may very well be that there is an error in
the coding of this function in the A570 build.

It shutdown with the first set_prop.

(if it's every time
you set anything , does it shut down even if you set something to
the exact same value that it currently has?).

Yes, if I have Cloudy white balance and then run a script set_prop 268 2 the camera shutdown.

BTW, to find the parameters for contrast, sat, sharp, red, green,
etc, enter custom mode, then set them all to the neutral setting,
scan, then set them to the highest, and scan again. on an S3, you'd
find 0's for the neutral setting and 2 for the highest.

I'll note, generally, that I've found that on the S3 different
property locations can sometimes be just "informational" (in the
sense that reading it tells you what the state is, but changing that
value has no practical effect), and sometimes they are effective if
changed (like the equivalent property you are changing here: on the
S3 you can change the color mode).

But as far as I can tell, they aren't permanent: the camera menu
settings retain their origianal settings and some actions (changing
mode dial, turning off then on again) will cause them to revert to
their original state. Thus, the camera does store the original
settings somewhere else, and I do wonder what effect if has when we
change the "property" copy of the parameter without affecting the
other (permanent) setting.

You might want to view this page at the CHDK wiki:

http://chdk.wikia.com/wiki/Talk:UBASIC/TutorialScratchpad#Property_Case_values._A_working_exploration_section

for some additional information (currently its mostly stuff found on
an S3), and also please add to it the things you find in the A570.

Tanks for the info

Reply   Reply with quote   Complain
microfunguy
Regular MemberPosts: 234
Like?
Re: property case stuff
In reply to HjvPT, Oct 19, 2007

HjvPT wrote:

It shutdown with the first set_prop.

OK.

In Rossig's A570is build there are three script commands that he has changed to work with new property-case ID's.

The commands and their new ID's are :-

set_av 26
set_iso 21
set_tv 264 (Rossig has 40, I think it is wrong)

So, if using those commands works then so should the set_prop equivalent.

Maybe try the set_iso, probably with the iso number.

Does it ?

If you get stuck ...........

Reply   Reply with quote   Complain
Divalent
Forum MemberPosts: 99
Like?
Re: A6xx HDR bracketing with Fingalo's special build
In reply to aeropic, Oct 19, 2007

aeropic wrote:

Hi all,

Using the set_prop/get_prop functions coming with Fingalo's special
built firmware on my A640, here is a not too slow HDR exposure
bracketing script.

...

It shoots 5 full res pictures in 13 sec. I try'll to find ways to
improve again this duration...

Enjoy
Alain

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

get_prop 25 i

for c = 0 to b
d = i - (b-c) a*32
set_prop 25 d
set_prop 26 d
shoot
next c
for c = 1 to b
d = i + c*a*32
set_prop 25 d
set_prop 26 d
shoot
next c

set_prop 25 i
set_prop 26 i

end

Alain,

Congratulations on working this out on the A640.

Have you tried to set just one of the two (25 or 26) to see it one one is needed? (I'm just curious, although I also believe if it ain't broke, don't fix it!)

A few comments on your script:

You might want to "reality check" parameters a and b to ensure they are 1 or more

if b
if a

Similarly, it might be worth limiting a to something reasonable.

if a> 21 then a=21 (this would correspond to a total + - 6.6 stops for a 3 image sequence, or + - 13.3 for a 5 image sequence. Would anyone want more?)

Is your timing (5 images in 13 sec) with raw? seems very slow. (is it faster in manual focus mode?)

Finally, as a "efficiency" coder, I just can't help myself:

You could probably simplify things a bit by calculating the delta before hand and, in just one loop, start at the low end and keep adding delta (and conserve processing time by not doing unnecessary multiplications in the loop, although I can't believe this is a major slowdown)

i.e.,

get_prop 25 i
a=a*32 (now a=the delta in EV units)
s=i-b*a (s = starting EV at low end)
b=b*2 (b=1 less than total number of pics (loop will add one more))
for n=0 to b
set_prop 25 s
set_prop 26 s
shoot
s=s+a (s now set to next level, with just a quick addition)
next n

Cheers,

Divalent

Reply   Reply with quote   Complain
Divalent
Forum MemberPosts: 99
Like?
Re: property case stuff
In reply to microfunguy, Oct 19, 2007

microfunguy wrote:

The commands and their new ID's are :-

set_av 26
set_iso 21
set_tv 264 (Rossig has 40, I think it is wrong)

So, if using those commands works then so should the set_prop
equivalent.

The error could be in the uBasic routine that calls the c set_prop function. So if the set_av and ISO work, but the set_prop doesn't, thats the likely location of the error. If set_iso crashes it, then it's likely the c function. (or, {evil background music} canon set the firmware to protect those memory locations and generate an exception if something unauthorized writes to it.)

Reply   Reply with quote   Complain
HjvPT
Junior MemberPosts: 32
Like?
Re: property case stuff
In reply to microfunguy, Oct 19, 2007

Yesterday we saw that the A570IS propid fro ISO is 149 (from get_prop 149 b and changing the ISO manual) and values are 80, 100, 200 etc and not 1,2,3,4

http://forums.dpreview.com/forums/read.asp?forum=1010&message=25261291

but I made the following tests

run the script

@title ISO Test
set_iso 100
shoot
end

and the camera don't change de ISO. The images EXIF show 400 ISO (Manual ISO camera set for script test)
But the camera donĀ“t shutdown.

If I run the script

@title ISO Test
set_iso 1
shoot
end

camera shutdown immediately.

If I run the script

@title SetISO
set_prop 21 200
end

camera shutdown immediately.

If I run the script

@title SetISO
set_prop 21 2
end

camera shutdown immediately.

If I run the script

@title SetISO
set_prop 149 200
end

camera shutdown immediately.

If I run the script

@title SetISO
set_prop 149 2
end

camera shutdown immediately.

Now this was for your build:
DISKBOOT.BIN - 127.960 bytes
PS.FIR - 128.708 bytes

-- hide signature --

If I use Rossig's build:
DISKBOOT.BIN - 103.728 bytes
PS.FIR - 104.476 bytes

the camera hangs and I must take out batteries (when with yours camera shutdown) except:

@title ISO Test
set_iso 100
shoot
end

camera take pictures but no ISO change

@title ISO Test
set_iso 2
shoot
end

camera shutdown

Man... strange behaviour...

Reply   Reply with quote   Complain
microfunguy
Regular MemberPosts: 234
Like?
Re: property case stuff
In reply to HjvPT, Oct 19, 2007

A simple question, then ....

Has Rossig confirmed that those script commands work on his A710is camera ?

I don't know if he is reading this.

(getting motion detection to work is more exciting )

Reply   Reply with quote   Complain
HjvPT
Junior MemberPosts: 32
Like?
Re: property case stuff
In reply to microfunguy, Oct 19, 2007

microfunguy wrote:

Has Rossig confirmed that those script commands work on his A710is
camera ?

Good question...

(getting motion detection to work is more exciting )

He is working on that? I also tried your MD scripts and other (chdk.wikia.com) MD scripts on Rossig build but my A570IS never responds to md_detect_motion

Reply   Reply with quote   Complain
microfunguy
Regular MemberPosts: 234
Like?
Re: property case stuff
In reply to HjvPT, Oct 19, 2007

(getting motion detection to work is more exciting )

He is working on that?

No.

I would start a new thread to ask MX3 specifically about that and what information he requires to solve the problem.

He may not be reading these posts.

MD scripts on Rossig build

Rossig build does not have motion detection.

David

Reply   Reply with quote   Complain
rossig
Junior MemberPosts: 49
Like?
Re: A570 firmware 1.00E- Update Version
In reply to zdravko, Oct 19, 2007

Thanks to David I posted an updated version because I made a mistake with cut and paste in generic/shooting.c

Function shooting_set_tv:

  1. if !defined (CAMERA_a570)

SetPropertyCase(40, &vv, sizeof(vv));

  1. else

SetPropertyCase(40, &vv, sizeof(vv));

  1. endif

return;

should be

  1. if !defined (CAMERA_a570)

SetPropertyCase(40, &vv, sizeof(vv));

  1. else

SetPropertyCase(264, &vv, sizeof(vv));

  1. endif

return;

Link to binary
http://www.zshare.net/download/4321840f89bc10/

Link to src
http://www.zshare.net/download/4321818730097e/

gio

Reply   Reply with quote   Complain
Keyboard shortcuts:
FForum MMy threads