root/platform/sx510hs/sub/101a/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF1D9B68_my
  3. sub_FF1D9A00_my
  4. sub_FF371D20_my
  5. task_developseq_my
  6. exp_drv_task
  7. sub_FF0DAFC4_my
  8. sub_FF0C7894_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 NR_AUTO (0)                 // have to explictly reset value back to 0 to enable auto
   9 static long *nrflag = (long*)(0xCF68+0xC); // sx510 101a Found @ 0xff2adfe4 (0xcf68) & 0xff2adfe8 (+0xC)
  10 
  11 #include "../../../generic/capt_seq.c"
  12 
  13 /*************************************************************/
  14 //** capt_seq_task @ 0xFF072DC4 - 0xFF0730E8, length=202
  15 void __attribute__((naked,noinline)) capt_seq_task() {
  16 asm volatile (
  17 "    STMFD   SP!, {R3-R7,LR} \n"
  18 "    LDR     R5, =0x2401C \n"
  19 "    LDR     R7, =0x3670 \n"
  20 "    MOV     R6, #0 \n"
  21 
  22 "loc_FF072DD4:\n"
  23 "    LDR     R0, [R7, #4] \n"
  24 "    MOV     R2, #0 \n"
  25 "    MOV     R1, SP \n"
  26 "    BL      sub_006B84B8 /*_ReceiveMessageQueue*/ \n"
  27 "    TST     R0, #1 \n"
  28 "    BEQ     loc_FF072E04 \n"
  29 "    LDR     R2, =0x4D4 \n"
  30 "    LDR     R1, =0xFF072578 /*'SsShootTask.c'*/ \n"
  31 "    MOV     R0, #0 \n"
  32 "    BL      _DebugAssert \n"
  33 "    BL      _ExitTask \n"
  34 "    LDMFD   SP!, {R3-R7,PC} \n"
  35 
  36 "loc_FF072E04:\n"
  37 "    LDR     R0, [SP] \n"
  38 "    LDR     R0, [R0] \n"
  39 "    CMP     R0, #1 \n"
  40 "    BLNE    sub_FF1DB304 \n"
  41 "    LDR     R0, [SP] \n"
  42 "    LDR     R1, [R0] \n"
  43 "    CMP     R1, #0x2C \n"
  44 "    ADDCC   PC, PC, R1, LSL#2 \n"
  45 "    B       loc_FF0730AC \n"
  46 "    B       loc_FF072ED8 \n"
  47 "    B       loc_FF072EF0 \n"
  48 "    B       loc_FF072EFC \n"
  49 "    B       loc_FF072F10 \n"
  50 "    B       loc_FF072F08 \n"
  51 "    B       loc_FF072F1C \n"
  52 "    B       loc_FF072F24 \n"
  53 "    B       loc_FF072F2C \n"
  54 "    B       loc_FF072F38 \n"
  55 "    B       loc_FF072F7C \n"
  56 "    B       loc_FF072F44 \n"
  57 "    B       loc_FF072F50 \n"
  58 "    B       loc_FF072F58 \n"
  59 "    B       loc_FF072F64 \n"
  60 "    B       loc_FF072F6C \n"
  61 "    B       loc_FF072F74 \n"
  62 "    B       loc_FF072F84 \n"
  63 "    B       loc_FF072F8C \n"
  64 "    B       loc_FF072F94 \n"
  65 "    B       loc_FF072F9C \n"
  66 "    B       loc_FF072FA4 \n"
  67 "    B       loc_FF072FAC \n"
  68 "    B       loc_FF072FB4 \n"
  69 "    B       loc_FF072FBC \n"
  70 "    B       loc_FF072FC4 \n"
  71 "    B       loc_FF072FCC \n"
  72 "    B       loc_FF072FD4 \n"
  73 "    B       loc_FF072FDC \n"
  74 "    B       loc_FF072FE8 \n"
  75 "    B       loc_FF072FF0 \n"
  76 "    B       loc_FF072FF8 \n"
  77 "    B       loc_FF073004 \n"
  78 "    B       loc_FF07300C \n"
  79 "    B       loc_FF073014 \n"
  80 "    B       loc_FF07301C \n"
  81 "    B       loc_FF073024 \n"
  82 "    B       loc_FF07302C \n"
  83 "    B       loc_FF073034 \n"
  84 "    B       loc_FF073040 \n"
  85 "    B       loc_FF073048 \n"
  86 "    B       loc_FF073054 \n"
  87 "    B       loc_FF07308C \n"
  88 "    B       loc_FF073098 \n"
  89 "    B       loc_FF0730BC \n"
  90 
  91 "loc_FF072ED8:\n"
  92 //"    BL      shooting_expo_iso_override\n"      // extra ISO override call doesn't appear to be needed on elph130
  93 "    BL      sub_FF0735E4 \n"
  94 "    BL      shooting_expo_param_override\n"    // added
  95 "    BL      sub_FF070364 \n"
  96 // try avoid intermittetant override failues on quick press, not needed?
  97 //"    MOV     R0, #0\n"                          // added
  98 //"    STR     R0, [R5,#0x28]\n"                  // added
  99 "    LDR     R0, [R5, #0x28] \n"
 100 "    CMP     R0, #0 \n"
 101 "    BLNE    sub_FF1D9B68_my \n"  // --> Patched. Old value = 0xFF1D9B68.
 102 "    B       loc_FF0730BC \n"
 103 
 104 "loc_FF072EF0:\n"
 105 "    LDR     R0, [R0, #0x10] \n"
 106 "    BL      sub_FF1D9A00_my \n"  // --> Patched. Old value = 0xFF1D9A00.
 107 "    B       loc_FF0730BC \n"
 108 
 109 "loc_FF072EFC:\n"
 110 "    MOV     R0, #1 \n"
 111 "    BL      sub_FF073920 \n"
 112 "    B       loc_FF0730BC \n"
 113 
 114 "loc_FF072F08:\n"
 115 "    BL      sub_FF0732B0 \n"
 116 "    B       loc_FF072F14 \n"
 117 
 118 "loc_FF072F10:\n"
 119 "    BL      sub_FF0735C0 \n"
 120 
 121 "loc_FF072F14:\n"
 122 "    STR     R6, [R5, #0x28] \n"
 123 "    B       loc_FF0730BC \n"
 124 
 125 "loc_FF072F1C:\n"
 126 "    BL      sub_FF0735C8 \n"
 127 "    B       loc_FF0730BC \n"
 128 
 129 "loc_FF072F24:\n"
 130 "    BL      sub_FF0737EC \n"
 131 "    B       loc_FF072F3C \n"
 132 
 133 "loc_FF072F2C:\n"
 134 "    LDR     R0, [R0, #0x10] \n"
 135 "    BL      sub_FF1D9BF8 \n"
 136 "    B       loc_FF0730BC \n"
 137 
 138 "loc_FF072F38:\n"
 139 "    BL      sub_FF073874 \n"
 140 
 141 "loc_FF072F3C:\n"
 142 "    BL      sub_FF070364 \n"
 143 "    B       loc_FF0730BC \n"
 144 
 145 "loc_FF072F44:\n"
 146 "    LDR     R0, [R5, #0x58] \n"
 147 "    BL      sub_FF074138 \n"
 148 "    B       loc_FF0730BC \n"
 149 
 150 "loc_FF072F50:\n"
 151 "    BL      sub_FF0744B8 \n"
 152 "    B       loc_FF0730BC \n"
 153 
 154 "loc_FF072F58:\n"
 155 "    LDR     R0, [R0, #0xC] \n"
 156 "    BL      sub_FF074520 \n"
 157 "    B       loc_FF0730BC \n"
 158 
 159 "loc_FF072F64:\n"
 160 "    BL      sub_FF074720 \n"
 161 "    B       loc_FF0730BC \n"
 162 
 163 "loc_FF072F6C:\n"
 164 "    BL      sub_FF074C14 \n"
 165 "    B       loc_FF0730BC \n"
 166 
 167 "loc_FF072F74:\n"
 168 "    BL      sub_FF074CF4 \n"
 169 "    B       loc_FF0730BC \n"
 170 
 171 "loc_FF072F7C:\n"
 172 "    BL      sub_FF0735C0 \n"
 173 "    B       loc_FF0730BC \n"
 174 
 175 "loc_FF072F84:\n"
 176 "    BL      sub_FF1D8DFC \n"
 177 "    B       loc_FF0730BC \n"
 178 
 179 "loc_FF072F8C:\n"
 180 "    BL      sub_FF1D9040 \n"
 181 "    B       loc_FF0730BC \n"
 182 
 183 "loc_FF072F94:\n"
 184 "    BL      sub_FF1D90FC \n"
 185 "    B       loc_FF0730BC \n"
 186 
 187 "loc_FF072F9C:\n"
 188 "    BL      sub_FF1D919C \n"
 189 "    B       loc_FF0730BC \n"
 190 
 191 "loc_FF072FA4:\n"
 192 "    BL      sub_FF1D9274 \n"
 193 "    B       loc_FF0730BC \n"
 194 
 195 "loc_FF072FAC:\n"
 196 "    MOV     R0, #0 \n"
 197 "    B       loc_FF072FE0 \n"
 198 
 199 "loc_FF072FB4:\n"
 200 "    BL      sub_FF1D9694 \n"
 201 "    B       loc_FF0730BC \n"
 202 
 203 "loc_FF072FBC:\n"
 204 "    BL      sub_FF07B6E0 \n"
 205 "    B       loc_FF0730BC \n"
 206 
 207 "loc_FF072FC4:\n"
 208 "    BL      sub_FF07B6EC \n"
 209 "    B       loc_FF0730BC \n"
 210 
 211 "loc_FF072FCC:\n"
 212 "    BL      sub_FF1D9730 \n"
 213 "    B       loc_FF0730BC \n"
 214 
 215 "loc_FF072FD4:\n"
 216 "    BL      sub_FF1D97DC \n"
 217 "    B       loc_FF0730BC \n"
 218 
 219 "loc_FF072FDC:\n"
 220 "    MOV     R0, #1 \n"
 221 
 222 "loc_FF072FE0:\n"
 223 "    BL      sub_FF1D9530 \n"
 224 "    B       loc_FF0730BC \n"
 225 
 226 "loc_FF072FE8:\n"
 227 "    BL      sub_FF073AA4 \n"
 228 "    B       loc_FF0730BC \n"
 229 
 230 "loc_FF072FF0:\n"
 231 "    MOV     R0, #0 \n"
 232 "    B       loc_FF072FFC \n"
 233 
 234 "loc_FF072FF8:\n"
 235 "    LDR     R0, [R0, #0xC] \n"
 236 
 237 "loc_FF072FFC:\n"
 238 "    BL      sub_FF073B30 \n"
 239 "    B       loc_FF0730BC \n"
 240 
 241 "loc_FF073004:\n"
 242 "    BL      sub_FF1D9404 \n"
 243 "    B       loc_FF0730BC \n"
 244 
 245 "loc_FF07300C:\n"
 246 "    BL      sub_FF1D949C \n"
 247 "    B       loc_FF0730BC \n"
 248 
 249 "loc_FF073014:\n"
 250 "    BL      sub_FF1DA9E8 \n"
 251 "    B       loc_FF0730BC \n"
 252 
 253 "loc_FF07301C:\n"
 254 //"  BL      _sub_FF070C68 \n"  // --> Nullsub call removed.
 255 "    B       loc_FF0730BC \n"
 256 
 257 "loc_FF073024:\n"
 258 "    BL      sub_FF077434 \n"
 259 "    B       loc_FF0730BC \n"
 260 
 261 "loc_FF07302C:\n"
 262 "    BL      sub_FF077564 \n"
 263 "    B       loc_FF0730BC \n"
 264 
 265 "loc_FF073034:\n"
 266 "    LDR     R0, [R0, #0xC] \n"
 267 "    BL      sub_FF1D98EC \n"
 268 "    B       loc_FF0730BC \n"
 269 
 270 "loc_FF073040:\n"
 271 "    BL      sub_FF1D9974 \n"
 272 "    B       loc_FF0730BC \n"
 273 
 274 "loc_FF073048:\n"
 275 "    BL      sub_FF0776D4 \n"
 276 "    BL      sub_FF0775C0 \n"
 277 "    B       loc_FF0730BC \n"
 278 
 279 "loc_FF073054:\n"
 280 "    MOV     R0, #1 \n"
 281 "    BL      sub_FF1DA3F4 \n"
 282 "    MOV     R0, #1 \n"
 283 "    BL      sub_FF1DA520 \n"
 284 "    LDR     R0, =0x2411C \n"
 285 "    LDRH    R0, [R0, #0xB0] \n"
 286 "    CMP     R0, #4 \n"
 287 "    LDRNEH  R0, [R5] \n"
 288 "    SUBNE   R1, R0, #0x8000 \n"
 289 "    SUBNES  R1, R1, #0x230 \n"
 290 "    BNE     loc_FF0730BC \n"
 291 "    BL      sub_FF077564 \n"
 292 "    BL      sub_FF077A98 \n"
 293 "    B       loc_FF0730BC \n"
 294 
 295 "loc_FF07308C:\n"
 296 "    MOV     R2, #0 \n"
 297 "    MOV     R1, #0x10 \n"
 298 "    B       loc_FF0730A0 \n"
 299 
 300 "loc_FF073098:\n"
 301 "    MOV     R2, #0 \n"
 302 "    MOV     R1, #0xF \n"
 303 
 304 "loc_FF0730A0:\n"
 305 "    MOV     R0, #0 \n"
 306 "    BL      sub_FF070E2C \n"
 307 "    B       loc_FF0730BC \n"
 308 
 309 "loc_FF0730AC:\n"
 310 "    LDR     R2, =0x65A \n"
 311 "    LDR     R1, =0xFF072578 /*'SsShootTask.c'*/ \n"
 312 "    MOV     R0, #0 \n"
 313 "    BL      _DebugAssert \n"
 314 
 315 "loc_FF0730BC:\n"
 316 "    LDR     R0, [SP] \n"
 317 "    LDR     R1, [R0, #4] \n"
 318 "    LDR     R0, [R7] \n"
 319 "    BL      sub_006B82C8 /*_SetEventFlag*/ \n"
 320 "    LDR     R4, [SP] \n"
 321 "    LDR     R0, [R4, #8] \n"
 322 "    CMP     R0, #0 \n"
 323 "    LDREQ   R2, =0x126 \n"
 324 "    LDREQ   R1, =0xFF072578 /*'SsShootTask.c'*/ \n"
 325 "    BLEQ    _DebugAssert \n"
 326 "    STR     R6, [R4, #8] \n"
 327 "    B       loc_FF072DD4 \n"
 328 );
 329 }
 330 
 331 /*************************************************************/
 332 //** sub_FF1D9B68_my @ 0xFF1D9B68 - 0xFF1D9BF4, length=36
 333 void __attribute__((naked,noinline)) sub_FF1D9B68_my() {
 334 asm volatile (
 335 "    STMFD   SP!, {R4-R6,LR} \n"
 336 "    BL      sub_FF072154 \n"
 337 "    MOV     R4, R0 \n"
 338 "    MOV     R0, #0xC \n"
 339 "    BL      sub_FF079E78 \n"
 340 "    LDR     R6, =0x969C \n"
 341 "    TST     R0, #1 \n"
 342 "    MOV     R5, #1 \n"
 343 "    BNE     loc_FF1D9BF0 \n"
 344 "    BL      sub_FF0735D0 \n"
 345 "    BL      sub_FF074FD4 \n"
 346 "    MOV     R1, R4 \n"
 347 "    BL      sub_FF075030 \n"
 348 "    LDR     R0, =0x10E \n"
 349 "    MOV     R2, #4 \n"
 350 "    ADD     R1, R4, #0x30 \n"
 351 "    BL      _SetPropertyCase \n"
 352 "    MOV     R2, #4 \n"
 353 "    ADD     R1, R4, #0x34 \n"
 354 "    MOV     R0, #0x2C \n"
 355 "    BL      _SetPropertyCase \n"
 356 "    MOV     R2, #4 \n"
 357 "    ADD     R1, R4, #8 \n"
 358 "    MOV     R0, #0x3F \n"
 359 "    BL      _SetPropertyCase \n"
 360 "    BL      sub_FF1DA6E0 \n"
 361 "    MVN     R1, #0x1000 \n"
 362 "    BL      sub_006B82FC /*_ClearEventFlag*/ \n"
 363 "    MOV     R0, R4 \n"
 364 "    BL      sub_FF371908 \n"
 365 "    MOV     R0, R4 \n"
 366 "    BL      sub_FF371D20_my \n"  // --> Patched. Old value = 0xFF371D20.
 367 "    BL      capt_seq_hook_raw_here \n"         // added
 368 "    TST     R0, #1 \n"
 369 "    LDMEQFD SP!, {R4-R6,PC} \n"
 370 
 371 "loc_FF1D9BF0:\n"
 372 "    STR     R5, [R6] \n"
 373 "    LDMFD   SP!, {R4-R6,PC} \n"
 374 );
 375 }
 376 
 377 /*************************************************************/
 378 //** sub_FF1D9A00_my @ 0xFF1D9A00 - 0xFF1D9B64, length=90
 379 void __attribute__((naked,noinline)) sub_FF1D9A00_my() {
 380 asm volatile (
 381 "    STMFD   SP!, {R4-R8,LR} \n"
 382 "    LDR     R7, =0x2401C \n"
 383 "    MOV     R5, R0 \n"
 384 "    LDR     R0, [R7, #0x28] \n"
 385 "    MOV     R4, #0 \n"
 386 "    CMP     R0, #0 \n"
 387 "    BEQ     loc_FF1D9A4C \n"
 388 "    LDR     R0, =0x969C \n"
 389 "    MOV     R2, R5 \n"
 390 "    LDR     R0, [R0] \n"
 391 "    MOV     R1, #1 \n"
 392 "    CMP     R0, #0 \n"
 393 "    MOVNE   R4, #0x1D \n"
 394 "    MOV     R0, R4 \n"
 395 "    BL      sub_FF070E2C \n"
 396 "    MOV     R1, R4 \n"
 397 "    MOV     R0, R5 \n"
 398 "    BL      sub_FF1DB08C \n"
 399 "    B       loc_FF1D9B5C \n"
 400 
 401 "loc_FF1D9A4C:\n"
 402 "    BL      sub_FF074FD4 \n"
 403 "    MOV     R1, R5 \n"
 404 "    BL      sub_FF075030 \n"
 405 "    LDR     R0, =0x10E \n"
 406 "    MOV     R2, #4 \n"
 407 "    ADD     R1, R5, #0x30 \n"
 408 "    BL      _SetPropertyCase \n"
 409 "    MOV     R2, #4 \n"
 410 "    ADD     R1, R5, #0x34 \n"
 411 "    MOV     R0, #0x2C \n"
 412 "    BL      _SetPropertyCase \n"
 413 "    LDR     R0, [R7, #0x134] \n"
 414 "    LDR     R6, =0x2411C \n"
 415 "    CMP     R0, #0 \n"
 416 "    LDRNEH  R0, [R6, #0xAE] \n"
 417 "    CMPNE   R0, #3 \n"
 418 "    LDRNE   R0, [R5, #8] \n"
 419 "    CMPNE   R0, #1 \n"
 420 "    BLS     loc_FF1D9AB8 \n"
 421 "    LDR     R0, [R7, #0xEC] \n"
 422 "    CMP     R0, #0 \n"
 423 "    BNE     loc_FF1D9AD0 \n"
 424 "    BL      sub_FF00AB68 \n"
 425 "    TST     R0, #1 \n"
 426 "    BEQ     loc_FF1D9AD0 \n"
 427 "    BL      sub_FF079ED8 \n"
 428 "    B       loc_FF1D9ACC \n"
 429 
 430 "loc_FF1D9AB8:\n"
 431 "    MOV     R0, #0xC \n"
 432 "    BL      sub_FF079E78 \n"
 433 "    TST     R0, #1 \n"
 434 "    BEQ     loc_FF1D9AD0 \n"
 435 "    BL      sub_FF070C58 \n"
 436 
 437 "loc_FF1D9ACC:\n"
 438 "    MOV     R4, #1 \n"
 439 
 440 "loc_FF1D9AD0:\n"
 441 "    TST     R4, #1 \n"
 442 "    BNE     loc_FF1D9B40 \n"
 443 "    MOV     R0, R5 \n"
 444 "    BL      sub_FF1DAA5C \n"
 445 "    BL      sub_FF1DA6E0 \n"
 446 "    MVN     R1, #0x1000 \n"
 447 "    BL      sub_006B82FC /*_ClearEventFlag*/ \n"
 448 "    MOV     R0, R5 \n"
 449 "    BL      sub_FF370F60 \n"
 450 "    TST     R0, #1 \n"
 451 "    MOV     R4, R0 \n"
 452 "    BNE     loc_FF1D9B40 \n"
 453 "    BL      sub_FF0735D0 \n"
 454 "    MOV     R0, R5 \n"
 455 "    BL      sub_FF371908 \n"
 456 "    LDR     R0, [R7, #0x130] \n"
 457 "    CMP     R0, #0 \n"
 458 "    BNE     loc_FF1D9B2C \n"
 459 "    LDRH    R0, [R6, #0xAE] \n"
 460 "    CMP     R0, #3 \n"
 461 "    LDRNE   R0, [R5, #8] \n"
 462 "    CMPNE   R0, #1 \n"
 463 "    BHI     loc_FF1D9B34 \n"
 464 
 465 "loc_FF1D9B2C:\n"
 466 "    MOV     R0, #2 \n"
 467 "    BL      sub_FF07B858 \n"
 468 
 469 "loc_FF1D9B34:\n"
 470 "    MOV     R0, R5 \n"
 471 "    BL      sub_FF371D20_my \n"  // --> Patched. Old value = 0xFF371D20.
 472 "    B       loc_FF1D9B5C \n"
 473 
 474 "loc_FF1D9B40:\n"
 475 "    MOV     R2, R5 \n"
 476 "    MOV     R1, #1 \n"
 477 "    MOV     R0, R4 \n"
 478 "    BL      sub_FF070E2C \n"
 479 "    MOV     R1, R4 \n"
 480 "    MOV     R0, R5 \n"
 481 "    BL      sub_FF1DB2A0 \n"
 482 
 483 "loc_FF1D9B5C:\n"
 484 "    MOV     R0, #0 \n"
 485 "    STR     R0, [R7, #0x28] \n"
 486 "    LDMFD   SP!, {R4-R8,PC} \n"
 487 );
 488 }
 489 
 490 /*************************************************************/
 491 //** sub_FF371D20_my @ 0xFF371D20 - 0xFF371DE8, length=51
 492 void __attribute__((naked,noinline)) sub_FF371D20_my() {
 493 asm volatile (
 494 "    STMFD   SP!, {R2-R10,LR} \n"
 495 "    LDR     R7, =0x2401C \n"
 496 "    MOV     R4, R0 \n"
 497 "    LDR     R0, [R7, #0x174] \n"
 498 "    ADD     R5, R7, #0x100 \n"
 499 "    CMP     R0, #0 \n"
 500 "    LDRNEH  R0, [R5, #0xAE] \n"
 501 "    CMPNE   R0, #3 \n"
 502 "    LDRNE   R0, [R4, #8] \n"
 503 "    CMPNE   R0, #1 \n"
 504 "    BHI     loc_FF371D58 \n"
 505 "    MOV     R0, R4 \n"
 506 "    BL      sub_FF371880 \n"
 507 "    BL      sub_FF1DA1B0 \n"
 508 
 509 "loc_FF371D58:\n"
 510 "    LDR     R0, [R7, #0x16C] \n"
 511 "    CMP     R0, #0 \n"
 512 "    BEQ     loc_FF371D7C \n"
 513 "    LDRH    R0, [R5, #0xAE] \n"
 514 "    CMP     R0, #3 \n"
 515 "    LDRNE   R0, [R4, #8] \n"
 516 "    CMPNE   R0, #1 \n"
 517 "    MOVLS   R0, #3 \n"
 518 "    BLS     loc_FF371DA0 \n"
 519 
 520 "loc_FF371D7C:\n"
 521 "    LDR     R0, [R7, #0x1A4] \n"
 522 "    CMP     R0, #2 \n"
 523 "    BNE     loc_FF371DA4 \n"
 524 "    LDRH    R0, [R5, #0xAE] \n"
 525 "    CMP     R0, #3 \n"
 526 "    LDRNE   R0, [R4, #8] \n"
 527 "    CMPNE   R0, #1 \n"
 528 "    BHI     loc_FF371DA4 \n"
 529 "    MOV     R0, #4 \n"
 530 
 531 "loc_FF371DA0:\n"
 532 "    BL      sub_FF123B7C \n"
 533 
 534 "loc_FF371DA4:\n"
 535 "    LDR     R0, =0x12F \n"
 536 "    MOV     R2, #4 \n"
 537 "    ADD     R1, SP, #4 \n"
 538 "    BL      _GetPropertyCase \n"
 539 "    TST     R0, #1 \n"
 540 "    LDRNE   R2, =0x17B \n"
 541 "    LDRNE   R1, =0xFF371FD0 /*'SsStandardCaptureSeq.c'*/ \n"
 542 "    MOVNE   R0, #0 \n"
 543 "    BLNE    _DebugAssert \n"
 544 "    LDR     R0, [SP, #4] \n"
 545 "    AND     R0, R0, #0xFF00 \n"
 546 "    CMP     R0, #0x600 \n"
 547 "    LDRNE   R0, =0xFF3714C8 \n"
 548 "    LDREQ   R0, =0xFF371CE8 \n"
 549 "    MOVNE   R1, R4 \n"
 550 "    MOVEQ   R1, #0 \n"
 551 "    BL      sub_FF0D0290 \n"
 552 "    BL      wait_until_remote_button_is_released\n" // added
 553 "    BL      capt_seq_hook_set_nr\n"                 // added
 554 "    MOV     R0, R4 \n"
 555 "    LDR     PC, =0xFF371DEC \n"  // Continue in firmware
 556 );
 557 }
 558 
 559 /*************************************************************/
 560 //** task_developseq_my @ 0xFF1DB420 - 0xFF1DB540, length=73
 561 void __attribute__((naked,noinline)) task_developseq_my() {
 562 asm volatile (
 563 "    STMFD   SP!, {R2-R8,LR} \n"
 564 "    LDR     R7, =0x96DC \n"
 565 
 566 "loc_FF1DB428:\n"
 567 "    MOV     R2, #0 \n"
 568 "    LDR     R0, [R7, #8] \n"
 569 "    LDR     R1, [R7, #0x10] \n"
 570 "    BL      sub_006B860C /*_PostMessageQueue*/ \n"
 571 "    LDR     R0, [R7, #4] \n"
 572 "    MOV     R2, #0 \n"
 573 "    ADD     R1, SP, #4 \n"
 574 "    BL      sub_006B84B8 /*_ReceiveMessageQueue*/ \n"
 575 "    TST     R0, #1 \n"
 576 "    LDRNE   R2, =0x1C6 \n"
 577 "    BNE     loc_FF1DB474 \n"
 578 "    LDR     R0, [R7, #8] \n"
 579 "    MOV     R1, SP \n"
 580 "    BL      sub_006B85B0 /*_TryReceiveMessageQueue*/ \n"
 581 "    TST     R0, #1 \n"
 582 "    LDREQ   R5, =0x2401C \n"
 583 "    MOVEQ   R6, #0 \n"
 584 "    BEQ     loc_FF1DB488 \n"
 585 "    MOV     R2, #0x1CC \n"
 586 
 587 "loc_FF1DB474:\n"
 588 "    LDR     R1, =0xFF1DB5D0 /*'SsDvlpSeq.c'*/ \n"
 589 "    MOV     R0, #0 \n"
 590 "    BL      _DebugAssert \n"
 591 "    BL      _ExitTask \n"
 592 "    LDMFD   SP!, {R2-R8,PC} \n"
 593 
 594 "loc_FF1DB488:\n"
 595 "    LDR     R0, [R5, #0x19C] \n"
 596 "    CMP     R0, #0 \n"
 597 "    LDRNE   R0, [SP, #4] \n"
 598 "    LDRNE   R0, [R0] \n"
 599 "    CMPNE   R0, #5 \n"
 600 "    BNE     loc_FF1DB4AC \n"
 601 "    BL      sub_FF373150 \n"
 602 "    BL      sub_FF373894 \n"
 603 "    BL      sub_FF37431C \n"
 604 
 605 "loc_FF1DB4AC:\n"
 606 "    LDR     R1, [SP, #4] \n"
 607 "    LDR     R0, [R1] \n"  //  message from queue 2
 608 "    CMP     R0, #0 \n"
 609 "    BEQ     loc_FF1DB4E4 \n"  //  2nd msg after shoot
 610 "    CMP     R0, #3 \n"
 611 "    BEQ     loc_FF1DB4F0 \n"  //  1st msg after shoot
 612 "    CMP     R0, #4 \n"
 613 "    BEQ     loc_FF1DB50C \n"
 614 "    CMP     R0, #5 \n"
 615 "    MOVEQ   R2, #0 \n"
 616 "    MOVEQ   R1, #0x11 \n"
 617 "    MOVEQ   R0, R2 \n"
 618 "    BLEQ    sub_FF070E2C \n"
 619 "    B       loc_FF1DB510 \n"
 620 
 621 "loc_FF1DB4E4:\n"
 622 "    LDR     R0, [R1, #8] \n"
 623 "    BL      sub_FF372924 \n"
 624 "    B       loc_FF1DB510 \n"
 625 
 626 "loc_FF1DB4F0:\n"
 627 "    LDR     R0, [R1, #8] \n"
 628 "    MOV     R1, #1 \n"
 629 "    BL      sub_FF372BFC \n"
 630 "    BL      capt_seq_hook_raw_here\n"    // +
 631 "    LDR     R0, [SP, #4] \n"
 632 "    LDR     R0, [R0, #8] \n"
 633 "    BL      sub_FF3722D8 \n"
 634 "    B       loc_FF1DB510 \n"
 635 
 636 "loc_FF1DB50C:\n"
 637 "    BL      sub_FF074978 \n"
 638 
 639 "loc_FF1DB510:\n"
 640 "    LDR     R4, [SP, #4] \n"
 641 "    LDR     R0, [R4, #4] \n"
 642 "    CMP     R0, #0 \n"
 643 "    MOVEQ   R2, #0x82 \n"
 644 "    LDREQ   R1, =0xFF1DB5D0 /*'SsDvlpSeq.c'*/ \n"
 645 "    BLEQ    _DebugAssert \n"
 646 "    STR     R6, [R4, #4] \n"
 647 "    LDR     R0, [R7, #4] \n"
 648 "    ADD     R1, SP, #4 \n"
 649 "    BL      sub_006B85B0 /*_TryReceiveMessageQueue*/ \n"
 650 "    TST     R0, #1 \n"
 651 "    BEQ     loc_FF1DB488 \n"
 652 "    B       loc_FF1DB428 \n"
 653 "    .ltorg\n"
 654 );
 655 }
 656 
 657 /*************************************************************/
 658 //** exp_drv_task @ 0xFF0DECE0 - 0xFF0DF364, length=418
 659 void __attribute__((naked,noinline)) exp_drv_task() {
 660 asm volatile (
 661 "    STMFD   SP!, {R4-R9,LR} \n"
 662 "    SUB     SP, SP, #0x2C \n"
 663 "    LDR     R6, =0x4BB0 \n"
 664 "    LDR     R7, =0xBB8 \n"
 665 "    LDR     R4, =0x63EFC \n"
 666 "    MOV     R0, #0 \n"
 667 "    ADD     R5, SP, #0x1C \n"
 668 "    STR     R0, [SP, #0xC] \n"
 669 
 670 "loc_FF0DED00:\n"
 671 "    LDR     R0, [R6, #0x20] \n"
 672 "    MOV     R2, #0 \n"
 673 "    ADD     R1, SP, #0x28 \n"
 674 "    BL      sub_006B84B8 /*_ReceiveMessageQueue*/ \n"
 675 "    LDR     R0, [SP, #0xC] \n"
 676 "    CMP     R0, #1 \n"
 677 "    BNE     loc_FF0DED4C \n"
 678 "    LDR     R0, [SP, #0x28] \n"
 679 "    LDR     R0, [R0] \n"
 680 "    CMP     R0, #0x14 \n"
 681 "    CMPNE   R0, #0x15 \n"
 682 "    CMPNE   R0, #0x16 \n"
 683 "    CMPNE   R0, #0x17 \n"
 684 "    BEQ     loc_FF0DEEB0 \n"
 685 "    CMP     R0, #0x2A \n"
 686 "    BEQ     loc_FF0DEE34 \n"
 687 "    ADD     R1, SP, #0xC \n"
 688 "    MOV     R0, #0 \n"
 689 "    BL      sub_FF0DEC8C \n"
 690 
 691 "loc_FF0DED4C:\n"
 692 "    LDR     R0, [SP, #0x28] \n"
 693 "    LDR     R1, [R0] \n"
 694 "    CMP     R1, #0x30 \n"
 695 "    BNE     loc_FF0DED78 \n"
 696 "    BL      sub_FF0E0324 \n"
 697 "    LDR     R0, [R6, #0x1C] \n"
 698 "    MOV     R1, #1 \n"
 699 "    BL      sub_006B82C8 /*_SetEventFlag*/ \n"
 700 "    BL      _ExitTask \n"
 701 "    ADD     SP, SP, #0x2C \n"
 702 "    LDMFD   SP!, {R4-R9,PC} \n"
 703 
 704 "loc_FF0DED78:\n"
 705 "    CMP     R1, #0x2F \n"
 706 "    BNE     loc_FF0DED94 \n"
 707 "    LDR     R2, [R0, #0xA8]! \n"
 708 "    LDR     R1, [R0, #4] \n"
 709 "    MOV     R0, R1 \n"
 710 "    BLX     R2 \n"
 711 "    B       loc_FF0DF35C \n"
 712 
 713 "loc_FF0DED94:\n"
 714 "    CMP     R1, #0x28 \n"
 715 "    BNE     loc_FF0DEDE4 \n"
 716 "    LDR     R0, [R6, #0x1C] \n"
 717 "    MOV     R1, #0x80 \n"
 718 "    BL      sub_006B82FC /*_ClearEventFlag*/ \n"
 719 "    LDR     R0, =0xFF0D9848 \n"
 720 "    MOV     R1, #0x80 \n"
 721 "    BL      sub_FF069300 \n"
 722 "    LDR     R0, [R6, #0x1C] \n"
 723 "    MOV     R2, R7 \n"
 724 "    MOV     R1, #0x80 \n"
 725 "    BL      sub_006B81FC /*_WaitForAllEventFlag*/ \n"
 726 "    TST     R0, #1 \n"
 727 "    LDRNE   R2, =0x16EF \n"
 728 "    BNE     loc_FF0DEEA0 \n"
 729 
 730 "loc_FF0DEDD0:\n"
 731 "    LDR     R1, [SP, #0x28] \n"
 732 "    LDR     R0, [R1, #0xAC] \n"
 733 "    LDR     R1, [R1, #0xA8] \n"
 734 "    BLX     R1 \n"
 735 "    B       loc_FF0DF35C \n"
 736 
 737 "loc_FF0DEDE4:\n"
 738 "    CMP     R1, #0x29 \n"
 739 "    BNE     loc_FF0DEE2C \n"
 740 "    ADD     R1, SP, #0xC \n"
 741 "    BL      sub_FF0DEC8C \n"
 742 "    LDR     R0, [R6, #0x1C] \n"
 743 "    MOV     R1, #0x100 \n"
 744 "    BL      sub_006B82FC /*_ClearEventFlag*/ \n"
 745 "    LDR     R0, =0xFF0D9858 \n"
 746 "    MOV     R1, #0x100 \n"
 747 "    BL      sub_FF06A0D4 \n"
 748 "    LDR     R0, [R6, #0x1C] \n"
 749 "    MOV     R2, R7 \n"
 750 "    MOV     R1, #0x100 \n"
 751 "    BL      sub_006B81FC /*_WaitForAllEventFlag*/ \n"
 752 "    TST     R0, #1 \n"
 753 "    BEQ     loc_FF0DEDD0 \n"
 754 "    LDR     R2, =0x16F9 \n"
 755 "    B       loc_FF0DEEA0 \n"
 756 
 757 "loc_FF0DEE2C:\n"
 758 "    CMP     R1, #0x2A \n"
 759 "    BNE     loc_FF0DEE44 \n"
 760 
 761 "loc_FF0DEE34:\n"
 762 "    LDR     R0, [SP, #0x28] \n"
 763 "    ADD     R1, SP, #0xC \n"
 764 "    BL      sub_FF0DEC8C \n"
 765 "    B       loc_FF0DEDD0 \n"
 766 
 767 "loc_FF0DEE44:\n"
 768 "    CMP     R1, #0x2D \n"
 769 "    BNE     loc_FF0DEE5C \n"
 770 "    BL      sub_FF0C7B88 \n"
 771 "    BL      sub_FF0C89F0 \n"
 772 "    BL      sub_FF0C84D0 \n"
 773 "    B       loc_FF0DEDD0 \n"
 774 
 775 "loc_FF0DEE5C:\n"
 776 "    CMP     R1, #0x2E \n"
 777 "    BNE     loc_FF0DEEB0 \n"
 778 "    LDR     R0, [R6, #0x1C] \n"
 779 "    MOV     R1, #4 \n"
 780 "    BL      sub_006B82FC /*_ClearEventFlag*/ \n"
 781 "    LDR     R1, =0xFF0D9878 \n"
 782 "    LDR     R0, =0xFFFFF400 \n"
 783 "    MOV     R2, #4 \n"
 784 "    BL      sub_FF0C756C \n"
 785 "    BL      sub_FF0C781C \n"
 786 "    LDR     R0, [R6, #0x1C] \n"
 787 "    MOV     R2, R7 \n"
 788 "    MOV     R1, #4 \n"
 789 "    BL      sub_006B8110 /*_WaitForAnyEventFlag*/ \n"
 790 "    TST     R0, #1 \n"
 791 "    BEQ     loc_FF0DEDD0 \n"
 792 "    LDR     R2, =0x1721 \n"
 793 
 794 "loc_FF0DEEA0:\n"
 795 "    LDR     R1, =0xFF0D9EF4 /*'ExpDrv.c'*/ \n"
 796 "    MOV     R0, #0 \n"
 797 "    BL      _DebugAssert \n"
 798 "    B       loc_FF0DEDD0 \n"
 799 
 800 "loc_FF0DEEB0:\n"
 801 "    LDR     R0, [SP, #0x28] \n"
 802 "    MOV     R8, #1 \n"
 803 "    LDR     R1, [R0] \n"
 804 "    CMP     R1, #0x12 \n"
 805 "    CMPNE   R1, #0x13 \n"
 806 "    BNE     loc_FF0DEF18 \n"
 807 "    LDR     R1, [R0, #0x94] \n"
 808 "    ADD     R1, R1, R1, LSL#1 \n"
 809 "    ADD     R1, R0, R1, LSL#2 \n"
 810 "    SUB     R1, R1, #8 \n"
 811 "    LDMIA   R1, {R2,R3,R9} \n"
 812 "    STMIA   R5, {R2,R3,R9} \n"
 813 "    BL      sub_FF0DCE50 \n"
 814 "    LDR     R0, [SP, #0x28] \n"
 815 "    LDR     R1, [R0, #0x94] \n"
 816 "    LDR     R3, [R0, #0xA8] \n"
 817 "    LDR     R2, [R0, #0xAC] \n"
 818 "    ADD     R0, R0, #4 \n"
 819 "    BLX     R3 \n"
 820 "    LDR     R0, [SP, #0x28] \n"
 821 "    BL      sub_FF0E0654 \n"
 822 "    LDR     R0, [SP, #0x28] \n"
 823 "    LDR     R1, [R0, #0x94] \n"
 824 "    LDR     R2, [R0, #0xB4] \n"
 825 "    LDR     R3, [R0, #0xB0] \n"
 826 "    B       loc_FF0DF220 \n"
 827 
 828 "loc_FF0DEF18:\n"
 829 "    CMP     R1, #0x14 \n"
 830 "    CMPNE   R1, #0x15 \n"
 831 "    CMPNE   R1, #0x16 \n"
 832 "    CMPNE   R1, #0x17 \n"
 833 "    BNE     loc_FF0DEFC0 \n"
 834 "    ADD     R3, SP, #0xC \n"
 835 "    MOV     R2, SP \n"
 836 "    ADD     R1, SP, #0x1C \n"
 837 "    BL      sub_FF0DD0C0 \n"
 838 "    CMP     R0, #1 \n"
 839 "    MOV     R9, R0 \n"
 840 "    CMPNE   R9, #5 \n"
 841 "    BNE     loc_FF0DEF6C \n"
 842 "    LDR     R0, [SP, #0x28] \n"
 843 "    MOV     R2, R9 \n"
 844 "    LDR     R1, [R0, #0x94] \n"
 845 "    LDR     R12, [R0, #0xA8] \n"
 846 "    LDR     R3, [R0, #0xAC] \n"
 847 "    ADD     R0, R0, #4 \n"
 848 "    BLX     R12 \n"
 849 "    B       loc_FF0DEFA4 \n"
 850 
 851 "loc_FF0DEF6C:\n"
 852 "    LDR     R0, [SP, #0x28] \n"
 853 "    CMP     R9, #2 \n"
 854 "    LDR     R1, [R0, #0x94] \n"
 855 "    LDR     R12, [R0, #0xA8] \n"
 856 "    LDR     R3, [R0, #0xAC] \n"
 857 "    CMPNE   R9, #6 \n"
 858 "    MOV     R2, R9 \n"
 859 "    ADD     R0, R0, #4 \n"
 860 "    BNE     loc_FF0DEFB8 \n"
 861 "    BLX     R12 \n"
 862 "    LDR     R0, [SP, #0x28] \n"
 863 "    MOV     R2, SP \n"
 864 "    ADD     R1, SP, #0x1C \n"
 865 "    BL      sub_FF0DE970 \n"
 866 
 867 "loc_FF0DEFA4:\n"
 868 "    LDR     R0, [SP, #0x28] \n"
 869 "    LDR     R2, [SP, #0xC] \n"
 870 "    MOV     R1, R9 \n"
 871 "    BL      sub_FF0DEBC4 \n"
 872 "    B       loc_FF0DF228 \n"
 873 
 874 "loc_FF0DEFB8:\n"
 875 "    BLX     R12 \n"
 876 "    B       loc_FF0DF228 \n"
 877 
 878 "loc_FF0DEFC0:\n"
 879 "    CMP     R1, #0x24 \n"
 880 "    CMPNE   R1, #0x25 \n"
 881 "    BNE     loc_FF0DF00C \n"
 882 "    LDR     R1, [R0, #0x94] \n"
 883 "    ADD     R1, R1, R1, LSL#1 \n"
 884 "    ADD     R1, R0, R1, LSL#2 \n"
 885 "    SUB     R1, R1, #8 \n"
 886 "    LDMIA   R1, {R2,R3,R9} \n"
 887 "    STMIA   R5, {R2,R3,R9} \n"
 888 "    BL      sub_FF0DBA58 \n"
 889 "    LDR     R0, [SP, #0x28] \n"
 890 "    LDR     R1, [R0, #0x94] \n"
 891 "    LDR     R3, [R0, #0xA8] \n"
 892 "    LDR     R2, [R0, #0xAC] \n"
 893 "    ADD     R0, R0, #4 \n"
 894 "    BLX     R3 \n"
 895 "    LDR     R0, [SP, #0x28] \n"
 896 "    BL      sub_FF0DBFB0 \n"
 897 "    B       loc_FF0DF228 \n"
 898 
 899 "loc_FF0DF00C:\n"
 900 "    ADD     R1, R0, #4 \n"
 901 "    LDMIA   R1, {R2,R3,R9} \n"
 902 "    STMIA   R5, {R2,R3,R9} \n"
 903 "    LDR     R1, [R0] \n"
 904 "    CMP     R1, #0x28 \n"
 905 "    ADDCC   PC, PC, R1, LSL#2 \n"
 906 "    B       loc_FF0DF210 \n"
 907 "    B       loc_FF0DF0C8 \n"
 908 "    B       loc_FF0DF0C8 \n"
 909 "    B       loc_FF0DF0D0 \n"
 910 "    B       loc_FF0DF0D8 \n"
 911 "    B       loc_FF0DF0D8 \n"
 912 "    B       loc_FF0DF0D8 \n"
 913 "    B       loc_FF0DF0C8 \n"
 914 "    B       loc_FF0DF0D0 \n"
 915 "    B       loc_FF0DF0D8 \n"
 916 "    B       loc_FF0DF0D8 \n"
 917 "    B       loc_FF0DF0F0 \n"
 918 "    B       loc_FF0DF0F0 \n"
 919 "    B       loc_FF0DF1FC \n"
 920 "    B       loc_FF0DF204 \n"
 921 "    B       loc_FF0DF204 \n"
 922 "    B       loc_FF0DF204 \n"
 923 "    B       loc_FF0DF204 \n"
 924 "    B       loc_FF0DF20C \n"
 925 "    B       loc_FF0DF210 \n"
 926 "    B       loc_FF0DF210 \n"
 927 "    B       loc_FF0DF210 \n"
 928 "    B       loc_FF0DF210 \n"
 929 "    B       loc_FF0DF210 \n"
 930 "    B       loc_FF0DF210 \n"
 931 "    B       loc_FF0DF0E0 \n"
 932 "    B       loc_FF0DF0E8 \n"
 933 "    B       loc_FF0DF0E8 \n"
 934 "    B       loc_FF0DF0E8 \n"
 935 "    B       loc_FF0DF0FC \n"
 936 "    B       loc_FF0DF0FC \n"
 937 "    B       loc_FF0DF104 \n"
 938 "    B       loc_FF0DF13C \n"
 939 "    B       loc_FF0DF174 \n"
 940 "    B       loc_FF0DF1AC \n"
 941 "    B       loc_FF0DF1E4 \n"
 942 "    B       loc_FF0DF1E4 \n"
 943 "    B       loc_FF0DF210 \n"
 944 "    B       loc_FF0DF210 \n"
 945 "    B       loc_FF0DF1EC \n"
 946 "    B       loc_FF0DF1F4 \n"
 947 
 948 "loc_FF0DF0C8:\n"
 949 "    BL      sub_FF0D9F14 \n"
 950 "    B       loc_FF0DF210 \n"
 951 
 952 "loc_FF0DF0D0:\n"
 953 "    BL      sub_FF0DA220 \n"
 954 "    B       loc_FF0DF210 \n"
 955 
 956 "loc_FF0DF0D8:\n"
 957 "    BL      sub_FF0DA4A4 \n"
 958 "    B       loc_FF0DF210 \n"
 959 
 960 "loc_FF0DF0E0:\n"
 961 "    BL      sub_FF0DA7BC \n"
 962 "    B       loc_FF0DF210 \n"
 963 
 964 "loc_FF0DF0E8:\n"
 965 "    BL      sub_FF0DA9EC \n"
 966 "    B       loc_FF0DF210 \n"
 967 
 968 "loc_FF0DF0F0:\n"
 969 "    BL      sub_FF0DAFC4_my \n"  // --> Patched. Old value = 0xFF0DAFC4.
 970 "    MOV     R8, #0 \n"
 971 "    B       loc_FF0DF210 \n"
 972 
 973 "loc_FF0DF0FC:\n"
 974 "    BL      sub_FF0DB110 \n"
 975 "    B       loc_FF0DF210 \n"
 976 
 977 "loc_FF0DF104:\n"
 978 "    LDRH    R1, [R0, #4] \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_FF0DB6C4 \n"
 991 "    B       loc_FF0DF210 \n"
 992 
 993 "loc_FF0DF13C:\n"
 994 "    LDRH    R1, [R0, #4] \n"
 995 "    STRH    R1, [SP, #0x1C] \n"
 996 "    LDRH    R1, [R4, #2] \n"
 997 "    STRH    R1, [SP, #0x1E] \n"
 998 "    LDRH    R1, [R4, #4] \n"
 999 "    STRH    R1, [SP, #0x20] \n"
1000 "    LDRH    R1, [R4, #6] \n"
1001 "    STRH    R1, [SP, #0x22] \n"
1002 "    LDRH    R1, [R4, #8] \n"
1003 "    STRH    R1, [SP, #0x24] \n"
1004 "    LDRH    R1, [R4, #0xA] \n"
1005 "    STRH    R1, [SP, #0x26] \n"
1006 "    BL      sub_FF0E03CC \n"
1007 "    B       loc_FF0DF210 \n"
1008 
1009 "loc_FF0DF174:\n"
1010 "    LDRH    R1, [R4] \n"
1011 "    STRH    R1, [SP, #0x1C] \n"
1012 "    LDRH    R1, [R0, #6] \n"
1013 "    STRH    R1, [SP, #0x1E] \n"
1014 "    LDRH    R1, [R4, #4] \n"
1015 "    STRH    R1, [SP, #0x20] \n"
1016 "    LDRH    R1, [R4, #6] \n"
1017 "    STRH    R1, [SP, #0x22] \n"
1018 "    LDRH    R1, [R4, #8] \n"
1019 "    STRH    R1, [SP, #0x24] \n"
1020 "    LDRH    R1, [R4, #0xA] \n"
1021 "    STRH    R1, [SP, #0x26] \n"
1022 "    BL      sub_FF0E0500 \n"
1023 "    B       loc_FF0DF210 \n"
1024 
1025 "loc_FF0DF1AC:\n"
1026 "    LDRH    R1, [R4] \n"
1027 "    STRH    R1, [SP, #0x1C] \n"
1028 "    LDRH    R1, [R4, #2] \n"
1029 "    STRH    R1, [SP, #0x1E] \n"
1030 "    LDRH    R1, [R4, #4] \n"
1031 "    STRH    R1, [SP, #0x20] \n"
1032 "    LDRH    R1, [R4, #6] \n"
1033 "    STRH    R1, [SP, #0x22] \n"
1034 "    LDRH    R1, [R0, #0xC] \n"
1035 "    STRH    R1, [SP, #0x24] \n"
1036 "    LDRH    R1, [R4, #0xA] \n"
1037 "    STRH    R1, [SP, #0x26] \n"
1038 "    BL      sub_FF0E05AC \n"
1039 "    B       loc_FF0DF210 \n"
1040 
1041 "loc_FF0DF1E4:\n"
1042 "    BL      sub_FF0DB7D8 \n"
1043 "    B       loc_FF0DF210 \n"
1044 
1045 "loc_FF0DF1EC:\n"
1046 "    BL      sub_FF0DC0C8 \n"
1047 "    B       loc_FF0DF210 \n"
1048 
1049 "loc_FF0DF1F4:\n"
1050 "    BL      sub_FF0DC5E4 \n"
1051 "    B       loc_FF0DF210 \n"
1052 
1053 "loc_FF0DF1FC:\n"
1054 "    BL      sub_FF0DC854 \n"
1055 "    B       loc_FF0DF210 \n"
1056 
1057 "loc_FF0DF204:\n"
1058 "    BL      sub_FF0DCA20 \n"
1059 "    B       loc_FF0DF210 \n"
1060 
1061 "loc_FF0DF20C:\n"
1062 "    BL      sub_FF0DCB98 \n"
1063 
1064 "loc_FF0DF210:\n"
1065 "    LDR     R0, [SP, #0x28] \n"
1066 "    LDR     R1, [R0, #0x94] \n"
1067 "    LDR     R2, [R0, #0xAC] \n"
1068 "    LDR     R3, [R0, #0xA8] \n"
1069 
1070 "loc_FF0DF220:\n"
1071 "    ADD     R0, R0, #4 \n"
1072 "    BLX     R3 \n"
1073 
1074 "loc_FF0DF228:\n"
1075 "    LDR     R0, [SP, #0x28] \n"
1076 "    LDR     R0, [R0] \n"
1077 "    CMP     R0, #0x10 \n"
1078 "    BEQ     loc_FF0DF260 \n"
1079 "    BGT     loc_FF0DF250 \n"
1080 "    CMP     R0, #1 \n"
1081 "    CMPNE   R0, #4 \n"
1082 "    CMPNE   R0, #0xE \n"
1083 "    BNE     loc_FF0DF294 \n"
1084 "    B       loc_FF0DF260 \n"
1085 
1086 "loc_FF0DF250:\n"
1087 "    CMP     R0, #0x13 \n"
1088 "    CMPNE   R0, #0x17 \n"
1089 "    CMPNE   R0, #0x1A \n"
1090 "    BNE     loc_FF0DF294 \n"
1091 
1092 "loc_FF0DF260:\n"
1093 "    LDRSH   R0, [R4] \n"
1094 "    CMN     R0, #0xC00 \n"
1095 "    LDRNESH R1, [R4, #8] \n"
1096 "    CMNNE   R1, #0xC00 \n"
1097 "    STRNEH  R0, [SP, #0x1C] \n"
1098 "    STRNEH  R1, [SP, #0x24] \n"
1099 "    BNE     loc_FF0DF294 \n"
1100 "    ADD     R0, SP, #0x10 \n"
1101 "    BL      sub_FF0E086C \n"
1102 "    LDRH    R0, [SP, #0x10] \n"
1103 "    STRH    R0, [SP, #0x1C] \n"
1104 "    LDRH    R0, [SP, #0x18] \n"
1105 "    STRH    R0, [SP, #0x24] \n"
1106 
1107 "loc_FF0DF294:\n"
1108 "    LDR     R0, [SP, #0x28] \n"
1109 "    CMP     R8, #1 \n"
1110 "    BNE     loc_FF0DF2E4 \n"
1111 "    LDR     R1, [R0, #0x94] \n"
1112 "    MOV     R2, #0xC \n"
1113 "    ADD     R1, R1, R1, LSL#1 \n"
1114 "    ADD     R0, R0, R1, LSL#2 \n"
1115 "    SUB     R8, R0, #8 \n"
1116 "    LDR     R0, =0x63EFC \n"
1117 "    ADD     R1, SP, #0x1C \n"
1118 "    BL      sub_006D4A08 \n"
1119 "    LDR     R0, =0x63F08 \n"
1120 "    MOV     R2, #0xC \n"
1121 "    ADD     R1, SP, #0x1C \n"
1122 "    BL      sub_006D4A08 \n"
1123 "    LDR     R0, =0x63F14 \n"
1124 "    MOV     R2, #0xC \n"
1125 "    MOV     R1, R8 \n"
1126 "    BL      sub_006D4A08 \n"
1127 "    B       loc_FF0DF35C \n"
1128 
1129 "loc_FF0DF2E4:\n"
1130 "    LDR     R0, [R0] \n"
1131 "    MOV     R3, #1 \n"
1132 "    CMP     R0, #0xB \n"
1133 "    BNE     loc_FF0DF328 \n"
1134 "    MOV     R2, #0 \n"
1135 "    STRD    R2, [SP] \n"
1136 "    MOV     R2, R3 \n"
1137 "    MOV     R1, R3 \n"
1138 "    MOV     R0, #0 \n"
1139 "    BL      sub_FF0D9C90 \n"
1140 "    MOV     R3, #1 \n"
1141 "    MOV     R2, #0 \n"
1142 "    STRD    R2, [SP] \n"
1143 "    MOV     R2, R3 \n"
1144 "    MOV     R1, R3 \n"
1145 "    MOV     R0, #0 \n"
1146 "    B       loc_FF0DF358 \n"
1147 
1148 "loc_FF0DF328:\n"
1149 "    MOV     R2, #1 \n"
1150 "    STRD    R2, [SP] \n"
1151 "    MOV     R3, R2 \n"
1152 "    MOV     R1, R2 \n"
1153 "    MOV     R0, R2 \n"
1154 "    BL      sub_FF0D9C90 \n"
1155 "    MOV     R3, #1 \n"
1156 "    MOV     R2, R3 \n"
1157 "    MOV     R1, R3 \n"
1158 "    MOV     R0, R3 \n"
1159 "    STR     R3, [SP] \n"
1160 "    STR     R3, [SP, #4] \n"
1161 
1162 "loc_FF0DF358:\n"
1163 "    BL      sub_FF0D9E18 \n"
1164 
1165 "loc_FF0DF35C:\n"
1166 "    LDR     R0, [SP, #0x28] \n"
1167 "    BL      sub_FF0E0324 \n"
1168 "    B       loc_FF0DED00 \n"
1169 );
1170 }
1171 
1172 /*************************************************************/
1173 //** sub_FF0DAFC4_my @ 0xFF0DAFC4 - 0xFF0DB088, length=50
1174 void __attribute__((naked,noinline)) sub_FF0DAFC4_my() {
1175 asm volatile (
1176 "    STMFD   SP!, {R4-R8,LR} \n"
1177 "    LDR     R7, =0x4BB0 \n"
1178 "    MOV     R4, R0 \n"
1179 "    LDR     R0, [R7, #0x1C] \n"
1180 "    MOV     R1, #0x3E \n"
1181 "    BL      sub_006B82FC /*_ClearEventFlag*/ \n"
1182 "    MOV     R2, #0 \n"
1183 "    LDRSH   R0, [R4, #4] \n"
1184 "    MOV     R3, #1 \n"
1185 "    MOV     R1, R2 \n"
1186 "    BL      sub_FF0D98E0 \n"
1187 "    MOV     R6, R0 \n"
1188 "    LDRSH   R0, [R4, #6] \n"
1189 "    BL      sub_FF0D9A9C \n"
1190 "    LDRSH   R0, [R4, #8] \n"
1191 "    BL      sub_FF0D9AF4 \n"
1192 "    LDRSH   R0, [R4, #0xA] \n"
1193 "    BL      sub_FF0D9B4C \n"
1194 "    LDRSH   R0, [R4, #0xC] \n"
1195 "    MOV     R1, #0 \n"
1196 "    BL      sub_FF0D9BA4 \n"
1197 "    MOV     R5, R0 \n"
1198 "    LDR     R0, [R4] \n"
1199 "    LDR     R8, =0x63F14 \n"
1200 "    CMP     R0, #0xB \n"
1201 "    MOVEQ   R6, #0 \n"
1202 "    MOVEQ   R5, R6 \n"
1203 "    BEQ     loc_FF0DB05C \n"
1204 "    CMP     R6, #1 \n"
1205 "    BNE     loc_FF0DB05C \n"
1206 "    LDRSH   R0, [R4, #4] \n"
1207 "    LDR     R1, =0xFF0D9838 \n"
1208 "    MOV     R2, #2 \n"
1209 "    BL      sub_FF06962C \n"
1210 "    STRH    R0, [R4, #4] \n"
1211 "    MOV     R0, #0 \n"
1212 "    STR     R0, [R7, #0x28] \n"
1213 "    B       loc_FF0DB064 \n"
1214 
1215 "loc_FF0DB05C:\n"
1216 "    LDRH    R0, [R8] \n"
1217 "    STRH    R0, [R4, #4] \n"
1218 
1219 "loc_FF0DB064:\n"
1220 "    CMP     R5, #1 \n"
1221 "    LDRNEH  R0, [R8, #8] \n"
1222 "    BNE     loc_FF0DB080 \n"
1223 "    LDRSH   R0, [R4, #0xC] \n"
1224 "    LDR     R1, =0xFF0D98BC \n"
1225 "    MOV     R2, #0x20 \n"
1226 "    BL      sub_FF0E0388 \n"
1227 
1228 "loc_FF0DB080:\n"
1229 "    STRH    R0, [R4, #0xC] \n"
1230 "    LDRSH   R0, [R4, #6] \n"
1231 "    BL      sub_FF0C7894_my \n"  // --> Patched. Old value = 0xFF0C7894.
1232 "    LDR     PC, =0xFF0DB08C \n"  // Continue in firmware
1233 );
1234 }
1235 
1236 /*************************************************************/
1237 //** sub_FF0C7894_my @ 0xFF0C7894 - 0xFF0C78DC, length=19
1238 void __attribute__((naked,noinline)) sub_FF0C7894_my() {
1239 asm volatile (
1240 "    STMFD   SP!, {R4-R6,LR} \n"
1241 "    LDR     R5, =0x4818 \n"
1242 "    MOV     R4, R0 \n"
1243 "    LDR     R0, [R5, #4] \n"
1244 "    CMP     R0, #1 \n"
1245 "    MOVNE   R2, #0x154 \n"
1246 "    LDRNE   R1, =0xFF0C765C /*'Shutter.c'*/ \n"
1247 "    MOVNE   R0, #0 \n"
1248 "    BLNE    _DebugAssert \n"
1249 "    CMN     R4, #0xC00 \n"
1250 "    LDREQSH R4, [R5, #2] \n"
1251 "    CMN     R4, #0xC00 \n"
1252 "    LDREQ   R2, =0x15A \n"
1253 "    LDREQ   R1, =0xFF0C765C /*'Shutter.c'*/ \n"
1254 "    MOVEQ   R0, #0 \n"
1255 "    STRH    R4, [R5, #2] \n"
1256 "    BLEQ    _DebugAssert \n"
1257 "    MOV     R0, R4 \n"
1258 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
1259 "    LDR     PC, =0xFF0C78E0 \n"  // Continue in firmware
1260 );
1261 }

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