root/platform/a640/sub/100b/capt_seq.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FFD559BC_my
  3. sub_FFD558E0_my
  4. sub_FFD5894C_my
  5. exp_drv_task
  6. sub_FFCFAC90_my
  7. sub_FFCA4270_my

   1 /*
   2  * capt_seq.c - auto-generated by CHDK code_gen.
   3  */
   4 #include "lolevel.h"
   5 #include "platform.h"
   6 #include "core.h"
   7 
   8 static long *nrflag = (long*)0x6264;
   9 
  10 #include "../../../generic/capt_seq.c"
  11 
  12 /*************************************************************/
  13 //** capt_seq_task @ 0xFFD55DB8 - 0xFFD55F88, length=117
  14 void __attribute__((naked,noinline)) capt_seq_task() {
  15 asm volatile (
  16 "    STMFD   SP!, {R4,LR} \n"
  17 "    SUB     SP, SP, #4 \n"
  18 "    MOV     R4, SP \n"
  19 "    B       loc_FFD55F54 \n"
  20 
  21 "loc_FFD55DC8:\n"
  22 "    LDR     R2, [SP] \n"
  23 "    LDR     R3, [R2] \n"
  24 "    MOV     R0, R2 \n"
  25 "    CMP     R3, #0x16 \n"
  26 "    LDRLS   PC, [PC, R3, LSL#2] \n"
  27 "    B       loc_FFD55F28 \n"
  28 "    .long   loc_FFD55E3C \n"
  29 "    .long   loc_FFD55E5C \n"
  30 "    .long   loc_FFD55E70 \n"
  31 "    .long   loc_FFD55E84 \n"
  32 "    .long   loc_FFD55E7C \n"
  33 "    .long   loc_FFD55E8C \n"
  34 "    .long   loc_FFD55E94 \n"
  35 "    .long   loc_FFD55EA0 \n"
  36 "    .long   loc_FFD55EA8 \n"
  37 "    .long   loc_FFD55EB4 \n"
  38 "    .long   loc_FFD55EBC \n"
  39 "    .long   loc_FFD55EC4 \n"
  40 "    .long   loc_FFD55ECC \n"
  41 "    .long   loc_FFD55ED4 \n"
  42 "    .long   loc_FFD55EDC \n"
  43 "    .long   loc_FFD55EE8 \n"
  44 "    .long   loc_FFD55EF0 \n"
  45 "    .long   loc_FFD55EF8 \n"
  46 "    .long   loc_FFD55F00 \n"
  47 "    .long   loc_FFD55F0C \n"
  48 "    .long   loc_FFD55F18 \n"
  49 "    .long   loc_FFD55F20 \n"
  50 "    .long   loc_FFD55F3C \n"
  51 
  52 "loc_FFD55E3C:\n"
  53 "    BL      sub_FFD56438 \n"
  54 // only do quick press hack if overrides are active
  55 "    BL      captseq_hack_override_active\n"      // returns 1 if tv or sv override in effect
  56 "    STR     R0,[SP,#-4]!\n" // push return value
  57 "    BL      shooting_expo_param_override\n"   // +
  58 "    BL      sub_FFD53B94 \n"
  59 "    LDR     R3, =0x91FA0 \n"
  60 "    LDR     R2,[SP],#4\n" // pop override hack
  61 "    CMP     R2, #1\n"     // +
  62 "    MOVEQ   R2, #0\n"     // +
  63 "    STREQ   R2, [R3,#0x28]\n" // fixes overrides behavior at short shutter press
  64 "    LDRNE   R2, [R3,#0x28]\n" // modified NE
  65 "    CMPNE   R2, #0\n"         // modified NE
  66 //"    LDR     R2, [R3, #0x28] \n"  // above patch makes these lines redundant
  67 //"    CMP     R2, #0 \n"
  68 "    BEQ     loc_FFD55F38 \n"
  69 "    BL      sub_FFD559BC_my \n"  // --> Patched. Old value = 0xFFD559BC.
  70 "    B       loc_FFD55F38 \n"
  71 
  72 "loc_FFD55E5C:\n"
  73 "    BL      sub_FFD558E0_my \n"  // --> Patched. Old value = 0xFFD558E0.
  74 
  75 "loc_FFD55E60:\n"
  76 "    LDR     R2, =0x91FA0 \n"
  77 "    MOV     R3, #0 \n"
  78 "    STR     R3, [R2, #0x28] \n"
  79 "    B       loc_FFD55F38 \n"
  80 
  81 "loc_FFD55E70:\n"
  82 "    MOV     R0, #1 \n"
  83 "    BL      sub_FFD5662C \n"
  84 "    B       loc_FFD55F38 \n"
  85 
  86 "loc_FFD55E7C:\n"
  87 "    BL      sub_FFD5604C \n"
  88 "    B       loc_FFD55E60 \n"
  89 
  90 "loc_FFD55E84:\n"
  91 "    BL      sub_FFD563F0 \n"
  92 "    B       loc_FFD55E60 \n"
  93 
  94 "loc_FFD55E8C:\n"
  95 "    BL      sub_FFD56400 \n"
  96 "    B       loc_FFD55F38 \n"
  97 
  98 "loc_FFD55E94:\n"
  99 "    BL      sub_FFD56524 \n"
 100 "    BL      sub_FFD53B94 \n"
 101 "    B       loc_FFD55F38 \n"
 102 
 103 "loc_FFD55EA0:\n"
 104 "    BL      sub_FFD55A98 \n"
 105 "    B       loc_FFD55F38 \n"
 106 
 107 "loc_FFD55EA8:\n"
 108 "    BL      sub_FFD5658C \n"
 109 "    BL      sub_FFD53B94 \n"
 110 "    B       loc_FFD55F38 \n"
 111 
 112 "loc_FFD55EB4:\n"
 113 "    BL      sub_FFD563F0 \n"
 114 "    B       loc_FFD55F38 \n"
 115 
 116 "loc_FFD55EBC:\n"
 117 "    BL      sub_FFD57C18 \n"
 118 "    B       loc_FFD55F38 \n"
 119 
 120 "loc_FFD55EC4:\n"
 121 "    BL      sub_FFD57DE4 \n"
 122 "    B       loc_FFD55F38 \n"
 123 
 124 "loc_FFD55ECC:\n"
 125 "    BL      sub_FFD57E78 \n"
 126 "    B       loc_FFD55F38 \n"
 127 
 128 "loc_FFD55ED4:\n"
 129 "    BL      sub_FFD57F14 \n"
 130 "    B       loc_FFD55F38 \n"
 131 
 132 "loc_FFD55EDC:\n"
 133 "    MOV     R0, #0 \n"
 134 "    BL      sub_FFD58180 \n"
 135 "    B       loc_FFD55F38 \n"
 136 
 137 "loc_FFD55EE8:\n"
 138 "    BL      sub_FFD58338 \n"
 139 "    B       loc_FFD55F38 \n"
 140 
 141 "loc_FFD55EF0:\n"
 142 "    BL      sub_FFD583C8 \n"
 143 "    B       loc_FFD55F38 \n"
 144 
 145 "loc_FFD55EF8:\n"
 146 "    BL      sub_FFD58480 \n"
 147 "    B       loc_FFD55F38 \n"
 148 
 149 "loc_FFD55F00:\n"
 150 "    MOV     R0, #1 \n"
 151 "    BL      sub_FFD58180 \n"
 152 "    B       loc_FFD55F38 \n"
 153 
 154 "loc_FFD55F0C:\n"
 155 "    BL      sub_FFD5676C \n"
 156 "    BL      sub_FFD55804 \n"
 157 "    B       loc_FFD55F38 \n"
 158 
 159 "loc_FFD55F18:\n"
 160 "    BL      sub_FFD58054 \n"
 161 "    B       loc_FFD55F38 \n"
 162 
 163 "loc_FFD55F20:\n"
 164 "    BL      sub_FFD580AC \n"
 165 "    B       loc_FFD55F38 \n"
 166 
 167 "loc_FFD55F28:\n"
 168 "    MOV     R1, #0x4E0 \n"
 169 "    LDR     R0, =0xFFD55660 /*'ShootTask.c'*/ \n"
 170 "    ADD     R1, R1, #7 \n"
 171 "    BL      _DebugAssert \n"
 172 
 173 "loc_FFD55F38:\n"
 174 "    LDR     R2, [SP] \n"
 175 
 176 "loc_FFD55F3C:\n"
 177 "    LDR     R3, =0x67094 \n"
 178 "    LDR     R1, [R2, #4] \n"
 179 "    LDR     R0, [R3] \n"
 180 "    BL      sub_FFC108A0 /*_SetEventFlag*/ \n"
 181 "    LDR     R0, [SP] \n"
 182 "    BL      sub_FFD556DC \n"
 183 
 184 "loc_FFD55F54:\n"
 185 "    LDR     R3, =0x67098 \n"
 186 "    MOV     R1, R4 \n"
 187 "    LDR     R0, [R3] \n"
 188 "    MOV     R2, #0 \n"
 189 "    BL      sub_FFC10FB8 /*_ReceiveMessageQueue*/ \n"
 190 "    TST     R0, #1 \n"
 191 "    BEQ     loc_FFD55DC8 \n"
 192 "    MOV     R1, #0x410 \n"
 193 "    LDR     R0, =0xFFD55660 /*'ShootTask.c'*/ \n"
 194 "    ADD     R1, R1, #9 \n"
 195 "    BL      _DebugAssert \n"
 196 "    BL      _ExitTask \n"
 197 "    ADD     SP, SP, #4 \n"
 198 "    LDMFD   SP!, {R4,PC} \n"
 199 );
 200 }
 201 
 202 /*************************************************************/
 203 //** sub_FFD559BC_my @ 0xFFD559BC - 0xFFD55A7C, length=49
 204 void __attribute__((naked,noinline)) sub_FFD559BC_my() {
 205 asm volatile (
 206 "    STMFD   SP!, {R4,LR} \n"
 207 "    BL      sub_FFD55568 \n"
 208 "    LDR     R3, =0x91FA0 \n"
 209 "    LDR     R2, [R3, #0x28] \n"
 210 "    CMP     R2, #0 \n"
 211 "    MOV     R4, R0 \n"
 212 "    MOV     R0, #0xC \n"
 213 "    BEQ     loc_FFD55A04 \n"
 214 "    BL      sub_FFD5F510 \n"
 215 "    TST     R0, #1 \n"
 216 "    BEQ     loc_FFD55A04 \n"
 217 "    LDR     R3, [R4, #8] \n"
 218 "    LDR     R2, =0x6248 \n"
 219 "    ORR     R3, R3, #0x40000000 \n"
 220 "    MOV     R1, #1 \n"
 221 "    STR     R1, [R2] \n"
 222 "    STR     R3, [R4, #8] \n"
 223 "    LDMFD   SP!, {R4,PC} \n"
 224 
 225 "loc_FFD55A04:\n"
 226 "    BL      sub_FFD96AA4 \n"
 227 "    BL      sub_FFC15680 \n"
 228 "    STR     R0, [R4, #0x14] \n"
 229 "    MOV     R0, R4 \n"
 230 "    BL      sub_FFD5894C_my \n"  // --> Patched. Old value = 0xFFD5894C.
 231 "    BL      capt_seq_hook_raw_here\n"   // +
 232 "    TST     R0, #1 \n"
 233 "    LDRNE   R3, =0x6248 \n"
 234 "    MOVNE   R2, #1 \n"
 235 "    STRNE   R2, [R3] \n"
 236 "    LDMFD   SP!, {R4,PC} \n"
 237 );
 238 }
 239 
 240 /*************************************************************/
 241 //** sub_FFD558E0_my @ 0xFFD558E0 - 0xFFD559B0, length=53
 242 void __attribute__((naked,noinline)) sub_FFD558E0_my() {
 243 asm volatile (
 244 "    STMFD   SP!, {R4,R5,LR} \n"
 245 "    LDR     R3, =0x91FA0 \n"
 246 "    LDR     R5, [R0, #0xC] \n"
 247 "    LDR     R1, [R3, #0x28] \n"
 248 "    LDR     R2, [R5, #8] \n"
 249 "    CMP     R1, #0 \n"
 250 "    ORR     R2, R2, #1 \n"
 251 "    STR     R2, [R5, #8] \n"
 252 "    BNE     loc_FFD55934 \n"
 253 "    MOV     R0, #0xC \n"
 254 "    BL      sub_FFD5F510 \n"
 255 "    TST     R0, #1 \n"
 256 "    BEQ     loc_FFD55934 \n"
 257 "    LDR     R3, [R5, #8] \n"
 258 "    MOV     R0, #1 \n"
 259 "    ORR     R3, R3, #0x40000000 \n"
 260 "    STR     R3, [R5, #8] \n"
 261 
 262 "loc_FFD55924:\n"
 263 "    MOV     R2, R5 \n"
 264 "    MOV     R1, #1 \n"
 265 "    LDMFD   SP!, {R4,R5,LR} \n"
 266 "    B       sub_FFD54100 \n"
 267 
 268 "loc_FFD55934:\n"
 269 "    LDR     R4, =0x91FA0 \n"
 270 "    BL      sub_FFD56410 \n"
 271 "    LDR     R3, [R4, #0x28] \n"
 272 "    CMP     R3, #0 \n"
 273 "    BNE     loc_FFD5597C \n"
 274 "    MOV     R0, R5 \n"
 275 "    BL      sub_FFD574E8 \n"
 276 "    TST     R0, #1 \n"
 277 "    BNE     loc_FFD55924 \n"
 278 "    BL      sub_FFD96AA4 \n"
 279 "    BL      sub_FFC15680 \n"
 280 "    STR     R0, [R5, #0x14] \n"
 281 "    MOV     R0, R5 \n"
 282 "    BL      sub_FFD58834 \n"
 283 "    BL      sub_FFD5919C \n"
 284 "    MOV     R0, R5 \n"
 285 "    BL      sub_FFD5894C_my \n"  // --> Patched. Old value = 0xFFD5894C.
 286 "    BL      capt_seq_hook_raw_here\n"   // +
 287 "    B       loc_FFD55990 \n"
 288 
 289 "loc_FFD5597C:\n"
 290 "    LDR     R3, =0x6248 \n"
 291 "    LDR     R2, [R3] \n"
 292 "    CMP     R2, #0 \n"
 293 "    MOVNE   R0, #0x1D \n"
 294 "    MOVEQ   R0, #0 \n"
 295 
 296 "loc_FFD55990:\n"
 297 "    MOV     R1, #1 \n"
 298 "    MOV     R2, R5 \n"
 299 "    BL      sub_FFD54100 \n"
 300 "    BL      sub_FFD58C88 \n"
 301 "    CMP     R0, #0 \n"
 302 "    LDRNE   R3, [R5, #8] \n"
 303 "    ORRNE   R3, R3, #0x2000 \n"
 304 "    STRNE   R3, [R5, #8] \n"
 305 "    LDMFD   SP!, {R4,R5,PC} \n"
 306 );
 307 }
 308 
 309 /*************************************************************/
 310 //** sub_FFD5894C_my @ 0xFFD5894C - 0xFFD589A4, length=23
 311 void __attribute__((naked,noinline)) sub_FFD5894C_my() {
 312 asm volatile (
 313 "    STMFD   SP!, {R4,LR} \n"
 314 "    MOV     R4, R0 \n"
 315 "    SUB     SP, SP, #0xC \n"
 316 "    BL      sub_FFD59310 \n"
 317 "    MVN     R1, #0 \n"
 318 "    BL      sub_FFC10A3C /*_ClearEventFlag*/ \n"
 319 "    MOV     R0, #0x120 \n"
 320 "    ADD     R0, R0, #2 \n"
 321 "    ADD     R1, SP, #4 \n"
 322 "    MOV     R2, #4 \n"
 323 "    BL      _GetPropertyCase \n"
 324 "    TST     R0, #1 \n"
 325 "    BEQ     loc_FFD5898C \n"
 326 "    LDR     R0, =0xFFD587C8 /*'CaptureSeq.c'*/ \n"
 327 "    MOV     R1, #0x1D0 \n"
 328 "    BL      _DebugAssert \n"
 329 
 330 "loc_FFD5898C:\n"
 331 "    LDR     R3, =0x91FA0 \n"
 332 "    LDR     R2, =0x92060 \n"
 333 "    LDR     R0, [R3, #0x84] \n"
 334 "    LDRSH   R1, [R2, #0xE] \n"
 335 "    BL      sub_FFC91A4C \n"
 336 "    MOV     R0, R4 \n"
 337 "    BL      sub_FFD5874C \n"
 338 "    BL      wait_until_remote_button_is_released\n"
 339 "    BL      capt_seq_hook_set_nr\n"
 340 "    LDR     PC, =0xFFD589A8 \n"  // Continue in firmware
 341 );
 342 }
 343 
 344 /*************************************************************/
 345 //** exp_drv_task @ 0xFFCFDCF0 - 0xFFCFE1F0, length=321
 346 void __attribute__((naked,noinline)) exp_drv_task() {
 347 asm volatile (
 348 "    STMFD   SP!, {R4-R8,LR} \n"
 349 "    SUB     SP, SP, #0x20 \n"
 350 "    ADD     R7, SP, #4 \n"
 351 "    B       loc_FFCFE1AC \n"
 352 
 353 "loc_FFCFDD00:\n"
 354 "    CMP     R2, #0x22 \n"
 355 "    BNE     loc_FFCFDD18 \n"
 356 "    LDR     R0, [R12, #0x8C] \n"
 357 "    MOV     LR, PC \n"
 358 "    LDR     PC, [R12, #0x88] \n"
 359 "    B       loc_FFCFDD7C \n"
 360 
 361 "loc_FFCFDD18:\n"
 362 "    CMP     R2, #0x1D \n"
 363 "    BNE     loc_FFCFDD2C \n"
 364 "    MOV     R0, R12 \n"
 365 "    BL      sub_FFCFDBC0 \n"
 366 "    B       loc_FFCFDD6C \n"
 367 
 368 "loc_FFCFDD2C:\n"
 369 "    CMP     R2, #0x1E \n"
 370 "    BNE     loc_FFCFDD40 \n"
 371 "    MOV     R0, R12 \n"
 372 "    BL      sub_FFCFDC1C \n"
 373 "    B       loc_FFCFDD6C \n"
 374 
 375 "loc_FFCFDD40:\n"
 376 "    SUB     R3, R2, #0x1F \n"
 377 "    CMP     R3, #1 \n"
 378 "    BHI     loc_FFCFDD58 \n"
 379 "    MOV     R0, R12 \n"
 380 "    BL      sub_FFCFDC78 \n"
 381 "    B       loc_FFCFDD6C \n"
 382 
 383 "loc_FFCFDD58:\n"
 384 "    CMP     R2, #0x21 \n"
 385 "    BNE     loc_FFCFDD88 \n"
 386 "    BL      sub_FFCA45E8 \n"
 387 "    BL      sub_FFCA76DC \n"
 388 "    BL      sub_FFCA6914 \n"
 389 
 390 "loc_FFCFDD6C:\n"
 391 "    LDR     R3, [SP, #4] \n"
 392 "    LDR     R0, [R3, #0x8C] \n"
 393 "    MOV     LR, PC \n"
 394 "    LDR     PC, [R3, #0x88] \n"
 395 
 396 "loc_FFCFDD7C:\n"
 397 "    LDR     R0, [SP, #4] \n"
 398 "    BL      sub_FFCF976C \n"
 399 "    B       loc_FFCFE1AC \n"
 400 
 401 "loc_FFCFDD88:\n"
 402 "    CMP     R2, #0xD \n"
 403 "    MOV     R8, #1 \n"
 404 "    BNE     loc_FFCFDDF8 \n"
 405 "    LDR     R1, [R12, #0x7C] \n"
 406 "    ADD     R1, R1, R1, LSL#1 \n"
 407 "    ADD     R1, R12, R1, LSL#2 \n"
 408 "    ADD     R6, SP, #0x14 \n"
 409 "    SUB     R1, R1, #8 \n"
 410 "    MOV     R2, #0xC \n"
 411 "    MOV     R0, R6 \n"
 412 "    BL      _memcpy \n"
 413 "    LDR     R0, [SP, #4] \n"
 414 "    BL      sub_FFCFC248 \n"
 415 "    LDR     R3, [SP, #4] \n"
 416 "    LDR     R1, [R3, #0x7C] \n"
 417 "    LDR     R2, [R3, #0x8C] \n"
 418 "    ADD     R0, R3, #4 \n"
 419 "    MOV     LR, PC \n"
 420 "    LDR     PC, [R3, #0x88] \n"
 421 "    LDR     R0, [SP, #4] \n"
 422 "    BL      sub_FFCFC518 \n"
 423 "    LDR     R3, [SP, #4] \n"
 424 "    ADD     R0, R3, #4 \n"
 425 "    LDR     R1, [R3, #0x7C] \n"
 426 "    LDR     R2, [R3, #0x94] \n"
 427 "    MOV     LR, PC \n"
 428 "    LDR     PC, [R3, #0x90] \n"
 429 "    B       loc_FFCFE148 \n"
 430 
 431 "loc_FFCFDDF8:\n"
 432 "    SUB     R3, R2, #0xE \n"
 433 "    CMP     R3, #1 \n"
 434 "    BHI     loc_FFCFDEB4 \n"
 435 "    ADD     R6, SP, #0x14 \n"
 436 "    ADD     R5, SP, #8 \n"
 437 "    MOV     R0, R12 \n"
 438 "    MOV     R1, R6 \n"
 439 "    MOV     R2, R5 \n"
 440 "    BL      sub_FFCFC60C \n"
 441 "    MOV     R4, R0 \n"
 442 "    CMP     R4, #5 \n"
 443 "    CMPNE   R4, #1 \n"
 444 "    BNE     loc_FFCFDE4C \n"
 445 "    LDR     R12, [SP, #4] \n"
 446 "    MOV     R0, R5 \n"
 447 "    LDR     R1, [R12, #0x7C] \n"
 448 "    MOV     R2, R4 \n"
 449 "    LDR     R3, [R12, #0x8C] \n"
 450 "    MOV     LR, PC \n"
 451 "    LDR     PC, [R12, #0x88] \n"
 452 "    B       loc_FFCFDE84 \n"
 453 
 454 "loc_FFCFDE4C:\n"
 455 "    CMP     R4, #6 \n"
 456 "    CMPNE   R4, #2 \n"
 457 "    BNE     loc_FFCFDE94 \n"
 458 "    LDR     R12, [SP, #4] \n"
 459 "    MOV     R0, R5 \n"
 460 "    MOV     R1, R8 \n"
 461 "    MOV     R2, R4 \n"
 462 "    LDR     R3, [R12, #0x8C] \n"
 463 "    MOV     LR, PC \n"
 464 "    LDR     PC, [R12, #0x88] \n"
 465 "    MOV     R1, R6 \n"
 466 "    LDR     R0, [SP, #4] \n"
 467 "    MOV     R2, R5 \n"
 468 "    BL      sub_FFCFD82C \n"
 469 
 470 "loc_FFCFDE84:\n"
 471 "    MOV     R1, R4 \n"
 472 "    LDR     R0, [SP, #4] \n"
 473 "    BL      sub_FFCFDB54 \n"
 474 "    B       loc_FFCFE148 \n"
 475 
 476 "loc_FFCFDE94:\n"
 477 "    LDR     R12, [SP, #4] \n"
 478 "    MOV     R2, R4 \n"
 479 "    ADD     R0, R12, #4 \n"
 480 "    LDR     R1, [R12, #0x7C] \n"
 481 "    LDR     R3, [R12, #0x8C] \n"
 482 "    MOV     LR, PC \n"
 483 "    LDR     PC, [R12, #0x88] \n"
 484 "    B       loc_FFCFE148 \n"
 485 
 486 "loc_FFCFDEB4:\n"
 487 "    SUB     R3, R2, #0x19 \n"
 488 "    CMP     R3, #1 \n"
 489 "    BHI     loc_FFCFDF0C \n"
 490 "    LDR     R1, [R12, #0x7C] \n"
 491 "    ADD     R1, R1, R1, LSL#1 \n"
 492 "    ADD     R1, R12, R1, LSL#2 \n"
 493 "    ADD     R6, SP, #0x14 \n"
 494 "    SUB     R1, R1, #8 \n"
 495 "    MOV     R2, #0xC \n"
 496 "    MOV     R0, R6 \n"
 497 "    BL      _memcpy \n"
 498 "    LDR     R0, [SP, #4] \n"
 499 "    BL      sub_FFCFB640 \n"
 500 "    LDR     R3, [SP, #4] \n"
 501 "    ADD     R0, R3, #4 \n"
 502 "    LDR     R1, [R3, #0x7C] \n"
 503 "    LDR     R2, [R3, #0x8C] \n"
 504 "    MOV     LR, PC \n"
 505 "    LDR     PC, [R3, #0x88] \n"
 506 "    LDR     R0, [SP, #4] \n"
 507 "    BL      sub_FFCFBA1C \n"
 508 "    B       loc_FFCFE148 \n"
 509 
 510 "loc_FFCFDF0C:\n"
 511 "    ADD     R6, SP, #0x14 \n"
 512 "    ADD     R1, R12, #4 \n"
 513 "    MOV     R2, #0xC \n"
 514 "    MOV     R0, R6 \n"
 515 "    BL      _memcpy \n"
 516 "    LDR     R12, [SP, #4] \n"
 517 "    LDR     R3, [R12] \n"
 518 "    MOV     R2, R12 \n"
 519 "    CMP     R3, #0x1C \n"
 520 "    LDRLS   PC, [PC, R3, LSL#2] \n"
 521 "    B       loc_FFCFE134 \n"
 522 "    .long   loc_FFCFDFAC \n"
 523 "    .long   loc_FFCFDFB8 \n"
 524 "    .long   loc_FFCFDFC4 \n"
 525 "    .long   loc_FFCFDFC4 \n"
 526 "    .long   loc_FFCFDFAC \n"
 527 "    .long   loc_FFCFDFB8 \n"
 528 "    .long   loc_FFCFDFC4 \n"
 529 "    .long   loc_FFCFDFC4 \n"
 530 "    .long   loc_FFCFDFE8 \n"
 531 "    .long   loc_FFCFDFE8 \n"
 532 "    .long   loc_FFCFE108 \n"
 533 "    .long   loc_FFCFE114 \n"
 534 "    .long   loc_FFCFE124 \n"
 535 "    .long   loc_FFCFE134 \n"
 536 "    .long   loc_FFCFE134 \n"
 537 "    .long   loc_FFCFE134 \n"
 538 "    .long   loc_FFCFDFD0 \n"
 539 "    .long   loc_FFCFDFDC \n"
 540 "    .long   loc_FFCFDFF8 \n"
 541 "    .long   loc_FFCFE004 \n"
 542 "    .long   loc_FFCFE03C \n"
 543 "    .long   loc_FFCFE074 \n"
 544 "    .long   loc_FFCFE0AC \n"
 545 "    .long   loc_FFCFE0E4 \n"
 546 "    .long   loc_FFCFE0E4 \n"
 547 "    .long   loc_FFCFE134 \n"
 548 "    .long   loc_FFCFE134 \n"
 549 "    .long   loc_FFCFE0F0 \n"
 550 "    .long   loc_FFCFE0FC \n"
 551 
 552 "loc_FFCFDFAC:\n"
 553 "    MOV     R0, R2 \n"
 554 "    BL      sub_FFCFA01C \n"
 555 "    B       loc_FFCFE130 \n"
 556 
 557 "loc_FFCFDFB8:\n"
 558 "    MOV     R0, R2 \n"
 559 "    BL      sub_FFCFA2C0 \n"
 560 "    B       loc_FFCFE130 \n"
 561 
 562 "loc_FFCFDFC4:\n"
 563 "    MOV     R0, R2 \n"
 564 "    BL      sub_FFCFA534 \n"
 565 "    B       loc_FFCFE130 \n"
 566 
 567 "loc_FFCFDFD0:\n"
 568 "    MOV     R0, R2 \n"
 569 "    BL      sub_FFCFA830 \n"
 570 "    B       loc_FFCFE130 \n"
 571 
 572 "loc_FFCFDFDC:\n"
 573 "    MOV     R0, R2 \n"
 574 "    BL      sub_FFCFAA94 \n"
 575 "    B       loc_FFCFE130 \n"
 576 
 577 "loc_FFCFDFE8:\n"
 578 "    MOV     R0, R2 \n"
 579 "    BL      sub_FFCFAC90_my \n"  // --> Patched. Old value = 0xFFCFAC90.
 580 "    MOV     R8, #0 \n"
 581 "    B       loc_FFCFE130 \n"
 582 
 583 "loc_FFCFDFF8:\n"
 584 "    MOV     R0, R2 \n"
 585 "    BL      sub_FFCFADEC \n"
 586 "    B       loc_FFCFE130 \n"
 587 
 588 "loc_FFCFE004:\n"
 589 "    LDRH    R1, [R2, #4] \n"
 590 "    LDR     R3, =0x42A10 \n"
 591 "    STRH    R1, [SP, #0x14] \n"
 592 "    LDRH    R1, [R3, #6] \n"
 593 "    STRH    R1, [SP, #0x1A] \n"
 594 "    LDRH    R1, [R3, #2] \n"
 595 "    STRH    R1, [SP, #0x16] \n"
 596 "    LDRH    R3, [R3, #4] \n"
 597 "    STRH    R3, [SP, #0x18] \n"
 598 "    MOV     R0, R2 \n"
 599 "    LDRH    R2, [R2, #0xC] \n"
 600 "    STRH    R2, [SP, #0x1C] \n"
 601 "    BL      sub_FFCFB0E8 \n"
 602 "    B       loc_FFCFE130 \n"
 603 
 604 "loc_FFCFE03C:\n"
 605 "    MOV     R0, R2 \n"
 606 "    LDRH    R2, [R2, #4] \n"
 607 "    LDR     R3, =0x42A10 \n"
 608 "    STRH    R2, [SP, #0x14] \n"
 609 "    LDRH    R2, [R3, #8] \n"
 610 "    STRH    R2, [SP, #0x1C] \n"
 611 "    LDRH    R1, [R3, #2] \n"
 612 "    STRH    R1, [SP, #0x16] \n"
 613 "    LDRH    R2, [R3, #4] \n"
 614 "    STRH    R2, [SP, #0x18] \n"
 615 "    LDRH    R3, [R3, #6] \n"
 616 "    STRH    R3, [SP, #0x1A] \n"
 617 "    BL      sub_FFCFB210 \n"
 618 "    B       loc_FFCFE130 \n"
 619 
 620 "loc_FFCFE074:\n"
 621 "    LDR     R3, =0x42A10 \n"
 622 "    LDRH    R1, [R3] \n"
 623 "    STRH    R1, [SP, #0x14] \n"
 624 "    MOV     R0, R2 \n"
 625 "    LDRH    R2, [R2, #6] \n"
 626 "    STRH    R2, [SP, #0x16] \n"
 627 "    LDRH    R2, [R3, #8] \n"
 628 "    STRH    R2, [SP, #0x1C] \n"
 629 "    LDRH    R1, [R3, #4] \n"
 630 "    STRH    R1, [SP, #0x18] \n"
 631 "    LDRH    R3, [R3, #6] \n"
 632 "    STRH    R3, [SP, #0x1A] \n"
 633 "    BL      sub_FFCFB2D4 \n"
 634 "    B       loc_FFCFE130 \n"
 635 
 636 "loc_FFCFE0AC:\n"
 637 "    LDR     R3, =0x42A10 \n"
 638 "    LDRH    R1, [R3, #6] \n"
 639 "    STRH    R1, [SP, #0x1A] \n"
 640 "    LDRH    R1, [R3] \n"
 641 "    STRH    R1, [SP, #0x14] \n"
 642 "    LDRH    R1, [R3, #2] \n"
 643 "    STRH    R1, [SP, #0x16] \n"
 644 "    LDRH    R3, [R3, #4] \n"
 645 "    STRH    R3, [SP, #0x18] \n"
 646 "    MOV     R0, R2 \n"
 647 "    LDRH    R2, [R2, #0xC] \n"
 648 "    STRH    R2, [SP, #0x1C] \n"
 649 "    BL      sub_FFCFB38C \n"
 650 "    B       loc_FFCFE130 \n"
 651 
 652 "loc_FFCFE0E4:\n"
 653 "    MOV     R0, R2 \n"
 654 "    BL      sub_FFCFB43C \n"
 655 "    B       loc_FFCFE130 \n"
 656 
 657 "loc_FFCFE0F0:\n"
 658 "    MOV     R0, R2 \n"
 659 "    BL      sub_FFCFBB6C \n"
 660 "    B       loc_FFCFE130 \n"
 661 
 662 "loc_FFCFE0FC:\n"
 663 "    MOV     R0, R2 \n"
 664 "    BL      sub_FFCFBD68 \n"
 665 "    B       loc_FFCFE130 \n"
 666 
 667 "loc_FFCFE108:\n"
 668 "    MOV     R0, R2 \n"
 669 "    BL      sub_FFCFBF24 \n"
 670 "    B       loc_FFCFE130 \n"
 671 
 672 "loc_FFCFE114:\n"
 673 "    MOV     R0, R2 \n"
 674 "    MOV     R1, #0 \n"
 675 "    BL      sub_FFCFC108 \n"
 676 "    B       loc_FFCFE130 \n"
 677 
 678 "loc_FFCFE124:\n"
 679 "    MOV     R0, R2 \n"
 680 "    MOV     R1, #1 \n"
 681 "    BL      sub_FFCFC108 \n"
 682 
 683 "loc_FFCFE130:\n"
 684 "    LDR     R12, [SP, #4] \n"
 685 
 686 "loc_FFCFE134:\n"
 687 "    ADD     R0, R12, #4 \n"
 688 "    LDR     R1, [R12, #0x7C] \n"
 689 "    LDR     R2, [R12, #0x8C] \n"
 690 "    MOV     LR, PC \n"
 691 "    LDR     PC, [R12, #0x88] \n"
 692 
 693 "loc_FFCFE148:\n"
 694 "    CMP     R8, #1 \n"
 695 "    BNE     loc_FFCFE170 \n"
 696 "    LDR     R1, [SP, #4] \n"
 697 "    LDR     R3, [R1, #0x7C] \n"
 698 "    ADD     R3, R3, R3, LSL#1 \n"
 699 "    ADD     R1, R1, R3, LSL#2 \n"
 700 "    MOV     R0, R6 \n"
 701 "    SUB     R1, R1, #8 \n"
 702 "    BL      sub_FFCF9D80 \n"
 703 "    B       loc_FFCFE1A4 \n"
 704 
 705 "loc_FFCFE170:\n"
 706 "    MOV     R4, #1 \n"
 707 "    MOV     R0, R4 \n"
 708 "    MOV     R1, R4 \n"
 709 "    MOV     R2, R4 \n"
 710 "    MOV     R3, R4 \n"
 711 "    STR     R4, [SP] \n"
 712 "    BL      sub_FFCF9CD4 \n"
 713 "    MOV     R0, R4 \n"
 714 "    MOV     R1, R0 \n"
 715 "    MOV     R2, R0 \n"
 716 "    MOV     R3, R0 \n"
 717 "    STR     R4, [SP] \n"
 718 "    BL      sub_FFCF9E58 \n"
 719 
 720 "loc_FFCFE1A4:\n"
 721 "    LDR     R0, [SP, #4] \n"
 722 "    BL      sub_FFCF976C \n"
 723 
 724 "loc_FFCFE1AC:\n"
 725 "    LDR     R3, =0x42A08 \n"
 726 "    MOV     R2, #0 \n"
 727 "    LDR     R0, [R3] \n"
 728 "    MOV     R1, R7 \n"
 729 "    BL      sub_FFC10FB8 /*_ReceiveMessageQueue*/ \n"
 730 "    LDR     R12, [SP, #4] \n"
 731 "    LDR     R2, [R12] \n"
 732 "    CMP     R2, #0x23 \n"
 733 "    BNE     loc_FFCFDD00 \n"
 734 "    MOV     R0, R12 \n"
 735 "    BL      sub_FFCF976C \n"
 736 "    LDR     R3, =0x42A04 \n"
 737 "    MOV     R1, #1 \n"
 738 "    LDR     R0, [R3] \n"
 739 "    BL      sub_FFC108A0 /*_SetEventFlag*/ \n"
 740 "    BL      _ExitTask \n"
 741 "    ADD     SP, SP, #0x20 \n"
 742 "    LDMFD   SP!, {R4-R8,PC} \n"
 743 );
 744 }
 745 
 746 /*************************************************************/
 747 //** sub_FFCFAC90_my @ 0xFFCFAC90 - 0xFFCFADD4, length=82
 748 void __attribute__((naked,noinline)) sub_FFCFAC90_my() {
 749 asm volatile (
 750 "    STMFD   SP!, {R4-R6,LR} \n"
 751 "    LDR     R3, =0x42A04 \n"
 752 "    MOV     R4, R0 \n"
 753 "    MOV     R1, #0x3E \n"
 754 "    LDR     R0, [R3] \n"
 755 "    BL      sub_FFC10A3C /*_ClearEventFlag*/ \n"
 756 "    MOV     R1, #0 \n"
 757 "    LDRSH   R0, [R4, #4] \n"
 758 "    BL      sub_FFCF98A0 \n"
 759 "    MOV     R6, R0 \n"
 760 "    LDRSH   R0, [R4, #6] \n"
 761 "    BL      sub_FFCF9A14 \n"
 762 "    LDRSH   R0, [R4, #8] \n"
 763 "    BL      sub_FFCF9AB0 \n"
 764 "    LDRSH   R0, [R4, #0xA] \n"
 765 "    BL      sub_FFCF9B4C \n"
 766 "    LDRSH   R0, [R4, #0xC] \n"
 767 "    BL      sub_FFCF9BE8 \n"
 768 "    LDR     R3, [R4] \n"
 769 "    CMP     R3, #9 \n"
 770 "    MOV     R5, R0 \n"
 771 "    MOVEQ   R5, #0 \n"
 772 "    MOVEQ   R6, R5 \n"
 773 "    CMP     R6, #1 \n"
 774 "    BNE     loc_FFCFAD14 \n"
 775 "    MOV     R2, #2 \n"
 776 "    LDRSH   R0, [R4, #4] \n"
 777 "    LDR     R1, =0xFFCF97C0 \n"
 778 "    BL      sub_FFE9B3E0 \n"
 779 "    LDR     R2, =0x42A44 \n"
 780 "    MOV     R3, #0 \n"
 781 "    STR     R3, [R2] \n"
 782 "    B       loc_FFCFAD18 \n"
 783 
 784 "loc_FFCFAD14:\n"
 785 "    BL      sub_FFCF9C84 \n"
 786 
 787 "loc_FFCFAD18:\n"
 788 "    STRH    R0, [R4, #4] \n"
 789 "    CMP     R5, #1 \n"
 790 "    BNE     loc_FFCFAD38 \n"
 791 "    LDRSH   R0, [R4, #0xC] \n"
 792 "    LDR     R1, =0xFFCF9884 \n"
 793 "    MOV     R2, #0x20 \n"
 794 "    BL      sub_FFCF9FBC \n"
 795 "    B       loc_FFCFAD3C \n"
 796 
 797 "loc_FFCFAD38:\n"
 798 "    BL      sub_FFCF9CC4 \n"
 799 
 800 "loc_FFCFAD3C:\n"
 801 "    STRH    R0, [R4, #0xC] \n"
 802 "    LDRSH   R0, [R4, #6] \n"
 803 "    BL      sub_FFCA4270_my \n"  // --> Patched. Old value = 0xFFCA4270.
 804 "    LDRSH   R0, [R4, #8] \n"
 805 "    MOV     R1, #1 \n"
 806 "    BL      sub_FFCA64D4 \n"
 807 "    ADD     R0, R4, #8 \n"
 808 "    MOV     R1, #0 \n"
 809 "    BL      sub_FFCA6594 \n"
 810 "    LDRSH   R0, [R4, #0xE] \n"
 811 "    BL      sub_FFCE7768 \n"
 812 "    CMP     R6, #1 \n"
 813 "    BNE     loc_FFCFADA0 \n"
 814 "    LDR     R3, =0x42A04 \n"
 815 "    MOV     R2, #0xBB0 \n"
 816 "    LDR     R0, [R3] \n"
 817 "    MOV     R1, #2 \n"
 818 "    ADD     R2, R2, #8 \n"
 819 "    BL      sub_FFC10890 /*_WaitForAllEventFlag*/ \n"
 820 "    TST     R0, #1 \n"
 821 "    BEQ     loc_FFCFADA0 \n"
 822 "    MOV     R1, #0x440 \n"
 823 "    LDR     R0, =0xFFCF9718 /*'ExpDrv.c'*/ \n"
 824 "    ADD     R1, R1, #0xB \n"
 825 "    BL      _DebugAssert \n"
 826 
 827 "loc_FFCFADA0:\n"
 828 "    CMP     R5, #1 \n"
 829 "    LDMNEFD SP!, {R4-R6,PC} \n"
 830 "    LDR     R3, =0x42A04 \n"
 831 "    MOV     R2, #0xBB0 \n"
 832 "    LDR     R0, [R3] \n"
 833 "    MOV     R1, #0x20 \n"
 834 "    ADD     R2, R2, #8 \n"
 835 "    BL      sub_FFC10890 /*_WaitForAllEventFlag*/ \n"
 836 "    TST     R0, #1 \n"
 837 "    LDMEQFD SP!, {R4-R6,PC} \n"
 838 "    LDR     R0, =0xFFCF9718 /*'ExpDrv.c'*/ \n"
 839 "    MOV     R1, #0x450 \n"
 840 "    LDMFD   SP!, {R4-R6,LR} \n"
 841 "    B       _DebugAssert \n"
 842 );
 843 }
 844 
 845 /*************************************************************/
 846 //** sub_FFCA4270_my @ 0xFFCA4270 - 0xFFCA42CC, length=24
 847 void __attribute__((naked,noinline)) sub_FFCA4270_my() {
 848 asm volatile (
 849 "    STMFD   SP!, {R4,LR} \n"
 850 "    LDR     R3, =0x5328 \n"
 851 "    LDR     R2, [R3] \n"
 852 "    MOV     R1, #0x150 \n"
 853 "    MOV     R3, R0, LSL#16 \n"
 854 "    CMP     R2, #1 \n"
 855 "    ADD     R1, R1, #1 \n"
 856 "    LDR     R0, =0xFFCA3AAC /*'Shutter.c'*/ \n"
 857 "    MOV     R4, R3, ASR#16 \n"
 858 "    BEQ     loc_FFCA429C \n"
 859 "    BL      _DebugAssert \n"
 860 
 861 "loc_FFCA429C:\n"
 862 "    MOV     R1, #0x154 \n"
 863 "    CMN     R4, #0xC00 \n"
 864 "    LDR     R3, =0x34356 \n"
 865 "    LDR     R0, =0xFFCA3AAC /*'Shutter.c'*/ \n"
 866 "    ADD     R1, R1, #3 \n"
 867 "    LDREQSH R4, [R3] \n"
 868 "    LDRNE   R3, =0x34356 \n"
 869 "    CMN     R4, #0xC00 \n"
 870 "    STRH    R4, [R3] \n"
 871 "    BNE     loc_FFCA42C8 \n"
 872 "    BL      _DebugAssert \n"
 873 
 874 "loc_FFCA42C8:\n"
 875 "    MOV     R0, R4 \n"
 876 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
 877 "    LDR     PC, =0xFFCA42D0 \n"  // Continue in firmware
 878 );
 879 }

/* [<][>][^][v][top][bottom][index][help] */