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

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF99328C_my
  3. sub_FF9930D4_my
  4. sub_FFAC82DC_my
  5. exp_drv_task
  6. sub_FF8D3CBC_my
  7. sub_FF8BFA94_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*)(0xa0e0); // found by trial and error near 0xa0dc referenced near 0xffa1efb4 (0xa0dc + 0x4)
  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 @ 0xFF88931C - 0xFF8895F4, length=183
  16 void __attribute__((naked,noinline)) capt_seq_task() {
  17 asm volatile (
  18 "    STMFD   SP!, {R3-R7,LR} \n"
  19 "    LDR     R5, =0x1C3E4 \n"
  20 "    LDR     R7, =0x3464 \n"
  21 "    MOV     R6, #0 \n"
  22 
  23 "loc_FF88932C:\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_FF88935C \n"
  30 "    LDR     R2, =0x429 \n"
  31 "    LDR     R1, =0xFF888C98 /*'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_FF88935C:\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_FF9946A0 \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_FF8895B8 \n"
  49 "    B       loc_FF88941C \n"
  50 "    B       loc_FF889434 \n"
  51 "    B       loc_FF889440 \n"
  52 "    B       loc_FF889454 \n"
  53 "    B       loc_FF88944C \n"
  54 "    B       loc_FF889460 \n"
  55 "    B       loc_FF889468 \n"
  56 "    B       loc_FF889470 \n"
  57 "    B       loc_FF88947C \n"
  58 "    B       loc_FF8894A8 \n"
  59 "    B       loc_FF889488 \n"
  60 "    B       loc_FF889494 \n"
  61 "    B       loc_FF88949C \n"
  62 "    B       loc_FF8894B0 \n"
  63 "    B       loc_FF8894B8 \n"
  64 "    B       loc_FF8894C0 \n"
  65 "    B       loc_FF8894C8 \n"
  66 "    B       loc_FF8894D0 \n"
  67 "    B       loc_FF8894DC \n"
  68 "    B       loc_FF8894E4 \n"
  69 "    B       loc_FF8894EC \n"
  70 "    B       loc_FF8894F4 \n"
  71 "    B       loc_FF8894FC \n"
  72 "    B       loc_FF889504 \n"
  73 "    B       loc_FF88950C \n"
  74 "    B       loc_FF889514 \n"
  75 "    B       loc_FF889520 \n"
  76 "    B       loc_FF889528 \n"
  77 "    B       loc_FF889530 \n"
  78 "    B       loc_FF889538 \n"
  79 "    B       loc_FF889540 \n"
  80 "    B       loc_FF88954C \n"
  81 "    B       loc_FF889554 \n"
  82 "    B       loc_FF889560 \n"
  83 "    B       loc_FF889598 \n"
  84 "    B       loc_FF8895A4 \n"
  85 "    B       loc_FF8895C8 \n"
  86 
  87 "loc_FF88941C:\n"
  88 "    BL      sub_FF889B2C \n"
  89 "    BL      shooting_expo_param_override\n"    // added
  90 "    BL      sub_FF886958 \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_FF99328C_my \n"  // --> Patched. Old value = 0xFF99328C.
  97 "    B       loc_FF8895C8 \n"
  98 
  99 "loc_FF889434:\n"
 100 "    LDR     R0, [R0, #0x10] \n"
 101 "    BL      sub_FF9930D4_my \n"  // --> Patched. Old value = 0xFF9930D4.
 102 "    B       loc_FF8895C8 \n"
 103 
 104 "loc_FF889440:\n"
 105 "    MOV     R0, #1 \n"
 106 "    BL      sub_FF889E88 \n"
 107 "    B       loc_FF8895C8 \n"
 108 
 109 "loc_FF88944C:\n"
 110 "    BL      sub_FF8897A8 \n"
 111 "    B       loc_FF889458 \n"
 112 
 113 "loc_FF889454:\n"
 114 "    BL      sub_FF889B08 \n"
 115 
 116 "loc_FF889458:\n"
 117 "    STR     R6, [R5, #0x28] \n"
 118 "    B       loc_FF8895C8 \n"
 119 
 120 "loc_FF889460:\n"
 121 "    BL      sub_FF889B10 \n"
 122 "    B       loc_FF8895C8 \n"
 123 
 124 "loc_FF889468:\n"
 125 "    BL      sub_FF889D4C \n"
 126 "    B       loc_FF889480 \n"
 127 
 128 "loc_FF889470:\n"
 129 "    LDR     R0, [R0, #0x10] \n"
 130 "    BL      sub_FF993328 \n"
 131 "    B       loc_FF8895C8 \n"
 132 
 133 "loc_FF88947C:\n"
 134 "    BL      sub_FF889DE0 \n"
 135 
 136 "loc_FF889480:\n"
 137 "    BL      sub_FF886958 \n"
 138 "    B       loc_FF8895C8 \n"
 139 
 140 "loc_FF889488:\n"
 141 "    LDR     R0, [R5, #0x50] \n"
 142 "    BL      sub_FF88A46C \n"
 143 "    B       loc_FF8895C8 \n"
 144 
 145 "loc_FF889494:\n"
 146 "    BL      sub_FF88A8A0 \n"
 147 "    B       loc_FF8895C8 \n"
 148 
 149 "loc_FF88949C:\n"
 150 "    LDR     R0, [R0, #0xC] \n"
 151 "    BL      sub_FF88A908 \n"
 152 "    B       loc_FF8895C8 \n"
 153 
 154 "loc_FF8894A8:\n"
 155 "    BL      sub_FF889B08 \n"
 156 "    B       loc_FF8895C8 \n"
 157 
 158 "loc_FF8894B0:\n"
 159 "    BL      sub_FF9925BC \n"
 160 "    B       loc_FF8895C8 \n"
 161 
 162 "loc_FF8894B8:\n"
 163 "    BL      sub_FF9927F8 \n"
 164 "    B       loc_FF8895C8 \n"
 165 
 166 "loc_FF8894C0:\n"
 167 "    BL      sub_FF9928B4 \n"
 168 "    B       loc_FF8895C8 \n"
 169 
 170 "loc_FF8894C8:\n"
 171 "    BL      sub_FF99298C \n"
 172 "    B       loc_FF8895C8 \n"
 173 
 174 "loc_FF8894D0:\n"
 175 "    MOV     R0, #0 \n"
 176 "    BL      sub_FF992BF4 \n"
 177 "    B       loc_FF8895C8 \n"
 178 
 179 "loc_FF8894DC:\n"
 180 "    BL      sub_FF992D54 \n"
 181 "    B       loc_FF8895C8 \n"
 182 
 183 "loc_FF8894E4:\n"
 184 "    BL      sub_FF890258 \n"
 185 "    B       loc_FF8895C8 \n"
 186 
 187 "loc_FF8894EC:\n"
 188 "    BL      sub_FF890264 \n"
 189 "    B       loc_FF8895C8 \n"
 190 
 191 "loc_FF8894F4:\n"
 192 "    BL      sub_FF992DF0 \n"
 193 "    B       loc_FF8895C8 \n"
 194 
 195 "loc_FF8894FC:\n"
 196 "    BL      sub_FF992E9C \n"
 197 "    B       loc_FF8895C8 \n"
 198 
 199 "loc_FF889504:\n"
 200 "    BL      sub_FF889FF0 \n"
 201 "    B       loc_FF8895C8 \n"
 202 
 203 "loc_FF88950C:\n"
 204 "    MOV     R0, #0 \n"
 205 "    B       loc_FF889518 \n"
 206 
 207 "loc_FF889514:\n"
 208 "    LDR     R0, [R0, #0xC] \n"
 209 
 210 "loc_FF889518:\n"
 211 "    BL      sub_FF88A064 \n"
 212 "    B       loc_FF8895C8 \n"
 213 
 214 "loc_FF889520:\n"
 215 "    BL      sub_FF992A5C \n"
 216 "    B       loc_FF8895C8 \n"
 217 
 218 "loc_FF889528:\n"
 219 "    BL      sub_FF992A9C \n"
 220 "    B       loc_FF8895C8 \n"
 221 
 222 "loc_FF889530:\n"
 223 "    BL      sub_FF88CE40 \n"
 224 "    B       loc_FF8895C8 \n"
 225 
 226 "loc_FF889538:\n"
 227 "    BL      sub_FF88CF30 \n"
 228 "    B       loc_FF8895C8 \n"
 229 
 230 "loc_FF889540:\n"
 231 "    LDR     R0, [R0, #0xC] \n"
 232 "    BL      sub_FF992FAC \n"
 233 "    B       loc_FF8895C8 \n"
 234 
 235 "loc_FF88954C:\n"
 236 "    BL      sub_FF993034 \n"
 237 "    B       loc_FF8895C8 \n"
 238 
 239 "loc_FF889554:\n"
 240 "    BL      sub_FF88D0BC \n"
 241 "    BL      sub_FF88CF88 \n"
 242 "    B       loc_FF8895C8 \n"
 243 
 244 "loc_FF889560:\n"
 245 "    MOV     R0, #1 \n"
 246 "    BL      sub_FF993BA0 \n"
 247 "    MOV     R0, #1 \n"
 248 "    BL      sub_FF993CCC \n"
 249 "    LDR     R0, =0x1C4E4 \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_FF8895C8 \n"
 256 "    BL      sub_FF88CF30 \n"
 257 "    BL      sub_FF88D454 \n"
 258 "    B       loc_FF8895C8 \n"
 259 
 260 "loc_FF889598:\n"
 261 "    MOV     R2, #0 \n"
 262 "    MOV     R1, #0x10 \n"
 263 "    B       loc_FF8895AC \n"
 264 
 265 "loc_FF8895A4:\n"
 266 "    MOV     R2, #0 \n"
 267 "    MOV     R1, #0xF \n"
 268 
 269 "loc_FF8895AC:\n"
 270 "    MOV     R0, #0 \n"
 271 "    BL      sub_FF88742C \n"
 272 "    B       loc_FF8895C8 \n"
 273 
 274 "loc_FF8895B8:\n"
 275 "    LDR     R2, =0x54D \n"
 276 "    LDR     R1, =0xFF888C98 /*'SsShootTask.c'*/ \n"
 277 "    MOV     R0, #0 \n"
 278 "    BL      _DebugAssert \n"
 279 
 280 "loc_FF8895C8:\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, =0xFF888C98 /*'SsShootTask.c'*/ \n"
 290 "    BLEQ    _DebugAssert \n"
 291 "    STR     R6, [R4, #8] \n"
 292 "    B       loc_FF88932C \n"
 293 );
 294 }
 295 
 296 /*************************************************************/
 297 //** sub_FF99328C_my @ 0xFF99328C - 0xFF993324, length=39
 298 void __attribute__((naked,noinline)) sub_FF99328C_my() {
 299 asm volatile (
 300 "    STMFD   SP!, {R4-R6,LR} \n"
 301 "    BL      sub_FF888880 \n"
 302 "    MOV     R4, R0 \n"
 303 "    MOV     R0, #0xC \n"
 304 "    BL      sub_FF88E938 \n"
 305 "    LDR     R6, =0x7278 \n"
 306 "    TST     R0, #1 \n"
 307 "    MOV     R5, #1 \n"
 308 "    BNE     loc_FF993320 \n"
 309 "    BL      sub_FF88E994 \n"
 310 "    TST     R0, #1 \n"
 311 "    BNE     loc_FF993320 \n"
 312 "    BL      sub_FF889B18 \n"
 313 "    BL      sub_FF88AC30 \n"
 314 "    MOV     R1, R4 \n"
 315 "    BL      sub_FF88AC8C \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_FF993E8C \n"
 329 "    MVN     R1, #0x1000 \n"
 330 "    BL      sub_006B8234 /*_ClearEventFlag*/ \n"
 331 "    MOV     R0, R4 \n"
 332 "    BL      sub_FFAC7F58 \n"
 333 "    MOV     R0, R4 \n"
 334 "    BL      sub_FFAC82DC_my \n"  // --> Patched. Old value = 0xFFAC82DC.
 335 "    TST     R0, #1 \n"
 336 "    LDMEQFD SP!, {R4-R6,PC} \n"
 337 
 338 "loc_FF993320:\n"
 339 "    STR     R5, [R6] \n"
 340 "    LDMFD   SP!, {R4-R6,PC} \n"
 341 );
 342 }
 343 
 344 /*************************************************************/
 345 //** sub_FF9930D4_my @ 0xFF9930D4 - 0xFF99325C, length=99
 346 void __attribute__((naked,noinline)) sub_FF9930D4_my() {
 347 asm volatile (
 348 "    STMFD   SP!, {R2-R6,LR} \n"
 349 "    LDR     R6, =0x1C3E4 \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_FF993120 \n"
 355 "    LDR     R0, =0x7278 \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_FF88742C \n"
 363 "    MOV     R1, R4 \n"
 364 "    MOV     R0, R5 \n"
 365 "    BL      sub_FF994428 \n"
 366 "    B       sub_FF993280 \n"
 367 
 368 "loc_FF993120:\n"
 369 "    BL      sub_FF88AC30 \n"
 370 "    MOV     R1, R5 \n"
 371 "    BL      sub_FF88AC8C \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_FF88E938 \n"
 382 "    TST     R0, #1 \n"
 383 "    BNE     loc_FF993168 \n"
 384 "    BL      sub_FF88E994 \n"
 385 "    TST     R0, #1 \n"
 386 "    BEQ     loc_FF993170 \n"
 387 
 388 "loc_FF993168:\n"
 389 "    BL      sub_FF88720C \n"
 390 "    MOV     R4, #1 \n"
 391 
 392 "loc_FF993170:\n"
 393 "    TST     R4, #1 \n"
 394 "    BNE     sub_FF993264 \n"
 395 "    BL      sub_FF993E8C \n"
 396 "    MVN     R1, #0x1000 \n"
 397 "    BL      sub_006B8234 /*_ClearEventFlag*/ \n"
 398 "    MOV     R0, R5 \n"
 399 "    BL      sub_FFAC75E0 \n"
 400 "    TST     R0, #1 \n"
 401 "    MOV     R4, R0 \n"
 402 "    BNE     sub_FF993264 \n"
 403 "    BL      sub_FF889B18 \n"
 404 "    MOV     R0, R5 \n"
 405 "    BL      sub_FFAC7F58 \n"
 406 "    LDR     R0, [R6, #0x98] \n"
 407 "    CMP     R0, #0 \n"
 408 "    BEQ     loc_FF993244 \n"
 409 "    LDR     R0, =0x1C4E4 \n"
 410 "    LDRH    R0, [R0, #0x8E] \n"
 411 "    CMP     R0, #3 \n"
 412 "    LDRNE   R0, [R5, #8] \n"
 413 "    CMPNE   R0, #1 \n"
 414 "    BLS     loc_FF9931E4 \n"
 415 "    BL      sub_FF993E8C \n"
 416 "    LDR     R3, =0x10D \n"
 417 "    LDR     R2, =0x3A98 \n"
 418 "    STR     R3, [SP] \n"
 419 "    LDR     R3, =0xFF9933BC /*'SsCaptureCtrl.c'*/ \n"
 420 "    MOV     R1, #0x1000 \n"
 421 "    BL      sub_FF88EC08 \n"
 422 
 423 "loc_FF9931E4:\n"
 424 "    MOV     R2, #4 \n"
 425 "    ADD     R1, SP, #4 \n"
 426 "    MOV     R0, #0x180 \n"
 427 "    BL      _GetPropertyCase \n"
 428 "    TST     R0, #1 \n"
 429 "    LDRNE   R2, =0x111 \n"
 430 "    LDRNE   R1, =0xFF9933BC /*'SsCaptureCtrl.c'*/ \n"
 431 "    MOVNE   R0, #0 \n"
 432 "    BLNE    _DebugAssert \n"
 433 "    LDR     R0, [SP, #4] \n"
 434 "    CMP     R0, #0 \n"
 435 "    BNE     loc_FF993224 \n"
 436 "    BL      sub_FF993E8C \n"
 437 "    MOV     R1, #0x1000 \n"
 438 "    BL      sub_006B81EC /*_SetEventFlag*/ \n"
 439 "    B       loc_FF993244 \n"
 440 
 441 "loc_FF993224:\n"
 442 "    BL      sub_FF993E8C \n"
 443 "    MOV     R1, #0x1000 \n"
 444 "    BL      sub_006B8234 /*_ClearEventFlag*/ \n"
 445 "    LDR     R2, =0xFF9930C0 \n"
 446 "    LDR     R0, [SP, #4] \n"
 447 "    MOV     R3, #0x1000 \n"
 448 "    MOV     R1, R2 \n"
 449 "    BL      sub_FF8260F4 /*_SetTimerAfter*/ \n"
 450 
 451 "loc_FF993244:\n"
 452 "    LDR     R0, [R6, #0xA4] \n"
 453 "    CMP     R0, #0 \n"
 454 "    MOV     R0, R5 \n"
 455 "    BEQ     loc_FF99325C \n"
 456 "    BL      sub_FFAC86B0 \n"
 457 "    B       sub_FF993280 \n"
 458 
 459 "loc_FF99325C:\n"
 460 "    BL      sub_FFAC82DC_my \n"  // --> Patched. Old value = 0xFFAC82DC.
 461 "    LDR     PC, =0xFF993260 \n"  // Continue in firmware
 462 );
 463 }
 464 
 465 /*************************************************************/
 466 //** sub_FFAC82DC_my @ 0xFFAC82DC - 0xFFAC854C, length=157
 467 void __attribute__((naked,noinline)) sub_FFAC82DC_my() {
 468 asm volatile (
 469 "    STMFD   SP!, {R2-R8,LR} \n"
 470 "    MOV     R4, R0 \n"
 471 "    BL      sub_FFAC7EC0 \n"
 472 "    BL      sub_FF993958 \n"
 473 "    LDR     R7, =0x1C3E4 \n"
 474 "    LDR     R0, [R7, #0x184] \n"
 475 "    CMP     R0, #2 \n"
 476 "    BNE     loc_FFAC8318 \n"
 477 "    ADD     R0, R7, #0x100 \n"
 478 "    LDRH    R0, [R0, #0x8E] \n"
 479 "    CMP     R0, #3 \n"
 480 "    LDRNE   R0, [R4, #8] \n"
 481 "    CMPNE   R0, #1 \n"
 482 "    MOVLS   R0, #3 \n"
 483 "    BLLS    sub_FF9195A0 \n"
 484 
 485 "loc_FFAC8318:\n"
 486 "    LDR     R0, =0x12F \n"
 487 "    MOV     R2, #4 \n"
 488 "    ADD     R1, SP, #4 \n"
 489 "    BL      _GetPropertyCase \n"
 490 "    TST     R0, #1 \n"
 491 "    MOVNE   R2, #0x18C \n"
 492 "    LDRNE   R1, =0xFFAC8560 /*'SsStandardCaptureSeq.c'*/ \n"
 493 "    MOVNE   R0, #0 \n"
 494 "    BLNE    _DebugAssert \n"
 495 "    LDR     R0, [SP, #4] \n"
 496 "    AND     R0, R0, #0xFF00 \n"
 497 "    CMP     R0, #0x600 \n"
 498 "    LDRNE   R0, =0xFFAC7B84 \n"
 499 "    LDREQ   R0, =0xFFAC82A4 \n"
 500 "    MOVNE   R1, R4 \n"
 501 "    MOVEQ   R1, #0 \n"
 502 "    BL      sub_FF8C8870 \n"
 503 "    BL      wait_until_remote_button_is_released\n" // added
 504 "    BL      capt_seq_hook_set_nr\n"                 // added
 505 "    MOV     R0, R4 \n"
 506 "    BL      sub_FFAC7FE8 \n"
 507 "    LDR     R1, =0xC54C \n"
 508 "    MOV     R2, #4 \n"
 509 "    MOV     R0, #0x8A \n"
 510 "    BL      _GetPropertyCase \n"
 511 "    TST     R0, #1 \n"
 512 "    LDRNE   R2, =0x19B \n"
 513 "    LDRNE   R1, =0xFFAC8560 /*'SsStandardCaptureSeq.c'*/ \n"
 514 "    MOVNE   R0, #0 \n"
 515 "    BLNE    _DebugAssert \n"
 516 "    BL      sub_FF88C0C4 \n"
 517 "    BL      sub_FF97A9C0 \n"
 518 "    MOV     R1, #0 \n"
 519 "    MOV     R0, R4 \n"
 520 "    BL      sub_FFAC8658 \n"
 521 "    MOV     R6, R0 \n"
 522 "    LDR     R0, [SP, #4] \n"
 523 "    LDR     R8, =0xC54C \n"
 524 "    AND     R0, R0, #0xFF00 \n"
 525 "    CMP     R0, #0x600 \n"
 526 "    LDRH    R0, [R4, #0x18] \n"
 527 "    LDRNE   R2, =0xFFAC7DAC \n"
 528 "    LDREQ   R2, =0xFFAC7D30 \n"
 529 "    CMP     R0, #0 \n"
 530 "    BEQ     loc_FFAC83D4 \n"
 531 "    CMP     R0, #1 \n"
 532 "    BEQ     loc_FFAC83F8 \n"
 533 "    CMP     R0, #4 \n"
 534 "    BNE     loc_FFAC846C \n"
 535 
 536 "loc_FFAC83D4:\n"
 537 "    STR     R6, [SP] \n"
 538 "    MOV     R3, R2 \n"
 539 "    LDR     R1, [R4, #0x34] \n"
 540 "    LDR     R2, [R8] \n"
 541 "    MOV     R0, R4 \n"
 542 "    BL      sub_FFAC7974 \n"
 543 "    MOV     R5, R0 \n"
 544 "    BL      sub_FF8C4FF4 \n"
 545 "    B       loc_FFAC8480 \n"
 546 
 547 "loc_FFAC83F8:\n"
 548 "    STR     R6, [SP] \n"
 549 "    MOV     R3, R2 \n"
 550 "    LDR     R1, [R4, #0x34] \n"
 551 "    LDR     R2, [R8] \n"
 552 "    MOV     R0, R4 \n"
 553 "    BL      sub_FFAC79F4 \n"
 554 "    MOV     R5, R0 \n"
 555 "    MOV     R1, #0 \n"
 556 "    MOV     R0, #0x45 \n"
 557 "    BL      sub_FF83209C \n"
 558 "    TST     R5, #1 \n"
 559 "    BNE     loc_FFAC8480 \n"
 560 "    LDR     R0, =0xFFAC82A4 \n"
 561 "    MOV     R1, #0 \n"
 562 "    BL      sub_FF8C8870 \n"
 563 "    MOV     R1, #1 \n"
 564 "    MOV     R0, R4 \n"
 565 "    BL      sub_FFAC8658 \n"
 566 "    MOV     R6, R0 \n"
 567 "    LDR     R0, [R8] \n"
 568 "    BL      sub_FFAC7E44 \n"
 569 "    LDR     R1, [R4, #0x34] \n"
 570 "    LDR     R2, [R8] \n"
 571 "    MOV     R3, R6 \n"
 572 "    MOV     R0, R4 \n"
 573 "    BL      sub_FFAC7A74 \n"
 574 "    MOV     R5, R0 \n"
 575 "    BL      sub_FFAC78FC \n"
 576 "    B       loc_FFAC8480 \n"
 577 
 578 "loc_FFAC846C:\n"
 579 "    LDR     R2, =0x1D5 \n"
 580 "    LDR     R1, =0xFFAC8560 /*'SsStandardCaptureSeq.c'*/ \n"
 581 "    MOV     R0, #0 \n"
 582 "    BL      _DebugAssert \n"
 583 "    MOV     R5, #0x1D \n"
 584 
 585 "loc_FFAC8480:\n"
 586 "    BL      sub_FF97A9D8 \n"
 587 "    LDR     R8, =0xFFAC82A4 \n"
 588 "    TST     R5, #1 \n"
 589 "    BNE     loc_FFAC8500 \n"
 590 "    LDR     R0, [R7, #0xF8] \n"
 591 "    CMP     R0, #0 \n"
 592 "    BNE     loc_FFAC84B8 \n"
 593 "    MOV     R0, R4 \n"
 594 "    BL      sub_FF994C34 \n"
 595 "    TST     R0, #1 \n"
 596 "    LDRNE   R2, =0x1EF \n"
 597 "    LDRNE   R1, =0xFFAC8560 /*'SsStandardCaptureSeq.c'*/ \n"
 598 "    MOVNE   R0, #0 \n"
 599 "    BLNE    _DebugAssert \n"
 600 "    BL      capt_seq_hook_raw_here \n"         // added
 601 
 602 "loc_FFAC84B8:\n"
 603 "    MOV     R0, R4 \n"
 604 "    BL      sub_FFAC80D0 \n"
 605 "    MOV     R0, R4 \n"
 606 "    BL      sub_FFAC8088 \n"
 607 "    CMP     R6, R8 \n"
 608 "    BEQ     loc_FFAC8500 \n"
 609 "    BL      sub_FF993E8C \n"
 610 "    MOV     R3, #0x1FC \n"
 611 "    STR     R3, [SP] \n"
 612 "    LDR     R2, =0x3A98 \n"
 613 "    LDR     R3, =0xFFAC8560 /*'SsStandardCaptureSeq.c'*/ \n"
 614 "    MOV     R1, #4 \n"
 615 "    BL      sub_FF88EC08 \n"
 616 "    CMP     R0, #0 \n"
 617 "    MOVNE   R2, #0x1FC \n"
 618 "    LDRNE   R1, =0xFFAC8560 /*'SsStandardCaptureSeq.c'*/ \n"
 619 "    MOVNE   R0, #0 \n"
 620 "    BLNE    _DebugAssert \n"
 621 
 622 "loc_FFAC8500:\n"
 623 "    MOV     R2, R4 \n"
 624 "    MOV     R1, #1 \n"
 625 "    MOV     R0, R5 \n"
 626 "    BL      sub_FF88742C \n"
 627 "    LDR     R0, [R7, #0x28] \n"
 628 "    CMP     R0, #0 \n"
 629 "    BEQ     loc_FFAC8534 \n"
 630 "    SUBS    R1, R6, R8 \n"
 631 "    MOVNE   R1, #1 \n"
 632 "    MOV     R2, R5 \n"
 633 "    MOV     R0, R4 \n"
 634 "    BL      sub_FF9943C0 \n"
 635 "    B       loc_FFAC8548 \n"
 636 
 637 "loc_FFAC8534:\n"
 638 "    SUBS    R1, R6, R8 \n"
 639 "    MOVNE   R1, #1 \n"
 640 "    MOV     R2, R5 \n"
 641 "    MOV     R0, R4 \n"
 642 "    BL      sub_FF994354 \n"
 643 
 644 "loc_FFAC8548:\n"
 645 "    MOV     R0, R5 \n"
 646 "    LDMFD   SP!, {R2-R8,PC} \n"
 647 "    .ltorg\n"         // added
 648 );
 649 }
 650 
 651 /*************************************************************/
 652 //** exp_drv_task @ 0xFF8D7434 - 0xFF8D7AB8, length=418
 653 void __attribute__((naked,noinline)) exp_drv_task() {
 654 asm volatile (
 655 "    STMFD   SP!, {R4-R9,LR} \n"
 656 "    SUB     SP, SP, #0x2C \n"
 657 "    LDR     R6, =0x4300 \n"
 658 "    LDR     R7, =0xBB8 \n"
 659 "    LDR     R4, =0x5B404 \n"
 660 "    MOV     R0, #0 \n"
 661 "    ADD     R5, SP, #0x1C \n"
 662 "    STR     R0, [SP, #0xC] \n"
 663 
 664 "loc_FF8D7454:\n"
 665 "    LDR     R0, [R6, #0x20] \n"
 666 "    MOV     R2, #0 \n"
 667 "    ADD     R1, SP, #0x28 \n"
 668 "    BL      sub_006B8458 /*_ReceiveMessageQueue*/ \n"
 669 "    LDR     R0, [SP, #0xC] \n"
 670 "    CMP     R0, #1 \n"
 671 "    BNE     loc_FF8D74A0 \n"
 672 "    LDR     R0, [SP, #0x28] \n"
 673 "    LDR     R0, [R0] \n"
 674 "    CMP     R0, #0x14 \n"
 675 "    CMPNE   R0, #0x15 \n"
 676 "    CMPNE   R0, #0x16 \n"
 677 "    CMPNE   R0, #0x17 \n"
 678 "    BEQ     loc_FF8D7604 \n"
 679 "    CMP     R0, #0x2A \n"
 680 "    BEQ     loc_FF8D7588 \n"
 681 "    ADD     R1, SP, #0xC \n"
 682 "    MOV     R0, #0 \n"
 683 "    BL      sub_FF8D73D4 \n"
 684 
 685 "loc_FF8D74A0:\n"
 686 "    LDR     R0, [SP, #0x28] \n"
 687 "    LDR     R1, [R0] \n"
 688 "    CMP     R1, #0x30 \n"
 689 "    BNE     loc_FF8D74CC \n"
 690 "    BL      sub_FF8D8A80 \n"
 691 "    LDR     R0, [R6, #0x1C] \n"
 692 "    MOV     R1, #1 \n"
 693 "    BL      sub_006B81EC /*_SetEventFlag*/ \n"
 694 "    BL      _ExitTask \n"
 695 "    ADD     SP, SP, #0x2C \n"
 696 "    LDMFD   SP!, {R4-R9,PC} \n"
 697 
 698 "loc_FF8D74CC:\n"
 699 "    CMP     R1, #0x2F \n"
 700 "    BNE     loc_FF8D74E8 \n"
 701 "    LDR     R2, [R0, #0xA8]! \n"
 702 "    LDR     R1, [R0, #4] \n"
 703 "    MOV     R0, R1 \n"
 704 "    BLX     R2 \n"
 705 "    B       loc_FF8D7AB0 \n"
 706 
 707 "loc_FF8D74E8:\n"
 708 "    CMP     R1, #0x28 \n"
 709 "    BNE     loc_FF8D7538 \n"
 710 "    LDR     R0, [R6, #0x1C] \n"
 711 "    MOV     R1, #0x80 \n"
 712 "    BL      sub_006B8234 /*_ClearEventFlag*/ \n"
 713 "    LDR     R0, =0xFF8D2810 \n"
 714 "    MOV     R1, #0x80 \n"
 715 "    BL      sub_FF8841E8 \n"
 716 "    LDR     R0, [R6, #0x1C] \n"
 717 "    MOV     R2, R7 \n"
 718 "    MOV     R1, #0x80 \n"
 719 "    BL      sub_006B8120 /*_WaitForAllEventFlag*/ \n"
 720 "    TST     R0, #1 \n"
 721 "    LDRNE   R2, =0x170B \n"
 722 "    BNE     loc_FF8D75F4 \n"
 723 
 724 "loc_FF8D7524:\n"
 725 "    LDR     R1, [SP, #0x28] \n"
 726 "    LDR     R0, [R1, #0xAC] \n"
 727 "    LDR     R1, [R1, #0xA8] \n"
 728 "    BLX     R1 \n"
 729 "    B       loc_FF8D7AB0 \n"
 730 
 731 "loc_FF8D7538:\n"
 732 "    CMP     R1, #0x29 \n"
 733 "    BNE     loc_FF8D7580 \n"
 734 "    ADD     R1, SP, #0xC \n"
 735 "    BL      sub_FF8D73D4 \n"
 736 "    LDR     R0, [R6, #0x1C] \n"
 737 "    MOV     R1, #0x100 \n"
 738 "    BL      sub_006B8234 /*_ClearEventFlag*/ \n"
 739 "    LDR     R0, =0xFF8D2820 \n"
 740 "    MOV     R1, #0x100 \n"
 741 "    BL      sub_FF8843F8 \n"
 742 "    LDR     R0, [R6, #0x1C] \n"
 743 "    MOV     R2, R7 \n"
 744 "    MOV     R1, #0x100 \n"
 745 "    BL      sub_006B8120 /*_WaitForAllEventFlag*/ \n"
 746 "    TST     R0, #1 \n"
 747 "    BEQ     loc_FF8D7524 \n"
 748 "    LDR     R2, =0x1715 \n"
 749 "    B       loc_FF8D75F4 \n"
 750 
 751 "loc_FF8D7580:\n"
 752 "    CMP     R1, #0x2A \n"
 753 "    BNE     loc_FF8D7598 \n"
 754 
 755 "loc_FF8D7588:\n"
 756 "    LDR     R0, [SP, #0x28] \n"
 757 "    ADD     R1, SP, #0xC \n"
 758 "    BL      sub_FF8D73D4 \n"
 759 "    B       loc_FF8D7524 \n"
 760 
 761 "loc_FF8D7598:\n"
 762 "    CMP     R1, #0x2D \n"
 763 "    BNE     loc_FF8D75B0 \n"
 764 "    BL      sub_FF8BFD88 \n"
 765 "    BL      sub_FF8C0BEC \n"
 766 "    BL      sub_FF8C06CC \n"
 767 "    B       loc_FF8D7524 \n"
 768 
 769 "loc_FF8D75B0:\n"
 770 "    CMP     R1, #0x2E \n"
 771 "    BNE     loc_FF8D7604 \n"
 772 "    LDR     R0, [R6, #0x1C] \n"
 773 "    MOV     R1, #4 \n"
 774 "    BL      sub_006B8234 /*_ClearEventFlag*/ \n"
 775 "    LDR     R1, =0xFF8D2840 \n"
 776 "    LDR     R0, =0xFFFFF400 \n"
 777 "    MOV     R2, #4 \n"
 778 "    BL      sub_FF8D8AE4 \n"
 779 "    BL      sub_FF8BFA1C \n"
 780 "    LDR     R0, [R6, #0x1C] \n"
 781 "    MOV     R2, R7 \n"
 782 "    MOV     R1, #4 \n"
 783 "    BL      sub_006B8034 /*_WaitForAnyEventFlag*/ \n"
 784 "    TST     R0, #1 \n"
 785 "    BEQ     loc_FF8D7524 \n"
 786 "    LDR     R2, =0x174D \n"
 787 
 788 "loc_FF8D75F4:\n"
 789 "    LDR     R1, =0xFF8D2FC4 /*'ExpDrv.c'*/ \n"
 790 "    MOV     R0, #0 \n"
 791 "    BL      _DebugAssert \n"
 792 "    B       loc_FF8D7524 \n"
 793 
 794 "loc_FF8D7604:\n"
 795 "    LDR     R0, [SP, #0x28] \n"
 796 "    MOV     R8, #1 \n"
 797 "    LDR     R1, [R0] \n"
 798 "    CMP     R1, #0x12 \n"
 799 "    CMPNE   R1, #0x13 \n"
 800 "    BNE     loc_FF8D766C \n"
 801 "    LDR     R1, [R0, #0x94] \n"
 802 "    ADD     R1, R1, R1, LSL#1 \n"
 803 "    ADD     R1, R0, R1, LSL#2 \n"
 804 "    SUB     R1, R1, #8 \n"
 805 "    LDMIA   R1, {R2,R3,R9} \n"
 806 "    STMIA   R5, {R2,R3,R9} \n"
 807 "    BL      sub_FF8D5838 \n"
 808 "    LDR     R0, [SP, #0x28] \n"
 809 "    LDR     R1, [R0, #0x94] \n"
 810 "    LDR     R3, [R0, #0xA8] \n"
 811 "    LDR     R2, [R0, #0xAC] \n"
 812 "    ADD     R0, R0, #4 \n"
 813 "    BLX     R3 \n"
 814 "    LDR     R0, [SP, #0x28] \n"
 815 "    BL      sub_FF8D8DC0 \n"
 816 "    LDR     R0, [SP, #0x28] \n"
 817 "    LDR     R1, [R0, #0x94] \n"
 818 "    LDR     R2, [R0, #0xB4] \n"
 819 "    LDR     R3, [R0, #0xB0] \n"
 820 "    B       loc_FF8D7974 \n"
 821 
 822 "loc_FF8D766C:\n"
 823 "    CMP     R1, #0x14 \n"
 824 "    CMPNE   R1, #0x15 \n"
 825 "    CMPNE   R1, #0x16 \n"
 826 "    CMPNE   R1, #0x17 \n"
 827 "    BNE     loc_FF8D7714 \n"
 828 "    ADD     R3, SP, #0xC \n"
 829 "    MOV     R2, SP \n"
 830 "    ADD     R1, SP, #0x1C \n"
 831 "    BL      sub_FF8D5AA8 \n"
 832 "    CMP     R0, #1 \n"
 833 "    MOV     R9, R0 \n"
 834 "    CMPNE   R9, #5 \n"
 835 "    BNE     loc_FF8D76C0 \n"
 836 "    LDR     R0, [SP, #0x28] \n"
 837 "    MOV     R2, R9 \n"
 838 "    LDR     R1, [R0, #0x94] \n"
 839 "    LDR     R12, [R0, #0xA8] \n"
 840 "    LDR     R3, [R0, #0xAC] \n"
 841 "    ADD     R0, R0, #4 \n"
 842 "    BLX     R12 \n"
 843 "    B       loc_FF8D76F8 \n"
 844 
 845 "loc_FF8D76C0:\n"
 846 "    LDR     R0, [SP, #0x28] \n"
 847 "    CMP     R9, #2 \n"
 848 "    LDR     R1, [R0, #0x94] \n"
 849 "    LDR     R12, [R0, #0xA8] \n"
 850 "    LDR     R3, [R0, #0xAC] \n"
 851 "    CMPNE   R9, #6 \n"
 852 "    MOV     R2, R9 \n"
 853 "    ADD     R0, R0, #4 \n"
 854 "    BNE     loc_FF8D770C \n"
 855 "    BLX     R12 \n"
 856 "    LDR     R0, [SP, #0x28] \n"
 857 "    MOV     R2, SP \n"
 858 "    ADD     R1, SP, #0x1C \n"
 859 "    BL      sub_FF8D70EC \n"
 860 
 861 "loc_FF8D76F8:\n"
 862 "    LDR     R0, [SP, #0x28] \n"
 863 "    LDR     R2, [SP, #0xC] \n"
 864 "    MOV     R1, R9 \n"
 865 "    BL      sub_FF8D736C \n"
 866 "    B       loc_FF8D797C \n"
 867 
 868 "loc_FF8D770C:\n"
 869 "    BLX     R12 \n"
 870 "    B       loc_FF8D797C \n"
 871 
 872 "loc_FF8D7714:\n"
 873 "    CMP     R1, #0x24 \n"
 874 "    CMPNE   R1, #0x25 \n"
 875 "    BNE     loc_FF8D7760 \n"
 876 "    LDR     R1, [R0, #0x94] \n"
 877 "    ADD     R1, R1, R1, LSL#1 \n"
 878 "    ADD     R1, R0, R1, LSL#2 \n"
 879 "    SUB     R1, R1, #8 \n"
 880 "    LDMIA   R1, {R2,R3,R9} \n"
 881 "    STMIA   R5, {R2,R3,R9} \n"
 882 "    BL      sub_FF8D4754 \n"
 883 "    LDR     R0, [SP, #0x28] \n"
 884 "    LDR     R1, [R0, #0x94] \n"
 885 "    LDR     R3, [R0, #0xA8] \n"
 886 "    LDR     R2, [R0, #0xAC] \n"
 887 "    ADD     R0, R0, #4 \n"
 888 "    BLX     R3 \n"
 889 "    LDR     R0, [SP, #0x28] \n"
 890 "    BL      sub_FF8D4BA4 \n"
 891 "    B       loc_FF8D797C \n"
 892 
 893 "loc_FF8D7760:\n"
 894 "    ADD     R1, R0, #4 \n"
 895 "    LDMIA   R1, {R2,R3,R9} \n"
 896 "    STMIA   R5, {R2,R3,R9} \n"
 897 "    LDR     R1, [R0] \n"
 898 "    CMP     R1, #0x28 \n"
 899 "    ADDCC   PC, PC, R1, LSL#2 \n"
 900 "    B       loc_FF8D7964 \n"
 901 "    B       loc_FF8D781C \n"
 902 "    B       loc_FF8D781C \n"
 903 "    B       loc_FF8D7824 \n"
 904 "    B       loc_FF8D782C \n"
 905 "    B       loc_FF8D782C \n"
 906 "    B       loc_FF8D782C \n"
 907 "    B       loc_FF8D781C \n"
 908 "    B       loc_FF8D7824 \n"
 909 "    B       loc_FF8D782C \n"
 910 "    B       loc_FF8D782C \n"
 911 "    B       loc_FF8D7844 \n"
 912 "    B       loc_FF8D7844 \n"
 913 "    B       loc_FF8D7950 \n"
 914 "    B       loc_FF8D7958 \n"
 915 "    B       loc_FF8D7958 \n"
 916 "    B       loc_FF8D7958 \n"
 917 "    B       loc_FF8D7958 \n"
 918 "    B       loc_FF8D7960 \n"
 919 "    B       loc_FF8D7964 \n"
 920 "    B       loc_FF8D7964 \n"
 921 "    B       loc_FF8D7964 \n"
 922 "    B       loc_FF8D7964 \n"
 923 "    B       loc_FF8D7964 \n"
 924 "    B       loc_FF8D7964 \n"
 925 "    B       loc_FF8D7834 \n"
 926 "    B       loc_FF8D783C \n"
 927 "    B       loc_FF8D783C \n"
 928 "    B       loc_FF8D783C \n"
 929 "    B       loc_FF8D7850 \n"
 930 "    B       loc_FF8D7850 \n"
 931 "    B       loc_FF8D7858 \n"
 932 "    B       loc_FF8D7890 \n"
 933 "    B       loc_FF8D78C8 \n"
 934 "    B       loc_FF8D7900 \n"
 935 "    B       loc_FF8D7938 \n"
 936 "    B       loc_FF8D7938 \n"
 937 "    B       loc_FF8D7964 \n"
 938 "    B       loc_FF8D7964 \n"
 939 "    B       loc_FF8D7940 \n"
 940 "    B       loc_FF8D7948 \n"
 941 
 942 "loc_FF8D781C:\n"
 943 "    BL      sub_FF8D2E44 \n"
 944 "    B       loc_FF8D7964 \n"
 945 
 946 "loc_FF8D7824:\n"
 947 "    BL      sub_FF8D3114 \n"
 948 "    B       loc_FF8D7964 \n"
 949 
 950 "loc_FF8D782C:\n"
 951 "    BL      sub_FF8D3354 \n"
 952 "    B       loc_FF8D7964 \n"
 953 
 954 "loc_FF8D7834:\n"
 955 "    BL      sub_FF8D369C \n"
 956 "    B       loc_FF8D7964 \n"
 957 
 958 "loc_FF8D783C:\n"
 959 "    BL      sub_FF8D38CC \n"
 960 "    B       loc_FF8D7964 \n"
 961 
 962 "loc_FF8D7844:\n"
 963 "    BL      sub_FF8D3CBC_my \n"  // --> Patched. Old value = 0xFF8D3CBC.
 964 "    MOV     R8, #0 \n"
 965 "    B       loc_FF8D7964 \n"
 966 
 967 "loc_FF8D7850:\n"
 968 "    BL      sub_FF8D3E98 \n"
 969 "    B       loc_FF8D7964 \n"
 970 
 971 "loc_FF8D7858:\n"
 972 "    LDRH    R1, [R0, #4] \n"
 973 "    STRH    R1, [SP, #0x1C] \n"
 974 "    LDRH    R1, [R4, #2] \n"
 975 "    STRH    R1, [SP, #0x1E] \n"
 976 "    LDRH    R1, [R4, #4] \n"
 977 "    STRH    R1, [SP, #0x20] \n"
 978 "    LDRH    R1, [R4, #6] \n"
 979 "    STRH    R1, [SP, #0x22] \n"
 980 "    LDRH    R1, [R0, #0xC] \n"
 981 "    STRH    R1, [SP, #0x24] \n"
 982 "    LDRH    R1, [R4, #0xA] \n"
 983 "    STRH    R1, [SP, #0x26] \n"
 984 "    BL      sub_FF8D43DC \n"
 985 "    B       loc_FF8D7964 \n"
 986 
 987 "loc_FF8D7890:\n"
 988 "    LDRH    R1, [R0, #4] \n"
 989 "    STRH    R1, [SP, #0x1C] \n"
 990 "    LDRH    R1, [R4, #2] \n"
 991 "    STRH    R1, [SP, #0x1E] \n"
 992 "    LDRH    R1, [R4, #4] \n"
 993 "    STRH    R1, [SP, #0x20] \n"
 994 "    LDRH    R1, [R4, #6] \n"
 995 "    STRH    R1, [SP, #0x22] \n"
 996 "    LDRH    R1, [R4, #8] \n"
 997 "    STRH    R1, [SP, #0x24] \n"
 998 "    LDRH    R1, [R4, #0xA] \n"
 999 "    STRH    R1, [SP, #0x26] \n"
1000 "    BL      sub_FF8D8B30 \n"
1001 "    B       loc_FF8D7964 \n"
1002 
1003 "loc_FF8D78C8:\n"
1004 "    LDRH    R1, [R4] \n"
1005 "    STRH    R1, [SP, #0x1C] \n"
1006 "    LDRH    R1, [R0, #6] \n"
1007 "    STRH    R1, [SP, #0x1E] \n"
1008 "    LDRH    R1, [R4, #4] \n"
1009 "    STRH    R1, [SP, #0x20] \n"
1010 "    LDRH    R1, [R4, #6] \n"
1011 "    STRH    R1, [SP, #0x22] \n"
1012 "    LDRH    R1, [R4, #8] \n"
1013 "    STRH    R1, [SP, #0x24] \n"
1014 "    LDRH    R1, [R4, #0xA] \n"
1015 "    STRH    R1, [SP, #0x26] \n"
1016 "    BL      sub_FF8D8C6C \n"
1017 "    B       loc_FF8D7964 \n"
1018 
1019 "loc_FF8D7900:\n"
1020 "    LDRH    R1, [R4] \n"
1021 "    STRH    R1, [SP, #0x1C] \n"
1022 "    LDRH    R1, [R4, #2] \n"
1023 "    STRH    R1, [SP, #0x1E] \n"
1024 "    LDRH    R1, [R4, #4] \n"
1025 "    STRH    R1, [SP, #0x20] \n"
1026 "    LDRH    R1, [R4, #6] \n"
1027 "    STRH    R1, [SP, #0x22] \n"
1028 "    LDRH    R1, [R0, #0xC] \n"
1029 "    STRH    R1, [SP, #0x24] \n"
1030 "    LDRH    R1, [R4, #0xA] \n"
1031 "    STRH    R1, [SP, #0x26] \n"
1032 "    BL      sub_FF8D8D18 \n"
1033 "    B       loc_FF8D7964 \n"
1034 
1035 "loc_FF8D7938:\n"
1036 "    BL      sub_FF8D44F0 \n"
1037 "    B       loc_FF8D7964 \n"
1038 
1039 "loc_FF8D7940:\n"
1040 "    BL      sub_FF8D4CBC \n"
1041 "    B       loc_FF8D7964 \n"
1042 
1043 "loc_FF8D7948:\n"
1044 "    BL      sub_FF8D5064 \n"
1045 "    B       loc_FF8D7964 \n"
1046 
1047 "loc_FF8D7950:\n"
1048 "    BL      sub_FF8D52D4 \n"
1049 "    B       loc_FF8D7964 \n"
1050 
1051 "loc_FF8D7958:\n"
1052 "    BL      sub_FF8D54A0 \n"
1053 "    B       loc_FF8D7964 \n"
1054 
1055 "loc_FF8D7960:\n"
1056 "    BL      sub_FF8D5618 \n"
1057 
1058 "loc_FF8D7964:\n"
1059 "    LDR     R0, [SP, #0x28] \n"
1060 "    LDR     R1, [R0, #0x94] \n"
1061 "    LDR     R2, [R0, #0xAC] \n"
1062 "    LDR     R3, [R0, #0xA8] \n"
1063 
1064 "loc_FF8D7974:\n"
1065 "    ADD     R0, R0, #4 \n"
1066 "    BLX     R3 \n"
1067 
1068 "loc_FF8D797C:\n"
1069 "    LDR     R0, [SP, #0x28] \n"
1070 "    LDR     R0, [R0] \n"
1071 "    CMP     R0, #0x10 \n"
1072 "    BEQ     loc_FF8D79B4 \n"
1073 "    BGT     loc_FF8D79A4 \n"
1074 "    CMP     R0, #1 \n"
1075 "    CMPNE   R0, #4 \n"
1076 "    CMPNE   R0, #0xE \n"
1077 "    BNE     loc_FF8D79E8 \n"
1078 "    B       loc_FF8D79B4 \n"
1079 
1080 "loc_FF8D79A4:\n"
1081 "    CMP     R0, #0x13 \n"
1082 "    CMPNE   R0, #0x17 \n"
1083 "    CMPNE   R0, #0x1A \n"
1084 "    BNE     loc_FF8D79E8 \n"
1085 
1086 "loc_FF8D79B4:\n"
1087 "    LDRSH   R0, [R4] \n"
1088 "    CMN     R0, #0xC00 \n"
1089 "    LDRNESH R1, [R4, #8] \n"
1090 "    CMNNE   R1, #0xC00 \n"
1091 "    STRNEH  R0, [SP, #0x1C] \n"
1092 "    STRNEH  R1, [SP, #0x24] \n"
1093 "    BNE     loc_FF8D79E8 \n"
1094 "    ADD     R0, SP, #0x10 \n"
1095 "    BL      sub_FF8D8FE4 \n"
1096 "    LDRH    R0, [SP, #0x10] \n"
1097 "    STRH    R0, [SP, #0x1C] \n"
1098 "    LDRH    R0, [SP, #0x18] \n"
1099 "    STRH    R0, [SP, #0x24] \n"
1100 
1101 "loc_FF8D79E8:\n"
1102 "    LDR     R0, [SP, #0x28] \n"
1103 "    CMP     R8, #1 \n"
1104 "    BNE     loc_FF8D7A38 \n"
1105 "    LDR     R1, [R0, #0x94] \n"
1106 "    MOV     R2, #0xC \n"
1107 "    ADD     R1, R1, R1, LSL#1 \n"
1108 "    ADD     R0, R0, R1, LSL#2 \n"
1109 "    SUB     R8, R0, #8 \n"
1110 "    LDR     R0, =0x5B404 \n"
1111 "    ADD     R1, SP, #0x1C \n"
1112 "    BL      sub_006BCD9C \n"
1113 "    LDR     R0, =0x5B410 \n"
1114 "    MOV     R2, #0xC \n"
1115 "    ADD     R1, SP, #0x1C \n"
1116 "    BL      sub_006BCD9C \n"
1117 "    LDR     R0, =0x5B41C \n"
1118 "    MOV     R2, #0xC \n"
1119 "    MOV     R1, R8 \n"
1120 "    BL      sub_006BCD9C \n"
1121 "    B       loc_FF8D7AB0 \n"
1122 
1123 "loc_FF8D7A38:\n"
1124 "    LDR     R0, [R0] \n"
1125 "    MOV     R3, #1 \n"
1126 "    CMP     R0, #0xB \n"
1127 "    BNE     loc_FF8D7A7C \n"
1128 "    MOV     R2, #0 \n"
1129 "    STRD    R2, [SP] \n"
1130 "    MOV     R2, R3 \n"
1131 "    MOV     R1, R3 \n"
1132 "    MOV     R0, #0 \n"
1133 "    BL      sub_FF8D2C10 \n"
1134 "    MOV     R3, #1 \n"
1135 "    MOV     R2, #0 \n"
1136 "    STRD    R2, [SP] \n"
1137 "    MOV     R2, R3 \n"
1138 "    MOV     R1, R3 \n"
1139 "    MOV     R0, #0 \n"
1140 "    B       loc_FF8D7AAC \n"
1141 
1142 "loc_FF8D7A7C:\n"
1143 "    MOV     R2, #1 \n"
1144 "    STRD    R2, [SP] \n"
1145 "    MOV     R3, R2 \n"
1146 "    MOV     R1, R2 \n"
1147 "    MOV     R0, R2 \n"
1148 "    BL      sub_FF8D2C10 \n"
1149 "    MOV     R3, #1 \n"
1150 "    MOV     R2, R3 \n"
1151 "    MOV     R1, R3 \n"
1152 "    MOV     R0, R3 \n"
1153 "    STR     R3, [SP] \n"
1154 "    STR     R3, [SP, #4] \n"
1155 
1156 "loc_FF8D7AAC:\n"
1157 "    BL      sub_FF8D2D8C \n"
1158 
1159 "loc_FF8D7AB0:\n"
1160 "    LDR     R0, [SP, #0x28] \n"
1161 "    BL      sub_FF8D8A80 \n"
1162 "    B       loc_FF8D7454 \n"
1163 );
1164 }
1165 
1166 /*************************************************************/
1167 //** sub_FF8D3CBC_my @ 0xFF8D3CBC - 0xFF8D3D80, length=50
1168 void __attribute__((naked,noinline)) sub_FF8D3CBC_my() {
1169 asm volatile (
1170 "    STMFD   SP!, {R4-R8,LR} \n"
1171 "    LDR     R7, =0x4300 \n"
1172 "    MOV     R4, R0 \n"
1173 "    LDR     R0, [R7, #0x1C] \n"
1174 "    MOV     R1, #0x3E \n"
1175 "    BL      sub_006B8234 /*_ClearEventFlag*/ \n"
1176 "    MOV     R2, #0 \n"
1177 "    LDRSH   R0, [R4, #4] \n"
1178 "    MOV     R3, #1 \n"
1179 "    MOV     R1, R2 \n"
1180 "    BL      sub_FF8D28A8 \n"
1181 "    MOV     R6, R0 \n"
1182 "    LDRSH   R0, [R4, #6] \n"
1183 "    BL      sub_FF8D2A70 \n"
1184 "    LDRSH   R0, [R4, #8] \n"
1185 "    BL      sub_FF8D2AC8 \n"
1186 "    LDRSH   R0, [R4, #0xA] \n"
1187 "    BL      sub_FF8D2B20 \n"
1188 "    LDRSH   R0, [R4, #0xC] \n"
1189 "    MOV     R1, #0 \n"
1190 "    BL      sub_FF8D2B78 \n"
1191 "    MOV     R5, R0 \n"
1192 "    LDR     R0, [R4] \n"
1193 "    LDR     R8, =0x5B41C \n"
1194 "    CMP     R0, #0xB \n"
1195 "    MOVEQ   R6, #0 \n"
1196 "    MOVEQ   R5, R6 \n"
1197 "    BEQ     loc_FF8D3D54 \n"
1198 "    CMP     R6, #1 \n"
1199 "    BNE     loc_FF8D3D54 \n"
1200 "    LDRSH   R0, [R4, #4] \n"
1201 "    LDR     R1, =0xFF8D2800 \n"
1202 "    MOV     R2, #2 \n"
1203 "    BL      sub_FF884270 \n"
1204 "    STRH    R0, [R4, #4] \n"
1205 "    MOV     R0, #0 \n"
1206 "    STR     R0, [R7, #0x28] \n"
1207 "    B       loc_FF8D3D5C \n"
1208 
1209 "loc_FF8D3D54:\n"
1210 "    LDRH    R0, [R8] \n"
1211 "    STRH    R0, [R4, #4] \n"
1212 
1213 "loc_FF8D3D5C:\n"
1214 "    CMP     R5, #1 \n"
1215 "    LDRNEH  R0, [R8, #8] \n"
1216 "    BNE     loc_FF8D3D78 \n"
1217 "    LDRSH   R0, [R4, #0xC] \n"
1218 "    LDR     R1, =0xFF8D2884 \n"
1219 "    MOV     R2, #0x20 \n"
1220 "    BL      sub_FF8D8AEC \n"
1221 
1222 "loc_FF8D3D78:\n"
1223 "    STRH    R0, [R4, #0xC] \n"
1224 "    LDRSH   R0, [R4, #6] \n"
1225 "    BL      sub_FF8BFA94_my \n"  // --> Patched. Old value = 0xFF8BFA94.
1226 "    LDR     PC, =0xFF8D3D84 \n"  // Continue in firmware
1227 );
1228 }
1229 
1230 /*************************************************************/
1231 //** sub_FF8BFA94_my @ 0xFF8BFA94 - 0xFF8BFB08, length=30
1232 void __attribute__((naked,noinline)) sub_FF8BFA94_my() {
1233 asm volatile (
1234 "    STMFD   SP!, {R4-R6,LR} \n"
1235 "    LDR     R5, =0x3F14 \n"
1236 "    MOV     R4, R0 \n"
1237 "    LDR     R0, [R5, #4] \n"
1238 "    CMP     R0, #1 \n"
1239 "    MOVNE   R2, #0x168 \n"
1240 "    LDRNE   R1, =0xFF8BF844 /*'Shutter.c'*/ \n"
1241 "    MOVNE   R0, #0 \n"
1242 "    BLNE    _DebugAssert \n"
1243 "    CMN     R4, #0xC00 \n"
1244 "    LDREQSH R4, [R5, #2] \n"
1245 "    CMN     R4, #0xC00 \n"
1246 "    LDREQ   R2, =0x16E \n"
1247 "    LDREQ   R1, =0xFF8BF844 /*'Shutter.c'*/ \n"
1248 "    MOVEQ   R0, #0 \n"
1249 "    STRH    R4, [R5, #2] \n"
1250 "    BLEQ    _DebugAssert \n"
1251 "    MOV     R0, R4 \n"
1252 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
1253 "    MOV     R4, R0 \n"
1254 //"  BL      _sub_FF918CD0 \n"  // --> Nullsub call removed.
1255 "    MOV     R0, R4 \n"
1256 "    BL      sub_FF91BC5C \n"
1257 "    TST     R0, #1 \n"
1258 "    LDMEQFD SP!, {R4-R6,PC} \n"
1259 "    LDMFD   SP!, {R4-R6,LR} \n"
1260 "    LDR     R2, =0x173 \n"
1261 "    LDR     R1, =0xFF8BF844 /*'Shutter.c'*/ \n"
1262 "    MOV     R0, #0 \n"
1263 "    B       _DebugAssert \n"
1264 );
1265 }

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