root/platform/ixus150_elph140/sub/100c/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF9975D8_my
  3. sub_FF9974CC_my
  4. sub_FFAC1B84_my
  5. exp_drv_task
  6. sub_FF8D5D28_my
  7. sub_FF8C2CF0_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_min.S
   9 
  10 #define NR_AUTO (0)
  11 
  12 //#define PAUSE_FOR_FILE_COUNTER 1000  // Enable delay in capt_seq_hook_raw_here to ensure file counter is updated
  13 
  14 #include "../../../generic/capt_seq.c"
  15 
  16 /*************************************************************/
  17 //** capt_seq_task @ 0xFF88BF78 - 0xFF88C250, length=183
  18 void __attribute__((naked,noinline)) capt_seq_task() {
  19 asm volatile (
  20 "    STMFD   SP!, {R3-R7,LR} \n"
  21 "    LDR     R5, =0x1CD30 \n"
  22 "    LDR     R7, =0x3530 \n"
  23 "    MOV     R6, #0 \n"
  24 
  25 "loc_FF88BF88:\n"
  26 "    LDR     R0, [R7, #4] \n"
  27 "    MOV     R2, #0 \n"
  28 "    MOV     R1, SP \n"
  29 "    BL      sub_006B8458 /*_ReceiveMessageQueue*/ \n"
  30 "    TST     R0, #1 \n"
  31 "    BEQ     loc_FF88BFB8 \n"
  32 "    LDR     R2, =0x429 \n"
  33 "    LDR     R1, =0xFF88B8F4 /*'SsShootTask.c'*/ \n"
  34 "    MOV     R0, #0 \n"
  35 "    BL      _DebugAssert \n"
  36 "    BL      _ExitTask \n"
  37 "    LDMFD   SP!, {R3-R7,PC} \n"
  38 
  39 "loc_FF88BFB8:\n"
  40 "    LDR     R0, [SP] \n"
  41 "    LDR     R0, [R0] \n"
  42 "    CMP     R0, #1 \n"
  43 "    CMPNE   R0, #0x23 \n"
  44 "    CMPNE   R0, #0x19 \n"
  45 "    BLNE    sub_FF9989C8 \n"
  46 "    LDR     R0, [SP] \n"
  47 "    LDR     R1, [R0] \n"
  48 "    CMP     R1, #0x25 \n"
  49 "    ADDCC   PC, PC, R1, LSL#2 \n"
  50 "    B       loc_FF88C214 \n"
  51 "    B       loc_FF88C078 \n"
  52 "    B       loc_FF88C090 \n"
  53 "    B       loc_FF88C09C \n"
  54 "    B       loc_FF88C0B0 \n"
  55 "    B       loc_FF88C0A8 \n"
  56 "    B       loc_FF88C0BC \n"
  57 "    B       loc_FF88C0C4 \n"
  58 "    B       loc_FF88C0CC \n"
  59 "    B       loc_FF88C0D8 \n"
  60 "    B       loc_FF88C104 \n"
  61 "    B       loc_FF88C0E4 \n"
  62 "    B       loc_FF88C0F0 \n"
  63 "    B       loc_FF88C0F8 \n"
  64 "    B       loc_FF88C10C \n"
  65 "    B       loc_FF88C114 \n"
  66 "    B       loc_FF88C11C \n"
  67 "    B       loc_FF88C124 \n"
  68 "    B       loc_FF88C12C \n"
  69 "    B       loc_FF88C138 \n"
  70 "    B       loc_FF88C140 \n"
  71 "    B       loc_FF88C148 \n"
  72 "    B       loc_FF88C150 \n"
  73 "    B       loc_FF88C158 \n"
  74 "    B       loc_FF88C160 \n"
  75 "    B       loc_FF88C168 \n"
  76 "    B       loc_FF88C170 \n"
  77 "    B       loc_FF88C17C \n"
  78 "    B       loc_FF88C184 \n"
  79 "    B       loc_FF88C18C \n"
  80 "    B       loc_FF88C194 \n"
  81 "    B       loc_FF88C19C \n"
  82 "    B       loc_FF88C1A8 \n"
  83 "    B       loc_FF88C1B0 \n"
  84 "    B       loc_FF88C1BC \n"
  85 "    B       loc_FF88C1F4 \n"
  86 "    B       loc_FF88C200 \n"
  87 "    B       loc_FF88C224 \n"
  88 
  89 "loc_FF88C078:\n"
  90 "    BL      sub_FF88C79C \n"
  91 "    BL      shooting_expo_param_override\n"    // added
  92 "    BL      sub_FF889574 \n"
  93 //To do: Check if this is needed.
  94 //"    MOV     R0, #0\n"                          // added
  95 //"    STR     R0, [R5,#0x28]\n"                  // added, fixes overrides behavior at short shutter press (from S95)
  96 "    LDR     R0, [R5, #0x28] \n"
  97 "    CMP     R0, #0 \n"
  98 "    BLNE    sub_FF9975D8_my \n"  // --> Patched. Old value = 0xFF9975D8.
  99 "    B       loc_FF88C224 \n"
 100 
 101 "loc_FF88C090:\n"
 102 "    LDR     R0, [R0, #0x10] \n"
 103 "    BL      sub_FF9974CC_my \n"  // --> Patched. Old value = 0xFF9974CC.
 104 "    B       loc_FF88C224 \n"
 105 
 106 "loc_FF88C09C:\n"
 107 "    MOV     R0, #1 \n"
 108 "    BL      sub_FF88CAF8 \n"
 109 "    B       loc_FF88C224 \n"
 110 
 111 "loc_FF88C0A8:\n"
 112 "    BL      sub_FF88C404 \n"
 113 "    B       loc_FF88C0B4 \n"
 114 
 115 "loc_FF88C0B0:\n"
 116 "    BL      sub_FF88C778 \n"
 117 
 118 "loc_FF88C0B4:\n"
 119 "    STR     R6, [R5, #0x28] \n"
 120 "    B       loc_FF88C224 \n"
 121 
 122 "loc_FF88C0BC:\n"
 123 "    BL      sub_FF88C780 \n"
 124 "    B       loc_FF88C224 \n"
 125 
 126 "loc_FF88C0C4:\n"
 127 "    BL      sub_FF88C9BC \n"
 128 "    B       loc_FF88C0DC \n"
 129 
 130 "loc_FF88C0CC:\n"
 131 "    LDR     R0, [R0, #0x10] \n"
 132 "    BL      sub_FF997674 \n"
 133 "    B       loc_FF88C224 \n"
 134 
 135 "loc_FF88C0D8:\n"
 136 "    BL      sub_FF88CA50 \n"
 137 
 138 "loc_FF88C0DC:\n"
 139 "    BL      sub_FF889574 \n"
 140 "    B       loc_FF88C224 \n"
 141 
 142 "loc_FF88C0E4:\n"
 143 "    LDR     R0, [R5, #0x50] \n"
 144 "    BL      sub_FF88D0FC \n"
 145 "    B       loc_FF88C224 \n"
 146 
 147 "loc_FF88C0F0:\n"
 148 "    BL      sub_FF88D544 \n"
 149 "    B       loc_FF88C224 \n"
 150 
 151 "loc_FF88C0F8:\n"
 152 "    LDR     R0, [R0, #0xC] \n"
 153 "    BL      sub_FF88D5AC \n"
 154 "    B       loc_FF88C224 \n"
 155 
 156 "loc_FF88C104:\n"
 157 "    BL      sub_FF88C778 \n"
 158 "    B       loc_FF88C224 \n"
 159 
 160 "loc_FF88C10C:\n"
 161 "    BL      sub_FF9969C8 \n"
 162 "    B       loc_FF88C224 \n"
 163 
 164 "loc_FF88C114:\n"
 165 "    BL      sub_FF996C04 \n"
 166 "    B       loc_FF88C224 \n"
 167 
 168 "loc_FF88C11C:\n"
 169 "    BL      sub_FF996CC0 \n"
 170 "    B       loc_FF88C224 \n"
 171 
 172 "loc_FF88C124:\n"
 173 "    BL      sub_FF996D98 \n"
 174 "    B       loc_FF88C224 \n"
 175 
 176 "loc_FF88C12C:\n"
 177 "    MOV     R0, #0 \n"
 178 "    BL      sub_FF997000 \n"
 179 "    B       loc_FF88C224 \n"
 180 
 181 "loc_FF88C138:\n"
 182 "    BL      sub_FF997160 \n"
 183 "    B       loc_FF88C224 \n"
 184 
 185 "loc_FF88C140:\n"
 186 "    BL      sub_FF893040 \n"
 187 "    B       loc_FF88C224 \n"
 188 
 189 "loc_FF88C148:\n"
 190 "    BL      sub_FF89304C \n"
 191 "    B       loc_FF88C224 \n"
 192 
 193 "loc_FF88C150:\n"
 194 "    BL      sub_FF9971FC \n"
 195 "    B       loc_FF88C224 \n"
 196 
 197 "loc_FF88C158:\n"
 198 "    BL      sub_FF9972A8 \n"
 199 "    B       loc_FF88C224 \n"
 200 
 201 "loc_FF88C160:\n"
 202 "    BL      sub_FF88CC60 \n"
 203 "    B       loc_FF88C224 \n"
 204 
 205 "loc_FF88C168:\n"
 206 "    MOV     R0, #0 \n"
 207 "    B       loc_FF88C174 \n"
 208 
 209 "loc_FF88C170:\n"
 210 "    LDR     R0, [R0, #0xC] \n"
 211 
 212 "loc_FF88C174:\n"
 213 "    BL      sub_FF88CCEC \n"
 214 "    B       loc_FF88C224 \n"
 215 
 216 "loc_FF88C17C:\n"
 217 "    BL      sub_FF996E68 \n"
 218 "    B       loc_FF88C224 \n"
 219 
 220 "loc_FF88C184:\n"
 221 "    BL      sub_FF996EA8 \n"
 222 "    B       loc_FF88C224 \n"
 223 
 224 "loc_FF88C18C:\n"
 225 "    BL      sub_FF88FAE4 \n"
 226 "    B       loc_FF88C224 \n"
 227 
 228 "loc_FF88C194:\n"
 229 "    BL      sub_FF88FBD4 \n"
 230 "    B       loc_FF88C224 \n"
 231 
 232 "loc_FF88C19C:\n"
 233 "    LDR     R0, [R0, #0xC] \n"
 234 "    BL      sub_FF9973B8 \n"
 235 "    B       loc_FF88C224 \n"
 236 
 237 "loc_FF88C1A8:\n"
 238 "    BL      sub_FF997440 \n"
 239 "    B       loc_FF88C224 \n"
 240 
 241 "loc_FF88C1B0:\n"
 242 "    BL      sub_FF88FD60 \n"
 243 "    BL      sub_FF88FC2C \n"
 244 "    B       loc_FF88C224 \n"
 245 
 246 "loc_FF88C1BC:\n"
 247 "    MOV     R0, #1 \n"
 248 "    BL      sub_FF997EC8 \n"
 249 "    MOV     R0, #1 \n"
 250 "    BL      sub_FF997FF4 \n"
 251 "    LDR     R0, =0x1CE30 \n"
 252 "    LDRH    R0, [R0, #0x90] \n"
 253 "    CMP     R0, #4 \n"
 254 "    LDRNEH  R0, [R5] \n"
 255 "    SUBNE   R1, R0, #0x8200 \n"
 256 "    SUBNES  R1, R1, #0x31 \n"
 257 "    BNE     loc_FF88C224 \n"
 258 "    BL      sub_FF88FBD4 \n"
 259 "    BL      sub_FF8900F8 \n"
 260 "    B       loc_FF88C224 \n"
 261 
 262 "loc_FF88C1F4:\n"
 263 "    MOV     R2, #0 \n"
 264 "    MOV     R1, #0x10 \n"
 265 "    B       loc_FF88C208 \n"
 266 
 267 "loc_FF88C200:\n"
 268 "    MOV     R2, #0 \n"
 269 "    MOV     R1, #0xF \n"
 270 
 271 "loc_FF88C208:\n"
 272 "    MOV     R0, #0 \n"
 273 "    BL      sub_FF88A048 \n"
 274 "    B       loc_FF88C224 \n"
 275 
 276 "loc_FF88C214:\n"
 277 "    LDR     R2, =0x54D \n"
 278 "    LDR     R1, =0xFF88B8F4 /*'SsShootTask.c'*/ \n"
 279 "    MOV     R0, #0 \n"
 280 "    BL      _DebugAssert \n"
 281 
 282 "loc_FF88C224:\n"
 283 "    LDR     R0, [SP] \n"
 284 "    LDR     R1, [R0, #4] \n"
 285 "    LDR     R0, [R7] \n"
 286 "    BL      sub_006B81EC /*_SetEventFlag*/ \n"
 287 "    LDR     R4, [SP] \n"
 288 "    LDR     R0, [R4, #8] \n"
 289 "    CMP     R0, #0 \n"
 290 "    LDREQ   R2, =0x11E \n"
 291 "    LDREQ   R1, =0xFF88B8F4 /*'SsShootTask.c'*/ \n"
 292 "    BLEQ    _DebugAssert \n"
 293 "    STR     R6, [R4, #8] \n"
 294 "    B       loc_FF88BF88 \n"
 295 );
 296 }
 297 
 298 /*************************************************************/
 299 //** sub_FF9975D8_my @ 0xFF9975D8 - 0xFF997670, length=39
 300 void __attribute__((naked,noinline)) sub_FF9975D8_my() {
 301 asm volatile (
 302 "    STMFD   SP!, {R4-R6,LR} \n"
 303 "    BL      sub_FF88B4DC \n"
 304 "    MOV     R4, R0 \n"
 305 "    MOV     R0, #0xC \n"
 306 "    BL      sub_FF891720 \n"
 307 "    LDR     R6, =0x74D0 \n"
 308 "    TST     R0, #1 \n"
 309 "    MOV     R5, #1 \n"
 310 "    BNE     loc_FF99766C \n"
 311 "    BL      sub_FF89177C \n"
 312 "    TST     R0, #1 \n"
 313 "    BNE     loc_FF99766C \n"
 314 "    BL      sub_FF88C788 \n"
 315 "    BL      sub_FF88D8F4 \n"
 316 "    MOV     R1, R4 \n"
 317 "    BL      sub_FF88D950 \n"
 318 "    LDR     R0, =0x10E \n"
 319 "    MOV     R2, #4 \n"
 320 "    ADD     R1, R4, #0x30 \n"
 321 "    BL      _SetPropertyCase \n"
 322 "    MOV     R2, #4 \n"
 323 "    ADD     R1, R4, #0x34 \n"
 324 "    MOV     R0, #0x2C \n"
 325 "    BL      _SetPropertyCase \n"
 326 "    MOV     R2, #4 \n"
 327 "    ADD     R1, R4, #8 \n"
 328 "    MOV     R0, #0x3F \n"
 329 "    BL      _SetPropertyCase \n"
 330 "    BL      sub_FF9981B4 \n"
 331 "    MVN     R1, #0x1000 \n"
 332 "    BL      sub_006B8234 /*_ClearEventFlag*/ \n"
 333 "    MOV     R0, R4 \n"
 334 "    BL      sub_FFAC1804 \n"
 335 "    MOV     R0, R4 \n"
 336 "    BL      sub_FFAC1B84_my \n"  // --> Patched. Old value = 0xFFAC1B84.
 337 "    TST     R0, #1 \n"
 338 "    LDMEQFD SP!, {R4-R6,PC} \n"
 339 
 340 "loc_FF99766C:\n"
 341 "    STR     R5, [R6] \n"
 342 "    LDMFD   SP!, {R4-R6,PC} \n"
 343 );
 344 }
 345 
 346 /*************************************************************/
 347 //** sub_FF9974CC_my @ 0xFF9974CC - 0xFF9975D4, length=67
 348 void __attribute__((naked,noinline)) sub_FF9974CC_my() {
 349 asm volatile (
 350 "    STMFD   SP!, {R4-R6,LR} \n"
 351 "    LDR     R6, =0x1CD30 \n"
 352 "    MOV     R5, R0 \n"
 353 "    LDR     R0, [R6, #0x28] \n"
 354 "    MOV     R4, #0 \n"
 355 "    CMP     R0, #0 \n"
 356 "    BEQ     loc_FF997518 \n"
 357 "    LDR     R0, =0x74D0 \n"
 358 "    MOV     R2, R5 \n"
 359 "    LDR     R0, [R0] \n"
 360 "    MOV     R1, #1 \n"
 361 "    CMP     R0, #0 \n"
 362 "    MOVNE   R4, #0x1D \n"
 363 "    MOV     R0, R4 \n"
 364 "    BL      sub_FF88A048 \n"
 365 "    MOV     R1, R4 \n"
 366 "    MOV     R0, R5 \n"
 367 "    BL      sub_FF998750 \n"
 368 "    B       loc_FF9975CC \n"
 369 
 370 "loc_FF997518:\n"
 371 "    BL      sub_FF88D8F4 \n"
 372 "    MOV     R1, R5 \n"
 373 "    BL      sub_FF88D950 \n"
 374 "    LDR     R0, =0x10E \n"
 375 "    MOV     R2, #4 \n"
 376 "    ADD     R1, R5, #0x30 \n"
 377 "    BL      _SetPropertyCase \n"
 378 "    MOV     R2, #4 \n"
 379 "    ADD     R1, R5, #0x34 \n"
 380 "    MOV     R0, #0x2C \n"
 381 "    BL      _SetPropertyCase \n"
 382 "    MOV     R0, #0xC \n"
 383 "    BL      sub_FF891720 \n"
 384 "    TST     R0, #1 \n"
 385 "    BNE     loc_FF997560 \n"
 386 "    BL      sub_FF89177C \n"
 387 "    TST     R0, #1 \n"
 388 "    BEQ     loc_FF997568 \n"
 389 
 390 "loc_FF997560:\n"
 391 "    BL      sub_FF889E28 \n"
 392 "    MOV     R4, #1 \n"
 393 
 394 "loc_FF997568:\n"
 395 "    TST     R4, #1 \n"
 396 "    BNE     loc_FF9975B0 \n"
 397 "    BL      sub_FF9981B4 \n"
 398 "    MVN     R1, #0x1000 \n"
 399 "    BL      sub_006B8234 /*_ClearEventFlag*/ \n"
 400 "    MOV     R0, R5 \n"
 401 "    BL      sub_FFAC0EE4 \n"
 402 "    TST     R0, #1 \n"
 403 "    MOV     R4, R0 \n"
 404 "    BNE     loc_FF9975B0 \n"
 405 "    BL      sub_FF88C788 \n"
 406 "    MOV     R0, R5 \n"
 407 "    BL      sub_FFAC1804 \n"
 408 "    MOV     R0, #2 \n"
 409 "    BL      sub_FF8931C0 \n"
 410 "    MOV     R0, R5 \n"
 411 "    BL      sub_FFAC1B84_my \n"  // --> Patched. Old value = 0xFFAC1B84.
 412 "    B       loc_FF9975CC \n"
 413 
 414 "loc_FF9975B0:\n"
 415 "    MOV     R2, R5 \n"
 416 "    MOV     R1, #1 \n"
 417 "    MOV     R0, R4 \n"
 418 "    BL      sub_FF88A048 \n"
 419 "    MOV     R1, R4 \n"
 420 "    MOV     R0, R5 \n"
 421 "    BL      sub_FF998964 \n"
 422 
 423 "loc_FF9975CC:\n"
 424 "    MOV     R0, #0 \n"
 425 "    STR     R0, [R6, #0x28] \n"
 426 "    LDMFD   SP!, {R4-R6,PC} \n"
 427 );
 428 }
 429 
 430 /*************************************************************/
 431 //** sub_FFAC1B84_my @ 0xFFAC1B84 - 0xFFAC1DF4, length=157
 432 void __attribute__((naked,noinline)) sub_FFAC1B84_my() {
 433 asm volatile (
 434 "    STMFD   SP!, {R2-R8,LR} \n"
 435 "    MOV     R4, R0 \n"
 436 "    BL      sub_FFAC176C \n"
 437 "    BL      sub_FF997C80 \n"
 438 "    LDR     R7, =0x1CD30 \n"
 439 "    LDR     R0, [R7, #0x184] \n"
 440 "    CMP     R0, #2 \n"
 441 "    BNE     loc_FFAC1BC0 \n"
 442 "    ADD     R0, R7, #0x100 \n"
 443 "    LDRH    R0, [R0, #0x8E] \n"
 444 "    CMP     R0, #3 \n"
 445 "    LDRNE   R0, [R4, #8] \n"
 446 "    CMPNE   R0, #1 \n"
 447 "    MOVLS   R0, #3 \n"
 448 "    BLLS    sub_FF919B10 \n"
 449 
 450 "loc_FFAC1BC0:\n"
 451 "    LDR     R0, =0x12F \n"
 452 "    MOV     R2, #4 \n"
 453 "    ADD     R1, SP, #4 \n"
 454 "    BL      _GetPropertyCase \n"
 455 "    TST     R0, #1 \n"
 456 "    MOVNE   R2, #0x18C \n"
 457 "    LDRNE   R1, =0xFFAC1E08 /*'SsStandardCaptureSeq.c'*/ \n"
 458 "    MOVNE   R0, #0 \n"
 459 "    BLNE    _DebugAssert \n"
 460 "    LDR     R0, [SP, #4] \n"
 461 "    AND     R0, R0, #0xFF00 \n"
 462 "    CMP     R0, #0x600 \n"
 463 "    LDRNE   R0, =0xFFAC13F4 \n"
 464 "    LDREQ   R0, =0xFFAC1B4C \n"
 465 "    MOVNE   R1, R4 \n"
 466 "    MOVEQ   R1, #0 \n"
 467 "    BL      sub_FF8CB528 \n"
 468 "    BL      wait_until_remote_button_is_released\n" // added
 469 "    BL      capt_seq_hook_set_nr\n"                 // added
 470 "    MOV     R0, R4 \n"
 471 "    BL      sub_FFAC1894 \n"
 472 "    LDR     R1, =0xCB4C \n"
 473 "    MOV     R2, #4 \n"
 474 "    MOV     R0, #0x8A \n"
 475 "    BL      _GetPropertyCase \n"
 476 "    TST     R0, #1 \n"
 477 "    LDRNE   R2, =0x19B \n"
 478 "    LDRNE   R1, =0xFFAC1E08 /*'SsStandardCaptureSeq.c'*/ \n"
 479 "    MOVNE   R0, #0 \n"
 480 "    BLNE    _DebugAssert \n"
 481 "    BL      sub_FF88ED60 \n"
 482 "    BL      sub_FF97B0A8 \n"
 483 "    MOV     R1, #0 \n"
 484 "    MOV     R0, R4 \n"
 485 "    BL      sub_FFAC1F00 \n"
 486 "    MOV     R6, R0 \n"
 487 "    LDR     R0, [SP, #4] \n"
 488 "    LDR     R8, =0xCB4C \n"
 489 "    AND     R0, R0, #0xFF00 \n"
 490 "    CMP     R0, #0x600 \n"
 491 "    LDRH    R0, [R4, #0x18] \n"
 492 "    LDRNE   R2, =0xFFAC1658 \n"
 493 "    LDREQ   R2, =0xFFAC15D4 \n"
 494 "    CMP     R0, #0 \n"
 495 "    BEQ     loc_FFAC1C7C \n"
 496 "    CMP     R0, #1 \n"
 497 "    BEQ     loc_FFAC1CA0 \n"
 498 "    CMP     R0, #4 \n"
 499 "    BNE     loc_FFAC1D14 \n"
 500 
 501 "loc_FFAC1C7C:\n"
 502 "    STR     R6, [SP] \n"
 503 "    MOV     R3, R2 \n"
 504 "    LDR     R1, [R4, #0x34] \n"
 505 "    LDR     R2, [R8] \n"
 506 "    MOV     R0, R4 \n"
 507 "    BL      sub_FFAC1278 \n"
 508 "    MOV     R5, R0 \n"
 509 "    BL      sub_FF8C8250 \n"
 510 "    B       loc_FFAC1D28 \n"
 511 
 512 "loc_FFAC1CA0:\n"
 513 "    STR     R6, [SP] \n"
 514 "    MOV     R3, R2 \n"
 515 "    LDR     R1, [R4, #0x34] \n"
 516 "    LDR     R2, [R8] \n"
 517 "    MOV     R0, R4 \n"
 518 "    BL      sub_FFAC12F8 \n"
 519 "    MOV     R5, R0 \n"
 520 "    MOV     R1, #0 \n"
 521 "    MOV     R0, #0x45 \n"
 522 "    BL      sub_FF8321D8 \n"
 523 "    TST     R5, #1 \n"
 524 "    BNE     loc_FFAC1D28 \n"
 525 "    LDR     R0, =0xFFAC1B4C \n"
 526 "    MOV     R1, #0 \n"
 527 "    BL      sub_FF8CB528 \n"
 528 "    MOV     R1, #1 \n"
 529 "    MOV     R0, R4 \n"
 530 "    BL      sub_FFAC1F00 \n"
 531 "    MOV     R6, R0 \n"
 532 "    LDR     R0, [R8] \n"
 533 "    BL      sub_FFAC16F0 \n"
 534 "    LDR     R1, [R4, #0x34] \n"
 535 "    LDR     R2, [R8] \n"
 536 "    MOV     R3, R6 \n"
 537 "    MOV     R0, R4 \n"
 538 "    BL      sub_FFAC1378 \n"
 539 "    MOV     R5, R0 \n"
 540 "    BL      sub_FFAC1200 \n"
 541 "    B       loc_FFAC1D28 \n"
 542 
 543 "loc_FFAC1D14:\n"
 544 "    LDR     R2, =0x1D5 \n"
 545 "    LDR     R1, =0xFFAC1E08 /*'SsStandardCaptureSeq.c'*/ \n"
 546 "    MOV     R0, #0 \n"
 547 "    BL      _DebugAssert \n"
 548 "    MOV     R5, #0x1D \n"
 549 
 550 "loc_FFAC1D28:\n"
 551 "    BL      sub_FF97B0C0 \n"
 552 "    LDR     R8, =0xFFAC1B4C \n"
 553 "    TST     R5, #1 \n"
 554 "    BNE     loc_FFAC1DA8 \n"
 555 "    LDR     R0, [R7, #0xF8] \n"
 556 "    CMP     R0, #0 \n"
 557 "    BNE     loc_FFAC1D60 \n"
 558 "    MOV     R0, R4 \n"
 559 "    BL      sub_FF998F5C \n"
 560 "    TST     R0, #1 \n"
 561 "    LDRNE   R2, =0x1EF \n"
 562 "    LDRNE   R1, =0xFFAC1E08 /*'SsStandardCaptureSeq.c'*/ \n"
 563 "    MOVNE   R0, #0 \n"
 564 "    BLNE    _DebugAssert \n"
 565 "    BL      capt_seq_hook_raw_here \n"         // added
 566 
 567 "loc_FFAC1D60:\n"
 568 "    MOV     R0, R4 \n"
 569 "    BL      sub_FFAC197C \n"
 570 "    MOV     R0, R4 \n"
 571 "    BL      sub_FFAC1934 \n"
 572 "    CMP     R6, R8 \n"
 573 "    BEQ     loc_FFAC1DA8 \n"
 574 "    BL      sub_FF9981B4 \n"
 575 "    MOV     R3, #0x1FC \n"
 576 "    STR     R3, [SP] \n"
 577 "    LDR     R2, =0x3A98 \n"
 578 "    LDR     R3, =0xFFAC1E08 /*'SsStandardCaptureSeq.c'*/ \n"
 579 "    MOV     R1, #4 \n"
 580 "    BL      sub_FF8919F0 \n"
 581 "    CMP     R0, #0 \n"
 582 "    MOVNE   R2, #0x1FC \n"
 583 "    LDRNE   R1, =0xFFAC1E08 /*'SsStandardCaptureSeq.c'*/ \n"
 584 "    MOVNE   R0, #0 \n"
 585 "    BLNE    _DebugAssert \n"
 586 
 587 "loc_FFAC1DA8:\n"
 588 "    MOV     R2, R4 \n"
 589 "    MOV     R1, #1 \n"
 590 "    MOV     R0, R5 \n"
 591 "    BL      sub_FF88A048 \n"
 592 "    LDR     R0, [R7, #0x28] \n"
 593 "    CMP     R0, #0 \n"
 594 "    BEQ     loc_FFAC1DDC \n"
 595 "    SUBS    R1, R6, R8 \n"
 596 "    MOVNE   R1, #1 \n"
 597 "    MOV     R2, R5 \n"
 598 "    MOV     R0, R4 \n"
 599 "    BL      sub_FF9986E8 \n"
 600 "    B       loc_FFAC1DF0 \n"
 601 
 602 "loc_FFAC1DDC:\n"
 603 "    SUBS    R1, R6, R8 \n"
 604 "    MOVNE   R1, #1 \n"
 605 "    MOV     R2, R5 \n"
 606 "    MOV     R0, R4 \n"
 607 "    BL      sub_FF99867C \n"
 608 
 609 "loc_FFAC1DF0:\n"
 610 "    MOV     R0, R5 \n"
 611 "    LDMFD   SP!, {R2-R8,PC} \n"
 612 "    .ltorg\n"         // added
 613 );
 614 }
 615 
 616 /*************************************************************/
 617 //** exp_drv_task @ 0xFF8D94A0 - 0xFF8D9B24, length=418
 618 void __attribute__((naked,noinline)) exp_drv_task() {
 619 asm volatile (
 620 "    STMFD   SP!, {R4-R9,LR} \n"
 621 "    SUB     SP, SP, #0x2C \n"
 622 "    LDR     R6, =0x43A8 \n"
 623 "    LDR     R7, =0xBB8 \n"
 624 "    LDR     R4, =0x59AC0 \n"
 625 "    MOV     R0, #0 \n"
 626 "    ADD     R5, SP, #0x1C \n"
 627 "    STR     R0, [SP, #0xC] \n"
 628 
 629 "loc_FF8D94C0:\n"
 630 "    LDR     R0, [R6, #0x20] \n"
 631 "    MOV     R2, #0 \n"
 632 "    ADD     R1, SP, #0x28 \n"
 633 "    BL      sub_006B8458 /*_ReceiveMessageQueue*/ \n"
 634 "    LDR     R0, [SP, #0xC] \n"
 635 "    CMP     R0, #1 \n"
 636 "    BNE     loc_FF8D950C \n"
 637 "    LDR     R0, [SP, #0x28] \n"
 638 "    LDR     R0, [R0] \n"
 639 "    CMP     R0, #0x14 \n"
 640 "    CMPNE   R0, #0x15 \n"
 641 "    CMPNE   R0, #0x16 \n"
 642 "    CMPNE   R0, #0x17 \n"
 643 "    BEQ     loc_FF8D9670 \n"
 644 "    CMP     R0, #0x2A \n"
 645 "    BEQ     loc_FF8D95F4 \n"
 646 "    ADD     R1, SP, #0xC \n"
 647 "    MOV     R0, #0 \n"
 648 "    BL      sub_FF8D9440 \n"
 649 
 650 "loc_FF8D950C:\n"
 651 "    LDR     R0, [SP, #0x28] \n"
 652 "    LDR     R1, [R0] \n"
 653 "    CMP     R1, #0x30 \n"
 654 "    BNE     loc_FF8D9538 \n"
 655 "    BL      sub_FF8DAAEC \n"
 656 "    LDR     R0, [R6, #0x1C] \n"
 657 "    MOV     R1, #1 \n"
 658 "    BL      sub_006B81EC /*_SetEventFlag*/ \n"
 659 "    BL      _ExitTask \n"
 660 "    ADD     SP, SP, #0x2C \n"
 661 "    LDMFD   SP!, {R4-R9,PC} \n"
 662 
 663 "loc_FF8D9538:\n"
 664 "    CMP     R1, #0x2F \n"
 665 "    BNE     loc_FF8D9554 \n"
 666 "    LDR     R2, [R0, #0xA8]! \n"
 667 "    LDR     R1, [R0, #4] \n"
 668 "    MOV     R0, R1 \n"
 669 "    BLX     R2 \n"
 670 "    B       loc_FF8D9B1C \n"
 671 
 672 "loc_FF8D9554:\n"
 673 "    CMP     R1, #0x28 \n"
 674 "    BNE     loc_FF8D95A4 \n"
 675 "    LDR     R0, [R6, #0x1C] \n"
 676 "    MOV     R1, #0x80 \n"
 677 "    BL      sub_006B8234 /*_ClearEventFlag*/ \n"
 678 "    LDR     R0, =0xFF8D487C \n"
 679 "    MOV     R1, #0x80 \n"
 680 "    BL      sub_FF884164 \n"
 681 "    LDR     R0, [R6, #0x1C] \n"
 682 "    MOV     R2, R7 \n"
 683 "    MOV     R1, #0x80 \n"
 684 "    BL      sub_006B8120 /*_WaitForAllEventFlag*/ \n"
 685 "    TST     R0, #1 \n"
 686 "    LDRNE   R2, =0x170B \n"
 687 "    BNE     loc_FF8D9660 \n"
 688 
 689 "loc_FF8D9590:\n"
 690 "    LDR     R1, [SP, #0x28] \n"
 691 "    LDR     R0, [R1, #0xAC] \n"
 692 "    LDR     R1, [R1, #0xA8] \n"
 693 "    BLX     R1 \n"
 694 "    B       loc_FF8D9B1C \n"
 695 
 696 "loc_FF8D95A4:\n"
 697 "    CMP     R1, #0x29 \n"
 698 "    BNE     loc_FF8D95EC \n"
 699 "    ADD     R1, SP, #0xC \n"
 700 "    BL      sub_FF8D9440 \n"
 701 "    LDR     R0, [R6, #0x1C] \n"
 702 "    MOV     R1, #0x100 \n"
 703 "    BL      sub_006B8234 /*_ClearEventFlag*/ \n"
 704 "    LDR     R0, =0xFF8D488C \n"
 705 "    MOV     R1, #0x100 \n"
 706 "    BL      sub_FF884374 \n"
 707 "    LDR     R0, [R6, #0x1C] \n"
 708 "    MOV     R2, R7 \n"
 709 "    MOV     R1, #0x100 \n"
 710 "    BL      sub_006B8120 /*_WaitForAllEventFlag*/ \n"
 711 "    TST     R0, #1 \n"
 712 "    BEQ     loc_FF8D9590 \n"
 713 "    LDR     R2, =0x1715 \n"
 714 "    B       loc_FF8D9660 \n"
 715 
 716 "loc_FF8D95EC:\n"
 717 "    CMP     R1, #0x2A \n"
 718 "    BNE     loc_FF8D9604 \n"
 719 
 720 "loc_FF8D95F4:\n"
 721 "    LDR     R0, [SP, #0x28] \n"
 722 "    ADD     R1, SP, #0xC \n"
 723 "    BL      sub_FF8D9440 \n"
 724 "    B       loc_FF8D9590 \n"
 725 
 726 "loc_FF8D9604:\n"
 727 "    CMP     R1, #0x2D \n"
 728 "    BNE     loc_FF8D961C \n"
 729 "    BL      sub_FF8C2FE4 \n"
 730 "    BL      sub_FF8C3E48 \n"
 731 "    BL      sub_FF8C3928 \n"
 732 "    B       loc_FF8D9590 \n"
 733 
 734 "loc_FF8D961C:\n"
 735 "    CMP     R1, #0x2E \n"
 736 "    BNE     loc_FF8D9670 \n"
 737 "    LDR     R0, [R6, #0x1C] \n"
 738 "    MOV     R1, #4 \n"
 739 "    BL      sub_006B8234 /*_ClearEventFlag*/ \n"
 740 "    LDR     R1, =0xFF8D48AC \n"
 741 "    LDR     R0, =0xFFFFF400 \n"
 742 "    MOV     R2, #4 \n"
 743 "    BL      sub_FF8DAB50 \n"
 744 "    BL      sub_FF8C2C78 \n"
 745 "    LDR     R0, [R6, #0x1C] \n"
 746 "    MOV     R2, R7 \n"
 747 "    MOV     R1, #4 \n"
 748 "    BL      sub_006B8034 /*_WaitForAnyEventFlag*/ \n"
 749 "    TST     R0, #1 \n"
 750 "    BEQ     loc_FF8D9590 \n"
 751 "    LDR     R2, =0x174D \n"
 752 
 753 "loc_FF8D9660:\n"
 754 "    LDR     R1, =0xFF8D5030 /*'ExpDrv.c'*/ \n"
 755 "    MOV     R0, #0 \n"
 756 "    BL      _DebugAssert \n"
 757 "    B       loc_FF8D9590 \n"
 758 
 759 "loc_FF8D9670:\n"
 760 "    LDR     R0, [SP, #0x28] \n"
 761 "    MOV     R8, #1 \n"
 762 "    LDR     R1, [R0] \n"
 763 "    CMP     R1, #0x12 \n"
 764 "    CMPNE   R1, #0x13 \n"
 765 "    BNE     loc_FF8D96D8 \n"
 766 "    LDR     R1, [R0, #0x94] \n"
 767 "    ADD     R1, R1, R1, LSL#1 \n"
 768 "    ADD     R1, R0, R1, LSL#2 \n"
 769 "    SUB     R1, R1, #8 \n"
 770 "    LDMIA   R1, {R2,R3,R9} \n"
 771 "    STMIA   R5, {R2,R3,R9} \n"
 772 "    BL      sub_FF8D78A4 \n"
 773 "    LDR     R0, [SP, #0x28] \n"
 774 "    LDR     R1, [R0, #0x94] \n"
 775 "    LDR     R3, [R0, #0xA8] \n"
 776 "    LDR     R2, [R0, #0xAC] \n"
 777 "    ADD     R0, R0, #4 \n"
 778 "    BLX     R3 \n"
 779 "    LDR     R0, [SP, #0x28] \n"
 780 "    BL      sub_FF8DAE2C \n"
 781 "    LDR     R0, [SP, #0x28] \n"
 782 "    LDR     R1, [R0, #0x94] \n"
 783 "    LDR     R2, [R0, #0xB4] \n"
 784 "    LDR     R3, [R0, #0xB0] \n"
 785 "    B       loc_FF8D99E0 \n"
 786 
 787 "loc_FF8D96D8:\n"
 788 "    CMP     R1, #0x14 \n"
 789 "    CMPNE   R1, #0x15 \n"
 790 "    CMPNE   R1, #0x16 \n"
 791 "    CMPNE   R1, #0x17 \n"
 792 "    BNE     loc_FF8D9780 \n"
 793 "    ADD     R3, SP, #0xC \n"
 794 "    MOV     R2, SP \n"
 795 "    ADD     R1, SP, #0x1C \n"
 796 "    BL      sub_FF8D7B14 \n"
 797 "    CMP     R0, #1 \n"
 798 "    MOV     R9, R0 \n"
 799 "    CMPNE   R9, #5 \n"
 800 "    BNE     loc_FF8D972C \n"
 801 "    LDR     R0, [SP, #0x28] \n"
 802 "    MOV     R2, R9 \n"
 803 "    LDR     R1, [R0, #0x94] \n"
 804 "    LDR     R12, [R0, #0xA8] \n"
 805 "    LDR     R3, [R0, #0xAC] \n"
 806 "    ADD     R0, R0, #4 \n"
 807 "    BLX     R12 \n"
 808 "    B       loc_FF8D9764 \n"
 809 
 810 "loc_FF8D972C:\n"
 811 "    LDR     R0, [SP, #0x28] \n"
 812 "    CMP     R9, #2 \n"
 813 "    LDR     R1, [R0, #0x94] \n"
 814 "    LDR     R12, [R0, #0xA8] \n"
 815 "    LDR     R3, [R0, #0xAC] \n"
 816 "    CMPNE   R9, #6 \n"
 817 "    MOV     R2, R9 \n"
 818 "    ADD     R0, R0, #4 \n"
 819 "    BNE     loc_FF8D9778 \n"
 820 "    BLX     R12 \n"
 821 "    LDR     R0, [SP, #0x28] \n"
 822 "    MOV     R2, SP \n"
 823 "    ADD     R1, SP, #0x1C \n"
 824 "    BL      sub_FF8D9158 \n"
 825 
 826 "loc_FF8D9764:\n"
 827 "    LDR     R0, [SP, #0x28] \n"
 828 "    LDR     R2, [SP, #0xC] \n"
 829 "    MOV     R1, R9 \n"
 830 "    BL      sub_FF8D93D8 \n"
 831 "    B       loc_FF8D99E8 \n"
 832 
 833 "loc_FF8D9778:\n"
 834 "    BLX     R12 \n"
 835 "    B       loc_FF8D99E8 \n"
 836 
 837 "loc_FF8D9780:\n"
 838 "    CMP     R1, #0x24 \n"
 839 "    CMPNE   R1, #0x25 \n"
 840 "    BNE     loc_FF8D97CC \n"
 841 "    LDR     R1, [R0, #0x94] \n"
 842 "    ADD     R1, R1, R1, LSL#1 \n"
 843 "    ADD     R1, R0, R1, LSL#2 \n"
 844 "    SUB     R1, R1, #8 \n"
 845 "    LDMIA   R1, {R2,R3,R9} \n"
 846 "    STMIA   R5, {R2,R3,R9} \n"
 847 "    BL      sub_FF8D67C0 \n"
 848 "    LDR     R0, [SP, #0x28] \n"
 849 "    LDR     R1, [R0, #0x94] \n"
 850 "    LDR     R3, [R0, #0xA8] \n"
 851 "    LDR     R2, [R0, #0xAC] \n"
 852 "    ADD     R0, R0, #4 \n"
 853 "    BLX     R3 \n"
 854 "    LDR     R0, [SP, #0x28] \n"
 855 "    BL      sub_FF8D6C10 \n"
 856 "    B       loc_FF8D99E8 \n"
 857 
 858 "loc_FF8D97CC:\n"
 859 "    ADD     R1, R0, #4 \n"
 860 "    LDMIA   R1, {R2,R3,R9} \n"
 861 "    STMIA   R5, {R2,R3,R9} \n"
 862 "    LDR     R1, [R0] \n"
 863 "    CMP     R1, #0x28 \n"
 864 "    ADDCC   PC, PC, R1, LSL#2 \n"
 865 "    B       loc_FF8D99D0 \n"
 866 "    B       loc_FF8D9888 \n"
 867 "    B       loc_FF8D9888 \n"
 868 "    B       loc_FF8D9890 \n"
 869 "    B       loc_FF8D9898 \n"
 870 "    B       loc_FF8D9898 \n"
 871 "    B       loc_FF8D9898 \n"
 872 "    B       loc_FF8D9888 \n"
 873 "    B       loc_FF8D9890 \n"
 874 "    B       loc_FF8D9898 \n"
 875 "    B       loc_FF8D9898 \n"
 876 "    B       loc_FF8D98B0 \n"
 877 "    B       loc_FF8D98B0 \n"
 878 "    B       loc_FF8D99BC \n"
 879 "    B       loc_FF8D99C4 \n"
 880 "    B       loc_FF8D99C4 \n"
 881 "    B       loc_FF8D99C4 \n"
 882 "    B       loc_FF8D99C4 \n"
 883 "    B       loc_FF8D99CC \n"
 884 "    B       loc_FF8D99D0 \n"
 885 "    B       loc_FF8D99D0 \n"
 886 "    B       loc_FF8D99D0 \n"
 887 "    B       loc_FF8D99D0 \n"
 888 "    B       loc_FF8D99D0 \n"
 889 "    B       loc_FF8D99D0 \n"
 890 "    B       loc_FF8D98A0 \n"
 891 "    B       loc_FF8D98A8 \n"
 892 "    B       loc_FF8D98A8 \n"
 893 "    B       loc_FF8D98A8 \n"
 894 "    B       loc_FF8D98BC \n"
 895 "    B       loc_FF8D98BC \n"
 896 "    B       loc_FF8D98C4 \n"
 897 "    B       loc_FF8D98FC \n"
 898 "    B       loc_FF8D9934 \n"
 899 "    B       loc_FF8D996C \n"
 900 "    B       loc_FF8D99A4 \n"
 901 "    B       loc_FF8D99A4 \n"
 902 "    B       loc_FF8D99D0 \n"
 903 "    B       loc_FF8D99D0 \n"
 904 "    B       loc_FF8D99AC \n"
 905 "    B       loc_FF8D99B4 \n"
 906 
 907 "loc_FF8D9888:\n"
 908 "    BL      sub_FF8D4EB0 \n"
 909 "    B       loc_FF8D99D0 \n"
 910 
 911 "loc_FF8D9890:\n"
 912 "    BL      sub_FF8D5180 \n"
 913 "    B       loc_FF8D99D0 \n"
 914 
 915 "loc_FF8D9898:\n"
 916 "    BL      sub_FF8D53C0 \n"
 917 "    B       loc_FF8D99D0 \n"
 918 
 919 "loc_FF8D98A0:\n"
 920 "    BL      sub_FF8D5708 \n"
 921 "    B       loc_FF8D99D0 \n"
 922 
 923 "loc_FF8D98A8:\n"
 924 "    BL      sub_FF8D5938 \n"
 925 "    B       loc_FF8D99D0 \n"
 926 
 927 "loc_FF8D98B0:\n"
 928 "    BL      sub_FF8D5D28_my \n"  // --> Patched. Old value = 0xFF8D5D28.
 929 "    MOV     R8, #0 \n"
 930 "    B       loc_FF8D99D0 \n"
 931 
 932 "loc_FF8D98BC:\n"
 933 "    BL      sub_FF8D5F04 \n"
 934 "    B       loc_FF8D99D0 \n"
 935 
 936 "loc_FF8D98C4:\n"
 937 "    LDRH    R1, [R0, #4] \n"
 938 "    STRH    R1, [SP, #0x1C] \n"
 939 "    LDRH    R1, [R4, #2] \n"
 940 "    STRH    R1, [SP, #0x1E] \n"
 941 "    LDRH    R1, [R4, #4] \n"
 942 "    STRH    R1, [SP, #0x20] \n"
 943 "    LDRH    R1, [R4, #6] \n"
 944 "    STRH    R1, [SP, #0x22] \n"
 945 "    LDRH    R1, [R0, #0xC] \n"
 946 "    STRH    R1, [SP, #0x24] \n"
 947 "    LDRH    R1, [R4, #0xA] \n"
 948 "    STRH    R1, [SP, #0x26] \n"
 949 "    BL      sub_FF8D6448 \n"
 950 "    B       loc_FF8D99D0 \n"
 951 
 952 "loc_FF8D98FC:\n"
 953 "    LDRH    R1, [R0, #4] \n"
 954 "    STRH    R1, [SP, #0x1C] \n"
 955 "    LDRH    R1, [R4, #2] \n"
 956 "    STRH    R1, [SP, #0x1E] \n"
 957 "    LDRH    R1, [R4, #4] \n"
 958 "    STRH    R1, [SP, #0x20] \n"
 959 "    LDRH    R1, [R4, #6] \n"
 960 "    STRH    R1, [SP, #0x22] \n"
 961 "    LDRH    R1, [R4, #8] \n"
 962 "    STRH    R1, [SP, #0x24] \n"
 963 "    LDRH    R1, [R4, #0xA] \n"
 964 "    STRH    R1, [SP, #0x26] \n"
 965 "    BL      sub_FF8DAB9C \n"
 966 "    B       loc_FF8D99D0 \n"
 967 
 968 "loc_FF8D9934:\n"
 969 "    LDRH    R1, [R4] \n"
 970 "    STRH    R1, [SP, #0x1C] \n"
 971 "    LDRH    R1, [R0, #6] \n"
 972 "    STRH    R1, [SP, #0x1E] \n"
 973 "    LDRH    R1, [R4, #4] \n"
 974 "    STRH    R1, [SP, #0x20] \n"
 975 "    LDRH    R1, [R4, #6] \n"
 976 "    STRH    R1, [SP, #0x22] \n"
 977 "    LDRH    R1, [R4, #8] \n"
 978 "    STRH    R1, [SP, #0x24] \n"
 979 "    LDRH    R1, [R4, #0xA] \n"
 980 "    STRH    R1, [SP, #0x26] \n"
 981 "    BL      sub_FF8DACD8 \n"
 982 "    B       loc_FF8D99D0 \n"
 983 
 984 "loc_FF8D996C:\n"
 985 "    LDRH    R1, [R4] \n"
 986 "    STRH    R1, [SP, #0x1C] \n"
 987 "    LDRH    R1, [R4, #2] \n"
 988 "    STRH    R1, [SP, #0x1E] \n"
 989 "    LDRH    R1, [R4, #4] \n"
 990 "    STRH    R1, [SP, #0x20] \n"
 991 "    LDRH    R1, [R4, #6] \n"
 992 "    STRH    R1, [SP, #0x22] \n"
 993 "    LDRH    R1, [R0, #0xC] \n"
 994 "    STRH    R1, [SP, #0x24] \n"
 995 "    LDRH    R1, [R4, #0xA] \n"
 996 "    STRH    R1, [SP, #0x26] \n"
 997 "    BL      sub_FF8DAD84 \n"
 998 "    B       loc_FF8D99D0 \n"
 999 
1000 "loc_FF8D99A4:\n"
1001 "    BL      sub_FF8D655C \n"
1002 "    B       loc_FF8D99D0 \n"
1003 
1004 "loc_FF8D99AC:\n"
1005 "    BL      sub_FF8D6D28 \n"
1006 "    B       loc_FF8D99D0 \n"
1007 
1008 "loc_FF8D99B4:\n"
1009 "    BL      sub_FF8D70D0 \n"
1010 "    B       loc_FF8D99D0 \n"
1011 
1012 "loc_FF8D99BC:\n"
1013 "    BL      sub_FF8D7340 \n"
1014 "    B       loc_FF8D99D0 \n"
1015 
1016 "loc_FF8D99C4:\n"
1017 "    BL      sub_FF8D750C \n"
1018 "    B       loc_FF8D99D0 \n"
1019 
1020 "loc_FF8D99CC:\n"
1021 "    BL      sub_FF8D7684 \n"
1022 
1023 "loc_FF8D99D0:\n"
1024 "    LDR     R0, [SP, #0x28] \n"
1025 "    LDR     R1, [R0, #0x94] \n"
1026 "    LDR     R2, [R0, #0xAC] \n"
1027 "    LDR     R3, [R0, #0xA8] \n"
1028 
1029 "loc_FF8D99E0:\n"
1030 "    ADD     R0, R0, #4 \n"
1031 "    BLX     R3 \n"
1032 
1033 "loc_FF8D99E8:\n"
1034 "    LDR     R0, [SP, #0x28] \n"
1035 "    LDR     R0, [R0] \n"
1036 "    CMP     R0, #0x10 \n"
1037 "    BEQ     loc_FF8D9A20 \n"
1038 "    BGT     loc_FF8D9A10 \n"
1039 "    CMP     R0, #1 \n"
1040 "    CMPNE   R0, #4 \n"
1041 "    CMPNE   R0, #0xE \n"
1042 "    BNE     loc_FF8D9A54 \n"
1043 "    B       loc_FF8D9A20 \n"
1044 
1045 "loc_FF8D9A10:\n"
1046 "    CMP     R0, #0x13 \n"
1047 "    CMPNE   R0, #0x17 \n"
1048 "    CMPNE   R0, #0x1A \n"
1049 "    BNE     loc_FF8D9A54 \n"
1050 
1051 "loc_FF8D9A20:\n"
1052 "    LDRSH   R0, [R4] \n"
1053 "    CMN     R0, #0xC00 \n"
1054 "    LDRNESH R1, [R4, #8] \n"
1055 "    CMNNE   R1, #0xC00 \n"
1056 "    STRNEH  R0, [SP, #0x1C] \n"
1057 "    STRNEH  R1, [SP, #0x24] \n"
1058 "    BNE     loc_FF8D9A54 \n"
1059 "    ADD     R0, SP, #0x10 \n"
1060 "    BL      sub_FF8DB050 /*_get_current_exp*/ \n"
1061 "    LDRH    R0, [SP, #0x10] \n"
1062 "    STRH    R0, [SP, #0x1C] \n"
1063 "    LDRH    R0, [SP, #0x18] \n"
1064 "    STRH    R0, [SP, #0x24] \n"
1065 
1066 "loc_FF8D9A54:\n"
1067 "    LDR     R0, [SP, #0x28] \n"
1068 "    CMP     R8, #1 \n"
1069 "    BNE     loc_FF8D9AA4 \n"
1070 "    LDR     R1, [R0, #0x94] \n"
1071 "    MOV     R2, #0xC \n"
1072 "    ADD     R1, R1, R1, LSL#1 \n"
1073 "    ADD     R0, R0, R1, LSL#2 \n"
1074 "    SUB     R8, R0, #8 \n"
1075 "    LDR     R0, =0x59AC0 \n"
1076 "    ADD     R1, SP, #0x1C \n"
1077 "    BL      sub_006BCD9C \n"
1078 "    LDR     R0, =0x59ACC \n"
1079 "    MOV     R2, #0xC \n"
1080 "    ADD     R1, SP, #0x1C \n"
1081 "    BL      sub_006BCD9C \n"
1082 "    LDR     R0, =0x59AD8 \n"
1083 "    MOV     R2, #0xC \n"
1084 "    MOV     R1, R8 \n"
1085 "    BL      sub_006BCD9C \n"
1086 "    B       loc_FF8D9B1C \n"
1087 
1088 "loc_FF8D9AA4:\n"
1089 "    LDR     R0, [R0] \n"
1090 "    MOV     R3, #1 \n"
1091 "    CMP     R0, #0xB \n"
1092 "    BNE     loc_FF8D9AE8 \n"
1093 "    MOV     R2, #0 \n"
1094 "    STRD    R2, [SP] \n"
1095 "    MOV     R2, R3 \n"
1096 "    MOV     R1, R3 \n"
1097 "    MOV     R0, #0 \n"
1098 "    BL      sub_FF8D4C7C \n"
1099 "    MOV     R3, #1 \n"
1100 "    MOV     R2, #0 \n"
1101 "    STRD    R2, [SP] \n"
1102 "    MOV     R2, R3 \n"
1103 "    MOV     R1, R3 \n"
1104 "    MOV     R0, #0 \n"
1105 "    B       loc_FF8D9B18 \n"
1106 
1107 "loc_FF8D9AE8:\n"
1108 "    MOV     R2, #1 \n"
1109 "    STRD    R2, [SP] \n"
1110 "    MOV     R3, R2 \n"
1111 "    MOV     R1, R2 \n"
1112 "    MOV     R0, R2 \n"
1113 "    BL      sub_FF8D4C7C \n"
1114 "    MOV     R3, #1 \n"
1115 "    MOV     R2, R3 \n"
1116 "    MOV     R1, R3 \n"
1117 "    MOV     R0, R3 \n"
1118 "    STR     R3, [SP] \n"
1119 "    STR     R3, [SP, #4] \n"
1120 
1121 "loc_FF8D9B18:\n"
1122 "    BL      sub_FF8D4DF8 \n"
1123 
1124 "loc_FF8D9B1C:\n"
1125 "    LDR     R0, [SP, #0x28] \n"
1126 "    BL      sub_FF8DAAEC \n"
1127 "    B       loc_FF8D94C0 \n"
1128 );
1129 }
1130 
1131 /*************************************************************/
1132 //** sub_FF8D5D28_my @ 0xFF8D5D28 - 0xFF8D5DEC, length=50
1133 void __attribute__((naked,noinline)) sub_FF8D5D28_my() {
1134 asm volatile (
1135 "    STMFD   SP!, {R4-R8,LR} \n"
1136 "    LDR     R7, =0x43A8 \n"
1137 "    MOV     R4, R0 \n"
1138 "    LDR     R0, [R7, #0x1C] \n"
1139 "    MOV     R1, #0x3E \n"
1140 "    BL      sub_006B8234 /*_ClearEventFlag*/ \n"
1141 "    MOV     R2, #0 \n"
1142 "    LDRSH   R0, [R4, #4] \n"
1143 "    MOV     R3, #1 \n"
1144 "    MOV     R1, R2 \n"
1145 "    BL      sub_FF8D4914 \n"
1146 "    MOV     R6, R0 \n"
1147 "    LDRSH   R0, [R4, #6] \n"
1148 "    BL      sub_FF8D4ADC \n"
1149 "    LDRSH   R0, [R4, #8] \n"
1150 "    BL      sub_FF8D4B34 \n"
1151 "    LDRSH   R0, [R4, #0xA] \n"
1152 "    BL      sub_FF8D4B8C \n"
1153 "    LDRSH   R0, [R4, #0xC] \n"
1154 "    MOV     R1, #0 \n"
1155 "    BL      sub_FF8D4BE4 \n"
1156 "    MOV     R5, R0 \n"
1157 "    LDR     R0, [R4] \n"
1158 "    LDR     R8, =0x59AD8 \n"
1159 "    CMP     R0, #0xB \n"
1160 "    MOVEQ   R6, #0 \n"
1161 "    MOVEQ   R5, R6 \n"
1162 "    BEQ     loc_FF8D5DC0 \n"
1163 "    CMP     R6, #1 \n"
1164 "    BNE     loc_FF8D5DC0 \n"
1165 "    LDRSH   R0, [R4, #4] \n"
1166 "    LDR     R1, =0xFF8D486C \n"
1167 "    MOV     R2, #2 \n"
1168 "    BL      sub_FF8841EC \n"
1169 "    STRH    R0, [R4, #4] \n"
1170 "    MOV     R0, #0 \n"
1171 "    STR     R0, [R7, #0x28] \n"
1172 "    B       loc_FF8D5DC8 \n"
1173 
1174 "loc_FF8D5DC0:\n"
1175 "    LDRH    R0, [R8] \n"
1176 "    STRH    R0, [R4, #4] \n"
1177 
1178 "loc_FF8D5DC8:\n"
1179 "    CMP     R5, #1 \n"
1180 "    LDRNEH  R0, [R8, #8] \n"
1181 "    BNE     loc_FF8D5DE4 \n"
1182 "    LDRSH   R0, [R4, #0xC] \n"
1183 "    LDR     R1, =0xFF8D48F0 \n"
1184 "    MOV     R2, #0x20 \n"
1185 "    BL      sub_FF8DAB58 \n"
1186 
1187 "loc_FF8D5DE4:\n"
1188 "    STRH    R0, [R4, #0xC] \n"
1189 "    LDRSH   R0, [R4, #6] \n"
1190 "    BL      sub_FF8C2CF0_my \n"  // --> Patched. Old value = 0xFF8C2CF0.
1191 "    LDR     PC, =0xFF8D5DF0 \n"  // Continue in firmware
1192 );
1193 }
1194 
1195 /*************************************************************/
1196 //** sub_FF8C2CF0_my @ 0xFF8C2CF0 - 0xFF8C2D64, length=30
1197 void __attribute__((naked,noinline)) sub_FF8C2CF0_my() {
1198 asm volatile (
1199 "    STMFD   SP!, {R4-R6,LR} \n"
1200 "    LDR     R5, =0x3FFC \n"
1201 "    MOV     R4, R0 \n"
1202 "    LDR     R0, [R5, #4] \n"
1203 "    CMP     R0, #1 \n"
1204 "    MOVNE   R2, #0x168 \n"
1205 "    LDRNE   R1, =0xFF8C2AA0 /*'Shutter.c'*/ \n"
1206 "    MOVNE   R0, #0 \n"
1207 "    BLNE    _DebugAssert \n"
1208 "    CMN     R4, #0xC00 \n"
1209 "    LDREQSH R4, [R5, #2] \n"
1210 "    CMN     R4, #0xC00 \n"
1211 "    LDREQ   R2, =0x16E \n"
1212 "    LDREQ   R1, =0xFF8C2AA0 /*'Shutter.c'*/ \n"
1213 "    MOVEQ   R0, #0 \n"
1214 "    STRH    R4, [R5, #2] \n"
1215 "    BLEQ    _DebugAssert \n"
1216 "    MOV     R0, R4 \n"
1217 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
1218 "    MOV     R4, R0 \n"
1219 //"  BL      _sub_FF919240 \n"  // --> Nullsub call removed.
1220 "    MOV     R0, R4 \n"
1221 "    BL      sub_FF91C31C \n"
1222 "    TST     R0, #1 \n"
1223 "    LDMEQFD SP!, {R4-R6,PC} \n"
1224 "    LDMFD   SP!, {R4-R6,LR} \n"
1225 "    LDR     R2, =0x173 \n"
1226 "    LDR     R1, =0xFF8C2AA0 /*'Shutter.c'*/ \n"
1227 "    MOV     R0, #0 \n"
1228 "    B       _DebugAssert \n"
1229 );
1230 }

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