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

   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 }

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