Where do I get the BIG picture of CHDK ?

  • 25 Replies
  • 8680 Views
*

linuxGuy

  • Publish
    Where do I get the BIG picture of CHDK ?
    « on: 06 / December / 2007, 16:52:25 »
    Advertisements
    I've read/scanned the Wiki, but I am missing the details of the big picture as far as CHDK is concerned. 

    Is there a FAQ somewhere ?

    If someone feeds me info, I'll write documentation.

    I have a ton of questions...

    Who started CHDK ?  How long has it been running ?   

    If I understand correctly, these cameras will run scripts that are put on the memory card.  How was this discovered ?  How were the memory locations discovered ?  Why does one need a copy of the firmware ?  What are the limits of what can be done ?   Who wrote VxWorks ?  What is this DryOS ?  Where did the names come from ?

    Why hasn't more code for the 10D/20D/30D been written ?  Those are severely limited cameras for what they might be capable of !



    *

    linuxGuy

  • Publish
    Re: Where do I get the BIG picture of CHDK ?
    « Reply #1 on: 06 / December / 2007, 19:01:19 »
    Answering my own questions, in case it helps someone else.  Beware... I am a total NOOB.

    Quote
    Is there a FAQ somewhere ?

    This FAQ answers some general questions, from a users point of view.
    http://chdk.wikia.com/wiki/FAQ

    Quote
    If I understand correctly, these cameras will run scripts that are put on the memory card.
    I'm a bit foggy on this after reading everything, but it looks like there are uBasic scripts and then there is the firmware itself.  And it looks like the "scripts" can be permanently loaded into the camera, or at least to the point where they auto load everytime the camera is turned on.  I guess that doesn't make them "in" the camera in the sense of residing in the camera ROM though, just on the memory card.

    The FAQ says this:
    ================================================================
    Q. How do I use scripts?
    A. CHDK allows you to automate your camera by running "scripts", small and simple programs written in a short-hand version of BASIC. You can find some pre-made scripts like bracketing, intervalometer etc. here or write your own scripts using the scripting language. To use a script, you have to do this...
    ================================================================

    So back to my original question... why do we need the firmware again ?  And is there actually a BASIC interpreter in these cameras that will run a uBASIC script ?


    Quote
    How was this discovered ?
    Guessing here, I bet that someone got something from Canon that ran on a memory card.  Maybe a firmware update ? 

    Quote
    How were the memory locations discovered ?
    I am guessing someone did a lot of disassembling, as is discussed in the DryOS discussion. 

    Quote
    Why does one need a copy of the firmware ?
    I am guessing that the new functionality gets linked in with the current camera image and a complete new bin file is made.  But then what is the talk about the uBasic Scripts ?  BASIC is interpretted.  Are the files on the memory cards interpetted Basic text files or executable bin files ? :confused:

    Quote
    What are the limits of what can be done ?
    I don't know the answer to this.  There are some broad hints in "Q. May I suggest a new feature?" in the FAQ.  What does uBASIC have access to ?  Everything ?  How low level ?

    Quote
    Who wrote VxWorks ?
    Wind River.  http://www.windriver.com/  How do we know the camera isn't running Linux ?

    Quote
    What is this DryOS ?
    An OS that Canon wrote and used in other camera like devices.
    http://www.canon.com/technology/canon_tech/explanation/dryos.html

    Quote
    Where did the names come from ?
    I have no idea.  Disclaimer: I haven't read the Wind River website yet.

    Quote
    Why hasn't more code for the 10D/20D/30D been written ?    Those are severely limited cameras for what they might be capable of !
    I have no idea.

    Other things I have gleaned... These cameras use an ARM processor.  I can't find where I saw that in the Wiki now...

    Please add to this.  If it becomes useful, I'll make it into a document.

    *

    linuxGuy

  • Publish
    Re: Where do I get the BIG picture of CHDK ?
    « Reply #2 on: 06 / December / 2007, 19:05:15 »
    Was the BASIC interpeter always in the camera OS or did developers add it ?  Were the camera functions there or did developers add hooks so that the BASIC interpeter could control the camera ?

    *

    linuxGuy

  • Publish
    Re: Where do I get the BIG picture of CHDK ?
    « Reply #3 on: 06 / December / 2007, 19:38:32 »
    Thanks for the reply, Barney.

    For those that are interested, there is more general background info here:
    http://www.linux.com/feature/118946

    So where does one get the source for the CHDK files that generate the firmware people are loading ?

    I think adding the BASIC interpeter was an EXCELLENT IDEA.  Kind of like VBscript for applications, though I don't like VBScript for applications !   


    *

    Offline GrAnd

    • ****
    • 916
    • [A610, S3IS]
      • CHDK
  • Publish
    Re: Where do I get the BIG picture of CHDK ?
    « Reply #4 on: 07 / December / 2007, 08:09:10 »
    > Who started CHDK ? 
    It was started by Vitaly. But even I do not know where is hi from.

    > How long has it been running ?   
    The initial 'raw_hack' was available in the end of November 2006. In the February '07 it was taken shape of CHDK (HDK).

    > If I understand correctly, these cameras will run scripts that are put on the memory card.  How was this discovered?
    It was implemented by Vitaly. BTW, the camera itself can run some encoded scripts, but nobody knows a syntax .

    > How were the memory locations discovered ?
    By disassembling of firmware updates for some IXUS and A620 cameras.

    > Why does one need a copy of the firmware ? 
    We need to know the exact addresses of functions in the original firmware to call them.

    > What are the limits of what can be done? 
    The amount of free memory, processor speed, etc. In any words - the hardware limitations.

    > Who wrote VxWorks ? 
    http://en.wikipedia.org/wiki/VxWorks

    > What is this DryOS ?
    http://chdk.wikia.com/wiki/DryOS_Porting

    > Why hasn't more code for the 10D/20D/30D been written ?
    Nobody of developers has such cameras. It is not so interesting. If you have money you can afford to buy a feture, not to hack for it.

    > Are the files on the memory cards interpetted Basic text files or executable bin files ?
    Just a text files. The interpreter is a part of CHDK, not of the original firmware.

    You are asking too many questions. Are you a spy?  :blink:
    CHDK Developer.

    *

    linuxGuy

  • Publish
    Re: Where do I get the BIG picture of CHDK ?
    « Reply #5 on: 07 / December / 2007, 10:59:43 »
    The CHDK open source code is available for download here:
    http://chdk.wikia.com/wiki/Downloads

    No, I am not a spy.  Just a very interested develop.  I want to add some features to my G9 and 40D.  I'll have some spare time over the Christmas holidays.

    As far as compact cameras doing stuff that SLRs can't... well, OK.   But SLRs do a ton of things that compact cameras can't, like take a fairly clean image at ISO800 or 1600.  They both have their place, which is why I own a G9 and will own a 40D in the near future.

    And no, you can't buy the features you want for a Canon DSLR.  I guess you could if you bought a 1D, but those are large and heavy and very expensive.  Who wants that ?  I want lots of features in a 400D or 40D.  There is lots that can be done to improve them.  Lets get started !

    I guess if both the G9 and 40D run the DryOS, then I will focusing my attention there.

    *

    Offline GrAnd

    • ****
    • 916
    • [A610, S3IS]
      • CHDK
  • Publish
    Re: Where do I get the BIG picture of CHDK ?
    « Reply #6 on: 07 / December / 2007, 11:24:53 »
    The CHDK open source code is available for download here:
    http://chdk.wikia.com/wiki/Downloads
    WOW! How did you find that?  :haha  :lol
    CHDK Developer.

    *

    linuxGuy

  • Publish
    Re: Where do I get the BIG picture of CHDK ?
    « Reply #7 on: 07 / December / 2007, 11:40:57 »
    I was looking for SOURCE.  Lots of the links on that page are BINARIES.  Some have source, but you have to hunt.  I want source.  Is there a server around loaded with source ?  Say sourceforge...  ?

    Thanks.


    *

    linuxGuy

  • Publish
    Re: Where do I get the BIG picture of CHDK ?
    « Reply #8 on: 07 / December / 2007, 12:17:57 »
    How about putting a link on that page named SOURCE or Getting the Source code and point it here:
    http://chdk.wikia.com/wiki/Compiling_CHDK_under_Windows#The_sources

    Instead of burying it under "Compiling CHDK under Windows".  I didn't want to compile anything (yet), I wanted to look at the source to see what has been done and how.

    LG

    *

    linuxGuy

  • Publish
    Re: Where do I get the BIG picture of CHDK ?
    « Reply #9 on: 07 / December / 2007, 13:17:09 »
    OK, I got the source.  It looks well organized and clean.  Could use more comments and documentation ?  Kudos for a generally well done job.

    I have a few general questions...

    1) The ARM processor core has a JTAG port built into it.  Has anyone investigated if the processor (or board !) had a JTAG port on it ?

    2) Most ARM processors have a provision for encrypting the contents of the ROM.  Apparently the ROMs on the cameras are not encrypted, thus the firmware can be dumped ?  Do I have this right ?

    (I have been using  the Philips LPC21xx processors for my projects, so I am vaguely familiar with *some* ARM processors.)

    3) What tools are developers using to debug the code they write ?  I saw a routine for blinking the camera LED.  What sort of baud rate can be accomplished doing that and has anyone written/run a monitor to help with debugging ?

    4) What hardware specs are we working with ?  Typical processor speed, exact processor model, ROM/RAM/(e)Eprom sizes ?

    5) I assume that all of the code stored in the current repository is for the VxWorks OS.   How is the code going to be organized when we start working on the DryOS OS ? Total fork ?  Integrated into the current structure ?

    6) What tools are being used for disassembly ?  How are various routines discovered for a camera ?  I assume the disassembler can find the function pre and post setup code and functions can be found, but how are the developers determining what they do ?

    6) Has the DryOS firmware been dumped by anyone yet ?  Is there a functioning "blink the LED" program for a DryOS camera ?

    7) If I am going to start working on CHDK stuff, with the eventual goal of getting the G9 and 40D cameras working, where do you suggest that I start ? Ie with what tasks ?  Should I do some work on a VxWorks camera to get the feel for it ? (Even though I don't own a VxWorks camera...)

    Thanks.
    « Last Edit: 07 / December / 2007, 13:19:19 by linuxGuy »

     

    Related Topics