root/platform/g12/sub/100e/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF98C4CC_my
  3. sub_FFB07970_my
  4. exp_drv_task
  5. sub_FF8C90F0_my
  6. sub_FF8BA264_my

   1 /*
   2  * capt_seq.c - auto-generated by CHDK code_gen.
   3  */
   4 #include "lolevel.h"
   5 #include "platform.h"
   6 #include "core.h"
   7 
   8 #define USE_STUBS_NRFLAG 1  // see stubs_entry.S
   9 #define NR_AUTO (0)         // have to explictly reset value back to 0 to enable auto
  10 
  11 #include "../../../generic/capt_seq.c"
  12 
  13 /*************************************************************/
  14 //** capt_seq_task @ 0xFF88261C - 0xFF8828FC, length=185
  15 void __attribute__((naked,noinline)) capt_seq_task() {
  16 asm volatile (
  17 "    STMFD   SP!, {R3-R7,LR} \n"
  18 "    LDR     R7, =0x2E38 \n"
  19 "    LDR     R4, =0x3BB24 \n"
  20 "    MOV     R6, #0 \n"
  21 
  22 "loc_FF88262C:\n"
  23 "    LDR     R0, [R7, #4] \n"
  24 "    MOV     R2, #0 \n"
  25 "    MOV     R1, SP \n"
  26 "    BL      sub_FF83A460 /*_ReceiveMessageQueue*/ \n"
  27 "    TST     R0, #1 \n"
  28 "    BEQ     loc_FF882658 \n"
  29 "    LDR     R1, =0x43F \n"
  30 "    LDR     R0, =0xFF8820BC /*'SsShootTask.c'*/ \n"
  31 "    BL      _DebugAssert \n"
  32 "    BL      _ExitTask \n"
  33 "    LDMFD   SP!, {R3-R7,PC} \n"
  34 
  35 "loc_FF882658:\n"
  36 "    LDR     R0, [SP] \n"
  37 "    LDR     R1, [R0] \n"
  38 "    CMP     R1, #0x24 \n"
  39 "    ADDLS   PC, PC, R1, LSL#2 \n"
  40 "    B       loc_FF8828C4 \n"
  41 "    B       loc_FF882700 \n"
  42 "    B       loc_FF882718 \n"
  43 "    B       loc_FF88273C \n"
  44 "    B       loc_FF882750 \n"
  45 "    B       loc_FF882748 \n"
  46 "    B       loc_FF88275C \n"
  47 "    B       loc_FF882764 \n"
  48 "    B       loc_FF88276C \n"
  49 "    B       loc_FF882778 \n"
  50 "    B       loc_FF8827A0 \n"
  51 "    B       loc_FF882784 \n"
  52 "    B       loc_FF882790 \n"
  53 "    B       loc_FF882798 \n"
  54 "    B       loc_FF8827A8 \n"
  55 "    B       loc_FF8827B0 \n"
  56 "    B       loc_FF8827B8 \n"
  57 "    B       loc_FF8827C0 \n"
  58 "    B       loc_FF8827C8 \n"
  59 "    B       loc_FF8827D0 \n"
  60 "    B       loc_FF8827D8 \n"
  61 "    B       loc_FF8827E0 \n"
  62 "    B       loc_FF8827E8 \n"
  63 "    B       loc_FF8827F0 \n"
  64 "    B       loc_FF8827FC \n"
  65 "    B       loc_FF882804 \n"
  66 "    B       loc_FF882810 \n"
  67 "    B       loc_FF882818 \n"
  68 "    B       loc_FF882848 \n"
  69 "    B       loc_FF882850 \n"
  70 "    B       loc_FF882858 \n"
  71 "    B       loc_FF882860 \n"
  72 "    B       loc_FF882868 \n"
  73 "    B       loc_FF882870 \n"
  74 "    B       loc_FF882878 \n"
  75 "    B       loc_FF882880 \n"
  76 "    B       loc_FF88288C \n"
  77 "    B       loc_FF8828D0 \n"
  78 
  79 "loc_FF882700:\n"
  80 "    BL      shooting_expo_iso_override\n"      // added
  81 "    BL      sub_FF882E00 \n"
  82 "    BL      shooting_expo_param_override\n"    // added
  83 "    BL      sub_FF87FF5C \n"
  84 "    MOV     R0, #0\n"                          // added
  85 "    STR     R0, [R4,#0x24]\n"                  // added, fixes overrides behavior at short shutter press (from S95)
  86 //"  LDR     R0, [R4, #0x24] \n"  // above patch makes these three lines redundant
  87 //"  CMP     R0, #0 \n"
  88 //"  BLNE    _sub_FF98C6A0 \n"
  89 "    B       loc_FF8828D0 \n"
  90 
  91 "loc_FF882718:\n"
  92 "    LDRH    R1, [R4] \n"
  93 "    LDR     R0, [R0, #0xC] \n"
  94 "    SUB     R12, R1, #0x4200 \n"
  95 "    SUBS    R12, R12, #0x2E \n"
  96 "    BNE     loc_FF882734 \n"
  97 "    BL      sub_FF98D484 \n"
  98 "    B       loc_FF8828D0 \n"
  99 
 100 "loc_FF882734:\n"
 101 "    BL      sub_FF98C4CC_my \n"  // --> Patched. Old value = 0xFF98C4CC.
 102 "    B       loc_FF8828D0 \n"
 103 
 104 "loc_FF88273C:\n"
 105 "    MOV     R0, #1 \n"
 106 "    BL      sub_FF883140 \n"
 107 "    B       loc_FF8828D0 \n"
 108 
 109 "loc_FF882748:\n"
 110 "    BL      sub_FF882A98 \n"
 111 "    B       loc_FF882754 \n"
 112 
 113 "loc_FF882750:\n"
 114 "    BL      sub_FF882DE0 \n"
 115 
 116 "loc_FF882754:\n"
 117 "    STR     R6, [R4, #0x24] \n"
 118 "    B       loc_FF8828D0 \n"
 119 
 120 "loc_FF88275C:\n"
 121 "    BL      sub_FF882DE8 \n"
 122 "    B       loc_FF8828D0 \n"
 123 
 124 "loc_FF882764:\n"
 125 "    BL      sub_FF883014 \n"
 126 "    B       loc_FF88277C \n"
 127 
 128 "loc_FF88276C:\n"
 129 "    LDR     R0, [R0, #0xC] \n"
 130 "    BL      sub_FF98C708 \n"
 131 "    B       loc_FF8828D0 \n"
 132 
 133 "loc_FF882778:\n"
 134 "    BL      sub_FF8830B0 \n"
 135 
 136 "loc_FF88277C:\n"
 137 "    BL      sub_FF87FF5C \n"
 138 "    B       loc_FF8828D0 \n"
 139 
 140 "loc_FF882784:\n"
 141 "    LDR     R0, [R4, #0x54] \n"
 142 "    BL      sub_FF883808 \n"
 143 "    B       loc_FF8828D0 \n"
 144 
 145 "loc_FF882790:\n"
 146 "    BL      sub_FF883B6C \n"
 147 "    B       loc_FF8828D0 \n"
 148 
 149 "loc_FF882798:\n"
 150 "    BL      sub_FF883BD0 \n"
 151 "    B       loc_FF8828D0 \n"
 152 
 153 "loc_FF8827A0:\n"
 154 "    BL      sub_FF882DE0 \n"
 155 "    B       loc_FF8828D0 \n"
 156 
 157 "loc_FF8827A8:\n"
 158 "    BL      sub_FF98B3B8 \n"
 159 "    B       loc_FF8828D0 \n"
 160 
 161 "loc_FF8827B0:\n"
 162 "    BL      sub_FF98B608 \n"
 163 "    B       loc_FF8828D0 \n"
 164 
 165 "loc_FF8827B8:\n"
 166 "    BL      sub_FF98B6D4 \n"
 167 "    B       loc_FF8828D0 \n"
 168 
 169 "loc_FF8827C0:\n"
 170 "    BL      sub_FF98B7E8 \n"
 171 "    B       loc_FF8828D0 \n"
 172 
 173 "loc_FF8827C8:\n"
 174 "    BL      sub_FF98B8E0 \n"
 175 "    B       loc_FF8828D0 \n"
 176 
 177 "loc_FF8827D0:\n"
 178 "    MOV     R0, #0 \n"
 179 "    B       loc_FF8827F4 \n"
 180 
 181 "loc_FF8827D8:\n"
 182 "    BL      sub_FF98BEA0 \n"
 183 "    B       loc_FF8828D0 \n"
 184 
 185 "loc_FF8827E0:\n"
 186 "    BL      sub_FF98BF44 \n"
 187 "    B       loc_FF8828D0 \n"
 188 
 189 "loc_FF8827E8:\n"
 190 "    BL      sub_FF98C024 \n"
 191 "    B       loc_FF8828D0 \n"
 192 
 193 "loc_FF8827F0:\n"
 194 "    MOV     R0, #1 \n"
 195 
 196 "loc_FF8827F4:\n"
 197 "    BL      sub_FF98BD28 \n"
 198 "    B       loc_FF8828D0 \n"
 199 
 200 "loc_FF8827FC:\n"
 201 "    BL      sub_FF883380 \n"
 202 "    B       loc_FF8828D0 \n"
 203 
 204 "loc_FF882804:\n"
 205 "    BL      sub_FF883428 \n"
 206 "    BL      sub_FF98D9AC \n"
 207 "    B       loc_FF8828D0 \n"
 208 
 209 "loc_FF882810:\n"
 210 "    BL      sub_FF98BBB8 \n"
 211 "    B       loc_FF8828D0 \n"
 212 
 213 "loc_FF882818:\n"
 214 "    MOV     R2, #2 \n"
 215 "    ADD     R1, R4, #0x60 \n"
 216 "    MOV     R0, #0x6F \n"
 217 "    BL      _GetPropertyCase \n"
 218 "    TST     R0, #1 \n"
 219 "    LDRNE   R1, =0x531 \n"
 220 "    LDRNE   R0, =0xFF8820BC /*'SsShootTask.c'*/ \n"
 221 "    BLNE    _DebugAssert \n"
 222 "    LDRH    R0, [R4, #0x60] \n"
 223 "    CMP     R0, #1 \n"
 224 "    BLEQ    sub_FF98BBAC \n"
 225 "    B       loc_FF8828D0 \n"
 226 
 227 "loc_FF882848:\n"
 228 "    BL      sub_FF98BC7C \n"
 229 "    B       loc_FF8828D0 \n"
 230 
 231 "loc_FF882850:\n"
 232 "    BL      sub_FF98DA7C \n"
 233 "    B       loc_FF8828D0 \n"
 234 
 235 "loc_FF882858:\n"
 236 "    BL      sub_FF837D1C \n"
 237 "    B       loc_FF8828D0 \n"
 238 
 239 "loc_FF882860:\n"
 240 "    BL      sub_FF8861E8 \n"
 241 "    B       loc_FF8828D0 \n"
 242 
 243 "loc_FF882868:\n"
 244 "    BL      sub_FF886274 \n"
 245 "    B       loc_FF8828D0 \n"
 246 
 247 "loc_FF882870:\n"
 248 "    BL      sub_FF98C15C \n"
 249 "    B       loc_FF8828D0 \n"
 250 
 251 "loc_FF882878:\n"
 252 "    BL      sub_FF98C1C0 \n"
 253 "    B       loc_FF8828D0 \n"
 254 
 255 "loc_FF882880:\n"
 256 "    BL      sub_FF8862D0 \n"
 257 "    BL      sub_FF886290 \n"
 258 "    B       loc_FF8828D0 \n"
 259 
 260 "loc_FF88288C:\n"
 261 "    MOV     R0, #1 \n"
 262 "    BL      sub_FF98CEAC \n"
 263 "    MOV     R0, #1 \n"
 264 "    BL      sub_FF98CFDC \n"
 265 "    LDRH    R0, [R4, #0x9C] \n"
 266 "    CMP     R0, #4 \n"
 267 "    LDRNEH  R0, [R4] \n"
 268 "    SUBNE   R12, R0, #0x4200 \n"
 269 "    SUBNES  R12, R12, #0x2A \n"
 270 "    BNE     loc_FF8828D0 \n"
 271 "    BL      sub_FF886274 \n"
 272 "    BL      sub_FF886874 \n"
 273 "    BL      sub_FF8866F0 \n"
 274 "    B       loc_FF8828D0 \n"
 275 
 276 "loc_FF8828C4:\n"
 277 "    LDR     R1, =0x591 \n"
 278 "    LDR     R0, =0xFF8820BC /*'SsShootTask.c'*/ \n"
 279 "    BL      _DebugAssert \n"
 280 
 281 "loc_FF8828D0:\n"
 282 "    LDR     R0, [SP] \n"
 283 "    LDR     R1, [R0, #4] \n"
 284 "    LDR     R0, [R7] \n"
 285 "    BL      sub_FF88D27C /*_SetEventFlag*/ \n"
 286 "    LDR     R5, [SP] \n"
 287 "    LDR     R0, [R5, #8] \n"
 288 "    CMP     R0, #0 \n"
 289 "    LDREQ   R1, =0x115 \n"
 290 "    LDREQ   R0, =0xFF8820BC /*'SsShootTask.c'*/ \n"
 291 "    BLEQ    _DebugAssert \n"
 292 "    STR     R6, [R5, #8] \n"
 293 "    B       loc_FF88262C \n"
 294 );
 295 }
 296 
 297 /*************************************************************/
 298 //** sub_FF98C4CC_my @ 0xFF98C4CC - 0xFF98C69C, length=117
 299 void __attribute__((naked,noinline)) sub_FF98C4CC_my() {
 300 asm volatile (
 301 "    STMFD   SP!, {R3-R7,LR} \n"
 302 "    LDR     R5, =0x3BB24 \n"
 303 "    MOV     R4, R0 \n"
 304 "    LDR     R0, [R5, #0x24] \n"
 305 "    MOV     R6, #0 \n"
 306 "    CMP     R0, #0 \n"
 307 "    BNE     loc_FF98C508 \n"
 308 "    MOV     R0, #0xC \n"
 309 "    BL      sub_FF888028 \n"
 310 "    TST     R0, #1 \n"
 311 "    MOVNE   R2, R4 \n"
 312 "    LDMNEFD SP!, {R3-R7,LR} \n"
 313 "    MOVNE   R1, #1 \n"
 314 "    MOVNE   R0, #1 \n"
 315 "    BNE     sub_FF8805CC \n"
 316 
 317 "loc_FF98C508:\n"
 318 "    LDR     R0, [R4, #8] \n"
 319 "    LDR     R7, =0x420C \n"
 320 "    ORR     R0, R0, #1 \n"
 321 "    STR     R0, [R4, #8] \n"
 322 "    LDRH    R0, [R5] \n"
 323 "    CMP     R0, R7 \n"
 324 "    BEQ     loc_FF98C598 \n"
 325 "    LDRH    R0, [R5, #0x9A] \n"
 326 "    CMP     R0, #3 \n"
 327 "    BEQ     loc_FF98C5E0 \n"
 328 "    LDR     R0, [R4, #0xC] \n"
 329 "    CMP     R0, #1 \n"
 330 "    BLS     loc_FF98C5A4 \n"
 331 "    LDRH    R0, [R5, #0x98] \n"
 332 "    CMP     R0, #0 \n"
 333 "    BNE     loc_FF98C5E0 \n"
 334 "    LDRH    R0, [R5, #0x94] \n"
 335 "    CMP     R0, #2 \n"
 336 "    BNE     loc_FF98C5B0 \n"
 337 "    BL      sub_FF8834E8 \n"
 338 "    LDRH    R0, [R5] \n"
 339 "    CMP     R0, R7 \n"
 340 "    BEQ     loc_FF98C598 \n"
 341 "    LDRH    R0, [R5, #0x9A] \n"
 342 "    CMP     R0, #3 \n"
 343 "    BEQ     loc_FF98C5E0 \n"
 344 "    LDR     R0, [R4, #0xC] \n"
 345 "    CMP     R0, #1 \n"
 346 "    BLS     loc_FF98C5A4 \n"
 347 "    LDRH    R0, [R5, #0x98] \n"
 348 "    CMP     R0, #0 \n"
 349 "    BNE     loc_FF98C5E0 \n"
 350 "    LDRH    R0, [R5, #0x94] \n"
 351 "    CMP     R0, #2 \n"
 352 "    BEQ     loc_FF98C5DC \n"
 353 "    B       loc_FF98C5B0 \n"
 354 
 355 "loc_FF98C598:\n"
 356 "    LDRH    R0, [R5, #0x9A] \n"
 357 "    CMP     R0, #3 \n"
 358 "    BEQ     loc_FF98C5E0 \n"
 359 
 360 "loc_FF98C5A4:\n"
 361 "    LDRH    R0, [R5, #0x98] \n"
 362 "    CMP     R0, #0 \n"
 363 "    BNE     loc_FF98C5E0 \n"
 364 
 365 "loc_FF98C5B0:\n"
 366 "    LDRH    R0, [R5, #0x94] \n"
 367 "    CMP     R0, #1 \n"
 368 "    BNE     loc_FF98C5E0 \n"
 369 "    LDRH    R0, [R5] \n"
 370 "    CMP     R0, R7 \n"
 371 "    LDRNE   R0, [R4, #0xC] \n"
 372 "    CMPNE   R0, #1 \n"
 373 "    BLS     loc_FF98C5E0 \n"
 374 "    LDR     R0, [R4, #0x10] \n"
 375 "    CMP     R0, #1 \n"
 376 "    BNE     loc_FF98C5E0 \n"
 377 
 378 "loc_FF98C5DC:\n"
 379 "    BL      sub_FF98DAB4 \n"
 380 
 381 "loc_FF98C5E0:\n"
 382 "    BL      sub_FF98DA7C \n"
 383 "    BL      sub_FF882DF0 \n"
 384 "    LDR     R0, [R5, #0x24] \n"
 385 "    CMP     R0, #0 \n"
 386 "    BNE     loc_FF98C678 \n"
 387 "    MOV     R0, R4 \n"
 388 "    BL      sub_FFB07058 \n"
 389 "    TST     R0, #1 \n"
 390 "    BNE     loc_FF98C69C \n"
 391 "    MOV     R0, R4 \n"
 392 "    BL      sub_FFB07474 \n"
 393 "    BL      sub_FF98CC78 \n"
 394 "    MOV     R6, #1 \n"
 395 "    MOV     R0, #2 \n"
 396 "    BL      sub_FF87DF10 \n"
 397 "    BL      wait_until_remote_button_is_released\n"    // added
 398 "    BL      capt_seq_hook_set_nr\n"                    // added
 399 "    LDRH    R0, [R5] \n"
 400 "    SUB     R12, R0, #0x8200 \n"
 401 "    SUBS    R12, R12, #0x2D \n"
 402 "    BNE     loc_FF98C668 \n"
 403 "    MOV     R2, #2 \n"
 404 "    ADD     R0, R2, #0x15C \n"
 405 "    MOV     R1, SP \n"
 406 "    STR     R6, [SP] \n"
 407 "    BL      _GetPropertyCase \n"
 408 "    TST     R0, #1 \n"
 409 "    MOVNE   R1, #0xC3 \n"
 410 "    LDRNE   R0, =0xFF98C77C /*'SsCaptureSeq.c'*/ \n"
 411 "    BLNE    _DebugAssert \n"
 412 "    LDRH    R0, [SP] \n"
 413 "    CMP     R0, #1 \n"
 414 "    STRHI   R6, [R4, #0xE4] \n"
 415 "    BHI     loc_FF98C688 \n"
 416 "    MOV     R0, #0 \n"
 417 "    STR     R0, [R4, #0xE4] \n"
 418 
 419 "loc_FF98C668:\n"
 420 "    MOV     R0, R4 \n"
 421 "    BL      sub_FFB07970_my \n"  // --> Patched. Old value = 0xFFB07970.
 422 "    MOV     R6, R0 \n"
 423 "    B       loc_FF98C68C \n"
 424 
 425 "loc_FF98C678:\n"
 426 "    LDR     R0, =0x7694 \n"
 427 "    LDR     R0, [R0] \n"
 428 "    CMP     R0, #0 \n"
 429 "    BEQ     loc_FF98C68C \n"
 430 
 431 "loc_FF98C688:\n"
 432 "    MOV     R6, #0x1D \n"
 433 
 434 "loc_FF98C68C:\n"
 435 "    MOV     R1, R6 \n"
 436 "    MOV     R0, R4 \n"
 437 "    LDMFD   SP!, {R3-R7,LR} \n"
 438 "    B       sub_FFB07164 \n"
 439 
 440 "loc_FF98C69C:\n"
 441 "    LDMFD   SP!, {R3-R7,PC} \n"
 442 );
 443 }
 444 
 445 /*************************************************************/
 446 //** sub_FFB07970_my @ 0xFFB07970 - 0xFFB07A5C, length=60
 447 void __attribute__((naked,noinline)) sub_FFB07970_my() {
 448 asm volatile (
 449 "    STMFD   SP!, {R2-R6,LR} \n"
 450 "    MOV     R5, R0 \n"
 451 "    BL      sub_FF98D1A0 \n"
 452 "    MVN     R1, #0 \n"
 453 "    BL      sub_FF88D2B0 /*_ClearEventFlag*/ \n"
 454 "    LDR     R0, =0xFFB071D4 \n"
 455 "    MOV     R1, R5 \n"
 456 "    BL      sub_FF8C1CF0 \n"
 457 "    MOV     R0, R5 \n"
 458 "    BL      sub_FFB070EC \n"
 459 "    MOV     R0, R5 \n"
 460 "    BL      sub_FFB0755C \n"
 461 "    MOV     R4, R0 \n"
 462 "    LDR     R1, =0xDE80 \n"
 463 "    MOV     R0, #0x8A \n"
 464 "    MOV     R2, #4 \n"
 465 "    BL      _GetPropertyCase \n"
 466 "    TST     R0, #1 \n"
 467 "    LDRNE   R1, =0x1F6 \n"
 468 "    LDRNE   R0, =0xFFB07AF8 /*'SsStandardCaptureSeq.c'*/ \n"
 469 "    BLNE    _DebugAssert \n"
 470 "    BL      sub_FF885860 \n"
 471 "    MOV     R0, R4 \n"
 472 "    CMP     R0, #1 \n"
 473 "    MOV     R4, #0 \n"
 474 "    BEQ     loc_FFB07A10 \n"
 475 "    CMP     R0, #2 \n"
 476 "    BEQ     loc_FFB07A20 \n"
 477 "    CMP     R0, #3 \n"
 478 "    BEQ     loc_FFB07A44 \n"
 479 "    CMP     R0, #7 \n"
 480 "    BNE     sub_FFB07A60 \n"
 481 "    MOV     R0, #0 \n"
 482 "    BL      sub_FF8C1D20 \n"
 483 "    MOV     R0, #4 \n"
 484 "    STR     R0, [SP, #4] \n"
 485 
 486 "loc_FFB07A00:\n"
 487 "    ADD     R1, SP, #4 \n"
 488 "    MOV     R0, R5 \n"
 489 "    BL      sub_FFB077D4 \n"
 490 "    B       loc_FFB07A3C \n"
 491 
 492 "loc_FFB07A10:\n"
 493 "    MOV     R0, #1 \n"
 494 "    BL      sub_FF8C1D20 \n"
 495 "    STR     R4, [SP, #4] \n"
 496 "    B       loc_FFB07A00 \n"
 497 
 498 "loc_FFB07A20:\n"
 499 "    MOV     R0, #1 \n"
 500 "    BL      sub_FF8C1D20 \n"
 501 "    MOV     R0, #1 \n"
 502 "    STR     R0, [SP, #4] \n"
 503 "    MOV     R0, R5 \n"
 504 "    ADD     R1, SP, #4 \n"
 505 "    BL      sub_FFB07BCC \n"
 506 
 507 "loc_FFB07A3C:\n"
 508 "    BL      capt_seq_hook_raw_here\n"      // added (16/2/2011, moved here so that long exposures work)
 509 "    MOV     R6, R0 \n"
 510 "    B       sub_FFB07A6C \n"
 511 
 512 "loc_FFB07A44:\n"
 513 "    MOV     R0, #1 \n"
 514 "    BL      sub_FF8C1D20 \n"
 515 "    ADD     R1, SP, #4 \n"
 516 "    MOV     R0, R5 \n"
 517 "    STR     R4, [SP, #4] \n"
 518 "    BL      sub_FFB07850 \n"
 519 "    B       loc_FFB07A3C \n"
 520 );
 521 }
 522 
 523 /*************************************************************/
 524 //** exp_drv_task @ 0xFF8CC0D0 - 0xFF8CC798, length=435
 525 void __attribute__((naked,noinline)) exp_drv_task() {
 526 asm volatile (
 527 "    STMFD   SP!, {R4-R9,LR} \n"
 528 "    SUB     SP, SP, #0x24 \n"
 529 "    LDR     R9, =0xBB8 \n"
 530 "    LDR     R8, =0x4954 \n"
 531 "    LDR     R6, =0x58380 \n"
 532 "    MOV     R0, #0 \n"
 533 "    ADD     R7, SP, #0x14 \n"
 534 "    STR     R0, [SP, #0x10] \n"
 535 
 536 "loc_FF8CC0F0:\n"
 537 "    LDR     R0, [R8, #0x20] \n"
 538 "    MOV     R2, #0 \n"
 539 "    ADD     R1, SP, #0x20 \n"
 540 "    BL      sub_FF83A460 /*_ReceiveMessageQueue*/ \n"
 541 "    LDR     R0, [SP, #0x10] \n"
 542 "    CMP     R0, #1 \n"
 543 "    BNE     loc_FF8CC13C \n"
 544 "    LDR     R0, [SP, #0x20] \n"
 545 "    LDR     R0, [R0] \n"
 546 "    CMP     R0, #0x14 \n"
 547 "    CMPNE   R0, #0x15 \n"
 548 "    CMPNE   R0, #0x16 \n"
 549 "    CMPNE   R0, #0x17 \n"
 550 "    BEQ     loc_FF8CC2A0 \n"
 551 "    CMP     R0, #0x29 \n"
 552 "    BEQ     loc_FF8CC228 \n"
 553 "    ADD     R1, SP, #0x10 \n"
 554 "    MOV     R0, #0 \n"
 555 "    BL      sub_FF8CC080 \n"
 556 
 557 "loc_FF8CC13C:\n"
 558 "    LDR     R0, [SP, #0x20] \n"
 559 "    LDR     R1, [R0] \n"
 560 "    CMP     R1, #0x2F \n"
 561 "    BNE     loc_FF8CC16C \n"
 562 "    LDR     R0, [SP, #0x20] \n"
 563 "    BL      sub_FF8CD4A8 \n"
 564 "    LDR     R0, [R8, #0x1C] \n"
 565 "    MOV     R1, #1 \n"
 566 "    BL      sub_FF88D27C /*_SetEventFlag*/ \n"
 567 "    BL      _ExitTask \n"
 568 "    ADD     SP, SP, #0x24 \n"
 569 "    LDMFD   SP!, {R4-R9,PC} \n"
 570 
 571 "loc_FF8CC16C:\n"
 572 "    CMP     R1, #0x2E \n"
 573 "    BNE     loc_FF8CC188 \n"
 574 "    LDR     R2, [R0, #0x8C]! \n"
 575 "    LDR     R1, [R0, #4] \n"
 576 "    MOV     R0, R1 \n"
 577 "    BLX     R2 \n"
 578 "    B       loc_FF8CC790 \n"
 579 
 580 "loc_FF8CC188:\n"
 581 "    CMP     R1, #0x27 \n"
 582 "    BNE     loc_FF8CC1D8 \n"
 583 "    LDR     R0, [R8, #0x1C] \n"
 584 "    MOV     R1, #0x80 \n"
 585 "    BL      sub_FF88D2B0 /*_ClearEventFlag*/ \n"
 586 "    LDR     R0, =0xFF8C7EC8 \n"
 587 "    MOV     R1, #0x80 \n"
 588 "    BL      sub_FF97EE88 \n"
 589 "    LDR     R0, [R8, #0x1C] \n"
 590 "    MOV     R2, R9 \n"
 591 "    MOV     R1, #0x80 \n"
 592 "    BL      sub_FF88D1BC /*_WaitForAllEventFlag*/ \n"
 593 "    TST     R0, #1 \n"
 594 "    LDRNE   R1, =0x109D \n"
 595 "    BNE     loc_FF8CC294 \n"
 596 
 597 "loc_FF8CC1C4:\n"
 598 "    LDR     R1, [SP, #0x20] \n"
 599 "    LDR     R0, [R1, #0x90] \n"
 600 "    LDR     R1, [R1, #0x8C] \n"
 601 "    BLX     R1 \n"
 602 "    B       loc_FF8CC790 \n"
 603 
 604 "loc_FF8CC1D8:\n"
 605 "    CMP     R1, #0x28 \n"
 606 "    BNE     loc_FF8CC220 \n"
 607 "    ADD     R1, SP, #0x10 \n"
 608 "    BL      sub_FF8CC080 \n"
 609 "    LDR     R0, [R8, #0x1C] \n"
 610 "    MOV     R1, #0x100 \n"
 611 "    BL      sub_FF88D2B0 /*_ClearEventFlag*/ \n"
 612 "    LDR     R0, =0xFF8C7ED8 \n"
 613 "    MOV     R1, #0x100 \n"
 614 "    BL      sub_FF97F818 \n"
 615 "    LDR     R0, [R8, #0x1C] \n"
 616 "    MOV     R2, R9 \n"
 617 "    MOV     R1, #0x100 \n"
 618 "    BL      sub_FF88D1BC /*_WaitForAllEventFlag*/ \n"
 619 "    TST     R0, #1 \n"
 620 "    BEQ     loc_FF8CC1C4 \n"
 621 "    LDR     R1, =0x10A7 \n"
 622 "    B       loc_FF8CC294 \n"
 623 
 624 "loc_FF8CC220:\n"
 625 "    CMP     R1, #0x29 \n"
 626 "    BNE     loc_FF8CC238 \n"
 627 
 628 "loc_FF8CC228:\n"
 629 "    LDR     R0, [SP, #0x20] \n"
 630 "    ADD     R1, SP, #0x10 \n"
 631 "    BL      sub_FF8CC080 \n"
 632 "    B       loc_FF8CC1C4 \n"
 633 
 634 "loc_FF8CC238:\n"
 635 "    CMP     R1, #0x2C \n"
 636 "    BNE     loc_FF8CC250 \n"
 637 "    BL      sub_FF8BA4F4 \n"
 638 "    BL      sub_FF8BB100 \n"
 639 "    BL      sub_FF8BAC6C \n"
 640 "    B       loc_FF8CC1C4 \n"
 641 
 642 "loc_FF8CC250:\n"
 643 "    CMP     R1, #0x2D \n"
 644 "    BNE     loc_FF8CC2A0 \n"
 645 "    LDR     R0, [R8, #0x1C] \n"
 646 "    MOV     R1, #4 \n"
 647 "    BL      sub_FF88D2B0 /*_ClearEventFlag*/ \n"
 648 "    LDR     R1, =0xFF8C7EF8 \n"
 649 "    LDR     R0, =0xFFFFF400 \n"
 650 "    MOV     R2, #4 \n"
 651 "    BL      sub_FF8B9F70 \n"
 652 "    BL      sub_FF8BA1F8 \n"
 653 "    LDR     R0, [R8, #0x1C] \n"
 654 "    MOV     R2, R9 \n"
 655 "    MOV     R1, #4 \n"
 656 "    BL      sub_FF88D0D8 /*_WaitForAnyEventFlag*/ \n"
 657 "    TST     R0, #1 \n"
 658 "    BEQ     loc_FF8CC1C4 \n"
 659 "    LDR     R1, =0x10CF \n"
 660 
 661 "loc_FF8CC294:\n"
 662 "    LDR     R0, =0xFF8C8590 /*'ExpDrv.c'*/ \n"
 663 "    BL      _DebugAssert \n"
 664 "    B       loc_FF8CC1C4 \n"
 665 
 666 "loc_FF8CC2A0:\n"
 667 "    LDR     R0, [SP, #0x20] \n"
 668 "    MOV     R5, #1 \n"
 669 "    LDR     R1, [R0] \n"
 670 "    CMP     R1, #0x12 \n"
 671 "    CMPNE   R1, #0x13 \n"
 672 "    BNE     loc_FF8CC308 \n"
 673 "    LDR     R1, [R0, #0x7C] \n"
 674 "    ADD     R1, R1, R1, LSL#1 \n"
 675 "    ADD     R1, R0, R1, LSL#2 \n"
 676 "    SUB     R1, R1, #8 \n"
 677 "    LDMIA   R1, {R2-R4} \n"
 678 "    STMIA   R7, {R2-R4} \n"
 679 "    BL      sub_FF8CA7E8 \n"
 680 "    LDR     R0, [SP, #0x20] \n"
 681 "    LDR     R1, [R0, #0x7C] \n"
 682 "    LDR     R3, [R0, #0x8C] \n"
 683 "    LDR     R2, [R0, #0x90] \n"
 684 "    ADD     R0, R0, #4 \n"
 685 "    BLX     R3 \n"
 686 "    LDR     R0, [SP, #0x20] \n"
 687 "    BL      sub_FF8CD8BC \n"
 688 "    LDR     R0, [SP, #0x20] \n"
 689 "    LDR     R1, [R0, #0x7C] \n"
 690 "    LDR     R2, [R0, #0x98] \n"
 691 "    LDR     R3, [R0, #0x94] \n"
 692 "    B       loc_FF8CC67C \n"
 693 
 694 "loc_FF8CC308:\n"
 695 "    CMP     R1, #0x14 \n"
 696 "    CMPNE   R1, #0x15 \n"
 697 "    CMPNE   R1, #0x16 \n"
 698 "    CMPNE   R1, #0x17 \n"
 699 "    BNE     loc_FF8CC3C0 \n"
 700 "    ADD     R3, SP, #0x10 \n"
 701 "    ADD     R2, SP, #4 \n"
 702 "    ADD     R1, SP, #0x14 \n"
 703 "    BL      sub_FF8CAA54 \n"
 704 "    CMP     R0, #1 \n"
 705 "    MOV     R4, R0 \n"
 706 "    CMPNE   R4, #5 \n"
 707 "    BNE     loc_FF8CC35C \n"
 708 "    LDR     R0, [SP, #0x20] \n"
 709 "    MOV     R2, R4 \n"
 710 "    LDR     R1, [R0, #0x7C]! \n"
 711 "    LDR     R12, [R0, #0x10]! \n"
 712 "    LDR     R3, [R0, #4] \n"
 713 "    ADD     R0, SP, #4 \n"
 714 "    BLX     R12 \n"
 715 "    B       loc_FF8CC394 \n"
 716 
 717 "loc_FF8CC35C:\n"
 718 "    LDR     R0, [SP, #0x20] \n"
 719 "    CMP     R4, #2 \n"
 720 "    LDR     R3, [R0, #0x90] \n"
 721 "    CMPNE   R4, #6 \n"
 722 "    BNE     loc_FF8CC3A8 \n"
 723 "    LDR     R12, [R0, #0x8C] \n"
 724 "    ADD     R0, SP, #4 \n"
 725 "    MOV     R2, R4 \n"
 726 "    MOV     R1, #1 \n"
 727 "    BLX     R12 \n"
 728 "    LDR     R0, [SP, #0x20] \n"
 729 "    ADD     R2, SP, #4 \n"
 730 "    ADD     R1, SP, #0x14 \n"
 731 "    BL      sub_FF8CBDCC \n"
 732 
 733 "loc_FF8CC394:\n"
 734 "    LDR     R0, [SP, #0x20] \n"
 735 "    LDR     R2, [SP, #0x10] \n"
 736 "    MOV     R1, R4 \n"
 737 "    BL      sub_FF8CC020 \n"
 738 "    B       loc_FF8CC684 \n"
 739 
 740 "loc_FF8CC3A8:\n"
 741 "    LDR     R1, [R0, #0x7C] \n"
 742 "    LDR     R12, [R0, #0x8C] \n"
 743 "    ADD     R0, R0, #4 \n"
 744 "    MOV     R2, R4 \n"
 745 "    BLX     R12 \n"
 746 "    B       loc_FF8CC684 \n"
 747 
 748 "loc_FF8CC3C0:\n"
 749 "    CMP     R1, #0x23 \n"
 750 "    CMPNE   R1, #0x24 \n"
 751 "    BNE     loc_FF8CC46C \n"
 752 "    LDR     R1, [R0, #0x7C] \n"
 753 "    ADD     R1, R1, R1, LSL#1 \n"
 754 "    ADD     R1, R0, R1, LSL#2 \n"
 755 "    SUB     R1, R1, #8 \n"
 756 "    LDMIA   R1, {R2-R4} \n"
 757 "    STMIA   R7, {R2-R4} \n"
 758 "    BL      sub_FF8C985C \n"
 759 "    LDR     R0, [SP, #0x20] \n"
 760 "    LDR     R1, [R0, #0x7C] \n"
 761 "    LDR     R3, [R0, #0x8C] \n"
 762 "    LDR     R2, [R0, #0x90] \n"
 763 "    ADD     R0, R0, #4 \n"
 764 "    BLX     R3 \n"
 765 "    LDR     R0, [SP, #0x20] \n"
 766 "    BL      sub_FF8C9CA8 \n"
 767 "    B       loc_FF8CC684 \n"
 768 
 769 "loc_FF8CC46C:\n"
 770 "    ADD     R1, R0, #4 \n"
 771 "    LDMIA   R1, {R2-R4} \n"
 772 "    STMIA   R7, {R2-R4} \n"
 773 "    LDR     R1, [R0] \n"
 774 "    CMP     R1, #0x26 \n"
 775 "    ADDLS   PC, PC, R1, LSL#2 \n"
 776 "    B       loc_FF8CC66C \n"
 777 "    B       loc_FF8CC524 \n"
 778 "    B       loc_FF8CC524 \n"
 779 "    B       loc_FF8CC52C \n"
 780 "    B       loc_FF8CC534 \n"
 781 "    B       loc_FF8CC534 \n"
 782 "    B       loc_FF8CC534 \n"
 783 "    B       loc_FF8CC524 \n"
 784 "    B       loc_FF8CC52C \n"
 785 "    B       loc_FF8CC534 \n"
 786 "    B       loc_FF8CC534 \n"
 787 "    B       loc_FF8CC54C \n"
 788 "    B       loc_FF8CC54C \n"
 789 "    B       loc_FF8CC658 \n"
 790 "    B       loc_FF8CC660 \n"
 791 "    B       loc_FF8CC660 \n"
 792 "    B       loc_FF8CC660 \n"
 793 "    B       loc_FF8CC660 \n"
 794 "    B       loc_FF8CC668 \n"
 795 "    B       loc_FF8CC66C \n"
 796 "    B       loc_FF8CC66C \n"
 797 "    B       loc_FF8CC66C \n"
 798 "    B       loc_FF8CC66C \n"
 799 "    B       loc_FF8CC66C \n"
 800 "    B       loc_FF8CC66C \n"
 801 "    B       loc_FF8CC53C \n"
 802 "    B       loc_FF8CC544 \n"
 803 "    B       loc_FF8CC544 \n"
 804 "    B       loc_FF8CC558 \n"
 805 "    B       loc_FF8CC558 \n"
 806 "    B       loc_FF8CC560 \n"
 807 "    B       loc_FF8CC598 \n"
 808 "    B       loc_FF8CC5D0 \n"
 809 "    B       loc_FF8CC608 \n"
 810 "    B       loc_FF8CC640 \n"
 811 "    B       loc_FF8CC640 \n"
 812 "    B       loc_FF8CC66C \n"
 813 "    B       loc_FF8CC66C \n"
 814 "    B       loc_FF8CC648 \n"
 815 "    B       loc_FF8CC650 \n"
 816 
 817 "loc_FF8CC524:\n"
 818 "    BL      sub_FF8C8414 \n"
 819 "    B       loc_FF8CC66C \n"
 820 
 821 "loc_FF8CC52C:\n"
 822 "    BL      sub_FF8C86B4 \n"
 823 "    B       loc_FF8CC66C \n"
 824 
 825 "loc_FF8CC534:\n"
 826 "    BL      sub_FF8C88DC \n"
 827 "    B       loc_FF8CC66C \n"
 828 
 829 "loc_FF8CC53C:\n"
 830 "    BL      sub_FF8C8BB4 \n"
 831 "    B       loc_FF8CC66C \n"
 832 
 833 "loc_FF8CC544:\n"
 834 "    BL      sub_FF8C8DCC \n"
 835 "    B       loc_FF8CC66C \n"
 836 
 837 "loc_FF8CC54C:\n"
 838 "    BL      sub_FF8C90F0_my \n"  // --> Patched. Old value = 0xFF8C90F0.
 839 "    MOV     R5, #0 \n"
 840 "    B       loc_FF8CC66C \n"
 841 
 842 "loc_FF8CC558:\n"
 843 "    BL      sub_FF8C9238 \n"
 844 "    B       loc_FF8CC66C \n"
 845 
 846 "loc_FF8CC560:\n"
 847 "    LDRH    R1, [R0, #4] \n"
 848 "    STRH    R1, [SP, #0x14] \n"
 849 "    LDRH    R1, [R6, #2] \n"
 850 "    STRH    R1, [SP, #0x16] \n"
 851 "    LDRH    R1, [R6, #4] \n"
 852 "    STRH    R1, [SP, #0x18] \n"
 853 "    LDRH    R1, [R6, #6] \n"
 854 "    STRH    R1, [SP, #0x1A] \n"
 855 "    LDRH    R1, [R0, #0xC] \n"
 856 "    STRH    R1, [SP, #0x1C] \n"
 857 "    LDRH    R1, [R6, #0xA] \n"
 858 "    STRH    R1, [SP, #0x1E] \n"
 859 "    BL      sub_FF8CD5B4 \n"
 860 "    B       loc_FF8CC66C \n"
 861 
 862 "loc_FF8CC598:\n"
 863 "    LDRH    R1, [R0, #4] \n"
 864 "    STRH    R1, [SP, #0x14] \n"
 865 "    LDRH    R1, [R6, #2] \n"
 866 "    STRH    R1, [SP, #0x16] \n"
 867 "    LDRH    R1, [R6, #4] \n"
 868 "    STRH    R1, [SP, #0x18] \n"
 869 "    LDRH    R1, [R6, #6] \n"
 870 "    STRH    R1, [SP, #0x1A] \n"
 871 "    LDRH    R1, [R6, #8] \n"
 872 "    STRH    R1, [SP, #0x1C] \n"
 873 "    LDRH    R1, [R6, #0xA] \n"
 874 "    STRH    R1, [SP, #0x1E] \n"
 875 "    BL      sub_FF8CD6BC \n"
 876 "    B       loc_FF8CC66C \n"
 877 
 878 "loc_FF8CC5D0:\n"
 879 "    LDRH    R1, [R6] \n"
 880 "    STRH    R1, [SP, #0x14] \n"
 881 "    LDRH    R1, [R0, #6] \n"
 882 "    STRH    R1, [SP, #0x16] \n"
 883 "    LDRH    R1, [R6, #4] \n"
 884 "    STRH    R1, [SP, #0x18] \n"
 885 "    LDRH    R1, [R6, #6] \n"
 886 "    STRH    R1, [SP, #0x1A] \n"
 887 "    LDRH    R1, [R6, #8] \n"
 888 "    STRH    R1, [SP, #0x1C] \n"
 889 "    LDRH    R1, [R6, #0xA] \n"
 890 "    STRH    R1, [SP, #0x1E] \n"
 891 "    BL      sub_FF8CD770 \n"
 892 "    B       loc_FF8CC66C \n"
 893 
 894 "loc_FF8CC608:\n"
 895 "    LDRH    R1, [R6] \n"
 896 "    STRH    R1, [SP, #0x14] \n"
 897 "    LDRH    R1, [R6, #2] \n"
 898 "    STRH    R1, [SP, #0x16] \n"
 899 "    LDRH    R1, [R6, #4] \n"
 900 "    STRH    R1, [SP, #0x18] \n"
 901 "    LDRH    R1, [R6, #6] \n"
 902 "    STRH    R1, [SP, #0x1A] \n"
 903 "    LDRH    R1, [R0, #0xC] \n"
 904 "    STRH    R1, [SP, #0x1C] \n"
 905 "    LDRH    R1, [R6, #0xA] \n"
 906 "    STRH    R1, [SP, #0x1E] \n"
 907 "    BL      sub_FF8CD818 \n"
 908 "    B       loc_FF8CC66C \n"
 909 
 910 "loc_FF8CC640:\n"
 911 "    BL      sub_FF8C9634 \n"
 912 "    B       loc_FF8CC66C \n"
 913 
 914 "loc_FF8CC648:\n"
 915 "    BL      sub_FF8C9DAC \n"
 916 "    B       loc_FF8CC66C \n"
 917 
 918 "loc_FF8CC650:\n"
 919 "    BL      sub_FF8CA048 \n"
 920 "    B       loc_FF8CC66C \n"
 921 
 922 "loc_FF8CC658:\n"
 923 "    BL      sub_FF8CA228 \n"
 924 "    B       loc_FF8CC66C \n"
 925 
 926 "loc_FF8CC660:\n"
 927 "    BL      sub_FF8CA470 \n"
 928 "    B       loc_FF8CC66C \n"
 929 
 930 "loc_FF8CC668:\n"
 931 "    BL      sub_FF8CA5E0 \n"
 932 
 933 "loc_FF8CC66C:\n"
 934 "    LDR     R0, [SP, #0x20] \n"
 935 "    LDR     R1, [R0, #0x7C] \n"
 936 "    LDR     R2, [R0, #0x90] \n"
 937 "    LDR     R3, [R0, #0x8C] \n"
 938 
 939 "loc_FF8CC67C:\n"
 940 "    ADD     R0, R0, #4 \n"
 941 "    BLX     R3 \n"
 942 
 943 "loc_FF8CC684:\n"
 944 "    LDR     R0, [SP, #0x20] \n"
 945 "    LDR     R1, [R0] \n"
 946 "    CMP     R1, #0x10 \n"
 947 "    BEQ     loc_FF8CC6BC \n"
 948 "    BGT     loc_FF8CC6AC \n"
 949 "    CMP     R1, #1 \n"
 950 "    CMPNE   R1, #4 \n"
 951 "    CMPNE   R1, #0xE \n"
 952 "    BNE     loc_FF8CC6CC \n"
 953 "    B       loc_FF8CC6BC \n"
 954 
 955 "loc_FF8CC6AC:\n"
 956 "    CMP     R1, #0x13 \n"
 957 "    CMPNE   R1, #0x17 \n"
 958 "    CMPNE   R1, #0x1A \n"
 959 "    BNE     loc_FF8CC6CC \n"
 960 
 961 "loc_FF8CC6BC:\n"
 962 "    LDRH    R1, [R6] \n"
 963 "    STRH    R1, [SP, #0x14] \n"
 964 "    LDRH    R1, [R6, #8] \n"
 965 "    STRH    R1, [SP, #0x1C] \n"
 966 
 967 "loc_FF8CC6CC:\n"
 968 "    CMP     R5, #1 \n"
 969 "    BNE     loc_FF8CC718 \n"
 970 "    LDR     R1, [R0, #0x7C] \n"
 971 "    MOV     R2, #0xC \n"
 972 "    ADD     R1, R1, R1, LSL#1 \n"
 973 "    ADD     R0, R0, R1, LSL#2 \n"
 974 "    SUB     R4, R0, #8 \n"
 975 "    LDR     R0, =0x58380 \n"
 976 "    ADD     R1, SP, #0x14 \n"
 977 "    BL      sub_FFBB3278 \n"
 978 "    LDR     R0, =0x5838C \n"
 979 "    MOV     R2, #0xC \n"
 980 "    ADD     R1, SP, #0x14 \n"
 981 "    BL      sub_FFBB3278 \n"
 982 "    LDR     R0, =0x58398 \n"
 983 "    MOV     R2, #0xC \n"
 984 "    MOV     R1, R4 \n"
 985 "    BL      sub_FFBB3278 \n"
 986 "    B       loc_FF8CC790 \n"
 987 
 988 "loc_FF8CC718:\n"
 989 "    LDR     R0, [R0] \n"
 990 "    MOV     R3, #1 \n"
 991 "    CMP     R0, #0xB \n"
 992 "    BNE     loc_FF8CC75C \n"
 993 "    MOV     R2, #0 \n"
 994 "    STRD    R2, [SP] \n"
 995 "    MOV     R2, #1 \n"
 996 "    MOV     R1, #1 \n"
 997 "    MOV     R0, #0 \n"
 998 "    BL      sub_FF8C81F4 \n"
 999 "    MOV     R3, #1 \n"
1000 "    MOV     R2, #0 \n"
1001 "    STRD    R2, [SP] \n"
1002 "    MOV     R2, #1 \n"
1003 "    MOV     R1, #1 \n"
1004 "    MOV     R0, #0 \n"
1005 "    B       loc_FF8CC78C \n"
1006 
1007 "loc_FF8CC75C:\n"
1008 "    MOV     R2, #1 \n"
1009 "    STRD    R2, [SP] \n"
1010 "    MOV     R3, #1 \n"
1011 "    MOV     R1, #1 \n"
1012 "    MOV     R0, #1 \n"
1013 "    BL      sub_FF8C81F4 \n"
1014 "    MOV     R3, #1 \n"
1015 "    MOV     R2, #1 \n"
1016 "    MOV     R1, #1 \n"
1017 "    MOV     R0, #1 \n"
1018 "    STR     R3, [SP] \n"
1019 "    STR     R3, [SP, #4] \n"
1020 
1021 "loc_FF8CC78C:\n"
1022 "    BL      sub_FF8C835C \n"
1023 
1024 "loc_FF8CC790:\n"
1025 "    LDR     R0, [SP, #0x20] \n"
1026 "    BL      sub_FF8CD4A8 \n"
1027 "    B       loc_FF8CC0F0 \n"
1028 );
1029 }
1030 
1031 /*************************************************************/
1032 //** sub_FF8C90F0_my @ 0xFF8C90F0 - 0xFF8C91B8, length=51
1033 void __attribute__((naked,noinline)) sub_FF8C90F0_my() {
1034 asm volatile (
1035 "    STMFD   SP!, {R4-R8,LR} \n"
1036 "    LDR     R7, =0x4954 \n"
1037 "    MOV     R4, R0 \n"
1038 "    LDR     R0, [R7, #0x1C] \n"
1039 "    MOV     R1, #0x3E \n"
1040 "    BL      sub_FF88D2B0 /*_ClearEventFlag*/ \n"
1041 "    LDRSH   R0, [R4, #4] \n"
1042 "    MOV     R2, #0 \n"
1043 "    MOV     R1, #0 \n"
1044 "    BL      sub_FF8C7F4C \n"
1045 "    MOV     R5, R0 \n"
1046 "    LDRSH   R0, [R4, #6] \n"
1047 "    BL      sub_FF8C8068 \n"
1048 "    LDRSH   R0, [R4, #8] \n"
1049 "    BL      sub_FF8C80C0 \n"
1050 "    LDRSH   R0, [R4, #0xA] \n"
1051 "    BL      sub_FF8C8118 \n"
1052 "    LDRSH   R0, [R4, #0xC] \n"
1053 "    MOV     R1, #0 \n"
1054 "    BL      sub_FF8C8170 \n"
1055 "    MOV     R6, R0 \n"
1056 "    LDRSH   R0, [R4, #0xE] \n"
1057 "    BL      sub_FF8CD554 \n"
1058 "    LDR     R0, [R4] \n"
1059 "    LDR     R8, =0x58398 \n"
1060 "    CMP     R0, #0xB \n"
1061 "    MOVEQ   R5, #0 \n"
1062 "    MOVEQ   R6, #0 \n"
1063 "    BEQ     loc_FF8C918C \n"
1064 "    CMP     R5, #1 \n"
1065 "    BNE     loc_FF8C918C \n"
1066 "    LDRSH   R0, [R4, #4] \n"
1067 "    LDR     R1, =0xFF8C7EB8 \n"
1068 "    MOV     R2, #2 \n"
1069 "    BL      sub_FF97F1D4 \n"
1070 "    STRH    R0, [R4, #4] \n"
1071 "    MOV     R0, #0 \n"
1072 "    STR     R0, [R7, #0x28] \n"
1073 "    B       loc_FF8C9194 \n"
1074 
1075 "loc_FF8C918C:\n"
1076 "    LDRH    R0, [R8] \n"
1077 "    STRH    R0, [R4, #4] \n"
1078 
1079 "loc_FF8C9194:\n"
1080 "    CMP     R6, #1 \n"
1081 "    LDRNEH  R0, [R8, #8] \n"
1082 "    BNE     loc_FF8C91B0 \n"
1083 "    LDRSH   R0, [R4, #0xC] \n"
1084 "    LDR     R1, =0xFF8C7F3C \n"
1085 "    MOV     R2, #0x20 \n"
1086 "    BL      sub_FF8CD570 \n"
1087 
1088 "loc_FF8C91B0:\n"
1089 "    STRH    R0, [R4, #0xC] \n"
1090 "    LDRSH   R0, [R4, #6] \n"
1091 "    BL      sub_FF8BA264_my \n"  // --> Patched. Old value = 0xFF8BA264.
1092 "    LDR     PC, =0xFF8C91BC \n"  // Continue in firmware
1093 );
1094 }
1095 
1096 /*************************************************************/
1097 //** sub_FF8BA264_my @ 0xFF8BA264 - 0xFF8BA2A4, length=17
1098 void __attribute__((naked,noinline)) sub_FF8BA264_my() {
1099 asm volatile (
1100 "    STMFD   SP!, {R4-R6,LR} \n"
1101 "    LDR     R5, =0x4638 \n"
1102 "    MOV     R4, R0 \n"
1103 "    LDR     R0, [R5, #4] \n"
1104 "    CMP     R0, #1 \n"
1105 "    LDRNE   R1, =0x146 \n"
1106 "    LDRNE   R0, =0xFF8BA068 /*'Shutter.c'*/ \n"
1107 "    BLNE    _DebugAssert \n"
1108 "    CMN     R4, #0xC00 \n"
1109 "    LDREQSH R4, [R5, #2] \n"
1110 "    CMN     R4, #0xC00 \n"
1111 "    MOVEQ   R1, #0x14C \n"
1112 "    LDREQ   R0, =0xFF8BA068 /*'Shutter.c'*/ \n"
1113 "    STRH    R4, [R5, #2] \n"
1114 "    BLEQ    _DebugAssert \n"
1115 "    MOV     R0, R4 \n"
1116 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
1117 "    LDR     PC, =0xFF8BA2A8 \n"  // Continue in firmware
1118 );
1119 }

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