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

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

  • 704 Replies
  • 169135 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #670 on: 15 / September / 2013, 15:25:28 »
Advertisements
There's another possibility. Unless you can see the bad palette on the LCD, it could be that "our" implementation of getting the right palette is flawed, and there's no widespread memory corruption.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #671 on: 15 / September / 2013, 15:45:19 »
There's another possibility. Unless you can see the bad palette on the LCD, it could be that "our" implementation of getting the right palette is flawed, and there's no widespread memory corruption.
That's a good point.  On the 101a it's not possible to attach an LCD.  On the 100c, I didn't notice the LCD when the problem occurred a few times.  I'm just flipping MENU in REC mode dozens of times, looking at the PC, I did get a brief (1/4s) transient exactly same LEFT PANEL image from the 101a one time out of every 10-20 menus.  On the camera LCD, it does not appear.  So it seems as we are closing in on the culprit, maybe. 

If "ours" as you suggest, it is random, and behaves differently on every BIN.  Assuming it is "ours," is there something you could do for me to test out convincingly? .. perhaps solve it?

*

Offline reyalp

  • ******
  • 14080
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #672 on: 15 / September / 2013, 16:06:26 »
FWIW, I notice on elph130 that the active palette pointer could update before the actual palette was loaded. This would cause a brief flash of the "wrong" palette over PTP, and crashes when setting custom colors.

The code is quite different so it probably doesn't apply to to s90 directly, but I wouldn't be at all surprised if PTP live view occasionally gets the wrong palette (i.e. you open the menu and get a palette that has a mix of canon menu palette and the previous palette or garbage). However, I would expect this sort of thing to only last one frame, so it should be a flash rather than a persistent problem.
Don't forget what the H stands for.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #673 on: 15 / September / 2013, 16:15:43 »
However, I would expect this sort of thing to only last one frame, so it should be a flash rather than a persistent problem.
On the 100c the wrong LUT flashes by very occasionally, and now I cannot get PLAY MENU jaggies.  This happens on the 101a too, but more frequently, 1 of 3-4 times.  On the 101a, it can freeze as I demonstrated a bit earlier.

On the 101a, I found a way to repeat the PLAY MENU jaggjes and "clear" it: (PLAY starts with jaggies) REC SET SET PLAY MENU (now OK) MENU (now jaggies) repeat.  I managed this 5 times in a row consistently. However, if I try to intervene dumps to capture the problem, the clearing doesn't work ... I get jaggies on the 1st MENU in PLAY.  This thing is quite sensitive it seems ... Any ideas?


*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #674 on: 15 / September / 2013, 17:38:12 »
Attached is a trial 100c build. An alternative method is used to retrieve a different palette buffer (I'm using the sigfinder's addresses in this one).
@SticK
Can you test whether this one works? It doesn't if the palette representation is worse.
« Last Edit: 16 / September / 2013, 15:06:25 by srsa_4c »

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #675 on: 15 / September / 2013, 19:42:49 »
This is the PLAY menu.  REC menu is the same, and the SET menu is also corrupted, out-of-box.  What's common among these and the one in PLAY mode on the 101a, is the curvy patterns on top and bottom.

edit: I tried a stock CHDK BIN I had from 1 yr ago, 2162 on the 100c.  As reyalp says, there is a bad palette "blink" in REC mode before a very occasional MENU UP, but on this cam, it's no worse than that.  That is, behavior is not different from the experimental BIN you determined I had earlier..
« Last Edit: 15 / September / 2013, 19:54:55 by SticK »

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #676 on: 16 / September / 2013, 15:37:00 »
curvy patterns on top and bottom.
Blame Canon's graphic designers for that  :)

I'm surprised that the "alternative" palette method didn't work. The addresses seem ok, the buffer address is determined as in other ports, though I made a little change trying to prevent wrong index values - perhaps that's the problem.

