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

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF93DB30_my
  3. sub_FF85E3C0_my
  4. exp_drv_task
  5. sub_FF8B42DC_my
  6. sub_FF895968_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 @ 0xFF85E03C - 0xFF85E2D4, length=167
  14 void __attribute__((naked,noinline)) capt_seq_task() {
  15 asm volatile (
  16 "    STMFD   SP!, {R3-R9,LR} \n"
  17 "    LDR     R6, =0x19EBC \n"
  18 "    LDR     R5, =0x54E0 \n"
  19 "    MOV     R9, #1 \n"
  20 "    MOV     R7, #0 \n"
  21 
  22 "loc_FF85E050:\n"
  23 "    LDR     R0, [R5, #0xC] \n"
  24 "    MOV     R2, #0 \n"
  25 "    MOV     R1, SP \n"
  26 "    BL      sub_FF827D90 /*_ReceiveMessageQueue*/ \n"
  27 "    TST     R0, #1 \n"
  28 "    BEQ     loc_FF85E07C \n"
  29 "    LDR     R1, =0x48E \n"
  30 "    LDR     R0, =0xFF85DD14 /*'SsShootTask.c'*/ \n"
  31 "    BL      _DebugAssert \n"
  32 "    BL      _ExitTask \n"
  33 "    LDMFD   SP!, {R3-R9,PC} \n"
  34 
  35 "loc_FF85E07C:\n"
  36 "    LDR     R0, [SP] \n"
  37 "    LDR     R1, [R0] \n"
  38 "    CMP     R1, #0x1B \n"
  39 "    ADDLS   PC, PC, R1, LSL#2 \n"
  40 "    B       loc_FF85E29C \n"
  41 "    B       loc_FF85E100 \n"
  42 "    B       loc_FF85E168 \n"
  43 "    B       loc_FF85E170 \n"
  44 "    B       loc_FF85E188 \n"
  45 "    B       loc_FF85E17C \n"
  46 "    B       loc_FF85E190 \n"
  47 "    B       loc_FF85E198 \n"
  48 "    B       loc_FF85E1A0 \n"
  49 "    B       loc_FF85E1F8 \n"
  50 "    B       loc_FF85E204 \n"
  51 "    B       loc_FF85E20C \n"
  52 "    B       loc_FF85E214 \n"
  53 "    B       loc_FF85E21C \n"
  54 "    B       loc_FF85E224 \n"
  55 "    B       loc_FF85E22C \n"
  56 "    B       loc_FF85E234 \n"
  57 "    B       loc_FF85E23C \n"
  58 "    B       loc_FF85E248 \n"
  59 "    B       loc_FF85E250 \n"
  60 "    B       loc_FF85E258 \n"
  61 "    B       loc_FF85E260 \n"
  62 "    B       loc_FF85E26C \n"
  63 "    B       loc_FF85E274 \n"
  64 "    B       loc_FF85E27C \n"
  65 "    B       loc_FF85E284 \n"
  66 "    B       loc_FF85E28C \n"
  67 "    B       loc_FF85E294 \n"
  68 "    B       loc_FF85E2A8 \n"
  69 
  70 "loc_FF85E100:\n"
  71 "    BL      sub_FF93C448 \n"
  72 // only do quick press hack if overrides are active
  73 "    BL      captseq_hack_override_active\n"      // returns 1 if tv or sv override in effect
  74 "    STR     R0,[SP,#-4]!\n" // push return value
  75 "    BL      shooting_expo_param_override\n"      // added
  76 "    BL      sub_FF85C1C4 \n"
  77 "    LDR     R0,[SP],#4\n" // pop override hack
  78 "    CMP     R0, #1\n"     // +
  79 "    MOVEQ   R0, #0\n"     // +
  80 "    STREQ   R0, [R6,#0x24]\n"  // fixes overrides behavior at short shutter press
  81 "    LDRNE   R0, [R6,#0x24]\n" // modified NE
  82 "    CMPNE   R0, #0\n"         // modified NE
  83 "    BEQ     loc_FF85E2A8 \n"
  84 "    BL      sub_FF85D9E4 \n"
  85 "    MOV     R4, R0 \n"
  86 "    LDR     R0, [R6, #0x24] \n"
  87 "    CMP     R0, #0 \n"
  88 "    BEQ     loc_FF85E148 \n"
  89 "    MOV     R0, #0xC \n"
  90 "    BL      sub_FF8610AC \n"
  91 "    TST     R0, #1 \n"
  92 "    STRNE   R9, [R5, #4] \n"
  93 "    LDRNE   R0, [R4, #8] \n"
  94 "    ORRNE   R0, R0, #0x40000000 \n"
  95 "    STRNE   R0, [R4, #8] \n"
  96 "    BNE     loc_FF85E2A8 \n"
  97 
  98 "loc_FF85E148:\n"
  99 "    BL      sub_FF95DEA0 \n"
 100 "    BL      sub_FF86D198 \n"
 101 "    STR     R0, [R4, #0x14] \n"
 102 "    MOV     R0, R4 \n"
 103 "    BL      sub_FF93DB30_my \n"  // --> Patched. Old value = 0xFF93DB30.
 104 "    BL      capt_seq_hook_raw_here \n"         // added
 105 "    TST     R0, #1 \n"
 106 "    STRNE   R9, [R5, #4] \n"
 107 "    B       loc_FF85E2A8 \n"
 108 
 109 "loc_FF85E168:\n"
 110 "    BL      sub_FF85E3C0_my \n"  // --> Patched. Old value = 0xFF85E3C0.
 111 "    B       loc_FF85E180 \n"
 112 
 113 "loc_FF85E170:\n"
 114 "    MOV     R0, #1 \n"
 115 "    BL      sub_FF93C5F0 \n"
 116 "    B       loc_FF85E2A8 \n"
 117 
 118 "loc_FF85E17C:\n"
 119 "    BL      sub_FF93C0E0 \n"
 120 
 121 "loc_FF85E180:\n"
 122 "    STR     R7, [R6, #0x24] \n"
 123 "    B       loc_FF85E2A8 \n"
 124 
 125 "loc_FF85E188:\n"
 126 "    BL      sub_FF93C414 \n"
 127 "    B       loc_FF85E180 \n"
 128 
 129 "loc_FF85E190:\n"
 130 "    BL      sub_FF93C41C \n"
 131 "    B       loc_FF85E2A8 \n"
 132 
 133 "loc_FF85E198:\n"
 134 "    BL      sub_FF93C510 \n"
 135 "    B       loc_FF85E1FC \n"
 136 
 137 "loc_FF85E1A0:\n"
 138 "    LDR     R4, [R0, #0xC] \n"
 139 "    BL      sub_FF93C424 \n"
 140 "    MOV     R0, R4 \n"
 141 "    BL      sub_FF93CC38 \n"
 142 "    TST     R0, #1 \n"
 143 "    MOV     R8, R0 \n"
 144 "    BNE     loc_FF85E1E0 \n"
 145 "    BL      sub_FF86D198 \n"
 146 "    STR     R0, [R4, #0x14] \n"
 147 "    MOV     R0, R4 \n"
 148 "    BL      sub_FF93DA48 \n"
 149 "    MOV     R0, R4 \n"
 150 "    BL      sub_FF93DF9C \n"
 151 "    MOV     R8, R0 \n"
 152 "    LDR     R0, [R4, #0x14] \n"
 153 "    BL      sub_FF86D3A4 \n"
 154 
 155 "loc_FF85E1E0:\n"
 156 "    BL      sub_FF93C414 \n"
 157 "    MOV     R2, R4 \n"
 158 "    MOV     R1, #9 \n"
 159 "    MOV     R0, R8 \n"
 160 "    BL      sub_FF85C718 \n"
 161 "    B       loc_FF85E2A8 \n"
 162 
 163 "loc_FF85E1F8:\n"
 164 "    BL      sub_FF93C570 \n"
 165 
 166 "loc_FF85E1FC:\n"
 167 "    BL      sub_FF85C1C4 \n"
 168 "    B       loc_FF85E2A8 \n"
 169 
 170 "loc_FF85E204:\n"
 171 "    BL      sub_FF93C414 \n"
 172 "    B       loc_FF85E2A8 \n"
 173 
 174 "loc_FF85E20C:\n"
 175 "    BL      sub_FF93CEA4 \n"
 176 "    B       loc_FF85E2A8 \n"
 177 
 178 "loc_FF85E214:\n"
 179 "    BL      sub_FF93D08C \n"
 180 "    B       loc_FF85E2A8 \n"
 181 
 182 "loc_FF85E21C:\n"
 183 "    BL      sub_FF93D11C \n"
 184 "    B       loc_FF85E2A8 \n"
 185 
 186 "loc_FF85E224:\n"
 187 "    BL      sub_FF93D1D0 \n"
 188 "    B       loc_FF85E2A8 \n"
 189 
 190 "loc_FF85E22C:\n"
 191 "    BL      sub_FF93D3C8 \n"
 192 "    B       loc_FF85E2A8 \n"
 193 
 194 "loc_FF85E234:\n"
 195 "    BL      sub_FF93D418 \n"
 196 "    B       loc_FF85E2A8 \n"
 197 
 198 "loc_FF85E23C:\n"
 199 "    MOV     R0, #0 \n"
 200 "    BL      sub_FF93D49C \n"
 201 "    B       loc_FF85E2A8 \n"
 202 
 203 "loc_FF85E248:\n"
 204 "    BL      sub_FF93D5EC \n"
 205 "    B       loc_FF85E2A8 \n"
 206 
 207 "loc_FF85E250:\n"
 208 "    BL      sub_FF93D680 \n"
 209 "    B       loc_FF85E2A8 \n"
 210 
 211 "loc_FF85E258:\n"
 212 "    BL      sub_FF93D748 \n"
 213 "    B       loc_FF85E2A8 \n"
 214 
 215 "loc_FF85E260:\n"
 216 "    BL      sub_FF93C714 \n"
 217 "    BL      sub_FF824C38 \n"
 218 "    B       loc_FF85E2A8 \n"
 219 
 220 "loc_FF85E26C:\n"
 221 "    BL      sub_FF93D28C \n"
 222 "    B       loc_FF85E2A8 \n"
 223 
 224 "loc_FF85E274:\n"
 225 "    BL      sub_FF93D2F8 \n"
 226 "    B       loc_FF85E2A8 \n"
 227 
 228 "loc_FF85E27C:\n"
 229 "    BL      sub_FF93F558 \n"
 230 "    B       loc_FF85E2A8 \n"
 231 
 232 "loc_FF85E284:\n"
 233 "    BL      sub_FF93F574 \n"
 234 "    B       loc_FF85E2A8 \n"
 235 
 236 "loc_FF85E28C:\n"
 237 "    BL      sub_FF93F584 \n"
 238 "    B       loc_FF85E2A8 \n"
 239 
 240 "loc_FF85E294:\n"
 241 "    BL      sub_FF93F5B0 \n"
 242 "    B       loc_FF85E2A8 \n"
 243 
 244 "loc_FF85E29C:\n"
 245 "    LDR     R1, =0x58E \n"
 246 "    LDR     R0, =0xFF85DD14 /*'SsShootTask.c'*/ \n"
 247 "    BL      _DebugAssert \n"
 248 
 249 "loc_FF85E2A8:\n"
 250 "    LDR     R0, [SP] \n"
 251 "    LDR     R1, [R0, #4] \n"
 252 "    LDR     R0, [R5, #8] \n"
 253 "    BL      sub_FF827B0C /*_SetEventFlag*/ \n"
 254 "    LDR     R4, [SP] \n"
 255 "    LDR     R0, [R4, #8] \n"
 256 "    CMP     R0, #0 \n"
 257 "    LDREQ   R1, =0x10D \n"
 258 "    LDREQ   R0, =0xFF85DD14 /*'SsShootTask.c'*/ \n"
 259 "    BLEQ    _DebugAssert \n"
 260 "    STR     R7, [R4, #8] \n"
 261 "    B       loc_FF85E050 \n"
 262 );
 263 }
 264 
 265 /*************************************************************/
 266 //** sub_FF93DB30_my @ 0xFF93DB30 - 0xFF93DBA0, length=29
 267 void __attribute__((naked,noinline)) sub_FF93DB30_my() {
 268 asm volatile (
 269 "    STMFD   SP!, {R0-R10,LR} \n"
 270 "    MOV     R6, #0 \n"
 271 "    MOV     R4, R0 \n"
 272 "    BL      sub_FF93E698 \n"
 273 "    MVN     R1, #0 \n"
 274 "    BL      sub_FF827B40 /*_ClearEventFlag*/ \n"
 275 "    MOV     R2, #4 \n"
 276 "    ADD     R1, SP, #8 \n"
 277 "    MOV     R0, #0x8A \n"
 278 "    BL      _PT_SetPropertyCaseString \n"
 279 "    TST     R0, #1 \n"
 280 "    MOVNE   R1, #0x218 \n"
 281 "    LDRNE   R0, =0xFF93DD04 /*'SsCaptureSeq.c'*/ \n"
 282 "    BLNE    _DebugAssert \n"
 283 "    LDR     R8, =0x19F70 \n"
 284 "    LDR     R5, =0x19EBC \n"
 285 "    LDRSH   R1, [R8, #0xE] \n"
 286 "    LDR     R0, [R5, #0x7C] \n"
 287 "    BL      sub_FF9F4744 \n"
 288 "    BL      _GetCCDTemperature \n"
 289 "    LDR     R2, =0x91A8 \n"
 290 "    ADD     R3, R4, #0x8C \n"
 291 "    STRH    R0, [R4, #0x88] \n"
 292 "    STRD    R2, [SP] \n"
 293 "    MOV     R1, R0 \n"
 294 "    LDRH    R0, [R5, #0x54] \n"
 295 "    LDRSH   R2, [R8, #0xC] \n"
 296 "    LDR     R3, =0x91A4 \n"
 297 "    BL      sub_FF93EB8C \n"
 298 "    BL      wait_until_remote_button_is_released\n" // added
 299 "    BL      capt_seq_hook_set_nr\n"                 // added
 300 "    LDR     PC, =0xFF93DBA4 \n"  // Continue in firmware
 301 );
 302 }
 303 
 304 /*************************************************************/
 305 //** sub_FF85E3C0_my @ 0xFF85E3C0 - 0xFF85E434, length=30
 306 void __attribute__((naked,noinline)) sub_FF85E3C0_my() {
 307 asm volatile (
 308 "    STMFD   SP!, {R4-R6,LR} \n"
 309 "    LDR     R4, [R0, #0xC] \n"
 310 "    LDR     R6, =0x19EBC \n"
 311 "    LDR     R0, [R4, #8] \n"
 312 "    MOV     R5, #0 \n"
 313 "    ORR     R0, R0, #1 \n"
 314 "    STR     R0, [R4, #8] \n"
 315 "    LDR     R0, [R6, #0x24] \n"
 316 "    CMP     R0, #0 \n"
 317 "    MOVEQ   R0, #2 \n"
 318 "    BLEQ    sub_FF858330 \n"
 319 "    BL      sub_FF93C424 \n"
 320 "    LDR     R0, [R6, #0x24] \n"
 321 "    CMP     R0, #0 \n"
 322 "    BNE     sub_FF85E440 \n"
 323 "    MOV     R0, R4 \n"
 324 "    BL      sub_FF93C8B8 \n"
 325 "    TST     R0, #1 \n"
 326 "    MOVNE   R2, R4 \n"
 327 "    LDMNEFD SP!, {R4-R6,LR} \n"
 328 "    MOVNE   R1, #1 \n"
 329 "    BNE     sub_FF85C718 \n"
 330 "    BL      sub_FF95DEA0 \n"
 331 "    BL      sub_FF86D198 \n"
 332 "    STR     R0, [R4, #0x14] \n"
 333 "    MOV     R0, R4 \n"
 334 "    BL      sub_FF93DA48 \n"
 335 "    BL      sub_FF93E520 \n"
 336 "    MOV     R0, R4 \n"
 337 "    BL      sub_FF93DB30_my \n"  // --> Patched. Old value = 0xFF93DB30.
 338 "    BL      capt_seq_hook_raw_here \n"         // added
 339 "    LDR     PC, =0xFF85E438 \n"  // Continue in firmware
 340 );
 341 }
 342 
 343 /*************************************************************/
 344 //** exp_drv_task @ 0xFF8B6864 - 0xFF8B6E58, length=382
 345 void __attribute__((naked,noinline)) exp_drv_task() {
 346 asm volatile (
 347 "    STMFD   SP!, {R4-R8,LR} \n"
 348 "    SUB     SP, SP, #0x20 \n"
 349 "    LDR     R8, =0xBB8 \n"
 350 "    LDR     R7, =0x6E30 \n"
 351 "    LDR     R5, =0x3E198 \n"
 352 "    MOV     R0, #0 \n"
 353 "    ADD     R6, SP, #0x10 \n"
 354 "    STR     R0, [SP, #0xC] \n"
 355 
 356 "loc_FF8B6884:\n"
 357 "    LDR     R0, [R7, #0x20] \n"
 358 "    MOV     R2, #0 \n"
 359 "    ADD     R1, SP, #0x1C \n"
 360 "    BL      sub_FF827D90 /*_ReceiveMessageQueue*/ \n"
 361 "    LDR     R0, [SP, #0xC] \n"
 362 "    CMP     R0, #1 \n"
 363 "    BNE     loc_FF8B68CC \n"
 364 "    LDR     R0, [SP, #0x1C] \n"
 365 "    LDR     R0, [R0] \n"
 366 "    CMP     R0, #0x13 \n"
 367 "    CMPNE   R0, #0x14 \n"
 368 "    CMPNE   R0, #0x15 \n"
 369 "    BEQ     loc_FF8B69E8 \n"
 370 "    CMP     R0, #0x27 \n"
 371 "    BEQ     loc_FF8B69C0 \n"
 372 "    ADD     R1, SP, #0xC \n"
 373 "    MOV     R0, #0 \n"
 374 "    BL      sub_FF8B6814 \n"
 375 
 376 "loc_FF8B68CC:\n"
 377 "    LDR     R0, [SP, #0x1C] \n"
 378 "    LDR     R1, [R0] \n"
 379 "    CMP     R1, #0x2C \n"
 380 "    BNE     loc_FF8B68FC \n"
 381 "    LDR     R0, [SP, #0x1C] \n"
 382 "    BL      sub_FF8B7AD0 \n"
 383 "    LDR     R0, [R7, #0x1C] \n"
 384 "    MOV     R1, #1 \n"
 385 "    BL      sub_FF827B0C /*_SetEventFlag*/ \n"
 386 "    BL      _ExitTask \n"
 387 "    ADD     SP, SP, #0x20 \n"
 388 "    LDMFD   SP!, {R4-R8,PC} \n"
 389 
 390 "loc_FF8B68FC:\n"
 391 "    CMP     R1, #0x2B \n"
 392 "    BNE     loc_FF8B6918 \n"
 393 "    LDR     R2, [R0, #0x88]! \n"
 394 "    LDR     R1, [R0, #4] \n"
 395 "    MOV     R0, R1 \n"
 396 "    BLX     R2 \n"
 397 "    B       loc_FF8B6E50 \n"
 398 
 399 "loc_FF8B6918:\n"
 400 "    CMP     R1, #0x25 \n"
 401 "    BNE     loc_FF8B6968 \n"
 402 "    LDR     R0, [R7, #0x1C] \n"
 403 "    MOV     R1, #0x80 \n"
 404 "    BL      sub_FF827B40 /*_ClearEventFlag*/ \n"
 405 "    LDR     R0, =0xFF8B329C \n"
 406 "    MOV     R1, #0x80 \n"
 407 "    BL      sub_FF92F844 \n"
 408 "    LDR     R0, [R7, #0x1C] \n"
 409 "    MOV     R2, R8 \n"
 410 "    MOV     R1, #0x80 \n"
 411 "    BL      sub_FF827A44 /*_WaitForAllEventFlag*/ \n"
 412 "    TST     R0, #1 \n"
 413 "    LDRNE   R1, =0xD1B \n"
 414 "    BNE     loc_FF8B69AC \n"
 415 
 416 "loc_FF8B6954:\n"
 417 "    LDR     R1, [SP, #0x1C] \n"
 418 "    LDR     R0, [R1, #0x8C] \n"
 419 "    LDR     R1, [R1, #0x88] \n"
 420 "    BLX     R1 \n"
 421 "    B       loc_FF8B6E50 \n"
 422 
 423 "loc_FF8B6968:\n"
 424 "    CMP     R1, #0x26 \n"
 425 "    BNE     loc_FF8B69B8 \n"
 426 "    ADD     R1, SP, #0xC \n"
 427 "    BL      sub_FF8B6814 \n"
 428 "    LDR     R0, [R7, #0x1C] \n"
 429 "    MOV     R1, #0x100 \n"
 430 "    BL      sub_FF827B40 /*_ClearEventFlag*/ \n"
 431 "    LDR     R0, =0xFF8B32AC \n"
 432 "    MOV     R1, #0x100 \n"
 433 "    BL      sub_FF92FACC \n"
 434 "    LDR     R0, [R7, #0x1C] \n"
 435 "    MOV     R2, R8 \n"
 436 "    MOV     R1, #0x100 \n"
 437 "    BL      sub_FF827A44 /*_WaitForAllEventFlag*/ \n"
 438 "    TST     R0, #1 \n"
 439 "    BEQ     loc_FF8B6954 \n"
 440 "    LDR     R1, =0xD25 \n"
 441 
 442 "loc_FF8B69AC:\n"
 443 "    LDR     R0, =0xFF8B399C /*'ExpDrv.c'*/ \n"
 444 "    BL      _DebugAssert \n"
 445 "    B       loc_FF8B6954 \n"
 446 
 447 "loc_FF8B69B8:\n"
 448 "    CMP     R1, #0x27 \n"
 449 "    BNE     loc_FF8B69D0 \n"
 450 
 451 "loc_FF8B69C0:\n"
 452 "    LDR     R0, [SP, #0x1C] \n"
 453 "    ADD     R1, SP, #0xC \n"
 454 "    BL      sub_FF8B6814 \n"
 455 "    B       loc_FF8B6954 \n"
 456 
 457 "loc_FF8B69D0:\n"
 458 "    CMP     R1, #0x2A \n"
 459 "    BNE     loc_FF8B69E8 \n"
 460 "    BL      sub_FF895C1C \n"
 461 "    BL      sub_FF8969E8 \n"
 462 "    BL      sub_FF89646C \n"
 463 "    B       loc_FF8B6954 \n"
 464 
 465 "loc_FF8B69E8:\n"
 466 "    LDR     R0, [SP, #0x1C] \n"
 467 "    MOV     R4, #1 \n"
 468 "    LDR     R1, [R0] \n"
 469 "    CMP     R1, #0x11 \n"
 470 "    CMPNE   R1, #0x12 \n"
 471 "    BNE     loc_FF8B6A58 \n"
 472 "    LDR     R1, [R0, #0x7C] \n"
 473 "    ADD     R1, R1, R1, LSL#1 \n"
 474 "    ADD     R1, R0, R1, LSL#2 \n"
 475 "    SUB     R1, R1, #8 \n"
 476 "    LDMIA   R1, {R2-R4} \n"
 477 "    STMIA   R6, {R2-R4} \n"
 478 "    BL      sub_FF8B5328 \n"
 479 "    LDR     R0, [SP, #0x1C] \n"
 480 "    LDR     R1, [R0, #0x7C] \n"
 481 "    LDR     R3, [R0, #0x88] \n"
 482 "    LDR     R2, [R0, #0x8C] \n"
 483 "    ADD     R0, R0, #4 \n"
 484 "    BLX     R3 \n"
 485 "    LDR     R0, [SP, #0x1C] \n"
 486 "    BL      sub_FF8B7EA4 \n"
 487 "    LDR     R0, [SP, #0x1C] \n"
 488 "    LDR     R1, [R0, #0x7C] \n"
 489 "    LDR     R3, [R0, #0x90] \n"
 490 "    LDR     R2, [R0, #0x94] \n"
 491 "    ADD     R0, R0, #4 \n"
 492 "    BLX     R3 \n"
 493 "    B       loc_FF8B6D90 \n"
 494 
 495 "loc_FF8B6A58:\n"
 496 "    CMP     R1, #0x13 \n"
 497 "    CMPNE   R1, #0x14 \n"
 498 "    CMPNE   R1, #0x15 \n"
 499 "    BNE     loc_FF8B6B0C \n"
 500 "    ADD     R3, SP, #0xC \n"
 501 "    MOV     R2, SP \n"
 502 "    ADD     R1, SP, #0x10 \n"
 503 "    BL      sub_FF8B5570 \n"
 504 "    CMP     R0, #1 \n"
 505 "    MOV     R4, R0 \n"
 506 "    CMPNE   R4, #5 \n"
 507 "    BNE     loc_FF8B6AA8 \n"
 508 "    LDR     R0, [SP, #0x1C] \n"
 509 "    MOV     R2, R4 \n"
 510 "    LDR     R1, [R0, #0x7C]! \n"
 511 "    LDR     R12, [R0, #0xC]! \n"
 512 "    LDR     R3, [R0, #4] \n"
 513 "    MOV     R0, SP \n"
 514 "    BLX     R12 \n"
 515 "    B       loc_FF8B6AE0 \n"
 516 
 517 "loc_FF8B6AA8:\n"
 518 "    LDR     R0, [SP, #0x1C] \n"
 519 "    CMP     R4, #2 \n"
 520 "    LDR     R3, [R0, #0x8C] \n"
 521 "    CMPNE   R4, #6 \n"
 522 "    BNE     loc_FF8B6AF4 \n"
 523 "    LDR     R12, [R0, #0x88] \n"
 524 "    MOV     R0, SP \n"
 525 "    MOV     R2, R4 \n"
 526 "    MOV     R1, #1 \n"
 527 "    BLX     R12 \n"
 528 "    LDR     R0, [SP, #0x1C] \n"
 529 "    MOV     R2, SP \n"
 530 "    ADD     R1, SP, #0x10 \n"
 531 "    BL      sub_FF8B6528 \n"
 532 
 533 "loc_FF8B6AE0:\n"
 534 "    LDR     R0, [SP, #0x1C] \n"
 535 "    LDR     R2, [SP, #0xC] \n"
 536 "    MOV     R1, R4 \n"
 537 "    BL      sub_FF8B67B4 \n"
 538 "    B       loc_FF8B6D90 \n"
 539 
 540 "loc_FF8B6AF4:\n"
 541 "    LDR     R1, [R0, #0x7C] \n"
 542 "    LDR     R12, [R0, #0x88] \n"
 543 "    ADD     R0, R0, #4 \n"
 544 "    MOV     R2, R4 \n"
 545 "    BLX     R12 \n"
 546 "    B       loc_FF8B6D90 \n"
 547 
 548 "loc_FF8B6B0C:\n"
 549 "    CMP     R1, #0x21 \n"
 550 "    CMPNE   R1, #0x22 \n"
 551 "    BNE     loc_FF8B6B58 \n"
 552 "    LDR     R1, [R0, #0x7C] \n"
 553 "    ADD     R1, R1, R1, LSL#1 \n"
 554 "    ADD     R1, R0, R1, LSL#2 \n"
 555 "    SUB     R1, R1, #8 \n"
 556 "    LDMIA   R1, {R2-R4} \n"
 557 "    STMIA   R6, {R2-R4} \n"
 558 "    BL      sub_FF8B48B4 \n"
 559 "    LDR     R0, [SP, #0x1C] \n"
 560 "    LDR     R1, [R0, #0x7C] \n"
 561 "    LDR     R3, [R0, #0x88] \n"
 562 "    LDR     R2, [R0, #0x8C] \n"
 563 "    ADD     R0, R0, #4 \n"
 564 "    BLX     R3 \n"
 565 "    LDR     R0, [SP, #0x1C] \n"
 566 "    BL      sub_FF8B4BA4 \n"
 567 "    B       loc_FF8B6D90 \n"
 568 
 569 "loc_FF8B6B58:\n"
 570 "    ADD     R1, R0, #4 \n"
 571 "    LDMIA   R1, {R2,R3,R12} \n"
 572 "    STMIA   R6, {R2,R3,R12} \n"
 573 "    LDR     R1, [R0] \n"
 574 "    CMP     R1, #0x24 \n"
 575 "    ADDLS   PC, PC, R1, LSL#2 \n"
 576 "    B       loc_FF8B6D70 \n"
 577 "    B       loc_FF8B6C08 \n"
 578 "    B       loc_FF8B6C08 \n"
 579 "    B       loc_FF8B6C58 \n"
 580 "    B       loc_FF8B6C60 \n"
 581 "    B       loc_FF8B6C60 \n"
 582 "    B       loc_FF8B6C60 \n"
 583 "    B       loc_FF8B6C08 \n"
 584 "    B       loc_FF8B6C58 \n"
 585 "    B       loc_FF8B6C60 \n"
 586 "    B       loc_FF8B6C60 \n"
 587 "    B       loc_FF8B6C78 \n"
 588 "    B       loc_FF8B6C78 \n"
 589 "    B       loc_FF8B6D64 \n"
 590 "    B       loc_FF8B6D6C \n"
 591 "    B       loc_FF8B6D6C \n"
 592 "    B       loc_FF8B6D6C \n"
 593 "    B       loc_FF8B6D6C \n"
 594 "    B       loc_FF8B6D70 \n"
 595 "    B       loc_FF8B6D70 \n"
 596 "    B       loc_FF8B6D70 \n"
 597 "    B       loc_FF8B6D70 \n"
 598 "    B       loc_FF8B6D70 \n"
 599 "    B       loc_FF8B6C68 \n"
 600 "    B       loc_FF8B6C70 \n"
 601 "    B       loc_FF8B6C70 \n"
 602 "    B       loc_FF8B6C84 \n"
 603 "    B       loc_FF8B6C84 \n"
 604 "    B       loc_FF8B6C8C \n"
 605 "    B       loc_FF8B6CBC \n"
 606 "    B       loc_FF8B6CEC \n"
 607 "    B       loc_FF8B6D1C \n"
 608 "    B       loc_FF8B6D4C \n"
 609 "    B       loc_FF8B6D4C \n"
 610 "    B       loc_FF8B6D70 \n"
 611 "    B       loc_FF8B6D70 \n"
 612 "    B       loc_FF8B6D54 \n"
 613 "    B       loc_FF8B6D5C \n"
 614 
 615 "loc_FF8B6C08:\n"
 616 "    BL      sub_FF8B3784 \n"
 617 "    B       loc_FF8B6D70 \n"
 618 
 619 "loc_FF8B6C58:\n"
 620 "    BL      sub_FF8B3A14 \n"
 621 "    B       loc_FF8B6D70 \n"
 622 
 623 "loc_FF8B6C60:\n"
 624 "    BL      sub_FF8B3C18 \n"
 625 "    B       loc_FF8B6D70 \n"
 626 
 627 "loc_FF8B6C68:\n"
 628 "    BL      sub_FF8B3E80 \n"
 629 "    B       loc_FF8B6D70 \n"
 630 
 631 "loc_FF8B6C70:\n"
 632 "    BL      sub_FF8B4074 \n"
 633 "    B       loc_FF8B6D70 \n"
 634 
 635 "loc_FF8B6C78:\n"
 636 "    BL      sub_FF8B42DC_my \n"  // --> Patched. Old value = 0xFF8B42DC.
 637 "    MOV     R4, #0 \n"
 638 "    B       loc_FF8B6D70 \n"
 639 
 640 "loc_FF8B6C84:\n"
 641 "    BL      sub_FF8B4418 \n"
 642 "    B       loc_FF8B6D70 \n"
 643 
 644 "loc_FF8B6C8C:\n"
 645 "    LDRH    R1, [R0, #4] \n"
 646 "    STRH    R1, [SP, #0x10] \n"
 647 "    LDRH    R1, [R5, #2] \n"
 648 "    STRH    R1, [SP, #0x12] \n"
 649 "    LDRH    R1, [R5, #4] \n"
 650 "    STRH    R1, [SP, #0x14] \n"
 651 "    LDRH    R1, [R5, #6] \n"
 652 "    STRH    R1, [SP, #0x16] \n"
 653 "    LDRH    R1, [R0, #0xC] \n"
 654 "    STRH    R1, [SP, #0x18] \n"
 655 "    BL      sub_FF8B7B44 \n"
 656 "    B       loc_FF8B6D70 \n"
 657 
 658 "loc_FF8B6CBC:\n"
 659 "    LDRH    R1, [R0, #4] \n"
 660 "    STRH    R1, [SP, #0x10] \n"
 661 "    LDRH    R1, [R5, #2] \n"
 662 "    STRH    R1, [SP, #0x12] \n"
 663 "    LDRH    R1, [R5, #4] \n"
 664 "    STRH    R1, [SP, #0x14] \n"
 665 "    LDRH    R1, [R5, #6] \n"
 666 "    STRH    R1, [SP, #0x16] \n"
 667 "    LDRH    R1, [R5, #8] \n"
 668 "    STRH    R1, [SP, #0x18] \n"
 669 "    BL      sub_FF8B7CC0 \n"
 670 "    B       loc_FF8B6D70 \n"
 671 
 672 "loc_FF8B6CEC:\n"
 673 "    LDRH    R1, [R5] \n"
 674 "    STRH    R1, [SP, #0x10] \n"
 675 "    LDRH    R1, [R0, #6] \n"
 676 "    STRH    R1, [SP, #0x12] \n"
 677 "    LDRH    R1, [R5, #4] \n"
 678 "    STRH    R1, [SP, #0x14] \n"
 679 "    LDRH    R1, [R5, #6] \n"
 680 "    STRH    R1, [SP, #0x16] \n"
 681 "    LDRH    R1, [R5, #8] \n"
 682 "    STRH    R1, [SP, #0x18] \n"
 683 "    BL      sub_FF8B7D6C \n"
 684 "    B       loc_FF8B6D70 \n"
 685 
 686 "loc_FF8B6D1C:\n"
 687 "    LDRH    R1, [R5] \n"
 688 "    STRH    R1, [SP, #0x10] \n"
 689 "    LDRH    R1, [R5, #2] \n"
 690 "    STRH    R1, [SP, #0x12] \n"
 691 "    LDRH    R1, [R5, #4] \n"
 692 "    STRH    R1, [SP, #0x14] \n"
 693 "    LDRH    R1, [R5, #6] \n"
 694 "    STRH    R1, [SP, #0x16] \n"
 695 "    LDRH    R1, [R0, #0xC] \n"
 696 "    STRH    R1, [SP, #0x18] \n"
 697 "    BL      sub_FF8B7E0C \n"
 698 "    B       loc_FF8B6D70 \n"
 699 
 700 "loc_FF8B6D4C:\n"
 701 "    BL      sub_FF8B468C \n"
 702 "    B       loc_FF8B6D70 \n"
 703 
 704 "loc_FF8B6D54:\n"
 705 "    BL      sub_FF8B4CA8 \n"
 706 "    B       loc_FF8B6D70 \n"
 707 
 708 "loc_FF8B6D5C:\n"
 709 "    BL      sub_FF8B4EE0 \n"
 710 "    B       loc_FF8B6D70 \n"
 711 
 712 "loc_FF8B6D64:\n"
 713 "    BL      sub_FF8B5058 \n"
 714 "    B       loc_FF8B6D70 \n"
 715 
 716 "loc_FF8B6D6C:\n"
 717 "    BL      sub_FF8B51F0 \n"
 718 
 719 "loc_FF8B6D70:\n"
 720 "    LDR     R0, [SP, #0x1C] \n"
 721 "    LDR     R1, [R0, #0x7C] \n"
 722 "    LDR     R3, [R0, #0x88] \n"
 723 "    LDR     R2, [R0, #0x8C] \n"
 724 "    ADD     R0, R0, #4 \n"
 725 "    BLX     R3 \n"
 726 "    CMP     R4, #1 \n"
 727 "    BNE     loc_FF8B6DD8 \n"
 728 
 729 "loc_FF8B6D90:\n"
 730 "    LDR     R0, [SP, #0x1C] \n"
 731 "    MOV     R2, #0xC \n"
 732 "    LDR     R1, [R0, #0x7C] \n"
 733 "    ADD     R1, R1, R1, LSL#1 \n"
 734 "    ADD     R0, R0, R1, LSL#2 \n"
 735 "    SUB     R4, R0, #8 \n"
 736 "    LDR     R0, =0x3E198 \n"
 737 "    ADD     R1, SP, #0x10 \n"
 738 "    BL      sub_FFAAD774 \n"
 739 "    LDR     R0, =0x3E1A4 \n"
 740 "    MOV     R2, #0xC \n"
 741 "    ADD     R1, SP, #0x10 \n"
 742 "    BL      sub_FFAAD774 \n"
 743 "    LDR     R0, =0x3E1B0 \n"
 744 "    MOV     R2, #0xC \n"
 745 "    MOV     R1, R4 \n"
 746 "    BL      sub_FFAAD774 \n"
 747 "    B       loc_FF8B6E50 \n"
 748 
 749 "loc_FF8B6DD8:\n"
 750 "    LDR     R0, [SP, #0x1C] \n"
 751 "    LDR     R0, [R0] \n"
 752 "    CMP     R0, #0xB \n"
 753 "    BNE     loc_FF8B6E20 \n"
 754 "    MOV     R3, #0 \n"
 755 "    STR     R3, [SP] \n"
 756 "    MOV     R3, #1 \n"
 757 "    MOV     R2, #1 \n"
 758 "    MOV     R1, #1 \n"
 759 "    MOV     R0, #0 \n"
 760 "    BL      sub_FF8B358C \n"
 761 "    MOV     R3, #0 \n"
 762 "    STR     R3, [SP] \n"
 763 "    MOV     R3, #1 \n"
 764 "    MOV     R2, #1 \n"
 765 "    MOV     R1, #1 \n"
 766 "    MOV     R0, #0 \n"
 767 "    B       loc_FF8B6E4C \n"
 768 
 769 "loc_FF8B6E20:\n"
 770 "    MOV     R3, #1 \n"
 771 "    MOV     R2, #1 \n"
 772 "    MOV     R1, #1 \n"
 773 "    MOV     R0, #1 \n"
 774 "    STR     R3, [SP] \n"
 775 "    BL      sub_FF8B358C \n"
 776 "    MOV     R3, #1 \n"
 777 "    MOV     R2, #1 \n"
 778 "    MOV     R1, #1 \n"
 779 "    MOV     R0, #1 \n"
 780 "    STR     R3, [SP] \n"
 781 
 782 "loc_FF8B6E4C:\n"
 783 "    BL      sub_FF8B36CC \n"
 784 
 785 "loc_FF8B6E50:\n"
 786 "    LDR     R0, [SP, #0x1C] \n"
 787 "    BL      sub_FF8B7AD0 \n"
 788 "    B       loc_FF8B6884 \n"
 789 );
 790 }
 791 
 792 /*************************************************************/
 793 //** sub_FF8B42DC_my @ 0xFF8B42DC - 0xFF8B4398, length=48
 794 void __attribute__((naked,noinline)) sub_FF8B42DC_my() {
 795 asm volatile (
 796 "    STMFD   SP!, {R4-R8,LR} \n"
 797 "    LDR     R7, =0x6E30 \n"
 798 "    MOV     R4, R0 \n"
 799 "    LDR     R0, [R7, #0x1C] \n"
 800 "    MOV     R1, #0x3E \n"
 801 "    BL      sub_FF827B40 /*_ClearEventFlag*/ \n"
 802 "    LDRSH   R0, [R4, #4] \n"
 803 "    MOV     R2, #0 \n"
 804 "    MOV     R1, #0 \n"
 805 "    BL      sub_FF8B3320 \n"
 806 "    MOV     R6, R0 \n"
 807 "    LDRSH   R0, [R4, #6] \n"
 808 "    BL      sub_FF8B342C \n"
 809 "    LDRSH   R0, [R4, #8] \n"
 810 "    BL      sub_FF8B3484 \n"
 811 "    LDRSH   R0, [R4, #0xA] \n"
 812 "    BL      sub_FF8B34DC \n"
 813 "    LDRSH   R0, [R4, #0xC] \n"
 814 "    BL      sub_FF8B3534 \n"
 815 "    MOV     R5, R0 \n"
 816 "    LDR     R0, [R4] \n"
 817 "    LDR     R8, =0x3E1B0 \n"
 818 "    CMP     R0, #0xB \n"
 819 "    MOVEQ   R6, #0 \n"
 820 "    MOVEQ   R5, #0 \n"
 821 "    BEQ     loc_FF8B436C \n"
 822 "    CMP     R6, #1 \n"
 823 "    BNE     loc_FF8B436C \n"
 824 "    LDRSH   R0, [R4, #4] \n"
 825 "    LDR     R1, =0xFF8B328C \n"
 826 "    MOV     R2, #2 \n"
 827 "    BL      sub_FF92F998 \n"
 828 "    STRH    R0, [R4, #4] \n"
 829 "    MOV     R0, #0 \n"
 830 "    STR     R0, [R7, #0x28] \n"
 831 "    B       loc_FF8B4374 \n"
 832 
 833 "loc_FF8B436C:\n"
 834 "    LDRH    R0, [R8] \n"
 835 "    STRH    R0, [R4, #4] \n"
 836 
 837 "loc_FF8B4374:\n"
 838 "    CMP     R5, #1 \n"
 839 "    LDRNEH  R0, [R8, #8] \n"
 840 "    BNE     loc_FF8B4390 \n"
 841 "    LDRSH   R0, [R4, #0xC] \n"
 842 "    MOV     R2, #0x20 \n"
 843 "    LDR     R1, =0xFF8B3310 \n"
 844 "    BL      sub_FF8B7B00 \n"
 845 
 846 "loc_FF8B4390:\n"
 847 "    STRH    R0, [R4, #0xC] \n"
 848 "    LDRSH   R0, [R4, #6] \n"
 849 "    BL      sub_FF895968_my \n"  // --> Patched. Old value = 0xFF895968.
 850 "    LDR     PC, =0xFF8B439C \n"  // Continue in firmware
 851 );
 852 }
 853 
 854 /*************************************************************/
 855 //** sub_FF895968_my @ 0xFF895968 - 0xFF8959D0, length=27
 856 void __attribute__((naked,noinline)) sub_FF895968_my() {
 857 asm volatile (
 858 "    STMFD   SP!, {R4-R6,LR} \n"
 859 "    LDR     R5, =0x68EC \n"
 860 "    MOV     R4, R0 \n"
 861 "    LDR     R0, [R5, #4] \n"
 862 "    CMP     R0, #1 \n"
 863 "    LDRNE   R1, =0x16D \n"
 864 "    LDRNE   R0, =0xFF895700 /*'Shutter.c'*/ \n"
 865 "    BLNE    _DebugAssert \n"
 866 "    CMN     R4, #0xC00 \n"
 867 "    LDREQSH R4, [R5, #2] \n"
 868 "    CMN     R4, #0xC00 \n"
 869 "    LDREQ   R1, =0x173 \n"
 870 "    LDREQ   R0, =0xFF895700 /*'Shutter.c'*/ \n"
 871 "    STRH    R4, [R5, #2] \n"
 872 "    BLEQ    _DebugAssert \n"
 873 "    MOV     R0, R4 \n"
 874 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
 875 "    MOV     R4, R0 \n"
 876 //"  BL      _sub_FF8C53CC \n"  // --> Nullsub call removed.
 877 "    MOV     R0, R4 \n"
 878 "    BL      sub_FF8C98BC \n"
 879 "    TST     R0, #1 \n"
 880 "    LDMNEFD SP!, {R4-R6,LR} \n"
 881 "    MOVNE   R1, #0x178 \n"
 882 "    LDRNE   R0, =0xFF895700 /*'Shutter.c'*/ \n"
 883 "    BNE     _DebugAssert \n"
 884 "    LDMFD   SP!, {R4-R6,PC} \n"
 885 );
 886 }

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