SD940 (IXUS120) porting thread

  • 542 Replies
  • 61658 Views
Re: SD940 (IXUS120) porting thread
« Reply #500 on: 24 / June / 2011, 21:37:16 »
Advertisements
I wonder if the 1.03c has a similar problem with shoot? did your script execute both shoots on 1.03c?
I got both shoots on the 1.03c with my script.  With your script I only got the first shoot. 
Gives me some things to look into anyway.

@trogg : Rechecked the propset to confirm its 3 - used debugs to confirm that PROPCASE_RESOLUTION is 220 (rather than 218 in propset2 or 222 in propset4).   So that eliminates that.

Not sure if it matters but the modemap[] values have never been setup for the SD940.  Fixing that now.  Did you have the camera in Auto or Program mode for your tests ? (the three position vertical slide switch in the center right of the back of the camera).




Re: SD940 (IXUS120) porting thread
« Reply #501 on: 25 / June / 2011, 12:14:13 »
Interesting. Both yours and mine work fine on the 1.03b but bomb out on the 1.00e.
Using the new sigfinder code from philmoz,  I've updated all versions of the IXUS120-SD940.  Then now have new sig values for write & rename - basically "wrapper" functions higher up in the call sequence that seem to do a litttle more checking before acting.  The 100e has several fixes to its stubs_min.S file so let's see if that fixed the uBasic script issues.

IXUS120-SD940 firmware 1.00e
IXUS120-SD940 firmware 1.01a
IXUS120-SD940 firmware 1.02c
IXUS120-SD940 firmware 1.03b
IXUS120-SD940 firmware 1.03c

Incidentally,  apparently uBasic scripts are supposed to have the command "End" as the last line in the .bas file.  Thanks to philmoz for that one too.

UPDATE : these changes now available through the autobuild server.

« Last Edit: 26 / June / 2011, 00:47:40 by waterwingz »

Re: SD940 (IXUS120) porting thread
« Reply #502 on: 26 / June / 2011, 15:34:08 »
I've reviewed the IXUS120-SD980 CHDK code to try and determine if its time to recommend graduation from BETA status.  The code seems to be stable based my personal experience and on the lack of complaints over the last six months.  But there are still a few loose ends. 

I went through the code and looked for anything that has still not been tested / verified.  Most of what I found were things that were simply dragged in during the initial ports.  Here's the final list :

platform/ixus120_sd940/main.c : 
    fl_tbl[]
    CF_EFL
      
platform/ixus120-sd940/shooting.c
    #define PARAM_FILE_COUNTER      0x38          <=not used anywhere ?
    #define PARAM_EXPOSURE_COUNTER  0x02    <= not used anywhere ?
    aperture_sizes_table[]
    shutter_speeds_table[]
    iso_table[]

core/kbd.c :
    ZSTEP_TABLE_SIZE
    nTxtbl[]

platform/ixus120_sd940/sub/10xn/movie_rec.c :
    set_quality()
      
platform/ixus120-sd940/platform_camera.h
    cam_CFAPattern
    CAM_BITMAP_PALETTE
    CAM_COLORMATRIX1
    cam_CalibrationIlluminant1

There are some notes in the wiki on getting the values for shooting.c & main.c

ZSTEP_TABLE_SIZE & nTxtbl[]  seems to be a hack where any value will do ?

And while I may have other mistakes in platform_camera.h,  I'm lost as to what to use for the four values I've listed. 

Comments and suggestions welcome.



*

Offline reyalp

  • ******
  • 10069
Re: SD940 (IXUS120) porting thread
« Reply #503 on: 26 / June / 2011, 16:02:15 »
fl_tbl should have the focal length of each zoom step. You can get this from exif. CF_EFL is the constant used to covert to 35mm equivalent (edit: with a constant multiplier, e.g. 10000 to make the calculation in get_effective_focal_length work nicely with integers)

ZSTEP_TABLE_SIZE etc should also match the number of zoom steps.

See http://chdk.setepontos.com/index.php?topic=6528.0 has a little information. I'm not suggesting using Phils code, just a reference.

If cam_CFAPatter is wrong, DNG will look very very wrong. If DNG looks reasonable, it's fine.

