CHDK PTP interface - page 19 - General Discussion and Assistance - CHDK Forum supplierdeeply

CHDK PTP interface

  • 1241 Replies
  • 487565 Views
Re: CHDK PTP interface
« Reply #180 on: 05 / April / 2010, 14:07:37 »
Advertisements
Thanks.

The comments about Lua are because of the amount of memory it consumes that I could use for other purposes.

Actually, my current code for the A620 does contain some of your basic ptp code.

As I recall, I get a compiler warning about implicit declaration of _ExitTask.


David
« Last Edit: 05 / April / 2010, 14:37:50 by Microfunguy »

*

Offline zeno

  • *****
  • 891
Re: CHDK PTP interface
« Reply #181 on: 05 / April / 2010, 18:07:47 »
David - I'd be interested in doing the necessary uBasic additions for SDM (and CHDK) for this.
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

Re: CHDK PTP interface
« Reply #182 on: 05 / April / 2010, 18:10:33 »
Actually, my current code for the A620 does contain some of your basic ptp code.

As I recall, I get a compiler warning about implicit declaration of _ExitTask.
Although the warning isn't anything serious, the solution I described here is what I've been using everywhere since pretty much that moment.

Re: CHDK PTP interface
« Reply #183 on: 05 / April / 2010, 18:53:34 »
@mweerden
I had forgotten that I had even mentioned that previously.

@zeno

Carry on, I am having a rest so that I have more time to take photos.


*

Offline JMD

  • *
  • 34
Re: CHDK PTP interface
« Reply #184 on: 06 / April / 2010, 17:46:18 »
Has anyone here built CHDKCam recently.  If so I would appreciate some advice on how to set up the build environment.  How difficult is it?  Is there a sort of plug and play build tool that will make it simple?

Thanks

Re: CHDK PTP interface
« Reply #185 on: 06 / April / 2010, 18:24:26 »
Has anyone here built CHDKCam recently.  If so I would appreciate some advice on how to set up the build environment.  How difficult is it?  Is there a sort of plug and play build tool that will make it simple?
I've only looked at the code briefly, but it seems to be build with (and requires) Borland C++ Builder (v6.0). If you have it (or can get it) then that's pretty much a "plug-and-play build tool".

PTP Patch for A650 IS on build 885
« Reply #186 on: 11 / April / 2010, 21:52:25 »
Thank for muck's help.
The patch for A650 IS 100d tested on build 885

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: CHDK PTP interface
« Reply #187 on: 20 / April / 2010, 07:44:45 »
Hi ewavr,

I could test a few days the SX200.The ptp interface works very well for this cam. But the color of overlay display could be improved.Thatswhy I asked rudi to analyzing this problem.

Here is a chdkcam screenshot:

And this are he color palettes of the SX200 (play and record)


Here is the Ramdump SX200 (play and record).

This has written rudi:

***********************************************************************************
we have two variants of color palettes.

At first the calculated varinat from 4x 16 byte as VUYA, you named it syspal. It is used by VxWorks- and older DryOS-cams (tested on IXUS80, A590, A610, A620, A710, A720).
The maincolors are diagonal arranged.

transparent-byte:
I found $FF > $7F(or $80),$3F > $00 (full transparent > middle > not transparent)

luminance-byte:
This value are never over $E0. This is 7/8 from a byte value. So I have a different calculation routine. Please try it.

my favorite calculation routine:
        y:=(c1.Y+c2.Y)div 2;
        y:=y*8 div 7;
        if y>$ff then y:=$ff;
        c.Y:=y;
        c.U:=(c1.U+c2.U) div 2;
        c.V:=(c1.V+c2.V) div 2;
        c.A:=(c1.A+c2.A) div 2;



At second a full palette variant with 4x 256 byte as AYUV. It is used by newer DryOS-Cams (tested on SX200).
In this case the colors are in a line arranged.

transparent-byte:
found $03 > $02,$01 > $00 (full transparent > middle > not transparent)

my routine to adapt:
        case c.A of
          01: c.A:=$3f;
          02: c.A:=$7f;
          03: c.A:=$ff;
          else c.A:=$00;
        end;


---------------------------------------------------
For color arrange see CHDK palette viewer.

---------------------------------------------------
I have written a ColorTab-Viewer.

You can open extracted color tables with 64 or 1024 byte, a RAM-Dump or a firmware-dump (PRIMARY.BIN). I found only on DryOs-firmware build-in color tables.
On RAM-Dumps the program looks-up for pointer address to color table (displayed only the first found address), look at status bar.

To idendify colortables: first color must be a full transparent color and last color must be black without transparency.

You can change the color decoder routine for calculated color tables in menu "decoder".

Also you have a preview function by mouse-over in color field (tranparent colors have a gray frame all other a black frame).  The preview area on left side show additional color information and under it is a sorted color list.

rudi
***********************************************************************************

Maybe you can use this knowledge to improve the overlay colors in chdkcam.

msl
CHDK-DE:  CHDK-DE links


Re: CHDK PTP interface
« Reply #188 on: 28 / April / 2010, 12:09:04 »
I've just implemented the return-value feedback for script execution (see here). With this I think we have a pretty nice initial implementation to add to the trunk. Let me know what you think.

I also figured out how to send events, but I don't really see an obvious and nice way to use it to get script output. Last time I seem to have conveniently forgotten the fact that events don't "carry" data (apart from three integer parameters). You can use them as notifications, but then you have to store output until it is retrieved by the client. Another option could be to use the parameters to store 4 characters and use as much events per line as necessary, but I'm not sure they'll arrive in order and thus far I've only been able to transmit one parameter per event.

*

Offline c10ud

  • ***
  • 245
Re: CHDK PTP interface
« Reply #189 on: 02 / May / 2010, 08:36:20 »
I've just implemented the return-value feedback for script execution (see here). With this I think we have a pretty nice initial implementation to add to the trunk. Let me know what you think.
great, i'm looking forward a merge with trunk, so every camera can easily benefit of this super addition!
I also figured out how to send events, but I don't really see an obvious and nice way to use it to get script output. Last time I seem to have conveniently forgotten the fact that events don't "carry" data (apart from three integer parameters). You can use them as notifications, but then you have to store output until it is retrieved by the client. Another option could be to use the parameters to store 4 characters and use as much events per line as necessary, but I'm not sure they'll arrive in order and thus far I've only been able to transmit one parameter per event.
i think events could be useful for some chdk custom ptp capture (they could carry a capturefinished event and/or some object handle so one can easily retrieve/delete/whatever the just captured image(s) when they're ready) but i think this is not trivial to do..

 

Related Topics