Since I'd like to see the alternative method working, I need memory dumps - again.
The easiest would be to install a current CHDK 1.2 build on 100c and use the built-in memory dumper (method is described here) to dump RAM from 0 to ~0x300000 while in and out of the Canon play menu. That's 2 ~3MB dumps.

The hard way is:
0xa374: active_palette_buffer, this is an ordinal
0xa380: palette_buffer_ptr, this is an array of approx. 3 pointers, active_palette_buffer is addressing one of them
palette_buffer_ptr[active_palette_buffer] will point to another pointer...
... and that pointer will point to the palette data (256 words)
The goal would be to compare the palette retrieved by this method with the palette retrieved by the "old" method...

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #677 on: 16 / September / 2013, 20:02:42 »
The hard way is:
0xa374: active_palette_buffer, this is an ordinal
0xa380: palette_buffer_ptr, this is an array of approx. 3 pointers, active_palette_buffer is addressing one of them
palette_buffer_ptr[active_palette_buffer] will point to another pointer...
... and that pointer will point to the palette data (256 words)
While pointer arithmetic is no problem and I could easily translate what you suggest in C code, it's quite a different story when dealing with the camera to get the data out!

Quote
The easiest would be to install a current CHDK 1.2 build on 100c and use the built-in memory dumper (method is described here) to dump RAM from 0 to ~0x300000 while in and out of the Canon play menu
I have a 1.2 BIN here that I used for your memory dumps when we were trying to solve the vignetting problem on the 100c.  Would you not need to enable the "bad" palette first?  Please let me know.
« Last Edit: 17 / September / 2013, 13:48:48 by SticK »


*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #678 on: 17 / September / 2013, 09:41:51 »
While pointer arithmetic is no problem and I could easily translate what you suggest in C code, it's quite a different story when dealing with the camera to get the data out!
I could have pasted the C function too, but the problem is that it isn't working as expected, so the intermediate memory areas will need to be inspected too.

Quote
I have a 1.2 BIN here that I used for your memory dumps when we were trying to solve the vignetting problem on the 100c.
You can use that .bin of course (don't forget that 1.1 and 1.2 modules are not compatible).
Quote
Would you not need to enable the "bad" palette first?
No, I'd like to see whether the two palette buffers are identical or use a different format. The "other" palette buffers are around 0x200000 in my ixus110 dumps, hopefully they will be within the first 3MB on the s90 too.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #679 on: 17 / September / 2013, 12:14:58 »
S90_101a INSTRUMENTATION PROJECT MILESTONE: FIRST ALIGNMENT IMAGE

After two months of research in summer 2012 to find the best CCD and analog processing pipeline within the Canon small-format CCD camera line, and then the discovery of CHDK followed by a year of development along with the dedicated and talented folks on this forum, the S90_101a imager has been successfully installed today in its instrument replacing its old S50, and is now fully functional and aligned.  This is its first 10 Mpx image.

These figures demonstrate a fiber-generated alignment spot that allows centering of the CCD in the instrument. 

Figure 1.  CHDKPTP high-resolution liveview (Viewfinder 1:1).  Here, the CCD (opt: 16C) is being cooled to +16C (until a hermetically-sealed CCD enclosure is machined where we should be able to go to -20C).  You can see the alignment spot centered in the cross hair. 

Figure 2.  JPG from the S90_101a imager.  Central zone of the image is zoomed to 100%.  Thus surface sampling is ~91 nanometers/pixel in the specimen plane, making this spot diameter 5.0 microns.   The CCD is centered to an accuracy of +/- 50 nanometers of dead-center.  Even a defect in the fiber can be seen: at ~2:30 o'clock, there is a slight flattening of its circumference, ~1/4 micron out-of-round.

The multi-megadollar combined R&D resources of Canon, Sony, and Analog Devices, together with the power of CHDK and its customizable adaptability has made all this possible.  At the time of this writing, there is no other equivalent system that achieves this high level of performance required for scientific instrumentation from a small-format CCD, even from Roper or Andor.
« Last Edit: 17 / September / 2013, 12:32:28 by SticK »

 

Related Topics