supplierdeeply

CHDK for SX120

  • 597 Replies
  • 123887 Views
  • Publish
    Re: CHDK for SX120
    « Reply #30 on: 17 / December / 2009, 12:40:02 »
    Advertisements
    Well, using the tools chdk provided, I found the event table and it's starting position.  At least, I THINK it's the right thing.  The find levent tool says the table starts at 0xFFEB9D1C.

    Yeah I'll put up my mods if you guys will.  The more I look at this the more clear it becomes how unqualified I am.  I'll keep trying though.

    Anyway I've attached the whole event table in a text file.


  • Publish
    Re: CHDK for SX120
    « Reply #31 on: 17 / December / 2009, 14:02:09 »
    I must have screwed something up as I can't even get CHDK to compile.  At this point I have not made any changes to gajownik's build.  Since he didn't include his camera.h I made some guessed (and very cautious) additions to the one included with CHDK. 

    The build of CHDK seems to succeed up until the very end when it gets to gajownik's main.c.


    main.c:41: error: 'MODE_SCN_NIGHT' undeclared here (not in a function)

    This error does not make much sense, and commenting out MODE_SCN_NIGHT leads to an even more non-sensical error, which leads me to believe I'm doing something wrong when trying to compile it. 

    I'm running on OS X Leopard.  I tried to install GCC 4.3.2 and arm-elf-gcc 4.3.2 using MacPorts as recommended by the guide on the wiki, but all MacPorts gave me was GCC 4.3.1 and arm-elf-gcc 4.1.1.  I don't know if that has anything to do with the problem.  I added what I thought was all the appropriate stuff to the path in makefile.inc so that everything SHOULD be able to be found... what did I mess up?


    *

    Offline whim

    • ******
    • 2013
    • A495/590/620/630 ixus70/115/220/230/300/870 S95
  • Publish
    Re: CHDK for SX120
    « Reply #32 on: 17 / December / 2009, 14:37:49 »
    Quote
    what did I mess up

    @RedZone

    maybe nothing ... i noticed gajownik just said
    Quote
    based on older svn checkout

    that's NOT good enough, AFAIK you'll need the exact same SVN checkout, so you need to know the version.
    apart from that, i think you should also ask him for the camera.h - or, even better, the whole thing
    if he has no bandwidth problems.

    hope that helps,

    wim

    PS sorry, don't know about the proper kit for Mac - but maybe someone using it can comment



  • Publish
    Re: CHDK for SX120
    « Reply #33 on: 17 / December / 2009, 15:08:08 »
    Based on that it's using an older version of CHDK, I updated gajownik's main.c and shooter.c to match--the older version defined the mode-mapping in main.c and the new one defines it in shooter.c.  That fixed a lot of compilation problems.  However, there's still a lot more information that we need--the ZSTEP_TABLE_SIZE for CHDK's kbd.c, and the information for camera.h, as you said Whim.  I'll PM gajownik for that information as you suggested.  I'll ask him to point me to the correct svn checkout too, but I'd like to see if I can't adapt it to the new version.  Actually, it looks like Kibab has already done that, so I'll ask his input.
    « Last Edit: 17 / December / 2009, 15:10:22 by RedZone »


  • Publish
    Re: CHDK for SX120
    « Reply #34 on: 17 / December / 2009, 15:25:41 »
    camera.h was included in gajownik's archive -- if you look through "my_random_crap.diff" file you'll find nessesary fixes.
    Attached is the version of SX120IS files that I used to build recent CHDK. It doesn''t include levent_table fix -- by now I've set it identical to SX200.
    Also there is a patch in attached archive, which includes all gajownik fixes and some FreeBSD additions to Makefile.inc. Don't forget to apply this patch before attempting to build.

    I'm using GCC 4.3.3 compiler with binutils 2.18 on FreeBSD 8.0. So I had to fix shebang lines (/bin/sh => /usr/local/bin/bash) and ESED variable. Also, #include <malloc.h> is incorrect, one should use stdlib.h.

    *

    Offline reyalp

    • ******
    • 9957
  • Publish
    Re: CHDK for SX120
    « Reply #35 on: 17 / December / 2009, 16:06:01 »
    main.c:41: error: 'MODE_SCN_NIGHT' undeclared here (not in a function)

    This error does not make much sense, and commenting out MODE_SCN_NIGHT leads to an even more non-sensical error, which leads me to believe I'm doing something wrong when trying to compile it. 
    The trunk has changed quite a bit in this area.  Changesets 847 and 860 are the big ones.

    find_levent in the tools directory should have no trouble getting the event table address.

    If you can figure out what revision gajownik original work was based on (you should be able to get close just by date) you can check that out. However, I would suggest updating to the HEAD as soon as possible.
    Don't forget what the H stands for.

  • Publish
    Re: CHDK for SX120
    « Reply #36 on: 17 / December / 2009, 16:30:18 »
    My work was based on rev816. I put it in the archive name -- I thought that it would be obvious but I should have stated that more clearly :)

    Most of the values in camera.h from my_random_crap.diff are copied from sx110 so please don't treat them as correct ones.
    "Trying is the first step towards failure." (Homer Simpson)

  • Publish
    Re: CHDK for SX120
    « Reply #37 on: 17 / December / 2009, 17:09:45 »
    I applied your patches, Kibab, and they went off without a hitch.  Unfortunately it's very clear that I do not have the correct experience or tools (namely IDA) to tackle modifications myself.  I really don't know enough. :(


  • Publish
    Re: CHDK for SX120
    « Reply #38 on: 17 / December / 2009, 20:37:13 »
    gajownik, if you're monitoring this, could you post the changes you made to camera.h?

  • Publish
    Re: CHDK for SX120
    « Reply #39 on: 18 / December / 2009, 03:23:11 »
    michaelh99: as it was said before, everything you need is in the my_random_crap.diff
    "Trying is the first step towards failure." (Homer Simpson)

     

    Related Topics