IXUS160/ELPH160 Porting attempt - page 19 - DryOS Development - CHDK Forum supplierdeeply

IXUS160/ELPH160 Porting attempt

  • 497 Replies
  • 232165 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: IXUS160/ELPH160 Porting attempt
« Reply #180 on: 01 / September / 2015, 17:58:29 »
Advertisements
it returns another random value and if I change set_focus value, it returns other random value without a logic.
The official source doesn't support overriding the subject distance (aka focus).
Quote
ERROR: I/O error
attempted to close non-present device XXX:XXX
I suspect the camera also crashes (powers off with extended lens) when this happens. If so, please get a romlog.
Quote
when I type two focus command together

set_aflock(1)
set_aflock(0)
return error

set_mf(1)
set_mf(0)
return error
Does that mean the camera crashes if you execute set_aflock(1) followed by set_aflock(0) ?


@nafraf, WW
About the patch: if the new functions ( _xxxxinit() ) are the ones I listed earlier (by address), calling them like this is not the right way: they are not protected against multiple execution and would create new kernel objects each time they're called.
I'm considering replacing MoveFocusLensToDistance and all other affected event procedures with their copies on r54+ cameras, as I think those (lower level) functions would be easier to find with the sigfinder.

*

Offline nafraf

  • *****
  • 1308
Re: IXUS160/ELPH160 Porting attempt
« Reply #181 on: 01 / September / 2015, 19:47:31 »
@srsa_4c
Yes, I used the addresses you posted before. I did not commit the patch because I was not sure if that was the right solution.
Can I do something to fix the port or Should I wait for your patch?  Thanks.

Re: IXUS160/ELPH160 Porting attempt
« Reply #182 on: 02 / September / 2015, 03:37:40 »
The official source doesn't support overriding the subject distance (aka focus).
This means that set_focus(XXXXX) works properly but not overrides subject distance on the camera? I've not tried to shot after setting the focus, this evening I'll try.

Quote
I suspect the camera also crashes (powers off with extended lens) when this happens. If so, please get a romlog.
Exactly, it crashes with extended lens. Sometimes It crashed also during lens opening, never happened with firmware of the beginning of August (release 4206).

Quote
Does that mean the camera crashes if you execute set_aflock(1) followed by set_aflock(0) ?
Yes, I'll report romlog.
« Last Edit: 02 / September / 2015, 07:58:57 by Steva85 »

*

Offline srsa_4c

  • ******
  • 4451
Re: IXUS160/ELPH160 Porting attempt
« Reply #183 on: 02 / September / 2015, 18:25:20 »
This means that set_focus(XXXXX) works properly but not overrides subject distance on the camera?
set_focus() will not report any errors, it just won't have any effect.
Quote
Sometimes It crashed also during lens opening
Can you describe how this happened step-by-step?
Quote
Yes, I'll report romlog.
If the camera crashes, it usually records a crash log in the flash ROM (not on the card). You can then retrieve this log anytime by using the CHDK menu: Miscellaneous stuff -> Debug parameters -> Save ROM crash log. This will create a file on the card (romlog.log in the card root).

@WW
Can you tell me which source was used for this build?


*

Offline srsa_4c

  • ******
  • 4451
Re: IXUS160/ELPH160 Porting attempt
« Reply #184 on: 02 / September / 2015, 18:43:29 »
@srsa_4c
Yes, I used the addresses you posted before. I did not commit the patch because I was not sure if that was the right solution.
Can I do something to fix the port or Should I wait for your patch?  Thanks.
I have already made my recommendation, but here's some more details:
1) new file "platform/camera/sub/boot_extras.c":
Code: [Select]
/*
    *** TEMPORARY workaround ***
    Init stuff to avoid asserts on cameras running DryOS r54+
    Execute this only once
 */
void init_required_fw_features(void) {
    extern void _init_focus_eventflag();
    extern void _init_nd_eventflag();
    extern void _init_nd_semaphore();
    //extern void _init_zoom_semaphore(); // for MoveZoomLensWithPoint

    _init_focus_eventflag();
    _init_nd_eventflag();
    _init_nd_semaphore();
}
Added lines to stubs_entry_2.S:
Code: [Select]
// temporary measure
NHSTUB(init_focus_eventflag, 0xffb7ebfc)
NHSTUB(init_nd_eventflag, 0xffaa8558)
NHSTUB(init_nd_semaphore, 0xffad6344)
Insert
Code: [Select]
>>>
"    BL      init_required_fw_features\n" // added
<<<
after the
Code: [Select]
PATCHSUB ref=0 name=taskcreatePhySw_myline in code_gen.txt
Insert
Code: [Select]
>>> file=../boot_extras.cbefore ENDFILE in the boot.c section of code_gen.txt

