Ixus 40 / SD300 v1.00k - beta version available :)

  • 102 Replies
  • 27371 Views
  • Publish
    Ixus 40 / SD300 v1.00k - beta version available :)
    « on: 30 / July / 2008, 15:31:13 »
    Advertisements
    Hi!

    I took the code from this thread
    SD300 porting: I really need some help...
    and invested "some" time to get it working.
    Its really a nightmare browsing asm code from objdump and trying to
    set things up :-X

    However here is a first beta version:
    zSHARE - chdk_ixus40_080730__trunk__.tar.gz

    Scroll down to find the latest version!

    In trunk/bin/ are the compiled files for the cam.

    Limitations:
    - Keyboard is lagging !! sometimes several presses are necessary (cause: kbd task issue, see gui.c/kbd_process stuff)
    - get_parameter_data() returns 0 all the time (different code on sd300, |0x4000 makes it return 0, without it crashs)
    - ...

    Working:
    - scripts: interval_video.bas +interval.bas
    - keyboard/gui hack to prevent kbd task from calling gui functions (i miss 3 of 10 keypresses so its a bit buggy)
    - filebrowser
    - memorydump (some very high locations cause cam resets)
    - capt_seq storing raw files
    - develop raw files by filebrowser
    - getProperty seem to work for most properties (like distance etc maybe differen locs)
    - get cam is shooting hack, see lib.c / capt_seq.c

    RAW file save works but overwrites the same file all the time -> see gparamdata issue
    in order to convert the raws using dcraw a patch is needed:
     diff dcraw.c dcraw.orig
    6485d6484
    <     {  5298000, "Canon",    "Ixus 40", 0},
    6736,6744c6735
    <   } else if (!strcmp(model,"Ixus 40")) {
    <     height = 1720;
    <     width  = 2312;
    <     raw_height = 1728;
    <     raw_width  = 2400;
    <     top_margin  = 6;
    <     left_margin = 12;
    <     load_raw = &CLASS canon_a5_load_raw;
    <    } else if (!strcmp(model,"PowerShot A460")) {
    ---
    >   } else if (!strcmp(model,"PowerShot A460")) {

    Please give it a try and give some feedback/enhance it.

    Adding this to trunk would be difficult because the 5line hack in gui.c (maybe someone finds a better way)

    have fun ;)
    « Last Edit: 02 / August / 2008, 05:14:30 by fishpepper »

    *

    Offline waldo

    • ***
    • 238
  • Publish
    Re: Ixus 40 / SD300 v1.00k - beta version available :)
    « Reply #1 on: 30 / July / 2008, 16:16:47 »
    Thanks for posting that.  Here's a few things I noticed:

    I was not able to get the scripts to work properly.  When I press the shutter button to pause the script, the camera hangs.

    Also, I was not able to get the file browser to work.  It will read the file names OK, but selecting a file does not show its content on the screen.

    CHDK auto-boots OK with the card lock on, but it does not bypass the card lock check, so that the camera refuses to take pictures, reporting "Card Locked".  Taking pictures after manually booting CHDK works OK.


  • Publish
    Re: Ixus 40 / SD300 v1.00k - beta version available :)
    « Reply #2 on: 30 / July / 2008, 16:39:43 »
    scipts hang after pause/interrupt: in wrappers.c change this:
    void disable_shutdown() {
        if (!shutdown_disabled) {
            //causes sometimes lockups (really?)
            //_LockMainPower();
            shutdown_disabled = 1;
        }
    }
    then it works. no idea why. this MainPower issue seems to be buggy/crashing no idea why

    file browser: i think thats normal. i dont think it can read files ;)
    The text reader works ;)

    autoboot:
    damn i think i fixed it before. it was clearing a bit somewhere in the kbd.c asm code :-\
    I will look into that tomorrow ;)

  • Publish
    Re: Ixus 40 / SD300 v1.00k - beta version available :)
    « Reply #3 on: 30 / July / 2008, 16:57:59 »
    sd300 kbd.c:
    change line 418 from:
    "AND   R3, R3,   #1\n"
    to
    "AND  R3, R3, #0\n"    // - clear SD card R/O flag

    i created binaries with the fixed version:
    chdk_ixus40_080730_fix1_bin_only.tar.gz - 0.22MB

    sourcecode: for now fix it yourself, will upload a new archive if i do some more changes :)


    *

    Offline waldo

    • ***
    • 238
  • Publish
    Re: Ixus 40 / SD300 v1.00k - beta version available :)
    « Reply #4 on: 30 / July / 2008, 17:00:48 »
    file browser: i think thats normal. i dont think it can read files ;)
    The text reader works ;)

    You're right, of course.  I wanted to try reading files, but I forgot the proper menu command.  Kind of makes me wonder why there is a File Browser in CHDK if File Reader does pretty much the same thing and more.

    *

    Offline waldo

    • ***
    • 238
  • Publish
    Re: Ixus 40 / SD300 v1.00k - beta version available :)
    « Reply #5 on: 30 / July / 2008, 22:59:22 »
    The new binary seems OK now with regard to the SD card write flag and the hang up when pausing a script.

    Another question:  When trying to build from your source, gcc would not run properly until I deleted the line:
    PATH := ${HOME}/arm-elf/bin:"${PATH}" 
    from makefile.inc  After doing that, it built OK, but I had about 20 compiler warnings, mostly about typecasts and missing function prototypes.  Are you seeing those warnings as well?

  • Publish
    Re: Ixus 40 / SD300 v1.00k - beta version available :)
    « Reply #6 on: 31 / July / 2008, 03:18:22 »
    arm path: ups sorry. its from my arm installation ;)
    warnings: ehh yes you are right. its a beta/ugly hack at some points ;) i will take care of the warnings after fixing all other stuff ;)

  • Publish
    Re: Ixus 40 / SD300 v1.00k - beta version available :)
    « Reply #7 on: 02 / August / 2008, 04:49:55 »
    I see you added some code for the console output.  Did you get that working?  Also did you get the ram dumps working?  Mine looks like it is copying to the sd card, but when you go to read the file in windows it appears corrupted and you cannot copy or view the file.


  • Publish
    Re: Ixus 40 / SD300 v1.00k - beta version available :)
    « Reply #8 on: 02 / August / 2008, 05:13:51 »
    i fixed some more issues :)

    first of all the most important one: keyboard!
    Ok its a dirty hack by starting a second thread polling the kdb data available flag and updating the
    gui but it works -> no more lags & missed keypresses
    And it could be merged into trunk, no more hacking in gui.c required :)

    Changelog:
    080730:
       -initial relase

    080731:
       -uncomment unlock power -> no more hangs after script
       -do sd rw flag overwrite
       -added more stubs to be tested

    080801:
      - kbd fixed. used second task to pull flag & update gui -> no more lagging
     
    080802:
      - added Tv override -> shots with 1/100000 seem to work (waterdrops+flash tested)
      - unlock/lock main power redirected to empty dummy func -> real ones cause lockups FIXME
      - prepared to be merged into trunk, no more core hacks needed :)
      -tested scripts: interval.bas, led_tst.bs, interval_video.bas, zoom.bas, white_balance.bas (causes lockup at custom)

    Setting the exposure time works. I made some nice testpictures of falling waterdrops at 1/100000s :)
    Also timelapses with the simple interval.bas work nicely.

    Here is the source:
    chdk_ixus40_080802__trunk__.tar.gz - 2.57MB
    Binaries are in bin as usual.
    Please test & report any issues ;)


  • Publish
    Re: Ixus 40 / SD300 v1.00k - beta version available :)
    « Reply #9 on: 02 / August / 2008, 15:08:12 »
    Anyone else having problems with downloading from zSHARE? I never actually get to a download link, no matter how many links I click or how long I wait.

     

    Related Topics