CHDK Forum

CHDK Development => General Discussion and Assistance => Topic started by: Frrost on 29 / March / 2011, 16:47:03

Title: PowerShot SX220 HS - Porting Thread
Post by: Frrost on 29 / March / 2011, 16:47:03
Hello
Chdk expected for these two cameras?
If so, when?
I bought a sx230 and if I can help write it down!
Thanks in advance.

Sorry for my bad English knowledge
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: reyalp on 29 / March / 2011, 17:35:22
There is no schedule, and no way of knowing in advance if a port will be done at all. A port can only be done by someone who has the camera, good code knowledge, and lots of time.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: Bernd R on 02 / April / 2011, 08:55:11
A Big problem i see with CHDK, is that this camera have only a play Button and no other Buttons.
From my Ixus 1000 i see, that play Button can not use to activate chdk, because it do always canon firmware action.

So whole chdk need much enhance that it work with the touchscreen, chdk menu can control over touchscreen etc.

the SX220 look as a great Camera, have a BSI CMOs Sensor with good image quality.A little worser as 10 megapixel BSI, but lots better as other Canon Camera.

http://www.photographyblog.com/reviews/canon_powershot_sx220_hs_review/sample_images/ (http://www.photographyblog.com/reviews/canon_powershot_sx220_hs_review/sample_images/)
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 14 / April / 2011, 04:23:12
Hi, I'm new to the board and CHDK.

I managed to get a firmware dump with Canon Basic script. The start address for the dump is 0xFF000000 which is different than the other Canon cameras.

I'm now reading through the wiki page to find some useful infomation on how to port it. I tried the DISKBOOT.BIN from the sx210 and the camera doesn't even turn on.

I hope the CHDK gets ported to this camera.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: whim on 14 / April / 2011, 06:00:51
@funnel

Welcome to the forum !
Please upload it somewhere, and report the dump in this thread (http://chdk.setepontos.com/index.php?topic=288.0l) with a link so it can be put in fe50's P&S FW Dumps repository (http://www.box.net/chdk/1/55272271)

cheers,

wim

Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 14 / April / 2011, 08:44:32
Firmware uploaded here http://www.zshare.net/download/88986073537ffff1/ (http://www.zshare.net/download/88986073537ffff1/)

Start address 0xFF000000

Firmware version: GM1.00A
P-ID: 322C PAL D
Adj Ver: 010.010

DyrOS v2.3, release #0047
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: reyalp on 14 / April / 2011, 17:39:51
The start address for the dump is 0xFF000000 which is different than the other Canon cameras.
How did you determine this ? You would have to modify the script to get a dump at a different address.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 14 / April / 2011, 18:32:43
Yes, I modified the script and guessed the address because the old ones didn't work.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 17 / April / 2011, 04:29:58
I made some progress. I managed to compile and run some boot code using the SX210IS source as reference.

The camera uses a new set of dancing bits located at FF43BEE0 -> {0,4,2,7,3,6,5,1}
I also found that I can start an unencoded DISKBOOT.BIN from this CBasic script http://chdk.wikia.com/wiki/Canon_Basic/Scripts/Loader
 (http://chdk.wikia.com/wiki/Canon_Basic/Scripts/Loader)


For now the camera hangs on this subroutine in boot.c
Code: [Select]
void __attribute__((naked,noinline)) sub_FF0011B0_my() { // SX220 was sub_FF811198_my in sx210

    // LED debug ok.


asm volatile (

                 "STR     LR, [SP,#-4]!\n"
                 "SUB     SP, SP, #0x74\n"
                 "MOV     R1, #0x74\n"
                 "MOV     R0, SP\n"
                 "BL      sub_FF3AB8A8\n"
                 "MOV     R0, #0x53000\n"
                 "STR     R0, [SP,#4]\n"
              //   "LDR     R0, =0x186AE4\n"
                 "LDR     R0, =new_sa\n" // added
"LDR   R0, [R0]\n" // added           
"LDR     R2, =0x371F80\n"
                 "STR     R0, [SP,#8]\n"
                 "SUB     R0, R2, R0\n"
                 "STR     R0, [SP,#0xC]\n"
                 "MOV     R0, #0x22\n"
                 "STR     R0, [SP,#0x18]\n"
                 "MOV     R0, #0x68\n"
                 "STR     R0, [SP,#0x1C]\n"
                 "LDR     R1, =0x379C00\n"
                 "LDR     R0, =0x19B\n"
                 "STR     R1, [SP]\n"
                 "STR     R0, [SP,#0x20]\n"
                 "MOV     R0, #0x96\n"
                 "STR     R2, [SP,#0x10]\n"
                 "STR     R1, [SP,#0x14]\n"
                 "STR     R0, [SP,#0x24]\n"
                 "STR     R0, [SP,#0x28]\n"
                 "MOV     R0, #0x64\n"
                 "STR     R0, [SP,#0x2C]\n"
                 "MOV     R0, #0\n"
                 "STR     R0, [SP,#0x30]\n"
                 "STR     R0, [SP,#0x34]\n"
                 "MOV     R0, #0x10\n"
                 "STR     R0, [SP,#0x5C]\n"
                 "MOV     R0, #0x800\n"
                 "STR     R0, [SP,#0x60]\n"
                 "MOV     R0, #0xA0\n"
                 "STR     R0, [SP,#0x64]\n"
                 "MOV     R0, #0x280\n"
                 "STR     R0, [SP,#0x68]\n"
                 "LDR     R1, =sub_FF005EE0_my\n"       //patched
                 "MOV     R2, #0\n"
                 "MOV     R0, SP\n"
             //    "BL      sub_FF0034C4\n"             //debugging - hangs
                 "ADD     SP, SP, #0x74\n"
             //    "LDR     PC, [SP],#4\n"     //debugging - hangs
 
               
     );
}

I uploaded the trunk here http://www.zshare.net/download/89089348fb947375/ (http://www.zshare.net/download/89089348fb947375/)
This is not even an alpha version but at least I got something working.

Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: whim on 17 / April / 2011, 09:23:45
@funnel

Congratulations !

Quote
The camera uses a new set of dancing bits located at FF43BEE0 -> {0,4,2,7,3,6,5,1}

confirmed for ixus220hs (at FFC0E414) - this cam also uses DryOS 2.3 release #0047
(but dumped with unmodified Cbasic dumper @FF810000 !)

wim

PS Had to limit IDA 5.2 Pro to load only FF0000 of the FFFFFC bytes in your dump,
     or CHDK.idc would choke on it ...
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 18 / April / 2011, 17:13:25
For now I solved the error in boot.c and the boot is working now and boots in the original UI.   :)
Now I have to find all the stubs locations. Will post the trunk soon.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: fe50 on 20 / April / 2011, 04:54:34
Nice work, funnel !

Added this dump to the dumps repository at  box.net/chdk (http://www.box.net/chdk); thx for the dump !
Also created the corresponding wikia pages / links: http://chdk.wikia.com/wiki/SX220 (http://chdk.wikia.com/wiki/SX220)

Moderators - i suggest to rename this thread to something like "SX220 porting thread" since a SX230 most probably will need an own porting thread sometime in the future...
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 21 / April / 2011, 06:12:29
I made more progress. I found all the subs_entry_2, stubs_min locations and checked the auto stubs. The camera now boots and show CHDK splash screen. Still doesn't have any functionality. Now I'm trying to figure out the kbd.c to make the buttons work. For now all I can see is the logo and debug data displayed on screen. This debug data shows only when I put debug_led(1) somewhere in the kbd.c code. I don't understand why is that.

For now:
mykbd_task: Buttons not working for now. Jogdial works
capt_seq_task: Started and found out that the code is very different than the old cameras. This will be hard to make it work.
init_file_modules_task: Doesn't crash but the display shows Memory Card Error and the card remains locked.
JogDial_task_my: Works.
movie_record_task: To do
exp_drv_task: To do


Source: http://www.zshare.net/download/89247945be1cd3a9/ (http://www.zshare.net/download/89247945be1cd3a9/)
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: whim on 21 / April / 2011, 06:37:11
@funnel

I found a couple of typo's in your previous source's root Makefile, which are responsable for the 'ghost'
firmware version appearing in CHDK-Shell, corrected/commented version attached.
There's also a properly modified dancingbits.c ;)

hth,

wim
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 21 / April / 2011, 06:38:38
Ok. Will check. Thank you.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: Frrost on 21 / April / 2011, 06:52:18
If the 220's firmware will work, will be good to the 230?
Hardware is not very different from the two machines ...
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: whim on 21 / April / 2011, 07:44:20
@Frrost

A CHDK version for 1 cam will never work on another cam; if they have a lot in common,
it will just make the porting easier.

wim
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 23 / April / 2011, 11:05:49
Now I got the mykbd_task working somehow, still needs testing. CHDK is showing osd data in shooting mode (temperature, battery percent, memory card status). Data can now be saved on the locked memory card. I cannot bring up the ALT menu.

i still have the memory card error problem in InitFileModules task. I have found that I can format the card in the menu when the error is showing. When the card is formatted everything works normally and data can be stored on memory card, but the card isn't bootable anymore.

I attached the code from that function where the problem is located, if someone can help me with this.


Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: reyalp on 24 / April / 2011, 22:10:55
I've updated http://chdk.wikia.com/wiki/Canon_Basic/Scripts/Dumper#Universal_dumper (http://chdk.wikia.com/wiki/Canon_Basic/Scripts/Dumper#Universal_dumper) to hopefully work on cameras with the new start address.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: philmoz on 24 / April / 2011, 22:37:17
Now I got the mykbd_task working somehow, still needs testing. CHDK is showing osd data in shooting mode (temperature, battery percent, memory card status). Data can now be saved on the locked memory card. I cannot bring up the ALT menu.

i still have the memory card error problem in InitFileModules task. I have found that I can format the card in the menu when the error is showing. When the card is formatted everything works normally and data can be stored on memory card, but the card isn't bootable anymore.

I attached the code from that function where the problem is located, if someone can help me with this.




I think the line
   LDRB LR,[LR,#0x1ff]
should be
   LDRB R4,[LR,#0x1ff]

I'm away from my PC right now so I can't be 100% sure; but the above line looks wrong to me.

Hope this helps,
Phil.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 25 / April / 2011, 03:51:20
Thank you. That line got rid of the memory card error but I tried to use a card with two partitions and the camera crashes on startup. Will look into that later because it's not needed for smaller SD cards.


I had problems accessing the ALT menu because I had wrong KEYMASKs. So I ORed togheter the keymap and solved this. This camera doesn't have a PRINT KEY so I choose to use the combination of DISP+SET together. Firstly I tried UP+SET but always brought up the canon set menu and I didn't like that. I'm having a bad kbd problem in the CHDK menu, when I press "soft down" it is selecting options in the menu.

Looks like RAW shooting is working even without the capt_seq.c. I got a CRW file on the card that I can't open. The badpixel.bin creation option in the menu isn't working so I can't save as DNG for now. It takes two shoots an says badpixel.bin failed Try again.
Looks like shooting from scripts is working, so an intervalometer script should work now.

Now I'm searching for the values in PROPSET3 because some of them are different than the SX210IS. Maybe this will fix some problems.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: fe50 on 25 / April / 2011, 04:39:03
Looks like RAW shooting is working even without the capt_seq.c. I got a CRW file on the card that I can't open. The badpixel.bin creation option in the menu isn't working so I can't save as DNG for now. It takes two shoots an says badpixel.bin failed Try again.
reyalP's rawconvert tool should help you with this issue:

* http://chdk.wikia.com/wiki/CHDK_Tools (http://chdk.wikia.com/wiki/CHDK_Tools)
* http://tools.assembla.com/chdk/browser/trunk/tools/rawconvert.c (http://tools.assembla.com/chdk/browser/trunk/tools/rawconvert.c)
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 25 / April / 2011, 08:00:05
Now I'm having problems finding out the sensor size. How can I do this?

I tried to calclulate it but I couldn't get an exact integer value.

The numbers are:

12bpp = 19131120
10bpp = 12754080

Sensor size    1/2.3" (6.17 x 4.55 mm)

JPEG 4000x3000







Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 25 / April / 2011, 08:47:02
Nevermind. I used two nested for loops to find the values.

4080x3126 or 4168x3060
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 25 / April / 2011, 09:10:05
The resolution is 4080x3126.

I managed to convert the CRW file but all I get is this.



Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: asm1989 on 25 / April / 2011, 10:35:45
hi funnel, good work with the porting!!

I ported the sx210, so if you need any advice let me know,

I think this camera, in some sense is a mix of sx210 and ixus1000, so maybe the 2 sources will help.

I don't think it will use propset3, even sx210 has a "special" propset 3, you can find it the sx210 sources,

about the Raw stuff It may use a diferent color pixel arrangement, check ixus 1000 source too.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: Bernd R on 25 / April / 2011, 10:50:17
The resolution is 4080x3126.

I managed to convert the CRW file but all I get is this.





such images happen if your buffer address is wrong.
You need look if the buffer switch address and the memory address is correct.this is working code from lib.c IXus 1000 100d Firmware.



char *hook_raw_image_addr()   //ASM1989  DONE FOR IXUS 1000
{
   if (*((int*)0x34D0) != 0)    //  34C4 + C  ->   FF885154  ->FF885180   (ixus 1000)
      return (char*)(0x46000000);   // at FFB8ECF4  pointed at aSsimgprocbuf_c DCB "SsImgProcBuf.c",0
   else
      return (char*) 0x4132CD20;   // found at[search CRAW BUF]
}

char *hook_alt_raw_image_addr()
{
   // Appears to be two raw buffers (this returns inactive buffer)
   // Addresses below found in table at FFB9922C, ref at FF88883C
   // used in _sub_FF888630__SsImgProcBuf.c__0
   // checks [0x36a0 + 0xc] --> defines which buffer is active

   if (*((int*)0x34D0) == 0)
      return (char*) 0x46000000;
   else
      return (char*) 0x4132CD20;   
}  

The ixus 1000 can use propset 4, maybe SX220 too
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: reyalp on 25 / April / 2011, 12:08:50
The resolution is 4080x3126.

I managed to convert the CRW file but all I get is this.
Looks to me like your raw address is wrong, or your camera has multiple raw buffers and you got the wrong one.

You can usually find strings that give you the exact dimensions.

I think this camera, in some sense is a mix of sx210 and ixus1000, so maybe the 2 sources will help.

I don't think it will use propset3, even sx210 has a "special" propset 3, you can find it the sx210 sources,

about the Raw stuff It may use a diferent color pixel arrangement, check ixus 1000 source too.
It's different than propset 4 ? Then make a new one...
It seems to me new dryos revision => new propset these days.

@funnel
I would suggest caution using unfinished ports as a reference, especially the ixus 1000... there may be useful hints, but keep in mind a lot could be wrong.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 26 / April / 2011, 02:58:39
Yes, I'm modifying the sx210is source code and use the S95 and SX30 as reference too.

The raw hook address I had was wrong but I still get the same result. I think it takes the data from the buffer too early or too late. I haven't done the capt_seq.c yet and probably i need this line "BL   capt_seq_hook_raw_here" in the right place to work.

I also custom mofied the Propset3 and then found it is actually just a Propset4. Every number in propset3 above 150 was +2.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: reyalp on 26 / April / 2011, 11:52:38
Yes, I'm modifying the sx210is source code and use the S95 and SX30 as reference too.
Please understand that fact that a camera is in the same series in Canon's model line has very little significance. You need to correct all the addresses etc. in every port.
Quote
The raw hook address I had was wrong but I still get the same result. I think it takes the data from the buffer too early or too late. I haven't done the capt_seq.c yet and probably i need this line "BL   capt_seq_hook_raw_here" in the right place to work.
Yes.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 26 / April / 2011, 15:33:22
The resolution is 4168x3060.

I managed to convert the CRW file but all I get is this.


EDIT: resolution

Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: michi1911 on 26 / April / 2011, 17:50:19
@funnel

Congratulations !

Quote
The camera uses a new set of dancing bits located at FF43BEE0 -> {0,4,2,7,3,6,5,1}

confirmed for ixus220hs (at FFC0E414) - this cam also uses DryOS 2.3 release #0047
(but dumped with unmodified Cbasic dumper @FF810000 !)

wim

PS Had to limit IDA 5.2 Pro to load only FF0000 of the FFFFFC bytes in your dump,
     or CHDK.idc would choke on it ...

Hi,
greetings from Munich/Germany.

I ordered an IXUS220HS today for my microcopter project and respectively I'm pretty interested in a CHDK port for this model.

Happily I read, that you have a look at the ixus220hs firmware too :) Am I right?

I appreciate that, so that I can contribute sooner or later to a port to this model regarding to your experience if nobody more experienced in CHDK does the job.

Meanwhile I try to monitor your activities on the powershot220hs to learn about the CHDK project.

As soon as I get my IXUS, I will dump the firmware, so that it can be added to the archive.
As far as I understand, for the IXUS the standard dump range is valid!?

...have fun...

Michi
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 27 / April / 2011, 02:53:23
Success. I got some basic funcionality working. Still no RAW support but overrides are working. I successfully did a 101 second exposure. I also fixed the keybord problem, some wrong numbers in the keymap.

I uploaded the binaries if someone is willing to test. Use at your own risk. To access the ALT menu use DISP+SET button.


@michi1911

IXUS220HS and ELPH300 are the same cameras. The firmware dump is already uploaded.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: michi1911 on 27 / April / 2011, 15:30:33
IXUS220HS and ELPH300 are the same cameras. The firmware dump is already uploaded.

Yes, thanx!

I discovered that too.

Let's see if the german version is the same!?

...have fun...

Michi
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 28 / April / 2011, 18:35:27
Yes. I finally found the RAW buffer address. It was 0x46000000 in a strange location with the string "DoCaptureDarkSub executed." Buffer is at the same location as in the S95.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 30 / April / 2011, 17:43:21
Found the FI2 keys:

FI2KEY @FFFF3610
FI2IV @FF49B4CC


But the camera crashes when loading firmware update starts.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 01 / May / 2011, 05:46:51
I compiled a new one for testing. Still a lot to do but the basics are working.

What I tested until now:

working:
- RAW files but no DNG support for now.
- Scripts
- Remote
- Shutter speed override
- Partially manual focus in video. Works only when slow zoom pressed.
- TV bracketing works
- ISO bracketing partially - when set at iso 500 works.

Not working:
- ISO overrides. When in Auto ISO not working at all, when in manual ISO -> iso 100 is at iso 810 and iso 800 is at iso 1610.
- AV overrides.
- AV bracketing.
- Create badpixel.bin







Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: tontomele on 01 / May / 2011, 09:20:20
You can open the files CRW?

Txh..
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: Bernd R on 02 / May / 2011, 06:28:54
Found the FI2 keys:

But the camera crashes when loading firmware update starts.

do you get a romlog output ?

If its a fsionotify error you need activate the boot fixes

>Yes. I finally found the RAW buffer address. It was 0x46000000 in a strange location with the string >"DoCaptureDarkSub executed." Buffer is at the same location as in the S95.

thats only the second buffer.this camera have 2 buffers and you need find the address that show which buffer is capture.this values are diffrent.maybe you take a look on Ixus 1000 source too, here stand comments how to find the address.

but for a quick test its good enough.you can shoot 2 images in series mode and at least 1 image should look correct

>- ISO overrides. When in Auto ISO not working at all, when in manual ISO -> iso 100 is at iso 810 and iso 800 is at iso >1610.
>- AV overrides.

the code for iso overwrite does not work with newer cam.here is a solution that work on Ixus 1000

http://chdk.setepontos.com/index.php?topic=5574.msg61888#msg61888 (http://chdk.setepontos.com/index.php?topic=5574.msg61888#msg61888)

Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 02 / May / 2011, 15:59:24
Thank you Bernd R. I'll have a look into that.

I solved the FI2 problem and CHDK now starts from the firmware update. The problem was in some commented out code in boot.c that caused crashes at the beginning of my porting.

Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 04 / May / 2011, 03:07:53
Hi.
I'm trying to figure out the DNG creation problem I'm having. Can somebody give me a hint for what should I look for to solve this. Is this a cfapattern issue, colormatrix or something else? When I convert the raw crw file from the camera with rawconvert.c 12to8 I get a nice grayscale picture.

Thank you.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: philmoz on 04 / May / 2011, 06:27:13
Hi.
I'm trying to figure out the DNG creation problem I'm having. Can somebody give me a hint for what should I look for to solve this. Is this a cfapattern issue, colormatrix or something else? When I convert the raw crw file from the camera with rawconvert.c 12to8 I get a nice grayscale picture.

Thank you.

That looks like what you get if the RAW buffer address is wrong.

Given the newness of the camera and the fact that it has 128MB of RAM I'd guess it has two (or more) RAW buffers.

You will need to find the other buffer(s) and the switch to determine the active one - see the G12 & SX30 ports of lib.c for examples.

If this is the case it will also allow you to implement 'hook_alt_raw_image_addr' to make use of the double buffer when saving DNG images to speed things up.

Phil.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 04 / May / 2011, 07:44:27
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 04 / May / 2011, 08:23:49
I uploaded the latest source here:
http://www.zshare.net/download/89768742e4dcb349/ (http://www.zshare.net/download/89768742e4dcb349/)

and the binary with FI2 with some new fixes.
http://www.zshare.net/download/89768895bc3f4912/ (http://www.zshare.net/download/89768895bc3f4912/)
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: philmoz on 04 / May / 2011, 09:17:12
I uploaded the latest source here:
http://www.zshare.net/download/89768742e4dcb349/ (http://www.zshare.net/download/89768742e4dcb349/)

and the binary with FI2 with some new fixes.
http://www.zshare.net/download/89768895bc3f4912/ (http://www.zshare.net/download/89768895bc3f4912/)


One possible issue is that the DNG active area width is smaller than the CAM_JPEG_WIDTH value.
Your active area width is CAM_ACTIVE_AREA_X2 - CAM_ACTIVE_AREA_X1 = 3872; but your CAM_JPEG_WIDTH is 4000.

I don't know if this would cause the problem you are seeing; but it will probably result in a 'corrupt' DNG file. What software are you using to display the DNG files?

Try setting CAM_ACTIVE_AREA_X1 and Y1 to 0 and then set X2 and Y2 to the raw image dimensions. This way when you do get a DNG file loaded you can examine it to determine the correct values to define the active area.

Phil.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 04 / May / 2011, 10:33:41
Thank you. I didn't even notice that error. But fixing that still didn't solve the problem. Any other idea?

The software is Photoshop, IrfanView, UfRaw and Raw Therapee. 
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 04 / May / 2011, 11:04:52
Now I tried to delete the header from the DNG (38400 bytes) and then converted the file with rawconvert from 12 to 8 bits and I get an ugly grayscale picture which is good. At least I know now that the problem is somewhere in the header data.
Is it normal to be so much data in the header?
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: philmoz on 04 / May / 2011, 16:03:47
Now I tried to delete the header from the DNG (38400 bytes) and then converted the file with rawconvert from 12 to 8 bits and I get an ugly grayscale picture which is good. At least I know now that the problem is somewhere in the header data.
Is it normal to be so much data in the header?

Yes, the thumbnail image in the DNG header is 128x96x3 bytes (36,864).
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 06 / May / 2011, 08:52:35
Hi. I found the reason why the DNGs aren't displayed correctly but I don't have a complete solution yet.

The problem is in this line in dng.c

Quote

struct dir_entry IFD1[]={
 {0xFE,   T_LONG,      1,  0},       // NewSubFileType: Main Image
 {0x100,  T_LONG,      1,  CAM_RAW_ROWPIX},   // ImageWidth
 {0x101,  T_LONG,      1,  CAM_RAW_ROWS},   // ImageLength
 {0x102,  T_SHORT,     1,  CAM_SENSOR_BITS_PER_PIXEL},   // BitsPerSample
 {0x103,  T_SHORT,     1,  1},   // Compression: Uncompressed
 {0x106,  T_SHORT,     1,  0x8023}, //PhotometricInterpretation: CFA
 {0x111,  T_LONG,      1,  0}, //StripOffsets: Offset
 {0x115,  T_SHORT,     1,  1}, // SamplesPerPixel: 1
 {0x116,  T_SHORT,     1,  CAM_RAW_ROWS}, //RowsPerStrip
 {0x117,  T_LONG,      1,  CAM_RAW_ROWPIX*CAM_RAW_ROWS*CAM_SENSOR_BITS_PER_PIXEL/8}, // StripByteCounts = CHDK RAW size
 {0x11A,  T_RATIONAL,  1,  (int)cam_Resolution}, // XResolution
 {0x11B,  T_RATIONAL,  1,  (int)cam_Resolution}, // YResolution
 {0x11C,  T_SHORT,     1,  1}, // PlanarConfiguration: 1
 {0x128,  T_SHORT,     1,  2}, // ResolutionUnit: inch


 {0x828D, T_SHORT,     2,  0x00020002},  <-----here     CFARepeatPatternDim: Rows = 2, Cols = 2


 {0x828E, T_BYTE,      4,  cam_CFAPattern},
 {0xC61A, T_LONG,      1,  CAM_BLACK_LEVEL}, // BlackLevel
 {0xC61D, T_LONG,      1,  CAM_WHITE_LEVEL}, // WhiteLevel
 {0xC61F, T_LONG,      2,  (int)cam_DefaultCropOrigin},
 {0xC620, T_LONG,      2,  (int)cam_DefaultCropSize},
 {0xC68D, T_LONG,      4,  (int)cam_ActiveArea},
 {0}
};


If I change 0x00020002 to cam_CFAPattern I get the picure but for now is all in violet colors.

What is that value used for? Can I change it?

If I open the thumbnail alone it has the right colors with the same cfapattern.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 06 / May / 2011, 11:31:09
Yes. I found that the value 0x00030003 gives me a perfect picture. This means 3 rows 3 cols I guess. Photoshop doesn't want to open it but Raw Therapee and IrfanView open them without problem.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: Bernd R on 06 / May / 2011, 13:18:33
wrong post
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: philmoz on 06 / May / 2011, 17:52:03
Yes. I found that the value 0x00030003 gives me a perfect picture. This means 3 rows 3 cols I guess. Photoshop doesn't want to open it but Raw Therapee and IrfanView open them without problem.

That is very strange indeed - I haven't heard about a new type of 3x3 bayer sensor pattern (not sure how it would even work).

Can you upload a sample DNG file and post a link - I'd like to take a closer look at one.

Thanks,
Phil.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 07 / May / 2011, 07:00:17
I really don't understand this. Now I tried to play with that number and didn't make any difference, even with the original value. So for now I leave it as it was. I did a gmake clean and recompile, probably this fixed something.

I uploaded a sample DNG here: http://www.zshare.net/download/89869014056297be/ (http://www.zshare.net/download/89869014056297be/)
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: Bernd R on 07 / May / 2011, 09:59:01
I really don't understand this. Now I tried to play with that number and didn't make any difference, even with the original value. So for now I leave it as it was. I did a gmake clean and recompile, probably this fixed something.

I uploaded a sample DNG here: http://www.zshare.net/download/89869014056297be/ (http://www.zshare.net/download/89869014056297be/)

I see no problem in the file, colors look ok.i test with picasa and silky pix free

maybe you should switch your camera to series mode and press and hold shoot button, so 6 images are record.If some of them are wrong mostly every 2. , then your buffer address code is wrong.

also verify if same number of raw and jpg is record and raw and jpg have same number.
best you use option that RAW are in same directory as jpg, so you can see this easy
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: onesky on 08 / May / 2011, 16:13:33
i can't open with adobe photoshop 5 while i can open with FastStone Viewer
http://img600.imageshack.us/img600/254/sx220dng.jpg (http://img600.imageshack.us/img600/254/sx220dng.jpg)

the dnw image is quite soft, while the noisy is still very low (iso 118?)


thanks for you work funnel, i am looking forward for this firmware :)
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 08 / May / 2011, 17:24:35
Here's the latest binary if someone is interested in testing it.

http://www.zshare.net/download/8992611029196ee7/ (http://www.zshare.net/download/8992611029196ee7/)

DNG and Create badpixel.bin are working now.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: onesky on 09 / May / 2011, 14:43:32
dng works!

and i can open with adobe photoshop

(https://chdk.setepontos.com/proxy.php?request=http%3A%2F%2Fimg199.imageshack.us%2Fimg199%2F4633%2Fsx220dngiso800.th.jpg&hash=f1665162ba2ab5098c834c4938a26040) (http://img199.imageshack.us/img199/4633/sx220dngiso800.jpg)

well don funnel!

there is anyway a problem, i got black corners at bottom of the picture and also a soft border

(https://chdk.setepontos.com/proxy.php?request=http%3A%2F%2Fimg840.imageshack.us%2Fimg840%2F6303%2Fsx220iso1600.th.jpg&hash=b2c2880f6a8d16d13d7a6ee0fc6e0632) (http://img840.imageshack.us/img840/6303/sx220iso1600.jpg)


p.s.
i didn't understand what badpixels made (it took 2 pictures)
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 09 / May / 2011, 16:56:15
Check the wiki for more info on this. It's an array of locations of badpixels that get corrected after the shoot. For my camera Create badpixel.bin reported 27000 bad pixels.

The black borders are visible only when no zoom is used. In Photoshop you can use the lens correction profile for Samsung WB2000 (distortion 200) to fix it or correct it manually.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 10 / May / 2011, 15:58:58
Fixed a bug today that caused a camera crash in continuous shooting in RAW mode. http://www.zshare.net/download/89997598e62c1670/ (http://www.zshare.net/download/89997598e62c1670/)

I also found new bug, sometimes the camera crashes when switching from REC to PLAY mode.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: onesky on 11 / May / 2011, 14:01:46
good!
i noticed also that the camera crash when i switched from P mode to Auto mode.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: Bernd R on 11 / May / 2011, 14:30:58
Check the wiki for more info on this. It's an array of locations of badpixels that get corrected after the shoot. For my camera Create badpixel.bin reported 27000 bad pixels.

thats a lot badpixels.I get when i switch dark frame subtraction from auto(default) to off and create badpixels only 81xx bad pixels.with auto i get 27000 and more.

maybe it help on your Camera too ?
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 11 / May / 2011, 18:18:16
I still haven't figured out the right place to put capt_seq_hook_set_nr to turn on and off dark frame substraction in the menu. But if I want I can set it manually when shooting in M mode. Every shutter speed from 1 to 15 seconds puts the dark frame on and the other faster shutter speeds turns it off. I tried the badpixel with dark frame on in M mode and it went from 27222 to 27224, so not any big difference here.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: topgearuk on 12 / May / 2011, 15:18:59
Hello all, I'm a complete noob to the world of CHDK, I've just brought the powershot sx220hs. Funnel I've been following your progress and it's looking very promising, at some stage will I be able to use this just to control firing the shutter? All I want to be able to do is set the camera in Av mode and the shutter to fire once every 5 seconds or so, is this even possible? Sorry for the noob question.

Thanks David
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 12 / May / 2011, 17:35:54
Yes, I tried the Ultra Intervalometer script from the wiki page http://chdk.wikia.com/wiki/UBASIC/Scripts:_Ultra_Intervalometer (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.

Here's an interesting video that shows how to make timelapse without CHDK http://www.youtube.com/watch?v=S4QfavbqmAw# (http://www.youtube.com/watch?v=S4QfavbqmAw#)
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: russ_forever on 13 / May / 2011, 05:38:07
Hello.
Sorry for my bad English.
I am new to using CHDK.
I downloaded the latest build and tried to test it. I selected RAW in ALT menu and set on for "Save RAW", "DNG format", "DNG file extention". Quit to M-mode. Pressed button of shoot. The result is only JPEG-file. Then my RAW-setting dropped ("Save RAW" off, "DNG format" off, "DNG file extention" off). Maybe I do something wrong?
Thanks in advance.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 13 / May / 2011, 08:11:20
When in ALT mode the DISP key switches raw on and off. Just be careful when going out of the menu to not switch it off or hold first the SET button then press DISP.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: topgearuk on 13 / May / 2011, 11:10:38
Yes, I tried the Ultra Intervalometer script from the wiki page http://chdk.wikia.com/wiki/UBASIC/Scripts:_Ultra_Intervalometer (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.

Here's an interesting video that shows how to make timelapse without CHDK http://www.youtube.com/watch?v=S4QfavbqmAw# (http://www.youtube.com/watch?v=S4QfavbqmAw#)

Thanks Funnel, I will give that a try, but 1st I need to read up on this CHDK more before I can attempt anything! As it's way above my head right now!
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 14 / May / 2011, 06:08:25
Fixed the 2nd time the crash with continuous shooting in RAW mode. I moved the capt_seq_hook_raw_here a few lines ahead and it fixed it. Camera still crashes when switching from rec to play after that. Romlog shows Cache.c assert line 118, Task name: MetaCtgSP

http://www.zshare.net/download/90125608b4433c6a/ (http://www.zshare.net/download/90125608b4433c6a/)
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: daffy.d on 16 / May / 2011, 08:57:05
Hi,
because the thread name is "PowerShot SX220 & SX230 HS" I tried the CHDK on my SX230 HS but it doesn't work. I receive error message "Update File Error" when I try to run the CHDK. How can I run it on SX230 HS please?
Thanks.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: whim on 16 / May / 2011, 11:23:57
@daffy.d

Hi, welcome to the forum.

The question was answered before in this same thread, see here (http://chdk.setepontos.com/index.php?topic=6241.msg65205#msg65205).
 
The thread title is misleading though, it would be a good idea if Frrost or a mod changed it ...

hope that helps,

wim

Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: Bernd R on 20 / May / 2011, 04:50:33
@funnel

Have you test if on sx220 work chdk ptp and the switch to the shooting mode ?
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 20 / May / 2011, 06:53:15
No. PTP doesn't work for me. ptpCamGui 2.0.95 log shows:

Quote
** init() start ...
>> version << error: camera has unsupported camera version 0.2; some functionality may be missing or cause unintented consequences
ptpcam: 2.0
camera: 0.2 (Length: 142)
** init() fail
** init() start ...
>> version << ptpcam: 2.0
camera: 0.2 (Length: 24)
>> shutdown
** init() fail

Then the camera shuts down.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: msl on 20 / May / 2011, 08:32:09
camera: 0.2 (Length: 142)

It's seems you use an old ptp protocol. Since changeset 1155 (http://tools.assembla.com/chdk/changeset/1155) ptpCamGui (http://chdk.setepontos.com/index.php?topic=6285.msg64905#msg64905) (current 2.0.99) and reyalp's ptp client (http://chdk.setepontos.com/index.php?topic=6231.0) needs version 2.0 of chdk ptp protocol.

msl
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: funnel on 20 / May / 2011, 11:08:44
Yes. I updated the trunk and now it works. It goes into PTP mode only if I don't have any pictures on memory card, otherwise it crashes.
Romlog after crash:
Quote
ASSERT!! ReadFDir.c Line 466
Task ID: 44433503
Task name: TrnsCtrlTask0

@funnel

Have you test if on sx220 work chdk ptp and the switch to the shooting mode ?

Everything works except when I want to start a video recording just takes a picture.
Title: Re: PowerShot SX220 & SX230 HS - Porting Thread
Post by: sylikc on 21 / May / 2011, 04:25:15
I've updated http://chdk.wikia.com/wiki/Canon_Basic/Scripts/Dumper#Universal_dumper (http://chdk.wikia.com/wiki/Canon_Basic/Scripts/Dumper#Universal_dumper) to hopefully work on cameras with the new start address.

Thanks reyalp for the modification.  I was able to successfully dump the firmware for the SX230 HS.  

I'm going to start a new thread specifically for that camera as per fe50's original comment way back on page 1...

/sylikc
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 23 / May / 2011, 16:04:33
Somone asked me for the latest source, so here it is.

Source:
http://www.zshare.net/download/905177643352fa86/ (http://www.zshare.net/download/905177643352fa86/)

Binary:
http://www.zshare.net/download/9051785961e7a80d/ (http://www.zshare.net/download/9051785961e7a80d/)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vit40 on 25 / May / 2011, 15:09:52
Downloaded a dng file from page 4 of this thread

Exif tag "CFA Repeat Pattern Dim" (0x828d) is wrong. Should be "2 2" and not "3 3". Otherwise Camera Raw 6.4 refuses to open the file. It's usual RGGB pattern, as correctly described with tag "CFA Pattern" in this dng. With this tag set to "2 2" I can open it with both ACR and dcraw.

Exif Tag Active Area (60 168 3068 4168) is also wrong. Since I don't have matching jpeg, I can't say what's the right value, but setting iz to (56 164 3056 4164) eliminated dead areas on the right and bottom. If someone post jpg + dng combination, I hope I could determine the right value. But - since this camera probably also corrects distortion of the lens (like SX130 and SX200), we need combination where this correction is zero (if exist). On SX130 and SX200 it was at maximum zoom position

Color matrix also needs some tuning. It looks like daylight shot, so color temperature 7550K and tint -20 is quite off. Shoud be 5000-5500 K, tint around +10
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 25 / May / 2011, 16:43:28
Thank you. That DNG is an old one. Later I changed the CFA repeat pattern dim back to 2.2 and the active area is now
Quote
#define CAM_ACTIVE_AREA_X1         68
#define CAM_ACTIVE_AREA_Y1         10
#define CAM_ACTIVE_AREA_X2         4168
#define CAM_ACTIVE_AREA_Y2         3060


Regarding the colors temperature I compared the DNGs with the JPGs and look the same to me. I will post some DNG+JPGs for you to compare tomorrow. I develop the RAW files with Photoshop and I get really good results. Lens distorsion is huge without zoom, in Photoshop I have to apply 90 out of 100 to correct it.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vit40 on 25 / May / 2011, 17:01:47
If you use WB As shot, then WB should be the same as on jpg no matter what color matrix in a dng, because color multipliers supplied by the camera are used. But color temperature and tint calculated by ACR (and other programs) is wrong, so if you use WB presets, you get wrong WB.

I'm still available to make a dng profile for this (and other) CHDK camera(s) (see thread dng profile generator), if someone wants it - just we have to go through that specific procedure (if there is a zoom position where camera doesn't apply correction of lens distortion, because my specific test image must be placed precisely in a raw image)

May I get some short info about the current status of CHDK port for SX220 - I'm considering purchasing it because of HD video capability. How stable it is, are all features supported etc ...
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 26 / May / 2011, 04:08:38
Basically most of the "must have" features are supported (scripts, RAW, overrides, bracketing). The Zebra and Edge overlay position need to be fixed, histogram is working, PTP working if no shoots are on SD card (romlog ReadFDir.c assert).

The most annoying bug I have to fix is after DNG raw shooting in continuous mode and then switching to PLAY mode causes the camera to crash (romlog Cache.c assert).

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vit40 on 26 / May / 2011, 04:48:09
Thanks, funnel. I don't need zebra / overlay anyway. I have 3 more questions:

- is autoloading of chdk working with this camera (with up to 4 GB card)
- is old style chdk raw saving working (I don't use dng as chdk raw is faster)
- is video compression adjustable (or any other differences versus older cameras saving mjpeg)

And 2 questions about out-of-the box video mode (without CHDK)

- is it possible to apply exposure shift without locking the exposure (it's not clear to me from page 119 of the manual) and is it also working during movie recording or has to be pre-set before starting recording
- is it possible to use manual focus (and what's about usage of Set button to do refocus when using CHDK)

Thanks
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 26 / May / 2011, 07:09:10

Quote
- is autoloading of chdk working with this camera (with up to 4 GB card)
Yes, bu only up to 4GB for now, for bigger cards you can use the firm update start method.

Quote
- is old style chdk raw saving working (I don't use dng as chdk raw is faster)
Yes, but I don't know how to view them normally. I will post a sample later.

Quote
- is video compression adjustable (or any other differences versus older cameras saving mjpeg)
Yes it can be adjusted. In 1080p mode and the highest quality setting want's to write at about 20MB/s, of course the card can't handle this.

Quote
- is it possible to apply exposure shift without locking the exposure (it's not clear to me from page 119 of the manual) and is it also working during movie recording or has to be pre-set before starting recording
Exposure in video can be set before starting the recording, not during video recording. I never tested this and I'm not sure how it works.

Quote
- is it possible to use manual focus (and what's about usage of Set button to do refocus when using CHDK)
During video recording you can use the Set button to autofocus lock on other subjects. Manual focus during video recording works when pressing slow zoom button. For now here's a bug and if you go from the slow zoom to fast zoom the camera crashes. It works but you must be careful when using this feature until I find how to fix that.

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vit40 on 26 / May / 2011, 11:32:09
Thanks. Yes, looking to manuals, it seems that only SX10, 20, 30 and older S3, S5 ... have option of adjusting video exposure during recording. Other cameras whether lack this feature (like my A620, A650) or have an option to set exposure prior to recording (like SX110)

However, CHDK ads this functionality to A620/650, but ist's of limited use - every zooming unlocks the exposure, causing abrupt change of brightness. And it affects only exposure time and not ISO (unless something changed in new versions - I didn't try)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 27 / May / 2011, 07:14:11
@vit40

I uploaded some sample shots of the color pallete in DNG, CRW and JPG, without zoom and full zoom
http://www.zshare.net/download/90656964b2bd9de5/ (http://www.zshare.net/download/90656964b2bd9de5/)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vit40 on 27 / May / 2011, 08:58:05
hi, funnel

I downloaded the files. There is no geometry correction at full zoom, so I could generate a dng profile for this camera. If you or someone else is interested, read the instructions in mentioned topic "CHDK dng profile generator", because I have very specific procedure for this, as it's not based on shooting the real target but a kind of back engineering

Exif tag "Default Crop Origin" needs slight correction if we want that image on jpg from dng is at the same position as jpg from the camera. Correct value seems to be "60 28" (I'm not quite sure because image is not very sharp, but noise patterns seem to be at the same position with this setting). But it's not a big deal, error is only 10 pix horizontally and 3 pix vertically
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vit40 on 27 / May / 2011, 15:58:05
Here is also new color matrix

1.4458 -0.5704 -0.1562  -0.2520  1.1470  0.1388  -0.1336  0.2334  0.4387

I whitebalanced it so that ACR with img_6532.dng is showing color temperature 5500K and tint +5 (instead +6700 / -18 with previous matrix), assuming it was taken in lighing similar to typical daylight. Also moved red primary from position 0.71, 0.11 to 0.71 0.14 in CIExy diagram, because red hue was a bit too low (like on some other color matrices in dcraw). Probably it should be even higher, but I didn't want to overdo the corrections.

New color matrix can be applied to existing dngs using exiftool :

exiftool -ColorMatrix1="1.4458 -0.5704 -0.1562  -0.2520  1.1470  0.1388  -0.1336  0.2334  0.4387"  <filename.dng>

It would be nice if someone try this color matrix with a bunch of different photos and see if displayed color temperature / tint is about correct
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 29 / May / 2011, 05:44:05
Thank you. When I try to change the colormatrix with exiftool it displays "Sorry, ColorMatrix1 is not writable. Nothing to do."
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vit40 on 29 / May / 2011, 15:03:28
I asked Phil Harvey to enable writing of color matrices a while ago, he did it very quickly, so you have only to download the latest version of exiftool. Before that, I was using my program (DngMatrix) for that
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 30 / May / 2011, 10:38:44
Ok, I tried your colormatrix and looks definitely better. I opened both images in PS with the old and new matrix and applied the daylight white balace to both and compared them. Is this the correct way to check it? The new one looks a lot better.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vit40 on 31 / May / 2011, 04:43:20
What I did when I was calibrating WB of my cameras was that I applied a corrected color matrix to a bunch of daylight photos (taken in nice weather, outside shade etc). When set to WB as shot, ACR should show color temperature 5000-5500 on most photos (like my 400D, where Adobe is providing calibrated profiles). If it's still not the case, tell me what the average is and I can make another color matrix. Also, check is red hue on various photos ok (compare with jpeg from camera) - from my feeling red primary should be moved further up in CIExy diagram, because it's usually around position 0.70 0.25 on most cameras
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 02 / June / 2011, 03:05:41
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.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: philmoz 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. (http://chdk.wikia.com/wiki/ExMem_-_enabling_and_loading_CHDK_into_extended_memory.)

Phil.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky 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 (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
(https://chdk.setepontos.com/proxy.php?request=http%3A%2F%2Fimg844.imageshack.us%2Fimg844%2F483%2Fintervalometersx220hs.jpg&hash=e64b474362ec4e398dff71f68743a045)

this is a video i made using that script
http://www.youtube.com/watch?v=MvaNrg6ovsk# (http://www.youtube.com/watch?v=MvaNrg6ovsk#)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel 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.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel 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.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Mato34 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!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel 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.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Mato34 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.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel 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.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky 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
(https://chdk.setepontos.com/proxy.php?request=http%3A%2F%2Fimg831.imageshack.us%2Fimg831%2F4783%2Frawjpgsx220100.jpg&hash=d80bf825f96c6cee0d484baf3593e1dd)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 05 / June / 2011, 16:29:32
A new user contacted me yesterday and sent me a new firmware version 101A. A few stubs and addresses needed to be corrected and seems like it's working fine according to him. The only difference was that everything above 0xFF2FC000 was offset from 0x4 to 0x18. The memory addresses all remained the same as 100A.

I uploaded the new binaries for 100A and 101A and compiled two versions, one normal and one that uses 2MB of extended memory for testing purposes. The ExMem one fixes the crash when shooting in DNG but causes a crash in PTP mode.

Binary http://www.zshare.net/download/91053583becbfb0a/ (http://www.zshare.net/download/91053583becbfb0a/)

Source http://www.zshare.net/download/910677163f93fe87/ (http://www.zshare.net/download/910677163f93fe87/)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 06 / June / 2011, 05:15:36
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 06 / June / 2011, 10:03:28
Ok, I forgot to free the buffer at the end of that code. Now I added ufree(buf) and works fine. But I still don't know why it works when running the code manually but doesn't at startup when conf.restore() is executed.  :-[
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 06 / June / 2011, 14:54:08
thanks for you efforts funnel
it will be possible to get manual options (shutter/aperture/iso) on video too?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 06 / June / 2011, 15:12:55
thanks for you efforts funnel
it will be possible to get manual options (shutter/aperture/iso) on video too?
I hope so. I'd like that too.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 06 / June / 2011, 15:19:57
Incredible but I found what was wrong. I had the wrong address for the read() and Read() function in the stubs (FF00ADB8->FF00AD58). I didn't notice that was wrong because it was auto found and the structure of the subroutine was identical in both, they just had two BL's pointed to different subs. EDIT: just one line was different "LDR     R3, [R0,#0x10]" ->" LDR     R3, [R0,#0xC]"

Now it's finally possible to change and save the settings.

Binary http://www.zshare.net/download/91089471680331ab/ (http://www.zshare.net/download/91089471680331ab/)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Mato34 on 06 / June / 2011, 18:39:41
Hi funnel. Ah! The magic of low level programs... ;)

Thanks a lot for your work. Will test it tomorrow and will tell something.

Saludos!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 07 / June / 2011, 15:49:23
Today I tried to do some experiments with two props that control the video size and fps.

Framerate prop 168(0=30fps, 1=24fps, 2=240fps, 3=120fps)
Resolution prop 171(1=240p, 2=480p, 4=720p, 5=1080p)

I was interested if I can set 1080p to 30fps (default 24fps) and found that if I record a maximum of  2-3 seconds of video everything is ok but when I do longer recordings the camera crashes when stopping the video. The problem is not just in 1080p, same happens if I override 240p, 480p or 720p to 24fps(30 default). Romlog shows a MovWriter.c assert. Maybe this could be fixed someday. For now I don't know how.

And yes, it's impossible to override the slow-motion to higher resolutions, it doesn't even start and crashes.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Mato34 on 07 / June / 2011, 19:06:11
Nice to see you are searching and looking over there. It looks logical that the slow motion mode (or high framerate) it needs a lower resolution because of the sensor, not for the firmware itself. But who knows... 1080@30 fps it doesn't seem too far from the original specification though.

I tested your last version, and could save and load the configuration and so could play a little more than I did until now :)

Then noticed two little things:

1- Efective Focal Lenght in OSD doesn't fit the lens specifications. With scale factor 100 it goes from 28 mm to 304 or so (I don't remember the exact value), using scale factor 115 it goes from 32 mm to 391 mm. I couldn't get a numer that fits the lens specifications.

2- When recording video and pressing the SET button to get focus, the whole camera it crashes: black screen and nothing there. I think everything it's OK in the menu, but I really didn't spent too much time with this one.

Will try more tomorrow.

Saludos!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 08 / June / 2011, 04:06:28
Quote
1- Efective Focal Lenght in OSD doesn't fit the lens specifications. With scale factor 100 it goes from 28 mm to 304 or so (I don't remember the exact value), using scale factor 115 it goes from 32 mm to 391 mm. I couldn't get a numer that fits the lens specifications.
I haven't noticed that, will look into it.

Quote
2- When recording video and pressing the SET button to get focus, the whole camera it crashes: black screen and nothing there. I think everything it's OK in the menu, but I really didn't spent too much time with this one.
I noticed that too. The problem only occurs when you press set af and then try to zoom. The same problem has BerndtR in the IXUS1000 port (romlog ComputerZoom assert).

Another similar crash happens when you try to use the manual focus during video recording and apply fast_zoom. The reason why this is happening is because the fast_zoom key isn't diasabled in alt mode. All ports until this one had physw_status up to physw_status[2], this camera look like has up to physw_status[5] and the value in physw_status[3] changes when using fast_zoom. I tried to fix that without success for now.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 08 / June / 2011, 07:07:00
Quote
1- Efective Focal Lenght in OSD doesn't fit the lens specifications. With scale factor 100 it goes from 28 mm to 304 or so (I don't remember the exact value), using scale factor 115 it goes from 32 mm to 391 mm. I couldn't get a numer that fits the lens specifications.

Ok I found out it was a wrong value in fl_tbl[]

Code: [Select]
static const struct {
int zp, fl;
} fl_tbl[] = {
  {   0,   5000},
  {  16,   6800},
  {  32,   9100},
  {  62,  16200},
  {  78,  22300},
  { 102,  35900},
  { 125,  70000},
};

changed 125 from 60000 to 70000 and now goes up to 396mm.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: philmoz on 08 / June / 2011, 07:26:12
Quote
1- Efective Focal Lenght in OSD doesn't fit the lens specifications. With scale factor 100 it goes from 28 mm to 304 or so (I don't remember the exact value), using scale factor 115 it goes from 32 mm to 391 mm. I couldn't get a numer that fits the lens specifications.

Can you tell me how did you display that values in OSD?

OSD Parameters
  Miscellaneous Values
    Show Zoom - On
    Show Zoom value as - EFL
   Adapter Lens Scale = 100

You need to implement the get_effective_focal_length function to match the actual lens FL to the 35mm equivalent FL.

Phil.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 08 / June / 2011, 08:07:47
Thanks. I left the data from the SX210 because it has the same lenses. Now I also modified the CF_EFL from 5670 to 5600 and now the numbers look right, from 28-392mm. In sx210 was assumed that the focal length went from 27.3-392mm. I hope the numbers are right now.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 08 / June / 2011, 15:29:38
Another similar crash happens when you try to use the manual focus during video recording and apply fast_zoom. The reason why this is happening is because the fast_zoom key isn't diasabled in alt mode. All ports until this one had physw_status up to physw_status[2], this camera look like has up to physw_status[5] and the value in physw_status[3] changes when using fast_zoom. I tried to fix that without success for now.
i hope to use the focus while recording video, it gives more options to get a cinelike movie :)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 08 / June / 2011, 15:42:35
I tried the lua script from this topic http://chdk.setepontos.com/index.php?topic=5295.45  (http://chdk.setepontos.com/index.php?topic=5295.45) and looks like it's working. The Av, Tv and Sv can be set in video. I needed to remove two lines autoexp() and manualexp() because on this camera we can set the exposure before starting the recording and this locks the continuous AE. This is an experimental script and needs chdk to be compiled with native calls enabled.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 08 / June / 2011, 15:52:16
Quote
i hope to use the focus while recording video, it gives more options to get a cinelike movie

You can do it if you really want but you must be careful with the zoom leveler.

Follow this steps
- Go to video mode
- set to manual focus
- go into alt menu
- start recording (not needed for testing)
- now with the right button set the factor
- use zoom leveler to adjust focus. here you must be careful to use only slow zoom or it crashes
- to change zoom go out from alt menu and use zoom
- go back into alt menu and use manual focus.

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Nexany on 09 / June / 2011, 03:37:27
could anybody upload a test video how the manual focus works in videos of Canon SX 220HS?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 09 / June / 2011, 06:13:50
Great news, I found a way to solve the AF Scan crash. I used DoAFLock() instead of MakeAFScan(). I was experimenting with UnlockAF after MakeAFScan to see what happens and tried also DoAFLock and found it. Look like it has the same functionality and doesn't crash when zooming.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 09 / June / 2011, 11:09:33
Quote
i hope to use the focus while recording video, it gives more options to get a cinelike movie

You can do it if you really want but you must be careful with the zoom leveler.

Follow this steps
- Go to video mode
- set to manual focus
- go into alt menu
- start recording (not needed for testing)
- now with the right button set the factor
- use zoom leveler to adjust focus. here you must be careful to use only slow zoom or it crashes
- to change zoom go out from alt menu and use zoom
- go back into alt menu and use manual focus.


i tested again step by step but it works only at beginning. It focuses an half second then focus function finish to work. :(
I think it would be easier if the focus function was perfomed through the rotating wheel
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 09 / June / 2011, 11:43:05
Good idea. Will try to do that to see if I can do it.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: darnex on 09 / June / 2011, 12:15:13
could anybody upload a test video how the manual focus works in videos of Canon SX 220HS?

http://www.youtube.com/watch?v=GQ0304xe5qA# (http://www.youtube.com/watch?v=GQ0304xe5qA#)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Mato34 on 09 / June / 2011, 14:12:43
Uh???

Using the ExMem version the JPG saved is about 800 KB filesize, of obvious very low image quality, even being set Fine quality in the Function menu. That is saving RAW or not: loading CHDK I had an 800 KB JPG filesize, not loading CHDK I had a 2-3 MB one. Changed configuration parameters, checked here and there... Even overriding quality in the Alt Menu didn't work.

Finally I've found that using Normal version instead of ExMem version solves the problem without changing anything more: just changing DISKBOOT.BIN and PS.FI2 in the root directory and using same configuration parameters. Bad news are that using Normal version the camera crashes saving DNG and going to review mode...

Guess it might be something easy to fix.

Regarding video I checked again and my camera crashes just pressing the Set button to AF during video. Anyway I don't know too much about video and video configuration, so perhaps I'm doing something wrong.

Saludos!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 09 / June / 2011, 14:36:52
Ok, I uploaded the latest build. Needs testing.

Fixed:
-AF scan crash
-Dark frame substraction is working now

Added:
- Enable/Disable ND filter

Binary http://www.zshare.net/download/9121412092c856a0/ (http://www.zshare.net/download/9121412092c856a0/)
Source http://www.zshare.net/download/91214043e1d54546/ (http://www.zshare.net/download/91214043e1d54546/)


@Mato34 I didn't notice that. Thanks for pointing it out.

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 09 / June / 2011, 14:46:12
Quote
Using the ExMem version the JPG saved is about 800 KB filesize, of obvious very low image quality, even being set Fine quality in the Function menu. That is saving RAW or not: loading CHDK I had an 800 KB JPG filesize, not loading CHDK I had a 2-3 MB one. Changed configuration parameters, checked here and there... Even overriding quality in the Alt Menu didn't work.

Ok, I tested it now. As a workaround for now you can go to Extra Photo Operations and in the last line you have Quality Override, set it to super fine or normal.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 09 / June / 2011, 15:37:21
Good news. I lowered the allocated memory from 2 to 1MB and it fixes this issue with jpeg quality. Will upload it ASAP.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Mato34 on 09 / June / 2011, 15:41:17
Good news. I lowered the allocated memory from 2 to 1MB and it fixes this issue with jpeg quality. Will upload it ASAP.

Oh, this is a nice surprise. Just passing here before supper and found such progress :)

Thanks again funnel !!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 09 / June / 2011, 15:52:49
Ok, here it is. I decided to start naming the versions so it'll be easier to see whats going on.

Binary Beta1 http://www.zshare.net/download/91216695e2bce7ee/ (http://www.zshare.net/download/91216695e2bce7ee/)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 09 / June / 2011, 16:38:07
I did some more tests and it still doesn't want to override to superfine in the exmem build. It overrides ok to normal and fine but fails in superfine (sets it as fine).
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: roossd on 09 / June / 2011, 17:07:32
Stupid question: How do you start the SX220HS in ALT mode please?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 09 / June / 2011, 17:20:21
press DISP+SET or SET+DISP buttons
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 09 / June / 2011, 17:29:58
when i enter to ALT i press DISP+SET but when i quit i must press SET+DISP or Raw will be disabled by pressing DISP at first.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Nexany on 09 / June / 2011, 17:41:18
could anybody upload a test video how the manual focus works in videos of Canon SX 220HS?

http://www.youtube.com/watch?v=GQ0304xe5qA# (http://www.youtube.com/watch?v=GQ0304xe5qA#)
Thanks darnex!It looks really cool.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 09 / June / 2011, 18:31:07
Ok, I fixed it by allocating only 256kb in exmem and not loading chdk in exmem. 256Kb is still enough to prevent the crashes when switching to play mode. Quality overrides work now.

Beta 1.1 http://www.zshare.net/download/91221690e54c21d4/ (http://www.zshare.net/download/91221690e54c21d4/)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 11 / June / 2011, 11:50:29
Ok, here's a new build.

Fixed:
-ISO overrides (it's setting the real ISO so the numbers are a little different in exif)
-ISO bracketing
-AV bracketing (uses new function MoveIrisWithAV() like g12)
-bracketing in custom timer mode
-crash using manual focus (now fast_zoom is disabled in ALT mode). Calculation error of feather bits.
-the menu started to show small icons

Know issues:
-AV overrides not working anymore
-Edge overlay and zebra are shifted and distorted on Y axis.
-AF scan sometimes still crashes only when in manual focus mode

Needs more testing.

Binary beta2 http://www.zshare.net/download/91291198d389a3ab/ (http://www.zshare.net/download/91291198d389a3ab/)

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 11 / June / 2011, 17:27:58
thanks Funnel, i am testing hard the new beta
i don't understand why sometime the bad pixel remover doesn't work (raw and jpg) when i use long exposure
also i don't understand why in the raw pictures there are some green and purlple bad pixels altought the bad pixel remover worked.
i used the option "Raw" remover option, and i created the badpixel file with the lens covered.

(https://chdk.setepontos.com/proxy.php?request=http%3A%2F%2Fimg146.imageshack.us%2Fimg146%2F4797%2Fcanonsx220rawbadpixels.jpg&hash=aab204256e280947e507a7c2cfbaec87)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 11 / June / 2011, 17:42:52
Badpixel and Dark frame substraction are two different thigs. For long exposures you must turn on dark frame substraction. DFS takes place automatically in the original firmware when exposures are longer than 1.3 seconds, you see this when the "Busy" appears after the shoot.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 11 / June / 2011, 18:45:29
thanks, i turned the DFS to "on" (it was auto) and now works, no more green pixels in raw shots.

i also noticed that if i set iso800 the picture is shot at iso800 even with overrides enbaled at lower iso (iso60)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: marcobolten on 11 / June / 2011, 19:05:32
After following this thread since page one or two ;-) I finally bought the camera (Firmware 101A) and installed CHDK today.

Great work, funnel, thank you loads for all the efforts you put into this port! Testing of the beta1.1 (will update tomorrow) I have a problem with the menu always being "washed away" by all-too active screen activity of the cam. Is there a way to put chdk "always on top"? This maybe a noob question, I'm sorry... This said, chdk is usable, of course, you can just move up&down in the menu to let it be displayed again long enough to know where you're at.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: reyalp on 11 / June / 2011, 20:08:21
Great work, funnel, thank you loads for all the efforts you put into this port! Testing of the beta1.1 (will update tomorrow) I have a problem with the menu always being "washed away" by all-too active screen activity of the cam.
This is unfortunately normal for CHDK in general.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 12 / June / 2011, 05:36:51
Found a bug, ISO override works only in AUTOISO mode. When in manual iso mode and shutter half pressed I see that the PROPCASE_ISO_MODE gets set to 0 but looks like this doesn't change the iso to auto mode.

@onesky
ISO is getting set ok, you probably forgot to input the factor value.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 12 / June / 2011, 06:24:57
Did some tests and found out that PROPCASE_ISO_MODE 0 in manual mode just sets the iso to 100 and not to auto like it should.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 12 / June / 2011, 06:50:48
A new feature I found out a few days ago and forgot to share. I don't know, maybe this is a common behaviour in other cameras that I didn't found out yet. I found that the ND filter can be applied not once, but twice or more times with this trick:

- turn on ND filter
- go in video record mode
- press right so that the exposure adjust option appears
- now every half shutter press doubles the ND filter dimming

Now we can do long exposures in the middle of the day.  8)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 12 / June / 2011, 08:00:40
Found a bug, ISO override works only in AUTOISO mode. When in manual iso mode and shutter half pressed I see that the PROPCASE_ISO_MODE gets set to 0 but looks like this doesn't change the iso to auto mode.

@onesky
ISO is getting set ok, you probably forgot to input the factor value.
ISO was enabled (factor value 1), so i think it was because iso was set to 800 instead of "auto"
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: uneu on 13 / June / 2011, 04:24:14
Hi

first of all, thanks for porting  :)
I am using beta2 on 220 and took some raw files, but I cannot open them. I tried all those standard progs like ufraw etc even picasa, none can read them. could anyone please give any hint, much appreciated!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 13 / June / 2011, 04:36:29
Use DNG. I haven't found a program that opens the CRW files normally yet.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: uneu on 13 / June / 2011, 05:12:17
thank you
had at first trouble with the badpixel file but then it worked, fantastic dng files, very happy
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: reyalp on 13 / June / 2011, 12:53:44
Use DNG. I haven't found a program that opens the CRW files normally yet.
See http://chdk.wikia.com/wiki/Raw (http://chdk.wikia.com/wiki/Raw)

You should not expect third party programs to understand CHDK raw from a new port.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 13 / June / 2011, 16:07:25
I uploaded a new build beta3.

Fixed:
-raw develop, raw sum, raw average
-AV overrides
-corrected some errors in the stubs

I hope everything works. Test and report if you spot any strange behaviour.

Binary beta3 http://www.zshare.net/download/91399977e99766c5/ (http://www.zshare.net/download/91399977e99766c5/)

Source beta3 http://www.zshare.net/download/914000770ea91d6a/ (http://www.zshare.net/download/914000770ea91d6a/)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Mato34 on 15 / June / 2011, 04:49:01
Wow!! Nice progress, funnel. Although I was quite satisfied with the beta 1.1, as I was mainly interested in Raw and little else (well, that effective focal length ;) ).

I'd give a try to that beta 3, but these days I've used the camera a little and from Raw files this sensor it's quite good. Just to give you an idea, noise at ISO 800 and dynamic range at base ISO it's about the same than Canon S95 and better than Olympus XZ-1. Obviously these are different cameras (those fast lenses...), but I was very impressed.

I have nothing else significant to tell though... :( But what a heck of sensor...

Saludos!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 15 / June / 2011, 18:47:55
A new beta build is availabe for testing.

Fixed:
-Edge overlay and Zebra
-corrected a small error in stubs_min.S and the UI feels a little faster now

That's it, everything should work now, I hope.  8)

Binary beta4 http://www.zshare.net/download/9149166255d0474a/ (http://www.zshare.net/download/9149166255d0474a/)
Source beta4 http://www.zshare.net/download/914923100574705b/ (http://www.zshare.net/download/914923100574705b/)
 

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 16 / June / 2011, 15:26:57
A new beta build is availabe for testing.

Fixed:
-Edge overlay and Zebra
-corrected a small error in stubs_min.S and the UI feels a little faster now

That's it, everything should work now, I hope.  8)

Binary beta4 http://www.zshare.net/download/9149166255d0474a/ (http://www.zshare.net/download/9149166255d0474a/)
Source beta4 http://www.zshare.net/download/914923100574705b/ (http://www.zshare.net/download/914923100574705b/)
 



great funnel! thanks :)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 16 / June / 2011, 17:24:54
I found a solution for the booting of bigger cards with two partitions.

This small modification fixed the problem  :)
Code: [Select]
           //      "LDRB    R12, [R4,#0x1FE]\n"
           //      "LDRB    R4, [R4,#0x1FF]\n"
                 "LDRB    R12, [LR,#0x1FE]\n"           // + First MBR signature byte (0x55), LR is original offset.
                 "LDRB    LR, [LR,#0x1FF]\n"            // + Last MBR signature byte (0xAA), LR is original offset.
  "BNE     loc_FF06A370\n"
                 "CMP     R1, R0\n"
                 "BCC     loc_FF06A370\n"
                 "ADD     R3, R0, R2\n"
                 "CMP     R3, R1\n"
                 "CMPLS   R12, #0x55\n"
                 "CMPEQ   LR, #0xAA\n"  // + R4 to LR  <------------------here


Title: Re: PowerShot SX220 HS - Porting Thread
Post by: gr0don on 16 / June / 2011, 17:37:00
Its nice to see the firmware progressing :) - I'll probably look at picking one of the cameras up soon.

Sorry if this is a stupid question but can I ask if the time limits on HD video recording have been removed yet ? I've had a look through the thread but I can't see anything about it.

Cheers,

Gordon
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 16 / June / 2011, 18:02:17
@gr0don
No, not yet. I hope it can be done at least for slow motion recording.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 17 / June / 2011, 07:54:16
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: philmoz on 17 / June / 2011, 08:28:31
Quote
There's another bug we have to solve.

The crash occurs in the opendir function. It crashes everytime when we have jpgs on memory card and connecting usb to run PTP.

The code throws the assert in this 2 places

Sometimes the task is Fsionotify, PhySw or PTP CtrlTask

Looks like you've run out of memory in the Canon heap.
sub_FF02B844 is the AllocateUncacheableMemory function which calls malloc to get some memory then sets the 'uncached' bit on the return address.
The assert is happening because AllocateUncacheableMemory is returning 0 which means that malloc failed.

If you are using a recent code trunk and have found the GetMemInfo address you can use this to get useful stats on the Canon heap memory. From recent posts you are loading CHDK in the Canon heap; but using EXMEM for the CHDK heap. Since CHDK itself is stealing memory from the firmware there may not be enough left, or there could be a memory leak somewhere.

When the camera starts up it uses memory for each JPEG image on the card (presumably for the playback mode). This is probably why it works when the card is empty; but not when the are images. The PTP code also allocates memory; but it should be using the CHDK heap.

Phil.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 17 / June / 2011, 09:56:21
Thanks Phil, that helped. I think I solved it now.

What I did:
-went up with exmem memory to 640kb
-chdk in exmem
-DNG continuous shooting didn't work anymore
-moved capt_seq_hoo_raw_here line in the same place as g12 and sx30 which previously didn't work
-everything works
-UI is now fast and responsive even with chdk in exmem
 8)
Still to do some more tests but looks very stable to me.

Just another thing I noticed, in chdkptp crashes just in the folder browser. Looks like it's sending some unrecognised command or something similar. The romlog was empty.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: almirante on 18 / June / 2011, 03:11:35
New to SX220HS type camera. Used a SX1 with CHDK for a long time. Really hooked on CHDK. Marvellous to find this port going on, so downloaded it, but can I make it work? You'd think? Wouldn't you? In past with SX1 I used SDMINSTE.EXE to create a two-partition SD for specific CHDK use. I make it bootable, and put the CHDK in the 2nd (large-for photos) partition. I lock the SD. I put it in the SX1, CHDK auto-boots, and off I go. Seeeemples! With SX220HS no such luck, because the above config causes the SX220HS to think the memory card is bad. If I reformat in the SX220HS I will lose the CHDK, and the two partitions. There are CHDK options for partitions and making-bootable of course, but I can't get to those if I don't have CHDK loaded first. CONFUSED.COM.  In plain wording, how do I make up the SD to work like it did for the SX1?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 18 / June / 2011, 03:25:39
@almirante
The autoboot feature didn't work until now and I haven't uploaded the working version yet. I have to do some more tests to confirm that everything is ok and upload it later.
You can start it with the firmware update method.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 18 / June / 2011, 12:06:00
i wonder if someone have set up a sx220 lens correction profile for photoshop :)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 18 / June / 2011, 15:42:25
I uploaded the new build that fixes some issues

Fixed:
-autoboot memory card error
-shifted zebra. I missed that in the last build
-crash when connecting PTP
-implemented the JogDialTask(), now the jogdial is finally disabled in ALT mode


The problem with the Jogdial task I had was because of this line in IDA, just to let know if anyone encounters a similar problem.
Code: [Select]
LDR     R7, asc_FF0569E4 ; "L%" //just =0xFF0569E4 didn't work
needed to change to
 LDR     R7, =0x25BC ;


Binary beta5 http://www.zshare.net/download/916009936ad5fd16/ (http://www.zshare.net/download/916009936ad5fd16/)

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 19 / June / 2011, 09:22:47
Funnel, thanks for all your hard work! The last build is working great. I don't know to what you mean by the jogdial problem, but sometimes when I'm in the CHDK menu and slightly touch the jogdial the menu disappears (partly or completely).

BTW, does the quality override work?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 19 / June / 2011, 12:24:32
The quality override for jpgs should work, and the video quality override is working too.

In the previous releases the jogdial was enabled in ALT menu and at the same time active in the original canon menu. Same thing happens now in alt mode when pressing soft left and the onscreen canon menu appears. I will fix that in the next build.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 19 / June / 2011, 15:20:53
Few problems I encountered:

1) The autoiso override doesn't work in program mode, but it does in auto. Is this normal?

2) When the device is off the play button normally doesn't act like an on/off switch. With your last chdk build it does. You can not look back at pictures without switching it completly on first. The standard firmware allows you to view photos without extracting the lens when you press the play button a few seconds.

3) I don't think quality override works, the filesize (fine versus super fine) is practicaly the same.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 19 / June / 2011, 16:17:21
Quote
1) The autoiso override doesn't work in program mode, but it does in auto. Is this normal?
If you set the ISO to AUTOISO should work.

Quote
2) When the device is off the play button normally doesn't act like an on/off switch. With your last chdk build it does. You can not look back at pictures without switching it completly on first. The standard firmware allows you to view photos without extracting the lens when you press the play button a few seconds.
If you press the play button an hold it some time it should go just in play mode or use the firmware update method to start chdk.

Quote
3) I don't think quality override works, the filesize (fine versus super fine) is practicaly the same.
Yes, I think you're right, I wasn't sure about that when I tested that. I could try to allocate just a little less memory to see what will happen.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 19 / June / 2011, 17:17:04
Quote
1) The autoiso override doesn't work in program mode, but it does in auto. Is this normal?
If you set the ISO to AUTOISO should work.

Quote
2) When the device is off the play button normally doesn't act like an on/off switch. With your last chdk build it does. You can not look back at pictures without switching it completly on first. The standard firmware allows you to view photos without extracting the lens when you press the play button a few seconds.
If you press the play button an hold it some time it should go just in play mode or use the firmware update method to start chdk.

Quote
3) I don't think quality override works, the filesize (fine versus super fine) is practicaly the same.
Yes, I think you're right, I wasn't sure about that when I tested that. I could try to allocate just a little less memory to see what will happen.

1) it usually works but not always.
2) my sx220 does not act the way it should. When I press the play button it turns on as it does when I press the on/off button. Sometimes the screen stays black, but the lens pops out.
3) nice! I look forward to the new build.

My Canon boots with chdk, could that be the problem?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: philmoz on 19 / June / 2011, 18:44:02
If you press the play button an hold it some time it should go just in play mode or use the firmware update method to start chdk.

The standard for CHDK is to start in playback mode unless the on/off button is held on while starting up. It's tempting to reverse this so you get the instant start in record mode; but most other ports don't do this.

If the camera has a seperate playback button that can start the camera then this button should always start the camera in playback mode even if held down (to avoid confusing users).

This is handled in the startup code in boot.c

Phil.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 20 / June / 2011, 04:03:20
Thanks, I didn't know that. I just copied the code and didn't even think about that. I modified the statement in boot.c and now goes in rec mode only when holding the on/off button.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 20 / June / 2011, 04:51:00
Wow, yesterday I shot some photos in DNG. Fantastic! I did have to correct the lens distortion but the quality of the pic is so much better than the original JPEG. Really love your work Funnel!

How is it possible that the DNG covers a bigger area of the object I photographed than the original JPEG? The resolution is the same.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 20 / June / 2011, 05:42:53
We have a little bigger resolution in DNGs (4072x3036). In photoshop I had to apply an amount of 90 for distortion and 129 scale when shooting at wide angle to correct it.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 20 / June / 2011, 06:58:15
Quote
Quote
1) The autoiso override doesn't work in program mode, but it does in auto. Is this normal?
If you set the ISO to AUTOISO should work.
1) it usually works but not always.

I tried several times and the AUTOISO always worked perfectly. What camera version do you have?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 20 / June / 2011, 08:10:55
The 1.00. This morning I tried autoiso with a SD card without pictures and it worked like a charm. I don't know why it stopped working last time.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 21 / June / 2011, 18:46:42
I don't know how to solve this problem with quality override to superfine. I tried to lower the allocated exmem memory and didn't make any difference. I watched the quality propcase and it gets set but doesn't work.

Here's some memory data I get but I don't see anything wrong here

Code: [Select]
> !return chdku.execwait('return get_meminfo()')
=true,{
 start_address=127185040,   //0x794B090
 chdk_start=126904288, //0x79067E0
 free_size=86984, // 0x153C8
 chdk_size=280752, // 0x448B0
 allocated_size=623368, // 0x98308
 total_size=243536, // 0x3B750
 name="exmem",
 end_address=127428576, //0x79867E0
 chdk_malloc=true,
 free_block_max_size=85528, // 0x14E18
 allocated_peak=704536, // 0xAC018
 free_block_count=8,

Code: [Select]
=================================================
 Name                 [Address]    , [Size]      
-------------------------------------------------
 EXMEM_RAMDISK        [0x479067C0] , [0x006F9840]
 EXMEM_COM            [0x478067C0] , [0x00100000]
 EXMEM_FORMATTER      [0x00000000] , [0x00000000]
 EXMEM_SHADING        [0x00000000] , [0x00000000]
 EXMEM_FAMODE         [0x00000000] , [0x00000000]
 EXMEM_FIRMUP         [0x00000000] , [0x00000000]
 EXMEM_FIRMUP_VRAM    [0x00000000] , [0x00000000]
 EXMEM_FIRMUP_INFLATE [0x00000000] , [0x00000000]
 EXMEM_DVLPWORK       [0x00000000] , [0x00000000]
 EXMEM_EVF            [0x00000000] , [0x00000000]
 EXMEM_SCRIPT         [0x00000000] , [0x00000000]
 EXMEM_GPS            [0x00000000] , [0x00000000]
 EXMEM_FILESTORE      [0x4338D500] , [0x044792C0]
 EXMEM_MOVIE_REC      [0x00000000] , [0x00000000]
 EXMEM_MOVIE_PLY      [0x00000000] , [0x00000000]
 EXMEM_WIDE           [0x00000000] , [0x00000000]
 EXMEM_NARROW         [0x00000000] , [0x00000000]
 EXMEM_SUPER_NARROW   [0x00000000] , [0x00000000]
 EXMEM_CRAW_REC       [0x00000000] , [0x00000000]
 EXMEM_PCEVF          [0x00000000] , [0x00000000]
=================================================
Code: [Select]
#PLATFORMID=0x322C
PLATFORMID=12844

PLATFORMOS=dryos

MEMBASEADDR=0x1900
RESTARTSTART=0x50000

ifdef OPT_CHDK_IN_EXMEM
MEMISOSTART=0x79067E0  # MAXRAMADDR+1 - EXMEM_HEAP_SKIP - EXMEM_BUFFER_SIZE - 32(0x20) (exmem allocates 64 bytes extra, 32 before and 32 after block allocated)
else #265kb=79467E0, 512kb=79067E0, 640kb=78E67E0
MEMISOSTART=0x186AE4   # original non-exmem value
endif

ROMBASEADDR=0xFF000000

MAXRAMADDR=0x7FFFFFF
EXMEM_BUFFER_SIZE=0x80000  # 40000=256KB, 80000=512KB, A0000=640kb, C0000=768KB, 100000=1MB
EXMEM_HEAP_SKIP=0x679800

PLFLAGS=-DMEMBASEADDR=$(MEMBASEADDR) -DMEMISOSTART=$(MEMISOSTART) -DMEMISOSIZE=$(MEMISOSIZE)
PLFLAGS+=-DRESTARTSTART=$(RESTARTSTART)

NEED_ENCODED_DISKBOOT=6
KEYSYS=d4c

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Mato34 on 21 / June / 2011, 19:36:26
Regarding quality override and the lack of superfine since time ago, I think it's due to the fact that actual megapixel race implied some cost.

I mean, we have better resolution with the 12 MP of the SX220 than with the 5 MP of the A610, OK. Anyway those 5 MP were "plenty of quality" in front these 12 MP, more plenty of noise reduction, some lens blur, and noise itself.

So lowering the compression may turn in bigger files, but once you reach the level of noise, noise reduction, and lens blur, you don't get more quality.

Only my 2 cents.

Saludos!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 22 / June / 2011, 07:57:01
Regarding quality override and the lack of superfine since time ago, I think it's due to the fact that actual megapixel race implied some cost.

I mean, we have better resolution with the 12 MP of the SX220 than with the 5 MP of the A610, OK. Anyway those 5 MP were "plenty of quality" in front these 12 MP, more plenty of noise reduction, some lens blur, and noise itself.

So lowering the compression may turn in bigger files, but once you reach the level of noise, noise reduction, and lens blur, you don't get more quality.

Only my 2 cents.

Saludos!

So you think there's no advantage of a "super fine"  mode? That it wouldn't improve the quality of the photos?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: philmoz on 22 / June / 2011, 08:09:25
So you think there's no advantage of a "super fine"  mode? That it wouldn't improve the quality of the photos?

In my testing Canon's fine mode is indistinguishable from superfine under normal viewing conditions.
CHDK allows you to process a single RAW image multiple times in the camera with different settings.
I used this feature to compare fine and super-fine versions of the same image on the SX30 - you can see the results here - http://forums.dpreview.com/forums/read.asp?forum=1010&message=37238416 (http://forums.dpreview.com/forums/read.asp?forum=1010&message=37238416)

Phil.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 22 / June / 2011, 11:13:20
Here's the new version that fixes the non standard CHDK start button issue. Now you have to hold on/off button to go directly into record mode.

Binary beta6 http://www.zshare.net/download/91745601f06b97bd/ (http://www.zshare.net/download/91745601f06b97bd/)


There's one issue that is still present. When shooting in normal continuous mode in raw DNG mode sometimes hangs when saving between the shoots. It never hangs in continuousAF though.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 22 / June / 2011, 11:55:02
Here's the new version that fixes the non standard CHDK start button issue. Now you have to hold on/off button to go directly into record mode.

Binary beta6 http://www.zshare.net/download/91745601f06b97bd/ (http://www.zshare.net/download/91745601f06b97bd/)


There's one issue that is still present. When shooting in normal continuous mode in raw DNG mode sometimes hangs when saving between the shoots. It never hangs in continuousAF though.

Thx Funnel! I will test it this evening.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Mato34 on 22 / June / 2011, 12:01:47
So you think there's no advantage of a "super fine"  mode? That it wouldn't improve the quality of the photos?

In my testing Canon's fine mode is indistinguishable from superfine under normal viewing conditions.
CHDK allows you to process a single RAW image multiple times in the camera with different settings.
I used this feature to compare fine and super-fine versions of the same image on the SX30 - you can see the results here - http://forums.dpreview.com/forums/read.asp?forum=1010&message=37238416 (http://forums.dpreview.com/forums/read.asp?forum=1010&message=37238416)

Phil.


Well, Phil gave us the solution :) (thanks Phil)

I don't know if we will see any difference because I don't know the ratio compression/quality of the Fine mode, but I meant that probably it would be justified the lack of SuperFine setting from Canon these last years.

Several years ago, with 5-6 MP at base ISO we had low noise, that allowed smooth gradation and no noise reduction that smudges fine detail like grass or hair; also the lens were capable of resolving the sensor's resolution, and no distortion was corrected in-camera by soft.

Now we have 12 or more MP, and at base ISO we have noise (evident noise I'd say...). Some kind of noise reduction is a must, and this kills smooth gradation and smudges fine detail like grass or hair; also the lens perhaps can't resolve the sensor's resolution as before, and in fact with actual wide angle in pocket size geometrical distortion has to be corrected in camera (stretching the RAW image).

At the end we don't have the same level of "per pixel" quality, and so we don't need a setting that preserves quality as before. And I think Phil's test is a good one to proof this.


So I don't think that SuperFine override would be as important as other things are. But also I don't want to desencourage funnel in working at this (thanks again) :)

Saludos!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 22 / June / 2011, 12:29:53
That made me think and I made a simple experiment. I took a picture, corrected the lens distortion and cropped the final image. It comes out it's actually just an 8MP (3330x2340) image. That's just for the widest angle (5mm).
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: HellFire90 on 22 / June / 2011, 13:24:02
hi, i'm newbie of using modified firmware. My SX220 runs  GM 1.01A Firmware, can i run this porting?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 22 / June / 2011, 13:33:13
hi, i'm newbie of using modified firmware. My SX220 runs  GM 1.01A Firmware, can i run this porting?

Yeah, why not?

@ Funnel: The on/off and play button are working like they should.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 22 / June / 2011, 13:40:29
Here's the new version that fixes the non standard CHDK start button issue. Now you have to hold on/off button to go directly into record mode.

Binary beta6 http://www.zshare.net/download/91745601f06b97bd/ (http://www.zshare.net/download/91745601f06b97bd/)


There's one issue that is still present. When shooting in normal continuous mode in raw DNG mode sometimes hangs when saving between the shoots. It never hangs in continuousAF though.
thanks funnel for you great work!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: HellFire90 on 22 / June / 2011, 13:49:04
sorry but... how can i install this on the SD card? i used cardtricks selecting the folder of the chdk modified firmware, then copied into the card (i selected autoboot) but it doesn't load on the camera..
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: waterwingz on 22 / June / 2011, 13:54:38
sorry but... how can i install this on the SD card?
http://chdk.wikia.com/wiki/CHDK_for_Dummies#Load_CHDK_onto_the_card (http://chdk.wikia.com/wiki/CHDK_for_Dummies#Load_CHDK_onto_the_card)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: HellFire90 on 22 / June / 2011, 14:01:37
i formatted the card, made it bootable and selected the zip file containing the firmware, locked the card and started the camera in play mode, but it doesn't load it..
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: whim on 22 / June / 2011, 14:47:00
@HellFire90

CardTricks assumes the zip is structured like the zips distributed by AutoBuild.
I just checked funnel's beta6 zip, and it contains multiple builds in subdirectories.
So, you will need to do some manual copying:

0) delete whatever is on your card (but do not reformat, or you'll lose the boot flag)
1) unpack the beta6 zip to a some directory on your hard disk (keep the dir structure)
2) open the "101A" directory and copy 'DISKBOOT.BIN' & 'PS.FIR' to the root of your card
3) copy the entire "CHDK" directory to your card as well

now lock card and retry.

let us know if that works,

wim

PS maybe even easier: check if there's a 101A dir on your card, then move contents to root of card ;)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 22 / June / 2011, 15:47:51
Any change we will get a CHDK build that corrects the lens distortion and scale automatic for DNG output? Or is that not possible?

Funnel, I really love your last build. It's working great on my SX220.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 22 / June / 2011, 18:17:14
Quote
Any change we will get a CHDK build that corrects the lens distortion and scale automatic for DNG output? Or is that not possible?
Probably never. The best thing we can do is to make a lens profile for photoshop. If someone is willing to do it the software with tutorials is located here http://labs.adobe.com/technologies/lensprofile_creator/ (http://labs.adobe.com/technologies/lensprofile_creator/)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 22 / June / 2011, 18:26:41
But older camera's do produce DNGs that are corrected and "the same" as the JPEGs right? Is this because of the fact that the SX220 uses a newer digic processor?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: philmoz on 22 / June / 2011, 18:40:21
But older camera's do produce DNGs that are corrected and "the same" as the JPEGs right? Is this because of the fact that the SX220 uses a newer digic processor?

Older cameras had less lens distortion. With the additional processing power now available in the cameras they can use cheaper lens designs with more distortion and correct it in the camera software. The average user can't tell the difference since they never see the 'RAW' image.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 22 / June / 2011, 18:59:36
I think I get it. So my old Ixus 80 apparently produces a DNG that is practically is the same (it's hard to see the difference) as the JPEG because the distortion is close to zero.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: reyalp on 22 / June / 2011, 23:09:54
I think I get it. So my old Ixus 80 apparently produces a DNG that is practically is the same (it's hard to see the difference) as the JPEG because the distortion is close to zero.
Exactly. The faster DSP gets, the less "raw" looks like a usable image. The raw (including the image data portion of the DNG) is always whatever the sensor spat out, that part doesn't change. Because it's the same data that canon used to generate the jpeg, you can always do the same thing on the PC in theory.

DNG 1.3 does have some opcodes for geometric corrections, it's possible that these could be used to inform image processing programs what needs to be done. I don't know how widely support these are, or whether they are sufficient to correct the distortion in these cameras. Might be worth investigation.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Bonanza on 23 / June / 2011, 08:09:49
Funnel:
Just want to thank you for your work on this port.
I am really thankful.
Have just tested Ultra Intervalometer and it works good.

/Micke in Sweden
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: ratz1967 on 23 / June / 2011, 22:59:39
If it goes to intervalometer scripts for timelapse  video purposes:
In scenery mode ("miniature mode" selected) there i the possibility to change the fps to 4,8fps (5x) 2,4fps (10x) and 1,2fps (20x). The problem is: These timelapse videos have the typical miniature mode touch(overcontrasted and blurred on the top and bottom). Is there the slight possibility that this function can be used in normal video mode?
Would be great and makes the intervalometer obsolete for the most users. Its a nice to have, wich can be tended to when CHDK is nearly finished for this cam.


In an earlier post someone has asked for superfine mode because of the noise in the pictures:
Try some trick from ancient times of Powershot 600 (640x480pixel with a camera in the format of a lunchbox):

The noise is nearly all in the blue part of the picture.
divide the picture in your graphic program in RGB(K) (4 pictures) and give oooonly the blue channel-picture the slightest touch of gaussian unsharpness and pack them back together.
Most, if not all of the noise will vanish with no visible unsharpness in the whole picture...
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: mark0326 on 24 / June / 2011, 06:02:45
Great work being done here, many thanks.
Had this camera a week & still getting to grips with CHDK, mainly want it for time-lapse suspended from a kite... is it possible to have the LCD go blank after script starts working to save precious power?
Cheers.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 24 / June / 2011, 08:57:32
I tried some scripts that turn the lcd off without success. Some cameras use the DISP button to turn the screen off and the scripts just emulate the press disp button. You can also turn the backlight off in ubasic by using the "set_backlight 0" but as soon as the shoot is taken it turns the backlight back on. You can check the scripts section maybe you find something I missed.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: marcobolten on 24 / June / 2011, 18:24:53
Hi, I am really happy with the beta5! There's one little thing I noticed, though: I sometimes like to play around in the games section - and the color tables of the games would need some correction to make them playable. It's no "must have", of course :-)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 25 / June / 2011, 04:48:19
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 25 / June / 2011, 08:52:11
I uploaded a new version.

Fixed:
-raw files saving in folder with jpgs now is working for both mothly and daily folder naming
-a workaround for grids. They're centered now and only 4:3 and stay the same in all modes. I solved it by shifting every x1 and x2 60 pixels to the right.
Code: [Select]
#define ASPECT_GRID_XCORRECTION(x)  ( (((x)<<3)/8)+60  )-made a new CAM_BITMAP_PALETTE 9 that corrects some color defines.
-corrected the games colors.

Binary beta7 http://www.zshare.net/download/91870000e59934f3/ (http://www.zshare.net/download/91870000e59934f3/)

Source beta7 http://www.zshare.net/download/91913003c7fea79c/ (http://www.zshare.net/download/91913003c7fea79c/[/url)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: philmoz on 25 / June / 2011, 09:20:43
Code: [Select]
#define ASPECT_GRID_XCORRECTION(x)  ( (((x)<<3)/8)+60  )

(((x)<<3)/8) == (x)

Phil.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 25 / June / 2011, 09:58:27
Code: [Select]
(((x)<<3)/8) == (x)Thanks, I just left what was in the other port. I'll change it to avoid the unneeded calculations.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: whim on 25 / June / 2011, 10:01:10
@funnel

Spotted an error in Makefile: you appear to support 2 separate firmwares (as in: platform/sub has
separate dirs for 100a and 101a) but still have "cp" lines in Makefile for sx220.
IMHO you can just remove lines 477-480.

BTW, I have beefed up Makefile syntax checking in CHDK-Shell 3.28, instead of silently crashing
it will now at least report the first offending line in cases like this.

cheers,

wim

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 25 / June / 2011, 10:17:53
Thanks. I couldn't figure out why it was crashing.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 26 / June / 2011, 17:10:54
@funnel

I just registered in order to say: Thank you very much! Your great work is highly appreciated.

CHDK works great for me. In particular, fine detail (grass, trees) comes out much better in DNG mode.

Also the histo and the zebra are really nice.

The only thing, I am not entirely happy with is the video mode of the camera. There is too much noise reduction (destruction of fine details). I am wondering whether it is possible to increase the video quality.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 26 / June / 2011, 18:25:53
You can try the video quality override. I don't see much difference when using it though, just a bigger file. If you want I can send you a build with native calls enabled if you want to play with changing the iso, shutter speed and aperture in video mode with a lua script.

Most of the time I just use the original 720p mode and I like it.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 27 / June / 2011, 00:34:47
I think the bitrate is just fine. The noise reduction seems to be the problem. I do not know, however, whether it is possible to control this via CHDK.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 27 / June / 2011, 03:33:15
You can also try to bump up the sharpness in custom colors to see if it makes any difference.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Mato34 on 27 / June / 2011, 04:54:20
I think the bitrate is just fine. The noise reduction seems to be the problem. I do not know, however, whether it is possible to control this via CHDK.

That noise reduction must be applied in the processing of the image, it isn't like long exposure noise reduction ("black frame"). I don't imagine an easy way through CHDK to skip that part of the image processing (but I don't know the inners of CHDK and the camera itself...).

As funnel said increasing sharpness should help, and I think increasing bitrate should help too (at least it won't hurt ;) ).

Saludos!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Bernd R on 27 / June / 2011, 07:08:15
Great news, I found a way to solve the AF Scan crash. I used DoAFLock() instead of MakeAFScan(). I was experimenting with UnlockAF after MakeAFScan to see what happens and tried also DoAFLock and found it. Look like it has the same functionality and doesn't crash when zooming.

thanks for notify me in the Ixus 1000 thread.I get no notify about that, so i only today take a look whats new.

and its a really great new.
Your fix work on Ixus 1000 too great, i get no crash.

I dont know, if chdk change to use the new command or should the address for makeafscan set to DoAFLock to work with newest chdk source ?

thats the code i test.

void other_kbd_process(){
 int key;
#if CAM_AF_SCAN_DURING_VIDEO_RECORD

 if (movie_status==VIDEO_RECORD_IN_PROGRESS) {
  if (kbd_is_key_clicked(conf.video_af_key)) DoAFLock();
 }

#endif

its great to have refocus button working, because without button focus adjust is very slow.
last thing i miss is change exposure during record.
have you done some tesst, or better idea ?

I get the idea to try out a brute force method during video record.in the keyboard task loop, i try to set always the  EV value.maybe that help ?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Bernd R on 27 / June / 2011, 07:31:05
Code: [Select]
(((x)<<3)/8) == (x)Thanks, I just left what was in the other port. I'll change it to avoid the unneeded calculations.

I test this line, it do not work here

#define ASPECT_GRID_XCORRECTION(x)  (((x)<<3)/8) == (x)

But this line

#define ASPECT_GRID_XCORRECTION(x)  ( (((x)<<3)/8)+60  )

work ok
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 27 / June / 2011, 09:00:06
You probably misunderstood what he ment. If you bitwise left shift by 3 it is equal to multiplying by 8. So x*8/8 is just x.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 30 / June / 2011, 02:44:56
Overall, I'm pretty happy with the cam now.

The RAW mode makes it possible to produce images that almost have DSLR-like quality (lot's of post-processing required of course): http://www.abload.de/img/crw_0131-bearbeitet2dugr.jpg (http://www.abload.de/img/crw_0131-bearbeitet2dugr.jpg)

My biggest gripe is the video mode. Due to the awkward 23.976p framerate I get horrible stutter on my computer monitor and my Plasma TV cannot even play the movies. 30fps or 25fps would be so much better ...
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 30 / June / 2011, 10:48:56
stutter cannot be conseguence of 24fps but of specs of your computer

the difference between 24fps and 30 or 60fps is the almost absence of blur on subjects in action and the clearer scene while panning/zooming

24fps is the cinema movies frame rate that means the videos from your sx220 will have a cine-look rather than a home camcorder.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 30 / June / 2011, 12:21:59
I agree that the stutter will result from the specs of my computer. My computer is a watercooled 4 Ghz machine. I have VideoLan, SplashLite, media player home cinema, latest version of quicktime installed. My graphics card is a relatively fast ATI Radeon. My monitor is a 26 inch NEC 2690 WUXI.

I feel that my computer is fast enough but that the monitor (like almost any other computer monitor except for certain Eizo displays and maybe certain other brands) cannot play 23.976 fps without stuttering. The driver of my Radeon graphics adapter does not allow me to select 23.976p or 24p as the input frequency (only 60p can be selected).

Moreover, it seems that my Panasonic 50inch VT20 Plasma TV cannot independently play the .mov files. If I use my computer as the source, there is horrible stutter. My Radeon driver allows me to select 24p as the input frequency (but not 23p!).

Please let me know whether there is a reasonable solution to play 23.976 fps .movs. If not, this is a bad format.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 02 / July / 2011, 09:04:50
did you try conntecting the camera to your TV via HDMI to Mini Type C cable?
it works fine on mine
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 02 / July / 2011, 13:38:44
Thanks. I will try.

One more question: I like the battery indicator (showing the precentage). Do I have to adjust the voltage values in order to get proper percentage values or have they already been tweaked for the SX220?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 02 / July / 2011, 13:58:35
Thanks. I will try.

One more question: I like the battery indicator (showing the precentage). Do I have to adjust the voltage values in order to get proper percentage values or have they already been tweaked for the SX220?

I think the values are correct. When you reach 0% the camera shuts down.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: ratz1967 on 02 / July / 2011, 17:09:55
@Tiz,
If you want to try to play the videos over USB from the camera on your computer, you will surely have problems to view them properly. The bitrate is extremely high on the original video (up to over 33 Mbit).
If that is the problem, download the videos from your cam and try again. For me, VLC Mediaplayer (Videolan) works great and without stuttering.
I personally like the 23,976 fps much more than the 30fps from the sx200is. If you are using PAL on your TV, there is only one frame/sec added to the PAL specified 25 fps. On 30fps 5 frames were removed to meet PAL specs and that is really horrible.
I don't think that the monitor refresh rate has anything to do with your problems.
Not heard of such problems until now.

Try to convert the video into another container format like avi, mp4 or mkv. Most systems have problems with the mov container. You don't have to touch the h.264 video stream, only change the container.

The SDHC or SDXC Card can make problems too. For me, Sandisk Extreme 16G with 30 Mbit/sec works great ;)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 03 / July / 2011, 11:16:24
I did download the videos to my SSD and then played them on my computer. Horrible stutter. I also converted the .mov to a 30fps avi. Horrible stutter.

Then I played the unconverted .mov videos via my computer on my Plasma TV (connected via HDMI). Horrible stutter.

Then I connected the camera directly to my TV (via the AV cables that came with the camera). Initially, there was a different kind of stutter. I believe the Sandisk SD card was a bit too slow (and, maybe, the movie was not correctly buffered). Then I played it once again...and NO STUTTER at all! I am absolutely happy with 23.976p IF there is no stutter/judder or whatsoever.

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 03 / July / 2011, 13:35:42
i think it's a problem of your computer, as told stuttering has nothing to do with the frame rate.
By the way it's off topic here, try in the dpreview forum (canon section).
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 06 / July / 2011, 05:32:04
I decided to try to change the ALT menu button just to DISP and seems to be better than the combination disp+set. Now the tricky part is when you want to access an original canon function that requires the DISP button, you have to hold the DISP button (in My Custom Colors, Miniature Effect, ...).

Binary beta 8 http://www.zshare.net/download/92316167059c764b/ (http://www.zshare.net/download/92316167059c764b/)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 06 / July / 2011, 16:42:09
Mmmhhh..if this is the only change, I will stick with beta 7. I do not frequently need the CHDK menu because I already configured the settings. But I frequently need the DISP button. Therefore, it's probably more burdensome to frequently hold the DISP button (compared to rarely pressing DISP + SET)?

It seems to me that the distance indicator is indeed weird (as reported above). But I am not sure whether this has anything to do with CHDK.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 06 / July / 2011, 17:37:06
It seems to me that the distance indicator is indeed weird (as reported above). But I am not sure whether this has anything to do with CHDK.

I don't understand what you mean. Which distance indicator?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 06 / July / 2011, 17:55:27
I configured the camera in a way that the misc menu shows z (zoom?), sd (subject distance?), NL, FL, and HYP. When I focus on a subject, SD is not constant (i.e., if I focus again on the same subject there are significant variations).
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 06 / July / 2011, 18:46:04
For me jumps at .292 +/- .008 when auto refocusing. Sometimes fails at longer distances and jumps from 1.64 to 0.7 but rarely. I don't see anything wrong here.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 07 / July / 2011, 16:29:03
I decided to try to change the ALT menu button just to DISP and seems to be better than the combination disp+set. Now the tricky part is when you want to access an original canon function that requires the DISP button, you have to hold the DISP button (in My Custom Colors, Miniature Effect, ...).

I'm also curious... is this the only change?

I will stick with beta 7. I do not frequently need the CHDK menu because I already configured the settings. But I frequently need the DISP button. Therefore, it's probably more burdensome to frequently hold the DISP button (compared to rarely pressing DISP + SET)?

+1
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 07 / July / 2011, 16:50:09
There was also a wrong address in stubs_min.S for levent_table, only in the 101a version.

In the next build I will make the ALT button customizable so you can choose between disp+set, disp, or video(play) button. I'm just testing this right now and I like having it on the video button. I personally don't like the disp+set because a lot of times I unintentionaly enable raw.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 07 / July / 2011, 17:00:32
Nice! I have the 100 version so for now I will stick with the beta 7. Works fine for me.

Is there anything on your list that needs to be done in order to make the last beta final?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 08 / July / 2011, 02:27:48
Btw....is it possible to not save any .jpgs at all (just RAWs)? If yes: does this result in a speed increase and might allow for a burst of 3 RAW images (in burst mode)?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 08 / July / 2011, 04:41:42
Btw....is it possible to not save any .jpgs at all (just RAWs)? If yes: does this result in a speed increase and might allow for a burst of 3 RAW images (in burst mode)?

The only thing you can do is set the resolution to small(640x480) and quality to normal, you'll get 40kb jpegs. From my test with this settings I get 2.6s for DNG and 2s for RAW.

Quote
Is there anything on your list that needs to be done in order to make the last beta final?

A hack is never really "final"... If you don't see any major issues you can call every latest version final.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: fourmi1 on 08 / July / 2011, 07:32:56
Hi funnel, bought this nice camera about 2 month ago, and found out about CHDK and Canon cams.

I decided to register to thank you for your work and to ask a question about your last option. Like you, I found that disp + set is not really natural to do. But I agree with previous message that disp functions are used more often than the ALT menu.
My question is : could the behavior be inverted ? Holding DISP goes to the ALT menu while just pressing it use the disp functions. I thing it could make more people happy.

(Hho, by the way, last time i checked - a few versions ago - the numbering of shots was reseted when i went back to Canon classic firmware, is it always the same ?)

Again, very good work and thank you !
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 08 / July / 2011, 11:16:56

My question is : could the behavior be inverted ? Holding DISP goes to the ALT menu while just pressing it use the disp functions. I thing it could make more people happy.

I tried to do that some time ago and gave up. I don't remember right now what was the problem.

Quote
(Hho, by the way, last time i checked - a few versions ago - the numbering of shots was reseted when i went back to Canon classic firmware, is it always the same ?)

That happened to me too, but I'm not sure why. The camera reset to factory settings and I had to input the time and everything else. I'm not sure if it's chdk related or not.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 09 / July / 2011, 14:11:05
it seems that the new beta8 cancels the DISP increasing brightness function
pressing the DISP button for more than 2 seconds it should increase to the maximum the brightness of the screen and viceversa go back to original settings.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 10 / July / 2011, 01:06:12
After playing with my camera, I have encountered the following problem:

RAW always switches itself off (I put it on in the CHDK alt menu, exit the CHDK menu, make a foto, no RAW taken, enable the CHDK menu, look at RAW settings, RAW is switched off). Same applies if I do not take a photo but only exit the CHDK alt menu and enter it again. RAW is disabled then.

I do not know the reason but I believe that this problem occurred after I started to swap partitions on my SD card (so that Windows can read the partition with the images). I have a small 2MB partition and a large 7.x GB partition. On both partitions there is a CHDK folder. Also the boot files are on both partitions. CHDK is automatically loaded. If I switch partitions, I have to load CHDK manually until I change to the bootable partition again.

It seems that the problem does not always occur. Sometimes, right after the start (with CHDK automatically loaded) RAW is enabled.

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 10 / July / 2011, 07:20:02
After playing with my camera, I have encountered the following problem:

RAW always switches itself off (I put it on in the CHDK alt menu, exit the CHDK menu, make a foto, no RAW taken, enable the CHDK menu, look at RAW settings, RAW is switched off). Same applies if I do not take a photo but only exit the CHDK alt menu and enter it again. RAW is disabled then.

I do not know the reason but I believe that this problem occurred after I started to swap partitions on my SD card (so that Windows can read the partition with the images). I have a small 2MB partition and a large 7.x GB partition. On both partitions there is a CHDK folder. Also the boot files are on both partitions. CHDK is automatically loaded. If I switch partitions, I have to load CHDK manually until I change to the bootable partition again.

It seems that the problem does not always occur. Sometimes, right after the start (with CHDK automatically loaded) RAW is enabled.


if you are using Beta7 or early, the problem is that when you exit the alt menu you press the disp button first; that disable the Raw; so you should pay attention to press first the "Set" and then "disp" button to exit from the Alt menu.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 10 / July / 2011, 08:26:30
Muchas gracias! You were right.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 10 / July / 2011, 11:36:13
I tried several programs to convert the *.crw file into a jpeg or dng but none of the programs seems to recognise the CHDK RAW file. Any suggestions / tips? Thx in advance!

Btw: I don't have a mac, I use MS W7 x64.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 10 / July / 2011, 14:32:17
The camera can also save the RAWs as .dng files. Then you do not have to convert. Or is there any specific reason why you want to save the RAws as .crw files?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 10 / July / 2011, 15:14:09
I tried several programs to convert the *.crw file into a jpeg or dng but none of the programs seems to recognise the CHDK RAW file. Any suggestions / tips? Thx in advance!

Btw: I don't have a mac, I use MS W7 x64.

You can with DNG4PS2 http://code.google.com/p/dng4ps2 (http://code.google.com/p/dng4ps2)
Read more about it here http://chdk.wikia.com/wiki/DNG4PS-2 (http://chdk.wikia.com/wiki/DNG4PS-2)

Copy an existing camera and use the settings from the attached image.
For colormatrix I just copied the one from the port but it's not too good.
Code: [Select]
14458.000000 -5704.000000 -1562.000000 -2520.000000 14700.000000 1388.000000 -1336.000000 2334.000000 4387.000000
To convert is good to have both .jpg and .crw files in the same folder.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 10 / July / 2011, 15:48:38
@ Tiz: I know, I was just playing with the camera and the options.

@ Funnel: Thx! I tried that program but I couldn't find the SX220 in the drop-down menu and did not know how to add it. Tomorrow I'll give it a try.

What do you mean by it's not too good? Is it better to use DNG's instead, although it takes longer for the camera to save them on the SD?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 10 / July / 2011, 15:58:21
Yes, for now it's better to use the inbuilt camera DNG. I tried to make/calculate the colormatrix in DNG4PS2 but I couldn't get good results. I followed this tutorial http://chdk.wikia.com/wiki/DNG4PS-2/Calibration (http://chdk.wikia.com/wiki/DNG4PS-2/Calibration)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: philmoz on 10 / July / 2011, 16:05:36
Yes, for now it's better to use the inbuilt camera DNG. I tried to make/calculate the colormatrix in DNG4PS2 but I couldn't get good results. I followed this tutorial http://chdk.wikia.com/wiki/DNG4PS-2/Calibration (http://chdk.wikia.com/wiki/DNG4PS-2/Calibration)

I couldn't get DNG4PS2 to calibrate for the SX30 either.
Ended up using dcraw (http://www.cybercom.net/~dcoffin/dcraw/ (http://www.cybercom.net/~dcoffin/dcraw/)).
You need to compile your own version with the COLORCHECK option enabled, add the raw file size, make and model to the 'table' array and fill in values in the 'cut' array for the image you want to process.
It's tedious; but I was able to use it to get a reasonable set of values for the SX30.

Phil.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 10 / July / 2011, 16:40:58
Lens profile for the Canon SX220 HS:

110710.lcp - 0.02MB (http://www.zshare.net/download/924765843a972435/)

Used Adobe Lens Profile Creator 1.0 (as suggested by Funnel) to create the profile. Shot 45 photos (f8.0, 5mm/7.8mm/20.3mm/35mm). I think it's useless to go further than 35mm (7.0x zoom).
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 10 / July / 2011, 17:27:59
Good work. I tried it and looks very good.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 11 / July / 2011, 01:08:36
Thank you for the profile.

Does PTP ( http://chdk.wikia.com/wiki/PTP_Extension (http://chdk.wikia.com/wiki/PTP_Extension) ) already work with the camera?

If I connect the camera via USB (without PTP), Windows does not see the .dng files. It's a bit burdensome to always swap partitions, remove the card from the camera and put it into the card reader.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 11 / July / 2011, 05:00:51
You can transfer the images with ptpcamgui.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 11 / July / 2011, 05:48:51
You can transfer the images with ptpcamgui.

I can't get it to work. Do I need to copy files from a CHDK DE build to your build?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: whim on 11 / July / 2011, 06:19:46
@BlaBlaat

In case you haven't seen it yet, check the ptpcam gui thread (http://chdk.setepontos.com/index.php?topic=6285.0) for hints and tips.

Of course there's also the original thread (http://forum.chdk-treff.de/viewtopic.php?f=7&t=2207) on the German forum (in case you read german)

HTH,

wim
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 11 / July / 2011, 06:21:05
I tested it right now and works for me. For PTP you need the alternative USB driver http://sourceforge.net/projects/libusb-win32/ (http://sourceforge.net/projects/libusb-win32/)

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: whim on 11 / July / 2011, 06:50:01
I tested it right now and works for me. For PTP you need the alternative USB driver http://sourceforge.net/projects/libusb-win32/ (http://sourceforge.net/projects/libusb-win32/)

Note that libusb is not compatible with Canon's CameraWindow, make sure that it's driver is not active or
libusb will not function properly.

wim
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 11 / July / 2011, 06:56:39
I tested it right now and works for me. For PTP you need the alternative USB driver http://sourceforge.net/projects/libusb-win32/ (http://sourceforge.net/projects/libusb-win32/)

I installed it (had to copy the sys and dll myself) but maybe I'm forgetting something. I use ptpCamGui 2.0.100.

EDIT: Its working!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 11 / July / 2011, 15:39:09
I shot over 200 photos to create a correct lens profile but the original JPEG still differs from the DNG's.

Is it possible that the camera itself doesn't correct it accurate? In other words, is it possible that the lens in my SX220 differs from the one they (Canon) used to create a profile?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 11 / July / 2011, 16:44:23
In my opinion, the camera crops too much of the photo (and then bloats it back to 12 MP). Therefore, I am glad if your profile is a bit less aggressive.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 11 / July / 2011, 17:15:59
ptpCamGui always crashes after downloading 7 photos. Moreover, it is pretty slow and does not show a real directory with the photos. Probably, it's more convenient to swap partitions and put the card in a card reader.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 11 / July / 2011, 17:17:37
Is it possible that the camera itself doesn't correct it accurate? In other words, is it possible that the lens in my SX220 differs from the one they (Canon) used to create a profile?

I guess it's possible. I saw some distorsion in the live view when shooting at the calibration charts.
I don't have the camera right now to test and compare against a jpg but your profile looks very good from what I see from my saved DNG chart images.


Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 11 / July / 2011, 18:03:59
ptpCamGui always crashes after downloading 7 photos. Moreover, it is pretty slow and does not show a real directory with the photos. Probably, it's more convenient to swap partitions and put the card in a card reader.

This is not a problem of ptpCamGui. I have transfer over 700 pictures in one session.  The GUI works fine for me. Perhaps this is a memory problem of the SX220. EXMEM function could be help.

Or you try reyalps alternative PTP client (http://chdk.setepontos.com/index.php?topic=6231.0). This client shows also real directories.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 11 / July / 2011, 18:09:12
Lens profile for the Canon SX220 HS:

110710.lcp - 0.02MB (http://www.zshare.net/download/924765843a972435/)

Used Adobe Lens Profile Creator 1.0 (as suggested by Funnel) to create the profile. Shot 45 photos (f8.0, 5mm/7.8mm/20.3mm/35mm). I think it's useless to go further than 35mm (7.0x zoom).
thanks works fine!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 12 / July / 2011, 18:23:24
Check this out:

Original JPEG (cropped)

(https://chdk.setepontos.com/proxy.php?request=http%3A%2F%2Fimg39.imageshack.us%2Fimg39%2F1518%2Fimg1012vc.jpg&hash=0b2c2c5e2a190878a2a0fcfde680927e) (http://imageshack.us/photo/my-images/39/img1012vc.jpg/)

Original RAW (cropped)

(https://chdk.setepontos.com/proxy.php?request=http%3A%2F%2Fimg849.imageshack.us%2Fimg849%2F5019%2Fcrw10121.jpg&hash=7f9690ea5b27768f8218e8b9efad4048) (http://imageshack.us/photo/my-images/849/crw10121.jpg/)

RAW, but this time I applied the lens distortion profile (cropped)


(https://chdk.setepontos.com/proxy.php?request=http%3A%2F%2Fimg840.imageshack.us%2Fimg840%2F6922%2Fcrw1012.jpg&hash=fa5b431d27a7320441d0abe621a4ce1a) (http://imageshack.us/photo/my-images/840/crw1012.jpg/)

Shot this picture @ 5mm (1x zoom / no zoom). Today I created a new profile with another calibration chart and applied it on the second picture of this post. It's not complete yet, so I will post it later this week.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 12 / July / 2011, 18:35:51
Does anybody need a profile for a specific focal lenght?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 13 / July / 2011, 11:08:24
thanks
to me look even better than JPG processed image
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vls128 on 13 / July / 2011, 14:26:22
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 13 / July / 2011, 15:20:15
Because the raw images have 12 bits per pixel.

8 bits == 1 byte
12 bits == 1.5 bytes

8-bits: 4000*3000*1 == 12000000
12-bits: 4000*3000*1.5 == 18000000

Quote
May be it is possible to reduce the size of RAW file?
No, not possible.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Mato34 on 13 / July / 2011, 16:50:49
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 14 / July / 2011, 07:50:18
There's an updated version that allows you to customize the ALT button. You can download it from the autobuild server http://mighty-hoernsche.de/ (http://mighty-hoernsche.de/)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 14 / July / 2011, 12:49:51
thanks!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 16 / July / 2011, 08:12:07
This morning I tried to shot some photos in f/11 (shutter speed 10 - 15"). I took six photos and the camera crashed two times. Is this because it can't handle the override?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 16 / July / 2011, 09:08:27
Interesting. I tried to override to f11 and it did crash on the 7th picture (E26). Now I'm trying to repeat the crash and it doesn't crash anymore. Can you write the exact settings when it crashed? Do you have continuous AF on? Servo AF on?

FYI when overriding to F11 it actually doesn't really override, it just kicks in the ND filter. You can see that when you override to f11 and at the same time select "ND filter out". Compare with an f8.0 image and you'll see they're the same.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 16 / July / 2011, 09:45:08
Aperture  priority/program, tracking AF, f/11, shutter 10-15", iso100, IS continuous (I forgot to turn it off).

It happend when pressing the shutter half way down. Not sure if it occurred when I actually released the shutter.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 17 / July / 2011, 14:41:39
I tried this a few times and found that it crashes when I start pressing and releasing the half shutter a few times and then try to shoot. Try to avoid doing that if you can. I doubt I can fix that. The problem is most probably related to chdk trying to set the same value a few times one after another.

However I found another bug when autoiso is on the shutter override calculates the value and adds 200. If I set the shutter to 10 sec it goes to 210. This happens only in AUTO, P and Av mode, in Tv mode works.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 17 / July / 2011, 16:09:04
I tried this a few times and found that it crashes when I start pressing and releasing the half shutter a few times and then try to shoot. Try to avoid doing that if you can. I doubt I can fix that. The problem is most probably related to chdk trying to set the same value a few times one after another.

However I found another bug when autoiso is on the shutter override calculates the value and adds 200. If I set the shutter to 10 sec it goes to 210. This happens only in AUTO, P and Av mode, in Tv mode works.

And there is no way to fix both bugs or only the first one?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 17 / July / 2011, 16:31:15
The autoiso can be fixed. The problem is that the autoiso and the shutter override both change the shutter speed at the same time. From what I see from the code there are no checkings made in the case of autoiso + shutter override. This should be easy to solve.

For the first problem with the half shutter presses maybe I can fix it using some code in capt_seq.c like the sx30 and other cameras use. I don't have the camera right now to test it.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 17 / July / 2011, 17:20:34
So there's hope :) Good to hear this.

I love your last build Funnel. Assigned the alt-menu to the play(back) button, much better than the "old" disp+func set. Thanks!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: keitht on 18 / July / 2011, 06:05:26
Here's a noobie question from a new SX220 user.
I am trying to write a script which tests for keys being pressed.  The problem is that although is_key x "left" - and "right" work, I cannot find any other names that work (e.g. "play" "disp" "up" "down" "set" "func" do not work for me).   

Also, are the same names used for click, press, release ?

thanks keitht
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 18 / July / 2011, 07:38:32
These are all the names for the buttons copied from the chdk code. I commented out the ones we don't use. Use the latest version from the autobuild server because I added some more delay to the key_click that caused problems in ptp clicks.

Code: [Select]
static const struct Keynames {
    int keyid;
    char *keyname;
} keynames[] = {
    { KEY_UP,           "up"         },
    { KEY_DOWN,         "down"       },
    { KEY_LEFT,         "left"       },
    { KEY_RIGHT,        "right"      },
    { KEY_SET,          "set"        },
    { KEY_SHOOT_HALF,   "shoot_half" },
    { KEY_SHOOT_FULL,   "shoot_full" },
// { KEY_SHOOT_FULL_ONLY,   "shoot_full_only" },
    { KEY_ZOOM_IN,      "zoom_in"    },
    { KEY_ZOOM_OUT,     "zoom_out"   },
    { KEY_MENU,         "menu"       },
    { KEY_DISPLAY,      "display"    },
    { KEY_PRINT,        "print"      },
//    { KEY_ERASE,        "erase"      },
//    { KEY_ISO,          "iso"        },
//    { KEY_FLASH,        "flash"      },
//    { KEY_MF,           "mf"         },
//    { KEY_MACRO,        "macro"      },
    { KEY_VIDEO,        "video"      },
//    { KEY_TIMER,        "timer"      },
//    { KEY_EXPO_CORR,    "expo_corr"  },
//    { KEY_MICROPHONE,   "fe"         },
//    { KEY_ZOOM_ASSIST,  "zoom_assist"},
//    { KEY_AE_LOCK,      "ae_lock"    },
//    { KEY_METERING,     "metering_mode"},
    { 0xFF,             "remote"     },
    { 0xFFFF,           "no_key"     },
};
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: keitht on 18 / July / 2011, 08:24:42
Thanks funnel.
I have got most of it sorted now.
However, the "play" button seems to respond to "video" (you don't have a "play" label) and the real video button does not respond to anything but actually works - starts recording  (even in ALT mode).
The control dial also works in ALT mode.

Also you have a "print" button in the list which my camera doesn't have.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 18 / July / 2011, 11:51:08
However, the "play" button seems to respond to "video" (you don't have a "play" label) and the real video button does not respond to anything but actually works - starts recording  (even in ALT mode).
I just used the buttons that were previously defined. I didn't know exactly where to use the video button so I used it for "play".
Quote
The control dial also works in ALT mode.
The jogdial is disabled in alt mode. The mode dial is enabled.
Quote
Also you have a "print" button in the list which my camera doesn't have.
The print button is the alt button in chdk. Default is set to disp+set.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 19 / July / 2011, 17:18:54
Use the latest version from the autobuild server because I added some more delay to the key_click that caused problems in ptp clicks.

Does this mean you have build a new version (newer dan beta v8)? I don't know what ptp clicks are or is and a quick search on google didn't provide a answer.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 19 / July / 2011, 18:10:12
In ptp mode (ptpcamgui, etc.) the buttons were not working (probably in scripts too, never tried that). You can find the latest builds from now on on the autobuild server http://mighty-hoernsche.de/ (http://mighty-hoernsche.de/) . If I remember correctly the newest version is the same as beta8 with the added clicks fix and adjustable alt button.

Regarding the crash when using Av override you have to be careful to not press and release repeatedly the half_shoot button. The same problem is present in sx30 and g12 too. For now theres no solution for that.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 20 / July / 2011, 13:29:18
I wasn't sure if the camera can go up to f11. Now I have proof.  8)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 20 / July / 2011, 15:25:59
I have a question: is it possible to "save" the settings of a CHDK installation?

For example, if I upgrade to beta 8, I would not like to configure the entire OSD again and, therefore, I would like to keep my settings. Are the settings in the CHDK folder and, if yes, do I merely have to replace the boot files if I upgrade to the latest version?

How do I keep my settings if I want to create the same installation on each of my SD cards?

TIA!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: waterwingz on 20 / July / 2011, 16:15:12
I have a question: is it possible to "save" the settings of a CHDK installation?

For example, if I upgrade to beta 8, I would not like to configure the entire OSD again and, therefore, I would like to keep my settings. Are the settings in the CHDK folder and, if yes, do I merely have to replace the boot files if I upgrade to the latest version?

How do I keep my settings if I want to create the same installation on each of my SD cards?
Just keep a copy of the CCHDK.CFG file from the SD card on your computer.  Copy it back to the same place on the SD card after each upgrade.

Or just update the DISKBOOT.BIN file with each change - leave the rest of the card alone.

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: fe50 on 20 / July / 2011, 16:29:03
I have a question: is it possible to "save" the settings of a CHDK installation?
For example, if I upgrade to beta 8, I would not like to configure the entire OSD again and, therefore, I would like to keep my settings. Are the settings in the CHDK folder and, if yes, do I merely have to replace the boot files if I upgrade to the latest version?
How do I keep my settings if I want to create the same installation on each of my SD cards?
Just save / restore / copy the CHDK configuration file \CHDK\cchdk.cfg - this file includes the CHDK settings.

When re-using a config file from another camera or from an older CHDK version, there may be issues when the CHDK code has changed - you should reset the configuration then (reset from the CHDK menu or just delete/rename the config file); this may occur while a new camera is in development state...

To update CHDK just replace the CHDK binary files:

DISKBOOT.BIN (the binary file for the autoboot loading method)   and
PS.FIR (older cameras) or PS.FI2 (on newer cameras) (for loading CHDK with "Firm. Update...")

with the new ones.
On a multi-partition setup (two or more partitions on your SD card) don't forget to replace the files on both/all partitions !

From time to time you should just copy/unzip all files from a full CHDK download package, this way you'll also get the latest language files, sample scripts, readme files etc.

There are two additional, camera-dependend CHDK files:

* badpixel.bin for DNG RAW support
* badpixel (or badpixel.txt) for general badpixel removal (RAW and JPEG)

Those two files can not be exchanged between different cameras.

FWIW - in the german CHDKDE version it is also possible to change / edit / save  the CHDK config file from within a running CHDK script - http://chdk.bplaced.net/content/chdk-inside/10-lua/124-konfiguration-sichern.html (http://chdk.bplaced.net/content/chdk-inside/10-lua/124-konfiguration-sichern.html)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 20 / July / 2011, 16:58:23
I wasn't sure if the camera can go up to f11. Now I have proof.  8)

But there is no difference between f/8 + ND filter out and f/11 right?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 20 / July / 2011, 18:55:37
But there is no difference between f/8 + ND filter out and f/11 right?

Right, they're exactly the same. The Av override is ok, it's just the ND filter that's acting strange.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 21 / July / 2011, 09:18:02
Offtopic question to all Canon SX220 HS users:

I recently noticed that there is some dust behind the first and second lens of my SX220. My other (much older) compact camera's (an A710 and IXUS 82 IS) don't have this "problem". Anyone here that can confirm that this is normal for this particular camera.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 21 / July / 2011, 09:47:00
I can confirm this. I had noticed a lot of Canon cameras have the same problem. You can try to clean them with compressed air but it's not guaranteed it'll work. I heard Canon cleans them for free under warranty. I have some dust too in there right now but it's not noticable in images. I'll have to send the camera to the warranty service sometime before the warranty expires to clean them. This is something I really hate about this camera.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: keitht on 22 / July / 2011, 03:52:38
Another scripting question.  I am trying to get and set various camera properties.  I can do some of them via get_prop and set_prop, but not many of the "official" script commands work.  In particular get_tv crashes the camera when you put it anywhere in the script (without a "rem"). Which of these should work, and what about setting these ?
select N
case 1; X=get_day_seconds
case 2; X=get_temperature 1   
case 3; X=get_tick_count 
case 4; get_iso   X   
case 5; get_av X
rem case 6; get_tv X   
case 7; get_ev  X
case 8; get_zoom   X         
case 9; get_display_mode X                   
case 10; get_drive_mode  X                               
case 11; get_exp_count X                       
case 12; get_flash_mode X                       
case 13; get_flash_ready X                 
case 14; get_focus  X                         
case 15; get_histo_range X               
case 16; get_IS_mode  X                                             
case 17; get_mode X                     
case 18; get_movie_status X                     
case 19; get_nd_present  X                   
case 20; get_orientation_sensor  X                 
case 21; get_platform_id X                                 
case 22; get_propset  X                                   
case 23; get_quality  X                                               
case 24; get_resolution  X                                                 
case 25; get_shooting X                                                                           
case 26; X=get_time   2                                                                       
case 27; get_zoom_steps  X
end_select
Thanks in advance
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 22 / July / 2011, 04:21:49
Look here for all commands http://tools.assembla.com/svn/chdk/trunk/lib/ubasic/tokenizer.c (http://tools.assembla.com/svn/chdk/trunk/lib/ubasic/tokenizer.c) . There's no get_tv, just get_tv96.

Regarding the Video button you mentioned a few day ago I'll make a patch to fix that. The video button should be the rec button.

There's also a new version out that fixes the Av overide half_shoot problem. Thx to philmoz for fixing that.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 23 / July / 2011, 16:21:48
Why does the shutterspeed override only works well in easy, auto and (full) manual? I usually shoot in Program and when I override the shutterspeed to let's say 1/250s it sometimes refuses and sets the speed at 1/80s. This is just an example, the actual speed varies.

Sometimes it does work like it should... but it would be great if it works all the time. Did I do something wrong? I have set the "override shutter speed" to 1/250, the "value factor" to 1 and the "shutterspeed enum type" to Ev Step.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 24 / July / 2011, 16:50:42
@Blablaat
I see now. Happens only when I press the shoot button without holding half_shoot first for some time to give it time to set the override value.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 24 / July / 2011, 17:17:41
No thats not it. I always press the shoot button halfway down to check the values before I take a picture.  
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 24 / July / 2011, 17:27:47
I'll do more tests. Did you have custom autoiso enabled?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 24 / July / 2011, 17:51:25
No, I dont use custom autoiso.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 24 / July / 2011, 18:31:07
Override:

(https://chdk.setepontos.com/proxy.php?request=http%3A%2F%2Fimg607.imageshack.us%2Fimg607%2F2227%2Fimg0317km.th.jpg&hash=b8464f7cbfe71034b14a463ac0dc6335) (http://imageshack.us/photo/my-images/607/img0317km.jpg/)

Shoot button pressed halfway down:

(https://chdk.setepontos.com/proxy.php?request=http%3A%2F%2Fimg638.imageshack.us%2Fimg638%2F7218%2Fimg0318da.th.jpg&hash=3079dea1a1804b6b6d7f37ab9a7b380d) (http://imageshack.us/photo/my-images/638/img0318da.jpg/)

Settings: Program, shutter speed @ 1/1000 (override), ISO100 (no override or custom autoiso), AF frame center, AF frame size small, Digital zoom off, Servo AF on, Countinuous AF on, AF-assist beam on, MF-point zoom on, safety MF on, i-contrast off, wind filter off, review off, blink detection off, grid lines on, IS mode continuous, date stamp off. I guess most of these settings are not relevant...

I think the camera refuses to override because it can't take a decent picture. It does override for a sec but then sets a much slower shutter speed. However, it works in manual, auto and easy.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 24 / July / 2011, 18:56:01
Appears that disabling the Servo AF fixes it. That's why I couldn't replicate the issue, I'm having it always disabled. Try it and report.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 24 / July / 2011, 18:59:36
Appears that disabling the Servo AF fixes it.

Your right! So the camera overrides the override because it is adjusting the values, including the shutter speed...

But if it doesn't "calculate" the new ISO after CHDK overrides the shutter speed (when autoiso is selected) then the picture is useless. Is there a way to enable autoiso in manual mode?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: abderian2004 on 25 / July / 2011, 00:26:45
I wasn't sure if the camera can go up to f11. Now I have proof.  8)

I checked sx230 till f16, The camera doesnt close its shutter to f16 aperture when shutter is half way pressed, however when pressing full shutter the apertue closes further up to a small "pin size" hole.

tested on taliesin's prealpha version.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 25 / July / 2011, 05:32:24
Quote
But if it doesn't "calculate" the new ISO after CHDK overrides the shutter speed (when autoiso is selected) then the picture is useless. Is there a way to enable autoiso in manual mode?
Probably can be done. Try using custom autoiso with with it's custom shutter speed.

Can you explain what you're trying to achieve with the chdk Tv override? You could simply use the camera inbuilt Tv. I find the chdk Tv override useful only for 15+ sec exposures.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 25 / July / 2011, 05:38:16
Quote
I checked sx230 till f16, The camera doesnt close its shutter to f16 aperture when shutter is half way pressed, however when pressing full shutter the apertue closes further up to a small "pin size" hole.
Why then there's no difference between histograms from f11 to f16? Can you upload somewhere shoots from f8 to f16?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 25 / July / 2011, 08:14:59
Quote
But if it doesn't "calculate" the new ISO after CHDK overrides the shutter speed (when autoiso is selected) then the picture is useless. Is there a way to enable autoiso in manual mode?
Probably can be done. Try using custom autoiso with with it's custom shutter speed.

Did some test shots and Tv in combination with custom autoiso will do the trick.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 26 / July / 2011, 18:25:49
I wasn't sure if the camera can go up to f11. Now I have proof.  8)

I checked sx230 till f16, The camera doesnt close its shutter to f16 aperture when shutter is half way pressed, however when pressing full shutter the apertue closes further up to a small "pin size" hole.

tested on taliesin's prealpha version.

I was playing with the Av override and I noticed that it can really go up to f16 but only at full zoom. Actually goes even two 1/3 steps more, I don't even know what f value is that(f18?). I found that with Av bracketing(+) starting from 5.9 at full zoom and comparing the histograms in review mode.

EDIT: it's f20
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Microfunguy on 27 / July / 2011, 06:21:11
EDIT: it's f20

Do you realise that is equivalent to f110  on a 35mm camera ?

I would be VERY interested in seeing a sample photo.

According to theory, resolution should be terrible compared to wide-open aperture.

With small sensor cameras there is rarely any need to use a smaller aperture at all.
In fact, at telephoto setting ANY stopping down decreases resolution.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 27 / July / 2011, 07:08:41
Quote
I would be VERY interested in seeing a sample photo.

I used + av bracketing 1/3 step, start at 5.9 full zoom. What do you think?

http://www.zshare.net/download/930310371d69c8ae/ (http://www.zshare.net/download/930310371d69c8ae/)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Microfunguy on 27 / July / 2011, 07:27:56
Problem is, the subject is of limited depth-of-field.

Use a flat subject such as a detailed printed image or food package.

Bracket by one EV (fewer images for me to stack in PSP) and reduce shutter speed by one EV to compensate.


David
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 27 / July / 2011, 07:45:04
I don't understand. A flat surface with or without background?

EDIT: what about this one?  http://www.zshare.net/download/93032582e935a3fa/ (http://www.zshare.net/download/93032582e935a3fa/)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 27 / July / 2011, 09:35:54
I took a pic of inside of the lens when at full zoom and no zoom. Looks like there's no difference.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Microfunguy on 27 / July / 2011, 09:58:14
We are trying to detect changes in sharpness due to aperture rather than subject distance.

So, the entire flat object should fill the photo and be exactly parallel to the camera.

You did not override the shutter speed as requested so the images are too dark to compare.

Try to use something with smaller, far more  detail.

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 27 / July / 2011, 10:40:43
Ok, here's another attempt :)

This time I started with +2EV.

http://www.zshare.net/download/93037627785ccf75/ (http://www.zshare.net/download/93037627785ccf75/)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Microfunguy on 27 / July / 2011, 19:12:29
Well, I appreciate your persistence but you are still not overriding the shutter speed.

Instead of bracketing, manually increase the aperture number by one EV and at the same time double the exposure time.

Repeat for each new aperture.

That previous test changed by +1EV per step, not +2EV.

The subject you used does not have fine detail.

You need something with tiny printed letters or lines close together.

Anyway, the previous test does prove each image became darker than the one before.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: abderian2004 on 28 / July / 2011, 20:51:45
@ funnel:

finding difficulties in downloading your test images through zshare, i thought its my browser setting problem but i tried it through different PC's as well, can you upload those test images to some other site?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 29 / July / 2011, 03:19:31
@ funnel:

finding difficulties in downloading your test images through zshare, i thought its my browser setting problem but i tried it through different PC's as well, can you upload those test images to some other site?

http://www.box.net/shared/582uz3hdpbt4kps2mpv1 (http://www.box.net/shared/582uz3hdpbt4kps2mpv1)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 02 / August / 2011, 12:11:31
i downloaded the latest beta and now when i start up the camera it starts in preview mode; if i turn into shoot mode it crash but if i turn the dial (A-Tv-Av-M) it starts correctly.
i am using fw 1.00A
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 02 / August / 2011, 12:59:23
I tried it right now and it doesn't crash. It should start directly into record mode when holding the on/off button. Are you using a dual partitioned card?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 02 / August / 2011, 13:00:49
no, i use a 4gb one partition sd card
with the previous beta it was working fine

chdk 0.9.9-1259
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 02 / August / 2011, 13:09:38
Just to make sure. Did you download it from the autobuild server http://mighty-hoernsche.de/ (http://mighty-hoernsche.de/) ?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 02 / August / 2011, 13:19:47
yes i donwloaded from there
complete and small the same attitude
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 02 / August / 2011, 13:26:38
anyway, i made this video test with manual focus

http://www.youtube.com/watch?v=YpHEDQQyn_s# (http://www.youtube.com/watch?v=YpHEDQQyn_s#)

do you know the reason of the focus noise while the same issue doesn't occour with auto focus?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 02 / August / 2011, 13:45:59
I tried now with 3 different sd cards(2,4,8gb) and it works. Try reformatting or try a different one.

do you know the reason of the focus noise while the same doesn't occour with auto focus?

I was asking the same question myself the first time I used it. What you hear are the focus steps and don't know why are always present even when using factor 1.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 02 / August / 2011, 13:49:09
it seems like in photo mode it uses a noise focus while in video mode the focus is silent.
Maybe there are 2 focus engines.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Cyjackz on 03 / August / 2011, 03:52:59
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: philmoz on 03 / August / 2011, 04:18:26
After locking the SD card and starting the camera, it starts in preview mode. When I try to change the mode to shoot mode it crashes (got a black screen) but if I turn the wheel, the shootmode starts.

I tried 2 different SD cards. 4GB Lexar SDHC Class 4 and 8GB Panasonic SDHC Class 4 (with 2 partitions).

The cameras released this year don't require partitioning to work with large SD cards. They can boot directly off any size card.

Try this:
- format the card in the camera to one FAT32 partition
- manually copy all the files from the latest CHDK build to the card
- start CHDK using the manual 'firmware update' method
- use the Miscellaneous stuff --> Make card bootable menu option to make the card bootable
- lock the card and see if it boots and works correctly

Phil.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Cyjackz on 03 / August / 2011, 04:48:20
The cameras released this year don't require partitioning to work with large SD cards. They can boot directly off any size card.

Thank you, nice to know.

Try this:
- format the card in the camera to one FAT32 partition
- manually copy all the files from the latest CHDK build to the card
- start CHDK using the manual 'firmware update' method
- use the Miscellaneous stuff --> Make card bootable menu option to make the card bootable
- lock the card and see if it boots and works correctly

I formatted the card in the camera and copied all files and folders of the full release to it.
But when starting the cam, switching to playback mode and take a look at the playback options, there is no "Firm Update..." entry...

What am I doing wrong?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: philmoz on 03 / August / 2011, 04:58:59
I formatted the card in the camera and copied all files and folders of the full release to it.
But when starting the cam, switching to playback mode and take a look at the playback options, there is no "Firm Update..." entry...

What am I doing wrong?

You have to start the camera in playback mode with the playback/review button on the back.

Phil.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Cyjackz on 03 / August / 2011, 05:13:18
You have to start the camera in playback mode with the playback/review button on the back.

Ok, thanks I did not know that I can turn on my cam with this button too. :-)

But now there is a new problem.
Chdk worked perfectly using the update method, but when I press "SET" on "Make card bootable..." nothing happens, execpt the scrollbar disappears for a second and the card seems not to be bootable formatted.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: philmoz on 03 / August / 2011, 05:18:29
You have to start the camera in playback mode with the playback/review button on the back.

Ok, thanks I did not know that I can turn on my cam with this button too. :-)

But now there is a new problem.
Chdk worked perfectly using the update method, but when I press "SET" on "Make card bootable..." nothing happens, execpt the scrollbar disappears for a second and the card seems not to be bootable formatted.


Sorry about that - looks like funnel hadn't finished implementing the 'make card bootable' stuff.
He has posted a patch which I will commit to the code repository - the next build should have this enabled.

Are you saying that when you start manually you can switch to record mode without the camera crashing?

Phil.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 03 / August / 2011, 05:25:31
The Make bootable will not work for fat32 until a new patch is applied to the trunk. Sorry, I missed some updates of the trunk and forgot to add it. I compiled one for you so you can try until the trunk gets updated. When you select Make card bootable is normal to not see anything, it should boot if it worked.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Cyjackz on 03 / August / 2011, 05:53:51
Sorry about that - looks like funnel hadn't finished implementing the 'make card bootable' stuff.
He has posted a patch which I will commit to the code repository - the next build should have this enabled.
That doesn't matter.

Are you saying that when you start manually you can switch to record mode without the camera crashing?
Sorry that was my fault. It is the same as before. After applying the "update" and pressing the playback-button again the cam crashes.

The Make bootable will not work for fat32 until a new patch is applied to the trunk. Sorry, I missed some updates of the trunk and forgot to add it. I compiled one for you so you can try until the trunk gets updated. When you select Make card bootable is normal to not see anything, it should boot if it worked.
Thank you, the formatting worked. But I still have the crash (and the cam starts [on/off button] in playback mode).
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: philmoz on 03 / August / 2011, 06:03:31
Thank you, the formatting worked. But I still have the crash (and the cam starts [on/off button] in playback mode).

Starting in playback mode is normal - if you hold down the power button for 1-2 seconds it should start in record mode.

Crashing when you change modes is something funnel will need to look into.

Phil.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 03 / August / 2011, 06:06:38
I downloaded a clean version and found no problems. The only thing I can think of is that after the startup in playback mode and pressing the playback button once again the camera shuts down. This is normal even without chdk. To go in record mode from playback mode press the red rec button or the shoot button. You can start the camera directly in record mode by holding the on/off button.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Cyjackz on 03 / August / 2011, 06:35:42
I downloaded a clean version and found no problems. The only thing I can think of is that after the startup in playback mode and pressing the playback button once again the camera shuts down. This is normal even without chdk. To go in record mode from playback mode press the red rec button or the shoot button. You can start the camera directly in record mode by holding the on/off button.

Yes, that's it. It's not a crash, its a shutdown. When having CHDK installed the power button seems to be no longer a power button but a playback button for startup. It has now the same behaviour as powering on the camera by using the playback button.

Is there any setting to change this? To start in record mode like having no CHDK installed?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 03 / August / 2011, 06:44:27
That's chdk standard behaviour and it's not customizable.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: philmoz on 03 / August / 2011, 06:50:35
Yes, that's it. It's not a crash, its a shutdown. When having CHDK installed the power button seems to be no longer a power button but a playback button for startup. It has now the same behaviour as powering on the camera by using the playback button.

Is there any setting to change this? To start in record mode like having no CHDK installed?

Just hold down the top power button for a bit longer and CHDK should start in record mode. You get used to it pretty quickly.

It works this way because both buttons trigger the camera to start and the firmware checks which one was pressed - the top one to start in record mode, the rear on to start in playback mode.

When CHDK starts it take a bit longer to get the camera booted up - so by the time you get to the code that checks which button was pressed you've let it go. So the camera defaults to playback mode.

Defaulting to playback mode is safer than starting in record mode - if the button gets pressed while in a case it won't try and extend the lens which could damage the camera.

Phil.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Cyjackz on 03 / August / 2011, 07:35:16
Yes, you are right, safety first ;-)

Thank you both for your help!!!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 03 / August / 2011, 08:03:17
Hi funnel,

your porting of the SX220 works fine. (https://chdk.setepontos.com/proxy.php?request=http%3A%2F%2Fwww.kolobok.us%2Fsmiles%2Ficq%2Fgood.gif&hash=530a008ac06900a03f182fbeb59072a3)

I noticed some things:

In platform_camera.h are #define CAM_MULTIPART (you removed multipartition part) and #define CAM_BRACKETING (camera has no native bracketing mode) unnecessary, maybe also #define CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO and #define CAM_AF_SCAN_DURING_VIDEO_RECORD.

The ALT mode switching with DISP+SET is a litte pain. I use the alternative ALT mode button 'playback'. But why is this button defined as 'video'? Maybe it was better using the playback button as default ALT button.

Two capture modes (high speed burst & best image selection) use the continuous capturing. These modes should be excluded for 'bracketing in continuous mode' function. Maybe this is not only a SX220 problem. Then a generic solution would be better.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 03 / August / 2011, 09:24:20

Quote
In platform_camera.h are #define CAM_MULTIPART (you removed multipartition part)
You're right, I forgot to remove that.

Quote
and #define CAM_BRACKETING (camera has no native bracketing mode) unnecessary,
True, I'll remove that too, it's a leftover from the reference port I used.

Quote
maybe also #define CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO
This one calls _UnsetZoomForMovie. I think it's not needed because the camera natively supports zooming in video.

Quote
and #define CAM_AF_SCAN_DURING_VIDEO_RECORD.
I removed that because the camera crashes when zooming after calling _MakeAfScan. I found that _DoAflock acts in a similar way but also crashes when I set the camera to manual focus and try to zoom. To avoid trouble I just removed it. Maybe we can find a solution for this later.

Quote
The ALT mode switching with DISP+SET is a litte pain. I use the alternative ALT mode button 'playback'. But why is this button defined as 'video'? Maybe it was better using the playback button as default ALT button.
Yes, I have plans to change that and move it as the REC button and add a new PLAYBACK button to keyboard.h. I was waiting to see if the patch for shoot_full_only will be applied first to not screw up that work.

Quote
Two capture modes (high speed burst & best image selection) use the continuous capturing. These modes should be excluded for 'bracketing in continuous mode' function. Maybe this is not only a SX220 problem. Then a generic solution would be better.
I like the bracketing on high speed burst. I find it useful for ultra fast HDR bracketing. I don't think that can cause problems.

I agree for the best image selection, should be removed.


Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 03 / August / 2011, 16:10:52
I like the bracketing on high speed burst. I find it useful for ultra fast HDR bracketing. I don't think that can cause problems

Yes, you're right. It's a nice feature. Thanks for your feedback.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 04 / August / 2011, 07:56:28
Made another av test for Microfunguy. I hope this time I got it right. I used the attached script that adds 32 to av96 and substracts 32 from tv96 for each shoot. I uploaded just the 1EV av difference shoots, the last one is 2/3EV difference.

http://www.box.net/shared/vnqpln9jdy5ivsb9v70j (http://www.box.net/shared/vnqpln9jdy5ivsb9v70j)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 07 / August / 2011, 15:55:10
I updated to the latest build (using the auto server). Now, I have a problem. I cannot find "swap partition" anymore. Moreover, the entry "make card bootable" does not seem to work anymore. The camera does not seem to recognize my second, large partition (with the images) but only the small boot partition.

Any ideas how to fix the camera? Thanks.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 07 / August / 2011, 17:10:14
I updated to the latest build (using the auto server). Now, I have a problem. I cannot find "swap partition" anymore. Moreover, the entry "make card bootable" does not seem to work anymore. The camera does not seem to recognize my second, large partition (with the images) but only the small boot partition.

Any ideas how to fix the camera? Thanks.

Newer cameras can boot from FAT32 partitions. This feature is now included for the SX220. You don't need anymore 2 partitions for bigger cards.

See also here: http://chdk.setepontos.com/index.php?topic=6241.msg71293#msg71293 (http://chdk.setepontos.com/index.php?topic=6241.msg71293#msg71293)

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 08 / August / 2011, 01:41:55
It appears that it has not been included yet (at least not with respect to firmware version 100). But also the dual partition method does not seem to work anymore. Fortunately, I managed to downgrade to beta 7. Now my camera works fine again.

EDIT: Btw. wouldn't it make sense to give funnel control over the first post in this thread (or create a new thread) so that the latest version of the CHDK port, the latest Lightroom distortion profile etc. are readily available?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 08 / August / 2011, 04:04:46
@Tiz
I updated the sx220 wiki page http://chdk.wikia.com/wiki/SX220#CHDK_Specialties (http://chdk.wikia.com/wiki/SX220#CHDK_Specialties) with the steps to follow to boot from 4GB+ sd cards. I hope it's clear enough.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 08 / August / 2011, 15:21:19
Thank you. It worked with a new 8GB card. (I made the mistake and did not lock the card and, therefore, it did not boot.)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 09 / August / 2011, 09:01:16
Funnel, did you change anything that can and/or did affect the save raw option?

I took some pictures (in Tv) and not all raws were saved. Some of the raws that the camera did save are not labelled correct (IMG_01 = CRW_02).

(8GB SD, CHDK 0.9.9-1266, FW 100a)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 09 / August / 2011, 09:16:14
Right now I'm investigating a similar problem. The first CRW doesn't get numbered correctly when doing minus bracketing. I have a solution, right now I'm testing it.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vls128 on 09 / August / 2011, 12:14:56
I have found similar problems with saving of RAW files. However, I did not use bracketing.
To test I have made 9 shots at equal camera options (Av, no zoom, f/3.1) - just focus
the lens on the sky and press shutter 9 times. As a result I have obtained 9 jpgs and 7 RAWs.

(16GB SD, CHDK 0.9.9-1285, FW 101a)

p.s. Also I have found that shooting a video with zoom sometimes switches off the camera
without saving a file.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 09 / August / 2011, 12:43:50
I have found similar problems with saving of RAW files. However, I did not use bracketing.
To test I have made 9 shots at equal camera options (Av, no zoom, f/3.1) - just focus
the lens on the sky and press shutter 9 times. As a result I have obtained 9 jpgs and 7 RAWs.

LOL. You've got to be kidding! I was also taking pictures of the sky/clouds when this problem occurred. Maybe the sky is responsible for this 'bug'.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 09 / August / 2011, 13:03:49
p.s. Also I have found that shooting a video with zoom sometimes switches off the camera
without saving a file.

Did you use the video quality override? I found that enabling it the camera randomly crashes between 1-10 minutes of recording.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vls128 on 09 / August / 2011, 13:11:56

Did you use the video quality override? I found that enabling it the camera randomly crashes between 1-10 minutes of recording.

I did not change the default video options in CHDK.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 09 / August / 2011, 13:18:21
Seems like a problem with your camera, not CHDK.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vls128 on 09 / August / 2011, 13:54:18
Concerning my troubles with video, now I've made some tests and
no problem has occurred. I have updated CHDK yesterday. I hope,
this version is more stable and everything will be fine with video.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 11 / August / 2011, 16:56:18
Hi funnel,

there is a new firmware version 1.01b. Breadstone from the German CHDK forum has made a dump.

dump sx220 1.01b (http://www.box.net/shared/15ssj2vydt93m1tpryiu)

Maybe you can start a port. Breadstone would be very happy.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 11 / August / 2011, 17:41:29
Ok, I'll take a look at it.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 12 / August / 2011, 03:51:20
I made a test version for 1.01b. Looks like the differences were at the same places as between 100a and 101a.

http://www.box.net/shared/c6xteu4pkiosbxp9y7u2 (http://www.box.net/shared/c6xteu4pkiosbxp9y7u2)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vls128 on 12 / August / 2011, 08:29:02
I've found one strange thing for RAW. The image in RAW sometimes looks curved and distorted especially
on the edges as after fisheye effect. However, in jpeg everything looks ok. Moreover, picture is larger
(contains more information) in RAW than in jpeg but with the same resolution. It looks like camera cuts
RAW while preparing jpeg. Is it normal for chdk?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vls128 on 12 / August / 2011, 08:36:09
Another question: is there any possibility to speed up writing of RAWs? I use class10 SDHC card
but one shots takes about 5 sec. So, one can forget about serial shot or bracketing with RAWs.
I saw a CHDK option "RAW buffer cached", but I don't see any difference in working time.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Microfunguy on 12 / August / 2011, 09:27:44
The image in RAW sometimes looks curved and distorted especially
on the edges as after fisheye effect.


That is because it is.

That is the image your lens really creates.

The JPG has had the distortions corrected because the Canon firmware 'invents' new pixels that were not originally there.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 12 / August / 2011, 13:29:55
Funnel, did you change anything that can and/or did affect the save raw option?

I took some pictures (in Tv) and not all raws were saved. Some of the raws that the camera did save are not labelled correct (IMG_01 = CRW_02).

(8GB SD, CHDK 0.9.9-1266, FW 100a)

This issue is fixed in the latest build(1290).
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 12 / August / 2011, 15:50:25
I made a test version for 1.01b. Looks like the differences were at the same places as between 100a and 101a.

It seems to work. Somebody from another german photo forum has this reported. RAW/DNG are ok. OSD functions are all ok. I have no informations about overrides.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 12 / August / 2011, 17:09:08
I made a test version for 1.01b. Looks like the differences were at the same places as between 100a and 101a.

It seems to work. Somebody from another german photo forum has this reported. RAW/DNG are ok. OSD functions are all ok. I have no informations about overrides.

msl
I noticed I missed one BL in movie_rec.c that can cause problems in video recording. Now everything should work.

http://www.box.net/shared/8npcc297qm73nfin6dl3 (http://www.box.net/shared/8npcc297qm73nfin6dl3)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 12 / August / 2011, 19:36:51
Another question: is there any possibility to speed up writing of RAWs? I use class10 SDHC card
but one shots takes about 5 sec.

Buy a better class 10 card, that's one solution to get faster writing speeds. I use a Sandisk 8GB Extreme (class 10) and it takes not more than 3 sec. Still not suitable for burst / continuous shooting but al lot better than 5 sec.

You can also set the JPEG 'output' on the lowest resolution / quality, that also speeds up the process a little bit.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 12 / August / 2011, 19:41:39
Funnel, did you change anything that can and/or did affect the save raw option?

I took some pictures (in Tv) and not all raws were saved. Some of the raws that the camera did save are not labelled correct (IMG_01 = CRW_02).


(8GB SD, CHDK 0.9.9-1266, FW 100a)

This issue is fixed in the latest build(1290).

Thanks Funnel!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 13 / August / 2011, 00:39:23
I mounted the SX220 on a tripod and used 2 sec self-timer function. I made several shots with ISO 100, 400 and 3 different sharpness settings (very low, normal, very high). With respect to the very first pic, the flash was accidentally activated. I therefore deleted the first .jpg (but not the RAW which is 0649).

Now the problem: The .jpg images were numbered IMG_0651-655. (The deleted .jpg must have been 0650.) However, the RAWs were numbered CRW_0649-654. It appears that my old CRW_0649 (I still have it on my harddrive) has been deleted/overwritten because it is not on the SD card anymore. Moreover, one RAW seems to be missing. (I am quite concerned that this might happen to my precious holiday pics ...)

In addition, I made the experience that the colors of the RAWs significantly differ from the .jpg colors. In particular, this applies to low-light indoor shooting. But also the low-light outdoor RAWs visibly differ from the .jpgs. I am using Lightroom.

Thanks

Firmware 100a
CHDK-DE 1.1.0
Revision 734
Date Aug 6, 2011
I somehow got this build from mighty hoersche server.

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Vitaminos on 13 / August / 2011, 05:12:48
Another question: is there any possibility to speed up writing of RAWs? I use class10 SDHC card
but one shots takes about 5 sec. So, one can forget about serial shot or bracketing with RAWs.
I saw a CHDK option "RAW buffer cached", but I don't see any difference in working time.


Probably your card is not a true class 10, even not class 6. there is lot of fake cheap cards on the marked with label class 10 but all of them are class 4 or just 2.

With an original secure digital class 6 extreme card the raw saving procedure for me is between 2 - 3 sec, and continous shooting jgp-s with full resolution in program mode is realy quick. fist 2 shot are taken within 1 sec, it contiues with cca 0.7 sec / shots (without flash of course).
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Vitaminos on 13 / August / 2011, 06:18:37
Try
I mounted the SX220 on a tripod and used 2 sec self-timer function. I made several shots with ISO 100, 400 and 3 different sharpness settings (very low, normal, very high). With respect to the very first pic, the flash was accidentally activated. I therefore deleted the first .jpg (but not the RAW which is 0649).

Now the problem: The .jpg images were numbered IMG_0651-655. (The deleted .jpg must have been 0650.) However, the RAWs were numbered CRW_0649-654. It appears that my old CRW_0649 (I still have it on my harddrive) has been deleted/overwritten because it is not on the SD card anymore. Moreover, one RAW seems to be missing. (I am quite concerned that this might happen to my precious holiday pics ...)

In addition, I made the experience that the colors of the RAWs significantly differ from the .jpg colors. In particular, this applies to low-light indoor shooting. But also the low-light outdoor RAWs visibly differ from the .jpgs. I am using Lightroom.

Thanks

Firmware 100a
CHDK-DE 1.1.0
Revision 734
Date Aug 6, 2011
I somehow got this build from mighty hoersche server.


to develop the raw files with a better raw develop softvare, and you can get any result what you want, colors, brightness, lens correction etc, try photoshops own raw develop or raw therapy 3, it is open source and free to use.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 13 / August / 2011, 12:42:33
I mounted the SX220 on a tripod and used 2 sec self-timer function. I made several shots with ISO 100, 400 and 3 different sharpness settings (very low, normal, very high). With respect to the very first pic, the flash was accidentally activated. I therefore deleted the first .jpg (but not the RAW which is 0649).

Now the problem: The .jpg images were numbered IMG_0651-655. (The deleted .jpg must have been 0650.) However, the RAWs were numbered CRW_0649-654. It appears that my old CRW_0649 (I still have it on my harddrive) has been deleted/overwritten because it is not on the SD card anymore. Moreover, one RAW seems to be missing. (I am quite concerned that this might happen to my precious holiday pics ...)

Should be fixed in the latest CHDK version. Funnel fixed this bug a few days ago.

In addition, I made the experience that the colors of the RAWs significantly differ from the .jpg colors. In particular, this applies to low-light indoor shooting. But also the low-light outdoor RAWs visibly differ from the .jpgs. I am using Lightroom

It is clear that you don't know much about RAW. If you want to know more about this file format check http://en.wikipedia.org/wiki/Raw_image_format (http://en.wikipedia.org/wiki/Raw_image_format).

"Raw files are so named because they are not yet processed and therefore are not ready to be printed or edited with a bitmap graphics editor."
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 13 / August / 2011, 16:50:19
1. LR is identical to PS. Both LR and PS are clearly superior to RAW therapy. It is very burdensome and difficult to adjust the settings (white balance, tint etc) so that the indoor RAWs look close to the .jpgs. The color of the RAWs is way off. This also applies to version 1290. Just tested.

2.
Blablabla: You are clueless. Normally, the RAW color profile makes sure that the LR developed RAWs look identical to the .jpgs. Your generic wiki info ... have you ever developed a RAW? Or made any photos at all? Oh my ...

3.
Notwithstanding the above, I do not complain about the development. By contrast, I am grateful. It just seems to me that color profile needs some further improvement.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 13 / August / 2011, 18:36:20
2.
Blablabla: You are clueless. Normally, the RAW color profile makes sure that the LR developed RAWs look identical to the .jpgs. Your generic wiki info ... have you ever developed a RAW? Or made any photos at all? Oh my ...

Tiz:

First of all you need to read my posts. I know my English is not that good but I also know it's not horrible. My nickname is Blablaat, not blablabla. There is no reason to make fun of my name. Be polite, you don't have to act childish.

Second, I think I developed more RAWs this weekend than you did in your whole life. But I understand your reaction. No hard feelings.

You've got a point when I comes to indoor photography. Especially when you don't use the flash you have to take the time to develop the RAWs. Photos that are shot outdoors are a lot easier. However, a developed indoor shot RAW is still a lot better than the original JPEG.

Undeveloped RAWs (even if you apply the color profile that was provided by the camera) don't have to be the same as the JPEG. You did not read the wiki.

BTW... Are you still using the Adobe Lens Profile I created?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: reyalp on 13 / August / 2011, 19:42:47
Blablabla: You are clueless. Normally, the RAW color profile makes sure that the LR developed RAWs look identical to the .jpgs.
In the case of CHDK raws (not DNG), how raws "look" is entirely between you and your software. CHDK raw contains no metadata at all, and so cannot have any influence over how your software chooses to render them. If you are talking about CHDK DNG, there is an embedded color matrix. If you find the current one to be unsatisfactory, you are welcome to suggest improvements or develop your own color profiles to use in your workflow.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 14 / August / 2011, 02:10:17
@Blablaat

We reap what we sow: Your tone was a bit unfriendly/arrogant. That's why I tried to be even more unfriendly and arrogant. But I am still happy to discuss this matter in a more civilized manner.

"You've got a point when I comes to indoor photography. Especially when you don't use the flash you have to take the time to develop the RAWs. Photos that are shot outdoors are a lot easier. However, a developed indoor shot RAW is still a lot better than the original JPEG."

Yes. RAWs are always better than JPEGs. Do you think that DNG color matrix can be improved so that the RAW colors come closer to reality (like the JPEGs)? So far, I had cameras from Canon, Olympus and Sony. The LR RAWs were always very close to the JPEGs. If I correctly remember, the SX220 color matrix was developed on the basis of a test shot made by funnel? Did he have a calibrated monitor (not sure whether this is relevant)?

"BTW... Are you still using the Adobe Lens Profile I created?"

Yes, I do (although I am not sure whether I have the latest version). I any event, am grateful for this lens profile! (Frankly speaking, I did not remember that when I posted my harsh reply. I merely reacted to the words "It is clear that you don't know much ...".) As regards the lens profile, I have two comments: First, it would be great if the latest version of the CHDK port AND the lens profile could be easily found somewhere. Second, I understand that 100% distortion correction (in connection with zero vignetting) results (i) in soft edges and (ii) in a reduced angle of view. I am wondering what's the best compromise (as regards SX220 wide angle shots).  


@reyalp Yes. I was talking about the DNGs and the embedded color matrix.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 14 / August / 2011, 07:36:42
@ Tiz:

Sorry, I did not meant to be unfriendly. I think I chose the wrong words.

Second, I understand that 100% distortion correction (in connection with zero vignetting) results (i) in soft edges and (ii) in a reduced angle of view. I am wondering what's the best compromise (as regards SX220 wide angle shots).

As far as I know the lens profile does not crop the photo to correct the vignetting, if that is what you mean. It corrects the geometric distortion and applies a vignetting model. This last one makes the corners of the photo lighter.

And what do you mean with 'best compromise'. Do you want a profile that corrects the distortion for let's say 50% to maintain a photo with more on it (so to speak).
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 14 / August / 2011, 10:39:11
I have uploaded two versions of the same RAW. (It's a bad picture but it demonstrates what I mean.) Both versions have been developed with LR in the same way (minor amount of exposure correction). However, the lens profile was enabled only with respect to version 2.

Version 1: http://www.abload.de/img/cmp_crw_0126wkd6.jpg (http://www.abload.de/img/cmp_crw_0126wkd6.jpg)
Version 2: http://www.abload.de/img/cmp_crw_0126-2wjcm.jpg (http://www.abload.de/img/cmp_crw_0126-2wjcm.jpg)

IMHO, you can clearly see that the lens profile (i) crops the edges, (ii) stretches the edges in order to correct the distortion (at the expense of soft edges) and (iii) lightens the edges (in order to correct the vignetting). At wide angle the distortion/vignetting of the lens is so strong that you have to cut away a certain amount of the image.

The default profile seems to correct 100% of the distortion (and cuts away a significant amount of the image). With respect to landscape images, I made the experience that about 70% distortion correction is sufficient and gives you a wider angle of view. However, I am not sure whether the profile needs to be changed because LR allows you to apply the profile with custom settings (e.g., 70% instead of 100%).

Version 3 (70% custom settings): http://www.abload.de/img/cmp_crw_0126-3gkhx.jpg (http://www.abload.de/img/cmp_crw_0126-3gkhx.jpg)

What is the latest version of the lens profile? Thx.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Microfunguy on 14 / August / 2011, 11:10:43
Made another av test for Microfunguy.


Thanks !
At last I have got around to testing it.

At 5mm the effect is not too bad and may give a useful increase in depth-of-field for close-ups, though contrast is reduced.

At 70mm the contrast is even poorer and you can clearly see the loss of resolution that I mentioned.


David
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 14 / August / 2011, 12:30:03
IMHO, you can clearly see that the lens profile (i) crops the edges, (ii) stretches the edges in order to correct the distortion (at the expense of soft edges) and (iii) lightens the edges (in order to correct the vignetting). At wide angle the distortion/vignetting of the lens is so strong that you have to cut away a certain amount of the image.

Well, if you take this kind of pictures (really nice photo btw) the geometric distortion is not that important. I could make a profile that only corrects the vignetting but I think you will still have to correct the geometric distortion to get ride of the black corners. It might be easier to, as you suggested, customize the settings yourself.

What is the latest version of the lens profile? Thx.

The version I uploaded was not that different than the profile I created later that week. Therefore I did not uploaded the 'newer' version. The version you are using is based on more photos and should be more accurate.

It would be nice if someone can create a (improved) color profile for the SX220 :)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 15 / August / 2011, 06:23:53
I noticed I missed one BL in movie_rec.c that can cause problems in video recording. Now everything should work.

Thx for the new version. The tester has reported video record works fine.

But there's an issue with the custom AutoISO. The camera is crashed with custom AutoISO. As limit was set 80.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 15 / August / 2011, 18:11:51
Is there already a script providing for interval shooting (time lapse) and, if yes, how can I load the script? Thank you.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 16 / August / 2011, 17:10:22
I copied 2 intervalometer scripts (from the wiki page), placed them into the scripts folder and loaded them. Both seem to work. You just need to make sure that HOLD (review option) is disabled.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 17 / August / 2011, 12:45:33
Funnel, is it possible for you to change the custom autoiso and add faster shutter-speeds? Now we can't go further than 1/1000.

Thx in advance!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 18 / August / 2011, 07:45:00
@Blablaat
It can be done but maybe there's a reason why is implemented like that. I think better leave it like this for now.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 19 / August / 2011, 15:01:05
@funnel Do you believe that the DNG color profile could be improved? I understand that you made the test shots. Do you have a calibrated monitor (or is this irrelevant - I am not sure about the profile creation procedure). Thanks!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 19 / August / 2011, 16:01:42
Yes, it could be better, I'll see what I can do.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 19 / August / 2011, 18:24:56
If I had a color checker I would be into it, but I don't have one :(

How can we help improve the profile?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 21 / August / 2011, 14:17:01
@funnel

I made more test shots with the new beta color matrix. It's not perfectly identical to the jpg colors. But in most cases (lowlight indoor and outdoor), I would say it's better: some colors are more saturated and closer to reality. Under artificial lighting, I would say it might be slightly worse. But you can easily adjust it.

In any case, the new color matrix is much much better than the old one (which had serious problems with red and orange colors).

In my opinion, the new color matrix should be implemented asap.

Example (under artificial lighting the old color matrix turns red into pink):

(https://chdk.setepontos.com/proxy.php?request=http%3A%2F%2Fwww.abload.de%2Fimg%2Fcmp_snap2br27.jpg&hash=ab586e0a4b737786b576c2dc7e374a2b)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 21 / August / 2011, 17:21:55
Ok, thanks for testing it. I posted a patch with the new colormatrix that should be updated in the next changeset.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 21 / August / 2011, 19:41:04
@Funnel: How did you create/improve the profile?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 22 / August / 2011, 01:40:15
Question:

If I correctly understand, the color matrix is embedded in the DNG file. Is it possible to make Lightroom use a separate .dcp file containing the color matrix (and ignore the color matrix embedded in the DNG file)? See also http://dcptool.sourceforge.net/Usage.html (http://dcptool.sourceforge.net/Usage.html)

For instance, this could allow us to use the new, improved color matrix in respect of old DNGs.

Thanks.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 22 / August / 2011, 04:13:17
@Funnel: How did you create/improve the profile?

I used dng4ps2 calculator. Previously it didn't work but now it did the job. I took a pic of the colorpallete from the screen. It's still not perfect and could be improved.
I also tried to calculate it with a custom dcraw build but I got a cannot decode error I couldn't figure out. I'll play with it a little more to make it work.

Question:

If I correctly understand, the color matrix is embedded in the DNG file. Is it possible to make Lightroom use a separate .dcp file containing the color matrix (and ignore the color matrix embedded in the DNG file)? See also http://dcptool.sourceforge.net/Usage.html (http://dcptool.sourceforge.net/Usage.html)

For instance, this could allow us to use the new, improved color matrix in respect of old DNGs.

Thanks.

You can make the dcp colorprofile with Adobe DNG Profile Editor, it's free. I ran it just now against the new colormatrix and it corrects some small differences in a few colors.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 22 / August / 2011, 08:20:10
If we want a good dcp profile we need to make one with a colorchecker. In my opinion the original JPEGs are not always accurate and therefore not usable to correct the DNG.

However, they are pretty expensive and this will do the job. Nice work Funnel!

The colorchecker images could be useful: http://www.babelcolor.com/main_level/ColorChecker.htm#ColorChecker_data (http://www.babelcolor.com/main_level/ColorChecker.htm#ColorChecker_data)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 22 / August / 2011, 15:12:54
I'm using this one I found somewhere in the sx210 thread.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Acuum on 22 / August / 2011, 15:24:38
Hi,

First post sorry if my question has been covered but I'm pulling my hair out, as I can't find the answer!

I've got the SX220, I've formatted my card and copied the contents of:
sx220hs-101a-0.9.9-1302-full_BETA to the root of the SD.

I then turned the camera on using the play button (blue triangle in a square).

If i hold the FuncSet button and TAP Disp. I get the firmware info:
"
Canon PowerShot SX220 HS
P-ID:322C PAL D

Firmware Ver GM1.01A (1.0.1.0)
Adj Ver.. 010.010

Serial No.  NOT GOING TO POST HERE...
"

Now if I press the Menu button, I get the menu come up. This has three Tabs.
Play Tab, File Tab (i think), Settings tab (looks like spanner and hammer)

I can't find Firm Update in any of these.

So, the read me says, if you can't find it
"If by chance that you fail to see the "Firm Update" menu option try pressing your Playback button twice."
Doing this turns my camera off and on again.

The next section of the readme says:
"You might have to wait 2 seconds between presses. When this is done right the lens will retract and go into a power-saving viewer/slideshow playback mode."
However my lens never comes out when I turn the camera on in play back mode.


Also no joy when I switch to play back mode form normal camera on mode.


So... do I have a newer firmware?
Am I an idiot that can't follow instructions or use search properly...
or something else ?

(Further info. When I used ACID and SDMinst to build and SD card I had the CHDK firmware load. but I can't take pictures I think because the writing part of the SD card is so small they can't fit. I understand the multi-partition stuff is not needed on the 2011 model camera, but I included this to explain that I had seen the firmware working, so I'm not sure how to get my camera to recognize the nice new CHDK firmware to run...)

Any help would be very much appreciated, sorry I know this is the porting thread, but there seems to be some other Qs asked so I hope you wont mind.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 22 / August / 2011, 16:32:31
Do not use the SDM inst tools, it's not needed. Make a one partition card, reformat it and copy the contents like you did before, then follow the steps I wrote here http://chdk.wikia.com/wiki/SX220#CHDK_Specialties (http://chdk.wikia.com/wiki/SX220#CHDK_Specialties) . When you are in the menu, from the first playback icon go down until you see Firm Update. It should work.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Acuum on 22 / August / 2011, 16:41:01
Thanks Funnel for the reply Funnel.

I've read those, but alas, Firm Update does not appear in the list.
I keep going down, the last option is Date Stamp, then it wraps back to the top.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 22 / August / 2011, 17:01:09
You can only update in play mode.

@Funnel: but did you took a picture of your screen or did you print the color palette.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 22 / August / 2011, 17:57:17
@Blablaat  I took it from the screen.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 22 / August / 2011, 18:06:25
I've read those, but alas, Firm Update does not appear in the list.
I keep going down, the last option is Date Stamp, then it wraps back to the top.

I assume you have a 4GB+ card. To autoboot you need to write the BOOTDISK bootflag on the sd card. I wrote in the sx230 thread how to do it http://chdk.setepontos.com/index.php?topic=6397.msg70566#msg70566 (http://chdk.setepontos.com/index.php?topic=6397.msg70566#msg70566)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Acuum on 22 / August / 2011, 19:31:58
Thanks for the replies guys.
@Blablaat - yes been trying with it started in play back mode.
@funnel - thanks I've tried an 8GB and a 2GB card.

I must be doing something stupid, but for the life of me, I can't get the menu on play back mode to display the firmware update option.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 22 / August / 2011, 20:25:38
I don't think you did something wrong, if your device is OK there has to be a firm update option in playback.

So you put the device in playback by pressing the PLAY button (for a few seconds) right? When you 'scroll' down on the first tab there is no "Firm Update..." option?

I would send it back to Canon, there has to be something wrong with your camera.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: fe50 on 23 / August / 2011, 01:21:25
I would send it back to Canon, there has to be something wrong with your camera.
:lol

@Acuum:
- format your SD card in the camera (with the Canon menu)
- capture at least one still image, make sure this image is shown in playback mode
- download the CHDK package for your camera,
- unzip all files from the package to the card's root using your card reader
- on a Mac make sure to remove quarantine flags etc.
- make sure the file PS.FI2 from the dl package is stored in the card's root folder,
- make sure that all the files are written correctly to the card, e.g. use the "Remove
  safely" button (Windows) or dismount the card before removing
- setup the camera to some "standard" settings, i.e. Auto or Av/Tv/M mode, no scene mode, not video mode...
- start the camera in playback mode, enter the Canon menu, look for the menu item...

If the "Firm. Update" menu item is not visible,
the camera does not see the PS.FI2 file,
this is often caused by some stupid OS's stupid file attributes/flags...


On a Mac, read  this FAQ  (http://chdk.wikia.com/wiki/FAQ/Mac) and especially the  Still having trouble (http://chdk.wikia.com/wiki/FAQ/Mac#Still_Having_Trouble.3F) section there carefully !
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vyncere on 23 / August / 2011, 12:26:25
Hello everyone,

Thank you very much funnel for your great work. ^^

I'm new on this forum, I just registered in order to contribute with some feedback.

1) About ISO Overriding :

There is something weird. The ISO Exif value saved in the images is different of the CHDK overriding value.

Here how I tested this :

- Set CHDK ISO Overriding to 400 (4, factor 100). OSD shows that ISO is overridden to 400, OK.

-> Set Mode P (ISO 100) and shoot : saved image shows ISO 1600 (!).
-> Set Mode P (ISO 200) and shoot : saved image shows ISO 1600 (!).
-> Set Mode M (F5.0, stuck at ISO100 because of 2" Ev) and shoot :  saved image shows ISO640 (!).
-> Set Mode M (F8.0, 1", ISO800) and shoot : saved image shows ISO640 (!).

Is there really something strange or would I miss something ?!

2) CHDK RAW Question :

I successfully managed to read CHDK DNG file with Rawtherapee, UFraw, or Adobe DNG Converter (with wine because I'm a Archlinux user).

But none of them managed to read CHDK RAW files. I expected that at least Adobe DNG Converter would manage to perform this, but no... :(

Do you, guys, manage to deal with CHDK RAW files ?

I use : sx220hs-101a-0.9.9-1304-full_BETA.

Thanks in advance. ^^
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 23 / August / 2011, 12:32:36
@fe50: he/she is aware of the steps... so if he/she read the how-to's there has to be something wrong with the camera.

@vyncere: check if 'tracking af' or 'servo af' is on... if so, turn it off and try again. It should override.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vyncere on 23 / August / 2011, 13:10:25
@vyncere: check if 'tracking af' or 'servo af' is on... if so, turn it off and try again. It should override.

In my first tests, Servo AF was on, and Continuous AF was off. So, let's test with AF functions off.

* TEST2 with : Servo AF and Continuous AF are off, ISO overridden to 400.
- Set Mode P (ISO200) and shoot : saved image shows ISO 640 (!).
- Set Mode P (ISO800) and shoot : saved image shows ISO 640 (!).
-> Set Mode M (F5.0, stuck at ISO100 because of 2" Ev) and shoot :  saved image shows ISO640 (!).
-> Set Mode M (F8.0, 1", ISO800) and shoot : saved image shows ISO640 (!).

It seems there are some conflicts with AF functions... All ISO values are 640, instead of some 1600.

* TEST3 with Servo AF on and Continuous AF off, ISO overridden to 400.
- Same results as TEST1, in my previous post.

* TEST4 with : Servo AF and Continuous AF are all on, ISO overridden to 400.
- Same results as TEST1, in my previous post.

Either the Exif ISO value is wrong, or the ISO overriding function completely fails.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Acuum on 23 / August / 2011, 14:03:03
@fe50 - I did make the disk on a mac as its my only SD reader  I think youll have found the problem! Thanks, I'll test this later.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 23 / August / 2011, 15:07:05
Either the Exif ISO value is wrong, or the ISO overriding function completely fails.
No.

There are two ISO values: 'Market' and 'Real'. The Canon OSD & also Exif data shows 'Market' ISO and CHDK calculated Iso values with the 'Real' ISO.

For your orientation you can say: 'Market' ISO ~ 1.6 x 'Real' ISO. But this is not mathematically correct!

Your ISO value 1600 is odd. Maybe it was a wrong setting.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 23 / August / 2011, 15:13:33
msl is correct. Regading the ISO 1600 the cause was probably the Servo AF turned on. It's recommended to turn both Continuous AF and Servo AF off. Both can cause problems from time to time.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 23 / August / 2011, 15:30:00
I don't have problems with continuous af in combination with autoiso. What problems did/do you have funnel?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 23 / August / 2011, 15:50:00
Sometimes crashes when in custom autoiso in P mode. The romlog shows a ContinuousAF.c assert. Usually happens when pressing half_shoot and releasing it and pressing it again a few times.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vyncere on 23 / August / 2011, 16:08:17
@msl & @funnel : Thank you very much for these precious information.

I will sleep tonight a little less idiot. ^^!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Tiz on 25 / August / 2011, 02:13:26
Just a quick Q: is the new color matrix already implemented in a new built?

It seems to me that the latest built was created on August 23: http://mighty-hoernsche.de/ (http://mighty-hoernsche.de/)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 25 / August / 2011, 02:41:59
@Tiz
Yes, it is.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Blablaat on 25 / August / 2011, 08:21:24
Nice work Funnel! Thx ;)

Is there btw an easy way to add more options to the autoiso override? I tried CHDK Shell but I really don't understand what I'm doing, programming isn't my thing I guess.

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: FrankAZ on 25 / August / 2011, 14:09:35
wrong thread  :o
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 25 / August / 2011, 15:58:45
Hi funnel,

I think it would be useful to make a trunk patch of the firmware version 1.01b.

Some people from various German forums have reported that your test version works. And with a trunk version we get more test results.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 25 / August / 2011, 16:15:09
@msl
Ok, I'll post the patch for it.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: CREPIDULA on 29 / August / 2011, 00:37:00
Lens profile for the Canon SX220 HS:

110710.lcp - 0.02MB (http://www.zshare.net/download/924765843a972435/)

Used Adobe Lens Profile Creator 1.0 (as suggested by Funnel) to create the profile. Shot 45 photos (f8.0, 5mm/7.8mm/20.3mm/35mm). I think it's useless to go further than 35mm (7.0x zoom).

Could anybody share the *.lcp file again? Unfortunately, the file has been deleted.

Thanks and cheers,
CREPIDULA
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: onesky on 29 / August / 2011, 05:43:50
there is any special reason why the exif data doesn't coincide with the shot's parameters?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 29 / August / 2011, 15:56:53
@onesky
Which data? ISO, Av, Tv?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: marcobolten on 04 / September / 2011, 16:26:24
Hi,
again, thank you all, especially funnel, for the marvellous work and all the efforts you put into this.
Sorry to bring up this rather insignificant thing again, but it seems as if the game colours are not chosen sensibly again. It already had been better some versions before, but never really cool. In "Connect 4" and "Reversi" the player's colours are barely distinguishable and the grids are missing entirely.

In my A570 IS the colours are fine. I hope that the Sx220 doesn't have a systemic problem here and can do the same:

Connect 4:
Background: light gray
Grid: blue
Stones: red / yellow
Font: white
Info area background: black
Info area current score font: opponent's colours
Info area other font: white
-----
Mastermind:
Background: dark gray
Grid: light gray
Choosable colors, left to right: blue, green, yellow, orange, brown
"Correct place" indicator: black
"Only colour correct" indicator: white
Font: White
-----
Reversi:
Background: dark gray
Grid: light gray/darkgray
Stones: black/white
Font: white
-----
Sokoban:
Background: dark gray
Walls: light gray
Cursor: green
Movable stones: orange
Target fields: blue

Any chance to set these? I would be so happy!

One embarassing thing to tell the world: I cannot, by th life of me, finish the first level of the Sokoban game. I have the feeling it might be logically impossible. But then again, sometimes I am just too blind to see.... Did anyone manage to get into the second level??

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 04 / September / 2011, 18:03:44
In my A570 IS the colours are fine. I hope that the Sx220 doesn't have a systemic problem here and can do the same:
The SX220 has another color palette as the A570. And the colors of the games are hard coded with the color code of the first chdk cameras.

In CHDK-DE I made some color adjustments in the games. That should solve this problem. I have used only the colors from defined paletts.

http://my-trac.assembla.com/chdkde/changeset/781 (http://my-trac.assembla.com/chdkde/changeset/781)

You can try CHDK-DE from our autobuild: http://forum.chdk-treff.de/download.php (http://forum.chdk-treff.de/download.php)

Delete or rename german.lng in sub dir CHDK/LANG for English as default language.

Btw, the games are not the most important parts of CHDK.  ;)

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: marcobolten on 04 / September / 2011, 21:29:42
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vyncere on 05 / September / 2011, 14:39:50
Hello guys,

I have noticed something weird when I use the Manual Focus with CHDK loaded. I would appreciate to know if you have the same issue as me.

When the camera (in mode P, M whatever) is in Manual Focus (MF) mode, when I launch the Alt-Menu it shows me on the OSD the values for the Override Subject Distance :

- SD : 0
- FACTOR : 0

Without being in the CHDK Menu Extra Photo Operations :

* FACTOR : The PAD (Left + Right) button changes the FACTOR value without any glitch. (No problem)

* SD :
- If I click on the PAD (Down) button, the SD value changes to 1537.
- If I click on the DISP button (to do a DISP+SET combo) the SD value jump to 65535 and the CHDK is completely stuck to this value. (Problem)

The only solution I found to reinitialize the SD Value is to overwrite my configuration file.

Being in MF Mode and activate the CHDK Menu, since you have to click on the DISP button to quit the menu... you're screwed !

What about you ?  :)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 05 / September / 2011, 14:57:44
@vyncere

You should change the default ALT(disp+set) button to somehing else (playback or video) to avoid the problem. You can change it under Miscellaneous stuff -> <ALT> mode button.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vyncere on 05 / September / 2011, 15:57:00
Thanks funnel !
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: xicemanx on 15 / September / 2011, 05:37:54
Hello,

I try, without succes, to install the last version (1.01B - sx220hs-101b-0.9.9-1339-full_BETA.zip), but it doesn't work !!
No problem with the version 1.01A... but the "B" !!!
When i launch the update firmware process, the camera shutdowns... and nothing happens.
Is there another version that works good ???

Another question : is it possible to have a faster intervalometer (I would like to take 1 photo / sec) ???

Thanks
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 15 / September / 2011, 07:42:08
I try, without succes, to install the last version (1.01B - sx220hs-101b-0.9.9-1339-full_BETA.zip), but it doesn't work !!
No problem with the version 1.01A... but the "B" !!!When i launch the update firmware process, the camera shutdowns... and nothing happens.
CHDK is not a firmware update! Your camera has the firmware version 1.01a and you need CHDK for this firmware version. A camera with version 1.01b needs CHDK for 1.01b. So simple it this.

Another question : is it possible to have a faster intervalometer (I would like to take 1 photo / sec)
That's not so easy. You must use the continuous mode in a script. Here is an example: http://chdk.wikia.com/wiki/User:Fe50#fast_shooter (http://chdk.wikia.com/wiki/User:Fe50#fast_shooter)

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: xicemanx on 15 / September / 2011, 08:32:38
Many thanks MSL.

I have undestood :-)

I will try your script.
Thanks
Regards.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: bkpizza on 16 / September / 2011, 02:37:22
Hi guys, just upgraded my A480 to this camera and have been trying out CHDK on it. Everything is working fine, apart from the camera will sometimes just turn off, mostly when I am focusing on a subject. Then when I turned it on again, it could not read any of the photos on the card.
The other thing is occasionally the DISP button toggles RAW mode, but only when I do not actually want it to, any way around this? Thanks
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 16 / September / 2011, 04:05:36
Everything is working fine, apart from the camera will sometimes just turn off, mostly when I am focusing on a subject. Then when I turned it on again, it could not read any of the photos on the card.
Do you use the recent version from autobuild server? You must post your firmware version. We have no oracle. ;)

The other thing is occasionally the DISP button toggles RAW mode, but only when I do not actually want it to, any way around this?
Change the ALT button, see also here: http://chdk.setepontos.com/index.php?topic=6241.msg72801#msg72801 (http://chdk.setepontos.com/index.php?topic=6241.msg72801#msg72801)

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: bkpizza on 16 / September / 2011, 04:40:27
Sorry, am running SX220 with 1.01b and the latest autobuild - sx220hs-101b-0.9.9-1341-full_BETA, I have figured out the RAW problem, I did not realise that it only toggled when in <ALT> mode.
As for the crashing, it happens sometimes when I have focused on a subject but then doing the second half on the shutter button causes the screen to go black. Then turning it on again will make the lens go back in, and the exact same shot with same settings will work perfectly fine.

Thanks for the help MSL
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: It Is What It Is on 17 / September / 2011, 22:32:38
With the SX230 I can't seem to enter <alt> mode with DISP+Func Set, as noted in the Wiki.  I get the usual splash screeen, battery and remaing SD space info. Any ideas what I am doing wrong?  Am running SX230HS w/sx230hs-101b-0.9.9-1341-full_BETA.  Have both SD990 and S95 and use with no problems. 
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: golizw on 06 / October / 2011, 11:55:54
hi,
i am a new dummy with experience in digital foto (Casio, Panasonic ,Canon sx220 HS 1.00.A)
CHDK running , but:
superfine file is about 5% less than fine f.i. sfine 2.6 MB fine 2.4 MB.
How goes? Quality is no significant difference.
I am looking for perfect stereo-video with exact 25 f/s
axgoli
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 06 / October / 2011, 13:31:00
superfine file is about 5% less than fine f.i. sfine 2.6 MB fine 2.4 MB.

Hello and welcome,

at the moment the superfine setting does not work for the SX220. This is a compromise for the work of other important features.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: marcobolten on 09 / October / 2011, 04:05:26
Hi again, I'd love to use the lens profile that blablaat created. Is there any possibility to download it somewhere? There is an expired link far back in this thread, blablaat, would you be so kind to upload it again somewhere? I'd gratefully appreciate a possibility to correct my pix, being on a "once in a lifetime" journey for the next months. Thank you all for your efforts, I wish I could contribute to the work.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 09 / October / 2011, 16:38:55
@marcobolten
Lens profile reuploaded here http://www.box.net/shared/hkjpohblnjzdc0g97t6p (http://www.box.net/shared/hkjpohblnjzdc0g97t6p)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: marcobolten on 12 / October / 2011, 05:01:20
Hi, thank you so much for uploading it! Please forgive me if I ask a stupid question - I am still struggeling to understand the profiles matter. The file you uploaded is a .dcpr file, thus a recipe file for a camera profile. I did not succeed in getting the lens correction info out of it. I tried it with DNG Profile Editor, Lens Profile Creator V1.02, Camera Raw, PsCS3, Lightroom 3.4... Is it a wrong file or do I just not understand how it works? Thanks for yor effort!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 12 / October / 2011, 07:26:34
Copy it in C:\Users\...\AppData\Roaming\Adobe\CameraRaw\CameraProfiles for CameraRaw.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: marcobolten on 13 / October / 2011, 12:49:39
Thank you, funnel!
I've done so and I find the profile in the camera calibration - but when I apply it, it only corrects the colours, not the lens distortion. Is it possible, that my Camera Raw version (4.6) is too old? Unfortunately I was not able to use the 6.5 update installer from Adobe. It should work in my Lightroom 3.4, though - but there is the same problem - I don't find anything of it in the lens corrections, applying the calibration profile only changes colours lightly. Any ideas? I am so despaired by now...
Was it right that I had to open the file in the DNG Profile Creator first and save it as DCP? I am so sorry to bother you with this.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 16 / October / 2011, 17:28:35
Here's the correct lens correction profile http://www.box.net/shared/u2yr7af9c47dlho7hys6 (http://www.box.net/shared/u2yr7af9c47dlho7hys6)
Copy it in C:\Users\...\AppData\Roaming\Adobe\CameraRaw\LensProfiles\1.0  folder.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: marcobolten on 22 / October / 2011, 12:39:50
It works!! *dancing* Thank you _soo_ much, funnel!! Now I am all bright eyed and bushytailed. C'mon, photos, let's get it on with...  8)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Nestkast on 03 / December / 2011, 16:53:16
Hi,

CHDK is working fine on my sx220.

I have only one problem so far when I try to connect with an usb cable to my computer, to use ptpCamGui I got an error on the display of my camera, Error E41 and the camera shuts down. Without running chdk I can connect to the computer. The problem exist only with the libusb driver installed (needed for ptpcamgui).

I am using:
ptpCamGui2.0.113
Windows 7 64 bit
libusb-bin-1.2.5.0
ixus220_elph300hs-101c-0.9.9-1446-full_ALPHA



Title: Re: PowerShot SX220 HS - Porting Thread
Post by: whim on 03 / December / 2011, 18:42:14
@Nestkast

If memory serves, usblib is not compatible with Canon's usb driver (called 'CAlib8' or sth like that - I never
use Canon bundled stuff).
Disable said driver in Device Manager and it should work. If not, maybe check and/or post in 1 of the
ptpCamGui threads:

   Original (German) thread (http://forum.chdk-treff.de/viewtopic.php?f=7&t=2207)
   Thread on this forum (http://chdk.setepontos.com/index.php?topic=6285.0)

hope that helps,

wim

[Edit] Copy paste error or posted in wrong thread ?  ??? ixus220 is not sx220
     
Quote
... ixus220_elph300hs-101c-0.9.9-1446-full_ALPHA
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Nestkast on 03 / December / 2011, 20:07:06
@Whim

Thanks for the fast answer! The problem is I that I can't find an CCAlib8 usb driver installed or a service like that running. When I connect the camera without chdk running the libus driver show up in device management.
I can reproduce the E41 error on my cam with another computer without the canon software installed.

And yes I have an ixus220, so posted in the wrong thread.





Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Guillaume on 14 / December / 2011, 09:01:19
I'm having problems opening the RAW files created by the SX220: I can't convert them with the tools described in the FAQ, like DNG4PS-2 and DCRAW. I read that Picasa supported some of the CHDK-made RAW files directly, but it failed to import mine as well. Lightroom didn't work either. How do you convert them?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: waterwingz on 14 / December / 2011, 09:06:35
Save them as DNG format in your camera.    CHDK RAW is not really a file format - its just a raw dump of the sensor data from your camera.  Until the authors of the software packages learn about the existance of yet another CHDK supported camera there is not much else you can do.

Here's a little reading :
 
 link> CHDK Wiki Page about RAW (http://chdk.wikia.com/wiki/Raw)
link> CHDK Forum thread on RAW (http://chdk.setepontos.com/index.php?topic=1532.msg13819#msg13819)
link> CHDK Wiki Page about Raw Software (http://chdk.wikia.com/wiki/Software#RAW_Conversion)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Guillaume on 14 / December / 2011, 10:24:08
Save them as DNG format in your camera.    CHDK RAW is not really a file format - its just a raw dump of the sensor data from your camera.  Until the authors of the software packages learn about the existance of yet another CHDK supported camera there is not much else you can do.

Here's a little reading :
 
 link> CHDK Wiki Page about RAW (http://chdk.wikia.com/wiki/Raw)
link> CHDK Forum thread on RAW (http://chdk.setepontos.com/index.php?topic=1532.msg13819#msg13819)
link> CHDK Wiki Page about Raw Software (http://chdk.wikia.com/wiki/Software#RAW_Conversion)

Thanks for your reply. I know that a RAW file just contains a dump of the sensor data, but I assumed that there should be at least one tool to convert it. Guess I assumed wrong, then?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: waterwingz on 14 / December / 2011, 10:33:14
Thanks for your reply. I know that a RAW file just contains a dump of the sensor data, but I assumed that there should be at least one tool to convert it. Guess I assumed wrong, then?
I asked about that a few days ago in another thread and did not get any interest from the group.

Here's the only things I have found :

link> Decoding CHDK RAW images from a new cameras (http://chdk.setepontos.com/index.php?topic=5855.msg59260#msg59260)
link> rawconvert.c (http://chdk.wikia.com/wiki/CHDK_Tools#rawconvert.c)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 14 / December / 2011, 11:54:02
Thanks for your reply. I know that a RAW file just contains a dump of the sensor data, but I assumed that there should be at least one tool to convert it. Guess I assumed wrong, then?

Try the attachment. This is a package with program DNG4PS2 & reg files for the SX220 and SX230. Install the program and than execute the SX220 reg file by double click. Now you can select the SX220 in DNG4PS2. The color matrix is copied from CHDK source code.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: tomr on 17 / December / 2011, 11:26:36
Hi all,

I have recently bought a new sx220, and was looking at putting CHDK onto it (never used it before), but my firmware is GM1.01C (1.0.1.0). I have looked through this thread and can't see that the software is being altered to work on 1.01C. Is there a build that will work, or if not is there anything I can do to help speed up the process?

Thanks!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: waterwingz on 17 / December / 2011, 11:41:54
I have recently bought a new sx220, and was looking at putting CHDK onto it (never used it before), but my firmware is GM1.01C (1.0.1.0). I have looked through this thread and can't see that the software is being altered to work on 1.01C. Is there a build that will work, or if not is there anything I can do to help speed up the process?
How did you determine your firmware version ?

Unless you see otherwise in the forum,  you could try the 1.01B build and see if it works.  On several CHDK camera,  small changes by Canon made high enough up in the firmware make no difference to CHDK and so the same CHDK build is used for 2 firmware versions.

As far as speeding things up,  there is no 1.01C version at http://www.box.com/chdk (http://www.box.com/chdk) so you could start with doing a firmware dump and posting it here.
http://chdk.wikia.com/wiki/Canon_Basic/Scripts/Dumper (http://chdk.wikia.com/wiki/Canon_Basic/Scripts/Dumper)

And, as you are new here (welcome),  you might want to review this :

link> CHDK FAQ : My camera isn't ported yet (http://chdk.wikia.com/wiki/FAQ#Q._My_camera_isn.27t_ported_yet._Is_a_port_planned.C2.A0.3F_When_will_it_be_ready.C2.A0.3F_How_can_I_help.C2.A0.3F)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: tomr on 17 / December / 2011, 13:46:23
waterwingz,

Thanks for the quick reply. I got my firmware version using ver.req. I have tried the 1.01b, and I am pleased to say that it works! :)

Thankyou for your help!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Guillaume on 19 / December / 2011, 13:05:42
Thanks for your reply. I know that a RAW file just contains a dump of the sensor data, but I assumed that there should be at least one tool to convert it. Guess I assumed wrong, then?

Try the attachment. This is a package with program DNG4PS2 & reg files for the SX220 and SX230. Install the program and than execute the SX220 reg file by double click. Now you can select the SX220 in DNG4PS2. The color matrix is copied from CHDK source code.

msl
Thank you sir! This worked just perfectly!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Guillaume on 20 / December / 2011, 11:57:41
I tried to apply the Lens Profile from http://chdk.setepontos.com/index.php?topic=6241.msg74486#msg74486 (http://chdk.setepontos.com/index.php?topic=6241.msg74486#msg74486) in Lightroom, but that gives me real strange results: the whole photo is completely warped. For example, the Scott Monument (Edinburgh) is completely deformed, not even standing upright anymore. How are results with you guys?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: lpf on 20 / December / 2011, 15:47:12
Hi, my first post...
Just a question from your experience: I did not managed to have faster shutter
speeds than 1/3200 or slower than 15 secs (the range that the sx220 has already).
I'm I doing something wrong or what I have to pay attention?
PShot SX220HS 101C, running sx220hs-101b-0.9.9-1491-full_BETA.
Thanks for patience.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: fe50 on 24 / December / 2011, 05:20:59
Hello & welcome !

Just a question from your experience: I did not managed to have faster shutter
speeds than 1/3200 or slower than 15 secs (the range that the sx220 has already).
Set your overrides (e.g. faster/slower Tv) in the CHDK Menu --> Extra_Photo_Operations (http://chdk.wikia.com/wiki/CHDK_User_Manual#Extra_Photo_Operations).
Note: The Canon OSD doesn't show values outside the range the original firmware knows, the same applies to the EXIF meta data...
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: lpf on 24 / December / 2011, 06:22:32
Many thanks fe50
so I 'm trying to set a value in EV mode and then how can I check the actual shutter speed? Is there any EXIF reader that can read correctly?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: fe50 on 24 / December / 2011, 08:24:08
so I 'm trying to set a value in EV mode and then how can I check the actual shutter speed? Is there any EXIF reader that can read correctly?
Most cameras contain additional meta data including the "real" shutter speed in the EXIF makernotes section.
Phil Harvey's great EXIFTOOL (http://www.sno.phy.queensu.ca/~phil/exiftool/) let you view & edit all EXIF data...

Apart from that you may check brightnes etc., for fast shutter speed read also  this wikia article (http://chdk.wikia.com/wiki/Samples:_High-Speed_Shutter_%26_Flash-Sync)...
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: lpf on 24 / December / 2011, 12:44:35
after 2 hours testing, using CHDK with my SX220HS, I can have the same shutter speeds as the camera operates (the fastest shutter s 1/3228 checked with 3 Exif readers).
Maybe the problem is that I use CHDK for firmware 101B & the camera has 101C? Seems stupid...
In general this version seems to work with this SX220. Thanks.
PS Xmas ...coming!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: nikivan on 18 / January / 2012, 02:09:31
I can't enter <alt> mode with DISP+Func Set.  I get the splash screeen when powering on. Rinning sx220hs-101b-1.0.0-1571_BETA. Any suggestions?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: fe50 on 18 / January / 2012, 02:28:26
I can't enter <alt> mode with DISP+Func Set.  I get the splash screeen when powering on. Rinning sx220hs-101b-1.0.0-1571_BETA. Any suggestions?
Press & hold DISP, then press FUNC Set immediately...
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: nikivan on 18 / January / 2012, 13:38:09
I can't enter <alt> mode with DISP+Func Set.  I get the splash screeen when powering on. Rinning sx220hs-101b-1.0.0-1571_BETA. Any suggestions?
Press & hold DISP, then press FUNC Set immediately...

Thanks. I was doing exactly that, but for some reason it was not working. Finally after 20+ attempts it worked. I've seen the same happening with my SD4000. Interesting.

On another note, I have a script that works OK with SX200 but not with SX220. It has a section to recognize if the camera is in continuous mode. It calls function get_drive_mode and checks if it returns 1. Was that changed, and what is the code for the 'drive' mode now?

Thanks.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 20 / January / 2012, 06:05:20
Quote
On another note, I have a script that works OK with SX200 but not with SX220. It has a section to recognize if the camera is in continuous mode. It calls function get_drive_mode and checks if it returns 1. Was that changed, and what is the code for the 'drive' mode now?

get_drive_mode on this camera returns 3 only if the camera is in custom timer mode.

To detect if the camera is in countinuous drive mode you can manually get the prop value with "get_prop 102". This will return 1 for continuous and 2 for continuous AF.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Pegasus286 on 24 / January / 2012, 07:26:38
Before I start I'd just like to say how great the CHDK software is.  I am however having a problem with the RAW files that the software creates on the sx220.  Basically,  Although with a bit of fiddling I can open the DNG files, the DNG images look dark and of much lesser quality than the eqivalent canon standard jpg.  I have tried following 'msl's advice (above) using DNG4PS2 but the images again appear dark and fish-eyed.  Is the difference in quality likely to be correction software run by the camera or am I doing something wrong with the raw files?  Any help much appreciated.
Title: PowerShot SX220 Firmware 1.01C
Post by: lpf on 24 / January / 2012, 14:06:45
Hello
I just want to ask if someone is currently working on this firmware version (1.01C). I'm asking, because I have not the expected results (using the 1.01B version) regarding mainly shutter and aperture overrides.
If I am supposed to do something from my side, it will be a pleasure to help.
Thanks.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: gerg0 on 01 / February / 2012, 03:51:18
Hello everyone!
I just bought an SX220HS a month ago. It has 1.01C FW. Can I run 1.01B CHDK FW on it?
Thanks
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 03 / February / 2012, 04:53:40
1.01C owners please upload the firmware dump using the Universal dumper script from the CHDK wiki page and post the link. Thanks.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: juergen312 on 04 / February / 2012, 08:22:16
I managed to download the firmware of my sx220hs, 1.01C  :)
Here's the link to the file:
http://www.box.com/s/xh3da07sxyjz6403dapq (http://www.box.com/s/xh3da07sxyjz6403dapq)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 04 / February / 2012, 16:08:34
Thanks. I made a hex comparison between 1.01B and 1.01C and both firmwares are exactly the same except the version name and build date.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: lpf on 05 / February / 2012, 03:49:23
Hi funnel
after testing I cannot override shutter speed (need to have speeds up to 1/10000). I have the 1.01C version and use 1.01B CHDK. Where to look for? The aperture can be closed up to F11 sometimes, but the shutter up to 1/3200 only.
Thanks
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Microfunguy on 05 / February / 2012, 06:50:48
need to have speeds up to 1/10000)....  but the shutter up to 1/3200 only.

Do you think the 1/10000 is 3x faster than the 1/3200 ?

It is almost certainly hardly any faster.

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: lpf on 05 / February / 2012, 07:04:00
In the past I used speeds up to 1/40000 (freezing action with flash in black environment). So in my experience, there is a difference between 1/3200 & 1/10000 or 1/20000. Thats the reason I bought this camera, to use it with CHDK. I all want to know if it is possible, with my camera...
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 05 / February / 2012, 13:51:30
How did you determine the max shutter speed? The EXIF data doesn't get updated below 1/3200s. According to my tests by looking at the histograms the fastest shutter speed is about 1/25600s.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: reyalp on 05 / February / 2012, 15:24:27
In the past I used speeds up to 1/40000 (freezing action with flash in black environment). So in my experience, there is a difference between 1/3200 & 1/10000 or 1/20000.
If you are using flash as your only illumination, the camera shutter speed is basically irrelevant. Flash is very very fast.

These high shutters speeds are of very limited use, there's few scenes with enough light and few things that move fast enough to matter. The intersection is very small...

How did you determine the max shutter speed? The EXIF data doesn't get updated below 1/3200s. According to my tests by looking at the histograms the fastest shutter speed is about 1/25600s.
The Canon maker note is more likely to reflect the actual override speed, although that doesn't provide evidence that it actually worked... only comparing the actual image values can doe that.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: lpf on 08 / February / 2012, 14:43:16
How did you determine the max shutter speed? The EXIF data doesn't get updated below 1/3200s. According to my tests by looking at the histograms the fastest shutter speed is about 1/25600s.

Assuming that you 're taking a picture of a bulb, with F8 & 1/2500. This will give a result. With F11 & 1/1250 will give the same. With F8 and 1/5000 the result will be 1 stop darker and with 1/10000 2 stops darker. Sorry but these are basics. So what is the reason to see EXIF when you are able to see the picture?
My tests prove that any override setting faster than SX220's fastest shutter speed gives the same optical result, 1/3200.
When I used EXIFTOOL found this number: 1/3228.
Please, how do you inspect the histograms? Using Adobe Bridge?

As found in the CHDK pages other (mainly older Powershots) can really shoot fast. I hope that a solution can be found in the future.
Thanks.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: reyalp on 09 / February / 2012, 01:46:17
My tests prove that any override setting faster than SX220's fastest shutter speed gives the same optical result, 1/3200.
On some cameras (starting around the SX10, IIRC), this would happen if the CHDK port does not implement exp_drv_task (extra long exposure support, but this also enables faster exposures on some cams)

However, looking at the source, this appears to be implemented. Perhaps it's not done correctly, or canon has changed things again.

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 09 / February / 2012, 05:52:45
My tests prove that any override setting faster than SX220's fastest shutter speed gives the same optical result, 1/3200.

Works fine for me (FW 1.01a). My test environment: Av mode F4.0, ISO3200, Tv overrides 1/3200, 1/4000, 1/5000, 1/6400. I can see differences in the canon histogram & in the brightness of the pictures.

But maybe there is a problem in Tv override function for the FW 1.01b (= 1.01c). In German CHDK forum was reported, that long exposure times (>15s) with FW 1.01c not work. It would be nice if funnel could check this.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: lpf on 09 / February / 2012, 14:46:47
It definitely works up to 128 seconds as my tests show. Here are some attachments. The photos taken on a table, with an 100W ceiling lamp, dimmed as low as possible.
For the problem of fast shutter speeds I have rather good news, but I prefer to work a few days on it and I will post my results. Sure the CHDK works !!! it was my fault.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: lpf on 10 / February / 2012, 12:43:19
I now can say (with my apologies) that SX220HS FW 1.01c really works fine, regarding overrides. I tested the camera from 2 minutes up to 1/100k ( I'm sure that 1/64000 is usable).
Never trust EXIF data, only your eyes.
For the moment I'm sending two photos taken with simple "hardware": One Led lenser, 200lm as main light, one dish and some drops. The results are not worthy of a prize but can show the action.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: harsh on 15 / February / 2012, 02:37:47
I managed to download the firmware of my sx220hs, 1.01C  :)
Here's the link to the file:
http://www.box.com/s/xh3da07sxyjz6403dapq (http://www.box.com/s/xh3da07sxyjz6403dapq)


Sorry if it sounds stupid  :( . The file named [SX220HS 1.01C PRIMARY.BIN ] which i have downloaded from[http://www.box.com/s/xh3da07sxyjz6403dapq] is only a single  PRIMARY.BIN file of 16Mb .

But the latest firmware for SX220HS 1.01C at http://mighty-hoernsche.de/ (http://mighty-hoernsche.de/) is of total 5.13 mb and PRIMARY.BIN is of only 224 kb .  :o why is the difference ?? and what does it means ??
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: reyalp on 15 / February / 2012, 03:00:39
Sorry if it sounds stupid  :( . The file named [SX220HS 1.01C PRIMARY.BIN ] which i have downloaded from[http://www.box.com/s/xh3da07sxyjz6403dapq] is only a single  PRIMARY.BIN file of 16Mb .

But the latest firmware for SX220HS 1.01C at http://mighty-hoernsche.de/ (http://mighty-hoernsche.de/) is of total 5.13 mb and PRIMARY.BIN is of only 224 kb .  :o why is the difference ?? and what does it means ??
PRIMARY.BIN is a dump of the original Canon firmware. The stuff files on http://mighty-hoernsche.de/ (http://mighty-hoernsche.de/) are CHDK builds.

These are two completely different things.
Title: Slow burst when CHDK enabled
Post by: nikivan on 06 / March / 2012, 15:05:30
I am experiencing a performance issue when the camera is set to burst mode and CHDK is loaded. With the same card the "native" (CHDK not loaded) burst mode is twice as fast as when CHDK is active. I have RAW mode disabled and I've tried different settings including disabling overrides. There is still something going on every time the camera takes picture, perhaps some background process that slows the things significantly. Can some one comment on this and perhaps suggest a solution?

Thanks,
Nick
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: philmoz on 06 / March / 2012, 15:21:56
I am experiencing a performance issue when the camera is set to burst mode and CHDK is loaded. With the same card the "native" (CHDK not loaded) burst mode is twice as fast as when CHDK is active. I have RAW mode disabled and I've tried different settings including disabling overrides. There is still something going on every time the camera takes picture, perhaps some background process that slows the things significantly. Can some one comment on this and perhaps suggest a solution?

Thanks,
Nick

Are you using the latest version?
There was a recent change that fixed this for the SX40, and may help with the SX220 as well.

Phil.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: nikivan on 06 / March / 2012, 15:36:21
I am experiencing a performance issue when the camera is set to burst mode and CHDK is loaded. With the same card the "native" (CHDK not loaded) burst mode is twice as fast as when CHDK is active. I have RAW mode disabled and I've tried different settings including disabling overrides. There is still something going on every time the camera takes picture, perhaps some background process that slows the things significantly. Can some one comment on this and perhaps suggest a solution?

Thanks,
Nick

Are you using the latest version?
There was a recent change that fixed this for the SX40, and may help with the SX220 as well.

Phil.


I am using sx220hs-101c-1.0.0-1699-full_BETA. Should I revert to the previous version?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: nikivan on 06 / March / 2012, 15:43:38
Update: I've just tried sx220hs-101c-1.0.0-1704-full_BETA, same slow burst mode.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: nikivan on 08 / March / 2012, 18:48:23

Are you using the latest version?
There was a recent change that fixed this for the SX40, and may help with the SX220 as well.

Phil.


Hi Phil,

Any chance this will be fixed for SX220 too? It does not seem to have been fixed yet.

Thanks,
Nick
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: lpf on 09 / March / 2012, 14:01:10
Hello
trying all different  time lapse scripts available, using different settings on the camera, I did not managed to have interval shorter than two seconds. Does anyone know how to be near 1 sec interval and if possible?
My preferred settings: Manual exp, manual focus, no review, no assist lamp.
Thanks.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: waterwingz on 09 / March / 2012, 17:23:12
trying all different  time lapse scripts available, using different settings on the camera, I did not managed to have interval shorter than two seconds. Does anyone know how to be near 1 sec interval and if possible?
My preferred settings: Manual exp, manual focus, no review, no assist lamp.
When you try to get below two seconds,  the time needed to write to the SD card becomes important.  You can try a fast card ( class 10 - assuming you can get one that is really class 10 and not a counterfeit) or have the camera save in a more compressed format.  Try saving the files at the lowest resolution jpg format and see how quickly can shoot?
 
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 10 / March / 2012, 03:35:41
Hello
trying all different  time lapse scripts available, using different settings on the camera, I did not managed to have interval shorter than two seconds. Does anyone know how to be near 1 sec interval and if possible?
My preferred settings: Manual exp, manual focus, no review, no assist lamp.
Thanks.

You could use a script that holds the shoot button in continuous shooting mode.

Like this one
Code: [Select]
@title Continuous:
print ""
print ""
print "Continuous-drive:"
press "shoot_half"
sleep 3000
press "shoot_full"
gosub "waitpress"
release "shoot_full"
release "shoot_half"
print "Done..."
print ""
end

:waitpress
wait_click
return
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: lpf on 10 / March / 2012, 07:50:03
Hello funnel
I'll try this but the camera has to be in continuous or single frame? Thanks.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 10 / March / 2012, 09:57:49
The camera has to be in continuous drive mode.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: lpf on 10 / March / 2012, 12:22:18
Tested ans works great. Very fast shooting. I do not see any parameters...
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 11 / March / 2012, 08:57:59
I am experiencing a performance issue when the camera is set to burst mode and CHDK is loaded. With the same card the "native" (CHDK not loaded) burst mode is twice as fast as when CHDK is active. I have RAW mode disabled and I've tried different settings including disabling overrides. There is still something going on every time the camera takes picture, perhaps some background process that slows the things significantly. Can some one comment on this and perhaps suggest a solution?

Thanks,
Nick

The interesting thing is that this happens only when you start CHDK with the firmware update method. Starting CHDK from a locked SD card solves the slow HQ burst problem.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: maxmars on 11 / March / 2012, 15:15:43
Hi,

first of all thanks for this fine piece of software. I have been using it for a couple of months with great satisfaction. :)

The reason I'm writing here is that I've noticed a weird behavior for the RAW feature since a few releases.

The last one that works right for me is 1704, while both 1717 and 1725 don't.

With the latest releases no matter how many times I set the "RAW" on, whenever I get back to the "RAW" config screen (after having exited and reentered the CHDK menu), the option is turned off and subsequently the camera only shoots jpeg. I can't put my finger on it, but I think  that the "RAW ON" check works backward somehow.

Does it make sense? Any tip?

Thanks,
Max
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: waterwingz on 11 / March / 2012, 15:30:41
The reason I'm writing here is that I've noticed a weird behavior for the RAW feature since a few releases.

The last one that works right for me is 1704, while both 1717 and 1725 don't.

With the latest releases no matter how many times I set the "RAW" on, whenever I get back to the "RAW" config screen (after having exited and reentered the CHDK menu), the option is turned off and subsequently the camera only shoots jpeg. I can't put my finger on it, but I think  that the "RAW ON" check works backward somehow.

Does it make sense? Any tip?
Kind of a long shot, but could you be accidentally be tripping the RAW enable key shortcut ?

http://chdk.wikia.com/wiki/CHDK_User_Manual#Key_Shortcuts (http://chdk.wikia.com/wiki/CHDK_User_Manual#Key_Shortcuts)

Might even be setup wrong for the sx220 ....

Also,  try deleting the CCHDK.CFG file on your SD card.  Another long shot but its the first thing I do when CHDK starts exhibiting unusual behavior.

What mode is your camera in ?  I seem to remember RAW being disabled in sports mode for example but I don't think it resets the menu choice.  I'll take a look at the source.

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: maxmars on 14 / March / 2012, 17:28:54
Yes I've tried deleting the config file, thanks for the suggestion though.

About the accidental tripping: Why would it happen always and in a repeatable fashion only with certain releases?

Anyway, I do have an sx230 hs with firmware 1.01c

Thanks for looking into this, if you need me doing something please ask.

Max

The reason I'm writing here is that I've noticed a weird behavior for the RAW feature since a few releases.

The last one that works right for me is 1704, while both 1717 and 1725 don't.

With the latest releases no matter how many times I set the "RAW" on, whenever I get back to the "RAW" config screen (after having exited and reentered the CHDK menu), the option is turned off and subsequently the camera only shoots jpeg. I can't put my finger on it, but I think  that the "RAW ON" check works backward somehow.

Does it make sense? Any tip?
Kind of a long shot, but could you be accidentally be tripping the RAW enable key shortcut ?

http://chdk.wikia.com/wiki/CHDK_User_Manual#Key_Shortcuts (http://chdk.wikia.com/wiki/CHDK_User_Manual#Key_Shortcuts)

Might even be setup wrong for the sx220 ....

Also,  try deleting the CCHDK.CFG file on your SD card.  Another long shot but its the first thing I do when CHDK starts exhibiting unusual behavior.

What mode is your camera in ?  I seem to remember RAW being disabled in sports mode for example but I don't think it resets the menu choice.  I'll take a look at the source.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: maxmars on 16 / March / 2012, 20:11:12
Everything back to form with 1735 ..  8) Thanks for your time!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 01 / April / 2012, 14:21:58
With changeset 1785/1786 is the default <ALT> button the playback button. A short press is for the <ALT> mode, a longer press is for the original playback funktion.

You can select a alternative <ALT> button in menu 'Miscellaneous stuff' -> <ALT> mode button [Playback, Video, DISP.] .

The combination [DISP. + SET] is no longer available.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: nikivan on 06 / April / 2012, 18:53:55
I am experiencing a performance issue when the camera is set to burst mode and CHDK is loaded. With the same card the "native" (CHDK not loaded) burst mode is twice as fast as when CHDK is active. I have RAW mode disabled and I've tried different settings including disabling overrides. There is still something going on every time the camera takes picture, perhaps some background process that slows the things significantly. Can some one comment on this and perhaps suggest a solution?

Thanks,
Nick

The interesting thing is that this happens only when you start CHDK with the firmware update method. Starting CHDK from a locked SD card solves the slow HQ burst problem.

For me it does not matter how the card is formatted. Burst mode with CHDK loaded drops to about 1 frame per second. Please, can someone look into this? 
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 07 / April / 2012, 05:01:07
Did you try with custom auto iso disabled?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: nikivan on 08 / April / 2012, 17:22:08
Yes, with Custom ISO disabled it is still slow.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 09 / April / 2012, 02:10:21
Download the newest build http://mighty-hoernsche.de/ (http://mighty-hoernsche.de/) and replace the CHDK folder too to force the default settings. Could be related to zebra, edge overlay or histogram stuff...

I tried a few times and works fine on my camera.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: nikivan on 13 / April / 2012, 03:34:38
Download the newest build http://mighty-hoernsche.de/ (http://mighty-hoernsche.de/) and replace the CHDK folder too to force the default settings. Could be related to zebra, edge overlay or histogram stuff...

I tried a few times and works fine on my camera.

I've tried that and it is still slow. Perhaps you could try non-CHDK card and see the difference on your camera? I might capture a short video to demonstrate the issue ...
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 13 / April / 2012, 05:58:21
Yes please, a video would be useful. Does the "Busy" message appear on screen between shots?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: nikivan on 13 / April / 2012, 20:29:50
No Busy message, just a two digit number in the top right corner. I initially thought it is the SD card, but with very fast card (Extreme Pro) it is still slow. Then I just pull out the card and unlock it (so CHDK does not start), put the card back and continuous mode is very fast. So it must be something in the CHDK code that slows it down.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: nikivan on 13 / April / 2012, 22:09:01
Here is the video

 http://youtu.be/u-Ry63oab4Y (http://youtu.be/u-Ry63oab4Y)

I have to correct myself, as I do see Busy message, not sure if this is a clue to what's going on.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 14 / April / 2012, 04:15:23
This is a memory problem. If you really want it to work you would have to compile yourself a version of chdk without chdk in exmem. But this will bring you other memory issues somewhere else. The camera has a limited amout of internal memory to work with and we can't do anything about that.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: waterwingz on 14 / April / 2012, 09:47:20
This is a memory problem. If you really want it to work you would have to compile yourself a version of chdk without chdk in exmem. But this will bring you other memory issues somewhere else. The camera has a limited amout of internal memory to work with and we can't do anything about that.
I think that means that even with CHDK disabled, if he had help down the shutter button longer it would have eventually slowed down.   At some point the camera must run out of memory and the shooting rate would have to slow down until  the camera frees up some memory by writing pictures to SD card ?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 14 / April / 2012, 11:28:48
The jpeg buffer starts at 0x476AA600. When chdk not in exmem the camera can use almost the the entire buffer up to 0x47FFFFFF, which is a total of 9,787,903 bytes which equals to about 3 or 4 jpegs.

When chdk in exmem it is placed at 0x478e67e0 which makes the jpeg buffer only 2,343,392 bytes big and slows down the continuous shooting and also makes the jpeg quality override not work.

A faster SD card helps, that's why I didn't even notice that until now.

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: nikivan on 14 / April / 2012, 13:28:10
This is a memory problem. If you really want it to work you would have to compile yourself a version of chdk without chdk in exmem. But this will bring you other memory issues somewhere else. The camera has a limited amout of internal memory to work with and we can't do anything about that.

Would it be possible for you to create such a build and PM me the link? I really don't know how to do this. Continuous mode is really important for me. I don't use any other CHDK features on this camera,  except for USB remote, so it would be possible to remove some functionality that eats a lot of memory.

As for the SD card, I am using SanDisk Extreme Pro, rated at 45MB/s. Without CHDK it never slows down, I can keep shooting for a minute or two with no problem.

I want to use this camera on RC helicopter and it would be a shame if I'd have to come up with a mechanical solution to trigger the camera. 
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: funnel on 14 / April / 2012, 13:49:31
@nikivan

No problem. http://www.box.com/s/e60df12b6c2501618815 (http://www.box.com/s/e60df12b6c2501618815)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: nikivan on 14 / April / 2012, 14:20:34
Man, you are awesome!!! Downloaded the software and it works, my camera is no longer lethargic. Thank you very much for all your help!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: vls128 on 15 / April / 2012, 01:34:59
Is it possible to use bracketing in continuous mode with enabled RAW?
For example, I want to press shutter once to obtain 3 RAW files with Ev =+1/-1/0.

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: fe50 on 15 / April / 2012, 03:20:46
Is it possible to use bracketing in continuous mode with enabled RAW?
Yes.
Just set the RAW Exceptions from the CHDK menu to your needs...
* http://chdk.wikia.com/wiki/CHDK_User_Manual#Exceptions (http://chdk.wikia.com/wiki/CHDK_User_Manual#Exceptions)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: jhench on 06 / June / 2012, 13:41:39
Hi all,
I have an SX220HS (firmware 1.01C, CHDK sx220hs-101c-1.1.0-1868-full_BETA) mounted on a microscope.

---not so relevant details, maybe continue below ---
I have been using an IXUS70 so far but changed to the SX220HS to record videos at higher resolution. I mostly control the camera through the "ptpcam --chdk" client on linux. There is a major advantage of the SX220HS over the IXUS70 as ptp communication still reacts while recording a video sequence, enabling me to stop recording once the microscope has performed its job. On the IXUS70 I had to submit a lua script that would press "stop", i.e. click("shoot") after a predefined amount of sleep(). On the SX220HS, click("video") just works fine over ptp.
--- here's the thing ---

There are a couple of things that I believe are "bugs" or rather unfinished porting issues. I have set up a compiler CHDK, but I don't see myself capable of usefully altering the source code so that the community could profit. In the end, I would have to try, but I am for now listing the issues that don't work with the above-mentioned camera-FW-CHDK combination. All of these issues occur when controlling the camera via ptp. I am not using the camera's "keyboard".

1. wheel_left(), wheel_right(): no effect in various capturing modes, which is mostly impairing in manual mode.

2. crash after zooming unless "mode selector wheel" is in P position:
-When booting the camera in P position, CHDK boots with a white-on-red startup text. When booting in other modes, e.g. auto, video, it's white-on-organge. Well, this does not really impair functionality, but might help figuring out what's going wrong. As soon as the camera is not booted in P position, switching to record mode still works. However, executing a "set_zoom()" will crash the camera. Thus, to get to manual mode via ptp, I have to send and run the following script:

send "mode 1" via ptpcam

sleep(3000)
set_zoom(115)
capmode=require("capmode")
print("started")
capmode.set(capmode.name_to_mode["M"])


Once this is set (I need a zoom of 115 due to the optics of my microscope), any further zoom change in this mode mostly results in a camera crash.

3. I have been looking through the RAM of the camera and identified some potentially interesting "regions". One might have to do with the image stabilizer.  If you dump the RAM from 0x9A32DD with a size of 68215 bytes using ptpcam (with a tiny modification I could post if anyone wants it), one gets a BW-image (320x ca.200), every 4 bytes are in reverse row order. This image is frequently updated and changes size (crops away information from the edges) as soon as the object in focus is moving. Maybe this RAM location could be of interest to someone.

4. viewport size via "video out": The viewport size via video out is not the same as on the display, it's sort of 4:3. I have connected the camera via one of those dual usb/video-out plugs (can post the pinout) to have usb and video simultaneously. Two of the video pins are short-circuited by the original video plug, telling the camera to change the viewport size. I did not yet figure out how this affects RAM locations. However, all the menus and the viewfinder "bitmap" overlay are changed by the original firmware while CHDK ignores the change and gets clipped off on the right side of the image. This, in turn, would suggest that the viewport RAM locations don't change. All this, however, seems to cause some disturbance in "md_detect_motion()" as the coordinates of the definable viewport regions are not following original conventions. As I need access to the viewport data (with as high framerate as possible), either on the camera or via ptp, I would like to ask whether anyone figured out where to grab the YUV image from the viewport while in "video out display  mode". Here are the approximate potential regions within the RAM that I dumped and that seem to contain some relevant data:

start byte h9A32DD1A9B81F1AD23A61B0B53E   1B446D61B7B25D2001CB429436D84001357
size to read68215155920165665155920155920165665321585487250331330

Any suggestion which buffer I should dump?

5. Does anyone know how to extract the coordinates determined by the "tracking AF"? This feature would be neat in my setup as it could help me track some changes in my specimens. I get a rather high contrast image on the microscope which is "easy" for the canon tracking af.

If anyone would be willing to resolve the above mentioned issues I would do the testing of the code and give feedback. I am working in a scientific setting so I am mostly interested in getting my system to work where the camera is just a part but plays an essential role. I am glad there is CHDK and it already helped me a lot so far. I could compile the code here, set up a svn client to fetch changes but could also test built versions. Ideally, the achievements would find their way into both CHDK and "chdkptp" so that we all could profit.

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Microfunguy on 06 / June / 2012, 17:23:46
I have an SX220HS (firmware 1.01C, CHDK sx220hs-101c-1.1.0-1868-full_BETA) mounted on a microscope.

I cannot help with your specific questions but I am interested in your microscopy setup.

Can you provide further details and how you couple the camera to the microscope ?

I have one of these http://earth2geologists.net/Microscopes/photogallery/Zeiss_UltraphotII.jpg (http://earth2geologists.net/Microscopes/photogallery/Zeiss_UltraphotII.jpg)

(I actually have two but the second body is in a shed).

It is equipped for nearly all techniques including Nomarski incident and transmitted, UV incident, phase contrast transmitted, phase-contrast incident (!), light field, dark field, epi bright field, epi darkfield, etc.



David
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: jhench on 07 / June / 2012, 02:25:56
Hi! This microscope indeed looks great and I am sure you'd profit from a CHDK camera. This is what you can do, if you have a 10x or similar eyepiece.

I hope this helps. All I can tell is that the effort you put into the camera mount pays off. There is a company selling professional mounts (google for lmscope). These things work very well, but they're expensive. And you'll need to really match the lens in the adapter with your particular camera. However, they guys there are very cooperative.

Good luck with your project!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Microfunguy on 07 / June / 2012, 12:54:45
I am sure you'd profit from a CHDK camera

Yes, thanks, I already have this connected to my microscope and even download images via PTP.

Quote
changed to the SX220HS to record videos at higher resolution.

Well, the videos may be larger but not necessarily higher resolution.
By their nature, microscope images do not include a lot of detail.
The higher the magnification, the less the resolution (even though you can 'detect' smaller details).

Quote
-When booting the camera in P position, CHDK boots with a white-on-red startup text. When booting in other modes, e.g. auto, video, it's white-on-organge.

Does the camera remain in Playback mode in both cases ?

Quote
I would like to ask whether anyone figured out where to grab the YUV image from the viewport while in "video out display  mode".


Let us do it another way  ...  describe exactly what you would like the application to do and if there are alternative solutions.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: jhench on 12 / June / 2012, 06:00:06
Hi microfunguy

I noticed the forum was down but now it seems to work again. Thanks for your reply.

Certainly, the resolution of the microscope won't change. However, having more pixels available allows me to see the details I need to see. The low-res video of the ixus70 was just not enough for proper representation of neuronal processes which get basically depicted as 1-pixel lines. This changes to 1-3 pixels on the SD220 and I'm happy. I certainly agree taking 10MP images on microscopes is nonsense even though I know quite some people who think that's useful...

Did you also mount the camera with an eyepiece? Do you have a better solution? Do you have a picture of your setup?

Now back to CHDK on the SD220:

>> -When booting the camera in P position, CHDK boots with a white-on-red startup text. When booting in other modes, e.g. auto, video, it's white-on-organge.
> Does the camera remain in Playback mode in both cases ?

Yes. The camera stays in Playback mode. It only switches to Record mode once I either press a button related to shooting, turn the mode selection wheel, or issue "mode 1" via ptpcam. Then the lens moves out and I am in Record mode.


>>    I would like to ask whether anyone figured out where to grab the YUV image from the viewport while in "video out display  mode".
>Let us do it another way  ...  describe exactly what you would like the application to do and if there are alternative solutions.

I am trying to do motion tracking with the camera. I know some people have done rather advanced tracking using CHDK as a base, but I am worried about simple portability. There are many scientists in my field who would profit from a tracking software that could run on a variety of CHDK cameras that can be mounted on essentially any microscope.

Here are the 2 things I need the camera to do:
1. idendify a contrast-rich moving object (an organism crawling on a slide)
2. move the slide using a motorized stage

part 2 is solved. Part 1 is possible in lua on the ixus70, however I run into "out of memory" errors on the SD220HS. As I need to compare a certain amount of frames "backwards" in time I need quite a buffer. Alternatively, I could split work and send pre-processed data via ptpcam to the PC that moves the stage. That's what I wanted to grab the live view for, either to calculate something from it in lua or after sending it to the PC.

I know I could just go ahead and write everything in C, but then it becomes very uninteresting for most of my biologist colleagues that don't hack electronic devices in their free time. And adding such software into CHDK is probably not interesting to the majority of CHDK users. Thus, making a small application that could (by just defining the viewport characteristics, i.e. start, length, width, height) work with any ptp CHDK camera, would be the most portable thing at the moment. Certainly, I am open for any suggestions!

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: urbazon on 09 / July / 2012, 12:30:42
Hello! Sorry if this question was raised before, I tried searching but didn't find anything related.

I'm using (or at least trying to use :) ) CHDK on my sx220 hs, with GM1.01E firmware. I installed CHDK and it works (I played games :P ) but when it comes to using scripts, my camera "freezes" after the first shot - no matter what script I use. For example, when using Motion Detection script (I used both the simple one from CHDK and AdaptiveMD) it takes one photo, shows it and 'freezes' there, I can't do anything but turn my camera off... It's the same with other scripts... Do I have a problem, or am I doing something wrong?

And one more question, while we're at it: how come I can only activate my camera (after manually starting CHDK) by turning mode-selection wheel - no other button can make the camera to "open" and put out lenses and be ready for using... Again, am I doing something wrong?

Thanks a lot in advance, I really hope that I can figure these out, CHDK sounds very promising!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 09 / July / 2012, 14:28:13
I'm using (or at least trying to use :) ) CHDK on my sx220 hs, with GM1.01E firmware. I installed CHDK and it works (I played games :P ) but when it comes to using scripts, my camera "freezes" after the first shot - no matter what script I use. For example, when using Motion Detection script (I used both the simple one from CHDK and AdaptiveMD) it takes one photo, shows it and 'freezes' there, I can't do anything but turn my camera off... It's the same with other scripts... Do I have a problem, or am I doing something wrong?

Try to turn off the automatic review after shooting in Canon menu.

And one more question, while we're at it: how come I can only activate my camera (after manually starting CHDK) by turning mode-selection wheel - no other button can make the camera to "open" and put out lenses and be ready for using... Again, am I doing something wrong?

Press the shutter half,  when you are in playback mode.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: urbazon on 09 / July / 2012, 15:23:28
@msl - Thanks a lot! Both of your advices helped (although I don't know how/why pressing the shutter didn't work before... but it doesn't matter, now I got it all workin' ;)

Now I have a new "toy" to play with ;) Cheers!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: meanducando on 17 / August / 2012, 08:48:48
Hi Guys
I am trying to use this camera with raw but if i use dng extension all those bad pixels show as back dots, 100's of them, in acdsee. Anyway round this? if u use the crw extension neither the dpp or acdsee can read the file.

on another note, anyway to get super fine for jpegs on this. My camera is firmware A version with the latest chdk.

tx.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 17 / August / 2012, 09:14:58
Which DNG version have you selected?

Version 1.3 works only with newer Adobe products like Lightroom.
Version 1.1 is the better version vor other programs.

Choose the version 1.1 in the RAW/DNG menu. CHDK will prompt you to create the file badpixel.bin. You find a menu entry for that in the same menu.



'super fine' does not work for the SX220. There is issue with the memory management.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: meanducando on 17 / August / 2012, 10:18:41
yeah that sorted it, thanks.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Ilciucci on 28 / August / 2012, 06:51:43
Hello,

I'm new here and I'm using chdk since yesterday. I have a question: what is the best way to save battery when making a timelapse with long intervals? (1 frame every 10 minutes). Can i shut off the lcd screen?

What's the best script to use for this purpose on the sx 220hs?

Thank you
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: waterwingz on 28 / August / 2012, 08:49:21
I'm new here and I'm using chdk since yesterday. I have a question: what is the best way to save battery when making a timelapse with long intervals?
As you might expect, there has been lots of discussion about this over the years.  Search this forum for "battery life".  These are probably the definitive works so far though :
 chdk stuff - a590 power 1 (https://www.box.com/s/tscho3m30j/1/55257469/1370873701/1)
 chdk stuff - a590 power 2 (https://www.box.com/s/tscho3m30j/1/55257469/1370873395/1)

Meanwhile, the general consensis is that you really need an external battery pack for serious intervalometer shooting.

Battery Packs
http://chdk.setepontos.com/index.php?topic=2644.msg24572#msg24572 (http://chdk.setepontos.com/index.php?topic=2644.msg24572#msg24572)
http://chdk.setepontos.com/index.php?topic=6615.msg71495#msg71495 (http://chdk.setepontos.com/index.php?topic=6615.msg71495#msg71495)
http://chdk.setepontos.com/index.php?topic=6207.0 (http://chdk.setepontos.com/index.php?topic=6207.0)
http://chdk.setepontos.com/index.php?topic=5797.0 (http://chdk.setepontos.com/index.php?topic=5797.0)


Quote
Can i shut off the lcd screen?
http://chdk.setepontos.com/index.php?topic=2075.msg19129#msg19129 (http://chdk.setepontos.com/index.php?topic=2075.msg19129#msg19129)
Yes - as you will read in the links above,  either plug in a video cable or insert a wooden split to activate video mode.  Otherwise you can insert a set_backlight 0 into your script.  It needs to be after every shoot is take as shooting turns the backlight back on.    Either way,  you won't save a lot of power.  The camera processors and sensor use most of the batteries power - not the display.

Quote
What's the best script to use for this purpose on the sx 220hs?
The best one is the simplest one that does what you want.  Hard to beat the simple intervalometer script included with the CHDK distribution file and already on your SD card for that.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Ilciucci on 28 / August / 2012, 16:30:12
Ok thank you for your quick answer!

Unfortunately I would like to make a timelapse with the camera inside the waterproofcase WP-DC42. So it becomes a little bit difficult to have an external power supply.

If the processor and sensor use the most energy, do they use it only when the camera makes a picture?
So approximately the camera will make as much pictures when the interval is just 2 seconds or 5 minutes(of course a bit less) before the battery is empty? 

I'm just gonna test how long it takes before the battery is empty while the interval is 10 minutes.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: waterwingz on 28 / August / 2012, 20:19:52
If the processor and sensor use the most energy, do they use it only when the camera makes a picture?
So approximately the camera will make as much pictures when the interval is just 2 seconds or 5 minutes(of course a bit less) before the battery is empty? 
I'm not sure how much difference it makes but taking a picture definitely draws more power that when the camera is idle.  And in the links I posted on the A490, the best battery life is obtained by switching from "shooting" mode to "playback" mode whenever you were not actually taking a picture (with the camera configured so that the lens stayed out when the switch happens).   With your 10 minute picture taking interval,  that could be very useful.

Quote
I'm just gonna test how long it takes before the battery is empty while the interval is 10 minutes.
That sounds like a good place to start - no sense solving a problem that it might turn out you don't have.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: far.in.out on 29 / August / 2012, 05:16:22
hi. i want to try out the
Video exposure control, modified to work on Digic 4 camera's
script. could anyone please build a required version of chdk for sx220 hs and post a link?
thanks in advance.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: pcnets on 26 / March / 2013, 00:32:06
@Tiz,
If you want to try to play the videos over USB from the camera on your computer, you will surely have problems to view them properly. The bitrate is extremely high on the original video (up to over 33 Mbit).
If that is the problem, download the videos from your cam and try again. For me, VLC Mediaplayer (Videolan) works great and without stuttering.
I personally like the 23,976 fps much more than the 30fps from the sx200is. If you are using PAL on your TV, there is only one frame/sec added to the PAL specified 25 fps. On 30fps 5 frames were removed to meet PAL specs and that is really horrible.
I don't think that the monitor refresh rate has anything to do with your problems.
Not heard of such problems until now.

Try to convert the video into another container format like avi, mp4 or mkv. Most systems have problems with the mov container. You don't have to touch the h.264 video stream, only change the container.

The SDHC or SDXC Card can make problems too. For me, Sandisk Extreme 16G with 30 Mbit/sec works great ;)

You you use AppGeeker Video Converter - Handles MOV to MP4 conversion (http://www.ilikemall.com/how-to/convert-mp4-to-mov-mac.html) well, and can convert videos to any other video file format.

Very simple to use.

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: rikbeter on 25 / May / 2013, 15:09:35
I have a problem with the SX220 grid and people said me to post it here cause its a bug.
The problem is that shooting at 3:4 ratio the grid is also at 3:4 ratio but aligned to the left and the camera live preview image is alinged to the middle of the screen. thx Paul
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: waterwingz on 25 / May / 2013, 15:18:02
I have a problem with the SX220 grid and people said me to post it here cause its a bug.
The problem is that shooting at 3:4 ratio the grid is also at 3:4 ratio but aligned to the left and the camera live preview image is alinged to the middle of the screen. thx Paul
from your fbook post :
(https://sphotos-a.xx.fbcdn.net/hphotos-prn1/945053_570652682956935_829782789_n.jpg)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 25 / May / 2013, 15:31:05
Standard grids are designed for 4:3 screens. The grids need to be adjusted for the 16:9 screen of the SX220.

Download package with grids for 16:9 LCD: http://forum.chdk-treff.de/viewtopic.php?p=23676#p23676 (http://forum.chdk-treff.de/viewtopic.php?p=23676#p23676)
Online convert tool 4:3 => 16:9: http://www.c0ol.de/sx220/ (http://www.c0ol.de/sx220/)

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: rikbeter on 25 / May / 2013, 15:32:32
thx MSL!
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: bombolo88 on 03 / June / 2013, 12:56:45
Hi guys,i am new with chdk.
i have an sx220hs camera and i would like to do long shutter speed photos,so i havee put chdk on sd and i set only this parameters on extra photo:

disable overrides: off
override shutter speed value: 20
value factor: 1
shutterspeed enum type: factor

so when i switch to camera mode i see on top left of the screen tv:20.00 correctly but when i take photos,they are all taken at 15 seconds and not 20!why?
thank you very much
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 03 / June / 2013, 15:49:55
Have you measured the time? Or have you taken the value from the exif data?

If exif data:

CHDK cannot write override values in exif data of JPG files if Tv is > 15s. Make a DNG file and you get the correct exif data.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: bombolo88 on 03 / June / 2013, 17:06:10
Have you measured the time? Or have you taken the value from the exif data?

If exif data:

CHDK cannot write override values in exif data of JPG files if Tv is > 15s. Make a DNG file and you get the correct exif data.

msl

Thank you very much now it's all Clear!
Is it dangerous for the camera to take Photos with long shutterspeed value?(more than one minute)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 04 / June / 2013, 11:46:10
Yes & No  :)

You should know what you're doing. One minute direct sun would be a bad idea.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: bombolo88 on 04 / June / 2013, 12:01:27
Yes & No  :)

You should know what you're doing. One minute direct sun would be a bad idea.

msl
Obviously not :P:P
But my question is that this camera has a factory value of 15 seconds for maximum shutter speed value,why not 30 seconds?hardware limitation(noise),overheating or something else?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: blackhole on 04 / June / 2013, 12:55:37
Hardware limitations are one of the main reasons. A lot of megapixels on the sensor size 6x5 millimeters or smaller,always doing a lot of noise. If you look RAW 30 second exposure, you will be clear why Canon limits the exposure to 15 seconds, and why there is no ability to record RAW files.Megapixels are now promotional gimmick.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: bombolo88 on 04 / June / 2013, 13:57:16
Thank you very much guys,now i have all clear  ;)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: pshotuser on 22 / September / 2013, 07:19:48
I have just tried chdk 1.2 on an sx 220 (Firmware Ver GM1.01B) and in every dng there is a right vertical white-red band that i need to crop.

Here is a dng: http://ubuntuone.com/49kAhm5e7Z07H7xtepVugi (http://ubuntuone.com/49kAhm5e7Z07H7xtepVugi)

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: reyalp on 22 / September / 2013, 15:02:19
I have just tried chdk 1.2 on an sx 220 (Firmware Ver GM1.01B) and in every dng there is a right vertical white-red band that i need to crop.

Here is a dng: http://ubuntuone.com/49kAhm5e7Z07H7xtepVugi (http://ubuntuone.com/49kAhm5e7Z07H7xtepVugi)
Thanks for the report. Here's a test build with the active area adjusted based on your DNG. Please let me know if it looks OK so I can check it it.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: pshotuser on 22 / September / 2013, 18:56:15
Just tried against my monitor and seems perfect! Thank you!

I have also a question: is there a way of disabling the popup flash every time the camera is turned on?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: reyalp on 22 / September / 2013, 19:59:31
Just tried against my monitor and seems perfect! Thank you!
Thanks. It will be fixed in autobuild 3124 and later.
Quote
I have also a question: is there a way of disabling the popup flash every time the camera is turned on?
Not that I know of.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: nafraf on 22 / September / 2013, 20:17:03
@pshotuser
Could you test if video recording crash if OSD is enabled? I'm not sure if this bug (http://chdk.setepontos.com/index.php?topic=6397.msg84029#msg84029) affect sx220, It was  solved on sx230 recently.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 23 / September / 2013, 04:57:09
@reyalp
I'm not sure if the active area patch was correct. I can not see any bad areas in my DNG files with the old code. When you are correct also the SX230 is affected!

The SX220/230 was in last years one of the most successful canon models. Many people use CHDK with this cameras. Nobody else has reported this issue in last two years.

I see only some shodows in the corners. But this is because of the lense distortion. Here are my Files with the old code (DNG version 1.3)

DNG file 1 (normal picture): https://chdkde.box.com/s/8yanturct50qk8kilxn8
DNG file 2 (black picture): https://chdkde.box.com/s/o31iwbc5khayacta6l7i

Btw, funnel has made an intensive porting job.

@nafraf
The video capture works fine. There is no OSD problem. But it could be usefull also rework the code for the SX220. I think it is better we have an uniform code with the SX230.


CHDK for the SX220 works fine. There is only one Problem. The option 'super fine' for JPG files is not useable. The file size is smaler as with the option 'fine'. It seems to be a memory problem - read more ine the first pages of this thread.

I also have the feeling, in some cases the file size of the JPG file is smaller as without CHDK. But it is quite difficult to demonstrate this concretely.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: pshotuser on 23 / September / 2013, 05:03:21
@pshotuser
Could you test if video recording crash if OSD is enabled? I'm not sure if this bug (http://chdk.setepontos.com/index.php?topic=6397.msg84029#msg84029) affect sx220, It was  solved on sx230 recently.

I have tried with a pair of fullhd videos with osd and it worked fine.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: pshotuser on 23 / September / 2013, 05:09:19
@reyalp
I'm not sure if the active area patch was correct. I can not see any bad areas in my DNG files with the old code. When you are correct also the SX230 is affected!

The SX220/230 was in last years one of the most successful canon models. Many people use CHDK with this cameras. Nobody else has reported this issue in last two years.

I see only some shodows in the corners. But this is because of the lense distortion. Here are my Files with the old code (DNG version 1.3)

DNG file 1 (normal picture): https://chdkde.box.com/s/8yanturct50qk8kilxn8
DNG file 2 (black picture): https://chdkde.box.com/s/o31iwbc5khayacta6l7i

I see them also in your files, from pixel column 4066.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 23 / September / 2013, 06:12:40
I see them also in your files, from pixel column 4066.

Interesting. Thanks for the test.

What program do you use? I see nothing with Lightroom or the Adobe DNG codec (http://www.adobe.com/support/downloads/detail.jsp?ftpID=5495) as explorer extension. I am afraid that I can not see this strip, because the images are cropped with my software.

But this mean, the SX230 is also affected.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: pshotuser on 23 / September / 2013, 06:18:33
You are right! I normally use raw therapee, and also with dcraw and ufraw i see that problem. With darktable for example seems to me it's already cropped away (sorry but i don't have Lightroom)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: reyalp on 23 / September / 2013, 12:51:13
@reyalp
I'm not sure if the active area patch was correct. I can not see any bad areas in my DNG files with the old code. When you are correct also the SX230 is affected!
Some programs use the "default crop", which CHDK sets as the same size as the jpeg, centered.

Other programs (like irfanview and therapee) use the "active area" which is based on which pixels show image data.

I'm pretty sure my adjustment is right for the active area. Your image shows a white border on the right for me in irfanview. The process I use is as follows
in chdkptp
dngload <filename>
dngdump -raw -rfmt=8pgm

This dumps the full image data as a pgm.

Open the pgm file in gimp, adjust brightness/contrast as needed to see the borders, and measure using the selection tool.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 23 / September / 2013, 14:47:40
You're right. XnView (portable) also shows the stripes. Thanks for the explanation. I will try your chdkptp test later.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Microfunguy on 10 / October / 2013, 08:18:21
I have just tried CHDK on my SX220hs 101b because I wanted to view some flash parameters.

Unfortunately, it crashes the camera.

ROMLOG is attached.

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: waterwingz on 10 / October / 2013, 09:28:32
I have just tried CHDK on my SX220hs 101b because I wanted to view some flash parameters. Unfortunately, it crashes the camera. ROMLOG is attached.
Crashed in the spytask.c so it seems to be CHDK code.  Were you by chance accessing invalid memory locations?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Microfunguy on 10 / October / 2013, 09:32:57
The reason I tried CHDK is because I spent all morning trying to discover why the new code I added to SDM crashed the camera.

I was going to display the so-called "shutter count" on booting.

I will not do that, it is far too risky, who knows how many cameras are affected,I will remove the code ?
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: waterwingz on 10 / October / 2013, 09:38:05
I was going to display the so-called "shutter count" on booting.
I will not do that, it is far too risky, who knows how many cameras are affected,I will remove the code ?
If CHDK accessing flash parameters was risky,  there would be no CHDK running on any camera.  It might be worth knowing exactly what you are doing - your other thread was devoid of application information as well.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Microfunguy on 10 / October / 2013, 09:59:09
It might be worth knowing exactly what you are doing

Using CHDK, in the Debug menu I chose the option to display Parameters page zero.

On exiting the menu, the camera crashed.

That is all.

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: srsa_4c on 10 / October / 2013, 12:56:52
I have just tried CHDK on my SX220hs 101b because I wanted to view some flash parameters.

Unfortunately, it crashes the camera.
According to stubs_entry.S the address of FlashParamsTable is incorrect for 101b. Correct the address in stubs_min.S, recompile, it should then work. Please report back if it does.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Microfunguy on 10 / October / 2013, 13:22:58
Well, I cannot compile CHDK with my toolchain but that fixes the SDM crash so should also fix CHDK.

Nevertheless, I will not add "shutter count" to the splash screen.

Title: Re: PowerShot SX220 HS - Porting Thread
Post by: pshotuser on 15 / October / 2013, 15:31:58
Today i made a burst of three shots (at 1/50s), and i have obtained 3 jpeg and the dng of only the first two. The last one hasn't been saved to the card.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: pshotuser on 24 / April / 2014, 05:19:00
The problem with the missing jpeg had never happened again.

My camera has been updated to firmware 1.01e (assistance), and now i have troubles with a lot of mostly black dots in the picture (i think badpixels?)

I generated a new badpixels.bin but the result is still full of dots.

Here is a raw (generated with the new badpixel, taken at iso 200):

http://ubuntuone.com/3D8i4jndJjdDtnVVnJkuA1 (http://ubuntuone.com/3D8i4jndJjdDtnVVnJkuA1)

The new badpixel and the old one:
http://ubuntuone.com/2pGBaAFB4FOY3GEqsqzBlA (http://ubuntuone.com/2pGBaAFB4FOY3GEqsqzBlA)

http://ubuntuone.com/21wrLZ16MjosemHK7kycFE (http://ubuntuone.com/21wrLZ16MjosemHK7kycFE)

Suggestions?

Thank you in advance.
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: subzero4212 on 07 / November / 2014, 10:01:35
Another similar crash happens when you try to use the manual focus during video recording and apply fast_zoom. The reason why this is happening is because the fast_zoom key isn't diasabled in alt mode. All ports until this one had physw_status up to physw_status[2], this camera look like has up to physw_status[5] and the value in physw_status[3] changes when using fast_zoom. I tried to fix that without success for now.


has the issue with the fast_zoom been solved? Would be nice to have two speeds for zooming

Anyone with experience connecting the sx220 to an RCA monitor while shooting video? The manual suggests this should be possible with both video and stills recording.


Quote
and #define CAM_AF_SCAN_DURING_VIDEO_RECORD.
I removed that because the camera crashes when zooming after calling _MakeAfScan. I found that _DoAflock acts in a similar way but also crashes when I set the camera to manual focus and try to zoom. To avoid trouble I just removed it. Maybe we can find a solution for this later.


so modes available for shooting are either or of
a)continuous AF+optical zoom (stock behaviour)
b)manual focus(after getting into MF mode)+optical zoom by recompiling with CAM_USE_ZOOM_FOR_MF option set to 1
It appears as though the focus lock (by entering MF mode?) -> afscan -> optical zoom -> afscan work flow is crashing the camera. right?

Thanks
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: Totoro on 10 / October / 2015, 17:03:53
Hi, I was using the lens profile on my camera and I wanted to use the color profile too. But since they're made for the SX230 I can't use the color profile on photoshop's camera raw :(

I don't know how can I modify that dcp profile to use it for the SX220 or if I could make camera raw use a profile for the other camera...

Those profiles were posted on the SX230 porting thread on this forum and here

http://www.dpreview.com/forums/thread/3257839 (http://www.dpreview.com/forums/thread/3257839)

or here

http://chdk.wikia.com/wiki/Calibrating_colors_for_DNG_processing (http://chdk.wikia.com/wiki/Calibrating_colors_for_DNG_processing)
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: msl on 12 / October / 2015, 05:31:00
I don't know how can I modify that dcp profile to use it for the SX220 or if I could make camera raw use a profile for the other camera...
Those profiles were posted on the SX230 porting thread on this forum and here
/wiki/Calibrating_colors_for_DNG_processing[/url]
Try this link. There is a collection of profiles: http://chdk.setepontos.com/index.php?topic=9268.msg95545#msg95545 (http://chdk.setepontos.com/index.php?topic=9268.msg95545#msg95545)

You can also edit the sx230 profile. Use a hex editor. Change all sx230 entries with sx220.

msl
Title: Re: PowerShot SX220 HS - Porting Thread
Post by: SX720 on 03 / July / 2021, 11:59:10
Would someone with an SX220 HS be able to perform a very simple test?

Basically all you need to do is switch the mode dial to P, press the "FUNC SET" button, switch the camera to continuous mode, enable RAW mode and then hold down the shutter button for a little while and then tell us if it worked or not.

The reason for this is because the SX230 HS port has a long standing issue where this doesn't work. I found out that the code is different for the SX220 HS so there is a chance (not a guarantee) that the we can pull from the SX220 HS code to fix the SX230 HS code.