Poll

Do you really want CHDK for S5? ;)

YES!
25 (83.3%)
SURE!
1 (3.3%)
GIVE ME!
4 (13.3%)

Total Members Voted: 21

Author Topic: Waiting for S5is CHDK here!  (Read 15574 times)

Offline DataGhost

  • Developers
  • Sr. Member
  • ****
  • Posts: 314
  • EOS 40D, S5IS
    • DataGhost.com
Re: Waiting for S5is CHDK here!
« Reply #45 on: 02 / April / 2008, 05:24:28 »
I'll accept any amount of money anytime, however not in the way you state it. That's not the spirit of this project and it wouldn't be fair towards other developers.

Anyway, status update then... To my best knowledge, everything is working except
- ISO override/bracketing (calculations seem way off or don't work at all)
- Video overrides. I kept forgetting about this because it's not in my main CHDK menu. I'm not even sure if it's necessary on S5 but I think so, I'll look into it asap.

Still requires more testing:
- Subject distance + all DOF setting possibilities. Not all behaviour was tested yet.
- A few RAW settings however I don't think they're platform-dependent
- Scripting. While a lot of basic stuff already works, I haven't tested many commands.

Known flaws/issues
- Subject distance override/bracketing as well as zooming (apparently only while taking a picture (open shutter etc.), not before) cause the camera to crash (or less often: not override, although I can't really reproduce that) when manual focus is not set. Can be worked around by checking/setting MF (propcase) but that still needs to be implemented some way. I'll probably have to move that particular function into the platform-dependent section then.
- I still have to look through ALL hooked assembly code, clean it up and shorten it.
- I still have to look through the platform-dependent (S5) code, there are still a bunch of FIXMEs I probably left for later work. No idea how long this will take.
- I'll have to skim through the code or at least the menus to make sure I didn't miss any functionality potentially available on S5 (though not enabled for all platforms), like the video stuff.
- My code is based on a build from late february, I'll have to see if it still works with the current codebase and fix where necessary.

I guess I can release it after these fixes :) but I can't really give you a hard ETA. I *THINK* I'll get this done over the next couple of days but that depends on the complexity of the problems I might still run into.

FYI: don't get your hopes up if you don't have 1.01B. It'll still have to be ported to the other versions, though that'll be a lot easier.
« Last Edit: 02 / April / 2008, 05:31:32 by DataGhost »

Offline Barney Fife

  • Hero Member
  • *****
  • Posts: 1157
    • Gay Outdoorsmen
Re: Waiting for S5is CHDK here!
« Reply #46 on: 02 / April / 2008, 06:42:39 »
You forgot to add one more option to your poll.

"No, I don't want someone else's newer camera to finally be almost as good as my old one." :)

I guess I can always still feel smug in knowing that my burst-shooting features, bracketing, etc. will still always be faster. :) The rest of the S5's "new"(?) features were of no concern to me. And in fact, the slower continuous shooting mode was a reason I immediately rejected it. I don't use it often, but when I do that little extra speed is important.
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye

Offline romualdo

  • Newbie
  • *
  • Posts: 4
  • S5IS
    • Gruda On-Line
Re: Waiting for S5is CHDK here!
« Reply #47 on: 02 / April / 2008, 17:48:05 »
DataGhost, you are my idol!

You probably didn't notice, but I never asked you (or anyone else) when CHDK for S5 will be ported. I didn't want to bother you, because I'm a programmer too, and I KNOW how it is when someone is pushing you. Now that you are so close, I felt that I had to say something, and I want to say "Thank you".

Now, I'm wondering, since I don't know ASM or anything related to firmware porting, how much did you know about all that before you started your work, and is it hard to learn? I work in Delphi, so I can't say that I'm familiar with C/C++ either. Since my S5 FW version is 1.01B, I hope I won't need to know, but the idea of manipulating software of my camera sounds very interesting :)

Thank you once more!

Offline DataGhost

  • Developers
  • Sr. Member
  • ****
  • Posts: 314
  • EOS 40D, S5IS
    • DataGhost.com
Re: Waiting for S5is CHDK here!
« Reply #48 on: 02 / April / 2008, 20:04:51 »
DataGhost, you are my idol!

You probably didn't notice, but I never asked you (or anyone else) when CHDK for S5 will be ported. I didn't want to bother you, because I'm a programmer too, and I KNOW how it is when someone is pushing you. Now that you are so close, I felt that I had to say something, and I want to say "Thank you".

Now, I'm wondering, since I don't know ASM or anything related to firmware porting, how much did you know about all that before you started your work, and is it hard to learn? I work in Delphi, so I can't say that I'm familiar with C/C++ either. Since my S5 FW version is 1.01B, I hope I won't need to know, but the idea of manipulating software of my camera sounds very interesting :)

Thank you once more!


It's very interesting indeed, I have to keep myself from drifting off and I should concentrate on making at least an initial version available. I was annoyed by not being able to set manual focus through CHDK (camera crashes when setting subject distance with no MF set) and couldn't get it to work through a propertycase, so I accidentally spent the last half hour decoding physw (keyboard handling), a lengthy process which I shouldn't be doing now :)

Anyway, how much did I know... Well, first of all... I knew what ASM was, and what it looked like. I never really looked into the actual meaning behind ASM code so I always wondered how something was possible in ASM (every code is possible in ASM but I didn't really allow myself to think like that, for some strange reason). Until I started studying CS at the university, I never really bothered to take a look (as almost every other student) and all of a sudden we had to program a device in a simple flavor of ASM. We also had lectures about how computers actually work on the inside (specifically: CPUs, memory and low-level stuff in general) and it all started making sense. Of course, it takes some getting used to, but by just doing it and seeing what happens, I learned a great deal about ASM programming in a very short time.
A couple of months later, I bought my S5, found CHDK and after a while I thought... heck, I can do that. I gathered some documentation (asm dialects/versions are quite different but the basic idea is the same) and started trying to figure out what the firmware did, why simple programs compiled to specific ASM code, and so on. Starting off with
Quote
LDR R0, =0xC02200E0
LDR R1, =0x46
STR R1, [R0]

I quickly wrote a couple of very simple programs that would do various things with the AF led. Once I managed to dump the complete firmware I had some trouble getting started but after a week or two I really got the hang of it and things went a lot better. Now ASM isn't really a mystery to me anymore, kinda takes away the magic a bit but it sure is useful to know it and be able to write it.
So basically, if you also want to get started, you could read the DryOS porting thread and eh... just start coding some things, try to figure out what existing code is supposed to do, etc. You'll only master it by working with it, I think. Oh, and it's very important to read this ARM ASM reference guide, it contains a lot of information about the architecture itself, besides the actual ASM syntax and meaning. You really need to know how the architecture works, why certain things happen/are possible and why certain things won't work. For example, you cannot use the MOV instruction to load an arbitrary 32-bit integer into a register (you have to use LDR for that), because the instruction, register and value have to be stored in ONE 32-bit instruction. You can find more information about ARM instruction encoding in this document.
If you know the basic ideas behind programming and computers, it's certainly doable within a short time. It worked for me, your mileage may vary, though.

I do think it's at least somewhat useful if you know C/C++ or at least some pointer handling (in Delphi), since that's a concept you'll see a lot. I actually dereferenced a pointer in that snippet of ASM I posted above. By the way, knowing C is useful for normal CHDK code as well, since it's written in C :) . Still, if you feel like learning ASM is a lot of work, there is a lot you can also do in C once CHDK is running on your camera.


Anyway, status update:
I cleaned up some of the code, I rewrote the keyboard handling code to something that makes sense to more people than just me, and the camera won't crash anymore when overriding subject distance (however manual focus needs to be set for it to work, else it won't override anything). I still have to do the complete ISO override thing, though. Video override seems to be unnecessary at this time, although I'm not sure if that's because nobody figured out how it works in DryOS or if it's not necessary :)

I still have to clean up the rest of the platform code, read through, clean up and truncate all 175 kilobytes of currently-hooked ASM code and after that I'll have to make sure that it still works in the current trunk, see if I didn't miss any functionality and add/fix where necessary.
Oh yeah, I'm using a *slightly* different compiler which uses no ARM architecture/CPU in particular (well, I just don't know what the default is). Because of this, it doesn't complain on ASM instructions like STRD <whatever> and BLX R12, which the processor clearly supports (it's used in the firmware, encoded as such (I verified the bits) and it also runs fine in CHDK). In order to be compatible with the default CHDK compiler, I have to find those instructions and replace them by equivalent (more) instructions. I cannot 100% guarantee that I won't run into additional errors because of that.

Offline Cythrelo

  • Rookie
  • *
  • Posts: 17
Re: Waiting for S5is CHDK here!
« Reply #49 on: 03 / April / 2008, 08:52:48 »
DataGhost, I just want to thank you for all the ahrd work you've done. I only have a basic grasp of programming in general (and then only in .NET which, when compared to ASM, is the difference between being driven somewhere and building yourself a car and driving yourself there) and I can't even begin to fathom the amount of work you've had to put into this project.

Offline critical1

  • Rookie
  • *
  • Posts: 7
  • Powershot S5is - 1.01a
Re: Waiting for S5is CHDK here!
« Reply #50 on: 03 / April / 2008, 08:59:56 »
DataGhost you appear to have the knack of understanding CODE, I look forward to seeing the conclusion and fruits of this work, I'm sure that it will bring smiles of joy from many people :)

Critical1
Critical1
Powershot S5is - 1.01a

Offline pethead

  • Rookie
  • *
  • Posts: 42
  • Canon S5 IS
    • Canon S5 IS Community
Re: Waiting for S5is CHDK here!
« Reply #51 on: 06 / April / 2008, 13:38:33 »
I know that CHDK already ported and very works on A650IS that has DIGICIII and DryOS. I recompiled A650IS's CHDK. Is there a chance use A650IS' code for adaptation to S5IS? May I to get your (DataGhost's) code already some working on S5?
« Last Edit: 06 / April / 2008, 13:40:37 by pethead »
canons5is.clan.su Allbest+ with timestamp features

Offline GrAnd

  • Developers
  • Hero Member
  • ****
  • Posts: 916
  • [A610, S3IS]
    • CHDK
Re: Waiting for S5is CHDK here!
« Reply #52 on: 08 / April / 2008, 11:06:26 »
Continuation - S5IS 1.01b - Ported!
CHDK Developer.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal