Porting a camera sx530hs - page 3 - DryOS Development - CHDK Forum  

Porting a camera sx530hs

  • 288 Replies
  • 78783 Views
Re: Porting a camera sx530hs
« Reply #20 on: 13 / August / 2015, 15:55:19 »
Advertisements
Function to get live images is bellow.

void *vid_get_viewport_live_fb()
{
        return viewport_buffers[(active_viewport_buffer-1)&6];
}

Camera has 7 buffers to live images. I have tested all buffers and all those are working.

*

Offline reyalp

  • ******
  • 11923
Re: Porting a camera sx530hs
« Reply #21 on: 13 / August / 2015, 16:29:18 »
Function to get live images is bellow.

void *vid_get_viewport_live_fb()
{
        return viewport_buffers[(active_viewport_buffer-1)&6];
}

Camera has 7 buffers to live images. I have tested all buffers and all those are working.
&6 (110 binary) will only give 4 distinct values. It could be correct if the low bit is used for something else.

When you have this sorted out, you should make sure it gives the most recent buffer, see http://chdk.wikia.com/wiki/Testing#MD_tune.bas

You should also check whether it behaves the same way when video is recording, some cameras only use the first one when recording.
Don't forget what the H stands for.

Re: Porting a camera sx530hs
« Reply #22 on: 18 / August / 2015, 14:48:33 »
I am having problems to identify the value to "active_viewport_buffer". i tryed compare
with another cameras like a sx170, sx160. i find the pointer on ida disasemble "0x2174" but this value apparently is not correct, because debugging this value stay locked without changes.

*

Offline srsa_4c

  • ******
  • 3920
Re: Porting a camera sx530hs
« Reply #23 on: 18 / August / 2015, 20:06:51 »
I am having problems to identify the value to "active_viewport_buffer". i tryed compare
with another cameras like a sx170, sx160. i find the pointer on ida disasemble "0x2174" but this value apparently is not correct, because debugging this value stay locked without changes.
Assuming the value used in ixus160 stubs_min.S is correct, the address should be 0x2174 or something close to that.
sub_ff84e884 in ixus160 100a is equivalent to sub_ff04fe70 in sx530 100c (check the disassemblies).


Re: Porting a camera sx530hs
« Reply #24 on: 19 / August / 2015, 09:09:19 »
"active_viewport_buffer" is defined but is not used on ixus160. I have cameras sx510 and sx530hs, but those pointers are not working too. Some one can help me. 

*

Offline srsa_4c

  • ******
  • 3920
Re: Porting a camera sx530hs
« Reply #25 on: 19 / August / 2015, 18:56:07 »
not used on ixus160.
Sorry about that, I was assuming it does work. I'd still recommend you to continue investigating. For example, the ixus140 port could be a good candidate: it's a relatively recent camera and the viewport related addresses should be correct there.

edit:
You'll find that finding the equivalent of the ixus140 addresses will end up with the same ones I already posted. If you're sure they don't work, you'll need to do original research on the camera. Most people doing ports get away without doing that, but Canon's code changes make it necessary from time to time.
« Last Edit: 20 / August / 2015, 06:53:21 by srsa_4c »

*

Offline srsa_4c

  • ******
  • 3920
Re: Porting a camera sx530hs
« Reply #26 on: 23 / August / 2015, 17:41:53 »
I can now confirm that the equivalent of the ixus140 address is no longer usable on the ixus150. The same structure does contain a member that rotates between the 4 viewport buffer addresses, but I'm looking for something more usable.

Re: Porting a camera sx530hs
« Reply #27 on: 24 / August / 2015, 11:47:50 »
You can show me the address where you finds, member that rotates between the 4 viewport buffer addresses? On to ixux150.


*

Offline srsa_4c

  • ******
  • 3920
Re: Porting a camera sx530hs
« Reply #28 on: 24 / August / 2015, 12:37:01 »
You can show me the address where you finds, member that rotates between the 4 viewport buffer addresses? On to ixux150.
The address I mentioned is start_of_struct + 0xac, that would be 0x2174 + 0xac = 0x2220 on your camera. The offset might be slightly different, use "Miscellaneous Stuff" -> "Tools" -> "Memory Browser" to find the correct address (the camera has to be in shooting mode!).

Re: Porting a camera sx530hs
« Reply #29 on: 02 / September / 2015, 13:29:14 »
The get_config_value/set_config_value "LUA" command, is not  working to set and get value "eco mode", some one can help me to fix the problem.
« Last Edit: 09 / September / 2015, 07:04:16 by jeronymoGustavo »

 

Related Topics