Author Topic: SX200is Porting  (Read 108927 times)

Offline Ezzelin

  • Rookie
  • *
  • Posts: 37
Re: SX200is Porting
« Reply #690 on: 23 / October / 2009, 18:47:29 »
  • Publish
  • One more thing... is there any way to have the camera always start in record mode when pressing the ON/OFF button? It's annoying to have to hold the button down. Is this standard behavior for CHDK?
    Cameras: SX200 IS 100c US, S3 IS US

    Offline OldGit

    • Sr. Member
    • ****
    • Posts: 303
    Re: SX200is Porting
    « Reply #691 on: 23 / October / 2009, 18:50:42 »
  • Publish
  • One more thing... is there any way to have the camera always start in record mode when pressing the ON/OFF button? It's annoying to have to hold the button down. Is this standard behavior for CHDK?
    As far as I know, yes, it's standard
    SX200 IS-100C

    Offline whim

    • Guru Member
    • ******
    • Posts: 1977
    • A620/A630/A590-101b/i70-101b/i870-101a/i300
    Re: SX200is Porting
    « Reply #692 on: 23 / October / 2009, 19:55:59 »
  • Publish
  • Quote
    As far as I know, yes, it's standard

    In fact it's quite logical, suppose you do a short press of the ON/OFF button. What happens ?

    1) The cam (under Canon OS) jumps to it's entry point and goes through it's initialisation routines
    2) Once it detects write protect & DISKBOOT.BIN presence a reboot takes place -> CHDK is loaded and started
    3) Once CHDK has hooked the keyboard task it can 'listen' to key input

    so, unless the button is still pressed when the cam has 'finally' arrived at point 3) CHDK has no way of
    knowing which command (on/off or play button) has triggered the startup, and will default to play mode ...

    wim

    PS: cams that have a mechanical play/shoot switch (most older cams) will happily boot into shoot mode
          on short press
    « Last Edit: 23 / October / 2009, 20:07:27 by whim »

    Online reyalp

    • Guru Member
    • ******
    • Posts: 4826
    Re: SX200is Porting
    « Reply #693 on: 24 / October / 2009, 01:07:25 »
  • Publish
  • whim: technically, we check the button a bit before #3, in boot.c, e.g. (sx10 100c)
    Code: [Select]
       *(int*)(0x25BC+4)= (*(int*)0xC0220134)&1 ? 0x2000000 : 0x1000000; // replacement of sub_FF8218C8 for correct power-on.

    See also http://chdk.kernreaktor.org/mantis/view.php?id=300

    Note that with enough gymnastics we might be able to grab the button state a bit earlier in the boot process, but I suspect most of the time is spent by the old firmware loading our image.

    The only way to really fix this would be if the button state is left lying around somewhere it doesn't get clobbered when the diskboot or FI2 loads.
    Don't forget what the H stands for.

    Offline whim

    • Guru Member
    • ******
    • Posts: 1977
    • A620/A630/A590-101b/i70-101b/i870-101a/i300
    Re: SX200is Porting
    « Reply #694 on: 24 / October / 2009, 02:01:39 »
  • Publish
  • @reyalp

    thanks for putting the dots on the i's !

    BTW  Is there any technical reason the default boot logic could be not reversed ? I mean
            
            current:     if 'on/off' looooooong pressed -> shoot mode        else -> play mode

            reversed:   if 'play'    looooooong pressed -> play mode          else -> shoot mode

    (i personally much prefer the current logic, but i'm sure there would be takers for reverse logic too)

    cheers,

    wim

    Offline Ezzelin

    • Rookie
    • *
    • Posts: 37
    Re: SX200is Porting
    « Reply #695 on: 24 / October / 2009, 02:41:31 »
  • Publish
  • Good idea whim. If we can't detect the button state, we should at least be able to set the default startup mode. I'd probably take the second option, as it would reduce startup time a little.
    Cameras: SX200 IS 100c US, S3 IS US

    Online reyalp

    • Guru Member
    • ******
    • Posts: 4826
    Re: SX200is Porting
    « Reply #696 on: 24 / October / 2009, 02:54:41 »
  • Publish
  • BTW  Is there any technical reason the default boot logic could be not reversed ? I mean
    No really serious ones that I can think of, but the current decision happens long before the cfg has been loaded.
    I'd probably take the second option, as it would reduce startup time a little.
    It wouldn't be faster than holding the button down (for those cameras that implement it properly, some don't). More convenient or comfortable maybe, but not faster.

    IMO, once you are in the habit of holding the button down until the lens starts to extract, the current system works quite well.
    Don't forget what the H stands for.

    Offline whim

    • Guru Member
    • ******
    • Posts: 1977
    • A620/A630/A590-101b/i70-101b/i870-101a/i300
    Re: SX200is Porting
    « Reply #697 on: 24 / October / 2009, 15:08:03 »
  • Publish
  • @Ezzelin / any SX200IS users preferring to hold down the "play" instead of the "on/off" button ;)

    BTW  Is there any technical reason the default boot logic could be not reversed ? I mean

    No really serious ones that I can think of, but the current decision happens long before the cfg has been loaded.
    I'd probably take the second option, as it would reduce startup time a little.

    It wouldn't be faster than holding the button down (for those cameras that implement it properly, some don't). More convenient or comfortable maybe, but not faster.

    IMO, once you are in the habit of holding the button down until the lens starts to extract, the current system works quite well.



    tested out 'reverse boot logic' on my ixus870is, using the info from reyalp's post #693, works
    just swapped the values:
    Quote
    //   *(int*)0x2394= (*(int*)0xC02200F8)&1 ? 0x200000 : 0x100000; // replacement of sub_FF821958 for correct power-on.
       *(int*)0x2394 = (*(int*)0xC02200F8)&1  ? 0x100000 : 0x200000; // replacement of sub_FF821958 for correct power-on.

    result: short press on either on/off or play button starts cam shoot mode
              long press play button starts play mode

    As reyalp said, it will not be possible to implement this as a menu option, because the CFG is not loaded yet
    when this happens; it should be easy to implement as a patch or compile time option though done, see patch

    cheers,

    wim

    edit3: opened a separate topic for this here: http://chdk.setepontos.com/index.php/topic,4421.msg42278.html#msg42278
             (the patch is attached there, now)
    « Last Edit: 28 / October / 2009, 02:57:40 by whim »

    Offline tehdog

    • Newbie
    • *
    • Posts: 4
    Re: SX200is Porting
    « Reply #698 on: 24 / October / 2009, 21:10:18 »
  • Publish
  • with the GM1.00D firmware in the chdk menu "Miscellaneous->Show build info it says "FW Vers: 100c"

    is that a bug?

    CHDK Forum

    Re: SX200is Porting
    « Reply #698 on: 24 / October / 2009, 21:10:18 »

    Offline whim

    • Guru Member
    • ******
    • Posts: 1977
    • A620/A630/A590-101b/i70-101b/i870-101a/i300
    Re: SX200is Porting
    « Reply #699 on: 24 / October / 2009, 21:29:10 »
  • Publish
  • @tehdog

    No. the two currently known versions are functionally equivalent from the point of vue of CHDK,
    so the autobuild just copies a 100 C to a 100 D version, that's why your CHDK identifies itself as
    100 C

    HTH,

    wim

    Offline analysis

    • Newbie
    • *
    • Posts: 2
    Re: SX200is Porting
    « Reply #700 on: 25 / October / 2009, 20:30:35 »
  • Publish
  • Thank you for the great work!

    My problem: According to the chdk manual half-press shooter + down should toggle the shutter override. But here it toggles the histogramm. Half-press shutter+ right button doggles the osd but not all symbols. Half-press shutter + up toggles nothing, so can some of this shortcuts remapped? Now I can not use the shortcut shutter override function, every time stands "no overrides" on the display.
    SX200 IS (100D)

    Offline fe50

    • Guru Member
    • ******
    • Posts: 2694
    • IXUS50 & 860, SX10 Star WARs-Star RAWs
      • fe50
    Re: SX200is Porting
    « Reply #701 on: 25 / October / 2009, 23:56:34 »
  • Publish
  • Hello & welcome, analysis !
    Now I can not use the shortcut shutter override function, every time stands "no overrides" on the display.

    You can set up everything from the CHDK menu, also the shutter overrides.
    In the "Extra Photo Operations" CHDK menu set "Disable Overrides" either to OFF or DISABLED, read more about this feature here: Disable Overrides

    The keys/keypress combinations you mentioned are just additional shortcuts for the menu items.

    Offline OldGit

    • Sr. Member
    • ****
    • Posts: 303
    Re: SX200is Porting
    « Reply #702 on: 26 / October / 2009, 16:53:06 »
  • Publish
  • edit2: seeing that the patch actually gets downloaded, can you report if it works for your cam ? TIA
             PM me if you would like other binaries uploaded
    @whim,
    I haven't tried your patch as I have some problems with my main internet PC at present but,
    when I did the first stage of the port I made a typo / mistake and set this up the way you have it now.

    It does work but we "fixed it" as it was seen as a bug (non CHDK standard).
    The only problem I can see is for users of multiple cameras with CHDK (what camera starts how).

    If this is now changed will it not need to be documented in the user guide and on the camera specific details in wiki ?,
    or you you suggesting an update to change all cameras?.
    OldGit
    SX200 IS-100C

    Offline theplague

    • Rookie
    • *
    • Posts: 43
    Re: SX200is Porting
    « Reply #703 on: 26 / October / 2009, 17:18:11 »
  • Publish
  • Unrelated question,
    I have my card dual bootable working fine with CHDK, the card is locked in order for CHDK to start. I have taken a few shots that I would like to use the camera built-in "iContrast" function, under the Canon menu, I can preview the image but when I apply the changes it doesn't save it, I believe is because the card is locked, if I unlock the card, the camera won't see the images, so I lock it again and the camera doesn't save my changes, guys, do you know a solution for applying iContrast when using CHDK like this?
    Thank you!

    Offline whim

    • Guru Member
    • ******
    • Posts: 1977
    • A620/A630/A590-101b/i70-101b/i870-101a/i300
    Re: SX200is Porting
    « Reply #704 on: 26 / October / 2009, 17:50:46 »
  • Publish
  • @OldGit

    I was only trying to provide an option for people who can't live with CHDK's 'normal' behaviour, i'm not
    suggesting in any way that it should be included in trunk (and won't use it myself)
    That said, if enough people want it included (the option i mean, not the default behaviour !)
    they could always try to convince someone in authority ...

    I should probably move the post to a new thread, what do you think ?

    sorry for the confusion,

    wim

    « Last Edit: 26 / October / 2009, 17:53:25 by whim »

     


    SimplePortal 2.3.3 © 2008-2010, SimplePortal