IXUS145/ELPH135 Porting attempt - page 10 - DryOS Development - CHDK Forum

IXUS145/ELPH135 Porting attempt

  • 136 Replies
  • 78411 Views
*

Offline reyalp

  • ******
  • 14079
Re: IXUS145/ELPH135 Porting attempt
« Reply #90 on: 04 / December / 2016, 20:10:55 »
Advertisements
I tried to manipulate exposure times, and it seems that as long as I am in LONG SHUTTER mode (for night pictures), CHDK is able to set the shutter speed both short and long...it's not clear that this always works. Seems like you need a particular order of doing things. 
In my experience, long shutter mode acts as manual mode, controlled by the USER_TV propcase. I wouldn't be surprised that it works with shutter speeds shorter than 1 sec.

Quote
So it looks like you could control much more than the Canon menu allows, but you need to use chdkptp (or gui version to change mode) to enter the correct propcases etc. Is there a standard way to implement things like this?  Just scripts on the camera?
No, there's no standard way to access "hidden" modes.  You could use something like TEST/setmode.lua script to do it on camera.

You should be able set exposure setting manually using overrides in the "Enhanced Photo Operations" menu, but that should work in P and Auto modes too.

I would caution that seeing something like "Shutter Priority" in exif doesn't necessarily mean the camera is actually shooting in that mode. If this camera is like most ixus and has an ND rather than adjustable aperture, Tv and Av modes don't  make much sense, because there isn't much else to adjust.

Don't forget what the H stands for.

Re: IXUS145/ELPH135 Porting attempt
« Reply #91 on: 06 / December / 2016, 12:31:55 »
Quote
You should be able set exposure setting manually using overrides in the "Enhanced Photo Operations" menu, but that should work in P and Auto modes too.
As far as I can see, the camera software in AUTO mode, doesn't successfully override the auto exposure/shutter speed. I tried two shots, one  shrtexp of 1/640sec which came back at 1/25 in the exif, and one long exp of 30 seconds which came back at 1/20 in the exif.  Both images seem to  be exposed according to the setting recorded in the exif info. So maybe there's an adjustment needed in capt_seq.c.  Also, although darkframe AUTO, OFF, ON is enabled in the menu, setting it OFF on long shutter, and longexp override in the menu does not seem to suppress the darkframe subtraction and acquisition.

*

Offline srsa_4c

  • ******
  • 4451
Re: IXUS145/ELPH135 Porting attempt
« Reply #92 on: 06 / December / 2016, 15:31:43 »
As far as I can see, the camera software in AUTO mode, doesn't successfully override the auto exposure/shutter speed. I tried two shots, one  shrtexp of 1/640sec which came back at 1/25 in the exif, and one long exp of 30 seconds which came back at 1/20 in the exif.  Both images seem to  be exposed according to the setting recorded in the exif info. So maybe there's an adjustment needed in capt_seq.c.  Also, although darkframe AUTO, OFF, ON is enabled in the menu, setting it OFF on long shutter, and longexp override in the menu does not seem to suppress the darkframe subtraction and acquisition.
We'd have much less problems to solve if nafraf shared his latest source (have you tried sending him a PM?).

In the meantime, try the hooktest.lua script in AUTO and P modes. When testing exposure overrides, also enable ISO override. You can also make a test build that does not replace exp_drv_task. The darkframe variable address is likely incorrect in this source.

*

Offline nafraf

  • *****
  • 1308
Re: IXUS145/ELPH135 Porting attempt
« Reply #93 on: 08 / December / 2016, 19:59:41 »
Hi, source code included in svn, revision 4746


Re: IXUS145/ELPH135 Porting attempt
« Reply #94 on: 09 / December / 2016, 12:30:23 »
Thanks @nafraf.  Compiles perfectly for me! Will let you know if/as I find things I don't understand or that seem problematic.
So far, I am not able to switch off darkframe acquisition and subtraction on long exposures...but your code looks pretty standard.  Perhaps the address of nrflag in capt-seq.c is a problem?  Comparing to ixus150, you are adding 0xC where ixus150 adds 0x4 I think, however, I am not an expert at assembly. ixus150 also has a stub _nrflag, but i don't think that's used?

