IXUS 1000 HS Porting Thread - page 31 - DryOS Development - CHDK Forum

IXUS 1000 HS Porting Thread

  • 440 Replies
  • 194724 Views
Re: IXUS 1000 HS Porting Thread
« Reply #300 on: 16 / October / 2011, 15:43:20 »
Advertisements
I compile with chdk-shell V3.36 there come on start a warning requester
ptpcamgui_obfuscated-au3 not foundbut when click on ok, it work.
Post a note about this on the CHDK-Shell thread ?  http://chdk.setepontos.com/index.php?topic=845

Quote
I test then your merge.It work good, zebra is ok too.I only add for security this define to the camera file
 #define   CAM_STARTUP_CRASH_FILE_OPEN_FIX   1            // enable fix for camera crash at startup when opening the conf / font files
I'll add that.

Quote
The 100f have no asm code for open.
What does this mean ?

Quote
the overwrite iso function i test from default code in the propset 4.It do not work.when i set overwrite iso to
400 then camera switch to 640 and do not exposure correct as see in preview. when set 100 camera switch to 160 and exposure is wrong. when set 300 camera switch tp ISO 500 and exposure is wrong
with my old code this work ok.
So we need a way to have your shooting_set_iso_real() code not conflict with the code generic/shooting.c code  ?

Quote
I do not understand, why it not compile, i get the suggestion to overwrite the default function in camera file lib.c
does on G12 and S95 ISO overwrite work ok ?
Is this related to you previous question ?

Quote
But even if the ISO overwrite do not work, chdk is still good usable, maybe the patch file can merge in main chdk source ?
I'd like to get it a bit better cleaned up and then maybe submit as a "alpha" release so that the code is at least archived ?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: IXUS 1000 HS Porting Thread
« Reply #301 on: 17 / October / 2011, 05:26:19 »
Quote
The 100f have no asm code for open.
What does this mean ?
[/quote]

Oh great, i look now on newest source you post, the special asm code for ixus 1000 is now not need anymore.because the mkdirs of older version are change to mkdir_if_not_exist.

the crash i get on ixus 1000 can not happen with this code in chdk currently.

Code: [Select]
        mkdir_if_not_exist("A/DCIM");
#if defined(CAM_DATE_FOLDER_NAMING)
        if (conf.raw_in_dir)
            get_target_dir_name(dir);
        else
            sprintf(dir, RAW_TARGET_DIRECTORY, 100);
#else
        sprintf(dir, RAW_TARGET_DIRECTORY, (conf.raw_in_dir)?get_target_dir_num():100);
#endif
        mkdir_if_not_exist(dir);

in 100d firmware is in 100d/boot.c the asm code.this can remove now, because no special open is need.

Code: [Select]
//IXUS 1000 100D

int fsionotify_compfail = 0; // count of number of times the file handle was already in the array
int fsionotify_success  = 0; // count of number of times the code succeeded

int __attribute__((naked,noinline)) _Open(const char *name, int flags, int mode) {

   asm volatile (
"STMFD   SP!, {R4-R8,LR} \n"
"MOV     R6, R0 \n"
"LDRB    R0, [R0] \n"
"MOV     R7, R2 \n"
"MOV     R4, R1 \n"
"BL      sub_FF874504 \n"
"MOV     R8, R0 \n"
"MOV R0, #1 \n"
"BIC     R5, R0, R4,LSR#12 \n"
"BIC     R4, R4, #0x9000 \n"
"MOV R0, R8 \n"
"MOV     R1, #1 \n"
"BL      sub_FF875894 \n"
"MOV     R2, R7 \n"
"MOV     R1, R4 \n"
"MOV     R0, R6 \n"
"BL      _open \n"
"CMP R5, #0 \n"
"MOV     R7, R0 \n"
"MOVNE R0, R7 \n"
"MOVNE   R2, R4 \n"
"MOVNE   R1, R6 \n"
"BLNE    sub_FF872470_my \n"
"MOV     R0, R8 \n"
"BL      sub_FF87590C \n"
"MOV     R0, R7 \n"
"LDMFD   SP!, {R4-R8,PC} \n"
   );

return 0; // stop compiler warning
}

