Porting the ixus70_sd1000 ver 102a to CHDK - page 4 - General Discussion and Assistance - CHDK Forum supplierdeeply

Porting the ixus70_sd1000 ver 102a to CHDK

  • 82 Replies
  • 34811 Views
*

Offline quietschi

  • ***
  • 116
  • Ixus70 102a
Re: Porting the ixus70_sd1000 ver 102a to CHDK
« Reply #30 on: 20 / January / 2008, 08:34:54 »
Advertisements
Hi

no problem with your camera, you shut off and everything is like before
if you have firmware version 102a you can download the .bin and .fir here

http://www.zshare.net/download/6696735fe6295a/

just copy to sd card and start in play mode select firm update and you can try

quietschi

Re: Porting the ixus70_sd1000 ver 102a to CHDK
« Reply #31 on: 20 / January / 2008, 13:33:39 »
Since my firmware version is gm1.01B, I assume this won't work on my camera.  Is there someway to update my camera to 1.02a, or does development for that version have to be started separately?

Re: Porting the ixus70_sd1000 ver 102a to CHDK
« Reply #32 on: 21 / January / 2008, 00:44:03 »
I've been looking through the CHDK src and I have an IDA disassembly of the 102 firmware. I don't know where to start to get certain functions to work.

For example, the Shoot function in a script works about half way. It focuses, beeps, and the orange LED comes on and the yellow one blinks, but the camera doesn't continue past that. It's same that happens when you push the shutter button half way. It's as if the Shoot command "pushes" the button half way but not all the way.

What src file contains the functions for the Shoot command? Maybe if I can find that, I'll get an easier start.

I'm lost in a sea of unfamiliar source code. :)

Re: Porting the ixus70_sd1000 ver 102a to CHDK
« Reply #33 on: 21 / January / 2008, 01:05:19 »
Interesting. I ran the exp_info_tst.bas

Apparently, even though the Shoot command doesn't work, this does function.

Code: [Select]
@title Test Ev info
sleep 500
press "shoot_half"
sleep t
get_bv96 e
print "BV:", e
get_tv96 f
print "TV:", f
get_av96 g
print "AV:", g
sleep 5000
press "shoot_full"
release "shoot_full"
release "shoot_half"
end

I'm uncertain that get_tv96 and get_av96 work as they didn't return anything other than 0.


Re: Porting the ixus70_sd1000 ver 102a to CHDK
« Reply #34 on: 21 / January / 2008, 09:19:48 »
So I did some hunting and found a few things. I got the Shoot command to work.
It eventually called kbd_sched_shoot() in core\kdb.c
Three functions in the stack program caused infinite loops.

Code: [Select]
void kbd_sched_shoot()
{
// WARNING stack program flow is reversed

    kbd_sched_delay(conf.script_shoot_delay*100);// XXX FIXME find out how to wait to jpeg save finished

    //KBD_STACK_PUSH(SCRIPT_WAIT_SAVE); //causes capture to fail.
   
    KBD_STACK_PUSH(KEY_SHOOT_HALF);
    KBD_STACK_PUSH(SCRIPT_RELEASE);

    KBD_STACK_PUSH(KEY_SHOOT_FULL);
    KBD_STACK_PUSH(SCRIPT_RELEASE);

    kbd_sched_delay(30);

    KBD_STACK_PUSH(KEY_SHOOT_FULL);
    KBD_STACK_PUSH(SCRIPT_PRESS);

    KBD_STACK_PUSH(SCRIPT_WAIT_FLASH);
    //KBD_STACK_PUSH(SCRIPT_WAIT_EXPHIST);    //causes capture to fail.
    //KBD_STACK_PUSH(SCRIPT_PR_WAIT_EXPHIST); //causes capture to fail.

    kbd_sched_delay(30);

    KBD_STACK_PUSH(KEY_SHOOT_HALF);
    KBD_STACK_PUSH(SCRIPT_PRESS);


    KBD_STACK_PUSH(SCRIPT_PR_WAIT_SAVE);

}

