Changeset 1258


Ignore:
Timestamp:
07/31/11 02:31:11 (22 months ago)
Author:
philmoz
Message:

Fixes for SX130is.

  • Corrected value for get_flash_params_count
  • Fixed modemap
  • Remove redundant values from platform_camera.h
  • Enable screen erase detect logic for menu redraw
  • Updated memory size comment in makefile.inc
Location:
trunk/platform/sx130is
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/platform/sx130is/lib.c

    r1128 r1258  
    152152 
    153153int get_flash_params_count(void){ 
    154  return 132;  
     154 return 0x9a;  
    155155} 
    156156 
  • trunk/platform/sx130is/platform_camera.h

    r1224 r1258  
    6161     #undef  CAM_SENSOR_BITS_PER_PIXEL 
    6262     #define CAM_SENSOR_BITS_PER_PIXEL                   12 
    63      #undef  CAM_WHITE_LEVEL 
    64      #define CAM_WHITE_LEVEL                             ((1<<CAM_SENSOR_BITS_PER_PIXEL)-1) 
    65      #undef  CAM_BLACK_LEVEL 
    66      #define CAM_BLACK_LEVEL                             127 
    6763  
    6864     #define CAM_EXT_TV_RANGE                            1 
     
    7167     // copied from the SX200 which has the same video buffer size 
    7268     #undef CAM_USES_ASPECT_CORRECTION 
    73      #undef CAM_USES_ASPECT_YCORRECTION 
    7469     #define CAM_USES_ASPECT_CORRECTION                  1  //camera uses the modified graphics primitives to map screens an viewports to buffers more sized  
    75      #define CAM_USES_ASPECT_YCORRECTION                 0  //only uses mappings on x coordinate 
    76   
    77      #undef ASPECT_XCORRECTION 
    78      #define ASPECT_XCORRECTION(x)                       ((x)<<1) 
    79   
    80      #undef ASPECT_GRID_XCORRECTION 
    81      #define ASPECT_GRID_XCORRECTION(x)                  (x)  //grids are designed on a 360x240 basis and screen is 320x240, we need x*320/360=x*8/9 
    82      #undef ASPECT_GRID_YCORRECTION 
    83      #define ASPECT_GRID_YCORRECTION(y)                  (y)  //y correction for grids  made on a 360x240 As the buffer is 720x240 we have no correction here. 
    84   
    85      #undef ASPECT_VIEWPORT_XCORRECTION  
    86      #define ASPECT_VIEWPORT_XCORRECTION(x)              ASPECT_GRID_XCORRECTION(x) 
    87      #undef ASPECT_VIEWPORT_YCORRECTION  
    88      #define ASPECT_VIEWPORT_YCORRECTION(y)              (y) 
    89   
    90      //games mappings 
    91      #undef GAMES_SCREEN_WIDTH 
    92      #define GAMES_SCREEN_WIDTH                          360 
    93      #undef GAMES_SCREEN_HEIGHT 
    94      #define GAMES_SCREEN_HEIGHT                         240 
    95      #undef ASPECT_GAMES_XCORRECTION 
    96      // 720/360=2 same aspect than grids and viewport but another approach: there is a lot of corrections to do in game's code, and we decide to paint directly on display buffer wirh another resolution 
    97      // used by gui.c that configures the draw environment (trhough new draw_gui function) depending on gui_mode: we have then 360x240 for games (but deformed output:circles are not circles) and 320x240 for 
    98      // other modes in perfect aspect ratio 4/3: slightly better visualization: file menus more readable, ... 
    99      #define ASPECT_GAMES_XCORRECTION(x)                 (((x)<<1)) 
    100      #undef ASPECT_GAMES_YCORRECTION 
    101      #define ASPECT_GAMES_YCORRECTION(y)                 ((y))  //none 
    10270  
    10371     #define CAM_ZEBRA_ASPECT_ADJUST                     1 
     
    12997                                                // Used to enabled bracketing in custom timer, required on many recent cameras 
    13098                                                // see http://chdk.setepontos.com/index.php/topic,3994.405.html 
     99 
     100        #define CAM_DETECT_SCREEN_ERASE     1       // Turn on guard pixels to detect screen erase and redraw CHDK buttons and menus 
    131101      
    132102 //---------------------------------------------------------- 
    133   
    134         //******** 
    135         /////SX200 
    136         //******** 
  • trunk/platform/sx130is/shooting.c

    r1191 r1258  
    8484 
    8585 
     86/* 
     87http://www.usa.canon.com/cusa/consumer/products/cameras/digital_cameras/powershot_sx130_is#Specifications 
     88Shooting Modes: 
     89    M, Av, Tv, P, Auto, Easy, Portrait, Landscape, Kids & Pets, SCN, Movie 
     90 
     91SCN Scene Modes: 
     92    Smart Shutter, Low Light, Super Vivid, Poster Effect, Color Accent, Color Swap,  
     93        Fish-eye Effect, Miniature Effect, Beach, Foliage, Snow, Fireworks 
     94 
     95Movie Modes: 
     96    Standard, Miniature Effect, Color Accent, Color Swap 
     97 
     98Smart Shutter Modes: 
     99    Smile, Wink Self-timer, Face Self-Timer 
     100*/ 
    86101// Corrected for SX130 
    87102static const CapturemodeMap modemap[] = { 
     
    93108        { MODE_KIDS_PETS,          32786  }, 
    94109        { MODE_LANDSCAPE,          32782  }, 
    95         { MODE_PORTRAIT,           32873  }, 
     110        { MODE_PORTRAIT,           32783  }, 
    96111        { MODE_EASY,               33314  }, 
    97112         
     
    99114        { MODE_VIDEO_COLOR_SWAP,   2613   }, 
    100115        { MODE_VIDEO_STD,          2614   }, 
    101         //{ MODE_VIDEO_MINIATURE,    2620   }, // not defined in modelist.h 
     116        { MODE_VIDEO_MINIATURE,    2620   }, 
    102117 
    103         { MODE_SCN_SMART_SHUTTER,  16938  }, 
     118    { MODE_SCN_FACE_SELF_TIMER,16936  }, 
     119        { MODE_SCN_SMART_SHUTTER,  16937  }, 
     120    { MODE_SCN_WINK_SELF_TIMER,16938  }, 
    104121        { MODE_SCN_LOWLIGHT,       16417  }, 
    105122        { MODE_SCN_SUPER_VIVID,    16934  }, 
     
    112129        { MODE_SCN_FOLIAGE,        16405  }, 
    113130        { MODE_SCN_SNOW,           16406  }, 
    114         { MODE_SCN_FIREWORK,       16406  } 
     131        { MODE_SCN_FIREWORK,       16408  } 
    115132}; 
    116133 
  • trunk/platform/sx130is/sub/101c/makefile.inc

    r1201 r1258  
    2323# Set up size variables for EXMEM 
    2424EXMEM_HEAP_SKIP=0x2F7600        #(0x44000000-0x43D08A00) from sub_FF8885CC = size of video buffers in EXMEM area 
    25 EXMEM_BUFFER_SIZE=0x200000      # Amount of EXMEM memory to allocate for CHDK = 42B 
     25EXMEM_BUFFER_SIZE=0x200000      # Amount of EXMEM memory to allocate for CHDK = 2MB 
    2626 
    2727# points to the start of the memory pool used by the firmware 
  • trunk/platform/sx130is/sub/101d/makefile.inc

    r1201 r1258  
    2323# Set up size variables for EXMEM 
    2424EXMEM_HEAP_SKIP=0x2F7600        #(0x44000000-0x43D08A00) from sub_FF8885CC = size of video buffers in EXMEM area 
    25 EXMEM_BUFFER_SIZE=0x200000      # Amount of EXMEM memory to allocate for CHDK = 42B 
     25EXMEM_BUFFER_SIZE=0x200000      # Amount of EXMEM memory to allocate for CHDK = 2MB 
    2626 
    2727# points to the start of the memory pool used by the firmware 
  • trunk/platform/sx130is/sub/101f/makefile.inc

    r1239 r1258  
    2323# Set up size variables for EXMEM 
    2424EXMEM_HEAP_SKIP=0x2F7600        #(0x44000000-0x43D08A00) from sub_FF8885CC = size of video buffers in EXMEM area 
    25 EXMEM_BUFFER_SIZE=0x200000      # Amount of EXMEM memory to allocate for CHDK = 42B 
     25EXMEM_BUFFER_SIZE=0x200000      # Amount of EXMEM memory to allocate for CHDK = 2MB 
    2626 
    2727# points to the start of the memory pool used by the firmware 
Note: See TracChangeset for help on using the changeset viewer.