Changeset 1334
- Timestamp:
- 09/12/11 02:40:15 (21 months ago)
- Location:
- trunk/platform/ixus120_sd940
- Files:
-
- 12 edited
-
kbd.c (modified) (8 diffs)
-
platform_camera.h (modified) (1 diff)
-
sub/100e/capt_seq.c (modified) (4 diffs)
-
sub/100e/stubs_auto.S (modified) (2 diffs)
-
sub/101a/capt_seq.c (modified) (2 diffs)
-
sub/101a/stubs_auto.S (modified) (2 diffs)
-
sub/102c/capt_seq.c (modified) (2 diffs)
-
sub/102c/stubs_auto.S (modified) (2 diffs)
-
sub/103b/capt_seq.c (modified) (2 diffs)
-
sub/103b/stubs_auto.S (modified) (2 diffs)
-
sub/103c/capt_seq.c (modified) (2 diffs)
-
sub/103c/stubs_auto.S (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/platform/ixus120_sd940/kbd.c
r1056 r1334 73 73 void wait_until_remote_button_is_released(void) 74 74 { 75 76 long x[3];77 75 int count1; 78 76 int count2; … … 208 206 void __attribute__((naked,noinline)) mykbd_task() 209 207 { 210 #if 0211 /* WARNING212 * Stack pointer manipulation performed here!213 * This means (but not limited to):214 * function arguments destroyed;215 * function CAN NOT return properly;216 * MUST NOT call or use stack variables before stack217 * is setup properly;218 *219 */220 221 register int i;222 register long *newstack;223 224 #ifndef MALLOCD_STACK225 newstack = (void*)kbd_stack;226 #else227 newstack = malloc(NEW_SS);228 #endif229 230 for (i=0;i<NEW_SS/4;i++)231 newstack[i]=0xdededede;232 233 asm volatile (234 "MOV SP, %0"235 :: "r"(((char*)newstack)+NEW_SS)236 : "memory"237 );238 #endif239 240 208 mykbd_task_proceed(); 241 242 /* function can be modified to restore SP here...243 */244 209 245 210 _ExitTask(); … … 261 226 262 227 volatile int jogdial_stopped=0; 263 void disable_SD_writeprotect()264 {265 physw_status[SD_READONLY_REG] = physw_status[SD_READONLY_REG] & ~SD_READONLY_FLAG;266 }267 228 268 229 void my_kbd_read_keys() … … 277 238 _platformsub_kbd_fetch_data(kbd_new_state); 278 239 240 /* Get the rest of the buttons */ 241 242 _kbd_read_keys_r2(kbd_new_state); 243 279 244 kbd_new_state[2] |=0x00008000; /// disable the battery door switch 280 245 … … 295 260 physw_status[0] |= alt_mode_key_mask; /// disable the ALT mode button 296 261 297 physw_status[SD_READONLY_REG] = physw_status[SD_READONLY_REG] & ~SD_READONLY_FLAG;298 262 } 299 263 else { … … 308 272 } 309 273 } 310 311 _kbd_read_keys_r2(physw_status); 312 313 physw_status[2] = physw_status[SD_READONLY_REG] & ~SD_READONLY_FLAG; 314 274 275 315 276 remote_key = (physw_status[2] & USB_MASK)==USB_MASK; 316 277 if (remote_key) { … … 321 282 remote_count = 0; 322 283 } 284 323 285 324 286 if (conf.remote_enable) { … … 329 291 } 330 292 331 #ifdef original_way_to_handle_display_key 332 333 void my_kbd_read_keys() 334 { 335 static int altDownTimer=0; 336 const int DISP_DOWN_TIME = 20; 337 338 static int isAlt=0, isDisplay=0; 339 static int altDownTimer=0; 340 341 kbd_prev_state[0] = kbd_new_state[0]; 342 kbd_prev_state[1] = kbd_new_state[1]; 343 kbd_prev_state[2] = kbd_new_state[2]; 344 345 _platformsub_kbd_fetch_data(kbd_new_state); 346 347 kbd_new_state[2] |=0x00008000; /// disable the battery door switch 348 349 // support for short/long press of Display 350 if (kbd_is_key_pressed(KEY_DISPLAY)) { // Display held down 351 altDownTimer++; 352 } 353 if (altDownTimer > 50) { // TODO - determine best threshold 354 isDisplay = 1; // held down long enough for Display 355 } 356 else if (!kbd_is_key_pressed(KEY_DISPLAY)) { 357 if (altDownTimer > 0) 358 isAlt = 1; 359 altDownTimer = 0; 360 } 361 362 if (kbd_process() == 0) { 363 // leave it alone... 364 physw_status[0] = kbd_new_state[0]; 365 physw_status[1] = kbd_new_state[1]; 366 physw_status[2] = kbd_new_state[2]; 367 368 physw_status[0] |= alt_mode_key_mask; /// disable the ALT mode button 369 370 physw_status[SD_READONLY_REG] = physw_status[SD_READONLY_REG] & ~SD_READONLY_FLAG; 371 } 372 else { 373 // override keys 374 375 physw_status[0] = (kbd_new_state[0] & (~KEYS_MASK0)) |(kbd_mod_state[0] & KEYS_MASK0); 376 physw_status[1] = (kbd_new_state[1] & (~KEYS_MASK1)) | (kbd_mod_state[1] & KEYS_MASK1); 377 physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) |(kbd_mod_state[2] & KEYS_MASK2); 378 379 if (isDisplay) 380 physw_status[0] &= ~alt_mode_key_mask; /// press the Display button 381 } 382 383 _kbd_read_keys_r2(physw_status); 384 385 physw_status[2] = physw_status[SD_READONLY_REG] & ~SD_READONLY_FLAG; 386 387 remote_key = (physw_status[2] & USB_MASK)==USB_MASK; 388 if (remote_key) { 389 remote_count += 1; 390 } 391 else if (remote_count) { 392 usb_power = remote_count; 393 remote_count = 0; 394 } 395 396 if (conf.remote_enable) { 397 physw_status[2] = physw_status[SD_READONLY_REG] & ~(SD_READONLY_FLAG | USB_MASK); 398 } else { 399 physw_status[2] = physw_status[SD_READONLY_REG] & ~SD_READONLY_FLAG; 400 } 401 } 402 #endif 293 403 294 404 295 -
trunk/platform/ixus120_sd940/platform_camera.h
r1255 r1334 22 22 23 23 #define CAM_DRYOS_2_3_R39 1 //stat is different, as well as some other functions 24 #define SYNCHABLE_REMOTE_NOT_ENABLED 1 24 25 // #define SYNCHABLE_REMOTE_NOT_ENABLED 1 26 25 27 #define CAM_PROPSET 3 26 28 #define CAM_DRYOS 1 -
trunk/platform/ixus120_sd940/sub/100e/capt_seq.c
r1189 r1334 101 101 " MOV R0, R5 \n" 102 102 103 //" BL sub_FF942 5F4\n"104 " BL sub_FF942 5F4_my \n" // patched103 //" BL sub_FF942410 \n" 104 " BL sub_FF942410_my \n" // patched 105 105 106 106 " TST R0, #1 \n" … … 280 280 281 281 /*---------------------------------------------------------------------- 282 sub_FF942 5F4_my() - capt_seq_task()282 sub_FF942410_my() - capt_seq_task() 283 283 -----------------------------------------------------------------------*/ 284 void __attribute__((naked,noinline)) sub_FF942 5F4_my() {284 void __attribute__((naked,noinline)) sub_FF942410_my() { 285 285 asm volatile ( 286 286 " STMFD SP!, {R0-R8,LR} \n" … … 333 333 " BL capt_seq_hook_set_nr\n" 334 334 335 " LDR R0, [R4, #0x1C] \n" 336 " CMP R0, #0 \n" 337 " MOVNE R0, #1 \n" 338 " STRNE R0, [R5] \n" 339 " LDR R0, [R5, #4] \n" 340 " BL sub_FF90B7F8 \n" 341 " LDR R0, [R5, #8] \n" 342 " BL sub_FF8B9E48 \n" 343 " MOV R0, #1 \n" 344 " BL sub_FF8B9E54 \n" 345 " LDR R0, =0xFF941E0C \n" 346 " MOV R1, R4 \n" 347 " BL sub_FF8B9E24 \n" 348 " LDR R0, [R5] \n" 349 " CMP R0, #5 \n" 350 " ADDLS PC, PC, R0, LSL #2 \n" 351 352 " B sub_FF9425CC \n" // go to the ROM 335 " B sub_FF9424C0 \n" // go back to the ROM 353 336 ); 354 337 } … … 409 392 " BL sub_FF942328 \n" 410 393 " BL sub_FF942DA0 \n" 411 " MOV R0, R4 \n" 412 413 // this patch causes a crash when shooting 414 // it is unknown what the effect is of not calling this (called elsewhere) 415 " BL sub_FF9425F4 \n" 416 //" BL sub_FF9425F4_my \n" 394 " MOV R0, R4 \n" 395 396 //" BL sub_FF942410 \n" 397 " BL sub_FF942410_my \n" // patched 398 417 399 " MOV R5, R0 \n" 418 400 " BL capt_seq_hook_raw_here\n" //----------->> -
trunk/platform/ixus120_sd940/sub/100e/stubs_auto.S
r1189 r1334 159 159 STUB(FF8B44EC) 160 160 STUB(FF8B4588) 161 STUB(FF8B9E24)162 STUB(FF8B9E48)163 STUB(FF8B9E54)164 161 STUB(FF8D7AE8) 165 162 STUB(FF8D9F0C) 166 163 STUB(FF8DB75C) 167 164 STUB(FF90B548) 168 STUB(FF90B7F8)169 165 STUB(FF9181E0) 170 166 STUB(FF9182A8) … … 194 190 STUB(FF941CAC) 195 191 STUB(FF942328) 196 STUB(FF942 5CC)197 STUB(FF942 5F4)192 STUB(FF942410) 193 STUB(FF9424C0) 198 194 STUB(FF9426C8) 199 195 STUB(FF942724) -
trunk/platform/ixus120_sd940/sub/101a/capt_seq.c
r1149 r1334 333 333 " BL capt_seq_hook_set_nr\n" 334 334 335 336 " LDR R0, [R4, #0x1C] \n" 337 " CMP R0, #0 \n" 338 " MOVNE R0, #1 \n" 339 " STRNE R0, [R5] \n" 340 " LDR R0, [R5, #4] \n" 341 " BL sub_FF90B814 \n" 342 " LDR R0, [R5, #8] \n" 343 " BL sub_FF8B9E64 \n" 344 " MOV R0, #1 \n" 345 " BL sub_FF8B9E70 \n" 346 " LDR R0, =0xFF941E28 \n" 347 " MOV R1, R4 \n" 348 " BL sub_FF8B9E40 \n" 349 " LDR R0, [R5] \n" 350 " CMP R0, #5 \n" 351 " ADDLS PC, PC, R0, LSL #2 \n" 352 353 " B sub_FF9425E8 \n" // go to the ROM 335 " B sub_FF9424DC \n" 354 336 ); 355 337 } … … 410 392 " BL sub_FF942344 \n" 411 393 " BL sub_FF942DBC \n" 412 " MOV R0, R4 \n" 413 414 // this patch causes a crash when shooting 415 // it is unknown what the effect is of not calling this (called elsewhere) 416 " BL sub_FF94242C \n" 417 //" BL sub_FF94242C_my \n" 394 " MOV R0, R4 \n" 395 396 //" BL sub_FF94242C \n" 397 " BL sub_FF94242C_my \n" 398 418 399 " MOV R5, R0 \n" 419 400 " BL capt_seq_hook_raw_here\n" //----------->> -
trunk/platform/ixus120_sd940/sub/101a/stubs_auto.S
r1149 r1334 159 159 STUB(FF8B4508) 160 160 STUB(FF8B45A4) 161 STUB(FF8B9E40)162 STUB(FF8B9E64)163 STUB(FF8B9E70)164 161 STUB(FF8D7B04) 165 162 STUB(FF8D9F28) 166 163 STUB(FF8DB778) 167 164 STUB(FF90B564) 168 STUB(FF90B814)169 165 STUB(FF9181FC) 170 166 STUB(FF9182C4) … … 195 191 STUB(FF942344) 196 192 STUB(FF94242C) 197 STUB(FF942 5E8)193 STUB(FF9424DC) 198 194 STUB(FF9426E4) 199 195 STUB(FF942740) -
trunk/platform/ixus120_sd940/sub/102c/capt_seq.c
r1056 r1334 330 330 " BL capt_seq_hook_set_nr \n" // added 331 331 332 " LDR R0, [R4,#0x1C] \n" 333 " CMP R0, #0 \n" 334 " MOVNE R0, #1 \n" 335 " STRNE R0, [R5] \n" 336 " LDR R0, [R5,#4] \n" 337 " BL sub_FF90B814 \n" 338 " LDR R0, [R5,#8] \n" 339 " BL sub_FF8B9E64 \n" 340 " MOV R0, #1 \n" 341 " BL sub_FF8B9E70 \n" // nullsub_13 342 " LDR R0, =0xFF941E28 \n" 343 " MOV R1, R4 \n" 344 " BL sub_FF8B9E40 \n" 345 " LDR R0, [R5] \n" 346 " CMP R0, #5 \n" 347 " ADDLS PC, PC, R0,LSL#2 \n" 348 //" B loc_FF9425E8 \n" 349 " B sub_FF9425E8 \n" 350 332 " B sub_FF9424DC \n" 351 333 ); 352 334 } … … 408 390 " MOV R0, R4 \n" 409 391 410 // this patch causes a crash when shooting 411 // it is unknown what the effect is of not calling this 412 " BL sub_FF94242C \n" 413 //" BL sub_FF94242C_my \n" // patched 392 //" BL sub_FF94242C \n" 393 " BL sub_FF94242C_my \n" // patched 394 414 395 " MOV R5, R0 \n" 415 396 " BL capt_seq_hook_raw_here \n" // added -
trunk/platform/ixus120_sd940/sub/102c/stubs_auto.S
r1056 r1334 159 159 STUB(FF8B4508) 160 160 STUB(FF8B45A4) 161 STUB(FF8B9E40)162 STUB(FF8B9E64)163 STUB(FF8B9E70)164 161 STUB(FF8D7B04) 165 162 STUB(FF8D9F28) 166 163 STUB(FF8DB778) 167 164 STUB(FF90B564) 168 STUB(FF90B814)169 165 STUB(FF9181FC) 170 166 STUB(FF9182C4) … … 195 191 STUB(FF942344) 196 192 STUB(FF94242C) 197 STUB(FF942 5E8)193 STUB(FF9424DC) 198 194 STUB(FF9426E4) 199 195 STUB(FF942740) -
trunk/platform/ixus120_sd940/sub/103b/capt_seq.c
r1134 r1334 330 330 "BL wait_until_remote_button_is_released\n" 331 331 "BL capt_seq_hook_set_nr\n" 332 333 334 " LDR R0, [R4,#0x1C]\n" 335 " CMP R0, #0\n" 336 " MOVNE R0, #1\n" 337 " STRNE R0, [R5]\n" 338 " LDR R0, [R5,#4]\n" 339 " BL sub_FF90B820\n" 340 " LDR R0, [R5,#8]\n" 341 " BL sub_FF8B9E70\n" 342 " MOV R0, #1\n" 343 " BL sub_FF8B9E7C\n" 344 " LDR R0, =0xFF941E34\n" 345 " MOV R1, R4\n" 346 " BL sub_FF8B9E4C\n" 347 " LDR R0, [R5]\n" 348 " CMP R0, #5\n" 349 " ADDLS PC, PC, R0,LSL#2\n" 350 351 " B sub_FF9425F4\n" // go to the ROM 332 333 " B sub_FF9424E8\n" // go back to the ROM 352 334 ); 353 335 } … … 410 392 " MOV R0, R4\n" 411 393 412 // this patch causes a crash when shooting 413 // it is unknown what the effect is of not calling this (called elsewhere) 414 " BL sub_FF942438\n" 415 //" BL sub_FF942438_my\n" 394 //" BL sub_FF942438\n" 395 " BL sub_FF942438_my\n" 396 416 397 " MOV R5, R0\n" 417 398 " BL capt_seq_hook_raw_here\n" //----------->> -
trunk/platform/ixus120_sd940/sub/103b/stubs_auto.S
r1134 r1334 159 159 STUB(FF8B4514) 160 160 STUB(FF8B45B0) 161 STUB(FF8B9E4C)162 STUB(FF8B9E70)163 STUB(FF8B9E7C)164 161 STUB(FF8D9F34) 165 162 STUB(FF8DB784) 166 163 STUB(FF90B570) 167 STUB(FF90B820)168 164 STUB(FF918208) 169 165 STUB(FF9182D0) … … 194 190 STUB(FF942350) 195 191 STUB(FF942438) 196 STUB(FF942 5F4)192 STUB(FF9424E8) 197 193 STUB(FF9426F0) 198 194 STUB(FF94274C) -
trunk/platform/ixus120_sd940/sub/103c/capt_seq.c
r1071 r1334 330 330 "BL capt_seq_hook_set_nr\n" 331 331 332 "LDR R0, [R4,#0x1C]\n" 333 "CMP R0, #0\n" 334 "MOVNE R0, #1\n" 335 "STRNE R0, [R5]\n" 336 "LDR R0, [R5,#4]\n" 337 "BL sub_FF90B870\n" 338 "LDR R0, [R5,#8]\n" 339 "BL sub_FF8B9EC0\n" 340 "MOV R0, #1\n" 341 "BL sub_FF8B9ECC\n" //nullsub_50 342 "LDR R0, =0xFF941FF0\n" 343 "MOV R1, R4\n" 344 "BL sub_FF8B9E9C\n" 345 "LDR R0, [R5]\n" 346 "CMP R0, #5\n" 347 "ADDLS PC, PC, R0,LSL#2\n" 348 349 "B sub_FF9427B0\n" //go to the ROM 332 "B sub_FF9426A4\n" //go back to the ROM 350 333 ); 351 334 } … … 408 391 "MOV R0, R4\n" 409 392 410 // this patch causes a crash when shooting 411 // it is unknown what the effect is of not calling this (called elsewhere) 412 "BL sub_FF9425F4 \n" 413 // "BL sub_FF9425F4_my \n" 393 // "BL sub_FF9425F4 \n" 394 "BL sub_FF9425F4_my \n" 395 414 396 "MOV R5, R0\n" 415 397 "BL capt_seq_hook_raw_here\n" //----------->> -
trunk/platform/ixus120_sd940/sub/103c/stubs_auto.S
r1056 r1334 159 159 STUB(FF8B4564) 160 160 STUB(FF8B4600) 161 STUB(FF8B9E9C)162 STUB(FF8B9EC0)163 STUB(FF8B9ECC)164 161 STUB(FF8D9F84) 165 162 STUB(FF8DB7D4) 166 163 STUB(FF90B5C0) 167 STUB(FF90B870)168 164 STUB(FF918258) 169 165 STUB(FF918320) … … 194 190 STUB(FF94250C) 195 191 STUB(FF9425F4) 196 STUB(FF942 7B0)192 STUB(FF9426A4) 197 193 STUB(FF9428AC) 198 194 STUB(FF942908)
Note: See TracChangeset
for help on using the changeset viewer.