SD1200 IS Porting Thread - page 8 - DryOS Development - CHDK Forum

SD1200 IS Porting Thread

  • 312 Replies
  • 165234 Views
*

Offline tillo

  • *
  • 43
Re: SD1200 IS Porting Thread
« Reply #70 on: 15 / April / 2010, 18:14:08 »
Advertisements
well that seems really interesting awdark but I think I've found what I read before (I'm not really sure if it is the same) but this seems like it may be useful here it is:
http://chdk.wikia.com/wiki/Adding_support_for_a_new_camera#platform.2F.3Ccamera.3E.2Fkbd.c
I do not know if it has something to do with what we are looking for but I haven't used that because I don't really know if that is to be added before compiling (that is what i think) and I don't know to compile either (I tried  but failed before) I haven't read the whole thread yet as my pc broke but I will do so when I have a chance soon, as for trying to compile it again I changed back to linux after getting my pc working so I need to download programs again (and yet again I still have to learn about that) peopple please check the link and tell us if you think if that is usefull.
I'll get back to modify scripts and read stuff on the wiki to see if i find something useful.
sorry for the too-long post (I just felt like it)

Re: SD1200 IS Porting Thread
« Reply #71 on: 16 / April / 2010, 02:46:41 »
I tried to do that, I think the gui.c file was modified before so I did mess with the code a little bit.

I will include the PS.fi2 file but this is specifically to let tillo try, it just has some permanent OSD values such as
                               u:get_usb_power
1: psysw_status[0]    1:conf.mem_view_addr_init
2: psysw_status[1]    f:focus busy
3: psysw_status[2]    z:zoom busy

And to make your life easier these are the values for 3 "psysw_status[2]"
408fff none
448fff usb
40afdf right
408f7f up
408fbf down
408fef left
408dff disp
408bff menu
408eff func set

Reflecting the values in kbd.c "static KeyMap keymap[] = {"
408fff - 408f7f = 80 for up

and the line #define USB_MASK (0x40000) should already be correct unless its supposed to be FFFFFFFFFFFC0000.  I tried to add the zeros in front to look like the other values "{ 2, KEY_UP         , 0x00000080 }," but that didn't make a difference.  The values for a locked SD card was defined as "#define SD_READONLY_FLAG (0x20000)" and it does not function either. 

*

Offline tillo

  • *
  • 43
Re: SD1200 IS Porting Thread
« Reply #72 on: 23 / April / 2010, 20:12:07 »
hi people, I'm sorry i didn't post earlier but I still have problems with my pc, it is not well fixed this is kinda provisional, however, I've been playing with this on my camera checking the debug on screen and all that stuff, but I haven't learned anything from it yet, I was also trying to get some info from the usb power trough OSD and debug but found nothing useful, however, I figured out an easy way to sync the camera shutter with another camera without having to actually activate usb remote, I noticed that when my camera was in picture mode and plugged a usb on it it went to playback (we already discussed that before) but also it comes back to picture mode when the usb power comes out (unplug it) so I tried loading a motion detection script run it while usb was plugged and then unplug, it took a picture (sensitivity was really high), it is really slow but it would let someone to sync 2 cameras I think and if we study that (as a provisional fix for the usb remote missing feature) we could set a timer circuit so it sends a signal to a flash after the lag lapse that the camera has when changing back to picture mode, that would be essentially perfect for short exposures pictures in mid-dark places (because exposure can be shortened a lot via scripts and pictures will be darkened) being that useful to capture fast moving objects, all that is just a theory but I don't really know what else can I we do besides of keep reading documentation until we learn some more of this or get help from a more experienced coder.

Re: SD1200 IS Porting Thread
« Reply #73 on: 24 / April / 2010, 17:24:01 »
Actually its half way there...
I don't really want to look into it right now, but if the camera is in Alt mode and you plug in/unplug the cable the camera will act like the shutter was pressed and run a script.  Is it supposed to do that or is it only supposed to do that in the non-alt mode?  I'm not sure.

*

Offline tillo

  • *
  • 43
Re: SD1200 IS Porting Thread
« Reply #74 on: 26 / April / 2010, 20:26:22 »
do you mean that the script auto started? I haven't seen that on my camera.
I think it may be because the camera by changing into picture mode acts as a half-press on trigger but still that wouldn't start the script so I think that is kinda weird (if I got it the right way) that may become useful too if we manage to learn why it happens or something like that.

