Some experiments - General Discussion and Assistance - CHDK Forum

Some experiments

  • 3 Replies
  • 1543 Views
*

Offline RaduP

  • *****
  • 890
Some experiments
« on: 25 / October / 2009, 00:20:06 »
Advertisements
Well, I had some time to play with the camera today, and I ran a few experiments.

First, I wanted to see if it would be possible, in theory, to skip the lens errors with CHDK. So the test consisted in having the LED blink at the very beginning of the boot() function. I then started the camera, and opened the battery door with the lens extended. I then restarted the camera, and the LED blinked before the camera retracted the lenses. So that means that it would be possible to modify the boot process, find where the lens is checked, and comment out the error checking code. It might also be needed to restore some values, to trick the camera into thinking that the lens was always extended to begin with.

Second experiment, I wanted to test if the RAM is powered off while the camera is turned off. I was almost sure it is powered off, but I tried it anyway. The result is as I expected, the camera turns off the memory power when it is off, however, the memory survives for a few seconds without power (which is to be expected from RAM). The limit seems to be around 5-10 seconds. Probably more at lower temperatures. Not sure what use that might be for us, but it's interesting to know.

3rd, I wanted to know when the raw buffer is modified. It seems that it is actually modified quite often. It is modified when in playback mode and looking at the photos. It is modified when taking a picture (obviously), but also right after the picture was taken. This suggests that the image processing is done in the RAW buffer itself. Finally, the raw buffer is modified when in the view mode, even before the video is started.

*

Offline RaduP

  • *****
  • 890
Re: Some experiments
« Reply #1 on: 27 / October / 2009, 21:20:49 »
I played a bit more with my camera, and got close to what I always wanted to do, try to make the camera not retract/extend the lens when shutting down and starting.
I found a function called IsLensOutside, which is pretty simple, it returns the content of a memory location.
1 if outside, 0 if inside.
So in taskCreateHook I replaced the content of that variable with 0 (only once), and now when the camera restarts with the lens extended, it will not retract the lens. However, when going to record mode, it does that :/
I tried to set that variable to 1 after the CHDK spythread starts, but it still doesn't help. I guess more variables need to be filled to properly trick the camera.

*

Offline RaduP

  • *****
  • 890
Re: Some experiments
« Reply #2 on: 27 / October / 2009, 23:00:47 »
Another interesting thing, in the structure where the variable about the lens state is stored, there are some pointers to all kind of functions related to the lenses. When the lens is retracted, some of them change. I have to display more of that structure and see what other values are out there.

Re: Some experiments
« Reply #3 on: 05 / June / 2010, 12:12:23 »
Hi guy,

I'm very interested in your posts, please update your latest  result. I got the same problem with you

Thanks


 

Related Topics