root/platform/sx30/sub/100l/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF992D80_my
  3. sub_FFAECCA0_my
  4. exp_drv_task
  5. sub_FF8CD894_my
  6. sub_FF8BE940_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 @ 0xFF8868C4 - 0xFF886B8C, length=179
  15 void __attribute__((naked,noinline)) capt_seq_task() {
  16 asm volatile (
  17 "    STMFD   SP!, {R3-R7,LR} \n"
  18 "    LDR     R7, =0x3648 \n"
  19 "    LDR     R4, =0x3BC24 \n"
  20 "    MOV     R6, #0 \n"
  21 
  22 "loc_FF8868D4:\n"
  23 "    LDR     R0, [R7, #4] \n"
  24 "    MOV     R2, #0 \n"
  25 "    MOV     R1, SP \n"
  26 "    BL      sub_FF83A4C8 /*_ReceiveMessageQueue*/ \n"
  27 "    TST     R0, #1 \n"
  28 "    BEQ     loc_FF886900 \n"
  29 "    LDR     R1, =0x43F \n"
  30 "    LDR     R0, =0xFF8863B4 /*'SsShootTask.c'*/ \n"
  31 "    BL      _DebugAssert \n"
  32 "    BL      _ExitTask \n"
  33 "    LDMFD   SP!, {R3-R7,PC} \n"
  34 
  35 "loc_FF886900:\n"
  36 "    LDR     R0, [SP] \n"
  37 "    LDR     R1, [R0] \n"
  38 "    CMP     R1, #0x22 \n"
  39 "    ADDLS   PC, PC, R1, LSL#2 \n"
  40 "    B       loc_FF886B54 \n"
  41 "    B       loc_FF8869A0 \n"
  42 "    B       loc_FF8869B8 \n"
  43 "    B       loc_FF8869D0 \n"
  44 "    B       loc_FF8869F0 \n"
  45 "    B       loc_FF8869E8 \n"
  46 "    B       loc_FF8869FC \n"
  47 "    B       loc_FF886A04 \n"
  48 "    B       loc_FF886A0C \n"
  49 "    B       loc_FF886A18 \n"
  50 "    B       loc_FF886A40 \n"
  51 "    B       loc_FF886A24 \n"
  52 "    B       loc_FF886A30 \n"
  53 "    B       loc_FF886A38 \n"
  54 "    B       loc_FF886A48 \n"
  55 "    B       loc_FF886A50 \n"
  56 "    B       loc_FF886A58 \n"
  57 "    B       loc_FF886A60 \n"
  58 "    B       loc_FF886A68 \n"
  59 "    B       loc_FF886A70 \n"
  60 "    B       loc_FF886A78 \n"
  61 "    B       loc_FF886A80 \n"
  62 "    B       loc_FF886A88 \n"
  63 "    B       loc_FF886A90 \n"
  64 "    B       loc_FF886A9C \n"
  65 "    B       loc_FF886AA4 \n"
  66 "    B       loc_FF886AB0 \n"
  67 "    B       loc_FF886AB8 \n"
  68 "    B       loc_FF886AE8 \n"
  69 "    B       loc_FF886AF0 \n"
  70 "    B       loc_FF886AF8 \n"
  71 "    B       loc_FF886B00 \n"
  72 "    B       loc_FF886B08 \n"
  73 "    B       loc_FF886B10 \n"
  74 "    B       loc_FF886B1C \n"
  75 "    B       loc_FF886B60 \n"
  76 
  77 "loc_FF8869A0:\n"
  78 "    BL      shooting_expo_iso_override\n"      // added
  79 "    BL      sub_FF887088 \n"
  80 "    BL      shooting_expo_param_override\n"    // added
  81 "    BL      sub_FF8840C0 \n"
  82 "    MOV     R0, #0\n"                          // added
  83 "    STR     R0, [R4,#0x24]\n"                  // added, fixes overrides behavior at short shutter press (from S95)
  84 //"  LDR     R0, [R4, #0x24] \n"  // above patch makes these three lines redundant
  85 //"  CMP     R0, #0 \n"
  86 //"  BLNE    _sub_FF992F54 \n"
  87 "    B       loc_FF886B60 \n"
  88 
  89 "loc_FF8869B8:\n"
  90 "    LDRH    R1, [R4] \n"
  91 "    SUB     R12, R1, #0x8200 \n"
  92 "    SUBS    R12, R12, #0x2E \n"
  93 "    LDRNE   R0, [R0, #0xC] \n"
  94 "    BLNE    sub_FF992D80_my \n"  // --> Patched. Old value = 0xFF992D80.
  95 "    B       loc_FF886B60 \n"
  96 
  97 "loc_FF8869D0:\n"
  98 "    MOV     R0, #1 \n"
  99 "    BL      sub_FF8873A0 \n"
 100 "    LDR     R0, [R4, #0xC] \n"
 101 "    CMP     R0, #0 \n"
 102 "    BLNE    sub_FF888028 \n"
 103 "    B       loc_FF886B60 \n"
 104 
 105 "loc_FF8869E8:\n"
 106 "    BL      sub_FF886D24 \n"
 107 "    B       loc_FF8869F4 \n"
 108 
 109 "loc_FF8869F0:\n"
 110 "    BL      sub_FF887068 \n"
 111 
 112 "loc_FF8869F4:\n"
 113 "    STR     R6, [R4, #0x24] \n"
 114 "    B       loc_FF886B60 \n"
 115 
 116 "loc_FF8869FC:\n"
 117 "    BL      sub_FF887070 \n"
 118 "    B       loc_FF886B60 \n"
 119 
 120 "loc_FF886A04:\n"
 121 "    BL      sub_FF887274 \n"
 122 "    B       loc_FF886A1C \n"
 123 
 124 "loc_FF886A0C:\n"
 125 "    LDR     R0, [R0, #0xC] \n"
 126 "    BL      sub_FF992FBC \n"
 127 "    B       loc_FF886B60 \n"
 128 
 129 "loc_FF886A18:\n"
 130 "    BL      sub_FF887310 \n"
 131 
 132 "loc_FF886A1C:\n"
 133 "    BL      sub_FF8840C0 \n"
 134 "    B       loc_FF886B60 \n"
 135 
 136 "loc_FF886A24:\n"
 137 "    LDR     R0, [R4, #0x54] \n"
 138 "    BL      sub_FF887A60 \n"
 139 "    B       loc_FF886B60 \n"
 140 
 141 "loc_FF886A30:\n"
 142 "    BL      sub_FF887DE0 \n"
 143 "    B       loc_FF886B60 \n"
 144 
 145 "loc_FF886A38:\n"
 146 "    BL      sub_FF887E44 \n"
 147 "    B       loc_FF886B60 \n"
 148 
 149 "loc_FF886A40:\n"
 150 "    BL      sub_FF887068 \n"
 151 "    B       loc_FF886B60 \n"
 152 
 153 "loc_FF886A48:\n"
 154 "    BL      sub_FF991D5C \n"
 155 "    B       loc_FF886B60 \n"
 156 
 157 "loc_FF886A50:\n"
 158 "    BL      sub_FF991FAC \n"
 159 "    B       loc_FF886B60 \n"
 160 
 161 "loc_FF886A58:\n"
 162 "    BL      sub_FF992078 \n"
 163 "    B       loc_FF886B60 \n"
 164 
 165 "loc_FF886A60:\n"
 166 "    BL      sub_FF99218C \n"
 167 "    B       loc_FF886B60 \n"
 168 
 169 "loc_FF886A68:\n"
 170 "    BL      sub_FF99225C \n"
 171 "    B       loc_FF886B60 \n"
 172 
 173 "loc_FF886A70:\n"
 174 "    MOV     R0, #0 \n"
 175 "    B       loc_FF886A94 \n"
 176 
 177 "loc_FF886A78:\n"
 178 "    BL      sub_FF992870 \n"
 179 "    B       loc_FF886B60 \n"
 180 
 181 "loc_FF886A80:\n"
 182 "    BL      sub_FF992908 \n"
 183 "    B       loc_FF886B60 \n"
 184 
 185 "loc_FF886A88:\n"
 186 "    BL      sub_FF9929E8 \n"
 187 "    B       loc_FF886B60 \n"
 188 
 189 "loc_FF886A90:\n"
 190 "    MOV     R0, #1 \n"
 191 
 192 "loc_FF886A94:\n"
 193 "    BL      sub_FF992714 \n"
 194 "    B       loc_FF886B60 \n"
 195 
 196 "loc_FF886A9C:\n"
 197 "    BL      sub_FF8875DC \n"
 198 "    B       loc_FF886B60 \n"
 199 
 200 "loc_FF886AA4:\n"
 201 "    BL      sub_FF887684 \n"
 202 "    BL      sub_FF993C1C \n"
 203 "    B       loc_FF886B60 \n"
 204 
 205 "loc_FF886AB0:\n"
 206 "    BL      sub_FF99253C \n"
 207 "    B       loc_FF886B60 \n"
 208 
 209 "loc_FF886AB8:\n"
 210 "    MOV     R2, #2 \n"
 211 "    ADD     R1, R4, #0x68 \n"
 212 "    MOV     R0, #0x6F \n"
 213 "    BL      _GetPropertyCase \n"
 214 "    TST     R0, #1 \n"
 215 "    LDRNE   R1, =0x531 \n"
 216 "    LDRNE   R0, =0xFF8863B4 /*'SsShootTask.c'*/ \n"
 217 "    BLNE    _DebugAssert \n"
 218 "    LDRH    R0, [R4, #0x68] \n"
 219 "    CMP     R0, #1 \n"
 220 "    BLEQ    sub_FF992530 \n"
 221 "    B       loc_FF886B60 \n"
 222 
 223 "loc_FF886AE8:\n"
 224 "    BL      sub_FF992668 \n"
 225 "    B       loc_FF886B60 \n"
 226 
 227 "loc_FF886AF0:\n"
 228 "    BL      sub_FF993CEC \n"
 229 "    B       loc_FF886B60 \n"
 230 
 231 "loc_FF886AF8:\n"
 232 "    BL      sub_FF837D44 \n"
 233 "    B       loc_FF886B60 \n"
 234 
 235 "loc_FF886B00:\n"
 236 "    BL      sub_FF88A2DC \n"
 237 "    B       loc_FF886B60 \n"
 238 
 239 "loc_FF886B08:\n"
 240 "    BL      sub_FF88A364 \n"
 241 "    B       loc_FF886B60 \n"
 242 
 243 "loc_FF886B10:\n"
 244 "    BL      sub_FF88A3C0 \n"
 245 "    BL      sub_FF88A380 \n"
 246 "    B       loc_FF886B60 \n"
 247 
 248 "loc_FF886B1C:\n"
 249 "    MOV     R0, #1 \n"
 250 "    BL      sub_FF993758 \n"
 251 "    MOV     R0, #1 \n"
 252 "    BL      sub_FF993888 \n"
 253 "    LDRH    R0, [R4, #0xA4] \n"
 254 "    CMP     R0, #4 \n"
 255 "    LDRNEH  R0, [R4] \n"
 256 "    SUBNE   R12, R0, #0x4200 \n"
 257 "    SUBNES  R12, R12, #0x2A \n"
 258 "    BNE     loc_FF886B60 \n"
 259 "    BL      sub_FF88A364 \n"
 260 "    BL      sub_FF88A8D8 \n"
 261 "    BL      sub_FF88A7E0 \n"
 262 "    B       loc_FF886B60 \n"
 263 
 264 "loc_FF886B54:\n"
 265 "    LDR     R1, =0x591 \n"
 266 "    LDR     R0, =0xFF8863B4 /*'SsShootTask.c'*/ \n"
 267 "    BL      _DebugAssert \n"
 268 
 269 "loc_FF886B60:\n"
 270 "    LDR     R0, [SP] \n"
 271 "    LDR     R1, [R0, #4] \n"
 272 "    LDR     R0, [R7] \n"
 273 "    BL      sub_FF89179C /*_SetEventFlag*/ \n"
 274 "    LDR     R5, [SP] \n"
 275 "    LDR     R0, [R5, #8] \n"
 276 "    CMP     R0, #0 \n"
 277 "    LDREQ   R1, =0x115 \n"
 278 "    LDREQ   R0, =0xFF8863B4 /*'SsShootTask.c'*/ \n"
 279 "    BLEQ    _DebugAssert \n"
 280 "    STR     R6, [R5, #8] \n"
 281 "    B       loc_FF8868D4 \n"
 282 );
 283 }
 284 
 285 /*************************************************************/
 286 //** sub_FF992D80_my @ 0xFF992D80 - 0xFF992F50, length=117
 287 void __attribute__((naked,noinline)) sub_FF992D80_my() {
 288 asm volatile (
 289 "    STMFD   SP!, {R3-R7,LR} \n"
 290 "    LDR     R5, =0x3BC24 \n"
 291 "    MOV     R4, R0 \n"
 292 "    LDR     R0, [R5, #0x24] \n"
 293 "    MOV     R6, #0 \n"
 294 "    CMP     R0, #0 \n"
 295 "    BNE     loc_FF992DBC \n"
 296 "    MOV     R0, #0xC \n"
 297 "    BL      sub_FF88C64C \n"
 298 "    TST     R0, #1 \n"
 299 "    MOVNE   R2, R4 \n"
 300 "    LDMNEFD SP!, {R3-R7,LR} \n"
 301 "    MOVNE   R1, #1 \n"
 302 "    MOVNE   R0, #1 \n"
 303 "    BNE     sub_FF88479C \n"
 304 
 305 "loc_FF992DBC:\n"
 306 "    LDR     R0, [R4, #8] \n"
 307 "    LDR     R7, =0x420C \n"
 308 "    ORR     R0, R0, #1 \n"
 309 "    STR     R0, [R4, #8] \n"
 310 "    LDRH    R0, [R5] \n"
 311 "    CMP     R0, R7 \n"
 312 "    BEQ     loc_FF992E4C \n"
 313 "    LDRH    R0, [R5, #0xA2] \n"
 314 "    CMP     R0, #3 \n"
 315 "    BEQ     loc_FF992E94 \n"
 316 "    LDR     R0, [R4, #0xC] \n"
 317 "    CMP     R0, #1 \n"
 318 "    BLS     loc_FF992E58 \n"
 319 "    LDRH    R0, [R5, #0xA0] \n"
 320 "    CMP     R0, #0 \n"
 321 "    BNE     loc_FF992E94 \n"
 322 "    LDRH    R0, [R5, #0x9C] \n"
 323 "    CMP     R0, #2 \n"
 324 "    BNE     loc_FF992E64 \n"
 325 "    BL      sub_FF887744 \n"
 326 "    LDRH    R0, [R5] \n"
 327 "    CMP     R0, R7 \n"
 328 "    BEQ     loc_FF992E4C \n"
 329 "    LDRH    R0, [R5, #0xA2] \n"
 330 "    CMP     R0, #3 \n"
 331 "    BEQ     loc_FF992E94 \n"
 332 "    LDR     R0, [R4, #0xC] \n"
 333 "    CMP     R0, #1 \n"
 334 "    BLS     loc_FF992E58 \n"
 335 "    LDRH    R0, [R5, #0xA0] \n"
 336 "    CMP     R0, #0 \n"
 337 "    BNE     loc_FF992E94 \n"
 338 "    LDRH    R0, [R5, #0x9C] \n"
 339 "    CMP     R0, #2 \n"
 340 "    BEQ     loc_FF992E90 \n"
 341 "    B       loc_FF992E64 \n"
 342 
 343 "loc_FF992E4C:\n"
 344 "    LDRH    R0, [R5, #0xA2] \n"
 345 "    CMP     R0, #3 \n"
 346 "    BEQ     loc_FF992E94 \n"
 347 
 348 "loc_FF992E58:\n"
 349 "    LDRH    R0, [R5, #0xA0] \n"
 350 "    CMP     R0, #0 \n"
 351 "    BNE     loc_FF992E94 \n"
 352 
 353 "loc_FF992E64:\n"
 354 "    LDRH    R0, [R5, #0x9C] \n"
 355 "    CMP     R0, #1 \n"
 356 "    BNE     loc_FF992E94 \n"
 357 "    LDRH    R0, [R5] \n"
 358 "    CMP     R0, R7 \n"
 359 "    LDRNE   R0, [R4, #0xC] \n"
 360 "    CMPNE   R0, #1 \n"
 361 "    BLS     loc_FF992E94 \n"
 362 "    LDR     R0, [R4, #0x10] \n"
 363 "    CMP     R0, #1 \n"
 364 "    BNE     loc_FF992E94 \n"
 365 
 366 "loc_FF992E90:\n"
 367 "    BL      sub_FF993D24 \n"
 368 
 369 "loc_FF992E94:\n"
 370 "    BL      sub_FF993CEC \n"
 371 "    BL      sub_FF887078 \n"
 372 "    LDR     R0, [R5, #0x24] \n"
 373 "    CMP     R0, #0 \n"
 374 "    BNE     loc_FF992F2C \n"
 375 "    MOV     R0, R4 \n"
 376 "    BL      sub_FFAEC394 \n"
 377 "    TST     R0, #1 \n"
 378 "    BNE     loc_FF992F50 \n"
 379 "    MOV     R0, R4 \n"
 380 "    BL      sub_FFAEC7A8 \n"
 381 "    BL      sub_FF99352C \n"
 382 "    MOV     R6, #1 \n"
 383 "    MOV     R0, #2 \n"
 384 "    BL      sub_FF87FD8C \n"
 385 "    BL      wait_until_remote_button_is_released\n"    // added
 386 "    BL      capt_seq_hook_set_nr\n"                    // added
 387 "    LDRH    R0, [R5] \n"
 388 "    SUB     R12, R0, #0x8200 \n"
 389 "    SUBS    R12, R12, #0x2D \n"
 390 "    BNE     loc_FF992F1C \n"
 391 "    MOV     R2, #2 \n"
 392 "    ADD     R0, R2, #0x15C \n"
 393 "    MOV     R1, SP \n"
 394 "    STR     R6, [SP] \n"
 395 "    BL      _GetPropertyCase \n"
 396 "    TST     R0, #1 \n"
 397 "    MOVNE   R1, #0xC3 \n"
 398 "    LDRNE   R0, =0xFF993030 /*'SsCaptureSeq.c'*/ \n"
 399 "    BLNE    _DebugAssert \n"
 400 "    LDRH    R0, [SP] \n"
 401 "    CMP     R0, #1 \n"
 402 "    STRHI   R6, [R4, #0xD4] \n"
 403 "    BHI     loc_FF992F3C \n"
 404 "    MOV     R0, #0 \n"
 405 "    STR     R0, [R4, #0xD4] \n"
 406 
 407 "loc_FF992F1C:\n"
 408 "    MOV     R0, R4 \n"
 409 "    BL      sub_FFAECCA0_my \n"  // --> Patched. Old value = 0xFFAECCA0.
 410 "    MOV     R6, R0 \n"
 411 "    B       loc_FF992F40 \n"
 412 
 413 "loc_FF992F2C:\n"
 414 "    LDR     R0, =0x85AC \n"
 415 "    LDR     R0, [R0] \n"
 416 "    CMP     R0, #0 \n"
 417 "    BEQ     loc_FF992F40 \n"
 418 
 419 "loc_FF992F3C:\n"
 420 "    MOV     R6, #0x1D \n"
 421 
 422 "loc_FF992F40:\n"
 423 "    MOV     R1, R6 \n"
 424 "    MOV     R0, R4 \n"
 425 "    LDMFD   SP!, {R3-R7,LR} \n"
 426 "    B       sub_FFAEC4B8 \n"
 427 
 428 "loc_FF992F50:\n"
 429 "    LDMFD   SP!, {R3-R7,PC} \n"
 430 );
 431 }
 432 
 433 /*************************************************************/
 434 //** sub_FFAECCA0_my @ 0xFFAECCA0 - 0xFFAECE08, length=91
 435 void __attribute__((naked,noinline)) sub_FFAECCA0_my() {
 436 asm volatile (
 437 "    STMFD   SP!, {R2-R6,LR} \n"
 438 "    MOV     R5, R0 \n"
 439 "    BL      sub_FF993A4C \n"
 440 "    MVN     R1, #0 \n"
 441 "    BL      sub_FF8917D0 /*_ClearEventFlag*/ \n"
 442 "    LDR     R0, =0xFFAEC534 \n"
 443 "    MOV     R1, R5 \n"
 444 "    BL      sub_FF8C6448 \n"
 445 "    MOV     R0, R5 \n"
 446 "    BL      sub_FFAEC440 \n"
 447 "    MOV     R0, R5 \n"
 448 "    BL      sub_FFAEC890 \n"
 449 "    MOV     R4, R0 \n"
 450 "    LDR     R1, =0xE164 \n"
 451 "    MOV     R0, #0x8A \n"
 452 "    MOV     R2, #4 \n"
 453 "    BL      _GetPropertyCase \n"
 454 "    TST     R0, #1 \n"
 455 "    LDRNE   R1, =0x1F6 \n"
 456 "    LDRNE   R0, =0xFFAECE28 /*'SsStandardCaptureSeq.c'*/ \n"
 457 "    BLNE    _DebugAssert \n"
 458 "    BL      sub_FF889A04 \n"
 459 "    MOV     R0, R4 \n"
 460 "    CMP     R0, #1 \n"
 461 "    MOV     R4, #0 \n"
 462 "    BEQ     loc_FFAECD40 \n"
 463 "    CMP     R0, #2 \n"
 464 "    BEQ     loc_FFAECD50 \n"
 465 "    CMP     R0, #3 \n"
 466 "    BEQ     loc_FFAECD74 \n"
 467 "    CMP     R0, #7 \n"
 468 "    BNE     loc_FFAECD90 \n"
 469 "    MOV     R0, #0 \n"
 470 "    BL      sub_FF8C6478 \n"
 471 "    MOV     R0, #4 \n"
 472 "    STR     R0, [SP, #4] \n"
 473 
 474 "loc_FFAECD30:\n"
 475 "    ADD     R1, SP, #4 \n"
 476 "    MOV     R0, R5 \n"
 477 "    BL      sub_FFAECB04 \n"
 478 "    B       loc_FFAECD6C \n"
 479 
 480 "loc_FFAECD40:\n"
 481 "    MOV     R0, #1 \n"
 482 "    BL      sub_FF8C6478 \n"
 483 "    STR     R4, [SP, #4] \n"
 484 "    B       loc_FFAECD30 \n"
 485 
 486 "loc_FFAECD50:\n"
 487 "    MOV     R0, #1 \n"
 488 "    BL      sub_FF8C6478 \n"
 489 "    MOV     R0, #1 \n"
 490 "    STR     R0, [SP, #4] \n"
 491 "    MOV     R0, R5 \n"
 492 "    ADD     R1, SP, #4 \n"
 493 "    BL      sub_FFAECEFC \n"
 494 
 495 "loc_FFAECD6C:\n"
 496 "    BL      capt_seq_hook_raw_here\n"      // added (16/2/2011, moved here so that long exposures work)
 497 "    MOV     R6, R0 \n"
 498 "    B       loc_FFAECD9C \n"
 499 
 500 "loc_FFAECD74:\n"
 501 "    MOV     R0, #1 \n"
 502 "    BL      sub_FF8C6478 \n"
 503 "    ADD     R1, SP, #4 \n"
 504 "    MOV     R0, R5 \n"
 505 "    STR     R4, [SP, #4] \n"
 506 "    BL      sub_FFAECB80 \n"
 507 "    B       loc_FFAECD6C \n"
 508 
 509 "loc_FFAECD90:\n"
 510 "    MOV     R1, #0x22C \n"
 511 "    LDR     R0, =0xFFAECE28 /*'SsStandardCaptureSeq.c'*/ \n"
 512 "    BL      _DebugAssert \n"
 513 
 514 "loc_FFAECD9C:\n"
 515 "    TST     R6, #1 \n"
 516 "    MOVNE   R0, R6 \n"
 517 "    BNE     loc_FFAECE08 \n"
 518 "    MOV     R1, #0 \n"
 519 "    LDR     R0, =0xFFAECA74 \n"
 520 "    BL      sub_FF8C6448 \n"
 521 "    LDR     R0, =0x3BC24 \n"
 522 "    LDRH    R0, [R0] \n"
 523 "    SUB     R12, R0, #0x4000 \n"
 524 "    SUBS    R12, R12, #0x20C \n"
 525 "    BLEQ    sub_FF8AF954 \n"
 526 "    MOV     R0, R5 \n"
 527 "    BL      sub_FFAEC938 \n"
 528 "    BL      sub_FF993A4C \n"
 529 "    MOV     R3, #0x244 \n"
 530 "    STR     R3, [SP] \n"
 531 "    LDR     R2, =0x3A98 \n"
 532 "    LDR     R3, =0xFFAECE28 /*'SsStandardCaptureSeq.c'*/ \n"
 533 "    MOV     R1, #4 \n"
 534 "    BL      sub_FF88C9C8 \n"
 535 "    CMP     R0, #0 \n"
 536 "    MOVNE   R1, #0x244 \n"
 537 "    LDRNE   R0, =0xFFAECE28 /*'SsStandardCaptureSeq.c'*/ \n"
 538 "    BLNE    _DebugAssert \n"
 539 "    LDRH    R0, [SP, #4] \n"
 540 "    STRH    R0, [R5, #0x14] \n"
 541 "    MOV     R0, #0 \n"
 542 
 543 "loc_FFAECE08:\n"
 544 "    LDMFD   SP!, {R2-R6,PC} \n"
 545 );
 546 }
 547 
 548 /*************************************************************/
 549 //** exp_drv_task @ 0xFF8D081C - 0xFF8D0EB0, length=422
 550 void __attribute__((naked,noinline)) exp_drv_task() {
 551 asm volatile (
 552 "    STMFD   SP!, {R4-R8,LR} \n"
 553 "    SUB     SP, SP, #0x20 \n"
 554 "    LDR     R8, =0xBB8 \n"
 555 "    LDR     R7, =0x5094 \n"
 556 "    LDR     R5, =0x57870 \n"
 557 "    MOV     R0, #0 \n"
 558 "    ADD     R6, SP, #0x10 \n"
 559 "    STR     R0, [SP, #0xC] \n"
 560 
 561 "loc_FF8D083C:\n"
 562 "    LDR     R0, [R7, #0x20] \n"
 563 "    MOV     R2, #0 \n"
 564 "    ADD     R1, SP, #0x1C \n"
 565 "    BL      sub_FF83A4C8 /*_ReceiveMessageQueue*/ \n"
 566 "    LDR     R0, [SP, #0xC] \n"
 567 "    CMP     R0, #1 \n"
 568 "    BNE     loc_FF8D0888 \n"
 569 "    LDR     R0, [SP, #0x1C] \n"
 570 "    LDR     R0, [R0] \n"
 571 "    CMP     R0, #0x14 \n"
 572 "    CMPNE   R0, #0x15 \n"
 573 "    CMPNE   R0, #0x16 \n"
 574 "    CMPNE   R0, #0x17 \n"
 575 "    BEQ     loc_FF8D09EC \n"
 576 "    CMP     R0, #0x29 \n"
 577 "    BEQ     loc_FF8D0974 \n"
 578 "    ADD     R1, SP, #0xC \n"
 579 "    MOV     R0, #0 \n"
 580 "    BL      sub_FF8D07CC \n"
 581 
 582 "loc_FF8D0888:\n"
 583 "    LDR     R0, [SP, #0x1C] \n"
 584 "    LDR     R1, [R0] \n"
 585 "    CMP     R1, #0x2F \n"
 586 "    BNE     loc_FF8D08B8 \n"
 587 "    LDR     R0, [SP, #0x1C] \n"
 588 "    BL      sub_FF8D1BC0 \n"
 589 "    LDR     R0, [R7, #0x1C] \n"
 590 "    MOV     R1, #1 \n"
 591 "    BL      sub_FF89179C /*_SetEventFlag*/ \n"
 592 "    BL      _ExitTask \n"
 593 "    ADD     SP, SP, #0x20 \n"
 594 "    LDMFD   SP!, {R4-R8,PC} \n"
 595 
 596 "loc_FF8D08B8:\n"
 597 "    CMP     R1, #0x2E \n"
 598 "    BNE     loc_FF8D08D4 \n"
 599 "    LDR     R2, [R0, #0x8C]! \n"
 600 "    LDR     R1, [R0, #4] \n"
 601 "    MOV     R0, R1 \n"
 602 "    BLX     R2 \n"
 603 "    B       loc_FF8D0EA8 \n"
 604 
 605 "loc_FF8D08D4:\n"
 606 "    CMP     R1, #0x27 \n"
 607 "    BNE     loc_FF8D0924 \n"
 608 "    LDR     R0, [R7, #0x1C] \n"
 609 "    MOV     R1, #0x80 \n"
 610 "    BL      sub_FF8917D0 /*_ClearEventFlag*/ \n"
 611 "    LDR     R0, =0xFF8CC67C \n"
 612 "    MOV     R1, #0x80 \n"
 613 "    BL      sub_FF97F6E8 \n"
 614 "    LDR     R0, [R7, #0x1C] \n"
 615 "    MOV     R2, R8 \n"
 616 "    MOV     R1, #0x80 \n"
 617 "    BL      sub_FF8916DC /*_WaitForAllEventFlag*/ \n"
 618 "    TST     R0, #1 \n"
 619 "    LDRNE   R1, =0x1089 \n"
 620 "    BNE     loc_FF8D09E0 \n"
 621 
 622 "loc_FF8D0910:\n"
 623 "    LDR     R1, [SP, #0x1C] \n"
 624 "    LDR     R0, [R1, #0x90] \n"
 625 "    LDR     R1, [R1, #0x8C] \n"
 626 "    BLX     R1 \n"
 627 "    B       loc_FF8D0EA8 \n"
 628 
 629 "loc_FF8D0924:\n"
 630 "    CMP     R1, #0x28 \n"
 631 "    BNE     loc_FF8D096C \n"
 632 "    ADD     R1, SP, #0xC \n"
 633 "    BL      sub_FF8D07CC \n"
 634 "    LDR     R0, [R7, #0x1C] \n"
 635 "    MOV     R1, #0x100 \n"
 636 "    BL      sub_FF8917D0 /*_ClearEventFlag*/ \n"
 637 "    LDR     R0, =0xFF8CC68C \n"
 638 "    MOV     R1, #0x100 \n"
 639 "    BL      sub_FF980118 \n"
 640 "    LDR     R0, [R7, #0x1C] \n"
 641 "    MOV     R2, R8 \n"
 642 "    MOV     R1, #0x100 \n"
 643 "    BL      sub_FF8916DC /*_WaitForAllEventFlag*/ \n"
 644 "    TST     R0, #1 \n"
 645 "    BEQ     loc_FF8D0910 \n"
 646 "    LDR     R1, =0x1093 \n"
 647 "    B       loc_FF8D09E0 \n"
 648 
 649 "loc_FF8D096C:\n"
 650 "    CMP     R1, #0x29 \n"
 651 "    BNE     loc_FF8D0984 \n"
 652 
 653 "loc_FF8D0974:\n"
 654 "    LDR     R0, [SP, #0x1C] \n"
 655 "    ADD     R1, SP, #0xC \n"
 656 "    BL      sub_FF8D07CC \n"
 657 "    B       loc_FF8D0910 \n"
 658 
 659 "loc_FF8D0984:\n"
 660 "    CMP     R1, #0x2C \n"
 661 "    BNE     loc_FF8D099C \n"
 662 "    BL      sub_FF8BEBD0 \n"
 663 "    BL      sub_FF8BF7DC \n"
 664 "    BL      sub_FF8BF348 \n"
 665 "    B       loc_FF8D0910 \n"
 666 
 667 "loc_FF8D099C:\n"
 668 "    CMP     R1, #0x2D \n"
 669 "    BNE     loc_FF8D09EC \n"
 670 "    LDR     R0, [R7, #0x1C] \n"
 671 "    MOV     R1, #4 \n"
 672 "    BL      sub_FF8917D0 /*_ClearEventFlag*/ \n"
 673 "    LDR     R1, =0xFF8CC6AC \n"
 674 "    LDR     R0, =0xFFFFF400 \n"
 675 "    MOV     R2, #4 \n"
 676 "    BL      sub_FF8BE64C \n"
 677 "    BL      sub_FF8BE8D4 \n"
 678 "    LDR     R0, [R7, #0x1C] \n"
 679 "    MOV     R2, R8 \n"
 680 "    MOV     R1, #4 \n"
 681 "    BL      sub_FF8915F8 /*_WaitForAnyEventFlag*/ \n"
 682 "    TST     R0, #1 \n"
 683 "    BEQ     loc_FF8D0910 \n"
 684 "    LDR     R1, =0x10BB \n"
 685 
 686 "loc_FF8D09E0:\n"
 687 "    LDR     R0, =0xFF8CCD34 /*'ExpDrv.c'*/ \n"
 688 "    BL      _DebugAssert \n"
 689 "    B       loc_FF8D0910 \n"
 690 
 691 "loc_FF8D09EC:\n"
 692 "    LDR     R0, [SP, #0x1C] \n"
 693 "    MOV     R4, #1 \n"
 694 "    LDR     R1, [R0] \n"
 695 "    CMP     R1, #0x12 \n"
 696 "    CMPNE   R1, #0x13 \n"
 697 "    BNE     loc_FF8D0A5C \n"
 698 "    LDR     R1, [R0, #0x7C] \n"
 699 "    ADD     R1, R1, R1, LSL#1 \n"
 700 "    ADD     R1, R0, R1, LSL#2 \n"
 701 "    SUB     R1, R1, #8 \n"
 702 "    LDMIA   R1, {R2-R4} \n"
 703 "    STMIA   R6, {R2-R4} \n"
 704 "    BL      sub_FF8CEF54 \n"
 705 "    LDR     R0, [SP, #0x1C] \n"
 706 "    LDR     R1, [R0, #0x7C] \n"
 707 "    LDR     R3, [R0, #0x8C] \n"
 708 "    LDR     R2, [R0, #0x90] \n"
 709 "    ADD     R0, R0, #4 \n"
 710 "    BLX     R3 \n"
 711 "    LDR     R0, [SP, #0x1C] \n"
 712 "    BL      sub_FF8D1FCC \n"
 713 "    LDR     R0, [SP, #0x1C] \n"
 714 "    LDR     R1, [R0, #0x7C] \n"
 715 "    LDR     R3, [R0, #0x94] \n"
 716 "    LDR     R2, [R0, #0x98] \n"
 717 "    ADD     R0, R0, #4 \n"
 718 "    BLX     R3 \n"
 719 "    B       loc_FF8D0DE4 \n"
 720 
 721 "loc_FF8D0A5C:\n"
 722 "    CMP     R1, #0x14 \n"
 723 "    CMPNE   R1, #0x15 \n"
 724 "    CMPNE   R1, #0x16 \n"
 725 "    CMPNE   R1, #0x17 \n"
 726 "    BNE     loc_FF8D0B14 \n"
 727 "    ADD     R3, SP, #0xC \n"
 728 "    MOV     R2, SP \n"
 729 "    ADD     R1, SP, #0x10 \n"
 730 "    BL      sub_FF8CF1C0 \n"
 731 "    CMP     R0, #1 \n"
 732 "    MOV     R4, R0 \n"
 733 "    CMPNE   R4, #5 \n"
 734 "    BNE     loc_FF8D0AB0 \n"
 735 "    LDR     R0, [SP, #0x1C] \n"
 736 "    MOV     R2, R4 \n"
 737 "    LDR     R1, [R0, #0x7C]! \n"
 738 "    LDR     R12, [R0, #0x10]! \n"
 739 "    LDR     R3, [R0, #4] \n"
 740 "    MOV     R0, SP \n"
 741 "    BLX     R12 \n"
 742 "    B       loc_FF8D0AE8 \n"
 743 
 744 "loc_FF8D0AB0:\n"
 745 "    LDR     R0, [SP, #0x1C] \n"
 746 "    CMP     R4, #2 \n"
 747 "    LDR     R3, [R0, #0x90] \n"
 748 "    CMPNE   R4, #6 \n"
 749 "    BNE     loc_FF8D0AFC \n"
 750 "    LDR     R12, [R0, #0x8C] \n"
 751 "    MOV     R0, SP \n"
 752 "    MOV     R2, R4 \n"
 753 "    MOV     R1, #1 \n"
 754 "    BLX     R12 \n"
 755 "    LDR     R0, [SP, #0x1C] \n"
 756 "    MOV     R2, SP \n"
 757 "    ADD     R1, SP, #0x10 \n"
 758 "    BL      sub_FF8D0518 \n"
 759 
 760 "loc_FF8D0AE8:\n"
 761 "    LDR     R0, [SP, #0x1C] \n"
 762 "    LDR     R2, [SP, #0xC] \n"
 763 "    MOV     R1, R4 \n"
 764 "    BL      sub_FF8D076C \n"
 765 "    B       loc_FF8D0DE4 \n"
 766 
 767 "loc_FF8D0AFC:\n"
 768 "    LDR     R1, [R0, #0x7C] \n"
 769 "    LDR     R12, [R0, #0x8C] \n"
 770 "    ADD     R0, R0, #4 \n"
 771 "    MOV     R2, R4 \n"
 772 "    BLX     R12 \n"
 773 "    B       loc_FF8D0DE4 \n"
 774 
 775 "loc_FF8D0B14:\n"
 776 "    CMP     R1, #0x23 \n"
 777 "    CMPNE   R1, #0x24 \n"
 778 "    BNE     loc_FF8D0B60 \n"
 779 "    LDR     R1, [R0, #0x7C] \n"
 780 "    ADD     R1, R1, R1, LSL#1 \n"
 781 "    ADD     R1, R0, R1, LSL#2 \n"
 782 "    SUB     R1, R1, #8 \n"
 783 "    LDMIA   R1, {R2-R4} \n"
 784 "    STMIA   R6, {R2-R4} \n"
 785 "    BL      sub_FF8CDFD8 \n"
 786 "    LDR     R0, [SP, #0x1C] \n"
 787 "    LDR     R1, [R0, #0x7C] \n"
 788 "    LDR     R3, [R0, #0x8C] \n"
 789 "    LDR     R2, [R0, #0x90] \n"
 790 "    ADD     R0, R0, #4 \n"
 791 "    BLX     R3 \n"
 792 "    LDR     R0, [SP, #0x1C] \n"
 793 "    BL      sub_FF8CE424 \n"
 794 "    B       loc_FF8D0DE4 \n"
 795 
 796 "loc_FF8D0B60:\n"
 797 "    ADD     R1, R0, #4 \n"
 798 "    LDMIA   R1, {R2,R3,R12} \n"
 799 "    STMIA   R6, {R2,R3,R12} \n"
 800 "    LDR     R1, [R0] \n"
 801 "    CMP     R1, #0x26 \n"
 802 "    ADDLS   PC, PC, R1, LSL#2 \n"
 803 "    B       loc_FF8D0DC4 \n"
 804 "    B       loc_FF8D0C18 \n"
 805 "    B       loc_FF8D0C18 \n"
 806 "    B       loc_FF8D0C20 \n"
 807 "    B       loc_FF8D0C28 \n"
 808 "    B       loc_FF8D0C28 \n"
 809 "    B       loc_FF8D0C28 \n"
 810 "    B       loc_FF8D0C18 \n"
 811 "    B       loc_FF8D0C20 \n"
 812 "    B       loc_FF8D0C28 \n"
 813 "    B       loc_FF8D0C28 \n"
 814 "    B       loc_FF8D0C40 \n"
 815 "    B       loc_FF8D0C40 \n"
 816 "    B       loc_FF8D0DB0 \n"
 817 "    B       loc_FF8D0DB8 \n"
 818 "    B       loc_FF8D0DB8 \n"
 819 "    B       loc_FF8D0DB8 \n"
 820 "    B       loc_FF8D0DB8 \n"
 821 "    B       loc_FF8D0DC0 \n"
 822 "    B       loc_FF8D0DC4 \n"
 823 "    B       loc_FF8D0DC4 \n"
 824 "    B       loc_FF8D0DC4 \n"
 825 "    B       loc_FF8D0DC4 \n"
 826 "    B       loc_FF8D0DC4 \n"
 827 "    B       loc_FF8D0DC4 \n"
 828 "    B       loc_FF8D0C30 \n"
 829 "    B       loc_FF8D0C38 \n"
 830 "    B       loc_FF8D0C38 \n"
 831 "    B       loc_FF8D0C4C \n"
 832 "    B       loc_FF8D0C4C \n"
 833 "    B       loc_FF8D0C54 \n"
 834 "    B       loc_FF8D0C8C \n"
 835 "    B       loc_FF8D0CC4 \n"
 836 "    B       loc_FF8D0D60 \n"
 837 "    B       loc_FF8D0D98 \n"
 838 "    B       loc_FF8D0D98 \n"
 839 "    B       loc_FF8D0DC4 \n"
 840 "    B       loc_FF8D0DC4 \n"
 841 "    B       loc_FF8D0DA0 \n"
 842 "    B       loc_FF8D0DA8 \n"
 843 
 844 "loc_FF8D0C18:\n"
 845 "    BL      sub_FF8CCBBC \n"
 846 "    B       loc_FF8D0DC4 \n"
 847 
 848 "loc_FF8D0C20:\n"
 849 "    BL      sub_FF8CCE58 \n"
 850 "    B       loc_FF8D0DC4 \n"
 851 
 852 "loc_FF8D0C28:\n"
 853 "    BL      sub_FF8CD080 \n"
 854 "    B       loc_FF8D0DC4 \n"
 855 
 856 "loc_FF8D0C30:\n"
 857 "    BL      sub_FF8CD358 \n"
 858 "    B       loc_FF8D0DC4 \n"
 859 
 860 "loc_FF8D0C38:\n"
 861 "    BL      sub_FF8CD570 \n"
 862 "    B       loc_FF8D0DC4 \n"
 863 
 864 "loc_FF8D0C40:\n"
 865 "    BL      sub_FF8CD894_my \n"  // --> Patched. Old value = 0xFF8CD894.
 866 "    MOV     R4, #0 \n"
 867 "    B       loc_FF8D0DC4 \n"
 868 
 869 "loc_FF8D0C4C:\n"
 870 "    BL      sub_FF8CD9DC \n"
 871 "    B       loc_FF8D0DC4 \n"
 872 
 873 "loc_FF8D0C54:\n"
 874 "    LDRH    R1, [R0, #4] \n"
 875 "    STRH    R1, [SP, #0x10] \n"
 876 "    LDRH    R1, [R5, #2] \n"
 877 "    STRH    R1, [SP, #0x12] \n"
 878 "    LDRH    R1, [R5, #4] \n"
 879 "    STRH    R1, [SP, #0x14] \n"
 880 "    LDRH    R1, [R5, #6] \n"
 881 "    STRH    R1, [SP, #0x16] \n"
 882 "    LDRH    R1, [R0, #0xC] \n"
 883 "    STRH    R1, [SP, #0x18] \n"
 884 "    LDRH    R1, [R5, #0xA] \n"
 885 "    STRH    R1, [SP, #0x1A] \n"
 886 "    BL      sub_FF8D1CC4 \n"
 887 "    B       loc_FF8D0DC4 \n"
 888 
 889 "loc_FF8D0C8C:\n"
 890 "    LDRH    R1, [R0, #4] \n"
 891 "    STRH    R1, [SP, #0x10] \n"
 892 "    LDRH    R1, [R5, #2] \n"
 893 "    STRH    R1, [SP, #0x12] \n"
 894 "    LDRH    R1, [R5, #4] \n"
 895 "    STRH    R1, [SP, #0x14] \n"
 896 "    LDRH    R1, [R5, #6] \n"
 897 "    STRH    R1, [SP, #0x16] \n"
 898 "    LDRH    R1, [R5, #8] \n"
 899 "    STRH    R1, [SP, #0x18] \n"
 900 "    LDRH    R1, [R5, #0xA] \n"
 901 "    STRH    R1, [SP, #0x1A] \n"
 902 "    BL      sub_FF8D1DCC \n"
 903 "    B       loc_FF8D0DC4 \n"
 904 
 905 "loc_FF8D0CC4:\n"
 906 "    LDRH    R1, [R5] \n"
 907 "    STRH    R1, [SP, #0x10] \n"
 908 "    LDRH    R1, [R0, #6] \n"
 909 "    STRH    R1, [SP, #0x12] \n"
 910 "    LDRH    R1, [R5, #4] \n"
 911 "    STRH    R1, [SP, #0x14] \n"
 912 "    LDRH    R1, [R5, #6] \n"
 913 "    STRH    R1, [SP, #0x16] \n"
 914 "    LDRH    R1, [R5, #8] \n"
 915 "    STRH    R1, [SP, #0x18] \n"
 916 "    LDRH    R1, [R5, #0xA] \n"
 917 "    STRH    R1, [SP, #0x1A] \n"
 918 "    BL      sub_FF8D1E80 \n"
 919 "    B       loc_FF8D0DC4 \n"
 920 
 921 "loc_FF8D0D60:\n"
 922 "    LDRH    R1, [R5] \n"
 923 "    STRH    R1, [SP, #0x10] \n"
 924 "    LDRH    R1, [R5, #2] \n"
 925 "    STRH    R1, [SP, #0x12] \n"
 926 "    LDRH    R1, [R5, #4] \n"
 927 "    STRH    R1, [SP, #0x14] \n"
 928 "    LDRH    R1, [R5, #6] \n"
 929 "    STRH    R1, [SP, #0x16] \n"
 930 "    LDRH    R1, [R0, #0xC] \n"
 931 "    STRH    R1, [SP, #0x18] \n"
 932 "    LDRH    R1, [R5, #0xA] \n"
 933 "    STRH    R1, [SP, #0x1A] \n"
 934 "    BL      sub_FF8D1F28 \n"
 935 "    B       loc_FF8D0DC4 \n"
 936 
 937 "loc_FF8D0D98:\n"
 938 "    BL      sub_FF8CDDB0 \n"
 939 "    B       loc_FF8D0DC4 \n"
 940 
 941 "loc_FF8D0DA0:\n"
 942 "    BL      sub_FF8CE528 \n"
 943 "    B       loc_FF8D0DC4 \n"
 944 
 945 "loc_FF8D0DA8:\n"
 946 "    BL      sub_FF8CE7C4 \n"
 947 "    B       loc_FF8D0DC4 \n"
 948 
 949 "loc_FF8D0DB0:\n"
 950 "    BL      sub_FF8CE9A4 \n"
 951 "    B       loc_FF8D0DC4 \n"
 952 
 953 "loc_FF8D0DB8:\n"
 954 "    BL      sub_FF8CEB60 \n"
 955 "    B       loc_FF8D0DC4 \n"
 956 
 957 "loc_FF8D0DC0:\n"
 958 "    BL      sub_FF8CED4C \n"
 959 
 960 "loc_FF8D0DC4:\n"
 961 "    LDR     R0, [SP, #0x1C] \n"
 962 "    LDR     R1, [R0, #0x7C] \n"
 963 "    LDR     R3, [R0, #0x8C] \n"
 964 "    LDR     R2, [R0, #0x90] \n"
 965 "    ADD     R0, R0, #4 \n"
 966 "    BLX     R3 \n"
 967 "    CMP     R4, #1 \n"
 968 "    BNE     loc_FF8D0E2C \n"
 969 
 970 "loc_FF8D0DE4:\n"
 971 "    LDR     R0, [SP, #0x1C] \n"
 972 "    MOV     R2, #0xC \n"
 973 "    LDR     R1, [R0, #0x7C] \n"
 974 "    ADD     R1, R1, R1, LSL#1 \n"
 975 "    ADD     R0, R0, R1, LSL#2 \n"
 976 "    SUB     R4, R0, #8 \n"
 977 "    LDR     R0, =0x57870 \n"
 978 "    ADD     R1, SP, #0x10 \n"
 979 "    BL      sub_FFB924F0 \n"
 980 "    LDR     R0, =0x5787C \n"
 981 "    MOV     R2, #0xC \n"
 982 "    ADD     R1, SP, #0x10 \n"
 983 "    BL      sub_FFB924F0 \n"
 984 "    LDR     R0, =0x57888 \n"
 985 "    MOV     R2, #0xC \n"
 986 "    MOV     R1, R4 \n"
 987 "    BL      sub_FFB924F0 \n"
 988 "    B       loc_FF8D0EA8 \n"
 989 
 990 "loc_FF8D0E2C:\n"
 991 "    LDR     R0, [SP, #0x1C] \n"
 992 "    MOV     R3, #1 \n"
 993 "    LDR     R0, [R0] \n"
 994 "    CMP     R0, #0xB \n"
 995 "    BNE     loc_FF8D0E74 \n"
 996 "    MOV     R2, #0 \n"
 997 "    STRD    R2, [SP] \n"
 998 "    MOV     R2, #1 \n"
 999 "    MOV     R1, #1 \n"
1000 "    MOV     R0, #0 \n"
1001 "    BL      sub_FF8CC99C \n"
1002 "    MOV     R3, #1 \n"
1003 "    MOV     R2, #0 \n"
1004 "    STRD    R2, [SP] \n"
1005 "    MOV     R2, #1 \n"
1006 "    MOV     R1, #1 \n"
1007 "    MOV     R0, #0 \n"
1008 "    B       loc_FF8D0EA4 \n"
1009 
1010 "loc_FF8D0E74:\n"
1011 "    MOV     R2, #1 \n"
1012 "    STRD    R2, [SP] \n"
1013 "    MOV     R3, #1 \n"
1014 "    MOV     R1, #1 \n"
1015 "    MOV     R0, #1 \n"
1016 "    BL      sub_FF8CC99C \n"
1017 "    MOV     R3, #1 \n"
1018 "    MOV     R2, #1 \n"
1019 "    MOV     R1, #1 \n"
1020 "    MOV     R0, #1 \n"
1021 "    STR     R3, [SP] \n"
1022 "    STR     R3, [SP, #4] \n"
1023 
1024 "loc_FF8D0EA4:\n"
1025 "    BL      sub_FF8CCB04 \n"
1026 
1027 "loc_FF8D0EA8:\n"
1028 "    LDR     R0, [SP, #0x1C] \n"
1029 "    BL      sub_FF8D1BC0 \n"
1030 "    B       loc_FF8D083C \n"
1031 );
1032 }
1033 
1034 /*************************************************************/
1035 //** sub_FF8CD894_my @ 0xFF8CD894 - 0xFF8CD95C, length=51
1036 void __attribute__((naked,noinline)) sub_FF8CD894_my() {
1037 asm volatile (
1038 "    STMFD   SP!, {R4-R8,LR} \n"
1039 "    LDR     R7, =0x5094 \n"
1040 "    MOV     R4, R0 \n"
1041 "    LDR     R0, [R7, #0x1C] \n"
1042 "    MOV     R1, #0x3E \n"
1043 "    BL      sub_FF8917D0 /*_ClearEventFlag*/ \n"
1044 "    LDRSH   R0, [R4, #4] \n"
1045 "    MOV     R2, #0 \n"
1046 "    MOV     R1, #0 \n"
1047 "    BL      sub_FF8CC700 \n"
1048 "    MOV     R5, R0 \n"
1049 "    LDRSH   R0, [R4, #6] \n"
1050 "    BL      sub_FF8CC810 \n"
1051 "    LDRSH   R0, [R4, #8] \n"
1052 "    BL      sub_FF8CC868 \n"
1053 "    LDRSH   R0, [R4, #0xA] \n"
1054 "    BL      sub_FF8CC8C0 \n"
1055 "    LDRSH   R0, [R4, #0xC] \n"
1056 "    MOV     R1, #0 \n"
1057 "    BL      sub_FF8CC918 \n"
1058 "    MOV     R6, R0 \n"
1059 "    LDRSH   R0, [R4, #0xE] \n"
1060 "    BL      sub_FF8D1C64 \n"
1061 "    LDR     R0, [R4] \n"
1062 "    LDR     R8, =0x57888 \n"
1063 "    CMP     R0, #0xB \n"
1064 "    MOVEQ   R5, #0 \n"
1065 "    MOVEQ   R6, #0 \n"
1066 "    BEQ     loc_FF8CD930 \n"
1067 "    CMP     R5, #1 \n"
1068 "    BNE     loc_FF8CD930 \n"
1069 "    LDRSH   R0, [R4, #4] \n"
1070 "    LDR     R1, =0xFF8CC66C \n"
1071 "    MOV     R2, #2 \n"
1072 "    BL      sub_FF97FA34 \n"
1073 "    STRH    R0, [R4, #4] \n"
1074 "    MOV     R0, #0 \n"
1075 "    STR     R0, [R7, #0x28] \n"
1076 "    B       loc_FF8CD938 \n"
1077 
1078 "loc_FF8CD930:\n"
1079 "    LDRH    R0, [R8] \n"
1080 "    STRH    R0, [R4, #4] \n"
1081 
1082 "loc_FF8CD938:\n"
1083 "    CMP     R6, #1 \n"
1084 "    LDRNEH  R0, [R8, #8] \n"
1085 "    BNE     loc_FF8CD954 \n"
1086 "    LDRSH   R0, [R4, #0xC] \n"
1087 "    LDR     R1, =0xFF8CC6F0 \n"
1088 "    MOV     R2, #0x20 \n"
1089 "    BL      sub_FF8D1C80 \n"
1090 
1091 "loc_FF8CD954:\n"
1092 "    STRH    R0, [R4, #0xC] \n"
1093 "    LDRSH   R0, [R4, #6] \n"
1094 "    BL      sub_FF8BE940_my \n"  // --> Patched. Old value = 0xFF8BE940.
1095 "    LDR     PC, =0xFF8CD960 \n"  // Continue in firmware
1096 );
1097 }
1098 
1099 /*************************************************************/
1100 //** sub_FF8BE940_my @ 0xFF8BE940 - 0xFF8BE980, length=17
1101 void __attribute__((naked,noinline)) sub_FF8BE940_my() {
1102 asm volatile (
1103 "    STMFD   SP!, {R4-R6,LR} \n"
1104 "    LDR     R5, =0x4D70 \n"
1105 "    MOV     R4, R0 \n"
1106 "    LDR     R0, [R5, #4] \n"
1107 "    CMP     R0, #1 \n"
1108 "    LDRNE   R1, =0x146 \n"
1109 "    LDRNE   R0, =0xFF8BE744 /*'Shutter.c'*/ \n"
1110 "    BLNE    _DebugAssert \n"
1111 "    CMN     R4, #0xC00 \n"
1112 "    LDREQSH R4, [R5, #2] \n"
1113 "    CMN     R4, #0xC00 \n"
1114 "    MOVEQ   R1, #0x14C \n"
1115 "    LDREQ   R0, =0xFF8BE744 /*'Shutter.c'*/ \n"
1116 "    STRH    R4, [R5, #2] \n"
1117 "    BLEQ    _DebugAssert \n"
1118 "    MOV     R0, R4 \n"
1119 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
1120 "    LDR     PC, =0xFF8BE984 \n"  // Continue in firmware
1121 );
1122 }

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