root/platform/s95/sub/100h/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF98ACEC_my
  3. exp_drv_task
  4. sub_FF8CC1CC_my
  5. sub_FF8BD350_my

   1 #include "lolevel.h"
   2 #include "platform.h"
   3 #include "core.h"
   4 
   5 static long *nrflag = (long*)(0x757c+0x08);  // Found @ ff98e208 & ff98e220
   6 #define NR_AUTO (0)                          // have to explictly reset value back to 0 to enable auto
   7 
   8 #include "../../../generic/capt_seq.c"
   9 
  10 
  11 /*----------------------------------------------------------------------
  12         capt_seq_task()
  13 -----------------------------------------------------------------------*/
  14 void __attribute__((naked,noinline)) capt_seq_task()
  15 {
  16         asm volatile (
  17 "               STMFD   SP!, {R3-R7,LR} \n"
  18 "               LDR     R7, =0x2E6C \n"
  19 "               LDR     R4, =0x3CFBC \n"
  20 "               MOV     R6, #0 \n"
  21 "loc_FF88323C: \n"
  22 "               LDR     R0, [R7,#4] \n"
  23 "               MOV     R2, #0 \n"
  24 "               MOV     R1, SP \n"
  25 "               BL      sub_FF83A2F8 \n"
  26 "               TST     R0, #1 \n"
  27 "               BEQ     loc_FF883268 \n"
  28 "               LDR     R1, =0x43F \n"
  29 "               LDR     R0, =0xFF882CF4 \n"                                     // aSsshoottask_c
  30 "               BL      sub_FF81EB78 \n"                                        // DebugAssert
  31 "               BL      sub_FF81EB30 \n"                                        // eventproc_export_ExitTask
  32 "               LDMFD   SP!, {R3-R7,PC} \n"
  33 "loc_FF883268: \n"
  34 "               LDR     R0, [SP] \n"
  35 "               LDR     R1, [R0] \n"
  36 "               CMP     R1, #0x23 \n"
  37 "               ADDLS   PC, PC, R1,LSL#2 \n"
  38 "               B       loc_FF8834A0 \n"
  39 "loc_FF88327C: \n"
  40 "               B       loc_FF88330C \n"
  41 "loc_FF883280: \n"
  42 "               B       loc_FF883324 \n"
  43 "loc_FF883284: \n"
  44 "               B       loc_FF883348 \n"
  45 "loc_FF883288: \n"
  46 "               B       loc_FF88335C \n"
  47 "loc_FF88328C: \n"
  48 "               B       loc_FF883354 \n"
  49 "loc_FF883290: \n"
  50 "               B       loc_FF883368 \n"
  51 "loc_FF883294: \n"
  52 "               B       loc_FF883370 \n"
  53 "loc_FF883298: \n"
  54 "               B       loc_FF883378 \n"
  55 "loc_FF88329C: \n"
  56 "               B       loc_FF883384 \n"
  57 "loc_FF8832A0: \n"
  58 "               B       loc_FF8833AC \n"
  59 "loc_FF8832A4: \n"
  60 "               B       loc_FF883390 \n"
  61 "loc_FF8832A8: \n"
  62 "               B       loc_FF88339C \n"
  63 "loc_FF8832AC: \n"
  64 "               B       loc_FF8833A4 \n"
  65 "loc_FF8832B0: \n"
  66 "               B       loc_FF8833B4 \n"
  67 "loc_FF8832B4: \n"
  68 "               B       loc_FF8833BC \n"
  69 "loc_FF8832B8: \n"
  70 "               B       loc_FF8833C4 \n"
  71 "loc_FF8832BC: \n"
  72 "               B       loc_FF8833CC \n"
  73 "loc_FF8832C0: \n"
  74 "               B       loc_FF8833D4 \n"
  75 "loc_FF8832C4: \n"
  76 "               B       loc_FF8833DC \n"
  77 "loc_FF8832C8: \n"
  78 "               B       loc_FF8833E4 \n"
  79 "loc_FF8832CC: \n"
  80 "               B       loc_FF8833EC \n"
  81 "loc_FF8832D0: \n"
  82 "               B       loc_FF8833F4 \n"
  83 "loc_FF8832D4: \n"
  84 "               B       loc_FF8833FC \n"
  85 "loc_FF8832D8: \n"
  86 "               B       loc_FF883408 \n"
  87 "loc_FF8832DC: \n"
  88 "               B       loc_FF883410 \n"
  89 "loc_FF8832E0: \n"
  90 "               B       loc_FF88341C \n"
  91 "loc_FF8832E4: \n"
  92 "               B       loc_FF883424 \n"
  93 "loc_FF8832E8: \n"
  94 "               B       loc_FF88342C \n"
  95 "loc_FF8832EC: \n"
  96 "               B       loc_FF883434 \n"
  97 "loc_FF8832F0: \n"
  98 "               B       loc_FF88343C \n"
  99 "loc_FF8832F4: \n"
 100 "               B       loc_FF883444 \n"
 101 "loc_FF8832F8: \n"
 102 "               B       loc_FF88344C \n"
 103 "loc_FF8832FC: \n"
 104 "               B       loc_FF883454 \n"
 105 "loc_FF883300: \n"
 106 "               B       loc_FF88345C \n"
 107 "loc_FF883304: \n"
 108 "               B       loc_FF883468 \n"
 109 "loc_FF883308: \n"
 110 "               B       loc_FF8834AC \n"
 111 
 112 // jump table entry 0
 113 "loc_FF88330C: \n"
 114 "               BL      sub_FF8839D4 \n"
 115 
 116 "               BL      shooting_expo_param_override\n"                 // added
 117 
 118 "               BL      sub_FF880B34 \n"
 119 
 120 // force call to next function
 121 "               MOV     R0, #0\n"
 122 "               STR     R0, [R4,#0x24]\n"  // fixes overrides  behavior at short shutter press
 123 
 124 "               LDR     R0, [R4,#0x24] \n"
 125 "               CMP     R0, #0 \n"
 126 "               BLNE    sub_FF98AEC0 \n"
 127 "               B       loc_FF8834AC \n"
 128 
 129 // jump table entry 1
 130 "loc_FF883324: \n"
 131 "               LDRH    R1, [R4] \n"
 132 "               LDR     R0, [R0,#0xC] \n"
 133 "               SUB     R12, R1, #0x4200 \n"
 134 "               SUBS    R12, R12, #0x2E \n"
 135 "               BNE     loc_FF883340 \n"
 136 "               BL      sub_FF98BCA8 \n"
 137 "               B       loc_FF8834AC \n"
 138 "loc_FF883340: \n"
 139 
 140 //"             BL      sub_FF98ACEC \n"
 141 "               BL      sub_FF98ACEC_my \n"                                     // patched
 142 
 143 "               B       loc_FF8834AC \n"
 144 
 145 // jump table entry 2
 146 "loc_FF883348: \n"
 147 "               MOV     R0, #1 \n"
 148 "               BL      sub_FF883CB8 \n"
 149 "               B       loc_FF8834AC \n"
 150 
 151 "loc_FF883354: \n"
 152 "               BL      sub_FF88366C \n"
 153 "               B       loc_FF883360 \n"
 154 
 155 "loc_FF88335C: \n"
 156 "               BL      sub_FF8839B4 \n"
 157 "loc_FF883360: \n"
 158 "               STR     R6, [R4,#0x24] \n"
 159 "               B       loc_FF8834AC \n"
 160 
 161 "loc_FF883368: \n"
 162 "               BL      sub_FF8839BC \n"
 163 "               B       loc_FF8834AC \n"
 164 
 165 "loc_FF883370: \n"
 166 "               BL      sub_FF883BBC \n"
 167 "               B       loc_FF883388 \n"
 168 
 169 "loc_FF883378: \n"
 170 "               LDR     R0, [R0,#0xC] \n"
 171 "               BL      sub_FF98AF28 \n"
 172 "               B       loc_FF8834AC \n"
 173 
 174 "loc_FF883384: \n"
 175 "               BL      sub_FF883C28 \n"
 176 "loc_FF883388: \n"
 177 "               BL      sub_FF880B34 \n"
 178 "               B       loc_FF8834AC \n"
 179 
 180 "loc_FF883390: \n"
 181 "               LDR     R0, [R4,#0x54] \n"
 182 "               BL      sub_FF884614 \n"
 183 "               B       loc_FF8834AC \n"
 184 
 185 "loc_FF88339C: \n"
 186 "               BL      sub_FF884968 \n"
 187 "               B       loc_FF8834AC \n"
 188 
 189 "loc_FF8833A4: \n"
 190 "               BL      sub_FF8849CC \n"
 191 "               B       loc_FF8834AC \n"
 192 
 193 "loc_FF8833AC: \n"
 194 "               BL      sub_FF8839B4 \n"
 195 "               B       loc_FF8834AC \n"
 196 
 197 "loc_FF8833B4: \n"
 198 "               BL      sub_FF989FFC \n"
 199 "               B       loc_FF8834AC \n"
 200 
 201 "loc_FF8833BC: \n"
 202 "               BL      sub_FF98A208 \n"
 203 "               B       loc_FF8834AC \n"
 204 
 205 "loc_FF8833C4: \n"
 206 "               BL      sub_FF98A2A0 \n"
 207 "               B       loc_FF8834AC \n"
 208 
 209 "loc_FF8833CC: \n"
 210 "               BL      sub_FF98A38C \n"
 211 "               B       loc_FF8834AC \n"
 212 
 213 "loc_FF8833D4: \n"
 214 "               BL      sub_FF98A484 \n"
 215 "               B       loc_FF8834AC \n"
 216 
 217 "loc_FF8833DC: \n"
 218 "               MOV     R0, #0 \n"
 219 "               B       loc_FF883400 \n"
 220 
 221 "loc_FF8833E4: \n"
 222 "               BL      sub_FF98A6C0 \n"
 223 "               B       loc_FF8834AC \n"
 224 
 225 "loc_FF8833EC: \n"
 226 "               BL      sub_FF98A764 \n"
 227 "               B       loc_FF8834AC \n"
 228 
 229 "loc_FF8833F4: \n"
 230 "               BL      sub_FF98A844 \n"
 231 "               B       loc_FF8834AC \n"
 232 
 233 "loc_FF8833FC: \n"
 234 "               MOV     R0, #1 \n"
 235 "loc_FF883400: \n"
 236 "               BL      sub_FF98A548 \n"
 237 "               B       loc_FF8834AC \n"
 238 
 239 "loc_FF883408: \n"
 240 "               BL      sub_FF883EC4 \n"
 241 "               B       loc_FF8834AC \n"
 242 
 243 "loc_FF883410: \n"
 244 "               BL      sub_FF883F6C \n"
 245 "               BL      sub_FF98C1D0 \n"
 246 "               B       loc_FF8834AC \n"
 247 
 248 "loc_FF88341C: \n"
 249 "               BL      sub_FF884350 \n"
 250 "               B       loc_FF8834AC \n"
 251 
 252 "loc_FF883424: \n"
 253 "               BL      sub_FF884490 \n"
 254 "               B       loc_FF8834AC \n"
 255 
 256 "loc_FF88342C: \n"
 257 "               BL      sub_FF98C2A0 \n"
 258 "               B       loc_FF8834AC \n"
 259 
 260 "loc_FF883434: \n"
 261 "               BL      sub_FF837C6C \n"
 262 "               B       loc_FF8834AC \n"
 263 
 264 "loc_FF88343C: \n"
 265 "               BL      sub_FF886FE4 \n"
 266 "               B       loc_FF8834AC \n"
 267 
 268 "loc_FF883444: \n"
 269 "               BL      sub_FF887070 \n"
 270 "               B       loc_FF8834AC \n"
 271 
 272 "loc_FF88344C: \n"
 273 "               BL      sub_FF98A97C \n"
 274 "               B       loc_FF8834AC \n"
 275 
 276 "loc_FF883454: \n"
 277 "               BL      sub_FF98A9E0 \n"
 278 "               B       loc_FF8834AC \n"
 279 
 280 "loc_FF88345C: \n"
 281 "               BL      sub_FF8870CC \n"
 282 "               BL      sub_FF88708C \n"
 283 "               B       loc_FF8834AC \n"
 284 
 285 "loc_FF883468: \n"
 286 "               MOV     R0, #1 \n"
 287 "               BL      sub_FF98B6D0 \n"
 288 "               MOV     R0, #1 \n"
 289 "               BL      sub_FF98B800 \n"
 290 "               LDRH    R0, [R4,#0x9C] \n"
 291 "               CMP     R0, #4 \n"
 292 "               LDRNEH  R0, [R4] \n"
 293 "               SUBNE   R12, R0, #0x4200 \n"
 294 "               SUBNES  R12, R12, #0x2A \n"
 295 "               BNE     loc_FF8834AC \n"
 296 "               BL      sub_FF887070 \n"
 297 "               BL      sub_FF887670 \n"
 298 "               BL      sub_FF8874EC \n"
 299 "               B       loc_FF8834AC \n"
 300 
 301 "loc_FF8834A0: \n"
 302 "               LDR     R1, =0x591 \n"
 303 "               LDR     R0, =0xFF882CF4 \n"                             // "SsShootTask.c"
 304 "               BL      sub_FF81EB78 \n"                                // DebugAssert
 305 
 306 "loc_FF8834AC: \n"
 307 "               LDR     R0, [SP] \n"
 308 "               LDR     R1, [R0,#4] \n"
 309 "               LDR     R0, [R7] \n"
 310 "               BL      sub_FF88E1E4 \n"
 311 "               LDR     R5, [SP] \n"
 312 "               LDR     R0, [R5,#8] \n"
 313 "               CMP     R0, #0 \n"
 314 "               LDREQ   R1, =0x115 \n"
 315 "               LDREQ   R0, =0xFF882CF4 \n"                     // "SsShootTask.c"
 316 "               BLEQ    sub_FF81EB78 \n"                        // DebugAssert
 317 "               STR     R6, [R5,#8] \n"
 318 "               B       loc_FF88323C \n"
 319         );
 320 }
 321 
 322 
 323 /*----------------------------------------------------------------------
 324         sub_FF98ACEC_my()
 325 -----------------------------------------------------------------------*/
 326 void __attribute__((naked,noinline)) sub_FF98ACEC_my()
 327 {
 328         asm volatile (
 329 "               STMFD   SP!, {R3-R7,LR} \n"
 330 "               LDR     R5, =0x3CFBC \n"
 331 "               MOV     R4, R0 \n"
 332 "               LDR     R0, [R5,#0x24] \n"
 333 "               MOV     R6, #0 \n"
 334 "               CMP     R0, #0 \n"
 335 "               BNE     loc_FF98AD28 \n"
 336 "               MOV     R0, #0xC \n"
 337 "               BL      sub_FF889040 \n"
 338 "               TST     R0, #1 \n"
 339 "               MOVNE   R2, R4 \n"
 340 "               LDMNEFD SP!, {R3-R7,LR} \n"
 341 "               MOVNE   R1, #1 \n"
 342 "               MOVNE   R0, #1 \n"
 343 "               BNE     sub_FF8811F8 \n"
 344 "loc_FF98AD28: \n"
 345 "               LDR     R0, [R4,#8] \n"
 346 "               LDR     R7, =0x420C \n"
 347 "               ORR     R0, R0, #1 \n"
 348 "               STR     R0, [R4,#8] \n"
 349 "               LDRH    R0, [R5] \n"
 350 "               CMP     R0, R7 \n"
 351 "               BEQ     loc_FF98ADB8 \n"
 352 "               LDRH    R0, [R5,#0x9A] \n"
 353 "               CMP     R0, #3 \n"
 354 "               BEQ     loc_FF98AE00 \n"
 355 "               LDR     R0, [R4,#0xC] \n"
 356 "               CMP     R0, #1 \n"
 357 "               BLS     loc_FF98ADC4 \n"
 358 "               LDRH    R0, [R5,#0x98] \n"
 359 "               CMP     R0, #0 \n"
 360 "               BNE     loc_FF98AE00 \n"
 361 "               LDRH    R0, [R5,#0x94] \n"
 362 "               CMP     R0, #2 \n"
 363 "               BNE     loc_FF98ADD0 \n"
 364 "               BL      sub_FF88402C \n"
 365 "               LDRH    R0, [R5] \n"
 366 "               CMP     R0, R7 \n"
 367 "               BEQ     loc_FF98ADB8 \n"
 368 "               LDRH    R0, [R5,#0x9A] \n"
 369 "               CMP     R0, #3 \n"
 370 "               BEQ     loc_FF98AE00 \n"
 371 "               LDR     R0, [R4,#0xC] \n"
 372 "               CMP     R0, #1 \n"
 373 "               BLS     loc_FF98ADC4 \n"
 374 "               LDRH    R0, [R5,#0x98] \n"
 375 "               CMP     R0, #0 \n"
 376 "               BNE     loc_FF98AE00 \n"
 377 "               LDRH    R0, [R5,#0x94] \n"
 378 "               CMP     R0, #2 \n"
 379 "               BEQ     loc_FF98ADFC \n"
 380 "               B       loc_FF98ADD0 \n"
 381 "loc_FF98ADB8: \n"
 382 "               LDRH    R0, [R5,#0x9A] \n"
 383 "               CMP     R0, #3 \n"
 384 "               BEQ     loc_FF98AE00 \n"
 385 "loc_FF98ADC4: \n"
 386 "               LDRH    R0, [R5,#0x98] \n"
 387 "               CMP     R0, #0 \n"
 388 "               BNE     loc_FF98AE00 \n"
 389 "loc_FF98ADD0: \n"
 390 "               LDRH    R0, [R5,#0x94] \n"
 391 "               CMP     R0, #1 \n"
 392 "               BNE     loc_FF98AE00 \n"
 393 "               LDRH    R0, [R5] \n"
 394 "               CMP     R0, R7 \n"
 395 "               LDRNE   R0, [R4,#0xC] \n"
 396 "               CMPNE   R0, #1 \n"
 397 "               BLS     loc_FF98AE00 \n"
 398 "               LDR     R0, [R4,#0x10] \n"
 399 "               CMP     R0, #1 \n"
 400 "               BNE     loc_FF98AE00 \n"
 401 "loc_FF98ADFC: \n"
 402 "               BL      sub_FF98C2D8 \n"
 403 "loc_FF98AE00: \n"
 404 "               BL      sub_FF98C2A0 \n"
 405 "               BL      sub_FF8839C4 \n"
 406 "               LDR     R0, [R5,#0x24] \n"
 407 "               CMP     R0, #0 \n"
 408 "               BNE     loc_FF98AE98 \n"
 409 "               MOV     R0, R4 \n"
 410 "               BL      sub_FFAF907C \n"
 411 "               TST     R0, #1 \n"
 412 "               BNE     locret_FF98AEBC \n"
 413 "               MOV     R0, R4 \n"
 414 "               BL      sub_FFAF949C \n"
 415 "               BL      sub_FF98B498 \n"
 416 "               MOV     R6, #1 \n"
 417 "               MOV     R0, #2 \n"
 418 "               BL      sub_FF87EFF8 \n"
 419 
 420 "               BL      wait_until_remote_button_is_released \n"        // added
 421 "               BL      capt_seq_hook_set_nr \n"                                        // added
 422 
 423 "               LDRH    R0, [R5] \n"
 424 "               SUB     R12, R0, #0x8200 \n"
 425 "               SUBS    R12, R12, #0x2D \n"
 426 "               BNE     loc_FF98AE88 \n"
 427 "               MOV     R2, #2 \n"
 428 "               ADD     R0, R2, #0x15C \n"
 429 "               MOV     R1, SP \n"
 430 "               STR     R6, [SP] \n"
 431 "               BL      sub_FF896414 \n"                                // PT_GetPropertyCaseString
 432 "               TST     R0, #1 \n"
 433 "               MOVNE   R1, #0xC3 \n"
 434 "               LDRNE   R0, =0xFF8962D0 \n"                     // "SsCaptureSeq.c"
 435 "               BLNE    sub_FF81EB78 \n"                        // DebugAssert
 436 "               LDRH    R0, [SP] \n"
 437 "               CMP     R0, #1 \n"
 438 "               STRHI   R6, [R4,#0xE4] \n"
 439 "               BHI     loc_FF98AEA8 \n"
 440 "               MOV     R0, #0 \n"
 441 "               STR     R0, [R4,#0xE4] \n"
 442 "loc_FF98AE88: \n"
 443 "               MOV     R0, R4 \n"
 444 
 445 // ** the following function captures the image **
 446 "               BL      sub_FFAF9990 \n"
 447 
 448 "               BL     capt_seq_hook_raw_here \n"               // added
 449 
 450 "               MOV     R6, R0 \n"
 451 "               B       loc_FF98AEAC \n"
 452 "loc_FF98AE98: \n"
 453 "               LDR     R0, =0x7514 \n"
 454 "               LDR     R0, [R0] \n"
 455 "               CMP     R0, #0 \n"
 456 "               BEQ     loc_FF98AEAC \n"
 457 "loc_FF98AEA8: \n"
 458 "               MOV     R6, #0x1D \n"
 459 "loc_FF98AEAC: \n"
 460 "               MOV     R1, R6 \n"
 461 "               MOV     R0, R4 \n"
 462 "               LDMFD   SP!, {R3-R7,LR} \n"
 463 "               B       sub_FFAF9188 \n"
 464 "locret_FF98AEBC: \n"
 465 "               LDMFD   SP!, {R3-R7,PC} \n"
 466         );
 467 }
 468 
 469 
 470 /*----------------------------------------------------------------------
 471         exp_drv_task()
 472 -----------------------------------------------------------------------*/
 473 void __attribute__((naked,noinline)) exp_drv_task()
 474 {
 475         asm volatile(
 476 "               STMFD   SP!, {R4-R8,LR} \n"
 477 "               SUB     SP, SP, #0x20 \n"
 478 "               LDR     R8, =0xBB8 \n"
 479 "               LDR     R7, =0x4888 \n"
 480 "               LDR     R5, =0x59818 \n"
 481 "               MOV     R0, #0 \n"
 482 "               ADD     R6, SP, #0x10 \n"
 483 "               STR     R0, [SP,#0x0c] \n"
 484 
 485 "loc_FF8CF1C8: \n"
 486 "               LDR     R0, [R7,#0x20] \n"
 487 "               MOV     R2, #0 \n"
 488 "               ADD     R1, SP, #0x1c \n"
 489 "               BL      sub_FF83A2F8 \n"
 490 "               LDR     R0, [SP,#0x0C] \n"
 491 "               CMP     R0, #1 \n"
 492 "               BNE     loc_FF8CF214 \n"
 493 "               LDR     R0, [SP,#0x1c] \n"
 494 "               LDR     R0, [R0] \n"
 495 "               CMP     R0, #0x14 \n"
 496 "               CMPNE   R0, #0x15 \n"
 497 "               CMPNE   R0, #0x16 \n"
 498 "               CMPNE   R0, #0x17 \n"
 499 "               BEQ     loc_FF8CF378 \n"
 500 "               CMP     R0, #0x29 \n"
 501 "               BEQ     loc_FF8CF300 \n"
 502 "               ADD     R1, SP, #0x0c \n"
 503 "               MOV     R0, #0 \n"
 504 "               BL      sub_FF8CF158 \n"
 505 
 506 "loc_FF8CF214: \n"
 507 "               LDR     R0, [SP,#0x1c] \n"
 508 "               LDR     R1, [R0] \n"
 509 "               CMP     R1, #0x2F \n"
 510 "               BNE     loc_FF8CF244 \n"
 511 "               LDR     R0, [SP,#0x1c] \n"
 512 "               BL      sub_FF8D053C \n"
 513 "               LDR     R0, [R7,#0x1C] \n"
 514 "               MOV     R1, #1 \n"
 515 "               BL      sub_FF88E1E4 \n"
 516 "               BL      sub_FF81EB30 \n"                        // eventproc_export_ExitTask
 517 "               ADD     SP, SP, #0x20 \n"
 518 "               LDMFD   SP!, {R4-R8,PC} \n"
 519 
 520 "loc_FF8CF244: \n"
 521 "               CMP     R1, #0x2E \n"
 522 "               BNE     loc_FF8CF260 \n"
 523 "               LDR     R2, [R0,#0x8C]! \n"
 524 "               LDR     R1, [R0,#4] \n"
 525 "               MOV     R0, R1 \n"
 526 "               BLX     R2 \n"
 527 "               B       loc_FF8CF824 \n"
 528 
 529 "loc_FF8CF260: \n"
 530 "               CMP     R1, #0x27 \n"
 531 "               BNE     loc_FF8CF2B0 \n"
 532 "               LDR     R0, [R7,#0x1C] \n"
 533 "               MOV     R1, #0x80 \n"
 534 "               BL      sub_FF88E218 \n"
 535 "               LDR     R0, =0xFF8CAFB4 \n"
 536 "               MOV     R1, #0x80 \n"
 537 "               BL      sub_FF97D684 \n"
 538 "               LDR     R0, [R7,#0x1C] \n"
 539 "               MOV     R2, R8 \n"
 540 "               MOV     R1, #0x80 \n"
 541 "               BL      sub_FF88E124 \n"
 542 "               TST     R0, #1 \n"
 543 "               LDRNE   R1, =0x1096 \n"
 544 "               BNE     loc_FF8CF36C \n"
 545 
 546 "loc_FF8CF29C: \n"
 547 "               LDR     R1, [SP,#0x1c] \n"
 548 "               LDR     R0, [R1,#0x90] \n"
 549 "               LDR     R1, [R1,#0x8C] \n"
 550 "               BLX     R1 \n"
 551 "               B       loc_FF8CF824 \n"
 552 
 553 "loc_FF8CF2B0: \n"
 554 "               CMP     R1, #0x28 \n"
 555 "               BNE     loc_FF8CF2F8 \n"
 556 "               ADD     R1, SP, #0x0c \n"
 557 "               BL      sub_FF8CF158 \n"
 558 "               LDR     R0, [R7,#0x1C] \n"
 559 "               MOV     R1, #0x100 \n"
 560 "               BL      sub_FF88E218 \n"
 561 "               LDR     R0, =0xFF8CAFC4 \n"
 562 "               MOV     R1, #0x100 \n"
 563 "               BL      sub_FF97E014 \n"
 564 "               LDR     R0, [R7,#0x1C] \n"
 565 "               MOV     R2, R8 \n"
 566 "               MOV     R1, #0x100 \n"
 567 "               BL      sub_FF88E124 \n"
 568 "               TST     R0, #1 \n"
 569 "               BEQ     loc_FF8CF29C \n"
 570 "               LDR     R1, =0x10A0 \n"
 571 "               B       loc_FF8CF36C \n"
 572 
 573 "loc_FF8CF2F8: \n"
 574 "               CMP     R1, #0x29 \n"
 575 "               BNE     loc_FF8CF310 \n"
 576 
 577 "loc_FF8CF300: \n"
 578 "               LDR     R0, [SP,#0x1c] \n"
 579 "               ADD     R1, SP, #0x0c \n"
 580 "               BL      sub_FF8CF158 \n"
 581 "               B       loc_FF8CF29C \n"
 582 
 583 "loc_FF8CF310: \n"
 584 "               CMP     R1, #0x2C \n"
 585 "               BNE     loc_FF8CF328 \n"
 586 "               BL      sub_FF8BD5E0 \n"
 587 "               BL      sub_FF8BE1EC \n"
 588 "               BL      sub_FF8BDD58 \n"
 589 "               B       loc_FF8CF29C \n"
 590 
 591 "loc_FF8CF328: \n"
 592 "               CMP     R1, #0x2D \n"
 593 "               BNE     loc_FF8CF378 \n"
 594 "               LDR     R0, [R7,#0x1C] \n"
 595 "               MOV     R1, #4 \n"
 596 "               BL      sub_FF88E218 \n"
 597 "               LDR     R1, =0xFF8CAFE4 \n"
 598 "               LDR     R0, =0xFFFFF400 \n"
 599 "               MOV     R2, #4 \n"
 600 "               BL      sub_FF8BD05C \n"
 601 "               BL      sub_FF8BD2E4 \n"
 602 "               LDR     R0, [R7,#0x1C] \n"
 603 "               MOV     R2, R8 \n"
 604 "               MOV     R1, #4 \n"
 605 "               BL      sub_FF88E040 \n"
 606 "               TST     R0, #1 \n"
 607 "               BEQ     loc_FF8CF29C \n"
 608 "               LDR     R1, =0x10C8 \n"
 609 
 610 "loc_FF8CF36C: \n"
 611 "               LDR     R0, =0xFF8CB66C  \n"                    // "ExpDrv.c
 612 "               BL      sub_FF81EB78 \n"                                // DebugAssert
 613 "               B       loc_FF8CF29C \n"
 614 
 615 "loc_FF8CF378: \n"
 616 "               LDR     R0, [SP,#0x1c] \n"
 617 "               MOV     R4, #1 \n"
 618 "               LDR     R1, [R0] \n"
 619 "               CMP     R1, #0x12 \n"
 620 "               CMPNE   R1, #0x13 \n"
 621 "               BNE     loc_FF8CF3E8 \n"
 622 "               LDR     R1, [R0,#0x7C] \n"
 623 "               ADD     R1, R1, R1,LSL#1 \n"
 624 "               ADD     R1, R0, R1,LSL#2 \n"
 625 "               SUB     R1, R1, #8 \n"
 626 "               LDMIA   R1, {R2-R4} \n"
 627 "               STMIA   R6, {R2-R4} \n"
 628 "               BL      sub_FF8CD8C0 \n"
 629 "               LDR     R0, [SP,#0x1c] \n"
 630 "               LDR     R1, [R0,#0x7C] \n"
 631 "               LDR     R3, [R0,#0x8C] \n"
 632 "               LDR     R2, [R0,#0x90] \n"
 633 "               ADD     R0, R0, #4 \n"
 634 "               BLX     R3 \n"
 635 "               LDR     R0, [SP,#0x1c] \n"
 636 "               BL      sub_FF8D0950 \n"
 637 "               LDR     R0, [SP,#0x1c] \n"
 638 "               LDR     R1, [R0,#0x7C] \n"
 639 "               LDR     R3, [R0,#0x94] \n"
 640 "               LDR     R2, [R0,#0x98] \n"
 641 "               ADD     R0, R0, #4 \n"
 642 "               BLX     R3 \n"
 643 "               B       loc_FF8CF760 \n"
 644 
 645 "loc_FF8CF3E8: \n"
 646 "               CMP     R1, #0x14 \n"
 647 "               CMPNE   R1, #0x15 \n"
 648 "               CMPNE   R1, #0x16 \n"
 649 "               CMPNE   R1, #0x17 \n"
 650 "               BNE     loc_FF8CF4A0 \n"
 651 "               ADD     R3, SP, #0x0c \n"
 652 "               MOV     R2, SP \n"
 653 "               ADD     R1, SP, #0x10 \n"
 654 "               BL      sub_FF8CDB2C \n"
 655 "               CMP     R0, #1 \n"
 656 "               MOV     R4, R0 \n"
 657 "               CMPNE   R4, #5 \n"
 658 "               BNE     loc_FF8CF43C \n"
 659 "               LDR     R0, [SP,#0x1c] \n"
 660 "               MOV     R2, R4 \n"
 661 "               LDR     R1, [R0,#0x7C]! \n"
 662 "               LDR     R12, [R0,#0x10]! \n"
 663 "               LDR     R3, [R0,#4] \n"
 664 "               MOV     R0, SP \n"
 665 "               BLX     R12 \n"
 666 "               B       loc_FF8CF474 \n"
 667 
 668 "loc_FF8CF43C: \n"
 669 "               LDR     R0, [SP,#0x1c] \n"
 670 "               CMP     R4, #2 \n"
 671 "               LDR     R3, [R0,#0x90] \n"
 672 "               CMPNE   R4, #6 \n"
 673 "               BNE     loc_FF8CF488 \n"
 674 "               LDR     R12, [R0,#0x8C] \n"
 675 "               MOV     R0, SP \n"
 676 "               MOV     R2, R4 \n"
 677 "               MOV     R1, #1 \n"
 678 "               BLX     R12 \n"
 679 "               LDR     R0, [SP,#0x1c] \n"
 680 "               MOV     R2, SP \n"
 681 "               ADD     R1, SP, #0x10 \n"
 682 "               BL      sub_FF8CEEA4 \n"
 683 
 684 "loc_FF8CF474: \n"
 685 "               LDR     R0, [SP,#0x1c] \n"
 686 "               LDR     R2, [SP,#0x0c] \n"
 687 "               MOV     R1, R4 \n"
 688 "               BL      sub_FF8CF0F8 \n"
 689 "               B       loc_FF8CF760 \n"
 690 
 691 "loc_FF8CF488: \n"
 692 "               LDR     R1, [R0,#0x7C] \n"
 693 "               LDR     R12, [R0,#0x8C] \n"
 694 "               ADD     R0, R0, #4 \n"
 695 "               MOV     R2, R4 \n"
 696 "               BLX     R12 \n"
 697 "               B       loc_FF8CF760 \n"
 698 
 699 "loc_FF8CF4A0: \n"
 700 "               CMP     R1, #0x23 \n"
 701 "               CMPNE   R1, #0x24 \n"
 702 "               BNE     loc_FF8CF540 \n"
 703 "               LDR     R1, [R0,#0x7C] \n"
 704 "               ADD     R1, R1, R1,LSL#1 \n"
 705 "               ADD     R1, R0, R1,LSL#2 \n"
 706 "               SUB     R1, R1, #8 \n"
 707 "               LDMIA   R1, {R2-R4} \n"
 708 "               STMIA   R6, {R2-R4} \n"
 709 "               BL      sub_FF8CC948 \n"
 710 "               LDR     R0, [SP,#0x1c] \n"
 711 "               LDR     R1, [R0,#0x7C] \n"
 712 "               LDR     R3, [R0,#0x8C] \n"
 713 "               LDR     R2, [R0,#0x90] \n"
 714 "               ADD     R0, R0, #4 \n"
 715 "               BLX     R3 \n"
 716 "               LDR     R0, [SP,#0x1c] \n"
 717 "               BL      sub_FF8CCD94 \n"
 718 "               B       loc_FF8CF760 \n"
 719 
 720 "loc_FF8CF540: \n"
 721 "               ADD     R1, R0, #4 \n"
 722 "               LDMIA   R1, {R2,R3,R12} \n"
 723 "               STMIA   R6, {R2,R3,R12} \n"
 724 "               LDR     R1, [R0] \n"
 725 "               CMP     R1, #0x26 \n"
 726 "               ADDLS   PC, PC, R1,LSL#2 \n"
 727 "               B       loc_FF8CF740 \n"
 728 
 729 "loc_FF8CF55C: \n"
 730 "               B       loc_FF8CF5F8 \n"
 731 
 732 "loc_FF8CF560: \n"
 733 "               B       loc_FF8CF5F8 \n"
 734 
 735 "loc_FF8CF564: \n"
 736 "               B       loc_FF8CF600 \n"
 737 
 738 "loc_FF8CF568: \n"
 739 "               B       loc_FF8CF608 \n"
 740 
 741 "loc_FF8CF56C: \n"
 742 "               B       loc_FF8CF608 \n"
 743 
 744 "loc_FF8CF570: \n"
 745 "               B       loc_FF8CF608 \n"
 746 
 747 "loc_FF8CF574: \n"
 748 "               B       loc_FF8CF5F8 \n"
 749 
 750 "loc_FF8CF578: \n"
 751 "               B       loc_FF8CF600 \n"
 752 
 753 "loc_FF8CF57C: \n"
 754 "               B       loc_FF8CF608 \n"
 755 
 756 "loc_FF8CF580: \n"
 757 "               B       loc_FF8CF608 \n"
 758 
 759 "loc_FF8CF584: \n"
 760 "               B       loc_FF8CF620 \n"
 761 
 762 "loc_FF8CF588: \n"
 763 "               B       loc_FF8CF620 \n"
 764 
 765 "loc_FF8CF58C: \n"
 766 "               B       loc_FF8CF72C \n"
 767 
 768 "loc_FF8CF590: \n"
 769 "               B       loc_FF8CF734 \n"
 770 
 771 "loc_FF8CF594: \n"
 772 "               B       loc_FF8CF734 \n"
 773 
 774 "loc_FF8CF598: \n"
 775 "               B       loc_FF8CF734 \n"
 776 
 777 "loc_FF8CF59C: \n"
 778 "               B       loc_FF8CF734 \n"
 779 
 780 "loc_FF8CF5A0: \n"
 781 "               B       loc_FF8CF73C \n"
 782 
 783 "loc_FF8CF5A4: \n"
 784 "               B       loc_FF8CF740 \n"
 785 
 786 "loc_FF8CF5A8: \n"
 787 "               B       loc_FF8CF740 \n"
 788 
 789 "loc_FF8CF5AC: \n"
 790 "               B       loc_FF8CF740 \n"
 791 
 792 "loc_FF8CF5B0: \n"
 793 "               B       loc_FF8CF740 \n"
 794 
 795 "loc_FF8CF5B4: \n"
 796 "               B       loc_FF8CF740 \n"
 797 
 798 "loc_FF8CF5B8: \n"
 799 "               B       loc_FF8CF740 \n"
 800 
 801 "loc_FF8CF5BC: \n"
 802 "               B       loc_FF8CF610 \n"
 803 
 804 "loc_FF8CF5C0: \n"
 805 "               B       loc_FF8CF618 \n"
 806 
 807 "loc_FF8CF5C4: \n"
 808 "               B       loc_FF8CF618 \n"
 809 
 810 "loc_FF8CF5C8: \n"
 811 "               B       loc_FF8CF62C \n"
 812 
 813 "loc_FF8CF5CC: \n"
 814 "               B       loc_FF8CF62C \n"
 815 
 816 "loc_FF8CF5D0: \n"
 817 "               B       loc_FF8CF634 \n"
 818 
 819 "loc_FF8CF5D4: \n"
 820 "               B       loc_FF8CF66C \n"
 821 
 822 "loc_FF8CF5D8: \n"
 823 "               B       loc_FF8CF6A4 \n"
 824 
 825 "loc_FF8CF5DC: \n"
 826 "               B       loc_FF8CF6DC \n"
 827 
 828 "loc_FF8CF5E0: \n"
 829 "               B       loc_FF8CF714 \n"
 830 
 831 "loc_FF8CF5E4: \n"
 832 "               B       loc_FF8CF714 \n"
 833 
 834 "loc_FF8CF5E8: \n"
 835 "               B       loc_FF8CF740 \n"
 836 
 837 "loc_FF8CF5EC: \n"
 838 "               B       loc_FF8CF740 \n"
 839 
 840 "loc_FF8CF5F0: \n"
 841 "               B       loc_FF8CF71C \n"
 842 
 843 "loc_FF8CF5F4: \n"
 844 "               B       loc_FF8CF724 \n"
 845 
 846 "loc_FF8CF5F8: \n"
 847 // jumptable FF8CF554 entries 0,1,6
 848 "               BL      sub_FF8CB4F4 \n"
 849 "               B       loc_FF8CF740 \n"
 850 
 851 "loc_FF8CF600: \n"
 852 // jumptable FF8CF554 entries 2,7
 853 "               BL      sub_FF8CB790 \n"
 854 "               B       loc_FF8CF740 \n"
 855 
 856 "loc_FF8CF608: \n"
 857 // jumptable FF8CF554 entries 3-5,8,9
 858 "               BL      sub_FF8CB9B8 \n"
 859 "               B       loc_FF8CF740 \n"
 860 
 861 "loc_FF8CF610: \n"
 862 // jumptable FF8CF554 entry 24
 863 "               BL      sub_FF8CBC90 \n"
 864 "               B       loc_FF8CF740 \n"
 865 
 866 "loc_FF8CF618: \n"
 867 // jumptable FF8CF554 entries 25,26
 868 "               BL      sub_FF8CBEA8 \n"
 869 "               B       loc_FF8CF740 \n"
 870 
 871 "loc_FF8CF620: \n"
 872 // jumptable FF8CF554 entries 10,11
 873 
 874 //"             BL      sub_FF8CC1CC \n"
 875 "               BL      sub_FF8CC1CC_my \n"                             // patched
 876 
 877 "               MOV     R4, #0 \n"
 878 "               B       loc_FF8CF740 \n"
 879 
 880 "loc_FF8CF62C: \n"
 881 // jumptable FF8CF554 entries 27,28
 882 "               BL      sub_FF8CC314 \n"
 883 "               B       loc_FF8CF740 \n"
 884 
 885 "loc_FF8CF634: \n"
 886 // jumptable FF8CF554 entry 29
 887 "               LDRH    R1, [R0,#4] \n"
 888 "               STRH    R1, [SP,#0x10] \n"
 889 "               LDRH    R1, [R5,#2] \n"
 890 "               STRH    R1, [SP,#0x12] \n"
 891 "               LDRH    R1, [R5,#4] \n"
 892 "               STRH    R1, [SP,#0x14] \n"
 893 "               LDRH    R1, [R5,#6] \n"
 894 "               STRH    R1, [SP,#0x16] \n"
 895 "               LDRH    R1, [R0,#0xC] \n"
 896 "               STRH    R1, [SP,#0x18] \n"
 897 "               LDRH    R1, [R5,#0xA] \n"
 898 "               STRH    R1, [SP,#0x1a] \n"
 899 "               BL      sub_FF8D0648 \n"
 900 "               B       loc_FF8CF740 \n"
 901 
 902 "loc_FF8CF66C: \n"
 903 // jumptable FF8CF554 entry 30
 904 "               LDRH    R1, [R0,#4] \n"
 905 "               STRH    R1, [SP,#0x10] \n"
 906 "               LDRH    R1, [R5,#2] \n"
 907 "               STRH    R1, [SP,#0x12] \n"
 908 "               LDRH    R1, [R5,#4] \n"
 909 "               STRH    R1, [SP,#0x14] \n"
 910 "               LDRH    R1, [R5,#6] \n"
 911 "               STRH    R1, [SP,#0x16] \n"
 912 "               LDRH    R1, [R5,#8] \n"
 913 "               STRH    R1, [SP,#0x18] \n"
 914 "               LDRH    R1, [R5,#0xA] \n"
 915 "               STRH    R1, [SP,#0x1a] \n"
 916 "               BL      sub_FF8D0750 \n"
 917 "               B       loc_FF8CF740 \n"
 918 
 919 "loc_FF8CF6A4: \n"
 920 // jumptable FF8CF554 entry 31
 921 "               LDRH    R1, [R5] \n"
 922 "               STRH    R1, [SP,#0x10] \n"
 923 "               LDRH    R1, [R0,#6] \n"
 924 "               STRH    R1, [SP,#0x12] \n"
 925 "               LDRH    R1, [R5,#4] \n"
 926 "               STRH    R1, [SP,#0x14] \n"
 927 "               LDRH    R1, [R5,#6] \n"
 928 "               STRH    R1, [SP,#0x16] \n"
 929 "               LDRH    R1, [R5,#8] \n"
 930 "               STRH    R1, [SP,#0x18] \n"
 931 "               LDRH    R1, [R5,#0xA] \n"
 932 "               STRH    R1, [SP,#0x1a] \n"
 933 "               BL      sub_FF8D0804 \n"
 934 "               B       loc_FF8CF740 \n"
 935 
 936 "loc_FF8CF6DC: \n"
 937 // jumptable FF8CF554 entry 32
 938 "               LDRH    R1, [R5] \n"
 939 "               STRH    R1, [SP,#0x10] \n"
 940 "               LDRH    R1, [R5,#2] \n"
 941 "               STRH    R1, [SP,#0x12] \n"
 942 "               LDRH    R1, [R5,#4] \n"
 943 "               STRH    R1, [SP,#0x14] \n"
 944 "               LDRH    R1, [R5,#6] \n"
 945 "               STRH    R1, [SP,#0x16] \n"
 946 "               LDRH    R1, [R0,#0xC] \n"
 947 "               STRH    R1, [SP,#0x18] \n"
 948 "               LDRH    R1, [R5,#0xA] \n"
 949 "               STRH    R1, [SP,#0x1a] \n"
 950 "               BL      sub_FF8D08AC \n"
 951 "               B       loc_FF8CF740 \n"
 952 
 953 "loc_FF8CF714: \n"
 954 // jumptable FF8CF554 entries 33,34
 955 "               BL      sub_FF8CC720 \n"
 956 "               B       loc_FF8CF740 \n"
 957 
 958 "loc_FF8CF71C: \n"
 959 // jumptable FF8CF554 entry 37
 960 "               BL      sub_FF8CCE98 \n"
 961 "               B       loc_FF8CF740 \n"
 962 
 963 "loc_FF8CF724: \n"
 964 // jumptable FF8CF554 entry 38
 965 "               BL      sub_FF8CD134 \n"
 966 "               B       loc_FF8CF740 \n"
 967 
 968 "loc_FF8CF72C: \n"
 969 // jumptable FF8CF554 entry 12
 970 "               BL      sub_FF8CD314 \n"
 971 "               B       loc_FF8CF740 \n"
 972 
 973 "loc_FF8CF734: \n"
 974 // jumptable FF8CF554 entries 13-16
 975 "               BL      sub_FF8CD548 \n"
 976 "               B       loc_FF8CF740 \n"
 977 
 978 "loc_FF8CF73C: \n"
 979 // jumptable FF8CF554 entry 17
 980 "               BL      sub_FF8CD6B8 \n"
 981 
 982 "loc_FF8CF740: \n"
 983 // jumptable FF8CF554 default entry
 984 // jumptable FF8CF554 entries 18-23,35,36
 985 "               LDR     R0, [SP,#0x1c] \n"
 986 "               LDR     R1, [R0,#0x7C] \n"
 987 "               LDR     R3, [R0,#0x8C] \n"
 988 "               LDR     R2, [R0,#0x90] \n"
 989 "               ADD     R0, R0, #4 \n"
 990 "               BLX     R3 \n"
 991 "               CMP     R4, #1 \n"
 992 "               BNE     loc_FF8CF7A8 \n"
 993 
 994 "loc_FF8CF760: \n"
 995 "               LDR     R0, [SP,#0x1c] \n"
 996 "               MOV     R2, #0xC \n"
 997 "               LDR     R1, [R0,#0x7C] \n"
 998 "               ADD     R1, R1, R1,LSL#1 \n"
 999 "               ADD     R0, R0, R1,LSL#2 \n"
1000 "               SUB     R4, R0, #8 \n"
1001 "               LDR     R0, =0x59818 \n"
1002 "               ADD     R1, SP, #0x10 \n"
1003 "               BL      sub_FFB9F0D4 \n"
1004 "               LDR     R0, =0x59824 \n"
1005 "               MOV     R2, #0xC \n"
1006 "               ADD     R1, SP, #0x10 \n"
1007 "               BL      sub_FFB9F0D4 \n"
1008 "               LDR     R0, =0x59830 \n"
1009 "               MOV     R2, #0xC \n"
1010 "               MOV     R1, R4 \n"
1011 "               BL      sub_FFB9F0D4 \n"
1012 "               B       loc_FF8CF824 \n"
1013 
1014 "loc_FF8CF7A8: \n"
1015 "               LDR     R0, [SP,#0x1c] \n"
1016 "               MOV     R3, #1 \n"
1017 "               LDR     R0, [R0] \n"
1018 "               CMP     R0, #0xB \n"
1019 "               BNE     loc_FF8CF7F0 \n"
1020 "               MOV     R2, #0 \n"
1021 "               STRD    R2, [SP] \n"
1022 "               MOV     R2, #1 \n"
1023 "               MOV     R1, #1 \n"
1024 "               MOV     R0, #0 \n"
1025 "               BL      sub_FF8CB2D4 \n"
1026 "               MOV     R3, #1 \n"
1027 "               MOV     R2, #0 \n"
1028 "               STRD    R2, [SP] \n"
1029 "               MOV     R2, #1 \n"
1030 "               MOV     R1, #1 \n"
1031 "               MOV     R0, #0 \n"
1032 "               B       loc_FF8CF820 \n"
1033 
1034 "loc_FF8CF7F0: \n"
1035 "               MOV     R2, #1 \n"
1036 "               STRD    R2, [SP] \n"
1037 "               MOV     R3, #1 \n"
1038 "               MOV     R1, #1 \n"
1039 "               MOV     R0, #1 \n"
1040 "               BL      sub_FF8CB2D4 \n"
1041 "               MOV     R3, #1 \n"
1042 "               MOV     R2, #1 \n"
1043 "               MOV     R1, #1 \n"
1044 "               MOV     R0, #1 \n"
1045 "               STR     R3, [SP] \n"
1046 "               STR     R3, [SP,#0x04] \n"
1047 
1048 "loc_FF8CF820: \n"
1049 "               BL      sub_FF8CB43C \n"
1050 
1051 "loc_FF8CF824: \n"
1052 "               LDR     R0, [SP,#0x1c] \n"
1053 "               BL      sub_FF8D053C \n"
1054 "               B       loc_FF8CF1C8 \n"
1055         );
1056 }
1057 
1058 
1059 /*----------------------------------------------------------------------
1060         sub_FF8CC1CC_my()
1061 -----------------------------------------------------------------------*/
1062 void __attribute__((naked,noinline)) sub_FF8CC1CC_my()
1063 {
1064         asm volatile (
1065 "               STMFD   SP!, {R4-R8,LR} \n"
1066 "               LDR     R7, =0x4888 \n"
1067 "               MOV     R4, R0 \n"
1068 "               LDR     R0, [R7,#0x1C] \n"
1069 "               MOV     R1, #0x3E \n"
1070 "               BL      sub_FF88E218 \n"
1071 "               LDRSH   R0, [R4,#4] \n"
1072 "               MOV     R2, #0 \n"
1073 "               MOV     R1, #0 \n"
1074 "               BL      sub_FF8CB038 \n"
1075 "               MOV     R5, R0 \n"
1076 "               LDRSH   R0, [R4,#6] \n"
1077 "               BL      sub_FF8CB148 \n"
1078 "               LDRSH   R0, [R4,#8] \n"
1079 "               BL      sub_FF8CB1A0 \n"
1080 "               LDRSH   R0, [R4,#0xA] \n"
1081 "               BL      sub_FF8CB1F8 \n"
1082 "               LDRSH   R0, [R4,#0xC] \n"
1083 "               MOV     R1, #0 \n"
1084 "               BL      sub_FF8CB250 \n"
1085 "               MOV     R6, R0 \n"
1086 "               LDRSH   R0, [R4,#0xE] \n"
1087 "               BL      sub_FF8D05E8 \n"
1088 "               LDR     R0, [R4] \n"
1089 "               LDR     R8, =0x59830 \n"
1090 "               CMP     R0, #0xB \n"
1091 "               MOVEQ   R5, #0 \n"
1092 "               MOVEQ   R6, #0 \n"
1093 "               BEQ     loc_FF8CC268 \n"
1094 "               CMP     R5, #1 \n"
1095 "               BNE     loc_FF8CC268 \n"
1096 "               LDRSH   R0, [R4,#4] \n"
1097 "               LDR     R1, =0xFF8CAFA4 \n"
1098 "               MOV     R2, #2 \n"
1099 "               BL      sub_FF97D9D0 \n"
1100 "               STRH    R0, [R4,#4] \n"
1101 "               MOV     R0, #0 \n"
1102 "               STR     R0, [R7,#0x28] \n"
1103 "               B       loc_FF8CC270 \n"
1104 
1105 "loc_FF8CC268: \n"
1106 "               LDRH    R0, [R8] \n"
1107 "               STRH    R0, [R4,#4] \n"
1108 
1109 "loc_FF8CC270: \n"
1110 "               CMP     R6, #1 \n"
1111 "               LDRNEH  R0, [R8,#8] \n"
1112 "               BNE     loc_FF8CC28C \n"
1113 "               LDRSH   R0, [R4,#0xC] \n"
1114 "               LDR     R1, =0xFF8CB028 \n"
1115 "               MOV     R2, #0x20 \n"
1116 "               BL      sub_FF8D0604 \n"
1117 
1118 "loc_FF8CC28C: \n"
1119 "               STRH    R0, [R4,#0xC] \n"
1120 "               LDRSH   R0, [R4,#6] \n"
1121 
1122 //"             BL      sub_FF8BD350 \n"
1123 "               BL      sub_FF8BD350_my \n"                             // patched
1124 
1125 "               LDRSH   R0, [R4,#8] \n"
1126 "               MOV     R1, #1 \n"
1127 "               BL      sub_FF8BDAA0 \n"
1128 "               MOV     R1, #0 \n"
1129 "               ADD     R0, R4, #8 \n"
1130 "               BL      sub_FF8BDB28 \n"
1131 "               LDRSH   R0, [R4,#0xE] \n"
1132 "               BL      sub_FF8C5F98 \n"
1133 "               LDR     R4, =0xBB8 \n"
1134 "               CMP     R5, #1 \n"
1135 "               BNE     loc_FF8CC2E4 \n"
1136 "               LDR     R0, [R7,#0x1C] \n"
1137 "               MOV     R2, R4 \n"
1138 "               MOV     R1, #2 \n"
1139 "               BL      sub_FF88E124 \n"
1140 "               TST     R0, #1 \n"
1141 "               LDRNE   R1, =0x61E \n"
1142 "               LDRNE   R0, =0xFF8CB66C \n"             // "ExpDrv.c"
1143 "               BLNE    sub_FF81EB78 \n"                // DebugAssert
1144 
1145 "loc_FF8CC2E4: \n"
1146 "               CMP     R6, #1 \n"
1147 "               LDMNEFD SP!, {R4-R8,PC} \n"
1148 "               LDR     R0, [R7,#0x1C] \n"
1149 "               MOV     R2, R4 \n"
1150 "               MOV     R1, #0x20 \n"
1151 "               BL      sub_FF88E124 \n"
1152 "               TST     R0, #1 \n"
1153 "               LDRNE   R1, =0x623 \n"
1154 "               LDRNE   R0, =0xFF8CB66C \n"             // "ExpDrv.c"
1155 "               LDMNEFD SP!, {R4-R8,LR} \n"
1156 "               BNE     sub_FF81EB78 \n"                        // DebugAssert
1157 "               LDMFD   SP!, {R4-R8,PC} \n"
1158         );
1159 }
1160 
1161 
1162 /*----------------------------------------------------------------------
1163         sub_FF8BD350_my()
1164 -----------------------------------------------------------------------*/
1165 void __attribute__((naked,noinline)) sub_FF8BD350_my() {
1166         asm volatile (
1167 "               STMFD   SP!, {R4-R6,LR} \n"
1168 "               LDR     R5, =0x456C \n"
1169 "               MOV     R4, R0 \n"
1170 "               LDR     R0, [R5,#4] \n"
1171 "               CMP     R0, #1 \n"
1172 "               LDRNE   R1, =0x146 \n"
1173 "               LDRNE   R0, =0xFF8BD154 \n"             // "Shutter.c"
1174 "               BLNE    sub_FF81EB78 \n"                // DebugAssert
1175 "               CMN     R4, #0xC00 \n"
1176 "               LDREQSH R4, [R5,#2] \n"
1177 "               CMN     R4, #0xC00 \n"
1178 "               MOVEQ   R1, #0x14C \n"
1179 "               LDREQ   R0, =0xFF8BD154 \n"             // "Shutter.c"
1180 "               STRH    R4, [R5,#2] \n"
1181 "               BLEQ    sub_FF81EB78 \n"                // DebugAssert
1182 "               MOV     R0, R4 \n"
1183 
1184 //"             BL      sub_FFA50D94 \n"
1185 "               BL      apex2us \n"                             // patched
1186 
1187 "               MOV     R4, R0 \n"
1188 "               BL      sub_FF90988C \n"                        // nullsub_203
1189 "               MOV     R0, R4 \n"
1190 "               BL      sub_FF9162BC \n"
1191 "               TST     R0, #1 \n"
1192 "               LDRNE   R1, =0x151 \n"
1193 "               LDMNEFD SP!, {R4-R6,LR} \n"
1194 "               LDRNE   R0, =0xFF8BD154 \n"             // "Shutter.c"
1195 "               BNE     sub_FF81EB78 \n"                        // DebugAssert
1196 "               LDMFD   SP!, {R4-R6,PC} \n"
1197         );
1198 }
1199 

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