PARAM_FILE_COUNTER is used in generic/shooting.c - remember this is *included* from the platform shooting.c. Same for EXPOSURE_COUNTER. I highly recommend http://tools.tortoisesvn.net/grepWin.html for finding stuff like this.

These are used for things like numbering the raw files.

aperture_sizes_table should be filled in using exif data, from each zoom step with and without ND filter.
« Last Edit: 26 / June / 2011, 16:04:24 by reyalp »
Don't forget what the H stands for.


Re: SD940 (IXUS120) porting thread
« Reply #504 on: 26 / June / 2011, 16:23:10 »
PARAM_FILE_COUNTER is used in generic/shooting.c - remember this is *included* from the platform shooting.c. Same for EXPOSURE_COUNTER. I highly recommend http://tools.tortoisesvn.net/grepWin.html for finding stuff like this.
That's what I was using.  I didn't notice the shooting.c in the generic directory though - I did a scan of the grepWin output and missed it while ignored all the files named shooting.c  in the camera specific directories.  I'll refrain from comments about the naming conventions ....

The rest of your tips will also help a lot - I'll plug away at that. Thanks again.



*

Offline reyalp

  • ******
  • 10069
Re: SD940 (IXUS120) porting thread
« Reply #505 on: 26 / June / 2011, 16:45:31 »
PARAM_FILE_COUNTER is used in generic/shooting.c - remember this is *included* from the platform shooting.c. Same for EXPOSURE_COUNTER. I highly recommend http://tools.tortoisesvn.net/grepWin.html for finding stuff like this.
That's what I was using.  I didn't notice the shooting.c in the generic directory though - I did a scan of the grepWin output and missed it while ignored all the files named shooting.c  in the camera specific directories.  I'll refrain from comments about the naming conventions ....
I've done the same thing ....

I'm still not sure why the generic stuff is included rather than being compiled separately. Obviously these defines take advantage of that but that could just as well be a .h file...
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 2936
    • Photos
Re: SD940 (IXUS120) porting thread
« Reply #506 on: 26 / June / 2011, 19:02:21 »
   fl_tbl[]
    CF_EFL

Be careful with CF_EFL that you don't get integer overflow at the long end of the zoom range.

For fl_tbl[] there are three variants I've seen in the different ports:
- for cameras with a small number of zoom steps fl_tbl[] contains the actual camera focal length at each position, usually multiplied by 1000.
- for cameras with a large number of zoom steps fl_tbl[] contains on a subset of values spaced across the range and the code interpolates between them.
- for the G12 and SX30 I found the equivalent tables in the firmware so I use a stubs_min.S value to give the address of the firmware table and then use that in the CHDK code. I found these by searching the firmware for the shortest and longest focal lengths for each camera (multiplied by 1000). This saves space in CHDK (especially for the SX30 which has 201 zoom positions) and also means the table has the correct values without needing to extract the info from EXIF data, or interpolate values.

Phil.
« Last Edit: 27 / June / 2011, 05:45:49 by philmoz »
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)

Re: SD940 (IXUS120) porting thread
« Reply #507 on: 28 / June / 2011, 17:54:51 »
Just installed on my new SD940 IS and loads up beautifully. One question, I don't see Time Lapse in the build. Am I missing something or is there a script I can download somewhere? And help would be greatly appreciated.


Re: SD940 (IXUS120) porting thread
« Reply #508 on: 28 / June / 2011, 18:11:14 »
Just installed on my new SD940 IS and loads up beautifully. One question, I don't see Time Lapse in the build. Am I missing something or is there a script I can download somewhere? And help would be greatly appreciated.
Its done with scripts.  Search this forum and the wiki for Intervalometer.  You should get lots of ideas like this http://chdk.wikia.com/wiki/UBASIC/Scripts:_Ultra_Intervalometer


Re: SD940 (IXUS120) porting thread
« Reply #509 on: 28 / June / 2011, 18:42:36 »
Last Question, I promise. Got the Intervalometer working real nicely. Now, is there a script I can run to get the screen on the back to turn off immediately after it shoots? The default power saver only goes as low as 10 seconds, I'm hoping for a 3-5. What might I search under?

Thanks.

 

Related Topics