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

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF085B68_my
  3. sub_FF1E5BD0_my
  4. exp_drv_task
  5. sub_FF0C7C74_my
  6. sub_FF0B52E8_my

   1 /*
   2  * capt_seq.c - auto-generated by CHDK code_gen.
   3  */
   4 #include "lolevel.h"
   5 #include "platform.h"
   6 #include "core.h"
   7 
   8 #define USE_STUBS_NRFLAG 1          // see stubs_entry.S
   9 #define NR_AUTO (0)                 // have to explictly reset value back to 0 to enable auto
  10 #define PAUSE_FOR_FILE_COUNTER 300  // Enable delay in capt_seq_hook_raw_here to ensure file counter is updated
  11 
  12 #include "../../../generic/capt_seq.c"
  13 
  14 /*************************************************************/
  15 //** capt_seq_task @ 0xFF085738 - 0xFF085A4C, length=198
  16 void __attribute__((naked,noinline)) capt_seq_task() {
  17 asm volatile (
  18 "    STMFD   SP!, {R3-R7,LR} \n"
  19 "    LDR     R4, =0x43964 \n"
  20 "    LDR     R7, =0x3888 \n"
  21 "    MOV     R6, #0 \n"
  22 
  23 "loc_FF085748:\n"
  24 "    LDR     R0, [R7, #4] \n"
  25 "    MOV     R2, #0 \n"
  26 "    MOV     R1, SP \n"
  27 "    BL      sub_0068BDE0 /*_ReceiveMessageQueue*/ \n"
  28 "    TST     R0, #1 \n"
  29 "    BEQ     loc_FF085774 \n"
  30 "    LDR     R1, =0x491 \n"
  31 "    LDR     R0, =0xFF085084 /*'SsShootTask.c'*/ \n"
  32 "    BL      _DebugAssert \n"
  33 "    BL      _ExitTask \n"
  34 "    LDMFD   SP!, {R3-R7,PC} \n"
  35 
  36 "loc_FF085774:\n"
  37 "    LDR     R0, [SP] \n"
  38 "    LDR     R1, [R0] \n"
  39 "    CMP     R1, #0x28 \n"
  40 "    ADDCC   PC, PC, R1, LSL#2 \n"
  41 "    B       loc_FF085A14 \n"
  42 "    B       loc_FF085828 \n"
  43 "    B       loc_FF085840 \n"
  44 "    B       loc_FF08584C \n"
  45 "    B       loc_FF085860 \n"
  46 "    B       loc_FF085858 \n"
  47 "    B       loc_FF08586C \n"
  48 "    B       loc_FF085874 \n"
  49 "    B       loc_FF08587C \n"
  50 "    B       loc_FF085898 \n"
  51 "    B       loc_FF0858EC \n"
  52 "    B       loc_FF0858A4 \n"
  53 "    B       loc_FF0858B0 \n"
  54 "    B       loc_FF0858B8 \n"
  55 "    B       loc_FF0858D4 \n"
  56 "    B       loc_FF0858DC \n"
  57 "    B       loc_FF0858E4 \n"
  58 "    B       loc_FF0858F4 \n"
  59 "    B       loc_FF0858FC \n"
  60 "    B       loc_FF085904 \n"
  61 "    B       loc_FF08590C \n"
  62 "    B       loc_FF085914 \n"
  63 "    B       loc_FF08591C \n"
  64 "    B       loc_FF085924 \n"
  65 "    B       loc_FF08592C \n"
  66 "    B       loc_FF085934 \n"
  67 "    B       loc_FF08593C \n"
  68 "    B       loc_FF085948 \n"
  69 "    B       loc_FF085950 \n"
  70 "    B       loc_FF08595C \n"
  71 "    B       loc_FF085964 \n"
  72 "    B       loc_FF085994 \n"
  73 "    B       loc_FF08599C \n"
  74 "    B       loc_FF0859A4 \n"
  75 "    B       loc_FF0859AC \n"
  76 "    B       loc_FF0859B4 \n"
  77 "    B       loc_FF0859BC \n"
  78 "    B       loc_FF0859C8 \n"
  79 "    B       loc_FF0859D0 \n"
  80 "    B       loc_FF0859DC \n"
  81 "    B       loc_FF085A20 \n"
  82 
  83 "loc_FF085828:\n"
  84 "    BL      shooting_expo_iso_override\n"      // added
  85 "    BL      sub_FF08600C \n"
  86 "    BL      shooting_expo_param_override\n"    // added
  87 "    BL      sub_FF08288C \n"
  88 "    MOV     R0, #0\n"                          // added
  89 "    STR     R0, [R4,#0x28]\n"                  // added, fixes overrides  behavior at short shutter press (from S95)
  90 //"  LDR     R0, [R4, #0x28] \n"  // above patch makes these three lines redundant
  91 //"  CMP     R0, #0 \n"
  92 //"  BLNE    _sub_FF1E5E48 \n"
  93 "    B       loc_FF085A20 \n"
  94 
  95 "loc_FF085840:\n"
  96 "    LDR     R0, [R0, #0x10] \n"
  97 "    BL      sub_FF085B68_my \n"  // --> Patched. Old value = 0xFF085B68.
  98 "    B       loc_FF085A20 \n"
  99 
 100 "loc_FF08584C:\n"
 101 "    MOV     R0, #1 \n"
 102 "    BL      sub_FF0863A4 \n"
 103 "    B       loc_FF085A20 \n"
 104 
 105 "loc_FF085858:\n"
 106 "    BL      sub_FF085CBC \n"
 107 "    B       loc_FF085864 \n"
 108 
 109 "loc_FF085860:\n"
 110 "    BL      sub_FF085FEC \n"
 111 
 112 "loc_FF085864:\n"
 113 "    STR     R6, [R4, #0x28] \n"
 114 "    B       loc_FF085A20 \n"
 115 
 116 "loc_FF08586C:\n"
 117 "    BL      sub_FF085FF4 \n"
 118 "    B       loc_FF085A20 \n"
 119 
 120 "loc_FF085874:\n"
 121 "    BL      sub_FF086250 \n"
 122 "    B       loc_FF08589C \n"
 123 
 124 "loc_FF08587C:\n"
 125 "    LDR     R5, [R0, #0x10] \n"
 126 "    MOV     R0, R5 \n"
 127 "    BL      sub_FF1E5F14 \n"
 128 "    MOV     R2, R5 \n"
 129 "    MOV     R1, #9 \n"
 130 "    BL      sub_FF08331C \n"
 131 "    B       loc_FF085A20 \n"
 132 
 133 "loc_FF085898:\n"
 134 "    BL      sub_FF08630C \n"
 135 
 136 "loc_FF08589C:\n"
 137 "    BL      sub_FF08288C \n"
 138 "    B       loc_FF085A20 \n"
 139 
 140 "loc_FF0858A4:\n"
 141 "    LDR     R0, [R4, #0x58] \n"
 142 "    BL      sub_FF086C10 \n"
 143 "    B       loc_FF085A20 \n"
 144 
 145 "loc_FF0858B0:\n"
 146 "    BL      sub_FF086FA8 \n"
 147 "    B       loc_FF085A20 \n"
 148 
 149 "loc_FF0858B8:\n"
 150 "    LDRH    R0, [R4] \n"
 151 "    SUB     R1, R0, #0x8200 \n"
 152 "    SUBS    R1, R1, #0x39 \n"
 153 "    MOVNE   R0, #0 \n"
 154 "    MOVEQ   R0, #1 \n"
 155 "    BL      sub_FF08700C \n"
 156 "    B       loc_FF085A20 \n"
 157 
 158 "loc_FF0858D4:\n"
 159 "    BL      sub_FF0871F4 \n"
 160 "    B       loc_FF085A20 \n"
 161 
 162 "loc_FF0858DC:\n"
 163 "    BL      sub_FF087668 \n"
 164 "    B       loc_FF085A20 \n"
 165 
 166 "loc_FF0858E4:\n"
 167 "    BL      sub_FF08771C \n"
 168 "    B       loc_FF085A20 \n"
 169 
 170 "loc_FF0858EC:\n"
 171 "    BL      sub_FF085FEC \n"
 172 "    B       loc_FF085A20 \n"
 173 
 174 "loc_FF0858F4:\n"
 175 "    BL      sub_FF1E3804 \n"
 176 "    B       loc_FF085A20 \n"
 177 
 178 "loc_FF0858FC:\n"
 179 "    BL      sub_FF1E3A98 \n"
 180 "    B       loc_FF085A20 \n"
 181 
 182 "loc_FF085904:\n"
 183 "    BL      sub_FF1E3B68 \n"
 184 "    B       loc_FF085A20 \n"
 185 
 186 "loc_FF08590C:\n"
 187 "    BL      sub_FF1E3C1C \n"
 188 "    B       loc_FF085A20 \n"
 189 
 190 "loc_FF085914:\n"
 191 "    BL      sub_FF1E3D1C \n"
 192 "    B       loc_FF085A20 \n"
 193 
 194 "loc_FF08591C:\n"
 195 "    MOV     R0, #0 \n"
 196 "    B       loc_FF085940 \n"
 197 
 198 "loc_FF085924:\n"
 199 "    BL      sub_FF1E4314 \n"
 200 "    B       loc_FF085A20 \n"
 201 
 202 "loc_FF08592C:\n"
 203 "    BL      sub_FF1E43A8 \n"
 204 "    B       loc_FF085A20 \n"
 205 
 206 "loc_FF085934:\n"
 207 "    BL      sub_FF1E4450 \n"
 208 "    B       loc_FF085A20 \n"
 209 
 210 "loc_FF08593C:\n"
 211 "    MOV     R0, #1 \n"
 212 
 213 "loc_FF085940:\n"
 214 "    BL      sub_FF1E41B0 \n"
 215 "    B       loc_FF085A20 \n"
 216 
 217 "loc_FF085948:\n"
 218 "    BL      sub_FF0865F0 \n"
 219 "    B       loc_FF085A20 \n"
 220 
 221 "loc_FF085950:\n"
 222 "    BL      sub_FF086684 \n"
 223 "    BL      sub_FF1E72C8 \n"
 224 "    B       loc_FF085A20 \n"
 225 
 226 "loc_FF08595C:\n"
 227 "    BL      sub_FF1E3FF0 \n"
 228 "    B       loc_FF085A20 \n"
 229 
 230 "loc_FF085964:\n"
 231 "    MOV     R2, #2 \n"
 232 "    ADD     R1, R4, #0x62 \n"
 233 "    MOV     R0, #0x6F \n"
 234 "    BL      _GetPropertyCase \n"
 235 "    TST     R0, #1 \n"
 236 "    LDRNE   R1, =0x592 \n"
 237 "    LDRNE   R0, =0xFF085084 /*'SsShootTask.c'*/ \n"
 238 "    BLNE    _DebugAssert \n"
 239 "    LDRH    R0, [R4, #0x62] \n"
 240 "    CMP     R0, #1 \n"
 241 "    BLEQ    sub_FF1E3FE4 \n"
 242 "    B       loc_FF085A20 \n"
 243 
 244 "loc_FF085994:\n"
 245 "    BL      sub_FF1E410C \n"
 246 "    B       loc_FF085A20 \n"
 247 
 248 "loc_FF08599C:\n"
 249 "    BL      sub_FF1E739C \n"
 250 "    B       loc_FF085A20 \n"
 251 
 252 "loc_FF0859A4:\n"
 253 "    BL      sub_FF01DA10 \n"
 254 "    B       loc_FF085A20 \n"
 255 
 256 "loc_FF0859AC:\n"
 257 "    BL      sub_FF08B8D4 \n"
 258 "    B       loc_FF085A20 \n"
 259 
 260 "loc_FF0859B4:\n"
 261 "    BL      sub_FF08B9D4 \n"
 262 "    B       loc_FF085A20 \n"
 263 
 264 "loc_FF0859BC:\n"
 265 "    LDR     R0, [R0, #0xC] \n"
 266 "    BL      sub_FF1E4558 \n"
 267 "    B       loc_FF085A20 \n"
 268 
 269 "loc_FF0859C8:\n"
 270 "    BL      sub_FF1E45C8 \n"
 271 "    B       loc_FF085A20 \n"
 272 
 273 "loc_FF0859D0:\n"
 274 "    BL      sub_FF08BB60 \n"
 275 "    BL      sub_FF08BA2C \n"
 276 "    B       loc_FF085A20 \n"
 277 
 278 "loc_FF0859DC:\n"
 279 "    MOV     R0, #1 \n"
 280 "    BL      sub_FF1E6744 \n"
 281 "    MOV     R0, #1 \n"
 282 "    BL      sub_FF1E6878 \n"
 283 "    LDRH    R0, [R4, #0xA4] \n"
 284 "    CMP     R0, #4 \n"
 285 "    LDRNEH  R0, [R4] \n"
 286 "    SUBNE   R1, R0, #0x4200 \n"
 287 "    SUBNES  R1, R1, #0x2E \n"
 288 "    BNE     loc_FF085A20 \n"
 289 "    BL      sub_FF08B9D4 \n"
 290 "    BL      sub_FF08C278 \n"
 291 "    BL      sub_FF08BF80 \n"
 292 "    B       loc_FF085A20 \n"
 293 
 294 "loc_FF085A14:\n"
 295 "    LDR     R1, =0x5F2 \n"
 296 "    LDR     R0, =0xFF085084 /*'SsShootTask.c'*/ \n"
 297 "    BL      _DebugAssert \n"
 298 
 299 "loc_FF085A20:\n"
 300 "    LDR     R0, [SP] \n"
 301 "    LDR     R1, [R0, #4] \n"
 302 "    LDR     R0, [R7] \n"
 303 "    BL      sub_0068BB50 /*_SetEventFlag*/ \n"
 304 "    LDR     R5, [SP] \n"
 305 "    LDR     R0, [R5, #8] \n"
 306 "    CMP     R0, #0 \n"
 307 "    LDREQ   R1, =0x117 \n"
 308 "    LDREQ   R0, =0xFF085084 /*'SsShootTask.c'*/ \n"
 309 "    BLEQ    _DebugAssert \n"
 310 "    STR     R6, [R5, #8] \n"
 311 "    B       loc_FF085748 \n"
 312 );
 313 }
 314 
 315 /*************************************************************/
 316 //** sub_FF085B68_my @ 0xFF085B68 - 0xFF085C08, length=41
 317 void __attribute__((naked,noinline)) sub_FF085B68_my() {
 318 asm volatile (
 319 "    STMFD   SP!, {R4-R6,LR} \n"
 320 "    LDR     R5, =0x43964 \n"
 321 "    MOV     R6, R0 \n"
 322 "    LDR     R0, [R5, #0x28] \n"
 323 "    CMP     R0, #0 \n"
 324 "    BNE     loc_FF085BB8 \n"
 325 "    LDR     R0, [R5, #0x94] \n"
 326 "    TST     R0, #0x30 \n"
 327 "    BLNE    sub_FF08A1C4 \n"
 328 "    BL      sub_FF089C8C \n"
 329 "    MOV     R1, R6 \n"
 330 "    BL      sub_FF089CE4 \n"
 331 "    LDR     R0, =0x10F \n"
 332 "    MOV     R2, #4 \n"
 333 "    ADD     R1, R6, #0x78 \n"
 334 "    BL      _SetPropertyCase \n"
 335 "    MOV     R2, #4 \n"
 336 "    ADD     R1, R6, #0x7C \n"
 337 "    MOV     R0, #0x2C \n"
 338 "    BL      _SetPropertyCase \n"
 339 
 340 "loc_FF085BB8:\n"
 341 "    LDR     R0, [R5, #0x94] \n"
 342 "    TST     R0, #0x20 \n"
 343 "    MOV     R0, R6 \n"
 344 "    BEQ     loc_FF085BD0 \n"
 345 "    BL      sub_FF1E6D10 \n"
 346 "    B       loc_FF085BD4 \n"
 347 
 348 "loc_FF085BD0:\n"
 349 "    BL      sub_FF1E5BD0_my \n"  // --> Patched. Old value = 0xFF1E5BD0.
 350 "    BL      capt_seq_hook_raw_here \n" // +++
 351 
 352 "loc_FF085BD4:\n"
 353 "    MOV     R4, R0 \n"
 354 "    MOV     R2, R6 \n"
 355 "    MOV     R1, #1 \n"
 356 "    BL      sub_FF08331C \n"
 357 "    TST     R4, #1 \n"
 358 "    LDMNEFD SP!, {R4-R6,PC} \n"
 359 "    MOV     R0, R6 \n"
 360 "    BL      sub_FF1E4B70 \n"
 361 "    LDR     R0, [R5, #0x94] \n"
 362 "    TST     R0, #2 \n"
 363 "    LDMEQFD SP!, {R4-R6,PC} \n"
 364 "    MOV     R0, R6 \n"
 365 "    LDMFD   SP!, {R4-R6,LR} \n"
 366 "    B       sub_FF0834C4 \n"
 367 );
 368 }
 369 
 370 /*************************************************************/
 371 //** sub_FF1E5BD0_my @ 0xFF1E5BD0 - 0xFF1E5E44, length=158
 372 void __attribute__((naked,noinline)) sub_FF1E5BD0_my() {
 373 asm volatile (
 374 "    STMFD   SP!, {R3-R7,LR} \n"
 375 "    LDR     R6, =0x43964 \n"
 376 "    MOV     R4, R0 \n"
 377 "    LDR     R0, [R6, #0x28] \n"
 378 "    LDR     R5, =0x420D \n"
 379 "    CMP     R0, #0 \n"
 380 "    MOV     R7, #0 \n"
 381 "    BNE     loc_FF1E5C74 \n"
 382 "    LDR     R1, [R6, #0x94] \n"
 383 "    TST     R1, #6 \n"
 384 "    BNE     loc_FF1E5C10 \n"
 385 "    MOV     R0, #0xC \n"
 386 "    BL      sub_FF08DE58 \n"
 387 "    TST     R0, #1 \n"
 388 "    BEQ     loc_FF1E5C74 \n"
 389 "    B       loc_FF1E5C6C \n"
 390 
 391 "loc_FF1E5C10:\n"
 392 "    LDRH    R0, [R6] \n"
 393 "    CMP     R0, R5 \n"
 394 "    LDRNEH  R0, [R6, #0xA2] \n"
 395 "    CMPNE   R0, #3 \n"
 396 "    LDRNE   R0, [R4, #8] \n"
 397 "    CMPNE   R0, #1 \n"
 398 "    BLS     loc_FF1E5C54 \n"
 399 "    LDRH    R0, [R6, #0x9E] \n"
 400 "    CMP     R0, #3 \n"
 401 "    BNE     loc_FF1E5C40 \n"
 402 "    TST     R1, #2 \n"
 403 "    BNE     loc_FF1E5C74 \n"
 404 
 405 "loc_FF1E5C40:\n"
 406 "    BL      sub_FF018804 \n"
 407 "    TST     R0, #1 \n"
 408 "    BEQ     loc_FF1E5C74 \n"
 409 "    BL      sub_FF08DEC0 \n"
 410 "    B       loc_FF1E5C6C \n"
 411 
 412 "loc_FF1E5C54:\n"
 413 "    MOV     R0, #0xC \n"
 414 "    BL      sub_FF08DE58 \n"
 415 "    TST     R0, #1 \n"
 416 "    BEQ     loc_FF1E5C74 \n"
 417 "    BL      sub_FF1E65C0 \n"
 418 "    BL      sub_FF082F38 \n"
 419 
 420 "loc_FF1E5C6C:\n"
 421 "    MOV     R0, #1 \n"
 422 "    LDMFD   SP!, {R3-R7,PC} \n"
 423 
 424 "loc_FF1E5C74:\n"
 425 "    MOV     R0, R4 \n"
 426 "    BL      sub_FF1E7410 \n"
 427 "    BL      sub_FF085FFC \n"
 428 "    LDR     R0, [R6, #0x28] \n"
 429 "    CMP     R0, #0 \n"
 430 "    BNE     loc_FF1E5E30 \n"
 431 "    MOV     R0, R4 \n"
 432 "    BL      sub_FF1E4A54 \n"
 433 "    TST     R0, #1 \n"
 434 "    LDMNEFD SP!, {R3-R7,PC} \n"
 435 "    LDR     R0, [R6, #0x94] \n"
 436 "    AND     R0, R0, #0x40 \n"
 437 "    CMP     R0, #0 \n"
 438 "    LDRNEH  R0, [R6] \n"
 439 "    CMPNE   R0, R5 \n"
 440 "    LDRNEH  R0, [R6, #0xA2] \n"
 441 "    CMPNE   R0, #3 \n"
 442 "    LDRNE   R0, [R4, #8] \n"
 443 "    CMPNE   R0, #1 \n"
 444 "    BLS     loc_FF1E5CE0 \n"
 445 "    BL      sub_FF1E6A38 \n"
 446 "    MOV     R3, #0xB3 \n"
 447 "    STR     R3, [SP] \n"
 448 "    LDR     R2, =0x3A98 \n"
 449 "    LDR     R3, =0xFF1E5EF0 /*'SsCaptureSeq.c'*/ \n"
 450 "    MOV     R1, #0x8000 \n"
 451 "    BL      sub_FF08E0D0 \n"
 452 
 453 "loc_FF1E5CE0:\n"
 454 "    LDR     R0, [R6, #0x94] \n"
 455 "    AND     R0, R0, #4 \n"
 456 "    CMP     R0, #0 \n"
 457 "    LDRNEH  R0, [R6] \n"
 458 "    CMPNE   R0, R5 \n"
 459 "    LDRNEH  R0, [R6, #0xA2] \n"
 460 "    CMPNE   R0, #3 \n"
 461 "    LDRNE   R0, [R4, #8] \n"
 462 "    CMPNE   R0, #1 \n"
 463 "    BLS     loc_FF1E5D14 \n"
 464 "    LDR     R0, [R6, #0x98] \n"
 465 "    CMP     R0, #2 \n"
 466 "    BNE     loc_FF1E5D20 \n"
 467 
 468 "loc_FF1E5D14:\n"
 469 "    MOV     R0, R4 \n"
 470 "    BL      sub_FF1E4F9C \n"
 471 "    BL      sub_FF1E6504 \n"
 472 "    BL      wait_until_remote_button_is_released\n" // +++
 473 "    BL      capt_seq_hook_set_nr\n" // +++
 474 
 475 "loc_FF1E5D20:\n"
 476 "    LDRH    R0, [R6] \n"
 477 "    CMP     R0, R5 \n"
 478 "    LDRNEH  R0, [R6, #0xA2] \n"
 479 "    CMPNE   R0, #3 \n"
 480 "    LDRNE   R0, [R4, #8] \n"
 481 "    CMPNE   R0, #1 \n"
 482 "    MOVLS   R0, #4 \n"
 483 "    BLLS    sub_FF13785C \n"
 484 "    LDR     R0, [R6, #0x94] \n"
 485 "    TST     R0, #4 \n"
 486 "    BEQ     loc_FF1E5D78 \n"
 487 "    LDR     R0, [R6, #0x98] \n"
 488 "    CMP     R0, #2 \n"
 489 "    BNE     loc_FF1E5D78 \n"
 490 "    LDRH    R0, [R6] \n"
 491 "    CMP     R0, R5 \n"
 492 "    LDRNEH  R0, [R6, #0xA2] \n"
 493 "    CMPNE   R0, #3 \n"
 494 "    LDRNE   R0, [R4, #8] \n"
 495 "    CMPNE   R0, #1 \n"
 496 "    MOVLS   R0, #3 \n"
 497 "    BLLS    sub_FF13785C \n"
 498 
 499 "loc_FF1E5D78:\n"
 500 "    LDR     R0, [R6, #0x94] \n"
 501 "    TST     R0, #0x40 \n"
 502 "    BEQ     loc_FF1E5DE0 \n"
 503 "    LDR     R0, =0x181 \n"
 504 "    MOV     R2, #4 \n"
 505 "    MOV     R1, SP \n"
 506 "    BL      _GetPropertyCase \n"
 507 "    TST     R0, #1 \n"
 508 "    MOVNE   R1, #0xD4 \n"
 509 "    LDRNE   R0, =0xFF1E5EF0 /*'SsCaptureSeq.c'*/ \n"
 510 "    BLNE    _DebugAssert \n"
 511 "    LDR     R0, [SP] \n"
 512 "    CMP     R0, #0 \n"
 513 "    BNE     loc_FF1E5DC0 \n"
 514 "    BL      sub_FF1E6A38 \n"
 515 "    MOV     R1, #0x8000 \n"
 516 "    BL      sub_0068BB50 /*_SetEventFlag*/ \n"
 517 "    B       loc_FF1E5DE0 \n"
 518 
 519 "loc_FF1E5DC0:\n"
 520 "    BL      sub_FF1E6A38 \n"
 521 "    MOV     R1, #0x8000 \n"
 522 "    BL      sub_0068BB84 /*_ClearEventFlag*/ \n"
 523 "    LDR     R2, =0xFF1E5BBC \n"
 524 "    LDR     R0, [SP] \n"
 525 "    MOV     R3, #0x8000 \n"
 526 "    MOV     R1, R2 \n"
 527 "    BL      sub_FF020C0C /*_SetTimerAfter*/ \n"
 528 
 529 "loc_FF1E5DE0:\n"
 530 "    LDR     R0, [R6, #0x94] \n"
 531 "    AND     R0, R0, #6 \n"
 532 "    CMP     R0, #0 \n"
 533 "    LDRNEH  R0, [R6] \n"
 534 "    CMPNE   R0, R5 \n"
 535 "    LDRNEH  R0, [R6, #0xA2] \n"
 536 "    CMPNE   R0, #3 \n"
 537 "    LDRNE   R0, [R4, #8] \n"
 538 "    CMPNE   R0, #1 \n"
 539 "    MOVLS   R0, #2 \n"
 540 "    BLLS    sub_FF08F6D4 \n"
 541 "    LDR     R0, [R6, #0x94] \n"
 542 "    TST     R0, #0x10 \n"
 543 "    MOV     R0, R4 \n"
 544 "    BEQ     loc_FF1E5E24 \n"
 545 "    BL      sub_FF38FAD4 \n"
 546 "    B       loc_FF1E5E28 \n"
 547 
 548 "loc_FF1E5E24:\n"
 549 "    BL      sub_FF1E55F8 \n"
 550 
 551 "loc_FF1E5E28:\n"
 552 "    MOV     R7, R0 \n"
 553 "    B       loc_FF1E5E40 \n"
 554 
 555 "loc_FF1E5E30:\n"
 556 "    LDR     R0, =0x98E8 \n"
 557 "    LDR     R0, [R0] \n"
 558 "    CMP     R0, #0 \n"
 559 "    MOVNE   R7, #0x1D \n"
 560 
 561 "loc_FF1E5E40:\n"
 562 "    MOV     R0, R7 \n"
 563 "    LDMFD   SP!, {R3-R7,PC} \n"
 564 );
 565 }
 566 
 567 /*************************************************************/
 568 //** exp_drv_task @ 0xFF0CB104 - 0xFF0CB794, length=421
 569 void __attribute__((naked,noinline)) exp_drv_task() {
 570 asm volatile (
 571 "    STMFD   SP!, {R4-R9,LR} \n"
 572 "    SUB     SP, SP, #0x2C \n"
 573 "    LDR     R6, =0x4DBC \n"
 574 "    LDR     R7, =0xBB8 \n"
 575 "    LDR     R4, =0x61A08 \n"
 576 "    MOV     R0, #0 \n"
 577 "    ADD     R5, SP, #0x1C \n"
 578 "    STR     R0, [SP, #0xC] \n"
 579 
 580 "loc_FF0CB124:\n"
 581 "    LDR     R0, [R6, #0x20] \n"
 582 "    MOV     R2, #0 \n"
 583 "    ADD     R1, SP, #0x28 \n"
 584 "    BL      sub_0068BDE0 /*_ReceiveMessageQueue*/ \n"
 585 "    LDR     R0, [SP, #0xC] \n"
 586 "    CMP     R0, #1 \n"
 587 "    BNE     loc_FF0CB170 \n"
 588 "    LDR     R0, [SP, #0x28] \n"
 589 "    LDR     R0, [R0] \n"
 590 "    CMP     R0, #0x14 \n"
 591 "    CMPNE   R0, #0x15 \n"
 592 "    CMPNE   R0, #0x16 \n"
 593 "    CMPNE   R0, #0x17 \n"
 594 "    BEQ     loc_FF0CB2D0 \n"
 595 "    CMP     R0, #0x2A \n"
 596 "    BEQ     loc_FF0CB258 \n"
 597 "    ADD     R1, SP, #0xC \n"
 598 "    MOV     R0, #0 \n"
 599 "    BL      sub_FF0CB0B4 \n"
 600 
 601 "loc_FF0CB170:\n"
 602 "    LDR     R0, [SP, #0x28] \n"
 603 "    LDR     R1, [R0] \n"
 604 "    CMP     R1, #0x30 \n"
 605 "    BNE     loc_FF0CB19C \n"
 606 "    BL      sub_FF0CC638 \n"
 607 "    LDR     R0, [R6, #0x1C] \n"
 608 "    MOV     R1, #1 \n"
 609 "    BL      sub_0068BB50 /*_SetEventFlag*/ \n"
 610 "    BL      _ExitTask \n"
 611 "    ADD     SP, SP, #0x2C \n"
 612 "    LDMFD   SP!, {R4-R9,PC} \n"
 613 
 614 "loc_FF0CB19C:\n"
 615 "    CMP     R1, #0x2F \n"
 616 "    BNE     loc_FF0CB1B8 \n"
 617 "    LDR     R2, [R0, #0x8C]! \n"
 618 "    LDR     R1, [R0, #4] \n"
 619 "    MOV     R0, R1 \n"
 620 "    BLX     R2 \n"
 621 "    B       loc_FF0CB78C \n"
 622 
 623 "loc_FF0CB1B8:\n"
 624 "    CMP     R1, #0x28 \n"
 625 "    BNE     loc_FF0CB208 \n"
 626 "    LDR     R0, [R6, #0x1C] \n"
 627 "    MOV     R1, #0x80 \n"
 628 "    BL      sub_0068BB84 /*_ClearEventFlag*/ \n"
 629 "    LDR     R0, =0xFF0C6808 \n"
 630 "    MOV     R1, #0x80 \n"
 631 "    BL      sub_FF07C130 \n"
 632 "    LDR     R0, [R6, #0x1C] \n"
 633 "    MOV     R2, R7 \n"
 634 "    MOV     R1, #0x80 \n"
 635 "    BL      sub_0068BA90 /*_WaitForAllEventFlag*/ \n"
 636 "    TST     R0, #1 \n"
 637 "    LDRNE   R1, =0x1643 \n"
 638 "    BNE     loc_FF0CB2C4 \n"
 639 
 640 "loc_FF0CB1F4:\n"
 641 "    LDR     R1, [SP, #0x28] \n"
 642 "    LDR     R0, [R1, #0x90] \n"
 643 "    LDR     R1, [R1, #0x8C] \n"
 644 "    BLX     R1 \n"
 645 "    B       loc_FF0CB78C \n"
 646 
 647 "loc_FF0CB208:\n"
 648 "    CMP     R1, #0x29 \n"
 649 "    BNE     loc_FF0CB250 \n"
 650 "    ADD     R1, SP, #0xC \n"
 651 "    BL      sub_FF0CB0B4 \n"
 652 "    LDR     R0, [R6, #0x1C] \n"
 653 "    MOV     R1, #0x100 \n"
 654 "    BL      sub_0068BB84 /*_ClearEventFlag*/ \n"
 655 "    LDR     R0, =0xFF0C6818 \n"
 656 "    MOV     R1, #0x100 \n"
 657 "    BL      sub_FF07CEE4 \n"
 658 "    LDR     R0, [R6, #0x1C] \n"
 659 "    MOV     R2, R7 \n"
 660 "    MOV     R1, #0x100 \n"
 661 "    BL      sub_0068BA90 /*_WaitForAllEventFlag*/ \n"
 662 "    TST     R0, #1 \n"
 663 "    BEQ     loc_FF0CB1F4 \n"
 664 "    LDR     R1, =0x164D \n"
 665 "    B       loc_FF0CB2C4 \n"
 666 
 667 "loc_FF0CB250:\n"
 668 "    CMP     R1, #0x2A \n"
 669 "    BNE     loc_FF0CB268 \n"
 670 
 671 "loc_FF0CB258:\n"
 672 "    LDR     R0, [SP, #0x28] \n"
 673 "    ADD     R1, SP, #0xC \n"
 674 "    BL      sub_FF0CB0B4 \n"
 675 "    B       loc_FF0CB1F4 \n"
 676 
 677 "loc_FF0CB268:\n"
 678 "    CMP     R1, #0x2D \n"
 679 "    BNE     loc_FF0CB280 \n"
 680 "    BL      sub_FF0B559C \n"
 681 "    BL      sub_FF0B6374 \n"
 682 "    BL      sub_FF0B5E84 \n"
 683 "    B       loc_FF0CB1F4 \n"
 684 
 685 "loc_FF0CB280:\n"
 686 "    CMP     R1, #0x2E \n"
 687 "    BNE     loc_FF0CB2D0 \n"
 688 "    LDR     R0, [R6, #0x1C] \n"
 689 "    MOV     R1, #4 \n"
 690 "    BL      sub_0068BB84 /*_ClearEventFlag*/ \n"
 691 "    LDR     R1, =0xFF0C6838 \n"
 692 "    LDR     R0, =0xFFFFF400 \n"
 693 "    MOV     R2, #4 \n"
 694 "    BL      sub_FF0B4FE0 \n"
 695 "    BL      sub_FF0B527C \n"
 696 "    LDR     R0, [R6, #0x1C] \n"
 697 "    MOV     R2, R7 \n"
 698 "    MOV     R1, #4 \n"
 699 "    BL      sub_0068B9AC /*_WaitForAnyEventFlag*/ \n"
 700 "    TST     R0, #1 \n"
 701 "    BEQ     loc_FF0CB1F4 \n"
 702 "    LDR     R1, =0x1675 \n"
 703 
 704 "loc_FF0CB2C4:\n"
 705 "    LDR     R0, =0xFF0C6FB8 /*'ExpDrv.c'*/ \n"
 706 "    BL      _DebugAssert \n"
 707 "    B       loc_FF0CB1F4 \n"
 708 
 709 "loc_FF0CB2D0:\n"
 710 "    LDR     R0, [SP, #0x28] \n"
 711 "    MOV     R8, #1 \n"
 712 "    LDR     R1, [R0] \n"
 713 "    CMP     R1, #0x12 \n"
 714 "    CMPNE   R1, #0x13 \n"
 715 "    BNE     loc_FF0CB338 \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_FF0C957C \n"
 723 "    LDR     R0, [SP, #0x28] \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, #0x28] \n"
 730 "    BL      sub_FF0CCA44 \n"
 731 "    LDR     R0, [SP, #0x28] \n"
 732 "    LDR     R1, [R0, #0x7C] \n"
 733 "    LDR     R2, [R0, #0x98] \n"
 734 "    LDR     R3, [R0, #0x94] \n"
 735 "    B       loc_FF0CB650 \n"
 736 
 737 "loc_FF0CB338:\n"
 738 "    CMP     R1, #0x14 \n"
 739 "    CMPNE   R1, #0x15 \n"
 740 "    CMPNE   R1, #0x16 \n"
 741 "    CMPNE   R1, #0x17 \n"
 742 "    BNE     loc_FF0CB3F0 \n"
 743 "    ADD     R3, SP, #0xC \n"
 744 "    MOV     R2, SP \n"
 745 "    ADD     R1, SP, #0x1C \n"
 746 "    BL      sub_FF0C97E0 \n"
 747 "    CMP     R0, #1 \n"
 748 "    MOV     R9, R0 \n"
 749 "    CMPNE   R9, #5 \n"
 750 "    BNE     loc_FF0CB38C \n"
 751 "    LDR     R0, [SP, #0x28] \n"
 752 "    MOV     R2, R9 \n"
 753 "    LDR     R1, [R0, #0x7C]! \n"
 754 "    LDR     R12, [R0, #0x10]! \n"
 755 "    LDR     R3, [R0, #4] \n"
 756 "    MOV     R0, SP \n"
 757 "    BLX     R12 \n"
 758 "    B       loc_FF0CB3C4 \n"
 759 
 760 "loc_FF0CB38C:\n"
 761 "    LDR     R0, [SP, #0x28] \n"
 762 "    CMP     R9, #2 \n"
 763 "    LDR     R3, [R0, #0x90] \n"
 764 "    CMPNE   R9, #6 \n"
 765 "    BNE     loc_FF0CB3D8 \n"
 766 "    LDR     R12, [R0, #0x8C] \n"
 767 "    MOV     R2, R9 \n"
 768 "    MOV     R1, #1 \n"
 769 "    MOV     R0, SP \n"
 770 "    BLX     R12 \n"
 771 "    LDR     R0, [SP, #0x28] \n"
 772 "    MOV     R2, SP \n"
 773 "    ADD     R1, SP, #0x1C \n"
 774 "    BL      sub_FF0CADA4 \n"
 775 
 776 "loc_FF0CB3C4:\n"
 777 "    LDR     R0, [SP, #0x28] \n"
 778 "    LDR     R2, [SP, #0xC] \n"
 779 "    MOV     R1, R9 \n"
 780 "    BL      sub_FF0CB054 \n"
 781 "    B       loc_FF0CB658 \n"
 782 
 783 "loc_FF0CB3D8:\n"
 784 "    LDR     R1, [R0, #0x7C] \n"
 785 "    LDR     R12, [R0, #0x8C] \n"
 786 "    MOV     R2, R9 \n"
 787 "    ADD     R0, R0, #4 \n"
 788 "    BLX     R12 \n"
 789 "    B       loc_FF0CB658 \n"
 790 
 791 "loc_FF0CB3F0:\n"
 792 "    CMP     R1, #0x24 \n"
 793 "    CMPNE   R1, #0x25 \n"
 794 "    BNE     loc_FF0CB43C \n"
 795 "    LDR     R1, [R0, #0x7C] \n"
 796 "    ADD     R1, R1, R1, LSL#1 \n"
 797 "    ADD     R1, R0, R1, LSL#2 \n"
 798 "    SUB     R1, R1, #8 \n"
 799 "    LDMIA   R1, {R2,R3,R9} \n"
 800 "    STMIA   R5, {R2,R3,R9} \n"
 801 "    BL      sub_FF0C8544 \n"
 802 "    LDR     R0, [SP, #0x28] \n"
 803 "    LDR     R1, [R0, #0x7C] \n"
 804 "    LDR     R3, [R0, #0x8C] \n"
 805 "    LDR     R2, [R0, #0x90] \n"
 806 "    ADD     R0, R0, #4 \n"
 807 "    BLX     R3 \n"
 808 "    LDR     R0, [SP, #0x28] \n"
 809 "    BL      sub_FF0C89A0 \n"
 810 "    B       loc_FF0CB658 \n"
 811 
 812 "loc_FF0CB43C:\n"
 813 "    ADD     R1, R0, #4 \n"
 814 "    LDMIA   R1, {R2,R3,R9} \n"
 815 "    STMIA   R5, {R2,R3,R9} \n"
 816 "    LDR     R1, [R0] \n"
 817 "    CMP     R1, #0x28 \n"
 818 "    ADDCC   PC, PC, R1, LSL#2 \n"
 819 "    B       loc_FF0CB640 \n"
 820 "    B       loc_FF0CB4F8 \n"
 821 "    B       loc_FF0CB4F8 \n"
 822 "    B       loc_FF0CB500 \n"
 823 "    B       loc_FF0CB508 \n"
 824 "    B       loc_FF0CB508 \n"
 825 "    B       loc_FF0CB508 \n"
 826 "    B       loc_FF0CB4F8 \n"
 827 "    B       loc_FF0CB500 \n"
 828 "    B       loc_FF0CB508 \n"
 829 "    B       loc_FF0CB508 \n"
 830 "    B       loc_FF0CB520 \n"
 831 "    B       loc_FF0CB520 \n"
 832 "    B       loc_FF0CB62C \n"
 833 "    B       loc_FF0CB634 \n"
 834 "    B       loc_FF0CB634 \n"
 835 "    B       loc_FF0CB634 \n"
 836 "    B       loc_FF0CB634 \n"
 837 "    B       loc_FF0CB63C \n"
 838 "    B       loc_FF0CB640 \n"
 839 "    B       loc_FF0CB640 \n"
 840 "    B       loc_FF0CB640 \n"
 841 "    B       loc_FF0CB640 \n"
 842 "    B       loc_FF0CB640 \n"
 843 "    B       loc_FF0CB640 \n"
 844 "    B       loc_FF0CB510 \n"
 845 "    B       loc_FF0CB518 \n"
 846 "    B       loc_FF0CB518 \n"
 847 "    B       loc_FF0CB518 \n"
 848 "    B       loc_FF0CB52C \n"
 849 "    B       loc_FF0CB52C \n"
 850 "    B       loc_FF0CB534 \n"
 851 "    B       loc_FF0CB56C \n"
 852 "    B       loc_FF0CB5A4 \n"
 853 "    B       loc_FF0CB5DC \n"
 854 "    B       loc_FF0CB614 \n"
 855 "    B       loc_FF0CB614 \n"
 856 "    B       loc_FF0CB640 \n"
 857 "    B       loc_FF0CB640 \n"
 858 "    B       loc_FF0CB61C \n"
 859 "    B       loc_FF0CB624 \n"
 860 
 861 "loc_FF0CB4F8:\n"
 862 "    BL      sub_FF0C6DCC \n"
 863 "    B       loc_FF0CB640 \n"
 864 
 865 "loc_FF0CB500:\n"
 866 "    BL      sub_FF0C710C \n"
 867 "    B       loc_FF0CB640 \n"
 868 
 869 "loc_FF0CB508:\n"
 870 "    BL      sub_FF0C7378 \n"
 871 "    B       loc_FF0CB640 \n"
 872 
 873 "loc_FF0CB510:\n"
 874 "    BL      sub_FF0C7670 \n"
 875 "    B       loc_FF0CB640 \n"
 876 
 877 "loc_FF0CB518:\n"
 878 "    BL      sub_FF0C788C \n"
 879 "    B       loc_FF0CB640 \n"
 880 
 881 "loc_FF0CB520:\n"
 882 "    BL      sub_FF0C7C74_my \n"  // --> Patched. Old value = 0xFF0C7C74.
 883 "    MOV     R8, #0 \n"
 884 "    B       loc_FF0CB640 \n"
 885 
 886 "loc_FF0CB52C:\n"
 887 "    BL      sub_FF0C7DB4 \n"
 888 "    B       loc_FF0CB640 \n"
 889 
 890 "loc_FF0CB534:\n"
 891 "    LDRH    R1, [R0, #4] \n"
 892 "    STRH    R1, [SP, #0x1C] \n"
 893 "    LDRH    R1, [R4, #2] \n"
 894 "    STRH    R1, [SP, #0x1E] \n"
 895 "    LDRH    R1, [R4, #4] \n"
 896 "    STRH    R1, [SP, #0x20] \n"
 897 "    LDRH    R1, [R4, #6] \n"
 898 "    STRH    R1, [SP, #0x22] \n"
 899 "    LDRH    R1, [R0, #0xC] \n"
 900 "    STRH    R1, [SP, #0x24] \n"
 901 "    LDRH    R1, [R4, #0xA] \n"
 902 "    STRH    R1, [SP, #0x26] \n"
 903 "    BL      sub_FF0CC6CC \n"
 904 "    B       loc_FF0CB640 \n"
 905 
 906 "loc_FF0CB56C:\n"
 907 "    LDRH    R1, [R0, #4] \n"
 908 "    STRH    R1, [SP, #0x1C] \n"
 909 "    LDRH    R1, [R4, #2] \n"
 910 "    STRH    R1, [SP, #0x1E] \n"
 911 "    LDRH    R1, [R4, #4] \n"
 912 "    STRH    R1, [SP, #0x20] \n"
 913 "    LDRH    R1, [R4, #6] \n"
 914 "    STRH    R1, [SP, #0x22] \n"
 915 "    LDRH    R1, [R4, #8] \n"
 916 "    STRH    R1, [SP, #0x24] \n"
 917 "    LDRH    R1, [R4, #0xA] \n"
 918 "    STRH    R1, [SP, #0x26] \n"
 919 "    BL      sub_FF0CC844 \n"
 920 "    B       loc_FF0CB640 \n"
 921 
 922 "loc_FF0CB5A4:\n"
 923 "    LDRH    R1, [R4] \n"
 924 "    STRH    R1, [SP, #0x1C] \n"
 925 "    LDRH    R1, [R0, #6] \n"
 926 "    STRH    R1, [SP, #0x1E] \n"
 927 "    LDRH    R1, [R4, #4] \n"
 928 "    STRH    R1, [SP, #0x20] \n"
 929 "    LDRH    R1, [R4, #6] \n"
 930 "    STRH    R1, [SP, #0x22] \n"
 931 "    LDRH    R1, [R4, #8] \n"
 932 "    STRH    R1, [SP, #0x24] \n"
 933 "    LDRH    R1, [R4, #0xA] \n"
 934 "    STRH    R1, [SP, #0x26] \n"
 935 "    BL      sub_FF0CC8F8 \n"
 936 "    B       loc_FF0CB640 \n"
 937 
 938 "loc_FF0CB5DC:\n"
 939 "    LDRH    R1, [R4] \n"
 940 "    STRH    R1, [SP, #0x1C] \n"
 941 "    LDRH    R1, [R4, #2] \n"
 942 "    STRH    R1, [SP, #0x1E] \n"
 943 "    LDRH    R1, [R4, #4] \n"
 944 "    STRH    R1, [SP, #0x20] \n"
 945 "    LDRH    R1, [R4, #6] \n"
 946 "    STRH    R1, [SP, #0x22] \n"
 947 "    LDRH    R1, [R0, #0xC] \n"
 948 "    STRH    R1, [SP, #0x24] \n"
 949 "    LDRH    R1, [R4, #0xA] \n"
 950 "    STRH    R1, [SP, #0x26] \n"
 951 "    BL      sub_FF0CC9A0 \n"
 952 "    B       loc_FF0CB640 \n"
 953 
 954 "loc_FF0CB614:\n"
 955 "    BL      sub_FF0C82D8 \n"
 956 "    B       loc_FF0CB640 \n"
 957 
 958 "loc_FF0CB61C:\n"
 959 "    BL      sub_FF0C8AA4 \n"
 960 "    B       loc_FF0CB640 \n"
 961 
 962 "loc_FF0CB624:\n"
 963 "    BL      sub_FF0C8D8C \n"
 964 "    B       loc_FF0CB640 \n"
 965 
 966 "loc_FF0CB62C:\n"
 967 "    BL      sub_FF0C9048 \n"
 968 "    B       loc_FF0CB640 \n"
 969 
 970 "loc_FF0CB634:\n"
 971 "    BL      sub_FF0C9208 \n"
 972 "    B       loc_FF0CB640 \n"
 973 
 974 "loc_FF0CB63C:\n"
 975 "    BL      sub_FF0C9370 \n"
 976 
 977 "loc_FF0CB640:\n"
 978 "    LDR     R0, [SP, #0x28] \n"
 979 "    LDR     R1, [R0, #0x7C] \n"
 980 "    LDR     R2, [R0, #0x90] \n"
 981 "    LDR     R3, [R0, #0x8C] \n"
 982 
 983 "loc_FF0CB650:\n"
 984 "    ADD     R0, R0, #4 \n"
 985 "    BLX     R3 \n"
 986 
 987 "loc_FF0CB658:\n"
 988 "    LDR     R0, [SP, #0x28] \n"
 989 "    LDR     R0, [R0] \n"
 990 "    CMP     R0, #0x10 \n"
 991 "    BEQ     loc_FF0CB690 \n"
 992 "    BGT     loc_FF0CB680 \n"
 993 "    CMP     R0, #1 \n"
 994 "    CMPNE   R0, #4 \n"
 995 "    CMPNE   R0, #0xE \n"
 996 "    BNE     loc_FF0CB6C4 \n"
 997 "    B       loc_FF0CB690 \n"
 998 
 999 "loc_FF0CB680:\n"
1000 "    CMP     R0, #0x13 \n"
1001 "    CMPNE   R0, #0x17 \n"
1002 "    CMPNE   R0, #0x1A \n"
1003 "    BNE     loc_FF0CB6C4 \n"
1004 
1005 "loc_FF0CB690:\n"
1006 "    LDRSH   R0, [R4] \n"
1007 "    CMN     R0, #0xC00 \n"
1008 "    LDRNESH R1, [R4, #8] \n"
1009 "    CMNNE   R1, #0xC00 \n"
1010 "    STRNEH  R0, [SP, #0x1C] \n"
1011 "    STRNEH  R1, [SP, #0x24] \n"
1012 "    BNE     loc_FF0CB6C4 \n"
1013 "    ADD     R0, SP, #0x10 \n"
1014 "    BL      sub_FF0CCC50 \n"
1015 "    LDRH    R0, [SP, #0x10] \n"
1016 "    STRH    R0, [SP, #0x1C] \n"
1017 "    LDRH    R0, [SP, #0x18] \n"
1018 "    STRH    R0, [SP, #0x24] \n"
1019 
1020 "loc_FF0CB6C4:\n"
1021 "    LDR     R0, [SP, #0x28] \n"
1022 "    CMP     R8, #1 \n"
1023 "    BNE     loc_FF0CB714 \n"
1024 "    LDR     R1, [R0, #0x7C] \n"
1025 "    MOV     R2, #0xC \n"
1026 "    ADD     R1, R1, R1, LSL#1 \n"
1027 "    ADD     R0, R0, R1, LSL#2 \n"
1028 "    SUB     R8, R0, #8 \n"
1029 "    LDR     R0, =0x61A08 \n"
1030 "    ADD     R1, SP, #0x1C \n"
1031 "    BL      sub_00690174 \n"
1032 "    LDR     R0, =0x61A14 \n"
1033 "    MOV     R2, #0xC \n"
1034 "    ADD     R1, SP, #0x1C \n"
1035 "    BL      sub_00690174 \n"
1036 "    LDR     R0, =0x61A20 \n"
1037 "    MOV     R2, #0xC \n"
1038 "    MOV     R1, R8 \n"
1039 "    BL      sub_00690174 \n"
1040 "    B       loc_FF0CB78C \n"
1041 
1042 "loc_FF0CB714:\n"
1043 "    LDR     R0, [R0] \n"
1044 "    MOV     R3, #1 \n"
1045 "    CMP     R0, #0xB \n"
1046 "    BNE     loc_FF0CB758 \n"
1047 "    MOV     R2, #0 \n"
1048 "    STRD    R2, [SP] \n"
1049 "    MOV     R2, R3 \n"
1050 "    MOV     R1, R3 \n"
1051 "    MOV     R0, #0 \n"
1052 "    BL      sub_FF0C6BA0 \n"
1053 "    MOV     R3, #1 \n"
1054 "    MOV     R2, #0 \n"
1055 "    STRD    R2, [SP] \n"
1056 "    MOV     R2, R3 \n"
1057 "    MOV     R1, R3 \n"
1058 "    MOV     R0, #0 \n"
1059 "    B       loc_FF0CB788 \n"
1060 
1061 "loc_FF0CB758:\n"
1062 "    MOV     R2, #1 \n"
1063 "    STRD    R2, [SP] \n"
1064 "    MOV     R3, R2 \n"
1065 "    MOV     R1, R2 \n"
1066 "    MOV     R0, R2 \n"
1067 "    BL      sub_FF0C6BA0 \n"
1068 "    MOV     R3, #1 \n"
1069 "    MOV     R2, R3 \n"
1070 "    MOV     R1, R3 \n"
1071 "    MOV     R0, R3 \n"
1072 "    STR     R3, [SP] \n"
1073 "    STR     R3, [SP, #4] \n"
1074 
1075 "loc_FF0CB788:\n"
1076 "    BL      sub_FF0C6D18 \n"
1077 
1078 "loc_FF0CB78C:\n"
1079 "    LDR     R0, [SP, #0x28] \n"
1080 "    BL      sub_FF0CC638 \n"
1081 "    B       loc_FF0CB124 \n"
1082 );
1083 }
1084 
1085 /*************************************************************/
1086 //** sub_FF0C7C74_my @ 0xFF0C7C74 - 0xFF0C7DB0, length=80
1087 void __attribute__((naked,noinline)) sub_FF0C7C74_my() {
1088 asm volatile (
1089 "    STMFD   SP!, {R4-R8,LR} \n"
1090 "    LDR     R7, =0x4DBC \n"
1091 "    MOV     R4, R0 \n"
1092 "    LDR     R0, [R7, #0x1C] \n"
1093 "    MOV     R1, #0x3E \n"
1094 "    BL      sub_0068BB84 /*_ClearEventFlag*/ \n"
1095 "    MOV     R2, #0 \n"
1096 "    LDRSH   R0, [R4, #4] \n"
1097 "    MOV     R1, R2 \n"
1098 "    BL      sub_FF0C68A0 \n"
1099 "    MOV     R6, R0 \n"
1100 "    LDRSH   R0, [R4, #6] \n"
1101 "    BL      sub_FF0C6A00 \n"
1102 "    LDRSH   R0, [R4, #8] \n"
1103 "    BL      sub_FF0C6A58 \n"
1104 "    LDRSH   R0, [R4, #0xA] \n"
1105 "    BL      sub_FF0C6AB0 \n"
1106 "    LDRSH   R0, [R4, #0xC] \n"
1107 "    MOV     R1, #0 \n"
1108 "    BL      sub_FF0C6B08 \n"
1109 "    MOV     R5, R0 \n"
1110 "    LDR     R0, [R4] \n"
1111 "    LDR     R8, =0x61A20 \n"
1112 "    CMP     R0, #0xB \n"
1113 "    MOVEQ   R6, #0 \n"
1114 "    MOVEQ   R5, R6 \n"
1115 "    BEQ     loc_FF0C7D08 \n"
1116 "    CMP     R6, #1 \n"
1117 "    BNE     loc_FF0C7D08 \n"
1118 "    LDRSH   R0, [R4, #4] \n"
1119 "    LDR     R1, =0xFF0C67F8 \n"
1120 "    MOV     R2, #2 \n"
1121 "    BL      sub_FF07C450 \n"
1122 "    STRH    R0, [R4, #4] \n"
1123 "    MOV     R0, #0 \n"
1124 "    STR     R0, [R7, #0x28] \n"
1125 "    B       loc_FF0C7D10 \n"
1126 
1127 "loc_FF0C7D08:\n"
1128 "    LDRH    R0, [R8] \n"
1129 "    STRH    R0, [R4, #4] \n"
1130 
1131 "loc_FF0C7D10:\n"
1132 "    CMP     R5, #1 \n"
1133 "    LDRNEH  R0, [R8, #8] \n"
1134 "    BNE     loc_FF0C7D2C \n"
1135 "    LDRSH   R0, [R4, #0xC] \n"
1136 "    LDR     R1, =0xFF0C687C \n"
1137 "    MOV     R2, #0x20 \n"
1138 "    BL      sub_FF0CC688 \n"
1139 
1140 "loc_FF0C7D2C:\n"
1141 "    STRH    R0, [R4, #0xC] \n"
1142 "    LDRSH   R0, [R4, #6] \n"
1143 "    BL      sub_FF0B52E8_my \n"  // --> Patched. Old value = 0xFF0B52E8.
1144 "    LDRSH   R0, [R4, #8] \n"
1145 "    MOV     R1, #1 \n"
1146 "    BL      sub_FF0B5B3C \n"
1147 "    MOV     R1, #0 \n"
1148 "    ADD     R0, R4, #8 \n"
1149 "    BL      sub_FF0B5BC4 \n"
1150 "    LDRSH   R0, [R4, #0xE] \n"
1151 "    BL      sub_FF0C0A64 \n"
1152 "    LDR     R4, =0xBB8 \n"
1153 "    CMP     R6, #1 \n"
1154 "    BNE     loc_FF0C7D84 \n"
1155 "    LDR     R0, [R7, #0x1C] \n"
1156 "    MOV     R2, R4 \n"
1157 "    MOV     R1, #2 \n"
1158 "    BL      sub_0068BA90 /*_WaitForAllEventFlag*/ \n"
1159 "    TST     R0, #1 \n"
1160 "    LDRNE   R0, =0xFF0C6FB8 /*'ExpDrv.c'*/ \n"
1161 "    MOVNE   R1, #0x820 \n"
1162 "    BLNE    _DebugAssert \n"
1163 
1164 "loc_FF0C7D84:\n"
1165 "    CMP     R5, #1 \n"
1166 "    LDMNEFD SP!, {R4-R8,PC} \n"
1167 "    LDR     R0, [R7, #0x1C] \n"
1168 "    MOV     R2, R4 \n"
1169 "    MOV     R1, #0x20 \n"
1170 "    BL      sub_0068BA90 /*_WaitForAllEventFlag*/ \n"
1171 "    TST     R0, #1 \n"
1172 "    LDMEQFD SP!, {R4-R8,PC} \n"
1173 "    LDMFD   SP!, {R4-R8,LR} \n"
1174 "    LDR     R1, =0x825 \n"
1175 "    LDR     R0, =0xFF0C6FB8 /*'ExpDrv.c'*/ \n"
1176 "    B       _DebugAssert \n"
1177 );
1178 }
1179 
1180 /*************************************************************/
1181 //** sub_FF0B52E8_my @ 0xFF0B52E8 - 0xFF0B5350, length=27
1182 void __attribute__((naked,noinline)) sub_FF0B52E8_my() {
1183 asm volatile (
1184 "    STMFD   SP!, {R4-R6,LR} \n"
1185 "    LDR     R5, =0x4A28 \n"
1186 "    MOV     R4, R0 \n"
1187 "    LDR     R0, [R5, #4] \n"
1188 "    CMP     R0, #1 \n"
1189 "    MOVNE   R1, #0x154 \n"
1190 "    LDRNE   R0, =0xFF0B50E4 /*'Shutter.c'*/ \n"
1191 "    BLNE    _DebugAssert \n"
1192 "    CMN     R4, #0xC00 \n"
1193 "    LDREQSH R4, [R5, #2] \n"
1194 "    CMN     R4, #0xC00 \n"
1195 "    LDREQ   R1, =0x15A \n"
1196 "    LDREQ   R0, =0xFF0B50E4 /*'Shutter.c'*/ \n"
1197 "    STRH    R4, [R5, #2] \n"
1198 "    BLEQ    _DebugAssert \n"
1199 "    MOV     R0, R4 \n"
1200 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
1201 "    MOV     R4, R0 \n"
1202 //"  BL      _sub_FF137010 \n"  // --> Nullsub call removed.
1203 "    MOV     R0, R4 \n"
1204 "    BL      sub_FF140788 \n"
1205 "    TST     R0, #1 \n"
1206 "    LDMEQFD SP!, {R4-R6,PC} \n"
1207 "    LDMFD   SP!, {R4-R6,LR} \n"
1208 "    LDR     R1, =0x15F \n"
1209 "    LDR     R0, =0xFF0B50E4 /*'Shutter.c'*/ \n"
1210 "    B       _DebugAssert \n"
1211 );
1212 }

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