root/platform/ixus132_elph115/sub/100b/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF1F8DF0_my
  3. sub_FF1F8D14_my
  4. sub_FF363088_my
  5. sub_FF362D64_my
  6. exp_drv_task
  7. sub_FF119ED0_my
  8. sub_FF108C94_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 // NOTE auto in P mode doesn't seem to ever enable dark frame, even if you override > 1.3 sec
   9 // TO DO: This value was copied from ixus140
  10 static long *nrflag = (long*)(0xE4F0+4);
  11 
  12 #include "../../../generic/capt_seq.c"
  13 
  14 /*************************************************************/
  15 //** capt_seq_task @ 0xFF0B05BC - 0xFF0B0850, length=166
  16 void __attribute__((naked,noinline)) capt_seq_task() {
  17 asm volatile (
  18 "    STMFD   SP!, {R3-R7,LR} \n"
  19 "    LDR     R5, =0x9EA24 \n"
  20 "    LDR     R7, =0x38E0 \n"
  21 "    MOV     R6, #0 \n"
  22 
  23 "loc_FF0B05CC:\n"
  24 "    LDR     R0, [R7, #4] \n"
  25 "    MOV     R2, #0 \n"
  26 "    MOV     R1, SP \n"
  27 "    BL      sub_00677418 /*_ReceiveMessageQueue*/ \n"
  28 "    TST     R0, #1 \n"
  29 "    BEQ     loc_FF0B05F8 \n"
  30 "    LDR     R1, =0x475 \n"
  31 "    LDR     R0, =0xFF0B0094 /*'SsShootTask.c'*/ \n"
  32 "    BL      _DebugAssert \n"
  33 "    BL      _ExitTask \n"
  34 "    LDMFD   SP!, {R3-R7,PC} \n"
  35 
  36 "loc_FF0B05F8:\n"
  37 "    LDR     R0, [SP] \n"
  38 "    LDR     R1, [R0] \n"
  39 "    CMP     R1, #0x22 \n"
  40 "    ADDCC   PC, PC, R1, LSL#2 \n"
  41 "    B       loc_FF0B0818 \n"
  42 "    B       loc_FF0B0694 \n"
  43 "    B       loc_FF0B06AC \n"
  44 "    B       loc_FF0B06B8 \n"
  45 "    B       loc_FF0B06CC \n"
  46 "    B       loc_FF0B06C4 \n"
  47 "    B       loc_FF0B06D8 \n"
  48 "    B       loc_FF0B06E0 \n"
  49 "    B       loc_FF0B06E8 \n"
  50 "    B       loc_FF0B06F4 \n"
  51 "    B       loc_FF0B0720 \n"
  52 "    B       loc_FF0B0700 \n"
  53 "    B       loc_FF0B070C \n"
  54 "    B       loc_FF0B0714 \n"
  55 "    B       loc_FF0B0728 \n"
  56 "    B       loc_FF0B0730 \n"
  57 "    B       loc_FF0B0738 \n"
  58 "    B       loc_FF0B0740 \n"
  59 "    B       loc_FF0B0748 \n"
  60 "    B       loc_FF0B0754 \n"
  61 "    B       loc_FF0B075C \n"
  62 "    B       loc_FF0B0764 \n"
  63 "    B       loc_FF0B076C \n"
  64 "    B       loc_FF0B0774 \n"
  65 "    B       loc_FF0B077C \n"
  66 "    B       loc_FF0B0784 \n"
  67 "    B       loc_FF0B078C \n"
  68 "    B       loc_FF0B0794 \n"
  69 "    B       loc_FF0B079C \n"
  70 "    B       loc_FF0B07A8 \n"
  71 "    B       loc_FF0B07B0 \n"
  72 "    B       loc_FF0B07BC \n"
  73 "    B       loc_FF0B07F8 \n"
  74 "    B       loc_FF0B0804 \n"
  75 "    B       loc_FF0B0824 \n"
  76 
  77 "loc_FF0B0694:\n"
  78 //"    BL      shooting_expo_iso_override\n"      // extra ISO override call doesn't appear to be needed on elph130
  79 "    BL      sub_FF0B0DB4 \n"
  80 "    BL      shooting_expo_param_override\n"    // added
  81 "    BL      sub_FF0AE138 \n"
  82 // try avoid intermittetant override failues on quick press, not needed?
  83 //"    MOV     R0, #0\n"                          // added
  84 //"    STR     R0, [R5,#0x28]\n"                  // added
  85 "    LDR     R0, [R5, #0x28] \n"
  86 "    CMP     R0, #0 \n"
  87 "    BLNE    sub_FF1F8DF0_my \n"  // --> Patched. Old value = 0xFF1F8DF0.
  88 "    B       loc_FF0B0824 \n"
  89 
  90 "loc_FF0B06AC:\n"
  91 "    LDR     R0, [R0, #0x10] \n"
  92 "    BL      sub_FF1F8D14_my \n"  // --> Patched. Old value = 0xFF1F8D14.
  93 "    B       loc_FF0B0824 \n"
  94 
  95 "loc_FF0B06B8:\n"
  96 "    MOV     R0, #1 \n"
  97 "    BL      sub_FF0B10C8 \n"
  98 "    B       loc_FF0B0824 \n"
  99 
 100 "loc_FF0B06C4:\n"
 101 "    BL      sub_FF0B09F0 \n"
 102 "    B       loc_FF0B06D0 \n"
 103 
 104 "loc_FF0B06CC:\n"
 105 "    BL      sub_FF0B0D90 \n"
 106 
 107 "loc_FF0B06D0:\n"
 108 "    STR     R6, [R5, #0x28] \n"
 109 "    B       loc_FF0B0824 \n"
 110 
 111 "loc_FF0B06D8:\n"
 112 "    BL      sub_FF0B0D98 \n"
 113 "    B       loc_FF0B0824 \n"
 114 
 115 "loc_FF0B06E0:\n"
 116 "    BL      sub_FF0B0F9C \n"
 117 "    B       loc_FF0B06F8 \n"
 118 
 119 "loc_FF0B06E8:\n"
 120 "    LDR     R0, [R0, #0x10] \n"
 121 "    BL      sub_FF1F8E80 \n"
 122 "    B       loc_FF0B0824 \n"
 123 
 124 "loc_FF0B06F4:\n"
 125 "    BL      sub_FF0B1020 \n"
 126 
 127 "loc_FF0B06F8:\n"
 128 "    BL      sub_FF0AE138 \n"
 129 "    B       loc_FF0B0824 \n"
 130 
 131 "loc_FF0B0700:\n"
 132 "    LDR     R0, [R5, #0x58] \n"
 133 "    BL      sub_FF0B1680 \n"
 134 "    B       loc_FF0B0824 \n"
 135 
 136 "loc_FF0B070C:\n"
 137 "    BL      sub_FF0B1AAC \n"
 138 "    B       loc_FF0B0824 \n"
 139 
 140 "loc_FF0B0714:\n"
 141 "    MOV     R0, #0 \n"
 142 "    BL      sub_FF0B1B10 \n"
 143 "    B       loc_FF0B0824 \n"
 144 
 145 "loc_FF0B0720:\n"
 146 "    BL      sub_FF0B0D90 \n"
 147 "    B       loc_FF0B0824 \n"
 148 
 149 "loc_FF0B0728:\n"
 150 "    BL      sub_FF1F81E8 \n"
 151 "    B       loc_FF0B0824 \n"
 152 
 153 "loc_FF0B0730:\n"
 154 "    BL      sub_FF1F8420 \n"
 155 "    B       loc_FF0B0824 \n"
 156 
 157 "loc_FF0B0738:\n"
 158 "    BL      sub_FF1F84DC \n"
 159 "    B       loc_FF0B0824 \n"
 160 
 161 "loc_FF0B0740:\n"
 162 "    BL      sub_FF1F85B0 \n"
 163 "    B       loc_FF0B0824 \n"
 164 
 165 "loc_FF0B0748:\n"
 166 "    MOV     R0, #0 \n"
 167 "    BL      sub_FF1F8868 \n"
 168 "    B       loc_FF0B0824 \n"
 169 
 170 "loc_FF0B0754:\n"
 171 "    BL      sub_FF1F89CC \n"
 172 "    B       loc_FF0B0824 \n"
 173 
 174 "loc_FF0B075C:\n"
 175 "    BL      sub_FF1F8A60 \n"
 176 "    B       loc_FF0B0824 \n"
 177 
 178 "loc_FF0B0764:\n"
 179 "    BL      sub_FF1F8B08 \n"
 180 "    B       loc_FF0B0824 \n"
 181 
 182 "loc_FF0B076C:\n"
 183 "    BL      sub_FF0B126C \n"
 184 "    B       loc_FF0B0824 \n"
 185 
 186 "loc_FF0B0774:\n"
 187 "    BL      sub_FF0B1300 \n"
 188 "    B       loc_FF0B0824 \n"
 189 
 190 "loc_FF0B077C:\n"
 191 "    BL      sub_FF1F8680 \n"
 192 "    B       loc_FF0B0824 \n"
 193 
 194 "loc_FF0B0784:\n"
 195 "    BL      sub_FF1F86E8 \n"
 196 "    B       loc_FF0B0824 \n"
 197 
 198 "loc_FF0B078C:\n"
 199 "    BL      sub_FF0B3F68 \n"
 200 "    B       loc_FF0B0824 \n"
 201 
 202 "loc_FF0B0794:\n"
 203 "    BL      sub_FF0B4060 \n"
 204 "    B       loc_FF0B0824 \n"
 205 
 206 "loc_FF0B079C:\n"
 207 "    LDR     R0, [R0, #0xC] \n"
 208 "    BL      sub_FF1F8C18 \n"
 209 "    B       loc_FF0B0824 \n"
 210 
 211 "loc_FF0B07A8:\n"
 212 "    BL      sub_FF1F8C88 \n"
 213 "    B       loc_FF0B0824 \n"
 214 
 215 "loc_FF0B07B0:\n"
 216 "    BL      sub_FF0B41EC \n"
 217 "    BL      sub_FF0B40B8 \n"
 218 "    B       loc_FF0B0824 \n"
 219 
 220 "loc_FF0B07BC:\n"
 221 "    MOV     R0, #1 \n"
 222 "    BL      sub_FF1F95F0 \n"
 223 "    MOV     R0, #1 \n"
 224 "    BL      sub_FF1F9724 \n"
 225 "    LDR     R0, =0x9EB24 \n"
 226 "    LDRH    R0, [R0, #0x8C] \n"
 227 "    CMP     R0, #4 \n"
 228 "    LDRNEH  R0, [R5] \n"
 229 "    SUBNE   R1, R0, #0x8000 \n"
 230 "    SUBNES  R1, R1, #0x230 \n"
 231 "    BNE     loc_FF0B0824 \n"
 232 "    BL      sub_FF0B4060 \n"
 233 "    BL      sub_FF0B4698 \n"
 234 "    BL      sub_FF0B44FC \n"
 235 "    B       loc_FF0B0824 \n"
 236 
 237 "loc_FF0B07F8:\n"
 238 "    MOV     R2, #0 \n"
 239 "    MOV     R1, #0xD \n"
 240 "    B       loc_FF0B080C \n"
 241 
 242 "loc_FF0B0804:\n"
 243 "    MOV     R2, #0 \n"
 244 "    MOV     R1, #0xC \n"
 245 
 246 "loc_FF0B080C:\n"
 247 "    MOV     R0, #0 \n"
 248 "    BL      sub_FF0AEA38 \n"
 249 "    B       loc_FF0B0824 \n"
 250 
 251 "loc_FF0B0818:\n"
 252 "    LDR     R1, =0x5DA \n"
 253 "    LDR     R0, =0xFF0B0094 /*'SsShootTask.c'*/ \n"
 254 "    BL      _DebugAssert \n"
 255 
 256 "loc_FF0B0824:\n"
 257 "    LDR     R0, [SP] \n"
 258 "    LDR     R1, [R0, #4] \n"
 259 "    LDR     R0, [R7] \n"
 260 "    BL      sub_0067F164 /*_SetEventFlag*/ \n"
 261 "    LDR     R4, [SP] \n"
 262 "    LDR     R0, [R4, #8] \n"
 263 "    CMP     R0, #0 \n"
 264 "    LDREQ   R1, =0x116 \n"
 265 "    LDREQ   R0, =0xFF0B0094 /*'SsShootTask.c'*/ \n"
 266 "    BLEQ    _DebugAssert \n"
 267 "    STR     R6, [R4, #8] \n"
 268 "    B       loc_FF0B05CC \n"
 269 );
 270 }
 271 
 272 /*************************************************************/
 273 //** sub_FF1F8DF0_my @ 0xFF1F8DF0 - 0xFF1F8E7C, length=36
 274 void __attribute__((naked,noinline)) sub_FF1F8DF0_my() {
 275 asm volatile (
 276 "    STMFD   SP!, {R4-R6,LR} \n"
 277 "    BL      sub_FF0AFCA8 \n"
 278 "    MOV     R4, R0 \n"
 279 "    MOV     R0, #0xC \n"
 280 "    BL      sub_FF0B5E14 \n"
 281 "    LDR     R6, =0x80CC \n"
 282 "    TST     R0, #1 \n"
 283 "    MOV     R5, #1 \n"
 284 "    BNE     loc_FF1F8E78 \n"
 285 "    BL      sub_FF0B0DA0 \n"
 286 "    BL      sub_FF0B1E38 \n"
 287 "    MOV     R1, R4 \n"
 288 "    BL      sub_FF0B1E90 \n"
 289 "    LDR     R0, =0x10E \n"
 290 "    MOV     R2, #4 \n"
 291 "    ADD     R1, R4, #0x30 \n"
 292 "    BL      _SetPropertyCase \n"
 293 "    MOV     R2, #4 \n"
 294 "    ADD     R1, R4, #0x34 \n"
 295 "    MOV     R0, #0x2C \n"
 296 "    BL      _SetPropertyCase \n"
 297 "    MOV     R2, #4 \n"
 298 "    ADD     R1, R4, #8 \n"
 299 "    MOV     R0, #0x3F \n"
 300 "    BL      _SetPropertyCase \n"
 301 "    BL      sub_FF1F98E4 \n"
 302 "    MVN     R1, #0x1000 \n"
 303 "    BL      sub_0067F198 /*_ClearEventFlag*/ \n"
 304 "    MOV     R0, R4 \n"
 305 "    BL      sub_FF362CB4 \n"
 306 "    MOV     R0, R4 \n"
 307 "    BL      sub_FF363088_my \n"  // --> Patched. Old value = 0xFF363088.
 308 "    TST     R0, #1 \n"
 309 "    LDMEQFD SP!, {R4-R6,PC} \n"
 310 
 311 "loc_FF1F8E78:\n"
 312 "    STR     R5, [R6] \n"
 313 "    LDMFD   SP!, {R4-R6,PC} \n"
 314 );
 315 }
 316 
 317 /*************************************************************/
 318 //** sub_FF1F8D14_my @ 0xFF1F8D14 - 0xFF1F8DCC, length=47
 319 void __attribute__((naked,noinline)) sub_FF1F8D14_my() {
 320 asm volatile (
 321 "    STMFD   SP!, {R4-R6,LR} \n"
 322 "    MOV     R5, R0 \n"
 323 "    LDR     R0, =0x80CC \n"
 324 "    LDR     R6, =0x9EA24 \n"
 325 "    LDR     R0, [R0] \n"
 326 "    MOV     R4, #0 \n"
 327 "    CMP     R0, #0 \n"
 328 "    MOVNE   R4, #0x1D \n"
 329 "    BNE     sub_FF1F8DD0 \n"
 330 "    LDR     R0, [R6, #0x28] \n"
 331 "    CMP     R0, #0 \n"
 332 "    BNE     sub_FF1F8DD0 \n"
 333 "    BL      sub_FF0B1E38 \n"
 334 "    MOV     R1, R5 \n"
 335 "    BL      sub_FF0B1E90 \n"
 336 "    LDR     R0, =0x10E \n"
 337 "    MOV     R2, #4 \n"
 338 "    ADD     R1, R5, #0x30 \n"
 339 "    BL      _SetPropertyCase \n"
 340 "    MOV     R2, #4 \n"
 341 "    ADD     R1, R5, #0x34 \n"
 342 "    MOV     R0, #0x2C \n"
 343 "    BL      _SetPropertyCase \n"
 344 "    MOV     R0, #0xC \n"
 345 "    BL      sub_FF0B5E14 \n"
 346 "    TST     R0, #1 \n"
 347 "    BEQ     loc_FF1F8D88 \n"
 348 "    BL      sub_FF0AE8A8 \n"
 349 "    MOV     R4, #1 \n"
 350 
 351 "loc_FF1F8D88:\n"
 352 "    TST     R4, #1 \n"
 353 "    BNE     sub_FF1F8DD0 \n"
 354 "    BL      sub_FF1F98E4 \n"
 355 "    MVN     R1, #0x1000 \n"
 356 "    BL      sub_0067F198 /*_ClearEventFlag*/ \n"
 357 "    MOV     R0, R5 \n"
 358 "    BL      sub_FF362404 \n"
 359 "    TST     R0, #1 \n"
 360 "    MOV     R4, R0 \n"
 361 "    BNE     sub_FF1F8DD0 \n"
 362 "    BL      sub_FF0B0DA0 \n"
 363 "    MOV     R0, R5 \n"
 364 "    BL      sub_FF362CB4 \n"
 365 "    MOV     R0, #2 \n"
 366 "    BL      sub_FF0B76C4 \n"
 367 "    MOV     R0, R5 \n"
 368 "    BL      sub_FF363088_my \n"  // --> Patched. Old value = 0xFF363088.
 369 "    MOV     R4, R0 \n"
 370 "    BL      capt_seq_hook_raw_here \n"         // added
 371 "    LDR     PC, =0xFF1F8DD0 \n"  // Continue in firmware
 372 );
 373 }
 374 
 375 /*************************************************************/
 376 //** sub_FF363088_my @ 0xFF363088 - 0xFF363114, length=36
 377 void __attribute__((naked,noinline)) sub_FF363088_my() {
 378 asm volatile (
 379 "    STMFD   SP!, {R2-R10,LR} \n"
 380 "    MOV     R4, R0 \n"
 381 "    BL      sub_FF362C1C \n"
 382 "    BL      sub_FF1F93B4 \n"
 383 "    LDR     R7, =0x9EA24 \n"
 384 "    LDR     R9, =0x820D \n"
 385 "    LDR     R0, [R7, #0x180] \n"
 386 "    ADD     R6, R7, #0x100 \n"
 387 "    CMP     R0, #2 \n"
 388 "    BNE     loc_FF3630D0 \n"
 389 "    LDRH    R0, [R7] \n"
 390 "    CMP     R0, R9 \n"
 391 "    LDRNEH  R0, [R6, #0x8A] \n"
 392 "    CMPNE   R0, #3 \n"
 393 "    LDRNE   R0, [R4, #8] \n"
 394 "    CMPNE   R0, #1 \n"
 395 "    MOVLS   R0, #4 \n"
 396 "    BLLS    sub_FF15C24C \n"
 397 
 398 "loc_FF3630D0:\n"
 399 "    LDR     R0, =0x12F \n"
 400 "    MOV     R2, #4 \n"
 401 "    ADD     R1, SP, #4 \n"
 402 "    BL      _GetPropertyCase \n"
 403 "    TST     R0, #1 \n"
 404 "    MOVNE   R1, #0x170 \n"
 405 "    LDRNE   R0, =0xFF363340 /*'SsStandardCaptureSeq.c'*/ \n"
 406 "    BLNE    _DebugAssert \n"
 407 "    LDR     R0, [SP, #4] \n"
 408 "    AND     R0, R0, #0xFF00 \n"
 409 "    CMP     R0, #0x600 \n"
 410 "    LDRNE   R0, =0xFF36291C \n"
 411 "    LDREQ   R0, =0xFF362FE0 \n"
 412 "    MOVNE   R1, R4 \n"
 413 "    MOVEQ   R1, #0 \n"
 414 "    BL      sub_FF110FE0 \n"
 415 "    MOV     R0, R4 \n"
 416 "    BL      sub_FF362D64_my \n"  // --> Patched. Old value = 0xFF362D64.
 417 "    LDR     PC, =0xFF363118 \n"  // Continue in firmware
 418 );
 419 }
 420 
 421 /*************************************************************/
 422 //** sub_FF362D64_my @ 0xFF362D64 - 0xFF362E08, length=42
 423 void __attribute__((naked,noinline)) sub_FF362D64_my() {
 424 asm volatile (
 425 "    STMFD   SP!, {R1-R7,LR} \n"
 426 "    LDR     R6, =0x9EBF4 \n"
 427 "    LDR     R5, =0x9EA24 \n"
 428 "    MOV     R4, R0 \n"
 429 "    LDR     R3, [R6] \n"
 430 "    LDRSH   R2, [R6, #0xC] \n"
 431 "    LDRSH   R1, [R6, #0xE] \n"
 432 "    LDR     R0, [R5, #0x88] \n"
 433 "    BL      sub_FF1AE358 \n"
 434 "    MOV     R2, #2 \n"
 435 "    ADD     R1, SP, #8 \n"
 436 "    MOV     R0, #0xFA \n"
 437 "    BL      _GetPropertyCase \n"
 438 "    TST     R0, #1 \n"
 439 "    LDRNE   R1, =0x2D9 \n"
 440 "    LDRNE   R0, =0xFF362B84 /*'SsCaptureCommon.c'*/ \n"
 441 "    BLNE    _DebugAssert \n"
 442 "    LDRSH   R0, [R6, #0xC] \n"
 443 "    LDRSH   R1, [SP, #8] \n"
 444 "    BL      sub_FF159790 \n"
 445 "    LDR     R0, [R5, #0xE4] \n"
 446 "    CMP     R0, #0 \n"
 447 "    LDRNEH  R0, [R5] \n"
 448 "    LDRNE   R1, =0x820D \n"
 449 "    CMPNE   R0, R1 \n"
 450 "    LDRNE   R0, =0x9EB24 \n"
 451 "    LDRNEH  R0, [R0, #0x8A] \n"
 452 "    CMPNE   R0, #3 \n"
 453 "    LDRNE   R0, [R4, #8] \n"
 454 "    CMPNE   R0, #1 \n"
 455 "    BHI     loc_FF362E08 \n"
 456 "    BL      _GetCCDTemperature \n"
 457 "    LDR     R3, =0xE4F0 \n"
 458 "    STRH    R0, [R4, #0xA8] \n"
 459 "    SUB     R2, R3, #4 \n"
 460 "    STRD    R2, [SP] \n"
 461 "    MOV     R1, R0 \n"
 462 "    LDRSH   R2, [R6, #0xC] \n"
 463 "    LDRH    R0, [R5, #0x5E] \n"
 464 "    ADD     R3, R3, #4 \n"
 465 "    BL      sub_FF2A456C \n"
 466 
 467 "loc_FF362E08:\n"
 468 "    BL      wait_until_remote_button_is_released\n" // added
 469 "    BL      capt_seq_hook_set_nr\n"                 // added
 470 "    LDRH    R0, [R4, #0xA8] \n"
 471 "    LDR     PC, =0xFF362E0C \n"  // Continue in firmware
 472 );
 473 }
 474 
 475 /*************************************************************/
 476 //** exp_drv_task @ 0xFF11D458 - 0xFF11DAE8, length=421
 477 void __attribute__((naked,noinline)) exp_drv_task() {
 478 asm volatile (
 479 "    STMFD   SP!, {R4-R9,LR} \n"
 480 "    SUB     SP, SP, #0x2C \n"
 481 "    LDR     R6, =0x4CF8 \n"
 482 "    LDR     R7, =0xBB8 \n"
 483 "    LDR     R4, =0xF2910 \n"
 484 "    MOV     R0, #0 \n"
 485 "    ADD     R5, SP, #0x1C \n"
 486 "    STR     R0, [SP, #0xC] \n"
 487 
 488 "loc_FF11D478:\n"
 489 "    LDR     R0, [R6, #0x20] \n"
 490 "    MOV     R2, #0 \n"
 491 "    ADD     R1, SP, #0x28 \n"
 492 "    BL      sub_00677418 /*_ReceiveMessageQueue*/ \n"
 493 "    LDR     R0, [SP, #0xC] \n"
 494 "    CMP     R0, #1 \n"
 495 "    BNE     loc_FF11D4C4 \n"
 496 "    LDR     R0, [SP, #0x28] \n"
 497 "    LDR     R0, [R0] \n"
 498 "    CMP     R0, #0x14 \n"
 499 "    CMPNE   R0, #0x15 \n"
 500 "    CMPNE   R0, #0x16 \n"
 501 "    CMPNE   R0, #0x17 \n"
 502 "    BEQ     loc_FF11D624 \n"
 503 "    CMP     R0, #0x2A \n"
 504 "    BEQ     loc_FF11D5AC \n"
 505 "    ADD     R1, SP, #0xC \n"
 506 "    MOV     R0, #0 \n"
 507 "    BL      sub_FF11D408 \n"
 508 
 509 "loc_FF11D4C4:\n"
 510 "    LDR     R0, [SP, #0x28] \n"
 511 "    LDR     R1, [R0] \n"
 512 "    CMP     R1, #0x30 \n"
 513 "    BNE     loc_FF11D4F0 \n"
 514 "    BL      sub_FF11E98C \n"
 515 "    LDR     R0, [R6, #0x1C] \n"
 516 "    MOV     R1, #1 \n"
 517 "    BL      sub_0067F164 /*_SetEventFlag*/ \n"
 518 "    BL      _ExitTask \n"
 519 "    ADD     SP, SP, #0x2C \n"
 520 "    LDMFD   SP!, {R4-R9,PC} \n"
 521 
 522 "loc_FF11D4F0:\n"
 523 "    CMP     R1, #0x2F \n"
 524 "    BNE     loc_FF11D50C \n"
 525 "    LDR     R2, [R0, #0x8C]! \n"
 526 "    LDR     R1, [R0, #4] \n"
 527 "    MOV     R0, R1 \n"
 528 "    BLX     R2 \n"
 529 "    B       loc_FF11DAE0 \n"
 530 
 531 "loc_FF11D50C:\n"
 532 "    CMP     R1, #0x28 \n"
 533 "    BNE     loc_FF11D55C \n"
 534 "    LDR     R0, [R6, #0x1C] \n"
 535 "    MOV     R1, #0x80 \n"
 536 "    BL      sub_0067F198 /*_ClearEventFlag*/ \n"
 537 "    LDR     R0, =0xFF118ACC \n"
 538 "    MOV     R1, #0x80 \n"
 539 "    BL      sub_FF1EB2BC \n"
 540 "    LDR     R0, [R6, #0x1C] \n"
 541 "    MOV     R2, R7 \n"
 542 "    MOV     R1, #0x80 \n"
 543 "    BL      sub_0067F0A4 /*_WaitForAllEventFlag*/ \n"
 544 "    TST     R0, #1 \n"
 545 "    LDRNE   R1, =0x1664 \n"
 546 "    BNE     loc_FF11D618 \n"
 547 
 548 "loc_FF11D548:\n"
 549 "    LDR     R1, [SP, #0x28] \n"
 550 "    LDR     R0, [R1, #0x90] \n"
 551 "    LDR     R1, [R1, #0x8C] \n"
 552 "    BLX     R1 \n"
 553 "    B       loc_FF11DAE0 \n"
 554 
 555 "loc_FF11D55C:\n"
 556 "    CMP     R1, #0x29 \n"
 557 "    BNE     loc_FF11D5A4 \n"
 558 "    ADD     R1, SP, #0xC \n"
 559 "    BL      sub_FF11D408 \n"
 560 "    LDR     R0, [R6, #0x1C] \n"
 561 "    MOV     R1, #0x100 \n"
 562 "    BL      sub_0067F198 /*_ClearEventFlag*/ \n"
 563 "    LDR     R0, =0xFF118ADC \n"
 564 "    MOV     R1, #0x100 \n"
 565 "    BL      sub_FF1EB45C \n"
 566 "    LDR     R0, [R6, #0x1C] \n"
 567 "    MOV     R2, R7 \n"
 568 "    MOV     R1, #0x100 \n"
 569 "    BL      sub_0067F0A4 /*_WaitForAllEventFlag*/ \n"
 570 "    TST     R0, #1 \n"
 571 "    BEQ     loc_FF11D548 \n"
 572 "    LDR     R1, =0x166E \n"
 573 "    B       loc_FF11D618 \n"
 574 
 575 "loc_FF11D5A4:\n"
 576 "    CMP     R1, #0x2A \n"
 577 "    BNE     loc_FF11D5BC \n"
 578 
 579 "loc_FF11D5AC:\n"
 580 "    LDR     R0, [SP, #0x28] \n"
 581 "    ADD     R1, SP, #0xC \n"
 582 "    BL      sub_FF11D408 \n"
 583 "    B       loc_FF11D548 \n"
 584 
 585 "loc_FF11D5BC:\n"
 586 "    CMP     R1, #0x2D \n"
 587 "    BNE     loc_FF11D5D4 \n"
 588 "    BL      sub_FF108F48 \n"
 589 "    BL      sub_FF109D04 \n"
 590 "    BL      sub_FF109818 \n"
 591 "    B       loc_FF11D548 \n"
 592 
 593 "loc_FF11D5D4:\n"
 594 "    CMP     R1, #0x2E \n"
 595 "    BNE     loc_FF11D624 \n"
 596 "    LDR     R0, [R6, #0x1C] \n"
 597 "    MOV     R1, #4 \n"
 598 "    BL      sub_0067F198 /*_ClearEventFlag*/ \n"
 599 "    LDR     R1, =0xFF118AFC \n"
 600 "    LDR     R0, =0xFFFFF400 \n"
 601 "    MOV     R2, #4 \n"
 602 "    BL      sub_FF108998 \n"
 603 "    BL      sub_FF108C28 \n"
 604 "    LDR     R0, [R6, #0x1C] \n"
 605 "    MOV     R2, R7 \n"
 606 "    MOV     R1, #4 \n"
 607 "    BL      sub_0067EFC0 /*_WaitForAnyEventFlag*/ \n"
 608 "    TST     R0, #1 \n"
 609 "    BEQ     loc_FF11D548 \n"
 610 "    LDR     R1, =0x1696 \n"
 611 
 612 "loc_FF11D618:\n"
 613 "    LDR     R0, =0xFF119260 /*'ExpDrv.c'*/ \n"
 614 "    BL      _DebugAssert \n"
 615 "    B       loc_FF11D548 \n"
 616 
 617 "loc_FF11D624:\n"
 618 "    LDR     R0, [SP, #0x28] \n"
 619 "    MOV     R8, #1 \n"
 620 "    LDR     R1, [R0] \n"
 621 "    CMP     R1, #0x12 \n"
 622 "    CMPNE   R1, #0x13 \n"
 623 "    BNE     loc_FF11D68C \n"
 624 "    LDR     R1, [R0, #0x7C] \n"
 625 "    ADD     R1, R1, R1, LSL#1 \n"
 626 "    ADD     R1, R0, R1, LSL#2 \n"
 627 "    SUB     R1, R1, #8 \n"
 628 "    LDMIA   R1, {R2,R3,R9} \n"
 629 "    STMIA   R5, {R2,R3,R9} \n"
 630 "    BL      sub_FF11B818 \n"
 631 "    LDR     R0, [SP, #0x28] \n"
 632 "    LDR     R1, [R0, #0x7C] \n"
 633 "    LDR     R3, [R0, #0x8C] \n"
 634 "    LDR     R2, [R0, #0x90] \n"
 635 "    ADD     R0, R0, #4 \n"
 636 "    BLX     R3 \n"
 637 "    LDR     R0, [SP, #0x28] \n"
 638 "    BL      sub_FF11EDAC \n"
 639 "    LDR     R0, [SP, #0x28] \n"
 640 "    LDR     R1, [R0, #0x7C] \n"
 641 "    LDR     R2, [R0, #0x98] \n"
 642 "    LDR     R3, [R0, #0x94] \n"
 643 "    B       loc_FF11D9A4 \n"
 644 
 645 "loc_FF11D68C:\n"
 646 "    CMP     R1, #0x14 \n"
 647 "    CMPNE   R1, #0x15 \n"
 648 "    CMPNE   R1, #0x16 \n"
 649 "    CMPNE   R1, #0x17 \n"
 650 "    BNE     loc_FF11D744 \n"
 651 "    ADD     R3, SP, #0xC \n"
 652 "    MOV     R2, SP \n"
 653 "    ADD     R1, SP, #0x1C \n"
 654 "    BL      sub_FF11BA7C \n"
 655 "    CMP     R0, #1 \n"
 656 "    MOV     R9, R0 \n"
 657 "    CMPNE   R9, #5 \n"
 658 "    BNE     loc_FF11D6E0 \n"
 659 "    LDR     R0, [SP, #0x28] \n"
 660 "    MOV     R2, R9 \n"
 661 "    LDR     R1, [R0, #0x7C]! \n"
 662 "    LDR     R12, [R0, #0x10]! \n"
 663 "    LDR     R3, [R0, #4] \n"
 664 "    MOV     R0, SP \n"
 665 "    BLX     R12 \n"
 666 "    B       loc_FF11D718 \n"
 667 
 668 "loc_FF11D6E0:\n"
 669 "    LDR     R0, [SP, #0x28] \n"
 670 "    CMP     R9, #2 \n"
 671 "    LDR     R3, [R0, #0x90] \n"
 672 "    CMPNE   R9, #6 \n"
 673 "    BNE     loc_FF11D72C \n"
 674 "    LDR     R12, [R0, #0x8C] \n"
 675 "    MOV     R2, R9 \n"
 676 "    MOV     R1, #1 \n"
 677 "    MOV     R0, SP \n"
 678 "    BLX     R12 \n"
 679 "    LDR     R0, [SP, #0x28] \n"
 680 "    MOV     R2, SP \n"
 681 "    ADD     R1, SP, #0x1C \n"
 682 "    BL      sub_FF11D07C \n"
 683 
 684 "loc_FF11D718:\n"
 685 "    LDR     R0, [SP, #0x28] \n"
 686 "    LDR     R2, [SP, #0xC] \n"
 687 "    MOV     R1, R9 \n"
 688 "    BL      sub_FF11D3A8 \n"
 689 "    B       loc_FF11D9AC \n"
 690 
 691 "loc_FF11D72C:\n"
 692 "    LDR     R1, [R0, #0x7C] \n"
 693 "    LDR     R12, [R0, #0x8C] \n"
 694 "    MOV     R2, R9 \n"
 695 "    ADD     R0, R0, #4 \n"
 696 "    BLX     R12 \n"
 697 "    B       loc_FF11D9AC \n"
 698 
 699 "loc_FF11D744:\n"
 700 "    CMP     R1, #0x24 \n"
 701 "    CMPNE   R1, #0x25 \n"
 702 "    BNE     loc_FF11D790 \n"
 703 "    LDR     R1, [R0, #0x7C] \n"
 704 "    ADD     R1, R1, R1, LSL#1 \n"
 705 "    ADD     R1, R0, R1, LSL#2 \n"
 706 "    SUB     R1, R1, #8 \n"
 707 "    LDMIA   R1, {R2,R3,R9} \n"
 708 "    STMIA   R5, {R2,R3,R9} \n"
 709 "    BL      sub_FF11A7EC \n"
 710 "    LDR     R0, [SP, #0x28] \n"
 711 "    LDR     R1, [R0, #0x7C] \n"
 712 "    LDR     R3, [R0, #0x8C] \n"
 713 "    LDR     R2, [R0, #0x90] \n"
 714 "    ADD     R0, R0, #4 \n"
 715 "    BLX     R3 \n"
 716 "    LDR     R0, [SP, #0x28] \n"
 717 "    BL      sub_FF11AC30 \n"
 718 "    B       loc_FF11D9AC \n"
 719 
 720 "loc_FF11D790:\n"
 721 "    ADD     R1, R0, #4 \n"
 722 "    LDMIA   R1, {R2,R3,R9} \n"
 723 "    STMIA   R5, {R2,R3,R9} \n"
 724 "    LDR     R1, [R0] \n"
 725 "    CMP     R1, #0x28 \n"
 726 "    ADDCC   PC, PC, R1, LSL#2 \n"
 727 "    B       loc_FF11D994 \n"
 728 "    B       loc_FF11D84C \n"
 729 "    B       loc_FF11D84C \n"
 730 "    B       loc_FF11D854 \n"
 731 "    B       loc_FF11D85C \n"
 732 "    B       loc_FF11D85C \n"
 733 "    B       loc_FF11D85C \n"
 734 "    B       loc_FF11D84C \n"
 735 "    B       loc_FF11D854 \n"
 736 "    B       loc_FF11D85C \n"
 737 "    B       loc_FF11D85C \n"
 738 "    B       loc_FF11D874 \n"
 739 "    B       loc_FF11D874 \n"
 740 "    B       loc_FF11D980 \n"
 741 "    B       loc_FF11D988 \n"
 742 "    B       loc_FF11D988 \n"
 743 "    B       loc_FF11D988 \n"
 744 "    B       loc_FF11D988 \n"
 745 "    B       loc_FF11D990 \n"
 746 "    B       loc_FF11D994 \n"
 747 "    B       loc_FF11D994 \n"
 748 "    B       loc_FF11D994 \n"
 749 "    B       loc_FF11D994 \n"
 750 "    B       loc_FF11D994 \n"
 751 "    B       loc_FF11D994 \n"
 752 "    B       loc_FF11D864 \n"
 753 "    B       loc_FF11D86C \n"
 754 "    B       loc_FF11D86C \n"
 755 "    B       loc_FF11D86C \n"
 756 "    B       loc_FF11D880 \n"
 757 "    B       loc_FF11D880 \n"
 758 "    B       loc_FF11D888 \n"
 759 "    B       loc_FF11D8C0 \n"
 760 "    B       loc_FF11D8F8 \n"
 761 "    B       loc_FF11D930 \n"
 762 "    B       loc_FF11D968 \n"
 763 "    B       loc_FF11D968 \n"
 764 "    B       loc_FF11D994 \n"
 765 "    B       loc_FF11D994 \n"
 766 "    B       loc_FF11D970 \n"
 767 "    B       loc_FF11D978 \n"
 768 
 769 "loc_FF11D84C:\n"
 770 "    BL      sub_FF1190E0 \n"
 771 "    B       loc_FF11D994 \n"
 772 
 773 "loc_FF11D854:\n"
 774 "    BL      sub_FF11939C \n"
 775 "    B       loc_FF11D994 \n"
 776 
 777 "loc_FF11D85C:\n"
 778 "    BL      sub_FF1195C8 \n"
 779 "    B       loc_FF11D994 \n"
 780 
 781 "loc_FF11D864:\n"
 782 "    BL      sub_FF1198F4 \n"
 783 "    B       loc_FF11D994 \n"
 784 
 785 "loc_FF11D86C:\n"
 786 "    BL      sub_FF119B10 \n"
 787 "    B       loc_FF11D994 \n"
 788 
 789 "loc_FF11D874:\n"
 790 "    BL      sub_FF119ED0_my \n"  // --> Patched. Old value = 0xFF119ED0.
 791 "    MOV     R8, #0 \n"
 792 "    B       loc_FF11D994 \n"
 793 
 794 "loc_FF11D880:\n"
 795 "    BL      sub_FF11A014 \n"
 796 "    B       loc_FF11D994 \n"
 797 
 798 "loc_FF11D888:\n"
 799 "    LDRH    R1, [R0, #4] \n"
 800 "    STRH    R1, [SP, #0x1C] \n"
 801 "    LDRH    R1, [R4, #2] \n"
 802 "    STRH    R1, [SP, #0x1E] \n"
 803 "    LDRH    R1, [R4, #4] \n"
 804 "    STRH    R1, [SP, #0x20] \n"
 805 "    LDRH    R1, [R4, #6] \n"
 806 "    STRH    R1, [SP, #0x22] \n"
 807 "    LDRH    R1, [R0, #0xC] \n"
 808 "    STRH    R1, [SP, #0x24] \n"
 809 "    LDRH    R1, [R4, #0xA] \n"
 810 "    STRH    R1, [SP, #0x26] \n"
 811 "    BL      sub_FF11EA30 \n"
 812 "    B       loc_FF11D994 \n"
 813 
 814 "loc_FF11D8C0:\n"
 815 "    LDRH    R1, [R0, #4] \n"
 816 "    STRH    R1, [SP, #0x1C] \n"
 817 "    LDRH    R1, [R4, #2] \n"
 818 "    STRH    R1, [SP, #0x1E] \n"
 819 "    LDRH    R1, [R4, #4] \n"
 820 "    STRH    R1, [SP, #0x20] \n"
 821 "    LDRH    R1, [R4, #6] \n"
 822 "    STRH    R1, [SP, #0x22] \n"
 823 "    LDRH    R1, [R4, #8] \n"
 824 "    STRH    R1, [SP, #0x24] \n"
 825 "    LDRH    R1, [R4, #0xA] \n"
 826 "    STRH    R1, [SP, #0x26] \n"
 827 "    BL      sub_FF11EBA8 \n"
 828 "    B       loc_FF11D994 \n"
 829 
 830 "loc_FF11D8F8:\n"
 831 "    LDRH    R1, [R4] \n"
 832 "    STRH    R1, [SP, #0x1C] \n"
 833 "    LDRH    R1, [R0, #6] \n"
 834 "    STRH    R1, [SP, #0x1E] \n"
 835 "    LDRH    R1, [R4, #4] \n"
 836 "    STRH    R1, [SP, #0x20] \n"
 837 "    LDRH    R1, [R4, #6] \n"
 838 "    STRH    R1, [SP, #0x22] \n"
 839 "    LDRH    R1, [R4, #8] \n"
 840 "    STRH    R1, [SP, #0x24] \n"
 841 "    LDRH    R1, [R4, #0xA] \n"
 842 "    STRH    R1, [SP, #0x26] \n"
 843 "    BL      sub_FF11EC60 \n"
 844 "    B       loc_FF11D994 \n"
 845 
 846 "loc_FF11D930:\n"
 847 "    LDRH    R1, [R4] \n"
 848 "    STRH    R1, [SP, #0x1C] \n"
 849 "    LDRH    R1, [R4, #2] \n"
 850 "    STRH    R1, [SP, #0x1E] \n"
 851 "    LDRH    R1, [R4, #4] \n"
 852 "    STRH    R1, [SP, #0x20] \n"
 853 "    LDRH    R1, [R4, #6] \n"
 854 "    STRH    R1, [SP, #0x22] \n"
 855 "    LDRH    R1, [R0, #0xC] \n"
 856 "    STRH    R1, [SP, #0x24] \n"
 857 "    LDRH    R1, [R4, #0xA] \n"
 858 "    STRH    R1, [SP, #0x26] \n"
 859 "    BL      sub_FF11ED08 \n"
 860 "    B       loc_FF11D994 \n"
 861 
 862 "loc_FF11D968:\n"
 863 "    BL      sub_FF11A59C \n"
 864 "    B       loc_FF11D994 \n"
 865 
 866 "loc_FF11D970:\n"
 867 "    BL      sub_FF11AD34 \n"
 868 "    B       loc_FF11D994 \n"
 869 
 870 "loc_FF11D978:\n"
 871 "    BL      sub_FF11B01C \n"
 872 "    B       loc_FF11D994 \n"
 873 
 874 "loc_FF11D980:\n"
 875 "    BL      sub_FF11B2E0 \n"
 876 "    B       loc_FF11D994 \n"
 877 
 878 "loc_FF11D988:\n"
 879 "    BL      sub_FF11B4A0 \n"
 880 "    B       loc_FF11D994 \n"
 881 
 882 "loc_FF11D990:\n"
 883 "    BL      sub_FF11B60C \n"
 884 
 885 "loc_FF11D994:\n"
 886 "    LDR     R0, [SP, #0x28] \n"
 887 "    LDR     R1, [R0, #0x7C] \n"
 888 "    LDR     R2, [R0, #0x90] \n"
 889 "    LDR     R3, [R0, #0x8C] \n"
 890 
 891 "loc_FF11D9A4:\n"
 892 "    ADD     R0, R0, #4 \n"
 893 "    BLX     R3 \n"
 894 
 895 "loc_FF11D9AC:\n"
 896 "    LDR     R0, [SP, #0x28] \n"
 897 "    LDR     R0, [R0] \n"
 898 "    CMP     R0, #0x10 \n"
 899 "    BEQ     loc_FF11D9E4 \n"
 900 "    BGT     loc_FF11D9D4 \n"
 901 "    CMP     R0, #1 \n"
 902 "    CMPNE   R0, #4 \n"
 903 "    CMPNE   R0, #0xE \n"
 904 "    BNE     loc_FF11DA18 \n"
 905 "    B       loc_FF11D9E4 \n"
 906 
 907 "loc_FF11D9D4:\n"
 908 "    CMP     R0, #0x13 \n"
 909 "    CMPNE   R0, #0x17 \n"
 910 "    CMPNE   R0, #0x1A \n"
 911 "    BNE     loc_FF11DA18 \n"
 912 
 913 "loc_FF11D9E4:\n"
 914 "    LDRSH   R0, [R4] \n"
 915 "    CMN     R0, #0xC00 \n"
 916 "    LDRNESH R1, [R4, #8] \n"
 917 "    CMNNE   R1, #0xC00 \n"
 918 "    STRNEH  R0, [SP, #0x1C] \n"
 919 "    STRNEH  R1, [SP, #0x24] \n"
 920 "    BNE     loc_FF11DA18 \n"
 921 "    ADD     R0, SP, #0x10 \n"
 922 "    BL      sub_FF11EFC0 \n"
 923 "    LDRH    R0, [SP, #0x10] \n"
 924 "    STRH    R0, [SP, #0x1C] \n"
 925 "    LDRH    R0, [SP, #0x18] \n"
 926 "    STRH    R0, [SP, #0x24] \n"
 927 
 928 "loc_FF11DA18:\n"
 929 "    LDR     R0, [SP, #0x28] \n"
 930 "    CMP     R8, #1 \n"
 931 "    BNE     loc_FF11DA68 \n"
 932 "    LDR     R1, [R0, #0x7C] \n"
 933 "    MOV     R2, #0xC \n"
 934 "    ADD     R1, R1, R1, LSL#1 \n"
 935 "    ADD     R0, R0, R1, LSL#2 \n"
 936 "    SUB     R8, R0, #8 \n"
 937 "    LDR     R0, =0xF2910 \n"
 938 "    ADD     R1, SP, #0x1C \n"
 939 "    BL      sub_006950D8 \n"
 940 "    LDR     R0, =0xF291C \n"
 941 "    MOV     R2, #0xC \n"
 942 "    ADD     R1, SP, #0x1C \n"
 943 "    BL      sub_006950D8 \n"
 944 "    LDR     R0, =0xF2928 \n"
 945 "    MOV     R2, #0xC \n"
 946 "    MOV     R1, R8 \n"
 947 "    BL      sub_006950D8 \n"
 948 "    B       loc_FF11DAE0 \n"
 949 
 950 "loc_FF11DA68:\n"
 951 "    LDR     R0, [R0] \n"
 952 "    MOV     R3, #1 \n"
 953 "    CMP     R0, #0xB \n"
 954 "    BNE     loc_FF11DAAC \n"
 955 "    MOV     R2, #0 \n"
 956 "    STRD    R2, [SP] \n"
 957 "    MOV     R2, R3 \n"
 958 "    MOV     R1, R3 \n"
 959 "    MOV     R0, #0 \n"
 960 "    BL      sub_FF118EC0 \n"
 961 "    MOV     R3, #1 \n"
 962 "    MOV     R2, #0 \n"
 963 "    STRD    R2, [SP] \n"
 964 "    MOV     R2, R3 \n"
 965 "    MOV     R1, R3 \n"
 966 "    MOV     R0, #0 \n"
 967 "    B       loc_FF11DADC \n"
 968 
 969 "loc_FF11DAAC:\n"
 970 "    MOV     R2, #1 \n"
 971 "    STRD    R2, [SP] \n"
 972 "    MOV     R3, R2 \n"
 973 "    MOV     R1, R2 \n"
 974 "    MOV     R0, R2 \n"
 975 "    BL      sub_FF118EC0 \n"
 976 "    MOV     R3, #1 \n"
 977 "    MOV     R2, R3 \n"
 978 "    MOV     R1, R3 \n"
 979 "    MOV     R0, R3 \n"
 980 "    STR     R3, [SP] \n"
 981 "    STR     R3, [SP, #4] \n"
 982 
 983 "loc_FF11DADC:\n"
 984 "    BL      sub_FF11902C \n"
 985 
 986 "loc_FF11DAE0:\n"
 987 "    LDR     R0, [SP, #0x28] \n"
 988 "    BL      sub_FF11E98C \n"
 989 "    B       loc_FF11D478 \n"
 990 );
 991 }
 992 
 993 /*************************************************************/
 994 //** sub_FF119ED0_my @ 0xFF119ED0 - 0xFF119F94, length=50
 995 void __attribute__((naked,noinline)) sub_FF119ED0_my() {
 996 asm volatile (
 997 "    STMFD   SP!, {R4-R8,LR} \n"
 998 "    LDR     R7, =0x4CF8 \n"
 999 "    MOV     R4, R0 \n"
1000 "    LDR     R0, [R7, #0x1C] \n"
1001 "    MOV     R1, #0x3E \n"
1002 "    BL      sub_0067F198 /*_ClearEventFlag*/ \n"
1003 "    MOV     R2, #0 \n"
1004 "    LDRSH   R0, [R4, #4] \n"
1005 "    MOV     R3, #1 \n"
1006 "    MOV     R1, R2 \n"
1007 "    BL      sub_FF118B64 \n"
1008 "    MOV     R6, R0 \n"
1009 "    LDRSH   R0, [R4, #6] \n"
1010 "    BL      sub_FF118D20 \n"
1011 "    LDRSH   R0, [R4, #8] \n"
1012 "    BL      sub_FF118D78 \n"
1013 "    LDRSH   R0, [R4, #0xA] \n"
1014 "    BL      sub_FF118DD0 \n"
1015 "    LDRSH   R0, [R4, #0xC] \n"
1016 "    MOV     R1, #0 \n"
1017 "    BL      sub_FF118E28 \n"
1018 "    MOV     R5, R0 \n"
1019 "    LDR     R0, [R4] \n"
1020 "    LDR     R8, =0xF2928 \n"
1021 "    CMP     R0, #0xB \n"
1022 "    MOVEQ   R6, #0 \n"
1023 "    MOVEQ   R5, R6 \n"
1024 "    BEQ     loc_FF119F68 \n"
1025 "    CMP     R6, #1 \n"
1026 "    BNE     loc_FF119F68 \n"
1027 "    LDRSH   R0, [R4, #4] \n"
1028 "    LDR     R1, =0xFF118ABC \n"
1029 "    MOV     R2, #2 \n"
1030 "    BL      sub_FF1EB340 \n"
1031 "    STRH    R0, [R4, #4] \n"
1032 "    MOV     R0, #0 \n"
1033 "    STR     R0, [R7, #0x28] \n"
1034 "    B       loc_FF119F70 \n"
1035 
1036 "loc_FF119F68:\n"
1037 "    LDRH    R0, [R8] \n"
1038 "    STRH    R0, [R4, #4] \n"
1039 
1040 "loc_FF119F70:\n"
1041 "    CMP     R5, #1 \n"
1042 "    LDRNEH  R0, [R8, #8] \n"
1043 "    BNE     loc_FF119F8C \n"
1044 "    LDRSH   R0, [R4, #0xC] \n"
1045 "    LDR     R1, =0xFF118B40 \n"
1046 "    MOV     R2, #0x20 \n"
1047 "    BL      sub_FF11E9EC \n"
1048 
1049 "loc_FF119F8C:\n"
1050 "    STRH    R0, [R4, #0xC] \n"
1051 "    LDRSH   R0, [R4, #6] \n"
1052 "    BL      sub_FF108C94_my \n"  // --> Patched. Old value = 0xFF108C94.
1053 "    LDR     PC, =0xFF119F98 \n"  // Continue in firmware
1054 );
1055 }
1056 
1057 /*************************************************************/
1058 //** sub_FF108C94_my @ 0xFF108C94 - 0xFF108CD4, length=17
1059 void __attribute__((naked,noinline)) sub_FF108C94_my() {
1060 asm volatile (
1061 "    STMFD   SP!, {R4-R6,LR} \n"
1062 "    LDR     R5, =0x4978 \n"
1063 "    MOV     R4, R0 \n"
1064 "    LDR     R0, [R5, #4] \n"
1065 "    CMP     R0, #1 \n"
1066 "    MOVNE   R1, #0x154 \n"
1067 "    LDRNE   R0, =0xFF108ACC /*'Shutter.c'*/ \n"
1068 "    BLNE    _DebugAssert \n"
1069 "    CMN     R4, #0xC00 \n"
1070 "    LDREQSH R4, [R5, #2] \n"
1071 "    CMN     R4, #0xC00 \n"
1072 "    LDREQ   R1, =0x15A \n"
1073 "    LDREQ   R0, =0xFF108ACC /*'Shutter.c'*/ \n"
1074 "    STRH    R4, [R5, #2] \n"
1075 "    BLEQ    _DebugAssert \n"
1076 "    MOV     R0, R4 \n"
1077 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
1078 "    LDR     PC, =0xFF108CD8 \n"  // Continue in firmware
1079 );
1080 }

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