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

Porting a camera sx530hs

  • 288 Replies
  • 78790 Views
*

Offline reyalp

  • ******
  • 11923
Re: Porting a camera sx530hs
« Reply #50 on: 17 / March / 2016, 00:26:34 »
Advertisements
I finally found an SD card that works without problems, Toshiba C08G. :D
Very strange. I've started a new thread for this issue: https://chdk.setepontos.com/index.php?topic=12795.0

If you can post the make and model of the cards that did not work, that may be helpful. Also, can you try starting with holding down the power button with one of the bad cards? In one case, this was reported to work.

I checked in your modemap and propset updates. I don't want to add the propset in the main includes directory until most of the entries are right, because it will get really confusing if other ports try to use it.
Don't forget what the H stands for.

*

Offline blackhole

  • *****
  • 677
  • A590IS 101b
    • Planetary astrophotography
Re: Porting a camera sx530hs
« Reply #51 on: 17 / March / 2016, 09:50:36 »
Quote
If you can post the make and model of the cards that did not work, that may be helpful
SD cards that do not work are:
Transcend 2GB Class 4
Platinet 8GB HC Class 10
Hama 8GB HC Class4
Transcend 8GB HC Class4
All the old SD cards supplied with the cameras and branded as Canon (32MB and 128MB) work well.
 @reyalp
Can you please edit your post regarding the card and add this data under sx530 part.
I think it will be a cleaner for people who will later read, instead I add a new post in the topic.

Quote
Also, can you try starting with holding down the power button with one of the bad cards? In one case, this was reported to work.
This has no effect on the sx530, the error is still there.
Quote
I don't want to add the propset in the main includes directory until most of the entries are right, because it will get really confusing if other ports try to use it.
That is OK.Today I will continue to work on propcases.
« Last Edit: 17 / March / 2016, 09:52:45 by blackhole »

*

Offline reyalp

  • ******
  • 11923
Re: Porting a camera sx530hs
« Reply #52 on: 17 / March / 2016, 13:30:14 »
Quote
Also, can you try starting with holding down the power button with one of the bad cards? In one case, this was reported to work.
This has no effect on the sx530, the error is still there.
With a working card, does the camera start in record mode when you hold the button down?
Don't forget what the H stands for.

*

Offline blackhole

  • *****
  • 677
  • A590IS 101b
    • Planetary astrophotography
Re: Porting a camera sx530hs
« Reply #53 on: 17 / March / 2016, 13:34:13 »
No,camera start in play mod.


*

Offline srsa_4c

  • ******
  • 3920
Re: Porting a camera sx530hs
« Reply #54 on: 17 / March / 2016, 20:03:06 »
The following might help with starting in rec mode. I think the bit masked by 0x80000 on the 0xc022f48c GPIO could be the ON/OFF button. Not sure about its state though, so you may have to exchange 0x400000 and 0x200000 below. No guarantees, I could be wrong.

Replace
*(int*)(0x2cf4+0x8) = 0x400000;
with
*(int*)(0x2cf4+0x8) = (*(int*)0xc022f48c) & 0x80000 ? 0x200000 : 0x400000;

in sub_FF0203C4_my(), boot.c .

I'd like to note that several other hw (and other?) flags are ignored by the simplified method above, some of which might be important (might influence the card issue for example)?
See sub_ff02bbc0 and sub_ff073c68 for details (fw 100c).

For the card problem, one other thing to try is to insert

"BL sub_6BAEF4\n" // taskcreate_SD1stInit

below

//"  BL      _sub_FF037E18 \n"  // load DISKBOOT.BIN

in task_Startup_my(), boot.c .

*

Offline blackhole

  • *****
  • 677
  • A590IS 101b
    • Planetary astrophotography
Re: Porting a camera sx530hs
« Reply #55 on: 17 / March / 2016, 23:06:40 »
Quote
The following might help with starting in rec mode. I think the bit masked by 0x80000 on the 0xc022f48c GPIO could be the ON/OFF button. Not sure about its state though, so you may have to exchange 0x400000 and 0x200000 below. No guarantees, I could be wrong.

Replace

*(int*)(0x2cf4+0x8) = 0x400000;

with

*(int*)(0x2cf4+0x8) = (*(int*)0xc022f48c) & 0x80000 ? 0x200000 : 0x400000;

in sub_FF0203C4_my(), boot.c .
Unfortunately does not work, but it does not matter, I solved it before in this way:
*(int*)(0x2cf4+0x8) = (*(int*)0xC0220104)&1 ? 0x200000 : 0x100000;

Quote
For the card problem, one other thing to try is to insert

"BL sub_6BAEF4\n" // taskcreate_SD1stInit

below

//"  BL      _sub_FF037E18 \n"  // load DISKBOOT.BIN

in task_Startup_my(), boot.c .
Memory card error still exist.
Anyway thanks for your help.

*

Offline srsa_4c

  • ******
  • 3920
Re: Porting a camera sx530hs
« Reply #56 on: 18 / March / 2016, 13:37:05 »
I solved it before in this way:
*(int*)(0x2cf4+0x8) = (*(int*)0xC0220104)&1 ? 0x200000 : 0x100000;
Interesting. I was assuming the ON/OFF button's state is the first argument of the function that evaluates the startup flags (sub_ff073c68), in this case it's not.

Quote
Quote
For the card problem, one other thing to try is to insert

"BL sub_6BAEF4\n" // taskcreate_SD1stInit

below

//"  BL      _sub_FF037E18 \n"  // load DISKBOOT.BIN

in task_Startup_my(), boot.c .
Memory card error still exist.
Would have been too easy if that worked... Thanks for trying.

*

Offline blackhole

  • *****
  • 677
  • A590IS 101b
    • Planetary astrophotography
Re: Porting a camera sx530hs
« Reply #57 on: 20 / March / 2016, 19:13:57 »
The updated file propset_x.h
With these values, the main overrides (TV, AV and ISO) are now working well.
The camera is stable and there is no problems with freezing  or with a other undesirable effects.


Re: Porting a camera sx530hs
« Reply #58 on: 21 / March / 2016, 16:26:01 »
hey guys, have a couple of noob questions here so please bear with me

i have a sx520 and i did some research and found out it has not been ported yet, i did some more reading and found out that the sx520 and sx530 share the same firmware and that the one listed here can be ported with "minimal changes"

now here are my questions:

1. would it be possible for someone like me, with minimal programing skills(pretty good computer knowledge but almost non-existing programing skills) to do the port, i dont mind spending the time reading and researching, but i would like to know if programing knowledge is a requirement.

2.if its possible for me to do it, could someone point me in the right starting direction as to what needs to be changed, i know that first i must create a dump file (there is one already listed on the forums but its for sx520 firmware v.1.00b so im assuming i need to create a new one for v.1.00c)

Re: Porting a camera sx530hs
« Reply #59 on: 21 / March / 2016, 19:03:41 »
i have a sx520 and i did some research and found out it has not been ported yet, i did some more reading and found out that the sx520 and sx530 share the same firmware and that the one listed here can be ported with "minimal changes"
I curious about where you saw that?  Just for interest sake, can you provide a link?

EDIT :  never mind - I found the reference. SX520 Porting Process and Links  Srsa_4c can probably comment on what "minimal changes" means in this case.


Quote
1. would it be possible for someone like me, with minimal programing skills(pretty good computer knowledge but almost non-existing programing skills) to do the port, i dont mind spending the time reading and researching, but i would like to know if programing knowledge is a requirement.
Possible ?  Yes.   Likely?  Maybe.   Easy ? No.

An little understanding of C and Assembler languages at some level is probably necessary. As well as some knowledge about how a computer program is compiled and built into executable code.    But most of doing a CHDK is not really programming (i.e. creating something new) - it's more about decoding stuff that is already there and translating it a bit to work with CHDK.

Quote
2.if its possible for me to do it, could someone point me in the right starting direction as to what needs to be changed, i know that first i must create a dump file (there is one already listed on the forums but its for sx520 firmware v.1.00b so im assuming i need to create a new one for v.1.00c)
The sx530 code in the CHDK SVN code repository is for the 1.00c.   If it's actually identical to the one for the sx520 1.00c then you are in luck. 
The best way to find out is to dump the firmware  ( http://chdk.wikia.com/wiki/Obtaining_a_firmware_dump ) using the Canon BASIC dumper and post the result here for someone to check.
EDIT : see my previous edit - sounds like we already have a sx520 1.00c dump.
« Last Edit: 21 / March / 2016, 19:47:11 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics