Attached is sx170is source directory tree. All files have been modified and values adjusted (unless there's a TODO mark - not too many of them really).
Did take sx510hs port as reference because keyboard layout is same. But sensor is more similar to the a2500 and, as it turned out, keyboard codes were identical to the sx160is. Optical tables (shooting.c) were copied from sx160is. Closest mature (non-alpha) CHDK port was ixus140, so it was taken to comparison also.
The above work was not too hard, mostly pattern matching
Many thanks to the CHDK core developers for making porting this easy!
CHDK in camera kindof works. Some problems still remain and I'm surely too rookie to resolve them by myself. Can anybody help please?
1) All pictures are extremely dark, like some 4 or more stops uderexposed. Disabled all overrides and custom auto ISO but no avail. Since it is my first Canon camera, I'm not familiar with CHDK options also, surely must read more manuals.
2) RAW works but distorts pictures - top half is okay, bottom is garbage. Could it be related to insufficient memory? Camera has only 64M RAM and before switching to OPT_ARAM_MALLOC=1 the raw shooting always crashed camera. Misc->MemInfo displays 244kB free.
In case someone likes to test, I'm attaching image also.