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

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF96BDC0_my
  3. sub_FF96F334_my
  4. exp_drv_task
  5. sub_FF909E74_my
  6. sub_FF8BAA6C_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*)0x5754;
  12 
  13 #include "../../../generic/capt_seq.c"
  14 
  15 
  16 /*************************************************************/
  17 //** capt_seq_task @ 0xFF96C77C - 0xFF96C96C, 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_FF96C93C \n"
  24 
  25 "loc_FF96C78C:\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_FF96C924 \n"
  31 "    .long   loc_FF96C7E8 \n"
  32 "    .long   loc_FF96C7F8 \n"
  33 "    .long   loc_FF96C80C \n"
  34 "    .long   loc_FF96C81C \n"
  35 "    .long   loc_FF96C82C \n"
  36 "    .long   loc_FF96C83C \n"
  37 "    .long   loc_FF96C850 \n"
  38 "    .long   loc_FF96C860 \n"
  39 "    .long   loc_FF96C874 \n"
  40 "    .long   loc_FF96C884 \n"
  41 "    .long   loc_FF96C894 \n"
  42 "    .long   loc_FF96C8A4 \n"
  43 "    .long   loc_FF96C8B4 \n"
  44 "    .long   loc_FF96C8C8 \n"
  45 "    .long   loc_FF96C8D8 \n"
  46 "    .long   loc_FF96C8E8 \n"
  47 "    .long   loc_FF96C8F8 \n"
  48 "    .long   loc_FF96C90C \n"
  49 
  50 "loc_FF96C7E8:\n"
  51 "    BL      sub_FF96CFB0 \n"
  52 "    LDR     R3, =0x5D11C \n"
  53 "    MOV     R1, #8 \n"
  54 "    B       loc_FF96C918 \n"
  55 
  56 "loc_FF96C7F8:\n"
  57 "    BL      sub_FF96D734 \n"
  58 "    BL      shooting_expo_param_override\n"   // +
  59 "    BL      sub_FF96A6F0 \n"
  60 "    LDR     R3, =0x5D11C \n"
  61 "    MOV     R1, #0x10 \n"
  62 "    B       loc_FF96C918 \n"
  63 
  64 "loc_FF96C80C:\n"
  65 "    BL      sub_FF96BDC0_my \n"  // --> Patched. Old value = 0xFF96BDC0.
  66 "    LDR     R3, =0x5D11C \n"
  67 "    MOV     R1, #2 \n"
  68 "    B       loc_FF96C918 \n"
  69 
  70 "loc_FF96C81C:\n"
  71 "    BL      sub_FF96DD44 \n"
  72 "    LDR     R3, =0x5D11C \n"
  73 "    MOV     R1, #1 \n"
  74 "    B       loc_FF96C918 \n"
  75 
  76 "loc_FF96C82C:\n"
  77 "    BL      sub_FF96D7E4 \n"
  78 "    LDR     R3, =0x5D11C \n"
  79 "    MOV     R1, #0x20 \n"
  80 "    B       loc_FF96C918 \n"
  81 
  82 "loc_FF96C83C:\n"
  83 "    BL      sub_FF96D8DC \n"
  84 "    BL      sub_FF96A6F0 \n"
  85 "    LDR     R3, =0x5D11C \n"
  86 "    MOV     R1, #0x40 \n"
  87 "    B       loc_FF96C918 \n"
  88 
  89 "loc_FF96C850:\n"
  90 "    BL      sub_FF96BFA4 \n"
  91 "    LDR     R3, =0x5D11C \n"
  92 "    MOV     R1, #0x80 \n"
  93 "    B       loc_FF96C918 \n"
  94 
  95 "loc_FF96C860:\n"
  96 "    BL      sub_FF96DA54 \n"
  97 "    BL      sub_FF96A6F0 \n"
  98 "    LDR     R3, =0x5D11C \n"
  99 "    MOV     R1, #0x400 \n"
 100 "    B       loc_FF96C918 \n"
 101 
 102 "loc_FF96C874:\n"
 103 "    BL      sub_FF96D7E4 \n"
 104 "    LDR     R3, =0x5D11C \n"
 105 "    MOV     R1, #0x800 \n"
 106 "    B       loc_FF96C918 \n"
 107 
 108 "loc_FF96C884:\n"
 109 "    BL      sub_FF96E580 \n"
 110 "    LDR     R3, =0x5D11C \n"
 111 "    MOV     R1, #0x8000 \n"
 112 "    B       loc_FF96C918 \n"
 113 
 114 "loc_FF96C894:\n"
 115 "    BL      sub_FF96E95C \n"
 116 "    LDR     R3, =0x5D11C \n"
 117 "    MOV     R1, #0x10000 \n"
 118 "    B       loc_FF96C918 \n"
 119 
 120 "loc_FF96C8A4:\n"
 121 "    BL      sub_FF96E878 \n"
 122 "    LDR     R3, =0x5D11C \n"
 123 "    MOV     R1, #0x20000 \n"
 124 "    B       loc_FF96C918 \n"
 125 
 126 "loc_FF96C8B4:\n"
 127 "    MOV     R0, #0 \n"
 128 "    BL      sub_FF96EA14 \n"
 129 "    LDR     R3, =0x5D11C \n"
 130 "    MOV     R1, #0x40000 \n"
 131 "    B       loc_FF96C918 \n"
 132 
 133 "loc_FF96C8C8:\n"
 134 "    BL      sub_FF96ED20 \n"
 135 "    LDR     R3, =0x5D11C \n"
 136 "    MOV     R1, #0x80000 \n"
 137 "    B       loc_FF96C918 \n"
 138 
 139 "loc_FF96C8D8:\n"
 140 "    BL      sub_FF96ED98 \n"
 141 "    LDR     R3, =0x5D11C \n"
 142 "    MOV     R1, #0x100000 \n"
 143 "    B       loc_FF96C918 \n"
 144 
 145 "loc_FF96C8E8:\n"
 146 "    BL      sub_FF96EDE4 \n"
 147 "    LDR     R3, =0x5D11C \n"
 148 "    MOV     R1, #0x200000 \n"
 149 "    B       loc_FF96C918 \n"
 150 
 151 "loc_FF96C8F8:\n"
 152 "    MOV     R0, #1 \n"
 153 "    BL      sub_FF96EA14 \n"
 154 "    LDR     R3, =0x5D11C \n"
 155 "    MOV     R1, #0x400000 \n"
 156 "    B       loc_FF96C918 \n"
 157 
 158 "loc_FF96C90C:\n"
 159 "    BL      sub_FF96EE4C \n"
 160 "    LDR     R3, =0x5D11C \n"
 161 "    MOV     R1, #0x800000 \n"
 162 
 163 "loc_FF96C918:\n"
 164 "    LDR     R0, [R3] \n"
 165 "    BL      sub_FF82072C /*_SetEventFlag*/ \n"
 166 "    B       loc_FF96C934 \n"
 167 
 168 "loc_FF96C924:\n"
 169 "    MOV     R1, #0x374 \n"
 170 "    LDR     R0, =0xFF96BA70 /*'CaptSeq.c'*/ \n"
 171 "    ADD     R1, R1, #2 \n"
 172 "    BL      _DebugAssert \n"
 173 
 174 "loc_FF96C934:\n"
 175 "    LDR     R0, [SP] \n"
 176 "    BL      sub_FF96BAF0 \n"
 177 
 178 "loc_FF96C93C:\n"
 179 "    LDR     R3, =0x5D120 \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_FF96C78C \n"
 186 "    LDR     R0, =0xFF96BA70 /*'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_FF96BDC0_my @ 0xFF96BDC0 - 0xFF96BE78, length=47
 197 void __attribute__((naked,noinline)) sub_FF96BDC0_my() {
 198 asm volatile (
 199 "    STMFD   SP!, {R4-R6,LR} \n"
 200 "    LDR     R5, [R0, #8] \n"
 201 "    BL      sub_FF97ABAC \n"
 202 "    CMP     R0, #0 \n"
 203 "    LDR     R0, =0xFF96BD9C /*'StrbCtrl::ChargeIsNotCompleted.\r\n'*/ \n"
 204 "    BNE     loc_FF96BDE0 \n"
 205 "    BL      sub_FFAF1F48 \n"
 206 "    BL      sub_FF97ABB8 \n"
 207 
 208 "loc_FF96BDE0:\n"
 209 "    BL      sub_FF969E20 \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_FF96BE04 \n"
 217 "    BL      sub_FF9538FC \n"
 218 
 219 "loc_FF96BE04:\n"
 220 "    MOV     R0, R5 \n"
 221 "    BL      sub_FF96DDE0 \n"
 222 "    TST     R0, #1 \n"
 223 "    MOV     R2, R5 \n"
 224 "    MOV     R1, #1 \n"
 225 "    BEQ     loc_FF96BE24 \n"
 226 "    LDMFD   SP!, {R4-R6,LR} \n"
 227 "    B       sub_FF96AB80 \n"
 228 
 229 "loc_FF96BE24:\n"
 230 "    BL      sub_FF969E20 \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_FF96FC78 \n"
 237 "    BL      sub_FF96E43C \n"
 238 "    BL      sub_FF96E3A8 \n"
 239 "    MOV     R0, R5 \n"
 240 "    BL      sub_FF96F334_my \n"  // --> Patched. Old value = 0xFF96F334.
 241 "    BL      capt_seq_hook_raw_here\n"   // +
 242 "    MOV     R2, R5 \n"
 243 "    MOV     R1, #1 \n"
 244 "    BL      sub_FF96AB80 \n"
 245 "    BL      sub_FF96F5F8 \n"
 246 "    BL      sub_FF969E20 \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_FF953938 \n"
 253 );
 254 }
 255 
 256 /*************************************************************/
 257 //** sub_FF96F334_my @ 0xFF96F334 - 0xFF96F378, length=18
 258 void __attribute__((naked,noinline)) sub_FF96F334_my() {
 259 asm volatile (
 260 "    STMFD   SP!, {R4-R8,LR} \n"
 261 "    LDR     R3, =0x574C \n"
 262 "    SUB     SP, SP, #4 \n"
 263 "    LDR     R2, [R3] \n"
 264 "    LDR     R4, =0x5750 \n"
 265 "    CMP     R2, #0 \n"
 266 "    STR     R0, [R4] \n"
 267 "    MOV     R8, #0 \n"
 268 "    LDR     R6, =0xFF96F26C \n"
 269 "    BNE     loc_FF96F368 \n"
 270 "    LDR     R0, =0xFF96F328 /*'MainCapt.c'*/ \n"
 271 "    MOV     R1, #0xDB \n"
 272 "    BL      _DebugAssert \n"
 273 
 274 "loc_FF96F368:\n"
 275 "    LDR     R3, =0x5D184 \n"
 276 "    MVN     R1, #0 \n"
 277 "    LDR     R0, [R3] \n"
 278 "    BL      sub_FF8208C8 /*_ClearEventFlag*/ \n"
 279 "    BL      sub_FF96F2A4 \n"
 280 "    BL      wait_until_remote_button_is_released\n"
 281 "    BL      capt_seq_hook_set_nr\n"
 282 "    LDR     PC, =0xFF96F37C \n"  // Continue in firmware
 283 );
 284 }
 285 
 286 /*************************************************************/
 287 //** exp_drv_task @ 0xFF90B03C - 0xFF90B36C, 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_FF90B328 \n"
 294 
 295 "loc_FF90B04C:\n"
 296 "    CMP     R2, #0x18 \n"
 297 "    BNE     loc_FF90B064 \n"
 298 "    LDR     R0, [R12, #0x34] \n"
 299 "    MOV     LR, PC \n"
 300 "    LDR     PC, [R12, #0x30] \n"
 301 "    B       loc_FF90B094 \n"
 302 
 303 "loc_FF90B064:\n"
 304 "    CMP     R2, #0x16 \n"
 305 "    BNE     loc_FF90B074 \n"
 306 "    BL      sub_FFA95490 \n"
 307 "    B       loc_FF90B084 \n"
 308 
 309 "loc_FF90B074:\n"
 310 "    CMP     R2, #0x17 \n"
 311 "    BNE     loc_FF90B0A0 \n"
 312 "    BL      sub_FF8BADD4 \n"
 313 "    BL      sub_FF8BCC74 \n"
 314 
 315 "loc_FF90B084:\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_FF90B094:\n"
 322 "    LDR     R0, [SP] \n"
 323 "    BL      sub_FF9093F0 \n"
 324 "    B       loc_FF90B328 \n"
 325 
 326 "loc_FF90B0A0:\n"
 327 "    CMP     R2, #0xC \n"
 328 "    MOV     R8, #1 \n"
 329 "    BNE     loc_FF90B110 \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_FF90A664 \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_FF90A7E8 \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_FF90B2D8 \n"
 355 
 356 "loc_FF90B110:\n"
 357 "    SUB     R3, R2, #0xD \n"
 358 "    CMP     R3, #1 \n"
 359 "    BHI     loc_FF90B190 \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_FF90A864 \n"
 366 "    MOV     R4, R0 \n"
 367 "    CMP     R4, #3 \n"
 368 "    CMPNE   R4, #1 \n"
 369 "    BNE     loc_FF90B170 \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_FF90B01C \n"
 380 "    B       loc_FF90B2D8 \n"
 381 
 382 "loc_FF90B170:\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_FF90B2D8 \n"
 391 
 392 "loc_FF90B190:\n"
 393 "    CMP     R2, #0x14 \n"
 394 "    BNE     loc_FF90B1E4 \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_FF90A13C \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_FF90A394 \n"
 413 "    B       loc_FF90B2D8 \n"
 414 
 415 "loc_FF90B1E4:\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_FF90B2C4 \n"
 427 "    .long   loc_FF90B268 \n"
 428 "    .long   loc_FF90B270 \n"
 429 "    .long   loc_FF90B278 \n"
 430 "    .long   loc_FF90B278 \n"
 431 "    .long   loc_FF90B268 \n"
 432 "    .long   loc_FF90B270 \n"
 433 "    .long   loc_FF90B278 \n"
 434 "    .long   loc_FF90B278 \n"
 435 "    .long   loc_FF90B290 \n"
 436 "    .long   loc_FF90B290 \n"
 437 "    .long   loc_FF90B2B4 \n"
 438 "    .long   loc_FF90B2BC \n"
 439 "    .long   loc_FF90B2C4 \n"
 440 "    .long   loc_FF90B2C4 \n"
 441 "    .long   loc_FF90B2C4 \n"
 442 "    .long   loc_FF90B280 \n"
 443 "    .long   loc_FF90B288 \n"
 444 "    .long   loc_FF90B29C \n"
 445 "    .long   loc_FF90B2A4 \n"
 446 "    .long   loc_FF90B2A4 \n"
 447 "    .long   loc_FF90B2C4 \n"
 448 "    .long   loc_FF90B2AC \n"
 449 
 450 "loc_FF90B268:\n"
 451 "    BL      sub_FF9098AC \n"
 452 "    B       loc_FF90B2C0 \n"
 453 
 454 "loc_FF90B270:\n"
 455 "    BL      sub_FF9099E8 \n"
 456 "    B       loc_FF90B2C0 \n"
 457 
 458 "loc_FF90B278:\n"
 459 "    BL      sub_FF909B18 \n"
 460 "    B       loc_FF90B2C0 \n"
 461 
 462 "loc_FF90B280:\n"
 463 "    BL      sub_FF909CEC \n"
 464 "    B       loc_FF90B2C0 \n"
 465 
 466 "loc_FF90B288:\n"
 467 "    BL      sub_FF909DB0 \n"
 468 "    B       loc_FF90B2C0 \n"
 469 
 470 "loc_FF90B290:\n"
 471 "    BL      sub_FF909E74_my \n"  // --> Patched. Old value = 0xFF909E74.
 472 "    MOV     R8, #0 \n"
 473 "    B       loc_FF90B2C0 \n"
 474 
 475 "loc_FF90B29C:\n"
 476 "    BL      sub_FF909F38 \n"
 477 "    B       loc_FF90B2C0 \n"
 478 
 479 "loc_FF90B2A4:\n"
 480 "    BL      sub_FF90A020 \n"
 481 "    B       loc_FF90B2C0 \n"
 482 
 483 "loc_FF90B2AC:\n"
 484 "    BL      sub_FF90A424 \n"
 485 "    B       loc_FF90B2C0 \n"
 486 
 487 "loc_FF90B2B4:\n"
 488 "    BL      sub_FF90A4F8 \n"
 489 "    B       loc_FF90B2C0 \n"
 490 
 491 "loc_FF90B2BC:\n"
 492 "    BL      sub_FF90A5E4 \n"
 493 
 494 "loc_FF90B2C0:\n"
 495 "    LDR     R12, [SP] \n"
 496 
 497 "loc_FF90B2C4:\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_FF90B2D8:\n"
 505 "    CMP     R8, #1 \n"
 506 "    BNE     loc_FF90B300 \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_FF909768 \n"
 514 "    B       loc_FF90B320 \n"
 515 
 516 "loc_FF90B300:\n"
 517 "    MOV     R0, #1 \n"
 518 "    MOV     R1, R0 \n"
 519 "    MOV     R2, R0 \n"
 520 "    BL      sub_FF90970C \n"
 521 "    MOV     R0, #1 \n"
 522 "    MOV     R1, R0 \n"
 523 "    MOV     R2, R0 \n"
 524 "    BL      sub_FF909824 \n"
 525 
 526 "loc_FF90B320:\n"
 527 "    LDR     R0, [SP] \n"
 528 "    BL      sub_FF9093F0 \n"
 529 
 530 "loc_FF90B328:\n"
 531 "    LDR     R3, =0x38AB0 \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_FF90B04C \n"
 540 "    MOV     R0, R12 \n"
 541 "    BL      sub_FF9093F0 \n"
 542 "    LDR     R3, =0x38AAC \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_FF909E74_my @ 0xFF909E74 - 0xFF909F28, length=46
 554 void __attribute__((naked,noinline)) sub_FF909E74_my() {
 555 asm volatile (
 556 "    STMFD   SP!, {R4,R5,LR} \n"
 557 "    LDR     R3, =0x38AAC \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_FF909474 \n"
 565 "    MOV     R5, R0 \n"
 566 "    LDRSH   R0, [R4, #6] \n"
 567 "    BL      sub_FF9095A4 \n"
 568 "    LDRSH   R0, [R4, #8] \n"
 569 "    BL      sub_FF909640 \n"
 570 "    LDR     R3, [R4] \n"
 571 "    CMP     R3, #9 \n"
 572 "    MOVEQ   R5, #0 \n"
 573 "    CMP     R5, #1 \n"
 574 "    LDR     R1, =0xFF909420 \n"
 575 "    MOV     R2, #2 \n"
 576 "    BNE     loc_FF909EE0 \n"
 577 "    LDRSH   R0, [R4, #4] \n"
 578 "    BL      sub_FFA94AAC \n"
 579 "    LDR     R2, =0x38AD8 \n"
 580 "    MOV     R3, #0 \n"
 581 "    STR     R3, [R2] \n"
 582 "    B       loc_FF909EE4 \n"
 583 
 584 "loc_FF909EE0:\n"
 585 "    BL      sub_FF9096DC \n"
 586 
 587 "loc_FF909EE4:\n"
 588 "    STRH    R0, [R4, #4] \n"
 589 "    LDRSH   R0, [R4, #6] \n"
 590 "    BL      sub_FF8BAA6C_my \n"  // --> Patched. Old value = 0xFF8BAA6C.
 591 "    BL      sub_FF8BCA18 \n"
 592 "    MOV     R1, R0 \n"
 593 "    LDRSH   R0, [R4, #8] \n"
 594 "    BL      sub_FF8BC834 \n"
 595 "    MOV     R1, #0 \n"
 596 "    ADD     R0, R4, #8 \n"
 597 "    BL      sub_FF8BC8F8 \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, =0x38AAC \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_FF8BAA6C_my @ 0xFF8BAA6C - 0xFF8BAAC4, length=23
 611 void __attribute__((naked,noinline)) sub_FF8BAA6C_my() {
 612 asm volatile (
 613 "    STMFD   SP!, {R4,LR} \n"
 614 "    LDR     R3, =0x3998 \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, =0xFF8BA408 /*'Shutter.c'*/ \n"
 620 "    MOV     R4, R3, ASR#16 \n"
 621 "    BEQ     loc_FF8BAA94 \n"
 622 "    BL      _DebugAssert \n"
 623 
 624 "loc_FF8BAA94:\n"
 625 "    MOV     R1, #0x114 \n"
 626 "    CMN     R4, #0xC00 \n"
 627 "    LDR     R3, =0x2EE8E \n"
 628 "    LDR     R0, =0xFF8BA408 /*'Shutter.c'*/ \n"
 629 "    ADD     R1, R1, #2 \n"
 630 "    LDREQSH R4, [R3] \n"
 631 "    LDRNE   R3, =0x2EE8E \n"
 632 "    CMN     R4, #0xC00 \n"
 633 "    STRH    R4, [R3] \n"
 634 "    BNE     loc_FF8BAAC0 \n"
 635 "    BL      _DebugAssert \n"
 636 
 637 "loc_FF8BAAC0:\n"
 638 "    MOV     R0, R4 \n"
 639 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
 640 "    LDR     PC, =0xFF8BAAC8 \n"  // Continue in firmware
 641 );
 642 }

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