PowerShot SX220 HS - Porting Thread - page 10 - General Discussion and Assistance - CHDK Forum

PowerShot SX220 HS - Porting Thread

  • 563 Replies
  • 204057 Views
*

Offline funnel

  • ****
  • 349
Re: PowerShot SX220 HS - Porting Thread
« Reply #90 on: 02 / June / 2011, 03:05:41 »
Advertisements
I found the reason for the camera crash when switching to play mode. Looks like it runs out of memory because of the big badpixel.bin (108kb). If I put a badpixel.bin with just some zeros everything is ok. I did some experiments with exmem_alloc and looks like it fixes this problem but the video files gets corrupted.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: PowerShot SX220 HS - Porting Thread
« Reply #91 on: 02 / June / 2011, 03:55:48 »
I found the reason for the camera crash when switching to play mode. Looks like it runs out of memory because of the big badpixel.bin (108kb). If I put a badpixel.bin with just some zeros everything is ok. I did some experiments with exmem_alloc and looks like it fixes this problem but the video files gets corrupted.

This page has details on how to find the appropriate values to avoid the video problem (assuming it's the same as what others have experienced).
http://chdk.wikia.com/wiki/ExMem_-_enabling_and_loading_CHDK_into_extended_memory.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: PowerShot SX220 HS - Porting Thread
« Reply #92 on: 02 / June / 2011, 11:51:57 »
Yes, I tried the Ultra Intervalometer script from the wiki page http://chdk.wikia.com/wiki/UBASIC/Scripts:_Ultra_Intervalometer and works ok. Just be sure to put at least 2 seconds between shoots or it will not work. I also tried the motion detection scripts and they work too.
yea it works! thanks


this is a video i made using that script
http://www.youtube.com/watch?v=MvaNrg6ovsk#

*

Offline funnel

  • ****
  • 349
Re: PowerShot SX220 HS - Porting Thread
« Reply #93 on: 03 / June / 2011, 07:52:14 »
@onesky Good timelapse. Congratulazioni!


I was playing around with the exmem_alloc according to Phils instructions and no luck with that so far. If I insert the EXMEM_HEAP_SKIP option it fixes the video corruption but the camera crashes when shooting.


*

Offline funnel

  • ****
  • 349
Re: PowerShot SX220 HS - Porting Thread
« Reply #94 on: 03 / June / 2011, 13:28:41 »
Ok, I went again through the philmoz tutorial and managed to load CHDK into extended memory. I did some test and looks like it fixes the crash problems with DNGs. Only one thing I noticed is that the CHDK menu seems to be a little slower now.

Re: PowerShot SX220 HS - Porting Thread
« Reply #95 on: 03 / June / 2011, 19:32:05 »
Hi

Just bought a SX220 today, and tested CHDK. It works nice (well, it crashes sometimes when changing to review mode), but it seems that the configuration doesn't change at all. CCHDK.CFG changes (and updates are made at the current time), but when starting CHDK it seems not to load it, and it always appears same configuration.

Thanks for the effort.

Saludos!

*

Offline funnel

  • ****
  • 349
Re: PowerShot SX220 HS - Porting Thread
« Reply #96 on: 04 / June / 2011, 05:36:12 »
Thanks Mato34. I tried to find whats going on with that and pinpointed it to this statement

Code: [Select]
    // read magick value
    if (*(int *)buf!=CONF_MAGICK_VALUE || rcnt != st.st_size) {
        ufree(buf);
        return;
    }
Here it just returns the first time and no values get actually loaded into memory.

I rechecked the stubs for that part and everything looks ok. I will have to research that a little more.

Re: PowerShot SX220 HS - Porting Thread
« Reply #97 on: 04 / June / 2011, 06:59:47 »
Thanks Mato34. I tried to find whats going on with that and pinpointed it to this statement

Code: [Select]
   // read magick value
    if (*(int *)buf!=CONF_MAGICK_VALUE || rcnt != st.st_size) {
        ufree(buf);
        return;
    }
Here it just returns the first time and no values get actually loaded into memory.

I rechecked the stubs for that part and everything looks ok. I will have to research that a little more.

We'll wait and see, no hurry, this is not a job for which you're being paid for. Would like to help, coded in Z80 assembler but that was in the 90s with my 8 bits MSX2, and now I'm a bit surpassed (and old...) :)

Thanks again for all you've done.

Saludos!

P.S: oh, I'm using the version you posted on 23 may.


*

Offline funnel

  • ****
  • 349
Re: PowerShot SX220 HS - Porting Thread
« Reply #98 on: 04 / June / 2011, 07:53:46 »
I tried to add this piece of code after the "rcnt = read(fd,buf,st.st_size);" in conf.c

Code: [Select]
int fd2;
fd2 = open("A/CHDK/test.CFG", O_RDWR | O_CREAT, 0777);
write(fd2, buf, st.st_size);
        close(fd2);

to see what's in the buffer. The buffer is empty or contains just jpg filenames. Looks like it's a problem with the read() or open() function.

Re: PowerShot SX220 HS - Porting Thread
« Reply #99 on: 05 / June / 2011, 08:23:51 »
thanks to the raw support, we can see how the camera process the images to avoid the lens distortion at wide angle

 

Related Topics