1 // Camera - G1X - platform_camera.h 2 3 // This file contains the various settings values specific to the G1X camera. 4 // This file is referenced via the 'include/camera.h' file and should not be loaded directly. 5 6 // If adding a new settings value put a suitable default in 'include/camera.h', 7 // along with documentation on what the setting does and how to determine the correct value. 8 // If the setting should not have a default value then add it in 'include/camera.h' 9 // using the '#undef' directive along with appropriate documentation. 10 11 // Override any default values with your camera specific values in this file. Try and avoid 12 // having override values that are the same as the default value. 13 14 // When overriding a setting value there are two cases: 15 // 1. If removing the value, because it does not apply to your camera, use the '#undef' directive. 16 // 2. If changing the value it is best to use an '#undef' directive to remove the default value 17 // followed by a '#define' to set the new value. 18 19 // When porting CHDK to a new camera, check the documentation in 'include/camera.h' 20 // for information on each setting. If the default values are correct for your camera then 21 // don't override them again in here. 22 23 #define CAM_PROPSET 4 24 #define CAM_DRYOS 1 25 #define CAM_DRYOS_2_3_R39 1 26 #define CAM_DRYOS_2_3_R47 1 27 28 #undef CAM_CIRCLE_OF_CONFUSION 29 #define CAM_CIRCLE_OF_CONFUSION 16 // CoC value for camera/sensor (see http://www.dofmaster.com/digital_coc.html) 30 31 #define DRAW_ON_ACTIVE_BITMAP_BUFFER_ONLY 1 // Draw pixels on active bitmap buffer only. Requires active_bitmap_buffer location in stubs_min.S or stubs_entry.S. 32 33 #undef CAM_AF_LED 34 #define CAM_AF_LED 3 // Index of AF led in camera_set_led function 35 36 #undef CAM_UNCACHED_BIT 37 #define CAM_UNCACHED_BIT 0x40000000 // Found @0xff02ac74 38 39 #define CAM_HAS_ND_FILTER 1 40 #define CAM_HAS_NATIVE_ND_FILTER 1 // Camera has built-in ND filter with Canon menu support for enable/disable 41 #define CAM_SWIVEL_SCREEN 1 42 43 #define CAM_ADJUSTABLE_ALT_BUTTON 1 44 #define CAM_ALT_BUTTON_NAMES { "Shrtcut", "Video", "Meter", "AE Lock", "Erase" } 45 #define CAM_ALT_BUTTON_OPTIONS { KEY_PRINT, KEY_VIDEO, KEY_DISPLAY, KEY_AE_LOCK, KEY_ERASE } 46 #define CAM_DISP_BUTTON_NAME "METER" 47 48 #undef CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 49 #define CAM_HAS_VIDEO_BUTTON 1 50 #define CAM_VIDEO_QUALITY_ONLY 1 51 #define CAM_BRACKETING 1 52 #undef CAM_VIDEO_CONTROL // Crashes camera if enabled 53 #define CAM_HAS_JOGDIAL 1 54 #undef CAM_USE_ZOOM_FOR_MF 55 #define CAM_SHOW_OSD_IN_SHOOT_MENU 1 56 57 #undef DEFAULT_RAW_EXT 58 #define DEFAULT_RAW_EXT 2 // use .CR2 59 #define CAM_MIN_ISO_OVERRIDE 100 // Defines min market (non-zero) ISO override value - lower value may crash if flash used [0 = AUTO, so always allowed] 60 61 // bayer sensor pattern 62 #define cam_CFAPattern 0x02010100 // Red Green Green Blue 63 64 #define CAM_CALC_BLACK_LEVEL 1 // Calculate black level from RAW sensor data instead of using fixed value. 65 // G1X has a mode with black level = 2048 (Tv >= 1.3s & ISO >= 320) 66 67 #define CAM_DNG_LENS_INFO { 151,10, 604,10, 28,10, 58,10 } // See comments in camera.h 68 69 //From G1 X native RAW file as converted to DNG by Adobe convertor 70 #define cam_CalibrationIlluminant1 17 // Standard Light A 71 #define CAM_COLORMATRIX1 \ 72 8138, 10000, -2281, 10000, -659, 10000, \ 73 -3453, 10000, 11006, 10000, 2816, 10000, \ 74 -297, 10000, 1118, 10000, 6471, 10000 75 #define cam_CalibrationIlluminant2 21 // D65 76 #define CAM_COLORMATRIX2 \ 77 7378, 10000, -1255, 10000, -1043, 10000, \ 78 -4088, 10000, 12251, 10000, 2048, 10000, \ 79 -876, 10000, 1946, 10000, 5805, 10000 80 /* These are specific for each camera, not generic to the camera model 81 #define CAM_CAMERACALIBRATION1 \ 82 10102, 10000, 0, 10000, 0, 10000, \ 83 0, 10000, 10000, 10000, 0, 10000, \ 84 0, 10000, 00000, 10000, 10233, 10000 85 #define CAM_CAMERACALIBRATION2 \ 86 10102, 10000, 0, 10000, 0, 10000, \ 87 0, 10000, 10000, 10000, 0, 10000, \ 88 0, 10000, 00000, 10000, 10233, 10000 89 */ 90 #define CAM_FORWARDMATRIX1 \ 91 7310, 10000, 833, 10000, 1500, 10000, \ 92 2013, 10000, 8875, 10000, -888, 10000, \ 93 34, 10000, -4122, 10000, 12339, 10000 94 #define CAM_FORWARDMATRIX2 \ 95 7010, 10000, 1653, 10000, 980, 10000, \ 96 2351, 10000, 9551, 10000, -1902, 10000, \ 97 177, 10000, -2144, 10000, 10218, 10000 98 99 // Sensor size, DNG image size & cropping 100 #define CAM_RAW_ROWPIX 4496 // Found @0xff190c98 101 #define CAM_RAW_ROWS 3366 // Found @0xff190ca4 102 #define CAM_CROP_ORIGIN_X 28 // Override calculated JPEG Crop position (26) 103 #define CAM_JPEG_WIDTH 4352 104 #define CAM_JPEG_HEIGHT 3264 105 #define CAM_ACTIVE_AREA_X1 80 106 #define CAM_ACTIVE_AREA_Y1 52 107 #define CAM_ACTIVE_AREA_X2 4484 108 #define CAM_ACTIVE_AREA_Y2 3364 109 110 // camera name 111 #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData - Camera Model name 112 #define PARAM_OWNER_NAME 7 // parameter number for GetParameterData - Owner name 113 #define PARAM_ARTIST_NAME 157 // parameter number for GetParameterData - Artist name 114 #define PARAM_COPYRIGHT 158 // parameter number for GetParameterData - Copyright 115 #define PARAM_DISPLAY_MODE1 59 // param number for LCD display mode when camera in playback 116 #define PARAM_DISPLAY_MODE2 62 // param number for LCD display mode when camera in record view hold mode 117 #undef CAM_SENSOR_BITS_PER_PIXEL 118 #define CAM_SENSOR_BITS_PER_PIXEL 14 119 120 #undef CAM_EXT_AV_RANGE 121 #define CAM_EXT_AV_RANGE 0 // G1X can't go below F/16 so set this to 0 122 #define CAM_QUALITY_OVERRIDE 1 123 #define CAM_REAR_CURTAIN 1 124 125 #undef CAM_USES_ASPECT_CORRECTION 126 #define CAM_USES_ASPECT_CORRECTION 1 //camera uses the modified graphics primitives to map screens an viewports to buffers more sized 127 #undef CAM_BITMAP_WIDTH 128 #undef CAM_BITMAP_HEIGHT 129 #define CAM_BITMAP_WIDTH 960 // Actual width of bitmap screen in bytes 130 #define CAM_BITMAP_HEIGHT 270 // Actual height of bitmap screen in rows 131 132 133 #undef EDGE_HMARGIN 134 #define EDGE_HMARGIN 2 135 136 #define CAM_DATE_FOLDER_NAMING 0x400 137 138 #undef CAM_KEY_PRESS_DELAY 139 #define CAM_KEY_PRESS_DELAY 60 // delay after a press 140 141 #define CAM_DRIVE_MODE_FROM_TIMER_MODE 1 // use PROPCASE_TIMER_MODE to check for multiple shot custom timer. 142 // Used to enabled bracketing in custom timer, required on many recent cameras 143 // see http://chdk.setepontos.com/index.php/topic,3994.405.html 144 145 #define CAM_AV_OVERRIDE_IRIS_FIX 1 // for cameras that require _MoveIrisWithAv function to override Av in bracketing. 146 147 #define CAM_HAS_MOVIE_DIGEST_MODE 1 // Changes the values in the 'movie_status' variable if the camera has this mode 148 149 #define CAM_LOAD_CUSTOM_COLORS 1 // Enable loading CHDK colors into the camera palette memory/hardware 150 151 #undef CAM_USB_EVENTID 152 #define CAM_USB_EVENTID 0x202 // Levent ID for USB control. Changed in DryOS R49 so needs to be overridable. 153 154 // #define REMOTE_SYNC_STATUS_LED 0xC0xxyyyy // specifies an LED that turns on while camera waits for USB remote to sync 155 156 #define CAM_HAS_CMOS 1 157 158 #undef CAMERA_MIN_DIST 159 #define CAMERA_MIN_DIST 275 // Override min subject distance 160 #undef CAMERA_MAX_DIST 161 #define CAMERA_MAX_DIST 660067 // Override max subject distance 162 163 // Define shortcut overrides where defaults are not suitable 164 #define SHORTCUT_TOGGLE_ZEBRA KEY_ERASE // On camera Shutter Half Press + Up = switch MF on/off 165 166 #define CAM_HAS_FILEWRITETASK_HOOK 1 // file write hook for remote capture etc 167 168 #define CAM_HOTSHOE_OVERRIDE 1 169 170 #define CAM_SD_OVER_IN_AF 1 171 #define CAM_SD_OVER_IN_AFL 1 172 #define CAM_SD_OVER_IN_MF 1 173 174 #define CAM_IS_VID_REC_WORKS 1 // is_video_recording() function works 175 176 #define CAM_HAS_CANON_RAW 1 // has native Canon raw 177 178 //--------------------------------------------------