Author Topic: CHDK for SX120  (Read 83556 times)

Offline michaelh99

  • Jr. Member
  • **
  • Posts: 65
Re: CHDK for SX120
« Reply #15 on: 22 / November / 2009, 18:27:09 »
  • Publish
  • Still interested in helping out...

    Any news?

    I'm also interested in the port as well as willing to help in any way I can.  I'm a newbie at CHDK but I'll try to help if you'll share or point me to what you've done so far.

    Offline ryuhikari120

    • Rookie
    • *
    • Posts: 14
    Re: CHDK for SX120
    « Reply #16 on: 28 / November / 2009, 14:59:58 »
  • Publish
  • Anyone working on this?

    Offline ryuhikari120

    • Rookie
    • *
    • Posts: 14
    Re: CHDK for SX120
    « Reply #17 on: 03 / December / 2009, 19:14:03 »
  • Publish
  • Is anyone working on this at all?

    Offline reyalp

    • Guru Member
    • ******
    • Posts: 4826
    Re: CHDK for SX120
    « Reply #18 on: 04 / December / 2009, 03:10:29 »
  • Publish
  • Is anyone working on this at all?
    If someone were working on it, there would be updates in this thread.
    Don't forget what the H stands for.

    Offline ryuhikari120

    • Rookie
    • *
    • Posts: 14
    Re: CHDK for SX120
    « Reply #19 on: 04 / December / 2009, 06:52:17 »
  • Publish
  • oh...  Well, I dont know what to do or what programs, but if someone can provide me with instructions on how to port it, ill do it.  I have too much free time anyway

    Offline reyalp

    • Guru Member
    • ******
    • Posts: 4826
    Re: CHDK for SX120
    « Reply #20 on: 04 / December / 2009, 08:41:28 »
  • Publish
  • oh...  Well, I dont know what to do or what programs, but if someone can provide me with instructions on how to port it, ill do it.  I have too much free time anyway

    1) become proficient in C
    2) Learn enough assembly language that you can follow it reasonably well with the help of a reference manual.
    3) Get a working build environment. Refer to http://chdk.wikia.com/wiki/For_Developers for instructions
    4) Get a firmware dump, if there isn't one already.
    5) Follow the instructions in http://chdk.wikia.com/wiki/Adding_support_for_a_new_camera

    Note:
    You will not find step by step instructions for #1 and #2 here. Together they represent 2-4 terms worth of university level CS courses, depending where you start from.
    « Last Edit: 04 / December / 2009, 08:46:43 by reyalp »
    Don't forget what the H stands for.

    Offline ryuhikari120

    • Rookie
    • *
    • Posts: 14
    Re: CHDK for SX120
    « Reply #21 on: 04 / December / 2009, 20:15:01 »
  • Publish
  • Ah... I'll ask my dad if he can do it then... >_>

    Offline michaelh99

    • Jr. Member
    • **
    • Posts: 65
    Re: CHDK for SX120
    « Reply #22 on: 06 / December / 2009, 22:34:24 »
  • Publish
  • I've sent an email to gajownik but he seems to have dropped off the face of the planet.  I'll be getting one of these for good in a few weeks and will attempt to start my own port over the holidays, when I'll have more "free" time

    Offline reyalp

    • Guru Member
    • ******
    • Posts: 4826
    Re: CHDK for SX120
    « Reply #23 on: 14 / December / 2009, 03:51:26 »
  • Publish
  • from http://chdk.setepontos.com/index.php/topic,847.msg44577.html#msg44577
    So, the brand new SX120 IS is in my hands now :-) Its FW version is the same as in CHDK part1 archive, so nothing new here.
    Firmware dump is loaded in IDA, initial CHDK.idc run completed, FLIRT signatures applied. Now I will write PM to gajownik -- he seems to have done some initial porting.

    A question is to how one should choose a reference port. It seems that I should look for well-supported camera based on DryOS and DIGIC-IV processor. It is either SX10 or SX200, is it right choice?

    Also I'd like to know what gcc/binutils version is in use right now. Is gcc 4.3.3 + binutils 2.18 considered to be stable (for generating image, I'm aware of binutils 2.18 bugs described in the wiki). Do do you all use gcc 4.2.1?

    EDIT: I've managed to build arm-elf toolchain and gcc 4.3.3, succesfully generated CHDK for Canon SX200IS. Had to build without "--with-cpu=arm9".
    Now will poke gajownik...

    I'd suggest the SX10 as a primary reference, it's a reasonably mature and was mostly done by people who are experienced with the CHDK codebase. FWIW, I don't suggest copying any port and then trying to "fix" it. The problem is that a lot of things can be broken without causing something obvious like a crash. So they get passed on to the new port without ever getting corrected, leading to obscure bugs that I have to track down later. See http://chdk.setepontos.com/index.php/topic,3977.msg37430.html#msg37430 for some further thoughts.  In any case, you will want to look at the other SXnnn cameras as well.

    Don't forget what the H stands for.

    CHDK Forum

    Re: CHDK for SX120
    « Reply #23 on: 14 / December / 2009, 03:51:26 »

    Offline michaelh99

    • Jr. Member
    • **
    • Posts: 65
    Re: CHDK for SX120
    « Reply #24 on: 14 / December / 2009, 17:15:18 »
  • Publish
  • fwiw, which is not much since I'm at a customer site right now and not my "own man" I've got the camera and have downloaded and built the source for the sx100 (I'll do the sx10 now) I hope to start working on crashing my camera, er, porting soon.

    Offline gajownik

    • Rookie
    • *
    • Posts: 24
      • random crappy photos
    Re: CHDK for SX120
    « Reply #25 on: 16 / December / 2009, 04:13:40 »
  • Publish
  • Hi :)

    One day hard disk in my laptop died and it was a good reason to take a break from everything in my life (I burned myself out). Add to this existential nature of problems and, as you can guess, I did nothing since then. Sorry for letting you down.

    If someone is willing to continue porting you can find source code attached to this post (based on older svn checkout).

    * loader/ seems to be finished.
    * platform/kbd.c -- finished except one thing: SX120IS does not have KEY_PRINT so I had to define it in static KeyMap keymap[] table with the same value as KEY_FACE. ALT key should be defined in a more sane way...
    platform/lib.c -- there's a bug in vid_bitmap_refresh() -- I did not have time to look at it but this http://chdk.setepontos.com/index.php/topic,4333.msg42131.html#msg42131 should help you (big thanks to RaduP)
    * platform/main.c - TODO
    * platform/shooting.c - TODO
    * plafromt/wrapper.c - TODO

    platform/sx120is/sub/100b/
    * boot.c - JogDial_task_my() TODO (it's quite different than in other firmwares)
    * capt_seq.c - capt_seq_task() is done, but longer exposure does not work
    * lib.c seems to be finished (maybe RAW stuff needs more checking)
    * movie_rec.c TODO
    * stubs* finished

    * include/camera.h - almost everything needs to be fixed

    It would be nice if someone could recheck all the files. I based my work mainly on SX10, SX110 and SX200 firmwares.

    I was able to make DNG RAW files but with broken colour palette (include/camera.h!). badpixel.lua does not work -- you have to create appropriate file on the SD card on your own. I wasn't able to import CRW files in anything.

    I presume that I will come back to porting in one month period or something like that. Unfortunately, I have more important things to finish first :/

    Regards.
    "Trying is the first step towards failure." (Homer Simpson)

    Offline michaelh99

    • Jr. Member
    • **
    • Posts: 65
    Re: CHDK for SX120
    « Reply #26 on: 16 / December / 2009, 06:01:16 »
  • Publish
  • Excellent.  I can't promise I'll be any faster since I still haven't made it back home but I've got a strong incentive to work on this

    Offline RedZone

    • Rookie
    • *
    • Posts: 5
    Re: CHDK for SX120
    « Reply #27 on: 17 / December / 2009, 04:50:16 »
  • Publish
  • Michael, would you consider it going over your head if I gave this a shot?  I've never done a CHDK port before and I'm not an expert in computers, but I do know C and a small amount of assembly (just got through a class on assembly actually). 

    I make no promises, but I just got this camera today and love it so I have high incentive to get this done.

    But Michael, if you don't want me to try, I won't.

    Offline michaelh99

    • Jr. Member
    • **
    • Posts: 65
    Re: CHDK for SX120
    « Reply #28 on: 17 / December / 2009, 10:33:35 »
  • Publish
  • Note at all, that's what open source is all about.  I don't have a clear sense of when these things get put into the repository but in the meantime I'll put my mods up here if you will.

    Offline Kibab

    • Rookie
    • *
    • Posts: 8
    Re: CHDK for SX120
    « Reply #29 on: 17 / December / 2009, 11:08:09 »
  • Publish
  • gajownik, many thanks!
    So, yesterday I've launched CHDK on SX120 :-) Had to correct some things though, it seems that something has changed since r816 :-)
    I have no keys for making FI2 yet, so all I can is load CHDK via DISKBOOT.BIN automatically.
    Now I'll prepare my modifications for public testing and place  them here.

    "levent_table" address should be found, I can't do this without IDA databases for reference cameras. I plan to make them in a couple of days.

     


    SimplePortal 2.3.3 © 2008-2010, SimplePortal