root/platform/sx130is/sub/101d/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_hook_set_nr_my
  2. capt_seq_task
  3. sub_FF96E09C_my
  4. sub_FFAB04E8_my
  5. exp_drv_task
  6. sub_FF8BCB0C_my
  7. sub_FF8ADF00_my

   1 #include "lolevel.h"
   2 #include "platform.h"
   3 #include "core.h"
   4 #include "conf.h"
   5 
   6 //static long *nrflag = (long*)0xC910; // FFAB026C
   7 
   8 static long *nrflag = (long*)0x5CB4;
   9 
  10 #include "../../../generic/capt_seq.c"
  11 
  12 
  13 int capt_seq_hook_set_nr_my(int orig)
  14 {
  15  
  16         camera_info.state.shutter_open_time = _time((void*)0); 
  17     camera_info.state.shutter_open_tick_count = get_tick_count();
  18 
  19         // Firmware also tests for 3 and 7, meaning unknown, so we don't touch them
  20         if (orig!=NR_ON && orig!=NR_OFF)
  21                 return orig;
  22 
  23         switch (conf.raw_nr){
  24         case NOISE_REDUCTION_OFF:
  25                 return NR_OFF;
  26         case NOISE_REDUCTION_ON:
  27                 return NR_ON;
  28         case NOISE_REDUCTION_AUTO_CANON: // leave it alone
  29         default: // shut up compiler 
  30                 return orig;
  31         };
  32 }
  33 
  34 
  35 /*----------------------------------------------------------------------
  36         capt_seq_task()
  37 -----------------------------------------------------------------------*/
  38 void __attribute__((naked,noinline)) capt_seq_task()
  39 {
  40   // FF87B564
  41         asm volatile (
  42 "               STMFD   SP!, {R3-R7,LR} \n"
  43 "               LDR     R6, =0x2C6C \n"
  44 "               LDR     R5, =0x38B44 \n"
  45 "loc_FF87B570: \n"
  46 "               LDR     R0, [R6,#4] \n"
  47 "               MOV     R2, #0 \n"
  48 "               MOV     R1, SP \n"
  49 "               BL      sub_FF839B8C \n"
  50 "               TST     R0, #1 \n"
  51 "               BEQ     loc_FF87B59C \n"
  52 "               LDR     R1, =0x43F \n"
  53 "               LDR     R0, =0xFF87B07C \n" // "SsShootTask.c"
  54 "               BL      _DebugAssert \n" 
  55 "               BL      sub_FF81EB30 \n" // eventproc_export_ExitTask
  56 "               LDMFD   SP!, {R3-R7,PC} \n"
  57 "loc_FF87B59C: \n"
  58 "               LDR     R0, [SP] \n"
  59 "               LDR     R1, [R0] \n"
  60 "               CMP     R1, #0x21 \n"
  61 "               ADDLS   PC, PC, R1,LSL#2 \n"
  62 "               B       loc_FF87B794 \n"
  63 "loc_FF87B5B0: \n"
  64 "               B       loc_FF87B638 \n"
  65 "loc_FF87B5B4: \n"
  66 "               B       loc_FF87B640 \n"
  67 "loc_FF87B5B8: \n"
  68 "               B       loc_FF87B658 \n"
  69 "loc_FF87B5BC: \n"
  70 "               B       loc_FF87B66C \n"
  71 "loc_FF87B5C0: \n"
  72 "               B       loc_FF87B664 \n"
  73 "loc_FF87B5C4: \n"
  74 "               B       loc_FF87B674 \n"
  75 "loc_FF87B5C8: \n"
  76 "               B       loc_FF87B67C \n"
  77 "loc_FF87B5CC: \n"
  78 "               B       loc_FF87B688 \n"
  79 "loc_FF87B5D0: \n"
  80 "               B       loc_FF87B694 \n"
  81 "loc_FF87B5D4: \n"
  82 "               B       loc_FF87B66C \n"
  83 "loc_FF87B5D8: \n"
  84 "               B       loc_FF87B69C \n"
  85 "loc_FF87B5DC: \n"
  86 "               B       loc_FF87B6A8 \n"
  87 "loc_FF87B5E0: \n"
  88 "               B       loc_FF87B6B0 \n"
  89 "loc_FF87B5E4: \n"
  90 "               B       loc_FF87B6B8 \n"
  91 "loc_FF87B5E8: \n"
  92 "               B       loc_FF87B6C0 \n"
  93 "loc_FF87B5EC: \n"
  94 "               B       loc_FF87B6C8 \n"
  95 "loc_FF87B5F0: \n"
  96 "               B       loc_FF87B6D0 \n"
  97 "loc_FF87B5F4: \n"
  98 "               B       loc_FF87B6D8 \n"
  99 "loc_FF87B5F8: \n"
 100 "               B       loc_FF87B6E0 \n"
 101 "loc_FF87B5FC: \n"
 102 "               B       loc_FF87B6E8 \n"
 103 "loc_FF87B600: \n"
 104 "               B       loc_FF87B6F0 \n"
 105 "loc_FF87B604: \n"
 106 "               B       loc_FF87B6F8 \n"
 107 "loc_FF87B608: \n"
 108 "               B       loc_FF87B700 \n"
 109 "loc_FF87B60C: \n"
 110 "               B       loc_FF87B70C \n"
 111 "loc_FF87B610: \n"
 112 "               B       loc_FF87B714 \n"
 113 "loc_FF87B614: \n"
 114 "               B       loc_FF87B720 \n"
 115 "loc_FF87B618: \n"
 116 "               B       loc_FF87B728 \n"
 117 "loc_FF87B61C: \n"
 118 "               B       loc_FF87B730 \n"
 119 "loc_FF87B620: \n"
 120 "               B       loc_FF87B738 \n"
 121 "loc_FF87B624: \n"
 122 "               B       loc_FF87B740 \n"
 123 "loc_FF87B628: \n"
 124 "               B       loc_FF87B748 \n"
 125 "loc_FF87B62C: \n"
 126 "               B       loc_FF87B750 \n"
 127 "loc_FF87B630: \n"
 128 "               B       loc_FF87B75C \n"
 129 "loc_FF87B634: \n"
 130 "               B       loc_FF87B7A0 \n"
 131 "loc_FF87B638: \n"
 132 // jumptable FF87B5A8 entry 0
 133 "               BL      sub_FF87BD1C \n"
 134 "               BL      shooting_expo_param_override \n"        // Added ------------>
 135 "               B       loc_FF87B680 \n"
 136 "loc_FF87B640: \n"
 137 // jumptable FF87B5A8 entry 1
 138 "               LDRH    R1, [R5] \n"
 139 "               SUB     R12, R1, #0x8200 \n"
 140 "               SUBS    R12, R12, #0x2E \n"
 141 "               LDRNE   R0, [R0,#0xC] \n"
 142 //"             BLNE    sub_FF96E09C \n"
 143 "               BLNE    sub_FF96E09C_my \n" // Patched ------------>
 144 "               B       loc_FF87B7A0 \n"
 145 "loc_FF87B658: \n"
 146 // jumptable FF87B5A8 entry 2
 147 "               MOV     R0, #1 \n"
 148 "               BL      sub_FF87BFA8 \n"
 149 "               B       loc_FF87B7A0 \n"
 150 "loc_FF87B664: \n"
 151 // jumptable FF87B5A8 entry 4
 152 "               BL      sub_FF87B9CC \n"
 153 "               B       loc_FF87B7A0 \n"
 154 "loc_FF87B66C: \n"
 155 // jumptable FF87B5A8 entries 3,9
 156 "               BL      sub_FF87BCFC \n"
 157 "               B       loc_FF87B7A0 \n"
 158 "loc_FF87B674: \n"
 159 // jumptable FF87B5A8 entry 5
 160 "               BL      sub_FF87BD04 \n"
 161 "               B       loc_FF87B7A0 \n"
 162 "loc_FF87B67C: \n"
 163 // jumptable FF87B5A8 entry 6
 164 "               BL      sub_FF87BEBC \n"
 165 "loc_FF87B680: \n"
 166 "               BL      sub_FF879260 \n"
 167 "               B       loc_FF87B7A0 \n"
 168 "loc_FF87B688: \n"
 169 // jumptable FF87B5A8 entry 7
 170 "               LDR     R0, [R0,#0xC] \n"
 171 "               BL      sub_FF96E20C \n"
 172 "               B       loc_FF87B7A0 \n"
 173 "loc_FF87B694: \n"
 174 // jumptable FF87B5A8 entry 8
 175 "               BL      sub_FF87BF20 \n"
 176 "               B       loc_FF87B680 \n"
 177 "loc_FF87B69C: \n"
 178 // jumptable FF87B5A8 entry 10
 179 "               LDR     R0, [R5,#0x4C] \n"
 180 "               BL      sub_FF87C57C \n"
 181 "               B       loc_FF87B7A0 \n"
 182 "loc_FF87B6A8: \n"
 183 // jumptable FF87B5A8 entry 11
 184 "               BL      sub_FF87C8C8 \n"
 185 "               B       loc_FF87B7A0 \n"
 186 "loc_FF87B6B0: \n"
 187 // jumptable FF87B5A8 entry 12
 188 "               BL      sub_FF87C92C \n"
 189 "               B       loc_FF87B7A0 \n"
 190 "loc_FF87B6B8: \n"
 191 // jumptable FF87B5A8 entry 13
 192 "               BL      sub_FF96D5DC \n"
 193 "               B       loc_FF87B7A0 \n"
 194 "loc_FF87B6C0: \n"
 195 // jumptable FF87B5A8 entry 14
 196 "               BL      sub_FF96D7E8 \n"
 197 "               B       loc_FF87B7A0 \n"
 198 "loc_FF87B6C8: \n"
 199 // jumptable FF87B5A8 entry 15
 200 "               BL      sub_FF96D86C \n"
 201 "               B       loc_FF87B7A0 \n"
 202 "loc_FF87B6D0: \n"
 203 // jumptable FF87B5A8 entry 16
 204 "               BL      sub_FF96D958 \n"
 205 "               B       loc_FF87B7A0 \n"
 206 "loc_FF87B6D8: \n"
 207 // jumptable FF87B5A8 entry 17
 208 "               BL      sub_FF96DA28 \n"
 209 "               B       loc_FF87B7A0 \n"
 210 "loc_FF87B6E0: \n"
 211 // jumptable FF87B5A8 entry 18
 212 "               MOV     R0, #0 \n"
 213 "               B       loc_FF87B704 \n"
 214 "loc_FF87B6E8: \n"
 215 // jumptable FF87B5A8 entry 19
 216 "               BL      sub_FF96DE24 \n"
 217 "               B       loc_FF87B7A0 \n"
 218 "loc_FF87B6F0: \n"
 219 // jumptable FF87B5A8 entry 20
 220 "               BL  sub_FF96DEC8 \n"
 221 "               B       loc_FF87B7A0 \n"
 222 "loc_FF87B6F8: \n"
 223 // jumptable FF87B5A8 entry 21
 224 "               BL  sub_FF96DFA8 \n"
 225 "               B       loc_FF87B7A0 \n"
 226 "loc_FF87B700: \n"
 227 // jumptable FF87B5A8 entry 22
 228 "               MOV     R0, #1 \n"
 229 "loc_FF87B704: \n"
 230 "               BL      sub_FF96DCC4 \n"
 231 "               B       loc_FF87B7A0 \n"
 232 "loc_FF87B70C: \n"
 233 // jumptable FF87B5A8 entry 23
 234 "               BL      sub_FF87C178 \n"
 235 "               B       loc_FF87B7A0 \n"
 236 "loc_FF87B714: \n"
 237 // jumptable FF87B5A8 entry 24
 238 "               BL      sub_FF87C1A4 \n"
 239 "               BL      sub_FF96EE48 \n"
 240 "               B       loc_FF87B7A0 \n"
 241 "loc_FF87B720: \n"
 242 // jumptable FF87B5A8 entry 25
 243 "               BL      sub_FF96DB9C \n"
 244 "               B       loc_FF87B7A0 \n"
 245 "loc_FF87B728: \n"
 246 // jumptable FF87B5A8 entry 26
 247 "               BL      sub_FF96DC34 \n"
 248 "               B       loc_FF87B7A0 \n"
 249 "loc_FF87B730: \n"
 250 // jumptable FF87B5A8 entry 27
 251 "               BL      sub_FF96EF18 \n"
 252 "               B       loc_FF87B7A0 \n"
 253 "loc_FF87B738: \n"
 254 // jumptable FF87B5A8 entry 28
 255 "               BL      sub_FF83790C \n"
 256 "               B       loc_FF87B7A0 \n"
 257 "loc_FF87B740: \n"
 258 // jumptable FF87B5A8 entry 29
 259 "               BL      sub_FF87E998 \n"
 260 "               B       loc_FF87B7A0 \n"
 261 "loc_FF87B748: \n"
 262 // jumptable FF87B5A8 entry 30
 263 "               BL      sub_FF87EA18 \n"
 264 "               B       loc_FF87B7A0 \n"
 265 "loc_FF87B750: \n"
 266 // jumptable FF87B5A8 entry 31
 267 "               BL      sub_FF87EA74 \n"
 268 "               BL      sub_FF87EA34 \n"
 269 "               B       loc_FF87B7A0 \n"
 270 "loc_FF87B75C: \n"
 271 // jumptable FF87B5A8 entry 32
 272 "               MOV     R0, #1 \n"
 273 "               BL      sub_FF96E990 \n"
 274 "               MOV     R0, #1 \n"
 275 "               BL      sub_FF96EAB4 \n"
 276 "               LDRH    R0, [R5,#0x94] \n"
 277 "               CMP     R0, #4 \n"
 278 "               LDRNEH  R0, [R5] \n"
 279 "               SUBNE   R12, R0, #0x4200 \n"
 280 "               SUBNES  R12, R12, #0x2A \n"
 281 "               BNE     loc_FF87B7A0 \n"
 282 "               BL      sub_FF87EA18 \n"
 283 "               BL      sub_FF87EF84 \n"
 284 "               BL      sub_FF87EE94  \n"
 285 "               B       loc_FF87B7A0 \n"
 286 "loc_FF87B794: \n"
 287 // jumptable FF87B5A8 default entry
 288 "               LDR     R1, =0x591 \n"
 289 "               LDR     R0, =0xFF87B07C \n" // "SsShootTask.c"
 290 "               BL      _DebugAssert \n" 
 291 "loc_FF87B7A0: \n"
 292 // jumptable FF87B5A8 entry 33
 293 "               LDR     R0, [SP] \n"
 294 "               LDR     R1, [R0,#4] \n"
 295 "               LDR     R0, [R6] \n"
 296 "               BL      sub_FF8855D8 \n"
 297 "               LDR     R4, [SP] \n"
 298 "               LDR     R0, [R4,#8] \n"
 299 "               CMP     R0, #0 \n"
 300 "               LDREQ   R1, =0x115 \n"
 301 "               LDREQ   R0, =0xFF87B07C \n" // "SsShootTask.c"
 302 "               BLEQ    _DebugAssert \n" 
 303 "               MOV     R0, #0 \n"
 304 "               STR     R0, [R4,#8] \n"
 305 "               B       loc_FF87B570 \n"
 306         );
 307 }
 308 
 309 void __attribute__((naked,noinline)) sub_FF96E09C_my(){
 310     asm volatile(
 311 "               STMFD   SP!, {R3-R7,LR}\n"
 312 "               MOV     R4, R0 \n"
 313 "               MOV     R0, #0xC \n"
 314 "               BL      sub_FF880578 \n"
 315 "               TST     R0, #1 \n"
 316 "               MOVNE   R2, R4 \n"
 317 "               LDMNEFD SP!, {R3-R7,LR} \n"
 318 "               MOVNE   R1, #1 \n"
 319 "               MOVNE   R0, #1 \n"
 320 "               BNE     sub_FF879734 \n"
 321 "               LDR     R0, [R4,#8] \n"
 322 "               LDR     R5, =0x38B44 \n"
 323 "               ORR     R0, R0, #1 \n"
 324 "               STR     R0, [R4,#8] \n"
 325 "               LDRH    R0, [R5,#0x92] \n"
 326 "               CMP     R0, #3 \n"
 327 "               BEQ     loc_FF96E170 \n"
 328 "               LDR     R0, [R4,#0xC] \n"
 329 "               CMP     R0, #1 \n"
 330 "               BLS     loc_FF96E13C \n"
 331 "               LDRH    R0, [R5,#0x90] \n"
 332 "               CMP     R0, #0 \n"
 333 "               BNE     loc_FF96E170 \n"
 334 "               LDRH    R0, [R5,#0x8C] \n"
 335 "               CMP     R0, #2 \n"
 336 "               BNE     loc_FF96E148 \n"
 337 "               BL      sub_FF87C270 \n"
 338 "               LDRH    R0, [R5,#0x92] \n"
 339 "               CMP     R0, #3 \n"
 340 "               BEQ     loc_FF96E170 \n"
 341 "               LDR     R0, [R4,#0xC] \n"
 342 "               CMP     R0, #1 \n"
 343 "               BLS     loc_FF96E13C \n"
 344 "               LDRH    R0, [R5,#0x90] \n"
 345 "               CMP     R0, #0 \n"
 346 "               BNE     loc_FF96E170 \n"
 347 "               LDRH    R0, [R5,#0x8C] \n"
 348 "               CMP     R0, #2 \n"
 349 "               BEQ     loc_FF96E16C \n"
 350 "               B       loc_FF96E148 \n"
 351 "loc_FF96E13C: \n"
 352 "               LDRH    R0, [R5,#0x90] \n"
 353 "               CMP     R0, #0 \n"
 354 "               BNE     loc_FF96E170 \n"
 355 "loc_FF96E148: \n"
 356 "               LDRH    R0, [R5,#0x8C] \n"
 357 "               CMP     R0, #1 \n"
 358 "               BNE     loc_FF96E170 \n"
 359 "               LDR     R0, [R4,#0xC] \n"
 360 "               CMP     R0, #1 \n"
 361 "               BLS     loc_FF96E170 \n"
 362 "               LDR     R0, [R4,#0x10] \n"
 363 "               CMP     R0, #1 \n"
 364 "               BNE     loc_FF96E170 \n"
 365 "loc_FF96E16C: \n"
 366 "               BL      sub_FF96EF50 \n"
 367 "loc_FF96E170: \n"
 368 "               BL      sub_FF96EF18 \n"
 369 "               BL      sub_FF87BD0C \n"
 370 "               MOV     R0, R4 \n"
 371 "               BL      sub_FFAAFC84 \n"                // before shot (G12) ?
 372 "               TST     R0, #1 \n"
 373 "               BNE     locret_FF96E208 \n"
 374 "               MOV     R0, R4 \n"
 375 "               BL      sub_FFAB0064 \n"
 376 "               BL      sub_FF96E774 \n"                // after pre-flash, before shot (G12) ? 
 377 "               MOV     R6, #1 \n"                      
 378 "               MOV     R0, #2 \n"
 379 "               BL      sub_FF877954 \n"
 380 "               LDRH    R0, [R5] \n"
 381 "               SUB     R12, R0, #0x8200 \n"
 382 "               SUBS    R12, R12, #0x2D \n"
 383 "               BNE     loc_FF96E1F0 \n"
 384 "               MOV     R2, #2 \n"
 385 "               ADD     R0, R2, #0x15C \n"
 386 "               MOV     R1, SP \n"
 387 "               STR     R6, [SP] \n"
 388 "               BL      sub_FF88D7A0 \n"
 389 "               TST     R0, #1 \n"
 390 "               MOVNE   R1, #0xC3 \n"
 391 //"             ADRNE   R0, aSscaptureseq_c \n" // "SsCaptureSeq.c"
 392 "               LDRNE   R0, =0xFF96E27C \n"
 393 "               BLNE    _DebugAssert \n"
 394 "               LDRH    R0, [SP] \n"
 395 "               CMP     R0, #1 \n"
 396 "               MOVHI   R0, #0x1D \n"
 397 "               STRHI   R6, [R4,#0xD4] \n"
 398 "               BHI     loc_FF96E1F8 \n"
 399 "               MOV     R0, #0 \n"
 400 "               STR     R0, [R4,#0xD4] \n"
 401 "loc_FF96E1F0: \n"
 402 "               MOV     R0, R4 \n"
 403 //"             BL      sub_FFAB04E8 \n"
 404 "               BL      sub_FFAB04E8_my \n" // Patched ------------>
 405 "               BL      capt_seq_hook_raw_here \n"      // Added ---------->
 406 "loc_FF96E1F8: \n"
 407 "               MOV     R1, R0 \n"
 408 "               MOV     R0, R4 \n"
 409 "               LDMFD   SP!, {R3-R7,LR} \n"
 410 "               B       sub_FFAAFD88 \n"
 411 "locret_FF96E208: \n"
 412 "               LDMFD   SP!, {R3-R7,PC} \n"
 413         );      
 414 }
 415 
 416 void __attribute__((naked,noinline)) sub_FFAB04E8_my()
 417 {
 418         asm volatile(
 419 "               STMFD   SP!, {R2-R6,LR} \n"
 420 "               MOV     R5, R0 \n"
 421 "               BL      sub_FF96EC78 \n"
 422 "               MOV     R1, #0xFFFFFFFF \n"
 423 "               BL      sub_FF88560C \n"
 424 "               LDR     R0, =0xFFAAFDF4 \n"             // sub_FFAAFDF4
 425 "               MOV     R1, R5 \n"
 426 "               BL      sub_FF8B571C \n"
 427 "               MOV     R0, R5 \n"
 428 "               BL      sub_FFAAFD10 \n"
 429 "               MOV     R0, R5 \n"
 430 "               BL      sub_FFAB012C \n"
 431 "               MOV     R4, R0 \n"
 432 "               LDR     R1, =0xC918 \n"
 433 "               MOV     R0, #0x8A \n"
 434 "               MOV     R2, #4 \n"
 435 "               BL      sub_FF88D7A0 \n"                // PT_GetPropertyCaseString
 436 "               TST     R0, #1 \n"
 437 "               LDRNE   R1, =0x1F6 \n"
 438 //"             ADRNE   R0, aSsstandardcapt \n" // "SsStandardCaptureSeq.c"
 439 "               LDRNE   R0, =0xFFAB0658 \n"
 440 "               BLNE    _DebugAssert \n"
 441 "               BL      sub_FF87E0F8 \n"
 442 "               MOV     R0, R4 \n"
 443 
 444 "               BL      wait_until_remote_button_is_released\n" // Added (not tested) -------->
 445 "               BL      capt_seq_hook_set_nr_my \n"     // Added ------------->
 446 
 447 "               B       sub_FFAB0544 \n"                // Return to firmware --------->
 448 /*
 449 "               CMP     R0, #1 \n"
 450 "               MOV     R4, #0 \n"
 451 "               BEQ     loc_FFAB0588 \n"
 452 "               CMP     R0, #2 \n"
 453 "               BEQ     loc_FFAB0598 \n"
 454 "               CMP     R0, #3 \n"
 455 "               BEQ     loc_FFAB05BC \n"
 456 "               CMP     R0, #7 \n"
 457 "               BNE     loc_FFAB05D8 \n"
 458 "               MOV     R0, #0 \n"
 459 "               BL      sub_FF8B574C \n"
 460 "               MOV     R0, #4 \n"
 461 "               STR     R0, [SP,#0x4] \n"
 462 "loc_FFAB0578: \n"
 463 "               ADD     R1, SP, #0x4 \n"
 464 "               MOV     R0, R5 \n"
 465 "               BL      sub_FFAB034C \n"
 466 "               B       loc_FFAB05B4 \n"
 467 "loc_FFAB0588: \n"
 468 "               MOV     R0, #1 \n"
 469 "               BL      sub_FF8B574C \n"
 470 "               STR     R4, [SP,#0x4] \n"
 471 "               B       loc_FFAB0578 \n"
 472 "loc_FFAB0598: \n"
 473 "               MOV     R0, #1 \n"
 474 "               BL      sub_FF8B574C \n"
 475 "               MOV     R0, #1 \n"
 476 "               STR     R0, [SP,#0x4] \n"
 477 "               MOV     R0, R5 \n"
 478 "               ADD     R1, SP, #0x4 \n"
 479 "               BL      sub_FFAB072C \n"
 480 "loc_FFAB05B4: \n"
 481 "               MOV     R6, R0 \n"
 482 "               B       loc_FFAB05E4 \n"
 483 "loc_FFAB05BC: \n"
 484 "               MOV     R0, #1 \n"
 485 "               BL      sub_FF8B574C \n"
 486 "               ADD     R1, SP, #0x4 \n"
 487 "               MOV     R0, R5 \n"
 488 "               STR     R4, [SP,#0x4] \n"
 489 "               BL      sub_FFAB03C8 \n"
 490 "               B       loc_FFAB05B4 \n"
 491 "loc_FFAB05D8: \n"
 492 "               MOV     R1, #0x22C \n"
 493 //"             ADR     R0, aSsstandardcapt \n" // "SsStandardCaptureSeq.c"
 494 "               LDR     R0, =0xFFAB0658 \n"
 495 "               BL      _DebugAssert \n"
 496 "loc_FFAB05E4: \n"
 497 "               TST     R6, #1 \n"
 498 "               MOVNE   R0, R6 \n"
 499 "               BNE     locret_FFAB063C \n"
 500 "               MOV     R1, #0 \n"
 501 //"             ADR     R0, unk_FFAB02F8 \n"
 502 "               LDR     R0, =0xFFAB02F8 \n"
 503 "               BL      sub_FF8B571C \n"
 504 "               MOV     R0, R5 \n"
 505 "               BL      sub_FFAB01BC \n"
 506 "               BL      sub_FF96EC78 \n"
 507 "               MOV     R3, #0x244 \n"
 508 "               STR     R3, [SP] \n"
 509 "               LDR     R2, =0x3A98 \n"
 510 //"             ADR     R3, aSsstandardcapt  \n"// "SsStandardCaptureSeq.c"
 511 "               LDR     R3, =0xFFAB0658 \n"
 512 "               MOV     R1, #4 \n"
 513 "               BL      sub_FF8808DC \n"
 514 "               CMP     R0, #0 \n"
 515 "               MOVNE   R1, #0x244 \n"
 516 //"             ADRNE   R0, aSsstandardcapt \n" // "SsStandardCaptureSeq.c"
 517 "               LDRNE   R0, =0xFFAB0658 \n"
 518 "               BLNE    _DebugAssert \n"
 519 "               LDRH    R0, [SP,#0x4] \n"
 520 "               STRH    R0, [R5,#0x14] \n"
 521 "               MOV     R0, #0 \n"
 522 "locret_FFAB063C: \n"
 523 "               LDMFD   SP!, {R2-R6,PC} \n"
 524 */
 525         ); 
 526 }
 527 
 528 /*----------------------------------------------------------------------
 529         exp_drv_task()
 530 -----------------------------------------------------------------------*/
 531 void __attribute__((naked,noinline)) exp_drv_task()
 532 {
 533         // FF8BFA94
 534         asm volatile(
 535 "               STMFD   SP!, {R4-R8,LR} \n"
 536 "               SUB     SP, SP, #0x20 \n"
 537 "               LDR     R8, =0xBB8 \n"
 538 "               LDR     R7, =0x43F8 \n"
 539 "               LDR     R5, =0x544E0 \n"
 540 "               MOV     R0, #0 \n"
 541 "               ADD     R6, SP, #0x10 \n"
 542 "               STR     R0, [SP,#0xC] \n"
 543 "loc_FF8BFAB4: \n"
 544 "               LDR     R0, [R7,#0x20] \n"
 545 "               MOV     R2, #0 \n"
 546 "               ADD     R1, SP, #0x1C \n"
 547 "               BL      sub_FF839B8C \n"
 548 "               LDR     R0, [SP,#0xC] \n"
 549 "               CMP     R0, #1 \n"
 550 "               BNE     loc_FF8BFB00 \n"
 551 "               LDR     R0, [SP,#0x1C] \n"
 552 "               LDR     R0, [R0] \n"
 553 "               CMP     R0, #0x14 \n"
 554 "               CMPNE   R0, #0x15 \n"
 555 "               CMPNE   R0, #0x16 \n"
 556 "               CMPNE   R0, #0x17 \n"
 557 "               BEQ     loc_FF8BFC64 \n"
 558 "               CMP     R0, #0x29 \n"
 559 "               BEQ     loc_FF8BFBEC \n"
 560 "               ADD     R1, SP, #0xC \n"
 561 "               MOV     R0, #0 \n"
 562 "               BL      sub_FF8BFA44 \n"
 563 "loc_FF8BFB00: \n"
 564 "               LDR     R0, [SP,#0x1C] \n"
 565 "               LDR     R1, [R0] \n"
 566 "               CMP     R1, #0x2F \n"
 567 "               BNE     loc_FF8BFB30 \n"
 568 "               LDR     R0, [SP,#0x1C] \n"
 569 "               BL      sub_FF8C0E38 \n"
 570 "               LDR     R0, [R7,#0x1C] \n"
 571 "               MOV     R1, #1 \n"
 572 "               BL      sub_FF8855D8 \n"
 573 "               BL      sub_FF81EB30 \n"
 574 "               ADD     SP, SP, #0x20 \n"
 575 "               LDMFD   SP!, {R4-R8,PC} \n"
 576 "loc_FF8BFB30: \n"
 577 "               CMP     R1, #0x2E \n"
 578 "               BNE     loc_FF8BFB4C \n"
 579 "               LDR     R2, [R0,#0x8C]! \n"
 580 "               LDR     R1, [R0,#4] \n"
 581 "               MOV     R0, R1 \n"
 582 "               BLX     R2 \n"
 583 "               B       loc_FF8C0120 \n"
 584 "loc_FF8BFB4C: \n"
 585 "               CMP     R1, #0x27 \n"
 586 "               BNE     loc_FF8BFB9C \n"
 587 "               LDR     R0, [R7,#0x1C] \n"
 588 "               MOV     R1, #0x80 \n"
 589 "               BL      sub_FF88560C \n"
 590 "               LDR     R0, =0xFF8BB8F4 \n"
 591 "               MOV     R1, #0x80 \n"
 592 "               BL      sub_FF961628 \n"
 593 "               LDR     R0, [R7,#0x1C] \n"
 594 "               MOV     R2, R8 \n"
 595 "               MOV     R1, #0x80 \n"
 596 "               BL      sub_FF885518 \n"
 597 "               TST     R0, #1 \n"
 598 "               LDRNE   R1, =0x1089 \n"
 599 "               BNE     loc_FF8BFC58 \n"
 600 "loc_FF8BFB88: \n"
 601 "               LDR     R1, [SP,#0x1C] \n"
 602 "               LDR     R0, [R1,#0x90] \n"
 603 "               LDR     R1, [R1,#0x8C] \n"
 604 "               BLX     R1 \n"
 605 "               B       loc_FF8C0120 \n"
 606 "loc_FF8BFB9C: \n"
 607 "               CMP     R1, #0x28 \n"
 608 "               BNE     loc_FF8BFBE4 \n"
 609 "               ADD     R1, SP, #0xC \n"
 610 "               BL      sub_FF8BFA44 \n"
 611 "               LDR     R0, [R7,#0x1C] \n"
 612 "               MOV     R1, #0x100 \n"
 613 "               BL      sub_FF88560C \n"
 614 "               LDR     R0, =0xFF8BB904 \n"
 615 "               MOV     R1, #0x100 \n"
 616 "               BL      sub_FF962058 \n"
 617 "               LDR     R0, [R7,#0x1C] \n"
 618 "               MOV     R2, R8 \n"
 619 "               MOV     R1, #0x100 \n"
 620 "               BL      sub_FF885518 \n"
 621 "               TST     R0, #1 \n"
 622 "               BEQ     loc_FF8BFB88 \n"
 623 "               LDR     R1, =0x1093 \n"
 624 "               B       loc_FF8BFC58 \n"
 625 "loc_FF8BFBE4: \n"
 626 "               CMP     R1, #0x29 \n"
 627 "               BNE     loc_FF8BFBFC \n"
 628 "loc_FF8BFBEC: \n"
 629 "               LDR     R0, [SP,#0x1C] \n"
 630 "               ADD     R1, SP, #0xC \n"
 631 "               BL      sub_FF8BFA44 \n"
 632 "               B       loc_FF8BFB88 \n"
 633 "loc_FF8BFBFC: \n"
 634 "               CMP     R1, #0x2C \n"
 635 "               BNE     loc_FF8BFC14 \n"
 636 "               BL      sub_FF8AE190 \n"
 637 "               BL      sub_FF8AED9C \n"
 638 "               BL      sub_FF8AE908 \n"
 639 "               B       loc_FF8BFB88 \n"
 640 "loc_FF8BFC14: \n"
 641 "               CMP     R1, #0x2D \n"
 642 "               BNE     loc_FF8BFC64 \n"
 643 "               LDR     R0, [R7,#0x1C] \n"
 644 "               MOV     R1, #4 \n"
 645 "               BL      sub_FF88560C \n"
 646 "               LDR     R1, =0xFF8BB924 \n"
 647 "               LDR     R0, =0xFFFFF400 \n"
 648 "               MOV     R2, #4 \n"
 649 "               BL      sub_FF8ADC0C \n"
 650 "               BL      sub_FF8ADE94 \n"
 651 "               LDR     R0, [R7,#0x1C] \n"
 652 "               MOV     R2, R8 \n"
 653 "               MOV     R1, #4 \n"
 654 "               BL      sub_FF885434 \n"
 655 "               TST     R0, #1 \n"
 656 "               BEQ     loc_FF8BFB88 \n"
 657 "               LDR     R1, =0x10BB \n"
 658 "loc_FF8BFC58: \n"
 659 "               LDR     R0, =0xFF8BBFAC \n"     // "ExpDrv.c"
 660 "               BL      _DebugAssert \n"
 661 "               B       loc_FF8BFB88 \n"
 662 "loc_FF8BFC64: \n"
 663 "               LDR     R0, [SP,#0x1C] \n"
 664 "               MOV     R4, #1 \n"
 665 "               LDR     R1, [R0] \n"
 666 "               CMP     R1, #0x12 \n"
 667 "               CMPNE   R1, #0x13 \n"
 668 "               BNE     loc_FF8BFCD4 \n"
 669 "               LDR     R1, [R0,#0x7C] \n"
 670 "               ADD     R1, R1, R1,LSL#1 \n"
 671 "               ADD     R1, R0, R1,LSL#2 \n"
 672 "               SUB     R1, R1, #8 \n"
 673 "               LDMIA   R1, {R2-R4} \n"
 674 "               STMIA   R6, {R2-R4} \n"
 675 "               BL      sub_FF8BE1CC \n"
 676 "               LDR     R0, [SP,#0x1C] \n"
 677 "               LDR     R1, [R0,#0x7C] \n"
 678 "               LDR     R3, [R0,#0x8C] \n"
 679 "               LDR     R2, [R0,#0x90] \n"
 680 "               ADD     R0, R0, #4 \n"
 681 "               BLX     R3 \n"
 682 "               LDR     R0, [SP,#0x1C] \n"
 683 "               BL      sub_FF8C1244 \n"
 684 "               LDR     R0, [SP,#0x1C] \n"
 685 "               LDR     R1, [R0,#0x7C] \n"
 686 "               LDR     R3, [R0,#0x94] \n"
 687 "               LDR     R2, [R0,#0x98] \n"
 688 "               ADD     R0, R0, #4 \n"
 689 "               BLX     R3 \n"
 690 "               B       loc_FF8C005C \n"
 691 "loc_FF8BFCD4: \n"
 692 "               CMP     R1, #0x14 \n"
 693 "               CMPNE   R1, #0x15 \n"
 694 "               CMPNE   R1, #0x16 \n"
 695 "               CMPNE   R1, #0x17 \n"
 696 "               BNE     loc_FF8BFD8C \n"
 697 "               ADD     R3, SP, #0xC \n"
 698 "               MOV     R2, SP \n"
 699 "               ADD     R1, SP, #0x10 \n"
 700 "               BL      sub_FF8BE438 \n"
 701 "               CMP     R0, #1 \n"
 702 "               MOV     R4, R0 \n"
 703 "               CMPNE   R4, #5 \n"
 704 "               BNE     loc_FF8BFD28 \n"
 705 "               LDR     R0, [SP,#0x1C] \n"
 706 "               MOV     R2, R4 \n"
 707 "               LDR     R1, [R0,#0x7C]! \n"
 708 "               LDR     R12, [R0,#0x10]! \n"
 709 "               LDR     R3, [R0,#4] \n"
 710 "               MOV     R0, SP \n"
 711 "               BLX     R12 \n"
 712 "               B       loc_FF8BFD60 \n"
 713 "loc_FF8BFD28: \n"
 714 "               LDR     R0, [SP,#0x1C] \n"
 715 "               CMP     R4, #2 \n"
 716 "               LDR     R3, [R0,#0x90] \n"
 717 "               CMPNE   R4, #6 \n"
 718 "               BNE     loc_FF8BFD74 \n"
 719 "               LDR     R12, [R0,#0x8C] \n"
 720 "               MOV     R0, SP \n"
 721 "               MOV     R2, R4 \n"
 722 "               MOV     R1, #1 \n"
 723 "               BLX     R12 \n"
 724 "               LDR     R0, [SP,#0x1C] \n"
 725 "               MOV     R2, SP \n"
 726 "               ADD     R1, SP, #0x10 \n"
 727 "               BL      sub_FF8BF790 \n"
 728 "loc_FF8BFD60: \n"
 729 "               LDR     R0, [SP,#0x1C] \n"
 730 "               LDR     R2, [SP,#0xC] \n"
 731 "               MOV     R1, R4 \n"
 732 "               BL      sub_FF8BF9E4 \n"
 733 "               B       loc_FF8C005C \n"
 734 "loc_FF8BFD74: \n"
 735 "               LDR     R1, [R0,#0x7C] \n"
 736 "               LDR     R12, [R0,#0x8C] \n"
 737 "               ADD     R0, R0, #4 \n"
 738 "               MOV     R2, R4 \n"
 739 "               BLX     R12 \n"
 740 "               B       loc_FF8C005C \n"
 741 "loc_FF8BFD8C: \n"
 742 "               CMP     R1, #0x23 \n"
 743 "               CMPNE   R1, #0x24 \n"
 744 "               BNE     loc_FF8BFDD8 \n"
 745 "               LDR     R1, [R0,#0x7C] \n"
 746 "               ADD     R1, R1, R1,LSL#1 \n"
 747 "               ADD     R1, R0, R1,LSL#2 \n"
 748 "               SUB     R1, R1, #8 \n"
 749 "               LDMIA   R1, {R2-R4} \n"
 750 "               STMIA   R6, {R2-R4} \n"
 751 "               BL      sub_FF8BD250 \n"
 752 "               LDR     R0, [SP,#0x1C] \n"
 753 "               LDR     R1, [R0,#0x7C] \n"
 754 "               LDR     R3, [R0,#0x8C] \n"
 755 "               LDR     R2, [R0,#0x90] \n"
 756 "               ADD     R0, R0, #4 \n"
 757 "               BLX     R3 \n"
 758 "               LDR     R0, [SP,#0x1C] \n"
 759 "               BL      sub_FF8BD69C \n"
 760 "               B       loc_FF8C005C \n"
 761 "loc_FF8BFDD8: \n"
 762 "               ADD     R1, R0, #4 \n"
 763 "               LDMIA   R1, {R2,R3,R12} \n"
 764 "               STMIA   R6, {R2,R3,R12} \n"
 765 "               LDR     R1, [R0] \n"
 766 "               CMP     R1, #0x26 \n"
 767 "               ADDLS   PC, PC, R1,LSL#2 \n"
 768 "               B       loc_FF8C003C \n"
 769 "loc_FF8BFDF4: \n"
 770 "               B       loc_FF8BFE90 \n"
 771 "loc_FF8BFDF8: \n"
 772 "               B       loc_FF8BFE90 \n"
 773 "loc_FF8BFDFC: \n"
 774 "               B       loc_FF8BFE98 \n"
 775 "loc_FF8BFE00: \n"
 776 "               B       loc_FF8BFEA0 \n"
 777 "loc_FF8BFE04: \n"
 778 "               B       loc_FF8BFEA0 \n"
 779 "loc_FF8BFE08: \n"
 780 "               B       loc_FF8BFEA0 \n"
 781 "loc_FF8BFE0C: \n"
 782 "               B       loc_FF8BFE90 \n"
 783 "loc_FF8BFE10: \n"
 784 "               B       loc_FF8BFE98 \n"
 785 "loc_FF8BFE14: \n"
 786 "               B       loc_FF8BFEA0 \n"
 787 "loc_FF8BFE18: \n"
 788 "               B       loc_FF8BFEA0 \n"
 789 "loc_FF8BFE1C: \n"
 790 "               B       loc_FF8BFEB8 \n"
 791 "loc_FF8BFE20: \n"
 792 "               B       loc_FF8BFEB8 \n"
 793 "loc_FF8BFE24: \n"
 794 "               B       loc_FF8C0028 \n"
 795 "loc_FF8BFE28: \n"
 796 "               B       loc_FF8C0030 \n"
 797 "loc_FF8BFE2C: \n"
 798 "               B       loc_FF8C0030 \n"
 799 "loc_FF8BFE30: \n"
 800 "               B       loc_FF8C0030 \n"
 801 "loc_FF8BFE34: \n"
 802 "               B       loc_FF8C0030 \n"
 803 "loc_FF8BFE38: \n"
 804 "               B       loc_FF8C0038 \n"
 805 "loc_FF8BFE3C: \n"
 806 "               B       loc_FF8C003C \n"
 807 "loc_FF8BFE40: \n"
 808 "               B       loc_FF8C003C \n"
 809 "loc_FF8BFE44: \n"
 810 "               B       loc_FF8C003C \n"
 811 "loc_FF8BFE48: \n"
 812 "               B       loc_FF8C003C \n"
 813 "loc_FF8BFE4C: \n"
 814 "               B       loc_FF8C003C \n"
 815 "loc_FF8BFE50: \n"
 816 "               B       loc_FF8C003C \n"
 817 "loc_FF8BFE54: \n"
 818 "               B       loc_FF8BFEA8 \n"
 819 "loc_FF8BFE58: \n"
 820 "               B       loc_FF8BFEB0 \n"
 821 "loc_FF8BFE5C: \n"
 822 "               B       loc_FF8BFEB0 \n"
 823 "loc_FF8BFE60: \n"
 824 "               B       loc_FF8BFEC4 \n"
 825 "loc_FF8BFE64: \n"
 826 "               B       loc_FF8BFEC4 \n"
 827 "loc_FF8BFE68: \n"
 828 "               B       loc_FF8BFECC \n"
 829 "loc_FF8BFE6C: \n"
 830 "               B       loc_FF8BFF04 \n"
 831 "loc_FF8BFE70: \n"
 832 "               B       loc_FF8BFF3C \n"
 833 "loc_FF8BFE74: \n"
 834 "               B       loc_FF8BFFD8 \n"
 835 "loc_FF8BFE78: \n"
 836 "               B       loc_FF8C0010 \n"
 837 "loc_FF8BFE7C: \n"
 838 "               B       loc_FF8C0010 \n"
 839 "loc_FF8BFE80: \n"
 840 "               B       loc_FF8C003C \n"
 841 "loc_FF8BFE84: \n"
 842 "               B       loc_FF8C003C \n"
 843 "loc_FF8BFE88: \n"
 844 "               B       loc_FF8C0018 \n"
 845 "loc_FF8BFE8C: \n"
 846 "               B       loc_FF8C0020 \n"
 847 "loc_FF8BFE90: \n"
 848 // jumptable FF8BFDEC entries 0,1,6
 849 "               BL      sub_FF8BBE34 \n"
 850 "               B       loc_FF8C003C \n"
 851 "loc_FF8BFE98: \n"
 852 // jumptable FF8BFDEC entries 2,7
 853 "               BL      sub_FF8BC0D0 \n"
 854 "               B       loc_FF8C003C \n"
 855 "loc_FF8BFEA0: \n"
 856 // jumptable FF8BFDEC entries 3-5,8,9
 857 "               BL      sub_FF8BC2F8 \n"
 858 "               B       loc_FF8C003C \n"
 859 "loc_FF8BFEA8: \n"
 860 // jumptable FF8BFDEC entry 24
 861 "               BL      sub_FF8BC5D0 \n"
 862 "               B       loc_FF8C003C \n"
 863 "loc_FF8BFEB0: \n"
 864 // jumptable FF8BFDEC entries 25,26
 865 "               BL      sub_FF8BC7E8 \n"
 866 "               B       loc_FF8C003C \n"
 867 "loc_FF8BFEB8: \n"
 868 // jumptable FF8BFDEC entries 10,11
 869 //"             BL      sub_FF8BCB0C \n"
 870 "               BL      sub_FF8BCB0C_my \n"                     // Patched ---------->
 871 "               MOV     R4, #0 \n"
 872 "               B       loc_FF8C003C \n"
 873 "loc_FF8BFEC4: \n"
 874 // jumptable FF8BFDEC entries 27,28
 875 "               BL      sub_FF8BCC54 \n"
 876 "               B       loc_FF8C003C \n"
 877 "loc_FF8BFECC: \n"
 878 // jumptable FF8BFDEC entry 29
 879 "               LDRH    R1, [R0,#4] \n"
 880 "               STRH    R1, [SP,#0x10] \n"
 881 "               LDRH    R1, [R5,#2] \n"
 882 "               STRH    R1, [SP,#0x12] \n"
 883 "               LDRH    R1, [R5,#4] \n"
 884 "               STRH    R1, [SP,#0x14] \n"
 885 "               LDRH    R1, [R5,#6] \n"
 886 "               STRH    R1, [SP,#0x16] \n"
 887 "               LDRH    R1, [R0,#0xC] \n"
 888 "               STRH    R1, [SP,#0x18] \n"
 889 "               LDRH    R1, [R5,#0xA] \n"
 890 "               STRH    R1, [SP,#0x1A] \n"
 891 "               BL      sub_FF8C0F3C \n"
 892 "               B       loc_FF8C003C \n"
 893 "loc_FF8BFF04: \n"
 894 // jumptable FF8BFDEC entry 30
 895 "               LDRH    R1, [R0,#4] \n"
 896 "               STRH    R1, [SP,#0x10] \n"
 897 "               LDRH    R1, [R5,#2] \n"
 898 "               STRH    R1, [SP,#0x12] \n"
 899 "               LDRH    R1, [R5,#4] \n"
 900 "               STRH    R1, [SP,#0x14] \n"
 901 "               LDRH    R1, [R5,#6] \n"
 902 "               STRH    R1, [SP,#0x16] \n"
 903 "               LDRH    R1, [R5,#8] \n"
 904 "               STRH    R1, [SP,#0x18] \n"
 905 "               LDRH    R1, [R5,#0xA] \n"
 906 "               STRH    R1, [SP,#0x1A] \n"
 907 "               BL      sub_FF8C1044 \n"
 908 "               B       loc_FF8C003C \n"
 909 "loc_FF8BFF3C: \n"
 910 // jumptable FF8BFDEC entry 31
 911 "               LDRH    R1, [R5] \n"
 912 "               STRH    R1, [SP,#0x10] \n"
 913 "               LDRH    R1, [R0,#6] \n"
 914 "               STRH    R1, [SP,#0x12] \n"
 915 "               LDRH    R1, [R5,#4] \n"
 916 "               STRH    R1, [SP,#0x14] \n"
 917 "               LDRH    R1, [R5,#6] \n"
 918 "               STRH    R1, [SP,#0x16] \n"
 919 "               LDRH    R1, [R5,#8] \n"
 920 "               STRH    R1, [SP,#0x18] \n"
 921 "               LDRH    R1, [R5,#0xA] \n"
 922 "               STRH    R1, [SP,#0x1A] \n"
 923 "               BL      sub_FF8C10F8 \n"
 924 "               B       loc_FF8C003C \n"
 925 "loc_FF8BFFD8: \n"
 926 // jumptable FF8BFDEC entry 32
 927 "               LDRH    R1, [R5] \n"
 928 "               STRH    R1, [SP,#0x10] \n"
 929 "               LDRH    R1, [R5,#2] \n"
 930 "               STRH    R1, [SP,#0x12] \n"
 931 "               LDRH    R1, [R5,#4] \n"
 932 "               STRH    R1, [SP,#0x14] \n"
 933 "               LDRH    R1, [R5,#6] \n"
 934 "               STRH    R1, [SP,#0x16] \n"
 935 "               LDRH    R1, [R0,#0xC] \n"
 936 "               STRH    R1, [SP,#0x18] \n"
 937 "               LDRH    R1, [R5,#0xA] \n"
 938 "               STRH    R1, [SP,#0x1A] \n"
 939 "               BL      sub_FF8C11A0 \n"
 940 "               B       loc_FF8C003C \n"
 941 "loc_FF8C0010: \n"
 942 // jumptable FF8BFDEC entries 33,34
 943 "               BL      sub_FF8BD028 \n"
 944 "               B       loc_FF8C003C \n"
 945 "loc_FF8C0018: \n"
 946 // jumptable FF8BFDEC entry 37
 947 "               BL      sub_FF8BD7A0 \n"
 948 "               B       loc_FF8C003C \n"
 949 "loc_FF8C0020: \n"
 950 // jumptable FF8BFDEC entry 38
 951 "               BL      sub_FF8BDA3C \n"
 952 "               B       loc_FF8C003C \n"
 953 "loc_FF8C0028: \n"
 954 // jumptable FF8BFDEC entry 12
 955 "               BL      sub_FF8BDC1C \n"
 956 "               B       loc_FF8C003C \n"
 957 "loc_FF8C0030: \n"
 958 // jumptable FF8BFDEC entries 13-16
 959 "               BL      sub_FF8BDDD8 \n"
 960 "               B       loc_FF8C003C \n"
 961 "loc_FF8C0038: \n"
 962 // jumptable FF8BFDEC entry 17
 963 "               BL      sub_FF8BDFC4 \n"
 964 "loc_FF8C003C: \n"
 965 // jumptable FF8BFDEC default entry
 966 // jumptable FF8BFDEC entries 18-23,35,36
 967 "               LDR     R0, [SP,#0x1C] \n"
 968 "               LDR     R1, [R0,#0x7C] \n"
 969 "               LDR     R3, [R0,#0x8C] \n"
 970 "               LDR     R2, [R0,#0x90] \n"
 971 "               ADD     R0, R0, #4 \n"
 972 "               BLX     R3 \n"
 973 "               CMP     R4, #1 \n"
 974 "               BNE     loc_FF8C00A4 \n"
 975 "loc_FF8C005C: \n"
 976 "               LDR     R0, [SP,#0x1C] \n"
 977 "               MOV     R2, #0xC \n"
 978 "               LDR     R1, [R0,#0x7C] \n"
 979 "               ADD     R1, R1, R1,LSL#1 \n"
 980 "               ADD     R0, R0, R1,LSL#2 \n"
 981 "               SUB     R4, R0, #8 \n"
 982 "               LDR     R0, =0x544E0 \n"
 983 "               ADD     R1, SP, #0x10 \n"
 984 "               BL      sub_FFB49F04 \n"
 985 "               LDR     R0, =0x544EC \n"
 986 "               MOV     R2, #0xC \n"
 987 "               ADD     R1, SP, #0x10 \n"
 988 "               BL      sub_FFB49F04 \n"
 989 "               LDR     R0, =0x544F8 \n"
 990 "               MOV     R2, #0xC \n"
 991 "               MOV     R1, R4 \n"
 992 "               BL      sub_FFB49F04 \n"
 993 "               B       loc_FF8C0120 \n"
 994 "loc_FF8C00A4: \n"
 995 "               LDR     R0, [SP,#0x1C] \n"
 996 "               MOV     R3, #1 \n"
 997 "               LDR     R0, [R0] \n"
 998 "               CMP     R0, #0xB \n"
 999 "               BNE     loc_FF8C00EC \n"
1000 "               MOV     R2, #0 \n"
1001 "               STRD    R2, [SP] \n"
1002 "               MOV     R2, #1 \n"
1003 "               MOV     R1, #1 \n"
1004 "               MOV     R0, #0 \n"
1005 "               BL      sub_FF8BBC14 \n"
1006 "               MOV     R3, #1 \n"
1007 "               MOV     R2, #0 \n"
1008 "               STRD    R2, [SP] \n"
1009 "               MOV     R2, #1 \n"
1010 "               MOV     R1, #1 \n"
1011 "               MOV     R0, #0 \n"
1012 "               B       loc_FF8C011C \n"
1013 "loc_FF8C00EC: \n"
1014 "               MOV     R2, #1 \n"
1015 "               STRD    R2, [SP] \n"
1016 "               MOV     R3, #1 \n"
1017 "               MOV     R1, #1 \n"
1018 "               MOV     R0, #1 \n"
1019 "               BL      sub_FF8BBC14 \n"
1020 "               MOV     R3, #1 \n"
1021 "               MOV     R2, #1 \n"
1022 "               MOV     R1, #1 \n"
1023 "               MOV     R0, #1 \n"
1024 "               STR     R3, [SP] \n"
1025 "               STR     R3, [SP,#0x4] \n"
1026 "loc_FF8C011C: \n"
1027 "               BL      sub_FF8BBD7C \n"
1028 "loc_FF8C0120: \n"
1029 "               LDR     R0, [SP,#0x1C] \n"
1030 "               BL      sub_FF8C0E38 \n"
1031 "               B       loc_FF8BFAB4 \n"
1032         );
1033 }
1034 
1035 void __attribute__((naked,noinline)) sub_FF8BCB0C_my()
1036 {
1037         asm volatile (
1038 "               STMFD   SP!, {R4-R8,LR} \n"
1039 "               LDR     R7, =0x43F8 \n"
1040 "               MOV     R4, R0 \n"
1041 "               LDR     R0, [R7,#0x1C] \n"
1042 "               MOV     R1, #0x3E \n"
1043 "               BL      sub_FF88560C \n"
1044 "               LDRSH   R0, [R4,#4] \n"
1045 "               MOV     R2, #0 \n"
1046 "               MOV     R1, #0 \n"
1047 "               BL      sub_FF8BB978 \n"
1048 "               MOV     R5, R0 \n"
1049 "               LDRSH   R0, [R4,#6] \n"
1050 "               BL      sub_FF8BBA88 \n"
1051 "               LDRSH   R0, [R4,#8] \n"
1052 "               BL      sub_FF8BBAE0 \n"
1053 "               LDRSH   R0, [R4,#0xA] \n"
1054 "               BL      sub_FF8BBB38 \n"
1055 "               LDRSH   R0, [R4,#0xC] \n"
1056 "               MOV     R1, #0 \n"
1057 "               BL      sub_FF8BBB90 \n"
1058 "               MOV     R6, R0 \n"
1059 "               LDRSH   R0, [R4,#0xE] \n"
1060 "               BL      sub_FF8C0EDC \n"
1061 "               LDR     R0, [R4] \n"
1062 "               LDR     R8, =0x544F8 \n"
1063 "               CMP     R0, #0xB \n"
1064 "               MOVEQ   R5, #0 \n"
1065 "               MOVEQ   R6, #0 \n"
1066 "               BEQ     loc_FF8BCBA8 \n"
1067 "               CMP     R5, #1 \n"
1068 "               BNE     loc_FF8BCBA8 \n"
1069 "               LDRSH   R0, [R4,#4] \n"
1070 "               LDR     R1, =0xFF8BB8E4 \n"
1071 "               MOV     R2, #2 \n"
1072 "               BL      sub_FF961974 \n"
1073 "               STRH    R0, [R4,#4] \n"
1074 "               MOV     R0, #0 \n"
1075 "               STR     R0, [R7,#0x28] \n"
1076 "               B       loc_FF8BCBB0 \n"
1077 "loc_FF8BCBA8: \n"
1078 "               LDRH    R0, [R8] \n"
1079 "               STRH    R0, [R4,#4] \n"
1080 "loc_FF8BCBB0: \n"
1081 "               CMP     R6, #1 \n"
1082 "               LDRNEH  R0, [R8,#8] \n"
1083 "               BNE     loc_FF8BCBCC \n"
1084 "               LDRSH   R0, [R4,#0xC] \n"
1085 "               LDR     R1, =0xFF8BB968 \n"
1086 "               MOV     R2, #0x20 \n"
1087 "               BL      sub_FF8C0EF8 \n"
1088 "loc_FF8BCBCC: \n"
1089 "               STRH    R0, [R4,#0xC] \n"
1090 "               LDRSH   R0, [R4,#6] \n"
1091 //"             BL      sub_FF8ADF00 \n"
1092 "               BL      sub_FF8ADF00_my \n"                             // Patched ---------->
1093 "               LDRSH   R0, [R4,#8] \n"
1094 "               MOV     R1, #1 \n"
1095 "               BL      sub_FF8AE650 \n"
1096 "               MOV     R1, #0 \n"
1097 "               ADD     R0, R4, #8 \n"
1098 "               BL      sub_FF8AE6D8 \n"
1099 "               LDRSH   R0, [R4,#0xE] \n"
1100 "               BL      sub_FF8B68D8 \n"
1101 "               LDR     R4, =0xBB8 \n"
1102 "               CMP     R5, #1 \n"
1103 "               BNE     loc_FF8BCC24 \n"
1104 "               LDR     R0, [R7,#0x1C] \n"
1105 "               MOV     R2, R4 \n"
1106 "               MOV     R1, #2 \n"
1107 "               BL      sub_FF885518 \n"
1108 "               TST     R0, #1 \n"
1109 "               LDRNE   R1, =0x61E \n"
1110 "               LDRNE   R0, =0xFF8BBFAC \n"     // "ExpDrv.c"
1111 "               BLNE    _DebugAssert \n"
1112 "loc_FF8BCC24: \n"
1113 "               CMP     R6, #1 \n"
1114 "               LDMNEFD SP!, {R4-R8,PC} \n"
1115 "               LDR     R0, [R7,#0x1C] \n"
1116 "               MOV     R2, R4 \n"
1117 "               MOV     R1, #0x20 \n"
1118 "               BL      sub_FF885518 \n"
1119 "               TST     R0, #1 \n"
1120 "               LDRNE   R1, =0x623 \n"
1121 //"             ADRNE   R0, aExpdrv_c \n"       // "ExpDrv.c"
1122 "               LDRNE   R0, =0xFF8BBFAC \n"
1123 "               LDMNEFD SP!, {R4-R8,LR} \n"
1124 "               BNE     _DebugAssert \n"
1125 "               LDMFD   SP!, {R4-R8,PC}  \n"
1126         );
1127 }
1128 
1129 void __attribute__((naked,noinline))sub_FF8ADF00_my() {
1130 
1131         asm volatile (
1132 "               STMFD   SP!, {R4-R6,LR} \n"
1133 "               LDR     R5, =0x40DC \n"
1134 "               MOV     R4, R0 \n"
1135 "               LDR     R0, [R5,#4] \n"
1136 "               CMP     R0, #1 \n"
1137 "               LDRNE   R1, =0x146 \n"
1138 //"             ADRNE   R0, aShutter_c \n"      // "Shutter.c"
1139 "               LDRNE   R0, =0xFF8ADD04 \n" 
1140 "               BLNE    _DebugAssert \n"
1141 "               CMN     R4, #0xC00 \n"
1142 "               LDREQSH R4, [R5,#2] \n"
1143 "               CMN     R4, #0xC00 \n"
1144 "               MOVEQ   R1, #0x14C \n"
1145 //"             ADREQ   R0, aShutter_c \n"      // "Shutter.c"
1146 "               LDREQ   R0, =0xFF8ADD04 \n" 
1147 "               STRH    R4, [R5,#2] \n"
1148 "               BLEQ    _DebugAssert \n"
1149 "               MOV     R0, R4 \n"
1150 //"             BL      sub_FFA0E804 \n"
1151 "               BL      apex2us \n"                             // Patched (call our own apex2us)
1152 "               MOV     R4, R0 \n"
1153 "               BL      sub_FF8F6B80 \n"
1154 "               MOV     R0, R4 \n"
1155 "               BL      sub_FF9030B0 \n"
1156 "               TST     R0, #1 \n"
1157 "               LDRNE   R1, =0x151 \n"
1158 "               LDMNEFD SP!, {R4-R6,LR} \n"
1159 //"             ADRNE   R0, aShutter_c \n"      // "Shutter.c"
1160 "               LDRNE   R0, =0xFF8ADD04 \n" 
1161 "               BNE     _DebugAssert \n"
1162 "               LDMFD   SP!, {R4-R6,PC} \n"
1163         );
1164 }

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