root/platform/ixus50_sd400/sub/101b/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. sub_FF95F4A4_my
  2. sub_FF95C440_my
  3. capt_seq_task
  4. exp_drv_task
  5. sub_FF907F2C_my
  6. sub_FF8B747C_my

   1 #include "lolevel.h"
   2 #include "platform.h"
   3 #include "core.h"
   4 
   5 #define NR_ON (1)
   6 #define NR_OFF (0)
   7 
   8 static long *nrflag = (long*)0x5760; // value above aMaincapt_c
   9 
  10 #include "../../../generic/capt_seq.c"
  11 
  12 void __attribute__((naked,noinline)) sub_FF95F4A4_my(long p)
  13 {
  14     asm volatile (
  15                 "STMFD   SP!, {R4-R8,LR}\n"
  16                 "LDR     R3, =0x5758\n"
  17                 "SUB     SP, SP, #4\n"
  18                 "LDR     R2, [R3]\n"
  19                 "LDR     R4, =0x575C\n"
  20                 "CMP     R2, #0\n"
  21                 "STR     R0, [R4]\n"
  22                 "MOV     R8, #0\n"
  23                 "LDR     R6, =0xFF95F3DC\n" // locret_FF95F3DC
  24                 "BNE     loc_FF95F4D8\n"
  25                 "LDR     R0, =0xFF95F498\n" // aMaincapt_c
  26                 "MOV     R1, #0xDB\n"
  27                 "BL      sub_FF813BE8\n" // DebugAssert
  28 "loc_FF95F4D8:\n"
  29                 "LDR     R3, =0x6FFDC\n"
  30                 "LDR     R1, =0xFFFFFFFF\n"
  31                 "LDR     R0, [R3]\n"
  32                 "BL      sub_FF820720\n" // ClearEventFlag
  33                 "BL      sub_FF95F414\n"
  34                 "BL      capt_seq_hook_set_nr\n" // +
  35 
  36                 "B       sub_FF95F4EC\n"
  37     );
  38 }
  39 
  40 void __attribute__((naked,noinline)) sub_FF95C440_my(long p)
  41 {
  42     asm volatile (
  43                  "STMFD   SP!, {R4,R5,LR}\n"
  44                  "LDR     R5, [R0,#8]\n"
  45                  "BL      sub_FF969C38\n"
  46                  "CMP     R0, #0\n"
  47                  "LDR     R0, =0xFF95C41C\n" // aStrbctrlCharge
  48                  "BNE     loc_FF95C460\n"
  49                  "BL      sub_FFAB9870\n" // printf
  50                  "BL      sub_FF969C44\n"
  51 "loc_FF95C460:\n"
  52                  "MOV     R0, R5\n"
  53                  "BL      sub_FF95E270\n"
  54                  "TST     R0, #1\n"
  55                  "MOV     R2, R5\n"
  56                  "MOV     R1, #1\n"
  57                  "BEQ     loc_FF95C480\n"
  58                  "LDMFD   SP!, {R4,R5,LR}\n"
  59                  "B       sub_FF95B5F0\n"
  60 "loc_FF95C480:\n"
  61                  "BL      sub_FF95AC8C\n"
  62                                  "MOV     R4, R0\n"
  63                  "BL      sub_FF825CA0\n"
  64                  "ADD     R3, R5, R5,LSL#1\n"
  65                  "RSB     R3, R5, R3,LSL#3\n"
  66                  "ADD     R4, R4, R3,LSL#2\n"
  67                  "STR     R0, [R4,#4]\n"
  68                  "MOV     R0, R5\n"
  69                  "BL      sub_FF95FD50\n"
  70                  "BL      sub_FF95E850\n"
  71                  "BL      sub_FF95E7C0\n"
  72                  "MOV     R0, R5\n"
  73                  "BL      sub_FF95F4A4_my\n" // S  
  74                  "BL      capt_seq_hook_raw_here\n" // +
  75                  "MOV     R2, R5\n"
  76                  "MOV     R1, #1\n"
  77                  "BL      sub_FF95B5F0\n"
  78                  "LDMFD   SP!, {R4,R5,LR}\n"
  79                  "B       sub_FF95F6EC\n"
  80     );
  81 }
  82 
  83 void __attribute__((naked,noinline)) capt_seq_task()
  84 {
  85         asm volatile (
  86                  "STMFD   SP!, {R4,LR}\n"
  87                  "SUB     SP, SP, #4\n"
  88                  "MOV     R4, SP\n"
  89                  "B       loc_FF95CDF4\n"
  90 
  91 "loc_FF95CC70:\n"
  92                  "LDR     R0, [SP]\n"
  93                  "LDR     R3, [R0]\n"
  94                  "CMP     R3, #0xF\n"
  95                  "LDRLS   PC, [PC,R3,LSL#2]\n"
  96                  "B       loc_FF95CDDC\n"
  97 
  98                  ".long loc_FF95CCC4\n"
  99                  ".long loc_FF95CCD4\n"
 100                  ".long loc_FF95CCE8\n"
 101                  ".long loc_FF95CCF8\n"
 102                  ".long loc_FF95CD08\n"
 103                  ".long loc_FF95CD18\n"
 104                  ".long loc_FF95CD2C\n"
 105                  ".long loc_FF95CD3C\n"
 106                  ".long loc_FF95CD50\n"
 107                  ".long loc_FF95CD60\n"
 108                  ".long loc_FF95CD70\n"
 109                  ".long loc_FF95CD80\n"
 110                  ".long loc_FF95CD90\n"
 111                  ".long loc_FF95CDA4\n"
 112                  ".long loc_FF95CDB4\n"
 113                  ".long loc_FF95CDC4\n"
 114 "loc_FF95CCC4:\n"
 115                  "BL      sub_FF95D450\n"
 116                  "LDR     R3, =0x6FF74\n"
 117                  "MOV     R1, #8\n"
 118                  "B       loc_FF95CDD0\n"
 119 "loc_FF95CCD4:\n"
 120                  "BL      sub_FF95DBD4\n"
 121                  "BL      shooting_expo_param_override\n"  // +
 122                  "BL      sub_FF95B224\n"
 123                  "LDR     R3, =0x6FF74\n"
 124                  "MOV     R1, #0x10\n"
 125                  "B       loc_FF95CDD0\n"
 126 "loc_FF95CCE8:\n"
 127                  "BL      sub_FF95C440_my\n" // S 
 128                  "LDR     R3, =0x6FF74\n"
 129                  "MOV     R1, #2\n"
 130                  "B       loc_FF95CDD0\n"
 131 "loc_FF95CCF8:\n"
 132                  "BL      sub_FF95E1D0\n"
 133                  "LDR     R3, =0x6FF74\n"
 134                  "MOV     R1, #1\n"
 135                  "B       loc_FF95CDD0\n"
 136 "loc_FF95CD08:\n"
 137                  "BL      sub_FF95DC70\n"
 138                  "LDR     R3, =0x6FF74\n"
 139                  "MOV     R1, #0x20\n"
 140                  "B       loc_FF95CDD0\n"
 141 "loc_FF95CD18:\n"
 142                  "BL      sub_FF95DD68\n"
 143                  "BL      sub_FF95B224\n"
 144                  "LDR     R3, =0x6FF74\n"
 145                  "MOV     R1, #0x40\n"
 146                  "B       loc_FF95CDD0\n"
 147 "loc_FF95CD2C:\n"
 148                  "BL      sub_FF95C5F0\n"
 149                  "LDR     R3, =0x6FF74\n"
 150                  "MOV     R1, #0x80\n"
 151                  "B       loc_FF95CDD0\n"
 152 "loc_FF95CD3C:\n"
 153                  "BL      sub_FF95DEE4\n"
 154                  "BL      sub_FF95B224\n"
 155                  "LDR     R3, =0x6FF74\n"
 156                  "MOV     R1, #0x400\n"
 157                  "B       loc_FF95CDD0\n"
 158 "loc_FF95CD50:\n"
 159                  "BL      sub_FF95DC70\n"
 160                  "LDR     R3, =0x6FF74\n"
 161                  "MOV     R1, #0x800\n"
 162                  "B       loc_FF95CDD0\n"
 163 "loc_FF95CD60:\n"
 164                  "BL      sub_FF95E994\n"
 165                  "LDR     R3, =0x6FF74\n"
 166                  "MOV     R1, #0x8000\n"
 167                  "B       loc_FF95CDD0\n"
 168 "loc_FF95CD70:\n"
 169                  "BL      sub_FF95ED44\n"
 170                  "LDR     R3, =0x6FF74\n"
 171                  "MOV     R1, #0x10000\n"
 172                  "B       loc_FF95CDD0\n"
 173 "loc_FF95CD80:\n"
 174                  "BL      sub_FF95EC64\n"
 175                  "LDR     R3, =0x6FF74\n"
 176                  "MOV     R1, #0x20000\n"
 177                  "B       loc_FF95CDD0\n"
 178 "loc_FF95CD90:\n"
 179                  "MOV     R0, #0\n"
 180                  "BL      sub_FF95EDFC\n"
 181                  "LDR     R3, =0x6FF74\n"
 182                  "MOV     R1, #0x40000\n"
 183                  "B       loc_FF95CDD0\n"
 184 "loc_FF95CDA4:\n"
 185                  "BL      sub_FF95F068\n"
 186                  "LDR     R3, =0x6FF74\n"
 187                  "MOV     R1, #0x80000\n"
 188                  "B       loc_FF95CDD0\n"
 189 "loc_FF95CDB4:\n"
 190                  "BL      sub_FF95F0E0\n"
 191                  "LDR     R3, =0x6FF74\n"
 192                  "MOV     R1, #0x100000\n"
 193                  "B       loc_FF95CDD0\n"
 194 "loc_FF95CDC4:\n"
 195                  "BL      sub_FF95F12C\n"
 196                  "LDR     R3, =0x6FF74\n"
 197                  "MOV     R1, #0x200000\n"
 198 "loc_FF95CDD0:\n"
 199                  "LDR     R0, [R3]\n"
 200                  "BL      sub_FF820584\n" // SetEventFlag
 201                  "B       loc_FF95CDEC\n"
 202 "loc_FF95CDDC:\n"
 203                  "MOV     R1, #0x374\n"
 204                  "LDR     R0, =0xFF95C0F0\n" // aCaptseq_c
 205                  "ADD     R1, R1, #2\n"
 206                  "BL      sub_FF813BE8\n" // DebugAssert
 207 "loc_FF95CDEC:\n"
 208                  "LDR     R0, [SP]\n"
 209                  "BL      sub_FF95C170\n"
 210 "loc_FF95CDF4:\n"
 211                  "LDR     R3, =0x6FF78\n"
 212                  "MOV     R1, R4\n"
 213                  "LDR     R0, [R3]\n"
 214                  "MOV     R2, #0\n"
 215                  "BL      sub_FF820D8C\n" // ReceiveMessageQueue
 216                  "TST     R0, #1\n"
 217                  "BEQ     loc_FF95CC70\n"
 218                  "LDR     R0, =0xFF95C0F0\n" // aCaptseq_c
 219                                  "MOV     R1, #0x2EC\n"
 220                  "BL      sub_FF813BE8\n" // DebugAssert
 221                  "BL      sub_FF8225B4\n" // ExitTask
 222                  "ADD     SP, SP, #4\n"
 223                  "LDMFD   SP!, {R4,PC}\n"
 224         );
 225 }
 226 
 227 
 228 /*************************************************************/
 229 //** exp_drv_task @ 0xFF908D18 - 0xFF908FF0, length=183
 230 void __attribute__((naked,noinline)) exp_drv_task() {
 231 asm volatile (
 232 "    STMFD   SP!, {R4-R8,LR} \n"
 233 "    SUB     SP, SP, #0x14 \n"
 234 "    MOV     R7, SP \n"
 235 "    B       loc_FF908FAC \n"
 236 
 237 "loc_FF908D28:\n"
 238 "    CMP     R3, #0x17 \n"
 239 "    BNE     loc_FF908D40 \n"
 240 "    LDR     R0, [R2, #0x30] \n"
 241 "    MOV     LR, PC \n"
 242 "    LDR     PC, [R2, #0x2C] \n"
 243 "    B       loc_FF908D70 \n"
 244 
 245 "loc_FF908D40:\n"
 246 "    CMP     R3, #0x15 \n"
 247 "    BNE     loc_FF908D50 \n"
 248 "    BL      sub_FFA5FB0C \n"
 249 "    B       loc_FF908D60 \n"
 250 
 251 "loc_FF908D50:\n"
 252 "    CMP     R3, #0x16 \n"
 253 "    BNE     loc_FF908D7C \n"
 254 "    BL      sub_FF8B77E4 \n"
 255 "    BL      sub_FF8B9684 \n"
 256 
 257 "loc_FF908D60:\n"
 258 "    LDR     R3, [SP] \n"
 259 "    LDR     R0, [R3, #0x30] \n"
 260 "    MOV     LR, PC \n"
 261 "    LDR     PC, [R3, #0x2C] \n"
 262 
 263 "loc_FF908D70:\n"
 264 "    LDR     R0, [SP] \n"
 265 "    BL      sub_FF9074A4 \n"
 266 "    B       loc_FF908FAC \n"
 267 
 268 "loc_FF908D7C:\n"
 269 "    CMP     R3, #0xC \n"
 270 "    MOV     R8, #1 \n"
 271 "    BNE     loc_FF908DEC \n"
 272 "    LDR     R1, [R2, #0x24] \n"
 273 "    ADD     R1, R1, R1, LSL#1 \n"
 274 "    ADD     R6, SP, #0xC \n"
 275 "    ADD     R1, R2, R1, LSL#1 \n"
 276 "    SUB     R1, R1, #2 \n"
 277 "    MOV     R2, #6 \n"
 278 "    MOV     R0, R6 \n"
 279 "    BL      _memcpy \n"
 280 "    LDR     R0, [SP] \n"
 281 "    BL      sub_FF908410 \n"
 282 "    LDR     R3, [SP] \n"
 283 "    LDR     R1, [R3, #0x24] \n"
 284 "    LDR     R2, [R3, #0x30] \n"
 285 "    ADD     R0, R3, #4 \n"
 286 "    MOV     LR, PC \n"
 287 "    LDR     PC, [R3, #0x2C] \n"
 288 "    LDR     R0, [SP] \n"
 289 "    BL      sub_FF908594 \n"
 290 "    LDR     R3, [SP] \n"
 291 "    ADD     R0, R3, #4 \n"
 292 "    LDR     R1, [R3, #0x24] \n"
 293 "    LDR     R2, [R3, #0x38] \n"
 294 "    MOV     LR, PC \n"
 295 "    LDR     PC, [R3, #0x34] \n"
 296 "    B       loc_FF908F5C \n"
 297 
 298 "loc_FF908DEC:\n"
 299 "    SUB     R3, R3, #0xD \n"
 300 "    CMP     R3, #1 \n"
 301 "    BHI     loc_FF908E6C \n"
 302 "    ADD     R6, SP, #0xC \n"
 303 "    ADD     R5, SP, #4 \n"
 304 "    MOV     R0, R2 \n"
 305 "    MOV     R1, R6 \n"
 306 "    MOV     R2, R5 \n"
 307 "    BL      sub_FF908610 \n"
 308 "    MOV     R4, R0 \n"
 309 "    CMP     R4, #3 \n"
 310 "    CMPNE   R4, #1 \n"
 311 "    BNE     loc_FF908E4C \n"
 312 "    LDR     R12, [SP] \n"
 313 "    MOV     R0, R5 \n"
 314 "    LDR     R1, [R12, #0x24] \n"
 315 "    MOV     R2, R4 \n"
 316 "    LDR     R3, [R12, #0x30] \n"
 317 "    MOV     LR, PC \n"
 318 "    LDR     PC, [R12, #0x2C] \n"
 319 "    MOV     R1, R4 \n"
 320 "    LDR     R0, [SP] \n"
 321 "    BL      sub_FF908CF8 \n"
 322 "    B       loc_FF908F5C \n"
 323 
 324 "loc_FF908E4C:\n"
 325 "    LDR     R12, [SP] \n"
 326 "    MOV     R2, R4 \n"
 327 "    ADD     R0, R12, #4 \n"
 328 "    LDR     R1, [R12, #0x24] \n"
 329 "    LDR     R3, [R12, #0x30] \n"
 330 "    MOV     LR, PC \n"
 331 "    LDR     PC, [R12, #0x2C] \n"
 332 "    B       loc_FF908F5C \n"
 333 
 334 "loc_FF908E6C:\n"
 335 "    ADD     R6, SP, #0xC \n"
 336 "    ADD     R1, R2, #4 \n"
 337 "    MOV     R0, R6 \n"
 338 "    MOV     R2, #6 \n"
 339 "    BL      _memcpy \n"
 340 "    LDR     R12, [SP] \n"
 341 "    LDR     R3, [R12] \n"
 342 "    MOV     R0, R12 \n"
 343 "    CMP     R3, #0x14 \n"
 344 "    LDRLS   PC, [PC, R3, LSL#2] \n"
 345 "    B       loc_FF908F48 \n"
 346 "    .long   loc_FF908EEC \n"
 347 "    .long   loc_FF908EF4 \n"
 348 "    .long   loc_FF908EFC \n"
 349 "    .long   loc_FF908EFC \n"
 350 "    .long   loc_FF908EEC \n"
 351 "    .long   loc_FF908EF4 \n"
 352 "    .long   loc_FF908EFC \n"
 353 "    .long   loc_FF908EFC \n"
 354 "    .long   loc_FF908F14 \n"
 355 "    .long   loc_FF908F14 \n"
 356 "    .long   loc_FF908F38 \n"
 357 "    .long   loc_FF908F40 \n"
 358 "    .long   loc_FF908F48 \n"
 359 "    .long   loc_FF908F48 \n"
 360 "    .long   loc_FF908F48 \n"
 361 "    .long   loc_FF908F04 \n"
 362 "    .long   loc_FF908F0C \n"
 363 "    .long   loc_FF908F20 \n"
 364 "    .long   loc_FF908F28 \n"
 365 "    .long   loc_FF908F28 \n"
 366 "    .long   loc_FF908F30 \n"
 367 
 368 "loc_FF908EEC:\n"
 369 "    BL      sub_FF907964 \n"
 370 "    B       loc_FF908F44 \n"
 371 
 372 "loc_FF908EF4:\n"
 373 "    BL      sub_FF907AA0 \n"
 374 "    B       loc_FF908F44 \n"
 375 
 376 "loc_FF908EFC:\n"
 377 "    BL      sub_FF907BD0 \n"
 378 "    B       loc_FF908F44 \n"
 379 
 380 "loc_FF908F04:\n"
 381 "    BL      sub_FF907DA4 \n"
 382 "    B       loc_FF908F44 \n"
 383 
 384 "loc_FF908F0C:\n"
 385 "    BL      sub_FF907E68 \n"
 386 "    B       loc_FF908F44 \n"
 387 
 388 "loc_FF908F14:\n"
 389 "    BL      sub_FF907F2C_my \n"  // --> Patched. Old value = 0xFF907F2C.
 390 "    MOV     R8, #0 \n"
 391 "    B       loc_FF908F44 \n"
 392 
 393 "loc_FF908F20:\n"
 394 "    BL      sub_FF907FF0 \n"
 395 "    B       loc_FF908F44 \n"
 396 
 397 "loc_FF908F28:\n"
 398 "    BL      sub_FF9080D8 \n"
 399 "    B       loc_FF908F44 \n"
 400 
 401 "loc_FF908F30:\n"
 402 "    BL      sub_FF9081D0 \n"
 403 "    B       loc_FF908F44 \n"
 404 
 405 "loc_FF908F38:\n"
 406 "    BL      sub_FF9082A4 \n"
 407 "    B       loc_FF908F44 \n"
 408 
 409 "loc_FF908F40:\n"
 410 "    BL      sub_FF908390 \n"
 411 
 412 "loc_FF908F44:\n"
 413 "    LDR     R12, [SP] \n"
 414 
 415 "loc_FF908F48:\n"
 416 "    ADD     R0, R12, #4 \n"
 417 "    LDR     R1, [R12, #0x24] \n"
 418 "    LDR     R2, [R12, #0x30] \n"
 419 "    MOV     LR, PC \n"
 420 "    LDR     PC, [R12, #0x2C] \n"
 421 
 422 "loc_FF908F5C:\n"
 423 "    CMP     R8, #1 \n"
 424 "    BNE     loc_FF908F84 \n"
 425 "    LDR     R1, [SP] \n"
 426 "    LDR     R3, [R1, #0x24] \n"
 427 "    ADD     R3, R3, R3, LSL#1 \n"
 428 "    ADD     R1, R1, R3, LSL#1 \n"
 429 "    MOV     R0, R6 \n"
 430 "    SUB     R1, R1, #2 \n"
 431 "    BL      sub_FF90781C \n"
 432 "    B       loc_FF908FA4 \n"
 433 
 434 "loc_FF908F84:\n"
 435 "    MOV     R0, #1 \n"
 436 "    MOV     R1, R0 \n"
 437 "    MOV     R2, R0 \n"
 438 "    BL      sub_FF9077C0 \n"
 439 "    MOV     R0, #1 \n"
 440 "    MOV     R1, R0 \n"
 441 "    MOV     R2, R0 \n"
 442 "    BL      sub_FF9078DC \n"
 443 
 444 "loc_FF908FA4:\n"
 445 "    LDR     R0, [SP] \n"
 446 "    BL      sub_FF9074A4 \n"
 447 
 448 "loc_FF908FAC:\n"
 449 "    LDR     R3, =0x4BA9C \n"
 450 "    MOV     R2, #0 \n"
 451 "    LDR     R0, [R3] \n"
 452 "    MOV     R1, R7 \n"
 453 "    BL      sub_FF820D8C /*_ReceiveMessageQueue*/ \n"
 454 "    LDR     R2, [SP] \n"
 455 "    LDR     R3, [R2] \n"
 456 "    CMP     R3, #0x18 \n"
 457 "    BNE     loc_FF908D28 \n"
 458 "    MOV     R0, R2 \n"
 459 "    BL      sub_FF9074A4 \n"
 460 "    LDR     R3, =0x4BA98 \n"
 461 "    MOV     R1, #1 \n"
 462 "    LDR     R0, [R3] \n"
 463 "    BL      sub_FF820584 /*_SetEventFlag*/ \n"
 464 "    BL      _ExitTask \n"
 465 "    ADD     SP, SP, #0x14 \n"
 466 "    LDMFD   SP!, {R4-R8,PC} \n"
 467 );
 468 }
 469 
 470 /*************************************************************/
 471 //** sub_FF907F2C_my @ 0xFF907F2C - 0xFF907FE0, length=46
 472 void __attribute__((naked,noinline)) sub_FF907F2C_my() {
 473 asm volatile (
 474 "    STMFD   SP!, {R4,R5,LR} \n"
 475 "    LDR     R3, =0x4BA98 \n"
 476 "    MOV     R4, R0 \n"
 477 "    MOV     R1, #0xE \n"
 478 "    LDR     R0, [R3] \n"
 479 "    BL      sub_FF820720 /*_ClearEventFlag*/ \n"
 480 "    MOV     R1, #0 \n"
 481 "    LDRSH   R0, [R4, #4] \n"
 482 "    BL      sub_FF907528 \n"
 483 "    MOV     R5, R0 \n"
 484 "    LDRSH   R0, [R4, #6] \n"
 485 "    BL      sub_FF907658 \n"
 486 "    LDRSH   R0, [R4, #8] \n"
 487 "    BL      sub_FF9076F4 \n"
 488 "    LDR     R3, [R4] \n"
 489 "    CMP     R3, #9 \n"
 490 "    MOVEQ   R5, #0 \n"
 491 "    CMP     R5, #1 \n"
 492 "    LDR     R1, =0xFF9074D4 \n"
 493 "    MOV     R2, #2 \n"
 494 "    BNE     loc_FF907F98 \n"
 495 "    LDRSH   R0, [R4, #4] \n"
 496 "    BL      sub_FFA5F814 \n"
 497 "    LDR     R2, =0x4BAC4 \n"
 498 "    MOV     R3, #0 \n"
 499 "    STR     R3, [R2] \n"
 500 "    B       loc_FF907F9C \n"
 501 
 502 "loc_FF907F98:\n"
 503 "    BL      sub_FF907790 \n"
 504 
 505 "loc_FF907F9C:\n"
 506 "    STRH    R0, [R4, #4] \n"
 507 "    LDRSH   R0, [R4, #6] \n"
 508 "    BL      sub_FF8B747C_my \n"  // --> Patched. Old value = 0xFF8B747C.
 509 "    BL      sub_FF8B9428 \n"
 510 "    MOV     R1, R0 \n"
 511 "    LDRSH   R0, [R4, #8] \n"
 512 "    BL      sub_FF8B9244 \n"
 513 "    MOV     R1, #0 \n"
 514 "    ADD     R0, R4, #8 \n"
 515 "    BL      sub_FF8B9308 \n"
 516 "    CMP     R5, #1 \n"
 517 "    MOV     R1, #2 \n"
 518 "    MOV     R2, #0 \n"
 519 "    LDMNEFD SP!, {R4,R5,PC} \n"
 520 "    LDR     R3, =0x4BA98 \n"
 521 "    LDR     R0, [R3] \n"
 522 "    LDMFD   SP!, {R4,R5,LR} \n"
 523 "    B       sub_FF820574 /*_WaitForAllEventFlag*/ \n"
 524 );
 525 }
 526 
 527 /*************************************************************/
 528 //** sub_FF8B747C_my @ 0xFF8B747C - 0xFF8B74D4, length=23
 529 void __attribute__((naked,noinline)) sub_FF8B747C_my() {
 530 asm volatile (
 531 "    STMFD   SP!, {R4,LR} \n"
 532 "    LDR     R3, =0x36B0 \n"
 533 "    LDR     R2, [R3] \n"
 534 "    MOV     R3, R0, LSL#16 \n"
 535 "    CMP     R2, #1 \n"
 536 "    MOV     R1, #0x110 \n"
 537 "    LDR     R0, =0xFF8B6E18 \n"
 538 "    MOV     R4, R3, ASR#16 \n"
 539 "    BEQ     loc_FF8B74A4 \n"
 540 "    BL      _DebugAssert \n"
 541 
 542 "loc_FF8B74A4:\n"
 543 "    MOV     R1, #0x114 \n"
 544 "    CMN     R4, #0xC00 \n"
 545 "    LDR     R3, =0x2E5EE \n"
 546 "    LDR     R0, =0xFF8B6E18 \n"
 547 "    ADD     R1, R1, #2 \n"
 548 "    LDREQSH R4, [R3] \n"
 549 "    LDRNE   R3, =0x2E5EE \n"
 550 "    CMN     R4, #0xC00 \n"
 551 "    STRH    R4, [R3] \n"
 552 "    BNE     loc_FF8B74D0 \n"
 553 "    BL      _DebugAssert \n"
 554 
 555 "loc_FF8B74D0:\n"
 556 "    MOV     R0, R4 \n"
 557 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
 558 "    LDR     PC, =0xFF8B74D8 \n"  // Continue in firmware
 559 );
 560 }

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