This method only executes the init functions once, and it is working on my ixus150.

Once all this is done, add the lines mentioned here to platform_camera.h and test SD override (mftest.lua), ND override and set_zoom().

Did you, by any chance, experience any weird crashes like the ones Steva85 mentioned?

Re: IXUS160/ELPH160 Porting attempt
« Reply #185 on: 08 / September / 2015, 02:14:07 »
Hi to all,
I have two romlog of the tests done yesteday evening.
First one "romlog_after_aflock_mf" was downloaded after crash when I type this command from chdkptp.sh terminal

> luar set_aflock(1)
> luar set_mf(1)

the second one romlog_after_mftest was downloaded after crash during the execution of mftest.lua from camera. Before crash (at some not identificated point) the script returns fail.

To set focus to infinity seems to work this sequence of commands
./chdkptp.sh -c -e'luar set_capture_mode_canon(32773)'    (set to P mode)
./chdkptp.sh -c -e'luar press("shoot_half") sleep(1500) set_aflock(1) release("shoot_half")' (simulate half shoot and lock focus)
after that get_focus() returns -1 and stay -1 after every shot (shots are ok!)

if I type only
./chdkptp.sh -c -e'luar set_aflock(1)'
the camera tries to point out the right focus and lock it. (but this not work every time)
after that get_focus() returns random value.
 
« Last Edit: 08 / September / 2015, 08:20:53 by Steva85 »

*

Offline srsa_4c

  • ******
  • 4451
Re: IXUS160/ELPH160 Porting attempt
« Reply #186 on: 09 / September / 2015, 14:10:38 »
First one "romlog_after_aflock_mf" was downloaded after crash when I type this command from chdkptp.sh terminal

> luar set_aflock(1)
> luar set_mf(1)
The log shows that you have executed these several times but that does not make much difference.
Problem is, the crash happened in a task that is not influenced directly by CHDK. As such, it doesn't really help.

Quote
the second one romlog_after_mftest was downloaded after crash during the execution of mftest.lua from camera.
The camera has not recorded a romlog for this crash (the 2 romlogs you uploaded are the same).

I sent you a PM with a build that has the fixes I mentioned in the last two pages of this thread. Note that this port is apparently "hot potato" due to the 2 bricked cameras reported earlier. Use the build on your own risk.

This build enables subject distance override and control over the ND filter. Try running mftest.lua to help us figure out which method is usable for setting the focus.

Re: IXUS160/ELPH160 Porting attempt
« Reply #187 on: 11 / September / 2015, 22:44:08 »
Hey everyone, I understand that development takes a lot of hard work, testing, and most importantly time, but do you have any idea of when a stable release of this firmware might be available?

Thanks, Devon


Re: IXUS160/ELPH160 Porting attempt
« Reply #188 on: 11 / September / 2015, 22:50:55 »
Hey everyone, I understand that development takes a lot of hard work, testing, and most importantly time, but do you have any idea of when a stable release of this firmware might be available?
CHDK is an all volunteer effort and has no schedule or master project plan driving it.  Things get done when people have the time and interest to work on them.   So giving you any idea of a stable release date is pretty much impossible.  Sorry.

More info about the whole process is here : link> CHDK FAQ : My camera isn't ported yet

If you want my guess (and what do I know anyway?) then I would not expect to see the IXUS160 port get past all the DIGIC4+ issues for many months at best.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: IXUS160/ELPH160 Porting attempt
« Reply #189 on: 14 / September / 2015, 07:55:58 »
First one "romlog_after_aflock_mf" was downloaded after crash when I type this command from chdkptp.sh terminal

> luar set_aflock(1)
> luar set_mf(1)
The log shows that you have executed these several times but that does not make much difference.
Problem is, the crash happened in a task that is not influenced directly by CHDK. As such, it doesn't really help.

Quote
the second one romlog_after_mftest was downloaded after crash during the execution of mftest.lua from camera.
The camera has not recorded a romlog for this crash (the 2 romlogs you uploaded are the same).

I sent you a PM with a build that has the fixes I mentioned in the last two pages of this thread. Note that this port is apparently "hot potato" due to the 2 bricked cameras reported earlier. Use the build on your own risk.

This build enables subject distance override and control over the ND filter. Try running mftest.lua to help us figure out which method is usable for setting the focus.

Thanks srsa_4c for latest build. Every problem with focus was solved. The release seems very stable, no crash until now. I'll let you know.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal