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

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF996950_my
  3. sub_FF996844_my
  4. sub_FFAC0FC0_my
  5. exp_drv_task
  6. sub_FF8D5A14_my
  7. sub_FF8C2DFC_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 NR_AUTO (0)                 // have to explictly reset value back to 0 to enable auto
   9 static long *nrflag = (long*)(0xa324); // found near 0xffa2316c (0a320 + 4)
  10 //#define PAUSE_FOR_FILE_COUNTER 200  // 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 @ 0xFF88C07C - 0xFF88C354, length=183
  16 void __attribute__((naked,noinline)) capt_seq_task() {
  17 asm volatile (
  18 "    STMFD   SP!, {R3-R7,LR} \n"
  19 "    LDR     R5, =0x1CCF0 \n"
  20 "    LDR     R7, =0x3534 \n"
  21 "    MOV     R6, #0 \n"
  22 
  23 "loc_FF88C08C:\n"
  24 "    LDR     R0, [R7, #4] \n"
  25 "    MOV     R2, #0 \n"
  26 "    MOV     R1, SP \n"
  27 "    BL      sub_006B8458 /*_ReceiveMessageQueue*/ \n"
  28 "    TST     R0, #1 \n"
  29 "    BEQ     loc_FF88C0BC \n"
  30 "    LDR     R2, =0x429 \n"
  31 "    LDR     R1, =0xFF88B9F8 /*'SsShootTask.c'*/ \n"
  32 "    MOV     R0, #0 \n"
  33 "    BL      _DebugAssert \n"
  34 "    BL      _ExitTask \n"
  35 "    LDMFD   SP!, {R3-R7,PC} \n"
  36 
  37 "loc_FF88C0BC:\n"
  38 "    LDR     R0, [SP] \n"
  39 "    LDR     R0, [R0] \n"
  40 "    CMP     R0, #1 \n"
  41 "    CMPNE   R0, #0x23 \n"
  42 "    CMPNE   R0, #0x19 \n"
  43 "    BLNE    sub_FF997D40 \n"
  44 "    LDR     R0, [SP] \n"
  45 "    LDR     R1, [R0] \n"
  46 "    CMP     R1, #0x25 \n"
  47 "    ADDCC   PC, PC, R1, LSL#2 \n"
  48 "    B       loc_FF88C318 \n"
  49 "    B       loc_FF88C17C \n"
  50 "    B       loc_FF88C194 \n"
  51 "    B       loc_FF88C1A0 \n"
  52 "    B       loc_FF88C1B4 \n"
  53 "    B       loc_FF88C1AC \n"
  54 "    B       loc_FF88C1C0 \n"
  55 "    B       loc_FF88C1C8 \n"
  56 "    B       loc_FF88C1D0 \n"
  57 "    B       loc_FF88C1DC \n"
  58 "    B       loc_FF88C208 \n"
  59 "    B       loc_FF88C1E8 \n"
  60 "    B       loc_FF88C1F4 \n"
  61 "    B       loc_FF88C1FC \n"
  62 "    B       loc_FF88C210 \n"
  63 "    B       loc_FF88C218 \n"
  64 "    B       loc_FF88C220 \n"
  65 "    B       loc_FF88C228 \n"
  66 "    B       loc_FF88C230 \n"
  67 "    B       loc_FF88C23C \n"
  68 "    B       loc_FF88C244 \n"
  69 "    B       loc_FF88C24C \n"
  70 "    B       loc_FF88C254 \n"
  71 "    B       loc_FF88C25C \n"
  72 "    B       loc_FF88C264 \n"
  73 "    B       loc_FF88C26C \n"
  74 "    B       loc_FF88C274 \n"
  75 "    B       loc_FF88C280 \n"
  76 "    B       loc_FF88C288 \n"
  77 "    B       loc_FF88C290 \n"
  78 "    B       loc_FF88C298 \n"
  79 "    B       loc_FF88C2A0 \n"
  80 "    B       loc_FF88C2AC \n"
  81 "    B       loc_FF88C2B4 \n"
  82 "    B       loc_FF88C2C0 \n"
  83 "    B       loc_FF88C2F8 \n"
  84 "    B       loc_FF88C304 \n"
  85 "    B       loc_FF88C328 \n"
  86 
  87 "loc_FF88C17C:\n"
  88 "    BL      sub_FF88C8A0 \n"
  89 "    BL      shooting_expo_param_override\n"    // added
  90 "    BL      sub_FF889644 \n"
  91 // try avoid intermittetant override failues on quick press, not needed?
  92 //"    MOV     R0, #0\n"                          // added
  93 //"    STR     R0, [R5,#0x28]\n"                  // added
  94 "    LDR     R0, [R5, #0x28] \n"
  95 "    CMP     R0, #0 \n"
  96 "    BLNE    sub_FF996950_my \n"  // --> Patched. Old value = 0xFF996950.
  97 "    B       loc_FF88C328 \n"
  98 
  99 "loc_FF88C194:\n"
 100 "    LDR     R0, [R0, #0x10] \n"
 101 "    BL      sub_FF996844_my \n"  // --> Patched. Old value = 0xFF996844.
 102 "    B       loc_FF88C328 \n"
 103 
 104 "loc_FF88C1A0:\n"
 105 "    MOV     R0, #1 \n"
 106 "    BL      sub_FF88CBFC \n"
 107 "    B       loc_FF88C328 \n"
 108 
 109 "loc_FF88C1AC:\n"
 110 "    BL      sub_FF88C508 \n"
 111 "    B       loc_FF88C1B8 \n"
 112 
 113 "loc_FF88C1B4:\n"
 114 "    BL      sub_FF88C87C \n"
 115 
 116 "loc_FF88C1B8:\n"
 117 "    STR     R6, [R5, #0x28] \n"
 118 "    B       loc_FF88C328 \n"
 119 
 120 "loc_FF88C1C0:\n"
 121 "    BL      sub_FF88C884 \n"
 122 "    B       loc_FF88C328 \n"
 123 
 124 "loc_FF88C1C8:\n"
 125 "    BL      sub_FF88CAC0 \n"
 126 "    B       loc_FF88C1E0 \n"
 127 
 128 "loc_FF88C1D0:\n"
 129 "    LDR     R0, [R0, #0x10] \n"
 130 "    BL      sub_FF9969EC \n"
 131 "    B       loc_FF88C328 \n"
 132 
 133 "loc_FF88C1DC:\n"
 134 "    BL      sub_FF88CB54 \n"
 135 
 136 "loc_FF88C1E0:\n"
 137 "    BL      sub_FF889644 \n"
 138 "    B       loc_FF88C328 \n"
 139 
 140 "loc_FF88C1E8:\n"
 141 "    LDR     R0, [R5, #0x50] \n"
 142 "    BL      sub_FF88D200 \n"
 143 "    B       loc_FF88C328 \n"
 144 
 145 "loc_FF88C1F4:\n"
 146 "    BL      sub_FF88D650 \n"
 147 "    B       loc_FF88C328 \n"
 148 
 149 "loc_FF88C1FC:\n"
 150 "    LDR     R0, [R0, #0xC] \n"
 151 "    BL      sub_FF88D6B8 \n"
 152 "    B       loc_FF88C328 \n"
 153 
 154 "loc_FF88C208:\n"
 155 "    BL      sub_FF88C87C \n"
 156 "    B       loc_FF88C328 \n"
 157 
 158 "loc_FF88C210:\n"
 159 "    BL      sub_FF995D40 \n"
 160 "    B       loc_FF88C328 \n"
 161 
 162 "loc_FF88C218:\n"
 163 "    BL      sub_FF995F7C \n"
 164 "    B       loc_FF88C328 \n"
 165 
 166 "loc_FF88C220:\n"
 167 "    BL      sub_FF996038 \n"
 168 "    B       loc_FF88C328 \n"
 169 
 170 "loc_FF88C228:\n"
 171 "    BL      sub_FF996110 \n"
 172 "    B       loc_FF88C328 \n"
 173 
 174 "loc_FF88C230:\n"
 175 "    MOV     R0, #0 \n"
 176 "    BL      sub_FF996378 \n"
 177 "    B       loc_FF88C328 \n"
 178 
 179 "loc_FF88C23C:\n"
 180 "    BL      sub_FF9964D8 \n"
 181 "    B       loc_FF88C328 \n"
 182 
 183 "loc_FF88C244:\n"
 184 "    BL      sub_FF893144 \n"
 185 "    B       loc_FF88C328 \n"
 186 
 187 "loc_FF88C24C:\n"
 188 "    BL      sub_FF893150 \n"
 189 "    B       loc_FF88C328 \n"
 190 
 191 "loc_FF88C254:\n"
 192 "    BL      sub_FF996574 \n"
 193 "    B       loc_FF88C328 \n"
 194 
 195 "loc_FF88C25C:\n"
 196 "    BL      sub_FF996620 \n"
 197 "    B       loc_FF88C328 \n"
 198 
 199 "loc_FF88C264:\n"
 200 "    BL      sub_FF88CD64 \n"
 201 "    B       loc_FF88C328 \n"
 202 
 203 "loc_FF88C26C:\n"
 204 "    MOV     R0, #0 \n"
 205 "    B       loc_FF88C278 \n"
 206 
 207 "loc_FF88C274:\n"
 208 "    LDR     R0, [R0, #0xC] \n"
 209 
 210 "loc_FF88C278:\n"
 211 "    BL      sub_FF88CDF0 \n"
 212 "    B       loc_FF88C328 \n"
 213 
 214 "loc_FF88C280:\n"
 215 "    BL      sub_FF9961E0 \n"
 216 "    B       loc_FF88C328 \n"
 217 
 218 "loc_FF88C288:\n"
 219 "    BL      sub_FF996220 \n"
 220 "    B       loc_FF88C328 \n"
 221 
 222 "loc_FF88C290:\n"
 223 "    BL      sub_FF88FBE8 \n"
 224 "    B       loc_FF88C328 \n"
 225 
 226 "loc_FF88C298:\n"
 227 "    BL      sub_FF88FCD8 \n"
 228 "    B       loc_FF88C328 \n"
 229 
 230 "loc_FF88C2A0:\n"
 231 "    LDR     R0, [R0, #0xC] \n"
 232 "    BL      sub_FF996730 \n"
 233 "    B       loc_FF88C328 \n"
 234 
 235 "loc_FF88C2AC:\n"
 236 "    BL      sub_FF9967B8 \n"
 237 "    B       loc_FF88C328 \n"
 238 
 239 "loc_FF88C2B4:\n"
 240 "    BL      sub_FF88FE64 \n"
 241 "    BL      sub_FF88FD30 \n"
 242 "    B       loc_FF88C328 \n"
 243 
 244 "loc_FF88C2C0:\n"
 245 "    MOV     R0, #1 \n"
 246 "    BL      sub_FF997240 \n"
 247 "    MOV     R0, #1 \n"
 248 "    BL      sub_FF99736C \n"
 249 "    LDR     R0, =0x1CDF0 \n"
 250 "    LDRH    R0, [R0, #0x90] \n"
 251 "    CMP     R0, #4 \n"
 252 "    LDRNEH  R0, [R5] \n"
 253 "    SUBNE   R1, R0, #0x8200 \n"
 254 "    SUBNES  R1, R1, #0x31 \n"
 255 "    BNE     loc_FF88C328 \n"
 256 "    BL      sub_FF88FCD8 \n"
 257 "    BL      sub_FF8901FC \n"
 258 "    B       loc_FF88C328 \n"
 259 
 260 "loc_FF88C2F8:\n"
 261 "    MOV     R2, #0 \n"
 262 "    MOV     R1, #0x10 \n"
 263 "    B       loc_FF88C30C \n"
 264 
 265 "loc_FF88C304:\n"
 266 "    MOV     R2, #0 \n"
 267 "    MOV     R1, #0xF \n"
 268 
 269 "loc_FF88C30C:\n"
 270 "    MOV     R0, #0 \n"
 271 "    BL      sub_FF88A118 \n"
 272 "    B       loc_FF88C328 \n"
 273 
 274 "loc_FF88C318:\n"
 275 "    LDR     R2, =0x54D \n"
 276 "    LDR     R1, =0xFF88B9F8 /*'SsShootTask.c'*/ \n"
 277 "    MOV     R0, #0 \n"
 278 "    BL      _DebugAssert \n"
 279 
 280 "loc_FF88C328:\n"
 281 "    LDR     R0, [SP] \n"
 282 "    LDR     R1, [R0, #4] \n"
 283 "    LDR     R0, [R7] \n"
 284 "    BL      sub_006B81EC /*_SetEventFlag*/ \n"
 285 "    LDR     R4, [SP] \n"
 286 "    LDR     R0, [R4, #8] \n"
 287 "    CMP     R0, #0 \n"
 288 "    LDREQ   R2, =0x11E \n"
 289 "    LDREQ   R1, =0xFF88B9F8 /*'SsShootTask.c'*/ \n"
 290 "    BLEQ    _DebugAssert \n"
 291 "    STR     R6, [R4, #8] \n"
 292 "    B       loc_FF88C08C \n"
 293 );
 294 }
 295 
 296 /*************************************************************/
 297 //** sub_FF996950_my @ 0xFF996950 - 0xFF9969E8, length=39
 298 void __attribute__((naked,noinline)) sub_FF996950_my() {
 299 asm volatile (
 300 "    STMFD   SP!, {R4-R6,LR} \n"
 301 "    BL      sub_FF88B5E0 \n"
 302 "    MOV     R4, R0 \n"
 303 "    MOV     R0, #0xC \n"
 304 "    BL      sub_FF891824 \n"
 305 "    LDR     R6, =0x7488 \n"
 306 "    TST     R0, #1 \n"
 307 "    MOV     R5, #1 \n"
 308 "    BNE     loc_FF9969E4 \n"
 309 "    BL      sub_FF891880 \n"
 310 "    TST     R0, #1 \n"
 311 "    BNE     loc_FF9969E4 \n"
 312 "    BL      sub_FF88C88C \n"
 313 "    BL      sub_FF88D9FC \n"
 314 "    MOV     R1, R4 \n"
 315 "    BL      sub_FF88DA58 \n"
 316 "    LDR     R0, =0x10E \n"
 317 "    MOV     R2, #4 \n"
 318 "    ADD     R1, R4, #0x30 \n"
 319 "    BL      _SetPropertyCase \n"
 320 "    MOV     R2, #4 \n"
 321 "    ADD     R1, R4, #0x34 \n"
 322 "    MOV     R0, #0x2C \n"
 323 "    BL      _SetPropertyCase \n"
 324 "    MOV     R2, #4 \n"
 325 "    ADD     R1, R4, #8 \n"
 326 "    MOV     R0, #0x3F \n"
 327 "    BL      _SetPropertyCase \n"
 328 "    BL      sub_FF99752C \n"
 329 "    MVN     R1, #0x1000 \n"
 330 "    BL      sub_006B8234 /*_ClearEventFlag*/ \n"
 331 "    MOV     R0, R4 \n"
 332 "    BL      sub_FFAC0C40 \n"
 333 "    MOV     R0, R4 \n"
 334 "    BL      sub_FFAC0FC0_my \n"  // --> Patched. Old value = 0xFFAC0FC0.
 335 "    TST     R0, #1 \n"
 336 "    LDMEQFD SP!, {R4-R6,PC} \n"
 337 
 338 "loc_FF9969E4:\n"
 339 "    STR     R5, [R6] \n"
 340 "    LDMFD   SP!, {R4-R6,PC} \n"
 341 );
 342 }
 343 
 344 /*************************************************************/
 345 //** sub_FF996844_my @ 0xFF996844 - 0xFF996920, length=56
 346 void __attribute__((naked,noinline)) sub_FF996844_my() {
 347 asm volatile (
 348 "    STMFD   SP!, {R4-R6,LR} \n"
 349 "    LDR     R6, =0x1CCF0 \n"
 350 "    MOV     R5, R0 \n"
 351 "    LDR     R0, [R6, #0x28] \n"
 352 "    MOV     R4, #0 \n"
 353 "    CMP     R0, #0 \n"
 354 "    BEQ     loc_FF996890 \n"
 355 "    LDR     R0, =0x7488 \n"
 356 "    MOV     R2, R5 \n"
 357 "    LDR     R0, [R0] \n"
 358 "    MOV     R1, #1 \n"
 359 "    CMP     R0, #0 \n"
 360 "    MOVNE   R4, #0x1D \n"
 361 "    MOV     R0, R4 \n"
 362 "    BL      sub_FF88A118 \n"
 363 "    MOV     R1, R4 \n"
 364 "    MOV     R0, R5 \n"
 365 "    BL      sub_FF997AC8 \n"
 366 "    B       sub_FF996944 \n"
 367 
 368 "loc_FF996890:\n"
 369 "    BL      sub_FF88D9FC \n"
 370 "    MOV     R1, R5 \n"
 371 "    BL      sub_FF88DA58 \n"
 372 "    LDR     R0, =0x10E \n"
 373 "    MOV     R2, #4 \n"
 374 "    ADD     R1, R5, #0x30 \n"
 375 "    BL      _SetPropertyCase \n"
 376 "    MOV     R2, #4 \n"
 377 "    ADD     R1, R5, #0x34 \n"
 378 "    MOV     R0, #0x2C \n"
 379 "    BL      _SetPropertyCase \n"
 380 "    MOV     R0, #0xC \n"
 381 "    BL      sub_FF891824 \n"
 382 "    TST     R0, #1 \n"
 383 "    BNE     loc_FF9968D8 \n"
 384 "    BL      sub_FF891880 \n"
 385 "    TST     R0, #1 \n"
 386 "    BEQ     loc_FF9968E0 \n"
 387 
 388 "loc_FF9968D8:\n"
 389 "    BL      sub_FF889EF8 \n"
 390 "    MOV     R4, #1 \n"
 391 
 392 "loc_FF9968E0:\n"
 393 "    TST     R4, #1 \n"
 394 "    BNE     sub_FF996928 \n"
 395 "    BL      sub_FF99752C \n"
 396 "    MVN     R1, #0x1000 \n"
 397 "    BL      sub_006B8234 /*_ClearEventFlag*/ \n"
 398 "    MOV     R0, R5 \n"
 399 "    BL      sub_FFAC0320 \n"
 400 "    TST     R0, #1 \n"
 401 "    MOV     R4, R0 \n"
 402 "    BNE     sub_FF996928 \n"
 403 "    BL      sub_FF88C88C \n"
 404 "    MOV     R0, R5 \n"
 405 "    BL      sub_FFAC0C40 \n"
 406 "    MOV     R0, #2 \n"
 407 "    BL      sub_FF8932C4 \n"
 408 "    MOV     R0, R5 \n"
 409 "    BL      sub_FFAC0FC0_my \n"  // --> Patched. Old value = 0xFFAC0FC0.
 410 "    LDR     PC, =0xFF996924 \n"  // Continue in firmware
 411 );
 412 }
 413 
 414 /*************************************************************/
 415 //** sub_FFAC0FC0_my @ 0xFFAC0FC0 - 0xFFAC1230, length=157
 416 void __attribute__((naked,noinline)) sub_FFAC0FC0_my() {
 417 asm volatile (
 418 "    STMFD   SP!, {R2-R8,LR} \n"
 419 "    MOV     R4, R0 \n"
 420 "    BL      sub_FFAC0BA8 \n"
 421 "    BL      sub_FF996FF8 \n"
 422 "    LDR     R7, =0x1CCF0 \n"
 423 "    LDR     R0, [R7, #0x184] \n"
 424 "    CMP     R0, #2 \n"
 425 "    BNE     loc_FFAC0FFC \n"
 426 "    ADD     R0, R7, #0x100 \n"
 427 "    LDRH    R0, [R0, #0x8E] \n"
 428 "    CMP     R0, #3 \n"
 429 "    LDRNE   R0, [R4, #8] \n"
 430 "    CMPNE   R0, #1 \n"
 431 "    MOVLS   R0, #3 \n"
 432 "    BLLS    sub_FF919774 \n"
 433 
 434 "loc_FFAC0FFC:\n"
 435 "    LDR     R0, =0x12F \n"
 436 "    MOV     R2, #4 \n"
 437 "    ADD     R1, SP, #4 \n"
 438 "    BL      _GetPropertyCase \n"
 439 "    TST     R0, #1 \n"
 440 "    MOVNE   R2, #0x18C \n"
 441 "    LDRNE   R1, =0xFFAC1244 /*'SsStandardCaptureSeq.c'*/ \n"
 442 "    MOVNE   R0, #0 \n"
 443 "    BLNE    _DebugAssert \n"
 444 "    LDR     R0, [SP, #4] \n"
 445 "    AND     R0, R0, #0xFF00 \n"
 446 "    CMP     R0, #0x600 \n"
 447 "    LDRNE   R0, =0xFFAC0830 \n"
 448 "    LDREQ   R0, =0xFFAC0F88 \n"
 449 "    MOVNE   R1, R4 \n"
 450 "    MOVEQ   R1, #0 \n"
 451 "    BL      sub_FF8CB2EC \n"
 452 "    BL      wait_until_remote_button_is_released\n" // added
 453 "    BL      capt_seq_hook_set_nr\n"                 // added
 454 "    MOV     R0, R4 \n"
 455 "    BL      sub_FFAC0CD0 \n"
 456 "    LDR     R1, =0xCB04 \n"
 457 "    MOV     R2, #4 \n"
 458 "    MOV     R0, #0x8A \n"
 459 "    BL      _GetPropertyCase \n"
 460 "    TST     R0, #1 \n"
 461 "    LDRNE   R2, =0x19B \n"
 462 "    LDRNE   R1, =0xFFAC1244 /*'SsStandardCaptureSeq.c'*/ \n"
 463 "    MOVNE   R0, #0 \n"
 464 "    BLNE    _DebugAssert \n"
 465 "    BL      sub_FF88EE64 \n"
 466 "    BL      sub_FF97AB80 \n"
 467 "    MOV     R1, #0 \n"
 468 "    MOV     R0, R4 \n"
 469 "    BL      sub_FFAC133C \n"
 470 "    MOV     R6, R0 \n"
 471 "    LDR     R0, [SP, #4] \n"
 472 "    LDR     R8, =0xCB04 \n"
 473 "    AND     R0, R0, #0xFF00 \n"
 474 "    CMP     R0, #0x600 \n"
 475 "    LDRH    R0, [R4, #0x18] \n"
 476 "    LDRNE   R2, =0xFFAC0A94 \n"
 477 "    LDREQ   R2, =0xFFAC0A10 \n"
 478 "    CMP     R0, #0 \n"
 479 "    BEQ     loc_FFAC10B8 \n"
 480 "    CMP     R0, #1 \n"
 481 "    BEQ     loc_FFAC10DC \n"
 482 "    CMP     R0, #4 \n"
 483 "    BNE     loc_FFAC1150 \n"
 484 
 485 "loc_FFAC10B8:\n"
 486 "    STR     R6, [SP] \n"
 487 "    MOV     R3, R2 \n"
 488 "    LDR     R1, [R4, #0x34] \n"
 489 "    LDR     R2, [R8] \n"
 490 "    MOV     R0, R4 \n"
 491 "    BL      sub_FFAC06B4 \n"
 492 "    MOV     R5, R0 \n"
 493 "    BL      sub_FF8C80CC \n"
 494 "    B       loc_FFAC1164 \n"
 495 
 496 "loc_FFAC10DC:\n"
 497 "    STR     R6, [SP] \n"
 498 "    MOV     R3, R2 \n"
 499 "    LDR     R1, [R4, #0x34] \n"
 500 "    LDR     R2, [R8] \n"
 501 "    MOV     R0, R4 \n"
 502 "    BL      sub_FFAC0734 \n"
 503 "    MOV     R5, R0 \n"
 504 "    MOV     R1, #0 \n"
 505 "    MOV     R0, #0x45 \n"
 506 "    BL      sub_FF8321D8 \n"
 507 "    TST     R5, #1 \n"
 508 "    BNE     loc_FFAC1164 \n"
 509 "    LDR     R0, =0xFFAC0F88 \n"
 510 "    MOV     R1, #0 \n"
 511 "    BL      sub_FF8CB2EC \n"
 512 "    MOV     R1, #1 \n"
 513 "    MOV     R0, R4 \n"
 514 "    BL      sub_FFAC133C \n"
 515 "    MOV     R6, R0 \n"
 516 "    LDR     R0, [R8] \n"
 517 "    BL      sub_FFAC0B2C \n"
 518 "    LDR     R1, [R4, #0x34] \n"
 519 "    LDR     R2, [R8] \n"
 520 "    MOV     R3, R6 \n"
 521 "    MOV     R0, R4 \n"
 522 "    BL      sub_FFAC07B4 \n"
 523 "    MOV     R5, R0 \n"
 524 "    BL      sub_FFAC063C \n"
 525 "    B       loc_FFAC1164 \n"
 526 
 527 "loc_FFAC1150:\n"
 528 "    LDR     R2, =0x1D5 \n"
 529 "    LDR     R1, =0xFFAC1244 /*'SsStandardCaptureSeq.c'*/ \n"
 530 "    MOV     R0, #0 \n"
 531 "    BL      _DebugAssert \n"
 532 "    MOV     R5, #0x1D \n"
 533 
 534 "loc_FFAC1164:\n"
 535 "    BL      sub_FF97AB98 \n"
 536 "    LDR     R8, =0xFFAC0F88 \n"
 537 "    TST     R5, #1 \n"
 538 "    BNE     loc_FFAC11E4 \n"
 539 "    LDR     R0, [R7, #0xF8] \n"
 540 "    CMP     R0, #0 \n"
 541 "    BNE     loc_FFAC119C \n"
 542 "    MOV     R0, R4 \n"
 543 "    BL      sub_FF9982D4 \n"
 544 "    TST     R0, #1 \n"
 545 "    LDRNE   R2, =0x1EF \n"
 546 "    LDRNE   R1, =0xFFAC1244 /*'SsStandardCaptureSeq.c'*/ \n"
 547 "    MOVNE   R0, #0 \n"
 548 "    BLNE    _DebugAssert \n"
 549 "    BL      capt_seq_hook_raw_here \n"         // added
 550 
 551 "loc_FFAC119C:\n"
 552 "    MOV     R0, R4 \n"
 553 "    BL      sub_FFAC0DB8 \n"
 554 "    MOV     R0, R4 \n"
 555 "    BL      sub_FFAC0D70 \n"
 556 "    CMP     R6, R8 \n"
 557 "    BEQ     loc_FFAC11E4 \n"
 558 "    BL      sub_FF99752C \n"
 559 "    MOV     R3, #0x1FC \n"
 560 "    STR     R3, [SP] \n"
 561 "    LDR     R2, =0x3A98 \n"
 562 "    LDR     R3, =0xFFAC1244 /*'SsStandardCaptureSeq.c'*/ \n"
 563 "    MOV     R1, #4 \n"
 564 "    BL      sub_FF891AF4 \n"
 565 "    CMP     R0, #0 \n"
 566 "    MOVNE   R2, #0x1FC \n"
 567 "    LDRNE   R1, =0xFFAC1244 /*'SsStandardCaptureSeq.c'*/ \n"
 568 "    MOVNE   R0, #0 \n"
 569 "    BLNE    _DebugAssert \n"
 570 
 571 "loc_FFAC11E4:\n"
 572 "    MOV     R2, R4 \n"
 573 "    MOV     R1, #1 \n"
 574 "    MOV     R0, R5 \n"
 575 "    BL      sub_FF88A118 \n"
 576 "    LDR     R0, [R7, #0x28] \n"
 577 "    CMP     R0, #0 \n"
 578 "    BEQ     loc_FFAC1218 \n"
 579 "    SUBS    R1, R6, R8 \n"
 580 "    MOVNE   R1, #1 \n"
 581 "    MOV     R2, R5 \n"
 582 "    MOV     R0, R4 \n"
 583 "    BL      sub_FF997A60 \n"
 584 "    B       loc_FFAC122C \n"
 585 
 586 "loc_FFAC1218:\n"
 587 "    SUBS    R1, R6, R8 \n"
 588 "    MOVNE   R1, #1 \n"
 589 "    MOV     R2, R5 \n"
 590 "    MOV     R0, R4 \n"
 591 "    BL      sub_FF9979F4 \n"
 592 
 593 "loc_FFAC122C:\n"
 594 "    MOV     R0, R5 \n"
 595 "    LDMFD   SP!, {R2-R8,PC} \n"
 596 "    .ltorg\n"         // added
 597 );
 598 }
 599 
 600 /*************************************************************/
 601 //** exp_drv_task @ 0xFF8D918C - 0xFF8D9810, length=418
 602 void __attribute__((naked,noinline)) exp_drv_task() {
 603 asm volatile (
 604 "    STMFD   SP!, {R4-R9,LR} \n"
 605 "    SUB     SP, SP, #0x2C \n"
 606 "    LDR     R6, =0x43B0 \n"
 607 "    LDR     R7, =0xBB8 \n"
 608 "    LDR     R4, =0x59A80 \n"
 609 "    MOV     R0, #0 \n"
 610 "    ADD     R5, SP, #0x1C \n"
 611 "    STR     R0, [SP, #0xC] \n"
 612 
 613 "loc_FF8D91AC:\n"
 614 "    LDR     R0, [R6, #0x20] \n"
 615 "    MOV     R2, #0 \n"
 616 "    ADD     R1, SP, #0x28 \n"
 617 "    BL      sub_006B8458 /*_ReceiveMessageQueue*/ \n"
 618 "    LDR     R0, [SP, #0xC] \n"
 619 "    CMP     R0, #1 \n"
 620 "    BNE     loc_FF8D91F8 \n"
 621 "    LDR     R0, [SP, #0x28] \n"
 622 "    LDR     R0, [R0] \n"
 623 "    CMP     R0, #0x14 \n"
 624 "    CMPNE   R0, #0x15 \n"
 625 "    CMPNE   R0, #0x16 \n"
 626 "    CMPNE   R0, #0x17 \n"
 627 "    BEQ     loc_FF8D935C \n"
 628 "    CMP     R0, #0x2A \n"
 629 "    BEQ     loc_FF8D92E0 \n"
 630 "    ADD     R1, SP, #0xC \n"
 631 "    MOV     R0, #0 \n"
 632 "    BL      sub_FF8D912C \n"
 633 
 634 "loc_FF8D91F8:\n"
 635 "    LDR     R0, [SP, #0x28] \n"
 636 "    LDR     R1, [R0] \n"
 637 "    CMP     R1, #0x30 \n"
 638 "    BNE     loc_FF8D9224 \n"
 639 "    BL      sub_FF8DA7D8 \n"
 640 "    LDR     R0, [R6, #0x1C] \n"
 641 "    MOV     R1, #1 \n"
 642 "    BL      sub_006B81EC /*_SetEventFlag*/ \n"
 643 "    BL      _ExitTask \n"
 644 "    ADD     SP, SP, #0x2C \n"
 645 "    LDMFD   SP!, {R4-R9,PC} \n"
 646 
 647 "loc_FF8D9224:\n"
 648 "    CMP     R1, #0x2F \n"
 649 "    BNE     loc_FF8D9240 \n"
 650 "    LDR     R2, [R0, #0xA8]! \n"
 651 "    LDR     R1, [R0, #4] \n"
 652 "    MOV     R0, R1 \n"
 653 "    BLX     R2 \n"
 654 "    B       loc_FF8D9808 \n"
 655 
 656 "loc_FF8D9240:\n"
 657 "    CMP     R1, #0x28 \n"
 658 "    BNE     loc_FF8D9290 \n"
 659 "    LDR     R0, [R6, #0x1C] \n"
 660 "    MOV     R1, #0x80 \n"
 661 "    BL      sub_006B8234 /*_ClearEventFlag*/ \n"
 662 "    LDR     R0, =0xFF8D4568 \n"
 663 "    MOV     R1, #0x80 \n"
 664 "    BL      sub_FF88427C \n"
 665 "    LDR     R0, [R6, #0x1C] \n"
 666 "    MOV     R2, R7 \n"
 667 "    MOV     R1, #0x80 \n"
 668 "    BL      sub_006B8120 /*_WaitForAllEventFlag*/ \n"
 669 "    TST     R0, #1 \n"
 670 "    LDRNE   R2, =0x170B \n"
 671 "    BNE     loc_FF8D934C \n"
 672 
 673 "loc_FF8D927C:\n"
 674 "    LDR     R1, [SP, #0x28] \n"
 675 "    LDR     R0, [R1, #0xAC] \n"
 676 "    LDR     R1, [R1, #0xA8] \n"
 677 "    BLX     R1 \n"
 678 "    B       loc_FF8D9808 \n"
 679 
 680 "loc_FF8D9290:\n"
 681 "    CMP     R1, #0x29 \n"
 682 "    BNE     loc_FF8D92D8 \n"
 683 "    ADD     R1, SP, #0xC \n"
 684 "    BL      sub_FF8D912C \n"
 685 "    LDR     R0, [R6, #0x1C] \n"
 686 "    MOV     R1, #0x100 \n"
 687 "    BL      sub_006B8234 /*_ClearEventFlag*/ \n"
 688 "    LDR     R0, =0xFF8D4578 \n"
 689 "    MOV     R1, #0x100 \n"
 690 "    BL      sub_FF88448C \n"
 691 "    LDR     R0, [R6, #0x1C] \n"
 692 "    MOV     R2, R7 \n"
 693 "    MOV     R1, #0x100 \n"
 694 "    BL      sub_006B8120 /*_WaitForAllEventFlag*/ \n"
 695 "    TST     R0, #1 \n"
 696 "    BEQ     loc_FF8D927C \n"
 697 "    LDR     R2, =0x1715 \n"
 698 "    B       loc_FF8D934C \n"
 699 
 700 "loc_FF8D92D8:\n"
 701 "    CMP     R1, #0x2A \n"
 702 "    BNE     loc_FF8D92F0 \n"
 703 
 704 "loc_FF8D92E0:\n"
 705 "    LDR     R0, [SP, #0x28] \n"
 706 "    ADD     R1, SP, #0xC \n"
 707 "    BL      sub_FF8D912C \n"
 708 "    B       loc_FF8D927C \n"
 709 
 710 "loc_FF8D92F0:\n"
 711 "    CMP     R1, #0x2D \n"
 712 "    BNE     loc_FF8D9308 \n"
 713 "    BL      sub_FF8C30F0 \n"
 714 "    BL      sub_FF8C3F54 \n"
 715 "    BL      sub_FF8C3A34 \n"
 716 "    B       loc_FF8D927C \n"
 717 
 718 "loc_FF8D9308:\n"
 719 "    CMP     R1, #0x2E \n"
 720 "    BNE     loc_FF8D935C \n"
 721 "    LDR     R0, [R6, #0x1C] \n"
 722 "    MOV     R1, #4 \n"
 723 "    BL      sub_006B8234 /*_ClearEventFlag*/ \n"
 724 "    LDR     R1, =0xFF8D4598 \n"
 725 "    LDR     R0, =0xFFFFF400 \n"
 726 "    MOV     R2, #4 \n"
 727 "    BL      sub_FF8DA83C \n"
 728 "    BL      sub_FF8C2D84 \n"
 729 "    LDR     R0, [R6, #0x1C] \n"
 730 "    MOV     R2, R7 \n"
 731 "    MOV     R1, #4 \n"
 732 "    BL      sub_006B8034 /*_WaitForAnyEventFlag*/ \n"
 733 "    TST     R0, #1 \n"
 734 "    BEQ     loc_FF8D927C \n"
 735 "    LDR     R2, =0x174D \n"
 736 
 737 "loc_FF8D934C:\n"
 738 "    LDR     R1, =0xFF8D4D1C /*'ExpDrv.c'*/ \n"
 739 "    MOV     R0, #0 \n"
 740 "    BL      _DebugAssert \n"
 741 "    B       loc_FF8D927C \n"
 742 
 743 "loc_FF8D935C:\n"
 744 "    LDR     R0, [SP, #0x28] \n"
 745 "    MOV     R8, #1 \n"
 746 "    LDR     R1, [R0] \n"
 747 "    CMP     R1, #0x12 \n"
 748 "    CMPNE   R1, #0x13 \n"
 749 "    BNE     loc_FF8D93C4 \n"
 750 "    LDR     R1, [R0, #0x94] \n"
 751 "    ADD     R1, R1, R1, LSL#1 \n"
 752 "    ADD     R1, R0, R1, LSL#2 \n"
 753 "    SUB     R1, R1, #8 \n"
 754 "    LDMIA   R1, {R2,R3,R9} \n"
 755 "    STMIA   R5, {R2,R3,R9} \n"
 756 "    BL      sub_FF8D7590 \n"
 757 "    LDR     R0, [SP, #0x28] \n"
 758 "    LDR     R1, [R0, #0x94] \n"
 759 "    LDR     R3, [R0, #0xA8] \n"
 760 "    LDR     R2, [R0, #0xAC] \n"
 761 "    ADD     R0, R0, #4 \n"
 762 "    BLX     R3 \n"
 763 "    LDR     R0, [SP, #0x28] \n"
 764 "    BL      sub_FF8DAB18 \n"
 765 "    LDR     R0, [SP, #0x28] \n"
 766 "    LDR     R1, [R0, #0x94] \n"
 767 "    LDR     R2, [R0, #0xB4] \n"
 768 "    LDR     R3, [R0, #0xB0] \n"
 769 "    B       loc_FF8D96CC \n"
 770 
 771 "loc_FF8D93C4:\n"
 772 "    CMP     R1, #0x14 \n"
 773 "    CMPNE   R1, #0x15 \n"
 774 "    CMPNE   R1, #0x16 \n"
 775 "    CMPNE   R1, #0x17 \n"
 776 "    BNE     loc_FF8D946C \n"
 777 "    ADD     R3, SP, #0xC \n"
 778 "    MOV     R2, SP \n"
 779 "    ADD     R1, SP, #0x1C \n"
 780 "    BL      sub_FF8D7800 \n"
 781 "    CMP     R0, #1 \n"
 782 "    MOV     R9, R0 \n"
 783 "    CMPNE   R9, #5 \n"
 784 "    BNE     loc_FF8D9418 \n"
 785 "    LDR     R0, [SP, #0x28] \n"
 786 "    MOV     R2, R9 \n"
 787 "    LDR     R1, [R0, #0x94] \n"
 788 "    LDR     R12, [R0, #0xA8] \n"
 789 "    LDR     R3, [R0, #0xAC] \n"
 790 "    ADD     R0, R0, #4 \n"
 791 "    BLX     R12 \n"
 792 "    B       loc_FF8D9450 \n"
 793 
 794 "loc_FF8D9418:\n"
 795 "    LDR     R0, [SP, #0x28] \n"
 796 "    CMP     R9, #2 \n"
 797 "    LDR     R1, [R0, #0x94] \n"
 798 "    LDR     R12, [R0, #0xA8] \n"
 799 "    LDR     R3, [R0, #0xAC] \n"
 800 "    CMPNE   R9, #6 \n"
 801 "    MOV     R2, R9 \n"
 802 "    ADD     R0, R0, #4 \n"
 803 "    BNE     loc_FF8D9464 \n"
 804 "    BLX     R12 \n"
 805 "    LDR     R0, [SP, #0x28] \n"
 806 "    MOV     R2, SP \n"
 807 "    ADD     R1, SP, #0x1C \n"
 808 "    BL      sub_FF8D8E44 \n"
 809 
 810 "loc_FF8D9450:\n"
 811 "    LDR     R0, [SP, #0x28] \n"
 812 "    LDR     R2, [SP, #0xC] \n"
 813 "    MOV     R1, R9 \n"
 814 "    BL      sub_FF8D90C4 \n"
 815 "    B       loc_FF8D96D4 \n"
 816 
 817 "loc_FF8D9464:\n"
 818 "    BLX     R12 \n"
 819 "    B       loc_FF8D96D4 \n"
 820 
 821 "loc_FF8D946C:\n"
 822 "    CMP     R1, #0x24 \n"
 823 "    CMPNE   R1, #0x25 \n"
 824 "    BNE     loc_FF8D94B8 \n"
 825 "    LDR     R1, [R0, #0x94] \n"
 826 "    ADD     R1, R1, R1, LSL#1 \n"
 827 "    ADD     R1, R0, R1, LSL#2 \n"
 828 "    SUB     R1, R1, #8 \n"
 829 "    LDMIA   R1, {R2,R3,R9} \n"
 830 "    STMIA   R5, {R2,R3,R9} \n"
 831 "    BL      sub_FF8D64AC \n"
 832 "    LDR     R0, [SP, #0x28] \n"
 833 "    LDR     R1, [R0, #0x94] \n"
 834 "    LDR     R3, [R0, #0xA8] \n"
 835 "    LDR     R2, [R0, #0xAC] \n"
 836 "    ADD     R0, R0, #4 \n"
 837 "    BLX     R3 \n"
 838 "    LDR     R0, [SP, #0x28] \n"
 839 "    BL      sub_FF8D68FC \n"
 840 "    B       loc_FF8D96D4 \n"
 841 
 842 "loc_FF8D94B8:\n"
 843 "    ADD     R1, R0, #4 \n"
 844 "    LDMIA   R1, {R2,R3,R9} \n"
 845 "    STMIA   R5, {R2,R3,R9} \n"
 846 "    LDR     R1, [R0] \n"
 847 "    CMP     R1, #0x28 \n"
 848 "    ADDCC   PC, PC, R1, LSL#2 \n"
 849 "    B       loc_FF8D96BC \n"
 850 "    B       loc_FF8D9574 \n"
 851 "    B       loc_FF8D9574 \n"
 852 "    B       loc_FF8D957C \n"
 853 "    B       loc_FF8D9584 \n"
 854 "    B       loc_FF8D9584 \n"
 855 "    B       loc_FF8D9584 \n"
 856 "    B       loc_FF8D9574 \n"
 857 "    B       loc_FF8D957C \n"
 858 "    B       loc_FF8D9584 \n"
 859 "    B       loc_FF8D9584 \n"
 860 "    B       loc_FF8D959C \n"
 861 "    B       loc_FF8D959C \n"
 862 "    B       loc_FF8D96A8 \n"
 863 "    B       loc_FF8D96B0 \n"
 864 "    B       loc_FF8D96B0 \n"
 865 "    B       loc_FF8D96B0 \n"
 866 "    B       loc_FF8D96B0 \n"
 867 "    B       loc_FF8D96B8 \n"
 868 "    B       loc_FF8D96BC \n"
 869 "    B       loc_FF8D96BC \n"
 870 "    B       loc_FF8D96BC \n"
 871 "    B       loc_FF8D96BC \n"
 872 "    B       loc_FF8D96BC \n"
 873 "    B       loc_FF8D96BC \n"
 874 "    B       loc_FF8D958C \n"
 875 "    B       loc_FF8D9594 \n"
 876 "    B       loc_FF8D9594 \n"
 877 "    B       loc_FF8D9594 \n"
 878 "    B       loc_FF8D95A8 \n"
 879 "    B       loc_FF8D95A8 \n"
 880 "    B       loc_FF8D95B0 \n"
 881 "    B       loc_FF8D95E8 \n"
 882 "    B       loc_FF8D9620 \n"
 883 "    B       loc_FF8D9658 \n"
 884 "    B       loc_FF8D9690 \n"
 885 "    B       loc_FF8D9690 \n"
 886 "    B       loc_FF8D96BC \n"
 887 "    B       loc_FF8D96BC \n"
 888 "    B       loc_FF8D9698 \n"
 889 "    B       loc_FF8D96A0 \n"
 890 
 891 "loc_FF8D9574:\n"
 892 "    BL      sub_FF8D4B9C \n"
 893 "    B       loc_FF8D96BC \n"
 894 
 895 "loc_FF8D957C:\n"
 896 "    BL      sub_FF8D4E6C \n"
 897 "    B       loc_FF8D96BC \n"
 898 
 899 "loc_FF8D9584:\n"
 900 "    BL      sub_FF8D50AC \n"
 901 "    B       loc_FF8D96BC \n"
 902 
 903 "loc_FF8D958C:\n"
 904 "    BL      sub_FF8D53F4 \n"
 905 "    B       loc_FF8D96BC \n"
 906 
 907 "loc_FF8D9594:\n"
 908 "    BL      sub_FF8D5624 \n"
 909 "    B       loc_FF8D96BC \n"
 910 
 911 "loc_FF8D959C:\n"
 912 "    BL      sub_FF8D5A14_my \n"  // --> Patched. Old value = 0xFF8D5A14.
 913 "    MOV     R8, #0 \n"
 914 "    B       loc_FF8D96BC \n"
 915 
 916 "loc_FF8D95A8:\n"
 917 "    BL      sub_FF8D5BF0 \n"
 918 "    B       loc_FF8D96BC \n"
 919 
 920 "loc_FF8D95B0:\n"
 921 "    LDRH    R1, [R0, #4] \n"
 922 "    STRH    R1, [SP, #0x1C] \n"
 923 "    LDRH    R1, [R4, #2] \n"
 924 "    STRH    R1, [SP, #0x1E] \n"
 925 "    LDRH    R1, [R4, #4] \n"
 926 "    STRH    R1, [SP, #0x20] \n"
 927 "    LDRH    R1, [R4, #6] \n"
 928 "    STRH    R1, [SP, #0x22] \n"
 929 "    LDRH    R1, [R0, #0xC] \n"
 930 "    STRH    R1, [SP, #0x24] \n"
 931 "    LDRH    R1, [R4, #0xA] \n"
 932 "    STRH    R1, [SP, #0x26] \n"
 933 "    BL      sub_FF8D6134 \n"
 934 "    B       loc_FF8D96BC \n"
 935 
 936 "loc_FF8D95E8:\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, [R4, #8] \n"
 946 "    STRH    R1, [SP, #0x24] \n"
 947 "    LDRH    R1, [R4, #0xA] \n"
 948 "    STRH    R1, [SP, #0x26] \n"
 949 "    BL      sub_FF8DA888 \n"
 950 "    B       loc_FF8D96BC \n"
 951 
 952 "loc_FF8D9620:\n"
 953 "    LDRH    R1, [R4] \n"
 954 "    STRH    R1, [SP, #0x1C] \n"
 955 "    LDRH    R1, [R0, #6] \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_FF8DA9C4 \n"
 966 "    B       loc_FF8D96BC \n"
 967 
 968 "loc_FF8D9658:\n"
 969 "    LDRH    R1, [R4] \n"
 970 "    STRH    R1, [SP, #0x1C] \n"
 971 "    LDRH    R1, [R4, #2] \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, [R0, #0xC] \n"
 978 "    STRH    R1, [SP, #0x24] \n"
 979 "    LDRH    R1, [R4, #0xA] \n"
 980 "    STRH    R1, [SP, #0x26] \n"
 981 "    BL      sub_FF8DAA70 \n"
 982 "    B       loc_FF8D96BC \n"
 983 
 984 "loc_FF8D9690:\n"
 985 "    BL      sub_FF8D6248 \n"
 986 "    B       loc_FF8D96BC \n"
 987 
 988 "loc_FF8D9698:\n"
 989 "    BL      sub_FF8D6A14 \n"
 990 "    B       loc_FF8D96BC \n"
 991 
 992 "loc_FF8D96A0:\n"
 993 "    BL      sub_FF8D6DBC \n"
 994 "    B       loc_FF8D96BC \n"
 995 
 996 "loc_FF8D96A8:\n"
 997 "    BL      sub_FF8D702C \n"
 998 "    B       loc_FF8D96BC \n"
 999 
1000 "loc_FF8D96B0:\n"
1001 "    BL      sub_FF8D71F8 \n"
1002 "    B       loc_FF8D96BC \n"
1003 
1004 "loc_FF8D96B8:\n"
1005 "    BL      sub_FF8D7370 \n"
1006 
1007 "loc_FF8D96BC:\n"
1008 "    LDR     R0, [SP, #0x28] \n"
1009 "    LDR     R1, [R0, #0x94] \n"
1010 "    LDR     R2, [R0, #0xAC] \n"
1011 "    LDR     R3, [R0, #0xA8] \n"
1012 
1013 "loc_FF8D96CC:\n"
1014 "    ADD     R0, R0, #4 \n"
1015 "    BLX     R3 \n"
1016 
1017 "loc_FF8D96D4:\n"
1018 "    LDR     R0, [SP, #0x28] \n"
1019 "    LDR     R0, [R0] \n"
1020 "    CMP     R0, #0x10 \n"
1021 "    BEQ     loc_FF8D970C \n"
1022 "    BGT     loc_FF8D96FC \n"
1023 "    CMP     R0, #1 \n"
1024 "    CMPNE   R0, #4 \n"
1025 "    CMPNE   R0, #0xE \n"
1026 "    BNE     loc_FF8D9740 \n"
1027 "    B       loc_FF8D970C \n"
1028 
1029 "loc_FF8D96FC:\n"
1030 "    CMP     R0, #0x13 \n"
1031 "    CMPNE   R0, #0x17 \n"
1032 "    CMPNE   R0, #0x1A \n"
1033 "    BNE     loc_FF8D9740 \n"
1034 
1035 "loc_FF8D970C:\n"
1036 "    LDRSH   R0, [R4] \n"
1037 "    CMN     R0, #0xC00 \n"
1038 "    LDRNESH R1, [R4, #8] \n"
1039 "    CMNNE   R1, #0xC00 \n"
1040 "    STRNEH  R0, [SP, #0x1C] \n"
1041 "    STRNEH  R1, [SP, #0x24] \n"
1042 "    BNE     loc_FF8D9740 \n"
1043 "    ADD     R0, SP, #0x10 \n"
1044 "    BL      sub_FF8DAD3C /*_get_current_exp*/ \n"
1045 "    LDRH    R0, [SP, #0x10] \n"
1046 "    STRH    R0, [SP, #0x1C] \n"
1047 "    LDRH    R0, [SP, #0x18] \n"
1048 "    STRH    R0, [SP, #0x24] \n"
1049 
1050 "loc_FF8D9740:\n"
1051 "    LDR     R0, [SP, #0x28] \n"
1052 "    CMP     R8, #1 \n"
1053 "    BNE     loc_FF8D9790 \n"
1054 "    LDR     R1, [R0, #0x94] \n"
1055 "    MOV     R2, #0xC \n"
1056 "    ADD     R1, R1, R1, LSL#1 \n"
1057 "    ADD     R0, R0, R1, LSL#2 \n"
1058 "    SUB     R8, R0, #8 \n"
1059 "    LDR     R0, =0x59A80 \n"
1060 "    ADD     R1, SP, #0x1C \n"
1061 "    BL      sub_006BCD9C \n"
1062 "    LDR     R0, =0x59A8C \n"
1063 "    MOV     R2, #0xC \n"
1064 "    ADD     R1, SP, #0x1C \n"
1065 "    BL      sub_006BCD9C \n"
1066 "    LDR     R0, =0x59A98 \n"
1067 "    MOV     R2, #0xC \n"
1068 "    MOV     R1, R8 \n"
1069 "    BL      sub_006BCD9C \n"
1070 "    B       loc_FF8D9808 \n"
1071 
1072 "loc_FF8D9790:\n"
1073 "    LDR     R0, [R0] \n"
1074 "    MOV     R3, #1 \n"
1075 "    CMP     R0, #0xB \n"
1076 "    BNE     loc_FF8D97D4 \n"
1077 "    MOV     R2, #0 \n"
1078 "    STRD    R2, [SP] \n"
1079 "    MOV     R2, R3 \n"
1080 "    MOV     R1, R3 \n"
1081 "    MOV     R0, #0 \n"
1082 "    BL      sub_FF8D4968 \n"
1083 "    MOV     R3, #1 \n"
1084 "    MOV     R2, #0 \n"
1085 "    STRD    R2, [SP] \n"
1086 "    MOV     R2, R3 \n"
1087 "    MOV     R1, R3 \n"
1088 "    MOV     R0, #0 \n"
1089 "    B       loc_FF8D9804 \n"
1090 
1091 "loc_FF8D97D4:\n"
1092 "    MOV     R2, #1 \n"
1093 "    STRD    R2, [SP] \n"
1094 "    MOV     R3, R2 \n"
1095 "    MOV     R1, R2 \n"
1096 "    MOV     R0, R2 \n"
1097 "    BL      sub_FF8D4968 \n"
1098 "    MOV     R3, #1 \n"
1099 "    MOV     R2, R3 \n"
1100 "    MOV     R1, R3 \n"
1101 "    MOV     R0, R3 \n"
1102 "    STR     R3, [SP] \n"
1103 "    STR     R3, [SP, #4] \n"
1104 
1105 "loc_FF8D9804:\n"
1106 "    BL      sub_FF8D4AE4 \n"
1107 
1108 "loc_FF8D9808:\n"
1109 "    LDR     R0, [SP, #0x28] \n"
1110 "    BL      sub_FF8DA7D8 \n"
1111 "    B       loc_FF8D91AC \n"
1112 );
1113 }
1114 
1115 /*************************************************************/
1116 //** sub_FF8D5A14_my @ 0xFF8D5A14 - 0xFF8D5AD8, length=50
1117 void __attribute__((naked,noinline)) sub_FF8D5A14_my() {
1118 asm volatile (
1119 "    STMFD   SP!, {R4-R8,LR} \n"
1120 "    LDR     R7, =0x43B0 \n"
1121 "    MOV     R4, R0 \n"
1122 "    LDR     R0, [R7, #0x1C] \n"
1123 "    MOV     R1, #0x3E \n"
1124 "    BL      sub_006B8234 /*_ClearEventFlag*/ \n"
1125 "    MOV     R2, #0 \n"
1126 "    LDRSH   R0, [R4, #4] \n"
1127 "    MOV     R3, #1 \n"
1128 "    MOV     R1, R2 \n"
1129 "    BL      sub_FF8D4600 \n"
1130 "    MOV     R6, R0 \n"
1131 "    LDRSH   R0, [R4, #6] \n"
1132 "    BL      sub_FF8D47C8 \n"
1133 "    LDRSH   R0, [R4, #8] \n"
1134 "    BL      sub_FF8D4820 \n"
1135 "    LDRSH   R0, [R4, #0xA] \n"
1136 "    BL      sub_FF8D4878 \n"
1137 "    LDRSH   R0, [R4, #0xC] \n"
1138 "    MOV     R1, #0 \n"
1139 "    BL      sub_FF8D48D0 \n"
1140 "    MOV     R5, R0 \n"
1141 "    LDR     R0, [R4] \n"
1142 "    LDR     R8, =0x59A98 \n"
1143 "    CMP     R0, #0xB \n"
1144 "    MOVEQ   R6, #0 \n"
1145 "    MOVEQ   R5, R6 \n"
1146 "    BEQ     loc_FF8D5AAC \n"
1147 "    CMP     R6, #1 \n"
1148 "    BNE     loc_FF8D5AAC \n"
1149 "    LDRSH   R0, [R4, #4] \n"
1150 "    LDR     R1, =0xFF8D4558 \n"
1151 "    MOV     R2, #2 \n"
1152 "    BL      sub_FF884304 \n"
1153 "    STRH    R0, [R4, #4] \n"
1154 "    MOV     R0, #0 \n"
1155 "    STR     R0, [R7, #0x28] \n"
1156 "    B       loc_FF8D5AB4 \n"
1157 
1158 "loc_FF8D5AAC:\n"
1159 "    LDRH    R0, [R8] \n"
1160 "    STRH    R0, [R4, #4] \n"
1161 
1162 "loc_FF8D5AB4:\n"
1163 "    CMP     R5, #1 \n"
1164 "    LDRNEH  R0, [R8, #8] \n"
1165 "    BNE     loc_FF8D5AD0 \n"
1166 "    LDRSH   R0, [R4, #0xC] \n"
1167 "    LDR     R1, =0xFF8D45DC \n"
1168 "    MOV     R2, #0x20 \n"
1169 "    BL      sub_FF8DA844 \n"
1170 
1171 "loc_FF8D5AD0:\n"
1172 "    STRH    R0, [R4, #0xC] \n"
1173 "    LDRSH   R0, [R4, #6] \n"
1174 "    BL      sub_FF8C2DFC_my \n"  // --> Patched. Old value = 0xFF8C2DFC.
1175 "    LDR     PC, =0xFF8D5ADC \n"  // Continue in firmware
1176 );
1177 }
1178 
1179 /*************************************************************/
1180 //** sub_FF8C2DFC_my @ 0xFF8C2DFC - 0xFF8C2E70, length=30
1181 void __attribute__((naked,noinline)) sub_FF8C2DFC_my() {
1182 asm volatile (
1183 "    STMFD   SP!, {R4-R6,LR} \n"
1184 "    LDR     R5, =0x4004 \n"
1185 "    MOV     R4, R0 \n"
1186 "    LDR     R0, [R5, #4] \n"
1187 "    CMP     R0, #1 \n"
1188 "    MOVNE   R2, #0x168 \n"
1189 "    LDRNE   R1, =0xFF8C2BAC /*'Shutter.c'*/ \n"
1190 "    MOVNE   R0, #0 \n"
1191 "    BLNE    _DebugAssert \n"
1192 "    CMN     R4, #0xC00 \n"
1193 "    LDREQSH R4, [R5, #2] \n"
1194 "    CMN     R4, #0xC00 \n"
1195 "    LDREQ   R2, =0x16E \n"
1196 "    LDREQ   R1, =0xFF8C2BAC /*'Shutter.c'*/ \n"
1197 "    MOVEQ   R0, #0 \n"
1198 "    STRH    R4, [R5, #2] \n"
1199 "    BLEQ    _DebugAssert \n"
1200 "    MOV     R0, R4 \n"
1201 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
1202 "    MOV     R4, R0 \n"
1203 //"  BL      _sub_FF918EAC \n"  // --> Nullsub call removed.
1204 "    MOV     R0, R4 \n"
1205 "    BL      sub_FF91BF18 \n"
1206 "    TST     R0, #1 \n"
1207 "    LDMEQFD SP!, {R4-R6,PC} \n"
1208 "    LDMFD   SP!, {R4-R6,LR} \n"
1209 "    LDR     R2, =0x173 \n"
1210 "    LDR     R1, =0xFF8C2BAC /*'Shutter.c'*/ \n"
1211 "    MOV     R0, #0 \n"
1212 "    B       _DebugAssert \n"
1213 );
1214 }

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