Changeset 1980
- Timestamp:
- 07/14/12 05:02:55 (10 months ago)
- Location:
- trunk
- Files:
-
- 6 edited
- 2 copied
-
. (modified) (1 prop)
-
camera_list.csv (modified) (1 diff)
-
core/gui.c (modified) (2 diffs)
-
loader/a3200 (copied) (copied from branches/release-1_0/loader/a3200)
-
platform/a3200 (copied) (copied from branches/release-1_0/platform/a3200)
-
platform/a3200/kbd.c (modified) (6 diffs)
-
platform/a3200/shooting.c (modified) (2 diffs)
-
platform/a3300/kbd.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/release-1_0 merged: 1970-1971
- Property svn:mergeinfo changed
-
trunk/camera_list.csv
r1977 r1980 10 10 a3000,100c,BETA,, 11 11 a3000,100d,BETA,, 12 a3200,100d,ALPHA,, 12 13 a3300,100a,BETA,, 13 14 a3300,100c,BETA,, -
trunk/core/gui.c
r1977 r1980 67 67 // KEY_LEFT/KEY_RIGHT is used for gui_subj_dist_override_value_enum (because of no separate ZOOM_IN/OUT) 68 68 69 #elif defined(CAMERA_a3300) // a3300 has no erase button, so make DISP button the toggle_raw and Alt +/- shortcuts.69 #elif defined(CAMERA_a3300) || defined(CAMERA_a3200)// a3300 has no erase button, so make DISP button the toggle_raw and Alt +/- shortcuts. 70 70 //Alt mode 71 71 // NOTE both of these conflict with adjustable alt … … 1462 1462 static const char* names[]={ "Print", "ISO"}; 1463 1463 static const int keys[]={ KEY_PRINT, KEY_ISO }; 1464 #elif defined(CAMERA_a3300) 1464 #elif defined(CAMERA_a3300) || defined(CAMERA_a3200) 1465 1465 static const char* names[]={ "Print", "Face", "Disp"}; 1466 1466 static const int keys[]={ KEY_PRINT, KEY_FACE, KEY_DISPLAY }; -
trunk/platform/a3200/kbd.c
r1971 r1980 43 43 #define BTN_ZoomTele (0x00008000) 44 44 45 46 47 static long kbd_new_state[3]; 48 static long kbd_prev_state[3]; 49 static long kbd_mod_state[3]; 45 long kbd_new_state[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF }; 46 static long kbd_prev_state[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF }; 47 static long kbd_mod_state[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF }; 48 50 49 static long last_kbd_key = 0; 51 static int usb_power=0;52 static int remote_key, remote_count;53 static int shoot_counter=0;54 50 extern void _GetKbdState(long*); 55 51 56 #define DELAY_TIMEOUT 1000052 //#define DELAY_TIMEOUT 10000 57 53 58 54 // override key and feather bits to avoid feather osd messing up chdk display in ALT mode … … 74 70 ) 75 71 76 //#define LED_AF 0xC02200F477 #define NEW_SS (0x2000)78 72 #define SD_READONLY_FLAG 0x00020000 // Found @0xffb5d574, levent 0x90a 79 73 #define USB_MASK 0x04000000 // Found @0xffb5d594, levent 0x902 80 74 #define USB_FLAG 0x04000000 // ?? Found @0xff3bcf44 a3300, levent 0x902 81 #define USB_ REG275 #define USB_IDX 2 82 76 #define SD_READONLY_IDX 2 83 #define USB_IDX 2 84 85 #ifndef MALLOCD_STACK 86 static char kbd_stack[NEW_SS]; 87 #endif 77 78 extern void usb_remote_key( int ) ; 79 int get_usb_bit() 80 { 81 long usb_physw[3]; 82 usb_physw[USB_IDX] = 0; 83 _kbd_read_keys_r2(usb_physw); 84 return(( usb_physw[USB_IDX] & USB_MASK)==USB_MASK) ; 85 } 88 86 89 87 static KeyMap keymap[] = { … … 117 115 "MOV R5, #0 \n" 118 116 //"BL _kbd_read_keys \n" 119 "BL my_kbd_read_keys \n" // pa cthed117 "BL my_kbd_read_keys \n" // patched 120 118 "B _kbd_p1_f_cont \n" 121 119 ); … … 170 168 } 171 169 172 remote_key = (physw_status[2] & USB_MASK)==USB_MASK; 173 if (remote_key) 174 remote_count += 1; 175 else if (remote_count) { 176 usb_power = remote_count; 177 remote_count = 0; 178 } 179 170 usb_remote_key(physw_status[USB_IDX]) ; 171 180 172 if (conf.remote_enable) { 181 173 physw_status[2] = physw_status[2] & ~(SD_READONLY_FLAG | USB_MASK); // override USB and SD-Card Readonly Bits … … 183 175 184 176 physw_status[2] = physw_status[2] & ~SD_READONLY_FLAG; // override SD-Card Readonly Bit 185 }186 187 int get_usb_power(int edge) {188 189 int x;190 191 if (edge) return remote_key;192 x = usb_power;193 usb_power = 0;194 return x;195 177 } 196 178 … … 342 324 #endif 343 325 344 // called from capt_seq.c at sub_FF96EF54_my()345 void wait_until_remote_button_is_released(void) {346 347 int count1;348 int count2;349 int tick,tick2,tick3;350 int nSW;351 int prev_usb_power,cur_usb_power;352 static int nMode;353 354 asm volatile ("STMFD SP!, {R0-R11,LR}\n"); // store R0-R11 and LR in stack355 356 debug_led(1);357 tick = get_tick_count();358 tick2 = tick;359 static long usb_physw[3];360 if (conf.synch_enable && conf.ricoh_ca1_mode && conf.remote_enable && (!shooting_get_drive_mode()|| (shooting_get_drive_mode()==1) || ((shooting_get_drive_mode()==2) && state_shooting_progress != SHOOTING_PROGRESS_PROCESSING)))361 362 {363 // ------ add by Masuji SUTO (start) --------------364 nMode = 0;365 usb_physw[2] = 0; // makes sure USB bit is cleared.366 _kbd_read_keys_r2(usb_physw);367 if((usb_physw[2] & USB_MASK)==USB_MASK) nMode=1;368 // ------ add by Masuji SUTO (end) --------------369 if(conf.ricoh_ca1_mode && conf.remote_enable) {370 if(shooting_get_drive_mode() == 1 && state_shooting_progress == SHOOTING_PROGRESS_PROCESSING) { //continuous-shooting mode371 if(conf.bracket_type>2) {372 if(shoot_counter<2) shutter_int=3;373 shoot_counter--;374 } else {375 prev_usb_power=0;376 nSW = 0;377 do {378 usb_physw[2] = 0; // makes sure USB bit is cleared.379 _kbd_read_keys_r2(usb_physw);380 cur_usb_power = (usb_physw[2] & USB_MASK)==USB_MASK;381 if(cur_usb_power) {382 if(!prev_usb_power) {383 tick2 = get_tick_count();384 prev_usb_power=cur_usb_power;385 } else {386 if((int)get_tick_count()-tick2>1000) {debug_led(0);}387 }388 } else {389 if(prev_usb_power) {390 tick3 = (int)get_tick_count()-tick2;391 if(nSW==10) {392 if(tick3>50) shutter_int=1;393 nSW=20;394 }395 if(nSW==0 && tick3>0) {396 if(tick3<50) {397 nSW=10;398 } else {399 if(tick3>1000) shutter_int=1;400 nSW=20;401 }402 }403 prev_usb_power=cur_usb_power;404 }405 }406 if((int)get_tick_count()-tick >= DELAY_TIMEOUT) { nSW=20;shutter_int=2; }407 }408 while(nSW<20);409 }410 } // continuous-shooting mode411 else { //nomal mode412 shoot_counter=0;413 if(conf.bracket_type>2) {414 shoot_counter=(conf.bracket_type-2)*2;415 }416 do {417 usb_physw[2] = 0; // makes sure USB bit is cleared.418 _kbd_read_keys_r2(usb_physw);419 }420 while (((((usb_physw[2] & USB_MASK)!=USB_MASK) && (nMode==0)) || (((usb_physw[2] & USB_MASK)==USB_MASK) && (nMode==1))) && ((int)get_tick_count()-tick < DELAY_TIMEOUT));421 }422 } else {423 do {424 usb_physw[2] = 0; // makes sure USB bit is cleared.425 _kbd_read_keys_r2(usb_physw);426 }427 while ((usb_physw[2]&USB_MASK) && ((int)get_tick_count()-tick < DELAY_TIMEOUT));428 }429 }430 431 if (conf.synch_delay_enable && conf.synch_delay_value>0) { // if delay is switched on and greater than 0432 for (count1=0;count1<conf.synch_delay_value+(conf.synch_delay_coarse_value*1000);count1++) { // wait delay_value * 0.1ms433 for (count2=0;count2<1400;count2++) { // delay approx. 0.1ms434 }435 }436 }437 438 debug_led(0);439 asm volatile ("LDMFD SP!, {R0-R11,LR}\n"); // restore R0-R11 and LR from stack440 } -
trunk/platform/a3200/shooting.c
r1971 r1980 74 74 }; 75 75 76 static struct { 77 int hackmode; 78 int canonmode; 79 } modemap[] = { 76 const CapturemodeMap modemap[] = { 80 77 { MODE_P, 32772 }, 81 78 { MODE_LIVE, 33332 }, … … 107 104 108 105 #include "../generic/shooting.c" 109 110 // Override ISO settings (need to do this before exposure calc for ISO as well as after)111 void __attribute__((naked,noinline)) shooting_expo_iso_override(void) {112 113 asm volatile("STMFD SP!, {R0-R12,LR}\n");114 115 if ((state_kbd_script_run) && (photo_param_put_off.sv96)) {116 shooting_set_sv96(photo_param_put_off.sv96, SET_NOW);117 // photo_param_put_off.sv96 is not reset here, it will be reset in next call to shooting_expo_param_override118 }119 else if ((conf.iso_override_value) && (conf.iso_override_koef) && !(conf.override_disable==1))120 shooting_set_iso_real(shooting_get_iso_override_value(), SET_NOW);121 else if (conf.autoiso_enable && shooting_get_flash_mode()/*NOT FOR FLASH AUTO MODE*/ && !(conf.override_disable==1 && conf.override_disable_all))122 shooting_set_autoiso(shooting_get_iso_mode());123 124 asm volatile("LDMFD SP!, {R0-R12,PC}\n");125 }126 127 106 128 107 long get_file_next_counter() { -
trunk/platform/a3300/kbd.c
r1923 r1980 13 13 // button and mode dial codes 14 14 // physw [0] 15 #define BTN_Play (0x00002000) 15 #define BTN_Play (0x00002000)//?? 16 16 17 17 // physw [2] … … 22 22 #define BTN_Set (0x00000010) 23 23 #define BTN_Disp (0x00000020) 24 #define BTN_Face (0x00000040) 24 #define BTN_Face (0x00000040)//?? 25 25 #define BTN_Menu (0x00000080) 26 26 … … 48 48 49 49 static long last_kbd_key = 0; 50 50 static int usb_power=0; 51 static int remote_key, remote_count; 52 static int shoot_counter=0; 51 53 extern void _GetKbdState(long*); 54 55 //#define DELAY_TIMEOUT 10000 52 56 53 57 // override key and feather bits to avoid feather osd messing up chdk display in ALT mode … … 69 73 ) 70 74 71 #define LED_AF 0xC02200F4 72 #define NEW_SS (0x2000) 73 74 #define SD_READONLY_FLAG (0x00020000) 75 //#define LED_AF 0xC02200F4 76 //#define NEW_SS (0x2000) 77 #define SD_READONLY_FLAG 0x00020000 // Found @0xffb5d574, levent 0x90a 78 #define USB_MASK 0x04000000 // Found @0xffb5d594, levent 0x902 79 #define USB_FLAG 0x04000000 // ?? Found @0xff3bcf44 a3300, levent 0x902 80 #define USB_REG 2 75 81 #define SD_READONLY_IDX 2 76 77 #define USB_MASK (0x04000000) 78 #define USB_IDX 2 82 //#define USB_IDX 2 79 83 80 84 extern void usb_remote_key( int ) ; … … 87 91 } 88 92 93 94 /* 89 95 #ifndef MALLOCD_STACK 90 96 static char kbd_stack[NEW_SS]; 91 97 #endif 98 */ 92 99 93 100 static KeyMap keymap[] = { 94 { 0, KEY_PRINT ,BTN_Play }, 95 { 2, KEY_SHOOT_FULL ,BTN_ShootFull | BTN_ShootHalf }, // Found @0xffb5d c9c, levent 0x0196 { 2, KEY_SHOOT_HALF ,BTN_ShootHalf }, // Found @0xffb5d c94, levent 0x0097 { 2, KEY_SHOOT_FULL_ONLY ,BTN_ShootFull }, // Found @0xffb5d c9c, levent 0x0198 { 2, KEY_FACE ,BTN_Face }, // 99 { 2, KEY_UP ,BTN_Up }, // Found @0xffb5d c3c, levent 0x04100 { 2, KEY_DOWN ,BTN_Down }, // Found @0xffb5d c44, levent 0x05101 { 2, KEY_LEFT ,BTN_Left }, // Found @0xffb5d c4c, levent 0x06102 { 2, KEY_RIGHT ,BTN_Right }, // Found @0xffb5d c54, levent 0x07103 { 2, KEY_SET ,BTN_Set }, // Found @0xffb5d c5c, levent 0x08104 { 2, KEY_DISPLAY ,BTN_Disp }, // Found @0xffb5d c64, levent 0x0a105 { 2, KEY_MENU ,BTN_Menu }, // Found @0xffb5d c74, levent 0x09106 { 2, KEY_ZOOM_OUT ,BTN_ZoomWide }, // Found @0xffb5d ca4, levent 0x03107 { 2, KEY_ZOOM_IN ,BTN_ZoomTele }, // Found @0xffb5d cac, levent 0x02101 { 0, KEY_PRINT ,BTN_Play }, 102 { 2, KEY_SHOOT_FULL ,BTN_ShootFull | BTN_ShootHalf }, // Found @0xffb5d554, levent 0x01 103 { 2, KEY_SHOOT_HALF ,BTN_ShootHalf }, // Found @0xffb5d54c, levent 0x00 104 { 2, KEY_SHOOT_FULL_ONLY ,BTN_ShootFull }, // Found @0xffb5d554, levent 0x01 105 { 2, KEY_FACE ,BTN_Face }, // 106 { 2, KEY_UP ,BTN_Up }, // Found @0xffb5d4f4, levent 0x04 107 { 2, KEY_DOWN ,BTN_Down }, // Found @0xffb5d4fc, levent 0x05 108 { 2, KEY_LEFT ,BTN_Left }, // Found @0xffb5d504, levent 0x06 109 { 2, KEY_RIGHT ,BTN_Right }, // Found @0xffb5d50c, levent 0x07 110 { 2, KEY_SET ,BTN_Set }, // Found @0xffb5d514, levent 0x08 111 { 2, KEY_DISPLAY ,BTN_Disp }, // Found @0xffb5d51c, levent 0x0a 112 { 2, KEY_MENU ,BTN_Menu }, // Found @0xffb5d52c, levent 0x09 113 { 2, KEY_ZOOM_OUT ,BTN_ZoomWide }, // Found @0xffb5d55c, levent 0x03 114 { 2, KEY_ZOOM_IN ,BTN_ZoomTele }, // Found @0xffb5d564, levent 0x02 108 115 { 0, 0, 0 } 109 116 }; … … 116 123 117 124 extern long __attribute__((naked)) wrap_kbd_p1_f() { 118 119 120 asm volatile( 121 "STMFD SP!, {R1-R7,LR} \n" 122 "MOV R5, #0 \n" 123 //"BL _kbd_read_keys \n" 124 "BL my_kbd_read_keys \n" // pacthed 125 "B _kbd_p1_f_cont \n" 125 126 asm volatile( 127 "STMFD SP!, {R1-R7,LR} \n" 128 "MOV R5, #0 \n" 129 //"BL _kbd_read_keys \n" 130 "BL my_kbd_read_keys \n" // patched 131 "B _kbd_p1_f_cont \n" 126 132 ); 127 133 return 0; // shut up the compiler … … 132 138 133 139 while (physw_run) { 134 _SleepTask(*((int*)(0x1C30 + 0x8))); // @FF8341 60 + FF834168140 _SleepTask(*((int*)(0x1C30 + 0x8))); // @FF83410C + FF834114 135 141 136 142 if (wrap_kbd_p1_f() == 1) { // autorepeat ? … … 177 183 usb_remote_key(physw_status[USB_IDX]) ; 178 184 179 if (conf.remote_enable) { 180 physw_status[USB_IDX] = physw_status[USB_IDX] & ~(SD_READONLY_FLAG | USB_MASK); 181 } else { 182 physw_status[USB_IDX] = physw_status[USB_IDX] & ~SD_READONLY_FLAG; 183 } 184 185 } 185 if (conf.remote_enable) { 186 physw_status[2] = physw_status[2] & ~(SD_READONLY_FLAG | USB_MASK); // override USB and SD-Card Readonly Bits 187 } 188 189 physw_status[2] = physw_status[2] & ~SD_READONLY_FLAG; // override SD-Card Readonly Bit 190 } 191 192 /* 193 int get_usb_power(int edge) { 194 195 int x; 196 197 if (edge) return remote_key; 198 x = usb_power; 199 usb_power = 0; 200 return x; 201 } 202 */ 186 203 187 204 void kbd_key_press(long key) { … … 331 348 } 332 349 #endif 350
Note: See TracChangeset
for help on using the changeset viewer.