Edit: in the case of  ixus150 we have:

capt_seq.c:#define USE_STUBS_NRFLAG 1 // see stubs_min.S

so that's why _nrflag is in stubs_min.S
« Last Edit: 09 / December / 2016, 13:09:47 by 62ndidiot »

*

Offline nafraf

  • *****
  • 1308
Re: IXUS145/ELPH135 Porting attempt
« Reply #95 on: 10 / December / 2016, 15:30:48 »
It´s probably a bug, I think darkframe wast not tested before. I´ll try to check that.
Thanks.

Re: IXUS145/ELPH135 Porting attempt
« Reply #96 on: 12 / December / 2016, 03:01:32 »
It´s probably a bug, ....
I think I might have found some new "Bugs", some typos,  and some other stuff that might need fixing.
Also there is some additional stuff that matches well with the Ixus 150.
The Ixus 150 seems to be a Ixus 145 with additional hardware and firmware, in regard to CHDK Porting.

H-H
(using IDA 6v95 and then ARMu for confirmation.)
« Last Edit: 12 / December / 2016, 03:03:27 by Hardware_Hacker »

*

Offline reyalp

  • ******
  • 14079
Re: IXUS145/ELPH135 Porting attempt
« Reply #97 on: 12 / December / 2016, 16:42:41 »
It´s probably a bug, ....
I think I might have found some new "Bugs", some typos,  and some other stuff that might need fixing.
If you believe you have identified bugs, please point out the specific code, and (unless it's totally obvious) explain why it's a bug.

Quote
The Ixus 150 seems to be a Ixus 145 with additional hardware and firmware, in regard to CHDK Porting.
Every CHDK camera X is just camera Y with some hardware and firmware differences. The only case that really makes a difference is if the firmware and memory addresses are identical.
Don't forget what the H stands for.


Re: IXUS145/ELPH135 Porting attempt
« Reply #98 on: 02 / January / 2017, 17:47:17 »
I found using poke(0xa0e0,1), that 0xa0e0 is the nrflag address for darkframe control. Unfortunately, the hook below, only seems to be effective on the second shot at suppressing darkframe.  I think this happens in other ports as well. Not sure if this could be fixed by moving the hook earlier or not.

Code: [Select]
"loc_FFAC8028:\n"
"    BL      wait_until_remote_button_is_released\n" // added
"    BL      capt_seq_hook_set_nr\n"                 // added
"    LDR     R0, [R4, #0x20] \n"
"    LDR     PC, =0xFFAC802C \n"  // Continue in firmware
);
}
« Last Edit: 02 / January / 2017, 23:50:09 by 62ndidiot »

*

Offline srsa_4c

  • ******
  • 4451
Re: IXUS145/ELPH135 Porting attempt
« Reply #99 on: 03 / January / 2017, 18:13:56 »
I found using poke(0xa0e0,1), that 0xa0e0 is the nrflag address for darkframe control. Unfortunately, the hook below, only seems to be effective on the second shot at suppressing darkframe.  I think this happens in other ports as well. Not sure if this could be fixed by moving the hook earlier or not.
It probably could be fixed by moving the hook "upwards" - before the nrflag variable you found is read by the firmware.
Next possibility is to just find the fw variable (memory location) that is derived from that nrflag.
Other option is to introduce a custom hook that you can call when shooting starts (when expo overrides are applied). You can copy the nr related code from platform/generic/capt_seq.c .

I did none of the above in my ports with this problem, yet.


edit:
Try moving the nr hook upwards, right after the "MOV     R4, R0 \n" instruction in the same function.
« Last Edit: 03 / January / 2017, 18:34:46 by srsa_4c »

 

Related Topics