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

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

  • 704 Replies
  • 191740 Views
*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #680 on: 17 / September / 2013, 13:46:58 »
Advertisements
@srsa_4c

S90_100c BIN v1.2  3MB MEMORY DUMPS

I installed the latest BIN 1.2 according to your edit.  It works smoothly.  Added, I use the DISP key while in the GRAY DEBUG menu to override the timer and get the dump right away.

I am giving you 3 dumps, the first is PLAY on PUP (before REC, when I can't get a Canon menu unless I've gone to REC at least once).  Dump #2 is PLAY no menu (after REC), and dump #3 is PLAY with Canon MENU up.

http://www.sendspace.com/file/un5npf

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #681 on: 17 / September / 2013, 19:00:17 »
though I made a little change trying to prevent wrong index values - perhaps that's the problem.
Yep.
While pointer arithmetic is no problem
Looks like it is for me...
Thanks for the dumps.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #682 on: 17 / September / 2013, 21:07:06 »
though I made a little change trying to prevent wrong index values - perhaps that's the problem.
Yep.
Could this possibly mean you're onto it?

Quote
Thanks for the dumps.
Anytime :).

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #683 on: 18 / September / 2013, 19:02:02 »
Could this possibly mean you're onto it?
It's only about the alternative palette buffer.
Next try attached. I'm not trying to "fix" the index this time...

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #684 on: 18 / September / 2013, 20:08:02 »
@srsa_4c

Yes this version of alternative palette works, sort-of.  In PLAY mode, there is brief display of the corrupted palette on MENU off, about 1/3s every time before the saved image appears.  Expected?  Normal?  Abnormal?  Any unknowns there?  In REC mode, MENU and SET menu behavior appears to be OK.

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #685 on: 19 / September / 2013, 18:38:45 »
Yes this version of alternative palette works, sort-of.  In PLAY mode, there is brief display of the corrupted palette on MENU off, about 1/3s every time before the saved image appears.  Expected?  Normal?  Abnormal?
Normal. This method determines the correct palette buffer on the fly, the "old" method always uses a single buffer. The palette changes are not synchronized with CHDK's live view.
Ideally, the two buffers should have the same content when the palette transition/copying is done.

The function to get the alternative palette address:
Code: [Select]
void *vid_get_bitmap_active_palette()
{
    extern int active_palette_buffer; // 0xa374
    extern char** palette_buffer_ptr; // 0xa380
    return (palette_buffer_ptr[active_palette_buffer]+8);
}
The original method is:
Code: [Select]
void *vid_get_bitmap_active_palette() {
    return (void *)*(unsigned int*)(0x5CFC+0x2C);
}
Palette length is 1024 bytes, addresses are valid for both 100c and 101a.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #686 on: 20 / September / 2013, 02:22:02 »
@srsa_4c

Does this all mean that the code would be now safe?  (safer?).  What is next on this path?  Will you be updating 101a BIN?

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #687 on: 21 / September / 2013, 18:50:30 »
Does this all mean that the code would be now safe?
Your test confirms that the alternative palette buffer address is correct. The two buffers can now be compared when the palette appears corrupt.
Quote
What is next on this path?
You could make some memory dumps on 101a - when the overlay is OK and when the palette is corrupted.
Perhaps reyalp will post a better binary dumper, in the meantime you can use the following code snippets in chdkptp:
Execute this once (to register the necessary event procedures)
Code: [Select]
=return call_event_proc("System.Create")Then execute the following long line - it will dump the first 3MB RAM into a file named dump.bin in the root of the card.
Code: [Select]
=fd=call_event_proc("Open","A/dump.bin",0x101,0x1ff);call_event_proc("Write",fd,0x1900,0x2FE700);call_event_proc("Close",fd); return fdNow, either change the file name or download the file after this, it will be overwritten on each execution.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #688 on: 21 / September / 2013, 22:36:08 »
Perhaps reyalp will post a better binary dumper, in the meantime you can use the following code snippets in chdkptp
This went very well .. in fact I liked so much I put your code into my special repo, so you can always ask for it if needed.  You may refer to it as the "3MB memory dump" in the future.

S90_101a DUMPs attached.

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #689 on: 22 / September / 2013, 07:41:14 »
S90_101a DUMPs attached.
Thanks.
The palette is not really corrupt. For some reason, the buffer holds a different palette (the palette index is 9, but the palette data corresponds to index 6).
Does the visual corruption go away if you select a menu item?

 

Related Topics


SimplePortal © 2008-2014, SimplePortal