root/platform/tx1/sub/101b/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FFB2B154_my
  3. sub_FFB2E77C_my
  4. exp_drv_task
  5. sub_FF979C30_my
  6. sub_FF93B77C_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*)0xD1B4;
   9 
  10 #include "../../../generic/capt_seq.c"
  11 
  12 /*************************************************************/
  13 //** capt_seq_task @ 0xFFB2B784 - 0xFFB2B958, length=118
  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_FFB2B924 \n"
  20 
  21 "loc_FFB2B794:\n"
  22 "    LDR     R2, [SP] \n"
  23 "    LDR     R3, [R2] \n"
  24 "    MOV     R0, R2 \n"
  25 "    CMP     R3, #0x17 \n"
  26 "    LDRLS   PC, [PC, R3, LSL#2] \n"
  27 "    B       loc_FFB2B8FC \n"
  28 "    .long   loc_FFB2B80C \n"
  29 "    .long   loc_FFB2B82C \n"
  30 "    .long   loc_FFB2B840 \n"
  31 "    .long   loc_FFB2B854 \n"
  32 "    .long   loc_FFB2B84C \n"
  33 "    .long   loc_FFB2B85C \n"
  34 "    .long   loc_FFB2B864 \n"
  35 "    .long   loc_FFB2B870 \n"
  36 "    .long   loc_FFB2B878 \n"
  37 "    .long   loc_FFB2B884 \n"
  38 "    .long   loc_FFB2B88C \n"
  39 "    .long   loc_FFB2B894 \n"
  40 "    .long   loc_FFB2B89C \n"
  41 "    .long   loc_FFB2B8A4 \n"
  42 "    .long   loc_FFB2B8AC \n"
  43 "    .long   loc_FFB2B8B8 \n"
  44 "    .long   loc_FFB2B8C0 \n"
  45 "    .long   loc_FFB2B8C8 \n"
  46 "    .long   loc_FFB2B8D0 \n"
  47 "    .long   loc_FFB2B8DC \n"
  48 "    .long   loc_FFB2B8E4 \n"
  49 "    .long   loc_FFB2B8EC \n"
  50 "    .long   loc_FFB2B8F4 \n"
  51 "    .long   loc_FFB2B90C \n"
  52 
  53 "loc_FFB2B80C:\n"
  54 "    BL      sub_FFB2BE40 \n"
  55 "    BL      shooting_expo_param_override\n"   // +
  56 "    BL      sub_FFB28CF8 \n"
  57 "    LDR     R3, =0xB6FE0 \n"
  58 "    MOV     R2, #0\n"                          // added
  59 "    STR     R2, [R3,#0x24]\n"                  // added, fixes overrides behavior at short shutter press
  60 //"  LDR     R2, [R3, #0x24] \n"  // above patch makes these three lines redundant
  61 //"  CMP     R2, #0 \n"
  62 //"  BEQ     loc_FFB2B908 \n"
  63 //"  BL      _sub_FFB2B3BC \n"
  64 "    B       loc_FFB2B908 \n"
  65 
  66 "loc_FFB2B82C:\n"
  67 "    BL      sub_FFB2B154_my \n"  // --> Patched. Old value = 0xFFB2B154.
  68 
  69 "loc_FFB2B830:\n"
  70 "    LDR     R2, =0xB6FE0 \n"
  71 "    MOV     R3, #0 \n"
  72 "    STR     R3, [R2, #0x24] \n"
  73 "    B       loc_FFB2B908 \n"
  74 
  75 "loc_FFB2B840:\n"
  76 "    MOV     R0, #1 \n"
  77 "    BL      sub_FFB2C060 \n"
  78 "    B       loc_FFB2B908 \n"
  79 
  80 "loc_FFB2B84C:\n"
  81 "    BL      sub_FFB2BA10 \n"
  82 "    B       loc_FFB2B830 \n"
  83 
  84 "loc_FFB2B854:\n"
  85 "    BL      sub_FFB2BDF8 \n"
  86 "    B       loc_FFB2B830 \n"
  87 
  88 "loc_FFB2B85C:\n"
  89 "    BL      sub_FFB2BE08 \n"
  90 "    B       loc_FFB2B908 \n"
  91 
  92 "loc_FFB2B864:\n"
  93 "    BL      sub_FFB2BF58 \n"
  94 "    BL      sub_FFB28CF8 \n"
  95 "    B       loc_FFB2B908 \n"
  96 
  97 "loc_FFB2B870:\n"
  98 "    BL      sub_FFB2B494 \n"
  99 "    B       loc_FFB2B908 \n"
 100 
 101 "loc_FFB2B878:\n"
 102 "    BL      sub_FFB2BFC8 \n"
 103 "    BL      sub_FFB28CF8 \n"
 104 "    B       loc_FFB2B908 \n"
 105 
 106 "loc_FFB2B884:\n"
 107 "    BL      sub_FFB2BDF8 \n"
 108 "    B       loc_FFB2B908 \n"
 109 
 110 "loc_FFB2B88C:\n"
 111 "    BL      sub_FFB2D91C \n"
 112 "    B       loc_FFB2B908 \n"
 113 
 114 "loc_FFB2B894:\n"
 115 "    BL      sub_FFB2DAF0 \n"
 116 "    B       loc_FFB2B908 \n"
 117 
 118 "loc_FFB2B89C:\n"
 119 "    BL      sub_FFB2DB84 \n"
 120 "    B       loc_FFB2B908 \n"
 121 
 122 "loc_FFB2B8A4:\n"
 123 "    BL      sub_FFB2DC80 \n"
 124 "    B       loc_FFB2B908 \n"
 125 
 126 "loc_FFB2B8AC:\n"
 127 "    MOV     R0, #0 \n"
 128 "    BL      sub_FFB2DEEC \n"
 129 "    B       loc_FFB2B908 \n"
 130 
 131 "loc_FFB2B8B8:\n"
 132 "    BL      sub_FFB2E090 \n"
 133 "    B       loc_FFB2B908 \n"
 134 
 135 "loc_FFB2B8C0:\n"
 136 "    BL      sub_FFB2E12C \n"
 137 "    B       loc_FFB2B908 \n"
 138 
 139 "loc_FFB2B8C8:\n"
 140 "    BL      sub_FFB2E1EC \n"
 141 "    B       loc_FFB2B908 \n"
 142 
 143 "loc_FFB2B8D0:\n"
 144 "    BL      sub_FFB2C1E0 \n"
 145 "    BL      sub_FFB2AF14 \n"
 146 "    B       loc_FFB2B908 \n"
 147 
 148 "loc_FFB2B8DC:\n"
 149 "    BL      sub_FFB2DDC0 \n"
 150 "    B       loc_FFB2B908 \n"
 151 
 152 "loc_FFB2B8E4:\n"
 153 "    BL      sub_FFB2DE1C \n"
 154 "    B       loc_FFB2B908 \n"
 155 
 156 "loc_FFB2B8EC:\n"
 157 "    BL      sub_FFB2B034 \n"
 158 "    B       loc_FFB2B908 \n"
 159 
 160 "loc_FFB2B8F4:\n"
 161 "    BL      sub_FFB253DC \n"
 162 "    B       loc_FFB2B908 \n"
 163 
 164 "loc_FFB2B8FC:\n"
 165 "    LDR     R0, =0xFFB2AC58 /*'SsShootTask.c'*/ \n"
 166 "    MOV     R1, #0x4D0 \n"
 167 "    BL      _DebugAssert \n"
 168 
 169 "loc_FFB2B908:\n"
 170 "    LDR     R2, [SP] \n"
 171 
 172 "loc_FFB2B90C:\n"
 173 "    LDR     R3, =0x920D8 \n"
 174 "    LDR     R1, [R2, #4] \n"
 175 "    LDR     R0, [R3] \n"
 176 "    BL      sub_FFB4022C /*_SetEventFlag*/ \n"
 177 "    LDR     R0, [SP] \n"
 178 "    BL      sub_FFB2AD48 \n"
 179 
 180 "loc_FFB2B924:\n"
 181 "    LDR     R3, =0x920DC \n"
 182 "    MOV     R1, R4 \n"
 183 "    LDR     R0, [R3] \n"
 184 "    MOV     R2, #0 \n"
 185 "    BL      sub_FFB40944 /*_ReceiveMessageQueue*/ \n"
 186 "    TST     R0, #1 \n"
 187 "    BEQ     loc_FFB2B794 \n"
 188 "    MOV     R1, #0x400 \n"
 189 "    LDR     R0, =0xFFB2AC58 /*'SsShootTask.c'*/ \n"
 190 "    ADD     R1, R1, #2 \n"
 191 "    BL      _DebugAssert \n"
 192 "    BL      _ExitTask \n"
 193 "    ADD     SP, SP, #4 \n"
 194 "    LDMFD   SP!, {R4,PC} \n"
 195 );
 196 }
 197 
 198 /*************************************************************/
 199 //** sub_FFB2B154_my @ 0xFFB2B154 - 0xFFB2B3AC, length=151
 200 void __attribute__((naked,noinline)) sub_FFB2B154_my() {
 201 asm volatile (
 202 "    STMFD   SP!, {R4,R5,LR} \n"
 203 "    LDR     R1, =0xB6FE0 \n"
 204 "    LDR     R4, [R0, #0xC] \n"
 205 "    LDR     R2, [R1, #0x24] \n"
 206 "    LDR     R3, [R4, #8] \n"
 207 "    CMP     R2, #0 \n"
 208 "    ORR     R3, R3, #1 \n"
 209 "    STR     R3, [R4, #8] \n"
 210 "    BNE     loc_FFB2B1B4 \n"
 211 "    LDR     R3, [R1, #0xC] \n"
 212 "    CMP     R3, #0 \n"
 213 "    BNE     loc_FFB2B1B4 \n"
 214 "    MOV     R0, #0xC \n"
 215 "    BL      sub_FFB360D8 \n"
 216 "    TST     R0, #1 \n"
 217 "    BEQ     loc_FFB2B1B4 \n"
 218 "    LDR     R3, [R4, #8] \n"
 219 "    MOV     R0, #1 \n"
 220 "    ORR     R3, R3, #0x40000000 \n"
 221 "    STR     R3, [R4, #8] \n"
 222 
 223 "loc_FFB2B1A4:\n"
 224 "    MOV     R2, R4 \n"
 225 "    MOV     R1, #1 \n"
 226 "    LDMFD   SP!, {R4,R5,LR} \n"
 227 "    B       sub_FFB29314 \n"
 228 
 229 "loc_FFB2B1B4:\n"
 230 "    LDR     R1, =0xB6FE0 \n"
 231 "    MOV     R3, #0x8200 \n"
 232 "    LDRH    R2, [R1] \n"
 233 "    ADD     R3, R3, #0xA \n"
 234 "    CMP     R2, R3 \n"
 235 "    BEQ     loc_FFB2B200 \n"
 236 "    LDRH    R3, [R1, #0x88] \n"
 237 "    CMP     R3, #3 \n"
 238 "    BEQ     loc_FFB2B200 \n"
 239 "    LDR     R3, [R4, #0xC] \n"
 240 "    CMP     R3, #1 \n"
 241 "    BLS     loc_FFB2B200 \n"
 242 "    LDRH    R3, [R1, #0x86] \n"
 243 "    CMP     R3, #0 \n"
 244 "    BNE     loc_FFB2B200 \n"
 245 "    LDRH    R3, [R1, #0x82] \n"
 246 "    CMP     R3, #2 \n"
 247 "    BNE     loc_FFB2B200 \n"
 248 "    BL      sub_FFB2C2BC \n"
 249 
 250 "loc_FFB2B200:\n"
 251 "    LDR     R1, =0xB6FE0 \n"
 252 "    MOV     R3, #0x8200 \n"
 253 "    LDRH    R2, [R1] \n"
 254 "    ADD     R3, R3, #0xA \n"
 255 "    CMP     R2, R3 \n"
 256 "    BEQ     loc_FFB2B248 \n"
 257 "    LDRH    R3, [R1, #0x88] \n"
 258 "    CMP     R3, #3 \n"
 259 "    BEQ     loc_FFB2B248 \n"
 260 "    LDR     R3, [R4, #0xC] \n"
 261 "    CMP     R3, #1 \n"
 262 "    BLS     loc_FFB2B248 \n"
 263 "    LDRH    R3, [R1, #0x86] \n"
 264 "    CMP     R3, #0 \n"
 265 "    BNE     loc_FFB2B248 \n"
 266 "    LDRH    R3, [R1, #0x82] \n"
 267 "    CMP     R3, #2 \n"
 268 "    BEQ     loc_FFB2B2B0 \n"
 269 
 270 "loc_FFB2B248:\n"
 271 "    LDR     R2, =0xB6FE0 \n"
 272 "    LDRH    R3, [R2, #0x88] \n"
 273 "    CMP     R3, #3 \n"
 274 "    BEQ     loc_FFB2B2C8 \n"
 275 "    LDRH    R3, [R2, #0x86] \n"
 276 "    CMP     R3, #0 \n"
 277 "    BNE     loc_FFB2B2C8 \n"
 278 "    LDRH    R1, [R2, #0x82] \n"
 279 "    CMP     R1, #1 \n"
 280 "    BNE     loc_FFB2B2C8 \n"
 281 "    LDRH    R2, [R2] \n"
 282 "    MOV     R3, #0x8200 \n"
 283 "    ADD     R3, R3, #0xA \n"
 284 "    CMP     R2, R3 \n"
 285 "    BEQ     loc_FFB2B2C8 \n"
 286 "    LDR     R3, [R4, #0xC] \n"
 287 "    CMP     R3, #1 \n"
 288 "    BLS     loc_FFB2B2C8 \n"
 289 "    ADD     R3, R1, #0xFF00 \n"
 290 "    ADD     R3, R3, #0xFF \n"
 291 "    MOV     R3, R3, LSL#16 \n"
 292 "    CMP     R3, #0x10000 \n"
 293 "    BHI     loc_FFB2B2C8 \n"
 294 "    LDR     R3, [R4, #0x10] \n"
 295 "    CMP     R3, #1 \n"
 296 "    BNE     loc_FFB2B2C8 \n"
 297 
 298 "loc_FFB2B2B0:\n"
 299 "    LDR     R3, =0x920D8 \n"
 300 "    MOV     R2, #0xEA00 \n"
 301 "    LDR     R0, [R3] \n"
 302 "    MOV     R1, #0x40000000 \n"
 303 "    ADD     R2, R2, #0x60 \n"
 304 "    BL      sub_FFB3658C \n"
 305 
 306 "loc_FFB2B2C8:\n"
 307 "    LDR     R5, =0xB6FE0 \n"
 308 "    BL      sub_FFB2B034 \n"
 309 "    LDR     R3, [R5, #0x24] \n"
 310 "    CMP     R3, #0 \n"
 311 "    BNE     loc_FFB2B2E4 \n"
 312 "    MOV     R0, #2 \n"
 313 "    BL      sub_FFB05878 \n"
 314 
 315 "loc_FFB2B2E4:\n"
 316 "    BL      sub_FFB2BE18 \n"
 317 "    LDR     R3, [R4, #0x18] \n"
 318 "    CMP     R3, #0 \n"
 319 "    BEQ     loc_FFB2B2F8 \n"
 320 "    BL      sub_FFBAD14C \n"
 321 
 322 "loc_FFB2B2F8:\n"
 323 "    LDR     R3, [R5, #0x24] \n"
 324 "    CMP     R3, #0 \n"
 325 "    BNE     loc_FFB2B338 \n"
 326 "    MOV     R0, R4 \n"
 327 "    BL      sub_FFB2D100 \n"
 328 "    TST     R0, #1 \n"
 329 "    BNE     loc_FFB2B1A4 \n"
 330 "    BL      sub_FF826F90 \n"
 331 "    BL      sub_FF81BF54 \n"
 332 "    STR     R0, [R4, #0x14] \n"
 333 "    MOV     R0, R4 \n"
 334 "    BL      sub_FFB2E664 \n"
 335 "    BL      sub_FFB2F0AC \n"
 336 "    MOV     R0, R4 \n"
 337 "    BL      sub_FFB2E77C_my \n"  // --> Patched. Old value = 0xFFB2E77C.
 338 "    BL      capt_seq_hook_raw_here\n"   // +
 339 "    B       loc_FFB2B34C \n"
 340 
 341 "loc_FFB2B338:\n"
 342 "    LDR     R3, =0xD19C \n"
 343 "    LDR     R2, [R3] \n"
 344 "    CMP     R2, #0 \n"
 345 "    MOVNE   R0, #0x1D \n"
 346 "    MOVEQ   R0, #0 \n"
 347 
 348 "loc_FFB2B34C:\n"
 349 "    MOV     R1, #1 \n"
 350 "    MOV     R2, R4 \n"
 351 "    BL      sub_FFB29314 \n"
 352 "    BL      sub_FFB2EB4C \n"
 353 "    CMP     R0, #0 \n"
 354 "    LDRNE   R3, [R4, #8] \n"
 355 "    ORRNE   R3, R3, #0x2000 \n"
 356 "    STRNE   R3, [R4, #8] \n"
 357 "    LDR     R3, [R4, #0x18] \n"
 358 "    CMP     R3, #0 \n"
 359 "    BEQ     loc_FFB2B37C \n"
 360 "    BL      sub_FFBAD178 \n"
 361 
 362 "loc_FFB2B37C:\n"
 363 "    LDR     R2, =0xB6FE0 \n"
 364 "    LDRH    R3, [R2, #0x88] \n"
 365 "    CMP     R3, #3 \n"
 366 "    LDMEQFD SP!, {R4,R5,PC} \n"
 367 "    LDRH    R3, [R2, #0x86] \n"
 368 "    CMP     R3, #0 \n"
 369 "    LDMNEFD SP!, {R4,R5,PC} \n"
 370 "    LDRH    R3, [R2, #0x82] \n"
 371 "    CMP     R3, #2 \n"
 372 "    LDMNEFD SP!, {R4,R5,PC} \n"
 373 "    MOV     R0, R4 \n"
 374 "    LDMFD   SP!, {R4,R5,LR} \n"
 375 "    B       sub_FFB2C314 \n"
 376 );
 377 }
 378 
 379 /*************************************************************/
 380 //** sub_FFB2E77C_my @ 0xFFB2E77C - 0xFFB2E7D4, length=23
 381 void __attribute__((naked,noinline)) sub_FFB2E77C_my() {
 382 asm volatile (
 383 "    STMFD   SP!, {R4,LR} \n"
 384 "    MOV     R4, R0 \n"
 385 "    SUB     SP, SP, #0xC \n"
 386 "    BL      sub_FFB2F240 \n"
 387 "    MVN     R1, #0 \n"
 388 "    BL      sub_FFB403C8 /*_ClearEventFlag*/ \n"
 389 "    MOV     R0, #0x8A \n"
 390 "    ADD     R1, SP, #4 \n"
 391 "    MOV     R2, #4 \n"
 392 "    BL      _GetPropertyCase \n"
 393 "    TST     R0, #1 \n"
 394 "    BEQ     loc_FFB2E7BC \n"
 395 "    MOV     R1, #0x1D0 \n"
 396 "    LDR     R0, =0xFFB2E600 /*'SsCaptureSeq.c'*/ \n"
 397 "    ADD     R1, R1, #2 \n"
 398 "    BL      _DebugAssert \n"
 399 
 400 "loc_FFB2E7BC:\n"
 401 "    LDR     R3, =0xB6FE0 \n"
 402 "    LDR     R2, =0xB70A0 \n"
 403 "    LDR     R0, [R3, #0x7C] \n"
 404 "    LDRSH   R1, [R2, #0xE] \n"
 405 "    BL      sub_FFA4D830 \n"
 406 "    MOV     R0, R4 \n"
 407 "    BL      sub_FFB2E584 \n"
 408 "    BL      wait_until_remote_button_is_released\n"
 409 "    BL      capt_seq_hook_set_nr\n"
 410 "    LDR     PC, =0xFFB2E7D8 \n"  // Continue in firmware
 411 );
 412 }
 413 
 414 /*************************************************************/
 415 //** exp_drv_task @ 0xFF97CEFC - 0xFF97D444, length=339
 416 void __attribute__((naked,noinline)) exp_drv_task() {
 417 asm volatile (
 418 "    STMFD   SP!, {R4-R8,LR} \n"
 419 "    SUB     SP, SP, #0x20 \n"
 420 "    ADD     R7, SP, #4 \n"
 421 "    B       loc_FF97D400 \n"
 422 
 423 "loc_FF97CF0C:\n"
 424 "    CMP     R2, #0x22 \n"
 425 "    BNE     loc_FF97CF24 \n"
 426 "    LDR     R0, [R12, #0x8C] \n"
 427 "    MOV     LR, PC \n"
 428 "    LDR     PC, [R12, #0x88] \n"
 429 "    B       loc_FF97CF88 \n"
 430 
 431 "loc_FF97CF24:\n"
 432 "    CMP     R2, #0x1D \n"
 433 "    BNE     loc_FF97CF38 \n"
 434 "    MOV     R0, R12 \n"
 435 "    BL      sub_FF97CDCC \n"
 436 "    B       loc_FF97CF78 \n"
 437 
 438 "loc_FF97CF38:\n"
 439 "    CMP     R2, #0x1E \n"
 440 "    BNE     loc_FF97CF4C \n"
 441 "    MOV     R0, R12 \n"
 442 "    BL      sub_FF97CE28 \n"
 443 "    B       loc_FF97CF78 \n"
 444 
 445 "loc_FF97CF4C:\n"
 446 "    SUB     R3, R2, #0x1F \n"
 447 "    CMP     R3, #1 \n"
 448 "    BHI     loc_FF97CF64 \n"
 449 "    MOV     R0, R12 \n"
 450 "    BL      sub_FF97CE84 \n"
 451 "    B       loc_FF97CF78 \n"
 452 
 453 "loc_FF97CF64:\n"
 454 "    CMP     R2, #0x21 \n"
 455 "    BNE     loc_FF97CF94 \n"
 456 "    BL      sub_FF93BB00 \n"
 457 "    BL      sub_FF93EC38 \n"
 458 "    BL      sub_FF93DE70 \n"
 459 
 460 "loc_FF97CF78:\n"
 461 "    LDR     R3, [SP, #4] \n"
 462 "    LDR     R0, [R3, #0x8C] \n"
 463 "    MOV     LR, PC \n"
 464 "    LDR     PC, [R3, #0x88] \n"
 465 
 466 "loc_FF97CF88:\n"
 467 "    LDR     R0, [SP, #4] \n"
 468 "    BL      sub_FF97861C \n"
 469 "    B       loc_FF97D400 \n"
 470 
 471 "loc_FF97CF94:\n"
 472 "    CMP     R2, #0xD \n"
 473 "    MOV     R8, #1 \n"
 474 "    BNE     loc_FF97D004 \n"
 475 "    LDR     R1, [R12, #0x7C] \n"
 476 "    ADD     R1, R1, R1, LSL#1 \n"
 477 "    ADD     R1, R12, R1, LSL#2 \n"
 478 "    ADD     R6, SP, #0x14 \n"
 479 "    SUB     R1, R1, #8 \n"
 480 "    MOV     R2, #0xC \n"
 481 "    MOV     R0, R6 \n"
 482 "    BL      _memcpy \n"
 483 "    LDR     R0, [SP, #4] \n"
 484 "    BL      sub_FF97B1E4 \n"
 485 "    LDR     R3, [SP, #4] \n"
 486 "    LDR     R1, [R3, #0x7C] \n"
 487 "    LDR     R2, [R3, #0x8C] \n"
 488 "    ADD     R0, R3, #4 \n"
 489 "    MOV     LR, PC \n"
 490 "    LDR     PC, [R3, #0x88] \n"
 491 "    LDR     R0, [SP, #4] \n"
 492 "    BL      sub_FF97B4B4 \n"
 493 "    LDR     R3, [SP, #4] \n"
 494 "    ADD     R0, R3, #4 \n"
 495 "    LDR     R1, [R3, #0x7C] \n"
 496 "    LDR     R2, [R3, #0x94] \n"
 497 "    MOV     LR, PC \n"
 498 "    LDR     PC, [R3, #0x90] \n"
 499 "    B       loc_FF97D354 \n"
 500 
 501 "loc_FF97D004:\n"
 502 "    SUB     R3, R2, #0xE \n"
 503 "    CMP     R3, #1 \n"
 504 "    BHI     loc_FF97D0C0 \n"
 505 "    ADD     R6, SP, #0x14 \n"
 506 "    ADD     R5, SP, #8 \n"
 507 "    MOV     R0, R12 \n"
 508 "    MOV     R1, R6 \n"
 509 "    MOV     R2, R5 \n"
 510 "    BL      sub_FF97B5A8 \n"
 511 "    MOV     R4, R0 \n"
 512 "    CMP     R4, #5 \n"
 513 "    CMPNE   R4, #1 \n"
 514 "    BNE     loc_FF97D058 \n"
 515 "    LDR     R12, [SP, #4] \n"
 516 "    MOV     R0, R5 \n"
 517 "    LDR     R1, [R12, #0x7C] \n"
 518 "    MOV     R2, R4 \n"
 519 "    LDR     R3, [R12, #0x8C] \n"
 520 "    MOV     LR, PC \n"
 521 "    LDR     PC, [R12, #0x88] \n"
 522 "    B       loc_FF97D090 \n"
 523 
 524 "loc_FF97D058:\n"
 525 "    CMP     R4, #6 \n"
 526 "    CMPNE   R4, #2 \n"
 527 "    BNE     loc_FF97D0A0 \n"
 528 "    LDR     R12, [SP, #4] \n"
 529 "    MOV     R0, R5 \n"
 530 "    MOV     R1, R8 \n"
 531 "    MOV     R2, R4 \n"
 532 "    LDR     R3, [R12, #0x8C] \n"
 533 "    MOV     LR, PC \n"
 534 "    LDR     PC, [R12, #0x88] \n"
 535 "    MOV     R1, R6 \n"
 536 "    LDR     R0, [SP, #4] \n"
 537 "    MOV     R2, R5 \n"
 538 "    BL      sub_FF97CA2C \n"
 539 
 540 "loc_FF97D090:\n"
 541 "    MOV     R1, R4 \n"
 542 "    LDR     R0, [SP, #4] \n"
 543 "    BL      sub_FF97CD60 \n"
 544 "    B       loc_FF97D354 \n"
 545 
 546 "loc_FF97D0A0:\n"
 547 "    LDR     R12, [SP, #4] \n"
 548 "    MOV     R2, R4 \n"
 549 "    ADD     R0, R12, #4 \n"
 550 "    LDR     R1, [R12, #0x7C] \n"
 551 "    LDR     R3, [R12, #0x8C] \n"
 552 "    MOV     LR, PC \n"
 553 "    LDR     PC, [R12, #0x88] \n"
 554 "    B       loc_FF97D354 \n"
 555 
 556 "loc_FF97D0C0:\n"
 557 "    SUB     R3, R2, #0x19 \n"
 558 "    CMP     R3, #1 \n"
 559 "    BHI     loc_FF97D118 \n"
 560 "    LDR     R1, [R12, #0x7C] \n"
 561 "    ADD     R1, R1, R1, LSL#1 \n"
 562 "    ADD     R1, R12, R1, LSL#2 \n"
 563 "    ADD     R6, SP, #0x14 \n"
 564 "    SUB     R1, R1, #8 \n"
 565 "    MOV     R2, #0xC \n"
 566 "    MOV     R0, R6 \n"
 567 "    BL      _memcpy \n"
 568 "    LDR     R0, [SP, #4] \n"
 569 "    BL      sub_FF97A5D8 \n"
 570 "    LDR     R3, [SP, #4] \n"
 571 "    ADD     R0, R3, #4 \n"
 572 "    LDR     R1, [R3, #0x7C] \n"
 573 "    LDR     R2, [R3, #0x8C] \n"
 574 "    MOV     LR, PC \n"
 575 "    LDR     PC, [R3, #0x88] \n"
 576 "    LDR     R0, [SP, #4] \n"
 577 "    BL      sub_FF97A9B4 \n"
 578 "    B       loc_FF97D354 \n"
 579 
 580 "loc_FF97D118:\n"
 581 "    ADD     R6, SP, #0x14 \n"
 582 "    ADD     R1, R12, #4 \n"
 583 "    MOV     R2, #0xC \n"
 584 "    MOV     R0, R6 \n"
 585 "    BL      _memcpy \n"
 586 "    LDR     R12, [SP, #4] \n"
 587 "    LDR     R3, [R12] \n"
 588 "    MOV     R2, R12 \n"
 589 "    CMP     R3, #0x1C \n"
 590 "    LDRLS   PC, [PC, R3, LSL#2] \n"
 591 "    B       loc_FF97D340 \n"
 592 "    .long   loc_FF97D1B8 \n"
 593 "    .long   loc_FF97D1C4 \n"
 594 "    .long   loc_FF97D1D0 \n"
 595 "    .long   loc_FF97D1D0 \n"
 596 "    .long   loc_FF97D1B8 \n"
 597 "    .long   loc_FF97D1C4 \n"
 598 "    .long   loc_FF97D1D0 \n"
 599 "    .long   loc_FF97D1D0 \n"
 600 "    .long   loc_FF97D1F4 \n"
 601 "    .long   loc_FF97D1F4 \n"
 602 "    .long   loc_FF97D314 \n"
 603 "    .long   loc_FF97D320 \n"
 604 "    .long   loc_FF97D330 \n"
 605 "    .long   loc_FF97D340 \n"
 606 "    .long   loc_FF97D340 \n"
 607 "    .long   loc_FF97D340 \n"
 608 "    .long   loc_FF97D1DC \n"
 609 "    .long   loc_FF97D1E8 \n"
 610 "    .long   loc_FF97D204 \n"
 611 "    .long   loc_FF97D210 \n"
 612 "    .long   loc_FF97D248 \n"
 613 "    .long   loc_FF97D280 \n"
 614 "    .long   loc_FF97D2B8 \n"
 615 "    .long   loc_FF97D2F0 \n"
 616 "    .long   loc_FF97D2F0 \n"
 617 "    .long   loc_FF97D340 \n"
 618 "    .long   loc_FF97D340 \n"
 619 "    .long   loc_FF97D2FC \n"
 620 "    .long   loc_FF97D308 \n"
 621 
 622 "loc_FF97D1B8:\n"
 623 "    MOV     R0, R2 \n"
 624 "    BL      sub_FF978FB8 \n"
 625 "    B       loc_FF97D33C \n"
 626 
 627 "loc_FF97D1C4:\n"
 628 "    MOV     R0, R2 \n"
 629 "    BL      sub_FF979258 \n"
 630 "    B       loc_FF97D33C \n"
 631 
 632 "loc_FF97D1D0:\n"
 633 "    MOV     R0, R2 \n"
 634 "    BL      sub_FF9794CC \n"
 635 "    B       loc_FF97D33C \n"
 636 
 637 "loc_FF97D1DC:\n"
 638 "    MOV     R0, R2 \n"
 639 "    BL      sub_FF9797C4 \n"
 640 "    B       loc_FF97D33C \n"
 641 
 642 "loc_FF97D1E8:\n"
 643 "    MOV     R0, R2 \n"
 644 "    BL      sub_FF979A2C \n"
 645 "    B       loc_FF97D33C \n"
 646 
 647 "loc_FF97D1F4:\n"
 648 "    MOV     R0, R2 \n"
 649 "    BL      sub_FF979C30_my \n"  // --> Patched. Old value = 0xFF979C30.
 650 "    MOV     R8, #0 \n"
 651 "    B       loc_FF97D33C \n"
 652 
 653 "loc_FF97D204:\n"
 654 "    MOV     R0, R2 \n"
 655 "    BL      sub_FF979D90 \n"
 656 "    B       loc_FF97D33C \n"
 657 
 658 "loc_FF97D210:\n"
 659 "    LDRH    R1, [R2, #4] \n"
 660 "    LDR     R3, =0x3A958 \n"
 661 "    STRH    R1, [SP, #0x14] \n"
 662 "    LDRH    R1, [R3, #6] \n"
 663 "    STRH    R1, [SP, #0x1A] \n"
 664 "    LDRH    R1, [R3, #2] \n"
 665 "    STRH    R1, [SP, #0x16] \n"
 666 "    LDRH    R3, [R3, #4] \n"
 667 "    STRH    R3, [SP, #0x18] \n"
 668 "    MOV     R0, R2 \n"
 669 "    LDRH    R2, [R2, #0xC] \n"
 670 "    STRH    R2, [SP, #0x1C] \n"
 671 "    BL      sub_FF97A088 \n"
 672 "    B       loc_FF97D33C \n"
 673 
 674 "loc_FF97D248:\n"
 675 "    MOV     R0, R2 \n"
 676 "    LDRH    R2, [R2, #4] \n"
 677 "    LDR     R3, =0x3A958 \n"
 678 "    STRH    R2, [SP, #0x14] \n"
 679 "    LDRH    R2, [R3, #8] \n"
 680 "    STRH    R2, [SP, #0x1C] \n"
 681 "    LDRH    R1, [R3, #2] \n"
 682 "    STRH    R1, [SP, #0x16] \n"
 683 "    LDRH    R2, [R3, #4] \n"
 684 "    STRH    R2, [SP, #0x18] \n"
 685 "    LDRH    R3, [R3, #6] \n"
 686 "    STRH    R3, [SP, #0x1A] \n"
 687 "    BL      sub_FF97A1AC \n"
 688 "    B       loc_FF97D33C \n"
 689 
 690 "loc_FF97D280:\n"
 691 "    LDR     R3, =0x3A958 \n"
 692 "    LDRH    R1, [R3] \n"
 693 "    STRH    R1, [SP, #0x14] \n"
 694 "    MOV     R0, R2 \n"
 695 "    LDRH    R2, [R2, #6] \n"
 696 "    STRH    R2, [SP, #0x16] \n"
 697 "    LDRH    R2, [R3, #8] \n"
 698 "    STRH    R2, [SP, #0x1C] \n"
 699 "    LDRH    R1, [R3, #4] \n"
 700 "    STRH    R1, [SP, #0x18] \n"
 701 "    LDRH    R3, [R3, #6] \n"
 702 "    STRH    R3, [SP, #0x1A] \n"
 703 "    BL      sub_FF97A270 \n"
 704 "    B       loc_FF97D33C \n"
 705 
 706 "loc_FF97D2B8:\n"
 707 "    LDR     R3, =0x3A958 \n"
 708 "    LDRH    R1, [R3, #6] \n"
 709 "    STRH    R1, [SP, #0x1A] \n"
 710 "    LDRH    R1, [R3] \n"
 711 "    STRH    R1, [SP, #0x14] \n"
 712 "    LDRH    R1, [R3, #2] \n"
 713 "    STRH    R1, [SP, #0x16] \n"
 714 "    LDRH    R3, [R3, #4] \n"
 715 "    STRH    R3, [SP, #0x18] \n"
 716 "    MOV     R0, R2 \n"
 717 "    LDRH    R2, [R2, #0xC] \n"
 718 "    STRH    R2, [SP, #0x1C] \n"
 719 "    BL      sub_FF97A328 \n"
 720 "    B       loc_FF97D33C \n"
 721 
 722 "loc_FF97D2F0:\n"
 723 "    MOV     R0, R2 \n"
 724 "    BL      sub_FF97A3D4 \n"
 725 "    B       loc_FF97D33C \n"
 726 
 727 "loc_FF97D2FC:\n"
 728 "    MOV     R0, R2 \n"
 729 "    BL      sub_FF97AB04 \n"
 730 "    B       loc_FF97D33C \n"
 731 
 732 "loc_FF97D308:\n"
 733 "    MOV     R0, R2 \n"
 734 "    BL      sub_FF97AD00 \n"
 735 "    B       loc_FF97D33C \n"
 736 
 737 "loc_FF97D314:\n"
 738 "    MOV     R0, R2 \n"
 739 "    BL      sub_FF97AEBC \n"
 740 "    B       loc_FF97D33C \n"
 741 
 742 "loc_FF97D320:\n"
 743 "    MOV     R0, R2 \n"
 744 "    MOV     R1, #0 \n"
 745 "    BL      sub_FF97B0A4 \n"
 746 "    B       loc_FF97D33C \n"
 747 
 748 "loc_FF97D330:\n"
 749 "    MOV     R0, R2 \n"
 750 "    MOV     R1, #1 \n"
 751 "    BL      sub_FF97B0A4 \n"
 752 
 753 "loc_FF97D33C:\n"
 754 "    LDR     R12, [SP, #4] \n"
 755 
 756 "loc_FF97D340:\n"
 757 "    ADD     R0, R12, #4 \n"
 758 "    LDR     R1, [R12, #0x7C] \n"
 759 "    LDR     R2, [R12, #0x8C] \n"
 760 "    MOV     LR, PC \n"
 761 "    LDR     PC, [R12, #0x88] \n"
 762 
 763 "loc_FF97D354:\n"
 764 "    CMP     R8, #1 \n"
 765 "    BNE     loc_FF97D37C \n"
 766 "    LDR     R1, [SP, #4] \n"
 767 "    LDR     R3, [R1, #0x7C] \n"
 768 "    ADD     R3, R3, R3, LSL#1 \n"
 769 "    ADD     R1, R1, R3, LSL#2 \n"
 770 "    MOV     R0, R6 \n"
 771 "    SUB     R1, R1, #8 \n"
 772 "    BL      sub_FF978C74 \n"
 773 "    B       loc_FF97D3F8 \n"
 774 
 775 "loc_FF97D37C:\n"
 776 "    LDR     R3, [SP, #4] \n"
 777 "    LDR     R2, [R3] \n"
 778 "    CMP     R2, #9 \n"
 779 "    BNE     loc_FF97D3C4 \n"
 780 "    MOV     R4, #0 \n"
 781 "    MOV     R1, #1 \n"
 782 "    MOV     R2, R1 \n"
 783 "    MOV     R3, R1 \n"
 784 "    MOV     R0, R4 \n"
 785 "    STR     R4, [SP] \n"
 786 "    BL      sub_FF978BB8 \n"
 787 "    MOV     R1, #1 \n"
 788 "    MOV     R0, R4 \n"
 789 "    MOV     R2, R1 \n"
 790 "    MOV     R3, R1 \n"
 791 "    STR     R4, [SP] \n"
 792 "    BL      sub_FF978E0C \n"
 793 "    B       loc_FF97D3F8 \n"
 794 
 795 "loc_FF97D3C4:\n"
 796 "    MOV     R4, #1 \n"
 797 "    MOV     R0, R4 \n"
 798 "    MOV     R1, R4 \n"
 799 "    MOV     R2, R4 \n"
 800 "    MOV     R3, R4 \n"
 801 "    STR     R4, [SP] \n"
 802 "    BL      sub_FF978BB8 \n"
 803 "    MOV     R0, R4 \n"
 804 "    MOV     R1, R0 \n"
 805 "    MOV     R2, R0 \n"
 806 "    MOV     R3, R0 \n"
 807 "    STR     R4, [SP] \n"
 808 "    BL      sub_FF978E0C \n"
 809 
 810 "loc_FF97D3F8:\n"
 811 "    LDR     R0, [SP, #4] \n"
 812 "    BL      sub_FF97861C \n"
 813 
 814 "loc_FF97D400:\n"
 815 "    LDR     R3, =0x3A94C \n"
 816 "    MOV     R2, #0 \n"
 817 "    LDR     R0, [R3] \n"
 818 "    MOV     R1, R7 \n"
 819 "    BL      sub_FFB40944 /*_ReceiveMessageQueue*/ \n"
 820 "    LDR     R12, [SP, #4] \n"
 821 "    LDR     R2, [R12] \n"
 822 "    CMP     R2, #0x23 \n"
 823 "    BNE     loc_FF97CF0C \n"
 824 "    MOV     R0, R12 \n"
 825 "    BL      sub_FF97861C \n"
 826 "    LDR     R3, =0x3A948 \n"
 827 "    MOV     R1, #1 \n"
 828 "    LDR     R0, [R3] \n"
 829 "    BL      sub_FFB4022C /*_SetEventFlag*/ \n"
 830 "    BL      _ExitTask \n"
 831 "    ADD     SP, SP, #0x20 \n"
 832 "    LDMFD   SP!, {R4-R8,PC} \n"
 833 );
 834 }
 835 
 836 /*************************************************************/
 837 //** sub_FF979C30_my @ 0xFF979C30 - 0xFF979D78, length=83
 838 void __attribute__((naked,noinline)) sub_FF979C30_my() {
 839 asm volatile (
 840 "    STMFD   SP!, {R4-R6,LR} \n"
 841 "    LDR     R3, =0x3A948 \n"
 842 "    MOV     R4, R0 \n"
 843 "    MOV     R1, #0x3E \n"
 844 "    LDR     R0, [R3] \n"
 845 "    BL      sub_FFB403C8 /*_ClearEventFlag*/ \n"
 846 "    MOV     R1, #0 \n"
 847 "    LDRSH   R0, [R4, #4] \n"
 848 "    BL      sub_FF97874C \n"
 849 "    MOV     R6, R0 \n"
 850 "    LDRSH   R0, [R4, #6] \n"
 851 "    BL      sub_FF9788F8 \n"
 852 "    LDRSH   R0, [R4, #8] \n"
 853 "    BL      sub_FF978994 \n"
 854 "    LDRSH   R0, [R4, #0xA] \n"
 855 "    BL      sub_FF978A30 \n"
 856 "    LDRSH   R0, [R4, #0xC] \n"
 857 "    BL      sub_FF978ACC \n"
 858 "    LDR     R3, [R4] \n"
 859 "    CMP     R3, #9 \n"
 860 "    MOV     R5, R0 \n"
 861 "    MOVEQ   R5, #0 \n"
 862 "    MOVEQ   R6, R5 \n"
 863 "    CMP     R6, #1 \n"
 864 "    BNE     loc_FF979CB4 \n"
 865 "    MOV     R2, #2 \n"
 866 "    LDRSH   R0, [R4, #4] \n"
 867 "    LDR     R1, =0xFF97866C \n"
 868 "    BL      sub_FFAF0CC4 \n"
 869 "    LDR     R2, =0x3A998 \n"
 870 "    MOV     R3, #0 \n"
 871 "    STR     R3, [R2] \n"
 872 "    B       loc_FF979CB8 \n"
 873 
 874 "loc_FF979CB4:\n"
 875 "    BL      sub_FF978B68 \n"
 876 
 877 "loc_FF979CB8:\n"
 878 "    STRH    R0, [R4, #4] \n"
 879 "    CMP     R5, #1 \n"
 880 "    BNE     loc_FF979CD8 \n"
 881 "    LDRSH   R0, [R4, #0xC] \n"
 882 "    LDR     R1, =0xFF978730 \n"
 883 "    MOV     R2, #0x20 \n"
 884 "    BL      sub_FF978F58 \n"
 885 "    B       loc_FF979CDC \n"
 886 
 887 "loc_FF979CD8:\n"
 888 "    BL      sub_FF978BA8 \n"
 889 
 890 "loc_FF979CDC:\n"
 891 "    STRH    R0, [R4, #0xC] \n"
 892 "    LDRSH   R0, [R4, #6] \n"
 893 "    BL      sub_FF93B77C_my \n"  // --> Patched. Old value = 0xFF93B77C.
 894 "    LDRSH   R0, [R4, #8] \n"
 895 "    MOV     R1, #1 \n"
 896 "    BL      sub_FF93DA30 \n"
 897 "    ADD     R0, R4, #8 \n"
 898 "    MOV     R1, #0 \n"
 899 "    BL      sub_FF93DAF0 \n"
 900 "    LDRSH   R0, [R4, #0xE] \n"
 901 "    BL      sub_FF966CE8 \n"
 902 "    CMP     R6, #1 \n"
 903 "    BNE     loc_FF979D40 \n"
 904 "    LDR     R3, =0x3A948 \n"
 905 "    MOV     R2, #0xBB0 \n"
 906 "    LDR     R0, [R3] \n"
 907 "    MOV     R1, #2 \n"
 908 "    ADD     R2, R2, #8 \n"
 909 "    BL      sub_FFB4021C /*_WaitForAllEventFlag*/ \n"
 910 "    TST     R0, #1 \n"
 911 "    BEQ     loc_FF979D40 \n"
 912 "    MOV     R1, #0x4A0 \n"
 913 "    LDR     R0, =0xFF9785C8 /*'ExpDrv.c'*/ \n"
 914 "    ADD     R1, R1, #2 \n"
 915 "    BL      _DebugAssert \n"
 916 
 917 "loc_FF979D40:\n"
 918 "    CMP     R5, #1 \n"
 919 "    LDMNEFD SP!, {R4-R6,PC} \n"
 920 "    LDR     R3, =0x3A948 \n"
 921 "    MOV     R2, #0xBB0 \n"
 922 "    LDR     R0, [R3] \n"
 923 "    MOV     R1, #0x20 \n"
 924 "    ADD     R2, R2, #8 \n"
 925 "    BL      sub_FFB4021C /*_WaitForAllEventFlag*/ \n"
 926 "    TST     R0, #1 \n"
 927 "    LDMEQFD SP!, {R4-R6,PC} \n"
 928 "    MOV     R1, #0x4A0 \n"
 929 "    LDR     R0, =0xFF9785C8 /*'ExpDrv.c'*/ \n"
 930 "    ADD     R1, R1, #7 \n"
 931 "    LDMFD   SP!, {R4-R6,LR} \n"
 932 "    B       _DebugAssert \n"
 933 );
 934 }
 935 
 936 /*************************************************************/
 937 //** sub_FF93B77C_my @ 0xFF93B77C - 0xFF93B7D8, length=24
 938 void __attribute__((naked,noinline)) sub_FF93B77C_my() {
 939 asm volatile (
 940 "    STMFD   SP!, {R4,LR} \n"
 941 "    LDR     R3, =0x6144 \n"
 942 "    LDR     R2, [R3] \n"
 943 "    MOV     R1, #0x168 \n"
 944 "    MOV     R3, R0, LSL#16 \n"
 945 "    CMP     R2, #1 \n"
 946 "    ADD     R1, R1, #3 \n"
 947 "    LDR     R0, =0xFF93AF98 /*'Shutter.c'*/ \n"
 948 "    MOV     R4, R3, ASR#16 \n"
 949 "    BEQ     loc_FF93B7A8 \n"
 950 "    BL      _DebugAssert \n"
 951 
 952 "loc_FF93B7A8:\n"
 953 "    MOV     R1, #0x170 \n"
 954 "    CMN     R4, #0xC00 \n"
 955 "    LDR     R3, =0x159EE \n"
 956 "    LDR     R0, =0xFF93AF98 /*'Shutter.c'*/ \n"
 957 "    ADD     R1, R1, #1 \n"
 958 "    LDREQSH R4, [R3] \n"
 959 "    LDRNE   R3, =0x159EE \n"
 960 "    CMN     R4, #0xC00 \n"
 961 "    STRH    R4, [R3] \n"
 962 "    BNE     loc_FF93B7D4 \n"
 963 "    BL      _DebugAssert \n"
 964 
 965 "loc_FF93B7D4:\n"
 966 "    MOV     R0, R4 \n"
 967 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
 968 "    LDR     PC, =0xFF93B7DC \n"  // Continue in firmware
 969 );
 970 }

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