CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD - page 24 - Creative Uses of CHDK - CHDK Forum

CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD

  • 704 Replies
  • 194694 Views
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #230 on: 21 / November / 2012, 13:23:59 »
Advertisements

(Some?) newer Canon cameras seem to have one or two firmware functions related to disabling (the automatic shutdown in case) of hardware errors: DisableLensError(), DisableISDriveError(). Examples of such cameras include A800, A2200, S95, IXUS105, IXUS120, IXUS310.

I've just found a IXUS 105 with stuck lenses, but I didn't understand how to DisableLensError.
Seems that I must use a special version of DISKBOOT.BIN with  DisableLensError ... Where can I found it? (is zshare.net down?)
I've installed CHDK-Shell ... downloaded from svn (trunk2297) the latest version of CHDK ... buid my own ixus105_sd1300-100b-1.2.0-2297.zip but .... what next?

If you have a build with native calls enabled you can simply use a lua script.

Put this into a lua script and run it
Code: [Select]
call_func_ptr(0xFFE1991C)

is 0xFFE1991C the right address for DisableLensError on ixus105 ... but how can I make the lua call on boot?

Am I on the right track?

Thanks,
Esrev

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #231 on: 21 / November / 2012, 14:17:01 »
(Some?) newer Canon cameras seem to have one or two firmware functions related to disabling (the automatic shutdown in case) of hardware errors: DisableLensError(), DisableISDriveError(). Examples of such cameras include A800, A2200, S95, IXUS105, IXUS120, IXUS310.
Sorry. I was not careful enough when I wrote that. Only the latest (announced in 2011 or later) Canon cameras support DisableLensError, The Ixus105 is a bit older than that, it only has DisableISDriveError. Moreover, some cheap models like the A810 have a dummy implementation of the function that simply does nothing.

That means, both of your cameras would need a software modification that hasn't been done yet (and it's still not guaranteed that it will happen).

If you'd like to get another camera to choose that seemingly easier road, ask before :)
And keep in mind, that nobody has tried using DisableLensError yet, so we don't know what kind of errors can it prevent.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #232 on: 25 / November / 2012, 01:45:48 »
IS Error DISABLE TEST

I'm back.  With SHUTTER now wired independently of the IS subassembly, I was able to do the test.  Just in case, for all tests here, I set IS MODE in the Canon menu to OFF.

Under normal conditions, if the IS is disconnected and then camera PUPed (into PLAY) it won't detect error.  The error is detected 1 minute *after* ->REC, followed by shutdown.  That means for the solution to take effect, these commands must be issued within that 1 minute window while in REC mode.  Issuing them in PLAY has no effect.  Here, I issued the commands while in AUTO and waited 3 minutes to make sure camera continued to function.

=return call_event_proc("Mecha.Create")
=return call_event_proc("StartImStEventProc")
=return call_event_proc("DisableISDriveError")

So yes, this prevents IS-disconnected shutdown in REC mode.  I then set ->M and did a few shots, and all looks fine.  It continues to work and take shots now for more than 20 minutes, so I am assuming this is a solid solution.

COMMENTS:  The disable state is not preserved over a REC->PLAY (fine) and PLAY->REC without reissuing the command set in REC, ie disable state memory is lost when going back to PLAY.  As usual if you get a hardware error shutdown due to a mistake say, you have to reconnect the IS temporarily and PUP to get PTP back.  One can also conclude error override on the newer cameras with disable lens error might work too.

This is very nice because the IS would have been near-impossible to dig out of firmware I think.  The shutter is being operated by the SticK Controller, but the whole assembly is sitting far from the camera // strange looking I must say.  I am wondering if we can extract some new knowledge from this data for the other components. 

Hence it's one down, three to go ... we can chalk up another srsa_4c success story - nice job :).

edit:
I validated the other *great* news is that srsa's solution mimics the real component when PDN and PUP, that is, PTP comms is reestablished as if the component were actually installed.  While FOCUS and IRIS can be fairly easily replaced by electronic dummies, IS would have been completely impractical.  ZOOM PI is also possible to replace, but the motor is likely impractical.
« Last Edit: 25 / November / 2012, 08:54:06 by SticK »

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #233 on: 27 / November / 2012, 08:40:11 »
BABY STEPS in MOVING towards an ELECTRONIC DUMMY IMPLEMENTATION

The "mecha state is bad" flag is stored in some nonvolatile RAM - the camera forgets it when there's no backup battery (just tried).

edit: on the A420/430, the RTC chip is the only hw that gets power from the backup battery. The chip has a user register to store an 8 bit value, it's very much likely that this is the place to store the "last operating mode" flag.

We can reasonably conclude that under normal conditions, on PUP the camera reads the flag, sees it as FALSE, then opens PTP (and PLAY) and life goes on.  However, if this flag was set TRUE on the last PDN due to a HW malfunction, then on PUP:
   -> before PLAY, tests for  HW restoration (for example, was the IRIS reconnected?)
          -> if sees the HW was restored opens PTP and life goes on
          -> if sees the HW was not restored, does not open PTP, and no PLAY

