root/platform/ixus65_sd630/sub/100a/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF95FEA0_my
  3. sub_FF963344_my
  4. exp_drv_task
  5. sub_FF905B84_my
  6. sub_FF8B1C7C_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 static long *nrflag = (long*)0x61F4;
   9 
  10 #include "../../../generic/capt_seq.c"
  11 
  12 /*************************************************************/
  13 //** capt_seq_task @ 0xFF960314 - 0xFF960594, length=161
  14 void __attribute__((naked,noinline)) capt_seq_task() {
  15 asm volatile (
  16 "    STMFD   SP!, {R4,LR} \n"
  17 "    SUB     SP, SP, #4 \n"
  18 "    MOV     R4, SP \n"
  19 "    B       loc_FF96048C \n"
  20 
  21 "loc_FF960324:\n"
  22 "    LDR     R2, [SP] \n"
  23 "    LDR     R3, [R2] \n"
  24 "    MOV     R0, R2 \n"
  25 "    CMP     R3, #0x14 \n"
  26 "    LDRLS   PC, [PC, R3, LSL#2] \n"
  27 "    B       loc_FF960460 \n"
  28 "    .long   loc_FF960390 \n"
  29 "    .long   loc_FF9603B0 \n"
  30 "    .long   loc_FF9603C4 \n"
  31 "    .long   loc_FF9603D4 \n"
  32 "    .long   loc_FF9603CC \n"
  33 "    .long   loc_FF9603DC \n"
  34 "    .long   loc_FF9603E4 \n"
  35 "    .long   loc_FF9603F0 \n"
  36 "    .long   loc_FF9603F8 \n"
  37 "    .long   loc_FF960404 \n"
  38 "    .long   loc_FF96040C \n"
  39 "    .long   loc_FF960414 \n"
  40 "    .long   loc_FF96041C \n"
  41 "    .long   loc_FF960424 \n"
  42 "    .long   loc_FF96042C \n"
  43 "    .long   loc_FF960438 \n"
  44 "    .long   loc_FF960440 \n"
  45 "    .long   loc_FF960448 \n"
  46 "    .long   loc_FF960450 \n"
  47 "    .long   loc_FF960458 \n"
  48 "    .long   loc_FF960474 \n"
  49 
  50 "loc_FF960390:\n"
  51 "    BL      sub_FF961D60 \n"
  52 "    BL      shooting_expo_param_override\n"   // +
  53 "    BL      sub_FF95E090 \n"
  54 "    LDR     R3, =0x99EC0 \n"
  55 "    MOV     R2, #0\n"                          // added
  56 "    STR     R2, [R3,#0x24]\n"                  // added, fixes overrides behavior at short shutter press (from S95)
  57 //"  LDR     R2, [R3, #0x24] \n"  // above patch makes these three lines redundant
  58 //"  CMP     R2, #0 \n"
  59 //"  BEQ     loc_FF960470 \n"
  60 //"  BL      _sub_FF95FF70 \n"
  61 "    B       loc_FF960470 \n"
  62 
  63 "loc_FF9603B0:\n"
  64 "    BL      sub_FF95FEA0_my \n"  // --> Patched. Old value = 0xFF95FEA0.
  65 
  66 "loc_FF9603B4:\n"
  67 "    LDR     R2, =0x99EC0 \n"
  68 "    MOV     R3, #0 \n"
  69 "    STR     R3, [R2, #0x24] \n"
  70 "    B       loc_FF960470 \n"
  71 
  72 "loc_FF9603C4:\n"
  73 "    BL      sub_FF9620F0 \n"
  74 "    B       loc_FF960470 \n"
  75 
  76 "loc_FF9603CC:\n"
  77 "    BL      sub_FF960F60 \n"
  78 "    B       loc_FF9603B4 \n"
  79 
  80 "loc_FF9603D4:\n"
  81 "    BL      sub_FF9612FC \n"
  82 "    B       loc_FF9603B4 \n"
  83 
  84 "loc_FF9603DC:\n"
  85 "    BL      sub_FF96130C \n"
  86 "    B       loc_FF960470 \n"
  87 
  88 "loc_FF9603E4:\n"
  89 "    BL      sub_FF961E44 \n"
  90 "    BL      sub_FF95E090 \n"
  91 "    B       loc_FF960470 \n"
  92 
  93 "loc_FF9603F0:\n"
  94 "    BL      sub_FF960044 \n"
  95 "    B       loc_FF960470 \n"
  96 
  97 "loc_FF9603F8:\n"
  98 "    BL      sub_FF961EAC \n"
  99 "    BL      sub_FF95E090 \n"
 100 "    B       loc_FF960470 \n"
 101 
 102 "loc_FF960404:\n"
 103 "    BL      sub_FF9612FC \n"
 104 "    B       loc_FF960470 \n"
 105 
 106 "loc_FF96040C:\n"
 107 "    BL      sub_FF962644 \n"
 108 "    B       loc_FF960470 \n"
 109 
 110 "loc_FF960414:\n"
 111 "    BL      sub_FF962988 \n"
 112 "    B       loc_FF960470 \n"
 113 
 114 "loc_FF96041C:\n"
 115 "    BL      sub_FF962A0C \n"
 116 "    B       loc_FF960470 \n"
 117 
 118 "loc_FF960424:\n"
 119 "    BL      sub_FF962AFC \n"
 120 "    B       loc_FF960470 \n"
 121 
 122 "loc_FF96042C:\n"
 123 "    MOV     R0, #0 \n"
 124 "    BL      sub_FF962BC4 \n"
 125 "    B       loc_FF960470 \n"
 126 
 127 "loc_FF960438:\n"
 128 "    BL      sub_FF962D30 \n"
 129 "    B       loc_FF960470 \n"
 130 
 131 "loc_FF960440:\n"
 132 "    BL      sub_FF962DC4 \n"
 133 "    B       loc_FF960470 \n"
 134 
 135 "loc_FF960448:\n"
 136 "    BL      sub_FF962E80 \n"
 137 "    B       loc_FF960470 \n"
 138 
 139 "loc_FF960450:\n"
 140 "    BL      sub_FF962F6C \n"
 141 "    B       loc_FF960470 \n"
 142 
 143 "loc_FF960458:\n"
 144 "    BL      sub_FF962FC0 \n"
 145 "    B       loc_FF960470 \n"
 146 
 147 "loc_FF960460:\n"
 148 "    MOV     R1, #0x36C \n"
 149 "    LDR     R0, =0xFF95FC2C /*'ShootTask.c'*/ \n"
 150 "    ADD     R1, R1, #1 \n"
 151 "    BL      _DebugAssert \n"
 152 
 153 "loc_FF960470:\n"
 154 "    LDR     R2, [SP] \n"
 155 
 156 "loc_FF960474:\n"
 157 "    LDR     R3, =0x6F344 \n"
 158 "    LDR     R1, [R2, #4] \n"
 159 "    LDR     R0, [R3] \n"
 160 "    BL      sub_FF81FD68 /*_SetEventFlag*/ \n"
 161 "    LDR     R0, [SP] \n"
 162 "    BL      sub_FF95FCA8 \n"
 163 
 164 "loc_FF96048C:\n"
 165 "    LDR     R3, =0x6F348 \n"
 166 "    MOV     R1, R4 \n"
 167 "    LDR     R0, [R3] \n"
 168 "    MOV     R2, #0 \n"
 169 "    BL      sub_FF820480 /*_ReceiveMessageQueue*/ \n"
 170 "    TST     R0, #1 \n"
 171 "    BEQ     loc_FF960324 \n"
 172 "    MOV     R1, #0x2A4 \n"
 173 "    LDR     R0, =0xFF95FC2C /*'ShootTask.c'*/ \n"
 174 "    ADD     R1, R1, #3 \n"
 175 "    BL      _DebugAssert \n"
 176 "    BL      _ExitTask \n"
 177 "    ADD     SP, SP, #4 \n"
 178 "    LDMFD   SP!, {R4,PC} \n"
 179 "    MOV     PC, LR \n"
 180 );
 181 }
 182 
 183 /*************************************************************/
 184 //** sub_FF95FEA0_my @ 0xFF95FEA0 - 0xFF95FF60, length=49
 185 void __attribute__((naked,noinline)) sub_FF95FEA0_my() {
 186 asm volatile (
 187 "    STMFD   SP!, {R4,LR} \n"
 188 "    LDR     R4, [R0, #0xC] \n"
 189 "    BL      sub_FF968658 \n"
 190 "    CMP     R0, #0 \n"
 191 "    BNE     loc_FF95FEB8 \n"
 192 "    BL      sub_FF968664 \n"
 193 
 194 "loc_FF95FEB8:\n"
 195 "    LDR     R3, =0x99EC0 \n"
 196 "    LDR     R2, [R3, #0x24] \n"
 197 "    CMP     R2, #0 \n"
 198 "    BNE     loc_FF95FEEC \n"
 199 "    MOV     R0, #0xC \n"
 200 "    BL      sub_FF968678 \n"
 201 "    TST     R0, #1 \n"
 202 "    BEQ     loc_FF95FEEC \n"
 203 "    MOV     R0, #1 \n"
 204 
 205 "loc_FF95FEDC:\n"
 206 "    MOV     R2, R4 \n"
 207 "    MOV     R1, #1 \n"
 208 "    LDMFD   SP!, {R4,LR} \n"
 209 "    B       sub_FF95E574 \n"
 210 
 211 "loc_FF95FEEC:\n"
 212 "    LDR     R3, =0x99EC0 \n"
 213 "    LDR     R2, [R3, #0x24] \n"
 214 "    CMP     R2, #0 \n"
 215 "    BNE     loc_FF95FF3C \n"
 216 "    MOV     R0, R4 \n"
 217 "    BL      sub_FF962100 \n"
 218 "    TST     R0, #1 \n"
 219 "    BNE     loc_FF95FEDC \n"
 220 "    BL      sub_FF9A15A8 \n"
 221 "    BL      sub_FF824ADC \n"
 222 "    LDR     R2, =0x99E04 \n"
 223 "    ADD     R3, R4, R4, LSL#1 \n"
 224 "    STR     R0, [R2, R3, LSL#5] \n"
 225 "    MOV     R0, R4 \n"
 226 "    BL      sub_FF963AB0 \n"
 227 "    BL      sub_FF962604 \n"
 228 "    BL      sub_FF9625A0 \n"
 229 "    MOV     R0, R4 \n"
 230 "    BL      sub_FF963344_my \n"  // --> Patched. Old value = 0xFF963344.
 231 "    BL      capt_seq_hook_raw_here\n"   // +
 232 "    B       loc_FF95FF50 \n"
 233 
 234 "loc_FF95FF3C:\n"
 235 "    LDR     R3, =0x61E0 \n"
 236 "    LDR     R2, [R3] \n"
 237 "    CMP     R2, #0 \n"
 238 "    MOVNE   R0, #0x1D \n"
 239 "    MOVEQ   R0, #0 \n"
 240 
 241 "loc_FF95FF50:\n"
 242 "    MOV     R2, R4 \n"
 243 "    MOV     R1, #1 \n"
 244 "    BL      sub_FF95E574 \n"
 245 "    LDMFD   SP!, {R4,LR} \n"
 246 "    B       sub_FF96353C \n"
 247 );
 248 }
 249 
 250 /*************************************************************/
 251 //** sub_FF963344_my @ 0xFF963344 - 0xFF963370, length=12
 252 void __attribute__((naked,noinline)) sub_FF963344_my() {
 253 asm volatile (
 254 "    STMFD   SP!, {R4-R6,LR} \n"
 255 "    LDR     R3, =0x6F3BC \n"
 256 "    LDR     R5, =0x61F0 \n"
 257 "    SUB     SP, SP, #4 \n"
 258 "    MVN     R1, #0 \n"
 259 "    STR     R0, [R5] \n"
 260 "    LDR     R0, [R3] \n"
 261 "    BL      sub_FF81FF04 /*_ClearEventFlag*/ \n"
 262 "    LDR     R3, =0x99EC0 \n"
 263 "    LDR     R0, [R3, #0x7C] \n"
 264 "    BL      sub_FF89EFF0 \n"
 265 "    BL      sub_FF963298 \n"
 266 "    BL      wait_until_remote_button_is_released\n"
 267 "    BL      capt_seq_hook_set_nr\n"
 268 "    LDR     PC, =0xFF963374 \n"  // Continue in firmware
 269 );
 270 }
 271 
 272 /*************************************************************/
 273 //** exp_drv_task @ 0xFF9072E4 - 0xFF907724, length=273
 274 void __attribute__((naked,noinline)) exp_drv_task() {
 275 asm volatile (
 276 "    STMFD   SP!, {R4-R8,LR} \n"
 277 "    SUB     SP, SP, #0x14 \n"
 278 "    MOV     R7, SP \n"
 279 "    B       loc_FF9076E0 \n"
 280 
 281 "loc_FF9072F4:\n"
 282 "    CMP     R2, #0x1F \n"
 283 "    BNE     loc_FF90730C \n"
 284 "    LDR     R0, [R12, #0x50] \n"
 285 "    MOV     LR, PC \n"
 286 "    LDR     PC, [R12, #0x4C] \n"
 287 "    B       loc_FF90736C \n"
 288 
 289 "loc_FF90730C:\n"
 290 "    CMP     R2, #0x1A \n"
 291 "    BNE     loc_FF907320 \n"
 292 "    MOV     R0, R12 \n"
 293 "    BL      sub_FF907214 \n"
 294 "    B       loc_FF90735C \n"
 295 
 296 "loc_FF907320:\n"
 297 "    CMP     R2, #0x1B \n"
 298 "    BNE     loc_FF907334 \n"
 299 "    MOV     R0, R12 \n"
 300 "    BL      sub_FF907250 \n"
 301 "    B       loc_FF90735C \n"
 302 
 303 "loc_FF907334:\n"
 304 "    SUB     R3, R2, #0x1C \n"
 305 "    CMP     R3, #1 \n"
 306 "    BHI     loc_FF90734C \n"
 307 "    MOV     R0, R12 \n"
 308 "    BL      sub_FF90728C \n"
 309 "    B       loc_FF90735C \n"
 310 
 311 "loc_FF90734C:\n"
 312 "    CMP     R2, #0x1E \n"
 313 "    BNE     loc_FF907378 \n"
 314 "    BL      sub_FF8B1FF4 \n"
 315 "    BL      sub_FF8B3DE4 \n"
 316 
 317 "loc_FF90735C:\n"
 318 "    LDR     R3, [SP] \n"
 319 "    LDR     R0, [R3, #0x50] \n"
 320 "    MOV     LR, PC \n"
 321 "    LDR     PC, [R3, #0x4C] \n"
 322 
 323 "loc_FF90736C:\n"
 324 "    LDR     R0, [SP] \n"
 325 "    BL      sub_FF904FD4 \n"
 326 "    B       loc_FF9076E0 \n"
 327 
 328 "loc_FF907378:\n"
 329 "    CMP     R2, #0xD \n"
 330 "    MOV     R8, #1 \n"
 331 "    BNE     loc_FF9073E8 \n"
 332 "    LDR     R1, [R12, #0x40] \n"
 333 "    ADD     R1, R1, R1, LSL#1 \n"
 334 "    ADD     R1, R12, R1, LSL#1 \n"
 335 "    ADD     R6, SP, #0xC \n"
 336 "    SUB     R1, R1, #2 \n"
 337 "    MOV     R2, #6 \n"
 338 "    MOV     R0, R6 \n"
 339 "    BL      _memcpy \n"
 340 "    LDR     R0, [SP] \n"
 341 "    BL      sub_FF9064A4 \n"
 342 "    LDR     R3, [SP] \n"
 343 "    LDR     R1, [R3, #0x40] \n"
 344 "    LDR     R2, [R3, #0x50] \n"
 345 "    ADD     R0, R3, #4 \n"
 346 "    MOV     LR, PC \n"
 347 "    LDR     PC, [R3, #0x4C] \n"
 348 "    LDR     R0, [SP] \n"
 349 "    BL      sub_FF906628 \n"
 350 "    LDR     R3, [SP] \n"
 351 "    ADD     R0, R3, #4 \n"
 352 "    LDR     R1, [R3, #0x40] \n"
 353 "    LDR     R2, [R3, #0x58] \n"
 354 "    MOV     LR, PC \n"
 355 "    LDR     PC, [R3, #0x54] \n"
 356 "    B       loc_FF907690 \n"
 357 
 358 "loc_FF9073E8:\n"
 359 "    SUB     R3, R2, #0xE \n"
 360 "    CMP     R3, #1 \n"
 361 "    BHI     loc_FF9074A4 \n"
 362 "    ADD     R6, SP, #0xC \n"
 363 "    ADD     R5, SP, #4 \n"
 364 "    MOV     R0, R12 \n"
 365 "    MOV     R1, R6 \n"
 366 "    MOV     R2, R5 \n"
 367 "    BL      sub_FF9066A4 \n"
 368 "    MOV     R4, R0 \n"
 369 "    CMP     R4, #5 \n"
 370 "    CMPNE   R4, #1 \n"
 371 "    BNE     loc_FF90743C \n"
 372 "    LDR     R12, [SP] \n"
 373 "    MOV     R0, R5 \n"
 374 "    LDR     R1, [R12, #0x40] \n"
 375 "    MOV     R2, R4 \n"
 376 "    LDR     R3, [R12, #0x50] \n"
 377 "    MOV     LR, PC \n"
 378 "    LDR     PC, [R12, #0x4C] \n"
 379 "    B       loc_FF907474 \n"
 380 
 381 "loc_FF90743C:\n"
 382 "    CMP     R4, #6 \n"
 383 "    CMPNE   R4, #2 \n"
 384 "    BNE     loc_FF907484 \n"
 385 "    LDR     R12, [SP] \n"
 386 "    MOV     R0, R5 \n"
 387 "    MOV     R1, R8 \n"
 388 "    MOV     R2, R4 \n"
 389 "    LDR     R3, [R12, #0x50] \n"
 390 "    MOV     LR, PC \n"
 391 "    LDR     PC, [R12, #0x4C] \n"
 392 "    MOV     R1, R6 \n"
 393 "    LDR     R0, [SP] \n"
 394 "    MOV     R2, R5 \n"
 395 "    BL      sub_FF907050 \n"
 396 
 397 "loc_FF907474:\n"
 398 "    MOV     R1, R4 \n"
 399 "    LDR     R0, [SP] \n"
 400 "    BL      sub_FF9071F4 \n"
 401 "    B       loc_FF907690 \n"
 402 
 403 "loc_FF907484:\n"
 404 "    LDR     R12, [SP] \n"
 405 "    MOV     R2, R4 \n"
 406 "    ADD     R0, R12, #4 \n"
 407 "    LDR     R1, [R12, #0x40] \n"
 408 "    LDR     R3, [R12, #0x50] \n"
 409 "    MOV     LR, PC \n"
 410 "    LDR     PC, [R12, #0x4C] \n"
 411 "    B       loc_FF907690 \n"
 412 
 413 "loc_FF9074A4:\n"
 414 "    SUB     R3, R2, #0x17 \n"
 415 "    CMP     R3, #1 \n"
 416 "    BHI     loc_FF9074FC \n"
 417 "    LDR     R1, [R12, #0x40] \n"
 418 "    ADD     R1, R1, R1, LSL#1 \n"
 419 "    ADD     R1, R12, R1, LSL#1 \n"
 420 "    ADD     R6, SP, #0xC \n"
 421 "    SUB     R1, R1, #2 \n"
 422 "    MOV     R2, #6 \n"
 423 "    MOV     R0, R6 \n"
 424 "    BL      _memcpy \n"
 425 "    LDR     R0, [SP] \n"
 426 "    BL      sub_FF905FD8 \n"
 427 "    LDR     R3, [SP] \n"
 428 "    ADD     R0, R3, #4 \n"
 429 "    LDR     R1, [R3, #0x40] \n"
 430 "    LDR     R2, [R3, #0x50] \n"
 431 "    MOV     LR, PC \n"
 432 "    LDR     PC, [R3, #0x4C] \n"
 433 "    LDR     R0, [SP] \n"
 434 "    BL      sub_FF9061A8 \n"
 435 "    B       loc_FF907690 \n"
 436 
 437 "loc_FF9074FC:\n"
 438 "    ADD     R6, SP, #0xC \n"
 439 "    ADD     R1, R12, #4 \n"
 440 "    MOV     R2, #6 \n"
 441 "    MOV     R0, R6 \n"
 442 "    BL      _memcpy \n"
 443 "    LDR     R12, [SP] \n"
 444 "    LDR     R3, [R12] \n"
 445 "    MOV     R2, R12 \n"
 446 "    CMP     R3, #0x19 \n"
 447 "    LDRLS   PC, [PC, R3, LSL#2] \n"
 448 "    B       loc_FF90767C \n"
 449 "    .long   loc_FF907590 \n"
 450 "    .long   loc_FF90759C \n"
 451 "    .long   loc_FF9075A8 \n"
 452 "    .long   loc_FF9075A8 \n"
 453 "    .long   loc_FF907590 \n"
 454 "    .long   loc_FF90759C \n"
 455 "    .long   loc_FF9075A8 \n"
 456 "    .long   loc_FF9075A8 \n"
 457 "    .long   loc_FF9075CC \n"
 458 "    .long   loc_FF9075CC \n"
 459 "    .long   loc_FF907650 \n"
 460 "    .long   loc_FF90765C \n"
 461 "    .long   loc_FF90766C \n"
 462 "    .long   loc_FF90767C \n"
 463 "    .long   loc_FF90767C \n"
 464 "    .long   loc_FF90767C \n"
 465 "    .long   loc_FF9075B4 \n"
 466 "    .long   loc_FF9075C0 \n"
 467 "    .long   loc_FF9075DC \n"
 468 "    .long   loc_FF9075E8 \n"
 469 "    .long   loc_FF907610 \n"
 470 "    .long   loc_FF907638 \n"
 471 "    .long   loc_FF907638 \n"
 472 "    .long   loc_FF90767C \n"
 473 "    .long   loc_FF90767C \n"
 474 "    .long   loc_FF907644 \n"
 475 
 476 "loc_FF907590:\n"
 477 "    MOV     R0, R2 \n"
 478 "    BL      sub_FF905578 \n"
 479 "    B       loc_FF907678 \n"
 480 
 481 "loc_FF90759C:\n"
 482 "    MOV     R0, R2 \n"
 483 "    BL      sub_FF9056B4 \n"
 484 "    B       loc_FF907678 \n"
 485 
 486 "loc_FF9075A8:\n"
 487 "    MOV     R0, R2 \n"
 488 "    BL      sub_FF9057E4 \n"
 489 "    B       loc_FF907678 \n"
 490 
 491 "loc_FF9075B4:\n"
 492 "    MOV     R0, R2 \n"
 493 "    BL      sub_FF9059B8 \n"
 494 "    B       loc_FF907678 \n"
 495 
 496 "loc_FF9075C0:\n"
 497 "    MOV     R0, R2 \n"
 498 "    BL      sub_FF905AC0 \n"
 499 "    B       loc_FF907678 \n"
 500 
 501 "loc_FF9075CC:\n"
 502 "    MOV     R0, R2 \n"
 503 "    BL      sub_FF905B84_my \n"  // --> Patched. Old value = 0xFF905B84.
 504 "    MOV     R8, #0 \n"
 505 "    B       loc_FF907678 \n"
 506 
 507 "loc_FF9075DC:\n"
 508 "    MOV     R0, R2 \n"
 509 "    BL      sub_FF905C44 \n"
 510 "    B       loc_FF907678 \n"
 511 
 512 "loc_FF9075E8:\n"
 513 "    MOV     R0, R2 \n"
 514 "    LDRH    R2, [R2, #4] \n"
 515 "    LDR     R3, =0x4A414 \n"
 516 "    STRH    R2, [SP, #0xC] \n"
 517 "    LDRH    R1, [R3, #4] \n"
 518 "    STRH    R1, [SP, #0x10] \n"
 519 "    LDRH    R3, [R3, #2] \n"
 520 "    STRH    R3, [SP, #0xE] \n"
 521 "    BL      sub_FF905DCC \n"
 522 "    B       loc_FF907678 \n"
 523 
 524 "loc_FF907610:\n"
 525 "    LDR     R3, =0x4A414 \n"
 526 "    LDRH    R1, [R3] \n"
 527 "    STRH    R1, [SP, #0xC] \n"
 528 "    MOV     R0, R2 \n"
 529 "    LDRH    R2, [R2, #6] \n"
 530 "    STRH    R2, [SP, #0xE] \n"
 531 "    LDRH    R3, [R3, #4] \n"
 532 "    STRH    R3, [SP, #0x10] \n"
 533 "    BL      sub_FF905E60 \n"
 534 "    B       loc_FF907678 \n"
 535 
 536 "loc_FF907638:\n"
 537 "    MOV     R0, R2 \n"
 538 "    BL      sub_FF905EE0 \n"
 539 "    B       loc_FF907678 \n"
 540 
 541 "loc_FF907644:\n"
 542 "    MOV     R0, R2 \n"
 543 "    BL      sub_FF906238 \n"
 544 "    B       loc_FF907678 \n"
 545 
 546 "loc_FF907650:\n"
 547 "    MOV     R0, R2 \n"
 548 "    BL      sub_FF90630C \n"
 549 "    B       loc_FF907678 \n"
 550 
 551 "loc_FF90765C:\n"
 552 "    MOV     R0, R2 \n"
 553 "    MOV     R1, #0 \n"
 554 "    BL      sub_FF9063F8 \n"
 555 "    B       loc_FF907678 \n"
 556 
 557 "loc_FF90766C:\n"
 558 "    MOV     R0, R2 \n"
 559 "    MOV     R1, #1 \n"
 560 "    BL      sub_FF9063F8 \n"
 561 
 562 "loc_FF907678:\n"
 563 "    LDR     R12, [SP] \n"
 564 
 565 "loc_FF90767C:\n"
 566 "    ADD     R0, R12, #4 \n"
 567 "    LDR     R1, [R12, #0x40] \n"
 568 "    LDR     R2, [R12, #0x50] \n"
 569 "    MOV     LR, PC \n"
 570 "    LDR     PC, [R12, #0x4C] \n"
 571 
 572 "loc_FF907690:\n"
 573 "    CMP     R8, #1 \n"
 574 "    BNE     loc_FF9076B8 \n"
 575 "    LDR     R1, [SP] \n"
 576 "    LDR     R3, [R1, #0x40] \n"
 577 "    ADD     R3, R3, R3, LSL#1 \n"
 578 "    ADD     R1, R1, R3, LSL#1 \n"
 579 "    MOV     R0, R6 \n"
 580 "    SUB     R1, R1, #2 \n"
 581 "    BL      sub_FF9053E8 \n"
 582 "    B       loc_FF9076D8 \n"
 583 
 584 "loc_FF9076B8:\n"
 585 "    MOV     R0, #1 \n"
 586 "    MOV     R1, R0 \n"
 587 "    MOV     R2, R0 \n"
 588 "    BL      sub_FF90538C \n"
 589 "    MOV     R0, #1 \n"
 590 "    MOV     R1, R0 \n"
 591 "    MOV     R2, R0 \n"
 592 "    BL      sub_FF9054A4 \n"
 593 
 594 "loc_FF9076D8:\n"
 595 "    LDR     R0, [SP] \n"
 596 "    BL      sub_FF904FD4 \n"
 597 
 598 "loc_FF9076E0:\n"
 599 "    LDR     R3, =0x4A40C \n"
 600 "    MOV     R2, #0 \n"
 601 "    LDR     R0, [R3] \n"
 602 "    MOV     R1, R7 \n"
 603 "    BL      sub_FF820480 /*_ReceiveMessageQueue*/ \n"
 604 "    LDR     R12, [SP] \n"
 605 "    LDR     R2, [R12] \n"
 606 "    CMP     R2, #0x20 \n"
 607 "    BNE     loc_FF9072F4 \n"
 608 "    MOV     R0, R12 \n"
 609 "    BL      sub_FF904FD4 \n"
 610 "    LDR     R3, =0x4A408 \n"
 611 "    MOV     R1, #1 \n"
 612 "    LDR     R0, [R3] \n"
 613 "    BL      sub_FF81FD68 /*_SetEventFlag*/ \n"
 614 "    BL      _ExitTask \n"
 615 "    ADD     SP, SP, #0x14 \n"
 616 "    LDMFD   SP!, {R4-R8,PC} \n"
 617 );
 618 }
 619 
 620 /*************************************************************/
 621 //** sub_FF905B84_my @ 0xFF905B84 - 0xFF905C34, length=45
 622 void __attribute__((naked,noinline)) sub_FF905B84_my() {
 623 asm volatile (
 624 "    STMFD   SP!, {R4,R5,LR} \n"
 625 "    LDR     R3, =0x4A408 \n"
 626 "    MOV     R4, R0 \n"
 627 "    MOV     R1, #0xE \n"
 628 "    LDR     R0, [R3] \n"
 629 "    BL      sub_FF81FF04 /*_ClearEventFlag*/ \n"
 630 "    MOV     R1, #0 \n"
 631 "    LDRSH   R0, [R4, #4] \n"
 632 "    BL      sub_FF9050B0 \n"
 633 "    MOV     R5, R0 \n"
 634 "    LDRSH   R0, [R4, #6] \n"
 635 "    BL      sub_FF905224 \n"
 636 "    LDRSH   R0, [R4, #8] \n"
 637 "    BL      sub_FF9052C0 \n"
 638 "    LDR     R3, [R4] \n"
 639 "    CMP     R3, #9 \n"
 640 "    MOVEQ   R5, #0 \n"
 641 "    CMP     R5, #1 \n"
 642 "    LDR     R1, =0xFF905008 \n"
 643 "    MOV     R2, #2 \n"
 644 "    BNE     loc_FF905BF0 \n"
 645 "    LDRSH   R0, [R4, #4] \n"
 646 "    BL      sub_FFAB609C \n"
 647 "    LDR     R2, =0x4A434 \n"
 648 "    MOV     R3, #0 \n"
 649 "    STR     R3, [R2] \n"
 650 "    B       loc_FF905BF4 \n"
 651 
 652 "loc_FF905BF0:\n"
 653 "    BL      sub_FF90535C \n"
 654 
 655 "loc_FF905BF4:\n"
 656 "    STRH    R0, [R4, #4] \n"
 657 "    LDRSH   R0, [R4, #6] \n"
 658 "    BL      sub_FF8B1C7C_my \n"  // --> Patched. Old value = 0xFF8B1C7C.
 659 "    LDRSH   R0, [R4, #8] \n"
 660 "    MOV     R1, #1 \n"
 661 "    BL      sub_FF8B39A4 \n"
 662 "    MOV     R1, #0 \n"
 663 "    ADD     R0, R4, #8 \n"
 664 "    BL      sub_FF8B3A64 \n"
 665 "    CMP     R5, #1 \n"
 666 "    MOV     R1, #2 \n"
 667 "    MOV     R2, #0 \n"
 668 "    LDMNEFD SP!, {R4,R5,PC} \n"
 669 "    LDR     R3, =0x4A408 \n"
 670 "    LDR     R0, [R3] \n"
 671 "    LDMFD   SP!, {R4,R5,LR} \n"
 672 "    B       sub_FF81FD58 /*_WaitForAllEventFlag*/ \n"
 673 );
 674 }
 675 
 676 /*************************************************************/
 677 //** sub_FF8B1C7C_my @ 0xFF8B1C7C - 0xFF8B1CD8, length=24
 678 void __attribute__((naked,noinline)) sub_FF8B1C7C_my() {
 679 asm volatile (
 680 "    STMFD   SP!, {R4,LR} \n"
 681 "    LDR     R3, =0x5360 \n"
 682 "    LDR     R2, [R3] \n"
 683 "    MOV     R1, #0x114 \n"
 684 "    MOV     R3, R0, LSL#16 \n"
 685 "    CMP     R2, #1 \n"
 686 "    ADD     R1, R1, #1 \n"
 687 "    LDR     R0, =0xFF8B16F8 /*'Shutter.c'*/ \n"
 688 "    MOV     R4, R3, ASR#16 \n"
 689 "    BEQ     loc_FF8B1CA8 \n"
 690 "    BL      _DebugAssert \n"
 691 
 692 "loc_FF8B1CA8:\n"
 693 "    MOV     R1, #0x118 \n"
 694 "    CMN     R4, #0xC00 \n"
 695 "    LDR     R3, =0x3D266 \n"
 696 "    LDR     R0, =0xFF8B16F8 /*'Shutter.c'*/ \n"
 697 "    ADD     R1, R1, #3 \n"
 698 "    LDREQSH R4, [R3] \n"
 699 "    LDRNE   R3, =0x3D266 \n"
 700 "    CMN     R4, #0xC00 \n"
 701 "    STRH    R4, [R3] \n"
 702 "    BNE     loc_FF8B1CD4 \n"
 703 "    BL      _DebugAssert \n"
 704 
 705 "loc_FF8B1CD4:\n"
 706 "    MOV     R0, R4 \n"
 707 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
 708 "    LDR     PC, =0xFF8B1CDC \n"  // Continue in firmware
 709 );
 710 }

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