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

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF2199C8_my
  3. exp_drv_task
  4. sub_FF0ECA38_my
  5. sub_FF0DB27C_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 300  // 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 @ 0xFF0A2FF4 - 0xFF0A331C, length=203
  16 void __attribute__((naked,noinline)) capt_seq_task() {
  17 asm volatile (
  18 "    STMFD   SP!, {R3-R9,LR} \n"
  19 "    LDR     R4, =0x9DD84 \n"
  20 "    LDR     R7, =0x3540 \n"
  21 "    MOV     R6, #0 \n"
  22 
  23 "loc_FF0A3004:\n"
  24 "    LDR     R0, [R7, #4] \n"
  25 "    MOV     R2, #0 \n"
  26 "    MOV     R1, SP \n"
  27 "    BL      sub_0068EF6C /*_ReceiveMessageQueue*/ \n"
  28 "    TST     R0, #1 \n"
  29 "    BEQ     loc_FF0A3030 \n"
  30 "    LDR     R1, =0x493 \n"
  31 "    LDR     R0, =0xFF0A2ADC /*'SsShootTask.c'*/ \n"
  32 "    BL      _DebugAssert \n"
  33 "    BL      _ExitTask \n"
  34 "    LDMFD   SP!, {R3-R9,PC} \n"
  35 
  36 "loc_FF0A3030:\n"
  37 "    LDR     R0, [SP] \n"
  38 "    LDR     R1, [R0] \n"
  39 "    CMP     R1, #0x23 \n"
  40 "    ADDCC   PC, PC, R1, LSL#2 \n"
  41 "    B       loc_FF0A32E4 \n"
  42 "    B       loc_FF0A30D0 \n"
  43 "    B       loc_FF0A30E8 \n"
  44 "    B       loc_FF0A316C \n"
  45 "    B       loc_FF0A3180 \n"
  46 "    B       loc_FF0A3178 \n"
  47 "    B       loc_FF0A318C \n"
  48 "    B       loc_FF0A3194 \n"
  49 "    B       loc_FF0A319C \n"
  50 "    B       loc_FF0A31B8 \n"
  51 "    B       loc_FF0A320C \n"
  52 "    B       loc_FF0A31C4 \n"
  53 "    B       loc_FF0A31D0 \n"
  54 "    B       loc_FF0A31D8 \n"
  55 "    B       loc_FF0A31F4 \n"
  56 "    B       loc_FF0A31FC \n"
  57 "    B       loc_FF0A3204 \n"
  58 "    B       loc_FF0A3214 \n"
  59 "    B       loc_FF0A321C \n"
  60 "    B       loc_FF0A3224 \n"
  61 "    B       loc_FF0A322C \n"
  62 "    B       loc_FF0A3234 \n"
  63 "    B       loc_FF0A3240 \n"
  64 "    B       loc_FF0A3248 \n"
  65 "    B       loc_FF0A3250 \n"
  66 "    B       loc_FF0A3258 \n"
  67 "    B       loc_FF0A3260 \n"
  68 "    B       loc_FF0A326C \n"
  69 "    B       loc_FF0A3274 \n"
  70 "    B       loc_FF0A327C \n"
  71 "    B       loc_FF0A3284 \n"
  72 "    B       loc_FF0A328C \n"
  73 "    B       loc_FF0A3298 \n"
  74 "    B       loc_FF0A32A0 \n"
  75 "    B       loc_FF0A32AC \n"
  76 "    B       loc_FF0A32F0 \n"
  77 
  78 "loc_FF0A30D0:\n"
  79 "    BL      shooting_expo_iso_override\n"      // added
  80 "    BL      sub_FF0A38A0 \n"
  81 "    BL      shooting_expo_param_override\n"    // added
  82 "    BL      sub_FF0A0484 \n"
  83 "    MOV     R0, #0\n"                          // added
  84 "    STR     R0, [R4,#0x28]\n"                  // added, fixes overrides behavior at short shutter press (from S95)
  85 //"  LDR     R0, [R4, #0x28] \n"  // above patch makes these three lines redundant
  86 //"  CMP     R0, #0 \n"
  87 //"  BLNE    _sub_FF219BB0 \n"
  88 "    B       loc_FF0A32F0 \n"
  89 
  90 "loc_FF0A30E8:\n"
  91 "    LDR     R5, [R0, #0x10] \n"
  92 "    LDR     R0, [R4, #0x28] \n"
  93 "    CMP     R0, #0 \n"
  94 "    BNE     loc_FF0A3130 \n"
  95 "    LDR     R0, [R4, #0x8C] \n"
  96 "    TST     R0, #0x30 \n"
  97 "    BLNE    sub_FF0A6FF0 \n"
  98 "    BL      sub_FF0A6BB4 \n"
  99 "    MOV     R1, R5 \n"
 100 "    BL      sub_FF0A6C0C \n"
 101 "    LDR     R0, =0x10F \n"
 102 "    MOV     R2, #4 \n"
 103 "    ADD     R1, R5, #0x40 \n"
 104 "    BL      _SetPropertyCase \n"
 105 "    MOV     R2, #4 \n"
 106 "    ADD     R1, R5, #0x44 \n"
 107 "    MOV     R0, #0x2C \n"
 108 "    BL      _SetPropertyCase \n"
 109 
 110 "loc_FF0A3130:\n"
 111 "    MOV     R0, R5 \n"
 112 "    BL      sub_FF2199C8_my \n"  // --> Patched. Old value = 0xFF2199C8.
 113 "    BL      capt_seq_hook_raw_here\n"      // added
 114 "    MOV     R8, R0 \n"
 115 "    MOV     R2, R5 \n"
 116 "    MOV     R1, #1 \n"
 117 "    BL      sub_FF0A0F34 \n"
 118 "    TST     R8, #1 \n"
 119 "    BNE     loc_FF0A32F0 \n"
 120 "    MOV     R0, R5 \n"
 121 "    BL      sub_FF218AF4 \n"
 122 "    LDR     R0, [R4, #0x8C] \n"
 123 "    TST     R0, #2 \n"
 124 "    MOVNE   R0, R5 \n"
 125 "    BLNE    sub_FF0A10D4 \n"
 126 "    B       loc_FF0A32F0 \n"
 127 
 128 "loc_FF0A316C:\n"
 129 "    MOV     R0, #1 \n"
 130 "    BL      sub_FF0A3BA8 \n"
 131 "    B       loc_FF0A32F0 \n"
 132 
 133 "loc_FF0A3178:\n"
 134 "    BL      sub_FF0A34C4 \n"
 135 "    B       loc_FF0A3184 \n"
 136 
 137 "loc_FF0A3180:\n"
 138 "    BL      sub_FF0A3880 \n"
 139 
 140 "loc_FF0A3184:\n"
 141 "    STR     R6, [R4, #0x28] \n"
 142 "    B       loc_FF0A32F0 \n"
 143 
 144 "loc_FF0A318C:\n"
 145 "    BL      sub_FF0A3888 \n"
 146 "    B       loc_FF0A32F0 \n"
 147 
 148 "loc_FF0A3194:\n"
 149 "    BL      sub_FF0A3A7C \n"
 150 "    B       loc_FF0A31BC \n"
 151 
 152 "loc_FF0A319C:\n"
 153 "    LDR     R5, [R0, #0x10] \n"
 154 "    MOV     R0, R5 \n"
 155 "    BL      sub_FF219C48 \n"
 156 "    MOV     R2, R5 \n"
 157 "    MOV     R1, #9 \n"
 158 "    BL      sub_FF0A0F34 \n"
 159 "    B       loc_FF0A32F0 \n"
 160 
 161 "loc_FF0A31B8:\n"
 162 "    BL      sub_FF0A3B0C \n"
 163 
 164 "loc_FF0A31BC:\n"
 165 "    BL      sub_FF0A0484 \n"
 166 "    B       loc_FF0A32F0 \n"
 167 
 168 "loc_FF0A31C4:\n"
 169 "    LDR     R0, [R4, #0x58] \n"
 170 "    BL      sub_FF0A41D0 \n"
 171 "    B       loc_FF0A32F0 \n"
 172 
 173 "loc_FF0A31D0:\n"
 174 "    BL      sub_FF0A44C8 \n"
 175 "    B       loc_FF0A32F0 \n"
 176 
 177 "loc_FF0A31D8:\n"
 178 "    LDRH    R1, [R4] \n"
 179 "    SUB     R0, R1, #0x8200 \n"
 180 "    SUBS    R0, R0, #0x39 \n"
 181 "    MOVNE   R0, #0 \n"
 182 "    MOVEQ   R0, #1 \n"
 183 "    BL      sub_FF0A452C \n"
 184 "    B       loc_FF0A32F0 \n"
 185 
 186 "loc_FF0A31F4:\n"
 187 "    BL      sub_FF0A4720 \n"
 188 "    B       loc_FF0A32F0 \n"
 189 
 190 "loc_FF0A31FC:\n"
 191 "    BL      sub_FF0A4B9C \n"
 192 "    B       loc_FF0A32F0 \n"
 193 
 194 "loc_FF0A3204:\n"
 195 "    BL      sub_FF0A4C50 \n"
 196 "    B       loc_FF0A32F0 \n"
 197 
 198 "loc_FF0A320C:\n"
 199 "    BL      sub_FF0A3880 \n"
 200 "    B       loc_FF0A32F0 \n"
 201 
 202 "loc_FF0A3214:\n"
 203 "    BL      sub_FF217DE4 \n"
 204 "    B       loc_FF0A32F0 \n"
 205 
 206 "loc_FF0A321C:\n"
 207 "    BL      sub_FF21804C \n"
 208 "    B       loc_FF0A32F0 \n"
 209 
 210 "loc_FF0A3224:\n"
 211 "    BL      sub_FF218104 \n"
 212 "    B       loc_FF0A32F0 \n"
 213 
 214 "loc_FF0A322C:\n"
 215 "    BL      sub_FF2181D8 \n"
 216 "    B       loc_FF0A32F0 \n"
 217 
 218 "loc_FF0A3234:\n"
 219 "    MOV     R0, #0 \n"
 220 "    BL      sub_FF218438 \n"
 221 "    B       loc_FF0A32F0 \n"
 222 
 223 "loc_FF0A3240:\n"
 224 "    BL      sub_FF2185A8 \n"
 225 "    B       loc_FF0A32F0 \n"
 226 
 227 "loc_FF0A3248:\n"
 228 "    BL      sub_FF21863C \n"
 229 "    B       loc_FF0A32F0 \n"
 230 
 231 "loc_FF0A3250:\n"
 232 "    BL      sub_FF2186F8 \n"
 233 "    B       loc_FF0A32F0 \n"
 234 
 235 "loc_FF0A3258:\n"
 236 "    BL      sub_FF0A3D20 \n"
 237 "    B       loc_FF0A32F0 \n"
 238 
 239 "loc_FF0A3260:\n"
 240 "    BL      sub_FF0A3DA4 \n"
 241 "    BL      sub_FF038CCC \n"
 242 "    B       loc_FF0A32F0 \n"
 243 
 244 "loc_FF0A326C:\n"
 245 "    BL      sub_FF2182A8 \n"
 246 "    B       loc_FF0A32F0 \n"
 247 
 248 "loc_FF0A3274:\n"
 249 "    BL      sub_FF2182E8 \n"
 250 "    B       loc_FF0A32F0 \n"
 251 
 252 "loc_FF0A327C:\n"
 253 "    BL      sub_FF0A82EC \n"
 254 "    B       loc_FF0A32F0 \n"
 255 
 256 "loc_FF0A3284:\n"
 257 "    BL      sub_FF0A836C \n"
 258 "    B       loc_FF0A32F0 \n"
 259 
 260 "loc_FF0A328C:\n"
 261 "    LDR     R0, [R0, #0xC] \n"
 262 "    BL      sub_FF218820 \n"
 263 "    B       loc_FF0A32F0 \n"
 264 
 265 "loc_FF0A3298:\n"
 266 "    BL      sub_FF218890 \n"
 267 "    B       loc_FF0A32F0 \n"
 268 
 269 "loc_FF0A32A0:\n"
 270 "    BL      sub_FF0A83D4 \n"
 271 "    BL      sub_FF0A838C \n"
 272 "    B       loc_FF0A32F0 \n"
 273 
 274 "loc_FF0A32AC:\n"
 275 "    MOV     R0, #1 \n"
 276 "    BL      sub_FF21A3DC \n"
 277 "    MOV     R0, #1 \n"
 278 "    BL      sub_FF21A504 \n"
 279 "    LDRH    R0, [R4, #0x9C] \n"
 280 "    CMP     R0, #4 \n"
 281 "    LDRNEH  R0, [R4] \n"
 282 "    SUBNE   R1, R0, #0x8200 \n"
 283 "    SUBNES  R1, R1, #0x2E \n"
 284 "    BNE     loc_FF0A32F0 \n"
 285 "    BL      sub_FF0A836C \n"
 286 "    BL      sub_FF0A8ABC \n"
 287 "    BL      sub_FF0A87FC \n"
 288 "    B       loc_FF0A32F0 \n"
 289 
 290 "loc_FF0A32E4:\n"
 291 "    LDR     R1, =0x5F4 \n"
 292 "    LDR     R0, =0xFF0A2ADC /*'SsShootTask.c'*/ \n"
 293 "    BL      _DebugAssert \n"
 294 
 295 "loc_FF0A32F0:\n"
 296 "    LDR     R0, [SP] \n"
 297 "    LDR     R1, [R0, #4] \n"
 298 "    LDR     R0, [R7] \n"
 299 "    BL      sub_0068ECDC /*_SetEventFlag*/ \n"
 300 "    LDR     R5, [SP] \n"
 301 "    LDR     R0, [R5, #8] \n"
 302 "    CMP     R0, #0 \n"
 303 "    LDREQ   R1, =0x117 \n"
 304 "    LDREQ   R0, =0xFF0A2ADC /*'SsShootTask.c'*/ \n"
 305 "    BLEQ    _DebugAssert \n"
 306 "    STR     R6, [R5, #8] \n"
 307 "    B       loc_FF0A3004 \n"
 308 );
 309 }
 310 
 311 /*************************************************************/
 312 //** sub_FF2199C8_my @ 0xFF2199C8 - 0xFF219BAC, length=122
 313 void __attribute__((naked,noinline)) sub_FF2199C8_my() {
 314 asm volatile (
 315 "    STMFD   SP!, {R3-R7,LR} \n"
 316 "    LDR     R5, =0x9DD84 \n"
 317 "    MOV     R4, R0 \n"
 318 "    LDR     R0, [R5, #0x28] \n"
 319 "    MOV     R6, #0 \n"
 320 "    CMP     R0, #0 \n"
 321 "    BNE     loc_FF219A60 \n"
 322 "    LDR     R1, [R5, #0x8C] \n"
 323 "    TST     R1, #6 \n"
 324 "    BNE     loc_FF219A04 \n"
 325 "    MOV     R0, #0xC \n"
 326 "    BL      sub_FF0AA124 \n"
 327 "    TST     R0, #1 \n"
 328 "    BEQ     loc_FF219A60 \n"
 329 "    B       loc_FF219A58 \n"
 330 
 331 "loc_FF219A04:\n"
 332 "    LDRH    R0, [R5, #0x9A] \n"
 333 "    CMP     R0, #3 \n"
 334 "    LDRNE   R0, [R4, #8] \n"
 335 "    CMPNE   R0, #1 \n"
 336 "    BLS     loc_FF219A40 \n"
 337 "    LDRH    R0, [R5, #0x96] \n"
 338 "    CMP     R0, #3 \n"
 339 "    BNE     loc_FF219A2C \n"
 340 "    TST     R1, #2 \n"
 341 "    BNE     loc_FF219A60 \n"
 342 
 343 "loc_FF219A2C:\n"
 344 "    BL      sub_FF023F74 \n"
 345 "    TST     R0, #1 \n"
 346 "    BEQ     loc_FF219A60 \n"
 347 "    BL      sub_FF0AA18C \n"
 348 "    B       loc_FF219A58 \n"
 349 
 350 "loc_FF219A40:\n"
 351 "    MOV     R0, #0xC \n"
 352 "    BL      sub_FF0AA124 \n"
 353 "    TST     R0, #1 \n"
 354 "    BEQ     loc_FF219A60 \n"
 355 "    BL      sub_FF21A274 \n"
 356 "    BL      sub_FF0A0BA0 \n"
 357 
 358 "loc_FF219A58:\n"
 359 "    MOV     R0, #1 \n"
 360 "    LDMFD   SP!, {R3-R7,PC} \n"
 361 
 362 "loc_FF219A60:\n"
 363 "    BL      sub_FF0A3890 \n"
 364 "    LDR     R0, [R5, #0x28] \n"
 365 "    CMP     R0, #0 \n"
 366 "    BNE     loc_FF219B98 \n"
 367 "    MOV     R0, R4 \n"
 368 "    BL      sub_FF218A30 \n"
 369 "    TST     R0, #1 \n"
 370 "    LDMNEFD SP!, {R3-R7,PC} \n"
 371 "    LDR     R0, [R5, #0x8C] \n"
 372 "    AND     R0, R0, #0x40 \n"
 373 "    CMP     R0, #0 \n"
 374 "    LDRNEH  R0, [R5, #0x9A] \n"
 375 "    CMPNE   R0, #3 \n"
 376 "    LDRNE   R0, [R4, #8] \n"
 377 "    CMPNE   R0, #1 \n"
 378 "    BLS     loc_FF219ABC \n"
 379 "    BL      sub_FF21A6C4 \n"
 380 "    MOV     R3, #0xC0 \n"
 381 "    STR     R3, [SP] \n"
 382 "    LDR     R2, =0x3A98 \n"
 383 "    LDR     R3, =0xFF219CD4 /*'SsCaptureSeq.c'*/ \n"
 384 "    MOV     R1, #0x8000 \n"
 385 "    BL      sub_FF0AA39C \n"
 386 
 387 "loc_FF219ABC:\n"
 388 "    LDR     R0, [R5, #0x8C] \n"
 389 "    AND     R0, R0, #6 \n"
 390 "    CMP     R0, #0 \n"
 391 "    LDRNEH  R0, [R5, #0x9A] \n"
 392 "    CMPNE   R0, #3 \n"
 393 "    LDRNE   R0, [R4, #8] \n"
 394 "    CMPNE   R0, #1 \n"
 395 "    BHI     loc_FF219AE8 \n"
 396 "    MOV     R0, R4 \n"
 397 "    BL      sub_FF218E40 \n"
 398 "    BL      sub_FF21A1B8 \n"
 399 
 400 "loc_FF219AE8:\n"
 401 
 402 "    BL      wait_until_remote_button_is_released\n"    // added
 403 "    BL      capt_seq_hook_set_nr\n"                    // added
 404 
 405 "    LDR     R0, [R5, #0x8C] \n"
 406 "    TST     R0, #0x40 \n"
 407 "    BEQ     loc_FF219B50 \n"
 408 "    LDR     R0, =0x181 \n"
 409 "    MOV     R2, #4 \n"
 410 "    MOV     R1, SP \n"
 411 "    BL      _GetPropertyCase \n"
 412 "    TST     R0, #1 \n"
 413 "    MOVNE   R1, #0xD4 \n"
 414 "    LDRNE   R0, =0xFF219CD4 /*'SsCaptureSeq.c'*/ \n"
 415 "    BLNE    _DebugAssert \n"
 416 "    LDR     R0, [SP] \n"
 417 "    CMP     R0, #0 \n"
 418 "    BNE     loc_FF219B30 \n"
 419 "    BL      sub_FF21A6C4 \n"
 420 "    MOV     R1, #0x8000 \n"
 421 "    BL      sub_0068ECDC /*_SetEventFlag*/ \n"
 422 "    B       loc_FF219B50 \n"
 423 
 424 "loc_FF219B30:\n"
 425 "    BL      sub_FF21A6C4 \n"
 426 "    MOV     R1, #0x8000 \n"
 427 "    BL      sub_0068ED10 /*_ClearEventFlag*/ \n"
 428 "    LDR     R2, =0xFF2199B4 \n"
 429 "    LDR     R0, [SP] \n"
 430 "    MOV     R3, #0x8000 \n"
 431 "    MOV     R1, R2 \n"
 432 "    BL      sub_FF03B6B0 /*_SetTimerAfter*/ \n"
 433 
 434 "loc_FF219B50:\n"
 435 "    LDR     R0, [R5, #0x8C] \n"
 436 "    AND     R0, R0, #6 \n"
 437 "    CMP     R0, #0 \n"
 438 "    LDRNEH  R0, [R5, #0x9A] \n"
 439 "    CMPNE   R0, #3 \n"
 440 "    LDRNE   R0, [R4, #8] \n"
 441 "    CMPNE   R0, #1 \n"
 442 "    MOVLS   R0, #2 \n"
 443 "    BLLS    sub_FF0AB8E0 \n"
 444 "    LDR     R0, [R5, #0x8C] \n"
 445 "    TST     R0, #0x10 \n"
 446 "    MOV     R0, R4 \n"
 447 "    BEQ     loc_FF219B8C \n"
 448 "    BL      sub_FF3E6858 \n"
 449 "    B       loc_FF219B90 \n"
 450 
 451 "loc_FF219B8C:\n"
 452 "    BL      sub_FF2194F4 \n"
 453 
 454 "loc_FF219B90:\n"
 455 "    MOV     R6, R0 \n"
 456 "    B       loc_FF219BA8 \n"
 457 
 458 "loc_FF219B98:\n"
 459 "    LDR     R0, =0xB6D0 \n"
 460 "    LDR     R0, [R0] \n"
 461 "    CMP     R0, #0 \n"
 462 "    MOVNE   R6, #0x1D \n"
 463 
 464 "loc_FF219BA8:\n"
 465 "    MOV     R0, R6 \n"
 466 "    LDMFD   SP!, {R3-R7,PC} \n"
 467 );
 468 }
 469 
 470 /*************************************************************/
 471 //** exp_drv_task @ 0xFF0F05BC - 0xFF0F0C4C, length=421
 472 void __attribute__((naked,noinline)) exp_drv_task() {
 473 asm volatile (
 474 "    STMFD   SP!, {R4-R9,LR} \n"
 475 "    SUB     SP, SP, #0x2C \n"
 476 "    LDR     R6, =0x4A6C \n"
 477 "    LDR     R7, =0xBB8 \n"
 478 "    LDR     R4, =0xBD660 \n"
 479 "    MOV     R0, #0 \n"
 480 "    ADD     R5, SP, #0x1C \n"
 481 "    STR     R0, [SP, #0xC] \n"
 482 
 483 "loc_FF0F05DC:\n"
 484 "    LDR     R0, [R6, #0x20] \n"
 485 "    MOV     R2, #0 \n"
 486 "    ADD     R1, SP, #0x28 \n"
 487 "    BL      sub_0068EF6C /*_ReceiveMessageQueue*/ \n"
 488 "    LDR     R0, [SP, #0xC] \n"
 489 "    CMP     R0, #1 \n"
 490 "    BNE     loc_FF0F0628 \n"
 491 "    LDR     R0, [SP, #0x28] \n"
 492 "    LDR     R0, [R0] \n"
 493 "    CMP     R0, #0x14 \n"
 494 "    CMPNE   R0, #0x15 \n"
 495 "    CMPNE   R0, #0x16 \n"
 496 "    CMPNE   R0, #0x17 \n"
 497 "    BEQ     loc_FF0F0788 \n"
 498 "    CMP     R0, #0x2A \n"
 499 "    BEQ     loc_FF0F0710 \n"
 500 "    ADD     R1, SP, #0xC \n"
 501 "    MOV     R0, #0 \n"
 502 "    BL      sub_FF0F056C \n"
 503 
 504 "loc_FF0F0628:\n"
 505 "    LDR     R0, [SP, #0x28] \n"
 506 "    LDR     R1, [R0] \n"
 507 "    CMP     R1, #0x30 \n"
 508 "    BNE     loc_FF0F0654 \n"
 509 "    BL      sub_FF0F19B8 \n"
 510 "    LDR     R0, [R6, #0x1C] \n"
 511 "    MOV     R1, #1 \n"
 512 "    BL      sub_0068ECDC /*_SetEventFlag*/ \n"
 513 "    BL      _ExitTask \n"
 514 "    ADD     SP, SP, #0x2C \n"
 515 "    LDMFD   SP!, {R4-R9,PC} \n"
 516 
 517 "loc_FF0F0654:\n"
 518 "    CMP     R1, #0x2F \n"
 519 "    BNE     loc_FF0F0670 \n"
 520 "    LDR     R2, [R0, #0x8C]! \n"
 521 "    LDR     R1, [R0, #4] \n"
 522 "    MOV     R0, R1 \n"
 523 "    BLX     R2 \n"
 524 "    B       loc_FF0F0C44 \n"
 525 
 526 "loc_FF0F0670:\n"
 527 "    CMP     R1, #0x28 \n"
 528 "    BNE     loc_FF0F06C0 \n"
 529 "    LDR     R0, [R6, #0x1C] \n"
 530 "    MOV     R1, #0x80 \n"
 531 "    BL      sub_0068ED10 /*_ClearEventFlag*/ \n"
 532 "    LDR     R0, =0xFF0EB498 \n"
 533 "    MOV     R1, #0x80 \n"
 534 "    BL      sub_FF1DFEF8 \n"
 535 "    LDR     R0, [R6, #0x1C] \n"
 536 "    MOV     R2, R7 \n"
 537 "    MOV     R1, #0x80 \n"
 538 "    BL      sub_0068EC1C /*_WaitForAllEventFlag*/ \n"
 539 "    TST     R0, #1 \n"
 540 "    LDRNE   R1, =0x1599 \n"
 541 "    BNE     loc_FF0F077C \n"
 542 
 543 "loc_FF0F06AC:\n"
 544 "    LDR     R1, [SP, #0x28] \n"
 545 "    LDR     R0, [R1, #0x90] \n"
 546 "    LDR     R1, [R1, #0x8C] \n"
 547 "    BLX     R1 \n"
 548 "    B       loc_FF0F0C44 \n"
 549 
 550 "loc_FF0F06C0:\n"
 551 "    CMP     R1, #0x29 \n"
 552 "    BNE     loc_FF0F0708 \n"
 553 "    ADD     R1, SP, #0xC \n"
 554 "    BL      sub_FF0F056C \n"
 555 "    LDR     R0, [R6, #0x1C] \n"
 556 "    MOV     R1, #0x100 \n"
 557 "    BL      sub_0068ED10 /*_ClearEventFlag*/ \n"
 558 "    LDR     R0, =0xFF0EB4A8 \n"
 559 "    MOV     R1, #0x100 \n"
 560 "    BL      sub_FF1E0098 \n"
 561 "    LDR     R0, [R6, #0x1C] \n"
 562 "    MOV     R2, R7 \n"
 563 "    MOV     R1, #0x100 \n"
 564 "    BL      sub_0068EC1C /*_WaitForAllEventFlag*/ \n"
 565 "    TST     R0, #1 \n"
 566 "    BEQ     loc_FF0F06AC \n"
 567 "    LDR     R1, =0x15A3 \n"
 568 "    B       loc_FF0F077C \n"
 569 
 570 "loc_FF0F0708:\n"
 571 "    CMP     R1, #0x2A \n"
 572 "    BNE     loc_FF0F0720 \n"
 573 
 574 "loc_FF0F0710:\n"
 575 "    LDR     R0, [SP, #0x28] \n"
 576 "    ADD     R1, SP, #0xC \n"
 577 "    BL      sub_FF0F056C \n"
 578 "    B       loc_FF0F06AC \n"
 579 
 580 "loc_FF0F0720:\n"
 581 "    CMP     R1, #0x2D \n"
 582 "    BNE     loc_FF0F0738 \n"
 583 "    BL      sub_FF0DB530 \n"
 584 "    BL      sub_FF0DC21C \n"
 585 "    BL      sub_FF0DBD84 \n"
 586 "    B       loc_FF0F06AC \n"
 587 
 588 "loc_FF0F0738:\n"
 589 "    CMP     R1, #0x2E \n"
 590 "    BNE     loc_FF0F0788 \n"
 591 "    LDR     R0, [R6, #0x1C] \n"
 592 "    MOV     R1, #4 \n"
 593 "    BL      sub_0068ED10 /*_ClearEventFlag*/ \n"
 594 "    LDR     R1, =0xFF0EB4C8 \n"
 595 "    LDR     R0, =0xFFFFF400 \n"
 596 "    MOV     R2, #4 \n"
 597 "    BL      sub_FF0DAF80 \n"
 598 "    BL      sub_FF0DB210 \n"
 599 "    LDR     R0, [R6, #0x1C] \n"
 600 "    MOV     R2, R7 \n"
 601 "    MOV     R1, #4 \n"
 602 "    BL      sub_0068EB38 /*_WaitForAnyEventFlag*/ \n"
 603 "    TST     R0, #1 \n"
 604 "    BEQ     loc_FF0F06AC \n"
 605 "    LDR     R1, =0x15CB \n"
 606 
 607 "loc_FF0F077C:\n"
 608 "    LDR     R0, =0xFF0EBCA8 /*'ExpDrv.c'*/ \n"
 609 "    BL      _DebugAssert \n"
 610 "    B       loc_FF0F06AC \n"
 611 
 612 "loc_FF0F0788:\n"
 613 "    LDR     R0, [SP, #0x28] \n"
 614 "    MOV     R8, #1 \n"
 615 "    LDR     R1, [R0] \n"
 616 "    CMP     R1, #0x12 \n"
 617 "    CMPNE   R1, #0x13 \n"
 618 "    BNE     loc_FF0F07F0 \n"
 619 "    LDR     R1, [R0, #0x7C] \n"
 620 "    ADD     R1, R1, R1, LSL#1 \n"
 621 "    ADD     R1, R0, R1, LSL#2 \n"
 622 "    SUB     R1, R1, #8 \n"
 623 "    LDMIA   R1, {R2,R3,R9} \n"
 624 "    STMIA   R5, {R2,R3,R9} \n"
 625 "    BL      sub_FF0EE730 \n"
 626 "    LDR     R0, [SP, #0x28] \n"
 627 "    LDR     R1, [R0, #0x7C] \n"
 628 "    LDR     R3, [R0, #0x8C] \n"
 629 "    LDR     R2, [R0, #0x90] \n"
 630 "    ADD     R0, R0, #4 \n"
 631 "    BLX     R3 \n"
 632 "    LDR     R0, [SP, #0x28] \n"
 633 "    BL      sub_FF0F1DD8 \n"
 634 "    LDR     R0, [SP, #0x28] \n"
 635 "    LDR     R1, [R0, #0x7C] \n"
 636 "    LDR     R2, [R0, #0x98] \n"
 637 "    LDR     R3, [R0, #0x94] \n"
 638 "    B       loc_FF0F0B08 \n"
 639 
 640 "loc_FF0F07F0:\n"
 641 "    CMP     R1, #0x14 \n"
 642 "    CMPNE   R1, #0x15 \n"
 643 "    CMPNE   R1, #0x16 \n"
 644 "    CMPNE   R1, #0x17 \n"
 645 "    BNE     loc_FF0F08A8 \n"
 646 "    ADD     R3, SP, #0xC \n"
 647 "    MOV     R2, SP \n"
 648 "    ADD     R1, SP, #0x1C \n"
 649 "    BL      sub_FF0EE990 \n"
 650 "    CMP     R0, #1 \n"
 651 "    MOV     R9, R0 \n"
 652 "    CMPNE   R9, #5 \n"
 653 "    BNE     loc_FF0F0844 \n"
 654 "    LDR     R0, [SP, #0x28] \n"
 655 "    MOV     R2, R9 \n"
 656 "    LDR     R1, [R0, #0x7C]! \n"
 657 "    LDR     R12, [R0, #0x10]! \n"
 658 "    LDR     R3, [R0, #4] \n"
 659 "    MOV     R0, SP \n"
 660 "    BLX     R12 \n"
 661 "    B       loc_FF0F087C \n"
 662 
 663 "loc_FF0F0844:\n"
 664 "    LDR     R0, [SP, #0x28] \n"
 665 "    CMP     R9, #2 \n"
 666 "    LDR     R3, [R0, #0x90] \n"
 667 "    CMPNE   R9, #6 \n"
 668 "    BNE     loc_FF0F0890 \n"
 669 "    LDR     R12, [R0, #0x8C] \n"
 670 "    MOV     R2, R9 \n"
 671 "    MOV     R1, #1 \n"
 672 "    MOV     R0, SP \n"
 673 "    BLX     R12 \n"
 674 "    LDR     R0, [SP, #0x28] \n"
 675 "    MOV     R2, SP \n"
 676 "    ADD     R1, SP, #0x1C \n"
 677 "    BL      sub_FF0F0244 \n"
 678 
 679 "loc_FF0F087C:\n"
 680 "    LDR     R0, [SP, #0x28] \n"
 681 "    LDR     R2, [SP, #0xC] \n"
 682 "    MOV     R1, R9 \n"
 683 "    BL      sub_FF0F050C \n"
 684 "    B       loc_FF0F0B10 \n"
 685 
 686 "loc_FF0F0890:\n"
 687 "    LDR     R1, [R0, #0x7C] \n"
 688 "    LDR     R12, [R0, #0x8C] \n"
 689 "    MOV     R2, R9 \n"
 690 "    ADD     R0, R0, #4 \n"
 691 "    BLX     R12 \n"
 692 "    B       loc_FF0F0B10 \n"
 693 
 694 "loc_FF0F08A8:\n"
 695 "    CMP     R1, #0x24 \n"
 696 "    CMPNE   R1, #0x25 \n"
 697 "    BNE     loc_FF0F08F4 \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,R3,R9} \n"
 703 "    STMIA   R5, {R2,R3,R9} \n"
 704 "    BL      sub_FF0ED4B0 \n"
 705 "    LDR     R0, [SP, #0x28] \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, #0x28] \n"
 712 "    BL      sub_FF0ED984 \n"
 713 "    B       loc_FF0F0B10 \n"
 714 
 715 "loc_FF0F08F4:\n"
 716 "    ADD     R1, R0, #4 \n"
 717 "    LDMIA   R1, {R2,R3,R9} \n"
 718 "    STMIA   R5, {R2,R3,R9} \n"
 719 "    LDR     R1, [R0] \n"
 720 "    CMP     R1, #0x28 \n"
 721 "    ADDCC   PC, PC, R1, LSL#2 \n"
 722 "    B       loc_FF0F0AF8 \n"
 723 "    B       loc_FF0F09B0 \n"
 724 "    B       loc_FF0F09B0 \n"
 725 "    B       loc_FF0F09B8 \n"
 726 "    B       loc_FF0F09C0 \n"
 727 "    B       loc_FF0F09C0 \n"
 728 "    B       loc_FF0F09C0 \n"
 729 "    B       loc_FF0F09B0 \n"
 730 "    B       loc_FF0F09B8 \n"
 731 "    B       loc_FF0F09C0 \n"
 732 "    B       loc_FF0F09C0 \n"
 733 "    B       loc_FF0F09D8 \n"
 734 "    B       loc_FF0F09D8 \n"
 735 "    B       loc_FF0F0AE4 \n"
 736 "    B       loc_FF0F0AEC \n"
 737 "    B       loc_FF0F0AEC \n"
 738 "    B       loc_FF0F0AEC \n"
 739 "    B       loc_FF0F0AEC \n"
 740 "    B       loc_FF0F0AF4 \n"
 741 "    B       loc_FF0F0AF8 \n"
 742 "    B       loc_FF0F0AF8 \n"
 743 "    B       loc_FF0F0AF8 \n"
 744 "    B       loc_FF0F0AF8 \n"
 745 "    B       loc_FF0F0AF8 \n"
 746 "    B       loc_FF0F0AF8 \n"
 747 "    B       loc_FF0F09C8 \n"
 748 "    B       loc_FF0F09D0 \n"
 749 "    B       loc_FF0F09D0 \n"
 750 "    B       loc_FF0F09D0 \n"
 751 "    B       loc_FF0F09E4 \n"
 752 "    B       loc_FF0F09E4 \n"
 753 "    B       loc_FF0F09EC \n"
 754 "    B       loc_FF0F0A24 \n"
 755 "    B       loc_FF0F0A5C \n"
 756 "    B       loc_FF0F0A94 \n"
 757 "    B       loc_FF0F0ACC \n"
 758 "    B       loc_FF0F0ACC \n"
 759 "    B       loc_FF0F0AF8 \n"
 760 "    B       loc_FF0F0AF8 \n"
 761 "    B       loc_FF0F0AD4 \n"
 762 "    B       loc_FF0F0ADC \n"
 763 
 764 "loc_FF0F09B0:\n"
 765 "    BL      sub_FF0EBADC \n"
 766 "    B       loc_FF0F0AF8 \n"
 767 
 768 "loc_FF0F09B8:\n"
 769 "    BL      sub_FF0EBDD4 \n"
 770 "    B       loc_FF0F0AF8 \n"
 771 
 772 "loc_FF0F09C0:\n"
 773 "    BL      sub_FF0EC03C \n"
 774 "    B       loc_FF0F0AF8 \n"
 775 
 776 "loc_FF0F09C8:\n"
 777 "    BL      sub_FF0EC330 \n"
 778 "    B       loc_FF0F0AF8 \n"
 779 
 780 "loc_FF0F09D0:\n"
 781 "    BL      sub_FF0EC548 \n"
 782 "    B       loc_FF0F0AF8 \n"
 783 
 784 "loc_FF0F09D8:\n"
 785 "    BL      sub_FF0ECA38_my \n"  // --> Patched. Old value = 0xFF0ECA38.
 786 "    MOV     R8, #0 \n"
 787 "    B       loc_FF0F0AF8 \n"
 788 
 789 "loc_FF0F09E4:\n"
 790 "    BL      sub_FF0ECC14 \n"
 791 "    B       loc_FF0F0AF8 \n"
 792 
 793 "loc_FF0F09EC:\n"
 794 "    LDRH    R1, [R0, #4] \n"
 795 "    STRH    R1, [SP, #0x1C] \n"
 796 "    LDRH    R1, [R4, #2] \n"
 797 "    STRH    R1, [SP, #0x1E] \n"
 798 "    LDRH    R1, [R4, #4] \n"
 799 "    STRH    R1, [SP, #0x20] \n"
 800 "    LDRH    R1, [R4, #6] \n"
 801 "    STRH    R1, [SP, #0x22] \n"
 802 "    LDRH    R1, [R0, #0xC] \n"
 803 "    STRH    R1, [SP, #0x24] \n"
 804 "    LDRH    R1, [R4, #0xA] \n"
 805 "    STRH    R1, [SP, #0x26] \n"
 806 "    BL      sub_FF0F1A4C \n"
 807 "    B       loc_FF0F0AF8 \n"
 808 
 809 "loc_FF0F0A24:\n"
 810 "    LDRH    R1, [R0, #4] \n"
 811 "    STRH    R1, [SP, #0x1C] \n"
 812 "    LDRH    R1, [R4, #2] \n"
 813 "    STRH    R1, [SP, #0x1E] \n"
 814 "    LDRH    R1, [R4, #4] \n"
 815 "    STRH    R1, [SP, #0x20] \n"
 816 "    LDRH    R1, [R4, #6] \n"
 817 "    STRH    R1, [SP, #0x22] \n"
 818 "    LDRH    R1, [R4, #8] \n"
 819 "    STRH    R1, [SP, #0x24] \n"
 820 "    LDRH    R1, [R4, #0xA] \n"
 821 "    STRH    R1, [SP, #0x26] \n"
 822 "    BL      sub_FF0F1BD8 \n"
 823 "    B       loc_FF0F0AF8 \n"
 824 
 825 "loc_FF0F0A5C:\n"
 826 "    LDRH    R1, [R4] \n"
 827 "    STRH    R1, [SP, #0x1C] \n"
 828 "    LDRH    R1, [R0, #6] \n"
 829 "    STRH    R1, [SP, #0x1E] \n"
 830 "    LDRH    R1, [R4, #4] \n"
 831 "    STRH    R1, [SP, #0x20] \n"
 832 "    LDRH    R1, [R4, #6] \n"
 833 "    STRH    R1, [SP, #0x22] \n"
 834 "    LDRH    R1, [R4, #8] \n"
 835 "    STRH    R1, [SP, #0x24] \n"
 836 "    LDRH    R1, [R4, #0xA] \n"
 837 "    STRH    R1, [SP, #0x26] \n"
 838 "    BL      sub_FF0F1C8C \n"
 839 "    B       loc_FF0F0AF8 \n"
 840 
 841 "loc_FF0F0A94:\n"
 842 "    LDRH    R1, [R4] \n"
 843 "    STRH    R1, [SP, #0x1C] \n"
 844 "    LDRH    R1, [R4, #2] \n"
 845 "    STRH    R1, [SP, #0x1E] \n"
 846 "    LDRH    R1, [R4, #4] \n"
 847 "    STRH    R1, [SP, #0x20] \n"
 848 "    LDRH    R1, [R4, #6] \n"
 849 "    STRH    R1, [SP, #0x22] \n"
 850 "    LDRH    R1, [R0, #0xC] \n"
 851 "    STRH    R1, [SP, #0x24] \n"
 852 "    LDRH    R1, [R4, #0xA] \n"
 853 "    STRH    R1, [SP, #0x26] \n"
 854 "    BL      sub_FF0F1D34 \n"
 855 "    B       loc_FF0F0AF8 \n"
 856 
 857 "loc_FF0F0ACC:\n"
 858 "    BL      sub_FF0ED264 \n"
 859 "    B       loc_FF0F0AF8 \n"
 860 
 861 "loc_FF0F0AD4:\n"
 862 "    BL      sub_FF0EDA88 \n"
 863 "    B       loc_FF0F0AF8 \n"
 864 
 865 "loc_FF0F0ADC:\n"
 866 "    BL      sub_FF0EDFE0 \n"
 867 "    B       loc_FF0F0AF8 \n"
 868 
 869 "loc_FF0F0AE4:\n"
 870 "    BL      sub_FF0EE204 \n"
 871 "    B       loc_FF0F0AF8 \n"
 872 
 873 "loc_FF0F0AEC:\n"
 874 "    BL      sub_FF0EE3C0 \n"
 875 "    B       loc_FF0F0AF8 \n"
 876 
 877 "loc_FF0F0AF4:\n"
 878 "    BL      sub_FF0EE528 \n"
 879 
 880 "loc_FF0F0AF8:\n"
 881 "    LDR     R0, [SP, #0x28] \n"
 882 "    LDR     R1, [R0, #0x7C] \n"
 883 "    LDR     R2, [R0, #0x90] \n"
 884 "    LDR     R3, [R0, #0x8C] \n"
 885 
 886 "loc_FF0F0B08:\n"
 887 "    ADD     R0, R0, #4 \n"
 888 "    BLX     R3 \n"
 889 
 890 "loc_FF0F0B10:\n"
 891 "    LDR     R0, [SP, #0x28] \n"
 892 "    LDR     R0, [R0] \n"
 893 "    CMP     R0, #0x10 \n"
 894 "    BEQ     loc_FF0F0B48 \n"
 895 "    BGT     loc_FF0F0B38 \n"
 896 "    CMP     R0, #1 \n"
 897 "    CMPNE   R0, #4 \n"
 898 "    CMPNE   R0, #0xE \n"
 899 "    BNE     loc_FF0F0B7C \n"
 900 "    B       loc_FF0F0B48 \n"
 901 
 902 "loc_FF0F0B38:\n"
 903 "    CMP     R0, #0x13 \n"
 904 "    CMPNE   R0, #0x17 \n"
 905 "    CMPNE   R0, #0x1A \n"
 906 "    BNE     loc_FF0F0B7C \n"
 907 
 908 "loc_FF0F0B48:\n"
 909 "    LDRSH   R0, [R4] \n"
 910 "    CMN     R0, #0xC00 \n"
 911 "    LDRNESH R1, [R4, #8] \n"
 912 "    CMNNE   R1, #0xC00 \n"
 913 "    STRNEH  R0, [SP, #0x1C] \n"
 914 "    STRNEH  R1, [SP, #0x24] \n"
 915 "    BNE     loc_FF0F0B7C \n"
 916 "    ADD     R0, SP, #0x10 \n"
 917 "    BL      sub_FF0F1FE8 \n"
 918 "    LDRH    R0, [SP, #0x10] \n"
 919 "    STRH    R0, [SP, #0x1C] \n"
 920 "    LDRH    R0, [SP, #0x18] \n"
 921 "    STRH    R0, [SP, #0x24] \n"
 922 
 923 "loc_FF0F0B7C:\n"
 924 "    LDR     R0, [SP, #0x28] \n"
 925 "    CMP     R8, #1 \n"
 926 "    BNE     loc_FF0F0BCC \n"
 927 "    LDR     R1, [R0, #0x7C] \n"
 928 "    MOV     R2, #0xC \n"
 929 "    ADD     R1, R1, R1, LSL#1 \n"
 930 "    ADD     R0, R0, R1, LSL#2 \n"
 931 "    SUB     R8, R0, #8 \n"
 932 "    LDR     R0, =0xBD660 \n"
 933 "    ADD     R1, SP, #0x1C \n"
 934 "    BL      sub_006AB5FC \n"
 935 "    LDR     R0, =0xBD66C \n"
 936 "    MOV     R2, #0xC \n"
 937 "    ADD     R1, SP, #0x1C \n"
 938 "    BL      sub_006AB5FC \n"
 939 "    LDR     R0, =0xBD678 \n"
 940 "    MOV     R2, #0xC \n"
 941 "    MOV     R1, R8 \n"
 942 "    BL      sub_006AB5FC \n"
 943 "    B       loc_FF0F0C44 \n"
 944 
 945 "loc_FF0F0BCC:\n"
 946 "    LDR     R0, [R0] \n"
 947 "    MOV     R3, #1 \n"
 948 "    CMP     R0, #0xB \n"
 949 "    BNE     loc_FF0F0C10 \n"
 950 "    MOV     R2, #0 \n"
 951 "    STRD    R2, [SP] \n"
 952 "    MOV     R2, R3 \n"
 953 "    MOV     R1, R3 \n"
 954 "    MOV     R0, #0 \n"
 955 "    BL      sub_FF0EB8BC \n"
 956 "    MOV     R3, #1 \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 "    B       loc_FF0F0C40 \n"
 963 
 964 "loc_FF0F0C10:\n"
 965 "    MOV     R2, #1 \n"
 966 "    STRD    R2, [SP] \n"
 967 "    MOV     R3, R2 \n"
 968 "    MOV     R1, R2 \n"
 969 "    MOV     R0, R2 \n"
 970 "    BL      sub_FF0EB8BC \n"
 971 "    MOV     R3, #1 \n"
 972 "    MOV     R2, R3 \n"
 973 "    MOV     R1, R3 \n"
 974 "    MOV     R0, R3 \n"
 975 "    STR     R3, [SP] \n"
 976 "    STR     R3, [SP, #4] \n"
 977 
 978 "loc_FF0F0C40:\n"
 979 "    BL      sub_FF0EBA28 \n"
 980 
 981 "loc_FF0F0C44:\n"
 982 "    LDR     R0, [SP, #0x28] \n"
 983 "    BL      sub_FF0F19B8 \n"
 984 "    B       loc_FF0F05DC \n"
 985 );
 986 }
 987 
 988 /*************************************************************/
 989 //** sub_FF0ECA38_my @ 0xFF0ECA38 - 0xFF0ECAF8, length=49
 990 void __attribute__((naked,noinline)) sub_FF0ECA38_my() {
 991 asm volatile (
 992 "    STMFD   SP!, {R4-R8,LR} \n"
 993 "    LDR     R7, =0x4A6C \n"
 994 "    MOV     R4, R0 \n"
 995 "    LDR     R0, [R7, #0x1C] \n"
 996 "    MOV     R1, #0x3E \n"
 997 "    BL      sub_0068ED10 /*_ClearEventFlag*/ \n"
 998 "    MOV     R2, #0 \n"
 999 "    LDRSH   R0, [R4, #4] \n"
1000 "    MOV     R1, R2 \n"
1001 "    BL      sub_FF0EB528 \n"
1002 "    MOV     R6, R0 \n"
1003 "    LDRSH   R0, [R4, #6] \n"
1004 "    BL      sub_FF0EB6CC \n"
1005 "    LDRSH   R0, [R4, #8] \n"
1006 "    BL      sub_FF0EB724 \n"
1007 "    LDRSH   R0, [R4, #0xA] \n"
1008 "    BL      sub_FF0EB77C \n"
1009 "    LDRSH   R0, [R4, #0xC] \n"
1010 "    MOV     R1, #0 \n"
1011 "    BL      sub_FF0EB7D4 \n"
1012 "    MOV     R5, R0 \n"
1013 "    LDR     R0, [R4] \n"
1014 "    LDR     R8, =0xBD678 \n"
1015 "    CMP     R0, #0xB \n"
1016 "    MOVEQ   R6, #0 \n"
1017 "    MOVEQ   R5, R6 \n"
1018 "    BEQ     loc_FF0ECACC \n"
1019 "    CMP     R6, #1 \n"
1020 "    BNE     loc_FF0ECACC \n"
1021 "    LDRSH   R0, [R4, #4] \n"
1022 "    LDR     R1, =0xFF0EB488 \n"
1023 "    MOV     R2, #2 \n"
1024 "    BL      sub_FF1DFF7C \n"
1025 "    STRH    R0, [R4, #4] \n"
1026 "    MOV     R0, #0 \n"
1027 "    STR     R0, [R7, #0x28] \n"
1028 "    B       loc_FF0ECAD4 \n"
1029 
1030 "loc_FF0ECACC:\n"
1031 "    LDRH    R0, [R8] \n"
1032 "    STRH    R0, [R4, #4] \n"
1033 
1034 "loc_FF0ECAD4:\n"
1035 "    CMP     R5, #1 \n"
1036 "    LDRNEH  R0, [R8, #8] \n"
1037 "    BNE     loc_FF0ECAF0 \n"
1038 "    LDRSH   R0, [R4, #0xC] \n"
1039 "    LDR     R1, =0xFF0EB50C \n"
1040 "    MOV     R2, #0x20 \n"
1041 "    BL      sub_FF0F1A08 \n"
1042 
1043 "loc_FF0ECAF0:\n"
1044 "    STRH    R0, [R4, #0xC] \n"
1045 "    LDRSH   R0, [R4, #6] \n"
1046 "    BL      sub_FF0DB27C_my \n"  // --> Patched. Old value = 0xFF0DB27C.
1047 "    LDR     PC, =0xFF0ECAFC \n"  // Continue in firmware
1048 );
1049 }
1050 
1051 /*************************************************************/
1052 //** sub_FF0DB27C_my @ 0xFF0DB27C - 0xFF0DB2BC, length=17
1053 void __attribute__((naked,noinline)) sub_FF0DB27C_my() {
1054 asm volatile (
1055 "    STMFD   SP!, {R4-R6,LR} \n"
1056 "    LDR     R5, =0x46BC \n"
1057 "    MOV     R4, R0 \n"
1058 "    LDR     R0, [R5, #4] \n"
1059 "    CMP     R0, #1 \n"
1060 "    LDRNE   R1, =0x14D \n"
1061 "    LDRNE   R0, =0xFF0DB0B4 /*'Shutter.c'*/ \n"
1062 "    BLNE    _DebugAssert \n"
1063 "    CMN     R4, #0xC00 \n"
1064 "    LDREQSH R4, [R5, #2] \n"
1065 "    CMN     R4, #0xC00 \n"
1066 "    LDREQ   R1, =0x153 \n"
1067 "    LDREQ   R0, =0xFF0DB0B4 /*'Shutter.c'*/ \n"
1068 "    STRH    R4, [R5, #2] \n"
1069 "    BLEQ    _DebugAssert \n"
1070 "    MOV     R0, R4 \n"
1071 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
1072 "    LDR     PC, =0xFF0DB2C0 \n"  // Continue in firmware
1073 );
1074 }

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