Re: SD1200 IS Porting Thread
« Reply #75 on: 26 / April / 2010, 21:00:57 »
Ok so I realized the code I changed in kbd.c caused that "bug".  It still doesn't do us any good but when the camera is in Alt mode: I can plug in the usb (goes into viewer mode), unplug (the camera runs the most recent script just like pressing the shutter button in the alt mode.

Line 29 I added this:
#define NEW_SS (0x2000)  // saw in other cameras wanted to try
#define SD_READONLY_FLAG (0x20000)

#define USB_MASK (0x40000)
#define USB_REG 2 //also saw in other cameras

I think the thing that really caused that problem was the Keymap matrix I messed with
{ 2, KEY_SHOOT_FULL , 0x00000003 },  // One camera had the value as 2, default was 1 for both
{ 2, KEY_SHOOT_HALF , 0x00000001 },

So.. unfortunately it doesn't get us anywhere but I think we at least know the value for the USB is known, but we just can't seem to make the camera ignore it.

*

Offline tillo

  • *
  • 43
Re: SD1200 IS Porting Thread
« Reply #76 on: 26 / April / 2010, 21:57:42 »
does the usb code appear anywhere else? I think that those codes we have there are only definitions (not only because they say define but also because they have no further instructions) if the usb code is actually somewhere else then the instruction for going into view mode might be there, that line should be replaced with an argument to make it take the picture (probably deleting the line would be enough and the script would do the rest) so we may need to look up for that usb again, i can't still help because I don't even know what is the program I should use in linux (I can't find any download links either) but tell me if you know what can I use to help with this.
PD: people from the forums I'm starting to think that you are loosing the faith on this camera but we'll make it sooner or later so keep posting here.
« Last Edit: 26 / April / 2010, 22:00:05 by tillo »

Re: SD1200 IS Porting Thread
« Reply #77 on: 27 / April / 2010, 01:16:36 »
I sorta looked and considered doing a brute force approach to just have a if usb, then shutter just to test for the heck of it.  Or have it output something on screen but I couldn't manage.

I just followed the guide on building CHDK, downloaded gcc for windows, and just compiled using
gmake PLATFORM=ixus95_sd1200 PLATFORMSUB=100C fir

Have you taken a look at the guide for linux? http://chdk.wikia.com/wiki/Compiling_CHDK_under_Linux

I downloaded everything in http://github.com/barryk/CHDK-SD1200 with the "download sources" link at the top right and then compiled it.  I don't think I made any useful changes so the only thing you need to revise is this http://chdk.setepontos.com/index.php/topic,4324.msg47169.html#msg47169 I did change some values in camera_features.h to reflect the values I found, but I think that was just for DNG and it doesn't work still.
I suppose if you were to do it properly, you can connect to the SVN directly and make changes to that one.

*

Offline tillo

  • *
  • 43
Re: SD1200 IS Porting Thread
« Reply #78 on: 27 / April / 2010, 11:22:56 »
no, I haven't been on linux guide (how could I've missed that :) ). When you say that you couldn't manage, does that mean it didn't worked or you are not sure where to place that (if so we may be able to put something trough OSD or change alt key to usb power just to give it a try)?
I will try linux guide and try to change values myself too if I can make it work.

*

Offline tillo

  • *
  • 43
Re: SD1200 IS Porting Thread
« Reply #79 on: 27 / April / 2010, 16:17:54 »
Ok I installed all what the linux guide said and it didn't worked too much (I'm still a noob in linux and some of the files where changed from the repositories so I had to do some changes on the installing some of them didn't went well) however I installed CHDK compiler GUI (which didn't worked at first) and made up some directories the thing told me where missing et voila! I can finally compile so I know what I am doing in the codes and will be able to try it all on the camera (by now I haven't been able to create the folder for compiled stuff but I bet that's easy) so I will look for that usb somewhere else and see what can I do.
I also read a little more on "adding support for a new camera" and it says that defining USB_REG is necessary, I can't find any definition for that so my next step is looking over to define that (somehow) and see if it makes any visible change.
« Last Edit: 27 / April / 2010, 16:24:52 by tillo »

 

Related Topics


SimplePortal © 2008-2014, SimplePortal