Changeset 1662
- Timestamp:
- 02/12/12 03:29:35 (16 months ago)
- Location:
- branches/release-1_0
- Files:
-
- 95 edited
-
core/levent.c (modified) (1 diff)
-
core/luascript.c (modified) (9 diffs)
-
core/ptp.h (modified) (1 diff)
-
include/asmsafe.h (modified) (4 diffs)
-
include/camera.h (modified) (3 diffs)
-
include/conf.h (modified) (12 diffs)
-
include/gui.h (modified) (1 diff)
-
include/keyboard.h (modified) (1 diff)
-
include/lauxlib.h (modified) (8 diffs)
-
include/levent.h (modified) (3 diffs)
-
include/lolevel.h (modified) (5 diffs)
-
include/lua.h (modified) (21 diffs)
-
include/luaconf.h (modified) (47 diffs)
-
include/lualib.h (modified) (2 diffs)
-
include/modelist.h (modified) (4 diffs)
-
include/platform.h (modified) (16 diffs)
-
include/propset4.h (modified) (4 diffs)
-
include/setjmp.h (modified) (3 diffs)
-
include/vxworks.h (modified) (1 diff)
-
lib/armutil/callfunc.S (modified) (1 diff)
-
lib/lua/loslib.c (modified) (2 diffs)
-
lib/ubasic/camera_functions.c (modified) (2 diffs)
-
platform/a3300/platform_camera.h (modified) (1 diff)
-
platform/a410/lib.c (modified) (1 diff)
-
platform/a410/platform_camera.h (modified) (1 diff)
-
platform/a430/Makefile (modified) (1 diff)
-
platform/a430/lib.c (modified) (1 diff)
-
platform/a450/Makefile (modified) (1 diff)
-
platform/a450/lib.c (modified) (1 diff)
-
platform/a460/Makefile (modified) (1 diff)
-
platform/a460/lib.c (modified) (1 diff)
-
platform/a530/Makefile (modified) (1 diff)
-
platform/a540/Makefile (modified) (1 diff)
-
platform/a540/lib.c (modified) (1 diff)
-
platform/a550/Makefile (modified) (1 diff)
-
platform/a550/lib.c (modified) (1 diff)
-
platform/a560/Makefile (modified) (1 diff)
-
platform/a570/Makefile (modified) (1 diff)
-
platform/a610/Makefile (modified) (1 diff)
-
platform/a610/lib.c (modified) (1 diff)
-
platform/a620/Makefile (modified) (1 diff)
-
platform/a620/lib.c (modified) (1 diff)
-
platform/a630/Makefile (modified) (1 diff)
-
platform/a630/lib.c (modified) (1 diff)
-
platform/a640/Makefile (modified) (1 diff)
-
platform/a640/lib.c (modified) (1 diff)
-
platform/a700/Makefile (modified) (2 diffs)
-
platform/a700/lib.c (modified) (1 diff)
-
platform/a710/Makefile (modified) (1 diff)
-
platform/a710/lib.c (modified) (1 diff)
-
platform/d10/platform_camera.h (modified) (1 diff)
-
platform/g10/platform_camera.h (modified) (1 diff)
-
platform/g12/platform_camera.h (modified) (1 diff)
-
platform/g7/Makefile (modified) (1 diff)
-
platform/g9/platform_camera.h (modified) (1 diff)
-
platform/generic/lib.c (modified) (1 diff)
-
platform/ixus1000_sd4500/platform_camera.h (modified) (1 diff)
-
platform/ixus100_sd780/platform_camera.h (modified) (1 diff)
-
platform/ixus120_sd940/platform_camera.h (modified) (1 diff)
-
platform/ixus200_sd980/platform_camera.h (modified) (1 diff)
-
platform/ixus200_sd980/shooting.c (modified) (1 diff)
-
platform/ixus220_elph300hs/platform_camera.h (modified) (1 diff)
-
platform/ixus300_sd4000/kbd.c (modified) (2 diffs)
-
platform/ixus300_sd4000/lib.c (modified) (1 diff)
-
platform/ixus300_sd4000/platform_camera.h (modified) (1 diff)
-
platform/ixus300_sd4000/sub/100d/lib.c (modified) (5 diffs)
-
platform/ixus310_elph500hs/platform_camera.h (modified) (1 diff)
-
platform/ixus40_sd300/Makefile (modified) (1 diff)
-
platform/ixus50_sd400/Makefile (modified) (1 diff)
-
platform/ixus55_sd450/Makefile (modified) (1 diff)
-
platform/ixus60_sd600/Makefile (modified) (1 diff)
-
platform/ixus60_sd600/lib.c (modified) (1 diff)
-
platform/ixus65_sd630/Makefile (modified) (1 diff)
-
platform/ixus65_sd630/lib.c (modified) (1 diff)
-
platform/ixus70_sd1000/Makefile (modified) (1 diff)
-
platform/ixus750_sd550/Makefile (modified) (1 diff)
-
platform/ixus750_sd550/sub/100h/lib.c (modified) (1 diff)
-
platform/ixus750_sd550/sub/100h/stubs_entry_2.S (modified) (1 diff)
-
platform/ixus75_sd750/Makefile (modified) (1 diff)
-
platform/ixus800_sd700/Makefile (modified) (1 diff)
-
platform/ixus850_sd800/Makefile (modified) (1 diff)
-
platform/ixus900_sd900/Makefile (modified) (1 diff)
-
platform/ixus950_sd850/Makefile (modified) (1 diff)
-
platform/ixusizoom_sd30/Makefile (modified) (1 diff)
-
platform/ixusizoom_sd30/lib.c (modified) (1 diff)
-
platform/s2is/Makefile (modified) (1 diff)
-
platform/s3is/Makefile (modified) (1 diff)
-
platform/sx100is/platform_camera.h (modified) (1 diff)
-
platform/sx130is/lib.c (modified) (1 diff)
-
platform/sx130is/platform_camera.h (modified) (1 diff)
-
platform/sx20/platform_camera.h (modified) (1 diff)
-
platform/sx220hs/platform_camera.h (modified) (1 diff)
-
platform/sx230hs/platform_camera.h (modified) (1 diff)
-
platform/sx30/platform_camera.h (modified) (1 diff)
-
platform/sx40hs/platform_camera.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-1_0/core/levent.c
r992 r1662 3 3 #include "levent.h" 4 4 5 // functions dealing with "logical events" 6 7 unsigned levent_index_for_name(const char *name) { 8 unsigned i; 9 // TODO could check for id=-1 or id=0, both show up at end of table ? 10 for (i=0; levent_table[i].name; i++) { 11 // case insensitive might be better 12 if (strcmp(levent_table[i].name,name) == 0) { 13 return i; 14 } 5 /* function dealing with "logical events"*/ 6 unsigned levent_index_for_name(const char *name) 7 { 8 unsigned i; 9 // TODO could check for id=-1 or id=0, both show up at end of table ? 10 for (i=0; levent_table[i].name; i++) { 11 // case insensitive might be better 12 if (strcmp(levent_table[i].name,name) == 0) { 13 return i; 15 14 } 16 return LEVENT_INVALID_INDEX; 15 } 16 return LEVENT_INVALID_INDEX; 17 17 } 18 18 19 unsigned levent_index_for_id(unsigned id) {20 unsigned i; 21 // TODO could check for id=-1 or id=0, both show up at end of table ?22 for (i=0; levent_table[i].name; i++) {23 // case insensitive might be better24 if (id == levent_table[i].id) {25 return i;26 }19 unsigned levent_index_for_id(unsigned id) 20 { 21 unsigned i; 22 // TODO could check for id=-1 or id=0, both show up at end of table ? 23 for (i=0; levent_table[i].name; i++) { 24 // case insensitive might be better 25 if (id == levent_table[i].id) { 26 return i; 27 27 } 28 return LEVENT_INVALID_INDEX; 28 } 29 return LEVENT_INVALID_INDEX; 29 30 } 30 31 31 unsigned levent_count(void) {32 static unsigned num_levents = 0; 33 if(!num_levents) {34 levent_def *ev;35 // TODO could check for id=-1 or id=0, both show up at end of table ?36 for (ev = levent_table; ev->name; ev++) {37 num_levents++;38 }32 unsigned levent_count(void) 33 { 34 static unsigned num_levents = 0; 35 if(!num_levents) { 36 levent_def *ev; 37 // TODO could check for id=-1 or id=0, both show up at end of table ? 38 for (ev = levent_table; ev->name; ev++) { 39 num_levents++; 39 40 } 40 return num_levents; 41 } 42 return num_levents; 41 43 } 42 44 43 unsigned levent_id_for_name(const char *name) { 44 unsigned i = levent_index_for_name(name); 45 if (i!=LEVENT_INVALID_INDEX) 46 return levent_table[i].id; 47 else 48 return 0; // or -1 ? both appear at the end of the event list 45 unsigned levent_id_for_name(const char *name) 46 { 47 unsigned i = levent_index_for_name(name); 48 if (i!=LEVENT_INVALID_INDEX) 49 return levent_table[i].id; 50 else 51 return 0; // or -1 ? both appear at the end of the event list 49 52 } 50 53 51 const char * levent_name_for_id(unsigned id) { 52 unsigned i = levent_index_for_id(id); 53 if (i!=LEVENT_INVALID_INDEX) 54 return levent_table[i].name; 55 else 56 return NULL; 54 const char * levent_name_for_id(unsigned id) 55 { 56 unsigned i = levent_index_for_id(id); 57 if (i!=LEVENT_INVALID_INDEX) 58 return levent_table[i].name; 59 else 60 return NULL; 57 61 } 58 62 59 63 // note, slow linear search every time 60 int levent_post_to_ui_by_name(const char *name) { 61 unsigned id=levent_id_for_name(name); 62 if(id) { 63 PostLogicalEventToUI(id,0); 64 return 1; 65 } 66 return 0; 64 int levent_post_to_ui_by_name(const char *name) 65 { 66 unsigned id=levent_id_for_name(name); 67 if(id) { 68 PostLogicalEventToUI(id,0); 69 return 1; 70 } 71 return 0; 67 72 } 68 73 69 74 void levent_set_record(void) { 70 levent_post_to_ui_by_name("PressRecButton");71 levent_post_to_ui_by_name("UnpressRecButton");75 levent_post_to_ui_by_name("PressRecButton"); 76 levent_post_to_ui_by_name("UnpressRecButton"); 72 77 } 73 78 74 79 void levent_set_play(void) { 75 levent_post_to_ui_by_name("PressPBButton");76 levent_post_to_ui_by_name("UnpressPBButton");80 levent_post_to_ui_by_name("PressPBButton"); 81 levent_post_to_ui_by_name("UnpressPBButton"); 77 82 } -
branches/release-1_0/core/luascript.c
r1561 r1662 133 133 static void lua_count_hook(lua_State *L, lua_Debug *ar) 134 134 { 135 run_hook_count++;136 if( L->nCcalls > L->baseCcalls || !yield_hook_enabled )135 run_hook_count++; 136 if( L->nCcalls > L->baseCcalls || !yield_hook_enabled ) 137 137 return; 138 if(run_hook_count >= yield_max_count || get_tick_count() - run_start_tick >= yield_max_ms)138 if(run_hook_count >= yield_max_count || get_tick_count() - run_start_tick >= yield_max_ms) 139 139 lua_yield( L, 0 ); 140 140 } … … 831 831 } 832 832 833 // begin lua draw fuctions 833 834 unsigned char script_colors[][2] = { 834 835 … … 870 871 {COLOR_HISTO_B_PLAY, COLOR_HISTO_B}, // 12 blue_light - placeholder 871 872 872 {COLOR_BLACK, COLOR_BLACK}, // 13 grey - placeholder (there's no universal grey)873 {COLOR_BLACK, COLOR_BLACK}, // 14 grey_dark - placeholder (there's no universal grey)873 {COLOR_BLACK, COLOR_BLACK}, // 13 grey - placeholder (there's no universal grey) 874 {COLOR_BLACK, COLOR_BLACK}, // 14 grey_dark - placeholder (there's no universal grey) 874 875 {COLOR_WHITE, COLOR_WHITE}, // 15 grey_light - placeholder (there's no universal grey) 875 876 … … 973 974 return 1; 974 975 } 976 // end lua draw functions 975 977 976 978 static int luaCB_autostarted( lua_State* L ) … … 1038 1040 static int luaCB_set_movie_status( lua_State* L ) 1039 1041 { 1040 int to;1041 1042 switch(luaL_checknumber( L, 1 )) { 1042 1043 case 1: … … 1827 1828 { 1828 1829 unsigned *argbuf=NULL; 1829 unsigned i;1830 1830 unsigned n_args = lua_gettop(L)-1; 1831 1831 void *fptr; … … 1876 1876 const char *evpname; 1877 1877 unsigned *argbuf; 1878 unsigned i;1879 1878 unsigned n_args = lua_gettop(L); 1880 1879 … … 1908 1907 static int luaCB_reboot( lua_State* L ) 1909 1908 { 1910 lua_pushboolean(L, reboot(luaL_optstring( L, 1, NULL )));1911 return 1;1909 lua_pushboolean(L, reboot(luaL_optstring( L, 1, NULL ))); 1910 return 1; 1912 1911 } 1913 1912 … … 2166 2165 } 2167 2166 2168 2169 2167 static void register_func( lua_State* L, const char *name, void *func) { 2170 2168 lua_pushcfunction( L, func ); -
branches/release-1_0/core/ptp.h
r1504 r1662 31 31 // param3 is size (in bytes) 32 32 // data is new memory block 33 PTP_CHDK_CallFunction, // data is array of function pointer and (long) arguments (max: 10 args) 33 PTP_CHDK_CallFunction, // data is array of function pointer and (long) arguments (max: 10 args) 34 34 // return param1 is return value 35 35 PTP_CHDK_TempData, // data is data to be stored for later -
branches/release-1_0/include/asmsafe.h
r994 r1662 1 1 #ifndef ASMSAFE_H 2 2 #define ASMSAFE_H 3 4 3 /* 5 4 macros to safely call C functions from most inline ASM … … 9 8 usage 10 9 asm volatile ( 11 ...12 ASM_SAFE("BL my_func\n")13 ...10 ... 11 ASM_SAFE("BL my_func\n") 12 ... 14 13 ) 15 14 … … 36 35 "LDR R0,[SP],#4\n" \ 37 36 "MSR CPSR_cxsf,R0\n" \ 38 "LDMFD SP!, {R0-R12,LR}\n" 37 "LDMFD SP!, {R0-R12,LR}\n" 39 38 40 39 #define ASM_SAFE(asmcode) \ … … 43 42 ASM_SAFE_LEAVE 44 43 45 #endif // ASMSAFE_H44 #endif // ASMSAFE_H -
branches/release-1_0/include/camera.h
r1657 r1662 20 20 //---------------------------------------------------------- 21 21 22 #undef CAM_DRYOS // Camera is DryOS-based 23 #undef CAM_PROPSET // Camera's properties group (the generation) 24 #undef CAM_DRYOS_2_3_R39 // Define for cameras with DryOS release R39 or greater 25 #undef CAM_DRYOS_2_3_R47 // Define for cameras with DryOS release R47 or greater 26 27 #undef CAM_SWIVEL_SCREEN // Camera has rotated LCD screen 28 #define CAM_USE_ZOOM_FOR_MF 1 // Zoom lever can be used for manual focus adjustments 29 #undef CAM_ADJUSTABLE_ALT_BUTTON // ALT-button can be set from menu 30 #define CAM_REMOTE 1 // Camera supports USB-remote 31 #undef SYNCHABLE_REMOTE_NOT_ENABLED // Disable support for synchable remote switch (in kbd.c) TODO only used by one camera ??? 32 #define CAM_SYNCH 1 // Camera supports SDM precision synch 33 #undef CAM_MULTIPART // Camera supports SD-card multipartitioning 34 #define CAM_HAS_ZOOM_LEVER 1 // Camera has dedicated zoom buttons 35 #undef CAM_DRAW_EXPOSITION // Output expo-pair on screen (for cameras which (sometimes) don't do that) 36 #define CAM_HAS_ERASE_BUTTON 1 // Camera has dedicated erase button 37 #define CAM_HAS_IRIS_DIAPHRAGM 1 // Camera has real diaphragm mechanism (http://en.wikipedia.org/wiki/Diaphragm_%28optics%29) 38 #undef CAM_HAS_ND_FILTER // Camera has build-in ND filter 39 #define CAM_CAN_SD_OVER_NOT_IN_MF 1 // Camera allows subject distance (focus) override when not in manual focus mode 40 #undef CAM_CAN_SD_OVER_IN_AF_LOCK // Camera allows subject distance (focus) override when in AF Lock mode 41 #define CAM_CAN_SD_OVERRIDE 1 // Camera allows to do subject distance override 42 #define CAM_HAS_MANUAL_FOCUS 1 // Camera has manual focus mode 43 #define CAM_HAS_USER_TV_MODES 1 // Camera has tv-priority or manual modes with ability to set tv value 44 #undef CAM_SHOW_OSD_IN_SHOOT_MENU // On some cameras Canon shoot menu has additional functionality and useful in this case to see CHDK OSD in this mode 45 #define CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 1 // Camera can unlock optical zoom in video (if it is locked) 46 #undef CAM_FEATURE_FEATHER // Cameras with "feather" or touch wheel. 47 #define CAM_HAS_IS 1 // Camera has image stabilizer 48 #undef CAM_HAS_JOGDIAL // Camera has a "jog dial" 49 50 #undef CAM_CONSOLE_LOG_ENABLED // Development: internal camera stdout -> A/stdout.txt 51 #define CAM_CHDK_HAS_EXT_VIDEO_MENU 1 // In CHDK for this camera realized adjustable video compression 52 #undef CAM_CAN_MUTE_MICROPHONE // Camera has function to mute microphone 53 54 #define CAM_EMUL_KEYPRESS_DELAY 40 // Delay to interpret <alt>-button press as longpress 55 #define CAM_EMUL_KEYPRESS_DURATION 5 // Length of keypress emulation 56 57 #define CAM_MENU_BORDERWIDTH 30 // Defines the width of the border on each side of the CHDK menu. The CHDK menu will have this 22 #undef CAM_DRYOS // Camera is DryOS-based 23 #undef CAM_PROPSET // Camera's properties group (the generation) 24 #undef CAM_DRYOS_2_3_R31 // Define for cameras with DryOS release R31 or greater -> G10 25 #undef CAM_DRYOS_2_3_R39 // Define for cameras with DryOS release R39 or greater 26 #undef CAM_DRYOS_2_3_R47 // Define for cameras with DryOS release R47 or greater -> Cameras can boot from FAT32 27 28 #undef CAM_HAS_CMOS // Camera has CMOS sensor 29 #undef CAM_SWIVEL_SCREEN // Camera has rotated LCD screen 30 #define CAM_USE_ZOOM_FOR_MF 1 // Zoom lever can be used for manual focus adjustments 31 #undef CAM_ADJUSTABLE_ALT_BUTTON // ALT-button can be set from menu 32 #define CAM_REMOTE 1 // Camera supports USB-remote 33 #undef SYNCHABLE_REMOTE_NOT_ENABLED // Disable support for synchable remote switch (in kbd.c) TODO only used by one camera ??? 34 #define CAM_SYNCH 1 // Camera supports SDM precision synch 35 #undef CAM_MULTIPART // Camera supports SD-card multipartitioning 36 #define CAM_HAS_ZOOM_LEVER 1 // Camera has dedicated zoom buttons 37 #undef CAM_DRAW_EXPOSITION // Output expo-pair on screen (for cameras which (sometimes) don't do that) 38 #define CAM_HAS_ERASE_BUTTON 1 // Camera has dedicated erase button 39 #define CAM_HAS_IRIS_DIAPHRAGM 1 // Camera has real diaphragm mechanism (http://en.wikipedia.org/wiki/Diaphragm_%28optics%29) 40 #undef CAM_HAS_ND_FILTER // Camera has build-in ND filter 41 #define CAM_CAN_SD_OVER_NOT_IN_MF 1 // Camera allows subject distance (focus) override when not in manual focus mode 42 #undef CAM_CAN_SD_OVER_IN_AF_LOCK // Camera allows subject distance (focus) override when in AF Lock mode 43 #define CAM_CAN_SD_OVERRIDE 1 // Camera allows to do subject distance override 44 #define CAM_HAS_MANUAL_FOCUS 1 // Camera has manual focus mode 45 #define CAM_HAS_USER_TV_MODES 1 // Camera has tv-priority or manual modes with ability to set tv value 46 #undef CAM_SHOW_OSD_IN_SHOOT_MENU // On some cameras Canon shoot menu has additional functionality and useful in this case to see CHDK OSD in this mode 47 #define CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 1 // Camera can unlock optical zoom in video (if it is locked) 48 #undef CAM_FEATURE_FEATHER // Cameras with "feather" or touch wheel. 49 #define CAM_HAS_IS 1 // Camera has image stabilizer 50 #undef CAM_HAS_JOGDIAL // Camera has a "jog dial" 51 52 #undef CAM_CONSOLE_LOG_ENABLED // Development: internal camera stdout -> A/stdout.txt 53 #define CAM_CHDK_HAS_EXT_VIDEO_MENU 1 // In CHDK for this camera realized adjustable video compression 54 #undef CAM_CAN_MUTE_MICROPHONE // Camera has function to mute microphone 55 56 #define CAM_EMUL_KEYPRESS_DELAY 40 // Delay to interpret <alt>-button press as longpress 57 #define CAM_EMUL_KEYPRESS_DURATION 5 // Length of keypress emulation 58 59 #define CAM_MENU_BORDERWIDTH 30 // Defines the width of the border on each side of the CHDK menu. The CHDK menu will have this 58 60 // many pixels left blank to the on each side. Should not be less than 10 to allow room for the 59 61 // scroll bar on the right. 60 61 #undef CAM_DETECT_SCREEN_ERASE // Define this to add 'guard' pixel to the screen bitmap to help detect if the firmware has erase the screen 62 #define CAM_DETECT_SCREEN_ERASE 1 // Define this to add 'guard' pixel to the screen bitmap to help detect if the firmware has erase the screen 62 63 // If the guard pixel changes the CHDK ALT menu is forced to redraw. 63 64 // Take care not to place CHDK OSD elements over the guard pixel. 64 65 // The guard pixel is the first pixel of the top row in the screen bitmap. 65 66 66 #undef CAM_TOUCHSCREEN_UI// Define to enable touch screen U/I (e.g. IXUS 310 HS)67 #define CAM_TS_BUTTON_BORDER 0// Define this to leave a border on each side of the OSD display for touch screen buttons.67 #undef CAM_TOUCHSCREEN_UI // Define to enable touch screen U/I (e.g. IXUS 310 HS) 68 #define CAM_TS_BUTTON_BORDER 0 // Define this to leave a border on each side of the OSD display for touch screen buttons. 68 69 // Used on the IXUS 310 to stop the OSD from overlapping the on screen buttons on each side 69 #define CAM_DISP_ALT_TEXT 1 // Display the '<ALT>' message at the bottom of the screen in ALT mode (IXUS 310 changes button color instead) 70 71 #undef CAM_AF_SCAN_DURING_VIDEO_RECORD // CHDK can make single AF scan during video record 72 #undef CAM_HAS_VIDEO_BUTTON // Camera can take stills in video mode, and vice versa 73 #undef CAM_EV_IN_VIDEO // CHDK can change exposure in video mode 74 #define CAM_VIDEO_CONTROL 1 // pause / unpause video recordings 75 #undef CAM_VIDEO_QUALITY_ONLY // Override Video Bitrate is not supported 76 77 #define ZOOM_OVERRIDE 0 // Shall zoom-override be used? default 0 becoz not implemented right now 78 79 #undef CAM_REAR_CURTAIN // Camera do not have front/rear curtain flash sync in menu 80 #undef CAM_BRACKETING // Cameras that have bracketing (focus & ev) in original firmware already, most likely s- & g-series (propcase for digic III not found yet!) 81 #undef CAM_EXT_TV_RANGE // CHDK can make exposure time longer than 64s 82 #define CAM_CHDK_PTP 1 // include CHDK PTP support 83 84 #define CAM_UNCACHED_BIT 0x10000000 // bit indicating the uncached memory 85 86 #define CAM_MAKE "Canon" 87 #define CAM_SENSOR_BITS_PER_PIXEL 10 // Bits per pixel. 10 is standard, 12 is supported except for curves 88 #define CAM_WHITE_LEVEL ((1<<CAM_SENSOR_BITS_PER_PIXEL)-1) // 10bpp = 1023 ((1<<10)-1), 12bpp = 4095 ((1<<12)-1) 89 #define CAM_BLACK_LEVEL ((1<<(CAM_SENSOR_BITS_PER_PIXEL-5))-1) // 10bpp = 31 ((1<<5)-1), 12bpp = 127 ((1<<7)-1) 90 91 #define CAM_BITMAP_PALETTE 1 // which color set is used for this camera 92 93 #undef CAM_HAS_VARIABLE_ASPECT // can switch between 16:9 and 4:3 94 95 // by nandoide sept-2009 96 // zebra adjust buffer height: show use at sx200is: needed for save memory space 97 #define ZEBRA_HMARGIN0 0 98 99 // Older cameras had a screen/bitmap buffer that was 360 pixels wide (or 480 for wide screen models) 100 // CHDK was built around this 360 pixel wide display model 101 // Newer cameras have a 720 pixel wide bitmap (960 for wide screen cameras) 102 // To accomadate this the CHDK co-ordinate system assumes a 360/480 wide buffer and the 103 // pixel drawing routines draw every pixel twice to scale the image up to the actual buffer size 104 // Define CAM_USES_ASPECT_CORRECTION with a value of 1 to enable this scaled display 105 #define CAM_USES_ASPECT_CORRECTION 0 106 107 #define EDGE_HMARGIN 0 // define sup and inf screen margins on edge overlay without overlay. Necessary to save memory buffer space. sx200is needs values other than 0 108 // end of section by nandoid 109 110 #undef CAM_QUALITY_OVERRIDE // define this in platform_camera.h to enable 'Super Fine' JPEG compression mode 70 #define CAM_DISP_ALT_TEXT 1 // Display the '<ALT>' message at the bottom of the screen in ALT mode (IXUS 310 changes button color instead) 71 72 #undef CAM_AF_SCAN_DURING_VIDEO_RECORD // CHDK can make single AF scan during video record 73 #undef CAM_HAS_VIDEO_BUTTON // Camera can take stills in video mode, and vice versa 74 #undef CAM_EV_IN_VIDEO // CHDK can change exposure in video mode 75 #define CAM_VIDEO_CONTROL 1 // pause / unpause video recordings 76 #undef CAM_VIDEO_QUALITY_ONLY // Override Video Bitrate is not supported 77 #undef CAM_CHDK_HAS_EXT_VIDEO_TIME // Camera can override time limit of video record -> sx220/230 78 79 #define ZOOM_OVERRIDE 0 // Shall zoom-override be used? default 0 becoz not implemented right now 80 81 #undef CAM_REAR_CURTAIN // Camera do not have front/rear curtain flash sync in menu 82 #undef CAM_BRACKETING // Cameras that have bracketing (focus & ev) in original firmware already, most likely s- & g-series (propcase for digic III not found yet!) 83 #undef CAM_EXT_TV_RANGE // CHDK can make exposure time longer than 64s 84 #define CAM_CHDK_PTP 1 // include CHDK PTP support 85 86 #define CAM_UNCACHED_BIT 0x10000000 // bit indicating the uncached memory 87 88 #define CAM_MAKE "Canon" 89 #define CAM_SENSOR_BITS_PER_PIXEL 10 // Bits per pixel. 10 is standard, 12 is supported except for curves 90 #define CAM_WHITE_LEVEL ((1<<CAM_SENSOR_BITS_PER_PIXEL)-1) // 10bpp = 1023 ((1<<10)-1), 12bpp = 4095 ((1<<12)-1) 91 #define CAM_BLACK_LEVEL ((1<<(CAM_SENSOR_BITS_PER_PIXEL-5))-1) // 10bpp = 31 ((1<<5)-1), 12bpp = 127 ((1<<7)-1) 92 93 #define CAM_BITMAP_PALETTE 1 // which color set is used for this camera 94 95 #undef CAM_HAS_VARIABLE_ASPECT // can switch between 16:9 and 4:3 96 97 // by nandoide sept-2009 98 //zebra adjust buffer height: show use at sx200is: needed for save memory space 99 #define ZEBRA_HMARGIN0 0 100 101 // Older cameras had a screen/bitmap buffer that was 360 pixels wide (or 480 for wide screen models) 102 // CHDK was built around this 360 pixel wide display model 103 // Newer cameras have a 720 pixel wide bitmap (960 for wide screen cameras) 104 // To accomadate this the CHDK co-ordinate system assumes a 360/480 wide buffer and the 105 // pixel drawing routines draw every pixel twice to scale the image up to the actual buffer size 106 // Define CAM_USES_ASPECT_CORRECTION with a value of 1 to enable this scaled display 107 #define CAM_USES_ASPECT_CORRECTION 0 108 109 #define EDGE_HMARGIN 0 // define sup and inf screen margins on edge overlay without overlay. Necessary to save memory buffer space. sx200is needs values other than 0 110 // end of section by nandoid 111 112 #undef CAM_QUALITY_OVERRIDE // define this in platform_camera.h to enable 'Super Fine' JPEG compression mode 111 113 // used to allow super fine JPEG option on cameras where this has been removed 112 114 // from the Canon menu. Note: may not actually work on all cameras. 113 115 114 #undef CAM_ZEBRA_ASPECT_ADJUST// zebra needs to account for real bitmap size being different from what lib.c reports116 #undef CAM_ZEBRA_ASPECT_ADJUST // zebra needs to account for real bitmap size being different from what lib.c reports 115 117 // also used by some cameras with normal bitmap layouts for memory saving ? 116 #undef CAM_ZEBRA_NOBUF// zebra draws directly on bitmap buffer. Requires above as well117 118 #undef CAM_DATE_FOLDER_NAMING// set if camera uses date based folder naming (Option "Create Folder" in Canon Menu) and get_target_dir_name is implemented119 120 #undef CAM_KEY_CLICK_DELAY// additional delay between press and release for scripted click121 #define CAM_KEY_PRESS_DELAY 20// delay after a press - TODO can we combine this with above ?122 #define CAM_KEY_RELEASE_DELAY 20// delay after a release - TODO do we really need to wait after release ?123 124 #undef CAM_STARTUP_CRASH_FILE_OPEN_FIX// enable fix for camera intermittently crash at startup when opening the conf / font files118 #undef CAM_ZEBRA_NOBUF // zebra draws directly on bitmap buffer. Requires above as well 119 120 #undef CAM_DATE_FOLDER_NAMING // set if camera uses date based folder naming (Option "Create Folder" in Canon Menu) and get_target_dir_name is implemented 121 122 #undef CAM_KEY_CLICK_DELAY // additional delay between press and release for scripted click 123 #define CAM_KEY_PRESS_DELAY 20 // delay after a press - TODO can we combine this with above ? 124 #define CAM_KEY_RELEASE_DELAY 20 // delay after a release - TODO do we really need to wait after release ? 125 126 #undef CAM_STARTUP_CRASH_FILE_OPEN_FIX // enable fix for camera intermittently crash at startup when opening the conf / font files 125 127 // Some cameras throw "ASSERT!! FsIoNotify.c Line xxx Task name: SpyTask" in ROMLOG 126 // see http://chdk.setepontos.com/index.php?topic=6179.0 127 128 // RAW & DNG related values 129 #define DNG_SUPPORT 1 // Camera supports DNG format for saving of RAW images 130 #define DEFAULT_RAW_EXT 1 // extension to use for raw (see raw_exts in conf.c) 131 #undef CAM_RAW_ROWPIX // Number of pixels in RAW row (physical size of the sensor Note : as of July 2011, this value can be found in stub_entry.S for dryos cameras) 132 #undef CAM_RAW_ROWS // Number of rows in RAW (physical size of the sensor Note : as of July 2011, this value can be found in stub_entry.S for dryos cameras) 133 #undef CAM_JPEG_WIDTH // Default crop size (width) stored in DNG (to match camera JPEG size. From dimensions of the largest size jpeg your camera produces) 134 #undef CAM_JPEG_HEIGHT // Default crop size (height) stored in DNG (to match camera JPEG size. From dimensions of the largest size jpeg your camera produces) 135 #undef CAM_ACTIVE_AREA_X1 // Define usable area of the sensor - needs to be divisible by 4 - calibrate using a CHDK RAW image converted with rawconvert.exe (eg :rawconvert -12to8 -pgm -w=4480 -h=3348 photo.crw photo.pgm) 136 #undef CAM_ACTIVE_AREA_Y1 // Define usable area of the sensor - needs to be divisible by 2 - " 137 #undef CAM_ACTIVE_AREA_X2 // Define usable area of the sensor - needs to be divisible by 4 - " 138 #undef CAM_ACTIVE_AREA_Y2 // Define usable area of the sensor - needs to be divisible by 2 = " 139 #undef cam_CFAPattern // Camera Bayer sensor data layout (DNG colors are messed up if not correct - should be either 0x01000201 = [Green Blue Red Green] or 0x02010100 = [Red Green Green Blue] 140 #undef CAM_COLORMATRIX1 // DNG color profile matrix 141 #undef cam_CalibrationIlluminant1 // DNG color profile illuminant - set it to 17 for standard light A 142 #undef CAM_DNG_EXPOSURE_BIAS // Specify DNG exposure bias value (to override default of -0.5 in the dng.c code) 143 #undef DNG_EXT_FROM // Extension in the cameras known extensions to replace with .DNG to allow DNG 128 129 // RAW & DNG related values 130 #define DNG_SUPPORT 1 // Camera supports DNG format for saving of RAW images 131 #define DEFAULT_RAW_EXT 1 // extension to use for raw (see raw_exts in conf.c) 132 #undef CAM_RAW_ROWPIX // Number of pixels in RAW row (physical size of the sensor Note : as of July 2011, this value can be found in stub_entry.S for dryos cameras) 133 #undef CAM_RAW_ROWS // Number of rows in RAW (physical size of the sensor Note : as of July 2011, this value can be found in stub_entry.S for dryos cameras) 134 #undef CAM_JPEG_WIDTH // Default crop size (width) stored in DNG (to match camera JPEG size. From dimensions of the largest size jpeg your camera produces) 135 #undef CAM_JPEG_HEIGHT // Default crop size (height) stored in DNG (to match camera JPEG size. From dimensions of the largest size jpeg your camera produces) 136 #undef CAM_ACTIVE_AREA_X1 // Define usable area of the sensor - needs to be divisible by 4 - calibrate using a CHDK RAW image converted with rawconvert.exe (eg :rawconvert -12to8 -pgm -w=4480 -h=3348 photo.crw photo.pgm) 137 #undef CAM_ACTIVE_AREA_Y1 // Define usable area of the sensor - needs to be divisible by 2 - " 138 #undef CAM_ACTIVE_AREA_X2 // Define usable area of the sensor - needs to be divisible by 4 - " 139 #undef CAM_ACTIVE_AREA_Y2 // Define usable area of the sensor - needs to be divisible by 2 = " 140 #undef cam_CFAPattern // Camera Bayer sensor data layout (DNG colors are messed up if not correct - should be either 0x01000201 = [Green Blue Red Green] or 0x02010100 = [Red Green Green Blue] 141 #undef CAM_COLORMATRIX1 // DNG color profile matrix 142 #undef cam_CalibrationIlluminant1 // DNG color profile illuminant - set it to 17 for standard light A 143 #undef CAM_DNG_EXPOSURE_BIAS // Specify DNG exposure bias value (to override default of -0.5 in the dng.c code) 144 #undef DNG_EXT_FROM // Extension in the cameras known extensions to replace with .DNG to allow DNG 144 145 // files to be transfered over standard PTP. Only applicable to older cameras 145 #undef DNG_VERT_RLE_BADPIXELS// Enable vertical run length compression of badpixel data for DNG146 #undef DNG_VERT_RLE_BADPIXELS // Enable vertical run length compression of badpixel data for DNG 146 147 // IXUS 310 HS bad pixels tend to be grouped into vertical lines of 1-4 pixels 147 148 // This reduces the file size by approx 45% 148 149 149 #undef CAM_DNG_LENS_INFO// Define this to include camera lens information in DNG files150 #undef CAM_DNG_LENS_INFO // Define this to include camera lens information in DNG files 150 151 // Value should be an array of 4 DNG 'RATIONAL' values specifying 151 152 // - min focal length in mm … … 157 158 // Each pair of integers is one 'RATIONAL' value (numerator,denominator) 158 159 159 #undef PARAM_CAMERA_NAME // parameter number for GetParameterData to get camera name 160 #undef PARAM_DISPLAY_MODE1 // param number for LCD display mode when camera in playback 161 #undef PARAM_DISPLAY_MODE2 // param number for LCD display mode when camera in record view hold mode 162 #undef CAM_FIRMWARE_MEMINFO // Use 'GetMemInfo' (dryos) or 'memPartInfoGet'/'memPartFindMax' (vxworks) 163 // function in firmware to get free memory details 164 // GetMemInfo should be found correctly by the gensig/finsig signature 165 // finder for all dryos based cameras. 166 167 #undef CAM_NO_MEMPARTINFO // VXWORKS camera does not have memPartInfoGet, fall back to memPartFindMax 168 169 170 #undef CAM_DRIVE_MODE_FROM_TIMER_MODE // use PROPCASE_TIMER_MODE to check for multiple shot custom timer. 171 // Used to enabled bracketing in custom timer, required on many recent cameras 172 // see http://chdk.setepontos.com/index.php/topic,3994.405.html 173 174 #undef CAM_AV_OVERRIDE_IRIS_FIX // for cameras that require _MoveIrisWithAv function to override Av (for bracketing). 175 176 #undef CAM_DISABLE_RAW_IN_LOW_LIGHT_MODE // For cameras with 'low light' mode that does not work with raw define this 177 #undef CAM_DISABLE_RAW_IN_HQ_BURST // For cameras with 'HQ Burst' mode that does not work with raw define this 178 #undef CAM_DISABLE_RAW_IN_HANDHELD_NIGHT_SCN // For cameras with 'HandHeld Night Scene' mode that does not work with raw define this 179 180 #undef CAM_LOAD_CUSTOM_COLORS // Define to enable loading CHDK custom colors into the camera color palette 160 #undef PARAM_CAMERA_NAME // parameter number for GetParameterData to get camera name 161 #undef PARAM_DISPLAY_MODE1 // param number for LCD display mode when camera in playback 162 #undef PARAM_DISPLAY_MODE2 // param number for LCD display mode when camera in record view hold mode 163 #undef CAM_FIRMWARE_MEMINFO // Use 'GetMemInfo' (dryos) or 'memPartInfoGet'/'memPartFindMax' (vxworks) 164 // function in firmware to get free memory details 165 // GetMemInfo should be found correctly by the gensig/finsig signature 166 // finder for all dryos based cameras. 167 168 #undef CAM_NO_MEMPARTINFO // VXWORKS camera does not have memPartInfoGet, fall back to memPartFindMax 169 170 #undef CAM_DRIVE_MODE_FROM_TIMER_MODE // use PROPCASE_TIMER_MODE to check for multiple shot custom timer. 171 // Used to enabled bracketing in custom timer, required on many recent cameras 172 // see http://chdk.setepontos.com/index.php/topic,3994.405.html 173 174 #undef CAM_AV_OVERRIDE_IRIS_FIX // for cameras that require _MoveIrisWithAv function to override Av (for bracketing). 175 176 #undef CAM_DISABLE_RAW_IN_LOW_LIGHT_MODE // For cameras with 'low light' mode that does not work with raw define this 177 #undef CAM_DISABLE_RAW_IN_HQ_BURST // For cameras with 'HQ Burst' mode that does not work with raw define this 178 #undef CAM_DISABLE_RAW_IN_HANDHELD_NIGHT_SCN // For cameras with 'HandHeld Night Scene' mode that does not work with raw define this 179 180 #undef CAM_HAS_GPS // for cameras with GPS reseiver: includes the GPS coordinates in in DNG file 181 182 #undef CHDK_COLOR_BASE // Start color index for CHDK colors loaded into camera palette. 183 184 #undef CAM_LOAD_CUSTOM_COLORS // Define to enable loading CHDK custom colors into the camera color palette 181 185 // requires load_chdk_palette() and vid_get_bitmap_active_palette() to be defined 182 186 // correctly for the camera along with 183 #undef CAM_USE_COLORED_ICONS// If the color palette contains enough shades of red, green, yellow and grey187 #undef CAM_USE_COLORED_ICONS // If the color palette contains enough shades of red, green, yellow and grey 184 188 // defined then enable this use the better icons (from CHDK-DE). See gui_batt.c 185 189 // and gui_space.c. 186 190 187 #define CAM_USB_EVENTID 0x902 // Levent ID for USB control. Changed to 0x202 in DryOS R49 so needs to be overridable. 188 189 #undef CAM_NEED_SET_ZOOM_DELAY // Define to add a delay after setting the zoom position before resetting the focus position in shooting_set_zoom 190 191 #define CAMERA_MIN_DIST 0 // Define min distance that can be set in _MoveFocusLensToDistance (allow override - e.g. G12 min dist = 1) 192 #define CAMERA_MAX_DIST 65535 // Define max distance that can be set in _MoveFocusLensToDistance (allow override for superzooms - SX30/SX40) 193 194 //---------------------------------------------------------- 195 // Override Default values for Camera if necessary 191 #define CAM_USB_EVENTID 0x902 // Levent ID for USB control. Changed to 0x202 in DryOS R49 so needs to be overridable. 192 193 #undef CAM_NEED_SET_ZOOM_DELAY // Define to add a delay after setting the zoom position before resetting the focus position in shooting_set_zoom 194 195 #undef USE_REAL_AUTOISO // Define this to use real-iso instead of marketing-iso as values of autoiso mechanizm 196 #undef OVEREXP_COMPENSATE_OVERALL // Define this to make overexposure_compensation work for all scenes, instead of day-light only 197 198 #define CAMERA_MIN_DIST 0 // Define min distance that can be set in _MoveFocusLensToDistance (allow override - e.g. G12 min dist = 1) 199 #define CAMERA_MAX_DIST 65535 // Define max distance that can be set in _MoveFocusLensToDistance (allow override for superzooms - SX30/SX40) 200 201 //---------------------------------------------------------- 202 // Overridden values for each camera 196 203 //---------------------------------------------------------- 197 204 … … 206 213 // the CHDK horizontal (X) co-ordinates 207 214 #if CAM_USES_ASPECT_CORRECTION 208 #define ASPECT_XCORRECTION(x) ((x)<<1) // See comments for CAM_USES_ASPECT_CORRECTION above215 #define ASPECT_XCORRECTION(x) ((x)<<1) // See comments for CAM_USES_ASPECT_CORRECTION above 209 216 #else 210 #define ASPECT_XCORRECTION(x) (x) // See comments for CAM_USES_ASPECT_CORRECTION above217 #define ASPECT_XCORRECTION(x) (x) // See comments for CAM_USES_ASPECT_CORRECTION above 211 218 #endif 212 219 213 220 // curves only work in 10bpp for now 214 221 #if CAM_SENSOR_BITS_PER_PIXEL != 10 215 #undef OPT_CURVES222 #undef OPT_CURVES 216 223 #endif 217 224 218 225 #ifndef OPT_PTP 219 #undef CAM_CHDK_PTP226 #undef CAM_CHDK_PTP 220 227 #endif 221 228 -
branches/release-1_0/include/conf.h
r1462 r1662 5 5 #include "script.h" 6 6 7 #define USER_MENU_ITEMS 147 #define USER_MENU_ITEMS 14 8 8 #define CONF_STR_LEN 100 9 9 … … 46 46 int raw_prefix; 47 47 int raw_ext; 48 int raw_save_first_only; //for series shooting48 int raw_save_first_only; //for series shooting 49 49 int raw_nr; 50 int sub_batch_prefix; // output of batch subtracts50 int sub_batch_prefix; // output of batch subtracts 51 51 int sub_batch_ext; 52 52 int sub_in_dark_value; // values <= to this are not subtracted, i.e. the dark value of your darkframe … … 135 135 136 136 color histo_color; 137 color histo_color2; // markers/border137 color histo_color2; // markers/border 138 138 color osd_color; 139 139 color osd_color_warn; … … 148 148 int menu_symbol_enable; 149 149 color reader_color; 150 color zebra_color; // under/over150 color zebra_color; // under/over 151 151 color grid_color; 152 152 color osd_color_override; … … 179 179 180 180 int use_zoom_mf; 181 long alt_mode_button; //for S-series181 long alt_mode_button; //for S-series 182 182 int alt_prevent_shutdown; 183 183 … … 189 189 int video_quality; 190 190 int video_bitrate; 191 191 192 192 int tv_bracket_value; 193 193 int av_bracket_value; … … 207 207 int tv_enum_type; 208 208 int av_override_value; 209 209 210 210 int nd_filter_state; 211 211 212 212 int iso_override_value; 213 213 int iso_override_koef; … … 255 255 int values_show_luminance; 256 256 257 int debug_shortcut_action; // 0=none, 1=dump, 2=page display258 int debug_display; // 0=none, 1=props, 2=flash param, 3=tasks257 int debug_shortcut_action; // 0=none, 1=dump, 2=page display 258 int debug_display; // 0=none, 1=props, 2=flash param, 3=tasks 259 259 int debug_propcase_page; // save propcase page 260 int debug_lua_restart_on_error; // 0=no, 1=yes260 int debug_lua_restart_on_error; // 0=no, 1=yes 261 261 int debug_misc_vals_show; // 0=no, 1=yes 262 262 263 int script_startup; // remote autostart264 int remote_enable; // remote enable263 int script_startup; // remote autostart 264 int remote_enable; // remote enable 265 265 int user_menu_enable; 266 266 int user_menu_vars[USER_MENU_ITEMS]; … … 278 278 int edge_overlay_filter; 279 279 int edge_overlay_thresh; 280 int edge_overlay_zoom; // shall zoom be set when *edg file is loaded?281 int edge_overlay_pano; // whether a full press changes back to live mode282 int edge_overlay_pano_overlap; // overlap in % in pano mode283 int edge_overlay_show; // whether to show overlay even when no button is pressed284 int edge_overlay_play; // whether edge overlay is switched on also for play mode280 int edge_overlay_zoom; // shall zoom be set when *edg file is loaded? 281 int edge_overlay_pano; // whether a full press changes back to live mode 282 int edge_overlay_pano_overlap; // overlap in % in pano mode 283 int edge_overlay_show; // whether to show overlay even when no button is pressed 284 int edge_overlay_play; // whether edge overlay is switched on also for play mode 285 285 color edge_overlay_color; 286 286 … … 322 322 #define SHOOTING_PROGRESS_DONE 3 323 323 324 324 325 // video quality defaults. Ideally, these should match the camera default settings 325 #define VIDEO_DEFAULT_QUALITY 84 // ? where does 84 come from326 #define VIDEO_DEFAULT_QUALITY 84 // ? where does 84 come from 326 327 #define VIDEO_MAX_QUALITY 99 327 #define VIDEO_DEFAULT_BITRATE 3 // should be 1 for all cams 328 #define VIDEO_DEFAULT_BITRATE 3 // should be 1 for all cams 329 330 extern void user_menu_restore(); 328 331 329 332 extern int state_kbd_script_run; … … 334 337 extern int state_expos_over; 335 338 336 extern void script_autostart(); // remote autostart339 extern void script_autostart(); // remote autostart 337 340 extern void conf_save(); 338 341 extern void conf_restore(); … … 346 349 // reyalp: putting these in conf, since the conf values are lookups for them 347 350 // prefixes and extentions available for raw images (index with conf.raw_prefix etc) 348 #define NUM_IMG_PREFIXES 3 // IMG_ CRW_ SND_ (could add ETC_ SDR_ AUT_ MVI_ MRK_)349 #define NUM_IMG_EXTS 5 // .JPG .CRW .CR2 .THM .WAV (could add .AVI .MRK)351 #define NUM_IMG_PREFIXES 3 // IMG_ CRW_ SND_ (could add ETC_ SDR_ AUT_ MVI_ MRK_) 352 #define NUM_IMG_EXTS 5 // .JPG .CRW .CR2 .THM .WAV (could add .AVI .MRK) 350 353 extern const char* img_prefixes[NUM_IMG_PREFIXES]; 351 354 extern const char* img_exts[NUM_IMG_EXTS]; -
branches/release-1_0/include/gui.h
r1338 r1662 2 2 #define GUI_H 3 3 4 typedef unsigned int coord;5 typedef unsigned short color;4 typedef unsigned int coord; 5 typedef unsigned short color; 6 6 7 #define MAKE_COLOR(bg, fg) ((color)((((char)(bg))<<8)|((char)(fg))))7 #define MAKE_COLOR(bg, fg) ((color)((((char)(bg))<<8)|((char)(fg)))) 8 8 9 // Don't delete or re-order entries unless guiHandlers (gui.c) table is updated to match 9 // Don't delete or re-order entries unless guiHandlers (gui.c) table is updated to match 10 10 enum Gui_Mode { 11 11 GUI_MODE_NONE = 0, -
branches/release-1_0/include/keyboard.h
r1344 r1662 2 2 #define KEYBOARD_H 3 3 4 #define KEY_UP 15 #define KEY_DOWN 26 #define KEY_LEFT 37 #define KEY_RIGHT 48 #define KEY_SET 59 #define KEY_SHOOT_HALF 610 #define KEY_SHOOT_FULL 7// includes KEY_SHOOT_HALF press/release. See also KEY_SHOOT_FULL_ONLY.11 #define KEY_ZOOM_IN 812 #define KEY_ZOOM_OUT 913 #define KEY_MENU 1014 #define KEY_DISPLAY 1115 #define KEY_PRINT 12 //S-series: Shortcut16 #define KEY_ERASE 13 //S-series: Func17 #define KEY_ISO 14 //S-series18 #define KEY_FLASH 15 //S-series19 #define KEY_MF 16 //S-series20 #define KEY_MACRO 17 //S-series21 #define KEY_VIDEO 18 //S-series22 #define KEY_TIMER 19 //S-series23 #define KEY_EXPO_CORR 20 //G-series24 #define KEY_MICROPHONE 2125 #define KEY_FACE 22 //SX100IS26 #define KEY_DUMMY 23 //dummy key for pressing to disable energy saving in alt mode4 #define KEY_UP 1 5 #define KEY_DOWN 2 6 #define KEY_LEFT 3 7 #define KEY_RIGHT 4 8 #define KEY_SET 5 9 #define KEY_SHOOT_HALF 6 10 #define KEY_SHOOT_FULL 7 // includes KEY_SHOOT_HALF press/release. See also KEY_SHOOT_FULL_ONLY. 11 #define KEY_ZOOM_IN 8 12 #define KEY_ZOOM_OUT 9 13 #define KEY_MENU 10 14 #define KEY_DISPLAY 11 15 #define KEY_PRINT 12 //S-series: Shortcut 16 #define KEY_ERASE 13 //S-series: Func 17 #define KEY_ISO 14 //S-series 18 #define KEY_FLASH 15 //S-series 19 #define KEY_MF 16 //S-series 20 #define KEY_MACRO 17 //S-series 21 #define KEY_VIDEO 18 //S-series 22 #define KEY_TIMER 19 //S-series 23 #define KEY_EXPO_CORR 20 //G-series 24 #define KEY_MICROPHONE 21 25 #define KEY_FACE 22 //SX100IS 26 #define KEY_DUMMY 23 //dummy key for pressing to disable energy saving in alt mode 27 27 28 28 // SX30 29 #define KEY_ZOOM_IN1 24 // SX30 has three zoom speeds each way30 #define KEY_ZOOM_IN2 2531 #define KEY_ZOOM_IN3 2632 #define KEY_ZOOM_OUT1 2733 #define KEY_ZOOM_OUT2 2834 #define KEY_ZOOM_OUT3 2935 #define KEY_ZOOM_ASSIST 30 // SX30 new button29 #define KEY_ZOOM_IN1 24 // SX30 has three zoom speeds each way 30 #define KEY_ZOOM_IN2 25 31 #define KEY_ZOOM_IN3 26 32 #define KEY_ZOOM_OUT1 27 33 #define KEY_ZOOM_OUT2 28 34 #define KEY_ZOOM_OUT3 29 35 #define KEY_ZOOM_ASSIST 30 // SX30 new button 36 36 37 37 // G12 38 #define KEY_AE_LOCK 31 // G12 AE/FE Lock button39 #define KEY_METERING 32 // G12 metering mode button38 #define KEY_AE_LOCK 31 // G12 AE/FE Lock button 39 #define KEY_METERING 32 // G12 metering mode button 40 40 41 //SX220 42 #define KEY_PLAYBACK 3343 #define KEY_LEFT_SOFT 34 // jogdial keys have two steps44 #define KEY_RIGHT_SOFT 3545 #define KEY_UP_SOFT 3646 #define KEY_DOWN_SOFT 3741 //SX220 42 #define KEY_PLAYBACK 33 43 #define KEY_LEFT_SOFT 34 // jogdial keys have two steps 44 #define KEY_RIGHT_SOFT 35 45 #define KEY_UP_SOFT 36 46 #define KEY_DOWN_SOFT 37 47 47 48 48 #define KEY_SHOOT_FULL_ONLY 38 // As KEY_SHOOT_FULL but press/release KEY_SHOOT_HALF is not included 49 49 50 #define JOGDIAL_LEFT 10051 #define JOGDIAL_RIGHT 10150 #define JOGDIAL_LEFT 100 51 #define JOGDIAL_RIGHT 101 52 52 #define FRONTDIAL_LEFT 102 53 53 #define FRONTDIAL_RIGHT 103 -
branches/release-1_0/include/lauxlib.h
r515 r1662 28 28 #endif 29 29 30 31 30 /* extra error code for `luaL_load' */ 32 31 #define LUA_ERRFILE (LUA_ERRERR+1) 33 34 32 35 33 typedef struct luaL_Reg { … … 37 35 lua_CFunction func; 38 36 } luaL_Reg; 39 40 41 37 42 38 LUALIB_API void (luaI_openlib) (lua_State *L, const char *libname, … … 89 85 const char *fname, int szhint); 90 86 91 92 93 94 87 /* 95 88 ** =============================================================== … … 98 91 */ 99 92 100 #define luaL_argcheck(L, cond,numarg,extramsg) \101 ((void)((cond) || luaL_argerror(L, (numarg), (extramsg))))102 #define luaL_checkstring(L,n) (luaL_checklstring(L, (n), NULL))103 #define luaL_optstring(L,n,d) (luaL_optlstring(L, (n), (d), NULL))104 #define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n)))105 #define luaL_optint(L,n,d) ((int)luaL_optinteger(L, (n), (d)))106 #define luaL_checklong(L,n) ((long)luaL_checkinteger(L, (n)))107 #define luaL_optlong(L,n,d) ((long)luaL_optinteger(L, (n), (d)))93 #define luaL_argcheck(L, cond,numarg,extramsg) \ 94 ((void)((cond) || luaL_argerror(L, (numarg), (extramsg)))) 95 #define luaL_checkstring(L,n) (luaL_checklstring(L, (n), NULL)) 96 #define luaL_optstring(L,n,d) (luaL_optlstring(L, (n), (d), NULL)) 97 #define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n))) 98 #define luaL_optint(L,n,d) ((int)luaL_optinteger(L, (n), (d))) 99 #define luaL_checklong(L,n) ((long)luaL_checkinteger(L, (n))) 100 #define luaL_optlong(L,n,d) ((long)luaL_optinteger(L, (n), (d))) 108 101 109 #define luaL_typename(L,i) lua_typename(L, lua_type(L,(i)))102 #define luaL_typename(L,i) lua_typename(L, lua_type(L,(i))) 110 103 111 104 #define luaL_dofile(L, fn) \ 112 (luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0))105 (luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0)) 113 106 114 107 #define luaL_dostring(L, s) \ 115 (luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0))108 (luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0)) 116 109 117 110 #define luaL_getmetatable(L,n) (lua_getfield(L, LUA_REGISTRYINDEX, (n))) … … 125 118 */ 126 119 127 128 129 120 typedef struct luaL_Buffer { 130 char *p; /* current position in buffer */131 int lvl; /* number of strings in the stack (level) */121 char *p; /* current position in buffer */ 122 int lvl; /* number of strings in the stack (level) */ 132 123 lua_State *L; 133 124 char buffer[LUAL_BUFFERSIZE]; … … 139 130 140 131 /* compatibility only */ 141 #define luaL_putchar(B,c) luaL_addchar(B,c)132 #define luaL_putchar(B,c) luaL_addchar(B,c) 142 133 143 #define luaL_addsize(B,n) ((B)->p += (n))134 #define luaL_addsize(B,n) ((B)->p += (n)) 144 135 145 136 LUALIB_API void (luaL_buffinit) (lua_State *L, luaL_Buffer *B); … … 150 141 LUALIB_API void (luaL_pushresult) (luaL_Buffer *B); 151 142 152 153 143 /* }====================================================== */ 154 155 144 156 145 /* compatibility with ref system */ … … 168 157 169 158 170 #define luaL_reg luaL_Reg159 #define luaL_reg luaL_Reg 171 160 172 161 #endif 173 174 -
branches/release-1_0/include/levent.h
r993 r1662 4 4 #define LEVENT_INVALID_INDEX 0xFFFFFFFF 5 5 6 /* logical event definition */6 /* logical event definition*/ 7 7 typedef struct { 8 8 char *name; /* name of event, may point to empty string */ … … 11 11 } levent_def; 12 12 /* 13 table of event definitions in ROM,14 address can be found with tools/find_levent15 terminated by an event with a NULL (not empty string) name pointer.13 table of event definitions in ROM, 14 address can be found with tools/find_levent 15 terminated by an event with a NULL (not empty string) name pointer. 16 16 */ 17 17 extern levent_def levent_table[]; … … 38 38 void levent_set_record(void); 39 39 void levent_set_play(void); 40 41 40 #endif -
branches/release-1_0/include/lolevel.h
r1657 r1662 42 42 extern void _SleepTask(long msec); 43 43 extern void __attribute__((noreturn)) _ExitTask(); 44 extern int _taskNameToId(char* taskName); // VxWorks only, task's name first letter must be 't', maximum 10 chars total 44 extern int _taskNameToId(char* taskName); // VxWorks only, task's name first letter must be 't', maximum 10 chars total 45 45 extern const char *_taskName(int taskID); // VxWorks only for now 46 46 extern int _taskIdListGet(int *idlist,int max); // VxWorks only for now … … 188 188 struct led_control {int led_num; int action; int brightness; int blink_count;}; 189 189 extern int _PostLEDMessage(struct led_control *); 190 int _LEDDrive(int led, int action); 190 int _LEDDrive(int led, int action); 191 191 192 192 193 extern long _LockMainPower(); … … 197 198 The following two functions post an event such as button press, switch change, cable connection change. 198 199 event: 199 A number identifying the event. This number may vary between camera models. 200 A number identifying the event. This number may vary between camera models. 200 201 See levent.c and levent.h for methods to identify events by name. 201 unk: 202 unk: 202 203 Unknown value, usually 0 in canon code. For jogdial messages, this is number of clicks. 203 204 return value: … … 207 208 extern int _PostLogicalEventToUI(int event, int unk); 208 209 /* 209 Used in the canon code to modify the generation or delivery of events. For example, Canon 210 Used in the canon code to modify the generation or delivery of events. For example, Canon 210 211 mode override code sets 1 on the desired dial position, and zero on all others. 211 212 event: as described above for PostLogicalEvent* … … 282 283 extern void _ScreenLock(); 283 284 extern void _SetCurrentCaptureModeType(); 284 extern unsigned _ExecuteEventProcedure(const char *name, ...);285 extern unsigned _ExecuteEventProcedure(const char *name, ...); 285 286 // known in CHDK as _RefreshPhysicalScreen 286 287 //extern void _ScreenUnLock(); -
branches/release-1_0/include/lua.h
r515 r1662 6 6 */ 7 7 8 9 8 #ifndef lua_h 10 9 #define lua_h … … 13 12 #include <stddef.h> 14 13 15 16 14 #include "luaconf.h" 17 15 18 19 #define LUA_VERSION "Lua 5.1" 20 #define LUA_RELEASE "Lua 5.1.3" 21 #define LUA_VERSION_NUM 501 22 #define LUA_COPYRIGHT "Copyright (C) 1994-2008 Lua.org, PUC-Rio" 23 #define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" 24 16 #define LUA_VERSION "Lua 5.1" 17 #define LUA_RELEASE "Lua 5.1.3" 18 #define LUA_VERSION_NUM 501 19 #define LUA_COPYRIGHT "Copyright (C) 1994-2008 Lua.org, PUC-Rio" 20 #define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" 25 21 26 22 /* mark for precompiled code (`<esc>Lua') */ 27 #define LUA_SIGNATURE"\033Lua"23 #define LUA_SIGNATURE "\033Lua" 28 24 29 25 /* option for multiple returns in `lua_pcall' and `lua_call' */ 30 #define LUA_MULTRET (-1) 31 26 #define LUA_MULTRET (-1) 32 27 33 28 /* 34 29 ** pseudo-indices 35 30 */ 36 #define LUA_REGISTRYINDEX (-10000) 37 #define LUA_ENVIRONINDEX (-10001) 38 #define LUA_GLOBALSINDEX (-10002) 39 #define lua_upvalueindex(i) (LUA_GLOBALSINDEX-(i)) 40 31 #define LUA_REGISTRYINDEX (-10000) 32 #define LUA_ENVIRONINDEX (-10001) 33 #define LUA_GLOBALSINDEX (-10002) 34 #define lua_upvalueindex(i) (LUA_GLOBALSINDEX-(i)) 41 35 42 36 /* thread status; 0 is OK */ 43 #define LUA_YIELD 1 44 #define LUA_ERRRUN 2 45 #define LUA_ERRSYNTAX 3 46 #define LUA_ERRMEM 4 47 #define LUA_ERRERR 5 48 37 #define LUA_YIELD 1 38 #define LUA_ERRRUN 2 39 #define LUA_ERRSYNTAX 3 40 #define LUA_ERRMEM 4 41 #define LUA_ERRERR 5 49 42 50 43 typedef struct lua_State lua_State; … … 52 45 typedef int (*lua_CFunction) (lua_State *L); 53 46 54 55 47 /* 56 48 ** functions that read/write blocks when loading/dumping Lua chunks … … 60 52 typedef int (*lua_Writer) (lua_State *L, const void* p, size_t sz, void* ud); 61 53 62 63 54 /* 64 55 ** prototype for memory-allocation functions … … 66 57 typedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize); 67 58 68 69 59 /* 70 60 ** basic types 71 61 */ 72 #define LUA_TNONE (-1) 73 74 #define LUA_TNIL 0 75 #define LUA_TBOOLEAN 1 76 #define LUA_TLIGHTUSERDATA 2 77 #define LUA_TNUMBER 3 78 #define LUA_TSTRING 4 79 #define LUA_TTABLE 5 80 #define LUA_TFUNCTION 6 81 #define LUA_TUSERDATA 7 82 #define LUA_TTHREAD 8 83 84 62 #define LUA_TNONE (-1) 63 64 #define LUA_TNIL 0 65 #define LUA_TBOOLEAN 1 66 #define LUA_TLIGHTUSERDATA 2 67 #define LUA_TNUMBER 3 68 #define LUA_TSTRING 4 69 #define LUA_TTABLE 5 70 #define LUA_TFUNCTION 6 71 #define LUA_TUSERDATA 7 72 #define LUA_TTHREAD 8 85 73 86 74 /* minimum Lua stack available to a C function */ 87 #define LUA_MINSTACK 20 88 75 #define LUA_MINSTACK 20 89 76 90 77 /* … … 95 82 #endif 96 83 97 98 84 /* type of numbers in Lua */ 99 85 typedef LUA_NUMBER lua_Number; 100 86 101 102 87 /* type for integer functions */ 103 88 typedef LUA_INTEGER lua_Integer; 104 105 106 89 107 90 /* … … 113 96 114 97 LUA_API lua_CFunction (lua_atpanic) (lua_State *L, lua_CFunction panicf); 115 116 98 117 99 /* … … 128 110 LUA_API void (lua_xmove) (lua_State *from, lua_State *to, int n); 129 111 130 131 112 /* 132 113 ** access functions (stack -> C) … … 140 121 LUA_API const char *(lua_typename) (lua_State *L, int tp); 141 122 142 LUA_API int (lua_equal) (lua_State *L, int idx1, int idx2);143 LUA_API int (lua_rawequal) (lua_State *L, int idx1, int idx2);144 LUA_API int (lua_lessthan) (lua_State *L, int idx1, int idx2);123 LUA_API int (lua_equal) (lua_State *L, int idx1, int idx2); 124 LUA_API int (lua_rawequal) (lua_State *L, int idx1, int idx2); 125 LUA_API int (lua_lessthan) (lua_State *L, int idx1, int idx2); 145 126 146 127 LUA_API lua_Number (lua_tonumber) (lua_State *L, int idx); … … 150 131 LUA_API size_t (lua_objlen) (lua_State *L, int idx); 151 132 LUA_API lua_CFunction (lua_tocfunction) (lua_State *L, int idx); 152 LUA_API void *(lua_touserdata) (lua_State *L, int idx);133 LUA_API void *(lua_touserdata) (lua_State *L, int idx); 153 134 LUA_API lua_State *(lua_tothread) (lua_State *L, int idx); 154 135 LUA_API const void *(lua_topointer) (lua_State *L, int idx); 155 156 136 157 137 /* … … 171 151 LUA_API int (lua_pushthread) (lua_State *L); 172 152 173 174 153 /* 175 154 ** get functions (Lua -> stack) … … 184 163 LUA_API void (lua_getfenv) (lua_State *L, int idx); 185 164 186 187 165 /* 188 166 ** set functions (stack -> Lua) … … 195 173 LUA_API int (lua_setfenv) (lua_State *L, int idx); 196 174 197 198 175 /* 199 176 ** `load' and `call' functions (load and run Lua code) … … 207 184 LUA_API int (lua_dump) (lua_State *L, lua_Writer writer, void *data); 208 185 209 210 186 /* 211 187 ** coroutine functions … … 219 195 */ 220 196 221 #define LUA_GCSTOP 0222 #define LUA_GCRESTART 1223 #define LUA_GCCOLLECT 2224 #define LUA_GCCOUNT 3225 #define LUA_GCCOUNTB 4226 #define LUA_GCSTEP 5227 #define LUA_GCSETPAUSE 6228 #define LUA_GCSETSTEPMUL 7197 #define LUA_GCSTOP 0 198 #define LUA_GCRESTART 1 199 #define LUA_GCCOLLECT 2 200 #define LUA_GCCOUNT 3 201 #define LUA_GCCOUNTB 4 202 #define LUA_GCSTEP 5 203 #define LUA_GCSETPAUSE 6 204 #define LUA_GCSETSTEPMUL 7 229 205 230 206 LUA_API int (lua_gc) (lua_State *L, int what, int data); 231 232 207 233 208 /* … … 243 218 LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud); 244 219 LUA_API void lua_setallocf (lua_State *L, lua_Alloc f, void *ud); 245 246 247 220 248 221 /* … … 252 225 */ 253 226 254 #define lua_pop(L,n) lua_settop(L, -(n)-1) 255 256 #define lua_newtable(L) lua_createtable(L, 0, 0) 257 258 #define lua_register(L,n,f) (lua_pushcfunction(L, (f)), lua_setglobal(L, (n))) 259 260 #define lua_pushcfunction(L,f) lua_pushcclosure(L, (f), 0) 261 262 #define lua_strlen(L,i) lua_objlen(L, (i)) 263 264 #define lua_isfunction(L,n) (lua_type(L, (n)) == LUA_TFUNCTION) 265 #define lua_istable(L,n) (lua_type(L, (n)) == LUA_TTABLE) 266 #define lua_islightuserdata(L,n) (lua_type(L, (n)) == LUA_TLIGHTUSERDATA) 267 #define lua_isnil(L,n) (lua_type(L, (n)) == LUA_TNIL) 268 #define lua_isboolean(L,n) (lua_type(L, (n)) == LUA_TBOOLEAN) 269 #define lua_isthread(L,n) (lua_type(L, (n)) == LUA_TTHREAD) 270 #define lua_isnone(L,n) (lua_type(L, (n)) == LUA_TNONE) 271 #define lua_isnoneornil(L, n) (lua_type(L, (n)) <= 0) 272 273 #define lua_pushliteral(L, s) \ 274 lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1) 275 276 #define lua_setglobal(L,s) lua_setfield(L, LUA_GLOBALSINDEX, (s)) 277 #define lua_getglobal(L,s) lua_getfield(L, LUA_GLOBALSINDEX, (s)) 278 279 #define lua_tostring(L,i) lua_tolstring(L, (i), NULL) 280 281 227 #define lua_pop(L,n) lua_settop(L, -(n)-1) 228 229 #define lua_newtable(L) lua_createtable(L, 0, 0) 230 231 #define lua_register(L,n,f) (lua_pushcfunction(L, (f)), lua_setglobal(L, (n))) 232 233 #define lua_pushcfunction(L,f) lua_pushcclosure(L, (f), 0) 234 235 #define lua_strlen(L,i) lua_objlen(L, (i)) 236 237 #define lua_isfunction(L,n) (lua_type(L, (n)) == LUA_TFUNCTION) 238 #define lua_istable(L,n) (lua_type(L, (n)) == LUA_TTABLE) 239 #define lua_islightuserdata(L,n) (lua_type(L, (n)) == LUA_TLIGHTUSERDATA) 240 #define lua_isnil(L,n) (lua_type(L, (n)) == LUA_TNIL) 241 #define lua_isboolean(L,n) (lua_type(L, (n)) == LUA_TBOOLEAN) 242 #define lua_isthread(L,n) (lua_type(L, (n)) == LUA_TTHREAD) 243 #define lua_isnone(L,n) (lua_type(L, (n)) == LUA_TNONE) 244 #define lua_isnoneornil(L, n) (lua_type(L, (n)) <= 0) 245 246 #define lua_pushliteral(L, s) \ 247 lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1) 248 249 #define lua_setglobal(L,s) lua_setfield(L, LUA_GLOBALSINDEX, (s)) 250 #define lua_getglobal(L,s) lua_getfield(L, LUA_GLOBALSINDEX, (s)) 251 252 #define lua_tostring(L,i) lua_tolstring(L, (i), NULL) 282 253 283 254 /* … … 285 256 */ 286 257 287 #define lua_open() luaL_newstate() 288 289 #define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) 290 291 #define lua_getgccount(L) lua_gc(L, LUA_GCCOUNT, 0) 292 293 #define lua_Chunkreader lua_Reader 294 #define lua_Chunkwriter lua_Writer 295 258 #define lua_open() luaL_newstate() 259 260 #define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) 261 262 #define lua_getgccount(L) lua_gc(L, LUA_GCCOUNT, 0) 263 264 #define lua_Chunkreader lua_Reader 265 #define lua_Chunkwriter lua_Writer 296 266 297 267 /* hack */ 298 LUA_API void lua_setlevel (lua_State *from, lua_State *to); 299 268 LUA_API void lua_setlevel (lua_State *from, lua_State *to); 300 269 301 270 /* … … 305 274 */ 306 275 307 308 276 /* 309 277 ** Event codes 310 278 */ 311 #define LUA_HOOKCALL 0312 #define LUA_HOOKRET 1313 #define LUA_HOOKLINE 2314 #define LUA_HOOKCOUNT 3279 #define LUA_HOOKCALL 0 280 #define LUA_HOOKRET 1 281 #define LUA_HOOKLINE 2 282 #define LUA_HOOKCOUNT 3 315 283 #define LUA_HOOKTAILRET 4 316 284 317 318 285 /* 319 286 ** Event masks 320 287 */ 321 #define LUA_MASKCALL (1 << LUA_HOOKCALL)322 #define LUA_MASKRET (1 << LUA_HOOKRET)323 #define LUA_MASKLINE (1 << LUA_HOOKLINE)324 #define LUA_MASKCOUNT (1 << LUA_HOOKCOUNT)288 #define LUA_MASKCALL (1 << LUA_HOOKCALL) 289 #define LUA_MASKRET (1 << LUA_HOOKRET) 290 #define LUA_MASKLINE (1 << LUA_HOOKLINE) 291 #define LUA_MASKCOUNT (1 << LUA_HOOKCOUNT) 325 292 326 293 typedef struct lua_Debug lua_Debug; /* activation record */ 327 328 294 329 295 /* Functions to be called by the debuger in specific events */ 330 296 typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar); 331 332 297 333 298 LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar); … … 343 308 LUA_API int lua_gethookcount (lua_State *L); 344 309 345 346 310 struct lua_Debug { 347 int event;348 const char *name;/* (n) */349 const char *namewhat;/* (n) `global', `local', `field', `method' */350 const char *what;/* (S) `Lua', `C', `main', `tail' */351 const char *source;/* (S) */352 int currentline;/* (l) */353 int nups;/* (u) number of upvalues */354 int linedefined;/* (S) */355 int lastlinedefined;/* (S) */356 char short_src[LUA_IDSIZE]; /* (S) */357 /* private part */358 int i_ci;/* active function */311 int event; 312 const char *name; /* (n) */ 313 const char *namewhat; /* (n) `global', `local', `field', `method' */ 314 const char *what; /* (S) `Lua', `C', `main', `tail' */ 315 const char *source; /* (S) */ 316 int currentline; /* (l) */ 317 int nups; /* (u) number of upvalues */ 318 int linedefined; /* (S) */ 319 int lastlinedefined; /* (S) */ 320 char short_src[LUA_IDSIZE]; /* (S) */ 321 /* private part */ 322 int i_ci; /* active function */ 359 323 }; 360 324 361 325 /* }====================================================================== */ 362 363 326 364 327 /****************************************************************************** … … 385 348 ******************************************************************************/ 386 349 387 388 350 #endif -
branches/release-1_0/include/luaconf.h
r515 r1662 5 5 */ 6 6 7 8 7 #ifndef lconfig_h 9 8 #define lconfig_h … … 18 17 */ 19 18 20 21 19 /* 22 20 @@ LUA_ANSI controls the use of non-ansi features. … … 28 26 #endif 29 27 30 31 28 #if !defined(LUA_ANSI) && defined(_WIN32) 32 29 #define LUA_WIN … … 35 32 #if defined(LUA_USE_LINUX) 36 33 #define LUA_USE_POSIX 37 #define LUA_USE_DLOPEN /* needs an extra library: -ldl */38 #define LUA_USE_READLINE /* needs some extra libraries */34 #define LUA_USE_DLOPEN /* needs an extra library: -ldl */ 35 #define LUA_USE_READLINE /* needs some extra libraries */ 39 36 #endif 40 37 41 38 #if defined(LUA_USE_MACOSX) 42 39 #define LUA_USE_POSIX 43 #define LUA_DL_DYLD /* does not need extra library */ 44 #endif 45 46 40 #define LUA_DL_DYLD /* does not need extra library */ 41 #endif 47 42 48 43 /* … … 58 53 #endif 59 54 60 61 55 /* 62 56 @@ LUA_PATH and LUA_CPATH are the names of the environment variables that … … 68 62 #define LUA_PATH "LUA_PATH" 69 63 #define LUA_CPATH "LUA_CPATH" 70 #define LUA_INIT "LUA_INIT" 71 64 #define LUA_INIT "LUA_INIT" 72 65 73 66 /* … … 85 78 ** path of the directory of the executable file of the current process. 86 79 */ 87 #define LUA_LDIR "!\\lua\\"88 #define LUA_CDIR "!\\"80 #define LUA_LDIR "!\\lua\\" 81 #define LUA_CDIR "!\\" 89 82 #define LUA_PATH_DEFAULT \ 90 ".\\?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;" \91 LUA_CDIR"?.lua;" LUA_CDIR"?\\init.lua"83 ".\\?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;" \ 84 LUA_CDIR"?.lua;" LUA_CDIR"?\\init.lua" 92 85 #define LUA_CPATH_DEFAULT \ 93 ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"94 95 #else 96 #define LUA_ROOT "/usr/local/"97 #define LUA_LDIR LUA_ROOT "share/lua/5.1/"98 #define LUA_CDIR LUA_ROOT "lib/lua/5.1/"86 ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll" 87 88 #else 89 #define LUA_ROOT "/usr/local/" 90 #define LUA_LDIR LUA_ROOT "share/lua/5.1/" 91 #define LUA_CDIR LUA_ROOT "lib/lua/5.1/" 99 92 #define LUA_PATH_DEFAULT \ 100 "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \101 LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua"93 "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ 94 LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua" 102 95 #define LUA_CPATH_DEFAULT \ 103 "./?.so;" LUA_CDIR"?.so;" LUA_CDIR"loadall.so" 104 #endif 105 96 "./?.so;" LUA_CDIR"?.so;" LUA_CDIR"loadall.so" 97 #endif 106 98 107 99 /* … … 111 103 */ 112 104 #if defined(_WIN32) 113 #define LUA_DIRSEP "\\" 114 #else 115 #define LUA_DIRSEP "/" 116 #endif 117 105 #define LUA_DIRSEP "\\" 106 #else 107 #define LUA_DIRSEP "/" 108 #endif 118 109 119 110 /* … … 129 120 ** in file/directory names.) Probably you do not need to change them. 130 121 */ 131 #define LUA_PATHSEP ";" 132 #define LUA_PATH_MARK "?" 133 #define LUA_EXECDIR "!" 134 #define LUA_IGMARK "-" 135 122 #define LUA_PATHSEP ";" 123 #define LUA_PATH_MARK "?" 124 #define LUA_EXECDIR "!" 125 #define LUA_IGMARK "-" 136 126 137 127 /* … … 140 130 ** machines, ptrdiff_t gives a good choice between int or long.) 141 131 */ 142 #define LUA_INTEGER int 143 132 #define LUA_INTEGER int 144 133 145 134 /* … … 161 150 #else 162 151 163 #define LUA_API extern152 #define LUA_API extern 164 153 165 154 #endif 166 155 167 156 /* more often than not the libs go together with the core */ 168 #define LUALIB_API LUA_API 169 157 #define LUALIB_API LUA_API 170 158 171 159 /* … … 179 167 */ 180 168 #if defined(luaall_c) 181 #define LUAI_FUNC static182 #define LUAI_DATA /* empty */169 #define LUAI_FUNC static 170 #define LUAI_DATA /* empty */ 183 171 184 172 #elif defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \ … … 186 174 /* reyalp: hidden is irrelevant if not dynamically linked*/ 187 175 #if defined(HDK_VERSION) 188 #define LUAI_FUNC extern 189 #else 190 #define LUAI_FUNC __attribute__((visibility("hidden"))) extern 191 #endif 192 #define LUAI_DATA LUAI_FUNC 193 194 #else 195 #define LUAI_FUNC extern 196 #define LUAI_DATA extern 197 #endif 198 199 176 #define LUAI_FUNC extern 177 #else 178 #define LUAI_FUNC __attribute__((visibility("hidden"))) extern 179 #endif 180 #define LUAI_DATA LUAI_FUNC 181 182 #else 183 #define LUAI_FUNC extern 184 #define LUAI_DATA extern 185 #endif 200 186 201 187 /* … … 203 189 ** CHANGE it if you want a different appearance. 204 190 */ 205 #define LUA_QL(x) "'" x "'" 206 #define LUA_QS LUA_QL("%s") 207 191 #define LUA_QL(x) "'" x "'" 192 #define LUA_QS LUA_QL("%s") 208 193 209 194 /* … … 213 198 */ 214 199 #define LUA_IDSIZE 60 215 216 200 217 201 /* … … 231 215 #if defined(LUA_USE_ISATTY) 232 216 #include <unistd.h> 233 #define lua_stdin_is_tty() isatty(0)217 #define lua_stdin_is_tty() isatty(0) 234 218 #elif defined(LUA_WIN) 235 219 #include <io.h> 236 220 #include <stdio.h> 237 #define lua_stdin_is_tty() _isatty(_fileno(stdin)) 238 #else 239 #define lua_stdin_is_tty() 1 /* assume stdin is a tty */ 240 #endif 241 221 #define lua_stdin_is_tty() _isatty(_fileno(stdin)) 222 #else 223 #define lua_stdin_is_tty() 1 /* assume stdin is a tty */ 224 #endif 242 225 243 226 /* … … 247 230 ** prompts dynamically, assigning to globals _PROMPT/_PROMPT2.) 248 231 */ 249 #define LUA_PROMPT "> " 250 #define LUA_PROMPT2 ">> " 251 232 #define LUA_PROMPT "> " 233 #define LUA_PROMPT2 ">> " 252 234 253 235 /* … … 256 238 ** your system is not able to detect that name automatically. 257 239 */ 258 #define LUA_PROGNAME "lua" 259 240 #define LUA_PROGNAME "lua" 260 241 261 242 /* … … 264 245 ** CHANGE it if you need longer lines. 265 246 */ 266 #define LUA_MAXINPUT 512 267 247 #define LUA_MAXINPUT 512 268 248 269 249 /* … … 281 261 #define lua_readline(L,b,p) ((void)L, ((b)=readline(p)) != NULL) 282 262 #define lua_saveline(L,idx) \ 283 if (lua_strlen(L,idx) > 0) /* non-empty line? */ \284 add_history(lua_tostring(L, idx)); /* add it to history */263 if (lua_strlen(L,idx) > 0) /* non-empty line? */ \ 264 add_history(lua_tostring(L, idx)); /* add it to history */ 285 265 #define lua_freeline(L,b) ((void)L, free(b)) 286 266 #else 287 267 #define lua_readline(L,b,p) \ 288 ((void)L, fputs(p, stdout), fflush(stdout), /* show prompt */ \289 fgets(b, LUA_MAXINPUT, stdin) != NULL) /* get line */268 ((void)L, fputs(p, stdout), fflush(stdout), /* show prompt */ \ 269 fgets(b, LUA_MAXINPUT, stdin) != NULL) /* get line */ 290 270 #define lua_saveline(L,idx) { (void)L; (void)idx; } 291 271 #define lua_freeline(L,b) { (void)L; (void)b; } … … 295 275 296 276 /* }================================================================== */ 297 298 277 299 278 /* … … 304 283 ** this value dynamically. 305 284 */ 306 #define LUAI_GCPAUSE 200 /* 200% (wait memory to double before next GC) */ 307 285 #define LUAI_GCPAUSE 200 /* 200% (wait memory to double before next GC) */ 308 286 309 287 /* … … 317 295 #define LUAI_GCMUL 200 /* GC runs 'twice the speed' of memory allocation */ 318 296 319 320 321 297 /* 322 298 @@ LUA_COMPAT_GETN controls compatibility with old getn behavior. … … 369 345 */ 370 346 #undef LUA_COMPAT_OPENLIB 371 372 373 347 374 348 /* … … 381 355 #if defined(LUA_USE_APICHECK) 382 356 #include <assert.h> 383 #define luai_apicheck(L,o) { (void)L; assert(o); } 384 #else 385 #define luai_apicheck(L,o) { (void)L; } 386 #endif 387 357 #define luai_apicheck(L,o) { (void)L; assert(o); } 358 #else 359 #define luai_apicheck(L,o) { (void)L; } 360 #endif 388 361 389 362 /* … … 394 367 /* avoid overflows in comparison */ 395 368 #if INT_MAX-20 < 32760 396 #define LUAI_BITSINT 16369 #define LUAI_BITSINT 16 397 370 #elif INT_MAX > 2147483640L 398 371 /* int has at least 32 bits */ 399 #define LUAI_BITSINT 32372 #define LUAI_BITSINT 32 400 373 #else 401 374 #error "you must define LUA_BITSINT with number of bits in an integer" 402 375 #endif 403 404 376 405 377 /* … … 416 388 */ 417 389 #if LUAI_BITSINT >= 32 418 #define LUAI_UINT32 unsigned int419 #define LUAI_INT32 int420 #define LUAI_MAXINT32 INT_MAX421 #define LUAI_UMEM size_t422 #define LUAI_MEM ptrdiff_t390 #define LUAI_UINT32 unsigned int 391 #define LUAI_INT32 int 392 #define LUAI_MAXINT32 INT_MAX 393 #define LUAI_UMEM size_t 394 #define LUAI_MEM ptrdiff_t 423 395 #else 424 396 /* 16-bit ints */ 425 #define LUAI_UINT32 unsigned long 426 #define LUAI_INT32 long 427 #define LUAI_MAXINT32 LONG_MAX 428 #define LUAI_UMEM unsigned long 429 #define LUAI_MEM long 430 #endif 431 397 #define LUAI_UINT32 unsigned long 398 #define LUAI_INT32 long 399 #define LUAI_MAXINT32 LONG_MAX 400 #define LUAI_UMEM unsigned long 401 #define LUAI_MEM long 402 #endif 432 403 433 404 /* … … 437 408 ** exhausting memory. 438 409 */ 439 #define LUAI_MAXCALLS 20000 440 410 #define LUAI_MAXCALLS 20000 441 411 442 412 /* … … 447 417 ** functions to consume unlimited stack space. 448 418 */ 449 #define LUAI_MCS_AUX ((int)(INT_MAX / (4*sizeof(LUA_NUMBER)))) 450 #define LUAI_MAXCSTACK (LUAI_MCS_AUX > SHRT_MAX ? SHRT_MAX : LUAI_MCS_AUX) 451 452 419 #define LUAI_MCS_AUX ((int)(INT_MAX / (4*sizeof(LUA_NUMBER)))) 420 #define LUAI_MAXCSTACK (LUAI_MCS_AUX > SHRT_MAX ? SHRT_MAX : LUAI_MCS_AUX) 453 421 454 422 /* … … 465 433 */ 466 434 467 468 435 /* 469 436 @@ LUAI_MAXCCALLS is the maximum depth for nested C calls (short) and 470 437 @* syntactical nested non-terminals in a program. 471 438 */ 472 #define LUAI_MAXCCALLS 200 473 439 #define LUAI_MAXCCALLS 200 474 440 475 441 /* … … 477 443 @* (must be smaller than 250). 478 444 */ 479 #define LUAI_MAXVARS 200 480 445 #define LUAI_MAXVARS 200 481 446 482 447 /* … … 484 449 @* (must be smaller than 250). 485 450 */ 486 #define LUAI_MAXUPVALUES 60 487 451 #define LUAI_MAXUPVALUES 60 488 452 489 453 /* 490 454 @@ LUAL_BUFFERSIZE is the buffer size used by the lauxlib buffer system. 491 455 */ 492 #define LUAL_BUFFERSIZE 512 /*BUFSIZ*/456 #define LUAL_BUFFERSIZE 512 /*BUFSIZ*/ 493 457 494 458 /* }================================================================== */ 495 496 497 498 459 499 460 /* … … 507 468 508 469 //#define LUA_NUMBER_DOUBLE 509 #define LUA_NUMBER int470 #define LUA_NUMBER int 510 471 511 472 /* … … 513 474 @* over a number. 514 475 */ 515 #define LUAI_UACNUMBER int 516 476 #define LUAI_UACNUMBER int 517 477 518 478 /* … … 523 483 @@ lua_str2number converts a string to a number. 524 484 */ 525 #define LUA_NUMBER_SCAN "%d" 526 #define LUA_NUMBER_FMT "%d" 527 #define lua_number2str(s,n) sprintf((s), LUA_NUMBER_FMT, (n)) 528 #define LUAI_MAXNUMBER2STR 15 529 #define lua_str2number(s,p) strtol((s), (p), 10) 530 485 #define LUA_NUMBER_SCAN "%d" 486 #define LUA_NUMBER_FMT "%d" 487 #define lua_number2str(s,n) sprintf((s), LUA_NUMBER_FMT, (n)) 488 #define LUAI_MAXNUMBER2STR 15 489 #define lua_str2number(s,p) strtol((s), (p), 10) 531 490 532 491 /* … … 535 494 #if defined(LUA_CORE) 536 495 //#include <math.h> 537 #define luai_numadd(a,b) ((a)+(b))538 #define luai_numsub(a,b) ((a)-(b))539 #define luai_nummul(a,b) ((a)*(b))540 #define luai_numdiv(a,b) ((a)/(b))541 #define luai_nummod(a,b) ((a)%(b))542 #define luai_numpow(a,b) (luai_ipow(a,b))543 #define luai_numunm(a) (-(a))544 #define luai_numeq(a,b) ((a)==(b))545 #define luai_numlt(a,b) ((a)<(b))546 #define luai_numle(a,b) ((a)<=(b))547 #define luai_numisnan(a) (!luai_numeq((a), (a)))496 #define luai_numadd(a,b) ((a)+(b)) 497 #define luai_numsub(a,b) ((a)-(b)) 498 #define luai_nummul(a,b) ((a)*(b)) 499 #define luai_numdiv(a,b) ((a)/(b)) 500 #define luai_nummod(a,b) ((a)%(b)) 501 #define luai_numpow(a,b) (luai_ipow(a,b)) 502 #define luai_numunm(a) (-(a)) 503 #define luai_numeq(a,b) ((a)==(b)) 504 #define luai_numlt(a,b) ((a)<(b)) 505 #define luai_numle(a,b) ((a)<=(b)) 506 #define luai_numisnan(a) (!luai_numeq((a), (a))) 548 507 #endif 549 508 … … 570 529 571 530 #define lua_number2int(i,d) __asm fld d __asm fistp i 572 #define lua_number2integer(i,n) lua_number2int(i, n)531 #define lua_number2integer(i,n) lua_number2int(i, n) 573 532 574 533 /* the next trick should work on any Pentium, but sometimes clashes … … 579 538 #define lua_number2int(i,d) \ 580 539 { volatile union luai_Cast u; u.l_d = (d) + 6755399441055744.0; (i) = u.l_l; } 581 #define lua_number2integer(i,n) lua_number2int(i, n) 582 583 #endif 584 540 #define lua_number2integer(i,n) lua_number2int(i, n) 541 542 #endif 585 543 586 544 /* this option always works, but may be slow */ … … 601 559 ** union.) Probably you do not need to change this. 602 560 */ 603 #define LUAI_USER_ALIGNMENT_T union { double u; void *s; long l; } 604 561 #define LUAI_USER_ALIGNMENT_T union { double u; void *s; long l; } 605 562 606 563 /* … … 614 571 #if defined(__cplusplus) 615 572 /* C++ exceptions */ 616 #define LUAI_THROW(L,c) throw(c)617 #define LUAI_TRY(L,c,a) try { a } catch(...) \618 { if ((c)->status == 0) (c)->status = -1; }619 #define luai_jmpbuf int /* dummy variable */573 #define LUAI_THROW(L,c) throw(c) 574 #define LUAI_TRY(L,c,a) try { a } catch(...) \ 575 { if ((c)->status == 0) (c)->status = -1; } 576 #define luai_jmpbuf int /* dummy variable */ 620 577 621 578 #elif defined(LUA_USE_ULONGJMP) 622 579 /* in Unix, try _longjmp/_setjmp (more efficient) */ 623 #define LUAI_THROW(L,c) _longjmp((c)->b, 1)624 #define LUAI_TRY(L,c,a) if (_setjmp((c)->b) == 0) { a }625 #define luai_jmpbuf jmp_buf580 #define LUAI_THROW(L,c) _longjmp((c)->b, 1) 581 #define LUAI_TRY(L,c,a) if (_setjmp((c)->b) == 0) { a } 582 #define luai_jmpbuf jmp_buf 626 583 627 584 #else 628 585 /* default handling with long jumps */ 629 #define LUAI_THROW(L,c) longjmp((c)->b, 1) 630 #define LUAI_TRY(L,c,a) if (setjmp((c)->b) == 0) { a } 631 #define luai_jmpbuf jmp_buf 632 633 #endif 634 586 #define LUAI_THROW(L,c) longjmp((c)->b, 1) 587 #define LUAI_TRY(L,c,a) if (setjmp((c)->b) == 0) { a } 588 #define luai_jmpbuf jmp_buf 589 590 #endif 635 591 636 592 /* … … 639 595 ** CHANGE it if you need more captures. This limit is arbitrary. 640 596 */ 641 #define LUA_MAXCAPTURES 32 642 597 #define LUA_MAXCAPTURES 32 643 598 644 599 /* … … 654 609 #if defined(LUA_USE_MKSTEMP) 655 610 #include <unistd.h> 656 #define LUA_TMPNAMBUFSIZE 32 657 #define lua_tmpnam(b,e) { \ 658 strcpy(b, "/tmp/lua_XXXXXX"); \ 659 e = mkstemp(b); \ 660 if (e != -1) close(e); \ 661 e = (e == -1); } 662 663 #else 664 #define LUA_TMPNAMBUFSIZE L_tmpnam 665 #define lua_tmpnam(b,e) { e = (tmpnam(b) == NULL); } 666 #endif 667 668 #endif 669 611 #define LUA_TMPNAMBUFSIZE 32 612 #define lua_tmpnam(b,e) { \ 613 strcpy(b, "/tmp/lua_XXXXXX"); \ 614 e = mkstemp(b); \ 615 if (e != -1) close(e); \ 616 e = (e == -1); } 617 618 #else 619 #define LUA_TMPNAMBUFSIZE L_tmpnam 620 #define lua_tmpnam(b,e) { e = (tmpnam(b) == NULL); } 621 #endif 622 623 #endif 670 624 671 625 /* … … 676 630 #if defined(LUA_USE_POPEN) 677 631 678 #define lua_popen(L,c,m) ((void)L, fflush(NULL), popen(c,m))679 #define lua_pclose(L,file) ((void)L, (pclose(file) != -1))632 #define lua_popen(L,c,m) ((void)L, fflush(NULL), popen(c,m)) 633 #define lua_pclose(L,file) ((void)L, (pclose(file) != -1)) 680 634 681 635 #elif defined(LUA_WIN) 682 636 683 #define lua_popen(L,c,m) ((void)L, _popen(c,m))684 #define lua_pclose(L,file) ((void)L, (_pclose(file) != -1))685 686 #else 687 688 #define lua_popen(L,c,m) ((void)((void)c, m), \689 luaL_error(L, LUA_QL("popen") " not supported"), (FILE*)0)690 #define lua_pclose(L,file) ((void)((void)L, file), 0)637 #define lua_popen(L,c,m) ((void)L, _popen(c,m)) 638 #define lua_pclose(L,file) ((void)L, (_pclose(file) != -1)) 639 640 #else 641 642 #define lua_popen(L,c,m) ((void)((void)c, m), \ 643 luaL_error(L, LUA_QL("popen") " not supported"), (FILE*)0) 644 #define lua_pclose(L,file) ((void)((void)L, file), 0) 691 645 692 646 #endif … … 721 675 ** a multiple of the maximum alignment required for your machine. 722 676 */ 723 #define LUAI_EXTRASPACE 0 724 677 #define LUAI_EXTRASPACE 0 725 678 726 679 /* … … 729 682 ** extra when a thread is created/deleted/resumed/yielded. 730 683 */ 731 #define luai_userstateopen(L) ((void)L) 732 #define luai_userstateclose(L) ((void)L) 733 #define luai_userstatethread(L,L1) ((void)L) 734 #define luai_userstatefree(L) ((void)L) 735 #define luai_userstateresume(L,n) ((void)L) 736 #define luai_userstateyield(L,n) ((void)L) 737 684 #define luai_userstateopen(L) ((void)L) 685 #define luai_userstateclose(L) ((void)L) 686 #define luai_userstatethread(L,L1) ((void)L) 687 #define luai_userstatefree(L) ((void)L) 688 #define luai_userstateresume(L,n) ((void)L) 689 #define luai_userstateyield(L,n) ((void)L) 738 690 739 691 /* … … 747 699 #if defined(LUA_USELONGLONG) 748 700 749 #define LUA_INTFRMLEN "ll" 750 #define LUA_INTFRM_T long long 751 752 #else 753 754 #define LUA_INTFRMLEN "l" 755 #define LUA_INTFRM_T long 756 757 #endif 758 759 701 #define LUA_INTFRMLEN "ll" 702 #define LUA_INTFRM_T long long 703 704 #else 705 706 #define LUA_INTFRMLEN "l" 707 #define LUA_INTFRM_T long 708 709 #endif 760 710 761 711 /* =================================================================== */ … … 766 716 */ 767 717 768 769 770 #endif 771 772 718 #endif 719 720 -
branches/release-1_0/include/lualib.h
r515 r1662 5 5 */ 6 6 7 8 7 #ifndef lualib_h 9 8 #define lualib_h … … 11 10 #include "lua.h" 12 11 12 /* Key to file-handle type */ 13 #define LUA_FILEHANDLE "FILE*" 13 14 14 /* Key to file-handle type */ 15 #define LUA_FILEHANDLE "FILE*" 16 17 18 #define LUA_COLIBNAME "coroutine" 15 #define LUA_COLIBNAME "coroutine" 19 16 LUALIB_API int (luaopen_base) (lua_State *L); 20 17 21 #define LUA_TABLIBNAME "table"18 #define LUA_TABLIBNAME "table" 22 19 LUALIB_API int (luaopen_table) (lua_State *L); 23 20 24 #define LUA_IOLIBNAME "io"21 #define LUA_IOLIBNAME "io" 25 22 LUALIB_API int (luaopen_io) (lua_State *L); 26 23 27 #define LUA_OSLIBNAME "os"24 #define LUA_OSLIBNAME "os" 28 25 LUALIB_API int (luaopen_os) (lua_State *L); 29 26 30 #define LUA_STRLIBNAME "string"27 #define LUA_STRLIBNAME "string" 31 28 LUALIB_API int (luaopen_string) (lua_State *L); 32 29 33 #define LUA_MATHLIBNAME "math"30 #define LUA_MATHLIBNAME "math" 34 31 LUALIB_API int (luaopen_math) (lua_State *L); 35 32 36 #define LUA_DBLIBNAME "debug"33 #define LUA_DBLIBNAME "debug" 37 34 LUALIB_API int (luaopen_debug) (lua_State *L); 38 35 39 #define LUA_LOADLIBNAME "package"36 #define LUA_LOADLIBNAME "package" 40 37 LUALIB_API int (luaopen_package) (lua_State *L); 41 42 38 43 39 /* open all previous libraries */ 44 40 LUALIB_API void (luaL_openlibs) (lua_State *L); 45 41 46 47 48 42 #ifndef lua_assert 49 #define lua_assert(x) ((void)0)43 #define lua_assert(x) ((void)0) 50 44 #endif 51 45 52 53 46 #endif -
branches/release-1_0/include/modelist.h
r1617 r1662 1 1 #ifndef MODELIST_H 2 2 #define MODELIST_H 3 4 3 /* 5 4 CHDK capture mode constants. 6 5 WARNING: This file is used with gen_modelist_lua.sed to generate modelist.lua 7 WARNING: These are used for platform independent script values. 6 WARNING: These are used for platform independent script values. 8 7 Changing order or inserting new values will break script compatibility. 9 8 ADD NEW VALUES AT THE END! … … 41 40 MODE_AV , 42 41 MODE_M , // note, use only for true manual modes that allow direct control of Tv/Av 43 MODE_PORTRAIT , 42 MODE_PORTRAIT , 44 43 MODE_NIGHT_SCENE , // "night scene" mode. Note, this can be a dail position, or under the scene menu (SCN_NIGHT_SCENE). 45 44 MODE_LANDSCAPE , … … 98 97 MODE_LOWLIGHT , // g11 99 98 MODE_SCN_NOSTALGIC , // s90 100 MODE_SCN_SMART_SHUTTER , // sx30/g12 (Smart Shutter, Smile detection mode)101 MODE_SCN_LOWLIGHT , // sx3099 MODE_SCN_SMART_SHUTTER , // sx30/g12 (Smart Shutter, Smile detection mode) 100 MODE_SCN_LOWLIGHT , // sx30 102 101 MODE_SCN_SUPER_VIVID , // sx30 103 MODE_SCN_POSTER_EFFECT , // sx30102 MODE_SCN_POSTER_EFFECT , // sx30 104 103 MODE_SCN_FISHEYE , // sx30 105 MODE_SCN_MINIATURE , // sx30104 MODE_SCN_MINIATURE , // sx30 106 105 MODE_SCN_HDR , // g12 (HDR scene mode) 107 106 MODE_VIDEO_MINIATURE , // g12 (miniature effect video mode) 108 107 MODE_VIDEO_IFRAME_MOVIE , // sx220 109 MODE_VIDEO_MOVIE_DIGEST , // sx220 (the camera automatically record a short video clip (up to approximately 4 seconds) every time you shoot a still image.)108 MODE_VIDEO_MOVIE_DIGEST , // sx220 (the camera automatically record a short video clip (up to approximately 4 seconds) every time you shoot 110 109 MODE_SCN_HIGHSPEED_BURST, // sx220 111 MODE_SCN_BEST_IMAGE , // sx220112 MODE_SCN_TOY_CAMERA , // sx220113 MODE_SCN_MONOCHROME , // sx220110 MODE_SCN_BEST_IMAGE , // sx220 111 MODE_SCN_TOY_CAMERA , // sx220 112 MODE_SCN_MONOCHROME , // sx220 114 113 MODE_SCN_WINK_SELF_TIMER, // sx30/g12 (Smart Shutter, Wink Self Timer mode) 115 114 MODE_SCN_FACE_SELF_TIMER, // sx30/g12 (Smart Shutter, Face Self Timer mode) 116 MODE_VIDEO_SUPER_SLOW , // IXUS 310 HS Super Slow Motion Movie115 MODE_VIDEO_SUPER_SLOW , // IXUS 310 HS Super Slow Motion Movie 117 116 MODE_SMART_SHUTTER , // ixus1000_sd4500 - the following are not under SCN 118 117 MODE_HIGHSPEED_BURST , … … 127 126 MODE_FIREWORK , // ixus1000 end 128 127 MODE_LIVE , // A3300is 129 MODE_DISCREET , // A3300is128 MODE_DISCREET , // A3300is 130 129 }; 131 130 -
branches/release-1_0/include/platform.h
r1652 r1662 25 25 #elif CAM_PROPSET == 3 26 26 #include "propset3.h" 27 #elif CAM_PROPSET == 2 // most digic3 cameras27 #elif CAM_PROPSET == 2 // most digic3 cameras 28 28 #include "propset2.h" 29 #elif CAM_PROPSET == 1 // most digic2 cameras29 #elif CAM_PROPSET == 1 // most digic2 cameras 30 30 #include "propset1.h" 31 31 #else … … 33 33 #endif 34 34 35 #define MIN_DIST CAMERA_MIN_DIST // Defined in camera.h (can be overridden in platform_camera.h)36 #define MAX_DIST CAMERA_MAX_DIST // Defined in camera.h (can be overridden in platform_camera.h)37 #define INFINITY_DIST 0xFFFFFFFF // Value to send to firmware to select 'infinity' focus38 #define MAX_DIST_HYPER_FOCAL 99999935 #define MIN_DIST CAMERA_MIN_DIST // Defined in camera.h (can be overridden in platform_camera.h) 36 #define MAX_DIST CAMERA_MAX_DIST // Defined in camera.h (can be overridden in platform_camera.h) 37 #define INFINITY_DIST 0xFFFFFFFF // Value to send to firmware to select 'infinity' focus 38 #define MAX_DIST_HYPER_FOCAL 999999 39 39 40 40 //******************** … … 42 42 //******************** 43 43 44 #define MODE_SCREEN_MASK 0x0C0045 #define MODE_SCREEN_OPENED 0x040046 #define MODE_SCREEN_ROTATED 0x080044 #define MODE_SCREEN_MASK 0x0C00 45 #define MODE_SCREEN_OPENED 0x0400 46 #define MODE_SCREEN_ROTATED 0x0800 47 47 #define AS_SIZE (sizeof(aperture_sizes_table)/sizeof(aperture_sizes_table[0])) 48 48 #define ASID_MIN (aperture_sizes_table[0].id) … … 53 53 #define KBD_INITIAL_DELAY 300 54 54 55 // Video recording current status constants, see movie_status variable 56 #define VIDEO_RECORD_NEVER_STARTED 057 #define VIDEO_RECORD_STOPPED 158 #define VIDEO_RECORD_IN_PROGRESS 459 60 //Optical & digital zoom status constants, see zoom_status variable 61 #define ZOOM_OPTICAL_MIN 162 #define ZOOM_OPTICAL_MAX 263 #define ZOOM_OPTICAL_MEDIUM 364 #define ZOOM_OPTICAL_IN 465 #define ZOOM_OPTICAL_OUT 566 #define ZOOM_OPTICAL_REACHED_MIN 767 68 #define ZOOM_DIGITAL_MAX 969 #define ZOOM_DIGITAL_MEDIUM 1070 #define ZOOM_DIGITAL_IN 1171 #define ZOOM_DIGITAL_OUT 1272 #define ZOOM_DIGITAL_REACHED_MAX 1373 74 typedef struct { 75 unsigned short hackmode; // platform independent mode values from MODE_xxx enum76 unsigned short canonmode; // PROPCASE_SHOOTING_MODE value55 // Video recording current status constants, see movie_status variable 56 #define VIDEO_RECORD_NEVER_STARTED 0 57 #define VIDEO_RECORD_STOPPED 1 58 #define VIDEO_RECORD_IN_PROGRESS 4 59 60 //Optical & digital zoom status constants, see zoom_status variable 61 #define ZOOM_OPTICAL_MIN 1 62 #define ZOOM_OPTICAL_MAX 2 63 #define ZOOM_OPTICAL_MEDIUM 3 64 #define ZOOM_OPTICAL_IN 4 65 #define ZOOM_OPTICAL_OUT 5 66 #define ZOOM_OPTICAL_REACHED_MIN 7 67 68 #define ZOOM_DIGITAL_MAX 9 69 #define ZOOM_DIGITAL_MEDIUM 10 70 #define ZOOM_DIGITAL_IN 11 71 #define ZOOM_DIGITAL_OUT 12 72 #define ZOOM_DIGITAL_REACHED_MAX 13 73 74 typedef struct { 75 unsigned short hackmode; // platform independent mode values from MODE_xxx enum 76 unsigned short canonmode; // PROPCASE_SHOOTING_MODE value 77 77 } CapturemodeMap; 78 78 79 79 typedef struct { 80 short id; // hacks id81 short prop_id; // Canons id80 short id; // hacks id 81 short prop_id; // Canons id 82 82 char name[8]; 83 83 short shutter_dfs_value; // shutter speed to use dark frame substraction … … 85 85 86 86 typedef struct { 87 short id; // hacks id88 short prop_id; // Canons id87 short id; // hacks id 88 short prop_id; // Canons id 89 89 char name[8]; 90 90 long usec; … … 92 92 93 93 typedef struct { 94 short id; // hacks id95 short prop_id; // Canons id94 short id; // hacks id 95 short prop_id; // Canons id 96 96 char name[8]; 97 97 } ApertureSize; … … 123 123 #define SHOW_HALF 2 124 124 125 125 126 typedef struct { 126 127 short av96; … … 148 149 short iso_market; 149 150 short bv96_measured; 150 short bv96_seted; //Ev96_internal-Sv96151 short ev96_seted; //Tv96+Av96152 short ev96_measured; //Bv96+Sv96153 short dev96; // Ev96_external-Ev96_internal154 short dev96_canon; // Canon OverExposure155 int b; //average scene luminance151 short bv96_seted; //Ev96_internal-Sv96 152 short ev96_seted; //Tv96+Av96 153 short ev96_measured; //Bv96+Sv96 154 short dev96; // Ev96_external-Ev96_internal 155 short dev96_canon; // Canon OverExposure 156 int b; //average scene luminance 156 157 } EXPO_TYPE; 157 158 … … 186 187 long get_exposure_counter(); 187 188 long get_file_next_counter(); 188 #if defined(CAM_DATE_FOLDER_NAMING) 189 void get_target_dir_name(char*);189 #if defined(CAM_DATE_FOLDER_NAMING) 190 void get_target_dir_name(char*); 190 191 #else 191 long get_target_dir_num();192 long get_target_dir_num(); 192 193 #endif 193 194 long get_target_file_num(); … … 292 293 int shooting_get_user_tv_id(); 293 294 #if defined(CAM_DRAW_EXPOSITION) 294 char* shooting_get_tv_str();295 char* shooting_get_tv_str(); 295 296 #endif 296 297 short shooting_get_tv96_from_shutter_speed(float t); … … 316 317 int shooting_get_user_av_id(); 317 318 #if defined(CAM_DRAW_EXPOSITION) 318 char* shooting_get_av_str();319 char* shooting_get_av_str(); 319 320 #endif 320 321 void shooting_set_user_av_by_id(int v); … … 403 404 404 405 // returns 0 if in play, nonzero if rec 405 int rec_mode_active(void); 406 int rec_mode_active(void); 406 407 407 408 // not used. Right now this is just to preserve code from earlier version of mode_get() … … 495 496 void reverse_bytes_order2(char* from, char* to, int count); 496 497 // convert old version calls to new version (to minimise code changes) 497 #define reverse_bytes_order(start, count) reverse_bytes_order2(start,start,count)498 #define reverse_bytes_order(start, count) reverse_bytes_order2(start,start,count) 498 499 void save_ext_for_dng(void); 499 500 void change_ext_to_dng(void); … … 510 511 void SetLogicalEventActive(unsigned event, unsigned state); 511 512 void SetScriptMode(unsigned mode); 512 513 513 /* 514 514 call C function with argument list created at runtime. … … 525 525 #define started() debug_led(1) 526 526 #define finished() debug_led(0) 527 528 527 529 528 #ifdef CAM_CHDK_PTP … … 598 597 599 598 #ifdef OPT_EXMEM_MALLOC 600 void exmem_malloc_init(void);601 void GetExMemInfo(cam_meminfo*);599 void exmem_malloc_init(void); 600 void GetExMemInfo(cam_meminfo*); 602 601 #endif 603 602 -
branches/release-1_0/include/propset4.h
r1457 r1662 8 8 */ 9 9 10 #define PROPCASE_AF_LOCK 11 // 0 = AF not locked, 1 = AF locked10 #define PROPCASE_AF_LOCK 11 // 0 = AF not locked, 1 = AF locked 11 11 #define PROPCASE_FLASH_SYNC_CURTAIN 64 12 12 #define PROPCASE_SUBJECT_DIST2 65 … … 18 18 #define PROPCASE_SHOOTING_MODE 49 19 19 #define PROPCASE_QUALITY 57 20 #define PROPCASE_DIGITAL_ZOOM_MODE 91 // Digital Zoom Mode/State 0 = off/standard, 2 = 1.7x, 3 = 2.1x21 #define PROPCASE_DIGITAL_ZOOM_STATE 94 // Digital Zoom Mode/State 0 = Digital Zoom off, 1 = Digital Zoom on20 #define PROPCASE_DIGITAL_ZOOM_MODE 91 // Digital Zoom Mode/State 0 = off/standard, 2 = 1.7x, 3 = 2.1x 21 #define PROPCASE_DIGITAL_ZOOM_STATE 94 // Digital Zoom Mode/State 0 = Digital Zoom off, 1 = Digital Zoom on 22 22 #define PROPCASE_DIGITAL_ZOOM_POSITION 95 23 23 #define PROPCASE_DRIVE_MODE 102 … … 37 37 38 38 // SX30 & G12 values 39 #define PROPCASE_AE_LOCK 3// 0 = AE not locked, 1 = AE locked40 #define PROPCASE_AF_FRAME 8// 1 = FlexiZone, 2 = Face AiAF / Tracking AF41 #define PROPCASE_CONTINUOUS_AF 12// 0 = Continuous AF off, 1 = Continuous AF on42 #define PROPCASE_SERVO_AF 299// 0 = Servo AF off, 1 = Servo AF on39 #define PROPCASE_AE_LOCK 3 // 0 = AE not locked, 1 = AE locked 40 #define PROPCASE_AF_FRAME 8 // 1 = FlexiZone, 2 = Face AiAF / Tracking AF 41 #define PROPCASE_CONTINUOUS_AF 12 // 0 = Continuous AF off, 1 = Continuous AF on 42 #define PROPCASE_SERVO_AF 299 // 0 = Servo AF off, 1 = Servo AF on 43 43 #define PROPCASE_METERING_MODE 157 44 44 #define PROPCASE_OPTICAL_ZOOM_POSITION 199 … … 46 46 #define PROPCASE_EV_CORRECTION_2 211 47 47 #define PROPCASE_IS_FLASH_READY 212 48 #define PROPCASE_RESOLUTION 222 // 0 = L, 1 = M1, 2 = M2, 4 = S, 7 = Low Light (G12)48 #define PROPCASE_RESOLUTION 222 // 0 = L, 1 = M1, 2 = M2, 4 = S, 7 = Low Light (G12) 49 49 #define PROPCASE_ORIENTATION_SENSOR 223 50 50 #define PROPCASE_TIMER_MODE 227 -
branches/release-1_0/include/setjmp.h
r515 r1662 16 16 * All else recovered by under/over(flow) handling. 17 17 */ 18 #define _JBLEN1318 #define _JBLEN 13 19 19 #endif 20 20 … … 28 28 /* 29 29 * onsstack,sigmask,sp,pc,psl,d2-d7,a2-a6, 30 * fp2-fp7 for 68881.30 * fp2-fp7 for 68881. 31 31 * All else recovered by under/over(flow) handling. 32 32 */ 33 #define _JBLEN3433 #define _JBLEN 34 34 34 #endif 35 35 … … 52 52 * All else recovered by under/over(flow) handling. 53 53 */ 54 #define _JBLEN954 #define _JBLEN 9 55 55 #endif 56 56 -
branches/release-1_0/include/vxworks.h
r875 r1662 23 23 /******************************************************************************/ 24 24 // Task control block 25 struct task_t 26 { 27 unsigned int unknown1[13]; 28 char *name; 29 unsigned int options; 30 unsigned int state; 31 unsigned int priority; 32 unsigned int unknown2[12]; 33 void *entry; 34 void *stack_base; 35 void *stack_limit; 36 void *stack_end; 37 unsigned int error_num; 38 unsigned int exit_code; 39 unsigned int unknown3[7]; 40 void *task_std_fp[3]; // pointers to FILE structures 41 unsigned int task_std_fd[3]; // std file descriptors 42 unsigned int unknown4[24]; 25 struct task_t { 26 unsigned int unknown1[13]; 27 char *name; 28 unsigned int options; 29 unsigned int state; 30 unsigned int priority; 31 unsigned int unknown2[12]; 32 void *entry; 33 void *stack_base; 34 void *stack_limit; 35 void *stack_end; 36 unsigned int error_num; 37 unsigned int exit_code; 38 unsigned int unknown3[7]; 39 void *task_std_fp[3]; // pointers to FILE structures 40 unsigned int task_std_fd[3]; // std file descriptors 41 unsigned int unknown4[24]; 43 42 context_t context; 44 unsigned int unknown5[11];43 unsigned int unknown5[11]; 45 44 }; 46 45 typedef struct task_t task_t; 47 46 /******************************************************************************/ 47 48 48 #endif -
branches/release-1_0/lib/armutil/callfunc.S
r864 r1662 69 69 LDMFD SP!, {R4-R5,LR} 70 70 BX LR 71 -
branches/release-1_0/lib/lua/loslib.c
r871 r1662 298 298 #ifndef CAM_DRYOS_2_3_R39 299 299 setfield(L,"dev",st.st_dev); /* device ID number */ 300 301 300 // setfield(L,"ino",st.st_ino); /* no inodes in fat, always -1 */ 302 301 setfield(L,"mode",st.st_mode); /* file mode (see below) */ … … 311 310 setfield(L,"size",st.st_size); /* size of file, in bytes */ 312 311 #ifndef CAM_DRYOS_2_3_R39 313 setfield(L,"atime",st.st_atime); /* time of last access */312 setfield(L,"atime",st.st_atime); /* time of last access */ 314 313 #endif 315 314 setfield(L,"mtime",st.st_mtime); /* time of last modification */ -
branches/release-1_0/lib/ubasic/camera_functions.c
r1428 r1662 450 450 } 451 451 452 453 452 int script_key_is_pressed( int keyid ) 454 453 { … … 456 455 return 0; 457 456 } 458 459 457 460 458 int shot_histogram_get_range(int from, int to) -
branches/release-1_0/platform/a3300/platform_camera.h
r1652 r1662 71 71 #define CAM_VIDEO_QUALITY_ONLY 1 72 72 73 #define CAM_DETECT_SCREEN_ERASE 174 75 73 #define CAM_DATE_FOLDER_NAMING 1 76 74 -
branches/release-1_0/platform/a410/lib.c
r1226 r1662 1 #include "../generic/lib.c"2 1 3 2 int get_flash_params_count(void){ 4 3 return 94; //should be ok 5 4 } 5 6 void shutdown() 7 { 8 volatile long *p = (void*)0xc02200a0; 9 10 asm( 11 "MRS R1, CPSR\n" 12 "AND R0, R1, #0x80\n" 13 "ORR R1, R1, #0x80\n" 14 "MSR CPSR_cf, R1\n" 15 :::"r1","r0"); 16 17 *p = 0x44; 18 19 while(1); 20 } 21 22 #define LED_PR 0xc0220084 23 void debug_led(int state) 24 { 25 volatile long *p=(void*)LED_PR; 26 if (state) 27 p[0]=0x46; 28 else 29 p[0]=0x44; 30 } 31 32 #define LED_AF 0xc0220080 33 void __attribute__((weak)) camera_set_led(int led, int state, int bright) 34 { 35 int leds[] = {12,16,4,8,4,0,4}; 36 if(led < 4 || led > 10 || led == 6) return; 37 volatile long *p=(void*)LED_AF + leds[led-4]; 38 if (state) 39 p[0]=0x46; 40 else 41 p[0]=0x44; 42 } -
branches/release-1_0/platform/a410/platform_camera.h
r1652 r1662 73 73 #undef CAM_BRACKETING //no bracketing in fw 74 74 #define CAM_EXT_TV_RANGE 1 75 #define CAM_DETECT_SCREEN_ERASE 176 75 // #define CAM_NO_MEMPARTINFO 1 77 76 // #define CAM_MULTIPART 1 -
branches/release-1_0/platform/a430/Makefile
r1637 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/a430/lib.c
r1627 r1662 1 #include "../generic/lib.c"2 1 3 2 int get_flash_params_count(void){ 4 3 return 108; 5 4 } 5 6 void shutdown() 7 { 8 volatile long *p = (void*)0xc02200a0; 9 10 asm( 11 "MRS R1, CPSR\n" 12 "AND R0, R1, #0x80\n" 13 "ORR R1, R1, #0x80\n" 14 "MSR CPSR_cf, R1\n" 15 :::"r1","r0"); 16 17 *p = 0x44; 18 19 while(1); 20 } 21 22 #define LED_PR 0xc0220084 23 void debug_led(int state) 24 { 25 volatile long *p=(void*)LED_PR; 26 if (state) 27 p[0]=0x46; 28 else 29 p[0]=0x44; 30 } 31 32 #define LED_AF 0xc0220080 33 void __attribute__((weak)) camera_set_led(int led, int state, int bright) 34 { 35 int leds[] = {12,16,4,8,4,0,4}; 36 if(led < 4 || led > 10 || led == 6) return; 37 volatile long *p=(void*)LED_AF + leds[led-4]; 38 if (state) 39 p[0]=0x46; 40 else 41 p[0]=0x44; 42 } -
branches/release-1_0/platform/a450/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/a450/lib.c
r515 r1662 1 #include "../generic/lib.c"2 1 3 2 int get_flash_params_count(void){ 4 3 return 111; 5 4 } 5 6 void shutdown() 7 { 8 volatile long *p = (void*)0xc02200a0; 9 10 asm( 11 "MRS R1, CPSR\n" 12 "AND R0, R1, #0x80\n" 13 "ORR R1, R1, #0x80\n" 14 "MSR CPSR_cf, R1\n" 15 :::"r1","r0"); 16 17 *p = 0x44; 18 19 while(1); 20 } 21 22 #define LED_PR 0xc0220084 23 void debug_led(int state) 24 { 25 volatile long *p=(void*)LED_PR; 26 if (state) 27 p[0]=0x46; 28 else 29 p[0]=0x44; 30 } 31 32 #define LED_AF 0xc0220080 33 void __attribute__((weak)) camera_set_led(int led, int state, int bright) 34 { 35 int leds[] = {12,16,4,8,4,0,4}; 36 if(led < 4 || led > 10 || led == 6) return; 37 volatile long *p=(void*)LED_AF + leds[led-4]; 38 if (state) 39 p[0]=0x46; 40 else 41 p[0]=0x44; 42 } -
branches/release-1_0/platform/a460/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/a460/lib.c
r515 r1662 1 #include "../generic/lib.c"2 1 3 2 int get_flash_params_count(void){ 4 3 return 111; 5 4 } 5 6 void shutdown() 7 { 8 volatile long *p = (void*)0xc02200a0; 9 10 asm( 11 "MRS R1, CPSR\n" 12 "AND R0, R1, #0x80\n" 13 "ORR R1, R1, #0x80\n" 14 "MSR CPSR_cf, R1\n" 15 :::"r1","r0"); 16 17 *p = 0x44; 18 19 while(1); 20 } 21 22 #define LED_PR 0xc0220084 23 void debug_led(int state) 24 { 25 volatile long *p=(void*)LED_PR; 26 if (state) 27 p[0]=0x46; 28 else 29 p[0]=0x44; 30 } 31 32 #define LED_AF 0xc0220080 33 void __attribute__((weak)) camera_set_led(int led, int state, int bright) 34 { 35 int leds[] = {12,16,4,8,4,0,4}; 36 if(led < 4 || led > 10 || led == 6) return; 37 volatile long *p=(void*)LED_AF + leds[led-4]; 38 if (state) 39 p[0]=0x46; 40 else 41 p[0]=0x44; 42 } -
branches/release-1_0/platform/a530/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/a540/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/a540/lib.c
r515 r1662 1 #include "../generic/lib.c"2 1 3 2 int get_flash_params_count(void){ // from 710 added 4 3 return 108; //seems to be ok 5 4 } 5 6 void shutdown() 7 { 8 volatile long *p = (void*)0xc02200a0; 9 10 asm( 11 "MRS R1, CPSR\n" 12 "AND R0, R1, #0x80\n" 13 "ORR R1, R1, #0x80\n" 14 "MSR CPSR_cf, R1\n" 15 :::"r1","r0"); 16 17 *p = 0x44; 18 19 while(1); 20 } 21 22 #define LED_PR 0xc0220084 23 void debug_led(int state) 24 { 25 volatile long *p=(void*)LED_PR; 26 if (state) 27 p[0]=0x46; 28 else 29 p[0]=0x44; 30 } 31 32 #define LED_AF 0xc0220080 33 void __attribute__((weak)) camera_set_led(int led, int state, int bright) 34 { 35 int leds[] = {12,16,4,8,4,0,4}; 36 if(led < 4 || led > 10 || led == 6) return; 37 volatile long *p=(void*)LED_AF + leds[led-4]; 38 if (state) 39 p[0]=0x46; 40 else 41 p[0]=0x44; 42 } -
branches/release-1_0/platform/a550/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/a550/lib.c
r515 r1662 1 #include "../generic/lib.c"2 1 3 2 int get_flash_params_count(void){ 4 3 return 111; 5 4 } 5 6 void shutdown() 7 { 8 volatile long *p = (void*)0xc02200a0; 9 10 asm( 11 "MRS R1, CPSR\n" 12 "AND R0, R1, #0x80\n" 13 "ORR R1, R1, #0x80\n" 14 "MSR CPSR_cf, R1\n" 15 :::"r1","r0"); 16 17 *p = 0x44; 18 19 while(1); 20 } 21 22 #define LED_PR 0xc0220084 23 void debug_led(int state) 24 { 25 volatile long *p=(void*)LED_PR; 26 if (state) 27 p[0]=0x46; 28 else 29 p[0]=0x44; 30 } 31 32 #define LED_AF 0xc0220080 33 void __attribute__((weak)) camera_set_led(int led, int state, int bright) 34 { 35 int leds[] = {12,16,4,8,4,0,4}; 36 if(led < 4 || led > 10 || led == 6) return; 37 volatile long *p=(void*)LED_AF + leds[led-4]; 38 if (state) 39 p[0]=0x46; 40 else 41 p[0]=0x44; 42 } -
branches/release-1_0/platform/a560/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/a570/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/a610/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/a610/lib.c
r515 r1662 1 #include "../generic/lib.c"2 1 3 2 int get_flash_params_count(void){ 4 3 return 94; 5 4 } 5 6 void shutdown() 7 { 8 volatile long *p = (void*)0xc02200a0; 9 10 asm( 11 "MRS R1, CPSR\n" 12 "AND R0, R1, #0x80\n" 13 "ORR R1, R1, #0x80\n" 14 "MSR CPSR_cf, R1\n" 15 :::"r1","r0"); 16 17 *p = 0x44; 18 19 while(1); 20 } 21 22 #define LED_PR 0xc0220084 23 void debug_led(int state) 24 { 25 volatile long *p=(void*)LED_PR; 26 if (state) 27 p[0]=0x46; 28 else 29 p[0]=0x44; 30 } 31 32 #define LED_AF 0xc0220080 33 void __attribute__((weak)) camera_set_led(int led, int state, int bright) 34 { 35 int leds[] = {12,16,4,8,4,0,4}; 36 if(led < 4 || led > 10 || led == 6) return; 37 volatile long *p=(void*)LED_AF + leds[led-4]; 38 if (state) 39 p[0]=0x46; 40 else 41 p[0]=0x44; 42 } -
branches/release-1_0/platform/a620/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/a620/lib.c
r515 r1662 1 #include "../generic/lib.c"2 1 3 2 int get_flash_params_count(void){ 4 3 return 94; 5 4 } 5 6 void shutdown() 7 { 8 volatile long *p = (void*)0xc02200a0; 9 10 asm( 11 "MRS R1, CPSR\n" 12 "AND R0, R1, #0x80\n" 13 "ORR R1, R1, #0x80\n" 14 "MSR CPSR_cf, R1\n" 15 :::"r1","r0"); 16 17 *p = 0x44; 18 19 while(1); 20 } 21 22 #define LED_PR 0xc0220084 23 void debug_led(int state) 24 { 25 volatile long *p=(void*)LED_PR; 26 if (state) 27 p[0]=0x46; 28 else 29 p[0]=0x44; 30 } 31 32 #define LED_AF 0xc0220080 33 void __attribute__((weak)) camera_set_led(int led, int state, int bright) 34 { 35 int leds[] = {12,16,4,8,4,0,4}; 36 if(led < 4 || led > 10 || led == 6) return; 37 volatile long *p=(void*)LED_AF + leds[led-4]; 38 if (state) 39 p[0]=0x46; 40 else 41 p[0]=0x44; 42 } -
branches/release-1_0/platform/a630/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/a630/lib.c
r515 r1662 1 #include "../generic/lib.c"2 1 3 2 int get_flash_params_count(void){ 4 3 return 110; 5 4 } 5 6 void shutdown() 7 { 8 volatile long *p = (void*)0xc02200a0; 9 10 asm( 11 "MRS R1, CPSR\n" 12 "AND R0, R1, #0x80\n" 13 "ORR R1, R1, #0x80\n" 14 "MSR CPSR_cf, R1\n" 15 :::"r1","r0"); 16 17 *p = 0x44; 18 19 while(1); 20 } 21 22 #define LED_PR 0xc0220084 23 void debug_led(int state) 24 { 25 volatile long *p=(void*)LED_PR; 26 if (state) 27 p[0]=0x46; 28 else 29 p[0]=0x44; 30 } 31 32 #define LED_AF 0xc0220080 33 void __attribute__((weak)) camera_set_led(int led, int state, int bright) 34 { 35 int leds[] = {12,16,4,8,4,0,4}; 36 if(led < 4 || led > 10 || led == 6) return; 37 volatile long *p=(void*)LED_AF + leds[led-4]; 38 if (state) 39 p[0]=0x46; 40 else 41 p[0]=0x44; 42 } -
branches/release-1_0/platform/a640/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/a640/lib.c
r515 r1662 1 #include "../generic/lib.c"2 1 3 2 int get_flash_params_count(void){ 4 3 return 110; 5 4 } 5 6 void shutdown() 7 { 8 volatile long *p = (void*)0xc02200a0; 9 10 asm( 11 "MRS R1, CPSR\n" 12 "AND R0, R1, #0x80\n" 13 "ORR R1, R1, #0x80\n" 14 "MSR CPSR_cf, R1\n" 15 :::"r1","r0"); 16 17 *p = 0x44; 18 19 while(1); 20 } 21 22 #define LED_PR 0xc0220084 23 void debug_led(int state) 24 { 25 volatile long *p=(void*)LED_PR; 26 if (state) 27 p[0]=0x46; 28 else 29 p[0]=0x44; 30 } 31 32 #define LED_AF 0xc0220080 33 void __attribute__((weak)) camera_set_led(int led, int state, int bright) 34 { 35 int leds[] = {12,16,4,8,4,0,4}; 36 if(led < 4 || led > 10 || led == 6) return; 37 volatile long *p=(void*)LED_AF + leds[led-4]; 38 if (state) 39 p[0]=0x46; 40 else 41 p[0]=0x44; 42 } -
branches/release-1_0/platform/a700/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c … … 24 24 rm -f $(OBJS) libplatform.a 25 25 26 -
branches/release-1_0/platform/a700/lib.c
r515 r1662 1 #include "../generic/lib.c"2 1 3 2 int get_flash_params_count(void){ 4 3 return 108; 5 4 } 5 6 void shutdown() 7 { 8 volatile long *p = (void*)0xc02200a0; 9 10 asm( 11 "MRS R1, CPSR\n" 12 "AND R0, R1, #0x80\n" 13 "ORR R1, R1, #0x80\n" 14 "MSR CPSR_cf, R1\n" 15 :::"r1","r0"); 16 17 *p = 0x44; 18 19 while(1); 20 } 21 22 #define LED_PR 0xc0220084 23 void debug_led(int state) 24 { 25 volatile long *p=(void*)LED_PR; 26 if (state) 27 p[0]=0x46; 28 else 29 p[0]=0x44; 30 } 31 32 #define LED_AF 0xc0220080 33 void __attribute__((weak)) camera_set_led(int led, int state, int bright) 34 { 35 int leds[] = {12,16,4,8,4,0,4}; 36 if(led < 4 || led > 10 || led == 6) return; 37 volatile long *p=(void*)LED_AF + leds[led-4]; 38 if (state) 39 p[0]=0x46; 40 else 41 p[0]=0x44; 42 } -
branches/release-1_0/platform/a710/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/a710/lib.c
r515 r1662 1 #include "../generic/lib.c"2 1 3 2 int get_flash_params_count(void){ 4 3 return 110; 5 4 } 5 6 void shutdown() 7 { 8 volatile long *p = (void*)0xc02200a0; 9 10 asm( 11 "MRS R1, CPSR\n" 12 "AND R0, R1, #0x80\n" 13 "ORR R1, R1, #0x80\n" 14 "MSR CPSR_cf, R1\n" 15 :::"r1","r0"); 16 17 *p = 0x44; 18 19 while(1); 20 } 21 22 #define LED_PR 0xc0220084 23 void debug_led(int state) 24 { 25 volatile long *p=(void*)LED_PR; 26 if (state) 27 p[0]=0x46; 28 else 29 p[0]=0x44; 30 } 31 32 #define LED_AF 0xc0220080 33 void __attribute__((weak)) camera_set_led(int led, int state, int bright) 34 { 35 int leds[] = {12,16,4,8,4,0,4}; 36 if(led < 4 || led > 10 || led == 6) return; 37 volatile long *p=(void*)LED_AF + leds[led-4]; 38 if (state) 39 p[0]=0x46; 40 else 41 p[0]=0x44; 42 } -
branches/release-1_0/platform/d10/platform_camera.h
r1657 r1662 45 45 #undef CAM_HAS_USER_TV_MODES 46 46 #define CAM_SHOW_OSD_IN_SHOOT_MENU 1 47 #define CAM_DETECT_SCREEN_ERASE 1 47 48 48 // TODO this doesn't seem to be working 49 49 #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1 -
branches/release-1_0/platform/g10/platform_camera.h
r1657 r1662 104 104 // Used to enabled bracketing in custom timer, required on many recent cameras 105 105 // see http://chdk.setepontos.com/index.php/topic,3994.405.html 106 107 #define CAM_DETECT_SCREEN_ERASE 1 // http://chdk.setepontos.com/index.php?topic=6705.msg71062#msg71062 106 107 #define CAM_FIRMWARE_MEMINFO 1 // Use 'GetMemInfo' to get free memory size. 108 108 109 109 #define CAM_USE_COLORED_ICONS 1 // Enable using the CHDK-DE colored icons. 110 111 #define CAM_FIRMWARE_MEMINFO 1 // Use 'GetMemInfo' to get free memory size.112 110 //---------------------------------------------------------- 113 111 -
branches/release-1_0/platform/g12/platform_camera.h
r1652 r1662 47 47 #define CAM_UNCACHED_BIT 0x40000000 // S90 @FF8875FC(via ExMem.FreeCacheable) 48 48 #define CAM_SHOW_OSD_IN_SHOOT_MENU 1 49 #define CAM_DETECT_SCREEN_ERASE 1 // Turn on guard pixels to detect screen erase and redraw CHDK buttons and menus50 49 51 50 #undef DEFAULT_RAW_EXT -
branches/release-1_0/platform/g7/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/g9/platform_camera.h
r1652 r1662 32 32 #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1 33 33 #define CAM_HAS_JOGDIAL 1 34 // #define CAM_CONSOLE_LOG_ENABLED 135 34 #define CAM_BRACKETING 1 36 35 #define CAM_MULTIPART 1 -
branches/release-1_0/platform/generic/lib.c
r1023 r1662 1 1 #include "platform.h" 2 3 void shutdown()4 {5 volatile long *p = (void*)0xc02200a0;6 7 asm(8 "MRS R1, CPSR\n"9 "AND R0, R1, #0x80\n"10 "ORR R1, R1, #0x80\n"11 "MSR CPSR_cf, R1\n"12 :::"r1","r0");13 14 *p = 0x44;15 16 while(1);17 }18 19 20 #define LED_PR 0xc022008421 22 void debug_led(int state)23 {24 volatile long *p=(void*)LED_PR;25 if (state)26 p[0]=0x46;27 else28 p[0]=0x44;29 }30 #define LED_AF 0xc022008031 32 void __attribute__((weak)) camera_set_led(int led, int state, int bright)33 34 {35 int leds[] = {12,16,4,8,4,0,4};36 if(led < 4 || led > 10 || led == 6) return;37 volatile long *p=(void*)LED_AF + leds[led-4];38 if (state)39 p[0]=0x46;40 else41 p[0]=0x44;42 } -
branches/release-1_0/platform/ixus1000_sd4500/platform_camera.h
r1652 r1662 115 115 #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1 116 116 117 #define CAM_DETECT_SCREEN_ERASE 1 // http://chdk.setepontos.com/index.php?topic=6705.msg71062#msg71062118 119 117 #define CAM_STARTUP_CRASH_FILE_OPEN_FIX 1 // enable workaround for camera crash at startup when opening the conf / font files 120 118 // see http://chdk.setepontos.com/index.php?topic=6179.0 -
branches/release-1_0/platform/ixus100_sd780/platform_camera.h
r1652 r1662 107 107 // Used to enabled bracketing in custom timer, required on many recent cameras 108 108 // see http://chdk.setepontos.com/index.php/topic,3994.405.html 109 110 #define CAM_DETECT_SCREEN_ERASE 1 // http://chdk.setepontos.com/index.php?topic=6705.msg71062#msg71062111 112 109 //---------------------------------------------------------- 113 110 -
branches/release-1_0/platform/ixus120_sd940/platform_camera.h
r1652 r1662 102 102 // see http://chdk.setepontos.com/index.php/topic,3994.405.html 103 103 104 #define CAM_DETECT_SCREEN_ERASE 1 // http://chdk.setepontos.com/index.php?topic=6705.msg71062#msg71062105 106 104 #define CAM_USE_COLORED_ICONS 1 // Enable using the CHDK-DE colored icons. 107 105 -
branches/release-1_0/platform/ixus200_sd980/platform_camera.h
r1652 r1662 88 88 // see http://chdk.setepontos.com/index.php?topic=6179.0 89 89 90 //#define CAM_DATE_FOLDER_NAMING 0x100 //Value found in the last function, which is called in GetImageFolder. (first compare)90 #define CAM_DATE_FOLDER_NAMING 0x100 //Value found in the last function, which is called in GetImageFolder. (first compare) 91 91 92 92 #define CAM_DRIVE_MODE_FROM_TIMER_MODE 1 // use PROPCASE_TIMER_MODE to check for multiple shot custom timer. 93 93 // Used to enabled bracketing in custom timer, required on many recent cameras 94 94 // see http://chdk.setepontos.com/index.php/topic,3994.405.html 95 96 #define CAM_DETECT_SCREEN_ERASE 1 // http://chdk.setepontos.com/index.php?topic=6705.msg71062#msg7106297 98 95 //---------------------------------------------------------- -
branches/release-1_0/platform/ixus200_sd980/shooting.c
r1212 r1662 126 126 } 127 127 128 #if defined(CAM_DATE_FOLDER_NAMING) 129 void get_target_dir_name(char *out) { 130 extern void _GetImageFolder(char*,int,int,int); 131 out[0] = 'A'; 132 _GetImageFolder(out+1,get_file_next_counter(),CAM_DATE_FOLDER_NAMING,time(NULL)); 133 out[15] = '\0'; 134 } 135 #else 128 136 long get_target_dir_num() { 129 long n;137 long n; 130 138 131 n = get_file_next_counter();132 n = (n>>18)&0x3FF;133 return n;139 n = get_file_next_counter(); 140 n = (n>>18)&0x3FF; 141 return n; 134 142 } 143 #endif 135 144 136 145 int circle_of_confusion = 5; -
branches/release-1_0/platform/ixus220_elph300hs/platform_camera.h
r1652 r1662 93 93 94 94 #define CAM_HAS_CMOS 1 95 96 #define CAM_DETECT_SCREEN_ERASE 197 95 //---------------------------------------------------------- -
branches/release-1_0/platform/ixus300_sd4000/kbd.c
r1377 r1662 275 275 } 276 276 277 // Base values in playback277 // Base values in Play Mode 278 278 // physw_status[0] = 0x800C91F // 1 279 279 // physw_status[1] = 0xFFE // 2 (Mode Switch: Auto) … … 285 285 // physw_status[2] 0x20000 SD-Card READONLY 286 286 static KeyMap keymap[] = { 287 { 0, KEY_UP , 0x00000004 }, // finsig2288 { 0, KEY_DOWN , 0x00000001 }, // finsig2289 { 0, KEY_LEFT , 0x00000008 }, // finsig2290 { 0, KEY_RIGHT , 0x00000002 }, // finsig2291 { 1, KEY_SET , 0x00000040 }, // finsig2292 { 0, KEY_SHOOT_FULL , 0x00000900 }, // 0x00000800(KEY_SHOOT_FULL) + 0x00000100 (KEY_SHOOT_HALF), ToDo: still not shure if correct (related to problems with shoot_full?), finsig2293 { 0, KEY_SHOOT_FULL_ONLY , 0x00000800 },294 { 0, KEY_SHOOT_HALF , 0x00000100 }, // finsig2295 { 1, KEY_ZOOM_IN , 0x00000010 }, // finsig2296 { 1, KEY_ZOOM_OUT , 0x00000020 }, // finsig2297 { 1, KEY_MENU , 0x00000080 }, // finsig2287 { 0, KEY_UP , 0x00000004 }, 288 { 0, KEY_DOWN , 0x00000001 }, 289 { 0, KEY_LEFT , 0x00000008 }, 290 { 0, KEY_RIGHT , 0x00000002 }, 291 { 1, KEY_SET , 0x00000040 }, 292 { 0, KEY_SHOOT_FULL , 0x00000900 }, // 0x00000800 (KEY_SHOOT_FULL_ONLY) + 0x00000100 (KEY_SHOOT_HALF) 293 { 0, KEY_SHOOT_FULL_ONLY, 0x00000800 }, 294 { 0, KEY_SHOOT_HALF , 0x00000100 }, 295 { 1, KEY_ZOOM_IN , 0x00000010 }, 296 { 1, KEY_ZOOM_OUT , 0x00000020 }, 297 { 1, KEY_MENU , 0x00000080 }, 298 298 { 0, KEY_PRINT , 0x0000000C }, // ALT Key workaround: KEY_UP + KEY_LEFT (camera has no print key) 299 299 { 0, 0, 0 } -
branches/release-1_0/platform/ixus300_sd4000/lib.c
r1640 r1662 48 48 //ROM:FF997634 CMP R4, #0x94 <--- 49 49 int get_flash_params_count(void) { 50 return 148; // 0x94 = 148 , finsig250 return 148; // 0x94 = 148 51 51 } 52 52 -
branches/release-1_0/platform/ixus300_sd4000/platform_camera.h
r1652 r1662 127 127 128 128 #define CAM_STARTUP_CRASH_FILE_OPEN_FIX 1 // cameras intermittently crashing on startup with "ASSERT!! FsIoNotify.c Line 457 Task name: SpyTask" in ROMLOG, ToDo: working ? 129 130 #define CAM_DETECT_SCREEN_ERASE 1 // ToDo: CHDK OSD flicker more often, OSD redrawn is more reliable -
branches/release-1_0/platform/ixus300_sd4000/sub/100d/lib.c
r1377 r1662 63 63 ***/ 64 64 long hook_raw_size() { 65 return 0xF32880; // 15935616 , finsig265 return 0xF32880; // 15935616 66 66 } 67 67 … … 110 110 // ROM:FF919AD4 LDR R0, =0x40471000 <--- 111 111 void *vid_get_bitmap_fb() { 112 return (void*)0x40471000; // ROM:FF919AD4 or ROM:FFA347DC or ROM:FF85B154 , finsig2112 return (void*)0x40471000; // ROM:FF919AD4 or ROM:FFA347DC or ROM:FF85B154 113 113 } 114 114 … … 121 121 ***/ 122 122 void *vid_get_viewport_fb() { 123 return (void*)0x40587700; // ROM:FFB25ED8 or ROM:FFB25DFC , finsig2123 return (void*)0x40587700; // ROM:FFB25ED8 or ROM:FFB25DFC 124 124 } 125 125 … … 127 127 // possible future use 128 128 void *vid_get_viewport_fb_d() { 129 return (void*)(*(int*)0x2AA4); // ROM:FF874770 0x2A50 + 0x54 , value changes between 0x404ef900 and 0x40f210a0 in playback, record ist always 0x40f210a0129 return (void*)(*(int*)0x2AA4); // ROM:FF874770 0x2A50 + 0x54 130 130 } 131 131 … … 134 134 // ROM:FFA04F84 ADR R1, a9999 ; "9999" 135 135 char *camera_jpeg_count_str() { 136 return (char*)0xA15B8; // finsig2136 return (char*)0xA15B8; 137 137 } -
branches/release-1_0/platform/ixus310_elph500hs/platform_camera.h
r1652 r1662 67 67 // stop the palette from overlapping the on screen buttons on each side 68 68 #undef CAM_DISP_ALT_TEXT // Turn off <ALT> at bottom of screen in Alt mode - changes button color instead 69 #define CAM_DETECT_SCREEN_ERASE 1 // Turn on guard pixels to detect screen erase and redraw CHDK buttons and menus 69 70 70 #define CAM_TOUCHSCREEN_UI 1 // Enable touch screen U/I 71 71 -
branches/release-1_0/platform/ixus40_sd300/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/ixus50_sd400/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/ixus55_sd450/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/ixus60_sd600/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/ixus60_sd600/lib.c
r515 r1662 1 #include "../generic/lib.c"2 1 3 2 int get_flash_params_count(void){ 4 3 return 90; 5 4 } 5 6 void shutdown() 7 { 8 volatile long *p = (void*)0xc02200a0; 9 10 asm( 11 "MRS R1, CPSR\n" 12 "AND R0, R1, #0x80\n" 13 "ORR R1, R1, #0x80\n" 14 "MSR CPSR_cf, R1\n" 15 :::"r1","r0"); 16 17 *p = 0x44; 18 19 while(1); 20 } 21 22 #define LED_PR 0xc0220084 23 void debug_led(int state) 24 { 25 volatile long *p=(void*)LED_PR; 26 if (state) 27 p[0]=0x46; 28 else 29 p[0]=0x44; 30 } 31 32 #define LED_AF 0xc0220080 33 void __attribute__((weak)) camera_set_led(int led, int state, int bright) 34 { 35 int leds[] = {12,16,4,8,4,0,4}; 36 if(led < 4 || led > 10 || led == 6) return; 37 volatile long *p=(void*)LED_AF + leds[led-4]; 38 if (state) 39 p[0]=0x46; 40 else 41 p[0]=0x44; 42 } -
branches/release-1_0/platform/ixus65_sd630/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/ixus65_sd630/lib.c
r515 r1662 1 #include "../generic/lib.c"2 1 3 2 int get_flash_params_count(void){ 4 3 return 90; 5 4 } 5 6 void shutdown() 7 { 8 volatile long *p = (void*)0xc02200a0; 9 10 asm( 11 "MRS R1, CPSR\n" 12 "AND R0, R1, #0x80\n" 13 "ORR R1, R1, #0x80\n" 14 "MSR CPSR_cf, R1\n" 15 :::"r1","r0"); 16 17 *p = 0x44; 18 19 while(1); 20 } 21 22 #define LED_PR 0xc0220084 23 void debug_led(int state) 24 { 25 volatile long *p=(void*)LED_PR; 26 if (state) 27 p[0]=0x46; 28 else 29 p[0]=0x44; 30 } 31 32 #define LED_AF 0xc0220080 33 void __attribute__((weak)) camera_set_led(int led, int state, int bright) 34 { 35 int leds[] = {12,16,4,8,4,0,4}; 36 if(led < 4 || led > 10 || led == 6) return; 37 volatile long *p=(void*)LED_AF + leds[led-4]; 38 if (state) 39 p[0]=0x46; 40 else 41 p[0]=0x44; 42 } -
branches/release-1_0/platform/ixus70_sd1000/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/ixus750_sd550/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/ixus750_sd550/sub/100h/lib.c
r1181 r1662 69 69 70 70 long vid_get_bitmap_buffer_height() { return 240; } 71 72 void _EnterToCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S.73 void _ExitFromCompensationEVF() {} // Dummy function. To be removed after stub is found. See stubs_entry_2.S. -
branches/release-1_0/platform/ixus750_sd550/sub/100h/stubs_entry_2.S
r1181 r1662 1 1 #include "stubs_asm.h" 2 #define NULL_SUB 0xFF8118C0 2 3 3 NHSTUB(UniqueLedOn, 0xFF82df20) 4 NHSTUB(UniqueLedOff, 0xFF82df64) 5 NHSTUB(free, 0xFFAD6A08) 6 NHSTUB(VbattGet, 0xFF82c54c) 4 // Override stubs_entry.S 5 NHSTUB(EnterToCompensationEVF, NULL_SUB) 6 NHSTUB(ExitFromCompensationEVF, NULL_SUB) 7 NHSTUB(VbattGet, 0xFF82c54c) 8 NHSTUB(WriteSDCard, 0xFF87ED54) 9 NHSTUB(free, 0xFFAD6A08) 7 10 8 NHSTUB(GetDrive_ClusterSize, 0xFF86F2EC) 9 NHSTUB(GetDrive_TotalClusters, 0xFF86F328) 10 NHSTUB(GetDrive_FreeClusters, 0xFF86F364) 11 NHSTUB(WriteSDCard, 0xFF87ED54) 12 NHSTUB(iosDevFind, 0xFFAD4B68) 11 // These don't exist 12 NHSTUB(SetZoomActuatorSpeedPercent, NULL_SUB) 13 13 14 //null stubs 15 NHSTUB(SetZoomActuatorSpeedPercent, 0xFF82e080) 16 NHSTUB(GetBatteryTemperature, 0xFF82D5AC) 17 NHSTUB(GetCCDTemperature, 0xFF82D598) 18 NHSTUB(GetOpticalTemperature, 0xFF82D584) 19 NHSTUB(PT_PlaySound, 0xFF957E18) 20 21 22 23 24 25 //NHSTUB(EnterToCompensationEVF, 0xFFFFFFFF) // Stub not found. When found, remove dummy function from lib.c. 26 //NHSTUB(ExitFromCompensationEVF, 0xFFFFFFFF) // Stub not found. When found, remove dummy function from lib.c. 27 NHSTUB(DoAFLock, 0xff94ae54) 28 NHSTUB(UnlockAF, 0xff94ae94) 29 NHSTUB(SetScriptMode,0xFF95E63C) // by find_eventproc name @ 0xFF983394 14 // Additional 15 NHSTUB(SetScriptMode, 0xFF95E63C) 16 NHSTUB(UniqueLedOn, 0xFF82df20) 17 NHSTUB(UniqueLedOff, 0xFF82df64) -
branches/release-1_0/platform/ixus75_sd750/Makefile
r560 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/ixus800_sd700/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/ixus850_sd800/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/ixus900_sd900/Makefile
r959 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/ixus950_sd850/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/ixusizoom_sd30/Makefile
r621 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/ixusizoom_sd30/lib.c
r621 r1662 1 #include "../generic/lib.c"2 1 3 2 int get_flash_params_count(void){ 4 3 return 90; 5 4 } 5 6 void shutdown() 7 { 8 volatile long *p = (void*)0xc02200a0; 9 10 asm( 11 "MRS R1, CPSR\n" 12 "AND R0, R1, #0x80\n" 13 "ORR R1, R1, #0x80\n" 14 "MSR CPSR_cf, R1\n" 15 :::"r1","r0"); 16 17 *p = 0x44; 18 19 while(1); 20 } 21 22 #define LED_PR 0xc0220084 23 void debug_led(int state) 24 { 25 volatile long *p=(void*)LED_PR; 26 if (state) 27 p[0]=0x46; 28 else 29 p[0]=0x44; 30 } 31 32 #define LED_AF 0xc0220080 33 void __attribute__((weak)) camera_set_led(int led, int state, int bright) 34 { 35 int leds[] = {12,16,4,8,4,0,4}; 36 if(led < 4 || led > 10 || led == 6) return; 37 volatile long *p=(void*)LED_AF + leds[led-4]; 38 if (state) 39 p[0]=0x46; 40 else 41 p[0]=0x44; 42 } -
branches/release-1_0/platform/s2is/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/s3is/Makefile
r515 r1662 14 14 15 15 kbd.o: kbd.c ../generic/kbd.c 16 lib.o: lib.c ../generic/lib.c16 lib.o: lib.c 17 17 main.o: main.c ../generic/main.c 18 18 shooting.o: shooting.c ../generic/shooting.c -
branches/release-1_0/platform/sx100is/platform_camera.h
r1652 r1662 59 59 #define CAM_MULTIPART 1 60 60 #define CAM_EXT_TV_RANGE 1 61 #define CAM_DETECT_SCREEN_ERASE 162 61 //---------------------------------------------------------- 63 62 -
branches/release-1_0/platform/sx130is/lib.c
r1640 r1662 93 93 #include "lolevel.h" 94 94 95 96 95 /* 97 96 void vid_bitmap_refresh() -
branches/release-1_0/platform/sx130is/platform_camera.h
r1652 r1662 95 95 // see http://chdk.setepontos.com/index.php/topic,3994.405.html 96 96 97 #define CAM_DETECT_SCREEN_ERASE 1 // Turn on guard pixels to detect screen erase and redraw CHDK buttons and menus98 99 100 97 #define CAM_USE_COLORED_ICONS 1 101 98 -
branches/release-1_0/platform/sx20/platform_camera.h
r1657 r1662 100 100 #undef CAMERA_MAX_DIST 101 101 #define CAMERA_MAX_DIST 66490 // Override max subject distance 102 103 #define CAM_DETECT_SCREEN_ERASE 1 // Turn on guard pixels to detect screen erase and redraw CHDK buttons and menus104 105 102 //---------------------------------------------------------- -
branches/release-1_0/platform/sx220hs/platform_camera.h
r1652 r1662 21 21 // don't override them again in here. 22 22 23 #define CAM_DETECT_SCREEN_ERASE 124 23 #define CAM_DISABLE_RAW_IN_LOW_LIGHT_MODE 1 25 24 #define DNG_VERT_RLE_BADPIXELS 1 -
branches/release-1_0/platform/sx230hs/platform_camera.h
r1653 r1662 106 106 #define CAM_HAS_GPS 1 107 107 108 #define CAM_DETECT_SCREEN_ERASE 1109 108 110 109 #define CAM_USE_COLORED_ICONS 1 // Enable using the CHDK-DE colored icons. -
branches/release-1_0/platform/sx30/platform_camera.h
r1657 r1662 39 39 #define CAM_UNCACHED_BIT 0x40000000 40 40 #define CAM_SHOW_OSD_IN_SHOOT_MENU 1 41 #define CAM_DETECT_SCREEN_ERASE 1 // Turn on guard pixels to detect screen erase and redraw CHDK buttons and menus42 41 43 42 #undef DEFAULT_RAW_EXT -
branches/release-1_0/platform/sx40hs/platform_camera.h
r1657 r1662 42 42 #undef CAM_USE_ZOOM_FOR_MF 43 43 #define CAM_SHOW_OSD_IN_SHOOT_MENU 1 44 #define CAM_DETECT_SCREEN_ERASE 1 // Turn on guard pixels to detect screen erase and redraw CHDK buttons and menus45 44 46 45 #undef DEFAULT_RAW_EXT
Note: See TracChangeset
for help on using the changeset viewer.