Author Topic: SX200is Porting  (Read 108927 times)

Offline ihar

  • Jr. Member
  • **
  • Posts: 55
Re: SX200is Porting
« Reply #480 on: 25 / September / 2009, 18:54:46 »
  • Publish
  • I find
    Code: [Select]
    NHSTUB(MakeAFScan, 0xFF8641E4) //ROM:FF8339CC sub_FF8339CC (sub_FF8641E4+98...)
    for file stubs_entry_2.S (autofocus)
    but i don't find
    "some_flag_for_af_scan"
    (stubs_min.s)

    Please help me for find this flag (for work autofokus in video_rec)

    Ihar

    Offline smartkiller

    • Full Member
    • ***
    • Posts: 139
    Re: SX200is Porting
    « Reply #481 on: 25 / September / 2009, 21:17:07 »
  • Publish
  • Hallo
    PropertyCase Dump for Custom Timer:

    269= 03B2 -> 03AB  At this Point changes the values by modify the Time and the number of Shoots!

    For other Cams was the Prop Value the White Balance!

    I have not rechecked that the Whitebalance affects the values at this time.


    I compiled Trunk 805 now and the "Dng Disable" Problem still exists.

    Smartkiller

    SX200 IS Firm. 100c
    SX1 IS Firm. 201a

    Offline smartkiller

    • Full Member
    • ***
    • Posts: 139
    Re: SX200is Porting
    « Reply #482 on: 25 / September / 2009, 21:19:30 »
  • Publish
  • I find
    Code: [Select]
    NHSTUB(MakeAFScan, 0xFF8641E4) //ROM:FF8339CC sub_FF8339CC (sub_FF8641E4+98...)
    for file stubs_entry_2.S (autofocus)
    but i don't find
    "some_flag_for_af_scan"
    (stubs_min.s)

    Please help me for find this flag (for work autofokus in video_rec)

    Ihar

    Have you the IDA dissassembler? Then you can Try my Full Firmwaredump and search for changes to OldGit's dump.

    Smartkiller
    SX200 IS Firm. 100c
    SX1 IS Firm. 201a

    Offline smartkiller

    • Full Member
    • ***
    • Posts: 139
    Re: SX200is Porting
    « Reply #483 on: 25 / September / 2009, 21:21:11 »
  • Publish
  • SX200 IS Firm. 100c
    SX1 IS Firm. 201a

    Offline ihar

    • Jr. Member
    • **
    • Posts: 55
    Re: SX200is Porting
    « Reply #484 on: 25 / September / 2009, 21:40:19 »
  • Publish
  • 2smartkiller

    If my last changes have been brought that problems should not be
    Code: [Select]
    #if defined (CAMERA_sx200is)
        if ((!((movie_status > 1) && conf.save_raw_in_video   )) && (!(shooting_get_prop(PROPCASE_RESOLUTION)==5)) && (!((m==MODE_SPORTS) && conf.save_raw_in_sports)) && (!((m==MODE_AUTO) && conf.save_raw_in_auto)) && (!(conf.edge_overlay_enable && conf.save_raw_in_edgeoverlay)) && (!((shooting_get_drive_mode()==1) && conf.save_raw_in_burst && !(m==MODE_SPORTS)))  && (!((shooting_get_drive_mode()>=2) && conf.save_raw_in_timer)) && (!((shooting_get_prop(PROPCASE_BRACKET_MODE)==1) && conf.save_raw_in_ev_bracketing)) )
        #else
        if ((!((movie_status > 1) && conf.save_raw_in_video   )) && (!(shooting_get_prop(PROPCASE_RESOLUTION)==5)) && (!((m==MODE_SPORTS) && conf.save_raw_in_sports)) && (!((m==MODE_AUTO) && conf.save_raw_in_auto)) && (!(conf.edge_overlay_enable && conf.save_raw_in_edgeoverlay)) && (!((shooting_get_prop(PROPCASE_DRIVE_MODE)==1) && conf.save_raw_in_burst && !(m==MODE_SPORTS)))  && (!((shooting_get_prop(PROPCASE_DRIVE_MODE)>=2) && conf.save_raw_in_timer)) && (!((shooting_get_prop(PROPCASE_BRACKET_MODE)==1) && conf.save_raw_in_ev_bracketing)) )
        #endif

    in gui_osd.c exist?

    Ihar

    Offline ihar

    • Jr. Member
    • **
    • Posts: 55
    Re: SX200is Porting
    « Reply #485 on: 25 / September / 2009, 21:42:41 »
  • Publish

  • Have you the IDA dissassembler? Then you can Try my Full Firmwaredump and search for changes to OldGit's dump.

    Smartkiller

    I and did. But probably absolutely has got confused...

    Ihar

    Offline OldGit

    • Sr. Member
    • ****
    • Posts: 303
    Re: SX200is Porting
    « Reply #486 on: 25 / September / 2009, 21:47:41 »
  • Publish
  • All,
    once again I will say this
    If you have changes to the trunk source YOU must submit a patch.
    Posting suggested changes here will NOT put them into the source / trunk.

    Test your updated code, document and submit a patch.
    (Then YOU get the credit for the fix)
    OldGit
    SX200 IS-100C

    Offline smartkiller

    • Full Member
    • ***
    • Posts: 139
    Re: SX200is Porting
    « Reply #487 on: 25 / September / 2009, 22:32:40 »
  • Publish
  • 2smartkiller

    If my last changes have been brought that problems should not be
    Code: [Select]
    #if defined (CAMERA_sx200is)
        if ((!((movie_status > 1) && conf.save_raw_in_video   )) && (!(shooting_get_prop(PROPCASE_RESOLUTION)==5)) && (!((m==MODE_SPORTS) && conf.save_raw_in_sports)) && (!((m==MODE_AUTO) && conf.save_raw_in_auto)) && (!(conf.edge_overlay_enable && conf.save_raw_in_edgeoverlay)) && (!((shooting_get_drive_mode()==1) && conf.save_raw_in_burst && !(m==MODE_SPORTS)))  && (!((shooting_get_drive_mode()>=2) && conf.save_raw_in_timer)) && (!((shooting_get_prop(PROPCASE_BRACKET_MODE)==1) && conf.save_raw_in_ev_bracketing)) )
        #else
        if ((!((movie_status > 1) && conf.save_raw_in_video   )) && (!(shooting_get_prop(PROPCASE_RESOLUTION)==5)) && (!((m==MODE_SPORTS) && conf.save_raw_in_sports)) && (!((m==MODE_AUTO) && conf.save_raw_in_auto)) && (!(conf.edge_overlay_enable && conf.save_raw_in_edgeoverlay)) && (!((shooting_get_prop(PROPCASE_DRIVE_MODE)==1) && conf.save_raw_in_burst && !(m==MODE_SPORTS)))  && (!((shooting_get_prop(PROPCASE_DRIVE_MODE)>=2) && conf.save_raw_in_timer)) && (!((shooting_get_prop(PROPCASE_BRACKET_MODE)==1) && conf.save_raw_in_ev_bracketing)) )
        #endif

    in gui_osd.c exist?

    Ihar

    I have made the changes on my local 805 Trunk it works.
    I have made a Test with all Exceptions point by Point.

    The changes can be Port in the Trunk.

    Smartkiller

    SX200 IS Firm. 100c
    SX1 IS Firm. 201a

    Offline smartkiller

    • Full Member
    • ***
    • Posts: 139
    Re: SX200is Porting
    « Reply #488 on: 25 / September / 2009, 23:03:33 »
  • Publish

  • Have you the IDA dissassembler? Then you can Try my Full Firmwaredump and search for changes to OldGit's dump.

    Smartkiller


    I and did. But probably absolutely has got confused...

    Ihar
    [/quote
    2smartkiller

    If my last changes have been brought that problems should not be
    Code: [Select]
    #if defined (CAMERA_sx200is)
        if ((!((movie_status > 1) && conf.save_raw_in_video   )) && (!(shooting_get_prop(PROPCASE_RESOLUTION)==5)) && (!((m==MODE_SPORTS) && conf.save_raw_in_sports)) && (!((m==MODE_AUTO) && conf.save_raw_in_auto)) && (!(conf.edge_overlay_enable && conf.save_raw_in_edgeoverlay)) && (!((shooting_get_drive_mode()==1) && conf.save_raw_in_burst && !(m==MODE_SPORTS)))  && (!((shooting_get_drive_mode()>=2) && conf.save_raw_in_timer)) && (!((shooting_get_prop(PROPCASE_BRACKET_MODE)==1) && conf.save_raw_in_ev_bracketing)) )
        #else
        if ((!((movie_status > 1) && conf.save_raw_in_video   )) && (!(shooting_get_prop(PROPCASE_RESOLUTION)==5)) && (!((m==MODE_SPORTS) && conf.save_raw_in_sports)) && (!((m==MODE_AUTO) && conf.save_raw_in_auto)) && (!(conf.edge_overlay_enable && conf.save_raw_in_edgeoverlay)) && (!((shooting_get_prop(PROPCASE_DRIVE_MODE)==1) && conf.save_raw_in_burst && !(m==MODE_SPORTS)))  && (!((shooting_get_prop(PROPCASE_DRIVE_MODE)>=2) && conf.save_raw_in_timer)) && (!((shooting_get_prop(PROPCASE_BRACKET_MODE)==1) && conf.save_raw_in_ev_bracketing)) )
        #endif

    in gui_osd.c exist?

    Ihar


    I have made an local Build with your Changes and put it to http://drop.io/SX200BETA
    Test it.

    Smartkiller
    SX200 IS Firm. 100c
    SX1 IS Firm. 201a

    CHDK Forum

    Re: SX200is Porting
    « Reply #488 on: 25 / September / 2009, 23:03:33 »

    Online reyalp

    • Guru Member
    • ******
    • Posts: 4826
    Re: SX200is Porting
    « Reply #489 on: 26 / September / 2009, 08:14:15 »
  • Publish
  • « Last Edit: 26 / September / 2009, 08:22:16 by reyalp »
    Don't forget what the H stands for.

    Offline smartkiller

    • Full Member
    • ***
    • Posts: 139
    Re: SX200is Porting
    « Reply #490 on: 26 / September / 2009, 10:33:12 »
  • Publish
  • Can we use http://chdk.kernreaktor.org/mantis/my_view_page.php ?


    Regarding post #488 and earlier, it looks like you aren't using the latest trunk. Since 805 it already uses shooting_get_drive_mode() for all cameras. I will not put in #ifdefs all over the code for sx200is.


    So we must find another solution to fix it?

    In what File can we do that at best?

    @ihar Can you do that?

    Smartkiller
    SX200 IS Firm. 100c
    SX1 IS Firm. 201a

    Online reyalp

    • Guru Member
    • ******
    • Posts: 4826
    Re: SX200is Porting
    « Reply #491 on: 26 / September / 2009, 10:36:25 »
  • Publish
  • So we must find another solution to fix it?
    The trunk should do exactly what ihars code does in the sx200is case. If it doesn't, show how it is different and we can fix.
    Don't forget what the H stands for.

    Offline nandoide

    • Rookie
    • *
    • Posts: 29
    Re: SX200is Porting
    « Reply #492 on: 27 / September / 2009, 15:01:55 »
  • Publish
  • Zoom table tuned like sx10
    platform\sx200is\main.c, replace lines 65-92

    ADamb, You are right. Te cam has 125 zoom points, plus 0 point (126).
    I was throwing a zoom bracket over all the zoom range and it works.
    Do you have submit a patch?

    I've studied the code trying to understand what it's doing, and I think that it's more simple so, interpolating all the range over the same straight line, but it will be less accurate that if we know the focal values at some zoom  points and make a step interpolation, as it's done over all
    do we know it?
    where the focal table values came from?

    Code: C
    1. // Focal length range is 5.0 - 60,0 mm, 27.3 - 327.4 in 35-mm equivalent.
    2. // 126 zoom points (0-125 ) verified at camera
    3. // so:
    4. // focal_length(zoom_point)=440*zoom_point + 5000,   in micras to get more precision in calculus
    5. //and
    6. // effective_focal_length(zoom_point)=(2401*zoom_point + 27300)/1000 in milimetres
    7. // simply adjusting ranges in a linear fashion
    8. // and
    9. // zoom_x(zoom_point)=focal_length(zoom_point)*10/5000.
    10.  
    11. const int zoom_points = 126;
    12.  
    13. int get_effective_focal_length(int zp) {
    14.    return (2401*zp+27300)/1000;
    15. }
    16.  
    17. int get_focal_length(int zp) {
    18.    return (440*zp+5000);
    19. }
    20.  
    21. int get_zoom_x(int zp) {
    22.    return (get_focal_length(zp)/500);
    23. }
    24.  
    « Last Edit: 27 / September / 2009, 15:05:12 by nandoide »

    Offline ADamb

    • Rookie
    • *
    • Posts: 42
    Re: SX200is Porting
    « Reply #493 on: 27 / September / 2009, 15:22:58 »
  • Publish
  • Zoom table tuned like sx10
    platform\sx200is\main.c, replace lines 65-92

    ADamb, You are right. Te cam has 125 zoom points, plus 0 point (126).
    I was throwing a zoom bracket over all the zoom range and it works.
    Do you have submit a patch?
    Yes, I did.(Due to unsuccessful attachment upload I did it 3 times...).

    If you look at Focus(Position) graph, then it can be approximated by 4 order polynome.
    If Focus axis has logarithmic scale, then it is almost straight line.
    Table was obtained by taking shoots together with observing parameter 87(turned out to be zoom position).
    Actual code was simple copy from sx10 (some kind of approximation, did not look into details).
    SX200 IS-100C

    Offline OldGit

    • Sr. Member
    • ****
    • Posts: 303
    Re: SX200is Porting
    « Reply #494 on: 27 / September / 2009, 15:39:23 »
  • Publish
  • @Nandoide / ihar,
    I have just cleaned up my PC and started to put together a patch to include some of the things we already have answers for.
    As a start I am just cleaning the simple things (against trunk809, so the attached includes....

    Correction of edgeoverlay typo to fix ghost of old edge when painting new edge.
    Bassed on nandoide post.

    Removed debug code from boot.c

    Correction of Miscellaneous OSD values for zoom/focal length are wrong when zoomed.
    Bassed on ADamb suggestion

    Can you check the attached before I submit it.
    Thanks,
    OldGit
    « Last Edit: 27 / September / 2009, 18:11:42 by OldGit »
    SX200 IS-100C

     


    SimplePortal 2.3.3 © 2008-2010, SimplePortal