root/platform/d30/sub/100a/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF183354_my
  3. exp_drv_task
  4. sub_FF0AE6E0_my
  5. sub_FF09D9B4_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 #define NR_AUTO (0)                 // have to explictly reset value back to 0 to enable auto
  10 #define PAUSE_FOR_FILE_COUNTER 200  // Enable delay in capt_seq_hook_raw_here to ensure file counter is updated
  11 
  12 #include "../../../generic/capt_seq.c"
  13 
  14 
  15 /*************************************************************/
  16 //** capt_seq_task @ 0xFF069390 - 0xFF0696B0, length=201
  17 void __attribute__((naked,noinline)) capt_seq_task() {
  18 asm volatile (
  19 "    STMFD   SP!, {R3-R9,LR} \n"
  20 "    LDR     R4, =0x397BC \n"
  21 "    LDR     R7, =0x2EA4 \n"
  22 "    MOV     R6, #0 \n"
  23 
  24 "loc_FF0693A0:\n"
  25 "    LDR     R0, [R7, #4] \n"
  26 "    MOV     R2, #0 \n"
  27 "    MOV     R1, SP \n"
  28 "    BL      sub_00477218 /*_ReceiveMessageQueue*/ \n"
  29 "    TST     R0, #1 \n"
  30 "    BEQ     loc_FF0693CC \n"
  31 "    LDR     R1, =0x493 \n"
  32 "    LDR     R0, =0xFF068E4C /*'SsShootTask.c'*/ \n"
  33 "    BL      _DebugAssert \n"
  34 "    BL      _ExitTask \n"
  35 "    LDMFD   SP!, {R3-R9,PC} \n"
  36 
  37 "loc_FF0693CC:\n"
  38 "    LDR     R0, [SP] \n"
  39 "    LDR     R1, [R0] \n"
  40 "    CMP     R1, #0x24 \n"
  41 "    ADDCC   PC, PC, R1, LSL#2 \n"
  42 "    B       loc_FF069678 \n"
  43 "    B       loc_FF069470 \n"
  44 "    B       loc_FF069488 \n"
  45 "    B       loc_FF0694F8 \n"
  46 "    B       loc_FF06950C \n"
  47 "    B       loc_FF069504 \n"
  48 "    B       loc_FF069518 \n"
  49 "    B       loc_FF069520 \n"
  50 "    B       loc_FF069528 \n"
  51 "    B       loc_FF069544 \n"
  52 "    B       loc_FF069598 \n"
  53 "    B       loc_FF069550 \n"
  54 "    B       loc_FF06955C \n"
  55 "    B       loc_FF069564 \n"
  56 "    B       loc_FF069580 \n"
  57 "    B       loc_FF069588 \n"
  58 "    B       loc_FF069590 \n"
  59 "    B       loc_FF0695A0 \n"
  60 "    B       loc_FF0695A8 \n"
  61 "    B       loc_FF0695B0 \n"
  62 "    B       loc_FF0695B8 \n"
  63 "    B       loc_FF0695C0 \n"
  64 "    B       loc_FF0695C8 \n"
  65 "    B       loc_FF0695D0 \n"
  66 "    B       loc_FF0695D8 \n"
  67 "    B       loc_FF0695E0 \n"
  68 "    B       loc_FF0695EC \n"
  69 "    B       loc_FF0695F4 \n"
  70 "    B       loc_FF069600 \n"
  71 "    B       loc_FF069608 \n"
  72 "    B       loc_FF069610 \n"
  73 "    B       loc_FF069618 \n"
  74 "    B       loc_FF069620 \n"
  75 "    B       loc_FF06962C \n"
  76 "    B       loc_FF069634 \n"
  77 "    B       loc_FF069640 \n"
  78 "    B       loc_FF069684 \n"
  79 
  80 "loc_FF069470:\n"
  81 "    BL      shooting_expo_iso_override\n"      // added
  82 "    BL      sub_FF069C4C \n"
  83 "    BL      shooting_expo_param_override\n"    // added
  84 "    BL      sub_FF066ED0 \n"
  85 "    MOV     R0, #0\n"                          // added
  86 "    STR     R0, [R4,#0x28]\n"                  // added, fixes overrides behavior at short shutter press (from S95)
  87 //"  LDR     R0, [R4, #0x28] \n"  // above patch makes these three lines redundant
  88 //"  CMP     R0, #0 \n"
  89 //"  BLNE    _sub_FF1833F8 \n"
  90 "    B       loc_FF069684 \n"
  91 
  92 "loc_FF069488:\n"
  93 "    LDR     R5, [R0, #0x10] \n"
  94 "    LDR     R0, [R4, #0x28] \n"
  95 "    CMP     R0, #0 \n"
  96 "    BNE     loc_FF0694D0 \n"
  97 "    LDR     R0, [R4, #0x94] \n"
  98 "    TST     R0, #0x30 \n"
  99 "    BLNE    sub_FF06B61C \n"
 100 "    BL      sub_FF06B2FC \n"
 101 "    MOV     R1, R5 \n"
 102 "    BL      sub_FF06B354 \n"
 103 "    LDR     R0, =0x10F \n"
 104 "    MOV     R2, #4 \n"
 105 "    ADD     R1, R5, #0x24 \n"
 106 "    BL      _SetPropertyCase \n"
 107 "    MOV     R2, #4 \n"
 108 "    ADD     R1, R5, #0x28 \n"
 109 "    MOV     R0, #0x2C \n"
 110 "    BL      _SetPropertyCase \n"
 111 
 112 "loc_FF0694D0:\n"
 113 "    MOV     R0, R5 \n"
 114 "    BL      sub_FF183354_my \n"  // --> Patched. Old value = 0xFF183354.
 115 "    BL      capt_seq_hook_raw_here\n"      // added
 116 "    MOV     R8, R0 \n"
 117 "    MOV     R2, R5 \n"
 118 "    MOV     R1, #1 \n"
 119 "    BL      sub_FF067464 \n"
 120 "    TST     R8, #1 \n"
 121 "    MOVEQ   R0, R5 \n"
 122 "    BLEQ    sub_FF182C98 \n"
 123 "    B       loc_FF069684 \n"
 124 
 125 "loc_FF0694F8:\n"
 126 "    MOV     R0, #1 \n"
 127 "    BL      sub_FF069F48 \n"
 128 "    B       loc_FF069684 \n"
 129 
 130 "loc_FF069504:\n"
 131 "    BL      sub_FF069858 \n"
 132 "    B       loc_FF069510 \n"
 133 
 134 "loc_FF06950C:\n"
 135 "    BL      sub_FF069C2C \n"
 136 
 137 "loc_FF069510:\n"
 138 "    STR     R6, [R4, #0x28] \n"
 139 "    B       loc_FF069684 \n"
 140 
 141 "loc_FF069518:\n"
 142 "    BL      sub_FF069C34 \n"
 143 "    B       loc_FF069684 \n"
 144 
 145 "loc_FF069520:\n"
 146 "    BL      sub_FF069E20 \n"
 147 "    B       loc_FF069548 \n"
 148 
 149 "loc_FF069528:\n"
 150 "    LDR     R5, [R0, #0x10] \n"
 151 "    MOV     R0, R5 \n"
 152 "    BL      sub_FF183494 \n"
 153 "    MOV     R2, R5 \n"
 154 "    MOV     R1, #9 \n"
 155 "    BL      sub_FF067464 \n"
 156 "    B       loc_FF069684 \n"
 157 
 158 "loc_FF069544:\n"
 159 "    BL      sub_FF069EB0 \n"
 160 
 161 "loc_FF069548:\n"
 162 "    BL      sub_FF066ED0 \n"
 163 "    B       loc_FF069684 \n"
 164 
 165 "loc_FF069550:\n"
 166 "    LDR     R0, [R4, #0x58] \n"
 167 "    BL      sub_FF06A5C4 \n"
 168 "    B       loc_FF069684 \n"
 169 
 170 "loc_FF06955C:\n"
 171 "    BL      sub_FF06A8B8 \n"
 172 "    B       loc_FF069684 \n"
 173 
 174 "loc_FF069564:\n"
 175 "    LDRH    R0, [R4] \n"
 176 "    SUB     R1, R0, #0x4200 \n"
 177 "    SUBS    R1, R1, #0x39 \n"
 178 "    MOVNE   R0, #0 \n"
 179 "    MOVEQ   R0, #1 \n"
 180 "    BL      sub_FF06A91C \n"
 181 "    B       loc_FF069684 \n"
 182 
 183 "loc_FF069580:\n"
 184 "    BL      sub_FF06AB08 \n"
 185 "    B       loc_FF069684 \n"
 186 
 187 "loc_FF069588:\n"
 188 "    BL      sub_FF06AF6C \n"
 189 "    B       loc_FF069684 \n"
 190 
 191 "loc_FF069590:\n"
 192 "    BL      sub_FF06B020 \n"
 193 "    B       loc_FF069684 \n"
 194 
 195 "loc_FF069598:\n"
 196 "    BL      sub_FF069C2C \n"
 197 "    B       loc_FF069684 \n"
 198 
 199 "loc_FF0695A0:\n"
 200 "    BL      sub_FF181F6C \n"
 201 "    B       loc_FF069684 \n"
 202 
 203 "loc_FF0695A8:\n"
 204 "    BL      sub_FF1821D4 \n"
 205 "    B       loc_FF069684 \n"
 206 
 207 "loc_FF0695B0:\n"
 208 "    BL      sub_FF18228C \n"
 209 "    B       loc_FF069684 \n"
 210 
 211 "loc_FF0695B8:\n"
 212 "    BL      sub_FF182360 \n"
 213 "    B       loc_FF069684 \n"
 214 
 215 "loc_FF0695C0:\n"
 216 "    MOV     R0, #0 \n"
 217 "    B       loc_FF0695E4 \n"
 218 
 219 "loc_FF0695C8:\n"
 220 "    BL      sub_FF182784 \n"
 221 "    B       loc_FF069684 \n"
 222 
 223 "loc_FF0695D0:\n"
 224 "    BL      sub_FF182818 \n"
 225 "    B       loc_FF069684 \n"
 226 
 227 "loc_FF0695D8:\n"
 228 "    BL      sub_FF1828D0 \n"
 229 "    B       loc_FF069684 \n"
 230 
 231 "loc_FF0695E0:\n"
 232 "    MOV     R0, #1 \n"
 233 
 234 "loc_FF0695E4:\n"
 235 "    BL      sub_FF182614 \n"
 236 "    B       loc_FF069684 \n"
 237 
 238 "loc_FF0695EC:\n"
 239 "    BL      sub_FF06A100 \n"
 240 "    B       loc_FF069684 \n"
 241 
 242 "loc_FF0695F4:\n"
 243 "    BL      sub_FF06A194 \n"
 244 "    BL      sub_FF021F04 \n"
 245 "    B       loc_FF069684 \n"
 246 
 247 "loc_FF069600:\n"
 248 "    BL      sub_FF182430 \n"
 249 "    B       loc_FF069684 \n"
 250 
 251 "loc_FF069608:\n"
 252 "    BL      sub_FF182498 \n"
 253 "    B       loc_FF069684 \n"
 254 
 255 "loc_FF069610:\n"
 256 "    BL      sub_FF06C8D8 \n"
 257 "    B       loc_FF069684 \n"
 258 
 259 "loc_FF069618:\n"
 260 "    BL      sub_FF06C960 \n"
 261 "    B       loc_FF069684 \n"
 262 
 263 "loc_FF069620:\n"
 264 "    LDR     R0, [R0, #0xC] \n"
 265 "    BL      sub_FF1829E8 \n"
 266 "    B       loc_FF069684 \n"
 267 
 268 "loc_FF06962C:\n"
 269 "    BL      sub_FF182A58 \n"
 270 "    B       loc_FF069684 \n"
 271 
 272 "loc_FF069634:\n"
 273 "    BL      sub_FF06C9C8 \n"
 274 "    BL      sub_FF06C980 \n"
 275 "    B       loc_FF069684 \n"
 276 
 277 "loc_FF069640:\n"
 278 "    MOV     R0, #1 \n"
 279 "    BL      sub_FF183BAC \n"
 280 "    MOV     R0, #1 \n"
 281 "    BL      sub_FF183CE0 \n"
 282 "    LDRH    R0, [R4, #0xA4] \n"
 283 "    CMP     R0, #4 \n"
 284 "    LDRNEH  R0, [R4] \n"
 285 "    SUBNE   R1, R0, #0x4200 \n"
 286 "    SUBNES  R1, R1, #0x2E \n"
 287 "    BNE     loc_FF069684 \n"
 288 "    BL      sub_FF06C960 \n"
 289 "    BL      sub_FF06CFB0 \n"
 290 "    BL      sub_FF06CDF0 \n"
 291 "    B       loc_FF069684 \n"
 292 
 293 "loc_FF069678:\n"
 294 "    LDR     R1, =0x5F4 \n"
 295 "    LDR     R0, =0xFF068E4C /*'SsShootTask.c'*/ \n"
 296 "    BL      _DebugAssert \n"
 297 
 298 "loc_FF069684:\n"
 299 "    LDR     R0, [SP] \n"
 300 "    LDR     R1, [R0, #4] \n"
 301 "    LDR     R0, [R7] \n"
 302 "    BL      sub_0047AC6C /*_SetEventFlag*/ \n"
 303 "    LDR     R5, [SP] \n"
 304 "    LDR     R0, [R5, #8] \n"
 305 "    CMP     R0, #0 \n"
 306 "    LDREQ   R1, =0x117 \n"
 307 "    LDREQ   R0, =0xFF068E4C /*'SsShootTask.c'*/ \n"
 308 "    BLEQ    _DebugAssert \n"
 309 "    STR     R6, [R5, #8] \n"
 310 "    B       loc_FF0693A0 \n"
 311 );
 312 }
 313 
 314 /*************************************************************/
 315 //** sub_FF183354_my @ 0xFF183354 - 0xFF1833F4, length=41
 316 void __attribute__((naked,noinline)) sub_FF183354_my() {
 317 asm volatile (
 318 "    STMFD   SP!, {R4-R6,LR} \n"
 319 "    LDR     R5, =0x397BC \n"
 320 "    MOV     R6, R0 \n"
 321 "    LDR     R0, [R5, #0x28] \n"
 322 "    MOV     R4, #0 \n"
 323 "    CMP     R0, #0 \n"
 324 "    BNE     loc_FF183384 \n"
 325 "    MOV     R0, #0xC \n"
 326 "    BL      sub_FF06E778 \n"
 327 "    TST     R0, #1 \n"
 328 "    MOVNE   R0, #1 \n"
 329 "    LDMNEFD SP!, {R4-R6,PC} \n"
 330 
 331 "loc_FF183384:\n"
 332 "    BL      sub_FF069C3C \n"
 333 "    LDR     R0, [R5, #0x28] \n"
 334 "    CMP     R0, #0 \n"
 335 "    BNE     loc_FF1833E0 \n"
 336 "    MOV     R0, R6 \n"
 337 "    BL      sub_FF182BD4 \n"
 338 "    TST     R0, #1 \n"
 339 "    LDMNEFD SP!, {R4-R6,PC} \n"
 340 "    MOV     R0, R6 \n"
 341 "    BL      sub_FF182F84 \n"
 342 "    BL      sub_FF183978 \n"
 343 "    BL      sub_FF0672E0 \n"
 344 "    BL      wait_until_remote_button_is_released\n"    // added
 345 "    BL      capt_seq_hook_set_nr\n"                    // added
 346 "    MOV     R0, #2 \n"
 347 "    BL      sub_FF06FEF8 \n"
 348 "    LDR     R0, [R5, #0x94] \n"
 349 "    TST     R0, #0x10 \n"
 350 "    MOV     R0, R6 \n"
 351 "    BEQ     loc_FF1833D4 \n"
 352 "    BL      sub_FF2EB4C4 \n"
 353 "    B       loc_FF1833D8 \n"
 354 
 355 "loc_FF1833D4:\n"
 356 "    BL      sub_FF2EB094 \n"
 357 
 358 "loc_FF1833D8:\n"
 359 "    MOV     R4, R0 \n"
 360 "    B       loc_FF1833F0 \n"
 361 
 362 "loc_FF1833E0:\n"
 363 "    LDR     R0, =0x7254 \n"
 364 "    LDR     R0, [R0] \n"
 365 "    CMP     R0, #0 \n"
 366 "    MOVNE   R4, #0x1D \n"
 367 
 368 "loc_FF1833F0:\n"
 369 "    MOV     R0, R4 \n"
 370 "    LDMFD   SP!, {R4-R6,PC} \n"
 371 );
 372 }
 373 
 374 /*************************************************************/
 375 //** exp_drv_task @ 0xFF0B2264 - 0xFF0B28F4, length=421
 376 void __attribute__((naked,noinline)) exp_drv_task() {
 377 asm volatile (
 378 "    STMFD   SP!, {R4-R9,LR} \n"
 379 "    SUB     SP, SP, #0x2C \n"
 380 "    LDR     R6, =0x42F0 \n"
 381 "    LDR     R7, =0xBB8 \n"
 382 "    LDR     R4, =0x567C0 \n"
 383 "    MOV     R0, #0 \n"
 384 "    ADD     R5, SP, #0x1C \n"
 385 "    STR     R0, [SP, #0xC] \n"
 386 
 387 "loc_FF0B2284:\n"
 388 "    LDR     R0, [R6, #0x20] \n"
 389 "    MOV     R2, #0 \n"
 390 "    ADD     R1, SP, #0x28 \n"
 391 "    BL      sub_00477218 /*_ReceiveMessageQueue*/ \n"
 392 "    LDR     R0, [SP, #0xC] \n"
 393 "    CMP     R0, #1 \n"
 394 "    BNE     loc_FF0B22D0 \n"
 395 "    LDR     R0, [SP, #0x28] \n"
 396 "    LDR     R0, [R0] \n"
 397 "    CMP     R0, #0x14 \n"
 398 "    CMPNE   R0, #0x15 \n"
 399 "    CMPNE   R0, #0x16 \n"
 400 "    CMPNE   R0, #0x17 \n"
 401 "    BEQ     loc_FF0B2430 \n"
 402 "    CMP     R0, #0x2A \n"
 403 "    BEQ     loc_FF0B23B8 \n"
 404 "    ADD     R1, SP, #0xC \n"
 405 "    MOV     R0, #0 \n"
 406 "    BL      sub_FF0B2214 \n"
 407 
 408 "loc_FF0B22D0:\n"
 409 "    LDR     R0, [SP, #0x28] \n"
 410 "    LDR     R1, [R0] \n"
 411 "    CMP     R1, #0x30 \n"
 412 "    BNE     loc_FF0B22FC \n"
 413 "    BL      sub_FF0B3660 \n"
 414 "    LDR     R0, [R6, #0x1C] \n"
 415 "    MOV     R1, #1 \n"
 416 "    BL      sub_0047AC6C /*_SetEventFlag*/ \n"
 417 "    BL      _ExitTask \n"
 418 "    ADD     SP, SP, #0x2C \n"
 419 "    LDMFD   SP!, {R4-R9,PC} \n"
 420 
 421 "loc_FF0B22FC:\n"
 422 "    CMP     R1, #0x2F \n"
 423 "    BNE     loc_FF0B2318 \n"
 424 "    LDR     R2, [R0, #0x8C]! \n"
 425 "    LDR     R1, [R0, #4] \n"
 426 "    MOV     R0, R1 \n"
 427 "    BLX     R2 \n"
 428 "    B       loc_FF0B28EC \n"
 429 
 430 "loc_FF0B2318:\n"
 431 "    CMP     R1, #0x28 \n"
 432 "    BNE     loc_FF0B2368 \n"
 433 "    LDR     R0, [R6, #0x1C] \n"
 434 "    MOV     R1, #0x80 \n"
 435 "    BL      sub_0047ACA0 /*_ClearEventFlag*/ \n"
 436 "    LDR     R0, =0xFF0AD148 \n"
 437 "    MOV     R1, #0x80 \n"
 438 "    BL      sub_FF173D90 \n"
 439 "    LDR     R0, [R6, #0x1C] \n"
 440 "    MOV     R2, R7 \n"
 441 "    MOV     R1, #0x80 \n"
 442 "    BL      sub_0047ABAC /*_WaitForAllEventFlag*/ \n"
 443 "    TST     R0, #1 \n"
 444 "    LDRNE   R1, =0x1599 \n"
 445 "    BNE     loc_FF0B2424 \n"
 446 
 447 "loc_FF0B2354:\n"
 448 "    LDR     R1, [SP, #0x28] \n"
 449 "    LDR     R0, [R1, #0x90] \n"
 450 "    LDR     R1, [R1, #0x8C] \n"
 451 "    BLX     R1 \n"
 452 "    B       loc_FF0B28EC \n"
 453 
 454 "loc_FF0B2368:\n"
 455 "    CMP     R1, #0x29 \n"
 456 "    BNE     loc_FF0B23B0 \n"
 457 "    ADD     R1, SP, #0xC \n"
 458 "    BL      sub_FF0B2214 \n"
 459 "    LDR     R0, [R6, #0x1C] \n"
 460 "    MOV     R1, #0x100 \n"
 461 "    BL      sub_0047ACA0 /*_ClearEventFlag*/ \n"
 462 "    LDR     R0, =0xFF0AD158 \n"
 463 "    MOV     R1, #0x100 \n"
 464 "    BL      sub_FF173F30 \n"
 465 "    LDR     R0, [R6, #0x1C] \n"
 466 "    MOV     R2, R7 \n"
 467 "    MOV     R1, #0x100 \n"
 468 "    BL      sub_0047ABAC /*_WaitForAllEventFlag*/ \n"
 469 "    TST     R0, #1 \n"
 470 "    BEQ     loc_FF0B2354 \n"
 471 "    LDR     R1, =0x15A3 \n"
 472 "    B       loc_FF0B2424 \n"
 473 
 474 "loc_FF0B23B0:\n"
 475 "    CMP     R1, #0x2A \n"
 476 "    BNE     loc_FF0B23C8 \n"
 477 
 478 "loc_FF0B23B8:\n"
 479 "    LDR     R0, [SP, #0x28] \n"
 480 "    ADD     R1, SP, #0xC \n"
 481 "    BL      sub_FF0B2214 \n"
 482 "    B       loc_FF0B2354 \n"
 483 
 484 "loc_FF0B23C8:\n"
 485 "    CMP     R1, #0x2D \n"
 486 "    BNE     loc_FF0B23E0 \n"
 487 "    BL      sub_FF09DC68 \n"
 488 "    BL      sub_FF09E93C \n"
 489 "    BL      sub_FF09E4A8 \n"
 490 "    B       loc_FF0B2354 \n"
 491 
 492 "loc_FF0B23E0:\n"
 493 "    CMP     R1, #0x2E \n"
 494 "    BNE     loc_FF0B2430 \n"
 495 "    LDR     R0, [R6, #0x1C] \n"
 496 "    MOV     R1, #4 \n"
 497 "    BL      sub_0047ACA0 /*_ClearEventFlag*/ \n"
 498 "    LDR     R1, =0xFF0AD178 \n"
 499 "    LDR     R0, =0xFFFFF400 \n"
 500 "    MOV     R2, #4 \n"
 501 "    BL      sub_FF09D6B8 \n"
 502 "    BL      sub_FF09D948 \n"
 503 "    LDR     R0, [R6, #0x1C] \n"
 504 "    MOV     R2, R7 \n"
 505 "    MOV     R1, #4 \n"
 506 "    BL      sub_0047AAC8 /*_WaitForAnyEventFlag*/ \n"
 507 "    TST     R0, #1 \n"
 508 "    BEQ     loc_FF0B2354 \n"
 509 "    LDR     R1, =0x15CB \n"
 510 
 511 "loc_FF0B2424:\n"
 512 "    LDR     R0, =0xFF0AD950 /*'ExpDrv.c'*/ \n"
 513 "    BL      _DebugAssert \n"
 514 "    B       loc_FF0B2354 \n"
 515 
 516 "loc_FF0B2430:\n"
 517 "    LDR     R0, [SP, #0x28] \n"
 518 "    MOV     R8, #1 \n"
 519 "    LDR     R1, [R0] \n"
 520 "    CMP     R1, #0x12 \n"
 521 "    CMPNE   R1, #0x13 \n"
 522 "    BNE     loc_FF0B2498 \n"
 523 "    LDR     R1, [R0, #0x7C] \n"
 524 "    ADD     R1, R1, R1, LSL#1 \n"
 525 "    ADD     R1, R0, R1, LSL#2 \n"
 526 "    SUB     R1, R1, #8 \n"
 527 "    LDMIA   R1, {R2,R3,R9} \n"
 528 "    STMIA   R5, {R2,R3,R9} \n"
 529 "    BL      sub_FF0B03D8 \n"
 530 "    LDR     R0, [SP, #0x28] \n"
 531 "    LDR     R1, [R0, #0x7C] \n"
 532 "    LDR     R3, [R0, #0x8C] \n"
 533 "    LDR     R2, [R0, #0x90] \n"
 534 "    ADD     R0, R0, #4 \n"
 535 "    BLX     R3 \n"
 536 "    LDR     R0, [SP, #0x28] \n"
 537 "    BL      sub_FF0B3A80 \n"
 538 "    LDR     R0, [SP, #0x28] \n"
 539 "    LDR     R1, [R0, #0x7C] \n"
 540 "    LDR     R2, [R0, #0x98] \n"
 541 "    LDR     R3, [R0, #0x94] \n"
 542 "    B       loc_FF0B27B0 \n"
 543 
 544 "loc_FF0B2498:\n"
 545 "    CMP     R1, #0x14 \n"
 546 "    CMPNE   R1, #0x15 \n"
 547 "    CMPNE   R1, #0x16 \n"
 548 "    CMPNE   R1, #0x17 \n"
 549 "    BNE     loc_FF0B2550 \n"
 550 "    ADD     R3, SP, #0xC \n"
 551 "    MOV     R2, SP \n"
 552 "    ADD     R1, SP, #0x1C \n"
 553 "    BL      sub_FF0B0638 \n"
 554 "    CMP     R0, #1 \n"
 555 "    MOV     R9, R0 \n"
 556 "    CMPNE   R9, #5 \n"
 557 "    BNE     loc_FF0B24EC \n"
 558 "    LDR     R0, [SP, #0x28] \n"
 559 "    MOV     R2, R9 \n"
 560 "    LDR     R1, [R0, #0x7C]! \n"
 561 "    LDR     R12, [R0, #0x10]! \n"
 562 "    LDR     R3, [R0, #4] \n"
 563 "    MOV     R0, SP \n"
 564 "    BLX     R12 \n"
 565 "    B       loc_FF0B2524 \n"
 566 
 567 "loc_FF0B24EC:\n"
 568 "    LDR     R0, [SP, #0x28] \n"
 569 "    CMP     R9, #2 \n"
 570 "    LDR     R3, [R0, #0x90] \n"
 571 "    CMPNE   R9, #6 \n"
 572 "    BNE     loc_FF0B2538 \n"
 573 "    LDR     R12, [R0, #0x8C] \n"
 574 "    MOV     R2, R9 \n"
 575 "    MOV     R1, #1 \n"
 576 "    MOV     R0, SP \n"
 577 "    BLX     R12 \n"
 578 "    LDR     R0, [SP, #0x28] \n"
 579 "    MOV     R2, SP \n"
 580 "    ADD     R1, SP, #0x1C \n"
 581 "    BL      sub_FF0B1EEC \n"
 582 
 583 "loc_FF0B2524:\n"
 584 "    LDR     R0, [SP, #0x28] \n"
 585 "    LDR     R2, [SP, #0xC] \n"
 586 "    MOV     R1, R9 \n"
 587 "    BL      sub_FF0B21B4 \n"
 588 "    B       loc_FF0B27B8 \n"
 589 
 590 "loc_FF0B2538:\n"
 591 "    LDR     R1, [R0, #0x7C] \n"
 592 "    LDR     R12, [R0, #0x8C] \n"
 593 "    MOV     R2, R9 \n"
 594 "    ADD     R0, R0, #4 \n"
 595 "    BLX     R12 \n"
 596 "    B       loc_FF0B27B8 \n"
 597 
 598 "loc_FF0B2550:\n"
 599 "    CMP     R1, #0x24 \n"
 600 "    CMPNE   R1, #0x25 \n"
 601 "    BNE     loc_FF0B259C \n"
 602 "    LDR     R1, [R0, #0x7C] \n"
 603 "    ADD     R1, R1, R1, LSL#1 \n"
 604 "    ADD     R1, R0, R1, LSL#2 \n"
 605 "    SUB     R1, R1, #8 \n"
 606 "    LDMIA   R1, {R2,R3,R9} \n"
 607 "    STMIA   R5, {R2,R3,R9} \n"
 608 "    BL      sub_FF0AF158 \n"
 609 "    LDR     R0, [SP, #0x28] \n"
 610 "    LDR     R1, [R0, #0x7C] \n"
 611 "    LDR     R3, [R0, #0x8C] \n"
 612 "    LDR     R2, [R0, #0x90] \n"
 613 "    ADD     R0, R0, #4 \n"
 614 "    BLX     R3 \n"
 615 "    LDR     R0, [SP, #0x28] \n"
 616 "    BL      sub_FF0AF62C \n"
 617 "    B       loc_FF0B27B8 \n"
 618 
 619 "loc_FF0B259C:\n"
 620 "    ADD     R1, R0, #4 \n"
 621 "    LDMIA   R1, {R2,R3,R9} \n"
 622 "    STMIA   R5, {R2,R3,R9} \n"
 623 "    LDR     R1, [R0] \n"
 624 "    CMP     R1, #0x28 \n"
 625 "    ADDCC   PC, PC, R1, LSL#2 \n"
 626 "    B       loc_FF0B27A0 \n"
 627 "    B       loc_FF0B2658 \n"
 628 "    B       loc_FF0B2658 \n"
 629 "    B       loc_FF0B2660 \n"
 630 "    B       loc_FF0B2668 \n"
 631 "    B       loc_FF0B2668 \n"
 632 "    B       loc_FF0B2668 \n"
 633 "    B       loc_FF0B2658 \n"
 634 "    B       loc_FF0B2660 \n"
 635 "    B       loc_FF0B2668 \n"
 636 "    B       loc_FF0B2668 \n"
 637 "    B       loc_FF0B2680 \n"
 638 "    B       loc_FF0B2680 \n"
 639 "    B       loc_FF0B278C \n"
 640 "    B       loc_FF0B2794 \n"
 641 "    B       loc_FF0B2794 \n"
 642 "    B       loc_FF0B2794 \n"
 643 "    B       loc_FF0B2794 \n"
 644 "    B       loc_FF0B279C \n"
 645 "    B       loc_FF0B27A0 \n"
 646 "    B       loc_FF0B27A0 \n"
 647 "    B       loc_FF0B27A0 \n"
 648 "    B       loc_FF0B27A0 \n"
 649 "    B       loc_FF0B27A0 \n"
 650 "    B       loc_FF0B27A0 \n"
 651 "    B       loc_FF0B2670 \n"
 652 "    B       loc_FF0B2678 \n"
 653 "    B       loc_FF0B2678 \n"
 654 "    B       loc_FF0B2678 \n"
 655 "    B       loc_FF0B268C \n"
 656 "    B       loc_FF0B268C \n"
 657 "    B       loc_FF0B2694 \n"
 658 "    B       loc_FF0B26CC \n"
 659 "    B       loc_FF0B2704 \n"
 660 "    B       loc_FF0B273C \n"
 661 "    B       loc_FF0B2774 \n"
 662 "    B       loc_FF0B2774 \n"
 663 "    B       loc_FF0B27A0 \n"
 664 "    B       loc_FF0B27A0 \n"
 665 "    B       loc_FF0B277C \n"
 666 "    B       loc_FF0B2784 \n"
 667 
 668 "loc_FF0B2658:\n"
 669 "    BL      sub_FF0AD784 \n"
 670 "    B       loc_FF0B27A0 \n"
 671 
 672 "loc_FF0B2660:\n"
 673 "    BL      sub_FF0ADA7C \n"
 674 "    B       loc_FF0B27A0 \n"
 675 
 676 "loc_FF0B2668:\n"
 677 "    BL      sub_FF0ADCE4 \n"
 678 "    B       loc_FF0B27A0 \n"
 679 
 680 "loc_FF0B2670:\n"
 681 "    BL      sub_FF0ADFD8 \n"
 682 "    B       loc_FF0B27A0 \n"
 683 
 684 "loc_FF0B2678:\n"
 685 "    BL      sub_FF0AE1F0 \n"
 686 "    B       loc_FF0B27A0 \n"
 687 
 688 "loc_FF0B2680:\n"
 689 "    BL      sub_FF0AE6E0_my \n"  // --> Patched. Old value = 0xFF0AE6E0.
 690 "    MOV     R8, #0 \n"
 691 "    B       loc_FF0B27A0 \n"
 692 
 693 "loc_FF0B268C:\n"
 694 "    BL      sub_FF0AE8BC \n"
 695 "    B       loc_FF0B27A0 \n"
 696 
 697 "loc_FF0B2694:\n"
 698 "    LDRH    R1, [R0, #4] \n"
 699 "    STRH    R1, [SP, #0x1C] \n"
 700 "    LDRH    R1, [R4, #2] \n"
 701 "    STRH    R1, [SP, #0x1E] \n"
 702 "    LDRH    R1, [R4, #4] \n"
 703 "    STRH    R1, [SP, #0x20] \n"
 704 "    LDRH    R1, [R4, #6] \n"
 705 "    STRH    R1, [SP, #0x22] \n"
 706 "    LDRH    R1, [R0, #0xC] \n"
 707 "    STRH    R1, [SP, #0x24] \n"
 708 "    LDRH    R1, [R4, #0xA] \n"
 709 "    STRH    R1, [SP, #0x26] \n"
 710 "    BL      sub_FF0B36F4 \n"
 711 "    B       loc_FF0B27A0 \n"
 712 
 713 "loc_FF0B26CC:\n"
 714 "    LDRH    R1, [R0, #4] \n"
 715 "    STRH    R1, [SP, #0x1C] \n"
 716 "    LDRH    R1, [R4, #2] \n"
 717 "    STRH    R1, [SP, #0x1E] \n"
 718 "    LDRH    R1, [R4, #4] \n"
 719 "    STRH    R1, [SP, #0x20] \n"
 720 "    LDRH    R1, [R4, #6] \n"
 721 "    STRH    R1, [SP, #0x22] \n"
 722 "    LDRH    R1, [R4, #8] \n"
 723 "    STRH    R1, [SP, #0x24] \n"
 724 "    LDRH    R1, [R4, #0xA] \n"
 725 "    STRH    R1, [SP, #0x26] \n"
 726 "    BL      sub_FF0B3880 \n"
 727 "    B       loc_FF0B27A0 \n"
 728 
 729 "loc_FF0B2704:\n"
 730 "    LDRH    R1, [R4] \n"
 731 "    STRH    R1, [SP, #0x1C] \n"
 732 "    LDRH    R1, [R0, #6] \n"
 733 "    STRH    R1, [SP, #0x1E] \n"
 734 "    LDRH    R1, [R4, #4] \n"
 735 "    STRH    R1, [SP, #0x20] \n"
 736 "    LDRH    R1, [R4, #6] \n"
 737 "    STRH    R1, [SP, #0x22] \n"
 738 "    LDRH    R1, [R4, #8] \n"
 739 "    STRH    R1, [SP, #0x24] \n"
 740 "    LDRH    R1, [R4, #0xA] \n"
 741 "    STRH    R1, [SP, #0x26] \n"
 742 "    BL      sub_FF0B3934 \n"
 743 "    B       loc_FF0B27A0 \n"
 744 
 745 "loc_FF0B273C:\n"
 746 "    LDRH    R1, [R4] \n"
 747 "    STRH    R1, [SP, #0x1C] \n"
 748 "    LDRH    R1, [R4, #2] \n"
 749 "    STRH    R1, [SP, #0x1E] \n"
 750 "    LDRH    R1, [R4, #4] \n"
 751 "    STRH    R1, [SP, #0x20] \n"
 752 "    LDRH    R1, [R4, #6] \n"
 753 "    STRH    R1, [SP, #0x22] \n"
 754 "    LDRH    R1, [R0, #0xC] \n"
 755 "    STRH    R1, [SP, #0x24] \n"
 756 "    LDRH    R1, [R4, #0xA] \n"
 757 "    STRH    R1, [SP, #0x26] \n"
 758 "    BL      sub_FF0B39DC \n"
 759 "    B       loc_FF0B27A0 \n"
 760 
 761 "loc_FF0B2774:\n"
 762 "    BL      sub_FF0AEF0C \n"
 763 "    B       loc_FF0B27A0 \n"
 764 
 765 "loc_FF0B277C:\n"
 766 "    BL      sub_FF0AF730 \n"
 767 "    B       loc_FF0B27A0 \n"
 768 
 769 "loc_FF0B2784:\n"
 770 "    BL      sub_FF0AFC88 \n"
 771 "    B       loc_FF0B27A0 \n"
 772 
 773 "loc_FF0B278C:\n"
 774 "    BL      sub_FF0AFEAC \n"
 775 "    B       loc_FF0B27A0 \n"
 776 
 777 "loc_FF0B2794:\n"
 778 "    BL      sub_FF0B0068 \n"
 779 "    B       loc_FF0B27A0 \n"
 780 
 781 "loc_FF0B279C:\n"
 782 "    BL      sub_FF0B01D0 \n"
 783 
 784 "loc_FF0B27A0:\n"
 785 "    LDR     R0, [SP, #0x28] \n"
 786 "    LDR     R1, [R0, #0x7C] \n"
 787 "    LDR     R2, [R0, #0x90] \n"
 788 "    LDR     R3, [R0, #0x8C] \n"
 789 
 790 "loc_FF0B27B0:\n"
 791 "    ADD     R0, R0, #4 \n"
 792 "    BLX     R3 \n"
 793 
 794 "loc_FF0B27B8:\n"
 795 "    LDR     R0, [SP, #0x28] \n"
 796 "    LDR     R0, [R0] \n"
 797 "    CMP     R0, #0x10 \n"
 798 "    BEQ     loc_FF0B27F0 \n"
 799 "    BGT     loc_FF0B27E0 \n"
 800 "    CMP     R0, #1 \n"
 801 "    CMPNE   R0, #4 \n"
 802 "    CMPNE   R0, #0xE \n"
 803 "    BNE     loc_FF0B2824 \n"
 804 "    B       loc_FF0B27F0 \n"
 805 
 806 "loc_FF0B27E0:\n"
 807 "    CMP     R0, #0x13 \n"
 808 "    CMPNE   R0, #0x17 \n"
 809 "    CMPNE   R0, #0x1A \n"
 810 "    BNE     loc_FF0B2824 \n"
 811 
 812 "loc_FF0B27F0:\n"
 813 "    LDRSH   R0, [R4] \n"
 814 "    CMN     R0, #0xC00 \n"
 815 "    LDRNESH R1, [R4, #8] \n"
 816 "    CMNNE   R1, #0xC00 \n"
 817 "    STRNEH  R0, [SP, #0x1C] \n"
 818 "    STRNEH  R1, [SP, #0x24] \n"
 819 "    BNE     loc_FF0B2824 \n"
 820 "    ADD     R0, SP, #0x10 \n"
 821 "    BL      sub_FF0B3C90 \n"
 822 "    LDRH    R0, [SP, #0x10] \n"
 823 "    STRH    R0, [SP, #0x1C] \n"
 824 "    LDRH    R0, [SP, #0x18] \n"
 825 "    STRH    R0, [SP, #0x24] \n"
 826 
 827 "loc_FF0B2824:\n"
 828 "    LDR     R0, [SP, #0x28] \n"
 829 "    CMP     R8, #1 \n"
 830 "    BNE     loc_FF0B2874 \n"
 831 "    LDR     R1, [R0, #0x7C] \n"
 832 "    MOV     R2, #0xC \n"
 833 "    ADD     R1, R1, R1, LSL#1 \n"
 834 "    ADD     R0, R0, R1, LSL#2 \n"
 835 "    SUB     R8, R0, #8 \n"
 836 "    LDR     R0, =0x567C0 \n"
 837 "    ADD     R1, SP, #0x1C \n"
 838 "    BL      sub_0047C17C \n"
 839 "    LDR     R0, =0x567CC \n"
 840 "    MOV     R2, #0xC \n"
 841 "    ADD     R1, SP, #0x1C \n"
 842 "    BL      sub_0047C17C \n"
 843 "    LDR     R0, =0x567D8 \n"
 844 "    MOV     R2, #0xC \n"
 845 "    MOV     R1, R8 \n"
 846 "    BL      sub_0047C17C \n"
 847 "    B       loc_FF0B28EC \n"
 848 
 849 "loc_FF0B2874:\n"
 850 "    LDR     R0, [R0] \n"
 851 "    MOV     R3, #1 \n"
 852 "    CMP     R0, #0xB \n"
 853 "    BNE     loc_FF0B28B8 \n"
 854 "    MOV     R2, #0 \n"
 855 "    STRD    R2, [SP] \n"
 856 "    MOV     R2, R3 \n"
 857 "    MOV     R1, R3 \n"
 858 "    MOV     R0, #0 \n"
 859 "    BL      sub_FF0AD564 \n"
 860 "    MOV     R3, #1 \n"
 861 "    MOV     R2, #0 \n"
 862 "    STRD    R2, [SP] \n"
 863 "    MOV     R2, R3 \n"
 864 "    MOV     R1, R3 \n"
 865 "    MOV     R0, #0 \n"
 866 "    B       loc_FF0B28E8 \n"
 867 
 868 "loc_FF0B28B8:\n"
 869 "    MOV     R2, #1 \n"
 870 "    STRD    R2, [SP] \n"
 871 "    MOV     R3, R2 \n"
 872 "    MOV     R1, R2 \n"
 873 "    MOV     R0, R2 \n"
 874 "    BL      sub_FF0AD564 \n"
 875 "    MOV     R3, #1 \n"
 876 "    MOV     R2, R3 \n"
 877 "    MOV     R1, R3 \n"
 878 "    MOV     R0, R3 \n"
 879 "    STR     R3, [SP] \n"
 880 "    STR     R3, [SP, #4] \n"
 881 
 882 "loc_FF0B28E8:\n"
 883 "    BL      sub_FF0AD6D0 \n"
 884 
 885 "loc_FF0B28EC:\n"
 886 "    LDR     R0, [SP, #0x28] \n"
 887 "    BL      sub_FF0B3660 \n"
 888 "    B       loc_FF0B2284 \n"
 889 );
 890 }
 891 
 892 /*************************************************************/
 893 //** sub_FF0AE6E0_my @ 0xFF0AE6E0 - 0xFF0AE7A0, length=49
 894 void __attribute__((naked,noinline)) sub_FF0AE6E0_my() {
 895 asm volatile (
 896 "    STMFD   SP!, {R4-R8,LR} \n"
 897 "    LDR     R7, =0x42F0 \n"
 898 "    MOV     R4, R0 \n"
 899 "    LDR     R0, [R7, #0x1C] \n"
 900 "    MOV     R1, #0x3E \n"
 901 "    BL      sub_0047ACA0 /*_ClearEventFlag*/ \n"
 902 "    MOV     R2, #0 \n"
 903 "    LDRSH   R0, [R4, #4] \n"
 904 "    MOV     R1, R2 \n"
 905 "    BL      sub_FF0AD1D8 \n"
 906 "    MOV     R6, R0 \n"
 907 "    LDRSH   R0, [R4, #6] \n"
 908 "    BL      sub_FF0AD37C \n"
 909 "    LDRSH   R0, [R4, #8] \n"
 910 "    BL      sub_FF0AD3D4 \n"
 911 "    LDRSH   R0, [R4, #0xA] \n"
 912 "    BL      sub_FF0AD42C \n"
 913 "    LDRSH   R0, [R4, #0xC] \n"
 914 "    MOV     R1, #0 \n"
 915 "    BL      sub_FF0AD484 \n"
 916 "    MOV     R5, R0 \n"
 917 "    LDR     R0, [R4] \n"
 918 "    LDR     R8, =0x567D8 \n"
 919 "    CMP     R0, #0xB \n"
 920 "    MOVEQ   R6, #0 \n"
 921 "    MOVEQ   R5, R6 \n"
 922 "    BEQ     loc_FF0AE774 \n"
 923 "    CMP     R6, #1 \n"
 924 "    BNE     loc_FF0AE774 \n"
 925 "    LDRSH   R0, [R4, #4] \n"
 926 "    LDR     R1, =0xFF0AD138 \n"
 927 "    MOV     R2, #2 \n"
 928 "    BL      sub_FF173E14 \n"
 929 "    STRH    R0, [R4, #4] \n"
 930 "    MOV     R0, #0 \n"
 931 "    STR     R0, [R7, #0x28] \n"
 932 "    B       loc_FF0AE77C \n"
 933 
 934 "loc_FF0AE774:\n"
 935 "    LDRH    R0, [R8] \n"
 936 "    STRH    R0, [R4, #4] \n"
 937 
 938 "loc_FF0AE77C:\n"
 939 "    CMP     R5, #1 \n"
 940 "    LDRNEH  R0, [R8, #8] \n"
 941 "    BNE     loc_FF0AE798 \n"
 942 "    LDRSH   R0, [R4, #0xC] \n"
 943 "    LDR     R1, =0xFF0AD1BC \n"
 944 "    MOV     R2, #0x20 \n"
 945 "    BL      sub_FF0B36B0 \n"
 946 
 947 "loc_FF0AE798:\n"
 948 "    STRH    R0, [R4, #0xC] \n"
 949 "    LDRSH   R0, [R4, #6] \n"
 950 "    BL      sub_FF09D9B4_my \n"  // --> Patched. Old value = 0xFF09D9B4.
 951 "    LDR     PC, =0xFF0AE7A4 \n"  // Continue in firmware
 952 );
 953 }
 954 
 955 /*************************************************************/
 956 //** sub_FF09D9B4_my @ 0xFF09D9B4 - 0xFF09D9F4, length=17
 957 void __attribute__((naked,noinline)) sub_FF09D9B4_my() {
 958 asm volatile (
 959 "    STMFD   SP!, {R4-R6,LR} \n"
 960 "    LDR     R5, =0x3F60 \n"
 961 "    MOV     R4, R0 \n"
 962 "    LDR     R0, [R5, #4] \n"
 963 "    CMP     R0, #1 \n"
 964 "    LDRNE   R1, =0x14D \n"
 965 "    LDRNE   R0, =0xFF09D7EC /*'Shutter.c'*/ \n"
 966 "    BLNE    _DebugAssert \n"
 967 "    CMN     R4, #0xC00 \n"
 968 "    LDREQSH R4, [R5, #2] \n"
 969 "    CMN     R4, #0xC00 \n"
 970 "    LDREQ   R1, =0x153 \n"
 971 "    LDREQ   R0, =0xFF09D7EC /*'Shutter.c'*/ \n"
 972 "    STRH    R4, [R5, #2] \n"
 973 "    BLEQ    _DebugAssert \n"
 974 "    MOV     R0, R4 \n"
 975 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
 976 "    LDR     PC, =0xFF09D9F8 \n"  // Continue in firmware
 977 );
 978 }

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