root/platform/sx220hs/sub/101b/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF18D790_my
  3. exp_drv_task
  4. sub_FF0C05C4_my
  5. sub_FF0B0788_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 #define PAUSE_FOR_FILE_COUNTER 100  // 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 @ 0xFF077628 - 0xFF07791C, length=190
  16 void __attribute__((naked,noinline)) capt_seq_task() {
  17 asm volatile (
  18 "    STMFD   SP!, {R3-R9,LR} \n"
  19 "    LDR     R5, =0x3EB1C \n"
  20 "    LDR     R7, =0x3E94 \n"
  21 "    MOV     R6, #0 \n"
  22 
  23 "loc_FF077638:\n"
  24 "    LDR     R0, [R7, #4] \n"
  25 "    MOV     R2, #0 \n"
  26 "    MOV     R1, SP \n"
  27 "    BL      sub_FF02AD50 /*_ReceiveMessageQueue*/ \n"
  28 "    TST     R0, #1 \n"
  29 "    BEQ     loc_FF077664 \n"
  30 "    LDR     R1, =0x47A \n"
  31 "    LDR     R0, =0xFF077054 /*'SsShootTask.c'*/ \n"
  32 "    BL      _DebugAssert \n"
  33 "    BL      _ExitTask \n"
  34 "    LDMFD   SP!, {R3-R9,PC} \n"
  35 
  36 "loc_FF077664:\n"
  37 "    LDR     R0, [SP] \n"
  38 "    LDR     R1, [R0] \n"
  39 "    CMP     R1, #0x27 \n"
  40 "    ADDCC   PC, PC, R1, LSL#2 \n"
  41 "    B       loc_FF0778E4 \n"
  42 "    B       loc_FF077714 \n"
  43 "    B       loc_FF07772C \n"
  44 "    B       loc_FF077764 \n"
  45 "    B       loc_FF077778 \n"
  46 "    B       loc_FF077770 \n"
  47 "    B       loc_FF077784 \n"
  48 "    B       loc_FF07778C \n"
  49 "    B       loc_FF077794 \n"
  50 "    B       loc_FF0777B0 \n"
  51 "    B       loc_FF0777F0 \n"
  52 "    B       loc_FF0777BC \n"
  53 "    B       loc_FF0777C8 \n"
  54 "    B       loc_FF0777D0 \n"
  55 "    B       loc_FF0777D8 \n"
  56 "    B       loc_FF0777E0 \n"
  57 "    B       loc_FF0777E8 \n"
  58 "    B       loc_FF0777F8 \n"
  59 "    B       loc_FF077800 \n"
  60 "    B       loc_FF077808 \n"
  61 "    B       loc_FF077810 \n"
  62 "    B       loc_FF077818 \n"
  63 "    B       loc_FF077820 \n"
  64 "    B       loc_FF077828 \n"
  65 "    B       loc_FF077830 \n"
  66 "    B       loc_FF077838 \n"
  67 "    B       loc_FF077840 \n"
  68 "    B       loc_FF07784C \n"
  69 "    B       loc_FF077854 \n"
  70 "    B       loc_FF077860 \n"
  71 "    B       loc_FF077868 \n"
  72 "    B       loc_FF077870 \n"
  73 "    B       loc_FF077878 \n"
  74 "    B       loc_FF077880 \n"
  75 "    B       loc_FF077888 \n"
  76 "    B       loc_FF077890 \n"
  77 "    B       loc_FF077898 \n"
  78 "    B       loc_FF0778A0 \n"
  79 "    B       loc_FF0778AC \n"
  80 "    B       loc_FF0778F0 \n"
  81 
  82 "loc_FF077714:\n"
  83 "    BL      shooting_expo_iso_override\n"      // added
  84 "    BL      sub_FF077F04 \n"
  85 "    BL      shooting_expo_param_override\n"    // added
  86 "    BL      sub_FF074BC4 \n"
  87 "    MOV     R0, #0\n"                          // added
  88 "    STR     R0, [R5,#0x28]\n"                  // added, fixes overrides behavior at short shutter press
  89 //"  LDR     R0, [R5, #0x28] \n"  // above patch makes these three lines redundant
  90 //"  CMP     R0, #0 \n"
  91 //"  BLNE    _sub_FF18D9B4 \n"
  92 "    B       loc_FF0778F0 \n"
  93 
  94 "loc_FF07772C:\n"
  95 "    LDR     R8, [R0, #0xC] \n"
  96 "    MOV     R0, R8 \n"
  97 "    BL      sub_FF18D790_my \n"  // --> Patched. Old value = 0xFF18D790.
  98 "    BL      capt_seq_hook_raw_here\n"      // added
  99 "    MOV     R4, R0 \n"
 100 "    MOV     R2, R8 \n"
 101 "    MOV     R1, #1 \n"
 102 "    BL      sub_FF07564C \n"
 103 "    TST     R4, #1 \n"
 104 "    BNE     loc_FF07775C \n"
 105 "    MOV     R0, R8 \n"
 106 "    BL      sub_FF18D17C \n"
 107 "    B       loc_FF0778F0 \n"
 108 
 109 "loc_FF07775C:\n"
 110 "    BL      sub_FF18D14C \n"
 111 "    B       loc_FF0778F0 \n"
 112 
 113 "loc_FF077764:\n"
 114 "    MOV     R0, #1 \n"
 115 "    BL      sub_FF0781E4 \n"
 116 "    B       loc_FF0778F0 \n"
 117 
 118 "loc_FF077770:\n"
 119 "    BL      sub_FF077B40 \n"
 120 "    B       loc_FF07777C \n"
 121 
 122 "loc_FF077778:\n"
 123 "    BL      sub_FF077EE4 \n"
 124 
 125 "loc_FF07777C:\n"
 126 "    STR     R6, [R5, #0x28] \n"
 127 "    B       loc_FF0778F0 \n"
 128 
 129 "loc_FF077784:\n"
 130 "    BL      sub_FF077EEC \n"
 131 "    B       loc_FF0778F0 \n"
 132 
 133 "loc_FF07778C:\n"
 134 "    BL      sub_FF0780D8 \n"
 135 "    B       loc_FF0777B4 \n"
 136 
 137 "loc_FF077794:\n"
 138 "    LDR     R4, [R0, #0xC] \n"
 139 "    MOV     R0, R4 \n"
 140 "    BL      sub_FF18DA08 \n"
 141 "    MOV     R2, R4 \n"
 142 "    MOV     R1, #9 \n"
 143 "    BL      sub_FF07564C \n"
 144 "    B       loc_FF0778F0 \n"
 145 
 146 "loc_FF0777B0:\n"
 147 "    BL      sub_FF07814C \n"
 148 
 149 "loc_FF0777B4:\n"
 150 "    BL      sub_FF074BC4 \n"
 151 "    B       loc_FF0778F0 \n"
 152 
 153 "loc_FF0777BC:\n"
 154 "    LDR     R0, [R5, #0x58] \n"
 155 "    BL      sub_FF078A6C \n"
 156 "    B       loc_FF0778F0 \n"
 157 
 158 "loc_FF0777C8:\n"
 159 "    BL      sub_FF078D38 \n"
 160 "    B       loc_FF0778F0 \n"
 161 
 162 "loc_FF0777D0:\n"
 163 "    BL      sub_FF078D9C \n"
 164 "    B       loc_FF0778F0 \n"
 165 
 166 "loc_FF0777D8:\n"
 167 "    BL      sub_FF078F90 \n"
 168 "    B       loc_FF0778F0 \n"
 169 
 170 "loc_FF0777E0:\n"
 171 "    BL      sub_FF0793E0 \n"
 172 "    B       loc_FF0778F0 \n"
 173 
 174 "loc_FF0777E8:\n"
 175 "    BL      sub_FF079490 \n"
 176 "    B       loc_FF0778F0 \n"
 177 
 178 "loc_FF0777F0:\n"
 179 "    BL      sub_FF077EE4 \n"
 180 "    B       loc_FF0778F0 \n"
 181 
 182 "loc_FF0777F8:\n"
 183 "    BL      sub_FF18C288 \n"
 184 "    B       loc_FF0778F0 \n"
 185 
 186 "loc_FF077800:\n"
 187 "    BL      sub_FF18C49C \n"
 188 "    B       loc_FF0778F0 \n"
 189 
 190 "loc_FF077808:\n"
 191 "    BL      sub_FF18C534 \n"
 192 "    B       loc_FF0778F0 \n"
 193 
 194 "loc_FF077810:\n"
 195 "    BL      sub_FF18C620 \n"
 196 "    B       loc_FF0778F0 \n"
 197 
 198 "loc_FF077818:\n"
 199 "    BL      sub_FF18C6F0 \n"
 200 "    B       loc_FF0778F0 \n"
 201 
 202 "loc_FF077820:\n"
 203 "    MOV     R0, #0 \n"
 204 "    B       loc_FF077844 \n"
 205 
 206 "loc_FF077828:\n"
 207 "    BL      sub_FF18CB78 \n"
 208 "    B       loc_FF0778F0 \n"
 209 
 210 "loc_FF077830:\n"
 211 "    BL      sub_FF18CC10 \n"
 212 "    B       loc_FF0778F0 \n"
 213 
 214 "loc_FF077838:\n"
 215 "    BL      sub_FF18CCF0 \n"
 216 "    B       loc_FF0778F0 \n"
 217 
 218 "loc_FF077840:\n"
 219 "    MOV     R0, #1 \n"
 220 
 221 "loc_FF077844:\n"
 222 "    BL      sub_FF18CA10 \n"
 223 "    B       loc_FF0778F0 \n"
 224 
 225 "loc_FF07784C:\n"
 226 "    BL      sub_FF078410 \n"
 227 "    B       loc_FF0778F0 \n"
 228 
 229 "loc_FF077854:\n"
 230 "    BL      sub_FF078450 \n"
 231 "    BL      sub_FF18E6BC \n"
 232 "    B       loc_FF0778F0 \n"
 233 
 234 "loc_FF077860:\n"
 235 "    BL      sub_FF18C874 \n"
 236 "    B       loc_FF0778F0 \n"
 237 
 238 "loc_FF077868:\n"
 239 "    BL      sub_FF18C940 \n"
 240 "    B       loc_FF0778F0 \n"
 241 
 242 "loc_FF077870:\n"
 243 "    BL      sub_FF18E788 \n"
 244 "    B       loc_FF0778F0 \n"
 245 
 246 "loc_FF077878:\n"
 247 "    BL      sub_FF027EA8 \n"
 248 "    B       loc_FF0778F0 \n"
 249 
 250 "loc_FF077880:\n"
 251 "    BL      sub_FF07B8D8 \n"
 252 "    B       loc_FF0778F0 \n"
 253 
 254 "loc_FF077888:\n"
 255 "    BL      sub_FF07B95C \n"
 256 "    B       loc_FF0778F0 \n"
 257 
 258 "loc_FF077890:\n"
 259 "    BL      sub_FF18CE28 \n"
 260 "    B       loc_FF0778F0 \n"
 261 
 262 "loc_FF077898:\n"
 263 "    BL      sub_FF18CE8C \n"
 264 "    B       loc_FF0778F0 \n"
 265 
 266 "loc_FF0778A0:\n"
 267 "    BL      sub_FF07B9B8 \n"
 268 "    BL      sub_FF07B978 \n"
 269 "    B       loc_FF0778F0 \n"
 270 
 271 "loc_FF0778AC:\n"
 272 "    MOV     R0, #1 \n"
 273 "    BL      sub_FF18E1FC \n"
 274 "    MOV     R0, #1 \n"
 275 "    BL      sub_FF18E330 \n"
 276 "    LDRH    R0, [R5, #0xA0] \n"
 277 "    CMP     R0, #4 \n"
 278 "    LDRNEH  R0, [R5] \n"
 279 "    SUBNE   R1, R0, #0x4200 \n"
 280 "    SUBNES  R1, R1, #0x2A \n"
 281 "    BNE     loc_FF0778F0 \n"
 282 "    BL      sub_FF07B95C \n"
 283 "    BL      sub_FF07BFA0 \n"
 284 "    BL      sub_FF07BDDC \n"
 285 "    B       loc_FF0778F0 \n"
 286 
 287 "loc_FF0778E4:\n"
 288 "    LDR     R1, =0x5DB \n"
 289 "    LDR     R0, =0xFF077054 /*'SsShootTask.c'*/ \n"
 290 "    BL      _DebugAssert \n"
 291 
 292 "loc_FF0778F0:\n"
 293 "    LDR     R0, [SP] \n"
 294 "    LDR     R1, [R0, #4] \n"
 295 "    LDR     R0, [R7] \n"
 296 "    BL      sub_FF0826C4 /*_SetEventFlag*/ \n"
 297 "    LDR     R4, [SP] \n"
 298 "    LDR     R0, [R4, #8] \n"
 299 "    CMP     R0, #0 \n"
 300 "    LDREQ   R0, =0xFF077054 /*'SsShootTask.c'*/ \n"
 301 "    MOVEQ   R1, #0x118 \n"
 302 "    BLEQ    _DebugAssert \n"
 303 "    STR     R6, [R4, #8] \n"
 304 "    B       loc_FF077638 \n"
 305 );
 306 }
 307 
 308 /*************************************************************/
 309 //** sub_FF18D790_my @ 0xFF18D790 - 0xFF18D9B0, length=137
 310 void __attribute__((naked,noinline)) sub_FF18D790_my() {
 311 asm volatile (
 312 "    STMFD   SP!, {R3-R7,LR} \n"
 313 "    LDR     R5, =0x3EB1C \n"
 314 "    MOV     R4, R0 \n"
 315 "    LDR     R0, [R5, #0x28] \n"
 316 "    LDR     R6, =0x420C \n"
 317 "    CMP     R0, #0 \n"
 318 "    MOV     R7, #0 \n"
 319 "    BNE     loc_FF18D820 \n"
 320 "    LDR     R0, [R5, #0xC4] \n"
 321 "    CMP     R0, #1 \n"
 322 "    BNE     loc_FF18D808 \n"
 323 "    LDRH    R0, [R5] \n"
 324 "    CMP     R0, R6 \n"
 325 "    LDRNEH  R0, [R5, #0x9E] \n"
 326 "    CMPNE   R0, #3 \n"
 327 "    LDRNE   R0, [R4, #8] \n"
 328 "    CMPNE   R0, #1 \n"
 329 "    BLS     loc_FF18D7EC \n"
 330 "    BL      sub_FF022D5C \n"
 331 "    TST     R0, #1 \n"
 332 "    BEQ     loc_FF18D820 \n"
 333 "    BL      sub_FF07D70C \n"
 334 "    B       loc_FF18D818 \n"
 335 
 336 "loc_FF18D7EC:\n"
 337 "    MOV     R0, #0xC \n"
 338 "    BL      sub_FF07D6AC \n"
 339 "    TST     R0, #1 \n"
 340 "    BEQ     loc_FF18D820 \n"
 341 "    BL      sub_FF18E078 \n"
 342 "    BL      sub_FF07531C \n"
 343 "    B       loc_FF18D818 \n"
 344 
 345 "loc_FF18D808:\n"
 346 "    MOV     R0, #0xC \n"
 347 "    BL      sub_FF07D6AC \n"
 348 "    TST     R0, #1 \n"
 349 "    BEQ     loc_FF18D820 \n"
 350 
 351 "loc_FF18D818:\n"
 352 "    MOV     R0, #1 \n"
 353 "    LDMFD   SP!, {R3-R7,PC} \n"
 354 
 355 "loc_FF18D820:\n"
 356 "    LDRH    R0, [R5] \n"
 357 "    CMP     R0, R6 \n"
 358 "    LDRNEH  R0, [R5, #0x9E] \n"
 359 "    CMPNE   R0, #3 \n"
 360 "    LDRNE   R0, [R4, #8] \n"
 361 "    CMPNE   R0, #1 \n"
 362 "    BLS     loc_FF18D850 \n"
 363 "    LDRH    R0, [R5, #0x9C] \n"
 364 "    CMP     R0, #0 \n"
 365 "    LDREQH  R0, [R5, #0x98] \n"
 366 "    CMPEQ   R0, #2 \n"
 367 "    BLEQ    sub_FF07851C \n"
 368 
 369 "loc_FF18D850:\n"
 370 "    LDRH    R1, [R5] \n"
 371 "    LDRH    R0, [R5, #0x9E] \n"
 372 "    CMP     R1, R6 \n"
 373 "    BEQ     loc_FF18D890 \n"
 374 "    CMP     R0, #3 \n"
 375 "    BEQ     loc_FF18D8D0 \n"
 376 "    LDR     R0, [R4, #8] \n"
 377 "    CMP     R0, #1 \n"
 378 "    BLS     loc_FF18D898 \n"
 379 "    LDRH    R0, [R5, #0x9C] \n"
 380 "    CMP     R0, #0 \n"
 381 "    BNE     loc_FF18D8D0 \n"
 382 "    LDRH    R0, [R5, #0x98] \n"
 383 "    CMP     R0, #2 \n"
 384 "    BEQ     loc_FF18D8CC \n"
 385 "    B       loc_FF18D8A4 \n"
 386 
 387 "loc_FF18D890:\n"
 388 "    CMP     R0, #3 \n"
 389 "    BEQ     loc_FF18D8D0 \n"
 390 
 391 "loc_FF18D898:\n"
 392 "    LDRH    R0, [R5, #0x9C] \n"
 393 "    CMP     R0, #0 \n"
 394 "    BNE     loc_FF18D8D0 \n"
 395 
 396 "loc_FF18D8A4:\n"
 397 "    LDRH    R0, [R5, #0x98] \n"
 398 "    CMP     R0, #1 \n"
 399 "    BNE     loc_FF18D8D0 \n"
 400 "    CMP     R1, R6 \n"
 401 "    LDRNE   R0, [R4, #8] \n"
 402 "    CMPNE   R0, #1 \n"
 403 "    BLS     loc_FF18D8D0 \n"
 404 "    LDR     R0, [R4, #0xC] \n"
 405 "    CMP     R0, #1 \n"
 406 "    BNE     loc_FF18D8D0 \n"
 407 
 408 "loc_FF18D8CC:\n"
 409 "    BL      sub_FF18E7C0 \n"
 410 
 411 "loc_FF18D8D0:\n"
 412 "    BL      sub_FF18E788 \n"
 413 "    BL      sub_FF077EF4 \n"
 414 "    LDR     R0, [R5, #0x28] \n"
 415 "    CMP     R0, #0 \n"
 416 "    BNE     loc_FF18D99C \n"
 417 "    MOV     R0, R4 \n"
 418 "    BL      sub_FF18D004 \n"
 419 "    TST     R0, #1 \n"
 420 "    LDMNEFD SP!, {R3-R7,PC} \n"
 421 "    MOV     R0, R4 \n"
 422 "    BL      sub_FF18D468 \n"
 423 "    BL      sub_FF18DFBC \n"
 424 "    LDR     R0, [R5, #0xC4] \n"
 425 "    CMP     R0, #1 \n"
 426 "    BNE     loc_FF18D928 \n"
 427 "    LDRH    R0, [R5] \n"
 428 "    CMP     R0, R6 \n"
 429 "    LDRNEH  R0, [R5, #0x9E] \n"
 430 "    CMPNE   R0, #3 \n"
 431 "    LDRNE   R0, [R4, #8] \n"
 432 "    CMPNE   R0, #1 \n"
 433 "    BHI     loc_FF18D930 \n"
 434 
 435 "loc_FF18D928:\n"
 436 "    MOV     R0, #2 \n"
 437 "    BL      sub_FF07EFE8 \n"
 438 "    BL      wait_until_remote_button_is_released\n"    // added
 439 "    BL      capt_seq_hook_set_nr\n"                    // added
 440 
 441 "loc_FF18D930:\n"
 442 "    LDRH    R0, [R5] \n"
 443 "    SUB     R1, R0, #0x4200 \n"
 444 "    SUBS    R1, R1, #0x2D \n"
 445 "    BNE     loc_FF18D98C \n"
 446 "    MOV     R5, #1 \n"
 447 "    MOV     R2, #2 \n"
 448 "    MOV     R1, SP \n"
 449 "    ADD     R0, R2, #0x15C \n"
 450 "    STR     R5, [SP] \n"
 451 "    BL      _GetPropertyCase \n"
 452 "    TST     R0, #1 \n"
 453 "    MOVNE   R1, #0xBC \n"
 454 "    LDRNE   R0, =0xFF18DAB8 /*'SsCaptureSeq.c'*/ \n"
 455 "    BLNE    _DebugAssert \n"
 456 "    LDRH    R0, [SP] \n"
 457 "    CMP     R0, #1 \n"
 458 "    BLS     loc_FF18D984 \n"
 459 "    MOV     R0, R4 \n"
 460 "    STR     R5, [R4, #0xE4] \n"
 461 "    BL      sub_FF305C84 \n"
 462 "    B       loc_FF18D994 \n"
 463 
 464 "loc_FF18D984:\n"
 465 "    MOV     R0, #0 \n"
 466 "    STR     R0, [R4, #0xE4] \n"
 467 
 468 "loc_FF18D98C:\n"
 469 "    MOV     R0, R4 \n"
 470 "    BL      sub_FF3058C4 \n"
 471 
 472 "loc_FF18D994:\n"
 473 "    MOV     R7, R0 \n"
 474 "    B       loc_FF18D9AC \n"
 475 
 476 "loc_FF18D99C:\n"
 477 "    LDR     R0, =0x8978 \n"
 478 "    LDR     R0, [R0] \n"
 479 "    CMP     R0, #0 \n"
 480 "    MOVNE   R7, #0x1D \n"
 481 
 482 "loc_FF18D9AC:\n"
 483 "    MOV     R0, R7 \n"
 484 "    LDMFD   SP!, {R3-R7,PC} \n"
 485 );
 486 }
 487 
 488 /*************************************************************/
 489 //** exp_drv_task @ 0xFF0C3E54 - 0xFF0C44B8, length=410
 490 void __attribute__((naked,noinline)) exp_drv_task() {
 491 asm volatile (
 492 "    STMFD   SP!, {R4-R9,LR} \n"
 493 "    SUB     SP, SP, #0x24 \n"
 494 "    LDR     R6, =0x57B0 \n"
 495 "    LDR     R7, =0xBB8 \n"
 496 "    LDR     R4, =0x5A5B4 \n"
 497 "    MOV     R0, #0 \n"
 498 "    ADD     R5, SP, #0x14 \n"
 499 "    STR     R0, [SP, #0x10] \n"
 500 
 501 "loc_FF0C3E74:\n"
 502 "    LDR     R0, [R6, #0x20] \n"
 503 "    MOV     R2, #0 \n"
 504 "    ADD     R1, SP, #0x20 \n"
 505 "    BL      sub_FF02AD50 /*_ReceiveMessageQueue*/ \n"
 506 "    LDR     R0, [SP, #0x10] \n"
 507 "    CMP     R0, #1 \n"
 508 "    BNE     loc_FF0C3EC0 \n"
 509 "    LDR     R0, [SP, #0x20] \n"
 510 "    LDR     R0, [R0] \n"
 511 "    CMP     R0, #0x14 \n"
 512 "    CMPNE   R0, #0x15 \n"
 513 "    CMPNE   R0, #0x16 \n"
 514 "    CMPNE   R0, #0x17 \n"
 515 "    BEQ     loc_FF0C4020 \n"
 516 "    CMP     R0, #0x29 \n"
 517 "    BEQ     loc_FF0C3FA8 \n"
 518 "    ADD     R1, SP, #0x10 \n"
 519 "    MOV     R0, #0 \n"
 520 "    BL      sub_FF0C3E04 \n"
 521 
 522 "loc_FF0C3EC0:\n"
 523 "    LDR     R0, [SP, #0x20] \n"
 524 "    LDR     R1, [R0] \n"
 525 "    CMP     R1, #0x2F \n"
 526 "    BNE     loc_FF0C3EEC \n"
 527 "    BL      sub_FF0C5280 \n"
 528 "    LDR     R0, [R6, #0x1C] \n"
 529 "    MOV     R1, #1 \n"
 530 "    BL      sub_FF0826C4 /*_SetEventFlag*/ \n"
 531 "    BL      _ExitTask \n"
 532 "    ADD     SP, SP, #0x24 \n"
 533 "    LDMFD   SP!, {R4-R9,PC} \n"
 534 
 535 "loc_FF0C3EEC:\n"
 536 "    CMP     R1, #0x2E \n"
 537 "    BNE     loc_FF0C3F08 \n"
 538 "    LDR     R2, [R0, #0x8C]! \n"
 539 "    LDR     R1, [R0, #4] \n"
 540 "    MOV     R0, R1 \n"
 541 "    BLX     R2 \n"
 542 "    B       loc_FF0C44B0 \n"
 543 
 544 "loc_FF0C3F08:\n"
 545 "    CMP     R1, #0x27 \n"
 546 "    BNE     loc_FF0C3F58 \n"
 547 "    LDR     R0, [R6, #0x1C] \n"
 548 "    MOV     R1, #0x80 \n"
 549 "    BL      sub_FF0826F8 /*_ClearEventFlag*/ \n"
 550 "    LDR     R0, =0xFF0BF0D8 \n"
 551 "    MOV     R1, #0x80 \n"
 552 "    BL      sub_FF17E248 \n"
 553 "    LDR     R0, [R6, #0x1C] \n"
 554 "    MOV     R2, R7 \n"
 555 "    MOV     R1, #0x80 \n"
 556 "    BL      sub_FF082604 /*_WaitForAllEventFlag*/ \n"
 557 "    TST     R0, #1 \n"
 558 "    LDRNE   R1, =0x1756 \n"
 559 "    BNE     loc_FF0C4014 \n"
 560 
 561 "loc_FF0C3F44:\n"
 562 "    LDR     R1, [SP, #0x20] \n"
 563 "    LDR     R0, [R1, #0x90] \n"
 564 "    LDR     R1, [R1, #0x8C] \n"
 565 "    BLX     R1 \n"
 566 "    B       loc_FF0C44B0 \n"
 567 
 568 "loc_FF0C3F58:\n"
 569 "    CMP     R1, #0x28 \n"
 570 "    BNE     loc_FF0C3FA0 \n"
 571 "    ADD     R1, SP, #0x10 \n"
 572 "    BL      sub_FF0C3E04 \n"
 573 "    LDR     R0, [R6, #0x1C] \n"
 574 "    MOV     R1, #0x100 \n"
 575 "    BL      sub_FF0826F8 /*_ClearEventFlag*/ \n"
 576 "    LDR     R0, =0xFF0BF0E8 \n"
 577 "    MOV     R1, #0x100 \n"
 578 "    BL      sub_FF17EB70 \n"
 579 "    LDR     R0, [R6, #0x1C] \n"
 580 "    MOV     R2, R7 \n"
 581 "    MOV     R1, #0x100 \n"
 582 "    BL      sub_FF082604 /*_WaitForAllEventFlag*/ \n"
 583 "    TST     R0, #1 \n"
 584 "    BEQ     loc_FF0C3F44 \n"
 585 "    LDR     R1, =0x1760 \n"
 586 "    B       loc_FF0C4014 \n"
 587 
 588 "loc_FF0C3FA0:\n"
 589 "    CMP     R1, #0x29 \n"
 590 "    BNE     loc_FF0C3FB8 \n"
 591 
 592 "loc_FF0C3FA8:\n"
 593 "    LDR     R0, [SP, #0x20] \n"
 594 "    ADD     R1, SP, #0x10 \n"
 595 "    BL      sub_FF0C3E04 \n"
 596 "    B       loc_FF0C3F44 \n"
 597 
 598 "loc_FF0C3FB8:\n"
 599 "    CMP     R1, #0x2C \n"
 600 "    BNE     loc_FF0C3FD0 \n"
 601 "    BL      sub_FF0B0A18 \n"
 602 "    BL      sub_FF0B1688 \n"
 603 "    BL      sub_FF0B1200 \n"
 604 "    B       loc_FF0C3F44 \n"
 605 
 606 "loc_FF0C3FD0:\n"
 607 "    CMP     R1, #0x2D \n"
 608 "    BNE     loc_FF0C4020 \n"
 609 "    LDR     R0, [R6, #0x1C] \n"
 610 "    MOV     R1, #4 \n"
 611 "    BL      sub_FF0826F8 /*_ClearEventFlag*/ \n"
 612 "    LDR     R1, =0xFF0BF108 \n"
 613 "    LDR     R0, =0xFFFFF400 \n"
 614 "    MOV     R2, #4 \n"
 615 "    BL      sub_FF0B048C \n"
 616 "    BL      sub_FF0B071C \n"
 617 "    LDR     R0, [R6, #0x1C] \n"
 618 "    MOV     R2, R7 \n"
 619 "    MOV     R1, #4 \n"
 620 "    BL      sub_FF082520 /*_WaitForAnyEventFlag*/ \n"
 621 "    TST     R0, #1 \n"
 622 "    BEQ     loc_FF0C3F44 \n"
 623 "    LDR     R1, =0x1788 \n"
 624 
 625 "loc_FF0C4014:\n"
 626 "    LDR     R0, =0xFF0BF8A8 /*'ExpDrv.c'*/ \n"
 627 "    BL      _DebugAssert \n"
 628 "    B       loc_FF0C3F44 \n"
 629 
 630 "loc_FF0C4020:\n"
 631 "    LDR     R0, [SP, #0x20] \n"
 632 "    MOV     R8, #1 \n"
 633 "    LDR     R1, [R0] \n"
 634 "    CMP     R1, #0x12 \n"
 635 "    CMPNE   R1, #0x13 \n"
 636 "    BNE     loc_FF0C4088 \n"
 637 "    LDR     R1, [R0, #0x7C] \n"
 638 "    ADD     R1, R1, R1, LSL#1 \n"
 639 "    ADD     R1, R0, R1, LSL#2 \n"
 640 "    SUB     R1, R1, #8 \n"
 641 "    LDMIA   R1, {R2,R3,R9} \n"
 642 "    STMIA   R5, {R2,R3,R9} \n"
 643 "    BL      sub_FF0C215C \n"
 644 "    LDR     R0, [SP, #0x20] \n"
 645 "    LDR     R1, [R0, #0x7C] \n"
 646 "    LDR     R3, [R0, #0x8C] \n"
 647 "    LDR     R2, [R0, #0x90] \n"
 648 "    ADD     R0, R0, #4 \n"
 649 "    BLX     R3 \n"
 650 "    LDR     R0, [SP, #0x20] \n"
 651 "    BL      sub_FF0C5694 \n"
 652 "    LDR     R0, [SP, #0x20] \n"
 653 "    LDR     R1, [R0, #0x7C] \n"
 654 "    LDR     R2, [R0, #0x98] \n"
 655 "    LDR     R3, [R0, #0x94] \n"
 656 "    B       loc_FF0C439C \n"
 657 
 658 "loc_FF0C4088:\n"
 659 "    CMP     R1, #0x14 \n"
 660 "    CMPNE   R1, #0x15 \n"
 661 "    CMPNE   R1, #0x16 \n"
 662 "    CMPNE   R1, #0x17 \n"
 663 "    BNE     loc_FF0C4140 \n"
 664 "    ADD     R3, SP, #0x10 \n"
 665 "    ADD     R2, SP, #4 \n"
 666 "    ADD     R1, SP, #0x14 \n"
 667 "    BL      sub_FF0C23C4 \n"
 668 "    CMP     R0, #1 \n"
 669 "    MOV     R9, R0 \n"
 670 "    CMPNE   R9, #5 \n"
 671 "    BNE     loc_FF0C40DC \n"
 672 "    LDR     R0, [SP, #0x20] \n"
 673 "    MOV     R2, R9 \n"
 674 "    LDR     R1, [R0, #0x7C]! \n"
 675 "    LDR     R12, [R0, #0x10]! \n"
 676 "    LDR     R3, [R0, #4] \n"
 677 "    ADD     R0, SP, #4 \n"
 678 "    BLX     R12 \n"
 679 "    B       loc_FF0C4114 \n"
 680 
 681 "loc_FF0C40DC:\n"
 682 "    LDR     R0, [SP, #0x20] \n"
 683 "    CMP     R9, #2 \n"
 684 "    LDR     R3, [R0, #0x90] \n"
 685 "    CMPNE   R9, #6 \n"
 686 "    BNE     loc_FF0C4128 \n"
 687 "    LDR     R12, [R0, #0x8C] \n"
 688 "    MOV     R2, R9 \n"
 689 "    MOV     R1, #1 \n"
 690 "    ADD     R0, SP, #4 \n"
 691 "    BLX     R12 \n"
 692 "    LDR     R0, [SP, #0x20] \n"
 693 "    ADD     R2, SP, #4 \n"
 694 "    ADD     R1, SP, #0x14 \n"
 695 "    BL      sub_FF0C3B50 \n"
 696 
 697 "loc_FF0C4114:\n"
 698 "    LDR     R0, [SP, #0x20] \n"
 699 "    LDR     R2, [SP, #0x10] \n"
 700 "    MOV     R1, R9 \n"
 701 "    BL      sub_FF0C3DA4 \n"
 702 "    B       loc_FF0C43A4 \n"
 703 
 704 "loc_FF0C4128:\n"
 705 "    LDR     R1, [R0, #0x7C] \n"
 706 "    LDR     R12, [R0, #0x8C] \n"
 707 "    MOV     R2, R9 \n"
 708 "    ADD     R0, R0, #4 \n"
 709 "    BLX     R12 \n"
 710 "    B       loc_FF0C43A4 \n"
 711 
 712 "loc_FF0C4140:\n"
 713 "    CMP     R1, #0x23 \n"
 714 "    CMPNE   R1, #0x24 \n"
 715 "    BNE     loc_FF0C418C \n"
 716 "    LDR     R1, [R0, #0x7C] \n"
 717 "    ADD     R1, R1, R1, LSL#1 \n"
 718 "    ADD     R1, R0, R1, LSL#2 \n"
 719 "    SUB     R1, R1, #8 \n"
 720 "    LDMIA   R1, {R2,R3,R9} \n"
 721 "    STMIA   R5, {R2,R3,R9} \n"
 722 "    BL      sub_FF0C0F4C \n"
 723 "    LDR     R0, [SP, #0x20] \n"
 724 "    LDR     R1, [R0, #0x7C] \n"
 725 "    LDR     R3, [R0, #0x8C] \n"
 726 "    LDR     R2, [R0, #0x90] \n"
 727 "    ADD     R0, R0, #4 \n"
 728 "    BLX     R3 \n"
 729 "    LDR     R0, [SP, #0x20] \n"
 730 "    BL      sub_FF0C1438 \n"
 731 "    B       loc_FF0C43A4 \n"
 732 
 733 "loc_FF0C418C:\n"
 734 "    ADD     R1, R0, #4 \n"
 735 "    LDMIA   R1, {R2,R3,R9} \n"
 736 "    STMIA   R5, {R2,R3,R9} \n"
 737 "    LDR     R1, [R0] \n"
 738 "    CMP     R1, #0x27 \n"
 739 "    ADDCC   PC, PC, R1, LSL#2 \n"
 740 "    B       loc_FF0C438C \n"
 741 "    B       loc_FF0C4244 \n"
 742 "    B       loc_FF0C4244 \n"
 743 "    B       loc_FF0C424C \n"
 744 "    B       loc_FF0C4254 \n"
 745 "    B       loc_FF0C4254 \n"
 746 "    B       loc_FF0C4254 \n"
 747 "    B       loc_FF0C4244 \n"
 748 "    B       loc_FF0C424C \n"
 749 "    B       loc_FF0C4254 \n"
 750 "    B       loc_FF0C4254 \n"
 751 "    B       loc_FF0C426C \n"
 752 "    B       loc_FF0C426C \n"
 753 "    B       loc_FF0C4378 \n"
 754 "    B       loc_FF0C4380 \n"
 755 "    B       loc_FF0C4380 \n"
 756 "    B       loc_FF0C4380 \n"
 757 "    B       loc_FF0C4380 \n"
 758 "    B       loc_FF0C4388 \n"
 759 "    B       loc_FF0C438C \n"
 760 "    B       loc_FF0C438C \n"
 761 "    B       loc_FF0C438C \n"
 762 "    B       loc_FF0C438C \n"
 763 "    B       loc_FF0C438C \n"
 764 "    B       loc_FF0C438C \n"
 765 "    B       loc_FF0C425C \n"
 766 "    B       loc_FF0C4264 \n"
 767 "    B       loc_FF0C4264 \n"
 768 "    B       loc_FF0C4278 \n"
 769 "    B       loc_FF0C4278 \n"
 770 "    B       loc_FF0C4280 \n"
 771 "    B       loc_FF0C42B8 \n"
 772 "    B       loc_FF0C42F0 \n"
 773 "    B       loc_FF0C4328 \n"
 774 "    B       loc_FF0C4360 \n"
 775 "    B       loc_FF0C4360 \n"
 776 "    B       loc_FF0C438C \n"
 777 "    B       loc_FF0C438C \n"
 778 "    B       loc_FF0C4368 \n"
 779 "    B       loc_FF0C4370 \n"
 780 
 781 "loc_FF0C4244:\n"
 782 "    BL      sub_FF0BF6D4 \n"
 783 "    B       loc_FF0C438C \n"
 784 
 785 "loc_FF0C424C:\n"
 786 "    BL      sub_FF0BF9D4 \n"
 787 "    B       loc_FF0C438C \n"
 788 
 789 "loc_FF0C4254:\n"
 790 "    BL      sub_FF0BFC3C \n"
 791 "    B       loc_FF0C438C \n"
 792 
 793 "loc_FF0C425C:\n"
 794 "    BL      sub_FF0BFEF0 \n"
 795 "    B       loc_FF0C438C \n"
 796 
 797 "loc_FF0C4264:\n"
 798 "    BL      sub_FF0C0108 \n"
 799 "    B       loc_FF0C438C \n"
 800 
 801 "loc_FF0C426C:\n"
 802 "    BL      sub_FF0C05C4_my \n"  // --> Patched. Old value = 0xFF0C05C4.
 803 "    MOV     R8, #0 \n"
 804 "    B       loc_FF0C438C \n"
 805 
 806 "loc_FF0C4278:\n"
 807 "    BL      sub_FF0C07A8 \n"
 808 "    B       loc_FF0C438C \n"
 809 
 810 "loc_FF0C4280:\n"
 811 "    LDRH    R1, [R0, #4] \n"
 812 "    STRH    R1, [SP, #0x14] \n"
 813 "    LDRH    R1, [R4, #2] \n"
 814 "    STRH    R1, [SP, #0x16] \n"
 815 "    LDRH    R1, [R4, #4] \n"
 816 "    STRH    R1, [SP, #0x18] \n"
 817 "    LDRH    R1, [R4, #6] \n"
 818 "    STRH    R1, [SP, #0x1A] \n"
 819 "    LDRH    R1, [R0, #0xC] \n"
 820 "    STRH    R1, [SP, #0x1C] \n"
 821 "    LDRH    R1, [R4, #0xA] \n"
 822 "    STRH    R1, [SP, #0x1E] \n"
 823 "    BL      sub_FF0C5314 \n"
 824 "    B       loc_FF0C438C \n"
 825 
 826 "loc_FF0C42B8:\n"
 827 "    LDRH    R1, [R0, #4] \n"
 828 "    STRH    R1, [SP, #0x14] \n"
 829 "    LDRH    R1, [R4, #2] \n"
 830 "    STRH    R1, [SP, #0x16] \n"
 831 "    LDRH    R1, [R4, #4] \n"
 832 "    STRH    R1, [SP, #0x18] \n"
 833 "    LDRH    R1, [R4, #6] \n"
 834 "    STRH    R1, [SP, #0x1A] \n"
 835 "    LDRH    R1, [R4, #8] \n"
 836 "    STRH    R1, [SP, #0x1C] \n"
 837 "    LDRH    R1, [R4, #0xA] \n"
 838 "    STRH    R1, [SP, #0x1E] \n"
 839 "    BL      sub_FF0C5494 \n"
 840 "    B       loc_FF0C438C \n"
 841 
 842 "loc_FF0C42F0:\n"
 843 "    LDRH    R1, [R4] \n"
 844 "    STRH    R1, [SP, #0x14] \n"
 845 "    LDRH    R1, [R0, #6] \n"
 846 "    STRH    R1, [SP, #0x16] \n"
 847 "    LDRH    R1, [R4, #4] \n"
 848 "    STRH    R1, [SP, #0x18] \n"
 849 "    LDRH    R1, [R4, #6] \n"
 850 "    STRH    R1, [SP, #0x1A] \n"
 851 "    LDRH    R1, [R4, #8] \n"
 852 "    STRH    R1, [SP, #0x1C] \n"
 853 "    LDRH    R1, [R4, #0xA] \n"
 854 "    STRH    R1, [SP, #0x1E] \n"
 855 "    BL      sub_FF0C5548 \n"
 856 "    B       loc_FF0C438C \n"
 857 
 858 "loc_FF0C4328:\n"
 859 "    LDRH    R1, [R4] \n"
 860 "    STRH    R1, [SP, #0x14] \n"
 861 "    LDRH    R1, [R4, #2] \n"
 862 "    STRH    R1, [SP, #0x16] \n"
 863 "    LDRH    R1, [R4, #4] \n"
 864 "    STRH    R1, [SP, #0x18] \n"
 865 "    LDRH    R1, [R4, #6] \n"
 866 "    STRH    R1, [SP, #0x1A] \n"
 867 "    LDRH    R1, [R0, #0xC] \n"
 868 "    STRH    R1, [SP, #0x1C] \n"
 869 "    LDRH    R1, [R4, #0xA] \n"
 870 "    STRH    R1, [SP, #0x1E] \n"
 871 "    BL      sub_FF0C55F0 \n"
 872 "    B       loc_FF0C438C \n"
 873 
 874 "loc_FF0C4360:\n"
 875 "    BL      sub_FF0C0D24 \n"
 876 "    B       loc_FF0C438C \n"
 877 
 878 "loc_FF0C4368:\n"
 879 "    BL      sub_FF0C153C \n"
 880 "    B       loc_FF0C438C \n"
 881 
 882 "loc_FF0C4370:\n"
 883 "    BL      sub_FF0C1A48 \n"
 884 "    B       loc_FF0C438C \n"
 885 
 886 "loc_FF0C4378:\n"
 887 "    BL      sub_FF0C1C28 \n"
 888 "    B       loc_FF0C438C \n"
 889 
 890 "loc_FF0C4380:\n"
 891 "    BL      sub_FF0C1DE4 \n"
 892 "    B       loc_FF0C438C \n"
 893 
 894 "loc_FF0C4388:\n"
 895 "    BL      sub_FF0C1F54 \n"
 896 
 897 "loc_FF0C438C:\n"
 898 "    LDR     R0, [SP, #0x20] \n"
 899 "    LDR     R1, [R0, #0x7C] \n"
 900 "    LDR     R2, [R0, #0x90] \n"
 901 "    LDR     R3, [R0, #0x8C] \n"
 902 
 903 "loc_FF0C439C:\n"
 904 "    ADD     R0, R0, #4 \n"
 905 "    BLX     R3 \n"
 906 
 907 "loc_FF0C43A4:\n"
 908 "    LDR     R1, [SP, #0x20] \n"
 909 "    LDR     R0, [R1] \n"
 910 "    CMP     R0, #0x10 \n"
 911 "    BEQ     loc_FF0C43DC \n"
 912 "    BGT     loc_FF0C43CC \n"
 913 "    CMP     R0, #1 \n"
 914 "    CMPNE   R0, #4 \n"
 915 "    CMPNE   R0, #0xE \n"
 916 "    BNE     loc_FF0C43EC \n"
 917 "    B       loc_FF0C43DC \n"
 918 
 919 "loc_FF0C43CC:\n"
 920 "    CMP     R0, #0x13 \n"
 921 "    CMPNE   R0, #0x17 \n"
 922 "    CMPNE   R0, #0x1A \n"
 923 "    BNE     loc_FF0C43EC \n"
 924 
 925 "loc_FF0C43DC:\n"
 926 "    LDRH    R0, [R4] \n"
 927 "    STRH    R0, [SP, #0x14] \n"
 928 "    LDRH    R0, [R4, #8] \n"
 929 "    STRH    R0, [SP, #0x1C] \n"
 930 
 931 "loc_FF0C43EC:\n"
 932 "    CMP     R8, #1 \n"
 933 "    BNE     loc_FF0C4438 \n"
 934 "    LDR     R0, [R1, #0x7C] \n"
 935 "    MOV     R2, #0xC \n"
 936 "    ADD     R0, R0, R0, LSL#1 \n"
 937 "    ADD     R0, R1, R0, LSL#2 \n"
 938 "    SUB     R8, R0, #8 \n"
 939 "    LDR     R0, =0x5A5B4 \n"
 940 "    ADD     R1, SP, #0x14 \n"
 941 "    BL      sub_FF3AB600 \n"
 942 "    LDR     R0, =0x5A5C0 \n"
 943 "    MOV     R2, #0xC \n"
 944 "    ADD     R1, SP, #0x14 \n"
 945 "    BL      sub_FF3AB600 \n"
 946 "    LDR     R0, =0x5A5CC \n"
 947 "    MOV     R2, #0xC \n"
 948 "    MOV     R1, R8 \n"
 949 "    BL      sub_FF3AB600 \n"
 950 "    B       loc_FF0C44B0 \n"
 951 
 952 "loc_FF0C4438:\n"
 953 "    LDR     R0, [R1] \n"
 954 "    MOV     R3, #1 \n"
 955 "    CMP     R0, #0xB \n"
 956 "    BNE     loc_FF0C447C \n"
 957 "    MOV     R2, #0 \n"
 958 "    STRD    R2, [SP] \n"
 959 "    MOV     R2, R3 \n"
 960 "    MOV     R1, R3 \n"
 961 "    MOV     R0, #0 \n"
 962 "    BL      sub_FF0BF4A8 \n"
 963 "    MOV     R3, #1 \n"
 964 "    MOV     R2, #0 \n"
 965 "    STRD    R2, [SP] \n"
 966 "    MOV     R2, R3 \n"
 967 "    MOV     R1, R3 \n"
 968 "    MOV     R0, #0 \n"
 969 "    B       loc_FF0C44AC \n"
 970 
 971 "loc_FF0C447C:\n"
 972 "    MOV     R2, #1 \n"
 973 "    STRD    R2, [SP] \n"
 974 "    MOV     R3, R2 \n"
 975 "    MOV     R1, R2 \n"
 976 "    MOV     R0, R2 \n"
 977 "    BL      sub_FF0BF4A8 \n"
 978 "    MOV     R3, #1 \n"
 979 "    MOV     R2, R3 \n"
 980 "    MOV     R1, R3 \n"
 981 "    MOV     R0, R3 \n"
 982 "    STR     R3, [SP] \n"
 983 "    STR     R3, [SP, #4] \n"
 984 
 985 "loc_FF0C44AC:\n"
 986 "    BL      sub_FF0BF620 \n"
 987 
 988 "loc_FF0C44B0:\n"
 989 "    LDR     R0, [SP, #0x20] \n"
 990 "    BL      sub_FF0C5280 \n"
 991 "    B       loc_FF0C3E74 \n"
 992 );
 993 }
 994 
 995 /*************************************************************/
 996 //** sub_FF0C05C4_my @ 0xFF0C05C4 - 0xFF0C0708, length=82
 997 void __attribute__((naked,noinline)) sub_FF0C05C4_my() {
 998 asm volatile (
 999 "    STMFD   SP!, {R4-R8,LR} \n"
1000 "    LDR     R7, =0x57B0 \n"
1001 "    MOV     R4, R0 \n"
1002 "    LDR     R0, [R7, #0x1C] \n"
1003 "    MOV     R1, #0x3E \n"
1004 "    BL      sub_FF0826F8 /*_ClearEventFlag*/ \n"
1005 "    MOV     R2, #0 \n"
1006 "    LDRSH   R0, [R4, #4] \n"
1007 "    MOV     R1, R2 \n"
1008 "    BL      sub_FF0BF168 \n"
1009 "    MOV     R5, R0 \n"
1010 "    LDRSH   R0, [R4, #6] \n"
1011 "    BL      sub_FF0BF2B8 \n"
1012 "    LDRSH   R0, [R4, #8] \n"
1013 "    BL      sub_FF0BF310 \n"
1014 "    LDRSH   R0, [R4, #0xA] \n"
1015 "    BL      sub_FF0BF368 \n"
1016 "    LDRSH   R0, [R4, #0xC] \n"
1017 "    MOV     R1, #0 \n"
1018 "    BL      sub_FF0BF3C0 \n"
1019 "    MOV     R6, R0 \n"
1020 "    LDRSH   R0, [R4, #0xE] \n"
1021 "    BL      sub_FF0C52B0 \n"
1022 "    LDR     R0, [R4] \n"
1023 "    LDR     R8, =0x5A5CC \n"
1024 "    CMP     R0, #0xB \n"
1025 "    MOVEQ   R5, #0 \n"
1026 "    MOVEQ   R6, R5 \n"
1027 "    BEQ     loc_FF0C0660 \n"
1028 "    CMP     R5, #1 \n"
1029 "    BNE     loc_FF0C0660 \n"
1030 "    LDRSH   R0, [R4, #4] \n"
1031 "    LDR     R1, =0xFF0BF0C8 \n"
1032 "    MOV     R2, #2 \n"
1033 "    BL      sub_FF17E520 \n"
1034 "    STRH    R0, [R4, #4] \n"
1035 "    MOV     R0, #0 \n"
1036 "    STR     R0, [R7, #0x28] \n"
1037 "    B       loc_FF0C0668 \n"
1038 
1039 "loc_FF0C0660:\n"
1040 "    LDRH    R0, [R8] \n"
1041 "    STRH    R0, [R4, #4] \n"
1042 
1043 "loc_FF0C0668:\n"
1044 "    CMP     R6, #1 \n"
1045 "    LDRNEH  R0, [R8, #8] \n"
1046 "    BNE     loc_FF0C0684 \n"
1047 "    LDRSH   R0, [R4, #0xC] \n"
1048 "    LDR     R1, =0xFF0BF14C \n"
1049 "    MOV     R2, #0x20 \n"
1050 "    BL      sub_FF0C52D0 \n"
1051 
1052 "loc_FF0C0684:\n"
1053 "    STRH    R0, [R4, #0xC] \n"
1054 "    LDRSH   R0, [R4, #6] \n"
1055 "    BL      sub_FF0B0788_my \n"  // --> Patched. Old value = 0xFF0B0788.
1056 "    LDRSH   R0, [R4, #8] \n"
1057 "    MOV     R1, #1 \n"
1058 "    BL      sub_FF0B0F40 \n"
1059 "    MOV     R1, #0 \n"
1060 "    ADD     R0, R4, #8 \n"
1061 "    BL      sub_FF0B0FC8 \n"
1062 "    LDRSH   R0, [R4, #0xE] \n"
1063 "    BL      sub_FF0B9F58 \n"
1064 "    LDR     R4, =0xBB8 \n"
1065 "    CMP     R5, #1 \n"
1066 "    BNE     loc_FF0C06DC \n"
1067 "    LDR     R0, [R7, #0x1C] \n"
1068 "    MOV     R2, R4 \n"
1069 "    MOV     R1, #2 \n"
1070 "    BL      sub_FF082604 /*_WaitForAllEventFlag*/ \n"
1071 "    TST     R0, #1 \n"
1072 "    LDRNE   R1, =0x7E3 \n"
1073 "    LDRNE   R0, =0xFF0BF8A8 /*'ExpDrv.c'*/ \n"
1074 "    BLNE    _DebugAssert \n"
1075 
1076 "loc_FF0C06DC:\n"
1077 "    CMP     R6, #1 \n"
1078 "    LDMNEFD SP!, {R4-R8,PC} \n"
1079 "    LDR     R0, [R7, #0x1C] \n"
1080 "    MOV     R2, R4 \n"
1081 "    MOV     R1, #0x20 \n"
1082 "    BL      sub_FF082604 /*_WaitForAllEventFlag*/ \n"
1083 "    TST     R0, #1 \n"
1084 "    LDMEQFD SP!, {R4-R8,PC} \n"
1085 "    LDMFD   SP!, {R4-R8,LR} \n"
1086 "    LDR     R1, =0x7E8 \n"
1087 "    LDR     R0, =0xFF0BF8A8 /*'ExpDrv.c'*/ \n"
1088 "    B       _DebugAssert \n"
1089 );
1090 }
1091 
1092 /*************************************************************/
1093 //** sub_FF0B0788_my @ 0xFF0B0788 - 0xFF0B07C8, length=17
1094 void __attribute__((naked,noinline)) sub_FF0B0788_my() {
1095 asm volatile (
1096 "    STMFD   SP!, {R4-R6,LR} \n"
1097 "    LDR     R5, =0x5458 \n"
1098 "    MOV     R4, R0 \n"
1099 "    LDR     R0, [R5, #4] \n"
1100 "    CMP     R0, #1 \n"
1101 "    LDRNE   R1, =0x146 \n"
1102 "    LDRNE   R0, =0xFF0B05C0 /*'Shutter.c'*/ \n"
1103 "    BLNE    _DebugAssert \n"
1104 "    CMN     R4, #0xC00 \n"
1105 "    LDREQSH R4, [R5, #2] \n"
1106 "    CMN     R4, #0xC00 \n"
1107 "    MOVEQ   R1, #0x14C \n"
1108 "    LDREQ   R0, =0xFF0B05C0 /*'Shutter.c'*/ \n"
1109 "    STRH    R4, [R5, #2] \n"
1110 "    BLEQ    _DebugAssert \n"
1111 "    MOV     R0, R4 \n"
1112 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
1113 "    LDR     PC, =0xFF0B07CC \n"  // Continue in firmware
1114 );
1115 }

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