root/platform/a490/sub/100e/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FFC5950C_my
  3. sub_FFD10D94_my
  4. exp_drv_task
  5. sub_FFC8EBD4_my
  6. sub_FFC80D30_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 #define USE_STUBS_NRFLAG 1          // see stubs_entry.S
   9 
  10 #include "../../../generic/capt_seq.c"
  11 
  12 /*************************************************************/
  13 //** capt_seq_task @ 0xFFC5919C - 0xFFC59420, length=162
  14 void __attribute__((naked,noinline)) capt_seq_task() {
  15 asm volatile (
  16 "    STMFD   SP!, {R3-R7,LR} \n"
  17 "    LDR     R7, =0x33284 \n"
  18 "    LDR     R6, =0x26C0 \n"
  19 
  20 "loc_FFC591A8:\n"
  21 "    LDR     R0, [R6, #4] \n"
  22 "    MOV     R2, #0 \n"
  23 "    MOV     R1, SP \n"
  24 "    BL      sub_FFC28AA4 /*_ReceiveMessageQueue*/ \n"
  25 "    TST     R0, #1 \n"
  26 "    BEQ     loc_FFC591D4 \n"
  27 "    LDR     R1, =0x5B4 \n"
  28 "    LDR     R0, =0xFFC58DA8 /*'SsShootTask.c'*/ \n"
  29 "    BL      _DebugAssert \n"
  30 "    BL      _ExitTask \n"
  31 "    LDMFD   SP!, {R3-R7,PC} \n"
  32 
  33 "loc_FFC591D4:\n"
  34 "    LDR     R0, [SP] \n"
  35 "    LDR     R1, [R0] \n"
  36 "    CMP     R1, #0x1D \n"
  37 "    ADDLS   PC, PC, R1, LSL#2 \n"
  38 "    B       loc_FFC593E4 \n"
  39 "    B       loc_FFC59260 \n"
  40 "    B       loc_FFC59268 \n"
  41 "    B       loc_FFC59290 \n"
  42 "    B       loc_FFC592A4 \n"
  43 "    B       loc_FFC5929C \n"
  44 "    B       loc_FFC592AC \n"
  45 "    B       loc_FFC592B4 \n"
  46 "    B       loc_FFC592C0 \n"
  47 "    B       loc_FFC59318 \n"
  48 "    B       loc_FFC592A4 \n"
  49 "    B       loc_FFC59320 \n"
  50 "    B       loc_FFC5932C \n"
  51 "    B       loc_FFC59334 \n"
  52 "    B       loc_FFC5933C \n"
  53 "    B       loc_FFC59344 \n"
  54 "    B       loc_FFC5934C \n"
  55 "    B       loc_FFC59354 \n"
  56 "    B       loc_FFC5935C \n"
  57 "    B       loc_FFC59368 \n"
  58 "    B       loc_FFC59370 \n"
  59 "    B       loc_FFC59378 \n"
  60 "    B       loc_FFC59380 \n"
  61 "    B       loc_FFC59388 \n"
  62 "    B       loc_FFC59394 \n"
  63 "    B       loc_FFC5939C \n"
  64 "    B       loc_FFC593A4 \n"
  65 "    B       loc_FFC593AC \n"
  66 "    B       loc_FFC593B4 \n"
  67 "    B       loc_FFC593C0 \n"
  68 "    B       loc_FFC593F0 \n"
  69 
  70 "loc_FFC59260:\n"
  71 "    BL      sub_FFC59A74 \n"
  72 "    BL      shooting_expo_param_override\n"    // added
  73 "    B       loc_FFC592B8 \n"
  74 
  75 "loc_FFC59268:\n"
  76 "    MOV     R0, #0xC \n"
  77 "    BL      sub_FFC5D758 \n"
  78 "    TST     R0, #1 \n"
  79 "    LDR     R0, [SP] \n"
  80 "    MOVNE   R1, #1 \n"
  81 "    LDRNE   R2, [R0, #0xC] \n"
  82 "    MOVNE   R0, #1 \n"
  83 "    BNE     loc_FFC59310 \n"
  84 "    BL      sub_FFC5950C_my \n"  // --> Patched. Old value = 0xFFC5950C.
  85 "    B       loc_FFC593F0 \n"
  86 
  87 "loc_FFC59290:\n"
  88 "    MOV     R0, #1 \n"
  89 "    BL      sub_FFC59CFC \n"
  90 "    B       loc_FFC593F0 \n"
  91 
  92 "loc_FFC5929C:\n"
  93 "    BL      sub_FFC596E0 \n"
  94 "    B       loc_FFC593F0 \n"
  95 
  96 "loc_FFC592A4:\n"
  97 "    BL      sub_FFC59A54 \n"
  98 "    B       loc_FFC593F0 \n"
  99 
 100 "loc_FFC592AC:\n"
 101 "    BL      sub_FFC59A5C \n"
 102 "    B       loc_FFC593F0 \n"
 103 
 104 "loc_FFC592B4:\n"
 105 "    BL      sub_FFC59C0C \n"
 106 
 107 "loc_FFC592B8:\n"
 108 "    BL      sub_FFC574B4 \n"
 109 "    B       loc_FFC593F0 \n"
 110 
 111 "loc_FFC592C0:\n"
 112 "    LDR     R4, [R0, #0xC] \n"
 113 "    BL      sub_FFC59A64 \n"
 114 "    MOV     R0, R4 \n"
 115 "    BL      sub_FFD0FD5C \n"
 116 "    TST     R0, #1 \n"
 117 "    MOV     R5, R0 \n"
 118 "    BNE     loc_FFC59300 \n"
 119 "    BL      sub_FFC69634 \n"
 120 "    STR     R0, [R4, #0x18] \n"
 121 "    MOV     R0, R4 \n"
 122 "    BL      sub_FFD10CCC \n"
 123 "    MOV     R0, R4 \n"
 124 "    BL      sub_FFD1106C \n"
 125 "    MOV     R5, R0 \n"
 126 "    LDR     R0, [R4, #0x18] \n"
 127 "    BL      sub_FFC6986C \n"
 128 
 129 "loc_FFC59300:\n"
 130 "    BL      sub_FFC59A54 \n"
 131 "    MOV     R2, R4 \n"
 132 "    MOV     R1, #9 \n"
 133 "    MOV     R0, R5 \n"
 134 
 135 "loc_FFC59310:\n"
 136 "    BL      sub_FFC578AC \n"
 137 "    B       loc_FFC593F0 \n"
 138 
 139 "loc_FFC59318:\n"
 140 "    BL      sub_FFC59C74 \n"
 141 "    B       loc_FFC592B8 \n"
 142 
 143 "loc_FFC59320:\n"
 144 "    LDR     R0, [R7, #0x4C] \n"
 145 "    BL      sub_FFC5A01C \n"
 146 "    B       loc_FFC593F0 \n"
 147 
 148 "loc_FFC5932C:\n"
 149 "    BL      sub_FFC5A2CC \n"
 150 "    B       loc_FFC593F0 \n"
 151 
 152 "loc_FFC59334:\n"
 153 "    BL      sub_FFC5A360 \n"
 154 "    B       loc_FFC593F0 \n"
 155 
 156 "loc_FFC5933C:\n"
 157 "    BL      sub_FFD0FF88 \n"
 158 "    B       loc_FFC593F0 \n"
 159 
 160 "loc_FFC59344:\n"
 161 "    BL      sub_FFD10180 \n"
 162 "    B       loc_FFC593F0 \n"
 163 
 164 "loc_FFC5934C:\n"
 165 "    BL      sub_FFD10214 \n"
 166 "    B       loc_FFC593F0 \n"
 167 
 168 "loc_FFC59354:\n"
 169 "    BL      sub_FFD102D4 \n"
 170 "    B       loc_FFC593F0 \n"
 171 
 172 "loc_FFC5935C:\n"
 173 "    MOV     R0, #0 \n"
 174 "    BL      sub_FFD104CC \n"
 175 "    B       loc_FFC593F0 \n"
 176 
 177 "loc_FFC59368:\n"
 178 "    BL      sub_FFD1061C \n"
 179 "    B       loc_FFC593F0 \n"
 180 
 181 "loc_FFC59370:\n"
 182 "    BL      sub_FFD106AC \n"
 183 "    B       loc_FFC593F0 \n"
 184 
 185 "loc_FFC59378:\n"
 186 "    BL      sub_FFD1076C \n"
 187 "    B       loc_FFC593F0 \n"
 188 
 189 "loc_FFC59380:\n"
 190 "    BL      sub_FFC59E58 \n"
 191 "    B       loc_FFC593F0 \n"
 192 
 193 "loc_FFC59388:\n"
 194 "    BL      sub_FFC59E94 \n"
 195 "    BL      sub_FFC26C7C \n"
 196 "    B       loc_FFC593F0 \n"
 197 
 198 "loc_FFC59394:\n"
 199 "    BL      sub_FFD103A0 \n"
 200 "    B       loc_FFC593F0 \n"
 201 
 202 "loc_FFC5939C:\n"
 203 "    BL      sub_FFD103E4 \n"
 204 "    B       loc_FFC593F0 \n"
 205 
 206 "loc_FFC593A4:\n"
 207 "    BL      sub_FFC5BF9C \n"
 208 "    B       loc_FFC593F0 \n"
 209 
 210 "loc_FFC593AC:\n"
 211 "    BL      sub_FFC5C01C \n"
 212 "    B       loc_FFC593F0 \n"
 213 
 214 "loc_FFC593B4:\n"
 215 "    BL      sub_FFC5C078 \n"
 216 "    BL      sub_FFC5C038 \n"
 217 "    B       loc_FFC593F0 \n"
 218 
 219 "loc_FFC593C0:\n"
 220 "    LDRH    R0, [R7, #0x8C] \n"
 221 "    CMP     R0, #4 \n"
 222 "    LDRNEH  R0, [R7] \n"
 223 "    SUBNE   R12, R0, #0x8200 \n"
 224 "    SUBNES  R12, R12, #0x2A \n"
 225 "    BNE     loc_FFC593F0 \n"
 226 "    BL      sub_FFC5C01C \n"
 227 "    BL      sub_FFC5C3BC \n"
 228 "    B       loc_FFC593F0 \n"
 229 
 230 "loc_FFC593E4:\n"
 231 "    LDR     R1, =0x70B \n"
 232 "    LDR     R0, =0xFFC58DA8 /*'SsShootTask.c'*/ \n"
 233 "    BL      _DebugAssert \n"
 234 
 235 "loc_FFC593F0:\n"
 236 "    LDR     R0, [SP] \n"
 237 "    LDR     R1, [R0, #4] \n"
 238 "    LDR     R0, [R6] \n"
 239 "    BL      sub_FFC28814 /*_SetEventFlag*/ \n"
 240 "    LDR     R4, [SP] \n"
 241 "    LDR     R0, [R4, #8] \n"
 242 "    CMP     R0, #0 \n"
 243 "    LDREQ   R1, =0x132 \n"
 244 "    LDREQ   R0, =0xFFC58DA8 /*'SsShootTask.c'*/ \n"
 245 "    BLEQ    _DebugAssert \n"
 246 "    MOV     R0, #0 \n"
 247 "    STR     R0, [R4, #8] \n"
 248 "    B       loc_FFC591A8 \n"
 249 );
 250 }
 251 
 252 /*************************************************************/
 253 //** sub_FFC5950C_my @ 0xFFC5950C - 0xFFC595E4, length=55
 254 void __attribute__((naked,noinline)) sub_FFC5950C_my() {
 255 asm volatile (
 256 "    STMFD   SP!, {R3-R5,LR} \n"
 257 "    LDR     R4, [R0, #0xC] \n"
 258 "    LDR     R0, [R4, #8] \n"
 259 "    ORR     R0, R0, #1 \n"
 260 "    STR     R0, [R4, #8] \n"
 261 "    BL      sub_FFC59A64 \n"
 262 "    MOV     R0, R4 \n"
 263 "    BL      sub_FFC59E0C \n"
 264 "    MOV     R0, R4 \n"
 265 "    BL      sub_FFD0F9C8 \n"
 266 "    CMP     R0, #0 \n"
 267 "    MOV     R0, R4 \n"
 268 "    BEQ     loc_FFC5955C \n"
 269 "    BL      sub_FFD0FA54 \n"
 270 "    TST     R0, #1 \n"
 271 "    MOVNE   R2, R4 \n"
 272 "    LDMNEFD SP!, {R3-R5,LR} \n"
 273 "    MOVNE   R1, #1 \n"
 274 "    BNE     sub_FFC578AC \n"
 275 "    B       loc_FFC59560 \n"
 276 
 277 "loc_FFC5955C:\n"
 278 "    BL      sub_FFD0FA18 \n"
 279 
 280 "loc_FFC59560:\n"
 281 "    MOV     R0, #0 \n"
 282 "    STR     R0, [SP] \n"
 283 "    LDR     R0, =0x33284 \n"
 284 "    MOV     R2, #2 \n"
 285 "    LDRH    R0, [R0, #0x8A] \n"
 286 "    MOV     R1, SP \n"
 287 "    CMP     R0, #3 \n"
 288 "    LDRNE   R0, [R4, #0xC] \n"
 289 "    CMPNE   R0, #1 \n"
 290 "    MOVHI   R0, #1 \n"
 291 "    STRHI   R0, [SP] \n"
 292 "    LDR     R0, =0x127 \n"
 293 "    BL      _SetPropertyCase \n"
 294 "    BL      sub_FFC69634 \n"
 295 "    STR     R0, [R4, #0x18] \n"
 296 "    MOV     R0, R4 \n"
 297 "    BL      sub_FFD10CCC \n"
 298 "    BL      sub_FFD116EC \n"
 299 "    MOV     R0, R4 \n"
 300 "    BL      sub_FFD10D94_my \n"  // --> Patched. Old value = 0xFFD10D94.
 301 "    MOV     R5, R0 \n"
 302 "    BL      capt_seq_hook_raw_here\n"               // added
 303 "    BL      sub_FFC5C01C \n"
 304 "    BL      sub_FFC5C064 \n"
 305 "    BL      sub_FFC5C0A4 \n"
 306 "    MOV     R2, R4 \n"
 307 "    MOV     R1, #1 \n"
 308 "    MOV     R0, R5 \n"
 309 "    BL      sub_FFC578AC \n"
 310 "    BL      sub_FFD11020 \n"
 311 "    CMP     R0, #0 \n"
 312 "    LDRNE   R0, [R4, #8] \n"
 313 "    ORRNE   R0, R0, #0x2000 \n"
 314 "    STRNE   R0, [R4, #8] \n"
 315 "    LDMFD   SP!, {R3-R5,PC} \n"
 316 );
 317 }
 318 
 319 /*************************************************************/
 320 //** sub_FFD10D94_my @ 0xFFD10D94 - 0xFFD10E44, length=45
 321 void __attribute__((naked,noinline)) sub_FFD10D94_my() {
 322 asm volatile (
 323 "    STMFD   SP!, {R0-R8,LR} \n"
 324 "    MOV     R4, R0 \n"
 325 "    BL      sub_FFD11880 \n"
 326 "    MVN     R1, #0 \n"
 327 "    BL      sub_FFC28848 /*_ClearEventFlag*/ \n"
 328 "    LDR     R5, =0x57F8 \n"
 329 "    LDR     R0, [R5, #0xC] \n"
 330 "    CMP     R0, #0 \n"
 331 "    BNE     loc_FFD10DE4 \n"
 332 "    MOV     R1, #1 \n"
 333 "    MOV     R0, #0 \n"
 334 "    BL      sub_FFC0F4B4 /*_CreateMessageQueueStrictly*/ \n"
 335 "    STR     R0, [R5, #0xC] \n"
 336 "    MOV     R3, #0 \n"
 337 "    STR     R3, [SP] \n"
 338 "    LDR     R3, =0xFFD1085C \n"
 339 "    LDR     R0, =0xFFD10FF8 /*'ShutterSoundTask'*/ \n"
 340 "    MOV     R2, #0x400 \n"
 341 "    MOV     R1, #0x17 \n"
 342 "    BL      sub_FFC0F480 /*_CreateTaskStrictly*/ \n"
 343 
 344 "loc_FFD10DE4:\n"
 345 "    MOV     R2, #4 \n"
 346 "    ADD     R1, SP, #8 \n"
 347 "    MOV     R0, #0x8A \n"
 348 "    BL      _GetPropertyCase \n"
 349 "    TST     R0, #1 \n"
 350 "    MOVNE   R1, #0x3B4 \n"
 351 "    LDRNE   R0, =0xFFD10A88 /*'SsCaptureSeq.c'*/ \n"
 352 "    BLNE    _DebugAssert \n"
 353 "    LDR     R6, =0x33340 \n"
 354 "    LDR     R7, =0x33284 \n"
 355 "    LDR     R3, [R6] \n"
 356 "    LDRSH   R2, [R6, #0xC] \n"
 357 "    LDRSH   R1, [R6, #0xE] \n"
 358 "    LDR     R0, [R7, #0x80] \n"
 359 //"  BL      _sub_FFCE58BC \n"  // --> Nullsub call removed.
 360 "    BL      _GetCCDTemperature \n"
 361 "    LDR     R3, =0x5800 \n"
 362 "    STRH    R0, [R4, #0xA4] \n"
 363 "    SUB     R2, R3, #4 \n"
 364 "    STRD    R2, [SP] \n"
 365 "    MOV     R1, R0 \n"
 366 "    LDRH    R0, [R7, #0x54] \n"
 367 "    LDRSH   R2, [R6, #0xC] \n"
 368 "    SUB     R3, R3, #8 \n"
 369 "    BL      sub_FFD11EEC \n"
 370 "    BL      wait_until_remote_button_is_released\n" // added
 371 "    BL      capt_seq_hook_set_nr\n"                 // added
 372 "    LDR     PC, =0xFFD10E48 \n"  // Continue in firmware
 373 );
 374 }
 375 
 376 /*************************************************************/
 377 //** exp_drv_task @ 0xFFC91388 - 0xFFC91988, length=385
 378 void __attribute__((naked,noinline)) exp_drv_task() {
 379 asm volatile (
 380 "    STMFD   SP!, {R4-R8,LR} \n"
 381 "    SUB     SP, SP, #0x20 \n"
 382 "    LDR     R8, =0xBB8 \n"
 383 "    LDR     R7, =0x38B4 \n"
 384 "    LDR     R5, =0x3C674 \n"
 385 "    MOV     R0, #0 \n"
 386 "    ADD     R6, SP, #0x10 \n"
 387 "    STR     R0, [SP, #0xC] \n"
 388 
 389 "loc_FFC913A8:\n"
 390 "    LDR     R0, [R7, #0x20] \n"
 391 "    MOV     R2, #0 \n"
 392 "    ADD     R1, SP, #0x1C \n"
 393 "    BL      sub_FFC28AA4 /*_ReceiveMessageQueue*/ \n"
 394 "    LDR     R0, [SP, #0xC] \n"
 395 "    CMP     R0, #1 \n"
 396 "    BNE     loc_FFC913F4 \n"
 397 "    LDR     R0, [SP, #0x1C] \n"
 398 "    LDR     R0, [R0] \n"
 399 "    CMP     R0, #0x13 \n"
 400 "    CMPNE   R0, #0x14 \n"
 401 "    CMPNE   R0, #0x15 \n"
 402 "    CMPNE   R0, #0x16 \n"
 403 "    BEQ     loc_FFC91558 \n"
 404 "    CMP     R0, #0x28 \n"
 405 "    BEQ     loc_FFC914E0 \n"
 406 "    ADD     R1, SP, #0xC \n"
 407 "    MOV     R0, #0 \n"
 408 "    BL      sub_FFC91338 \n"
 409 
 410 "loc_FFC913F4:\n"
 411 "    LDR     R0, [SP, #0x1C] \n"
 412 "    LDR     R1, [R0] \n"
 413 "    CMP     R1, #0x2E \n"
 414 "    BNE     loc_FFC91424 \n"
 415 "    LDR     R0, [SP, #0x1C] \n"
 416 "    BL      sub_FFC92690 \n"
 417 "    LDR     R0, [R7, #0x1C] \n"
 418 "    MOV     R1, #1 \n"
 419 "    BL      sub_FFC28814 /*_SetEventFlag*/ \n"
 420 "    BL      _ExitTask \n"
 421 "    ADD     SP, SP, #0x20 \n"
 422 "    LDMFD   SP!, {R4-R8,PC} \n"
 423 
 424 "loc_FFC91424:\n"
 425 "    CMP     R1, #0x2D \n"
 426 "    BNE     loc_FFC91440 \n"
 427 "    LDR     R2, [R0, #0x8C]! \n"
 428 "    LDR     R1, [R0, #4] \n"
 429 "    MOV     R0, R1 \n"
 430 "    BLX     R2 \n"
 431 "    B       loc_FFC91980 \n"
 432 
 433 "loc_FFC91440:\n"
 434 "    CMP     R1, #0x26 \n"
 435 "    BNE     loc_FFC91490 \n"
 436 "    LDR     R0, [R7, #0x1C] \n"
 437 "    MOV     R1, #0x80 \n"
 438 "    BL      sub_FFC28848 /*_ClearEventFlag*/ \n"
 439 "    LDR     R0, =0xFFC8DB04 \n"
 440 "    MOV     R1, #0x80 \n"
 441 "    BL      sub_FFD084B4 \n"
 442 "    LDR     R0, [R7, #0x1C] \n"
 443 "    MOV     R2, R8 \n"
 444 "    MOV     R1, #0x80 \n"
 445 "    BL      sub_FFC28754 /*_WaitForAllEventFlag*/ \n"
 446 "    TST     R0, #1 \n"
 447 "    LDRNE   R1, =0xE5F \n"
 448 "    BNE     loc_FFC9154C \n"
 449 
 450 "loc_FFC9147C:\n"
 451 "    LDR     R1, [SP, #0x1C] \n"
 452 "    LDR     R0, [R1, #0x90] \n"
 453 "    LDR     R1, [R1, #0x8C] \n"
 454 "    BLX     R1 \n"
 455 "    B       loc_FFC91980 \n"
 456 
 457 "loc_FFC91490:\n"
 458 "    CMP     R1, #0x27 \n"
 459 "    BNE     loc_FFC914D8 \n"
 460 "    ADD     R1, SP, #0xC \n"
 461 "    BL      sub_FFC91338 \n"
 462 "    LDR     R0, [R7, #0x1C] \n"
 463 "    MOV     R1, #0x100 \n"
 464 "    BL      sub_FFC28848 /*_ClearEventFlag*/ \n"
 465 "    LDR     R0, =0xFFC8DB14 \n"
 466 "    MOV     R1, #0x100 \n"
 467 "    BL      sub_FFD0873C \n"
 468 "    LDR     R0, [R7, #0x1C] \n"
 469 "    MOV     R2, R8 \n"
 470 "    MOV     R1, #0x100 \n"
 471 "    BL      sub_FFC28754 /*_WaitForAllEventFlag*/ \n"
 472 "    TST     R0, #1 \n"
 473 "    BEQ     loc_FFC9147C \n"
 474 "    LDR     R1, =0xE69 \n"
 475 "    B       loc_FFC9154C \n"
 476 
 477 "loc_FFC914D8:\n"
 478 "    CMP     R1, #0x28 \n"
 479 "    BNE     loc_FFC914F0 \n"
 480 
 481 "loc_FFC914E0:\n"
 482 "    LDR     R0, [SP, #0x1C] \n"
 483 "    ADD     R1, SP, #0xC \n"
 484 "    BL      sub_FFC91338 \n"
 485 "    B       loc_FFC9147C \n"
 486 
 487 "loc_FFC914F0:\n"
 488 "    CMP     R1, #0x2B \n"
 489 "    BNE     loc_FFC91508 \n"
 490 "    BL      sub_FFC80FC0 \n"
 491 "    BL      sub_FFC81BE8 \n"
 492 "    BL      sub_FFC81738 \n"
 493 "    B       loc_FFC9147C \n"
 494 
 495 "loc_FFC91508:\n"
 496 "    CMP     R1, #0x2C \n"
 497 "    BNE     loc_FFC91558 \n"
 498 "    LDR     R0, [R7, #0x1C] \n"
 499 "    MOV     R1, #4 \n"
 500 "    BL      sub_FFC28848 /*_ClearEventFlag*/ \n"
 501 "    LDR     R1, =0xFFC8DB34 \n"
 502 "    LDR     R0, =0xFFFFF400 \n"
 503 "    MOV     R2, #4 \n"
 504 "    BL      sub_FFC80A3C \n"
 505 "    BL      sub_FFC80CC4 \n"
 506 "    LDR     R0, [R7, #0x1C] \n"
 507 "    MOV     R2, R8 \n"
 508 "    MOV     R1, #4 \n"
 509 "    BL      sub_FFC28670 /*_WaitForAnyEventFlag*/ \n"
 510 "    TST     R0, #1 \n"
 511 "    BEQ     loc_FFC9147C \n"
 512 "    LDR     R1, =0xE91 \n"
 513 
 514 "loc_FFC9154C:\n"
 515 "    LDR     R0, =0xFFC8E174 /*'ExpDrv.c'*/ \n"
 516 "    BL      _DebugAssert \n"
 517 "    B       loc_FFC9147C \n"
 518 
 519 "loc_FFC91558:\n"
 520 "    LDR     R0, [SP, #0x1C] \n"
 521 "    MOV     R4, #1 \n"
 522 "    LDR     R1, [R0] \n"
 523 "    CMP     R1, #0x11 \n"
 524 "    CMPNE   R1, #0x12 \n"
 525 "    BNE     loc_FFC915C8 \n"
 526 "    LDR     R1, [R0, #0x7C] \n"
 527 "    ADD     R1, R1, R1, LSL#1 \n"
 528 "    ADD     R1, R0, R1, LSL#2 \n"
 529 "    SUB     R1, R1, #8 \n"
 530 "    LDMIA   R1, {R2-R4} \n"
 531 "    STMIA   R6, {R2-R4} \n"
 532 "    BL      sub_FFC8FCC4 \n"
 533 "    LDR     R0, [SP, #0x1C] \n"
 534 "    LDR     R1, [R0, #0x7C] \n"
 535 "    LDR     R3, [R0, #0x8C] \n"
 536 "    LDR     R2, [R0, #0x90] \n"
 537 "    ADD     R0, R0, #4 \n"
 538 "    BLX     R3 \n"
 539 "    LDR     R0, [SP, #0x1C] \n"
 540 "    BL      sub_FFC92A58 \n"
 541 "    LDR     R0, [SP, #0x1C] \n"
 542 "    LDR     R1, [R0, #0x7C] \n"
 543 "    LDR     R3, [R0, #0x94] \n"
 544 "    LDR     R2, [R0, #0x98] \n"
 545 "    ADD     R0, R0, #4 \n"
 546 "    BLX     R3 \n"
 547 "    B       loc_FFC918C0 \n"
 548 
 549 "loc_FFC915C8:\n"
 550 "    CMP     R1, #0x13 \n"
 551 "    CMPNE   R1, #0x14 \n"
 552 "    CMPNE   R1, #0x15 \n"
 553 "    CMPNE   R1, #0x16 \n"
 554 "    BNE     loc_FFC91680 \n"
 555 "    ADD     R3, SP, #0xC \n"
 556 "    MOV     R2, SP \n"
 557 "    ADD     R1, SP, #0x10 \n"
 558 "    BL      sub_FFC8FFA0 \n"
 559 "    CMP     R0, #1 \n"
 560 "    MOV     R4, R0 \n"
 561 "    CMPNE   R4, #5 \n"
 562 "    BNE     loc_FFC9161C \n"
 563 "    LDR     R0, [SP, #0x1C] \n"
 564 "    MOV     R2, R4 \n"
 565 "    LDR     R1, [R0, #0x7C]! \n"
 566 "    LDR     R12, [R0, #0x10]! \n"
 567 "    LDR     R3, [R0, #4] \n"
 568 "    MOV     R0, SP \n"
 569 "    BLX     R12 \n"
 570 "    B       loc_FFC91654 \n"
 571 
 572 "loc_FFC9161C:\n"
 573 "    LDR     R0, [SP, #0x1C] \n"
 574 "    CMP     R4, #2 \n"
 575 "    LDR     R3, [R0, #0x90] \n"
 576 "    CMPNE   R4, #6 \n"
 577 "    BNE     loc_FFC91668 \n"
 578 "    LDR     R12, [R0, #0x8C] \n"
 579 "    MOV     R0, SP \n"
 580 "    MOV     R2, R4 \n"
 581 "    MOV     R1, #1 \n"
 582 "    BLX     R12 \n"
 583 "    LDR     R0, [SP, #0x1C] \n"
 584 "    MOV     R2, SP \n"
 585 "    ADD     R1, SP, #0x10 \n"
 586 "    BL      sub_FFC91040 \n"
 587 
 588 "loc_FFC91654:\n"
 589 "    LDR     R0, [SP, #0x1C] \n"
 590 "    LDR     R2, [SP, #0xC] \n"
 591 "    MOV     R1, R4 \n"
 592 "    BL      sub_FFC912D8 \n"
 593 "    B       loc_FFC918C0 \n"
 594 
 595 "loc_FFC91668:\n"
 596 "    LDR     R1, [R0, #0x7C] \n"
 597 "    LDR     R12, [R0, #0x8C] \n"
 598 "    ADD     R0, R0, #4 \n"
 599 "    MOV     R2, R4 \n"
 600 "    BLX     R12 \n"
 601 "    B       loc_FFC918C0 \n"
 602 
 603 "loc_FFC91680:\n"
 604 "    CMP     R1, #0x22 \n"
 605 "    CMPNE   R1, #0x23 \n"
 606 "    BNE     loc_FFC916CC \n"
 607 "    LDR     R1, [R0, #0x7C] \n"
 608 "    ADD     R1, R1, R1, LSL#1 \n"
 609 "    ADD     R1, R0, R1, LSL#2 \n"
 610 "    SUB     R1, R1, #8 \n"
 611 "    LDMIA   R1, {R2-R4} \n"
 612 "    STMIA   R6, {R2-R4} \n"
 613 "    BL      sub_FFC8F214 \n"
 614 "    LDR     R0, [SP, #0x1C] \n"
 615 "    LDR     R1, [R0, #0x7C] \n"
 616 "    LDR     R3, [R0, #0x8C] \n"
 617 "    LDR     R2, [R0, #0x90] \n"
 618 "    ADD     R0, R0, #4 \n"
 619 "    BLX     R3 \n"
 620 "    LDR     R0, [SP, #0x1C] \n"
 621 "    BL      sub_FFC8F508 \n"
 622 "    B       loc_FFC918C0 \n"
 623 
 624 "loc_FFC916CC:\n"
 625 "    ADD     R1, R0, #4 \n"
 626 "    LDMIA   R1, {R2,R3,R12} \n"
 627 "    STMIA   R6, {R2,R3,R12} \n"
 628 "    LDR     R1, [R0] \n"
 629 "    CMP     R1, #0x25 \n"
 630 "    ADDLS   PC, PC, R1, LSL#2 \n"
 631 "    B       loc_FFC918A0 \n"
 632 "    B       loc_FFC91780 \n"
 633 "    B       loc_FFC91780 \n"
 634 "    B       loc_FFC91788 \n"
 635 "    B       loc_FFC91790 \n"
 636 "    B       loc_FFC91790 \n"
 637 "    B       loc_FFC91790 \n"
 638 "    B       loc_FFC91780 \n"
 639 "    B       loc_FFC91788 \n"
 640 "    B       loc_FFC91790 \n"
 641 "    B       loc_FFC91790 \n"
 642 "    B       loc_FFC917A8 \n"
 643 "    B       loc_FFC917A8 \n"
 644 "    B       loc_FFC91894 \n"
 645 "    B       loc_FFC9189C \n"
 646 "    B       loc_FFC9189C \n"
 647 "    B       loc_FFC9189C \n"
 648 "    B       loc_FFC9189C \n"
 649 "    B       loc_FFC918A0 \n"
 650 "    B       loc_FFC918A0 \n"
 651 "    B       loc_FFC918A0 \n"
 652 "    B       loc_FFC918A0 \n"
 653 "    B       loc_FFC918A0 \n"
 654 "    B       loc_FFC918A0 \n"
 655 "    B       loc_FFC91798 \n"
 656 "    B       loc_FFC917A0 \n"
 657 "    B       loc_FFC917A0 \n"
 658 "    B       loc_FFC917B4 \n"
 659 "    B       loc_FFC917B4 \n"
 660 "    B       loc_FFC917BC \n"
 661 "    B       loc_FFC917EC \n"
 662 "    B       loc_FFC9181C \n"
 663 "    B       loc_FFC9184C \n"
 664 "    B       loc_FFC9187C \n"
 665 "    B       loc_FFC9187C \n"
 666 "    B       loc_FFC918A0 \n"
 667 "    B       loc_FFC918A0 \n"
 668 "    B       loc_FFC91884 \n"
 669 "    B       loc_FFC9188C \n"
 670 
 671 "loc_FFC91780:\n"
 672 "    BL      sub_FFC8E01C \n"
 673 "    B       loc_FFC918A0 \n"
 674 
 675 "loc_FFC91788:\n"
 676 "    BL      sub_FFC8E2A0 \n"
 677 "    B       loc_FFC918A0 \n"
 678 
 679 "loc_FFC91790:\n"
 680 "    BL      sub_FFC8E4A8 \n"
 681 "    B       loc_FFC918A0 \n"
 682 
 683 "loc_FFC91798:\n"
 684 "    BL      sub_FFC8E720 \n"
 685 "    B       loc_FFC918A0 \n"
 686 
 687 "loc_FFC917A0:\n"
 688 "    BL      sub_FFC8E918 \n"
 689 "    B       loc_FFC918A0 \n"
 690 
 691 "loc_FFC917A8:\n"
 692 "    BL      sub_FFC8EBD4_my \n"  // --> Patched. Old value = 0xFFC8EBD4.
 693 "    MOV     R4, #0 \n"
 694 "    B       loc_FFC918A0 \n"
 695 
 696 "loc_FFC917B4:\n"
 697 "    BL      sub_FFC8ED14 \n"
 698 "    B       loc_FFC918A0 \n"
 699 
 700 "loc_FFC917BC:\n"
 701 "    LDRH    R1, [R0, #4] \n"
 702 "    STRH    R1, [SP, #0x10] \n"
 703 "    LDRH    R1, [R5, #2] \n"
 704 "    STRH    R1, [SP, #0x12] \n"
 705 "    LDRH    R1, [R5, #4] \n"
 706 "    STRH    R1, [SP, #0x14] \n"
 707 "    LDRH    R1, [R5, #6] \n"
 708 "    STRH    R1, [SP, #0x16] \n"
 709 "    LDRH    R1, [R0, #0xC] \n"
 710 "    STRH    R1, [SP, #0x18] \n"
 711 "    BL      sub_FFC92704 \n"
 712 "    B       loc_FFC918A0 \n"
 713 
 714 "loc_FFC917EC:\n"
 715 "    LDRH    R1, [R0, #4] \n"
 716 "    STRH    R1, [SP, #0x10] \n"
 717 "    LDRH    R1, [R5, #2] \n"
 718 "    STRH    R1, [SP, #0x12] \n"
 719 "    LDRH    R1, [R5, #4] \n"
 720 "    STRH    R1, [SP, #0x14] \n"
 721 "    LDRH    R1, [R5, #6] \n"
 722 "    STRH    R1, [SP, #0x16] \n"
 723 "    LDRH    R1, [R5, #8] \n"
 724 "    STRH    R1, [SP, #0x18] \n"
 725 "    BL      sub_FFC92870 \n"
 726 "    B       loc_FFC918A0 \n"
 727 
 728 "loc_FFC9181C:\n"
 729 "    LDRH    R1, [R5] \n"
 730 "    STRH    R1, [SP, #0x10] \n"
 731 "    LDRH    R1, [R0, #6] \n"
 732 "    STRH    R1, [SP, #0x12] \n"
 733 "    LDRH    R1, [R5, #4] \n"
 734 "    STRH    R1, [SP, #0x14] \n"
 735 "    LDRH    R1, [R5, #6] \n"
 736 "    STRH    R1, [SP, #0x16] \n"
 737 "    LDRH    R1, [R5, #8] \n"
 738 "    STRH    R1, [SP, #0x18] \n"
 739 "    BL      sub_FFC9291C \n"
 740 "    B       loc_FFC918A0 \n"
 741 
 742 "loc_FFC9184C:\n"
 743 "    LDRH    R1, [R5] \n"
 744 "    STRH    R1, [SP, #0x10] \n"
 745 "    LDRH    R1, [R5, #2] \n"
 746 "    STRH    R1, [SP, #0x12] \n"
 747 "    LDRH    R1, [R5, #4] \n"
 748 "    STRH    R1, [SP, #0x14] \n"
 749 "    LDRH    R1, [R5, #6] \n"
 750 "    STRH    R1, [SP, #0x16] \n"
 751 "    LDRH    R1, [R0, #0xC] \n"
 752 "    STRH    R1, [SP, #0x18] \n"
 753 "    BL      sub_FFC929BC \n"
 754 "    B       loc_FFC918A0 \n"
 755 
 756 "loc_FFC9187C:\n"
 757 "    BL      sub_FFC8F06C \n"
 758 "    B       loc_FFC918A0 \n"
 759 
 760 "loc_FFC91884:\n"
 761 "    BL      sub_FFC8F60C \n"
 762 "    B       loc_FFC918A0 \n"
 763 
 764 "loc_FFC9188C:\n"
 765 "    BL      sub_FFC8F848 \n"
 766 "    B       loc_FFC918A0 \n"
 767 
 768 "loc_FFC91894:\n"
 769 "    BL      sub_FFC8F9C4 \n"
 770 "    B       loc_FFC918A0 \n"
 771 
 772 "loc_FFC9189C:\n"
 773 "    BL      sub_FFC8FB60 \n"
 774 
 775 "loc_FFC918A0:\n"
 776 "    LDR     R0, [SP, #0x1C] \n"
 777 "    LDR     R1, [R0, #0x7C] \n"
 778 "    LDR     R3, [R0, #0x8C] \n"
 779 "    LDR     R2, [R0, #0x90] \n"
 780 "    ADD     R0, R0, #4 \n"
 781 "    BLX     R3 \n"
 782 "    CMP     R4, #1 \n"
 783 "    BNE     loc_FFC91908 \n"
 784 
 785 "loc_FFC918C0:\n"
 786 "    LDR     R0, [SP, #0x1C] \n"
 787 "    MOV     R2, #0xC \n"
 788 "    LDR     R1, [R0, #0x7C] \n"
 789 "    ADD     R1, R1, R1, LSL#1 \n"
 790 "    ADD     R0, R0, R1, LSL#2 \n"
 791 "    SUB     R4, R0, #8 \n"
 792 "    LDR     R0, =0x3C674 \n"
 793 "    ADD     R1, SP, #0x10 \n"
 794 "    BL      sub_FFE7E060 \n"
 795 "    LDR     R0, =0x3C680 \n"
 796 "    MOV     R2, #0xC \n"
 797 "    ADD     R1, SP, #0x10 \n"
 798 "    BL      sub_FFE7E060 \n"
 799 "    LDR     R0, =0x3C68C \n"
 800 "    MOV     R2, #0xC \n"
 801 "    MOV     R1, R4 \n"
 802 "    BL      sub_FFE7E060 \n"
 803 "    B       loc_FFC91980 \n"
 804 
 805 "loc_FFC91908:\n"
 806 "    LDR     R0, [SP, #0x1C] \n"
 807 "    LDR     R0, [R0] \n"
 808 "    CMP     R0, #0xB \n"
 809 "    BNE     loc_FFC91950 \n"
 810 "    MOV     R3, #0 \n"
 811 "    STR     R3, [SP] \n"
 812 "    MOV     R3, #1 \n"
 813 "    MOV     R2, #1 \n"
 814 "    MOV     R1, #1 \n"
 815 "    MOV     R0, #0 \n"
 816 "    BL      sub_FFC8DE24 \n"
 817 "    MOV     R3, #0 \n"
 818 "    STR     R3, [SP] \n"
 819 "    MOV     R3, #1 \n"
 820 "    MOV     R2, #1 \n"
 821 "    MOV     R1, #1 \n"
 822 "    MOV     R0, #0 \n"
 823 "    B       loc_FFC9197C \n"
 824 
 825 "loc_FFC91950:\n"
 826 "    MOV     R3, #1 \n"
 827 "    MOV     R2, #1 \n"
 828 "    MOV     R1, #1 \n"
 829 "    MOV     R0, #1 \n"
 830 "    STR     R3, [SP] \n"
 831 "    BL      sub_FFC8DE24 \n"
 832 "    MOV     R3, #1 \n"
 833 "    MOV     R2, #1 \n"
 834 "    MOV     R1, #1 \n"
 835 "    MOV     R0, #1 \n"
 836 "    STR     R3, [SP] \n"
 837 
 838 "loc_FFC9197C:\n"
 839 "    BL      sub_FFC8DF64 \n"
 840 
 841 "loc_FFC91980:\n"
 842 "    LDR     R0, [SP, #0x1C] \n"
 843 "    BL      sub_FFC92690 \n"
 844 "    B       loc_FFC913A8 \n"
 845 );
 846 }
 847 
 848 /*************************************************************/
 849 //** sub_FFC8EBD4_my @ 0xFFC8EBD4 - 0xFFC8EC94, length=49
 850 void __attribute__((naked,noinline)) sub_FFC8EBD4_my() {
 851 asm volatile (
 852 "    STMFD   SP!, {R4-R8,LR} \n"
 853 "    LDR     R7, =0x38B4 \n"
 854 "    MOV     R4, R0 \n"
 855 "    LDR     R0, [R7, #0x1C] \n"
 856 "    MOV     R1, #0x3E \n"
 857 "    BL      sub_FFC28848 /*_ClearEventFlag*/ \n"
 858 "    LDRSH   R0, [R4, #4] \n"
 859 "    MOV     R2, #0 \n"
 860 "    MOV     R1, #0 \n"
 861 "    BL      sub_FFC8DB88 \n"
 862 "    MOV     R6, R0 \n"
 863 "    LDRSH   R0, [R4, #6] \n"
 864 "    BL      sub_FFC8DC98 \n"
 865 "    LDRSH   R0, [R4, #8] \n"
 866 "    BL      sub_FFC8DCF0 \n"
 867 "    LDRSH   R0, [R4, #0xA] \n"
 868 "    BL      sub_FFC8DD48 \n"
 869 "    LDRSH   R0, [R4, #0xC] \n"
 870 "    MOV     R1, #0 \n"
 871 "    BL      sub_FFC8DDA0 \n"
 872 "    MOV     R5, R0 \n"
 873 "    LDR     R0, [R4] \n"
 874 "    LDR     R8, =0x3C68C \n"
 875 "    CMP     R0, #0xB \n"
 876 "    MOVEQ   R6, #0 \n"
 877 "    MOVEQ   R5, #0 \n"
 878 "    BEQ     loc_FFC8EC68 \n"
 879 "    CMP     R6, #1 \n"
 880 "    BNE     loc_FFC8EC68 \n"
 881 "    LDRSH   R0, [R4, #4] \n"
 882 "    LDR     R1, =0xFFC8DAF4 \n"
 883 "    MOV     R2, #2 \n"
 884 "    BL      sub_FFD08608 \n"
 885 "    STRH    R0, [R4, #4] \n"
 886 "    MOV     R0, #0 \n"
 887 "    STR     R0, [R7, #0x28] \n"
 888 "    B       loc_FFC8EC70 \n"
 889 
 890 "loc_FFC8EC68:\n"
 891 "    LDRH    R0, [R8] \n"
 892 "    STRH    R0, [R4, #4] \n"
 893 
 894 "loc_FFC8EC70:\n"
 895 "    CMP     R5, #1 \n"
 896 "    LDRNEH  R0, [R8, #8] \n"
 897 "    BNE     loc_FFC8EC8C \n"
 898 "    LDRSH   R0, [R4, #0xC] \n"
 899 "    LDR     R1, =0xFFC8DB78 \n"
 900 "    MOV     R2, #0x20 \n"
 901 "    BL      sub_FFC926C0 \n"
 902 
 903 "loc_FFC8EC8C:\n"
 904 "    STRH    R0, [R4, #0xC] \n"
 905 "    LDRSH   R0, [R4, #6] \n"
 906 "    BL      sub_FFC80D30_my \n"  // --> Patched. Old value = 0xFFC80D30.
 907 "    LDR     PC, =0xFFC8EC98 \n"  // Continue in firmware
 908 );
 909 }
 910 
 911 /*************************************************************/
 912 //** sub_FFC80D30_my @ 0xFFC80D30 - 0xFFC80D98, length=27
 913 void __attribute__((naked,noinline)) sub_FFC80D30_my() {
 914 asm volatile (
 915 "    STMFD   SP!, {R4-R6,LR} \n"
 916 "    LDR     R5, =0x35A8 \n"
 917 "    MOV     R4, R0 \n"
 918 "    LDR     R0, [R5, #4] \n"
 919 "    CMP     R0, #1 \n"
 920 "    LDRNE   R1, =0x146 \n"
 921 "    LDRNE   R0, =0xFFC80B34 /*'Shutter.c'*/ \n"
 922 "    BLNE    _DebugAssert \n"
 923 "    CMN     R4, #0xC00 \n"
 924 "    LDREQSH R4, [R5, #2] \n"
 925 "    CMN     R4, #0xC00 \n"
 926 "    MOVEQ   R1, #0x14C \n"
 927 "    LDREQ   R0, =0xFFC80B34 /*'Shutter.c'*/ \n"
 928 "    STRH    R4, [R5, #2] \n"
 929 "    BLEQ    _DebugAssert \n"
 930 "    MOV     R0, R4 \n"
 931 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us. _apex2us
 932 "    MOV     R4, R0 \n"
 933 //"  BL      _sub_FFCB3808 \n"  // --> Nullsub call removed.
 934 "    MOV     R0, R4 \n"
 935 "    BL      sub_FFCB7E98 \n"
 936 "    TST     R0, #1 \n"
 937 "    LDRNE   R1, =0x151 \n"
 938 "    LDMNEFD SP!, {R4-R6,LR} \n"
 939 "    LDRNE   R0, =0xFFC80B34 /*'Shutter.c'*/ \n"
 940 "    BNE     _DebugAssert \n"
 941 "    LDMFD   SP!, {R4-R6,PC} \n"
 942 );
 943 }

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