root/platform/s2is/sub/100f/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF96C034_my
  3. sub_FF96F5A8_my
  4. exp_drv_task
  5. sub_FF90A0E8_my
  6. sub_FF8BACE0_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 NR_ON (1)
   9 #define NR_OFF (0)
  10 
  11 static long *nrflag = (long*)0x5724;
  12 
  13 #include "../../../generic/capt_seq.c"
  14 
  15 
  16 /*************************************************************/
  17 //** capt_seq_task @ 0xFF96C9F0 - 0xFF96CBE0, length=125
  18 void __attribute__((naked,noinline)) capt_seq_task() {
  19 asm volatile (
  20 "    STMFD   SP!, {R4,LR} \n"
  21 "    SUB     SP, SP, #4 \n"
  22 "    MOV     R4, SP \n"
  23 "    B       loc_FF96CBB0 \n"
  24 
  25 "loc_FF96CA00:\n"
  26 "    LDR     R0, [SP] \n"
  27 "    LDR     R3, [R0] \n"
  28 "    CMP     R3, #0x11 \n"
  29 "    LDRLS   PC, [PC, R3, LSL#2] \n"
  30 "    B       loc_FF96CB98 \n"
  31 "    .long   loc_FF96CA5C \n"
  32 "    .long   loc_FF96CA6C \n"
  33 "    .long   loc_FF96CA80 \n"
  34 "    .long   loc_FF96CA90 \n"
  35 "    .long   loc_FF96CAA0 \n"
  36 "    .long   loc_FF96CAB0 \n"
  37 "    .long   loc_FF96CAC4 \n"
  38 "    .long   loc_FF96CAD4 \n"
  39 "    .long   loc_FF96CAE8 \n"
  40 "    .long   loc_FF96CAF8 \n"
  41 "    .long   loc_FF96CB08 \n"
  42 "    .long   loc_FF96CB18 \n"
  43 "    .long   loc_FF96CB28 \n"
  44 "    .long   loc_FF96CB3C \n"
  45 "    .long   loc_FF96CB4C \n"
  46 "    .long   loc_FF96CB5C \n"
  47 "    .long   loc_FF96CB6C \n"
  48 "    .long   loc_FF96CB80 \n"
  49 
  50 "loc_FF96CA5C:\n"
  51 "    BL      sub_FF96D224 \n"
  52 "    LDR     R3, =0x5D0FC \n"
  53 "    MOV     R1, #8 \n"
  54 "    B       loc_FF96CB8C \n"
  55 
  56 "loc_FF96CA6C:\n"
  57 "    BL      sub_FF96D9A8 \n"
  58 "    BL      shooting_expo_param_override\n"   // +
  59 "    BL      sub_FF96A964 \n"
  60 "    LDR     R3, =0x5D0FC \n"
  61 "    MOV     R1, #0x10 \n"
  62 "    B       loc_FF96CB8C \n"
  63 
  64 "loc_FF96CA80:\n"
  65 "    BL      sub_FF96C034_my \n"  // --> Patched. Old value = 0xFF96C034.
  66 "    LDR     R3, =0x5D0FC \n"
  67 "    MOV     R1, #2 \n"
  68 "    B       loc_FF96CB8C \n"
  69 
  70 "loc_FF96CA90:\n"
  71 "    BL      sub_FF96DFB8 \n"
  72 "    LDR     R3, =0x5D0FC \n"
  73 "    MOV     R1, #1 \n"
  74 "    B       loc_FF96CB8C \n"
  75 
  76 "loc_FF96CAA0:\n"
  77 "    BL      sub_FF96DA58 \n"
  78 "    LDR     R3, =0x5D0FC \n"
  79 "    MOV     R1, #0x20 \n"
  80 "    B       loc_FF96CB8C \n"
  81 
  82 "loc_FF96CAB0:\n"
  83 "    BL      sub_FF96DB50 \n"
  84 "    BL      sub_FF96A964 \n"
  85 "    LDR     R3, =0x5D0FC \n"
  86 "    MOV     R1, #0x40 \n"
  87 "    B       loc_FF96CB8C \n"
  88 
  89 "loc_FF96CAC4:\n"
  90 "    BL      sub_FF96C218 \n"
  91 "    LDR     R3, =0x5D0FC \n"
  92 "    MOV     R1, #0x80 \n"
  93 "    B       loc_FF96CB8C \n"
  94 
  95 "loc_FF96CAD4:\n"
  96 "    BL      sub_FF96DCC8 \n"
  97 "    BL      sub_FF96A964 \n"
  98 "    LDR     R3, =0x5D0FC \n"
  99 "    MOV     R1, #0x400 \n"
 100 "    B       loc_FF96CB8C \n"
 101 
 102 "loc_FF96CAE8:\n"
 103 "    BL      sub_FF96DA58 \n"
 104 "    LDR     R3, =0x5D0FC \n"
 105 "    MOV     R1, #0x800 \n"
 106 "    B       loc_FF96CB8C \n"
 107 
 108 "loc_FF96CAF8:\n"
 109 "    BL      sub_FF96E7F4 \n"
 110 "    LDR     R3, =0x5D0FC \n"
 111 "    MOV     R1, #0x8000 \n"
 112 "    B       loc_FF96CB8C \n"
 113 
 114 "loc_FF96CB08:\n"
 115 "    BL      sub_FF96EBD0 \n"
 116 "    LDR     R3, =0x5D0FC \n"
 117 "    MOV     R1, #0x10000 \n"
 118 "    B       loc_FF96CB8C \n"
 119 
 120 "loc_FF96CB18:\n"
 121 "    BL      sub_FF96EAEC \n"
 122 "    LDR     R3, =0x5D0FC \n"
 123 "    MOV     R1, #0x20000 \n"
 124 "    B       loc_FF96CB8C \n"
 125 
 126 "loc_FF96CB28:\n"
 127 "    MOV     R0, #0 \n"
 128 "    BL      sub_FF96EC88 \n"
 129 "    LDR     R3, =0x5D0FC \n"
 130 "    MOV     R1, #0x40000 \n"
 131 "    B       loc_FF96CB8C \n"
 132 
 133 "loc_FF96CB3C:\n"
 134 "    BL      sub_FF96EF94 \n"
 135 "    LDR     R3, =0x5D0FC \n"
 136 "    MOV     R1, #0x80000 \n"
 137 "    B       loc_FF96CB8C \n"
 138 
 139 "loc_FF96CB4C:\n"
 140 "    BL      sub_FF96F00C \n"
 141 "    LDR     R3, =0x5D0FC \n"
 142 "    MOV     R1, #0x100000 \n"
 143 "    B       loc_FF96CB8C \n"
 144 
 145 "loc_FF96CB5C:\n"
 146 "    BL      sub_FF96F058 \n"
 147 "    LDR     R3, =0x5D0FC \n"
 148 "    MOV     R1, #0x200000 \n"
 149 "    B       loc_FF96CB8C \n"
 150 
 151 "loc_FF96CB6C:\n"
 152 "    MOV     R0, #1 \n"
 153 "    BL      sub_FF96EC88 \n"
 154 "    LDR     R3, =0x5D0FC \n"
 155 "    MOV     R1, #0x400000 \n"
 156 "    B       loc_FF96CB8C \n"
 157 
 158 "loc_FF96CB80:\n"
 159 "    BL      sub_FF96F0C0 \n"
 160 "    LDR     R3, =0x5D0FC \n"
 161 "    MOV     R1, #0x800000 \n"
 162 
 163 "loc_FF96CB8C:\n"
 164 "    LDR     R0, [R3] \n"
 165 "    BL      sub_FF82072C /*_SetEventFlag*/ \n"
 166 "    B       loc_FF96CBA8 \n"
 167 
 168 "loc_FF96CB98:\n"
 169 "    MOV     R1, #0x374 \n"
 170 "    LDR     R0, =0xFF96BCE4 /*'CaptSeq.c'*/ \n"
 171 "    ADD     R1, R1, #2 \n"
 172 "    BL      _DebugAssert \n"
 173 
 174 "loc_FF96CBA8:\n"
 175 "    LDR     R0, [SP] \n"
 176 "    BL      sub_FF96BD64 \n"
 177 
 178 "loc_FF96CBB0:\n"
 179 "    LDR     R3, =0x5D100 \n"
 180 "    MOV     R1, R4 \n"
 181 "    LDR     R0, [R3] \n"
 182 "    MOV     R2, #0 \n"
 183 "    BL      sub_FF820F34 /*_ReceiveMessageQueue*/ \n"
 184 "    TST     R0, #1 \n"
 185 "    BEQ     loc_FF96CA00 \n"
 186 "    LDR     R0, =0xFF96BCE4 /*'CaptSeq.c'*/ \n"
 187 "    MOV     R1, #0x2EC \n"
 188 "    BL      _DebugAssert \n"
 189 "    BL      _ExitTask \n"
 190 "    ADD     SP, SP, #4 \n"
 191 "    LDMFD   SP!, {R4,PC} \n"
 192 );
 193 }
 194 
 195 /*************************************************************/
 196 //** sub_FF96C034_my @ 0xFF96C034 - 0xFF96C0EC, length=47
 197 void __attribute__((naked,noinline)) sub_FF96C034_my() {
 198 asm volatile (
 199 "    STMFD   SP!, {R4-R6,LR} \n"
 200 "    LDR     R5, [R0, #8] \n"
 201 "    BL      sub_FF97AE20 \n"
 202 "    CMP     R0, #0 \n"
 203 "    LDR     R0, =0xFF96C010 /*'StrbCtrl::ChargeIsNotCompleted.\r\n'*/ \n"
 204 "    BNE     loc_FF96C054 \n"
 205 "    BL      sub_FFAF21BC \n"
 206 "    BL      sub_FF97AE2C \n"
 207 
 208 "loc_FF96C054:\n"
 209 "    BL      sub_FF96A094 \n"
 210 "    ADD     R3, R5, R5, LSL#1 \n"
 211 "    RSB     R3, R5, R3, LSL#3 \n"
 212 "    MOV     R6, R3, LSL#2 \n"
 213 "    ADD     R0, R6, R0 \n"
 214 "    LDR     R3, [R0, #8] \n"
 215 "    CMP     R3, #0 \n"
 216 "    BEQ     loc_FF96C078 \n"
 217 "    BL      sub_FF953B70 \n"
 218 
 219 "loc_FF96C078:\n"
 220 "    MOV     R0, R5 \n"
 221 "    BL      sub_FF96E054 \n"
 222 "    TST     R0, #1 \n"
 223 "    MOV     R2, R5 \n"
 224 "    MOV     R1, #1 \n"
 225 "    BEQ     loc_FF96C098 \n"
 226 "    LDMFD   SP!, {R4-R6,LR} \n"
 227 "    B       sub_FF96ADF4 \n"
 228 
 229 "loc_FF96C098:\n"
 230 "    BL      sub_FF96A094 \n"
 231 "    MOV     R4, R0 \n"
 232 "    BL      sub_FF825F00 \n"
 233 "    ADD     R4, R6, R4 \n"
 234 "    STR     R0, [R4, #4] \n"
 235 "    MOV     R0, R5 \n"
 236 "    BL      sub_FF96FEEC \n"
 237 "    BL      sub_FF96E6B0 \n"
 238 "    BL      sub_FF96E61C \n"
 239 "    MOV     R0, R5 \n"
 240 "    BL      sub_FF96F5A8_my \n"  // --> Patched. Old value = 0xFF96F5A8.
 241 "    BL      capt_seq_hook_raw_here\n"   // +
 242 "    MOV     R2, R5 \n"
 243 "    MOV     R1, #1 \n"
 244 "    BL      sub_FF96ADF4 \n"
 245 "    BL      sub_FF96F86C \n"
 246 "    BL      sub_FF96A094 \n"
 247 "    ADD     R0, R6, R0 \n"
 248 "    LDR     R3, [R0, #8] \n"
 249 "    CMP     R3, #0 \n"
 250 "    LDMEQFD SP!, {R4-R6,PC} \n"
 251 "    LDMFD   SP!, {R4-R6,LR} \n"
 252 "    B       sub_FF953BAC \n"
 253 );
 254 }
 255 
 256 /*************************************************************/
 257 //** sub_FF96F5A8_my @ 0xFF96F5A8 - 0xFF96F5EC, length=18
 258 void __attribute__((naked,noinline)) sub_FF96F5A8_my() {
 259 asm volatile (
 260 "    STMFD   SP!, {R4-R8,LR} \n"
 261 "    LDR     R3, =0x571C \n"
 262 "    SUB     SP, SP, #4 \n"
 263 "    LDR     R2, [R3] \n"
 264 "    LDR     R4, =0x5720 \n"
 265 "    CMP     R2, #0 \n"
 266 "    STR     R0, [R4] \n"
 267 "    MOV     R8, #0 \n"
 268 "    LDR     R6, =0xFF96F4E0 \n"
 269 "    BNE     loc_FF96F5DC \n"
 270 "    LDR     R0, =0xFF96F59C /*'MainCapt.c'*/ \n"
 271 "    MOV     R1, #0xDB \n"
 272 "    BL      _DebugAssert \n"
 273 
 274 "loc_FF96F5DC:\n"
 275 "    LDR     R3, =0x5D164 \n"
 276 "    MVN     R1, #0 \n"
 277 "    LDR     R0, [R3] \n"
 278 "    BL      sub_FF8208C8 /*_ClearEventFlag*/ \n"
 279 "    BL      sub_FF96F518 \n"
 280 "    BL      wait_until_remote_button_is_released\n"
 281 "    BL      capt_seq_hook_set_nr\n"
 282 "    LDR     PC, =0xFF96F5F0 \n"  // Continue in firmware
 283 );
 284 }
 285 
 286 /*************************************************************/
 287 //** exp_drv_task @ 0xFF90B2B0 - 0xFF90B5E0, length=205
 288 void __attribute__((naked,noinline)) exp_drv_task() {
 289 asm volatile (
 290 "    STMFD   SP!, {R4-R8,LR} \n"
 291 "    SUB     SP, SP, #0x14 \n"
 292 "    MOV     R7, SP \n"
 293 "    B       loc_FF90B59C \n"
 294 
 295 "loc_FF90B2C0:\n"
 296 "    CMP     R2, #0x18 \n"
 297 "    BNE     loc_FF90B2D8 \n"
 298 "    LDR     R0, [R12, #0x34] \n"
 299 "    MOV     LR, PC \n"
 300 "    LDR     PC, [R12, #0x30] \n"
 301 "    B       loc_FF90B308 \n"
 302 
 303 "loc_FF90B2D8:\n"
 304 "    CMP     R2, #0x16 \n"
 305 "    BNE     loc_FF90B2E8 \n"
 306 "    BL      sub_FFA95704 \n"
 307 "    B       loc_FF90B2F8 \n"
 308 
 309 "loc_FF90B2E8:\n"
 310 "    CMP     R2, #0x17 \n"
 311 "    BNE     loc_FF90B314 \n"
 312 "    BL      sub_FF8BB048 \n"
 313 "    BL      sub_FF8BCEE8 \n"
 314 
 315 "loc_FF90B2F8:\n"
 316 "    LDR     R3, [SP] \n"
 317 "    LDR     R0, [R3, #0x34] \n"
 318 "    MOV     LR, PC \n"
 319 "    LDR     PC, [R3, #0x30] \n"
 320 
 321 "loc_FF90B308:\n"
 322 "    LDR     R0, [SP] \n"
 323 "    BL      sub_FF909664 \n"
 324 "    B       loc_FF90B59C \n"
 325 
 326 "loc_FF90B314:\n"
 327 "    CMP     R2, #0xC \n"
 328 "    MOV     R8, #1 \n"
 329 "    BNE     loc_FF90B384 \n"
 330 "    LDR     R1, [R12, #0x24] \n"
 331 "    ADD     R1, R1, R1, LSL#1 \n"
 332 "    ADD     R1, R12, R1, LSL#1 \n"
 333 "    ADD     R6, SP, #0xC \n"
 334 "    SUB     R1, R1, #2 \n"
 335 "    MOV     R2, #6 \n"
 336 "    MOV     R0, R6 \n"
 337 "    BL      _memcpy \n"
 338 "    LDR     R0, [SP] \n"
 339 "    BL      sub_FF90A8D8 \n"
 340 "    LDR     R3, [SP] \n"
 341 "    LDR     R1, [R3, #0x24] \n"
 342 "    LDR     R2, [R3, #0x34] \n"
 343 "    ADD     R0, R3, #4 \n"
 344 "    MOV     LR, PC \n"
 345 "    LDR     PC, [R3, #0x30] \n"
 346 "    LDR     R0, [SP] \n"
 347 "    BL      sub_FF90AA5C \n"
 348 "    LDR     R3, [SP] \n"
 349 "    ADD     R0, R3, #4 \n"
 350 "    LDR     R1, [R3, #0x24] \n"
 351 "    LDR     R2, [R3, #0x3C] \n"
 352 "    MOV     LR, PC \n"
 353 "    LDR     PC, [R3, #0x38] \n"
 354 "    B       loc_FF90B54C \n"
 355 
 356 "loc_FF90B384:\n"
 357 "    SUB     R3, R2, #0xD \n"
 358 "    CMP     R3, #1 \n"
 359 "    BHI     loc_FF90B404 \n"
 360 "    ADD     R6, SP, #0xC \n"
 361 "    ADD     R5, SP, #4 \n"
 362 "    MOV     R0, R12 \n"
 363 "    MOV     R1, R6 \n"
 364 "    MOV     R2, R5 \n"
 365 "    BL      sub_FF90AAD8 \n"
 366 "    MOV     R4, R0 \n"
 367 "    CMP     R4, #3 \n"
 368 "    CMPNE   R4, #1 \n"
 369 "    BNE     loc_FF90B3E4 \n"
 370 "    LDR     R12, [SP] \n"
 371 "    MOV     R0, R5 \n"
 372 "    LDR     R1, [R12, #0x24] \n"
 373 "    MOV     R2, R4 \n"
 374 "    LDR     R3, [R12, #0x34] \n"
 375 "    MOV     LR, PC \n"
 376 "    LDR     PC, [R12, #0x30] \n"
 377 "    MOV     R1, R4 \n"
 378 "    LDR     R0, [SP] \n"
 379 "    BL      sub_FF90B290 \n"
 380 "    B       loc_FF90B54C \n"
 381 
 382 "loc_FF90B3E4:\n"
 383 "    LDR     R12, [SP] \n"
 384 "    MOV     R2, R4 \n"
 385 "    ADD     R0, R12, #4 \n"
 386 "    LDR     R1, [R12, #0x24] \n"
 387 "    LDR     R3, [R12, #0x34] \n"
 388 "    MOV     LR, PC \n"
 389 "    LDR     PC, [R12, #0x30] \n"
 390 "    B       loc_FF90B54C \n"
 391 
 392 "loc_FF90B404:\n"
 393 "    CMP     R2, #0x14 \n"
 394 "    BNE     loc_FF90B458 \n"
 395 "    LDR     R1, [R12, #0x24] \n"
 396 "    ADD     R1, R1, R1, LSL#1 \n"
 397 "    ADD     R1, R12, R1, LSL#1 \n"
 398 "    ADD     R6, SP, #0xC \n"
 399 "    SUB     R1, R1, #2 \n"
 400 "    MOV     R2, #6 \n"
 401 "    MOV     R0, R6 \n"
 402 "    BL      _memcpy \n"
 403 "    LDR     R0, [SP] \n"
 404 "    BL      sub_FF90A3B0 \n"
 405 "    LDR     R3, [SP] \n"
 406 "    ADD     R0, R3, #4 \n"
 407 "    LDR     R1, [R3, #0x24] \n"
 408 "    LDR     R2, [R3, #0x34] \n"
 409 "    MOV     LR, PC \n"
 410 "    LDR     PC, [R3, #0x30] \n"
 411 "    LDR     R0, [SP] \n"
 412 "    BL      sub_FF90A608 \n"
 413 "    B       loc_FF90B54C \n"
 414 
 415 "loc_FF90B458:\n"
 416 "    ADD     R6, SP, #0xC \n"
 417 "    ADD     R1, R12, #4 \n"
 418 "    MOV     R0, R6 \n"
 419 "    MOV     R2, #6 \n"
 420 "    BL      _memcpy \n"
 421 "    LDR     R12, [SP] \n"
 422 "    LDR     R3, [R12] \n"
 423 "    MOV     R0, R12 \n"
 424 "    CMP     R3, #0x15 \n"
 425 "    LDRLS   PC, [PC, R3, LSL#2] \n"
 426 "    B       loc_FF90B538 \n"
 427 "    .long   loc_FF90B4DC \n"
 428 "    .long   loc_FF90B4E4 \n"
 429 "    .long   loc_FF90B4EC \n"
 430 "    .long   loc_FF90B4EC \n"
 431 "    .long   loc_FF90B4DC \n"
 432 "    .long   loc_FF90B4E4 \n"
 433 "    .long   loc_FF90B4EC \n"
 434 "    .long   loc_FF90B4EC \n"
 435 "    .long   loc_FF90B504 \n"
 436 "    .long   loc_FF90B504 \n"
 437 "    .long   loc_FF90B528 \n"
 438 "    .long   loc_FF90B530 \n"
 439 "    .long   loc_FF90B538 \n"
 440 "    .long   loc_FF90B538 \n"
 441 "    .long   loc_FF90B538 \n"
 442 "    .long   loc_FF90B4F4 \n"
 443 "    .long   loc_FF90B4FC \n"
 444 "    .long   loc_FF90B510 \n"
 445 "    .long   loc_FF90B518 \n"
 446 "    .long   loc_FF90B518 \n"
 447 "    .long   loc_FF90B538 \n"
 448 "    .long   loc_FF90B520 \n"
 449 
 450 "loc_FF90B4DC:\n"
 451 "    BL      sub_FF909B20 \n"
 452 "    B       loc_FF90B534 \n"
 453 
 454 "loc_FF90B4E4:\n"
 455 "    BL      sub_FF909C5C \n"
 456 "    B       loc_FF90B534 \n"
 457 
 458 "loc_FF90B4EC:\n"
 459 "    BL      sub_FF909D8C \n"
 460 "    B       loc_FF90B534 \n"
 461 
 462 "loc_FF90B4F4:\n"
 463 "    BL      sub_FF909F60 \n"
 464 "    B       loc_FF90B534 \n"
 465 
 466 "loc_FF90B4FC:\n"
 467 "    BL      sub_FF90A024 \n"
 468 "    B       loc_FF90B534 \n"
 469 
 470 "loc_FF90B504:\n"
 471 "    BL      sub_FF90A0E8_my \n"  // --> Patched. Old value = 0xFF90A0E8.
 472 "    MOV     R8, #0 \n"
 473 "    B       loc_FF90B534 \n"
 474 
 475 "loc_FF90B510:\n"
 476 "    BL      sub_FF90A1AC \n"
 477 "    B       loc_FF90B534 \n"
 478 
 479 "loc_FF90B518:\n"
 480 "    BL      sub_FF90A294 \n"
 481 "    B       loc_FF90B534 \n"
 482 
 483 "loc_FF90B520:\n"
 484 "    BL      sub_FF90A698 \n"
 485 "    B       loc_FF90B534 \n"
 486 
 487 "loc_FF90B528:\n"
 488 "    BL      sub_FF90A76C \n"
 489 "    B       loc_FF90B534 \n"
 490 
 491 "loc_FF90B530:\n"
 492 "    BL      sub_FF90A858 \n"
 493 
 494 "loc_FF90B534:\n"
 495 "    LDR     R12, [SP] \n"
 496 
 497 "loc_FF90B538:\n"
 498 "    ADD     R0, R12, #4 \n"
 499 "    LDR     R1, [R12, #0x24] \n"
 500 "    LDR     R2, [R12, #0x34] \n"
 501 "    MOV     LR, PC \n"
 502 "    LDR     PC, [R12, #0x30] \n"
 503 
 504 "loc_FF90B54C:\n"
 505 "    CMP     R8, #1 \n"
 506 "    BNE     loc_FF90B574 \n"
 507 "    LDR     R1, [SP] \n"
 508 "    LDR     R3, [R1, #0x24] \n"
 509 "    ADD     R3, R3, R3, LSL#1 \n"
 510 "    ADD     R1, R1, R3, LSL#1 \n"
 511 "    MOV     R0, R6 \n"
 512 "    SUB     R1, R1, #2 \n"
 513 "    BL      sub_FF9099DC \n"
 514 "    B       loc_FF90B594 \n"
 515 
 516 "loc_FF90B574:\n"
 517 "    MOV     R0, #1 \n"
 518 "    MOV     R1, R0 \n"
 519 "    MOV     R2, R0 \n"
 520 "    BL      sub_FF909980 \n"
 521 "    MOV     R0, #1 \n"
 522 "    MOV     R1, R0 \n"
 523 "    MOV     R2, R0 \n"
 524 "    BL      sub_FF909A98 \n"
 525 
 526 "loc_FF90B594:\n"
 527 "    LDR     R0, [SP] \n"
 528 "    BL      sub_FF909664 \n"
 529 
 530 "loc_FF90B59C:\n"
 531 "    LDR     R3, =0x38A90 \n"
 532 "    MOV     R2, #0 \n"
 533 "    LDR     R0, [R3] \n"
 534 "    MOV     R1, R7 \n"
 535 "    BL      sub_FF820F34 /*_ReceiveMessageQueue*/ \n"
 536 "    LDR     R12, [SP] \n"
 537 "    LDR     R2, [R12] \n"
 538 "    CMP     R2, #0x19 \n"
 539 "    BNE     loc_FF90B2C0 \n"
 540 "    MOV     R0, R12 \n"
 541 "    BL      sub_FF909664 \n"
 542 "    LDR     R3, =0x38A8C \n"
 543 "    MOV     R1, #1 \n"
 544 "    LDR     R0, [R3] \n"
 545 "    BL      sub_FF82072C /*_SetEventFlag*/ \n"
 546 "    BL      _ExitTask \n"
 547 "    ADD     SP, SP, #0x14 \n"
 548 "    LDMFD   SP!, {R4-R8,PC} \n"
 549 );
 550 }
 551 
 552 /*************************************************************/
 553 //** sub_FF90A0E8_my @ 0xFF90A0E8 - 0xFF90A19C, length=46
 554 void __attribute__((naked,noinline)) sub_FF90A0E8_my() {
 555 asm volatile (
 556 "    STMFD   SP!, {R4,R5,LR} \n"
 557 "    LDR     R3, =0x38A8C \n"
 558 "    MOV     R4, R0 \n"
 559 "    MOV     R1, #0xE \n"
 560 "    LDR     R0, [R3] \n"
 561 "    BL      sub_FF8208C8 /*_ClearEventFlag*/ \n"
 562 "    MOV     R1, #0 \n"
 563 "    LDRSH   R0, [R4, #4] \n"
 564 "    BL      sub_FF9096E8 \n"
 565 "    MOV     R5, R0 \n"
 566 "    LDRSH   R0, [R4, #6] \n"
 567 "    BL      sub_FF909818 \n"
 568 "    LDRSH   R0, [R4, #8] \n"
 569 "    BL      sub_FF9098B4 \n"
 570 "    LDR     R3, [R4] \n"
 571 "    CMP     R3, #9 \n"
 572 "    MOVEQ   R5, #0 \n"
 573 "    CMP     R5, #1 \n"
 574 "    LDR     R1, =0xFF909694 \n"
 575 "    MOV     R2, #2 \n"
 576 "    BNE     loc_FF90A154 \n"
 577 "    LDRSH   R0, [R4, #4] \n"
 578 "    BL      sub_FFA94D20 \n"
 579 "    LDR     R2, =0x38AB8 \n"
 580 "    MOV     R3, #0 \n"
 581 "    STR     R3, [R2] \n"
 582 "    B       loc_FF90A158 \n"
 583 
 584 "loc_FF90A154:\n"
 585 "    BL      sub_FF909950 \n"
 586 
 587 "loc_FF90A158:\n"
 588 "    STRH    R0, [R4, #4] \n"
 589 "    LDRSH   R0, [R4, #6] \n"
 590 "    BL      sub_FF8BACE0_my \n"  // --> Patched. Old value = 0xFF8BACE0.
 591 "    BL      sub_FF8BCC8C \n"
 592 "    MOV     R1, R0 \n"
 593 "    LDRSH   R0, [R4, #8] \n"
 594 "    BL      sub_FF8BCAA8 \n"
 595 "    MOV     R1, #0 \n"
 596 "    ADD     R0, R4, #8 \n"
 597 "    BL      sub_FF8BCB6C \n"
 598 "    CMP     R5, #1 \n"
 599 "    MOV     R1, #2 \n"
 600 "    MOV     R2, #0 \n"
 601 "    LDMNEFD SP!, {R4,R5,PC} \n"
 602 "    LDR     R3, =0x38A8C \n"
 603 "    LDR     R0, [R3] \n"
 604 "    LDMFD   SP!, {R4,R5,LR} \n"
 605 "    B       sub_FF82071C /*_WaitForAllEventFlag*/ \n"
 606 );
 607 }
 608 
 609 /*************************************************************/
 610 //** sub_FF8BACE0_my @ 0xFF8BACE0 - 0xFF8BAD38, length=23
 611 void __attribute__((naked,noinline)) sub_FF8BACE0_my() {
 612 asm volatile (
 613 "    STMFD   SP!, {R4,LR} \n"
 614 "    LDR     R3, =0x3968 \n"
 615 "    LDR     R2, [R3] \n"
 616 "    MOV     R3, R0, LSL#16 \n"
 617 "    CMP     R2, #1 \n"
 618 "    MOV     R1, #0x110 \n"
 619 "    LDR     R0, =0xFF8BA67C /*'Shutter.c'*/ \n"
 620 "    MOV     R4, R3, ASR#16 \n"
 621 "    BEQ     loc_FF8BAD08 \n"
 622 "    BL      _DebugAssert \n"
 623 
 624 "loc_FF8BAD08:\n"
 625 "    MOV     R1, #0x114 \n"
 626 "    CMN     R4, #0xC00 \n"
 627 "    LDR     R3, =0x2EE6E \n"
 628 "    LDR     R0, =0xFF8BA67C /*'Shutter.c'*/ \n"
 629 "    ADD     R1, R1, #2 \n"
 630 "    LDREQSH R4, [R3] \n"
 631 "    LDRNE   R3, =0x2EE6E \n"
 632 "    CMN     R4, #0xC00 \n"
 633 "    STRH    R4, [R3] \n"
 634 "    BNE     loc_FF8BAD34 \n"
 635 "    BL      _DebugAssert \n"
 636 
 637 "loc_FF8BAD34:\n"
 638 "    MOV     R0, R4 \n"
 639 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
 640 "    LDR     PC, =0xFF8BAD3C \n"  // Continue in firmware
 641 );
 642 }

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