void __attribute__((naked,noinline)) sub_FF872470_my() {

   asm volatile (
"STMFD   SP!, {R4-R8,LR} \n"
"MOV     R5, R0 \n"
"LDR     R0, =0x31B8 \n"
"MOV     R7, R1 \n"
"LDR     R0, [R0,#4] \n"
"MOV     R6, R2 \n"
"CMP     R0, #0 \n"
"LDMEQFD SP!, {R4-R8,PC} \n"
"CMP     R5, #0 \n"
"LDMLTFD SP!, {R4-R8,PC} \n"
"MOV     R4, #0 \n"
"LDR     R2, =0x38EA8 \n"
"MOV     R0, #0 \n"
"loc_FF8724A4: \n"
"ADD     R1, R0, R0,LSL#1 \n"
"LDR     R1, [R2,R1,LSL#5] \n"
"CMN     R1, #1 \n"
"ADDEQ   R0, R0, R0,LSL#1 \n"
"ADDEQ   R4, R2, R0,LSL#5 \n"
"BEQ     loc_FF8724CC\n"
"CMP     R1, R5 \n"

"BEQ loc_2 \n" // + // branch if found entry matching new file handle

"ADDNE   R0, R0, #1 \n"
"CMPNE   R0, #0xA \n"
"BLT     loc_FF8724A4 \n"

"loc_FF8724CC: \n"
"CMP     R4, #0 \n"
"LDREQ   R1, =0x1C9 \n"
"LDREQ   R0, =0xFF8723B8 \n" //aFsionotify_c
"BLEQ    sub_FF81EB78 \n" //_DebugAssert

"LDR R1, =fsionotify_success \n" // + // increment counter
"LDR R0, [R1] \n" // + // of successful calls
"ADD R0, R0, #1 \n" // +
"STR R0, [R1] \n" // +

"MOV     R0, #0 \n" // original code - save handle in array
"STR     R0, [R4,#0x58] \n"
"STR     R5, [R4] \n"
"MOV     R0, R4 \n"
"MOV     R1, R7 \n"
"STR     R6, [R4,#0x24] \n"
"BL      sub_FF872238 \n"
"ADD     R1, R4, #0x28 \n"
"MOV     R0, R7 \n"
"LDMFD   SP!, {R4-R8,LR} \n"
"B       sub_FF8381C4 \n"

"loc_2: \n" // + // Handle case when new file handle returned from _open is already in array
"LDR R1, =fsionotify_compfail \n" // + // increment counter then return rather than throw exception
"LDR R0, [R1] \n" // + // equivalent to calling _open rather than _Open
"ADD R0, R0, #1 \n" // +
"STR R0, [R1] \n" // +
"LDMFD   SP!, {R4-R8,PC} \n" // +
   );
}

Quote
So we need a way to have your shooting_set_iso_real() code not conflict with the code generic/shooting.c code  ?

only if confirm that other propset 4 Camera or newer camera that use the BSI Cmos sensor work correct with the code currently is in chdk.

my guess is more it is not test carefully, on Camera as Ixus 300HS Sx220hs.
maybe g12 or S95 is diffrent in some way, because of other sensor, so forget my text about g12 and s95 test

but i open soon a new thread and ask for correct iso work on those cameras.and only if this cameras all work, then maybe the define of the core libc function can change, so its possible that platform code can overwrite the function
« Last Edit: 17 / October / 2011, 08:56:35 by Bernd R »
Ixus 1000 HS

Re: IXUS 1000 HS Porting Thread
« Reply #302 on: 22 / October / 2011, 21:21:26 »
Read and read are diffrent, because they use asm code from philmoz for this camera.
@Bernd R :  I'm cleaning up the IXUS1000 code for submission. Should I use your values for Read() and read() or the values found by philmoz's sigfinder ?

