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

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF192E78_my
  3. exp_drv_task
  4. sub_FF0C2608_my
  5. sub_FF0B27CC_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 320  // 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 @ 0xFF078BF0 - 0xFF078EE4, length=190
  16 void __attribute__((naked,noinline)) capt_seq_task() {
  17 asm volatile (
  18 "    STMFD   SP!, {R3-R9,LR} \n"
  19 "    LDR     R5, =0x3EFA4 \n"
  20 "    LDR     R7, =0x3EF4 \n"
  21 "    MOV     R6, #0 \n"
  22 
  23 "loc_FF078C00:\n"
  24 "    LDR     R0, [R7, #4] \n"
  25 "    MOV     R2, #0 \n"
  26 "    MOV     R1, SP \n"
  27 "    BL      sub_FF02B184 /*_ReceiveMessageQueue*/ \n"
  28 "    TST     R0, #1 \n"
  29 "    BEQ     loc_FF078C2C \n"
  30 "    LDR     R1, =0x47A \n"
  31 "    LDR     R0, =0xFF07861C /*'SsShootTask.c'*/ \n"
  32 "    BL      _DebugAssert \n"
  33 "    BL      _ExitTask \n"
  34 "    LDMFD   SP!, {R3-R9,PC} \n"
  35 
  36 "loc_FF078C2C:\n"
  37 "    LDR     R0, [SP] \n"
  38 "    LDR     R1, [R0] \n"
  39 "    CMP     R1, #0x27 \n"
  40 "    ADDCC   PC, PC, R1, LSL#2 \n"
  41 "    B       loc_FF078EAC \n"
  42 "    B       loc_FF078CDC \n"
  43 "    B       loc_FF078CF4 \n"
  44 "    B       loc_FF078D2C \n"
  45 "    B       loc_FF078D40 \n"
  46 "    B       loc_FF078D38 \n"
  47 "    B       loc_FF078D4C \n"
  48 "    B       loc_FF078D54 \n"
  49 "    B       loc_FF078D5C \n"
  50 "    B       loc_FF078D78 \n"
  51 "    B       loc_FF078DB8 \n"
  52 "    B       loc_FF078D84 \n"
  53 "    B       loc_FF078D90 \n"
  54 "    B       loc_FF078D98 \n"
  55 "    B       loc_FF078DA0 \n"
  56 "    B       loc_FF078DA8 \n"
  57 "    B       loc_FF078DB0 \n"
  58 "    B       loc_FF078DC0 \n"
  59 "    B       loc_FF078DC8 \n"
  60 "    B       loc_FF078DD0 \n"
  61 "    B       loc_FF078DD8 \n"
  62 "    B       loc_FF078DE0 \n"
  63 "    B       loc_FF078DE8 \n"
  64 "    B       loc_FF078DF0 \n"
  65 "    B       loc_FF078DF8 \n"
  66 "    B       loc_FF078E00 \n"
  67 "    B       loc_FF078E08 \n"
  68 "    B       loc_FF078E14 \n"
  69 "    B       loc_FF078E1C \n"
  70 "    B       loc_FF078E28 \n"
  71 "    B       loc_FF078E30 \n"
  72 "    B       loc_FF078E38 \n"
  73 "    B       loc_FF078E40 \n"
  74 "    B       loc_FF078E48 \n"
  75 "    B       loc_FF078E50 \n"
  76 "    B       loc_FF078E58 \n"
  77 "    B       loc_FF078E60 \n"
  78 "    B       loc_FF078E68 \n"
  79 "    B       loc_FF078E74 \n"
  80 "    B       loc_FF078EB8 \n"
  81 
  82 "loc_FF078CDC:\n"
  83 "    BL      shooting_expo_iso_override\n"      // added
  84 "    BL      sub_FF0794CC \n"
  85 "    BL      shooting_expo_param_override\n"    // added
  86 "    BL      sub_FF07618C \n"
  87 "    MOV     R0, #0\n"                          // added
  88 "    STR     R0, [R5,#0x28]\n"                  // added, fixes overrides behavior at short shutter press (from S95)
  89 //"  LDR     R0, [R5, #0x28] \n"  // above patch makes these three lines redundant
  90 //"  CMP     R0, #0 \n"
  91 //"  BLNE    _sub_FF19309C \n"
  92 "    B       loc_FF078EB8 \n"
  93 
  94 "loc_FF078CF4:\n"
  95 "    LDR     R8, [R0, #0xC] \n"
  96 "    MOV     R0, R8 \n"
  97 "    BL      sub_FF192E78_my \n"  // --> Patched. Old value = 0xFF192E78.
  98 "    BL      capt_seq_hook_raw_here\n"
  99 "    MOV     R4, R0 \n"
 100 "    MOV     R2, R8 \n"
 101 "    MOV     R1, #1 \n"
 102 "    BL      sub_FF076C14 \n"
 103 "    TST     R4, #1 \n"
 104 "    BNE     loc_FF078D24 \n"
 105 "    MOV     R0, R8 \n"
 106 "    BL      sub_FF192864 \n"
 107 "    B       loc_FF078EB8 \n"
 108 
 109 "loc_FF078D24:\n"
 110 "    BL      sub_FF192834 \n"
 111 "    B       loc_FF078EB8 \n"
 112 
 113 "loc_FF078D2C:\n"
 114 "    MOV     R0, #1 \n"
 115 "    BL      sub_FF0797AC \n"
 116 "    B       loc_FF078EB8 \n"
 117 
 118 "loc_FF078D38:\n"
 119 "    BL      sub_FF079108 \n"
 120 "    B       loc_FF078D44 \n"
 121 
 122 "loc_FF078D40:\n"
 123 "    BL      sub_FF0794AC \n"
 124 
 125 "loc_FF078D44:\n"
 126 "    STR     R6, [R5, #0x28] \n"
 127 "    B       loc_FF078EB8 \n"
 128 
 129 "loc_FF078D4C:\n"
 130 "    BL      sub_FF0794B4 \n"
 131 "    B       loc_FF078EB8 \n"
 132 
 133 "loc_FF078D54:\n"
 134 "    BL      sub_FF0796A0 \n"
 135 "    B       loc_FF078D7C \n"
 136 
 137 "loc_FF078D5C:\n"
 138 "    LDR     R4, [R0, #0xC] \n"
 139 "    MOV     R0, R4 \n"
 140 "    BL      sub_FF1930F0 \n"
 141 "    MOV     R2, R4 \n"
 142 "    MOV     R1, #9 \n"
 143 "    BL      sub_FF076C14 \n"
 144 "    B       loc_FF078EB8 \n"
 145 
 146 "loc_FF078D78:\n"
 147 "    BL      sub_FF079714 \n"
 148 
 149 "loc_FF078D7C:\n"
 150 "    BL      sub_FF07618C \n"
 151 "    B       loc_FF078EB8 \n"
 152 
 153 "loc_FF078D84:\n"
 154 "    LDR     R0, [R5, #0x58] \n"
 155 "    BL      sub_FF07A034 \n"
 156 "    B       loc_FF078EB8 \n"
 157 
 158 "loc_FF078D90:\n"
 159 "    BL      sub_FF07A304 \n"
 160 "    B       loc_FF078EB8 \n"
 161 
 162 "loc_FF078D98:\n"
 163 "    BL      sub_FF07A368 \n"
 164 "    B       loc_FF078EB8 \n"
 165 
 166 "loc_FF078DA0:\n"
 167 "    BL      sub_FF07A55C \n"
 168 "    B       loc_FF078EB8 \n"
 169 
 170 "loc_FF078DA8:\n"
 171 "    BL      sub_FF07A9AC \n"
 172 "    B       loc_FF078EB8 \n"
 173 
 174 "loc_FF078DB0:\n"
 175 "    BL      sub_FF07AA5C \n"
 176 "    B       loc_FF078EB8 \n"
 177 
 178 "loc_FF078DB8:\n"
 179 "    BL      sub_FF0794AC \n"
 180 "    B       loc_FF078EB8 \n"
 181 
 182 "loc_FF078DC0:\n"
 183 "    BL      sub_FF191970 \n"
 184 "    B       loc_FF078EB8 \n"
 185 
 186 "loc_FF078DC8:\n"
 187 "    BL      sub_FF191B84 \n"
 188 "    B       loc_FF078EB8 \n"
 189 
 190 "loc_FF078DD0:\n"
 191 "    BL      sub_FF191C1C \n"
 192 "    B       loc_FF078EB8 \n"
 193 
 194 "loc_FF078DD8:\n"
 195 "    BL      sub_FF191D08 \n"
 196 "    B       loc_FF078EB8 \n"
 197 
 198 "loc_FF078DE0:\n"
 199 "    BL      sub_FF191DD8 \n"
 200 "    B       loc_FF078EB8 \n"
 201 
 202 "loc_FF078DE8:\n"
 203 "    MOV     R0, #0 \n"
 204 "    B       loc_FF078E0C \n"
 205 
 206 "loc_FF078DF0:\n"
 207 "    BL      sub_FF192260 \n"
 208 "    B       loc_FF078EB8 \n"
 209 
 210 "loc_FF078DF8:\n"
 211 "    BL      sub_FF1922F8 \n"
 212 "    B       loc_FF078EB8 \n"
 213 
 214 "loc_FF078E00:\n"
 215 "    BL      sub_FF1923D8 \n"
 216 "    B       loc_FF078EB8 \n"
 217 
 218 "loc_FF078E08:\n"
 219 "    MOV     R0, #1 \n"
 220 
 221 "loc_FF078E0C:\n"
 222 "    BL      sub_FF1920F8 \n"
 223 "    B       loc_FF078EB8 \n"
 224 
 225 "loc_FF078E14:\n"
 226 "    BL      sub_FF0799D8 \n"
 227 "    B       loc_FF078EB8 \n"
 228 
 229 "loc_FF078E1C:\n"
 230 "    BL      sub_FF079A18 \n"
 231 "    BL      sub_FF193DA4 \n"
 232 "    B       loc_FF078EB8 \n"
 233 
 234 "loc_FF078E28:\n"
 235 "    BL      sub_FF191F5C \n"
 236 "    B       loc_FF078EB8 \n"
 237 
 238 "loc_FF078E30:\n"
 239 "    BL      sub_FF192028 \n"
 240 "    B       loc_FF078EB8 \n"
 241 
 242 "loc_FF078E38:\n"
 243 "    BL      sub_FF193E70 \n"
 244 "    B       loc_FF078EB8 \n"
 245 
 246 "loc_FF078E40:\n"
 247 "    BL      sub_FF0282DC \n"
 248 "    B       loc_FF078EB8 \n"
 249 
 250 "loc_FF078E48:\n"
 251 "    BL      sub_FF07CEA4 \n"
 252 "    B       loc_FF078EB8 \n"
 253 
 254 "loc_FF078E50:\n"
 255 "    BL      sub_FF07CF28 \n"
 256 "    B       loc_FF078EB8 \n"
 257 
 258 "loc_FF078E58:\n"
 259 "    BL      sub_FF192510 \n"
 260 "    B       loc_FF078EB8 \n"
 261 
 262 "loc_FF078E60:\n"
 263 "    BL      sub_FF192574 \n"
 264 "    B       loc_FF078EB8 \n"
 265 
 266 "loc_FF078E68:\n"
 267 "    BL      sub_FF07CF84 \n"
 268 "    BL      sub_FF07CF44 \n"
 269 "    B       loc_FF078EB8 \n"
 270 
 271 "loc_FF078E74:\n"
 272 "    MOV     R0, #1 \n"
 273 "    BL      sub_FF1938E4 \n"
 274 "    MOV     R0, #1 \n"
 275 "    BL      sub_FF193A18 \n"
 276 "    LDRH    R0, [R5, #0xA0] \n"
 277 "    CMP     R0, #4 \n"
 278 "    LDRNEH  R0, [R5] \n"
 279 "    SUBNE   R1, R0, #0x4200 \n"
 280 "    SUBNES  R1, R1, #0x2A \n"
 281 "    BNE     loc_FF078EB8 \n"
 282 "    BL      sub_FF07CF28 \n"
 283 "    BL      sub_FF07D56C \n"
 284 "    BL      sub_FF07D3A8 \n"
 285 "    B       loc_FF078EB8 \n"
 286 
 287 "loc_FF078EAC:\n"
 288 "    LDR     R1, =0x5DB \n"
 289 "    LDR     R0, =0xFF07861C /*'SsShootTask.c'*/ \n"
 290 "    BL      _DebugAssert \n"
 291 
 292 "loc_FF078EB8:\n"
 293 "    LDR     R0, [SP] \n"
 294 "    LDR     R1, [R0, #4] \n"
 295 "    LDR     R0, [R7] \n"
 296 "    BL      sub_FF083C90 /*_SetEventFlag*/ \n"
 297 "    LDR     R4, [SP] \n"
 298 "    LDR     R0, [R4, #8] \n"
 299 "    CMP     R0, #0 \n"
 300 "    LDREQ   R0, =0xFF07861C /*'SsShootTask.c'*/ \n"
 301 "    MOVEQ   R1, #0x118 \n"
 302 "    BLEQ    _DebugAssert \n"
 303 "    STR     R6, [R4, #8] \n"
 304 "    B       loc_FF078C00 \n"
 305 );
 306 }
 307 
 308 /*************************************************************/
 309 //** sub_FF192E78_my @ 0xFF192E78 - 0xFF193098, length=137
 310 void __attribute__((naked,noinline)) sub_FF192E78_my() {
 311 asm volatile (
 312 "    STMFD   SP!, {R3-R7,LR} \n"
 313 "    LDR     R5, =0x3EFA4 \n"
 314 "    MOV     R4, R0 \n"
 315 "    LDR     R0, [R5, #0x28] \n"
 316 "    LDR     R6, =0x420C \n"
 317 "    CMP     R0, #0 \n"
 318 "    MOV     R7, #0 \n"
 319 "    BNE     loc_FF192F08 \n"
 320 "    LDR     R0, [R5, #0xC4] \n"
 321 "    CMP     R0, #1 \n"
 322 "    BNE     loc_FF192EF0 \n"
 323 "    LDRH    R0, [R5] \n"
 324 "    CMP     R0, R6 \n"
 325 "    LDRNEH  R0, [R5, #0x9E] \n"
 326 "    CMPNE   R0, #3 \n"
 327 "    LDRNE   R0, [R4, #8] \n"
 328 "    CMPNE   R0, #1 \n"
 329 "    BLS     loc_FF192ED4 \n"
 330 "    BL      sub_FF022D98 \n"
 331 "    TST     R0, #1 \n"
 332 "    BEQ     loc_FF192F08 \n"
 333 "    BL      sub_FF07ECD8 \n"
 334 "    B       loc_FF192F00 \n"
 335 
 336 "loc_FF192ED4:\n"
 337 "    MOV     R0, #0xC \n"
 338 "    BL      sub_FF07EC78 \n"
 339 "    TST     R0, #1 \n"
 340 "    BEQ     loc_FF192F08 \n"
 341 "    BL      sub_FF193760 \n"
 342 "    BL      sub_FF0768E4 \n"
 343 "    B       loc_FF192F00 \n"
 344 
 345 "loc_FF192EF0:\n"
 346 "    MOV     R0, #0xC \n"
 347 "    BL      sub_FF07EC78 \n"
 348 "    TST     R0, #1 \n"
 349 "    BEQ     loc_FF192F08 \n"
 350 
 351 "loc_FF192F00:\n"
 352 "    MOV     R0, #1 \n"
 353 "    LDMFD   SP!, {R3-R7,PC} \n"
 354 
 355 "loc_FF192F08:\n"
 356 "    LDRH    R0, [R5] \n"
 357 "    CMP     R0, R6 \n"
 358 "    LDRNEH  R0, [R5, #0x9E] \n"
 359 "    CMPNE   R0, #3 \n"
 360 "    LDRNE   R0, [R4, #8] \n"
 361 "    CMPNE   R0, #1 \n"
 362 "    BLS     loc_FF192F38 \n"
 363 "    LDRH    R0, [R5, #0x9C] \n"
 364 "    CMP     R0, #0 \n"
 365 "    LDREQH  R0, [R5, #0x98] \n"
 366 "    CMPEQ   R0, #2 \n"
 367 "    BLEQ    sub_FF079AE4 \n"
 368 
 369 "loc_FF192F38:\n"
 370 "    LDRH    R1, [R5] \n"
 371 "    LDRH    R0, [R5, #0x9E] \n"
 372 "    CMP     R1, R6 \n"
 373 "    BEQ     loc_FF192F78 \n"
 374 "    CMP     R0, #3 \n"
 375 "    BEQ     loc_FF192FB8 \n"
 376 "    LDR     R0, [R4, #8] \n"
 377 "    CMP     R0, #1 \n"
 378 "    BLS     loc_FF192F80 \n"
 379 "    LDRH    R0, [R5, #0x9C] \n"
 380 "    CMP     R0, #0 \n"
 381 "    BNE     loc_FF192FB8 \n"
 382 "    LDRH    R0, [R5, #0x98] \n"
 383 "    CMP     R0, #2 \n"
 384 "    BEQ     loc_FF192FB4 \n"
 385 "    B       loc_FF192F8C \n"
 386 
 387 "loc_FF192F78:\n"
 388 "    CMP     R0, #3 \n"
 389 "    BEQ     loc_FF192FB8 \n"
 390 
 391 "loc_FF192F80:\n"
 392 "    LDRH    R0, [R5, #0x9C] \n"
 393 "    CMP     R0, #0 \n"
 394 "    BNE     loc_FF192FB8 \n"
 395 
 396 "loc_FF192F8C:\n"
 397 "    LDRH    R0, [R5, #0x98] \n"
 398 "    CMP     R0, #1 \n"
 399 "    BNE     loc_FF192FB8 \n"
 400 "    CMP     R1, R6 \n"
 401 "    LDRNE   R0, [R4, #8] \n"
 402 "    CMPNE   R0, #1 \n"
 403 "    BLS     loc_FF192FB8 \n"
 404 "    LDR     R0, [R4, #0xC] \n"
 405 "    CMP     R0, #1 \n"
 406 "    BNE     loc_FF192FB8 \n"
 407 
 408 "loc_FF192FB4:\n"
 409 "    BL      sub_FF193EA8 \n"
 410 
 411 "loc_FF192FB8:\n"
 412 "    BL      sub_FF193E70 \n"
 413 "    BL      sub_FF0794BC \n"
 414 "    LDR     R0, [R5, #0x28] \n"
 415 "    CMP     R0, #0 \n"
 416 "    BNE     loc_FF193084 \n"
 417 "    MOV     R0, R4 \n"
 418 "    BL      sub_FF1926EC \n"
 419 "    TST     R0, #1 \n"
 420 "    LDMNEFD SP!, {R3-R7,PC} \n"
 421 "    MOV     R0, R4 \n"
 422 "    BL      sub_FF192B50 \n"
 423 "    BL      sub_FF1936A4 \n"
 424 "    LDR     R0, [R5, #0xC4] \n"
 425 "    CMP     R0, #1 \n"
 426 "    BNE     loc_FF193010 \n"
 427 "    LDRH    R0, [R5] \n"
 428 "    CMP     R0, R6 \n"
 429 "    LDRNEH  R0, [R5, #0x9E] \n"
 430 "    CMPNE   R0, #3 \n"
 431 "    LDRNE   R0, [R4, #8] \n"
 432 "    CMPNE   R0, #1 \n"
 433 "    BHI     loc_FF193018 \n"
 434 
 435 "loc_FF193010:\n"
 436 "    MOV     R0, #2 \n"
 437 "    BL      sub_FF0805B4 \n"
 438 "    BL      wait_until_remote_button_is_released\n"    // added
 439 "    BL      capt_seq_hook_set_nr\n"                    // added
 440 
 441 "loc_FF193018:\n"
 442 "    LDRH    R0, [R5] \n"
 443 "    SUB     R1, R0, #0x4200 \n"
 444 "    SUBS    R1, R1, #0x2D \n"
 445 "    BNE     loc_FF193074 \n"
 446 "    MOV     R5, #1 \n"
 447 "    MOV     R2, #2 \n"
 448 "    MOV     R1, SP \n"
 449 "    ADD     R0, R2, #0x15C \n"
 450 "    STR     R5, [SP] \n"
 451 "    BL      _GetPropertyCase \n"
 452 "    TST     R0, #1 \n"
 453 "    MOVNE   R1, #0xBC \n"
 454 "    LDRNE   R0, =0xFF1931A0 /*'SsCaptureSeq.c'*/ \n"
 455 "    BLNE    _DebugAssert \n"
 456 "    LDRH    R0, [SP] \n"
 457 "    CMP     R0, #1 \n"
 458 "    BLS     loc_FF19306C \n"
 459 "    MOV     R0, R4 \n"
 460 "    STR     R5, [R4, #0xE4] \n"
 461 "    BL      sub_FF3100F4 \n"
 462 "    B       loc_FF19307C \n"
 463 
 464 "loc_FF19306C:\n"
 465 "    MOV     R0, #0 \n"
 466 "    STR     R0, [R4, #0xE4] \n"
 467 
 468 "loc_FF193074:\n"
 469 "    MOV     R0, R4 \n"
 470 "    BL      sub_FF30FD34 \n"
 471 
 472 "loc_FF19307C:\n"
 473 "    MOV     R7, R0 \n"
 474 "    B       loc_FF193094 \n"
 475 
 476 "loc_FF193084:\n"
 477 "    LDR     R0, =0x8A08 \n"
 478 "    LDR     R0, [R0] \n"
 479 "    CMP     R0, #0 \n"
 480 "    MOVNE   R7, #0x1D \n"
 481 
 482 "loc_FF193094:\n"
 483 "    MOV     R0, R7 \n"
 484 "    LDMFD   SP!, {R3-R7,PC} \n"
 485 );
 486 }
 487 
 488 /*************************************************************/
 489 //** exp_drv_task @ 0xFF0C5E98 - 0xFF0C64FC, length=410
 490 void __attribute__((naked,noinline)) exp_drv_task() {
 491 asm volatile (
 492 "    STMFD   SP!, {R4-R9,LR} \n"
 493 "    SUB     SP, SP, #0x24 \n"
 494 "    LDR     R6, =0x5838 \n"
 495 "    LDR     R7, =0xBB8 \n"
 496 "    LDR     R4, =0x5AA3C \n"
 497 "    MOV     R0, #0 \n"
 498 "    ADD     R5, SP, #0x14 \n"
 499 "    STR     R0, [SP, #0x10] \n"
 500 
 501 "loc_FF0C5EB8:\n"
 502 "    LDR     R0, [R6, #0x20] \n"
 503 "    MOV     R2, #0 \n"
 504 "    ADD     R1, SP, #0x20 \n"
 505 "    BL      sub_FF02B184 /*_ReceiveMessageQueue*/ \n"
 506 "    LDR     R0, [SP, #0x10] \n"
 507 "    CMP     R0, #1 \n"
 508 "    BNE     loc_FF0C5F04 \n"
 509 "    LDR     R0, [SP, #0x20] \n"
 510 "    LDR     R0, [R0] \n"
 511 "    CMP     R0, #0x14 \n"
 512 "    CMPNE   R0, #0x15 \n"
 513 "    CMPNE   R0, #0x16 \n"
 514 "    CMPNE   R0, #0x17 \n"
 515 "    BEQ     loc_FF0C6064 \n"
 516 "    CMP     R0, #0x29 \n"
 517 "    BEQ     loc_FF0C5FEC \n"
 518 "    ADD     R1, SP, #0x10 \n"
 519 "    MOV     R0, #0 \n"
 520 "    BL      sub_FF0C5E48 \n"
 521 
 522 "loc_FF0C5F04:\n"
 523 "    LDR     R0, [SP, #0x20] \n"
 524 "    LDR     R1, [R0] \n"
 525 "    CMP     R1, #0x2F \n"
 526 "    BNE     loc_FF0C5F30 \n"
 527 "    BL      sub_FF0C72C4 \n"
 528 "    LDR     R0, [R6, #0x1C] \n"
 529 "    MOV     R1, #1 \n"
 530 "    BL      sub_FF083C90 /*_SetEventFlag*/ \n"
 531 "    BL      _ExitTask \n"
 532 "    ADD     SP, SP, #0x24 \n"
 533 "    LDMFD   SP!, {R4-R9,PC} \n"
 534 
 535 "loc_FF0C5F30:\n"
 536 "    CMP     R1, #0x2E \n"
 537 "    BNE     loc_FF0C5F4C \n"
 538 "    LDR     R2, [R0, #0x8C]! \n"
 539 "    LDR     R1, [R0, #4] \n"
 540 "    MOV     R0, R1 \n"
 541 "    BLX     R2 \n"
 542 "    B       loc_FF0C64F4 \n"
 543 
 544 "loc_FF0C5F4C:\n"
 545 "    CMP     R1, #0x27 \n"
 546 "    BNE     loc_FF0C5F9C \n"
 547 "    LDR     R0, [R6, #0x1C] \n"
 548 "    MOV     R1, #0x80 \n"
 549 "    BL      sub_FF083CC4 /*_ClearEventFlag*/ \n"
 550 "    LDR     R0, =0xFF0C111C \n"
 551 "    MOV     R1, #0x80 \n"
 552 "    BL      sub_FF183924 \n"
 553 "    LDR     R0, [R6, #0x1C] \n"
 554 "    MOV     R2, R7 \n"
 555 "    MOV     R1, #0x80 \n"
 556 "    BL      sub_FF083BD0 /*_WaitForAllEventFlag*/ \n"
 557 "    TST     R0, #1 \n"
 558 "    LDRNE   R1, =0x1756 \n"
 559 "    BNE     loc_FF0C6058 \n"
 560 
 561 "loc_FF0C5F88:\n"
 562 "    LDR     R1, [SP, #0x20] \n"
 563 "    LDR     R0, [R1, #0x90] \n"
 564 "    LDR     R1, [R1, #0x8C] \n"
 565 "    BLX     R1 \n"
 566 "    B       loc_FF0C64F4 \n"
 567 
 568 "loc_FF0C5F9C:\n"
 569 "    CMP     R1, #0x28 \n"
 570 "    BNE     loc_FF0C5FE4 \n"
 571 "    ADD     R1, SP, #0x10 \n"
 572 "    BL      sub_FF0C5E48 \n"
 573 "    LDR     R0, [R6, #0x1C] \n"
 574 "    MOV     R1, #0x100 \n"
 575 "    BL      sub_FF083CC4 /*_ClearEventFlag*/ \n"
 576 "    LDR     R0, =0xFF0C112C \n"
 577 "    MOV     R1, #0x100 \n"
 578 "    BL      sub_FF18424C \n"
 579 "    LDR     R0, [R6, #0x1C] \n"
 580 "    MOV     R2, R7 \n"
 581 "    MOV     R1, #0x100 \n"
 582 "    BL      sub_FF083BD0 /*_WaitForAllEventFlag*/ \n"
 583 "    TST     R0, #1 \n"
 584 "    BEQ     loc_FF0C5F88 \n"
 585 "    LDR     R1, =0x1760 \n"
 586 "    B       loc_FF0C6058 \n"
 587 
 588 "loc_FF0C5FE4:\n"
 589 "    CMP     R1, #0x29 \n"
 590 "    BNE     loc_FF0C5FFC \n"
 591 
 592 "loc_FF0C5FEC:\n"
 593 "    LDR     R0, [SP, #0x20] \n"
 594 "    ADD     R1, SP, #0x10 \n"
 595 "    BL      sub_FF0C5E48 \n"
 596 "    B       loc_FF0C5F88 \n"
 597 
 598 "loc_FF0C5FFC:\n"
 599 "    CMP     R1, #0x2C \n"
 600 "    BNE     loc_FF0C6014 \n"
 601 "    BL      sub_FF0B2A5C \n"
 602 "    BL      sub_FF0B36CC \n"
 603 "    BL      sub_FF0B3244 \n"
 604 "    B       loc_FF0C5F88 \n"
 605 
 606 "loc_FF0C6014:\n"
 607 "    CMP     R1, #0x2D \n"
 608 "    BNE     loc_FF0C6064 \n"
 609 "    LDR     R0, [R6, #0x1C] \n"
 610 "    MOV     R1, #4 \n"
 611 "    BL      sub_FF083CC4 /*_ClearEventFlag*/ \n"
 612 "    LDR     R1, =0xFF0C114C \n"
 613 "    LDR     R0, =0xFFFFF400 \n"
 614 "    MOV     R2, #4 \n"
 615 "    BL      sub_FF0B24D0 \n"
 616 "    BL      sub_FF0B2760 \n"
 617 "    LDR     R0, [R6, #0x1C] \n"
 618 "    MOV     R2, R7 \n"
 619 "    MOV     R1, #4 \n"
 620 "    BL      sub_FF083AEC /*_WaitForAnyEventFlag*/ \n"
 621 "    TST     R0, #1 \n"
 622 "    BEQ     loc_FF0C5F88 \n"
 623 "    LDR     R1, =0x1788 \n"
 624 
 625 "loc_FF0C6058:\n"
 626 "    LDR     R0, =0xFF0C18EC /*'ExpDrv.c'*/ \n"
 627 "    BL      _DebugAssert \n"
 628 "    B       loc_FF0C5F88 \n"
 629 
 630 "loc_FF0C6064:\n"
 631 "    LDR     R0, [SP, #0x20] \n"
 632 "    MOV     R8, #1 \n"
 633 "    LDR     R1, [R0] \n"
 634 "    CMP     R1, #0x12 \n"
 635 "    CMPNE   R1, #0x13 \n"
 636 "    BNE     loc_FF0C60CC \n"
 637 "    LDR     R1, [R0, #0x7C] \n"
 638 "    ADD     R1, R1, R1, LSL#1 \n"
 639 "    ADD     R1, R0, R1, LSL#2 \n"
 640 "    SUB     R1, R1, #8 \n"
 641 "    LDMIA   R1, {R2,R3,R9} \n"
 642 "    STMIA   R5, {R2,R3,R9} \n"
 643 "    BL      sub_FF0C41A0 \n"
 644 "    LDR     R0, [SP, #0x20] \n"
 645 "    LDR     R1, [R0, #0x7C] \n"
 646 "    LDR     R3, [R0, #0x8C] \n"
 647 "    LDR     R2, [R0, #0x90] \n"
 648 "    ADD     R0, R0, #4 \n"
 649 "    BLX     R3 \n"
 650 "    LDR     R0, [SP, #0x20] \n"
 651 "    BL      sub_FF0C76D8 \n"
 652 "    LDR     R0, [SP, #0x20] \n"
 653 "    LDR     R1, [R0, #0x7C] \n"
 654 "    LDR     R2, [R0, #0x98] \n"
 655 "    LDR     R3, [R0, #0x94] \n"
 656 "    B       loc_FF0C63E0 \n"
 657 
 658 "loc_FF0C60CC:\n"
 659 "    CMP     R1, #0x14 \n"
 660 "    CMPNE   R1, #0x15 \n"
 661 "    CMPNE   R1, #0x16 \n"
 662 "    CMPNE   R1, #0x17 \n"
 663 "    BNE     loc_FF0C6184 \n"
 664 "    ADD     R3, SP, #0x10 \n"
 665 "    ADD     R2, SP, #4 \n"
 666 "    ADD     R1, SP, #0x14 \n"
 667 "    BL      sub_FF0C4408 \n"
 668 "    CMP     R0, #1 \n"
 669 "    MOV     R9, R0 \n"
 670 "    CMPNE   R9, #5 \n"
 671 "    BNE     loc_FF0C6120 \n"
 672 "    LDR     R0, [SP, #0x20] \n"
 673 "    MOV     R2, R9 \n"
 674 "    LDR     R1, [R0, #0x7C]! \n"
 675 "    LDR     R12, [R0, #0x10]! \n"
 676 "    LDR     R3, [R0, #4] \n"
 677 "    ADD     R0, SP, #4 \n"
 678 "    BLX     R12 \n"
 679 "    B       loc_FF0C6158 \n"
 680 
 681 "loc_FF0C6120:\n"
 682 "    LDR     R0, [SP, #0x20] \n"
 683 "    CMP     R9, #2 \n"
 684 "    LDR     R3, [R0, #0x90] \n"
 685 "    CMPNE   R9, #6 \n"
 686 "    BNE     loc_FF0C616C \n"
 687 "    LDR     R12, [R0, #0x8C] \n"
 688 "    MOV     R2, R9 \n"
 689 "    MOV     R1, #1 \n"
 690 "    ADD     R0, SP, #4 \n"
 691 "    BLX     R12 \n"
 692 "    LDR     R0, [SP, #0x20] \n"
 693 "    ADD     R2, SP, #4 \n"
 694 "    ADD     R1, SP, #0x14 \n"
 695 "    BL      sub_FF0C5B94 \n"
 696 
 697 "loc_FF0C6158:\n"
 698 "    LDR     R0, [SP, #0x20] \n"
 699 "    LDR     R2, [SP, #0x10] \n"
 700 "    MOV     R1, R9 \n"
 701 "    BL      sub_FF0C5DE8 \n"
 702 "    B       loc_FF0C63E8 \n"
 703 
 704 "loc_FF0C616C:\n"
 705 "    LDR     R1, [R0, #0x7C] \n"
 706 "    LDR     R12, [R0, #0x8C] \n"
 707 "    MOV     R2, R9 \n"
 708 "    ADD     R0, R0, #4 \n"
 709 "    BLX     R12 \n"
 710 "    B       loc_FF0C63E8 \n"
 711 
 712 "loc_FF0C6184:\n"
 713 "    CMP     R1, #0x23 \n"
 714 "    CMPNE   R1, #0x24 \n"
 715 "    BNE     loc_FF0C61D0 \n"
 716 "    LDR     R1, [R0, #0x7C] \n"
 717 "    ADD     R1, R1, R1, LSL#1 \n"
 718 "    ADD     R1, R0, R1, LSL#2 \n"
 719 "    SUB     R1, R1, #8 \n"
 720 "    LDMIA   R1, {R2,R3,R9} \n"
 721 "    STMIA   R5, {R2,R3,R9} \n"
 722 "    BL      sub_FF0C2F90 \n"
 723 "    LDR     R0, [SP, #0x20] \n"
 724 "    LDR     R1, [R0, #0x7C] \n"
 725 "    LDR     R3, [R0, #0x8C] \n"
 726 "    LDR     R2, [R0, #0x90] \n"
 727 "    ADD     R0, R0, #4 \n"
 728 "    BLX     R3 \n"
 729 "    LDR     R0, [SP, #0x20] \n"
 730 "    BL      sub_FF0C347C \n"
 731 "    B       loc_FF0C63E8 \n"
 732 
 733 "loc_FF0C61D0:\n"
 734 "    ADD     R1, R0, #4 \n"
 735 "    LDMIA   R1, {R2,R3,R9} \n"
 736 "    STMIA   R5, {R2,R3,R9} \n"
 737 "    LDR     R1, [R0] \n"
 738 "    CMP     R1, #0x27 \n"
 739 "    ADDCC   PC, PC, R1, LSL#2 \n"
 740 "    B       loc_FF0C63D0 \n"
 741 "    B       loc_FF0C6288 \n"
 742 "    B       loc_FF0C6288 \n"
 743 "    B       loc_FF0C6290 \n"
 744 "    B       loc_FF0C6298 \n"
 745 "    B       loc_FF0C6298 \n"
 746 "    B       loc_FF0C6298 \n"
 747 "    B       loc_FF0C6288 \n"
 748 "    B       loc_FF0C6290 \n"
 749 "    B       loc_FF0C6298 \n"
 750 "    B       loc_FF0C6298 \n"
 751 "    B       loc_FF0C62B0 \n"
 752 "    B       loc_FF0C62B0 \n"
 753 "    B       loc_FF0C63BC \n"
 754 "    B       loc_FF0C63C4 \n"
 755 "    B       loc_FF0C63C4 \n"
 756 "    B       loc_FF0C63C4 \n"
 757 "    B       loc_FF0C63C4 \n"
 758 "    B       loc_FF0C63CC \n"
 759 "    B       loc_FF0C63D0 \n"
 760 "    B       loc_FF0C63D0 \n"
 761 "    B       loc_FF0C63D0 \n"
 762 "    B       loc_FF0C63D0 \n"
 763 "    B       loc_FF0C63D0 \n"
 764 "    B       loc_FF0C63D0 \n"
 765 "    B       loc_FF0C62A0 \n"
 766 "    B       loc_FF0C62A8 \n"
 767 "    B       loc_FF0C62A8 \n"
 768 "    B       loc_FF0C62BC \n"
 769 "    B       loc_FF0C62BC \n"
 770 "    B       loc_FF0C62C4 \n"
 771 "    B       loc_FF0C62FC \n"
 772 "    B       loc_FF0C6334 \n"
 773 "    B       loc_FF0C636C \n"
 774 "    B       loc_FF0C63A4 \n"
 775 "    B       loc_FF0C63A4 \n"
 776 "    B       loc_FF0C63D0 \n"
 777 "    B       loc_FF0C63D0 \n"
 778 "    B       loc_FF0C63AC \n"
 779 "    B       loc_FF0C63B4 \n"
 780 
 781 "loc_FF0C6288:\n"
 782 "    BL      sub_FF0C1718 \n"
 783 "    B       loc_FF0C63D0 \n"
 784 
 785 "loc_FF0C6290:\n"
 786 "    BL      sub_FF0C1A18 \n"
 787 "    B       loc_FF0C63D0 \n"
 788 
 789 "loc_FF0C6298:\n"
 790 "    BL      sub_FF0C1C80 \n"
 791 "    B       loc_FF0C63D0 \n"
 792 
 793 "loc_FF0C62A0:\n"
 794 "    BL      sub_FF0C1F34 \n"
 795 "    B       loc_FF0C63D0 \n"
 796 
 797 "loc_FF0C62A8:\n"
 798 "    BL      sub_FF0C214C \n"
 799 "    B       loc_FF0C63D0 \n"
 800 
 801 "loc_FF0C62B0:\n"
 802 "    BL      sub_FF0C2608_my \n"  // --> Patched. Old value = 0xFF0C2608.
 803 "    MOV     R8, #0 \n"
 804 "    B       loc_FF0C63D0 \n"
 805 
 806 "loc_FF0C62BC:\n"
 807 "    BL      sub_FF0C27EC \n"
 808 "    B       loc_FF0C63D0 \n"
 809 
 810 "loc_FF0C62C4:\n"
 811 "    LDRH    R1, [R0, #4] \n"
 812 "    STRH    R1, [SP, #0x14] \n"
 813 "    LDRH    R1, [R4, #2] \n"
 814 "    STRH    R1, [SP, #0x16] \n"
 815 "    LDRH    R1, [R4, #4] \n"
 816 "    STRH    R1, [SP, #0x18] \n"
 817 "    LDRH    R1, [R4, #6] \n"
 818 "    STRH    R1, [SP, #0x1A] \n"
 819 "    LDRH    R1, [R0, #0xC] \n"
 820 "    STRH    R1, [SP, #0x1C] \n"
 821 "    LDRH    R1, [R4, #0xA] \n"
 822 "    STRH    R1, [SP, #0x1E] \n"
 823 "    BL      sub_FF0C7358 \n"
 824 "    B       loc_FF0C63D0 \n"
 825 
 826 "loc_FF0C62FC:\n"
 827 "    LDRH    R1, [R0, #4] \n"
 828 "    STRH    R1, [SP, #0x14] \n"
 829 "    LDRH    R1, [R4, #2] \n"
 830 "    STRH    R1, [SP, #0x16] \n"
 831 "    LDRH    R1, [R4, #4] \n"
 832 "    STRH    R1, [SP, #0x18] \n"
 833 "    LDRH    R1, [R4, #6] \n"
 834 "    STRH    R1, [SP, #0x1A] \n"
 835 "    LDRH    R1, [R4, #8] \n"
 836 "    STRH    R1, [SP, #0x1C] \n"
 837 "    LDRH    R1, [R4, #0xA] \n"
 838 "    STRH    R1, [SP, #0x1E] \n"
 839 "    BL      sub_FF0C74D8 \n"
 840 "    B       loc_FF0C63D0 \n"
 841 
 842 "loc_FF0C6334:\n"
 843 "    LDRH    R1, [R4] \n"
 844 "    STRH    R1, [SP, #0x14] \n"
 845 "    LDRH    R1, [R0, #6] \n"
 846 "    STRH    R1, [SP, #0x16] \n"
 847 "    LDRH    R1, [R4, #4] \n"
 848 "    STRH    R1, [SP, #0x18] \n"
 849 "    LDRH    R1, [R4, #6] \n"
 850 "    STRH    R1, [SP, #0x1A] \n"
 851 "    LDRH    R1, [R4, #8] \n"
 852 "    STRH    R1, [SP, #0x1C] \n"
 853 "    LDRH    R1, [R4, #0xA] \n"
 854 "    STRH    R1, [SP, #0x1E] \n"
 855 "    BL      sub_FF0C758C \n"
 856 "    B       loc_FF0C63D0 \n"
 857 
 858 "loc_FF0C636C:\n"
 859 "    LDRH    R1, [R4] \n"
 860 "    STRH    R1, [SP, #0x14] \n"
 861 "    LDRH    R1, [R4, #2] \n"
 862 "    STRH    R1, [SP, #0x16] \n"
 863 "    LDRH    R1, [R4, #4] \n"
 864 "    STRH    R1, [SP, #0x18] \n"
 865 "    LDRH    R1, [R4, #6] \n"
 866 "    STRH    R1, [SP, #0x1A] \n"
 867 "    LDRH    R1, [R0, #0xC] \n"
 868 "    STRH    R1, [SP, #0x1C] \n"
 869 "    LDRH    R1, [R4, #0xA] \n"
 870 "    STRH    R1, [SP, #0x1E] \n"
 871 "    BL      sub_FF0C7634 \n"
 872 "    B       loc_FF0C63D0 \n"
 873 
 874 "loc_FF0C63A4:\n"
 875 "    BL      sub_FF0C2D68 \n"
 876 "    B       loc_FF0C63D0 \n"
 877 
 878 "loc_FF0C63AC:\n"
 879 "    BL      sub_FF0C3580 \n"
 880 "    B       loc_FF0C63D0 \n"
 881 
 882 "loc_FF0C63B4:\n"
 883 "    BL      sub_FF0C3A8C \n"
 884 "    B       loc_FF0C63D0 \n"
 885 
 886 "loc_FF0C63BC:\n"
 887 "    BL      sub_FF0C3C6C \n"
 888 "    B       loc_FF0C63D0 \n"
 889 
 890 "loc_FF0C63C4:\n"
 891 "    BL      sub_FF0C3E28 \n"
 892 "    B       loc_FF0C63D0 \n"
 893 
 894 "loc_FF0C63CC:\n"
 895 "    BL      sub_FF0C3F98 \n"
 896 
 897 "loc_FF0C63D0:\n"
 898 "    LDR     R0, [SP, #0x20] \n"
 899 "    LDR     R1, [R0, #0x7C] \n"
 900 "    LDR     R2, [R0, #0x90] \n"
 901 "    LDR     R3, [R0, #0x8C] \n"
 902 
 903 "loc_FF0C63E0:\n"
 904 "    ADD     R0, R0, #4 \n"
 905 "    BLX     R3 \n"
 906 
 907 "loc_FF0C63E8:\n"
 908 "    LDR     R1, [SP, #0x20] \n"
 909 "    LDR     R0, [R1] \n"
 910 "    CMP     R0, #0x10 \n"
 911 "    BEQ     loc_FF0C6420 \n"
 912 "    BGT     loc_FF0C6410 \n"
 913 "    CMP     R0, #1 \n"
 914 "    CMPNE   R0, #4 \n"
 915 "    CMPNE   R0, #0xE \n"
 916 "    BNE     loc_FF0C6430 \n"
 917 "    B       loc_FF0C6420 \n"
 918 
 919 "loc_FF0C6410:\n"
 920 "    CMP     R0, #0x13 \n"
 921 "    CMPNE   R0, #0x17 \n"
 922 "    CMPNE   R0, #0x1A \n"
 923 "    BNE     loc_FF0C6430 \n"
 924 
 925 "loc_FF0C6420:\n"
 926 "    LDRH    R0, [R4] \n"
 927 "    STRH    R0, [SP, #0x14] \n"
 928 "    LDRH    R0, [R4, #8] \n"
 929 "    STRH    R0, [SP, #0x1C] \n"
 930 
 931 "loc_FF0C6430:\n"
 932 "    CMP     R8, #1 \n"
 933 "    BNE     loc_FF0C647C \n"
 934 "    LDR     R0, [R1, #0x7C] \n"
 935 "    MOV     R2, #0xC \n"
 936 "    ADD     R0, R0, R0, LSL#1 \n"
 937 "    ADD     R0, R1, R0, LSL#2 \n"
 938 "    SUB     R8, R0, #8 \n"
 939 "    LDR     R0, =0x5AA3C \n"
 940 "    ADD     R1, SP, #0x14 \n"
 941 "    BL      sub_FF3B5DDC \n"
 942 "    LDR     R0, =0x5AA48 \n"
 943 "    MOV     R2, #0xC \n"
 944 "    ADD     R1, SP, #0x14 \n"
 945 "    BL      sub_FF3B5DDC \n"
 946 "    LDR     R0, =0x5AA54 \n"
 947 "    MOV     R2, #0xC \n"
 948 "    MOV     R1, R8 \n"
 949 "    BL      sub_FF3B5DDC \n"
 950 "    B       loc_FF0C64F4 \n"
 951 
 952 "loc_FF0C647C:\n"
 953 "    LDR     R0, [R1] \n"
 954 "    MOV     R3, #1 \n"
 955 "    CMP     R0, #0xB \n"
 956 "    BNE     loc_FF0C64C0 \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_FF0C14EC \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_FF0C64F0 \n"
 970 
 971 "loc_FF0C64C0:\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_FF0C14EC \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_FF0C64F0:\n"
 986 "    BL      sub_FF0C1664 \n"
 987 
 988 "loc_FF0C64F4:\n"
 989 "    LDR     R0, [SP, #0x20] \n"
 990 "    BL      sub_FF0C72C4 \n"
 991 "    B       loc_FF0C5EB8 \n"
 992 );
 993 }
 994 
 995 /*************************************************************/
 996 //** sub_FF0C2608_my @ 0xFF0C2608 - 0xFF0C26D0, length=51
 997 void __attribute__((naked,noinline)) sub_FF0C2608_my() {
 998 asm volatile (
 999 "    STMFD   SP!, {R4-R8,LR} \n"
1000 "    LDR     R7, =0x5838 \n"
1001 "    MOV     R4, R0 \n"
1002 "    LDR     R0, [R7, #0x1C] \n"
1003 "    MOV     R1, #0x3E \n"
1004 "    BL      sub_FF083CC4 /*_ClearEventFlag*/ \n"
1005 "    MOV     R2, #0 \n"
1006 "    LDRSH   R0, [R4, #4] \n"
1007 "    MOV     R1, R2 \n"
1008 "    BL      sub_FF0C11AC \n"
1009 "    MOV     R5, R0 \n"
1010 "    LDRSH   R0, [R4, #6] \n"
1011 "    BL      sub_FF0C12FC \n"
1012 "    LDRSH   R0, [R4, #8] \n"
1013 "    BL      sub_FF0C1354 \n"
1014 "    LDRSH   R0, [R4, #0xA] \n"
1015 "    BL      sub_FF0C13AC \n"
1016 "    LDRSH   R0, [R4, #0xC] \n"
1017 "    MOV     R1, #0 \n"
1018 "    BL      sub_FF0C1404 \n"
1019 "    MOV     R6, R0 \n"
1020 "    LDRSH   R0, [R4, #0xE] \n"
1021 "    BL      sub_FF0C72F4 \n"
1022 "    LDR     R0, [R4] \n"
1023 "    LDR     R8, =0x5AA54 \n"
1024 "    CMP     R0, #0xB \n"
1025 "    MOVEQ   R5, #0 \n"
1026 "    MOVEQ   R6, R5 \n"
1027 "    BEQ     loc_FF0C26A4 \n"
1028 "    CMP     R5, #1 \n"
1029 "    BNE     loc_FF0C26A4 \n"
1030 "    LDRSH   R0, [R4, #4] \n"
1031 "    LDR     R1, =0xFF0C110C \n"
1032 "    MOV     R2, #2 \n"
1033 "    BL      sub_FF183BFC \n"
1034 "    STRH    R0, [R4, #4] \n"
1035 "    MOV     R0, #0 \n"
1036 "    STR     R0, [R7, #0x28] \n"
1037 "    B       loc_FF0C26AC \n"
1038 
1039 "loc_FF0C26A4:\n"
1040 "    LDRH    R0, [R8] \n"
1041 "    STRH    R0, [R4, #4] \n"
1042 
1043 "loc_FF0C26AC:\n"
1044 "    CMP     R6, #1 \n"
1045 "    LDRNEH  R0, [R8, #8] \n"
1046 "    BNE     loc_FF0C26C8 \n"
1047 "    LDRSH   R0, [R4, #0xC] \n"
1048 "    LDR     R1, =0xFF0C1190 \n"
1049 "    MOV     R2, #0x20 \n"
1050 "    BL      sub_FF0C7314 \n"
1051 
1052 "loc_FF0C26C8:\n"
1053 "    STRH    R0, [R4, #0xC] \n"
1054 "    LDRSH   R0, [R4, #6] \n"
1055 "    BL      sub_FF0B27CC_my \n"  // --> Patched. Old value = 0xFF0B27CC.
1056 "    LDR     PC, =0xFF0C26D4 \n"  // Continue in firmware
1057 );
1058 }
1059 
1060 /*************************************************************/
1061 //** sub_FF0B27CC_my @ 0xFF0B27CC - 0xFF0B280C, length=17
1062 void __attribute__((naked,noinline)) sub_FF0B27CC_my() {
1063 asm volatile (
1064 "    STMFD   SP!, {R4-R6,LR} \n"
1065 "    LDR     R5, =0x54E0 \n"
1066 "    MOV     R4, R0 \n"
1067 "    LDR     R0, [R5, #4] \n"
1068 "    CMP     R0, #1 \n"
1069 "    LDRNE   R1, =0x146 \n"
1070 "    LDRNE   R0, =0xFF0B2604 /*'Shutter.c'*/ \n"
1071 "    BLNE    _DebugAssert \n"
1072 "    CMN     R4, #0xC00 \n"
1073 "    LDREQSH R4, [R5, #2] \n"
1074 "    CMN     R4, #0xC00 \n"
1075 "    MOVEQ   R1, #0x14C \n"
1076 "    LDREQ   R0, =0xFF0B2604 /*'Shutter.c'*/ \n"
1077 "    STRH    R4, [R5, #2] \n"
1078 "    BLEQ    _DebugAssert \n"
1079 "    MOV     R0, R4 \n"
1080 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
1081 "    LDR     PC, =0xFF0B2810 \n"  // Continue in firmware
1082 );
1083 }

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