root/platform/ixus80_sd1100/sub/101a/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF939E24_my
  3. sub_FF85E18C_my
  4. exp_drv_task
  5. sub_FF8B17E0_my
  6. sub_FF8937F8_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 @ 0xFF85DE08 - 0xFF85E0A0, length=167
  14 void __attribute__((naked,noinline)) capt_seq_task() {
  15 asm volatile (
  16 "    STMFD   SP!, {R3-R9,LR} \n"
  17 "    LDR     R6, =0x19A84 \n"
  18 "    LDR     R5, =0x54B8 \n"
  19 "    MOV     R9, #1 \n"
  20 "    MOV     R7, #0 \n"
  21 
  22 "loc_FF85DE1C:\n"
  23 "    LDR     R0, [R5, #0xC] \n"
  24 "    MOV     R2, #0 \n"
  25 "    MOV     R1, SP \n"
  26 "    BL      sub_FF827E54 /*_ReceiveMessageQueue*/ \n"
  27 "    TST     R0, #1 \n"
  28 "    BEQ     loc_FF85DE48 \n"
  29 "    LDR     R1, =0x48E \n"
  30 "    LDR     R0, =0xFF85DAE0 /*'SsShootTask.c'*/ \n"
  31 "    BL      _DebugAssert \n"
  32 "    BL      _ExitTask \n"
  33 "    LDMFD   SP!, {R3-R9,PC} \n"
  34 
  35 "loc_FF85DE48:\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_FF85E068 \n"
  41 "    B       loc_FF85DECC \n"
  42 "    B       loc_FF85DF34 \n"
  43 "    B       loc_FF85DF3C \n"
  44 "    B       loc_FF85DF54 \n"
  45 "    B       loc_FF85DF48 \n"
  46 "    B       loc_FF85DF5C \n"
  47 "    B       loc_FF85DF64 \n"
  48 "    B       loc_FF85DF6C \n"
  49 "    B       loc_FF85DFC4 \n"
  50 "    B       loc_FF85DFD0 \n"
  51 "    B       loc_FF85DFD8 \n"
  52 "    B       loc_FF85DFE0 \n"
  53 "    B       loc_FF85DFE8 \n"
  54 "    B       loc_FF85DFF0 \n"
  55 "    B       loc_FF85DFF8 \n"
  56 "    B       loc_FF85E000 \n"
  57 "    B       loc_FF85E008 \n"
  58 "    B       loc_FF85E014 \n"
  59 "    B       loc_FF85E01C \n"
  60 "    B       loc_FF85E024 \n"
  61 "    B       loc_FF85E02C \n"
  62 "    B       loc_FF85E038 \n"
  63 "    B       loc_FF85E040 \n"
  64 "    B       loc_FF85E048 \n"
  65 "    B       loc_FF85E050 \n"
  66 "    B       loc_FF85E058 \n"
  67 "    B       loc_FF85E060 \n"
  68 "    B       loc_FF85E074 \n"
  69 
  70 "loc_FF85DECC:\n"
  71 "    BL      sub_FF93876C \n"
  72 
  73 // only do quick press hack if overrides are active
  74 "    BL      captseq_hack_override_active\n" // returns 1 if tv or sv override in effect
  75 "    STR     R0,[SP,#-4]!\n" // push return value
  76 "    BL      shooting_expo_param_override\n"      // added
  77 
  78 "    BL      sub_FF85BFE8 \n"
  79 
  80 "    LDR     R0, [SP], #4\n" // pop override hack
  81 "    CMP     R0, #1\n"     // +
  82 "    MOVEQ   R0, #0\n"     // +
  83 "    STREQ   R0, [R6, #0x24]\n"  // fixes overrides behavior at short shutter press
  84 "    LDRNE   R0, [R6, #0x24]\n" // modified NE
  85 "    CMPNE   R0, #0\n"         // modified NE
  86 
  87 //"  LDR     R0, [R6, #0x24] \n"  // above patch makes these lines redundant
  88 //"  CMP     R0, #0 \n"
  89 "    BEQ     loc_FF85E074 \n"
  90 "    BL      sub_FF85D7B0 \n"
  91 "    MOV     R4, R0 \n"
  92 "    LDR     R0, [R6, #0x24] \n"
  93 "    CMP     R0, #0 \n"
  94 "    BEQ     loc_FF85DF14 \n"
  95 "    MOV     R0, #0xC \n"
  96 "    BL      sub_FF860E24 \n"
  97 "    TST     R0, #1 \n"
  98 "    STRNE   R9, [R5, #4] \n"
  99 "    LDRNE   R0, [R4, #8] \n"
 100 "    ORRNE   R0, R0, #0x40000000 \n"
 101 "    STRNE   R0, [R4, #8] \n"
 102 "    BNE     loc_FF85E074 \n"
 103 
 104 "loc_FF85DF14:\n"
 105 "    BL      sub_FF95BA50 \n"
 106 "    BL      sub_FF86CF10 \n"
 107 "    STR     R0, [R4, #0x14] \n"
 108 "    MOV     R0, R4 \n"
 109 "    BL      sub_FF939E24_my \n"  // --> Patched. Old value = 0xFF939E24.
 110 "    TST     R0, #1 \n"
 111 "    STRNE   R9, [R5, #4] \n"
 112 "    B       loc_FF85E074 \n"
 113 
 114 "loc_FF85DF34:\n"
 115 "    BL      sub_FF85E18C_my \n"  // --> Patched. Old value = 0xFF85E18C.
 116 "    B       loc_FF85DF4C \n"
 117 
 118 "loc_FF85DF3C:\n"
 119 "    MOV     R0, #1 \n"
 120 "    BL      sub_FF938914 \n"
 121 "    B       loc_FF85E074 \n"
 122 
 123 "loc_FF85DF48:\n"
 124 "    BL      sub_FF938404 \n"
 125 
 126 "loc_FF85DF4C:\n"
 127 "    STR     R7, [R6, #0x24] \n"
 128 "    B       loc_FF85E074 \n"
 129 
 130 "loc_FF85DF54:\n"
 131 "    BL      sub_FF938738 \n"
 132 "    B       loc_FF85DF4C \n"
 133 
 134 "loc_FF85DF5C:\n"
 135 "    BL      sub_FF938740 \n"
 136 "    B       loc_FF85E074 \n"
 137 
 138 "loc_FF85DF64:\n"
 139 "    BL      sub_FF938834 \n"
 140 "    B       loc_FF85DFC8 \n"
 141 
 142 "loc_FF85DF6C:\n"
 143 "    LDR     R4, [R0, #0xC] \n"
 144 "    BL      sub_FF938748 \n"
 145 "    MOV     R0, R4 \n"
 146 "    BL      sub_FF938F5C \n"
 147 "    TST     R0, #1 \n"
 148 "    MOV     R8, R0 \n"
 149 "    BNE     loc_FF85DFAC \n"
 150 "    BL      sub_FF86CF10 \n"
 151 "    STR     R0, [R4, #0x14] \n"
 152 "    MOV     R0, R4 \n"
 153 "    BL      sub_FF939D3C \n"
 154 "    MOV     R0, R4 \n"
 155 "    BL      sub_FF93A250 \n"
 156 "    MOV     R8, R0 \n"
 157 "    LDR     R0, [R4, #0x14] \n"
 158 "    BL      sub_FF86D11C \n"
 159 
 160 "loc_FF85DFAC:\n"
 161 "    BL      sub_FF938738 \n"
 162 "    MOV     R2, R4 \n"
 163 "    MOV     R1, #9 \n"
 164 "    MOV     R0, R8 \n"
 165 "    BL      sub_FF85C418 \n"
 166 "    B       loc_FF85E074 \n"
 167 
 168 "loc_FF85DFC4:\n"
 169 "    BL      sub_FF938894 \n"
 170 
 171 "loc_FF85DFC8:\n"
 172 "    BL      sub_FF85BFE8 \n"
 173 "    B       loc_FF85E074 \n"
 174 
 175 "loc_FF85DFD0:\n"
 176 "    BL      sub_FF938738 \n"
 177 "    B       loc_FF85E074 \n"
 178 
 179 "loc_FF85DFD8:\n"
 180 "    BL      sub_FF9391C8 \n"
 181 "    B       loc_FF85E074 \n"
 182 
 183 "loc_FF85DFE0:\n"
 184 "    BL      sub_FF9393B0 \n"
 185 "    B       loc_FF85E074 \n"
 186 
 187 "loc_FF85DFE8:\n"
 188 "    BL      sub_FF939440 \n"
 189 "    B       loc_FF85E074 \n"
 190 
 191 "loc_FF85DFF0:\n"
 192 "    BL      sub_FF9394F4 \n"
 193 "    B       loc_FF85E074 \n"
 194 
 195 "loc_FF85DFF8:\n"
 196 "    BL      sub_FF9396EC \n"
 197 "    B       loc_FF85E074 \n"
 198 
 199 "loc_FF85E000:\n"
 200 "    BL      sub_FF93973C \n"
 201 "    B       loc_FF85E074 \n"
 202 
 203 "loc_FF85E008:\n"
 204 "    MOV     R0, #0 \n"
 205 "    BL      sub_FF9397C0 \n"
 206 "    B       loc_FF85E074 \n"
 207 
 208 "loc_FF85E014:\n"
 209 "    BL      sub_FF939910 \n"
 210 "    B       loc_FF85E074 \n"
 211 
 212 "loc_FF85E01C:\n"
 213 "    BL      sub_FF9399A4 \n"
 214 "    B       loc_FF85E074 \n"
 215 
 216 "loc_FF85E024:\n"
 217 "    BL      sub_FF939A6C \n"
 218 "    B       loc_FF85E074 \n"
 219 
 220 "loc_FF85E02C:\n"
 221 "    BL      sub_FF938A38 \n"
 222 "    BL      sub_FF824CFC \n"
 223 "    B       loc_FF85E074 \n"
 224 
 225 "loc_FF85E038:\n"
 226 "    BL      sub_FF9395B0 \n"
 227 "    B       loc_FF85E074 \n"
 228 
 229 "loc_FF85E040:\n"
 230 "    BL      sub_FF93961C \n"
 231 "    B       loc_FF85E074 \n"
 232 
 233 "loc_FF85E048:\n"
 234 "    BL      sub_FF93B7D0 \n"
 235 "    B       loc_FF85E074 \n"
 236 
 237 "loc_FF85E050:\n"
 238 "    BL      sub_FF93B7EC \n"
 239 "    B       loc_FF85E074 \n"
 240 
 241 "loc_FF85E058:\n"
 242 "    BL      sub_FF93B7FC \n"
 243 "    B       loc_FF85E074 \n"
 244 
 245 "loc_FF85E060:\n"
 246 "    BL      sub_FF93B828 \n"
 247 "    B       loc_FF85E074 \n"
 248 
 249 "loc_FF85E068:\n"
 250 "    LDR     R1, =0x58E \n"
 251 "    LDR     R0, =0xFF85DAE0 /*'SsShootTask.c'*/ \n"
 252 "    BL      _DebugAssert \n"
 253 
 254 "loc_FF85E074:\n"
 255 "    LDR     R0, [SP] \n"
 256 "    LDR     R1, [R0, #4] \n"
 257 "    LDR     R0, [R5, #8] \n"
 258 "    BL      sub_FF827BD0 /*_SetEventFlag*/ \n"
 259 "    LDR     R4, [SP] \n"
 260 "    LDR     R0, [R4, #8] \n"
 261 "    CMP     R0, #0 \n"
 262 "    LDREQ   R1, =0x10D \n"
 263 "    LDREQ   R0, =0xFF85DAE0 /*'SsShootTask.c'*/ \n"
 264 "    BLEQ    _DebugAssert \n"
 265 "    STR     R7, [R4, #8] \n"
 266 "    B       loc_FF85DE1C \n"
 267 );
 268 }
 269 
 270 /*************************************************************/
 271 //** sub_FF939E24_my @ 0xFF939E24 - 0xFF939E94, length=29
 272 void __attribute__((naked,noinline)) sub_FF939E24_my() {
 273 asm volatile (
 274 "    STMFD   SP!, {R0-R10,LR} \n"
 275 "    MOV     R6, #0 \n"
 276 "    MOV     R4, R0 \n"
 277 "    BL      sub_FF93A94C \n"
 278 "    MVN     R1, #0 \n"
 279 "    BL      sub_FF827C04 /*_ClearEventFlag*/ \n"
 280 "    MOV     R2, #4 \n"
 281 "    ADD     R1, SP, #8 \n"
 282 "    MOV     R0, #0x8A \n"
 283 "    BL      _GetPropertyCase \n"
 284 "    TST     R0, #1 \n"
 285 "    MOVNE   R1, #0x218 \n"
 286 "    LDRNE   R0, =0xFF939FF4 /*'SsCaptureSeq.c'*/ \n"
 287 "    BLNE    _DebugAssert \n"
 288 "    LDR     R8, =0x19B38 \n"
 289 "    LDR     R5, =0x19A84 \n"
 290 "    LDRSH   R1, [R8, #0xE] \n"
 291 "    LDR     R0, [R5, #0x7C] \n"
 292 "    BL      sub_FF9ED584 \n"
 293 "    BL      _GetCCDTemperature \n"
 294 "    LDR     R2, =0x8D18 \n"
 295 "    ADD     R3, R4, #0x8C \n"
 296 "    STRH    R0, [R4, #0x88] \n"
 297 "    STRD    R2, [SP] \n"
 298 "    MOV     R1, R0 \n"
 299 "    LDRH    R0, [R5, #0x54] \n"
 300 "    LDRSH   R2, [R8, #0xC] \n"
 301 "    LDR     R3, =0x8D14 \n"
 302 "    BL      sub_FF93AE38 \n"
 303 "    BL      wait_until_remote_button_is_released\n" // added
 304 "    BL      capt_seq_hook_set_nr\n"                 // added
 305 "    LDR     PC, =0xFF939E98 \n"  // Continue in firmware
 306 );
 307 }
 308 
 309 /*************************************************************/
 310 //** sub_FF85E18C_my @ 0xFF85E18C - 0xFF85E248, length=48
 311 void __attribute__((naked,noinline)) sub_FF85E18C_my() {
 312 asm volatile (
 313 "    STMFD   SP!, {R4-R6,LR} \n"
 314 "    LDR     R4, [R0, #0xC] \n"
 315 "    LDR     R6, =0x19A84 \n"
 316 "    LDR     R0, [R4, #8] \n"
 317 "    MOV     R5, #0 \n"
 318 "    ORR     R0, R0, #1 \n"
 319 "    STR     R0, [R4, #8] \n"
 320 "    LDR     R0, [R6, #0x24] \n"
 321 "    CMP     R0, #0 \n"
 322 "    MOVEQ   R0, #2 \n"
 323 "    BLEQ    sub_FF8581D0 \n"
 324 "    BL      sub_FF938748 \n"
 325 "    LDR     R0, [R6, #0x24] \n"
 326 "    CMP     R0, #0 \n"
 327 "    BNE     loc_FF85E20C \n"
 328 "    MOV     R0, R4 \n"
 329 "    BL      sub_FF938BDC \n"
 330 "    TST     R0, #1 \n"
 331 "    MOVNE   R2, R4 \n"
 332 "    LDMNEFD SP!, {R4-R6,LR} \n"
 333 "    MOVNE   R1, #1 \n"
 334 "    BNE     sub_FF85C418 \n"
 335 "    BL      sub_FF95BA50 \n"
 336 "    BL      sub_FF86CF10 \n"
 337 "    STR     R0, [R4, #0x14] \n"
 338 "    MOV     R0, R4 \n"
 339 "    BL      sub_FF939D3C \n"
 340 "    BL      sub_FF93A7D4 \n"
 341 "    MOV     R0, R4 \n"
 342 "    BL      sub_FF939E24_my \n"  // --> Patched. Old value = 0xFF939E24.
 343 "    MOV     R5, R0 \n"
 344 "    B       loc_FF85E21C \n"
 345 
 346 "loc_FF85E20C:\n"
 347 "    LDR     R0, =0x54B8 \n"
 348 "    LDR     R0, [R0, #4] \n"
 349 "    CMP     R0, #0 \n"
 350 "    MOVNE   R5, #0x1D \n"
 351 
 352 "loc_FF85E21C:\n"
 353 "    BL      capt_seq_hook_raw_here \n"         // added
 354 "    BL      sub_FF93B7EC \n"
 355 "    BL      sub_FF93B828 \n"
 356 "    MOV     R2, R4 \n"
 357 "    MOV     R1, #1 \n"
 358 "    MOV     R0, R5 \n"
 359 "    BL      sub_FF85C418 \n"
 360 "    BL      sub_FF93A1F0 \n"
 361 "    CMP     R0, #0 \n"
 362 "    LDRNE   R0, [R4, #8] \n"
 363 "    ORRNE   R0, R0, #0x2000 \n"
 364 "    STRNE   R0, [R4, #8] \n"
 365 "    LDMFD   SP!, {R4-R6,PC} \n"
 366 );
 367 }
 368 
 369 /*************************************************************/
 370 //** exp_drv_task @ 0xFF8B3D68 - 0xFF8B435C, length=382
 371 void __attribute__((naked,noinline)) exp_drv_task() {
 372 asm volatile (
 373 "    STMFD   SP!, {R4-R8,LR} \n"
 374 "    SUB     SP, SP, #0x20 \n"
 375 "    LDR     R8, =0xBB8 \n"
 376 "    LDR     R7, =0x6A34 \n"
 377 "    LDR     R5, =0x3DBE4 \n"
 378 "    MOV     R0, #0 \n"
 379 "    ADD     R6, SP, #0x10 \n"
 380 "    STR     R0, [SP, #0xC] \n"
 381 
 382 "loc_FF8B3D88:\n"
 383 "    LDR     R0, [R7, #0x20] \n"
 384 "    MOV     R2, #0 \n"
 385 "    ADD     R1, SP, #0x1C \n"
 386 "    BL      sub_FF827E54 /*_ReceiveMessageQueue*/ \n"
 387 "    LDR     R0, [SP, #0xC] \n"
 388 "    CMP     R0, #1 \n"
 389 "    BNE     loc_FF8B3DD0 \n"
 390 "    LDR     R0, [SP, #0x1C] \n"
 391 "    LDR     R0, [R0] \n"
 392 "    CMP     R0, #0x13 \n"
 393 "    CMPNE   R0, #0x14 \n"
 394 "    CMPNE   R0, #0x15 \n"
 395 "    BEQ     loc_FF8B3EEC \n"
 396 "    CMP     R0, #0x27 \n"
 397 "    BEQ     loc_FF8B3EC4 \n"
 398 "    ADD     R1, SP, #0xC \n"
 399 "    MOV     R0, #0 \n"
 400 "    BL      sub_FF8B3D18 \n"
 401 
 402 "loc_FF8B3DD0:\n"
 403 "    LDR     R0, [SP, #0x1C] \n"
 404 "    LDR     R1, [R0] \n"
 405 "    CMP     R1, #0x2C \n"
 406 "    BNE     loc_FF8B3E00 \n"
 407 "    LDR     R0, [SP, #0x1C] \n"
 408 "    BL      sub_FF8B4FD4 \n"
 409 "    LDR     R0, [R7, #0x1C] \n"
 410 "    MOV     R1, #1 \n"
 411 "    BL      sub_FF827BD0 /*_SetEventFlag*/ \n"
 412 "    BL      _ExitTask \n"
 413 "    ADD     SP, SP, #0x20 \n"
 414 "    LDMFD   SP!, {R4-R8,PC} \n"
 415 
 416 "loc_FF8B3E00:\n"
 417 "    CMP     R1, #0x2B \n"
 418 "    BNE     loc_FF8B3E1C \n"
 419 "    LDR     R2, [R0, #0x88]! \n"
 420 "    LDR     R1, [R0, #4] \n"
 421 "    MOV     R0, R1 \n"
 422 "    BLX     R2 \n"
 423 "    B       loc_FF8B4354 \n"
 424 
 425 "loc_FF8B3E1C:\n"
 426 "    CMP     R1, #0x25 \n"
 427 "    BNE     loc_FF8B3E6C \n"
 428 "    LDR     R0, [R7, #0x1C] \n"
 429 "    MOV     R1, #0x80 \n"
 430 "    BL      sub_FF827C04 /*_ClearEventFlag*/ \n"
 431 "    LDR     R0, =0xFF8B07A0 \n"
 432 "    MOV     R1, #0x80 \n"
 433 "    BL      sub_FF92C11C \n"
 434 "    LDR     R0, [R7, #0x1C] \n"
 435 "    MOV     R2, R8 \n"
 436 "    MOV     R1, #0x80 \n"
 437 "    BL      sub_FF827B08 /*_WaitForAllEventFlag*/ \n"
 438 "    TST     R0, #1 \n"
 439 "    LDRNE   R1, =0xD1B \n"
 440 "    BNE     loc_FF8B3EB0 \n"
 441 
 442 "loc_FF8B3E58:\n"
 443 "    LDR     R1, [SP, #0x1C] \n"
 444 "    LDR     R0, [R1, #0x8C] \n"
 445 "    LDR     R1, [R1, #0x88] \n"
 446 "    BLX     R1 \n"
 447 "    B       loc_FF8B4354 \n"
 448 
 449 "loc_FF8B3E6C:\n"
 450 "    CMP     R1, #0x26 \n"
 451 "    BNE     loc_FF8B3EBC \n"
 452 "    ADD     R1, SP, #0xC \n"
 453 "    BL      sub_FF8B3D18 \n"
 454 "    LDR     R0, [R7, #0x1C] \n"
 455 "    MOV     R1, #0x100 \n"
 456 "    BL      sub_FF827C04 /*_ClearEventFlag*/ \n"
 457 "    LDR     R0, =0xFF8B07B0 \n"
 458 "    MOV     R1, #0x100 \n"
 459 "    BL      sub_FF92C3A4 \n"
 460 "    LDR     R0, [R7, #0x1C] \n"
 461 "    MOV     R2, R8 \n"
 462 "    MOV     R1, #0x100 \n"
 463 "    BL      sub_FF827B08 /*_WaitForAllEventFlag*/ \n"
 464 "    TST     R0, #1 \n"
 465 "    BEQ     loc_FF8B3E58 \n"
 466 "    LDR     R1, =0xD25 \n"
 467 
 468 "loc_FF8B3EB0:\n"
 469 "    LDR     R0, =0xFF8B0EA0 /*'ExpDrv.c'*/ \n"
 470 "    BL      _DebugAssert \n"
 471 "    B       loc_FF8B3E58 \n"
 472 
 473 "loc_FF8B3EBC:\n"
 474 "    CMP     R1, #0x27 \n"
 475 "    BNE     loc_FF8B3ED4 \n"
 476 
 477 "loc_FF8B3EC4:\n"
 478 "    LDR     R0, [SP, #0x1C] \n"
 479 "    ADD     R1, SP, #0xC \n"
 480 "    BL      sub_FF8B3D18 \n"
 481 "    B       loc_FF8B3E58 \n"
 482 
 483 "loc_FF8B3ED4:\n"
 484 "    CMP     R1, #0x2A \n"
 485 "    BNE     loc_FF8B3EEC \n"
 486 "    BL      sub_FF893AAC \n"
 487 "    BL      sub_FF894878 \n"
 488 "    BL      sub_FF8942FC \n"
 489 "    B       loc_FF8B3E58 \n"
 490 
 491 "loc_FF8B3EEC:\n"
 492 "    LDR     R0, [SP, #0x1C] \n"
 493 "    MOV     R4, #1 \n"
 494 "    LDR     R1, [R0] \n"
 495 "    CMP     R1, #0x11 \n"
 496 "    CMPNE   R1, #0x12 \n"
 497 "    BNE     loc_FF8B3F5C \n"
 498 "    LDR     R1, [R0, #0x7C] \n"
 499 "    ADD     R1, R1, R1, LSL#1 \n"
 500 "    ADD     R1, R0, R1, LSL#2 \n"
 501 "    SUB     R1, R1, #8 \n"
 502 "    LDMIA   R1, {R2-R4} \n"
 503 "    STMIA   R6, {R2-R4} \n"
 504 "    BL      sub_FF8B282C \n"
 505 "    LDR     R0, [SP, #0x1C] \n"
 506 "    LDR     R1, [R0, #0x7C] \n"
 507 "    LDR     R3, [R0, #0x88] \n"
 508 "    LDR     R2, [R0, #0x8C] \n"
 509 "    ADD     R0, R0, #4 \n"
 510 "    BLX     R3 \n"
 511 "    LDR     R0, [SP, #0x1C] \n"
 512 "    BL      sub_FF8B53A8 \n"
 513 "    LDR     R0, [SP, #0x1C] \n"
 514 "    LDR     R1, [R0, #0x7C] \n"
 515 "    LDR     R3, [R0, #0x90] \n"
 516 "    LDR     R2, [R0, #0x94] \n"
 517 "    ADD     R0, R0, #4 \n"
 518 "    BLX     R3 \n"
 519 "    B       loc_FF8B4294 \n"
 520 
 521 "loc_FF8B3F5C:\n"
 522 "    CMP     R1, #0x13 \n"
 523 "    CMPNE   R1, #0x14 \n"
 524 "    CMPNE   R1, #0x15 \n"
 525 "    BNE     loc_FF8B4010 \n"
 526 "    ADD     R3, SP, #0xC \n"
 527 "    MOV     R2, SP \n"
 528 "    ADD     R1, SP, #0x10 \n"
 529 "    BL      sub_FF8B2A74 \n"
 530 "    CMP     R0, #1 \n"
 531 "    MOV     R4, R0 \n"
 532 "    CMPNE   R4, #5 \n"
 533 "    BNE     loc_FF8B3FAC \n"
 534 "    LDR     R0, [SP, #0x1C] \n"
 535 "    MOV     R2, R4 \n"
 536 "    LDR     R1, [R0, #0x7C]! \n"
 537 "    LDR     R12, [R0, #0xC]! \n"
 538 "    LDR     R3, [R0, #4] \n"
 539 "    MOV     R0, SP \n"
 540 "    BLX     R12 \n"
 541 "    B       loc_FF8B3FE4 \n"
 542 
 543 "loc_FF8B3FAC:\n"
 544 "    LDR     R0, [SP, #0x1C] \n"
 545 "    CMP     R4, #2 \n"
 546 "    LDR     R3, [R0, #0x8C] \n"
 547 "    CMPNE   R4, #6 \n"
 548 "    BNE     loc_FF8B3FF8 \n"
 549 "    LDR     R12, [R0, #0x88] \n"
 550 "    MOV     R0, SP \n"
 551 "    MOV     R2, R4 \n"
 552 "    MOV     R1, #1 \n"
 553 "    BLX     R12 \n"
 554 "    LDR     R0, [SP, #0x1C] \n"
 555 "    MOV     R2, SP \n"
 556 "    ADD     R1, SP, #0x10 \n"
 557 "    BL      sub_FF8B3A2C \n"
 558 
 559 "loc_FF8B3FE4:\n"
 560 "    LDR     R0, [SP, #0x1C] \n"
 561 "    LDR     R2, [SP, #0xC] \n"
 562 "    MOV     R1, R4 \n"
 563 "    BL      sub_FF8B3CB8 \n"
 564 "    B       loc_FF8B4294 \n"
 565 
 566 "loc_FF8B3FF8:\n"
 567 "    LDR     R1, [R0, #0x7C] \n"
 568 "    LDR     R12, [R0, #0x88] \n"
 569 "    ADD     R0, R0, #4 \n"
 570 "    MOV     R2, R4 \n"
 571 "    BLX     R12 \n"
 572 "    B       loc_FF8B4294 \n"
 573 
 574 "loc_FF8B4010:\n"
 575 "    CMP     R1, #0x21 \n"
 576 "    CMPNE   R1, #0x22 \n"
 577 "    BNE     loc_FF8B405C \n"
 578 "    LDR     R1, [R0, #0x7C] \n"
 579 "    ADD     R1, R1, R1, LSL#1 \n"
 580 "    ADD     R1, R0, R1, LSL#2 \n"
 581 "    SUB     R1, R1, #8 \n"
 582 "    LDMIA   R1, {R2-R4} \n"
 583 "    STMIA   R6, {R2-R4} \n"
 584 "    BL      sub_FF8B1DB8 \n"
 585 "    LDR     R0, [SP, #0x1C] \n"
 586 "    LDR     R1, [R0, #0x7C] \n"
 587 "    LDR     R3, [R0, #0x88] \n"
 588 "    LDR     R2, [R0, #0x8C] \n"
 589 "    ADD     R0, R0, #4 \n"
 590 "    BLX     R3 \n"
 591 "    LDR     R0, [SP, #0x1C] \n"
 592 "    BL      sub_FF8B20A8 \n"
 593 "    B       loc_FF8B4294 \n"
 594 
 595 "loc_FF8B405C:\n"
 596 "    ADD     R1, R0, #4 \n"
 597 "    LDMIA   R1, {R2,R3,R12} \n"
 598 "    STMIA   R6, {R2,R3,R12} \n"
 599 "    LDR     R1, [R0] \n"
 600 "    CMP     R1, #0x24 \n"
 601 "    ADDLS   PC, PC, R1, LSL#2 \n"
 602 "    B       loc_FF8B4274 \n"
 603 "    B       loc_FF8B410C \n"
 604 "    B       loc_FF8B410C \n"
 605 "    B       loc_FF8B415C \n"
 606 "    B       loc_FF8B4164 \n"
 607 "    B       loc_FF8B4164 \n"
 608 "    B       loc_FF8B4164 \n"
 609 "    B       loc_FF8B410C \n"
 610 "    B       loc_FF8B415C \n"
 611 "    B       loc_FF8B4164 \n"
 612 "    B       loc_FF8B4164 \n"
 613 "    B       loc_FF8B417C \n"
 614 "    B       loc_FF8B417C \n"
 615 "    B       loc_FF8B4268 \n"
 616 "    B       loc_FF8B4270 \n"
 617 "    B       loc_FF8B4270 \n"
 618 "    B       loc_FF8B4270 \n"
 619 "    B       loc_FF8B4270 \n"
 620 "    B       loc_FF8B4274 \n"
 621 "    B       loc_FF8B4274 \n"
 622 "    B       loc_FF8B4274 \n"
 623 "    B       loc_FF8B4274 \n"
 624 "    B       loc_FF8B4274 \n"
 625 "    B       loc_FF8B416C \n"
 626 "    B       loc_FF8B4174 \n"
 627 "    B       loc_FF8B4174 \n"
 628 "    B       loc_FF8B4188 \n"
 629 "    B       loc_FF8B4188 \n"
 630 "    B       loc_FF8B4190 \n"
 631 "    B       loc_FF8B41C0 \n"
 632 "    B       loc_FF8B41F0 \n"
 633 "    B       loc_FF8B4220 \n"
 634 "    B       loc_FF8B4250 \n"
 635 "    B       loc_FF8B4250 \n"
 636 "    B       loc_FF8B4274 \n"
 637 "    B       loc_FF8B4274 \n"
 638 "    B       loc_FF8B4258 \n"
 639 "    B       loc_FF8B4260 \n"
 640 
 641 "loc_FF8B410C:\n"
 642 "    BL      sub_FF8B0C88 \n"
 643 "    B       loc_FF8B4274 \n"
 644 //SKIP DATA
 645 //END SKIP DATA
 646 
 647 "loc_FF8B415C:\n"
 648 "    BL      sub_FF8B0F18 \n"
 649 "    B       loc_FF8B4274 \n"
 650 
 651 "loc_FF8B4164:\n"
 652 "    BL      sub_FF8B111C \n"
 653 "    B       loc_FF8B4274 \n"
 654 
 655 "loc_FF8B416C:\n"
 656 "    BL      sub_FF8B1384 \n"
 657 "    B       loc_FF8B4274 \n"
 658 
 659 "loc_FF8B4174:\n"
 660 "    BL      sub_FF8B1578 \n"
 661 "    B       loc_FF8B4274 \n"
 662 
 663 "loc_FF8B417C:\n"
 664 "    BL      sub_FF8B17E0_my \n"  // --> Patched. Old value = 0xFF8B17E0.
 665 "    MOV     R4, #0 \n"
 666 "    B       loc_FF8B4274 \n"
 667 
 668 "loc_FF8B4188:\n"
 669 "    BL      sub_FF8B191C \n"
 670 "    B       loc_FF8B4274 \n"
 671 
 672 "loc_FF8B4190:\n"
 673 "    LDRH    R1, [R0, #4] \n"
 674 "    STRH    R1, [SP, #0x10] \n"
 675 "    LDRH    R1, [R5, #2] \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, [R0, #0xC] \n"
 682 "    STRH    R1, [SP, #0x18] \n"
 683 "    BL      sub_FF8B5048 \n"
 684 "    B       loc_FF8B4274 \n"
 685 
 686 "loc_FF8B41C0:\n"
 687 "    LDRH    R1, [R0, #4] \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, [R5, #8] \n"
 696 "    STRH    R1, [SP, #0x18] \n"
 697 "    BL      sub_FF8B51C4 \n"
 698 "    B       loc_FF8B4274 \n"
 699 
 700 "loc_FF8B41F0:\n"
 701 "    LDRH    R1, [R5] \n"
 702 "    STRH    R1, [SP, #0x10] \n"
 703 "    LDRH    R1, [R0, #6] \n"
 704 "    STRH    R1, [SP, #0x12] \n"
 705 "    LDRH    R1, [R5, #4] \n"
 706 "    STRH    R1, [SP, #0x14] \n"
 707 "    LDRH    R1, [R5, #6] \n"
 708 "    STRH    R1, [SP, #0x16] \n"
 709 "    LDRH    R1, [R5, #8] \n"
 710 "    STRH    R1, [SP, #0x18] \n"
 711 "    BL      sub_FF8B5270 \n"
 712 "    B       loc_FF8B4274 \n"
 713 
 714 "loc_FF8B4220:\n"
 715 "    LDRH    R1, [R5] \n"
 716 "    STRH    R1, [SP, #0x10] \n"
 717 "    LDRH    R1, [R5, #2] \n"
 718 "    STRH    R1, [SP, #0x12] \n"
 719 "    LDRH    R1, [R5, #4] \n"
 720 "    STRH    R1, [SP, #0x14] \n"
 721 "    LDRH    R1, [R5, #6] \n"
 722 "    STRH    R1, [SP, #0x16] \n"
 723 "    LDRH    R1, [R0, #0xC] \n"
 724 "    STRH    R1, [SP, #0x18] \n"
 725 "    BL      sub_FF8B5310 \n"
 726 "    B       loc_FF8B4274 \n"
 727 
 728 "loc_FF8B4250:\n"
 729 "    BL      sub_FF8B1B90 \n"
 730 "    B       loc_FF8B4274 \n"
 731 
 732 "loc_FF8B4258:\n"
 733 "    BL      sub_FF8B21AC \n"
 734 "    B       loc_FF8B4274 \n"
 735 
 736 "loc_FF8B4260:\n"
 737 "    BL      sub_FF8B23E4 \n"
 738 "    B       loc_FF8B4274 \n"
 739 
 740 "loc_FF8B4268:\n"
 741 "    BL      sub_FF8B255C \n"
 742 "    B       loc_FF8B4274 \n"
 743 
 744 "loc_FF8B4270:\n"
 745 "    BL      sub_FF8B26F4 \n"
 746 
 747 "loc_FF8B4274:\n"
 748 "    LDR     R0, [SP, #0x1C] \n"
 749 "    LDR     R1, [R0, #0x7C] \n"
 750 "    LDR     R3, [R0, #0x88] \n"
 751 "    LDR     R2, [R0, #0x8C] \n"
 752 "    ADD     R0, R0, #4 \n"
 753 "    BLX     R3 \n"
 754 "    CMP     R4, #1 \n"
 755 "    BNE     loc_FF8B42DC \n"
 756 
 757 "loc_FF8B4294:\n"
 758 "    LDR     R0, [SP, #0x1C] \n"
 759 "    MOV     R2, #0xC \n"
 760 "    LDR     R1, [R0, #0x7C] \n"
 761 "    ADD     R1, R1, R1, LSL#1 \n"
 762 "    ADD     R0, R0, R1, LSL#2 \n"
 763 "    SUB     R4, R0, #8 \n"
 764 "    LDR     R0, =0x3DBE4 \n"
 765 "    ADD     R1, SP, #0x10 \n"
 766 "    BL      sub_FFAA4B2C \n"
 767 "    LDR     R0, =0x3DBF0 \n"
 768 "    MOV     R2, #0xC \n"
 769 "    ADD     R1, SP, #0x10 \n"
 770 "    BL      sub_FFAA4B2C \n"
 771 "    LDR     R0, =0x3DBFC \n"
 772 "    MOV     R2, #0xC \n"
 773 "    MOV     R1, R4 \n"
 774 "    BL      sub_FFAA4B2C \n"
 775 "    B       loc_FF8B4354 \n"
 776 
 777 "loc_FF8B42DC:\n"
 778 "    LDR     R0, [SP, #0x1C] \n"
 779 "    LDR     R0, [R0] \n"
 780 "    CMP     R0, #0xB \n"
 781 "    BNE     loc_FF8B4324 \n"
 782 "    MOV     R3, #0 \n"
 783 "    STR     R3, [SP] \n"
 784 "    MOV     R3, #1 \n"
 785 "    MOV     R2, #1 \n"
 786 "    MOV     R1, #1 \n"
 787 "    MOV     R0, #0 \n"
 788 "    BL      sub_FF8B0A90 \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 "    B       loc_FF8B4350 \n"
 796 
 797 "loc_FF8B4324:\n"
 798 "    MOV     R3, #1 \n"
 799 "    MOV     R2, #1 \n"
 800 "    MOV     R1, #1 \n"
 801 "    MOV     R0, #1 \n"
 802 "    STR     R3, [SP] \n"
 803 "    BL      sub_FF8B0A90 \n"
 804 "    MOV     R3, #1 \n"
 805 "    MOV     R2, #1 \n"
 806 "    MOV     R1, #1 \n"
 807 "    MOV     R0, #1 \n"
 808 "    STR     R3, [SP] \n"
 809 
 810 "loc_FF8B4350:\n"
 811 "    BL      sub_FF8B0BD0 \n"
 812 
 813 "loc_FF8B4354:\n"
 814 "    LDR     R0, [SP, #0x1C] \n"
 815 "    BL      sub_FF8B4FD4 \n"
 816 "    B       loc_FF8B3D88 \n"
 817 );
 818 }
 819 
 820 /*************************************************************/
 821 //** sub_FF8B17E0_my @ 0xFF8B17E0 - 0xFF8B189C, length=48
 822 void __attribute__((naked,noinline)) sub_FF8B17E0_my() {
 823 asm volatile (
 824 "    STMFD   SP!, {R4-R8,LR} \n"
 825 "    LDR     R7, =0x6A34 \n"
 826 "    MOV     R4, R0 \n"
 827 "    LDR     R0, [R7, #0x1C] \n"
 828 "    MOV     R1, #0x3E \n"
 829 "    BL      sub_FF827C04 /*_ClearEventFlag*/ \n"
 830 "    LDRSH   R0, [R4, #4] \n"
 831 "    MOV     R2, #0 \n"
 832 "    MOV     R1, #0 \n"
 833 "    BL      sub_FF8B0824 \n"
 834 "    MOV     R6, R0 \n"
 835 "    LDRSH   R0, [R4, #6] \n"
 836 "    BL      sub_FF8B0930 \n"
 837 "    LDRSH   R0, [R4, #8] \n"
 838 "    BL      sub_FF8B0988 \n"
 839 "    LDRSH   R0, [R4, #0xA] \n"
 840 "    BL      sub_FF8B09E0 \n"
 841 "    LDRSH   R0, [R4, #0xC] \n"
 842 "    BL      sub_FF8B0A38 \n"
 843 "    MOV     R5, R0 \n"
 844 "    LDR     R0, [R4] \n"
 845 "    LDR     R8, =0x3DBFC \n"
 846 "    CMP     R0, #0xB \n"
 847 "    MOVEQ   R6, #0 \n"
 848 "    MOVEQ   R5, #0 \n"
 849 "    BEQ     loc_FF8B1870 \n"
 850 "    CMP     R6, #1 \n"
 851 "    BNE     loc_FF8B1870 \n"
 852 "    LDRSH   R0, [R4, #4] \n"
 853 "    LDR     R1, =0xFF8B0790 \n"
 854 "    MOV     R2, #2 \n"
 855 "    BL      sub_FF92C270 \n"
 856 "    STRH    R0, [R4, #4] \n"
 857 "    MOV     R0, #0 \n"
 858 "    STR     R0, [R7, #0x28] \n"
 859 "    B       loc_FF8B1878 \n"
 860 
 861 "loc_FF8B1870:\n"
 862 "    LDRH    R0, [R8] \n"
 863 "    STRH    R0, [R4, #4] \n"
 864 
 865 "loc_FF8B1878:\n"
 866 "    CMP     R5, #1 \n"
 867 "    LDRNEH  R0, [R8, #8] \n"
 868 "    BNE     loc_FF8B1894 \n"
 869 "    LDRSH   R0, [R4, #0xC] \n"
 870 "    MOV     R2, #0x20 \n"
 871 "    LDR     R1, =0xFF8B0814 \n"
 872 "    BL      sub_FF8B5004 \n"
 873 
 874 "loc_FF8B1894:\n"
 875 "    STRH    R0, [R4, #0xC] \n"
 876 "    LDRSH   R0, [R4, #6] \n"
 877 "    BL      sub_FF8937F8_my \n"  // --> Patched. Old value = 0xFF8937F8.
 878 "    LDR     PC, =0xFF8B18A0 \n"  // Continue in firmware
 879 );
 880 }
 881 
 882 /*************************************************************/
 883 //** sub_FF8937F8_my @ 0xFF8937F8 - 0xFF893860, length=27
 884 void __attribute__((naked,noinline)) sub_FF8937F8_my() {
 885 asm volatile (
 886 "    STMFD   SP!, {R4-R6,LR} \n"
 887 "    LDR     R5, =0x650C \n"
 888 "    MOV     R4, R0 \n"
 889 "    LDR     R0, [R5, #4] \n"
 890 "    CMP     R0, #1 \n"
 891 "    LDRNE   R1, =0x16D \n"
 892 "    LDRNE   R0, =0xFF893590 /*'Shutter.c'*/ \n"
 893 "    BLNE    _DebugAssert \n"
 894 "    CMN     R4, #0xC00 \n"
 895 "    LDREQSH R4, [R5, #2] \n"
 896 "    CMN     R4, #0xC00 \n"
 897 "    LDREQ   R1, =0x173 \n"
 898 "    LDREQ   R0, =0xFF893590 /*'Shutter.c'*/ \n"
 899 "    STRH    R4, [R5, #2] \n"
 900 "    BLEQ    _DebugAssert \n"
 901 "    MOV     R0, R4 \n"
 902 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
 903 "    MOV     R4, R0 \n"
 904 //"  BL      _sub_FF8C2B68 \n"  // --> Nullsub call removed.
 905 "    MOV     R0, R4 \n"
 906 "    BL      sub_FF8C6D10 \n"
 907 "    TST     R0, #1 \n"
 908 "    LDMNEFD SP!, {R4-R6,LR} \n"
 909 "    MOVNE   R1, #0x178 \n"
 910 "    LDRNE   R0, =0xFF893590 /*'Shutter.c'*/ \n"
 911 "    BNE     _DebugAssert \n"
 912 "    LDMFD   SP!, {R4-R6,PC} \n"
 913 );
 914 }

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