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

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF931550_my
  3. sub_FF85C054_my
  4. exp_drv_task
  5. sub_FF8AC69C_my
  6. sub_FF891218_my

   1 /*
   2  * capt_seq.c - auto-generated by CHDK code_gen.
   3  */
   4 #include "lolevel.h"
   5 #include "platform.h"
   6 #include "core.h"
   7 
   8 #define USE_STUBS_NRFLAG 1          // see stubs_entry.S
   9 
  10 #include "../../../generic/capt_seq.c"
  11 
  12 /*************************************************************/
  13 //** capt_seq_task @ 0xFF85BD10 - 0xFF85BF78, length=155
  14 void __attribute__((naked,noinline)) capt_seq_task() {
  15 asm volatile (
  16 "    STMFD   SP!, {R3-R9,LR} \n"
  17 "    LDR     R6, =0x1A08C \n"
  18 "    LDR     R5, =0x5640 \n"
  19 "    MOV     R9, #1 \n"
  20 "    MOV     R7, #0 \n"
  21 
  22 "loc_FF85BD24:\n"
  23 "    LDR     R0, [R5, #0xC] \n"
  24 "    MOV     R2, #0 \n"
  25 "    MOV     R1, SP \n"
  26 "    BL      sub_FF829130 /*_ReceiveMessageQueue*/ \n"
  27 "    TST     R0, #1 \n"
  28 "    BEQ     loc_FF85BD50 \n"
  29 "    LDR     R1, =0x43F \n"
  30 "    LDR     R0, =0xFF85BAA8 /*'SsShootTask.c'*/ \n"
  31 "    BL      _DebugAssert \n"
  32 "    BL      _ExitTask \n"
  33 "    LDMFD   SP!, {R3-R9,PC} \n"
  34 
  35 "loc_FF85BD50:\n"
  36 "    LDR     R0, [SP] \n"
  37 "    LDR     R1, [R0] \n"
  38 "    CMP     R1, #0x17 \n"
  39 "    ADDLS   PC, PC, R1, LSL#2 \n"
  40 "    B       loc_FF85BF40 \n"
  41 "    B       loc_FF85BDC4 \n"
  42 "    B       loc_FF85BE2C \n"
  43 "    B       loc_FF85BE34 \n"
  44 "    B       loc_FF85BE4C \n"
  45 "    B       loc_FF85BE40 \n"
  46 "    B       loc_FF85BE54 \n"
  47 "    B       loc_FF85BE5C \n"
  48 "    B       loc_FF85BE64 \n"
  49 "    B       loc_FF85BEBC \n"
  50 "    B       loc_FF85BEC8 \n"
  51 "    B       loc_FF85BED0 \n"
  52 "    B       loc_FF85BED8 \n"
  53 "    B       loc_FF85BEE0 \n"
  54 "    B       loc_FF85BEE8 \n"
  55 "    B       loc_FF85BEF0 \n"
  56 "    B       loc_FF85BEF8 \n"
  57 "    B       loc_FF85BF00 \n"
  58 "    B       loc_FF85BF0C \n"
  59 "    B       loc_FF85BF14 \n"
  60 "    B       loc_FF85BF1C \n"
  61 "    B       loc_FF85BF24 \n"
  62 "    B       loc_FF85BF30 \n"
  63 "    B       loc_FF85BF38 \n"
  64 "    B       loc_FF85BF4C \n"
  65 
  66 "loc_FF85BDC4:\n"
  67 "    BL      sub_FF92FEF8 \n"
  68 
  69 // only do quick press hack if overrides are active
  70 "    BL      captseq_hack_override_active\n" // returns 1 if tv or sv override in effect
  71 "    STR     R0,[SP,#-4]!\n" // push return value
  72 "    BL      shooting_expo_param_override\n"      // added
  73 
  74 "    BL      sub_FF859FE8 \n"
  75 
  76 "    LDR     R0, [SP], #4\n" // pop override hack
  77 "    CMP     R0, #1\n"     // +
  78 "    MOVEQ   R0, #0\n"     // +
  79 "    STREQ   R0, [R6, #0x24]\n"  // fixes overrides behavior at short shutter press
  80 "    LDRNE   R0, [R6, #0x24]\n" // modified NE
  81 "    CMPNE   R0, #0\n"         // modified NE
  82 
  83 //"  LDR     R0, [R6, #0x24] \n"  // above patch makes these lines redundant
  84 //"  CMP     R0, #0 \n"
  85 "    BEQ     loc_FF85BF4C \n"
  86 "    BL      sub_FF85B774 \n"
  87 "    MOV     R4, R0 \n"
  88 "    LDR     R0, [R6, #0x24] \n"
  89 "    CMP     R0, #0 \n"
  90 "    BEQ     loc_FF85BE0C \n"
  91 "    MOV     R0, #0xC \n"
  92 "    BL      sub_FF85EE0C \n"
  93 "    TST     R0, #1 \n"
  94 "    STRNE   R9, [R5, #4] \n"
  95 "    LDRNE   R0, [R4, #8] \n"
  96 "    ORRNE   R0, R0, #0x40000000 \n"
  97 "    STRNE   R0, [R4, #8] \n"
  98 "    BNE     loc_FF85BF4C \n"
  99 
 100 "loc_FF85BE0C:\n"
 101 "    BL      sub_FF944A40 \n"
 102 "    BL      sub_FF869600 \n"
 103 "    STR     R0, [R4, #0x14] \n"
 104 "    MOV     R0, R4 \n"
 105 "    BL      sub_FF931550_my \n"  // --> Patched. Old value = 0xFF931550.
 106 "    TST     R0, #1 \n"
 107 "    STRNE   R9, [R5, #4] \n"
 108 "    B       loc_FF85BF4C \n"
 109 
 110 "loc_FF85BE2C:\n"
 111 "    BL      sub_FF85C054_my \n"  // --> Patched. Old value = 0xFF85C054.
 112 "    B       loc_FF85BE44 \n"
 113 
 114 "loc_FF85BE34:\n"
 115 "    MOV     R0, #1 \n"
 116 "    BL      sub_FF93009C \n"
 117 "    B       loc_FF85BF4C \n"
 118 
 119 "loc_FF85BE40:\n"
 120 "    BL      sub_FF92FB94 \n"
 121 
 122 "loc_FF85BE44:\n"
 123 "    STR     R7, [R6, #0x24] \n"
 124 "    B       loc_FF85BF4C \n"
 125 
 126 "loc_FF85BE4C:\n"
 127 "    BL      sub_FF92FEC4 \n"
 128 "    B       loc_FF85BE44 \n"
 129 
 130 "loc_FF85BE54:\n"
 131 "    BL      sub_FF92FECC \n"
 132 "    B       loc_FF85BF4C \n"
 133 
 134 "loc_FF85BE5C:\n"
 135 "    BL      sub_FF92FFBC \n"
 136 "    B       loc_FF85BEC0 \n"
 137 
 138 "loc_FF85BE64:\n"
 139 "    LDR     R4, [R0, #0xC] \n"
 140 "    BL      sub_FF92FED4 \n"
 141 "    MOV     R0, R4 \n"
 142 "    BL      sub_FF9306E8 \n"
 143 "    TST     R0, #1 \n"
 144 "    MOV     R8, R0 \n"
 145 "    BNE     loc_FF85BEA4 \n"
 146 "    BL      sub_FF869600 \n"
 147 "    STR     R0, [R4, #0x14] \n"
 148 "    MOV     R0, R4 \n"
 149 "    BL      sub_FF931468 \n"
 150 "    MOV     R0, R4 \n"
 151 "    BL      sub_FF93197C \n"
 152 "    MOV     R8, R0 \n"
 153 "    LDR     R0, [R4, #0x14] \n"
 154 "    BL      sub_FF869814 \n"
 155 
 156 "loc_FF85BEA4:\n"
 157 "    BL      sub_FF92FEC4 \n"
 158 "    MOV     R2, R4 \n"
 159 "    MOV     R1, #8 \n"
 160 "    MOV     R0, R8 \n"
 161 "    BL      sub_FF85A544 \n"
 162 "    B       loc_FF85BF4C \n"
 163 
 164 "loc_FF85BEBC:\n"
 165 "    BL      sub_FF930018 \n"
 166 
 167 "loc_FF85BEC0:\n"
 168 "    BL      sub_FF859FE8 \n"
 169 "    B       loc_FF85BF4C \n"
 170 
 171 "loc_FF85BEC8:\n"
 172 "    BL      sub_FF92FEC4 \n"
 173 "    B       loc_FF85BF4C \n"
 174 
 175 "loc_FF85BED0:\n"
 176 "    BL      sub_FF930954 \n"
 177 "    B       loc_FF85BF4C \n"
 178 
 179 "loc_FF85BED8:\n"
 180 "    BL      sub_FF930B0C \n"
 181 "    B       loc_FF85BF4C \n"
 182 
 183 "loc_FF85BEE0:\n"
 184 "    BL      sub_FF930B9C \n"
 185 "    B       loc_FF85BF4C \n"
 186 
 187 "loc_FF85BEE8:\n"
 188 "    BL      sub_FF930C50 \n"
 189 "    B       loc_FF85BF4C \n"
 190 
 191 "loc_FF85BEF0:\n"
 192 "    BL      sub_FF930E38 \n"
 193 "    B       loc_FF85BF4C \n"
 194 
 195 "loc_FF85BEF8:\n"
 196 "    BL      sub_FF930E88 \n"
 197 "    B       loc_FF85BF4C \n"
 198 
 199 "loc_FF85BF00:\n"
 200 "    MOV     R0, #0 \n"
 201 "    BL      sub_FF930F0C \n"
 202 "    B       loc_FF85BF4C \n"
 203 
 204 "loc_FF85BF0C:\n"
 205 "    BL      sub_FF93104C \n"
 206 "    B       loc_FF85BF4C \n"
 207 
 208 "loc_FF85BF14:\n"
 209 "    BL      sub_FF9310E0 \n"
 210 "    B       loc_FF85BF4C \n"
 211 
 212 "loc_FF85BF1C:\n"
 213 "    BL      sub_FF9311A0 \n"
 214 "    B       loc_FF85BF4C \n"
 215 
 216 "loc_FF85BF24:\n"
 217 "    BL      sub_FF9301C0 \n"
 218 "    BL      sub_FF825BA8 \n"
 219 "    B       loc_FF85BF4C \n"
 220 
 221 "loc_FF85BF30:\n"
 222 "    BL      sub_FF930D0C \n"
 223 "    B       loc_FF85BF4C \n"
 224 
 225 "loc_FF85BF38:\n"
 226 "    BL      sub_FF930D78 \n"
 227 "    B       loc_FF85BF4C \n"
 228 
 229 "loc_FF85BF40:\n"
 230 "    LDR     R1, =0x523 \n"
 231 "    LDR     R0, =0xFF85BAA8 /*'SsShootTask.c'*/ \n"
 232 "    BL      _DebugAssert \n"
 233 
 234 "loc_FF85BF4C:\n"
 235 "    LDR     R0, [SP] \n"
 236 "    LDR     R1, [R0, #4] \n"
 237 "    LDR     R0, [R5, #8] \n"
 238 "    BL      sub_FF828EAC /*_SetEventFlag*/ \n"
 239 "    LDR     R4, [SP] \n"
 240 "    LDR     R0, [R4, #8] \n"
 241 "    CMP     R0, #0 \n"
 242 "    LDREQ   R0, =0xFF85BAA8 /*'SsShootTask.c'*/ \n"
 243 "    MOVEQ   R1, #0xFC \n"
 244 "    BLEQ    _DebugAssert \n"
 245 "    STR     R7, [R4, #8] \n"
 246 "    B       loc_FF85BD24 \n"
 247 );
 248 }
 249 
 250 /*************************************************************/
 251 //** sub_FF931550_my @ 0xFF931550 - 0xFF9315C0, length=29
 252 void __attribute__((naked,noinline)) sub_FF931550_my() {
 253 asm volatile (
 254 "    STMFD   SP!, {R0-R10,LR} \n"
 255 "    MOV     R6, #0 \n"
 256 "    MOV     R4, R0 \n"
 257 "    BL      sub_FF932038 \n"
 258 "    MVN     R1, #0 \n"
 259 "    BL      sub_FF828EE0 /*_ClearEventFlag*/ \n"
 260 "    MOV     R2, #4 \n"
 261 "    ADD     R1, SP, #8 \n"
 262 "    MOV     R0, #0x8A \n"
 263 "    BL      _PT_GetPropertyCaseString \n"
 264 "    TST     R0, #1 \n"
 265 "    LDRNE   R1, =0x20A \n"
 266 "    LDRNE   R0, =0xFF931724 /*'SsCaptureSeq.c'*/ \n"
 267 "    BLNE    _DebugAssert \n"
 268 "    LDR     R8, =0x1A140 \n"
 269 "    LDR     R5, =0x1A08C \n"
 270 "    LDRSH   R1, [R8, #0xE] \n"
 271 "    LDR     R0, [R5, #0x7C] \n"
 272 "    BL      sub_FF9DDE88 \n"
 273 "    BL      _GetCCDTemperature \n"
 274 "    LDR     R2, =0xAB00 \n"
 275 "    ADD     R3, R4, #0x8C \n"
 276 "    STRH    R0, [R4, #0x88] \n"
 277 "    STRD    R2, [SP] \n"
 278 "    MOV     R1, R0 \n"
 279 "    LDRH    R0, [R5, #0x54] \n"
 280 "    LDRSH   R2, [R8, #0xC] \n"
 281 "    LDR     R3, =0xAAFC \n"
 282 "    BL      sub_FF932524 \n"
 283 "    BL      wait_until_remote_button_is_released\n" // added
 284 "    BL      capt_seq_hook_set_nr\n"                 // added
 285 "    LDR     PC, =0xFF9315C4 \n"  // Continue in firmware
 286 );
 287 }
 288 
 289 /*************************************************************/
 290 //** sub_FF85C054_my @ 0xFF85C054 - 0xFF85C108, length=46
 291 void __attribute__((naked,noinline)) sub_FF85C054_my() {
 292 asm volatile (
 293 "    STMFD   SP!, {R4-R6,LR} \n"
 294 "    LDR     R4, [R0, #0xC] \n"
 295 "    LDR     R6, =0x1A08C \n"
 296 "    LDR     R0, [R4, #8] \n"
 297 "    MOV     R5, #0 \n"
 298 "    ORR     R0, R0, #1 \n"
 299 "    STR     R0, [R4, #8] \n"
 300 "    LDR     R0, [R6, #0x24] \n"
 301 "    CMP     R0, #0 \n"
 302 "    MOVEQ   R0, #2 \n"
 303 "    BLEQ    sub_FF856814 \n"
 304 "    BL      sub_FF92FED4 \n"
 305 "    LDR     R0, [R6, #0x24] \n"
 306 "    CMP     R0, #0 \n"
 307 "    BNE     loc_FF85C0D4 \n"
 308 "    MOV     R0, R4 \n"
 309 "    BL      sub_FF930368 \n"
 310 "    TST     R0, #1 \n"
 311 "    MOVNE   R2, R4 \n"
 312 "    LDMNEFD SP!, {R4-R6,LR} \n"
 313 "    MOVNE   R1, #1 \n"
 314 "    BNE     sub_FF85A544 \n"
 315 "    BL      sub_FF944A40 \n"
 316 "    BL      sub_FF869600 \n"
 317 "    STR     R0, [R4, #0x14] \n"
 318 "    MOV     R0, R4 \n"
 319 "    BL      sub_FF931468 \n"
 320 "    BL      sub_FF931ECC \n"
 321 "    MOV     R0, R4 \n"
 322 "    BL      sub_FF931550_my \n"  // --> Patched. Old value = 0xFF931550.
 323 "    MOV     R5, R0 \n"
 324 "    B       loc_FF85C0E4 \n"
 325 
 326 "loc_FF85C0D4:\n"
 327 "    LDR     R0, =0x5640 \n"
 328 "    LDR     R0, [R0, #4] \n"
 329 "    CMP     R0, #0 \n"
 330 "    MOVNE   R5, #0x1D \n"
 331 
 332 "loc_FF85C0E4:\n"
 333 "    BL      capt_seq_hook_raw_here \n"         // added
 334 "    MOV     R2, R4 \n"
 335 "    MOV     R1, #1 \n"
 336 "    MOV     R0, R5 \n"
 337 "    BL      sub_FF85A544 \n"
 338 "    BL      sub_FF93191C \n"
 339 "    CMP     R0, #0 \n"
 340 "    LDRNE   R0, [R4, #8] \n"
 341 "    ORRNE   R0, R0, #0x2000 \n"
 342 "    STRNE   R0, [R4, #8] \n"
 343 "    LDMFD   SP!, {R4-R6,PC} \n"
 344 );
 345 }
 346 
 347 /*************************************************************/
 348 //** exp_drv_task @ 0xFF8AEBF4 - 0xFF8AF24C, length=407
 349 void __attribute__((naked,noinline)) exp_drv_task() {
 350 asm volatile (
 351 "    STMFD   SP!, {R4-R8,LR} \n"
 352 "    SUB     SP, SP, #0x20 \n"
 353 "    LDR     R8, =0xBB8 \n"
 354 "    LDR     R7, =0x6E6C \n"
 355 "    LDR     R5, =0x41D44 \n"
 356 "    MOV     R0, #0 \n"
 357 "    ADD     R6, SP, #0x10 \n"
 358 "    STR     R0, [SP, #0xC] \n"
 359 
 360 "loc_FF8AEC14:\n"
 361 "    LDR     R0, [R7, #0x20] \n"
 362 "    MOV     R2, #0 \n"
 363 "    ADD     R1, SP, #0x1C \n"
 364 "    BL      sub_FF829130 /*_ReceiveMessageQueue*/ \n"
 365 "    LDR     R0, [SP, #0xC] \n"
 366 "    CMP     R0, #1 \n"
 367 "    BNE     loc_FF8AEC5C \n"
 368 "    LDR     R0, [SP, #0x1C] \n"
 369 "    LDR     R0, [R0] \n"
 370 "    CMP     R0, #0x13 \n"
 371 "    CMPNE   R0, #0x14 \n"
 372 "    CMPNE   R0, #0x15 \n"
 373 "    BEQ     loc_FF8AEDDC \n"
 374 "    CMP     R0, #0x26 \n"
 375 "    BEQ     loc_FF8AED48 \n"
 376 "    ADD     R1, SP, #0xC \n"
 377 "    MOV     R0, #0 \n"
 378 "    BL      sub_FF8AEBA4 \n"
 379 
 380 "loc_FF8AEC5C:\n"
 381 "    LDR     R0, [SP, #0x1C] \n"
 382 "    LDR     R1, [R0] \n"
 383 "    CMP     R1, #0x2B \n"
 384 "    BNE     loc_FF8AEC8C \n"
 385 "    LDR     R0, [SP, #0x1C] \n"
 386 "    BL      sub_FF8AFEDC \n"
 387 "    LDR     R0, [R7, #0x1C] \n"
 388 "    MOV     R1, #1 \n"
 389 "    BL      sub_FF828EAC /*_SetEventFlag*/ \n"
 390 "    BL      _ExitTask \n"
 391 "    ADD     SP, SP, #0x20 \n"
 392 "    LDMFD   SP!, {R4-R8,PC} \n"
 393 
 394 "loc_FF8AEC8C:\n"
 395 "    CMP     R1, #0x2A \n"
 396 "    BNE     loc_FF8AECA8 \n"
 397 "    LDR     R2, [R0, #0x88]! \n"
 398 "    LDR     R1, [R0, #4] \n"
 399 "    MOV     R0, R1 \n"
 400 "    BLX     R2 \n"
 401 "    B       loc_FF8AF244 \n"
 402 
 403 "loc_FF8AECA8:\n"
 404 "    CMP     R1, #0x24 \n"
 405 "    BNE     loc_FF8AECF8 \n"
 406 "    LDR     R0, [R7, #0x1C] \n"
 407 "    MOV     R1, #0x80 \n"
 408 "    BL      sub_FF828EE0 /*_ClearEventFlag*/ \n"
 409 "    LDR     R0, =0xFF8AB658 \n"
 410 "    MOV     R1, #0x80 \n"
 411 "    BL      sub_FF924C78 \n"
 412 "    LDR     R0, [R7, #0x1C] \n"
 413 "    MOV     R2, R8 \n"
 414 "    MOV     R1, #0x80 \n"
 415 "    BL      sub_FF828DE4 /*_WaitForAllEventFlag*/ \n"
 416 "    TST     R0, #1 \n"
 417 "    LDRNE   R1, =0xD07 \n"
 418 "    BNE     loc_FF8AEDB8 \n"
 419 
 420 "loc_FF8AECE4:\n"
 421 "    LDR     R1, [SP, #0x1C] \n"
 422 "    LDR     R0, [R1, #0x8C] \n"
 423 "    LDR     R1, [R1, #0x88] \n"
 424 "    BLX     R1 \n"
 425 "    B       loc_FF8AF244 \n"
 426 
 427 "loc_FF8AECF8:\n"
 428 "    CMP     R1, #0x25 \n"
 429 "    BNE     loc_FF8AED40 \n"
 430 "    ADD     R1, SP, #0xC \n"
 431 "    BL      sub_FF8AEBA4 \n"
 432 "    LDR     R0, [R7, #0x1C] \n"
 433 "    MOV     R1, #0x100 \n"
 434 "    BL      sub_FF828EE0 /*_ClearEventFlag*/ \n"
 435 "    LDR     R0, =0xFF8AB668 \n"
 436 "    MOV     R1, #0x100 \n"
 437 "    BL      sub_FF924F00 \n"
 438 "    LDR     R0, [R7, #0x1C] \n"
 439 "    MOV     R2, R8 \n"
 440 "    MOV     R1, #0x100 \n"
 441 "    BL      sub_FF828DE4 /*_WaitForAllEventFlag*/ \n"
 442 "    TST     R0, #1 \n"
 443 "    BEQ     loc_FF8AECE4 \n"
 444 "    LDR     R1, =0xD11 \n"
 445 "    B       loc_FF8AEDB8 \n"
 446 
 447 "loc_FF8AED40:\n"
 448 "    CMP     R1, #0x26 \n"
 449 "    BNE     loc_FF8AED58 \n"
 450 
 451 "loc_FF8AED48:\n"
 452 "    LDR     R0, [SP, #0x1C] \n"
 453 "    ADD     R1, SP, #0xC \n"
 454 "    BL      sub_FF8AEBA4 \n"
 455 "    B       loc_FF8AECE4 \n"
 456 
 457 "loc_FF8AED58:\n"
 458 "    CMP     R1, #0x27 \n"
 459 "    CMPNE   R1, #0x28 \n"
 460 "    BNE     loc_FF8AEDC4 \n"
 461 "    ADD     R1, SP, #0xC \n"
 462 "    BL      sub_FF8AEBA4 \n"
 463 "    LDR     R4, [SP, #0x1C] \n"
 464 "    LDR     R0, [R7, #0x1C] \n"
 465 "    MOV     R1, #0x40 \n"
 466 "    BL      sub_FF828EE0 /*_ClearEventFlag*/ \n"
 467 "    LDR     R0, [R4] \n"
 468 "    MOV     R1, #0x40 \n"
 469 "    CMP     R0, #0x27 \n"
 470 "    LDR     R0, =0xFF8AB6CC \n"
 471 "    BNE     loc_FF8AED98 \n"
 472 "    BL      sub_FF924CD4 \n"
 473 "    B       loc_FF8AED9C \n"
 474 
 475 "loc_FF8AED98:\n"
 476 "    BL      sub_FF924D3C \n"
 477 
 478 "loc_FF8AED9C:\n"
 479 "    LDR     R0, [R7, #0x1C] \n"
 480 "    MOV     R2, R8 \n"
 481 "    MOV     R1, #0x40 \n"
 482 "    BL      sub_FF828DE4 /*_WaitForAllEventFlag*/ \n"
 483 "    TST     R0, #1 \n"
 484 "    BEQ     loc_FF8AECE4 \n"
 485 "    LDR     R1, =0xD1F \n"
 486 
 487 "loc_FF8AEDB8:\n"
 488 "    LDR     R0, =0xFF8ABD68 /*'ExpDrv.c'*/ \n"
 489 "    BL      _DebugAssert \n"
 490 "    B       loc_FF8AECE4 \n"
 491 
 492 "loc_FF8AEDC4:\n"
 493 "    CMP     R1, #0x29 \n"
 494 "    BNE     loc_FF8AEDDC \n"
 495 "    BL      sub_FF891474 \n"
 496 "    BL      sub_FF8921F4 \n"
 497 "    BL      sub_FF891CB4 \n"
 498 "    B       loc_FF8AECE4 \n"
 499 
 500 "loc_FF8AEDDC:\n"
 501 "    LDR     R0, [SP, #0x1C] \n"
 502 "    MOV     R4, #1 \n"
 503 "    LDR     R1, [R0] \n"
 504 "    CMP     R1, #0x11 \n"
 505 "    CMPNE   R1, #0x12 \n"
 506 "    BNE     loc_FF8AEE4C \n"
 507 "    LDR     R1, [R0, #0x7C] \n"
 508 "    ADD     R1, R1, R1, LSL#1 \n"
 509 "    ADD     R1, R0, R1, LSL#2 \n"
 510 "    SUB     R1, R1, #8 \n"
 511 "    LDMIA   R1, {R2-R4} \n"
 512 "    STMIA   R6, {R2-R4} \n"
 513 "    BL      sub_FF8AD6C0 \n"
 514 "    LDR     R0, [SP, #0x1C] \n"
 515 "    LDR     R1, [R0, #0x7C] \n"
 516 "    LDR     R3, [R0, #0x88] \n"
 517 "    LDR     R2, [R0, #0x8C] \n"
 518 "    ADD     R0, R0, #4 \n"
 519 "    BLX     R3 \n"
 520 "    LDR     R0, [SP, #0x1C] \n"
 521 "    BL      sub_FF8B02B0 \n"
 522 "    LDR     R0, [SP, #0x1C] \n"
 523 "    LDR     R1, [R0, #0x7C] \n"
 524 "    LDR     R3, [R0, #0x90] \n"
 525 "    LDR     R2, [R0, #0x94] \n"
 526 "    ADD     R0, R0, #4 \n"
 527 "    BLX     R3 \n"
 528 "    B       loc_FF8AF184 \n"
 529 
 530 "loc_FF8AEE4C:\n"
 531 "    CMP     R1, #0x13 \n"
 532 "    CMPNE   R1, #0x14 \n"
 533 "    CMPNE   R1, #0x15 \n"
 534 "    BNE     loc_FF8AEF00 \n"
 535 "    ADD     R3, SP, #0xC \n"
 536 "    MOV     R2, SP \n"
 537 "    ADD     R1, SP, #0x10 \n"
 538 "    BL      sub_FF8AD908 \n"
 539 "    CMP     R0, #1 \n"
 540 "    MOV     R4, R0 \n"
 541 "    CMPNE   R4, #5 \n"
 542 "    BNE     loc_FF8AEE9C \n"
 543 "    LDR     R0, [SP, #0x1C] \n"
 544 "    MOV     R2, R4 \n"
 545 "    LDR     R1, [R0, #0x7C]! \n"
 546 "    LDR     R12, [R0, #0xC]! \n"
 547 "    LDR     R3, [R0, #4] \n"
 548 "    MOV     R0, SP \n"
 549 "    BLX     R12 \n"
 550 "    B       loc_FF8AEED4 \n"
 551 
 552 "loc_FF8AEE9C:\n"
 553 "    LDR     R0, [SP, #0x1C] \n"
 554 "    CMP     R4, #2 \n"
 555 "    LDR     R3, [R0, #0x8C] \n"
 556 "    CMPNE   R4, #6 \n"
 557 "    BNE     loc_FF8AEEE8 \n"
 558 "    LDR     R12, [R0, #0x88] \n"
 559 "    MOV     R0, SP \n"
 560 "    MOV     R2, R4 \n"
 561 "    MOV     R1, #1 \n"
 562 "    BLX     R12 \n"
 563 "    LDR     R0, [SP, #0x1C] \n"
 564 "    MOV     R2, SP \n"
 565 "    ADD     R1, SP, #0x10 \n"
 566 "    BL      sub_FF8AE8B8 \n"
 567 
 568 "loc_FF8AEED4:\n"
 569 "    LDR     R0, [SP, #0x1C] \n"
 570 "    LDR     R2, [SP, #0xC] \n"
 571 "    MOV     R1, R4 \n"
 572 "    BL      sub_FF8AEB44 \n"
 573 "    B       loc_FF8AF184 \n"
 574 
 575 "loc_FF8AEEE8:\n"
 576 "    LDR     R1, [R0, #0x7C] \n"
 577 "    LDR     R12, [R0, #0x88] \n"
 578 "    ADD     R0, R0, #4 \n"
 579 "    MOV     R2, R4 \n"
 580 "    BLX     R12 \n"
 581 "    B       loc_FF8AF184 \n"
 582 
 583 "loc_FF8AEF00:\n"
 584 "    CMP     R1, #0x20 \n"
 585 "    CMPNE   R1, #0x21 \n"
 586 "    BNE     loc_FF8AEF4C \n"
 587 "    LDR     R1, [R0, #0x7C] \n"
 588 "    ADD     R1, R1, R1, LSL#1 \n"
 589 "    ADD     R1, R0, R1, LSL#2 \n"
 590 "    SUB     R1, R1, #8 \n"
 591 "    LDMIA   R1, {R2-R4} \n"
 592 "    STMIA   R6, {R2-R4} \n"
 593 "    BL      sub_FF8ACC50 \n"
 594 "    LDR     R0, [SP, #0x1C] \n"
 595 "    LDR     R1, [R0, #0x7C] \n"
 596 "    LDR     R3, [R0, #0x88] \n"
 597 "    LDR     R2, [R0, #0x8C] \n"
 598 "    ADD     R0, R0, #4 \n"
 599 "    BLX     R3 \n"
 600 "    LDR     R0, [SP, #0x1C] \n"
 601 "    BL      sub_FF8ACF40 \n"
 602 "    B       loc_FF8AF184 \n"
 603 
 604 "loc_FF8AEF4C:\n"
 605 "    ADD     R1, R0, #4 \n"
 606 "    LDMIA   R1, {R2,R3,R12} \n"
 607 "    STMIA   R6, {R2,R3,R12} \n"
 608 "    LDR     R1, [R0] \n"
 609 "    CMP     R1, #0x23 \n"
 610 "    ADDLS   PC, PC, R1, LSL#2 \n"
 611 "    B       loc_FF8AF164 \n"
 612 "    B       loc_FF8AEFF8 \n"
 613 "    B       loc_FF8AEFF8 \n"
 614 "    B       loc_FF8AF04C \n"
 615 "    B       loc_FF8AF054 \n"
 616 "    B       loc_FF8AF054 \n"
 617 "    B       loc_FF8AF054 \n"
 618 "    B       loc_FF8AEFF8 \n"
 619 "    B       loc_FF8AF04C \n"
 620 "    B       loc_FF8AF054 \n"
 621 "    B       loc_FF8AF054 \n"
 622 "    B       loc_FF8AF06C \n"
 623 "    B       loc_FF8AF06C \n"
 624 "    B       loc_FF8AF158 \n"
 625 "    B       loc_FF8AF160 \n"
 626 "    B       loc_FF8AF160 \n"
 627 "    B       loc_FF8AF160 \n"
 628 "    B       loc_FF8AF160 \n"
 629 "    B       loc_FF8AF164 \n"
 630 "    B       loc_FF8AF164 \n"
 631 "    B       loc_FF8AF164 \n"
 632 "    B       loc_FF8AF164 \n"
 633 "    B       loc_FF8AF164 \n"
 634 "    B       loc_FF8AF05C \n"
 635 "    B       loc_FF8AF064 \n"
 636 "    B       loc_FF8AF064 \n"
 637 "    B       loc_FF8AF078 \n"
 638 "    B       loc_FF8AF080 \n"
 639 "    B       loc_FF8AF0B0 \n"
 640 "    B       loc_FF8AF0E0 \n"
 641 "    B       loc_FF8AF110 \n"
 642 "    B       loc_FF8AF140 \n"
 643 "    B       loc_FF8AF140 \n"
 644 "    B       loc_FF8AF164 \n"
 645 "    B       loc_FF8AF164 \n"
 646 "    B       loc_FF8AF148 \n"
 647 "    B       loc_FF8AF150 \n"
 648 
 649 "loc_FF8AEFF8:\n"
 650 "    BL      sub_FF8ABB50 \n"
 651 "    B       loc_FF8AF164 \n"
 652 //SKIP DATA
 653 
 654 "loc_FF8AF04C:\n"
 655 "    BL      sub_FF8ABDD8 \n"
 656 "    B       loc_FF8AF164 \n"
 657 
 658 "loc_FF8AF054:\n"
 659 "    BL      sub_FF8ABFDC \n"
 660 "    B       loc_FF8AF164 \n"
 661 
 662 "loc_FF8AF05C:\n"
 663 "    BL      sub_FF8AC244 \n"
 664 "    B       loc_FF8AF164 \n"
 665 
 666 "loc_FF8AF064:\n"
 667 "    BL      sub_FF8AC438 \n"
 668 "    B       loc_FF8AF164 \n"
 669 
 670 "loc_FF8AF06C:\n"
 671 "    BL      sub_FF8AC69C_my \n"  // --> Patched. Old value = 0xFF8AC69C.
 672 "    MOV     R4, #0 \n"
 673 "    B       loc_FF8AF164 \n"
 674 
 675 "loc_FF8AF078:\n"
 676 "    BL      sub_FF8AC7D8 \n"
 677 "    B       loc_FF8AF164 \n"
 678 
 679 "loc_FF8AF080:\n"
 680 "    LDRH    R1, [R0, #4] \n"
 681 "    STRH    R1, [SP, #0x10] \n"
 682 "    LDRH    R1, [R5, #2] \n"
 683 "    STRH    R1, [SP, #0x12] \n"
 684 "    LDRH    R1, [R5, #4] \n"
 685 "    STRH    R1, [SP, #0x14] \n"
 686 "    LDRH    R1, [R5, #6] \n"
 687 "    STRH    R1, [SP, #0x16] \n"
 688 "    LDRH    R1, [R0, #0xC] \n"
 689 "    STRH    R1, [SP, #0x18] \n"
 690 "    BL      sub_FF8AFF50 \n"
 691 "    B       loc_FF8AF164 \n"
 692 
 693 "loc_FF8AF0B0:\n"
 694 "    LDRH    R1, [R0, #4] \n"
 695 "    STRH    R1, [SP, #0x10] \n"
 696 "    LDRH    R1, [R5, #2] \n"
 697 "    STRH    R1, [SP, #0x12] \n"
 698 "    LDRH    R1, [R5, #4] \n"
 699 "    STRH    R1, [SP, #0x14] \n"
 700 "    LDRH    R1, [R5, #6] \n"
 701 "    STRH    R1, [SP, #0x16] \n"
 702 "    LDRH    R1, [R5, #8] \n"
 703 "    STRH    R1, [SP, #0x18] \n"
 704 "    BL      sub_FF8B00CC \n"
 705 "    B       loc_FF8AF164 \n"
 706 
 707 "loc_FF8AF0E0:\n"
 708 "    LDRH    R1, [R5] \n"
 709 "    STRH    R1, [SP, #0x10] \n"
 710 "    LDRH    R1, [R0, #6] \n"
 711 "    STRH    R1, [SP, #0x12] \n"
 712 "    LDRH    R1, [R5, #4] \n"
 713 "    STRH    R1, [SP, #0x14] \n"
 714 "    LDRH    R1, [R5, #6] \n"
 715 "    STRH    R1, [SP, #0x16] \n"
 716 "    LDRH    R1, [R5, #8] \n"
 717 "    STRH    R1, [SP, #0x18] \n"
 718 "    BL      sub_FF8B0178 \n"
 719 "    B       loc_FF8AF164 \n"
 720 
 721 "loc_FF8AF110:\n"
 722 "    LDRH    R1, [R5] \n"
 723 "    STRH    R1, [SP, #0x10] \n"
 724 "    LDRH    R1, [R5, #2] \n"
 725 "    STRH    R1, [SP, #0x12] \n"
 726 "    LDRH    R1, [R5, #4] \n"
 727 "    STRH    R1, [SP, #0x14] \n"
 728 "    LDRH    R1, [R5, #6] \n"
 729 "    STRH    R1, [SP, #0x16] \n"
 730 "    LDRH    R1, [R0, #0xC] \n"
 731 "    STRH    R1, [SP, #0x18] \n"
 732 "    BL      sub_FF8B0218 \n"
 733 "    B       loc_FF8AF164 \n"
 734 
 735 "loc_FF8AF140:\n"
 736 "    BL      sub_FF8ACA30 \n"
 737 "    B       loc_FF8AF164 \n"
 738 
 739 "loc_FF8AF148:\n"
 740 "    BL      sub_FF8AD044 \n"
 741 "    B       loc_FF8AF164 \n"
 742 
 743 "loc_FF8AF150:\n"
 744 "    BL      sub_FF8AD278 \n"
 745 "    B       loc_FF8AF164 \n"
 746 
 747 "loc_FF8AF158:\n"
 748 "    BL      sub_FF8AD3F0 \n"
 749 "    B       loc_FF8AF164 \n"
 750 
 751 "loc_FF8AF160:\n"
 752 "    BL      sub_FF8AD588 \n"
 753 
 754 "loc_FF8AF164:\n"
 755 "    LDR     R0, [SP, #0x1C] \n"
 756 "    LDR     R1, [R0, #0x7C] \n"
 757 "    LDR     R3, [R0, #0x88] \n"
 758 "    LDR     R2, [R0, #0x8C] \n"
 759 "    ADD     R0, R0, #4 \n"
 760 "    BLX     R3 \n"
 761 "    CMP     R4, #1 \n"
 762 "    BNE     loc_FF8AF1CC \n"
 763 
 764 "loc_FF8AF184:\n"
 765 "    LDR     R0, [SP, #0x1C] \n"
 766 "    MOV     R2, #0xC \n"
 767 "    LDR     R1, [R0, #0x7C] \n"
 768 "    ADD     R1, R1, R1, LSL#1 \n"
 769 "    ADD     R0, R0, R1, LSL#2 \n"
 770 "    SUB     R4, R0, #8 \n"
 771 "    LDR     R0, =0x41D44 \n"
 772 "    ADD     R1, SP, #0x10 \n"
 773 "    BL      sub_FFA8BE00 \n"
 774 "    LDR     R0, =0x41D50 \n"
 775 "    MOV     R2, #0xC \n"
 776 "    ADD     R1, SP, #0x10 \n"
 777 "    BL      sub_FFA8BE00 \n"
 778 "    LDR     R0, =0x41D5C \n"
 779 "    MOV     R2, #0xC \n"
 780 "    MOV     R1, R4 \n"
 781 "    BL      sub_FFA8BE00 \n"
 782 "    B       loc_FF8AF244 \n"
 783 
 784 "loc_FF8AF1CC:\n"
 785 "    LDR     R0, [SP, #0x1C] \n"
 786 "    LDR     R0, [R0] \n"
 787 "    CMP     R0, #0xB \n"
 788 "    BNE     loc_FF8AF214 \n"
 789 "    MOV     R3, #0 \n"
 790 "    STR     R3, [SP] \n"
 791 "    MOV     R3, #1 \n"
 792 "    MOV     R2, #1 \n"
 793 "    MOV     R1, #1 \n"
 794 "    MOV     R0, #0 \n"
 795 "    BL      sub_FF8AB958 \n"
 796 "    MOV     R3, #0 \n"
 797 "    STR     R3, [SP] \n"
 798 "    MOV     R3, #1 \n"
 799 "    MOV     R2, #1 \n"
 800 "    MOV     R1, #1 \n"
 801 "    MOV     R0, #0 \n"
 802 "    B       loc_FF8AF240 \n"
 803 
 804 "loc_FF8AF214:\n"
 805 "    MOV     R3, #1 \n"
 806 "    MOV     R2, #1 \n"
 807 "    MOV     R1, #1 \n"
 808 "    MOV     R0, #1 \n"
 809 "    STR     R3, [SP] \n"
 810 "    BL      sub_FF8AB958 \n"
 811 "    MOV     R3, #1 \n"
 812 "    MOV     R2, #1 \n"
 813 "    MOV     R1, #1 \n"
 814 "    MOV     R0, #1 \n"
 815 "    STR     R3, [SP] \n"
 816 
 817 "loc_FF8AF240:\n"
 818 "    BL      sub_FF8ABA98 \n"
 819 
 820 "loc_FF8AF244:\n"
 821 "    LDR     R0, [SP, #0x1C] \n"
 822 "    BL      sub_FF8AFEDC \n"
 823 "    B       loc_FF8AEC14 \n"
 824 );
 825 }
 826 
 827 /*************************************************************/
 828 //** sub_FF8AC69C_my @ 0xFF8AC69C - 0xFF8AC758, length=48
 829 void __attribute__((naked,noinline)) sub_FF8AC69C_my() {
 830 asm volatile (
 831 "    STMFD   SP!, {R4-R8,LR} \n"
 832 "    LDR     R7, =0x6E6C \n"
 833 "    MOV     R4, R0 \n"
 834 "    LDR     R0, [R7, #0x1C] \n"
 835 "    MOV     R1, #0x3E \n"
 836 "    BL      sub_FF828EE0 /*_ClearEventFlag*/ \n"
 837 "    LDRSH   R0, [R4, #4] \n"
 838 "    MOV     R2, #0 \n"
 839 "    MOV     R1, #0 \n"
 840 "    BL      sub_FF8AB6EC \n"
 841 "    MOV     R6, R0 \n"
 842 "    LDRSH   R0, [R4, #6] \n"
 843 "    BL      sub_FF8AB7F8 \n"
 844 "    LDRSH   R0, [R4, #8] \n"
 845 "    BL      sub_FF8AB850 \n"
 846 "    LDRSH   R0, [R4, #0xA] \n"
 847 "    BL      sub_FF8AB8A8 \n"
 848 "    LDRSH   R0, [R4, #0xC] \n"
 849 "    BL      sub_FF8AB900 \n"
 850 "    MOV     R5, R0 \n"
 851 "    LDR     R0, [R4] \n"
 852 "    LDR     R8, =0x41D5C \n"
 853 "    CMP     R0, #0xB \n"
 854 "    MOVEQ   R6, #0 \n"
 855 "    MOVEQ   R5, #0 \n"
 856 "    BEQ     loc_FF8AC72C \n"
 857 "    CMP     R6, #1 \n"
 858 "    BNE     loc_FF8AC72C \n"
 859 "    LDRSH   R0, [R4, #4] \n"
 860 "    LDR     R1, =0xFF8AB648 \n"
 861 "    MOV     R2, #2 \n"
 862 "    BL      sub_FF924DCC \n"
 863 "    STRH    R0, [R4, #4] \n"
 864 "    MOV     R0, #0 \n"
 865 "    STR     R0, [R7, #0x28] \n"
 866 "    B       loc_FF8AC734 \n"
 867 
 868 "loc_FF8AC72C:\n"
 869 "    LDRH    R0, [R8] \n"
 870 "    STRH    R0, [R4, #4] \n"
 871 
 872 "loc_FF8AC734:\n"
 873 "    CMP     R5, #1 \n"
 874 "    LDRNEH  R0, [R8, #8] \n"
 875 "    BNE     loc_FF8AC750 \n"
 876 "    LDRSH   R0, [R4, #0xC] \n"
 877 "    LDR     R1, =0xFF8AB6DC \n"
 878 "    MOV     R2, #0x20 \n"
 879 "    BL      sub_FF8AFF0C \n"
 880 
 881 "loc_FF8AC750:\n"
 882 "    STRH    R0, [R4, #0xC] \n"
 883 "    LDRSH   R0, [R4, #6] \n"
 884 "    BL      sub_FF891218_my \n"  // --> Patched. Old value = 0xFF891218.
 885 "    LDR     PC, =0xFF8AC75C \n"  // Continue in firmware
 886 );
 887 }
 888 
 889 /*************************************************************/
 890 //** sub_FF891218_my @ 0xFF891218 - 0xFF891280, length=27
 891 void __attribute__((naked,noinline)) sub_FF891218_my() {
 892 asm volatile (
 893 "    STMFD   SP!, {R4-R6,LR} \n"
 894 "    LDR     R5, =0x695C \n"
 895 "    MOV     R4, R0 \n"
 896 "    LDR     R0, [R5, #4] \n"
 897 "    CMP     R0, #1 \n"
 898 "    MOVNE   R1, #0x16C \n"
 899 "    LDRNE   R0, =0xFF890FB0 /*'Shutter.c'*/ \n"
 900 "    BLNE    _DebugAssert \n"
 901 "    CMN     R4, #0xC00 \n"
 902 "    LDREQSH R4, [R5, #2] \n"
 903 "    CMN     R4, #0xC00 \n"
 904 "    LDREQ   R1, =0x172 \n"
 905 "    LDREQ   R0, =0xFF890FB0 /*'Shutter.c'*/ \n"
 906 "    STRH    R4, [R5, #2] \n"
 907 "    BLEQ    _DebugAssert \n"
 908 "    MOV     R0, R4 \n"
 909 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
 910 "    MOV     R4, R0 \n"
 911 //"  BL      _sub_FF8BE39C \n"  // --> Nullsub call removed.
 912 "    MOV     R0, R4 \n"
 913 "    BL      sub_FF8C1B88 \n"
 914 "    TST     R0, #1 \n"
 915 "    LDRNE   R1, =0x177 \n"
 916 "    LDMNEFD SP!, {R4-R6,LR} \n"
 917 "    LDRNE   R0, =0xFF890FB0 /*'Shutter.c'*/ \n"
 918 "    BNE     _DebugAssert \n"
 919 "    LDMFD   SP!, {R4-R6,PC} \n"
 920 );
 921 }

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