Because we now know where this flag resides, a version of the FW that overrides it would be very useful for the development of electronic dummies: it would eliminate the need to reconnect the components after dummy HW test attempts that put the tiny ribbon connectors at risk, and also would speed up development testing.  My guess that the better place would be to force-clear the flag during CHDK boot.

Is it possible to do?
« Last Edit: 27 / November / 2012, 08:41:44 by SticK »

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #234 on: 27 / November / 2012, 09:11:29 »
We can reasonably conclude that under normal conditions, on PUP the camera reads the flag, sees it as FALSE, then opens PTP (and PLAY) and life goes on.  However, if this flag was set TRUE on the last PDN due to a HW malfunction, then on PUP:
   -> before PLAY, tests for  HW restoration (for example, was the IRIS reconnected?)
On the A430, the flag seems to be a "last operating mode" flag, no error conditions are stored. If it's not "off", hw check will be performed.
Quote

          -> if sees the HW was restored opens PTP and life goes on
          -> if sees the HW was not restored, does not open PTP, and no PLAY
It's more like: in case of a disconnected hw the early check will fail, and normal startup is interrupted (without the "poke" that my later trials include, it would probably result in an Exx shutdown or an assert). That's the probably reason of ptp not showing up.

Quote
Because we now know where this flag resides, a version of the FW that overrides it would be very useful for the development of electronic dummies: it would eliminate the need to reconnect the components after dummy HW test attempts that put the tiny ribbon connectors at risk, and also would speed up development testing.  My guess that the better place would be to force-clear the flag during CHDK boot.

Is it possible to do?
The code snippet from my recent post is supposed to do something similar (the flag is not erased, but it's prevented from being read). I'll make another test version with this change, if you wish.

Unfortunately, my attempts to deal with the lack of hw on the A430 haven't resulted in anything useful yet.

About the IS: can you make another error list (the firminfo thing)? I'm curious which kind of error showed up with the IS disconnected.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #235 on: 27 / November / 2012, 10:08:27 »
Quote
The code snippet from my recent post is supposed to do something similar (the flag is not erased, but it's prevented from being read). I'll make another test version with this change, if you wish.

Sure, something that ignores the effect of a previous HW fail and restarts the camera into PLAY & PTP by ignoring or clearing the flag would help.

Quote
About the IS: can you make another error list (the firminfo thing)? I'm curious which kind of error showed up with the IS disconnected

Attached 05.  Note that the last IS error is on the 18th.  Since then I have been using your IS error override solution (camera is now running fine w/o IS) which both works as expected, and we see here it does not set the error flag.

Quote
Unfortunately, my attempts to deal with the lack of hw on the A430 haven't resulted in anything useful yet.

Would somehow getting an S90 to you help? 

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #236 on: 27 / November / 2012, 10:57:40 »
Attached 05.  Note that the last IS error is on the 18th.  Since then I have been using your IS error override solution (camera is now running fine w/o IS) which both works as expected, and we see here it does not set the error flag.
I expected some image stabilizer related errors, but apparently those have already vanished from the list (I'm curious about which error shows up when the IS hardware is completely disconnected and DisableISDriveError is not applied).

Quote
Would somehow getting an S90 to you help?
I probably misformulated my sentence, I meant my experiments on a camera with its mecha parts unconnected. No, an S90 wouldn't help. The hw state handling code seems rather similar in new cameras, so if I ever find something, it might be reproduced on another model. I really hope that the solution is not to rewrite a few dozen functions...

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #237 on: 27 / November / 2012, 11:05:10 »
Quote
I'm curious about which error shows up when the IS hardware is completely disconnected and DisableISDriveError is not applied

That would be certainly the last on the list, because that was the last time I did not apply DisableISDriveError.  Since I have gotten back on this end-of-last week, I have been applying DisableISDriveError and no lens errors are recorded (what I tried to explain earlier).

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #238 on: 27 / November / 2012, 11:16:58 »
That would be certainly the last on the list, because that was the last time I did not apply DisableISDriveError.  Since I have gotten back on this end-of-last week, I have been applying DisableISDriveError and no lens errors are recorded (what I tried to explain earlier).
OK, I can live without that. You already proved that DisableISDriveError prevents shutdown in case of removed IS hardware, which is useful info for others too.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #239 on: 27 / November / 2012, 11:37:12 »
Quote
OK, I can live without that.

Unless I have misunderstood you, I think you have the answer in firminfo_05, last error.  That should be the answer to the test you requested, as I understood you asked it to be w/o DisableISDriveError.   This is the usual result that occurs w/o DisableISDriveError, and was the last one I got.  This is the "stock" CHDK, so I know if I repeat the hardware error again, the result will be the same.  If there is something different you'd like, I'd be much obliged // please clarify.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal