root/platform/sx530hs/sub/100c/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF222478_my
  3. sub_FF22228C_my
  4. sub_FF3D76C8_my
  5. exp_drv_task
  6. sub_FF0F39C0_my
  7. sub_FF0DF410_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_min.S
   9 #define NR_AUTO (0)        // have to explictly reset value back to 0 to enable auto
  10 
  11 #define PAUSE_FOR_FILE_COUNTER 350  // Enable delay in capt_seq_hook_raw_here to ensure file counter is updated
  12 
  13 #include "../../../generic/capt_seq.c"
  14 
  15 /*************************************************************/
  16 //** capt_seq_task @ 0xFF09C8C4 - 0xFF09CBD8, length=198
  17 void __attribute__((naked,noinline)) capt_seq_task() {
  18 asm volatile (
  19 "    STMFD   SP!, {R3-R7,LR} \n"
  20 "    LDR     R5, =0x27FDC \n"
  21 "    LDR     R7, =0x3A3C \n"
  22 "    MOV     R6, #0 \n"
  23 
  24 "loc_FF09C8D4:\n"
  25 "    LDR     R0, [R7, #8] \n"
  26 "    MOV     R2, #0 \n"
  27 "    MOV     R1, SP \n"
  28 "    BL      sub_006B849C /*_ReceiveMessageQueue*/ \n"
  29 "    TST     R0, #1 \n"
  30 "    BEQ     loc_FF09C904 \n"
  31 "    LDR     R2, =0x435 \n"
  32 "    LDR     R1, =0xFF09C168 /*'SsShootTask.c'*/ \n"
  33 "    MOV     R0, #0 \n"
  34 "    BL      _DebugAssert \n"
  35 "    BL      _ExitTask \n"
  36 "    LDMFD   SP!, {R3-R7,PC} \n"
  37 
  38 "loc_FF09C904:\n"
  39 "    LDR     R0, [SP] \n"
  40 "    LDR     R0, [R0] \n"
  41 "    CMP     R0, #1 \n"
  42 "    CMPNE   R0, #0x27 \n"
  43 "    CMPNE   R0, #0x1E \n"
  44 "    BLNE    sub_FF22351C \n"
  45 "    LDR     R0, [SP] \n"
  46 "    LDR     R1, [R0] \n"
  47 "    CMP     R1, #0x29 \n"
  48 "    ADDCC   PC, PC, R1, LSL#2 \n"
  49 "    B       loc_FF09CB9C \n"
  50 "    B       loc_FF09C9D4 \n"
  51 "    B       loc_FF09C9F4 \n"
  52 "    B       loc_FF09CA00 \n"
  53 "    B       loc_FF09CA14 \n"
  54 "    B       loc_FF09CA0C \n"
  55 "    B       loc_FF09CA28 \n"
  56 "    B       loc_FF09CA30 \n"
  57 "    B       loc_FF09CA38 \n"
  58 "    B       loc_FF09CA44 \n"
  59 "    B       loc_FF09CA88 \n"
  60 "    B       loc_FF09CA50 \n"
  61 "    B       loc_FF09CA5C \n"
  62 "    B       loc_FF09CA64 \n"
  63 "    B       loc_FF09CA70 \n"
  64 "    B       loc_FF09CA78 \n"
  65 "    B       loc_FF09CA80 \n"
  66 "    B       loc_FF09CA98 \n"
  67 "    B       loc_FF09CAA0 \n"
  68 "    B       loc_FF09CAA8 \n"
  69 "    B       loc_FF09CAB0 \n"
  70 "    B       loc_FF09CAB8 \n"
  71 "    B       loc_FF09CAC0 \n"
  72 "    B       loc_FF09CAC8 \n"
  73 "    B       loc_FF09CAD0 \n"
  74 "    B       loc_FF09CAD8 \n"
  75 "    B       loc_FF09CAE0 \n"
  76 "    B       loc_FF09CAE8 \n"
  77 "    B       loc_FF09CAF0 \n"
  78 "    B       loc_FF09CAFC \n"
  79 "    B       loc_FF09CB04 \n"
  80 "    B       loc_FF09CB0C \n"
  81 "    B       loc_FF09CB18 \n"
  82 "    B       loc_FF09CB20 \n"
  83 "    B       loc_FF09CB28 \n"
  84 "    B       loc_FF09CB30 \n"
  85 "    B       loc_FF09CB38 \n"
  86 "    B       loc_FF09CB44 \n"
  87 "    B       loc_FF09CB4C \n"
  88 "    B       loc_FF09CB7C \n"
  89 "    B       loc_FF09CB88 \n"
  90 "    B       loc_FF09CBAC \n"
  91 
  92 "loc_FF09C9D4:\n"
  93 "    LDR     R0, [R0, #0xC] \n"
  94 "    AND     R0, R0, #0xFF \n"
  95 //"    BL      shooting_expo_iso_override\n"      // extra ISO override call doesn't appear to be needed on elph130
  96 "    BL      sub_FF09D1E8 \n"
  97 "    BL      shooting_expo_param_override\n"    // added
  98 "    BL      sub_FF099B58 \n"
  99 // try avoid intermittetant override failues on quick press, not needed?
 100 //"    MOV     R0, #0\n"                          // added
 101 //"    STR     R0, [R5,#0x28]\n"                  // added
 102 "    LDR     R0, [R5, #0x28] \n"
 103 "    CMP     R0, #0 \n"
 104 "    BLNE    sub_FF222478_my \n"  // --> Patched. Old value = 0xFF222478.
 105 "    B       loc_FF09CBAC \n"
 106 
 107 "loc_FF09C9F4:\n"
 108 "    LDR     R0, [R0, #0x10] \n"
 109 "    BL      sub_FF22228C_my \n"  // --> Patched. Old value = 0xFF22228C.
 110 "    B       loc_FF09CBAC \n"
 111 
 112 "loc_FF09CA00:\n"
 113 "    MOV     R0, #1 \n"
 114 "    BL      sub_FF09D574 \n"
 115 "    B       loc_FF09CBAC \n"
 116 
 117 "loc_FF09CA0C:\n"
 118 "    BL      sub_FF09CDA8 \n"
 119 "    B       loc_FF09CA20 \n"
 120 
 121 "loc_FF09CA14:\n"
 122 "    LDR     R0, [R0, #0xC] \n"
 123 "    AND     R0, R0, #0xFF \n"
 124 "    BL      sub_FF09D1BC \n"
 125 
 126 "loc_FF09CA20:\n"
 127 "    STR     R6, [R5, #0x28] \n"
 128 "    B       loc_FF09CBAC \n"
 129 
 130 "loc_FF09CA28:\n"
 131 "    BL      sub_FF09D1C8 \n"
 132 "    B       loc_FF09CBAC \n"
 133 
 134 "loc_FF09CA30:\n"
 135 "    BL      sub_FF09D42C \n"
 136 "    B       loc_FF09CA48 \n"
 137 
 138 "loc_FF09CA38:\n"
 139 "    LDR     R0, [R0, #0x10] \n"
 140 "    BL      sub_FF222554 \n"
 141 "    B       loc_FF09CBAC \n"
 142 
 143 "loc_FF09CA44:\n"
 144 "    BL      sub_FF09D4C4 \n"
 145 
 146 "loc_FF09CA48:\n"
 147 "    BL      sub_FF099B58 \n"
 148 "    B       loc_FF09CBAC \n"
 149 
 150 "loc_FF09CA50:\n"
 151 "    LDR     R0, [R5, #0x54] \n"
 152 "    BL      sub_FF09DCBC \n"
 153 "    B       loc_FF09CBAC \n"
 154 
 155 "loc_FF09CA5C:\n"
 156 "    BL      sub_FF09E014 \n"
 157 "    B       loc_FF09CBAC \n"
 158 
 159 "loc_FF09CA64:\n"
 160 "    LDR     R0, [R0, #0xC] \n"
 161 "    BL      sub_FF09E07C \n"
 162 "    B       loc_FF09CBAC \n"
 163 
 164 "loc_FF09CA70:\n"
 165 "    BL      sub_FF09E238 \n"
 166 "    B       loc_FF09CBAC \n"
 167 
 168 "loc_FF09CA78:\n"
 169 "    BL      sub_FF09E764 \n"
 170 "    B       loc_FF09CBAC \n"
 171 
 172 "loc_FF09CA80:\n"
 173 "    BL      sub_FF09E84C \n"
 174 "    B       loc_FF09CBAC \n"
 175 
 176 "loc_FF09CA88:\n"
 177 "    LDR     R0, [R0, #0xC] \n"
 178 "    AND     R0, R0, #0xFF \n"
 179 "    BL      sub_FF09D1BC \n"
 180 "    B       loc_FF09CBAC \n"
 181 
 182 "loc_FF09CA98:\n"
 183 "    BL      sub_FF220910 \n"
 184 "    B       loc_FF09CBAC \n"
 185 
 186 "loc_FF09CAA0:\n"
 187 "    BL      sub_FF220B68 \n"
 188 "    B       loc_FF09CBAC \n"
 189 
 190 "loc_FF09CAA8:\n"
 191 "    BL      sub_FF220C24 \n"
 192 "    B       loc_FF09CBAC \n"
 193 
 194 "loc_FF09CAB0:\n"
 195 "    BL      sub_FF220CD4 \n"
 196 "    B       loc_FF09CBAC \n"
 197 
 198 "loc_FF09CAB8:\n"
 199 "    BL      sub_FF220DB4 \n"
 200 "    B       loc_FF09CBAC \n"
 201 
 202 "loc_FF09CAC0:\n"
 203 "    MOV     R0, #0 \n"
 204 "    B       loc_FF09CAF4 \n"
 205 
 206 "loc_FF09CAC8:\n"
 207 "    BL      sub_FF221200 \n"
 208 "    B       loc_FF09CBAC \n"
 209 
 210 "loc_FF09CAD0:\n"
 211 "    BL      sub_FF0A5A58 \n"
 212 "    B       loc_FF09CBAC \n"
 213 
 214 "loc_FF09CAD8:\n"
 215 "    BL      sub_FF0A5A64 \n"
 216 "    B       loc_FF09CBAC \n"
 217 
 218 "loc_FF09CAE0:\n"
 219 "    BL      sub_FF2212A4 \n"
 220 "    B       loc_FF09CBAC \n"
 221 
 222 "loc_FF09CAE8:\n"
 223 "    BL      sub_FF221354 \n"
 224 "    B       loc_FF09CBAC \n"
 225 
 226 "loc_FF09CAF0:\n"
 227 "    MOV     R0, #1 \n"
 228 
 229 "loc_FF09CAF4:\n"
 230 "    BL      sub_FF221084 \n"
 231 "    B       loc_FF09CBAC \n"
 232 
 233 "loc_FF09CAFC:\n"
 234 "    BL      sub_FF09D6A4 \n"
 235 "    B       loc_FF09CBAC \n"
 236 
 237 "loc_FF09CB04:\n"
 238 "    MOV     R0, #0 \n"
 239 "    B       loc_FF09CB10 \n"
 240 
 241 "loc_FF09CB0C:\n"
 242 "    LDR     R0, [R0, #0xC] \n"
 243 
 244 "loc_FF09CB10:\n"
 245 "    BL      sub_FF09D734 \n"
 246 "    B       loc_FF09CBAC \n"
 247 
 248 "loc_FF09CB18:\n"
 249 "    BL      sub_FF220F50 \n"
 250 "    B       loc_FF09CBAC \n"
 251 
 252 "loc_FF09CB20:\n"
 253 "    BL      sub_FF220FE4 \n"
 254 "    B       loc_FF09CBAC \n"
 255 
 256 "loc_FF09CB28:\n"
 257 "    BL      sub_FF0A1368 \n"
 258 "    B       loc_FF09CBAC \n"
 259 
 260 "loc_FF09CB30:\n"
 261 "    BL      sub_FF0A14D8 \n"
 262 "    B       loc_FF09CBAC \n"
 263 
 264 "loc_FF09CB38:\n"
 265 "    LDR     R0, [R0, #0xC] \n"
 266 "    BL      sub_FF22146C \n"
 267 "    B       loc_FF09CBAC \n"
 268 
 269 "loc_FF09CB44:\n"
 270 "    BL      sub_FF2214FC \n"
 271 "    B       loc_FF09CBAC \n"
 272 
 273 "loc_FF09CB4C:\n"
 274 "    BL      sub_FF0A46DC \n"
 275 "    LDR     R0, =0x280DC \n"
 276 "    LDRH    R0, [R0, #0xA4] \n"
 277 "    CMP     R0, #4 \n"
 278 "    LDRNEH  R0, [R5] \n"
 279 "    SUBNE   R1, R0, #0x4200 \n"
 280 "    SUBNES  R1, R1, #0x36 \n"
 281 "    BNE     loc_FF09CBAC \n"
 282 "    BL      sub_FF0A14D8 \n"
 283 "    BL      sub_FF0A1BA0 \n"
 284 "    BL      sub_FF0A19E4 \n"
 285 "    B       loc_FF09CBAC \n"
 286 
 287 "loc_FF09CB7C:\n"
 288 "    MOV     R2, #0 \n"
 289 "    MOV     R1, #0x11 \n"
 290 "    B       loc_FF09CB90 \n"
 291 
 292 "loc_FF09CB88:\n"
 293 "    MOV     R2, #0 \n"
 294 "    MOV     R1, #0x10 \n"
 295 
 296 "loc_FF09CB90:\n"
 297 "    MOV     R0, #0 \n"
 298 "    BL      sub_FF09A744 \n"
 299 "    B       loc_FF09CBAC \n"
 300 
 301 "loc_FF09CB9C:\n"
 302 "    LDR     R2, =0x559 \n"
 303 "    LDR     R1, =0xFF09C168 /*'SsShootTask.c'*/ \n"
 304 "    MOV     R0, #0 \n"
 305 "    BL      _DebugAssert \n"
 306 
 307 "loc_FF09CBAC:\n"
 308 "    LDR     R0, [SP] \n"
 309 "    LDR     R1, [R0, #4] \n"
 310 "    LDR     R0, [R7, #4] \n"
 311 "    BL      sub_006B8230 /*_SetEventFlag*/ \n"
 312 "    LDR     R4, [SP] \n"
 313 "    LDR     R0, [R4, #8] \n"
 314 "    CMP     R0, #0 \n"
 315 "    LDREQ   R2, =0x125 \n"
 316 "    LDREQ   R1, =0xFF09C168 /*'SsShootTask.c'*/ \n"
 317 "    BLEQ    _DebugAssert \n"
 318 "    STR     R6, [R4, #8] \n"
 319 "    B       loc_FF09C8D4 \n"
 320 );
 321 }
 322 
 323 /*************************************************************/
 324 //** sub_FF222478_my @ 0xFF222478 - 0xFF222550, length=55
 325 void __attribute__((naked,noinline)) sub_FF222478_my() {
 326 asm volatile (
 327 "    STMFD   SP!, {R3-R7,LR} \n"
 328 "    BL      sub_FF09BD74 \n"
 329 "    MOV     R4, R0 \n"
 330 "    MOV     R0, #0xC \n"
 331 "    BL      sub_FF0A4044 \n"
 332 "    LDR     R6, =0xAE18 \n"
 333 "    TST     R0, #1 \n"
 334 "    MOV     R5, #1 \n"
 335 "    BNE     loc_FF222540 \n"
 336 "    MOV     R2, #2 \n"
 337 "    MOV     R1, SP \n"
 338 "    ADD     R0, R5, #0x10C \n"
 339 "    BL      _GetPropertyCase \n"
 340 "    TST     R0, #1 \n"
 341 "    ADDNE   R2, R5, #0x16C \n"
 342 "    LDRNE   R1, =0xFF2225E8 /*'SsCaptureCtrl.c'*/ \n"
 343 "    MOVNE   R0, #0 \n"
 344 "    BLNE    _DebugAssert \n"
 345 "    LDRSH   R0, [SP] \n"
 346 "    BL      sub_FF02ABF0 \n"
 347 "    BL      sub_FF02AA0C \n"
 348 "    CMP     R0, #1 \n"
 349 "    BLS     loc_FF222548 \n"
 350 "    MOV     R0, #0 \n"
 351 "    BL      sub_FF02AB64 \n"
 352 "    BL      sub_FF09D1D4 \n"
 353 "    BL      sub_FF09ECB0 \n"
 354 "    MOV     R1, R4 \n"
 355 "    BL      sub_FF09ED0C \n"
 356 "    LDR     R0, =0x113 \n"
 357 "    MOV     R2, #4 \n"
 358 "    ADD     R1, R4, #0x30 \n"
 359 "    BL      _SetPropertyCase \n"
 360 "    MOV     R2, #4 \n"
 361 "    ADD     R1, R4, #0x34 \n"
 362 "    MOV     R0, #0x2D \n"
 363 "    BL      _SetPropertyCase \n"
 364 "    MOV     R2, #4 \n"
 365 "    ADD     R1, R4, #8 \n"
 366 "    MOV     R0, #0x41 \n"
 367 "    BL      _SetPropertyCase \n"
 368 "    BL      sub_FF222D48 \n"
 369 "    MVN     R1, #0x1000 \n"
 370 "    BL      sub_006B8278 /*_ClearEventFlag*/ \n"
 371 "    MOV     R0, R4 \n"
 372 "    BL      sub_FF221EAC \n"
 373 "    MOV     R0, R4 \n"
 374 "    BL      sub_FF3D76C8_my \n"  // --> Patched. Old value = 0xFF3D76C8.
 375 "    BL      capt_seq_hook_raw_here \n"         // added
 376 "    TST     R0, #1 \n"
 377 "    BEQ     loc_FF222544 \n"
 378 
 379 "loc_FF222540:\n"
 380 "    STR     R5, [R6] \n"
 381 
 382 "loc_FF222544:\n"
 383 "    LDMFD   SP!, {R3-R7,PC} \n"
 384 
 385 "loc_FF222548:\n"
 386 "    BL      sub_FF09A49C \n"
 387 "    BL      sub_FF0A40A4 \n"
 388 "    LDMFD   SP!, {R3-R7,PC} \n"
 389 );
 390 }
 391 
 392 /*************************************************************/
 393 //** sub_FF22228C_my @ 0xFF22228C - 0xFF222474, length=123
 394 void __attribute__((naked,noinline)) sub_FF22228C_my() {
 395 asm volatile (
 396 "    STMFD   SP!, {R3-R7,LR} \n"
 397 "    LDR     R7, =0x27FDC \n"
 398 "    MOV     R5, R0 \n"
 399 "    LDR     R0, [R7, #0x28] \n"
 400 "    MOV     R4, #0 \n"
 401 "    CMP     R0, #0 \n"
 402 "    BEQ     loc_FF2222D8 \n"
 403 "    LDR     R0, =0xAE18 \n"
 404 "    MOV     R2, R5 \n"
 405 "    LDR     R0, [R0] \n"
 406 "    MOV     R1, #2 \n"
 407 "    CMP     R0, #0 \n"
 408 "    MOVNE   R4, #0x1D \n"
 409 "    MOV     R0, R4 \n"
 410 "    BL      sub_FF09A744 \n"
 411 "    MOV     R1, R4 \n"
 412 "    MOV     R0, R5 \n"
 413 "    BL      sub_FF2232A4 \n"
 414 "    B       loc_FF22246C \n"
 415 
 416 "loc_FF2222D8:\n"
 417 "    BL      sub_FF09ECB0 \n"
 418 "    MOV     R1, R5 \n"
 419 "    BL      sub_FF09ED0C \n"
 420 "    LDR     R0, =0x113 \n"
 421 "    MOV     R2, #4 \n"
 422 "    ADD     R1, R5, #0x30 \n"
 423 "    BL      _SetPropertyCase \n"
 424 "    MOV     R2, #4 \n"
 425 "    ADD     R1, R5, #0x34 \n"
 426 "    MOV     R0, #0x2D \n"
 427 "    BL      _SetPropertyCase \n"
 428 "    LDR     R0, [R7, #0x10C] \n"
 429 "    LDR     R6, =0x280DC \n"
 430 "    CMP     R0, #0 \n"
 431 "    BNE     loc_FF22232C \n"
 432 "    LDRH    R0, [R6, #0xA2] \n"
 433 "    CMP     R0, #3 \n"
 434 "    LDRNE   R0, [R5, #8] \n"
 435 "    CMPNE   R0, #1 \n"
 436 "    BHI     loc_FF222350 \n"
 437 "    B       loc_FF222338 \n"
 438 
 439 "loc_FF22232C:\n"
 440 "    LDR     R0, [R5, #0xC] \n"
 441 "    CMP     R0, #1 \n"
 442 "    BNE     loc_FF222350 \n"
 443 
 444 "loc_FF222338:\n"
 445 "    MOV     R0, #0xC \n"
 446 "    BL      sub_FF0A4044 \n"
 447 "    TST     R0, #1 \n"
 448 "    BEQ     loc_FF222350 \n"
 449 "    BL      sub_FF09A49C \n"
 450 "    MOV     R4, #1 \n"
 451 
 452 "loc_FF222350:\n"
 453 "    TST     R4, #1 \n"
 454 "    BNE     loc_FF222450 \n"
 455 "    LDR     R0, [R7, #0xEC] \n"
 456 "    CMP     R0, #0 \n"
 457 "    BEQ     loc_FF22238C \n"
 458 "    LDRH    R0, [R6, #0xA2] \n"
 459 "    CMP     R0, #3 \n"
 460 "    LDRNE   R0, [R5, #8] \n"
 461 "    CMPNE   R0, #1 \n"
 462 "    BHI     loc_FF2223E4 \n"
 463 "    LDR     R0, [R7, #0x10C] \n"
 464 "    CMP     R0, #0 \n"
 465 "    LDRNE   R0, [R5, #0xC] \n"
 466 "    CMPNE   R0, #1 \n"
 467 "    BHI     loc_FF2223E4 \n"
 468 
 469 "loc_FF22238C:\n"
 470 "    LDR     R0, =0x10D \n"
 471 "    MOV     R2, #2 \n"
 472 "    MOV     R1, SP \n"
 473 "    BL      _GetPropertyCase \n"
 474 "    TST     R0, #1 \n"
 475 "    MOVNE   R2, #0xC9 \n"
 476 "    LDRNE   R1, =0xFF2225E8 /*'SsCaptureCtrl.c'*/ \n"
 477 "    MOVNE   R0, #0 \n"
 478 "    BLNE    _DebugAssert \n"
 479 "    LDRSH   R0, [SP] \n"
 480 "    BL      sub_FF02ABF0 \n"
 481 "    BL      sub_FF02AA0C \n"
 482 "    CMP     R0, #1 \n"
 483 "    BLS     loc_FF2223D0 \n"
 484 "    MOV     R0, #0 \n"
 485 "    BL      sub_FF02AB64 \n"
 486 "    B       loc_FF2223E4 \n"
 487 
 488 "loc_FF2223D0:\n"
 489 "    BL      sub_FF09A49C \n"
 490 "    BL      sub_FF0A40A4 \n"
 491 "    MOV     R4, #1 \n"
 492 "    CMP     R4, #0 \n"
 493 "    BNE     loc_FF222450 \n"
 494 
 495 "loc_FF2223E4:\n"
 496 "    MOV     R4, #0 \n"
 497 "    CMP     R4, #0 \n"
 498 "    BNE     loc_FF222450 \n"
 499 "    BL      sub_FF222D48 \n"
 500 "    MVN     R1, #0x1000 \n"
 501 "    BL      sub_006B8278 /*_ClearEventFlag*/ \n"
 502 "    MOV     R0, R5 \n"
 503 "    BL      sub_FF3D72F4 \n"
 504 "    TST     R0, #1 \n"
 505 "    MOV     R4, R0 \n"
 506 "    BNE     loc_FF222450 \n"
 507 "    BL      sub_FF09D1D4 \n"
 508 "    MOV     R0, R5 \n"
 509 "    BL      sub_FF221EAC \n"
 510 "    LDR     R0, [R7, #0x130] \n"
 511 "    CMP     R0, #0 \n"
 512 "    BNE     loc_FF22243C \n"
 513 "    LDRH    R0, [R6, #0xA2] \n"
 514 "    CMP     R0, #3 \n"
 515 "    LDRNE   R0, [R5, #8] \n"
 516 "    CMPNE   R0, #1 \n"
 517 "    BHI     loc_FF222444 \n"
 518 
 519 "loc_FF22243C:\n"
 520 "    MOV     R0, #2 \n"
 521 "    BL      sub_FF0A5BF0 \n"
 522 
 523 "loc_FF222444:\n"
 524 "    MOV     R0, R5 \n"
 525 "    BL      sub_FF3D76C8_my \n"  // --> Patched. Old value = 0xFF3D76C8.
 526 "    BL      capt_seq_hook_raw_here \n"         // added
 527 "    B       loc_FF22246C \n"
 528 
 529 "loc_FF222450:\n"
 530 "    MOV     R2, R5 \n"
 531 "    MOV     R1, #2 \n"
 532 "    MOV     R0, R4 \n"
 533 "    BL      sub_FF09A744 \n"
 534 "    MOV     R1, R4 \n"
 535 "    MOV     R0, R5 \n"
 536 "    BL      sub_FF2234B8 \n"
 537 
 538 "loc_FF22246C:\n"
 539 "    MOV     R0, #0 \n"
 540 "    STR     R0, [R7, #0x28] \n"
 541 "    LDMFD   SP!, {R3-R7,PC} \n"
 542 );
 543 }
 544 
 545 /*************************************************************/
 546 //** sub_FF3D76C8_my @ 0xFF3D76C8 - 0xFF3D7768, length=41
 547 void __attribute__((naked,noinline)) sub_FF3D76C8_my() {
 548 asm volatile (
 549 "    STMFD   SP!, {R2-R8,LR} \n"
 550 "    LDR     R7, =0x27FDC \n"
 551 "    MOV     R4, R0 \n"
 552 "    LDR     R0, [R7, #0x16C] \n"
 553 "    ADD     R5, R7, #0x100 \n"
 554 "    CMP     R0, #0 \n"
 555 "    LDRNEH  R0, [R5, #0xA2] \n"
 556 "    CMPNE   R0, #3 \n"
 557 "    LDRNE   R0, [R4, #8] \n"
 558 "    CMPNE   R0, #1 \n"
 559 "    BHI     loc_FF3D7700 \n"
 560 "    MOV     R0, R4 \n"
 561 "    BL      sub_FF221E14 \n"
 562 "    BL      sub_FF222BA4 \n"
 563 
 564 "loc_FF3D7700:\n"
 565 "    LDR     R0, [R7, #0x198] \n"
 566 "    CMP     R0, #2 \n"
 567 "    BNE     loc_FF3D7724 \n"
 568 "    LDRH    R0, [R5, #0xA2] \n"
 569 "    CMP     R0, #3 \n"
 570 "    LDRNE   R0, [R4, #8] \n"
 571 "    CMPNE   R0, #1 \n"
 572 "    MOVLS   R0, #4 \n"
 573 "    BLLS    sub_FF132C70 \n"
 574 
 575 "loc_FF3D7724:\n"
 576 "    MOV     R2, #4 \n"
 577 "    ADD     R1, SP, #4 \n"
 578 "    MOV     R0, #0x134 \n"
 579 "    BL      _GetPropertyCase \n"
 580 "    TST     R0, #1 \n"
 581 "    LDRNE   R2, =0x193 \n"
 582 "    LDRNE   R1, =0xFF3D7990 /*'SsStandardCaptureSeq.c'*/ \n"
 583 "    MOVNE   R0, #0 \n"
 584 "    BLNE    _DebugAssert \n"
 585 "    LDR     R0, [SP, #4] \n"
 586 "    AND     R0, R0, #0xFF00 \n"
 587 "    CMP     R0, #0x600 \n"
 588 "    LDRNE   R0, =0xFF221A1C \n"
 589 "    LDREQ   R0, =0xFF3D7644 \n"
 590 "    MOVNE   R1, R4 \n"
 591 "    MOVEQ   R1, #0 \n"
 592 "    BL      sub_FF0E8214 \n"
 593 "    BL      wait_until_remote_button_is_released\n" // added
 594 "    BL      capt_seq_hook_set_nr\n"                 // added
 595 "    LDR     R0, [R7, #0x18C] \n"
 596 "    LDR     PC, =0xFF3D776C \n"  // Continue in firmware
 597 );
 598 }
 599 
 600 /*************************************************************/
 601 //** exp_drv_task @ 0xFF0F7824 - 0xFF0F7F2C, length=451
 602 void __attribute__((naked,noinline)) exp_drv_task() {
 603 asm volatile (
 604 "    STMFD   SP!, {R4-R9,LR} \n"
 605 "    SUB     SP, SP, #0x2C \n"
 606 "    LDR     R6, =0x4AC8 \n"
 607 "    LDR     R7, =0xBB8 \n"
 608 "    LDR     R4, =0x64A74 \n"
 609 "    MOV     R0, #0 \n"
 610 "    ADD     R5, SP, #0x1C \n"
 611 "    STR     R0, [SP, #0xC] \n"
 612 
 613 "loc_FF0F7844:\n"
 614 "    LDR     R0, [R6, #0x20] \n"
 615 "    MOV     R2, #0 \n"
 616 "    ADD     R1, SP, #0x28 \n"
 617 "    BL      sub_006B849C /*_ReceiveMessageQueue*/ \n"
 618 "    LDR     R0, [SP, #0xC] \n"
 619 "    CMP     R0, #1 \n"
 620 "    BNE     loc_FF0F7894 \n"
 621 "    LDR     R0, [SP, #0x28] \n"
 622 "    LDR     R0, [R0] \n"
 623 "    CMP     R0, #0x14 \n"
 624 "    CMPNE   R0, #0x15 \n"
 625 "    CMPNE   R0, #0x16 \n"
 626 "    CMPNE   R0, #0x17 \n"
 627 "    CMPNE   R0, #0x18 \n"
 628 "    BEQ     loc_FF0F7A64 \n"
 629 "    CMP     R0, #0x2E \n"
 630 "    BEQ     loc_FF0F79E8 \n"
 631 "    ADD     R1, SP, #0xC \n"
 632 "    MOV     R0, #0 \n"
 633 "    BL      sub_FF0F77C4 \n"
 634 
 635 "loc_FF0F7894:\n"
 636 "    LDR     R0, [SP, #0x28] \n"
 637 "    LDR     R1, [R0] \n"
 638 "    CMP     R1, #0x34 \n"
 639 "    BNE     loc_FF0F78C0 \n"
 640 "    BL      sub_FF0F90F0 \n"
 641 "    LDR     R0, [R6, #0x1C] \n"
 642 "    MOV     R1, #1 \n"
 643 "    BL      sub_006B8230 /*_SetEventFlag*/ \n"
 644 "    BL      _ExitTask \n"
 645 "    ADD     SP, SP, #0x2C \n"
 646 "    LDMFD   SP!, {R4-R9,PC} \n"
 647 
 648 "loc_FF0F78C0:\n"
 649 "    CMP     R1, #0x33 \n"
 650 "    BNE     loc_FF0F78DC \n"
 651 "    LDR     R2, [R0, #0xAC]! \n"
 652 "    LDR     R1, [R0, #4] \n"
 653 "    MOV     R0, R1 \n"
 654 "    BLX     R2 \n"
 655 "    B       loc_FF0F7F24 \n"
 656 
 657 "loc_FF0F78DC:\n"
 658 "    CMP     R1, #0x2C \n"
 659 "    BNE     loc_FF0F792C \n"
 660 "    LDR     R0, [R6, #0x1C] \n"
 661 "    MOV     R1, #0x80 \n"
 662 "    BL      sub_006B8278 /*_ClearEventFlag*/ \n"
 663 "    LDR     R0, =0xFF0F21D4 \n"
 664 "    MOV     R1, #0x80 \n"
 665 "    BL      sub_FF091858 \n"
 666 "    LDR     R0, [R6, #0x1C] \n"
 667 "    MOV     R2, R7 \n"
 668 "    MOV     R1, #0x80 \n"
 669 "    BL      sub_006B8164 /*_WaitForAllEventFlag*/ \n"
 670 "    TST     R0, #1 \n"
 671 "    LDRNE   R2, =0x17CA \n"
 672 "    BNE     loc_FF0F7A54 \n"
 673 
 674 "loc_FF0F7918:\n"
 675 "    LDR     R1, [SP, #0x28] \n"
 676 "    LDR     R0, [R1, #0xB0] \n"
 677 "    LDR     R1, [R1, #0xAC] \n"
 678 "    BLX     R1 \n"
 679 "    B       loc_FF0F7F24 \n"
 680 
 681 "loc_FF0F792C:\n"
 682 "    CMP     R1, #0x2D \n"
 683 "    BNE     loc_FF0F79E0 \n"
 684 "    ADD     R1, SP, #0xC \n"
 685 "    BL      sub_FF0F77C4 \n"
 686 "    LDR     R0, [R6, #0x1C] \n"
 687 "    MOV     R1, #0x100 \n"
 688 "    BL      sub_006B8278 /*_ClearEventFlag*/ \n"
 689 "    LDR     R0, =0xFF0F21E4 \n"
 690 "    MOV     R1, #0x100 \n"
 691 "    BL      sub_FF092630 \n"
 692 "    LDR     R0, [R6, #0x1C] \n"
 693 "    MOV     R2, R7 \n"
 694 "    MOV     R1, #0x100 \n"
 695 "    BL      sub_006B8164 /*_WaitForAllEventFlag*/ \n"
 696 "    TST     R0, #1 \n"
 697 "    BEQ     loc_FF0F7918 \n"
 698 "    LDR     R2, =0x17D4 \n"
 699 "    B       loc_FF0F7A54 \n"
 700 "    .long   0xFF0F2258 \n"
 701 "    ANDEQ   R2, R0, R0, LSL R7 \n"
 702 "    ANDEQ   R1, R0, PC, LSR R5 \n"
 703 
 704 "loc_FF0F79E0:\n"
 705 "    CMP     R1, #0x2E \n"
 706 "    BNE     loc_FF0F79F8 \n"
 707 
 708 "loc_FF0F79E8:\n"
 709 "    LDR     R0, [SP, #0x28] \n"
 710 "    ADD     R1, SP, #0xC \n"
 711 "    BL      sub_FF0F77C4 \n"
 712 "    B       loc_FF0F7918 \n"
 713 
 714 "loc_FF0F79F8:\n"
 715 "    CMP     R1, #0x31 \n"
 716 "    BNE     loc_FF0F7A10 \n"
 717 "    BL      sub_FF0DF704 \n"
 718 "    BL      sub_FF0E057C \n"
 719 "    BL      sub_FF0E005C \n"
 720 "    B       loc_FF0F7918 \n"
 721 
 722 "loc_FF0F7A10:\n"
 723 "    CMP     R1, #0x32 \n"
 724 "    BNE     loc_FF0F7A64 \n"
 725 "    LDR     R0, [R6, #0x1C] \n"
 726 "    MOV     R1, #4 \n"
 727 "    BL      sub_006B8278 /*_ClearEventFlag*/ \n"
 728 "    LDR     R1, =0xFF0F2204 \n"
 729 "    LDR     R0, =0xFFFFF400 \n"
 730 "    MOV     R2, #4 \n"
 731 "    BL      sub_FF0F9154 \n"
 732 "    BL      sub_FF0DF398 \n"
 733 "    LDR     R0, [R6, #0x1C] \n"
 734 "    MOV     R2, R7 \n"
 735 "    MOV     R1, #4 \n"
 736 "    BL      sub_006B8078 /*_WaitForAnyEventFlag*/ \n"
 737 "    TST     R0, #1 \n"
 738 "    BEQ     loc_FF0F7918 \n"
 739 "    LDR     R2, =0x180C \n"
 740 
 741 "loc_FF0F7A54:\n"
 742 "    LDR     R1, =0xFF0F2AC8 /*'ExpDrv.c'*/ \n"
 743 "    MOV     R0, #0 \n"
 744 "    BL      _DebugAssert \n"
 745 "    B       loc_FF0F7918 \n"
 746 
 747 "loc_FF0F7A64:\n"
 748 "    LDR     R0, [SP, #0x28] \n"
 749 "    MOV     R8, #1 \n"
 750 "    LDR     R1, [R0] \n"
 751 "    CMP     R1, #0x12 \n"
 752 "    CMPNE   R1, #0x13 \n"
 753 "    BNE     loc_FF0F7ACC \n"
 754 "    LDR     R1, [R0, #0x94] \n"
 755 "    ADD     R1, R1, R1, LSL#1 \n"
 756 "    ADD     R1, R0, R1, LSL#2 \n"
 757 "    SUB     R1, R1, #8 \n"
 758 "    LDMIA   R1, {R2,R3,R9} \n"
 759 "    STMIA   R5, {R2,R3,R9} \n"
 760 "    BL      sub_FF0F5948 \n"
 761 "    LDR     R0, [SP, #0x28] \n"
 762 "    LDR     R1, [R0, #0x94] \n"
 763 "    LDR     R3, [R0, #0xAC] \n"
 764 "    LDR     R2, [R0, #0xB0] \n"
 765 "    ADD     R0, R0, #4 \n"
 766 "    BLX     R3 \n"
 767 "    LDR     R0, [SP, #0x28] \n"
 768 "    BL      sub_FF0F945C \n"
 769 "    LDR     R0, [SP, #0x28] \n"
 770 "    LDR     R1, [R0, #0x94] \n"
 771 "    LDR     R2, [R0, #0xB8] \n"
 772 "    LDR     R3, [R0, #0xB4] \n"
 773 "    B       loc_FF0F7DE8 \n"
 774 
 775 "loc_FF0F7ACC:\n"
 776 "    CMP     R1, #0x14 \n"
 777 "    CMPNE   R1, #0x15 \n"
 778 "    CMPNE   R1, #0x16 \n"
 779 "    CMPNE   R1, #0x17 \n"
 780 "    CMPNE   R1, #0x18 \n"
 781 "    BNE     loc_FF0F7B78 \n"
 782 "    ADD     R3, SP, #0xC \n"
 783 "    MOV     R2, SP \n"
 784 "    ADD     R1, SP, #0x1C \n"
 785 "    BL      sub_FF0F5BB8 \n"
 786 "    CMP     R0, #1 \n"
 787 "    MOV     R9, R0 \n"
 788 "    CMPNE   R9, #5 \n"
 789 "    BNE     loc_FF0F7B24 \n"
 790 "    LDR     R0, [SP, #0x28] \n"
 791 "    MOV     R2, R9 \n"
 792 "    LDR     R1, [R0, #0x94] \n"
 793 "    LDR     R12, [R0, #0xAC] \n"
 794 "    LDR     R3, [R0, #0xB0] \n"
 795 "    ADD     R0, R0, #4 \n"
 796 "    BLX     R12 \n"
 797 "    B       loc_FF0F7B5C \n"
 798 
 799 "loc_FF0F7B24:\n"
 800 "    LDR     R0, [SP, #0x28] \n"
 801 "    CMP     R9, #2 \n"
 802 "    LDR     R1, [R0, #0x94] \n"
 803 "    LDR     R12, [R0, #0xAC] \n"
 804 "    LDR     R3, [R0, #0xB0] \n"
 805 "    CMPNE   R9, #6 \n"
 806 "    MOV     R2, R9 \n"
 807 "    ADD     R0, R0, #4 \n"
 808 "    BNE     loc_FF0F7B70 \n"
 809 "    BLX     R12 \n"
 810 "    LDR     R0, [SP, #0x28] \n"
 811 "    MOV     R2, SP \n"
 812 "    ADD     R1, SP, #0x1C \n"
 813 "    BL      sub_FF0F74D0 \n"
 814 
 815 "loc_FF0F7B5C:\n"
 816 "    LDR     R0, [SP, #0x28] \n"
 817 "    LDR     R2, [SP, #0xC] \n"
 818 "    MOV     R1, R9 \n"
 819 "    BL      sub_FF0F7754 \n"
 820 "    B       loc_FF0F7DF0 \n"
 821 
 822 "loc_FF0F7B70:\n"
 823 "    BLX     R12 \n"
 824 "    B       loc_FF0F7DF0 \n"
 825 
 826 "loc_FF0F7B78:\n"
 827 "    CMP     R1, #0x28 \n"
 828 "    CMPNE   R1, #0x29 \n"
 829 "    BNE     loc_FF0F7BC4 \n"
 830 "    LDR     R1, [R0, #0x94] \n"
 831 "    ADD     R1, R1, R1, LSL#1 \n"
 832 "    ADD     R1, R0, R1, LSL#2 \n"
 833 "    SUB     R1, R1, #8 \n"
 834 "    LDMIA   R1, {R2,R3,R9} \n"
 835 "    STMIA   R5, {R2,R3,R9} \n"
 836 "    BL      sub_FF0F4528 \n"
 837 "    LDR     R0, [SP, #0x28] \n"
 838 "    LDR     R1, [R0, #0x94] \n"
 839 "    LDR     R3, [R0, #0xAC] \n"
 840 "    LDR     R2, [R0, #0xB0] \n"
 841 "    ADD     R0, R0, #4 \n"
 842 "    BLX     R3 \n"
 843 "    LDR     R0, [SP, #0x28] \n"
 844 "    BL      sub_FF0F4AB0 \n"
 845 "    B       loc_FF0F7DF0 \n"
 846 
 847 "loc_FF0F7BC4:\n"
 848 "    ADD     R1, R0, #4 \n"
 849 "    LDMIA   R1, {R2,R3,R9} \n"
 850 "    STMIA   R5, {R2,R3,R9} \n"
 851 "    LDR     R1, [R0] \n"
 852 "    CMP     R1, #0x2C \n"
 853 "    ADDCC   PC, PC, R1, LSL#2 \n"
 854 "    B       loc_FF0F7DD8 \n"
 855 "    B       loc_FF0F7C90 \n"
 856 "    B       loc_FF0F7C90 \n"
 857 "    B       loc_FF0F7C98 \n"
 858 "    B       loc_FF0F7CA0 \n"
 859 "    B       loc_FF0F7CA0 \n"
 860 "    B       loc_FF0F7CA0 \n"
 861 "    B       loc_FF0F7C90 \n"
 862 "    B       loc_FF0F7C98 \n"
 863 "    B       loc_FF0F7CA0 \n"
 864 "    B       loc_FF0F7CA0 \n"
 865 "    B       loc_FF0F7CB8 \n"
 866 "    B       loc_FF0F7CB8 \n"
 867 "    B       loc_FF0F7DC4 \n"
 868 "    B       loc_FF0F7DCC \n"
 869 "    B       loc_FF0F7DCC \n"
 870 "    B       loc_FF0F7DCC \n"
 871 "    B       loc_FF0F7DCC \n"
 872 "    B       loc_FF0F7DD4 \n"
 873 "    B       loc_FF0F7DD8 \n"
 874 "    B       loc_FF0F7DD8 \n"
 875 "    B       loc_FF0F7DD8 \n"
 876 "    B       loc_FF0F7DD8 \n"
 877 "    B       loc_FF0F7DD8 \n"
 878 "    B       loc_FF0F7DD8 \n"
 879 "    B       loc_FF0F7DD8 \n"
 880 "    B       loc_FF0F7CA8 \n"
 881 "    B       loc_FF0F7CB0 \n"
 882 "    B       loc_FF0F7CB0 \n"
 883 "    B       loc_FF0F7CB0 \n"
 884 "    B       loc_FF0F7CC4 \n"
 885 "    B       loc_FF0F7CC4 \n"
 886 "    B       loc_FF0F7CC4 \n"
 887 "    B       loc_FF0F7CCC \n"
 888 "    B       loc_FF0F7D04 \n"
 889 "    B       loc_FF0F7DD8 \n"
 890 "    B       loc_FF0F7DD8 \n"
 891 "    B       loc_FF0F7D3C \n"
 892 "    B       loc_FF0F7D74 \n"
 893 "    B       loc_FF0F7DAC \n"
 894 "    B       loc_FF0F7DAC \n"
 895 "    B       loc_FF0F7DD8 \n"
 896 "    B       loc_FF0F7DD8 \n"
 897 "    B       loc_FF0F7DB4 \n"
 898 "    B       loc_FF0F7DBC \n"
 899 
 900 "loc_FF0F7C90:\n"
 901 "    BL      sub_FF0F28D0 \n"
 902 "    B       loc_FF0F7DD8 \n"
 903 
 904 "loc_FF0F7C98:\n"
 905 "    BL      sub_FF0F2C30 \n"
 906 "    B       loc_FF0F7DD8 \n"
 907 
 908 "loc_FF0F7CA0:\n"
 909 "    BL      sub_FF0F2EB4 \n"
 910 "    B       loc_FF0F7DD8 \n"
 911 
 912 "loc_FF0F7CA8:\n"
 913 "    BL      sub_FF0F31CC \n"
 914 "    B       loc_FF0F7DD8 \n"
 915 
 916 "loc_FF0F7CB0:\n"
 917 "    BL      sub_FF0F33FC \n"
 918 "    B       loc_FF0F7DD8 \n"
 919 
 920 "loc_FF0F7CB8:\n"
 921 "    BL      sub_FF0F39C0_my \n"  // --> Patched. Old value = 0xFF0F39C0.
 922 "    MOV     R8, #0 \n"
 923 "    B       loc_FF0F7DD8 \n"
 924 
 925 "loc_FF0F7CC4:\n"
 926 "    BL      sub_FF0F3B0C \n"
 927 "    B       loc_FF0F7DD8 \n"
 928 
 929 "loc_FF0F7CCC:\n"
 930 "    LDRH    R1, [R0, #4] \n"
 931 "    STRH    R1, [SP, #0x1C] \n"
 932 "    LDRH    R1, [R4, #2] \n"
 933 "    STRH    R1, [SP, #0x1E] \n"
 934 "    LDRH    R1, [R4, #4] \n"
 935 "    STRH    R1, [SP, #0x20] \n"
 936 "    LDRH    R1, [R4, #6] \n"
 937 "    STRH    R1, [SP, #0x22] \n"
 938 "    LDRH    R1, [R0, #0xC] \n"
 939 "    STRH    R1, [SP, #0x24] \n"
 940 "    LDRH    R1, [R4, #0xA] \n"
 941 "    STRH    R1, [SP, #0x26] \n"
 942 "    BL      sub_FF0F4194 \n"
 943 "    B       loc_FF0F7DD8 \n"
 944 
 945 "loc_FF0F7D04:\n"
 946 "    LDRH    R1, [R0, #4] \n"
 947 "    STRH    R1, [SP, #0x1C] \n"
 948 "    LDRH    R1, [R4, #2] \n"
 949 "    STRH    R1, [SP, #0x1E] \n"
 950 "    LDRH    R1, [R4, #4] \n"
 951 "    STRH    R1, [SP, #0x20] \n"
 952 "    LDRH    R1, [R4, #6] \n"
 953 "    STRH    R1, [SP, #0x22] \n"
 954 "    LDRH    R1, [R4, #8] \n"
 955 "    STRH    R1, [SP, #0x24] \n"
 956 "    LDRH    R1, [R4, #0xA] \n"
 957 "    STRH    R1, [SP, #0x26] \n"
 958 "    BL      sub_FF0F91D8 \n"
 959 "    B       loc_FF0F7DD8 \n"
 960 
 961 "loc_FF0F7D3C:\n"
 962 "    LDRH    R1, [R4] \n"
 963 "    STRH    R1, [SP, #0x1C] \n"
 964 "    LDRH    R1, [R0, #6] \n"
 965 "    STRH    R1, [SP, #0x1E] \n"
 966 "    LDRH    R1, [R4, #4] \n"
 967 "    STRH    R1, [SP, #0x20] \n"
 968 "    LDRH    R1, [R4, #6] \n"
 969 "    STRH    R1, [SP, #0x22] \n"
 970 "    LDRH    R1, [R4, #8] \n"
 971 "    STRH    R1, [SP, #0x24] \n"
 972 "    LDRH    R1, [R4, #0xA] \n"
 973 "    STRH    R1, [SP, #0x26] \n"
 974 "    BL      sub_FF0F9308 \n"
 975 "    B       loc_FF0F7DD8 \n"
 976 
 977 "loc_FF0F7D74:\n"
 978 "    LDRH    R1, [R4] \n"
 979 "    STRH    R1, [SP, #0x1C] \n"
 980 "    LDRH    R1, [R4, #2] \n"
 981 "    STRH    R1, [SP, #0x1E] \n"
 982 "    LDRH    R1, [R4, #4] \n"
 983 "    STRH    R1, [SP, #0x20] \n"
 984 "    LDRH    R1, [R4, #6] \n"
 985 "    STRH    R1, [SP, #0x22] \n"
 986 "    LDRH    R1, [R0, #0xC] \n"
 987 "    STRH    R1, [SP, #0x24] \n"
 988 "    LDRH    R1, [R4, #0xA] \n"
 989 "    STRH    R1, [SP, #0x26] \n"
 990 "    BL      sub_FF0F93B4 \n"
 991 "    B       loc_FF0F7DD8 \n"
 992 
 993 "loc_FF0F7DAC:\n"
 994 "    BL      sub_FF0F42A8 \n"
 995 "    B       loc_FF0F7DD8 \n"
 996 
 997 "loc_FF0F7DB4:\n"
 998 "    BL      sub_FF0F4BC8 \n"
 999 "    B       loc_FF0F7DD8 \n"
1000 
1001 "loc_FF0F7DBC:\n"
1002 "    BL      sub_FF0F50E4 \n"
1003 "    B       loc_FF0F7DD8 \n"
1004 
1005 "loc_FF0F7DC4:\n"
1006 "    BL      sub_FF0F5354 \n"
1007 "    B       loc_FF0F7DD8 \n"
1008 
1009 "loc_FF0F7DCC:\n"
1010 "    BL      sub_FF0F5520 \n"
1011 "    B       loc_FF0F7DD8 \n"
1012 
1013 "loc_FF0F7DD4:\n"
1014 "    BL      sub_FF0F5698 \n"
1015 
1016 "loc_FF0F7DD8:\n"
1017 "    LDR     R0, [SP, #0x28] \n"
1018 "    LDR     R1, [R0, #0x94] \n"
1019 "    LDR     R2, [R0, #0xB0] \n"
1020 "    LDR     R3, [R0, #0xAC] \n"
1021 
1022 "loc_FF0F7DE8:\n"
1023 "    ADD     R0, R0, #4 \n"
1024 "    BLX     R3 \n"
1025 
1026 "loc_FF0F7DF0:\n"
1027 "    LDR     R0, [SP, #0x28] \n"
1028 "    LDR     R0, [R0] \n"
1029 "    CMP     R0, #0x10 \n"
1030 "    BEQ     loc_FF0F7E28 \n"
1031 "    BGT     loc_FF0F7E18 \n"
1032 "    CMP     R0, #1 \n"
1033 "    CMPNE   R0, #4 \n"
1034 "    CMPNE   R0, #0xE \n"
1035 "    BNE     loc_FF0F7E5C \n"
1036 "    B       loc_FF0F7E28 \n"
1037 
1038 "loc_FF0F7E18:\n"
1039 "    CMP     R0, #0x13 \n"
1040 "    CMPNE   R0, #0x18 \n"
1041 "    CMPNE   R0, #0x1B \n"
1042 "    BNE     loc_FF0F7E5C \n"
1043 
1044 "loc_FF0F7E28:\n"
1045 "    LDRSH   R0, [R4] \n"
1046 "    CMN     R0, #0xC00 \n"
1047 "    LDRNESH R1, [R4, #8] \n"
1048 "    CMNNE   R1, #0xC00 \n"
1049 "    STRNEH  R0, [SP, #0x1C] \n"
1050 "    STRNEH  R1, [SP, #0x24] \n"
1051 "    BNE     loc_FF0F7E5C \n"
1052 "    ADD     R0, SP, #0x10 \n"
1053 "    BL      sub_FF0F968C /*_get_current_exp*/ \n"
1054 "    LDRH    R0, [SP, #0x10] \n"
1055 "    STRH    R0, [SP, #0x1C] \n"
1056 "    LDRH    R0, [SP, #0x18] \n"
1057 "    STRH    R0, [SP, #0x24] \n"
1058 
1059 "loc_FF0F7E5C:\n"
1060 "    LDR     R0, [SP, #0x28] \n"
1061 "    CMP     R8, #1 \n"
1062 "    BNE     loc_FF0F7EAC \n"
1063 "    LDR     R1, [R0, #0x94] \n"
1064 "    MOV     R2, #0xC \n"
1065 "    ADD     R1, R1, R1, LSL#1 \n"
1066 "    ADD     R0, R0, R1, LSL#2 \n"
1067 "    SUB     R8, R0, #8 \n"
1068 "    LDR     R0, =0x64A74 \n"
1069 "    ADD     R1, SP, #0x1C \n"
1070 "    BL      sub_006DA908 \n"
1071 "    LDR     R0, =0x64A80 \n"
1072 "    MOV     R2, #0xC \n"
1073 "    ADD     R1, SP, #0x1C \n"
1074 "    BL      sub_006DA908 \n"
1075 "    LDR     R0, =0x64A8C \n"
1076 "    MOV     R2, #0xC \n"
1077 "    MOV     R1, R8 \n"
1078 "    BL      sub_006DA908 \n"
1079 "    B       loc_FF0F7F24 \n"
1080 
1081 "loc_FF0F7EAC:\n"
1082 "    LDR     R0, [R0] \n"
1083 "    MOV     R3, #1 \n"
1084 "    CMP     R0, #0xB \n"
1085 "    BNE     loc_FF0F7EF0 \n"
1086 "    MOV     R2, #0 \n"
1087 "    STRD    R2, [SP] \n"
1088 "    MOV     R2, R3 \n"
1089 "    MOV     R1, R3 \n"
1090 "    MOV     R0, #0 \n"
1091 "    BL      sub_FF0F2690 \n"
1092 "    MOV     R3, #1 \n"
1093 "    MOV     R2, #0 \n"
1094 "    STRD    R2, [SP] \n"
1095 "    MOV     R2, R3 \n"
1096 "    MOV     R1, R3 \n"
1097 "    MOV     R0, #0 \n"
1098 "    B       loc_FF0F7F20 \n"
1099 
1100 "loc_FF0F7EF0:\n"
1101 "    MOV     R2, #1 \n"
1102 "    STRD    R2, [SP] \n"
1103 "    MOV     R3, R2 \n"
1104 "    MOV     R1, R2 \n"
1105 "    MOV     R0, R2 \n"
1106 "    BL      sub_FF0F2690 \n"
1107 "    MOV     R3, #1 \n"
1108 "    MOV     R2, R3 \n"
1109 "    MOV     R1, R3 \n"
1110 "    MOV     R0, R3 \n"
1111 "    STR     R3, [SP] \n"
1112 "    STR     R3, [SP, #4] \n"
1113 
1114 "loc_FF0F7F20:\n"
1115 "    BL      sub_FF0F2818 \n"
1116 
1117 "loc_FF0F7F24:\n"
1118 "    LDR     R0, [SP, #0x28] \n"
1119 "    BL      sub_FF0F90F0 \n"
1120 "    B       loc_FF0F7844 \n"
1121 );
1122 }
1123 
1124 /*************************************************************/
1125 //** sub_FF0F39C0_my @ 0xFF0F39C0 - 0xFF0F3A84, length=50
1126 void __attribute__((naked,noinline)) sub_FF0F39C0_my() {
1127 asm volatile (
1128 "    STMFD   SP!, {R4-R8,LR} \n"
1129 "    LDR     R7, =0x4AC8 \n"
1130 "    MOV     R4, R0 \n"
1131 "    LDR     R0, [R7, #0x1C] \n"
1132 "    MOV     R1, #0x3E \n"
1133 "    BL      sub_006B8278 /*_ClearEventFlag*/ \n"
1134 "    MOV     R2, #0 \n"
1135 "    LDRSH   R0, [R4, #4] \n"
1136 "    MOV     R3, #1 \n"
1137 "    MOV     R1, R2 \n"
1138 "    BL      sub_FF0F226C \n"
1139 "    MOV     R6, R0 \n"
1140 "    LDRSH   R0, [R4, #6] \n"
1141 "    BL      sub_FF0F24A0 \n"
1142 "    LDRSH   R0, [R4, #8] \n"
1143 "    BL      sub_FF0F24F8 \n"
1144 "    LDRSH   R0, [R4, #0xA] \n"
1145 "    BL      sub_FF0F2550 \n"
1146 "    LDRSH   R0, [R4, #0xC] \n"
1147 "    MOV     R1, #0 \n"
1148 "    BL      sub_FF0F25A8 \n"
1149 "    MOV     R5, R0 \n"
1150 "    LDR     R0, [R4] \n"
1151 "    LDR     R8, =0x64A8C \n"
1152 "    CMP     R0, #0xB \n"
1153 "    MOVEQ   R6, #0 \n"
1154 "    MOVEQ   R5, R6 \n"
1155 "    BEQ     loc_FF0F3A58 \n"
1156 "    CMP     R6, #1 \n"
1157 "    BNE     loc_FF0F3A58 \n"
1158 "    LDRSH   R0, [R4, #4] \n"
1159 "    LDR     R1, =0xFF0F21C4 \n"
1160 "    MOV     R2, #2 \n"
1161 "    BL      sub_FF091B88 \n"
1162 "    STRH    R0, [R4, #4] \n"
1163 "    MOV     R0, #0 \n"
1164 "    STR     R0, [R7, #0x28] \n"
1165 "    B       loc_FF0F3A60 \n"
1166 
1167 "loc_FF0F3A58:\n"
1168 "    LDRH    R0, [R8] \n"
1169 "    STRH    R0, [R4, #4] \n"
1170 
1171 "loc_FF0F3A60:\n"
1172 "    CMP     R5, #1 \n"
1173 "    LDRNEH  R0, [R8, #8] \n"
1174 "    BNE     loc_FF0F3A7C \n"
1175 "    LDRSH   R0, [R4, #0xC] \n"
1176 "    LDR     R1, =0xFF0F2248 \n"
1177 "    MOV     R2, #0x20 \n"
1178 "    BL      sub_FF0F9194 \n"
1179 
1180 "loc_FF0F3A7C:\n"
1181 "    STRH    R0, [R4, #0xC] \n"
1182 "    LDRSH   R0, [R4, #6] \n"
1183 "    BL      sub_FF0DF410_my \n"  // --> Patched. Old value = 0xFF0DF410.
1184 "    LDR     PC, =0xFF0F3A88 \n"  // Continue in firmware
1185 );
1186 }
1187 
1188 /*************************************************************/
1189 //** sub_FF0DF410_my @ 0xFF0DF410 - 0xFF0DF458, length=19
1190 void __attribute__((naked,noinline)) sub_FF0DF410_my() {
1191 asm volatile (
1192 "    STMFD   SP!, {R4-R6,LR} \n"
1193 "    LDR     R5, =0x46C8 \n"
1194 "    MOV     R4, R0 \n"
1195 "    LDR     R0, [R5, #4] \n"
1196 "    CMP     R0, #1 \n"
1197 "    LDRNE   R2, =0x16B \n"
1198 "    LDRNE   R1, =0xFF0DF1B4 /*'Shutter.c'*/ \n"
1199 "    MOVNE   R0, #0 \n"
1200 "    BLNE    _DebugAssert \n"
1201 "    CMN     R4, #0xC00 \n"
1202 "    LDREQSH R4, [R5, #2] \n"
1203 "    CMN     R4, #0xC00 \n"
1204 "    LDREQ   R2, =0x171 \n"
1205 "    LDREQ   R1, =0xFF0DF1B4 /*'Shutter.c'*/ \n"
1206 "    MOVEQ   R0, #0 \n"
1207 "    STRH    R4, [R5, #2] \n"
1208 "    BLEQ    _DebugAssert \n"
1209 "    MOV     R0, R4 \n"
1210 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
1211 "    LDR     PC, =0xFF0DF45C \n"  // Continue in firmware
1212 );
1213 }

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