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

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF19A9F4_my
  3. exp_drv_task
  4. sub_FF0AEF18_my
  5. sub_FF09D834_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 350  // 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 @ 0xFF068E64 - 0xFF06918C, length=203
  16 void __attribute__((naked,noinline)) capt_seq_task() {
  17 asm volatile (
  18 "    STMFD   SP!, {R3-R9,LR} \n"
  19 "    LDR     R4, =0x3E178 \n"
  20 "    LDR     R7, =0x2E34 \n"
  21 "    MOV     R6, #0 \n"
  22 
  23 "loc_FF068E74:\n"
  24 "    LDR     R0, [R7, #4] \n"
  25 "    MOV     R2, #0 \n"
  26 "    MOV     R1, SP \n"
  27 "    BL      sub_0068BBE4 /*_ReceiveMessageQueue*/ \n"
  28 "    TST     R0, #1 \n"
  29 "    BEQ     loc_FF068EA0 \n"
  30 "    LDR     R1, =0x493 \n"
  31 "    LDR     R0, =0xFF06894C /*'SsShootTask.c'*/ \n"
  32 "    BL      _DebugAssert \n"
  33 "    BL      _ExitTask \n"
  34 "    LDMFD   SP!, {R3-R9,PC} \n"
  35 
  36 "loc_FF068EA0:\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_FF069154 \n"
  42 "    B       loc_FF068F40 \n"
  43 "    B       loc_FF068F58 \n"
  44 "    B       loc_FF068FDC \n"
  45 "    B       loc_FF068FF0 \n"
  46 "    B       loc_FF068FE8 \n"
  47 "    B       loc_FF068FFC \n"
  48 "    B       loc_FF069004 \n"
  49 "    B       loc_FF06900C \n"
  50 "    B       loc_FF069028 \n"
  51 "    B       loc_FF06907C \n"
  52 "    B       loc_FF069034 \n"
  53 "    B       loc_FF069040 \n"
  54 "    B       loc_FF069048 \n"
  55 "    B       loc_FF069064 \n"
  56 "    B       loc_FF06906C \n"
  57 "    B       loc_FF069074 \n"
  58 "    B       loc_FF069084 \n"
  59 "    B       loc_FF06908C \n"
  60 "    B       loc_FF069094 \n"
  61 "    B       loc_FF06909C \n"
  62 "    B       loc_FF0690A4 \n"
  63 "    B       loc_FF0690B0 \n"
  64 "    B       loc_FF0690B8 \n"
  65 "    B       loc_FF0690C0 \n"
  66 "    B       loc_FF0690C8 \n"
  67 "    B       loc_FF0690D0 \n"
  68 "    B       loc_FF0690DC \n"
  69 "    B       loc_FF0690E4 \n"
  70 "    B       loc_FF0690EC \n"
  71 "    B       loc_FF0690F4 \n"
  72 "    B       loc_FF0690FC \n"
  73 "    B       loc_FF069108 \n"
  74 "    B       loc_FF069110 \n"
  75 "    B       loc_FF06911C \n"
  76 "    B       loc_FF069160 \n"
  77 
  78 "loc_FF068F40:\n"
  79 "    BL      shooting_expo_iso_override\n"      // added
  80 "    BL      sub_FF069734 \n"
  81 "    BL      shooting_expo_param_override\n"    // added
  82 "    BL      sub_FF06620C \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_FF19AC00 \n"
  88 "    B       loc_FF069160 \n"
  89 
  90 "loc_FF068F58:\n"
  91 "    LDR     R5, [R0, #0x10] \n"
  92 "    LDR     R0, [R4, #0x28] \n"
  93 "    CMP     R0, #0 \n"
  94 "    BNE     loc_FF068FA0 \n"
  95 "    LDR     R0, [R4, #0x8C] \n"
  96 "    TST     R0, #0x30 \n"
  97 "    BLNE    sub_FF06CC00 \n"
  98 "    BL      sub_FF06C8DC \n"
  99 "    MOV     R1, R5 \n"
 100 "    BL      sub_FF06C934 \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_FF068FA0:\n"
 111 "    MOV     R0, R5 \n"
 112 "    BL      sub_FF19A9F4_my \n"  // --> Patched. Old value = 0xFF19A9F4.
 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_FF066D54 \n"
 118 "    TST     R8, #1 \n"
 119 "    BNE     loc_FF069160 \n"
 120 "    MOV     R0, R5 \n"
 121 "    BL      sub_FF199A34 \n"
 122 "    LDR     R0, [R4, #0x8C] \n"
 123 "    TST     R0, #2 \n"
 124 "    MOVNE   R0, R5 \n"
 125 "    BLNE    sub_FF066EF4 \n"
 126 "    B       loc_FF069160 \n"
 127 
 128 "loc_FF068FDC:\n"
 129 "    MOV     R0, #1 \n"
 130 "    BL      sub_FF069A3C \n"
 131 "    B       loc_FF069160 \n"
 132 
 133 "loc_FF068FE8:\n"
 134 "    BL      sub_FF069334 \n"
 135 "    B       loc_FF068FF4 \n"
 136 
 137 "loc_FF068FF0:\n"
 138 "    BL      sub_FF069714 \n"
 139 
 140 "loc_FF068FF4:\n"
 141 "    STR     R6, [R4, #0x28] \n"
 142 "    B       loc_FF069160 \n"
 143 
 144 "loc_FF068FFC:\n"
 145 "    BL      sub_FF06971C \n"
 146 "    B       loc_FF069160 \n"
 147 
 148 "loc_FF069004:\n"
 149 "    BL      sub_FF069910 \n"
 150 "    B       loc_FF06902C \n"
 151 
 152 "loc_FF06900C:\n"
 153 "    LDR     R5, [R0, #0x10] \n"
 154 "    MOV     R0, R5 \n"
 155 "    BL      sub_FF19AC98 \n"
 156 "    MOV     R2, R5 \n"
 157 "    MOV     R1, #9 \n"
 158 "    BL      sub_FF066D54 \n"
 159 "    B       loc_FF069160 \n"
 160 
 161 "loc_FF069028:\n"
 162 "    BL      sub_FF0699A0 \n"
 163 
 164 "loc_FF06902C:\n"
 165 "    BL      sub_FF06620C \n"
 166 "    B       loc_FF069160 \n"
 167 
 168 "loc_FF069034:\n"
 169 "    LDR     R0, [R4, #0x58] \n"
 170 "    BL      sub_FF06A0C0 \n"
 171 "    B       loc_FF069160 \n"
 172 
 173 "loc_FF069040:\n"
 174 "    BL      sub_FF06A3B8 \n"
 175 "    B       loc_FF069160 \n"
 176 
 177 "loc_FF069048:\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_FF06A41C \n"
 184 "    B       loc_FF069160 \n"
 185 
 186 "loc_FF069064:\n"
 187 "    BL      sub_FF06A610 \n"
 188 "    B       loc_FF069160 \n"
 189 
 190 "loc_FF06906C:\n"
 191 "    BL      sub_FF06AA8C \n"
 192 "    B       loc_FF069160 \n"
 193 
 194 "loc_FF069074:\n"
 195 "    BL      sub_FF06AB40 \n"
 196 "    B       loc_FF069160 \n"
 197 
 198 "loc_FF06907C:\n"
 199 "    BL      sub_FF069714 \n"
 200 "    B       loc_FF069160 \n"
 201 
 202 "loc_FF069084:\n"
 203 "    BL      sub_FF198CB0 \n"
 204 "    B       loc_FF069160 \n"
 205 
 206 "loc_FF06908C:\n"
 207 "    BL      sub_FF198F18 \n"
 208 "    B       loc_FF069160 \n"
 209 
 210 "loc_FF069094:\n"
 211 "    BL      sub_FF198FD0 \n"
 212 "    B       loc_FF069160 \n"
 213 
 214 "loc_FF06909C:\n"
 215 "    BL      sub_FF1990A4 \n"
 216 "    B       loc_FF069160 \n"
 217 
 218 "loc_FF0690A4:\n"
 219 "    MOV     R0, #0 \n"
 220 "    BL      sub_FF199358 \n"
 221 "    B       loc_FF069160 \n"
 222 
 223 "loc_FF0690B0:\n"
 224 "    BL      sub_FF1994C8 \n"
 225 "    B       loc_FF069160 \n"
 226 
 227 "loc_FF0690B8:\n"
 228 "    BL      sub_FF19955C \n"
 229 "    B       loc_FF069160 \n"
 230 
 231 "loc_FF0690C0:\n"
 232 "    BL      sub_FF199618 \n"
 233 "    B       loc_FF069160 \n"
 234 
 235 "loc_FF0690C8:\n"
 236 "    BL      sub_FF069BF4 \n"
 237 "    B       loc_FF069160 \n"
 238 
 239 "loc_FF0690D0:\n"
 240 "    BL      sub_FF069C88 \n"
 241 "    BL      sub_FF021F1C \n"
 242 "    B       loc_FF069160 \n"
 243 
 244 "loc_FF0690DC:\n"
 245 "    BL      sub_FF199174 \n"
 246 "    B       loc_FF069160 \n"
 247 
 248 "loc_FF0690E4:\n"
 249 "    BL      sub_FF1991DC \n"
 250 "    B       loc_FF069160 \n"
 251 
 252 "loc_FF0690EC:\n"
 253 "    BL      sub_FF06DE74 \n"
 254 "    B       loc_FF069160 \n"
 255 
 256 "loc_FF0690F4:\n"
 257 "    BL      sub_FF06DEFC \n"
 258 "    B       loc_FF069160 \n"
 259 
 260 "loc_FF0690FC:\n"
 261 "    LDR     R0, [R0, #0xC] \n"
 262 "    BL      sub_FF199740 \n"
 263 "    B       loc_FF069160 \n"
 264 
 265 "loc_FF069108:\n"
 266 "    BL      sub_FF1997B0 \n"
 267 "    B       loc_FF069160 \n"
 268 
 269 "loc_FF069110:\n"
 270 "    BL      sub_FF06DF64 \n"
 271 "    BL      sub_FF06DF1C \n"
 272 "    B       loc_FF069160 \n"
 273 
 274 "loc_FF06911C:\n"
 275 "    MOV     R0, #1 \n"
 276 "    BL      sub_FF19B448 \n"
 277 "    MOV     R0, #1 \n"
 278 "    BL      sub_FF19B57C \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_FF069160 \n"
 285 "    BL      sub_FF06DEFC \n"
 286 "    BL      sub_FF06E65C \n"
 287 "    BL      sub_FF06E38C \n"
 288 "    B       loc_FF069160 \n"
 289 
 290 "loc_FF069154:\n"
 291 "    LDR     R1, =0x5F4 \n"
 292 "    LDR     R0, =0xFF06894C /*'SsShootTask.c'*/ \n"
 293 "    BL      _DebugAssert \n"
 294 
 295 "loc_FF069160:\n"
 296 "    LDR     R0, [SP] \n"
 297 "    LDR     R1, [R0, #4] \n"
 298 "    LDR     R0, [R7] \n"
 299 "    BL      sub_0068B954 /*_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, =0xFF06894C /*'SsShootTask.c'*/ \n"
 305 "    BLEQ    _DebugAssert \n"
 306 "    STR     R6, [R5, #8] \n"
 307 "    B       loc_FF068E74 \n"
 308 );
 309 }
 310 
 311 /*************************************************************/
 312 //** sub_FF19A9F4_my @ 0xFF19A9F4 - 0xFF19ABFC, length=131
 313 void __attribute__((naked,noinline)) sub_FF19A9F4_my() {
 314 asm volatile (
 315 "    STMFD   SP!, {R3-R7,LR} \n"
 316 "    LDR     R6, =0x3E178 \n"
 317 "    MOV     R4, R0 \n"
 318 "    LDR     R0, [R6, #0x28] \n"
 319 "    LDR     R5, =0x820D \n"
 320 "    CMP     R0, #0 \n"
 321 "    MOV     R7, #0 \n"
 322 "    BNE     loc_FF19AA98 \n"
 323 "    LDR     R1, [R6, #0x8C] \n"
 324 "    TST     R1, #6 \n"
 325 "    BNE     loc_FF19AA34 \n"
 326 "    MOV     R0, #0xC \n"
 327 "    BL      sub_FF06FD24 \n"
 328 "    TST     R0, #1 \n"
 329 "    BEQ     loc_FF19AA98 \n"
 330 "    B       loc_FF19AA90 \n"
 331 
 332 "loc_FF19AA34:\n"
 333 "    LDRH    R0, [R6] \n"
 334 "    CMP     R0, R5 \n"
 335 "    LDRNEH  R0, [R6, #0x9A] \n"
 336 "    CMPNE   R0, #3 \n"
 337 "    LDRNE   R0, [R4, #8] \n"
 338 "    CMPNE   R0, #1 \n"
 339 "    BLS     loc_FF19AA78 \n"
 340 "    LDRH    R0, [R6, #0x96] \n"
 341 "    CMP     R0, #3 \n"
 342 "    BNE     loc_FF19AA64 \n"
 343 "    TST     R1, #2 \n"
 344 "    BNE     loc_FF19AA98 \n"
 345 
 346 "loc_FF19AA64:\n"
 347 "    BL      sub_FF01CDB0 \n"
 348 "    TST     R0, #1 \n"
 349 "    BEQ     loc_FF19AA98 \n"
 350 "    BL      sub_FF06FD8C \n"
 351 "    B       loc_FF19AA90 \n"
 352 
 353 "loc_FF19AA78:\n"
 354 "    MOV     R0, #0xC \n"
 355 "    BL      sub_FF06FD24 \n"
 356 "    TST     R0, #1 \n"
 357 "    BEQ     loc_FF19AA98 \n"
 358 "    BL      sub_FF19B2C8 \n"
 359 "    BL      sub_FF0669C0 \n"
 360 
 361 "loc_FF19AA90:\n"
 362 "    MOV     R0, #1 \n"
 363 "    LDMFD   SP!, {R3-R7,PC} \n"
 364 
 365 "loc_FF19AA98:\n"
 366 "    BL      sub_FF069724 \n"
 367 "    LDR     R0, [R6, #0x28] \n"
 368 "    CMP     R0, #0 \n"
 369 "    BNE     loc_FF19ABE8 \n"
 370 "    MOV     R0, R4 \n"
 371 "    BL      sub_FF199970 \n"
 372 "    TST     R0, #1 \n"
 373 "    LDMNEFD SP!, {R3-R7,PC} \n"
 374 "    LDR     R0, [R6, #0x8C] \n"
 375 "    AND     R0, R0, #0x40 \n"
 376 "    CMP     R0, #0 \n"
 377 "    LDRNEH  R0, [R6] \n"
 378 "    CMPNE   R0, R5 \n"
 379 "    LDRNEH  R0, [R6, #0x9A] \n"
 380 "    CMPNE   R0, #3 \n"
 381 "    LDRNE   R0, [R4, #8] \n"
 382 "    CMPNE   R0, #1 \n"
 383 "    BLS     loc_FF19AAFC \n"
 384 "    BL      sub_FF19B73C \n"
 385 "    MOV     R3, #0xC0 \n"
 386 "    STR     R3, [SP] \n"
 387 "    LDR     R2, =0x3A98 \n"
 388 "    LDR     R3, =0xFF19AD28 /*'SsCaptureSeq.c'*/ \n"
 389 "    MOV     R1, #0x8000 \n"
 390 "    BL      sub_FF06FF9C \n"
 391 
 392 "loc_FF19AAFC:\n"
 393 "    LDR     R0, [R6, #0x8C] \n"
 394 "    AND     R0, R0, #6 \n"
 395 "    CMP     R0, #0 \n"
 396 "    LDRNEH  R0, [R6] \n"
 397 "    CMPNE   R0, R5 \n"
 398 "    LDRNEH  R0, [R6, #0x9A] \n"
 399 "    CMPNE   R0, #3 \n"
 400 "    LDRNE   R0, [R4, #8] \n"
 401 "    CMPNE   R0, #1 \n"
 402 "    BHI     loc_FF19AB30 \n"
 403 "    MOV     R0, R4 \n"
 404 "    BL      sub_FF199D90 \n"
 405 "    BL      sub_FF19B20C \n"
 406 "    BL      wait_until_remote_button_is_released\n"    // added
 407 "    BL      capt_seq_hook_set_nr\n"                    // added
 408 
 409 "loc_FF19AB30:\n"
 410 "    LDR     R0, [R6, #0x8C] \n"
 411 "    TST     R0, #0x40 \n"
 412 "    BEQ     loc_FF19AB98 \n"
 413 "    LDR     R0, =0x181 \n"
 414 "    MOV     R2, #4 \n"
 415 "    MOV     R1, SP \n"
 416 "    BL      _GetPropertyCase \n"
 417 "    TST     R0, #1 \n"
 418 "    MOVNE   R1, #0xD4 \n"
 419 "    LDRNE   R0, =0xFF19AD28 /*'SsCaptureSeq.c'*/ \n"
 420 "    BLNE    _DebugAssert \n"
 421 "    LDR     R0, [SP] \n"
 422 "    CMP     R0, #0 \n"
 423 "    BNE     loc_FF19AB78 \n"
 424 "    BL      sub_FF19B73C \n"
 425 "    MOV     R1, #0x8000 \n"
 426 "    BL      sub_0068B954 /*_SetEventFlag*/ \n"
 427 "    B       loc_FF19AB98 \n"
 428 
 429 "loc_FF19AB78:\n"
 430 "    BL      sub_FF19B73C \n"
 431 "    MOV     R1, #0x8000 \n"
 432 "    BL      sub_0068B988 /*_ClearEventFlag*/ \n"
 433 "    LDR     R2, =0xFF19A9E0 \n"
 434 "    LDR     R0, [SP] \n"
 435 "    MOV     R3, #0x8000 \n"
 436 "    MOV     R1, R2 \n"
 437 "    BL      sub_FF024A10 /*_SetTimerAfter*/ \n"
 438 
 439 "loc_FF19AB98:\n"
 440 "    LDR     R0, [R6, #0x8C] \n"
 441 "    AND     R0, R0, #6 \n"
 442 "    CMP     R0, #0 \n"
 443 "    LDRNEH  R0, [R6] \n"
 444 "    CMPNE   R0, R5 \n"
 445 "    LDRNEH  R0, [R6, #0x9A] \n"
 446 "    CMPNE   R0, #3 \n"
 447 "    LDRNE   R0, [R4, #8] \n"
 448 "    CMPNE   R0, #1 \n"
 449 "    MOVLS   R0, #2 \n"
 450 "    BLLS    sub_FF0714EC \n"
 451 "    LDR     R0, [R6, #0x8C] \n"
 452 "    TST     R0, #0x10 \n"
 453 "    MOV     R0, R4 \n"
 454 "    BEQ     loc_FF19ABDC \n"
 455 "    BL      sub_FF320A98 \n"
 456 "    B       loc_FF19ABE0 \n"
 457 
 458 "loc_FF19ABDC:\n"
 459 "    BL      sub_FF19A4AC \n"
 460 
 461 "loc_FF19ABE0:\n"
 462 "    MOV     R7, R0 \n"
 463 "    B       loc_FF19ABF8 \n"
 464 
 465 "loc_FF19ABE8:\n"
 466 "    LDR     R0, =0xA620 \n"
 467 "    LDR     R0, [R0] \n"
 468 "    CMP     R0, #0 \n"
 469 "    MOVNE   R7, #0x1D \n"
 470 
 471 "loc_FF19ABF8:\n"
 472 "    MOV     R0, R7 \n"
 473 "    LDMFD   SP!, {R3-R7,PC} \n"
 474 );
 475 }
 476 
 477 /*************************************************************/
 478 //** exp_drv_task @ 0xFF0B2AA8 - 0xFF0B3138, length=421
 479 void __attribute__((naked,noinline)) exp_drv_task() {
 480 asm volatile (
 481 "    STMFD   SP!, {R4-R9,LR} \n"
 482 "    SUB     SP, SP, #0x2C \n"
 483 "    LDR     R6, =0x4298 \n"
 484 "    LDR     R7, =0xBB8 \n"
 485 "    LDR     R4, =0x5B198 \n"
 486 "    MOV     R0, #0 \n"
 487 "    ADD     R5, SP, #0x1C \n"
 488 "    STR     R0, [SP, #0xC] \n"
 489 
 490 "loc_FF0B2AC8:\n"
 491 "    LDR     R0, [R6, #0x20] \n"
 492 "    MOV     R2, #0 \n"
 493 "    ADD     R1, SP, #0x28 \n"
 494 "    BL      sub_0068BBE4 /*_ReceiveMessageQueue*/ \n"
 495 "    LDR     R0, [SP, #0xC] \n"
 496 "    CMP     R0, #1 \n"
 497 "    BNE     loc_FF0B2B14 \n"
 498 "    LDR     R0, [SP, #0x28] \n"
 499 "    LDR     R0, [R0] \n"
 500 "    CMP     R0, #0x14 \n"
 501 "    CMPNE   R0, #0x15 \n"
 502 "    CMPNE   R0, #0x16 \n"
 503 "    CMPNE   R0, #0x17 \n"
 504 "    BEQ     loc_FF0B2C74 \n"
 505 "    CMP     R0, #0x2A \n"
 506 "    BEQ     loc_FF0B2BFC \n"
 507 "    ADD     R1, SP, #0xC \n"
 508 "    MOV     R0, #0 \n"
 509 "    BL      sub_FF0B2A58 \n"
 510 
 511 "loc_FF0B2B14:\n"
 512 "    LDR     R0, [SP, #0x28] \n"
 513 "    LDR     R1, [R0] \n"
 514 "    CMP     R1, #0x30 \n"
 515 "    BNE     loc_FF0B2B40 \n"
 516 "    BL      sub_FF0B3EA8 \n"
 517 "    LDR     R0, [R6, #0x1C] \n"
 518 "    MOV     R1, #1 \n"
 519 "    BL      sub_0068B954 /*_SetEventFlag*/ \n"
 520 "    BL      _ExitTask \n"
 521 "    ADD     SP, SP, #0x2C \n"
 522 "    LDMFD   SP!, {R4-R9,PC} \n"
 523 
 524 "loc_FF0B2B40:\n"
 525 "    CMP     R1, #0x2F \n"
 526 "    BNE     loc_FF0B2B5C \n"
 527 "    LDR     R2, [R0, #0x8C]! \n"
 528 "    LDR     R1, [R0, #4] \n"
 529 "    MOV     R0, R1 \n"
 530 "    BLX     R2 \n"
 531 "    B       loc_FF0B3130 \n"
 532 
 533 "loc_FF0B2B5C:\n"
 534 "    CMP     R1, #0x28 \n"
 535 "    BNE     loc_FF0B2BAC \n"
 536 "    LDR     R0, [R6, #0x1C] \n"
 537 "    MOV     R1, #0x80 \n"
 538 "    BL      sub_0068B988 /*_ClearEventFlag*/ \n"
 539 "    LDR     R0, =0xFF0AD978 \n"
 540 "    MOV     R1, #0x80 \n"
 541 "    BL      sub_FF189ADC \n"
 542 "    LDR     R0, [R6, #0x1C] \n"
 543 "    MOV     R2, R7 \n"
 544 "    MOV     R1, #0x80 \n"
 545 "    BL      sub_0068B894 /*_WaitForAllEventFlag*/ \n"
 546 "    TST     R0, #1 \n"
 547 "    LDRNE   R1, =0x1582 \n"
 548 "    BNE     loc_FF0B2C68 \n"
 549 
 550 "loc_FF0B2B98:\n"
 551 "    LDR     R1, [SP, #0x28] \n"
 552 "    LDR     R0, [R1, #0x90] \n"
 553 "    LDR     R1, [R1, #0x8C] \n"
 554 "    BLX     R1 \n"
 555 "    B       loc_FF0B3130 \n"
 556 
 557 "loc_FF0B2BAC:\n"
 558 "    CMP     R1, #0x29 \n"
 559 "    BNE     loc_FF0B2BF4 \n"
 560 "    ADD     R1, SP, #0xC \n"
 561 "    BL      sub_FF0B2A58 \n"
 562 "    LDR     R0, [R6, #0x1C] \n"
 563 "    MOV     R1, #0x100 \n"
 564 "    BL      sub_0068B988 /*_ClearEventFlag*/ \n"
 565 "    LDR     R0, =0xFF0AD988 \n"
 566 "    MOV     R1, #0x100 \n"
 567 "    BL      sub_FF189C7C \n"
 568 "    LDR     R0, [R6, #0x1C] \n"
 569 "    MOV     R2, R7 \n"
 570 "    MOV     R1, #0x100 \n"
 571 "    BL      sub_0068B894 /*_WaitForAllEventFlag*/ \n"
 572 "    TST     R0, #1 \n"
 573 "    BEQ     loc_FF0B2B98 \n"
 574 "    LDR     R1, =0x158C \n"
 575 "    B       loc_FF0B2C68 \n"
 576 
 577 "loc_FF0B2BF4:\n"
 578 "    CMP     R1, #0x2A \n"
 579 "    BNE     loc_FF0B2C0C \n"
 580 
 581 "loc_FF0B2BFC:\n"
 582 "    LDR     R0, [SP, #0x28] \n"
 583 "    ADD     R1, SP, #0xC \n"
 584 "    BL      sub_FF0B2A58 \n"
 585 "    B       loc_FF0B2B98 \n"
 586 
 587 "loc_FF0B2C0C:\n"
 588 "    CMP     R1, #0x2D \n"
 589 "    BNE     loc_FF0B2C24 \n"
 590 "    BL      sub_FF09DAE8 \n"
 591 "    BL      sub_FF09E7D4 \n"
 592 "    BL      sub_FF09E33C \n"
 593 "    B       loc_FF0B2B98 \n"
 594 
 595 "loc_FF0B2C24:\n"
 596 "    CMP     R1, #0x2E \n"
 597 "    BNE     loc_FF0B2C74 \n"
 598 "    LDR     R0, [R6, #0x1C] \n"
 599 "    MOV     R1, #4 \n"
 600 "    BL      sub_0068B988 /*_ClearEventFlag*/ \n"
 601 "    LDR     R1, =0xFF0AD9A8 \n"
 602 "    LDR     R0, =0xFFFFF400 \n"
 603 "    MOV     R2, #4 \n"
 604 "    BL      sub_FF09D538 \n"
 605 "    BL      sub_FF09D7C8 \n"
 606 "    LDR     R0, [R6, #0x1C] \n"
 607 "    MOV     R2, R7 \n"
 608 "    MOV     R1, #4 \n"
 609 "    BL      sub_0068B7B0 /*_WaitForAnyEventFlag*/ \n"
 610 "    TST     R0, #1 \n"
 611 "    BEQ     loc_FF0B2B98 \n"
 612 "    LDR     R1, =0x15B4 \n"
 613 
 614 "loc_FF0B2C68:\n"
 615 "    LDR     R0, =0xFF0AE188 /*'ExpDrv.c'*/ \n"
 616 "    BL      _DebugAssert \n"
 617 "    B       loc_FF0B2B98 \n"
 618 
 619 "loc_FF0B2C74:\n"
 620 "    LDR     R0, [SP, #0x28] \n"
 621 "    MOV     R8, #1 \n"
 622 "    LDR     R1, [R0] \n"
 623 "    CMP     R1, #0x12 \n"
 624 "    CMPNE   R1, #0x13 \n"
 625 "    BNE     loc_FF0B2CDC \n"
 626 "    LDR     R1, [R0, #0x7C] \n"
 627 "    ADD     R1, R1, R1, LSL#1 \n"
 628 "    ADD     R1, R0, R1, LSL#2 \n"
 629 "    SUB     R1, R1, #8 \n"
 630 "    LDMIA   R1, {R2,R3,R9} \n"
 631 "    STMIA   R5, {R2,R3,R9} \n"
 632 "    BL      sub_FF0B0C18 \n"
 633 "    LDR     R0, [SP, #0x28] \n"
 634 "    LDR     R1, [R0, #0x7C] \n"
 635 "    LDR     R3, [R0, #0x8C] \n"
 636 "    LDR     R2, [R0, #0x90] \n"
 637 "    ADD     R0, R0, #4 \n"
 638 "    BLX     R3 \n"
 639 "    LDR     R0, [SP, #0x28] \n"
 640 "    BL      sub_FF0B42C8 \n"
 641 "    LDR     R0, [SP, #0x28] \n"
 642 "    LDR     R1, [R0, #0x7C] \n"
 643 "    LDR     R2, [R0, #0x98] \n"
 644 "    LDR     R3, [R0, #0x94] \n"
 645 "    B       loc_FF0B2FF4 \n"
 646 
 647 "loc_FF0B2CDC:\n"
 648 "    CMP     R1, #0x14 \n"
 649 "    CMPNE   R1, #0x15 \n"
 650 "    CMPNE   R1, #0x16 \n"
 651 "    CMPNE   R1, #0x17 \n"
 652 "    BNE     loc_FF0B2D94 \n"
 653 "    ADD     R3, SP, #0xC \n"
 654 "    MOV     R2, SP \n"
 655 "    ADD     R1, SP, #0x1C \n"
 656 "    BL      sub_FF0B0E78 \n"
 657 "    CMP     R0, #1 \n"
 658 "    MOV     R9, R0 \n"
 659 "    CMPNE   R9, #5 \n"
 660 "    BNE     loc_FF0B2D30 \n"
 661 "    LDR     R0, [SP, #0x28] \n"
 662 "    MOV     R2, R9 \n"
 663 "    LDR     R1, [R0, #0x7C]! \n"
 664 "    LDR     R12, [R0, #0x10]! \n"
 665 "    LDR     R3, [R0, #4] \n"
 666 "    MOV     R0, SP \n"
 667 "    BLX     R12 \n"
 668 "    B       loc_FF0B2D68 \n"
 669 
 670 "loc_FF0B2D30:\n"
 671 "    LDR     R0, [SP, #0x28] \n"
 672 "    CMP     R9, #2 \n"
 673 "    LDR     R3, [R0, #0x90] \n"
 674 "    CMPNE   R9, #6 \n"
 675 "    BNE     loc_FF0B2D7C \n"
 676 "    LDR     R12, [R0, #0x8C] \n"
 677 "    MOV     R2, R9 \n"
 678 "    MOV     R1, #1 \n"
 679 "    MOV     R0, SP \n"
 680 "    BLX     R12 \n"
 681 "    LDR     R0, [SP, #0x28] \n"
 682 "    MOV     R2, SP \n"
 683 "    ADD     R1, SP, #0x1C \n"
 684 "    BL      sub_FF0B2730 \n"
 685 
 686 "loc_FF0B2D68:\n"
 687 "    LDR     R0, [SP, #0x28] \n"
 688 "    LDR     R2, [SP, #0xC] \n"
 689 "    MOV     R1, R9 \n"
 690 "    BL      sub_FF0B29F8 \n"
 691 "    B       loc_FF0B2FFC \n"
 692 
 693 "loc_FF0B2D7C:\n"
 694 "    LDR     R1, [R0, #0x7C] \n"
 695 "    LDR     R12, [R0, #0x8C] \n"
 696 "    MOV     R2, R9 \n"
 697 "    ADD     R0, R0, #4 \n"
 698 "    BLX     R12 \n"
 699 "    B       loc_FF0B2FFC \n"
 700 
 701 "loc_FF0B2D94:\n"
 702 "    CMP     R1, #0x24 \n"
 703 "    CMPNE   R1, #0x25 \n"
 704 "    BNE     loc_FF0B2DE0 \n"
 705 "    LDR     R1, [R0, #0x7C] \n"
 706 "    ADD     R1, R1, R1, LSL#1 \n"
 707 "    ADD     R1, R0, R1, LSL#2 \n"
 708 "    SUB     R1, R1, #8 \n"
 709 "    LDMIA   R1, {R2,R3,R9} \n"
 710 "    STMIA   R5, {R2,R3,R9} \n"
 711 "    BL      sub_FF0AF994 \n"
 712 "    LDR     R0, [SP, #0x28] \n"
 713 "    LDR     R1, [R0, #0x7C] \n"
 714 "    LDR     R3, [R0, #0x8C] \n"
 715 "    LDR     R2, [R0, #0x90] \n"
 716 "    ADD     R0, R0, #4 \n"
 717 "    BLX     R3 \n"
 718 "    LDR     R0, [SP, #0x28] \n"
 719 "    BL      sub_FF0AFE68 \n"
 720 "    B       loc_FF0B2FFC \n"
 721 
 722 "loc_FF0B2DE0:\n"
 723 "    ADD     R1, R0, #4 \n"
 724 "    LDMIA   R1, {R2,R3,R9} \n"
 725 "    STMIA   R5, {R2,R3,R9} \n"
 726 "    LDR     R1, [R0] \n"
 727 "    CMP     R1, #0x28 \n"
 728 "    ADDCC   PC, PC, R1, LSL#2 \n"
 729 "    B       loc_FF0B2FE4 \n"
 730 "    B       loc_FF0B2E9C \n"
 731 "    B       loc_FF0B2E9C \n"
 732 "    B       loc_FF0B2EA4 \n"
 733 "    B       loc_FF0B2EAC \n"
 734 "    B       loc_FF0B2EAC \n"
 735 "    B       loc_FF0B2EAC \n"
 736 "    B       loc_FF0B2E9C \n"
 737 "    B       loc_FF0B2EA4 \n"
 738 "    B       loc_FF0B2EAC \n"
 739 "    B       loc_FF0B2EAC \n"
 740 "    B       loc_FF0B2EC4 \n"
 741 "    B       loc_FF0B2EC4 \n"
 742 "    B       loc_FF0B2FD0 \n"
 743 "    B       loc_FF0B2FD8 \n"
 744 "    B       loc_FF0B2FD8 \n"
 745 "    B       loc_FF0B2FD8 \n"
 746 "    B       loc_FF0B2FD8 \n"
 747 "    B       loc_FF0B2FE0 \n"
 748 "    B       loc_FF0B2FE4 \n"
 749 "    B       loc_FF0B2FE4 \n"
 750 "    B       loc_FF0B2FE4 \n"
 751 "    B       loc_FF0B2FE4 \n"
 752 "    B       loc_FF0B2FE4 \n"
 753 "    B       loc_FF0B2FE4 \n"
 754 "    B       loc_FF0B2EB4 \n"
 755 "    B       loc_FF0B2EBC \n"
 756 "    B       loc_FF0B2EBC \n"
 757 "    B       loc_FF0B2EBC \n"
 758 "    B       loc_FF0B2ED0 \n"
 759 "    B       loc_FF0B2ED0 \n"
 760 "    B       loc_FF0B2ED8 \n"
 761 "    B       loc_FF0B2F10 \n"
 762 "    B       loc_FF0B2F48 \n"
 763 "    B       loc_FF0B2F80 \n"
 764 "    B       loc_FF0B2FB8 \n"
 765 "    B       loc_FF0B2FB8 \n"
 766 "    B       loc_FF0B2FE4 \n"
 767 "    B       loc_FF0B2FE4 \n"
 768 "    B       loc_FF0B2FC0 \n"
 769 "    B       loc_FF0B2FC8 \n"
 770 
 771 "loc_FF0B2E9C:\n"
 772 "    BL      sub_FF0ADFBC \n"
 773 "    B       loc_FF0B2FE4 \n"
 774 
 775 "loc_FF0B2EA4:\n"
 776 "    BL      sub_FF0AE2B4 \n"
 777 "    B       loc_FF0B2FE4 \n"
 778 
 779 "loc_FF0B2EAC:\n"
 780 "    BL      sub_FF0AE51C \n"
 781 "    B       loc_FF0B2FE4 \n"
 782 
 783 "loc_FF0B2EB4:\n"
 784 "    BL      sub_FF0AE810 \n"
 785 "    B       loc_FF0B2FE4 \n"
 786 
 787 "loc_FF0B2EBC:\n"
 788 "    BL      sub_FF0AEA28 \n"
 789 "    B       loc_FF0B2FE4 \n"
 790 
 791 "loc_FF0B2EC4:\n"
 792 "    BL      sub_FF0AEF18_my \n"  // --> Patched. Old value = 0xFF0AEF18.
 793 "    MOV     R8, #0 \n"
 794 "    B       loc_FF0B2FE4 \n"
 795 
 796 "loc_FF0B2ED0:\n"
 797 "    BL      sub_FF0AF0F8 \n"
 798 "    B       loc_FF0B2FE4 \n"
 799 
 800 "loc_FF0B2ED8:\n"
 801 "    LDRH    R1, [R0, #4] \n"
 802 "    STRH    R1, [SP, #0x1C] \n"
 803 "    LDRH    R1, [R4, #2] \n"
 804 "    STRH    R1, [SP, #0x1E] \n"
 805 "    LDRH    R1, [R4, #4] \n"
 806 "    STRH    R1, [SP, #0x20] \n"
 807 "    LDRH    R1, [R4, #6] \n"
 808 "    STRH    R1, [SP, #0x22] \n"
 809 "    LDRH    R1, [R0, #0xC] \n"
 810 "    STRH    R1, [SP, #0x24] \n"
 811 "    LDRH    R1, [R4, #0xA] \n"
 812 "    STRH    R1, [SP, #0x26] \n"
 813 "    BL      sub_FF0B3F3C \n"
 814 "    B       loc_FF0B2FE4 \n"
 815 
 816 "loc_FF0B2F10:\n"
 817 "    LDRH    R1, [R0, #4] \n"
 818 "    STRH    R1, [SP, #0x1C] \n"
 819 "    LDRH    R1, [R4, #2] \n"
 820 "    STRH    R1, [SP, #0x1E] \n"
 821 "    LDRH    R1, [R4, #4] \n"
 822 "    STRH    R1, [SP, #0x20] \n"
 823 "    LDRH    R1, [R4, #6] \n"
 824 "    STRH    R1, [SP, #0x22] \n"
 825 "    LDRH    R1, [R4, #8] \n"
 826 "    STRH    R1, [SP, #0x24] \n"
 827 "    LDRH    R1, [R4, #0xA] \n"
 828 "    STRH    R1, [SP, #0x26] \n"
 829 "    BL      sub_FF0B40C8 \n"
 830 "    B       loc_FF0B2FE4 \n"
 831 
 832 "loc_FF0B2F48:\n"
 833 "    LDRH    R1, [R4] \n"
 834 "    STRH    R1, [SP, #0x1C] \n"
 835 "    LDRH    R1, [R0, #6] \n"
 836 "    STRH    R1, [SP, #0x1E] \n"
 837 "    LDRH    R1, [R4, #4] \n"
 838 "    STRH    R1, [SP, #0x20] \n"
 839 "    LDRH    R1, [R4, #6] \n"
 840 "    STRH    R1, [SP, #0x22] \n"
 841 "    LDRH    R1, [R4, #8] \n"
 842 "    STRH    R1, [SP, #0x24] \n"
 843 "    LDRH    R1, [R4, #0xA] \n"
 844 "    STRH    R1, [SP, #0x26] \n"
 845 "    BL      sub_FF0B417C \n"
 846 "    B       loc_FF0B2FE4 \n"
 847 
 848 "loc_FF0B2F80:\n"
 849 "    LDRH    R1, [R4] \n"
 850 "    STRH    R1, [SP, #0x1C] \n"
 851 "    LDRH    R1, [R4, #2] \n"
 852 "    STRH    R1, [SP, #0x1E] \n"
 853 "    LDRH    R1, [R4, #4] \n"
 854 "    STRH    R1, [SP, #0x20] \n"
 855 "    LDRH    R1, [R4, #6] \n"
 856 "    STRH    R1, [SP, #0x22] \n"
 857 "    LDRH    R1, [R0, #0xC] \n"
 858 "    STRH    R1, [SP, #0x24] \n"
 859 "    LDRH    R1, [R4, #0xA] \n"
 860 "    STRH    R1, [SP, #0x26] \n"
 861 "    BL      sub_FF0B4224 \n"
 862 "    B       loc_FF0B2FE4 \n"
 863 
 864 "loc_FF0B2FB8:\n"
 865 "    BL      sub_FF0AF748 \n"
 866 "    B       loc_FF0B2FE4 \n"
 867 
 868 "loc_FF0B2FC0:\n"
 869 "    BL      sub_FF0AFF6C \n"
 870 "    B       loc_FF0B2FE4 \n"
 871 
 872 "loc_FF0B2FC8:\n"
 873 "    BL      sub_FF0B04C8 \n"
 874 "    B       loc_FF0B2FE4 \n"
 875 
 876 "loc_FF0B2FD0:\n"
 877 "    BL      sub_FF0B06EC \n"
 878 "    B       loc_FF0B2FE4 \n"
 879 
 880 "loc_FF0B2FD8:\n"
 881 "    BL      sub_FF0B08A8 \n"
 882 "    B       loc_FF0B2FE4 \n"
 883 
 884 "loc_FF0B2FE0:\n"
 885 "    BL      sub_FF0B0A10 \n"
 886 
 887 "loc_FF0B2FE4:\n"
 888 "    LDR     R0, [SP, #0x28] \n"
 889 "    LDR     R1, [R0, #0x7C] \n"
 890 "    LDR     R2, [R0, #0x90] \n"
 891 "    LDR     R3, [R0, #0x8C] \n"
 892 
 893 "loc_FF0B2FF4:\n"
 894 "    ADD     R0, R0, #4 \n"
 895 "    BLX     R3 \n"
 896 
 897 "loc_FF0B2FFC:\n"
 898 "    LDR     R0, [SP, #0x28] \n"
 899 "    LDR     R0, [R0] \n"
 900 "    CMP     R0, #0x10 \n"
 901 "    BEQ     loc_FF0B3034 \n"
 902 "    BGT     loc_FF0B3024 \n"
 903 "    CMP     R0, #1 \n"
 904 "    CMPNE   R0, #4 \n"
 905 "    CMPNE   R0, #0xE \n"
 906 "    BNE     loc_FF0B3068 \n"
 907 "    B       loc_FF0B3034 \n"
 908 
 909 "loc_FF0B3024:\n"
 910 "    CMP     R0, #0x13 \n"
 911 "    CMPNE   R0, #0x17 \n"
 912 "    CMPNE   R0, #0x1A \n"
 913 "    BNE     loc_FF0B3068 \n"
 914 
 915 "loc_FF0B3034:\n"
 916 "    LDRSH   R0, [R4] \n"
 917 "    CMN     R0, #0xC00 \n"
 918 "    LDRNESH R1, [R4, #8] \n"
 919 "    CMNNE   R1, #0xC00 \n"
 920 "    STRNEH  R0, [SP, #0x1C] \n"
 921 "    STRNEH  R1, [SP, #0x24] \n"
 922 "    BNE     loc_FF0B3068 \n"
 923 "    ADD     R0, SP, #0x10 \n"
 924 "    BL      sub_FF0B44D4 \n"
 925 "    LDRH    R0, [SP, #0x10] \n"
 926 "    STRH    R0, [SP, #0x1C] \n"
 927 "    LDRH    R0, [SP, #0x18] \n"
 928 "    STRH    R0, [SP, #0x24] \n"
 929 
 930 "loc_FF0B3068:\n"
 931 "    LDR     R0, [SP, #0x28] \n"
 932 "    CMP     R8, #1 \n"
 933 "    BNE     loc_FF0B30B8 \n"
 934 "    LDR     R1, [R0, #0x7C] \n"
 935 "    MOV     R2, #0xC \n"
 936 "    ADD     R1, R1, R1, LSL#1 \n"
 937 "    ADD     R0, R0, R1, LSL#2 \n"
 938 "    SUB     R8, R0, #8 \n"
 939 "    LDR     R0, =0x5B198 \n"
 940 "    ADD     R1, SP, #0x1C \n"
 941 "    BL      sub_0069017C \n"
 942 "    LDR     R0, =0x5B1A4 \n"
 943 "    MOV     R2, #0xC \n"
 944 "    ADD     R1, SP, #0x1C \n"
 945 "    BL      sub_0069017C \n"
 946 "    LDR     R0, =0x5B1B0 \n"
 947 "    MOV     R2, #0xC \n"
 948 "    MOV     R1, R8 \n"
 949 "    BL      sub_0069017C \n"
 950 "    B       loc_FF0B3130 \n"
 951 
 952 "loc_FF0B30B8:\n"
 953 "    LDR     R0, [R0] \n"
 954 "    MOV     R3, #1 \n"
 955 "    CMP     R0, #0xB \n"
 956 "    BNE     loc_FF0B30FC \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_FF0ADD9C \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_FF0B312C \n"
 970 
 971 "loc_FF0B30FC:\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_FF0ADD9C \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_FF0B312C:\n"
 986 "    BL      sub_FF0ADF08 \n"
 987 
 988 "loc_FF0B3130:\n"
 989 "    LDR     R0, [SP, #0x28] \n"
 990 "    BL      sub_FF0B3EA8 \n"
 991 "    B       loc_FF0B2AC8 \n"
 992 );
 993 }
 994 
 995 /*************************************************************/
 996 //** sub_FF0AEF18_my @ 0xFF0AEF18 - 0xFF0AEFD8, length=49
 997 void __attribute__((naked,noinline)) sub_FF0AEF18_my() {
 998 asm volatile (
 999 "    STMFD   SP!, {R4-R8,LR} \n"
1000 "    LDR     R7, =0x4298 \n"
1001 "    MOV     R4, R0 \n"
1002 "    LDR     R0, [R7, #0x1C] \n"
1003 "    MOV     R1, #0x3E \n"
1004 "    BL      sub_0068B988 /*_ClearEventFlag*/ \n"
1005 "    MOV     R2, #0 \n"
1006 "    LDRSH   R0, [R4, #4] \n"
1007 "    MOV     R1, R2 \n"
1008 "    BL      sub_FF0ADA08 \n"
1009 "    MOV     R6, R0 \n"
1010 "    LDRSH   R0, [R4, #6] \n"
1011 "    BL      sub_FF0ADBAC \n"
1012 "    LDRSH   R0, [R4, #8] \n"
1013 "    BL      sub_FF0ADC04 \n"
1014 "    LDRSH   R0, [R4, #0xA] \n"
1015 "    BL      sub_FF0ADC5C \n"
1016 "    LDRSH   R0, [R4, #0xC] \n"
1017 "    MOV     R1, #0 \n"
1018 "    BL      sub_FF0ADCB4 \n"
1019 "    MOV     R5, R0 \n"
1020 "    LDR     R0, [R4] \n"
1021 "    LDR     R8, =0x5B1B0 \n"
1022 "    CMP     R0, #0xB \n"
1023 "    MOVEQ   R6, #0 \n"
1024 "    MOVEQ   R5, R6 \n"
1025 "    BEQ     loc_FF0AEFAC \n"
1026 "    CMP     R6, #1 \n"
1027 "    BNE     loc_FF0AEFAC \n"
1028 "    LDRSH   R0, [R4, #4] \n"
1029 "    LDR     R1, =0xFF0AD968 \n"
1030 "    MOV     R2, #2 \n"
1031 "    BL      sub_FF189B60 \n"
1032 "    STRH    R0, [R4, #4] \n"
1033 "    MOV     R0, #0 \n"
1034 "    STR     R0, [R7, #0x28] \n"
1035 "    B       loc_FF0AEFB4 \n"
1036 
1037 "loc_FF0AEFAC:\n"
1038 "    LDRH    R0, [R8] \n"
1039 "    STRH    R0, [R4, #4] \n"
1040 
1041 "loc_FF0AEFB4:\n"
1042 "    CMP     R5, #1 \n"
1043 "    LDRNEH  R0, [R8, #8] \n"
1044 "    BNE     loc_FF0AEFD0 \n"
1045 "    LDRSH   R0, [R4, #0xC] \n"
1046 "    LDR     R1, =0xFF0AD9EC \n"
1047 "    MOV     R2, #0x20 \n"
1048 "    BL      sub_FF0B3EF8 \n"
1049 
1050 "loc_FF0AEFD0:\n"
1051 "    STRH    R0, [R4, #0xC] \n"
1052 "    LDRSH   R0, [R4, #6] \n"
1053 "    BL      sub_FF09D834_my \n"  // --> Patched. Old value = 0xFF09D834.
1054 "    LDR     PC, =0xFF0AEFDC \n"  // Continue in firmware
1055 );
1056 }
1057 
1058 /*************************************************************/
1059 //** sub_FF09D834_my @ 0xFF09D834 - 0xFF09D874, length=17
1060 void __attribute__((naked,noinline)) sub_FF09D834_my() {
1061 asm volatile (
1062 "    STMFD   SP!, {R4-R6,LR} \n"
1063 "    LDR     R5, =0x3EE8 \n"
1064 "    MOV     R4, R0 \n"
1065 "    LDR     R0, [R5, #4] \n"
1066 "    CMP     R0, #1 \n"
1067 "    LDRNE   R1, =0x14D \n"
1068 "    LDRNE   R0, =0xFF09D66C /*'Shutter.c'*/ \n"
1069 "    BLNE    _DebugAssert \n"
1070 "    CMN     R4, #0xC00 \n"
1071 "    LDREQSH R4, [R5, #2] \n"
1072 "    CMN     R4, #0xC00 \n"
1073 "    LDREQ   R1, =0x153 \n"
1074 "    LDREQ   R0, =0xFF09D66C /*'Shutter.c'*/ \n"
1075 "    STRH    R4, [R5, #2] \n"
1076 "    BLEQ    _DebugAssert \n"
1077 "    MOV     R0, R4 \n"
1078 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
1079 "    LDR     PC, =0xFF09D878 \n"  // Continue in firmware
1080 );
1081 }

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