SCRIPT_WAIT_SAVE
SCRIPT_WAIT_EXPHIST
SCRIPT_PR_WAIT_EXPHIST
All three fail. The stack just hangs at those spots if they are enabled.
I did some debug output for SCRIPT_WAIT_SAVE.

Code: [Select]
case SCRIPT_WAIT_SAVE:{
   
if (state_shooting_progress == SHOOTING_PROGRESS_DONE)
{
script_console_add_line("first one");
script_console_add_line((unsigned char *)state_shooting_progress);
script_console_add_line("second one");
script_console_add_line((unsigned char *)SHOOTING_PROGRESS_DONE);
kbd_int_stack_ptr-=1; // pop op.
} else {
script_console_add_line("third one");
script_console_add_line((unsigned char *)state_shooting_progress);
script_console_add_line("fourth one");
script_console_add_line((unsigned char *)SHOOTING_PROGRESS_DONE);


}
    return;
}
Essentially the function operates as it was originally written. I just threw in an else to find out the values for the boolean operation. In this example, state_shooting_progress and SHOOTING_PROGRESS_DONE never become equal. Therefore, the console outputs for the "third one" and "fourth one" only display.

I'm wondering if SHOOTING_PROGRESS_DONE is set wrong, or if state_shooting_progress never gets updated. It looks like state_shooting_progress never gets updated.

...

After some further investigation, it could be that
Code: [Select]
int shooting_in_progress()
{
    int t = 0;
    _GetPropertyCase(205, &t, 4);
    return t != 0;
}
in generic\shooting.c doesn't call the right propertycase. Anybody have any thoughts on that possibility?

*

Offline quietschi

  • ***
  • 116
  • Ixus70 102a
Re: Porting the ixus70_sd1000 ver 102a to CHDK
« Reply #35 on: 21 / January / 2008, 09:54:22 »

What i found out is that the propertycase is for digicII. Our Camera is a digicIII. I tested a little today and find out a few new things.

folder include/platform.h

#if defined(CAMERA_a570) || defined(CAMERA_a560) || defined(CAMERA_ixus70_sd1000)

so the right property case is called.

tried some scripts and it looks that it works.
« Last Edit: 21 / January / 2008, 09:56:21 by quietschi »

Re: Porting the ixus70_sd1000 ver 102a to CHDK
« Reply #36 on: 21 / January / 2008, 10:06:11 »
lol. i just did the same thing. It definitely fixes a lot. There are probably some other prop cases that still need corrected though. An example being PROPCASE_IS_FLASH_READY. That gets used in shooting_is_flash_ready() in shooting.c and that function has a hard coded hack
Code: [Select]
#if !defined(CAMERA_a570) && !defined(CAMERA_a560)    that is used to avoid hitting the prop case call.

*

Offline quietschi

  • ***
  • 116
  • Ixus70 102a
Re: Porting the ixus70_sd1000 ver 102a to CHDK
« Reply #37 on: 21 / January / 2008, 10:29:51 »
Hi

you can display the propcases in chdk

Menu - Debug Parameters - Show Propcases

Propcase/ParamsData page 0 or 1 or 2 and so on

Maybe you find there the right number


Re: Porting the ixus70_sd1000 ver 102a to CHDK
« Reply #38 on: 21 / January / 2008, 10:32:16 »
This is very strange. It seems that i have to do something like this:
Code: [Select]
case SCRIPT_WAIT_SAVE:{
   
if (state_shooting_progress == SHOOTING_PROGRESS_DONE)
{
script_console_add_line("done");
kbd_int_stack_ptr-=1; // pop op.
} else {
script_console_add_line("waiting");
}
    return;
in order for it to work.
If i comment out the
Code: [Select]
script_console_add_line("waiting"); part, it hangs. I'm assuming that script_console_add_line causes the prop cases to update in CHDK?

Re: Porting the ixus70_sd1000 ver 102a to CHDK
« Reply #39 on: 21 / January / 2008, 11:00:41 »
I started poking around in the shutter speed stuff. I'm pretty sure PROPCASE_USER_TV and PROPCASE_TV are incorrect. I don't see any correlation.

 

Related Topics