Extra long exposure support for the 1.00c revision.
If somebody with a greater knowledge of DryOS could review the way exp_drv_task is started, that would be great. I simply copied the method from the ixus80 port (which runs the same DryOS revision), but used only one taskCreateHook() function, twice*. Before this change, there was no taskCreateHook() here, all other tasks are started by modified original code, I think.
/platform/sx100is/sub/100c/boot.c excerpt
void taskCreateHook(int *p) { //function taken from the ixus80 port, adapted of course
p-=16;
if (p[0]==0xffc98f18) p[0]=(int)exp_drv_task;
}
//#define DEBUG_LED 0xC02200C4
void boot() { //#fs
long *canon_data_src = (void*)0xFFEBE450;
long *canon_data_dst = (void*)0x1900;
long canon_data_len = 0xf6c4 - 0x1900; // data_end - data_start
long *canon_bss_start = (void*)0xf6c4; // just after data
long canon_bss_len = 0x9F498 - 0xf6c4;
long i;
// Code taken from VxWorks CHDK. Changes CPU speed?
asm volatile (
"MRC p15, 0, R0,c1,c0\n"
"ORR R0, R0, #0x1000\n"
"ORR R0, R0, #4\n"
"ORR R0, R0, #1\n"
"MCR p15, 0, R0,c1,c0\n"
:::"r0");
for(i=0;i<canon_data_len/4;i++)
canon_data_dst[i]=canon_data_src[i];
for(i=0;i<canon_bss_len/4;i++)
canon_bss_start[i]=0;
*(int*)0x1930=(int)taskCreateHook; //from ixus80 port
*(int*)0x1934=(int)taskCreateHook; //from ixus80 port (was taskCreateHook2...)
The camera seems to work ok, extra long expos are available.
Attached is a source patch for chdk trunk rev. 1304.
Edit
Just noticed, this is in the "Firmware dumping" section. I decided to post here, because this was/is this model's porting thread.
Edit 2:
I have found at least the sx220 port doing the same (*) with its taskHook() function, so my version should be ok too.