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

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF9B4F70_my
  3. sub_FF9B4DA4_my
  4. sub_FFB06E5C_my
  5. exp_drv_task
  6. sub_FF8DD614_my
  7. sub_FF8CA250_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 #define NR_AUTO (0)        // have to explictly reset value back to 0 to enable auto
  10 #define PAUSE_FOR_FILE_COUNTER 350  // 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 @ 0xFF890CCC - 0xFF890F98, length=180
  16 void __attribute__((naked,noinline)) capt_seq_task() {
  17 asm volatile (
  18 "    STMFD   SP!, {R3-R7,LR} \n"
  19 "    LDR     R5, =0x1F514 \n"
  20 "    LDR     R7, =0x35A0 \n"
  21 "    MOV     R6, #0 \n"
  22 
  23 "loc_FF890CDC:\n"
  24 "    LDR     R0, [R7, #4] \n"
  25 "    MOV     R2, #0 \n"
  26 "    MOV     R1, SP \n"
  27 "    BL      sub_FF829E30 /*_ReceiveMessageQueue*/ \n"
  28 "    TST     R0, #1 \n"
  29 "    BEQ     loc_FF890D0C \n"
  30 "    LDR     R2, =0x443 \n"
  31 "    LDR     R1, =0xFF890640 /*'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_FF890D0C:\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_FF9B605C \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_FF890F5C \n"
  49 "    B       loc_FF890DCC \n"
  50 "    B       loc_FF890DE4 \n"
  51 "    B       loc_FF890DF0 \n"
  52 "    B       loc_FF890E04 \n"
  53 "    B       loc_FF890DFC \n"
  54 "    B       loc_FF890E10 \n"
  55 "    B       loc_FF890E18 \n"
  56 "    B       loc_FF890E20 \n"
  57 "    B       loc_FF890E2C \n"
  58 "    B       loc_FF890E58 \n"
  59 "    B       loc_FF890E38 \n"
  60 "    B       loc_FF890E44 \n"
  61 "    B       loc_FF890E4C \n"
  62 "    B       loc_FF890E60 \n"
  63 "    B       loc_FF890E68 \n"
  64 "    B       loc_FF890E70 \n"
  65 "    B       loc_FF890E78 \n"
  66 "    B       loc_FF890E80 \n"
  67 "    B       loc_FF890E8C \n"
  68 "    B       loc_FF890E94 \n"
  69 "    B       loc_FF890E9C \n"
  70 "    B       loc_FF890EA4 \n"
  71 "    B       loc_FF890EAC \n"
  72 "    B       loc_FF890EB4 \n"
  73 "    B       loc_FF890EBC \n"
  74 "    B       loc_FF890EC4 \n"
  75 "    B       loc_FF890ED0 \n"
  76 "    B       loc_FF890ED8 \n"
  77 "    B       loc_FF890EE0 \n"
  78 "    B       loc_FF890EE8 \n"
  79 "    B       loc_FF890EF0 \n"
  80 "    B       loc_FF890EFC \n"
  81 "    B       loc_FF890F04 \n"
  82 "    B       loc_FF890F10 \n"
  83 "    B       loc_FF890F3C \n"
  84 "    B       loc_FF890F48 \n"
  85 "    B       loc_FF890F6C \n"
  86 
  87 "loc_FF890DCC:\n"
  88 "    BL      shooting_expo_iso_override\n"      // added
  89 "    BL      sub_FF891508 \n"
  90 "    BL      shooting_expo_param_override\n"    // added
  91 "    BL      sub_FF88E20C \n"
  92 //To do: Check if this is needed.
  93 //"    MOV     R0, #0\n"                          // added
  94 //"    STR     R0, [R5,#0x28]\n"                  // added, fixes overrides behavior at short shutter press (from S95)
  95 "    LDR     R0, [R5, #0x28] \n"
  96 "    CMP     R0, #0 \n"
  97 "    BLNE    sub_FF9B4F70_my \n"  // --> Patched. Old value = 0xFF9B4F70.
  98 "    B       loc_FF890F6C \n"
  99 
 100 "loc_FF890DE4:\n"
 101 "    LDR     R0, [R0, #0x10] \n"
 102 "    BL      sub_FF9B4DA4_my \n"  // --> Patched. Old value = 0xFF9B4DA4.
 103 "    B       loc_FF890F6C \n"
 104 
 105 "loc_FF890DF0:\n"
 106 "    MOV     R0, #1 \n"
 107 "    BL      sub_FF891860 \n"
 108 "    B       loc_FF890F6C \n"
 109 
 110 "loc_FF890DFC:\n"
 111 "    BL      sub_FF891140 \n"
 112 "    B       loc_FF890E08 \n"
 113 
 114 "loc_FF890E04:\n"
 115 "    BL      sub_FF8914E4 \n"
 116 
 117 "loc_FF890E08:\n"
 118 "    STR     R6, [R5, #0x28] \n"
 119 "    B       loc_FF890F6C \n"
 120 
 121 "loc_FF890E10:\n"
 122 "    BL      sub_FF8914EC \n"
 123 "    B       loc_FF890F6C \n"
 124 
 125 "loc_FF890E18:\n"
 126 "    BL      sub_FF891724 \n"
 127 "    B       loc_FF890E30 \n"
 128 
 129 "loc_FF890E20:\n"
 130 "    LDR     R0, [R0, #0x10] \n"
 131 "    BL      sub_FF9B5058 \n"
 132 "    B       loc_FF890F6C \n"
 133 
 134 "loc_FF890E2C:\n"
 135 "    BL      sub_FF8917B8 \n"
 136 
 137 "loc_FF890E30:\n"
 138 "    BL      sub_FF88E20C \n"
 139 "    B       loc_FF890F6C \n"
 140 
 141 "loc_FF890E38:\n"
 142 "    LDR     R0, [R5, #0x54] \n"
 143 "    BL      sub_FF891E24 \n"
 144 "    B       loc_FF890F6C \n"
 145 
 146 "loc_FF890E44:\n"
 147 "    BL      sub_FF892278 \n"
 148 "    B       loc_FF890F6C \n"
 149 
 150 "loc_FF890E4C:\n"
 151 "    LDR     R0, [R0, #0xC] \n"
 152 "    BL      sub_FF8922E0 \n"
 153 "    B       loc_FF890F6C \n"
 154 
 155 "loc_FF890E58:\n"
 156 "    BL      sub_FF8914E4 \n"
 157 "    B       loc_FF890F6C \n"
 158 
 159 "loc_FF890E60:\n"
 160 "    BL      sub_FF9B38B0 \n"
 161 "    B       loc_FF890F6C \n"
 162 
 163 "loc_FF890E68:\n"
 164 "    BL      sub_FF9B3AE8 \n"
 165 "    B       loc_FF890F6C \n"
 166 
 167 "loc_FF890E70:\n"
 168 "    BL      sub_FF9B3BA4 \n"
 169 "    B       loc_FF890F6C \n"
 170 
 171 "loc_FF890E78:\n"
 172 "    BL      sub_FF9B3C7C \n"
 173 "    B       loc_FF890F6C \n"
 174 
 175 "loc_FF890E80:\n"
 176 "    MOV     R0, #0 \n"
 177 "    BL      sub_FF9B3F34 \n"
 178 "    B       loc_FF890F6C \n"
 179 
 180 "loc_FF890E8C:\n"
 181 "    BL      sub_FF9B4094 \n"
 182 "    B       loc_FF890F6C \n"
 183 
 184 "loc_FF890E94:\n"
 185 "    BL      sub_FF897E68 \n"
 186 "    B       loc_FF890F6C \n"
 187 
 188 "loc_FF890E9C:\n"
 189 "    BL      sub_FF897E74 \n"
 190 "    B       loc_FF890F6C \n"
 191 
 192 "loc_FF890EA4:\n"
 193 "    BL      sub_FF9B4130 \n"
 194 "    B       loc_FF890F6C \n"
 195 
 196 "loc_FF890EAC:\n"
 197 "    BL      sub_FF9B41DC \n"
 198 "    B       loc_FF890F6C \n"
 199 
 200 "loc_FF890EB4:\n"
 201 "    BL      sub_FF8919A8 \n"
 202 "    B       loc_FF890F6C \n"
 203 
 204 "loc_FF890EBC:\n"
 205 "    MOV     R0, #0 \n"
 206 "    B       loc_FF890EC8 \n"
 207 
 208 "loc_FF890EC4:\n"
 209 "    LDR     R0, [R0, #0xC] \n"
 210 
 211 "loc_FF890EC8:\n"
 212 "    BL      sub_FF891A38 \n"
 213 "    B       loc_FF890F6C \n"
 214 
 215 "loc_FF890ED0:\n"
 216 "    BL      sub_FF9B3E14 \n"
 217 "    B       loc_FF890F6C \n"
 218 
 219 "loc_FF890ED8:\n"
 220 "    BL      sub_FF9B3EA4 \n"
 221 "    B       loc_FF890F6C \n"
 222 
 223 "loc_FF890EE0:\n"
 224 "    BL      sub_FF8947F8 \n"
 225 "    B       loc_FF890F6C \n"
 226 
 227 "loc_FF890EE8:\n"
 228 "    BL      sub_FF8948E8 \n"
 229 "    B       loc_FF890F6C \n"
 230 
 231 "loc_FF890EF0:\n"
 232 "    LDR     R0, [R0, #0xC] \n"
 233 "    BL      sub_FF9B42EC \n"
 234 "    B       loc_FF890F6C \n"
 235 
 236 "loc_FF890EFC:\n"
 237 "    BL      sub_FF9B4374 \n"
 238 "    B       loc_FF890F6C \n"
 239 
 240 "loc_FF890F04:\n"
 241 "    BL      sub_FF894A78 \n"
 242 "    BL      sub_FF894940 \n"
 243 "    B       loc_FF890F6C \n"
 244 
 245 "loc_FF890F10:\n"
 246 "    BL      sub_FF896B18 \n"
 247 "    LDR     R0, =0x1F614 \n"
 248 "    LDRH    R0, [R0, #0x9C] \n"
 249 "    CMP     R0, #4 \n"
 250 "    LDRNEH  R0, [R5] \n"
 251 "    SUBNE   R1, R0, #0x8200 \n"
 252 "    SUBNES  R1, R1, #0x36 \n"
 253 "    BNE     loc_FF890F6C \n"
 254 "    BL      sub_FF8948E8 \n"
 255 "    BL      sub_FF894E10 \n"
 256 "    B       loc_FF890F6C \n"
 257 
 258 "loc_FF890F3C:\n"
 259 "    MOV     R2, #0 \n"
 260 "    MOV     R1, #0x11 \n"
 261 "    B       loc_FF890F50 \n"
 262 
 263 "loc_FF890F48:\n"
 264 "    MOV     R2, #0 \n"
 265 "    MOV     R1, #0x10 \n"
 266 
 267 "loc_FF890F50:\n"
 268 "    MOV     R0, #0 \n"
 269 "    BL      sub_FF88ED6C \n"
 270 "    B       loc_FF890F6C \n"
 271 
 272 "loc_FF890F5C:\n"
 273 "    LDR     R2, =0x57B \n"
 274 "    LDR     R1, =0xFF890640 /*'SsShootTask.c'*/ \n"
 275 "    MOV     R0, #0 \n"
 276 "    BL      _DebugAssert \n"
 277 
 278 "loc_FF890F6C:\n"
 279 "    LDR     R0, [SP] \n"
 280 "    LDR     R1, [R0, #4] \n"
 281 "    LDR     R0, [R7] \n"
 282 "    BL      sub_FF829BC4 /*_SetEventFlag*/ \n"
 283 "    LDR     R4, [SP] \n"
 284 "    LDR     R0, [R4, #8] \n"
 285 "    CMP     R0, #0 \n"
 286 "    LDREQ   R1, =0xFF890640 /*'SsShootTask.c'*/ \n"
 287 "    MOVEQ   R2, #0x124 \n"
 288 "    BLEQ    _DebugAssert \n"
 289 "    STR     R6, [R4, #8] \n"
 290 "    B       loc_FF890CDC \n"
 291 );
 292 }
 293 
 294 /*************************************************************/
 295 //** sub_FF9B4F70_my @ 0xFF9B4F70 - 0xFF9B5054, length=58
 296 void __attribute__((naked,noinline)) sub_FF9B4F70_my() {
 297 asm volatile (
 298 "    STMFD   SP!, {R3-R7,LR} \n"
 299 "    BL      sub_FF89024C \n"
 300 "    MOV     R4, R0 \n"
 301 "    MOV     R0, #0xC \n"
 302 "    BL      sub_FF896440 \n"
 303 "    LDR     R6, =0x7D7C \n"
 304 "    TST     R0, #1 \n"
 305 "    MOV     R5, #1 \n"
 306 "    BNE     loc_FF9B5044 \n"
 307 "    BL      sub_FF896494 \n"
 308 "    TST     R0, #1 \n"
 309 "    BNE     loc_FF9B5044 \n"
 310 "    MOV     R2, #2 \n"
 311 "    MOV     R1, SP \n"
 312 "    ADD     R0, R5, #0x108 \n"
 313 "    BL      _GetPropertyCase \n"
 314 "    TST     R0, #1 \n"
 315 "    ADDNE   R2, R5, #0x174 \n"
 316 "    LDRNE   R1, =0xFF9B50EC /*'SsCaptureCtrl.c'*/ \n"
 317 "    MOVNE   R0, #0 \n"
 318 "    BLNE    _DebugAssert \n"
 319 "    LDRSH   R0, [SP] \n"
 320 "    BL      sub_FF82CBF8 \n"
 321 "    BL      sub_FF82CA14 \n"
 322 "    CMP     R0, #1 \n"
 323 "    BLS     loc_FF9B504C \n"
 324 "    MOV     R0, #0 \n"
 325 "    BL      sub_FF82CB6C \n"
 326 "    BL      sub_FF8914F4 \n"
 327 "    BL      sub_FF892628 \n"
 328 "    MOV     R1, R4 \n"
 329 "    BL      sub_FF892684 \n"
 330 "    LDR     R0, =0x10E \n"
 331 "    MOV     R2, #4 \n"
 332 "    ADD     R1, R4, #0x30 \n"
 333 "    BL      _SetPropertyCase \n"
 334 "    MOV     R2, #4 \n"
 335 "    ADD     R1, R4, #0x34 \n"
 336 "    MOV     R0, #0x2C \n"
 337 "    BL      _SetPropertyCase \n"
 338 "    MOV     R2, #4 \n"
 339 "    ADD     R1, R4, #8 \n"
 340 "    MOV     R0, #0x3F \n"
 341 "    BL      _SetPropertyCase \n"
 342 "    BL      sub_FF9B5848 \n"
 343 "    MVN     R1, #0x1000 \n"
 344 "    BL      sub_FF829C0C /*_ClearEventFlag*/ \n"
 345 "    MOV     R0, R4 \n"
 346 "    BL      sub_FF9B4A68 \n"
 347 "    MOV     R0, R4 \n"
 348 "    BL      sub_FFB06E5C_my \n"  // --> Patched. Old value = 0xFFB06E5C.
 349 "    TST     R0, #1 \n"
 350 "    BEQ     loc_FF9B5048 \n"
 351 
 352 "loc_FF9B5044:\n"
 353 "    STR     R5, [R6] \n"
 354 
 355 "loc_FF9B5048:\n"
 356 "    LDMFD   SP!, {R3-R7,PC} \n"
 357 
 358 "loc_FF9B504C:\n"
 359 "    BL      sub_FF88EB04 \n"
 360 "    BL      sub_FF8964F0 \n"
 361 "    LDMFD   SP!, {R3-R7,PC} \n"
 362 );
 363 }
 364 
 365 /*************************************************************/
 366 //** sub_FF9B4DA4_my @ 0xFF9B4DA4 - 0xFF9B4F6C, length=115
 367 void __attribute__((naked,noinline)) sub_FF9B4DA4_my() {
 368 asm volatile (
 369 "    STMFD   SP!, {R3-R7,LR} \n"
 370 "    LDR     R7, =0x1F514 \n"
 371 "    MOV     R5, R0 \n"
 372 "    LDR     R0, [R7, #0x28] \n"
 373 "    MOV     R4, #0 \n"
 374 "    CMP     R0, #0 \n"
 375 "    BEQ     loc_FF9B4DF0 \n"
 376 "    LDR     R0, =0x7D7C \n"
 377 "    MOV     R2, R5 \n"
 378 "    LDR     R0, [R0] \n"
 379 "    MOV     R1, #2 \n"
 380 "    CMP     R0, #0 \n"
 381 "    MOVNE   R4, #0x1D \n"
 382 "    MOV     R0, R4 \n"
 383 "    BL      sub_FF88ED6C \n"
 384 "    MOV     R1, R4 \n"
 385 "    MOV     R0, R5 \n"
 386 "    BL      sub_FF9B5DE4 \n"
 387 "    B       loc_FF9B4F64 \n"
 388 
 389 "loc_FF9B4DF0:\n"
 390 "    BL      sub_FF892628 \n"
 391 "    MOV     R1, R5 \n"
 392 "    BL      sub_FF892684 \n"
 393 "    LDR     R0, =0x10E \n"
 394 "    MOV     R2, #4 \n"
 395 "    ADD     R1, R5, #0x30 \n"
 396 "    BL      _SetPropertyCase \n"
 397 "    MOV     R2, #4 \n"
 398 "    ADD     R1, R5, #0x34 \n"
 399 "    MOV     R0, #0x2C \n"
 400 "    BL      _SetPropertyCase \n"
 401 "    LDR     R0, [R7, #0x104] \n"
 402 "    LDR     R6, =0x1F614 \n"
 403 "    CMP     R0, #0 \n"
 404 "    BNE     loc_FF9B4E44 \n"
 405 "    LDRH    R0, [R6, #0x9A] \n"
 406 "    CMP     R0, #3 \n"
 407 "    LDRNE   R0, [R5, #8] \n"
 408 "    CMPNE   R0, #1 \n"
 409 "    BHI     loc_FF9B4E74 \n"
 410 "    B       loc_FF9B4E50 \n"
 411 
 412 "loc_FF9B4E44:\n"
 413 "    LDR     R0, [R5, #0xC] \n"
 414 "    CMP     R0, #1 \n"
 415 "    BNE     loc_FF9B4E74 \n"
 416 
 417 "loc_FF9B4E50:\n"
 418 "    MOV     R0, #0xC \n"
 419 "    BL      sub_FF896440 \n"
 420 "    TST     R0, #1 \n"
 421 "    BNE     loc_FF9B4E6C \n"
 422 "    BL      sub_FF896494 \n"
 423 "    TST     R0, #1 \n"
 424 "    BEQ     loc_FF9B4E74 \n"
 425 
 426 "loc_FF9B4E6C:\n"
 427 "    BL      sub_FF88EB04 \n"
 428 "    MOV     R4, #1 \n"
 429 
 430 "loc_FF9B4E74:\n"
 431 "    TST     R4, #1 \n"
 432 "    BNE     loc_FF9B4F48 \n"
 433 "    LDR     R0, [R7, #0xE4] \n"
 434 "    CMP     R0, #0 \n"
 435 "    BEQ     loc_FF9B4EB0 \n"
 436 "    LDRH    R0, [R6, #0x9A] \n"
 437 "    CMP     R0, #3 \n"
 438 "    LDRNE   R0, [R5, #8] \n"
 439 "    CMPNE   R0, #1 \n"
 440 "    BHI     loc_FF9B4F08 \n"
 441 "    LDR     R0, [R7, #0x104] \n"
 442 "    CMP     R0, #0 \n"
 443 "    LDRNE   R0, [R5, #0xC] \n"
 444 "    CMPNE   R0, #1 \n"
 445 "    BHI     loc_FF9B4F08 \n"
 446 
 447 "loc_FF9B4EB0:\n"
 448 "    LDR     R0, =0x109 \n"
 449 "    MOV     R2, #2 \n"
 450 "    MOV     R1, SP \n"
 451 "    BL      _GetPropertyCase \n"
 452 "    TST     R0, #1 \n"
 453 "    MOVNE   R2, #0xCA \n"
 454 "    LDRNE   R1, =0xFF9B50EC /*'SsCaptureCtrl.c'*/ \n"
 455 "    MOVNE   R0, #0 \n"
 456 "    BLNE    _DebugAssert \n"
 457 "    LDRSH   R0, [SP] \n"
 458 "    BL      sub_FF82CBF8 \n"
 459 "    BL      sub_FF82CA14 \n"
 460 "    CMP     R0, #1 \n"
 461 "    BLS     loc_FF9B4EF4 \n"
 462 "    MOV     R0, #0 \n"
 463 "    BL      sub_FF82CB6C \n"
 464 "    B       loc_FF9B4F08 \n"
 465 
 466 "loc_FF9B4EF4:\n"
 467 "    BL      sub_FF88EB04 \n"
 468 "    BL      sub_FF8964F0 \n"
 469 "    MOV     R4, #1 \n"
 470 "    CMP     R4, #0 \n"
 471 "    BNE     loc_FF9B4F48 \n"
 472 
 473 "loc_FF9B4F08:\n"
 474 "    BL      sub_FF9B5848 \n"
 475 "    MVN     R1, #0x1000 \n"
 476 "    BL      sub_FF829C0C /*_ClearEventFlag*/ \n"
 477 "    MOV     R0, R5 \n"
 478 "    BL      sub_FFB06AB4 \n"
 479 "    TST     R0, #1 \n"
 480 "    MOV     R4, R0 \n"
 481 "    BNE     loc_FF9B4F48 \n"
 482 "    BL      sub_FF8914F4 \n"
 483 "    MOV     R0, R5 \n"
 484 "    BL      sub_FF9B4A68 \n"
 485 "    MOV     R0, #2 \n"
 486 "    BL      sub_FF897FF4 \n"
 487 "    MOV     R0, R5 \n"
 488 "    BL      sub_FFB06E5C_my \n"  // --> Patched. Old value = 0xFFB06E5C.
 489 "    B       loc_FF9B4F64 \n"
 490 
 491 "loc_FF9B4F48:\n"
 492 "    MOV     R2, R5 \n"
 493 "    MOV     R1, #2 \n"
 494 "    MOV     R0, R4 \n"
 495 "    BL      sub_FF88ED6C \n"
 496 "    MOV     R1, R4 \n"
 497 "    MOV     R0, R5 \n"
 498 "    BL      sub_FF9B5FF8 \n"
 499 
 500 "loc_FF9B4F64:\n"
 501 "    MOV     R0, #0 \n"
 502 "    STR     R0, [R7, #0x28] \n"
 503 "    LDMFD   SP!, {R3-R7,PC} \n"
 504 );
 505 }
 506 
 507 /*************************************************************/
 508 //** sub_FFB06E5C_my @ 0xFFB06E5C - 0xFFB070E0, length=162
 509 void __attribute__((naked,noinline)) sub_FFB06E5C_my() {
 510 asm volatile (
 511 "    STMFD   SP!, {R2-R10,LR} \n"
 512 "    MOV     R4, R0 \n"
 513 "    BL      sub_FF9B49D0 \n"
 514 "    BL      sub_FF9B56A4 \n"
 515 "    LDR     R7, =0x1F514 \n"
 516 "    LDR     R0, [R7, #0x190] \n"
 517 "    CMP     R0, #2 \n"
 518 "    BNE     loc_FFB06E98 \n"
 519 "    ADD     R0, R7, #0x100 \n"
 520 "    LDRH    R0, [R0, #0x9A] \n"
 521 "    CMP     R0, #3 \n"
 522 "    LDRNE   R0, [R4, #8] \n"
 523 "    CMPNE   R0, #1 \n"
 524 "    MOVLS   R0, #4 \n"
 525 "    BLLS    sub_FF9137C4 \n"
 526 
 527 "loc_FFB06E98:\n"
 528 "    LDR     R0, =0x12F \n"
 529 "    MOV     R2, #4 \n"
 530 "    ADD     R1, SP, #4 \n"
 531 "    BL      _GetPropertyCase \n"
 532 "    TST     R0, #1 \n"
 533 "    LDRNE   R2, =0x191 \n"
 534 "    LDRNE   R1, =0xFFB07108 /*'SsStandardCaptureSeq.c'*/ \n"
 535 "    MOVNE   R0, #0 \n"
 536 "    BLNE    _DebugAssert \n"
 537 "    LDR     R0, [SP, #4] \n"
 538 "    AND     R0, R0, #0xFF00 \n"
 539 "    CMP     R0, #0x600 \n"
 540 "    LDRNE   R0, =0xFF9B4664 \n"
 541 "    LDREQ   R0, =0xFFB06DD8 \n"
 542 "    MOVNE   R1, R4 \n"
 543 "    MOVEQ   R1, #0 \n"
 544 "    BL      sub_FF8D2A64 \n"
 545 "    LDR     R0, [R7, #0x184] \n"
 546 "    CMP     R0, #0 \n"
 547 "    BLNE    sub_FF9B48BC \n"
 548 "    MOV     R0, #0 \n"
 549 //"  BL      _sub_FF8938AC \n"  // --> Nullsub call removed.
 550 "    BL      wait_until_remote_button_is_released\n" // added
 551 "    BL      capt_seq_hook_set_nr\n"                 // added
 552 "    MOV     R0, R4 \n"
 553 "    BL      sub_FF9B4AF8 \n"
 554 "    LDR     R1, =0xDC20 \n"
 555 "    MOV     R2, #4 \n"
 556 "    MOV     R0, #0x8A \n"
 557 "    BL      _GetPropertyCase \n"
 558 "    TST     R0, #1 \n"
 559 "    LDRNE   R2, =0x1A5 \n"
 560 "    LDRNE   R1, =0xFFB07108 /*'SsStandardCaptureSeq.c'*/ \n"
 561 "    MOVNE   R0, #0 \n"
 562 "    BLNE    _DebugAssert \n"
 563 "    BL      sub_FF893A68 \n"
 564 "    BL      sub_FF87EE74 \n"
 565 "    MOV     R1, #0 \n"
 566 "    MOV     R0, R4 \n"
 567 "    BL      sub_FFB06DDC \n"
 568 "    MOV     R6, R0 \n"
 569 "    LDR     R0, [SP, #4] \n"
 570 "    LDR     R8, =0xDC20 \n"
 571 "    AND     R0, R0, #0xFF00 \n"
 572 "    CMP     R0, #0x600 \n"
 573 "    LDRH    R0, [R4, #0x18] \n"
 574 "    LDRNE   R2, =0xFF9B48A4 \n"
 575 "    LDREQ   R2, =0xFF9B4810 \n"
 576 "    CMP     R0, #0 \n"
 577 "    BEQ     loc_FFB06F68 \n"
 578 "    CMP     R0, #1 \n"
 579 "    BEQ     loc_FFB06F8C \n"
 580 "    CMP     R0, #4 \n"
 581 "    BNE     loc_FFB07000 \n"
 582 
 583 "loc_FFB06F68:\n"
 584 "    STR     R6, [SP] \n"
 585 "    MOV     R3, R2 \n"
 586 "    LDR     R1, [R4, #0x34] \n"
 587 "    LDR     R2, [R8] \n"
 588 "    MOV     R0, R4 \n"
 589 "    BL      sub_FF9B4478 \n"
 590 "    MOV     R5, R0 \n"
 591 "    BL      sub_FF8CF948 \n"
 592 "    B       loc_FFB07014 \n"
 593 
 594 "loc_FFB06F8C:\n"
 595 "    STR     R6, [SP] \n"
 596 "    MOV     R3, R2 \n"
 597 "    LDR     R1, [R4, #0x34] \n"
 598 "    LDR     R2, [R8] \n"
 599 "    MOV     R0, R4 \n"
 600 "    BL      sub_FF9B4504 \n"
 601 "    MOV     R5, R0 \n"
 602 "    MOV     R1, #0 \n"
 603 "    MOV     R0, #0x45 \n"
 604 "    BL      sub_FF834324 \n"
 605 "    TST     R5, #1 \n"
 606 "    BNE     loc_FFB07014 \n"
 607 "    LDR     R0, =0xFFB06DD8 \n"
 608 "    MOV     R1, #0 \n"
 609 "    BL      sub_FF8D2A64 \n"
 610 "    MOV     R1, #1 \n"
 611 "    MOV     R0, R4 \n"
 612 "    BL      sub_FFB06DDC \n"
 613 "    MOV     R6, R0 \n"
 614 "    LDR     R0, [R8] \n"
 615 "    BL      sub_FF9B4954 \n"
 616 "    LDR     R1, [R4, #0x34] \n"
 617 "    LDR     R2, [R8] \n"
 618 "    MOV     R3, R6 \n"
 619 "    MOV     R0, R4 \n"
 620 "    BL      sub_FF9B459C \n"
 621 "    MOV     R5, R0 \n"
 622 "    BL      sub_FF9B4400 \n"
 623 "    B       loc_FFB07014 \n"
 624 
 625 "loc_FFB07000:\n"
 626 "    MOV     R2, #0x1D8 \n"
 627 "    LDR     R1, =0xFFB07108 /*'SsStandardCaptureSeq.c'*/ \n"
 628 "    MOV     R0, #0 \n"
 629 "    BL      _DebugAssert \n"
 630 "    MOV     R5, #0x1D \n"
 631 
 632 "loc_FFB07014:\n"
 633 "    BL      sub_FF87EE8C \n"
 634 "    LDR     R8, =0xFFB06DD8 \n"
 635 "    TST     R5, #1 \n"
 636 "    BNE     loc_FFB07094 \n"
 637 "    LDR     R0, [R7, #0x100] \n"
 638 "    CMP     R0, #0 \n"
 639 "    BNE     loc_FFB0704C \n"
 640 "    MOV     R0, R4 \n"
 641 "    BL      sub_FF9B65E8 \n"
 642 "    TST     R0, #1 \n"
 643 "    LDRNE   R2, =0x1FD \n"
 644 "    LDRNE   R1, =0xFFB07108 /*'SsStandardCaptureSeq.c'*/ \n"
 645 "    MOVNE   R0, #0 \n"
 646 "    BLNE    _DebugAssert \n"
 647 "    BL      capt_seq_hook_raw_here \n"         // added
 648 
 649 "loc_FFB0704C:\n"
 650 "    MOV     R0, R4 \n"
 651 "    BL      sub_FF9B4BE0 \n"
 652 "    MOV     R0, R4 \n"
 653 "    BL      sub_FF9B4B98 \n"
 654 "    CMP     R6, R8 \n"
 655 "    BEQ     loc_FFB07094 \n"
 656 "    BL      sub_FF9B5848 \n"
 657 "    LDR     R9, =0x20A \n"
 658 "    LDR     R2, =0x3A98 \n"
 659 "    LDR     R3, =0xFFB07108 /*'SsStandardCaptureSeq.c'*/ \n"
 660 "    MOV     R1, #4 \n"
 661 "    STR     R9, [SP] \n"
 662 "    BL      sub_FF89671C \n"
 663 "    CMP     R0, #0 \n"
 664 "    MOVNE   R2, R9 \n"
 665 "    LDRNE   R1, =0xFFB07108 /*'SsStandardCaptureSeq.c'*/ \n"
 666 "    MOVNE   R0, #0 \n"
 667 "    BLNE    _DebugAssert \n"
 668 
 669 "loc_FFB07094:\n"
 670 "    MOV     R2, R4 \n"
 671 "    MOV     R1, #2 \n"
 672 "    MOV     R0, R5 \n"
 673 "    BL      sub_FF88ED6C \n"
 674 "    LDR     R0, [R7, #0x28] \n"
 675 "    CMP     R0, #0 \n"
 676 "    BEQ     loc_FFB070C8 \n"
 677 "    SUBS    R1, R6, R8 \n"
 678 "    MOVNE   R1, #1 \n"
 679 "    MOV     R2, R5 \n"
 680 "    MOV     R0, R4 \n"
 681 "    BL      sub_FF9B5D7C \n"
 682 "    B       loc_FFB070DC \n"
 683 
 684 "loc_FFB070C8:\n"
 685 "    SUBS    R1, R6, R8 \n"
 686 "    MOVNE   R1, #1 \n"
 687 "    MOV     R2, R5 \n"
 688 "    MOV     R0, R4 \n"
 689 "    BL      sub_FF9B5D10 \n"
 690 
 691 "loc_FFB070DC:\n"
 692 "    MOV     R0, R5 \n"
 693 "    LDMFD   SP!, {R2-R10,PC} \n"
 694 "    .ltorg\n"         // added
 695 );
 696 }
 697 
 698 /*************************************************************/
 699 //** exp_drv_task @ 0xFF8E0DE0 - 0xFF8E147C, length=424
 700 void __attribute__((naked,noinline)) exp_drv_task() {
 701 asm volatile (
 702 "    STMFD   SP!, {R4-R9,LR} \n"
 703 "    SUB     SP, SP, #0x2C \n"
 704 "    LDR     R6, =0x4514 \n"
 705 "    LDR     R7, =0xBB8 \n"
 706 "    LDR     R4, =0x5BC8C \n"
 707 "    MOV     R0, #0 \n"
 708 "    ADD     R5, SP, #0x1C \n"
 709 "    STR     R0, [SP, #0xC] \n"
 710 
 711 "loc_FF8E0E00:\n"
 712 "    LDR     R0, [R6, #0x20] \n"
 713 "    MOV     R2, #0 \n"
 714 "    ADD     R1, SP, #0x28 \n"
 715 "    BL      sub_FF829E30 /*_ReceiveMessageQueue*/ \n"
 716 "    LDR     R0, [SP, #0xC] \n"
 717 "    CMP     R0, #1 \n"
 718 "    BNE     loc_FF8E0E50 \n"
 719 "    LDR     R0, [SP, #0x28] \n"
 720 "    LDR     R0, [R0] \n"
 721 "    CMP     R0, #0x14 \n"
 722 "    CMPNE   R0, #0x15 \n"
 723 "    CMPNE   R0, #0x16 \n"
 724 "    CMPNE   R0, #0x17 \n"
 725 "    CMPNE   R0, #0x18 \n"
 726 "    BEQ     loc_FF8E0FB4 \n"
 727 "    CMP     R0, #0x2E \n"
 728 "    BEQ     loc_FF8E0F38 \n"
 729 "    ADD     R1, SP, #0xC \n"
 730 "    MOV     R0, #0 \n"
 731 "    BL      sub_FF8E0D80 \n"
 732 
 733 "loc_FF8E0E50:\n"
 734 "    LDR     R0, [SP, #0x28] \n"
 735 "    LDR     R1, [R0] \n"
 736 "    CMP     R1, #0x34 \n"
 737 "    BNE     loc_FF8E0E7C \n"
 738 "    BL      sub_FF8E261C \n"
 739 "    LDR     R0, [R6, #0x1C] \n"
 740 "    MOV     R1, #1 \n"
 741 "    BL      sub_FF829BC4 /*_SetEventFlag*/ \n"
 742 "    BL      _ExitTask \n"
 743 "    ADD     SP, SP, #0x2C \n"
 744 "    LDMFD   SP!, {R4-R9,PC} \n"
 745 
 746 "loc_FF8E0E7C:\n"
 747 "    CMP     R1, #0x33 \n"
 748 "    BNE     loc_FF8E0E98 \n"
 749 "    LDR     R2, [R0, #0xAC]! \n"
 750 "    LDR     R1, [R0, #4] \n"
 751 "    MOV     R0, R1 \n"
 752 "    BLX     R2 \n"
 753 "    B       loc_FF8E1474 \n"
 754 
 755 "loc_FF8E0E98:\n"
 756 "    CMP     R1, #0x2C \n"
 757 "    BNE     loc_FF8E0EE8 \n"
 758 "    LDR     R0, [R6, #0x1C] \n"
 759 "    MOV     R1, #0x80 \n"
 760 "    BL      sub_FF829C0C /*_ClearEventFlag*/ \n"
 761 "    LDR     R0, =0xFF8DC148 \n"
 762 "    MOV     R1, #0x80 \n"
 763 "    BL      sub_FF887400 \n"
 764 "    LDR     R0, [R6, #0x1C] \n"
 765 "    MOV     R2, R7 \n"
 766 "    MOV     R1, #0x80 \n"
 767 "    BL      sub_FF829AF8 /*_WaitForAllEventFlag*/ \n"
 768 "    TST     R0, #1 \n"
 769 "    LDRNE   R2, =0x1798 \n"
 770 "    BNE     loc_FF8E0FA4 \n"
 771 
 772 "loc_FF8E0ED4:\n"
 773 "    LDR     R1, [SP, #0x28] \n"
 774 "    LDR     R0, [R1, #0xB0] \n"
 775 "    LDR     R1, [R1, #0xAC] \n"
 776 "    BLX     R1 \n"
 777 "    B       loc_FF8E1474 \n"
 778 
 779 "loc_FF8E0EE8:\n"
 780 "    CMP     R1, #0x2D \n"
 781 "    BNE     loc_FF8E0F30 \n"
 782 "    ADD     R1, SP, #0xC \n"
 783 "    BL      sub_FF8E0D80 \n"
 784 "    LDR     R0, [R6, #0x1C] \n"
 785 "    MOV     R1, #0x100 \n"
 786 "    BL      sub_FF829C0C /*_ClearEventFlag*/ \n"
 787 "    LDR     R0, =0xFF8DC158 \n"
 788 "    MOV     R1, #0x100 \n"
 789 "    BL      sub_FF888210 \n"
 790 "    LDR     R0, [R6, #0x1C] \n"
 791 "    MOV     R2, R7 \n"
 792 "    MOV     R1, #0x100 \n"
 793 "    BL      sub_FF829AF8 /*_WaitForAllEventFlag*/ \n"
 794 "    TST     R0, #1 \n"
 795 "    BEQ     loc_FF8E0ED4 \n"
 796 "    LDR     R2, =0x17A2 \n"
 797 "    B       loc_FF8E0FA4 \n"
 798 
 799 "loc_FF8E0F30:\n"
 800 "    CMP     R1, #0x2E \n"
 801 "    BNE     loc_FF8E0F48 \n"
 802 
 803 "loc_FF8E0F38:\n"
 804 "    LDR     R0, [SP, #0x28] \n"
 805 "    ADD     R1, SP, #0xC \n"
 806 "    BL      sub_FF8E0D80 \n"
 807 "    B       loc_FF8E0ED4 \n"
 808 
 809 "loc_FF8E0F48:\n"
 810 "    CMP     R1, #0x31 \n"
 811 "    BNE     loc_FF8E0F60 \n"
 812 "    BL      sub_FF8CA544 \n"
 813 "    BL      sub_FF8CB3BC \n"
 814 "    BL      sub_FF8CAE9C \n"
 815 "    B       loc_FF8E0ED4 \n"
 816 
 817 "loc_FF8E0F60:\n"
 818 "    CMP     R1, #0x32 \n"
 819 "    BNE     loc_FF8E0FB4 \n"
 820 "    LDR     R0, [R6, #0x1C] \n"
 821 "    MOV     R1, #4 \n"
 822 "    BL      sub_FF829C0C /*_ClearEventFlag*/ \n"
 823 "    LDR     R1, =0xFF8DC178 \n"
 824 "    LDR     R0, =0xFFFFF400 \n"
 825 "    MOV     R2, #4 \n"
 826 "    BL      sub_FF8E2680 \n"
 827 "    BL      sub_FF8CA1D8 \n"
 828 "    LDR     R0, [R6, #0x1C] \n"
 829 "    MOV     R2, R7 \n"
 830 "    MOV     R1, #4 \n"
 831 "    BL      sub_FF829A0C /*_WaitForAnyEventFlag*/ \n"
 832 "    TST     R0, #1 \n"
 833 "    BEQ     loc_FF8E0ED4 \n"
 834 "    LDR     R2, =0x17DA \n"
 835 
 836 "loc_FF8E0FA4:\n"
 837 "    LDR     R1, =0xFF8DC920 /*'ExpDrv.c'*/ \n"
 838 "    MOV     R0, #0 \n"
 839 "    BL      _DebugAssert \n"
 840 "    B       loc_FF8E0ED4 \n"
 841 
 842 "loc_FF8E0FB4:\n"
 843 "    LDR     R0, [SP, #0x28] \n"
 844 "    MOV     R8, #1 \n"
 845 "    LDR     R1, [R0] \n"
 846 "    CMP     R1, #0x12 \n"
 847 "    CMPNE   R1, #0x13 \n"
 848 "    BNE     loc_FF8E101C \n"
 849 "    LDR     R1, [R0, #0x94] \n"
 850 "    ADD     R1, R1, R1, LSL#1 \n"
 851 "    ADD     R1, R0, R1, LSL#2 \n"
 852 "    SUB     R1, R1, #8 \n"
 853 "    LDMIA   R1, {R2,R3,R9} \n"
 854 "    STMIA   R5, {R2,R3,R9} \n"
 855 "    BL      sub_FF8DF1B8 \n"
 856 "    LDR     R0, [SP, #0x28] \n"
 857 "    LDR     R1, [R0, #0x94] \n"
 858 "    LDR     R3, [R0, #0xAC] \n"
 859 "    LDR     R2, [R0, #0xB0] \n"
 860 "    ADD     R0, R0, #4 \n"
 861 "    BLX     R3 \n"
 862 "    LDR     R0, [SP, #0x28] \n"
 863 "    BL      sub_FF8E296C \n"
 864 "    LDR     R0, [SP, #0x28] \n"
 865 "    LDR     R1, [R0, #0x94] \n"
 866 "    LDR     R2, [R0, #0xB8] \n"
 867 "    LDR     R3, [R0, #0xB4] \n"
 868 "    B       loc_FF8E1338 \n"
 869 
 870 "loc_FF8E101C:\n"
 871 "    CMP     R1, #0x14 \n"
 872 "    CMPNE   R1, #0x15 \n"
 873 "    CMPNE   R1, #0x16 \n"
 874 "    CMPNE   R1, #0x17 \n"
 875 "    CMPNE   R1, #0x18 \n"
 876 "    BNE     loc_FF8E10C8 \n"
 877 "    ADD     R3, SP, #0xC \n"
 878 "    MOV     R2, SP \n"
 879 "    ADD     R1, SP, #0x1C \n"
 880 "    BL      sub_FF8DF428 \n"
 881 "    CMP     R0, #1 \n"
 882 "    MOV     R9, R0 \n"
 883 "    CMPNE   R9, #5 \n"
 884 "    BNE     loc_FF8E1074 \n"
 885 "    LDR     R0, [SP, #0x28] \n"
 886 "    MOV     R2, R9 \n"
 887 "    LDR     R1, [R0, #0x94] \n"
 888 "    LDR     R12, [R0, #0xAC] \n"
 889 "    LDR     R3, [R0, #0xB0] \n"
 890 "    ADD     R0, R0, #4 \n"
 891 "    BLX     R12 \n"
 892 "    B       loc_FF8E10AC \n"
 893 
 894 "loc_FF8E1074:\n"
 895 "    LDR     R0, [SP, #0x28] \n"
 896 "    CMP     R9, #2 \n"
 897 "    LDR     R1, [R0, #0x94] \n"
 898 "    LDR     R12, [R0, #0xAC] \n"
 899 "    LDR     R3, [R0, #0xB0] \n"
 900 "    CMPNE   R9, #6 \n"
 901 "    MOV     R2, R9 \n"
 902 "    ADD     R0, R0, #4 \n"
 903 "    BNE     loc_FF8E10C0 \n"
 904 "    BLX     R12 \n"
 905 "    LDR     R0, [SP, #0x28] \n"
 906 "    MOV     R2, SP \n"
 907 "    ADD     R1, SP, #0x1C \n"
 908 "    BL      sub_FF8E0A8C \n"
 909 
 910 "loc_FF8E10AC:\n"
 911 "    LDR     R0, [SP, #0x28] \n"
 912 "    LDR     R2, [SP, #0xC] \n"
 913 "    MOV     R1, R9 \n"
 914 "    BL      sub_FF8E0D10 \n"
 915 "    B       loc_FF8E1340 \n"
 916 
 917 "loc_FF8E10C0:\n"
 918 "    BLX     R12 \n"
 919 "    B       loc_FF8E1340 \n"
 920 
 921 "loc_FF8E10C8:\n"
 922 "    CMP     R1, #0x28 \n"
 923 "    CMPNE   R1, #0x29 \n"
 924 "    BNE     loc_FF8E1114 \n"
 925 "    LDR     R1, [R0, #0x94] \n"
 926 "    ADD     R1, R1, R1, LSL#1 \n"
 927 "    ADD     R1, R0, R1, LSL#2 \n"
 928 "    SUB     R1, R1, #8 \n"
 929 "    LDMIA   R1, {R2,R3,R9} \n"
 930 "    STMIA   R5, {R2,R3,R9} \n"
 931 "    BL      sub_FF8DE0E4 \n"
 932 "    LDR     R0, [SP, #0x28] \n"
 933 "    LDR     R1, [R0, #0x94] \n"
 934 "    LDR     R3, [R0, #0xAC] \n"
 935 "    LDR     R2, [R0, #0xB0] \n"
 936 "    ADD     R0, R0, #4 \n"
 937 "    BLX     R3 \n"
 938 "    LDR     R0, [SP, #0x28] \n"
 939 "    BL      sub_FF8DE540 \n"
 940 "    B       loc_FF8E1340 \n"
 941 
 942 "loc_FF8E1114:\n"
 943 "    ADD     R1, R0, #4 \n"
 944 "    LDMIA   R1, {R2,R3,R9} \n"
 945 "    STMIA   R5, {R2,R3,R9} \n"
 946 "    LDR     R1, [R0] \n"
 947 "    CMP     R1, #0x2C \n"
 948 "    ADDCC   PC, PC, R1, LSL#2 \n"
 949 "    B       loc_FF8E1328 \n"
 950 "    B       loc_FF8E11E0 \n"
 951 "    B       loc_FF8E11E0 \n"
 952 "    B       loc_FF8E11E8 \n"
 953 "    B       loc_FF8E11F0 \n"
 954 "    B       loc_FF8E11F0 \n"
 955 "    B       loc_FF8E11F0 \n"
 956 "    B       loc_FF8E11E0 \n"
 957 "    B       loc_FF8E11E8 \n"
 958 "    B       loc_FF8E11F0 \n"
 959 "    B       loc_FF8E11F0 \n"
 960 "    B       loc_FF8E1208 \n"
 961 "    B       loc_FF8E1208 \n"
 962 "    B       loc_FF8E1314 \n"
 963 "    B       loc_FF8E131C \n"
 964 "    B       loc_FF8E131C \n"
 965 "    B       loc_FF8E131C \n"
 966 "    B       loc_FF8E131C \n"
 967 "    B       loc_FF8E1324 \n"
 968 "    B       loc_FF8E1328 \n"
 969 "    B       loc_FF8E1328 \n"
 970 "    B       loc_FF8E1328 \n"
 971 "    B       loc_FF8E1328 \n"
 972 "    B       loc_FF8E1328 \n"
 973 "    B       loc_FF8E1328 \n"
 974 "    B       loc_FF8E1328 \n"
 975 "    B       loc_FF8E11F8 \n"
 976 "    B       loc_FF8E1200 \n"
 977 "    B       loc_FF8E1200 \n"
 978 "    B       loc_FF8E1200 \n"
 979 "    B       loc_FF8E1214 \n"
 980 "    B       loc_FF8E1214 \n"
 981 "    B       loc_FF8E1214 \n"
 982 "    B       loc_FF8E121C \n"
 983 "    B       loc_FF8E1254 \n"
 984 "    B       loc_FF8E1328 \n"
 985 "    B       loc_FF8E1328 \n"
 986 "    B       loc_FF8E128C \n"
 987 "    B       loc_FF8E12C4 \n"
 988 "    B       loc_FF8E12FC \n"
 989 "    B       loc_FF8E12FC \n"
 990 "    B       loc_FF8E1328 \n"
 991 "    B       loc_FF8E1328 \n"
 992 "    B       loc_FF8E1304 \n"
 993 "    B       loc_FF8E130C \n"
 994 
 995 "loc_FF8E11E0:\n"
 996 "    BL      sub_FF8DC7A0 \n"
 997 "    B       loc_FF8E1328 \n"
 998 
 999 "loc_FF8E11E8:\n"
1000 "    BL      sub_FF8DCA6C \n"
1001 "    B       loc_FF8E1328 \n"
1002 
1003 "loc_FF8E11F0:\n"
1004 "    BL      sub_FF8DCCAC \n"
1005 "    B       loc_FF8E1328 \n"
1006 
1007 "loc_FF8E11F8:\n"
1008 "    BL      sub_FF8DCFF4 \n"
1009 "    B       loc_FF8E1328 \n"
1010 
1011 "loc_FF8E1200:\n"
1012 "    BL      sub_FF8DD224 \n"
1013 "    B       loc_FF8E1328 \n"
1014 
1015 "loc_FF8E1208:\n"
1016 "    BL      sub_FF8DD614_my \n"  // --> Patched. Old value = 0xFF8DD614.
1017 "    MOV     R8, #0 \n"
1018 "    B       loc_FF8E1328 \n"
1019 
1020 "loc_FF8E1214:\n"
1021 "    BL      sub_FF8DD7E8 \n"
1022 "    B       loc_FF8E1328 \n"
1023 
1024 "loc_FF8E121C:\n"
1025 "    LDRH    R1, [R0, #4] \n"
1026 "    STRH    R1, [SP, #0x1C] \n"
1027 "    LDRH    R1, [R4, #2] \n"
1028 "    STRH    R1, [SP, #0x1E] \n"
1029 "    LDRH    R1, [R4, #4] \n"
1030 "    STRH    R1, [SP, #0x20] \n"
1031 "    LDRH    R1, [R4, #6] \n"
1032 "    STRH    R1, [SP, #0x22] \n"
1033 "    LDRH    R1, [R0, #0xC] \n"
1034 "    STRH    R1, [SP, #0x24] \n"
1035 "    LDRH    R1, [R4, #0xA] \n"
1036 "    STRH    R1, [SP, #0x26] \n"
1037 "    BL      sub_FF8DDD50 \n"
1038 "    B       loc_FF8E1328 \n"
1039 
1040 "loc_FF8E1254:\n"
1041 "    LDRH    R1, [R0, #4] \n"
1042 "    STRH    R1, [SP, #0x1C] \n"
1043 "    LDRH    R1, [R4, #2] \n"
1044 "    STRH    R1, [SP, #0x1E] \n"
1045 "    LDRH    R1, [R4, #4] \n"
1046 "    STRH    R1, [SP, #0x20] \n"
1047 "    LDRH    R1, [R4, #6] \n"
1048 "    STRH    R1, [SP, #0x22] \n"
1049 "    LDRH    R1, [R4, #8] \n"
1050 "    STRH    R1, [SP, #0x24] \n"
1051 "    LDRH    R1, [R4, #0xA] \n"
1052 "    STRH    R1, [SP, #0x26] \n"
1053 "    BL      sub_FF8E26E0 \n"
1054 "    B       loc_FF8E1328 \n"
1055 
1056 "loc_FF8E128C:\n"
1057 "    LDRH    R1, [R4] \n"
1058 "    STRH    R1, [SP, #0x1C] \n"
1059 "    LDRH    R1, [R0, #6] \n"
1060 "    STRH    R1, [SP, #0x1E] \n"
1061 "    LDRH    R1, [R4, #4] \n"
1062 "    STRH    R1, [SP, #0x20] \n"
1063 "    LDRH    R1, [R4, #6] \n"
1064 "    STRH    R1, [SP, #0x22] \n"
1065 "    LDRH    R1, [R4, #8] \n"
1066 "    STRH    R1, [SP, #0x24] \n"
1067 "    LDRH    R1, [R4, #0xA] \n"
1068 "    STRH    R1, [SP, #0x26] \n"
1069 "    BL      sub_FF8E2818 \n"
1070 "    B       loc_FF8E1328 \n"
1071 
1072 "loc_FF8E12C4:\n"
1073 "    LDRH    R1, [R4] \n"
1074 "    STRH    R1, [SP, #0x1C] \n"
1075 "    LDRH    R1, [R4, #2] \n"
1076 "    STRH    R1, [SP, #0x1E] \n"
1077 "    LDRH    R1, [R4, #4] \n"
1078 "    STRH    R1, [SP, #0x20] \n"
1079 "    LDRH    R1, [R4, #6] \n"
1080 "    STRH    R1, [SP, #0x22] \n"
1081 "    LDRH    R1, [R0, #0xC] \n"
1082 "    STRH    R1, [SP, #0x24] \n"
1083 "    LDRH    R1, [R4, #0xA] \n"
1084 "    STRH    R1, [SP, #0x26] \n"
1085 "    BL      sub_FF8E28C4 \n"
1086 "    B       loc_FF8E1328 \n"
1087 
1088 "loc_FF8E12FC:\n"
1089 "    BL      sub_FF8DDE64 \n"
1090 "    B       loc_FF8E1328 \n"
1091 
1092 "loc_FF8E1304:\n"
1093 "    BL      sub_FF8DE658 \n"
1094 "    B       loc_FF8E1328 \n"
1095 
1096 "loc_FF8E130C:\n"
1097 "    BL      sub_FF8DE9E4 \n"
1098 "    B       loc_FF8E1328 \n"
1099 
1100 "loc_FF8E1314:\n"
1101 "    BL      sub_FF8DEC54 \n"
1102 "    B       loc_FF8E1328 \n"
1103 
1104 "loc_FF8E131C:\n"
1105 "    BL      sub_FF8DEE20 \n"
1106 "    B       loc_FF8E1328 \n"
1107 
1108 "loc_FF8E1324:\n"
1109 "    BL      sub_FF8DEF98 \n"
1110 
1111 "loc_FF8E1328:\n"
1112 "    LDR     R0, [SP, #0x28] \n"
1113 "    LDR     R1, [R0, #0x94] \n"
1114 "    LDR     R2, [R0, #0xB0] \n"
1115 "    LDR     R3, [R0, #0xAC] \n"
1116 
1117 "loc_FF8E1338:\n"
1118 "    ADD     R0, R0, #4 \n"
1119 "    BLX     R3 \n"
1120 
1121 "loc_FF8E1340:\n"
1122 "    LDR     R0, [SP, #0x28] \n"
1123 "    LDR     R0, [R0] \n"
1124 "    CMP     R0, #0x10 \n"
1125 "    BEQ     loc_FF8E1378 \n"
1126 "    BGT     loc_FF8E1368 \n"
1127 "    CMP     R0, #1 \n"
1128 "    CMPNE   R0, #4 \n"
1129 "    CMPNE   R0, #0xE \n"
1130 "    BNE     loc_FF8E13AC \n"
1131 "    B       loc_FF8E1378 \n"
1132 
1133 "loc_FF8E1368:\n"
1134 "    CMP     R0, #0x13 \n"
1135 "    CMPNE   R0, #0x18 \n"
1136 "    CMPNE   R0, #0x1B \n"
1137 "    BNE     loc_FF8E13AC \n"
1138 
1139 "loc_FF8E1378:\n"
1140 "    LDRSH   R0, [R4] \n"
1141 "    CMN     R0, #0xC00 \n"
1142 "    LDRNESH R1, [R4, #8] \n"
1143 "    CMNNE   R1, #0xC00 \n"
1144 "    STRNEH  R0, [SP, #0x1C] \n"
1145 "    STRNEH  R1, [SP, #0x24] \n"
1146 "    BNE     loc_FF8E13AC \n"
1147 "    ADD     R0, SP, #0x10 \n"
1148 "    BL      sub_FF8E2B88 /*_get_current_exp*/ \n"
1149 "    LDRH    R0, [SP, #0x10] \n"
1150 "    STRH    R0, [SP, #0x1C] \n"
1151 "    LDRH    R0, [SP, #0x18] \n"
1152 "    STRH    R0, [SP, #0x24] \n"
1153 
1154 "loc_FF8E13AC:\n"
1155 "    LDR     R0, [SP, #0x28] \n"
1156 "    CMP     R8, #1 \n"
1157 "    BNE     loc_FF8E13FC \n"
1158 "    LDR     R1, [R0, #0x94] \n"
1159 "    MOV     R2, #0xC \n"
1160 "    ADD     R1, R1, R1, LSL#1 \n"
1161 "    ADD     R0, R0, R1, LSL#2 \n"
1162 "    SUB     R8, R0, #8 \n"
1163 "    LDR     R0, =0x5BC8C \n"
1164 "    ADD     R1, SP, #0x1C \n"
1165 "    BL      sub_006BA828 \n"
1166 "    LDR     R0, =0x5BC98 \n"
1167 "    MOV     R2, #0xC \n"
1168 "    ADD     R1, SP, #0x1C \n"
1169 "    BL      sub_006BA828 \n"
1170 "    LDR     R0, =0x5BCA4 \n"
1171 "    MOV     R2, #0xC \n"
1172 "    MOV     R1, R8 \n"
1173 "    BL      sub_006BA828 \n"
1174 "    B       loc_FF8E1474 \n"
1175 
1176 "loc_FF8E13FC:\n"
1177 "    LDR     R0, [R0] \n"
1178 "    MOV     R3, #1 \n"
1179 "    CMP     R0, #0xB \n"
1180 "    BNE     loc_FF8E1440 \n"
1181 "    MOV     R2, #0 \n"
1182 "    STRD    R2, [SP] \n"
1183 "    MOV     R2, R3 \n"
1184 "    MOV     R1, R3 \n"
1185 "    MOV     R0, #0 \n"
1186 "    BL      sub_FF8DC560 \n"
1187 "    MOV     R3, #1 \n"
1188 "    MOV     R2, #0 \n"
1189 "    STRD    R2, [SP] \n"
1190 "    MOV     R2, R3 \n"
1191 "    MOV     R1, R3 \n"
1192 "    MOV     R0, #0 \n"
1193 "    B       loc_FF8E1470 \n"
1194 
1195 "loc_FF8E1440:\n"
1196 "    MOV     R2, #1 \n"
1197 "    STRD    R2, [SP] \n"
1198 "    MOV     R3, R2 \n"
1199 "    MOV     R1, R2 \n"
1200 "    MOV     R0, R2 \n"
1201 "    BL      sub_FF8DC560 \n"
1202 "    MOV     R3, #1 \n"
1203 "    MOV     R2, R3 \n"
1204 "    MOV     R1, R3 \n"
1205 "    MOV     R0, R3 \n"
1206 "    STR     R3, [SP] \n"
1207 "    STR     R3, [SP, #4] \n"
1208 
1209 "loc_FF8E1470:\n"
1210 "    BL      sub_FF8DC6E8 \n"
1211 
1212 "loc_FF8E1474:\n"
1213 "    LDR     R0, [SP, #0x28] \n"
1214 "    BL      sub_FF8E261C \n"
1215 "    B       loc_FF8E0E00 \n"
1216 );
1217 }
1218 
1219 /*************************************************************/
1220 //** sub_FF8DD614_my @ 0xFF8DD614 - 0xFF8DD6D8, length=50
1221 void __attribute__((naked,noinline)) sub_FF8DD614_my() {
1222 asm volatile (
1223 "    STMFD   SP!, {R4-R8,LR} \n"
1224 "    LDR     R7, =0x4514 \n"
1225 "    MOV     R4, R0 \n"
1226 "    LDR     R0, [R7, #0x1C] \n"
1227 "    MOV     R1, #0x3E \n"
1228 "    BL      sub_FF829C0C /*_ClearEventFlag*/ \n"
1229 "    MOV     R2, #0 \n"
1230 "    LDRSH   R0, [R4, #4] \n"
1231 "    MOV     R3, #1 \n"
1232 "    MOV     R1, R2 \n"
1233 "    BL      sub_FF8DC1E0 \n"
1234 "    MOV     R6, R0 \n"
1235 "    LDRSH   R0, [R4, #6] \n"
1236 "    BL      sub_FF8DC3C0 \n"
1237 "    LDRSH   R0, [R4, #8] \n"
1238 "    BL      sub_FF8DC418 \n"
1239 "    LDRSH   R0, [R4, #0xA] \n"
1240 "    BL      sub_FF8DC470 \n"
1241 "    LDRSH   R0, [R4, #0xC] \n"
1242 "    MOV     R1, #0 \n"
1243 "    BL      sub_FF8DC4C8 \n"
1244 "    MOV     R5, R0 \n"
1245 "    LDR     R0, [R4] \n"
1246 "    LDR     R8, =0x5BCA4 \n"
1247 "    CMP     R0, #0xB \n"
1248 "    MOVEQ   R6, #0 \n"
1249 "    MOVEQ   R5, R6 \n"
1250 "    BEQ     loc_FF8DD6AC \n"
1251 "    CMP     R6, #1 \n"
1252 "    BNE     loc_FF8DD6AC \n"
1253 "    LDRSH   R0, [R4, #4] \n"
1254 "    LDR     R1, =0xFF8DC138 \n"
1255 "    MOV     R2, #2 \n"
1256 "    BL      sub_FF887764 \n"
1257 "    STRH    R0, [R4, #4] \n"
1258 "    MOV     R0, #0 \n"
1259 "    STR     R0, [R7, #0x28] \n"
1260 "    B       loc_FF8DD6B4 \n"
1261 
1262 "loc_FF8DD6AC:\n"
1263 "    LDRH    R0, [R8] \n"
1264 "    STRH    R0, [R4, #4] \n"
1265 
1266 "loc_FF8DD6B4:\n"
1267 "    CMP     R5, #1 \n"
1268 "    LDRNEH  R0, [R8, #8] \n"
1269 "    BNE     loc_FF8DD6D0 \n"
1270 "    LDRSH   R0, [R4, #0xC] \n"
1271 "    LDR     R1, =0xFF8DC1BC \n"
1272 "    MOV     R2, #0x20 \n"
1273 "    BL      sub_FF8E269C \n"
1274 
1275 "loc_FF8DD6D0:\n"
1276 "    STRH    R0, [R4, #0xC] \n"
1277 "    LDRSH   R0, [R4, #6] \n"
1278 "    BL      sub_FF8CA250_my \n"  // --> Patched. Old value = 0xFF8CA250.
1279 "    LDR     PC, =0xFF8DD6DC \n"  // Continue in firmware
1280 );
1281 }
1282 
1283 /*************************************************************/
1284 //** sub_FF8CA250_my @ 0xFF8CA250 - 0xFF8CA298, length=19
1285 void __attribute__((naked,noinline)) sub_FF8CA250_my() {
1286 asm volatile (
1287 "    STMFD   SP!, {R4-R6,LR} \n"
1288 "    LDR     R5, =0x4134 \n"
1289 "    MOV     R4, R0 \n"
1290 "    LDR     R0, [R5, #4] \n"
1291 "    CMP     R0, #1 \n"
1292 "    LDRNE   R2, =0x16B \n"
1293 "    LDRNE   R1, =0xFF8C9FF4 /*'Shutter.c'*/ \n"
1294 "    MOVNE   R0, #0 \n"
1295 "    BLNE    _DebugAssert \n"
1296 "    CMN     R4, #0xC00 \n"
1297 "    LDREQSH R4, [R5, #2] \n"
1298 "    CMN     R4, #0xC00 \n"
1299 "    LDREQ   R2, =0x171 \n"
1300 "    LDREQ   R1, =0xFF8C9FF4 /*'Shutter.c'*/ \n"
1301 "    MOVEQ   R0, #0 \n"
1302 "    STRH    R4, [R5, #2] \n"
1303 "    BLEQ    _DebugAssert \n"
1304 "    MOV     R0, R4 \n"
1305 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
1306 "    LDR     PC, =0xFF8CA29C \n"  // Continue in firmware
1307 );
1308 }

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