Ported :   A1200    SD940   G10    Powershot N    G16

Re: IXUS 1000 HS Porting Thread
« Reply #303 on: 23 / October / 2011, 06:09:36 »
Read and read are diffrent, because they use asm code from philmoz for this camera.
@Bernd R :  I'm cleaning up the IXUS1000 code for submission. Should I use your values for Read() and read() or the values found by philmoz's sigfinder ?



You can use the sigfinder values, the extra code is not need anymore because of mkdir if not exists func
only the

#define   CAM_STARTUP_CRASH_FILE_OPEN_FIX   1

for this camera.
« Last Edit: 23 / October / 2011, 06:11:57 by Bernd R »
Ixus 1000 HS

Re: IXUS 1000 HS Porting Thread
« Reply #304 on: 23 / October / 2011, 12:31:44 »
#define   CAM_STARTUP_CRASH_FILE_OPEN_FIX   1
I put that in and philmoz posted the patch file to the SVN server last night.  I set its status to not go in the autobuild though has nobody has tested what I did.  Can you build it yourself from the SVN or would you like me to post a link to a completed build for the IXUS1000 ?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: IXUS 1000 HS Porting Thread
« Reply #305 on: 23 / October / 2011, 14:05:31 »
thanks that you add it.

that it is autobuild is not so important, when i have time i download the zip from here

http://tools.assembla.com/chdk/timeline

and test.
And if Ixus 1000 is add in german chdk i like test too.please not me if somebody add it.


A problem with ISO Overwrite seem the Camera not have, so no additional code is need.i see now its common behavior.

maybe some day chdk can enhance that ISO overwrite work in automatic too correct, but i can live with the custom auto ISO and i need not stay on old Version.
« Last Edit: 23 / October / 2011, 14:07:02 by Bernd R »
Ixus 1000 HS

Re: IXUS 1000 HS Porting Thread
« Reply #306 on: 25 / October / 2011, 13:52:29 »
I checked out with tortoise svn trunk 1385
In chdk shell no Ixus 1000 can choose when i select trunk 1385
Ixus 1000 HS

Re: IXUS 1000 HS Porting Thread
« Reply #307 on: 25 / October / 2011, 14:00:04 »
In chdk shell no Ixus 1000 can choose when i select trunk 1385
I already reported this here :   http://chdk.setepontos.com/index.php?topic=845.msg74905#msg74905

In the meantime,  you can use the little black command window box icon in CHDK-Shell  to go to the command line,  change to the trunk1385 directory and compile the IXUS1000 using the command specified in the instructions you will see when you launch the DOS box.  The required build environment is all set up for you when you do it that way.


Ported :   A1200    SD940   G10    Powershot N    G16

Re: IXUS 1000 HS Porting Thread
« Reply #308 on: 28 / October / 2011, 13:18:35 »
In chdk shell no Ixus 1000 can choose when i select trunk 1385
I already reported this here :   http://chdk.setepontos.com/index.php?topic=845.msg74905#msg74905

In the meantime,  you can use the little black command window box icon in CHDK-Shell  to go to the command line,  change to the trunk1385 directory and compile the IXUS1000 using the command specified in the instructions you will see when you launch the DOS box.  The required build environment is all set up for you when you do it that way.




I dont like shell, is it possible to change a value in my source, so it work as before ?
i search for text alpha in ixus 1000 platform files, but i do not find it
Ixus 1000 HS

Re: IXUS 1000 HS Porting Thread
« Reply #309 on: 28 / October / 2011, 13:23:40 »
i search for text alpha in ixus 1000 platform files, but i do not find it
Take a look in the trunknnnn directory at the camera_list.csv file.  That's where its flagged as "alpha" - although we apparently don't use that exact word yet. 

I don't know if CHDK-Shell uses the local copy now or still scrubs the svn for its camera list.  Should be quick for you to test - just delete the "SKIP_AUTOBUILD" in the 4th column.
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal © 2008-2014, SimplePortal