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

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF994004_my
  3. sub_FF993EFC_my
  4. sub_FFADA1E0_my
  5. task_developseq_my
  6. exp_drv_task
  7. sub_FF8C8330_my
  8. sub_FF8B54E0_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*)(0xA8F8+0xC); // sx170is 100a Found @ 0xffa2feb4 (0xA8F8) & 0xffa2feb8 (+0xC)
  10 //#define PAUSE_FOR_FILE_COUNTER 350  // Enable delay in capt_seq_hook_raw_here to ensure file counter is updated
  11 
  12 #include "../../../generic/capt_seq.c"
  13 
  14 /*************************************************************/
  15 //** capt_seq_task @ 0xFF87A64C - 0xFF87A94C, length=193
  16 void __attribute__((naked,noinline)) capt_seq_task() {
  17 asm volatile (
  18 "    STMFD   SP!, {R3-R7,LR} \n"
  19 "    LDR     R5, =0x1D758 \n"
  20 "    LDR     R7, =0x35A0 \n"
  21 "    MOV     R6, #0 \n"
  22 
  23 "loc_FF87A65C:\n"
  24 "    LDR     R0, [R7, #4] \n"
  25 "    MOV     R2, #0 \n"
  26 "    MOV     R1, SP \n"
  27 "    BL      sub_003F84B8 /*_ReceiveMessageQueue*/ \n"
  28 "    TST     R0, #1 \n"
  29 "    BEQ     loc_FF87A68C \n"
  30 "    LDR     R2, =0x4D4 \n"
  31 "    LDR     R1, =0xFF879E90 /*'SsShootTask.c'*/ \n"
  32 "    MOV     R0, #0 \n"
  33 "    BL      _DebugAssert \n"
  34 "    BL      _ExitTask \n"
  35 "    LDMFD   SP!, {R3-R7,PC} \n"
  36 
  37 "loc_FF87A68C:\n"
  38 "    LDR     R0, [SP] \n"
  39 "    LDR     R0, [R0] \n"
  40 "    CMP     R0, #1 \n"
  41 "    BLNE    sub_FF995700 \n"
  42 "    LDR     R0, [SP] \n"
  43 "    LDR     R1, [R0] \n"
  44 "    CMP     R1, #0x29 \n"
  45 "    ADDCC   PC, PC, R1, LSL#2 \n"
  46 "    B       loc_FF87A910 \n"
  47 "    B       loc_FF87A754 \n"
  48 "    B       loc_FF87A76C \n"
  49 "    B       loc_FF87A778 \n"
  50 "    B       loc_FF87A78C \n"
  51 "    B       loc_FF87A784 \n"
  52 "    B       loc_FF87A798 \n"
  53 "    B       loc_FF87A7A0 \n"
  54 "    B       loc_FF87A7A8 \n"
  55 "    B       loc_FF87A7B4 \n"
  56 "    B       loc_FF87A7E0 \n"
  57 "    B       loc_FF87A7C0 \n"
  58 "    B       loc_FF87A7CC \n"
  59 "    B       loc_FF87A7D4 \n"
  60 "    B       loc_FF87A7E8 \n"
  61 "    B       loc_FF87A7F0 \n"
  62 "    B       loc_FF87A7F8 \n"
  63 "    B       loc_FF87A800 \n"
  64 "    B       loc_FF87A808 \n"
  65 "    B       loc_FF87A810 \n"
  66 "    B       loc_FF87A818 \n"
  67 "    B       loc_FF87A820 \n"
  68 "    B       loc_FF87A828 \n"
  69 "    B       loc_FF87A830 \n"
  70 "    B       loc_FF87A838 \n"
  71 "    B       loc_FF87A840 \n"
  72 "    B       loc_FF87A84C \n"
  73 "    B       loc_FF87A854 \n"
  74 "    B       loc_FF87A85C \n"
  75 "    B       loc_FF87A868 \n"
  76 "    B       loc_FF87A870 \n"
  77 "    B       loc_FF87A878 \n"
  78 "    B       loc_FF87A880 \n"
  79 "    B       loc_FF87A888 \n"
  80 "    B       loc_FF87A890 \n"
  81 "    B       loc_FF87A898 \n"
  82 "    B       loc_FF87A8A4 \n"
  83 "    B       loc_FF87A8AC \n"
  84 "    B       loc_FF87A8B8 \n"
  85 "    B       loc_FF87A8F0 \n"
  86 "    B       loc_FF87A8FC \n"
  87 "    B       loc_FF87A920 \n"
  88 
  89 "loc_FF87A754:\n"
  90 "    BL      shooting_expo_iso_override\n"      // extra ISO override call doesn't appear to be needed on elph130
  91 "    BL      sub_FF87AE34 \n"
  92 "    BL      shooting_expo_param_override\n"    // added
  93 "    BL      sub_FF877CE4 \n"
  94 // try avoid intermittetant override failues on quick press, not needed?
  95 //"    MOV     R0, #0\n"                          // added
  96 //"    STR     R0, [R5,#0x28]\n"                  // added
  97 "    LDR     R0, [R5, #0x28] \n"
  98 "    CMP     R0, #0 \n"
  99 "    BLNE    sub_FF994004_my \n"  // --> Patched. Old value = 0xFF994004.
 100 "    B       loc_FF87A920 \n"
 101 
 102 "loc_FF87A76C:\n"
 103 "    LDR     R0, [R0, #0x10] \n"
 104 "    BL      sub_FF993EFC_my \n"  // --> Patched. Old value = 0xFF993EFC.
 105 "    B       loc_FF87A920 \n"
 106 
 107 "loc_FF87A778:\n"
 108 "    MOV     R0, #1 \n"
 109 "    BL      sub_FF87B19C \n"
 110 "    B       loc_FF87A920 \n"
 111 
 112 "loc_FF87A784:\n"
 113 "    BL      sub_FF87AB10 \n"
 114 "    B       loc_FF87A790 \n"
 115 
 116 "loc_FF87A78C:\n"
 117 "    BL      sub_FF87AE10 \n"
 118 
 119 "loc_FF87A790:\n"
 120 "    STR     R6, [R5, #0x28] \n"
 121 "    B       loc_FF87A920 \n"
 122 
 123 "loc_FF87A798:\n"
 124 "    BL      sub_FF87AE18 \n"
 125 "    B       loc_FF87A920 \n"
 126 
 127 "loc_FF87A7A0:\n"
 128 "    BL      sub_FF87B058 \n"
 129 "    B       loc_FF87A7B8 \n"
 130 
 131 "loc_FF87A7A8:\n"
 132 "    LDR     R0, [R0, #0x10] \n"
 133 "    BL      sub_FF994094 \n"
 134 "    B       loc_FF87A920 \n"
 135 
 136 "loc_FF87A7B4:\n"
 137 "    BL      sub_FF87B0F0 \n"
 138 
 139 "loc_FF87A7B8:\n"
 140 "    BL      sub_FF877CE4 \n"
 141 "    B       loc_FF87A920 \n"
 142 
 143 "loc_FF87A7C0:\n"
 144 "    LDR     R0, [R5, #0x58] \n"
 145 "    BL      sub_FF87B844 \n"
 146 "    B       loc_FF87A920 \n"
 147 
 148 "loc_FF87A7CC:\n"
 149 "    BL      sub_FF87BC94 \n"
 150 "    B       loc_FF87A920 \n"
 151 
 152 "loc_FF87A7D4:\n"
 153 "    LDR     R0, [R0, #0xC] \n"
 154 "    BL      sub_FF87BCFC \n"
 155 "    B       loc_FF87A920 \n"
 156 
 157 "loc_FF87A7E0:\n"
 158 "    BL      sub_FF87AE10 \n"
 159 "    B       loc_FF87A920 \n"
 160 
 161 "loc_FF87A7E8:\n"
 162 "    BL      sub_FF993300 \n"
 163 "    B       loc_FF87A920 \n"
 164 
 165 "loc_FF87A7F0:\n"
 166 "    BL      sub_FF99353C \n"
 167 "    B       loc_FF87A920 \n"
 168 
 169 "loc_FF87A7F8:\n"
 170 "    BL      sub_FF9935F8 \n"
 171 "    B       loc_FF87A920 \n"
 172 
 173 "loc_FF87A800:\n"
 174 "    BL      sub_FF993698 \n"
 175 "    B       loc_FF87A920 \n"
 176 
 177 "loc_FF87A808:\n"
 178 "    BL      sub_FF993770 \n"
 179 "    B       loc_FF87A920 \n"
 180 
 181 "loc_FF87A810:\n"
 182 "    MOV     R0, #0 \n"
 183 "    B       loc_FF87A844 \n"
 184 
 185 "loc_FF87A818:\n"
 186 "    BL      sub_FF993B90 \n"
 187 "    B       loc_FF87A920 \n"
 188 
 189 "loc_FF87A820:\n"
 190 "    BL      sub_FF881A30 \n"
 191 "    B       loc_FF87A920 \n"
 192 
 193 "loc_FF87A828:\n"
 194 "    BL      sub_FF881A3C \n"
 195 "    B       loc_FF87A920 \n"
 196 
 197 "loc_FF87A830:\n"
 198 "    BL      sub_FF993C2C \n"
 199 "    B       loc_FF87A920 \n"
 200 
 201 "loc_FF87A838:\n"
 202 "    BL      sub_FF993CD8 \n"
 203 "    B       loc_FF87A920 \n"
 204 
 205 "loc_FF87A840:\n"
 206 "    MOV     R0, #1 \n"
 207 
 208 "loc_FF87A844:\n"
 209 "    BL      sub_FF993A2C \n"
 210 "    B       loc_FF87A920 \n"
 211 
 212 "loc_FF87A84C:\n"
 213 "    BL      sub_FF87B31C \n"
 214 "    B       loc_FF87A920 \n"
 215 
 216 "loc_FF87A854:\n"
 217 "    MOV     R0, #0 \n"
 218 "    B       loc_FF87A860 \n"
 219 
 220 "loc_FF87A85C:\n"
 221 "    LDR     R0, [R0, #0xC] \n"
 222 
 223 "loc_FF87A860:\n"
 224 "    BL      sub_FF87B3A8 \n"
 225 "    B       loc_FF87A920 \n"
 226 
 227 "loc_FF87A868:\n"
 228 "    BL      sub_FF993900 \n"
 229 "    B       loc_FF87A920 \n"
 230 
 231 "loc_FF87A870:\n"
 232 "    BL      sub_FF993998 \n"
 233 "    B       loc_FF87A920 \n"
 234 
 235 "loc_FF87A878:\n"
 236 "    BL      sub_FF994DF0 \n"
 237 "    B       loc_FF87A920 \n"
 238 
 239 "loc_FF87A880:\n"
 240 //"  BL      _sub_FF8785E8 \n"  // --> Nullsub call removed.
 241 "    B       loc_FF87A920 \n"
 242 
 243 "loc_FF87A888:\n"
 244 "    BL      sub_FF87E30C \n"
 245 "    B       loc_FF87A920 \n"
 246 
 247 "loc_FF87A890:\n"
 248 "    BL      sub_FF87E428 \n"
 249 "    B       loc_FF87A920 \n"
 250 
 251 "loc_FF87A898:\n"
 252 "    LDR     R0, [R0, #0xC] \n"
 253 "    BL      sub_FF993DE8 \n"
 254 "    B       loc_FF87A920 \n"
 255 
 256 "loc_FF87A8A4:\n"
 257 "    BL      sub_FF993E70 \n"
 258 "    B       loc_FF87A920 \n"
 259 
 260 "loc_FF87A8AC:\n"
 261 "    BL      sub_FF87E598 \n"
 262 "    BL      sub_FF87E484 \n"
 263 "    B       loc_FF87A920 \n"
 264 
 265 "loc_FF87A8B8:\n"
 266 "    MOV     R0, #1 \n"
 267 "    BL      sub_FF99481C \n"
 268 "    MOV     R0, #1 \n"
 269 "    BL      sub_FF994948 \n"
 270 "    LDR     R0, =0x1D858 \n"
 271 "    LDRH    R0, [R0, #0xB0] \n"
 272 "    CMP     R0, #4 \n"
 273 "    LDRNEH  R0, [R5] \n"
 274 "    SUBNE   R1, R0, #0x8000 \n"
 275 "    SUBNES  R1, R1, #0x230 \n"
 276 "    BNE     loc_FF87A920 \n"
 277 "    BL      sub_FF87E428 \n"
 278 "    BL      sub_FF87E93C \n"
 279 "    B       loc_FF87A920 \n"
 280 
 281 "loc_FF87A8F0:\n"
 282 "    MOV     R2, #0 \n"
 283 "    MOV     R1, #0x10 \n"
 284 "    B       loc_FF87A904 \n"
 285 
 286 "loc_FF87A8FC:\n"
 287 "    MOV     R2, #0 \n"
 288 "    MOV     R1, #0xF \n"
 289 
 290 "loc_FF87A904:\n"
 291 "    MOV     R0, #0 \n"
 292 "    BL      sub_FF8787AC \n"
 293 "    B       loc_FF87A920 \n"
 294 
 295 "loc_FF87A910:\n"
 296 "    LDR     R2, =0x65A \n"
 297 "    LDR     R1, =0xFF879E90 /*'SsShootTask.c'*/ \n"
 298 "    MOV     R0, #0 \n"
 299 "    BL      _DebugAssert \n"
 300 
 301 "loc_FF87A920:\n"
 302 "    LDR     R0, [SP] \n"
 303 "    LDR     R1, [R0, #4] \n"
 304 "    LDR     R0, [R7] \n"
 305 "    BL      sub_003F82C8 /*_SetEventFlag*/ \n"
 306 "    LDR     R4, [SP] \n"
 307 "    LDR     R0, [R4, #8] \n"
 308 "    CMP     R0, #0 \n"
 309 "    LDREQ   R2, =0x126 \n"
 310 "    LDREQ   R1, =0xFF879E90 /*'SsShootTask.c'*/ \n"
 311 "    BLEQ    _DebugAssert \n"
 312 "    STR     R6, [R4, #8] \n"
 313 "    B       loc_FF87A65C \n"
 314 );
 315 }
 316 
 317 /*************************************************************/
 318 //** sub_FF994004_my @ 0xFF994004 - 0xFF994090, length=36
 319 void __attribute__((naked,noinline)) sub_FF994004_my() {
 320 asm volatile (
 321 "    STMFD   SP!, {R4-R6,LR} \n"
 322 "    BL      sub_FF879A6C \n"
 323 "    MOV     R4, R0 \n"
 324 "    MOV     R0, #0xC \n"
 325 "    BL      sub_FF8801D8 \n"
 326 "    LDR     R6, =0x7944 \n"
 327 "    TST     R0, #1 \n"
 328 "    MOV     R5, #1 \n"
 329 "    BNE     loc_FF99408C \n"
 330 "    BL      sub_FF87AE20 \n"
 331 "    BL      sub_FF87C038 \n"
 332 "    MOV     R1, R4 \n"
 333 "    BL      sub_FF87C094 \n"
 334 "    LDR     R0, =0x10E \n"
 335 "    MOV     R2, #4 \n"
 336 "    ADD     R1, R4, #0x30 \n"
 337 "    BL      _SetPropertyCase \n"
 338 "    MOV     R2, #4 \n"
 339 "    ADD     R1, R4, #0x34 \n"
 340 "    MOV     R0, #0x2C \n"
 341 "    BL      _SetPropertyCase \n"
 342 "    MOV     R2, #4 \n"
 343 "    ADD     R1, R4, #8 \n"
 344 "    MOV     R0, #0x3F \n"
 345 "    BL      _SetPropertyCase \n"
 346 "    BL      sub_FF994B08 \n"
 347 "    MVN     R1, #0x1000 \n"
 348 "    BL      sub_003F82FC /*_ClearEventFlag*/ \n"
 349 "    MOV     R0, R4 \n"
 350 "    BL      sub_FFAD9E3C \n"
 351 "    MOV     R0, R4 \n"
 352 "    BL      sub_FFADA1E0_my \n"  // --> Patched. Old value = 0xFFADA1E0.
 353 "    TST     R0, #1 \n"
 354 "    LDMEQFD SP!, {R4-R6,PC} \n"
 355 
 356 "loc_FF99408C:\n"
 357 "    STR     R5, [R6] \n"
 358 "    LDMFD   SP!, {R4-R6,PC} \n"
 359 );
 360 }
 361 
 362 /*************************************************************/
 363 //** sub_FF993EFC_my @ 0xFF993EFC - 0xFF994000, length=66
 364 void __attribute__((naked,noinline)) sub_FF993EFC_my() {
 365 asm volatile (
 366 "    STMFD   SP!, {R4-R6,LR} \n"
 367 "    LDR     R6, =0x1D758 \n"
 368 "    MOV     R5, R0 \n"
 369 "    LDR     R0, [R6, #0x28] \n"
 370 "    MOV     R4, #0 \n"
 371 "    CMP     R0, #0 \n"
 372 "    BEQ     loc_FF993F48 \n"
 373 "    LDR     R0, =0x7944 \n"
 374 "    MOV     R2, R5 \n"
 375 "    LDR     R0, [R0] \n"
 376 "    MOV     R1, #1 \n"
 377 "    CMP     R0, #0 \n"
 378 "    MOVNE   R4, #0x1D \n"
 379 "    MOV     R0, R4 \n"
 380 "    BL      sub_FF8787AC \n"
 381 "    MOV     R1, R4 \n"
 382 "    MOV     R0, R5 \n"
 383 "    BL      sub_FF995488 \n"
 384 "    B       loc_FF993FF8 \n"
 385 
 386 "loc_FF993F48:\n"
 387 "    BL      sub_FF87C038 \n"
 388 "    MOV     R1, R5 \n"
 389 "    BL      sub_FF87C094 \n"
 390 "    LDR     R0, =0x10E \n"
 391 "    MOV     R2, #4 \n"
 392 "    ADD     R1, R5, #0x30 \n"
 393 "    BL      _SetPropertyCase \n"
 394 "    MOV     R2, #4 \n"
 395 "    ADD     R1, R5, #0x34 \n"
 396 "    MOV     R0, #0x2C \n"
 397 "    BL      _SetPropertyCase \n"
 398 "    MOV     R0, #0xC \n"
 399 "    BL      sub_FF8801D8 \n"
 400 "    TST     R0, #1 \n"
 401 "    BEQ     loc_FF993F8C \n"
 402 "    BL      sub_FF8785D8 \n"
 403 "    MOV     R4, #1 \n"
 404 
 405 "loc_FF993F8C:\n"
 406 "    TST     R4, #1 \n"
 407 "    BNE     loc_FF993FDC \n"
 408 "    MOV     R0, R5 \n"
 409 "    BL      sub_FF994E64 \n"
 410 "    BL      sub_FF994B08 \n"
 411 "    MVN     R1, #0x1000 \n"
 412 "    BL      sub_003F82FC /*_ClearEventFlag*/ \n"
 413 "    MOV     R0, R5 \n"
 414 "    BL      sub_FFAD950C \n"
 415 "    TST     R0, #1 \n"
 416 "    MOV     R4, R0 \n"
 417 "    BNE     loc_FF993FDC \n"
 418 "    BL      sub_FF87AE20 \n"
 419 "    MOV     R0, R5 \n"
 420 "    BL      sub_FFAD9E3C \n"
 421 "    MOV     R0, #2 \n"
 422 "    BL      sub_FF881BA8 \n"
 423 "    MOV     R0, R5 \n"
 424 "    BL      sub_FFADA1E0_my \n"  // --> Patched. Old value = 0xFFADA1E0.
 425 "    B       loc_FF993FF8 \n"
 426 
 427 "loc_FF993FDC:\n"
 428 "    MOV     R2, R5 \n"
 429 "    MOV     R1, #1 \n"
 430 "    MOV     R0, R4 \n"
 431 "    BL      sub_FF8787AC \n"
 432 "    MOV     R1, R4 \n"
 433 "    MOV     R0, R5 \n"
 434 "    BL      sub_FF99569C \n"
 435 
 436 "loc_FF993FF8:\n"
 437 "    MOV     R0, #0 \n"
 438 "    STR     R0, [R6, #0x28] \n"
 439 "    LDMFD   SP!, {R4-R6,PC} \n"
 440 );
 441 }
 442 
 443 /*************************************************************/
 444 //** sub_FFADA1E0_my @ 0xFFADA1E0 - 0xFFADA260, length=33
 445 void __attribute__((naked,noinline)) sub_FFADA1E0_my() {
 446 asm volatile (
 447 "    STMFD   SP!, {R2-R10,LR} \n"
 448 "    MOV     R4, R0 \n"
 449 "    BL      sub_FFAD9DB4 \n"
 450 "    BL      sub_FF9945E0 \n"
 451 "    LDR     R8, =0x1D758 \n"
 452 "    LDR     R0, [R8, #0x1A4] \n"
 453 "    CMP     R0, #2 \n"
 454 "    BNE     loc_FFADA21C \n"
 455 "    ADD     R0, R8, #0x100 \n"
 456 "    LDRH    R0, [R0, #0xAE] \n"
 457 "    CMP     R0, #3 \n"
 458 "    LDRNE   R0, [R4, #8] \n"
 459 "    CMPNE   R0, #1 \n"
 460 "    MOVLS   R0, #4 \n"
 461 "    BLLS    sub_FF90DD78 \n"
 462 
 463 "loc_FFADA21C:\n"
 464 "    LDR     R0, =0x12F \n"
 465 "    MOV     R2, #4 \n"
 466 "    ADD     R1, SP, #4 \n"
 467 "    BL      _GetPropertyCase \n"
 468 "    TST     R0, #1 \n"
 469 "    LDRNE   R2, =0x17B \n"
 470 "    LDRNE   R1, =0xFFADA448 /*'SsStandardCaptureSeq.c'*/ \n"
 471 "    MOVNE   R0, #0 \n"
 472 "    BLNE    _DebugAssert \n"
 473 "    LDR     R0, [SP, #4] \n"
 474 "    AND     R0, R0, #0xFF00 \n"
 475 "    CMP     R0, #0x600 \n"
 476 "    LDRNE   R0, =0xFFAD9A3C \n"
 477 "    LDREQ   R0, =0xFFADA1A8 \n"
 478 "    MOVNE   R1, R4 \n"
 479 "    MOVEQ   R1, #0 \n"
 480 "    BL      sub_FF8BDC88 \n"
 481 "    BL      wait_until_remote_button_is_released\n" // added
 482 "    BL      capt_seq_hook_set_nr\n"                 // added
 483 "    MOV     R0, R4 \n"
 484 "    LDR     PC, =0xFFADA264 \n"  // Continue in firmware
 485 );
 486 }
 487 
 488 /*************************************************************/
 489 //** task_developseq_my @ 0xFF99581C - 0xFF99592C, length=69
 490 void __attribute__((naked,noinline)) task_developseq_my() {
 491 asm volatile (
 492 "    STMFD   SP!, {R2-R8,LR} \n"
 493 "    LDR     R7, =0x7984 \n"
 494 
 495 "loc_FF995824:\n"
 496 "    MOV     R2, #0 \n"
 497 "    LDR     R0, [R7, #8] \n"
 498 "    LDR     R1, [R7, #0x10] \n"
 499 "    BL      sub_003F860C /*_PostMessageQueue*/ \n"
 500 "    LDR     R0, [R7, #4] \n"
 501 "    MOV     R2, #0 \n"
 502 "    ADD     R1, SP, #4 \n"
 503 "    BL      sub_003F84B8 /*_ReceiveMessageQueue*/ \n"
 504 "    TST     R0, #1 \n"
 505 "    LDRNE   R2, =0x1C6 \n"
 506 "    BNE     loc_FF995870 \n"
 507 "    LDR     R0, [R7, #8] \n"
 508 "    MOV     R1, SP \n"
 509 "    BL      sub_003F85B0 /*_TryReceiveMessageQueue*/ \n"
 510 "    TST     R0, #1 \n"
 511 "    LDREQ   R5, =0x1D758 \n"
 512 "    MOVEQ   R6, #0 \n"
 513 "    BEQ     loc_FF995884 \n"
 514 "    MOV     R2, #0x1CC \n"
 515 
 516 "loc_FF995870:\n"
 517 "    LDR     R1, =0xFF9959BC /*'SsDvlpSeq.c'*/ \n"
 518 "    MOV     R0, #0 \n"
 519 "    BL      _DebugAssert \n"
 520 "    BL      _ExitTask \n"
 521 "    LDMFD   SP!, {R2-R8,PC} \n"
 522 
 523 "loc_FF995884:\n"
 524 "    LDR     R0, [R5, #0x19C] \n"
 525 "    CMP     R0, #0 \n"
 526 "    LDRNE   R0, [SP, #4] \n"
 527 "    LDRNE   R0, [R0] \n"
 528 "    CMPNE   R0, #5 \n"
 529 "    BNE     loc_FF9958A8 \n"
 530 "    BL      sub_FFADB5C0 \n"
 531 "    BL      sub_FFADBCFC \n"
 532 "    BL      sub_FFADC758 \n"
 533 
 534 "loc_FF9958A8:\n"
 535 "    LDR     R1, [SP, #4] \n"
 536 "    LDR     R0, [R1] \n"  //  message from queue 2
 537 "    CMP     R0, #0 \n"
 538 "    BEQ     loc_FF9958D8 \n"  //  2nd msg after shoot
 539 "    CMP     R0, #3 \n"
 540 "    BEQ     loc_FF9958E4 \n"  //  1st msg after shoot
 541 "    CMP     R0, #5 \n"
 542 "    MOVEQ   R2, #0 \n"
 543 "    MOVEQ   R1, #0x11 \n"
 544 "    MOVEQ   R0, R2 \n"
 545 "    BLEQ    sub_FF8787AC \n"
 546 "    B       loc_FF9958FC \n"
 547 
 548 "loc_FF9958D8:\n"
 549 "    LDR     R0, [R1, #8] \n"
 550 "    BL      sub_FFADAD90 \n"
 551 "    B       loc_FF9958FC \n"
 552 
 553 "loc_FF9958E4:\n"
 554 "    LDR     R0, [R1, #8] \n"
 555 "    MOV     R1, #1 \n"
 556 "    BL      sub_FFADB068 \n"
 557 "    BL      capt_seq_hook_raw_here\n"    // +
 558 "    LDR     R0, [SP, #4] \n"
 559 "    LDR     R0, [R0, #8] \n"
 560 "    BL      sub_FFADA750 \n"
 561 
 562 "loc_FF9958FC:\n"
 563 "    LDR     R4, [SP, #4] \n"
 564 "    LDR     R0, [R4, #4] \n"
 565 "    CMP     R0, #0 \n"
 566 "    MOVEQ   R2, #0x82 \n"
 567 "    LDREQ   R1, =0xFF9959BC /*'SsDvlpSeq.c'*/ \n"
 568 "    BLEQ    _DebugAssert \n"
 569 "    STR     R6, [R4, #4] \n"
 570 "    LDR     R0, [R7, #4] \n"
 571 "    ADD     R1, SP, #4 \n"
 572 "    BL      sub_003F85B0 /*_TryReceiveMessageQueue*/ \n"
 573 "    TST     R0, #1 \n"
 574 "    BEQ     loc_FF995884 \n"
 575 "    B       loc_FF995824 \n"
 576 "    .ltorg\n"
 577 );
 578 }
 579 
 580 /*************************************************************/
 581 //** exp_drv_task @ 0xFF8CB99C - 0xFF8CC020, length=418
 582 void __attribute__((naked,noinline)) exp_drv_task() {
 583 asm volatile (
 584 "    STMFD   SP!, {R4-R9,LR} \n"
 585 "    SUB     SP, SP, #0x2C \n"
 586 "    LDR     R6, =0x4834 \n"
 587 "    LDR     R7, =0xBB8 \n"
 588 "    LDR     R4, =0x5A344 \n"
 589 "    MOV     R0, #0 \n"
 590 "    ADD     R5, SP, #0x1C \n"
 591 "    STR     R0, [SP, #0xC] \n"
 592 
 593 "loc_FF8CB9BC:\n"
 594 "    LDR     R0, [R6, #0x20] \n"
 595 "    MOV     R2, #0 \n"
 596 "    ADD     R1, SP, #0x28 \n"
 597 "    BL      sub_003F84B8 /*_ReceiveMessageQueue*/ \n"
 598 "    LDR     R0, [SP, #0xC] \n"
 599 "    CMP     R0, #1 \n"
 600 "    BNE     loc_FF8CBA08 \n"
 601 "    LDR     R0, [SP, #0x28] \n"
 602 "    LDR     R0, [R0] \n"
 603 "    CMP     R0, #0x14 \n"
 604 "    CMPNE   R0, #0x15 \n"
 605 "    CMPNE   R0, #0x16 \n"
 606 "    CMPNE   R0, #0x17 \n"
 607 "    BEQ     loc_FF8CBB6C \n"
 608 "    CMP     R0, #0x2A \n"
 609 "    BEQ     loc_FF8CBAF0 \n"
 610 "    ADD     R1, SP, #0xC \n"
 611 "    MOV     R0, #0 \n"
 612 "    BL      sub_FF8CB948 \n"
 613 
 614 "loc_FF8CBA08:\n"
 615 "    LDR     R0, [SP, #0x28] \n"
 616 "    LDR     R1, [R0] \n"
 617 "    CMP     R1, #0x30 \n"
 618 "    BNE     loc_FF8CBA34 \n"
 619 "    BL      sub_FF8CCFE4 \n"
 620 "    LDR     R0, [R6, #0x1C] \n"
 621 "    MOV     R1, #1 \n"
 622 "    BL      sub_003F82C8 /*_SetEventFlag*/ \n"
 623 "    BL      _ExitTask \n"
 624 "    ADD     SP, SP, #0x2C \n"
 625 "    LDMFD   SP!, {R4-R9,PC} \n"
 626 
 627 "loc_FF8CBA34:\n"
 628 "    CMP     R1, #0x2F \n"
 629 "    BNE     loc_FF8CBA50 \n"
 630 "    LDR     R2, [R0, #0xA8]! \n"
 631 "    LDR     R1, [R0, #4] \n"
 632 "    MOV     R0, R1 \n"
 633 "    BLX     R2 \n"
 634 "    B       loc_FF8CC018 \n"
 635 
 636 "loc_FF8CBA50:\n"
 637 "    CMP     R1, #0x28 \n"
 638 "    BNE     loc_FF8CBAA0 \n"
 639 "    LDR     R0, [R6, #0x1C] \n"
 640 "    MOV     R1, #0x80 \n"
 641 "    BL      sub_003F82FC /*_ClearEventFlag*/ \n"
 642 "    LDR     R0, =0xFF8C6EE4 \n"
 643 "    MOV     R1, #0x80 \n"
 644 "    BL      sub_FF871FE0 \n"
 645 "    LDR     R0, [R6, #0x1C] \n"
 646 "    MOV     R2, R7 \n"
 647 "    MOV     R1, #0x80 \n"
 648 "    BL      sub_003F81FC /*_WaitForAllEventFlag*/ \n"
 649 "    TST     R0, #1 \n"
 650 "    LDRNE   R2, =0x16EF \n"
 651 "    BNE     loc_FF8CBB5C \n"
 652 
 653 "loc_FF8CBA8C:\n"
 654 "    LDR     R1, [SP, #0x28] \n"
 655 "    LDR     R0, [R1, #0xAC] \n"
 656 "    LDR     R1, [R1, #0xA8] \n"
 657 "    BLX     R1 \n"
 658 "    B       loc_FF8CC018 \n"
 659 
 660 "loc_FF8CBAA0:\n"
 661 "    CMP     R1, #0x29 \n"
 662 "    BNE     loc_FF8CBAE8 \n"
 663 "    ADD     R1, SP, #0xC \n"
 664 "    BL      sub_FF8CB948 \n"
 665 "    LDR     R0, [R6, #0x1C] \n"
 666 "    MOV     R1, #0x100 \n"
 667 "    BL      sub_003F82FC /*_ClearEventFlag*/ \n"
 668 "    LDR     R0, =0xFF8C6EF4 \n"
 669 "    MOV     R1, #0x100 \n"
 670 "    BL      sub_FF872DB4 \n"
 671 "    LDR     R0, [R6, #0x1C] \n"
 672 "    MOV     R2, R7 \n"
 673 "    MOV     R1, #0x100 \n"
 674 "    BL      sub_003F81FC /*_WaitForAllEventFlag*/ \n"
 675 "    TST     R0, #1 \n"
 676 "    BEQ     loc_FF8CBA8C \n"
 677 "    LDR     R2, =0x16F9 \n"
 678 "    B       loc_FF8CBB5C \n"
 679 
 680 "loc_FF8CBAE8:\n"
 681 "    CMP     R1, #0x2A \n"
 682 "    BNE     loc_FF8CBB00 \n"
 683 
 684 "loc_FF8CBAF0:\n"
 685 "    LDR     R0, [SP, #0x28] \n"
 686 "    ADD     R1, SP, #0xC \n"
 687 "    BL      sub_FF8CB948 \n"
 688 "    B       loc_FF8CBA8C \n"
 689 
 690 "loc_FF8CBB00:\n"
 691 "    CMP     R1, #0x2D \n"
 692 "    BNE     loc_FF8CBB18 \n"
 693 "    BL      sub_FF8B57D4 \n"
 694 "    BL      sub_FF8B663C \n"
 695 "    BL      sub_FF8B611C \n"
 696 "    B       loc_FF8CBA8C \n"
 697 
 698 "loc_FF8CBB18:\n"
 699 "    CMP     R1, #0x2E \n"
 700 "    BNE     loc_FF8CBB6C \n"
 701 "    LDR     R0, [R6, #0x1C] \n"
 702 "    MOV     R1, #4 \n"
 703 "    BL      sub_003F82FC /*_ClearEventFlag*/ \n"
 704 "    LDR     R1, =0xFF8C6F14 \n"
 705 "    LDR     R0, =0xFFFFF400 \n"
 706 "    MOV     R2, #4 \n"
 707 "    BL      sub_FF8B51B8 \n"
 708 "    BL      sub_FF8B5468 \n"
 709 "    LDR     R0, [R6, #0x1C] \n"
 710 "    MOV     R2, R7 \n"
 711 "    MOV     R1, #4 \n"
 712 "    BL      sub_003F8110 /*_WaitForAnyEventFlag*/ \n"
 713 "    TST     R0, #1 \n"
 714 "    BEQ     loc_FF8CBA8C \n"
 715 "    LDR     R2, =0x1721 \n"
 716 
 717 "loc_FF8CBB5C:\n"
 718 "    LDR     R1, =0xFF8C7644 /*'ExpDrv.c'*/ \n"
 719 "    MOV     R0, #0 \n"
 720 "    BL      _DebugAssert \n"
 721 "    B       loc_FF8CBA8C \n"
 722 
 723 "loc_FF8CBB6C:\n"
 724 "    LDR     R0, [SP, #0x28] \n"
 725 "    MOV     R8, #1 \n"
 726 "    LDR     R1, [R0] \n"
 727 "    CMP     R1, #0x12 \n"
 728 "    CMPNE   R1, #0x13 \n"
 729 "    BNE     loc_FF8CBBD4 \n"
 730 "    LDR     R1, [R0, #0x94] \n"
 731 "    ADD     R1, R1, R1, LSL#1 \n"
 732 "    ADD     R1, R0, R1, LSL#2 \n"
 733 "    SUB     R1, R1, #8 \n"
 734 "    LDMIA   R1, {R2,R3,R9} \n"
 735 "    STMIA   R5, {R2,R3,R9} \n"
 736 "    BL      sub_FF8C9DF8 \n"
 737 "    LDR     R0, [SP, #0x28] \n"
 738 "    LDR     R1, [R0, #0x94] \n"
 739 "    LDR     R3, [R0, #0xA8] \n"
 740 "    LDR     R2, [R0, #0xAC] \n"
 741 "    ADD     R0, R0, #4 \n"
 742 "    BLX     R3 \n"
 743 "    LDR     R0, [SP, #0x28] \n"
 744 "    BL      sub_FF8CD31C \n"
 745 "    LDR     R0, [SP, #0x28] \n"
 746 "    LDR     R1, [R0, #0x94] \n"
 747 "    LDR     R2, [R0, #0xB4] \n"
 748 "    LDR     R3, [R0, #0xB0] \n"
 749 "    B       loc_FF8CBEDC \n"
 750 
 751 "loc_FF8CBBD4:\n"
 752 "    CMP     R1, #0x14 \n"
 753 "    CMPNE   R1, #0x15 \n"
 754 "    CMPNE   R1, #0x16 \n"
 755 "    CMPNE   R1, #0x17 \n"
 756 "    BNE     loc_FF8CBC7C \n"
 757 "    ADD     R3, SP, #0xC \n"
 758 "    MOV     R2, SP \n"
 759 "    ADD     R1, SP, #0x1C \n"
 760 "    BL      sub_FF8CA068 \n"
 761 "    CMP     R0, #1 \n"
 762 "    MOV     R9, R0 \n"
 763 "    CMPNE   R9, #5 \n"
 764 "    BNE     loc_FF8CBC28 \n"
 765 "    LDR     R0, [SP, #0x28] \n"
 766 "    MOV     R2, R9 \n"
 767 "    LDR     R1, [R0, #0x94] \n"
 768 "    LDR     R12, [R0, #0xA8] \n"
 769 "    LDR     R3, [R0, #0xAC] \n"
 770 "    ADD     R0, R0, #4 \n"
 771 "    BLX     R12 \n"
 772 "    B       loc_FF8CBC60 \n"
 773 
 774 "loc_FF8CBC28:\n"
 775 "    LDR     R0, [SP, #0x28] \n"
 776 "    CMP     R9, #2 \n"
 777 "    LDR     R1, [R0, #0x94] \n"
 778 "    LDR     R12, [R0, #0xA8] \n"
 779 "    LDR     R3, [R0, #0xAC] \n"
 780 "    CMPNE   R9, #6 \n"
 781 "    MOV     R2, R9 \n"
 782 "    ADD     R0, R0, #4 \n"
 783 "    BNE     loc_FF8CBC74 \n"
 784 "    BLX     R12 \n"
 785 "    LDR     R0, [SP, #0x28] \n"
 786 "    MOV     R2, SP \n"
 787 "    ADD     R1, SP, #0x1C \n"
 788 "    BL      sub_FF8CB68C \n"
 789 
 790 "loc_FF8CBC60:\n"
 791 "    LDR     R0, [SP, #0x28] \n"
 792 "    LDR     R2, [SP, #0xC] \n"
 793 "    MOV     R1, R9 \n"
 794 "    BL      sub_FF8CB8E0 \n"
 795 "    B       loc_FF8CBEE4 \n"
 796 
 797 "loc_FF8CBC74:\n"
 798 "    BLX     R12 \n"
 799 "    B       loc_FF8CBEE4 \n"
 800 
 801 "loc_FF8CBC7C:\n"
 802 "    CMP     R1, #0x24 \n"
 803 "    CMPNE   R1, #0x25 \n"
 804 "    BNE     loc_FF8CBCC8 \n"
 805 "    LDR     R1, [R0, #0x94] \n"
 806 "    ADD     R1, R1, R1, LSL#1 \n"
 807 "    ADD     R1, R0, R1, LSL#2 \n"
 808 "    SUB     R1, R1, #8 \n"
 809 "    LDMIA   R1, {R2,R3,R9} \n"
 810 "    STMIA   R5, {R2,R3,R9} \n"
 811 "    BL      sub_FF8C8D10 \n"
 812 "    LDR     R0, [SP, #0x28] \n"
 813 "    LDR     R1, [R0, #0x94] \n"
 814 "    LDR     R3, [R0, #0xA8] \n"
 815 "    LDR     R2, [R0, #0xAC] \n"
 816 "    ADD     R0, R0, #4 \n"
 817 "    BLX     R3 \n"
 818 "    LDR     R0, [SP, #0x28] \n"
 819 "    BL      sub_FF8C916C \n"
 820 "    B       loc_FF8CBEE4 \n"
 821 
 822 "loc_FF8CBCC8:\n"
 823 "    ADD     R1, R0, #4 \n"
 824 "    LDMIA   R1, {R2,R3,R9} \n"
 825 "    STMIA   R5, {R2,R3,R9} \n"
 826 "    LDR     R1, [R0] \n"
 827 "    CMP     R1, #0x28 \n"
 828 "    ADDCC   PC, PC, R1, LSL#2 \n"
 829 "    B       loc_FF8CBECC \n"
 830 "    B       loc_FF8CBD84 \n"
 831 "    B       loc_FF8CBD84 \n"
 832 "    B       loc_FF8CBD8C \n"
 833 "    B       loc_FF8CBD94 \n"
 834 "    B       loc_FF8CBD94 \n"
 835 "    B       loc_FF8CBD94 \n"
 836 "    B       loc_FF8CBD84 \n"
 837 "    B       loc_FF8CBD8C \n"
 838 "    B       loc_FF8CBD94 \n"
 839 "    B       loc_FF8CBD94 \n"
 840 "    B       loc_FF8CBDAC \n"
 841 "    B       loc_FF8CBDAC \n"
 842 "    B       loc_FF8CBEB8 \n"
 843 "    B       loc_FF8CBEC0 \n"
 844 "    B       loc_FF8CBEC0 \n"
 845 "    B       loc_FF8CBEC0 \n"
 846 "    B       loc_FF8CBEC0 \n"
 847 "    B       loc_FF8CBEC8 \n"
 848 "    B       loc_FF8CBECC \n"
 849 "    B       loc_FF8CBECC \n"
 850 "    B       loc_FF8CBECC \n"
 851 "    B       loc_FF8CBECC \n"
 852 "    B       loc_FF8CBECC \n"
 853 "    B       loc_FF8CBECC \n"
 854 "    B       loc_FF8CBD9C \n"
 855 "    B       loc_FF8CBDA4 \n"
 856 "    B       loc_FF8CBDA4 \n"
 857 "    B       loc_FF8CBDA4 \n"
 858 "    B       loc_FF8CBDB8 \n"
 859 "    B       loc_FF8CBDB8 \n"
 860 "    B       loc_FF8CBDC0 \n"
 861 "    B       loc_FF8CBDF8 \n"
 862 "    B       loc_FF8CBE30 \n"
 863 "    B       loc_FF8CBE68 \n"
 864 "    B       loc_FF8CBEA0 \n"
 865 "    B       loc_FF8CBEA0 \n"
 866 "    B       loc_FF8CBECC \n"
 867 "    B       loc_FF8CBECC \n"
 868 "    B       loc_FF8CBEA8 \n"
 869 "    B       loc_FF8CBEB0 \n"
 870 
 871 "loc_FF8CBD84:\n"
 872 "    BL      sub_FF8C74C4 \n"
 873 "    B       loc_FF8CBECC \n"
 874 
 875 "loc_FF8CBD8C:\n"
 876 "    BL      sub_FF8C7794 \n"
 877 "    B       loc_FF8CBECC \n"
 878 
 879 "loc_FF8CBD94:\n"
 880 "    BL      sub_FF8C79D4 \n"
 881 "    B       loc_FF8CBECC \n"
 882 
 883 "loc_FF8CBD9C:\n"
 884 "    BL      sub_FF8C7D1C \n"
 885 "    B       loc_FF8CBECC \n"
 886 
 887 "loc_FF8CBDA4:\n"
 888 "    BL      sub_FF8C7F4C \n"
 889 "    B       loc_FF8CBECC \n"
 890 
 891 "loc_FF8CBDAC:\n"
 892 "    BL      sub_FF8C8330_my \n"  // --> Patched. Old value = 0xFF8C8330.
 893 "    MOV     R8, #0 \n"
 894 "    B       loc_FF8CBECC \n"
 895 
 896 "loc_FF8CBDB8:\n"
 897 "    BL      sub_FF8C8500 \n"
 898 "    B       loc_FF8CBECC \n"
 899 
 900 "loc_FF8CBDC0:\n"
 901 "    LDRH    R1, [R0, #4] \n"
 902 "    STRH    R1, [SP, #0x1C] \n"
 903 "    LDRH    R1, [R4, #2] \n"
 904 "    STRH    R1, [SP, #0x1E] \n"
 905 "    LDRH    R1, [R4, #4] \n"
 906 "    STRH    R1, [SP, #0x20] \n"
 907 "    LDRH    R1, [R4, #6] \n"
 908 "    STRH    R1, [SP, #0x22] \n"
 909 "    LDRH    R1, [R0, #0xC] \n"
 910 "    STRH    R1, [SP, #0x24] \n"
 911 "    LDRH    R1, [R4, #0xA] \n"
 912 "    STRH    R1, [SP, #0x26] \n"
 913 "    BL      sub_FF8C897C \n"
 914 "    B       loc_FF8CBECC \n"
 915 
 916 "loc_FF8CBDF8:\n"
 917 "    LDRH    R1, [R0, #4] \n"
 918 "    STRH    R1, [SP, #0x1C] \n"
 919 "    LDRH    R1, [R4, #2] \n"
 920 "    STRH    R1, [SP, #0x1E] \n"
 921 "    LDRH    R1, [R4, #4] \n"
 922 "    STRH    R1, [SP, #0x20] \n"
 923 "    LDRH    R1, [R4, #6] \n"
 924 "    STRH    R1, [SP, #0x22] \n"
 925 "    LDRH    R1, [R4, #8] \n"
 926 "    STRH    R1, [SP, #0x24] \n"
 927 "    LDRH    R1, [R4, #0xA] \n"
 928 "    STRH    R1, [SP, #0x26] \n"
 929 "    BL      sub_FF8CD08C \n"
 930 "    B       loc_FF8CBECC \n"
 931 
 932 "loc_FF8CBE30:\n"
 933 "    LDRH    R1, [R4] \n"
 934 "    STRH    R1, [SP, #0x1C] \n"
 935 "    LDRH    R1, [R0, #6] \n"
 936 "    STRH    R1, [SP, #0x1E] \n"
 937 "    LDRH    R1, [R4, #4] \n"
 938 "    STRH    R1, [SP, #0x20] \n"
 939 "    LDRH    R1, [R4, #6] \n"
 940 "    STRH    R1, [SP, #0x22] \n"
 941 "    LDRH    R1, [R4, #8] \n"
 942 "    STRH    R1, [SP, #0x24] \n"
 943 "    LDRH    R1, [R4, #0xA] \n"
 944 "    STRH    R1, [SP, #0x26] \n"
 945 "    BL      sub_FF8CD1C8 \n"
 946 "    B       loc_FF8CBECC \n"
 947 
 948 "loc_FF8CBE68:\n"
 949 "    LDRH    R1, [R4] \n"
 950 "    STRH    R1, [SP, #0x1C] \n"
 951 "    LDRH    R1, [R4, #2] \n"
 952 "    STRH    R1, [SP, #0x1E] \n"
 953 "    LDRH    R1, [R4, #4] \n"
 954 "    STRH    R1, [SP, #0x20] \n"
 955 "    LDRH    R1, [R4, #6] \n"
 956 "    STRH    R1, [SP, #0x22] \n"
 957 "    LDRH    R1, [R0, #0xC] \n"
 958 "    STRH    R1, [SP, #0x24] \n"
 959 "    LDRH    R1, [R4, #0xA] \n"
 960 "    STRH    R1, [SP, #0x26] \n"
 961 "    BL      sub_FF8CD274 \n"
 962 "    B       loc_FF8CBECC \n"
 963 
 964 "loc_FF8CBEA0:\n"
 965 "    BL      sub_FF8C8A90 \n"
 966 "    B       loc_FF8CBECC \n"
 967 
 968 "loc_FF8CBEA8:\n"
 969 "    BL      sub_FF8C9284 \n"
 970 "    B       loc_FF8CBECC \n"
 971 
 972 "loc_FF8CBEB0:\n"
 973 "    BL      sub_FF8C9624 \n"
 974 "    B       loc_FF8CBECC \n"
 975 
 976 "loc_FF8CBEB8:\n"
 977 "    BL      sub_FF8C9894 \n"
 978 "    B       loc_FF8CBECC \n"
 979 
 980 "loc_FF8CBEC0:\n"
 981 "    BL      sub_FF8C9A60 \n"
 982 "    B       loc_FF8CBECC \n"
 983 
 984 "loc_FF8CBEC8:\n"
 985 "    BL      sub_FF8C9BD8 \n"
 986 
 987 "loc_FF8CBECC:\n"
 988 "    LDR     R0, [SP, #0x28] \n"
 989 "    LDR     R1, [R0, #0x94] \n"
 990 "    LDR     R2, [R0, #0xAC] \n"
 991 "    LDR     R3, [R0, #0xA8] \n"
 992 
 993 "loc_FF8CBEDC:\n"
 994 "    ADD     R0, R0, #4 \n"
 995 "    BLX     R3 \n"
 996 
 997 "loc_FF8CBEE4:\n"
 998 "    LDR     R0, [SP, #0x28] \n"
 999 "    LDR     R0, [R0] \n"
1000 "    CMP     R0, #0x10 \n"
1001 "    BEQ     loc_FF8CBF1C \n"
1002 "    BGT     loc_FF8CBF0C \n"
1003 "    CMP     R0, #1 \n"
1004 "    CMPNE   R0, #4 \n"
1005 "    CMPNE   R0, #0xE \n"
1006 "    BNE     loc_FF8CBF50 \n"
1007 "    B       loc_FF8CBF1C \n"
1008 
1009 "loc_FF8CBF0C:\n"
1010 "    CMP     R0, #0x13 \n"
1011 "    CMPNE   R0, #0x17 \n"
1012 "    CMPNE   R0, #0x1A \n"
1013 "    BNE     loc_FF8CBF50 \n"
1014 
1015 "loc_FF8CBF1C:\n"
1016 "    LDRSH   R0, [R4] \n"
1017 "    CMN     R0, #0xC00 \n"
1018 "    LDRNESH R1, [R4, #8] \n"
1019 "    CMNNE   R1, #0xC00 \n"
1020 "    STRNEH  R0, [SP, #0x1C] \n"
1021 "    STRNEH  R1, [SP, #0x24] \n"
1022 "    BNE     loc_FF8CBF50 \n"
1023 "    ADD     R0, SP, #0x10 \n"
1024 "    BL      sub_FF8CD534 \n"
1025 "    LDRH    R0, [SP, #0x10] \n"
1026 "    STRH    R0, [SP, #0x1C] \n"
1027 "    LDRH    R0, [SP, #0x18] \n"
1028 "    STRH    R0, [SP, #0x24] \n"
1029 
1030 "loc_FF8CBF50:\n"
1031 "    LDR     R0, [SP, #0x28] \n"
1032 "    CMP     R8, #1 \n"
1033 "    BNE     loc_FF8CBFA0 \n"
1034 "    LDR     R1, [R0, #0x94] \n"
1035 "    MOV     R2, #0xC \n"
1036 "    ADD     R1, R1, R1, LSL#1 \n"
1037 "    ADD     R0, R0, R1, LSL#2 \n"
1038 "    SUB     R8, R0, #8 \n"
1039 "    LDR     R0, =0x5A344 \n"
1040 "    ADD     R1, SP, #0x1C \n"
1041 "    BL      sub_003FC064 \n"
1042 "    LDR     R0, =0x5A350 \n"
1043 "    MOV     R2, #0xC \n"
1044 "    ADD     R1, SP, #0x1C \n"
1045 "    BL      sub_003FC064 \n"
1046 "    LDR     R0, =0x5A35C \n"
1047 "    MOV     R2, #0xC \n"
1048 "    MOV     R1, R8 \n"
1049 "    BL      sub_003FC064 \n"
1050 "    B       loc_FF8CC018 \n"
1051 
1052 "loc_FF8CBFA0:\n"
1053 "    LDR     R0, [R0] \n"
1054 "    MOV     R3, #1 \n"
1055 "    CMP     R0, #0xB \n"
1056 "    BNE     loc_FF8CBFE4 \n"
1057 "    MOV     R2, #0 \n"
1058 "    STRD    R2, [SP] \n"
1059 "    MOV     R2, R3 \n"
1060 "    MOV     R1, R3 \n"
1061 "    MOV     R0, #0 \n"
1062 "    BL      sub_FF8C7284 \n"
1063 "    MOV     R3, #1 \n"
1064 "    MOV     R2, #0 \n"
1065 "    STRD    R2, [SP] \n"
1066 "    MOV     R2, R3 \n"
1067 "    MOV     R1, R3 \n"
1068 "    MOV     R0, #0 \n"
1069 "    B       loc_FF8CC014 \n"
1070 
1071 "loc_FF8CBFE4:\n"
1072 "    MOV     R2, #1 \n"
1073 "    STRD    R2, [SP] \n"
1074 "    MOV     R3, R2 \n"
1075 "    MOV     R1, R2 \n"
1076 "    MOV     R0, R2 \n"
1077 "    BL      sub_FF8C7284 \n"
1078 "    MOV     R3, #1 \n"
1079 "    MOV     R2, R3 \n"
1080 "    MOV     R1, R3 \n"
1081 "    MOV     R0, R3 \n"
1082 "    STR     R3, [SP] \n"
1083 "    STR     R3, [SP, #4] \n"
1084 
1085 "loc_FF8CC014:\n"
1086 "    BL      sub_FF8C740C \n"
1087 
1088 "loc_FF8CC018:\n"
1089 "    LDR     R0, [SP, #0x28] \n"
1090 "    BL      sub_FF8CCFE4 \n"
1091 "    B       loc_FF8CB9BC \n"
1092 );
1093 }
1094 
1095 /*************************************************************/
1096 //** sub_FF8C8330_my @ 0xFF8C8330 - 0xFF8C83F4, length=50
1097 void __attribute__((naked,noinline)) sub_FF8C8330_my() {
1098 asm volatile (
1099 "    STMFD   SP!, {R4-R8,LR} \n"
1100 "    LDR     R7, =0x4834 \n"
1101 "    MOV     R4, R0 \n"
1102 "    LDR     R0, [R7, #0x1C] \n"
1103 "    MOV     R1, #0x3E \n"
1104 "    BL      sub_003F82FC /*_ClearEventFlag*/ \n"
1105 "    MOV     R2, #0 \n"
1106 "    LDRSH   R0, [R4, #4] \n"
1107 "    MOV     R3, #1 \n"
1108 "    MOV     R1, R2 \n"
1109 "    BL      sub_FF8C6F7C \n"
1110 "    MOV     R6, R0 \n"
1111 "    LDRSH   R0, [R4, #6] \n"
1112 "    BL      sub_FF8C70E4 \n"
1113 "    LDRSH   R0, [R4, #8] \n"
1114 "    BL      sub_FF8C713C \n"
1115 "    LDRSH   R0, [R4, #0xA] \n"
1116 "    BL      sub_FF8C7194 \n"
1117 "    LDRSH   R0, [R4, #0xC] \n"
1118 "    MOV     R1, #0 \n"
1119 "    BL      sub_FF8C71EC \n"
1120 "    MOV     R5, R0 \n"
1121 "    LDR     R0, [R4] \n"
1122 "    LDR     R8, =0x5A35C \n"
1123 "    CMP     R0, #0xB \n"
1124 "    MOVEQ   R6, #0 \n"
1125 "    MOVEQ   R5, R6 \n"
1126 "    BEQ     loc_FF8C83C8 \n"
1127 "    CMP     R6, #1 \n"
1128 "    BNE     loc_FF8C83C8 \n"
1129 "    LDRSH   R0, [R4, #4] \n"
1130 "    LDR     R1, =0xFF8C6ED4 \n"
1131 "    MOV     R2, #2 \n"
1132 "    BL      sub_FF87230C \n"
1133 "    STRH    R0, [R4, #4] \n"
1134 "    MOV     R0, #0 \n"
1135 "    STR     R0, [R7, #0x28] \n"
1136 "    B       loc_FF8C83D0 \n"
1137 
1138 "loc_FF8C83C8:\n"
1139 "    LDRH    R0, [R8] \n"
1140 "    STRH    R0, [R4, #4] \n"
1141 
1142 "loc_FF8C83D0:\n"
1143 "    CMP     R5, #1 \n"
1144 "    LDRNEH  R0, [R8, #8] \n"
1145 "    BNE     loc_FF8C83EC \n"
1146 "    LDRSH   R0, [R4, #0xC] \n"
1147 "    LDR     R1, =0xFF8C6F58 \n"
1148 "    MOV     R2, #0x20 \n"
1149 "    BL      sub_FF8CD048 \n"
1150 
1151 "loc_FF8C83EC:\n"
1152 "    STRH    R0, [R4, #0xC] \n"
1153 "    LDRSH   R0, [R4, #6] \n"
1154 "    BL      sub_FF8B54E0_my \n"  // --> Patched. Old value = 0xFF8B54E0.
1155 "    LDR     PC, =0xFF8C83F8 \n"  // Continue in firmware
1156 );
1157 }
1158 
1159 /*************************************************************/
1160 //** sub_FF8B54E0_my @ 0xFF8B54E0 - 0xFF8B5528, length=19
1161 void __attribute__((naked,noinline)) sub_FF8B54E0_my() {
1162 asm volatile (
1163 "    STMFD   SP!, {R4-R6,LR} \n"
1164 "    LDR     R5, =0x44A8 \n"
1165 "    MOV     R4, R0 \n"
1166 "    LDR     R0, [R5, #4] \n"
1167 "    CMP     R0, #1 \n"
1168 "    MOVNE   R2, #0x154 \n"
1169 "    LDRNE   R1, =0xFF8B52A8 /*'Shutter.c'*/ \n"
1170 "    MOVNE   R0, #0 \n"
1171 "    BLNE    _DebugAssert \n"
1172 "    CMN     R4, #0xC00 \n"
1173 "    LDREQSH R4, [R5, #2] \n"
1174 "    CMN     R4, #0xC00 \n"
1175 "    LDREQ   R2, =0x15A \n"
1176 "    LDREQ   R1, =0xFF8B52A8 /*'Shutter.c'*/ \n"
1177 "    MOVEQ   R0, #0 \n"
1178 "    STRH    R4, [R5, #2] \n"
1179 "    BLEQ    _DebugAssert \n"
1180 "    MOV     R0, R4 \n"
1181 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
1182 "    LDR     PC, =0xFF8B552C \n"  // Continue in firmware
1183 );
1184 }

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