IXUS160/ELPH160 Porting attempt - page 8 - DryOS Development - CHDK Forum

IXUS160/ELPH160 Porting attempt

  • 497 Replies
  • 232107 Views
*

Offline adong

  • **
  • 66
Re: IXUS160/ELPH160 Porting attempt
« Reply #70 on: 04 / June / 2015, 15:46:45 »
Advertisements
first here:
"    BL      sub_FFAD80B0 \n"
/* HERE */
does not work at all.

second one:
"    BL      sub_FFAD7C94_my \n"  // --> Patched. Old value = 0xFFAD7C94.
/* HERE */

sometimes get triggered, sometimes not.

*

Offline srsa_4c

  • ******
  • 4451
Re: IXUS160/ELPH160 Porting attempt
« Reply #71 on: 04 / June / 2015, 17:16:25 »
first here:
"    BL      sub_FFAD80B0 \n"
/* HERE */
does not work at all.
So much dead code...

Quote
second one:
"    BL      sub_FFAD7C94_my \n"  // --> Patched. Old value = 0xFFAD7C94.
/* HERE */

sometimes get triggered, sometimes not.
My guess is that this depends on whether you wait for focus confirmation (before fully pressing the shutter) or not.
Does sub_FFAD7C94_my always get hit?
In this case, the rest of sub_FFAD7C94 will need to be researched for an appropriate location. At least that's my current guess.

I have to admit I don't like the direction this is going. We may easily end up needing half dozen raw hooks if certain settings/modes happen to use other code paths...
« Last Edit: 04 / June / 2015, 17:20:27 by srsa_4c »

*

Offline adong

  • **
  • 66
Re: IXUS160/ELPH160 Porting attempt
« Reply #72 on: 05 / June / 2015, 14:49:23 »
You're right, if I wait for focus it's always triggered, a direct full press bypasses it.

sub_FFAD7C94 always gets hit, and way earlier than the other locations. I will research some hooks later.

Just so that it's faster for me, the big lsowdown when enabling raw happens after shutter sound yes ?
« Last Edit: 05 / June / 2015, 15:26:21 by adong »

*

Offline srsa_4c

  • ******
  • 4451
Re: IXUS160/ELPH160 Porting attempt
« Reply #73 on: 05 / June / 2015, 15:36:03 »
Just so that it's faster for me, the big lsowdown when enabling raw happens after shutter sound yes ?
The shutter sound starts right before the shot.

edit:
I suggest you to start researching sub_FFAD7C94 from its end backwards.


*

Offline adong

  • **
  • 66
Re: IXUS160/ELPH160 Porting attempt
« Reply #74 on: 05 / June / 2015, 16:31:41 »
Ran out of time for today. Putting the hook right before the last statement gives the same raw corruption (that is, at the top, bottom is okay). Will test further maybe sunday

*

Offline srsa_4c

  • ******
  • 4451
Re: IXUS160/ELPH160 Porting attempt
« Reply #75 on: 06 / June / 2015, 07:50:15 »
Try one of the following locations (and check how reliably they are reached):
Code: [Select]
"loc_FFAD7E4C:\n"
      "    BL      sub_FF99A620 \n"
      "    LDR     R8, =0xFFAD7C10 \n"
      "    TST     R5, #1 \n"
      "    BNE     loc_FFAD7ECC \n"
/* first one */
      "    LDR     R0, [R7, #0x100] \n"
      "    CMP     R0, #0 \n"
      "    BNE     loc_FFAD7E84 \n"
/* second one */
      "    MOV     R0, R4 \n"
      "    BL      sub_FF99C0E4 \n"
      "    TST     R0, #1 \n"
      "    LDRNE   R2, =0x1FD \n"
      "    LDRNE   R1, =0xFFAD7F40 \n"
      "    MOVNE   R0, #0 \n"
      "    BLNE    sub_FF824DDC \n"
sub_FF99C0E4 is a function in SsCreateJpeg.c, I suspect it might be related to JPEG compression. sub_FF99A620 (aka sub_FF87F7B4) frees up a semaphore which might be called "CaptAndFileSem" from the source file it is related to.
The sx170 firmware sends a message to dvlpseqtask at the point where this fw calls sub_FF99C0E4.

*

Offline adong

  • **
  • 66
Re: IXUS160/ELPH160 Porting attempt
« Reply #76 on: 08 / June / 2015, 15:18:22 »
Good news! The second place works correctly. I will post some raw files to generate a camera profile (can't get lower than ~30% on dng4ps2, don't know if I'm doing it properly)

Here are a pair of RAW+JPG: https://www.dropbox.com/s/znxmqb6tn51zsf5/raw.rar?dl=0
« Last Edit: 08 / June / 2015, 15:38:48 by adong »

*

Offline srsa_4c

  • ******
  • 4451
Re: IXUS160/ELPH160 Porting attempt
« Reply #77 on: 08 / June / 2015, 15:54:15 »
Good news! The second place works correctly.
Glad to hear that :)
Quote
I will post some raw files to generate a camera profile (can't get lower than ~30% on dng4ps2, don't know if I'm doing it properly)
You need to use a defocused photo. The monitor's pixels are visible on your photo, this will spoil the results. (Note that I'm not an expert, I've never done this kind of cam-profile-generation. Also, I don't think there's many CHDK cameras ports with calibrated color matrix, most are just copies.)


*

Offline adong

  • **
  • 66
Re: IXUS160/ELPH160 Porting attempt
« Reply #78 on: 08 / June / 2015, 16:13:02 »
Unfocused one: https://www.dropbox.com/s/znxmqb6tn51zsf5/raw.rar?dl=0

Yeah I'll copy another camera's matrix for now. I now have to fix the filename numbering issue. Will debug more this week.

Re: IXUS160/ELPH160 Porting attempt
« Reply #79 on: 09 / June / 2015, 10:38:29 »
Hi adong.

I tried to use dng4ps2 from https://github.com/crass/dng4ps2, but it doesn't know anything about Ixus 160. Is there any changed version of dng4ps2 for Ixus 160 ?

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal