supplierdeeply

SX260 HS Porting Thread

  • 623 Replies
  • 64317 Views
  • Publish
    SX260 HS Porting Thread
    « on: 24 / March / 2012, 18:41:26 »
    Advertisements
    Hello everyone.  Just got my SX260 HS.  Naturally, the first thing I did was check and dump the firmware.

    Here's the firmware info:
    Code: [Select]
    Canon PowerShot SX260 HS
    P-ID:3244 NT D
    Firmware Ver GM1.00B (1.0.0.0)
    Adj Ver.005.011
    Serial No. XXXXXXXXXXXX
    Build: Jan 6 2012  17:07:27
    NoError
    Mecha Firm Ver. 3.00
    MechaDSP Firm Ver. 0.00

    Dumped firmware using Canon Basic instructions.
    DryOS firmware address is FF000000
    Firmware Size: 16 MB
    I've hosted the firmware dump at http://dl.dropbox.com/u/8938380/PRIMARY.BIN

    Please let me know if there is a more appropriate place to host this dump than my personal Dropbox.

    I am a career computer programmer, but I've never done a CHDK port before.  We'll see how smoothly the port goes from here.

  • Publish
    Re: SX260 HS Porting Thread
    « Reply #1 on: 24 / March / 2012, 18:45:28 »
    Welcome !    CHDK user fe50 will likely pick  up your dump and add it to the CHDK repository on box.com.

    Meanwhile,   I assume you've found the pages on the wiki about porting to a new camera ?  This forum and the CHDK IRC channel can be a big help too.

    *

    Offline reyalp

    • ******
    • 9858
  • Publish
    Re: SX260 HS Porting Thread
    « Reply #2 on: 24 / March / 2012, 18:45:50 »
    Welcome.

    Sounds like you are off to a good start. If you haven't already found it, I'd suggest starting here http://chdk.wikia.com/wiki/Adding_support_for_a_new_camera and also having a look through the other links in http://chdk.wikia.com/wiki/For_Developers

    If you want more real-time advice, you can sometimes find developers in the #chdk irc channel on freenode.


    edit:
    you win this time waterwingz >:(

    Form the dump, I see this is the first DryOS R50 camera we've seen. That likely means new encoding values for diskboot and ps.fi2 and possibly a new propset.
    « Last Edit: 24 / March / 2012, 18:51:02 by reyalp »
    Don't forget what the H stands for.

    *

    Offline philmoz

    • *****
    • 2936
      • Photos
  • Publish
    Re: SX260 HS Porting Thread
    « Reply #3 on: 24 / March / 2012, 22:54:22 »
    At the moment the signature finder (finsig_dryos.c) barfs pretty badly on this new DryOS version.

    I'll look at why it is failing and see if I can fix it up so it at least generates the stubs_entry.S file.

    Phil.
    CHDK ports:
      sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
      g12 (1.00c, 1.00e, 1.00f & 1.00g)
      sx130is (1.01d & 1.01f)
      ixus310hs (1.00a & 1.01a)
      sx40hs (1.00d, 1.00g & 1.00i)
      g1x (1.00e, 1.00f & 1.00g)


    *

    Offline philmoz

    • *****
    • 2936
      • Photos
  • Publish
    Re: SX260 HS Porting Thread
    « Reply #4 on: 25 / March / 2012, 05:51:03 »
    Revisions 1768 (release-1.0) and 1769 (trunk) contain an updated finsig_dryos that will, hopefully, work correctly with the R50 DryOS version.

    There are some functions not found automatically, attached is a stubs_entry2.S file that I think should be correct for the missing functions (DeleteFile_Fut, and MakeDirectory_Fut).

    Note: this will all need careful testing to make sure everything is being found correctly. Canon seems to have made some strange changes in this version (like copying a chunk of firmware code to RAM and running it from there).

    Phil.
    CHDK ports:
      sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
      g12 (1.00c, 1.00e, 1.00f & 1.00g)
      sx130is (1.01d & 1.01f)
      ixus310hs (1.00a & 1.01a)
      sx40hs (1.00d, 1.00g & 1.00i)
      g1x (1.00e, 1.00f & 1.00g)

    *

    Offline fe50

    • ******
    • 3033
    • IXUS50 & 860, SX10 Star WARs-Star RAWs
      • fe50
  • Publish
    Re: SX260 HS Porting Thread
    « Reply #5 on: 25 / March / 2012, 06:16:09 »
    Added the
    • SX260 1.00B
    full 16MB dump (dumped with cBasic udumper) by schapman from this forum post to the box.net/chdk repository.

  • Publish
    Re: SX260 HS Porting Thread
    « Reply #6 on: 27 / March / 2012, 20:59:24 »
    I have found the AF Assist Beam LED address using Canon Basic (binary searches sweeping over ranges of memory and poking them with 0x46 bytes).

    To turn on control over the green AF beam, write 0x46 to 0xC022C200.

    After this is done, the LED address is 0xC0223030.  Write 0x46 to it to turn it on, 0x44 to turn it off, but if I do this before writing 0x46 to 0xC022C200, nothing will happen.

    Is this how other cameras work?

    *

    Offline srsa_4c

    • ******
    • 3118
  • Publish
    Re: SX260 HS Porting Thread
    « Reply #7 on: 27 / March / 2012, 22:51:33 »
    I have found the AF Assist Beam LED address using Canon Basic (binary searches sweeping over ranges of memory and poking them with 0x46 bytes).

    To turn on control over the green AF beam, write 0x46 to 0xC022C200.

    After this is done, the LED address is 0xC0223030.  Write 0x46 to it to turn it on, 0x44 to turn it off, but if I do this before writing 0x46 to 0xC022C200, nothing will happen.

    Is this how other cameras work?
    Earlier models used to be less complicated. This page: http://magiclantern.wikia.com/wiki/Register_Map#GPIO_Ports might give a clue about those magic values. Poking random GPIOs may bring some undesired effects, it's not really known how they are wired.


    *

    Offline c10ud

    • ***
    • 244
  • Publish
    Re: SX260 HS Porting Thread
    « Reply #8 on: 28 / March / 2012, 06:31:29 »
    @srsa_4c: interesting read, thanks!

    @schapman: you may want to check this post out regarding finding led addresses http://chdk.setepontos.com/index.php?topic=7887.msg83244#msg83244 it's not exahustive or something, but you could check if you can find the same pattern on your camera

  • Publish
    Re: SX260 HS Porting Thread
    « Reply #9 on: 28 / March / 2012, 19:07:35 »
    OK, Got the LED addresses.

    First, enable control by writing 0x46 to the following addresses

    0xC022C200 <-- Required for AF Beam control to work
    0xC0223000 <-- Required for I/O LED control to work
    0xC0223070 <-- Required for I/O LED control to work

    After doing this, these are the on/off addresses

    0xC0223030 <-- AF Beam
    0xC022C028 <-- I/O LED

    Write 0x46 to light the LED, 0xCF to turn it off. 

    Writing 0x44 will turn off the AF beam, but it won't turn off the I/O LED.  0xCF works for both.

     

    Related Topics