SD940 (IXUS120) porting thread

  • 542 Replies
  • 59769 Views
  • Publish
    SD940 (IXUS120) porting thread
    « on: 21 / November / 2010, 22:21:15 »
    Advertisements
    =====Latest Update Information Maintained Here =======

    Latest version of CHDK for the SD940 (IXUS120) firmware revs 100e, 101a, 102c, 103b & 103c are available at :

    CHDK autobuild server and CHDK-DE

    If you don't see your firmware version listed here,  this would be good place to post a request for help.

    Most recent update specific to the SD940 (IXUS120) made on 2012 Aug 03 to change the default <ALT> key to be the Playback key ( the green triangle ) rather than the DISP key.  You can change it to DISP using the CHSK menus if you prefer it to work that way.

    ========================================

    Original Post Below --->

    Hi there !  I've been working on getting CHDK working on my SD940 in most of my "spare" time for the last couple of months.   I now have a version that loads and runs ! It displays the CHDK logo after several seconds and runs the CHDK menus when you press the DISP button and then the MENU button.   It beat me at Reversi today so at least one of the games work.

    Still tons of stuff to do.  It took me much longer to get to this point than I would have ever imagined and I'm trying not to think of what lays ahead.  Next step is to get the init_file_modules_task running so that, amongst other things, I can get rid of the startup delay.

    If you are interesting in this camera. please click on my user name on the left beside this post, scroll down to the bottom and send me a personal message (rather than post in this forum).  Once I have the basics running, tell me which function you would most like to see working next ?

    I'll post update links here as I progress and maybe some random notes of things I've learned along the way.

    WW  :D


    « Last Edit: 03 / August / 2012, 22:12:54 by waterwingz »

  • Publish
    Re: SD940 rev 103c porting thread (IXUS120)
    « Reply #1 on: 25 / November / 2010, 12:17:04 »
    Posted version 2 of my Alpha release - this has the hack for RefreshPhysicalScreen() that I posted at http://chdk.setepontos.com/index.php?topic=5857.msg57329#msg57329 so the menus draw and erase properly.  It also has a second task running -  init_file_modules_task() - so in theory it now supports FAT32.  Check it out at :

    SD940-103c-ALPHA2-25Nov2010.zip - 0.52MB

    Progress!

  • Publish
    Re: SD940 rev 103c porting thread (IXUS120)
    « Reply #2 on: 26 / November / 2010, 21:29:51 »
    Spent way too long today trying to understand why the CHDK menus seemed to behave strangely >:(.  That's part of the problem when you don't know how things are supposed to work and don't have a working camera with CHDK to play with.  If I value my time at $1.00 / hour then I could have bought one of the cheaper Canon cameras that work with CHDK and been ahead of the game so far.

    Finally figured out that the menus were being clipped at the right hand side of the screen because I did not have the screen width set correctly.  This version now works better :

    http://www.zshare.net/download/831848957c0184fa/

    And I actually got the clock to display in OSD mode by commenting out the various conditionals that were keeping it from displaying when enabled.  Need to figure that out - the rest of the OSD stuff probably has the same issue.
    « Last Edit: 26 / November / 2010, 21:40:35 by waterwingz »

    *

    Offline reyalp

    • ******
    • 9858
  • Publish
    Re: SD940 rev 103c porting thread (IXUS120)
    « Reply #3 on: 26 / November / 2010, 21:59:10 »
    Spent way too long today trying to understand why the CHDK menus seemed to behave strangely >:(.  That's part of the problem when you don't know how things are supposed to work and don't have a working camera with CHDK to play with.  If I value my time at $1.00 / hour then I could have bought one of the cheaper Canon cameras that work with CHDK and been ahead of the game so far.
    By the time you are done, you will probably be up to a nice DSLR setup at McJob wages ;)

    It's a good idea to reset your CCHDK.CFG after fixing this, some things remember their positions.
    Don't forget what the H stands for.


  • Publish
    Re: SD940 rev 103c porting thread (IXUS120)
    « Reply #4 on: 26 / November / 2010, 23:13:57 »
    By the time you are done, you will probably be up to a nice DSLR setup at McJob wages ;)
    I'd go the DSLR route but I don't like Canon DSLR's.  Once you're used to a Nikon, well ....
    It's a good idea to reset your CCHDK.CFG after fixing this, some things remember their positions.
    Thanks - I actually did catch on to the CCHDK.CFG file in the CHDK folder on the SD card.  The reset options in the menu seem to work well but every so often I just delete the file itself to see how things initialize with a cold system.

    I also spent several hours adding code to boot.c to try and track down where in the code it detects the battery door as being open.  Once things are running,  you can pull the same trick used with to ignore the SD card write protect. But something is checking the door switch during startup - but after CHDK boots!  After porting tons of code from firmware to boot.c so I have control of what actually runs,  and inserting "break points" that are basically loops to forever blink the green LED,  I worked myself into a circle of failure.  Maybe it will look different tomorrow.  Or maybe I'll just have to live with it when I wear out the battery door.


    *

    Offline reyalp

    • ******
    • 9858
  • Publish
    Re: SD940 rev 103c porting thread (IXUS120)
    « Reply #5 on: 26 / November / 2010, 23:35:21 »
    After porting tons of code from firmware to boot.c so I have control of what actually runs,  and inserting "break points" that are basically loops to forever blink the green LED,  I worked myself into a circle of failure.  Maybe it will look different tomorrow.  Or maybe I'll just have to live with it when I wear out the battery door.
    See this thread http://chdk.setepontos.com/index.php?topic=5744.0

    I was able to get it to boot with the door open, but I don't understand exactly why...

    If you implement PTP, you can upload without the taking the card out (unless you upload a bad diskboot...)
    Don't forget what the H stands for.

  • Publish
    Re: SD940 rev 103c porting thread (IXUS120)
    « Reply #6 on: 27 / November / 2010, 13:35:03 »
    See this thread http://chdk.setepontos.com/index.php?topic=5744.0
    Yup - that worked.  Thanks.

    If you implement PTP, you can upload without the taking the card out (unless you upload a bad diskboot...)
    Now that looks interesting.  More things to do - never enough time though.  Can you download a complete CHDK diskboot.bin file while CHKD is running ? And is that faster than writing the SD card and moving it back and forth from the camera to computer ?

    *

    Offline reyalp

    • ******
    • 9858
  • Publish
    Re: SD940 rev 103c porting thread (IXUS120)
    « Reply #7 on: 27 / November / 2010, 16:30:11 »
    Now that looks interesting.  More things to do - never enough time though.  Can you download a complete CHDK diskboot.bin file while CHKD is running ? And is that faster than writing the SD card and moving it back and forth from the camera to computer ?
    Yes, the diskboot is only loaded at startup, you can overwrite it with the camera running. Uploading is very fast, I'd guess less than on second.
    Don't forget what the H stands for.


    *

    Offline waldo

    • ***
    • 238
  • Publish
    Re: SD940 rev 103c porting thread (IXUS120)
    « Reply #8 on: 27 / November / 2010, 18:24:19 »
    Any plans to support firmware 101C?   I may be able to help finding addresses in the code - I started that about a year ago on 101C but never finished it.

    Edit: Sorry, I meant 1.02C
    « Last Edit: 19 / December / 2010, 12:05:45 by waldo »

  • Publish
    Any plans to support firmware 101C?   
    I kind of wondered when this question would come up.  There are at least 3 different firmware versions out there according to the wikia.  As I only have a camera with version 1.03c, trying to build for another version "blind" without a test camera would be pretty hard. Not to mention finding the time to do that when my port is barely even in "alpha" status at this point.

    I may be able to help finding addresses in the code - I started that about a year ago on 101C but never finished it.
    How far did you get ?  It sure would be nice to have someone else to work on this with me.  Its amazingly time consuming, especially doing a new camera.  If you were working on a different firmware version, I suspect much would be almost the same (hardware especially) or just slightly shifted in memory.  We could get a lot more done together.

    Maybe some of the other more experience members on this forum can chime in with advice on supporting multiple revisions of firmware for the same base camera ?

     

    Related Topics