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

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF968CAC_my
  3. exp_drv_task
  4. sub_FF8AE6BC_my
  5. sub_FF89E38C_my

   1 #include "lolevel.h"
   2 #include "platform.h"
   3 #include "core.h"
   4 #include "conf.h"
   5 #include "stdlib.h"
   6 
   7 static long *nrflag = (long*)(0x8b64+0x00);  // Found @ ff9f7100 & ff9f7148
   8 #define NR_AUTO (0)                          // have to explictly reset value back to 0 to enable auto
   9 
  10 #define PAUSE_FOR_FILE_COUNTER 150           // Enable delay in capt_seq_hook_raw_here to ensure file counter is updated
  11 #include "../../../generic/capt_seq.c"
  12 
  13 //** capt_seq_task  @ 0xFF872424 
  14 
  15 void __attribute__((naked,noinline)) capt_seq_task(  ) { 
  16 asm volatile (
  17       "STMFD   SP!, {R3-R9,LR} \n"
  18       "LDR     R4, =0x376AC \n"
  19       "LDR     R7, =0x2BA8 \n"
  20       "MOV     R6, #0 \n"
  21 "loc_FF872434:\n"
  22       "LDR     R0, [R7, #4] \n"
  23       "MOV     R2, #0 \n"
  24       "MOV     R1, SP \n"
  25       "BL      sub_003F7218 \n" // RAM
  26       "TST     R0, #1 \n"
  27       "BEQ     loc_FF872460 \n"
  28       "LDR     R1, =0x493 \n"
  29       "LDR     R0, =0xFF871F90 \n" // "SsShootTask.c"
  30       "BL      _DebugAssert \n"
  31       "BL      _ExitTask \n"
  32       "LDMFD   SP!, {R3-R9,PC} \n"
  33 "loc_FF872460:\n"
  34       "LDR     R0, [SP] \n"
  35       "LDR     R1, [R0] \n"
  36       "CMP     R1, #0x20 \n"
  37       "ADDCC   PC, PC, R1, LSL #2 \n"
  38       "B       loc_FF8726BC \n"
  39       "B       loc_FF8724F4 \n"
  40       "B       loc_FF87250C \n"
  41       "B       loc_FF872570 \n"
  42       "B       loc_FF872584 \n"
  43       "B       loc_FF87257C \n"
  44       "B       loc_FF872590 \n"
  45       "B       loc_FF872598 \n"
  46       "B       loc_FF8725A0 \n"
  47       "B       loc_FF8725BC \n"
  48       "B       loc_FF8725E8 \n"
  49       "B       loc_FF8725C8 \n"
  50       "B       loc_FF8725D4 \n"
  51       "B       loc_FF8725DC \n"
  52       "B       loc_FF8725F0 \n"
  53       "B       loc_FF8725F8 \n"
  54       "B       loc_FF872600 \n"
  55       "B       loc_FF872608 \n"
  56       "B       loc_FF872610 \n"
  57       "B       loc_FF87261C \n"
  58       "B       loc_FF872624 \n"
  59       "B       loc_FF87262C \n"
  60       "B       loc_FF872634 \n"
  61       "B       loc_FF87263C \n"
  62       "B       loc_FF872648 \n"
  63       "B       loc_FF872650 \n"
  64       "B       loc_FF872658 \n"
  65       "B       loc_FF872660 \n"
  66       "B       loc_FF872668 \n"
  67       "B       loc_FF872674 \n"
  68       "B       loc_FF87267C \n"
  69       "B       loc_FF872688 \n"
  70       "B       loc_FF8726C8 \n"
  71 "loc_FF8724F4:\n"
  72       "BL               shooting_expo_iso_override\n"       // added
  73       "BL      sub_FF872C3C \n"
  74       "BL      shooting_expo_param_override\n"      // added
  75       "BL      sub_FF870230 \n"
  76 //      "LDR     R0, [R4, #0x28] \n"
  77 //      "CMP     R0, #0 \n"
  78 //      "BLNE    sub_FF968D48 \n" // above 3 lines removed - redundant with added lines below
  79       "MOV     R0, #0\n"          // patch added
  80       "STR     R0, [R4,#0x28]\n"  //fixes overrides  behavior at short shutter press
  81       "B       loc_FF8726C8 \n"
  82 "loc_FF87250C:\n"
  83       "LDR     R5, [R0, #0x10] \n"
  84       "LDR     R0, [R4, #0x28] \n"
  85       "CMP     R0, #0 \n"
  86       "BNE     loc_FF872548 \n"
  87       "BL      sub_FF873B4C \n"
  88       "MOV     R1, R5 \n"
  89       "BL      sub_FF873BA4 \n"
  90       "LDR     R0, =0x10F \n"
  91       "MOV     R2, #4 \n"
  92       "ADD     R1, R5, #0x24 \n"
  93       "BL      _SetPropertyCase \n"
  94       "MOV     R2, #4 \n"
  95       "ADD     R1, R5, #0x28 \n"
  96       "MOV     R0, #0x2C \n"
  97       "BL      _SetPropertyCase \n"
  98 "loc_FF872548:\n"
  99       "MOV     R0, R5 \n"
 100 //      "BL      sub_FF968CAC \n" //original
 101       "BL      sub_FF968CAC_my \n" //patched
 102       "BL      capt_seq_hook_raw_here \n" // patch
 103       "MOV     R8, R0 \n"
 104       "MOV     R2, R5 \n"
 105       "MOV     R1, #1 \n"
 106       "BL      sub_FF8706E0 \n"
 107       "TST     R8, #1 \n"
 108       "MOVEQ   R0, R5 \n"
 109       "BLEQ    sub_FF968628 \n"
 110       "B       loc_FF8726C8 \n"
 111 "loc_FF872570:\n"
 112       "MOV     R0, #1 \n"
 113       "BL      sub_FF872F0C \n"
 114       "B       loc_FF8726C8 \n"
 115 "loc_FF87257C:\n"
 116       "BL      sub_FF872890 \n"
 117       "B       loc_FF872588 \n"
 118 "loc_FF872584:\n"
 119       "BL      sub_FF872C1C \n"
 120 "loc_FF872588:\n"
 121       "STR     R6, [R4, #0x28] \n"
 122       "B       loc_FF8726C8 \n"
 123 "loc_FF872590:\n"
 124       "BL      sub_FF872C24 \n"
 125       "B       loc_FF8726C8 \n"
 126 "loc_FF872598:\n"
 127       "BL      sub_FF872DF4 \n"
 128       "B       loc_FF8725C0 \n"
 129 "loc_FF8725A0:\n"
 130       "LDR     R5, [R0, #0x10] \n"
 131       "MOV     R0, R5 \n"
 132       "BL      sub_FF968DE0 \n"
 133       "MOV     R2, R5 \n"
 134       "MOV     R1, #9 \n"
 135       "BL      sub_FF8706E0 \n"
 136       "B       loc_FF8726C8 \n"
 137 "loc_FF8725BC:\n"
 138       "BL      sub_FF872E74 \n"
 139 "loc_FF8725C0:\n"
 140       "BL      sub_FF870230 \n"
 141       "B       loc_FF8726C8 \n"
 142 "loc_FF8725C8:\n"
 143       "LDR     R0, [R4, #0x58] \n"
 144       "BL      sub_FF8732FC \n"
 145       "B       loc_FF8726C8 \n"
 146 "loc_FF8725D4:\n"
 147       "BL      sub_FF8736BC \n"
 148       "B       loc_FF8726C8 \n"
 149 "loc_FF8725DC:\n"
 150       "MOV     R0, #0 \n"
 151       "BL      sub_FF873720 \n"
 152       "B       loc_FF8726C8 \n"
 153 "loc_FF8725E8:\n"
 154       "BL      sub_FF872C1C \n"
 155       "B       loc_FF8726C8 \n"
 156 "loc_FF8725F0:\n"
 157       "BL      sub_FF9679CC \n"
 158       "B       loc_FF8726C8 \n"
 159 "loc_FF8725F8:\n"
 160       "BL      sub_FF967C2C \n"
 161       "B       loc_FF8726C8 \n"
 162 "loc_FF872600:\n"
 163       "BL      sub_FF967CE4 \n"
 164       "B       loc_FF8726C8 \n"
 165 "loc_FF872608:\n"
 166       "BL      sub_FF967DB8 \n"
 167       "B       loc_FF8726C8 \n"
 168 "loc_FF872610:\n"
 169       "MOV     R0, #0 \n"
 170       "BL      sub_FF968018 \n"
 171       "B       loc_FF8726C8 \n"
 172 "loc_FF87261C:\n"
 173       "BL      sub_FF968188 \n"
 174       "B       loc_FF8726C8 \n"
 175 "loc_FF872624:\n"
 176       "BL      sub_FF96821C \n"
 177       "B       loc_FF8726C8 \n"
 178 "loc_FF87262C:\n"
 179       "BL      sub_FF9682D8 \n"
 180       "B       loc_FF8726C8 \n"
 181 "loc_FF872634:\n"
 182       "BL      sub_FF873080 \n"
 183       "B       loc_FF8726C8 \n"
 184 "loc_FF87263C:\n"
 185       "BL      sub_FF873104 \n"
 186       "BL      sub_FF8322CC \n"
 187       "B       loc_FF8726C8 \n"
 188 "loc_FF872648:\n"
 189       "BL      sub_FF967E88 \n"
 190       "B       loc_FF8726C8 \n"
 191 "loc_FF872650:\n"
 192       "BL      sub_FF967EC8 \n"
 193       "B       loc_FF8726C8 \n"
 194 "loc_FF872658:\n"
 195       "BL      sub_FF875028 \n"
 196       "B       loc_FF8726C8 \n"
 197 "loc_FF872660:\n"
 198       "BL      sub_FF87509C \n"
 199       "B       loc_FF8726C8 \n"
 200 "loc_FF872668:\n"
 201       "LDR     R0, [R0, #0xC] \n"
 202       "BL      sub_FF968400 \n"
 203       "B       loc_FF8726C8 \n"
 204 "loc_FF872674:\n"
 205       "BL      sub_FF968470 \n"
 206       "B       loc_FF8726C8 \n"
 207 "loc_FF87267C:\n"
 208       "BL      sub_FF875104 \n"
 209       "BL      sub_FF8750BC \n"
 210       "B       loc_FF8726C8 \n"
 211 "loc_FF872688:\n"
 212       "MOV     R0, #1 \n"
 213       "BL      sub_FF9694E0 \n"
 214       "MOV     R0, #1 \n"
 215       "BL      sub_FF969608 \n"
 216       "LDRH    R0, [R4, #0x9C] \n"
 217       "CMP     R0, #4 \n"
 218       "LDRNEH  R0, [R4] \n"
 219       "SUBNE   R1, R0, #0x8200 \n"
 220       "SUBNES  R1, R1, #0x2E \n"
 221       "BNE     loc_FF8726C8 \n"
 222       "BL      sub_FF87509C \n"
 223       "BL      sub_FF875560 \n"
 224       "B       loc_FF8726C8 \n"
 225 "loc_FF8726BC:\n"
 226       "LDR     R1, =0x5F4 \n"
 227       "LDR     R0, =0xFF871F90 \n" // "SsShootTask.c"
 228       "BL      _DebugAssert \n"
 229 "loc_FF8726C8:\n"
 230       "LDR     R0, [SP] \n"
 231       "LDR     R1, [R0, #4] \n"
 232       "LDR     R0, [R7] \n"
 233       "BL      sub_003FAC6C \n"
 234       "LDR     R5, [SP] \n"
 235       "LDR     R0, [R5, #8] \n"
 236       "CMP     R0, #0 \n"
 237       "LDREQ   R1, =0x117 \n"
 238       "LDREQ   R0, =0xFF871F90 \n" // "SsShootTask.c"
 239       "BLEQ    _DebugAssert \n"
 240       "STR     R6, [R5, #8] \n"
 241       "B       loc_FF872434 \n"
 242         );
 243 }
 244 
 245 //** sub_FF968CAC_my  @ 0xFF968CAC 
 246 //CHECK THIS!!!
 247 void __attribute__((naked,noinline)) sub_FF968CAC_my() {
 248 asm volatile (
 249       "STMFD   SP!, {R4-R6,LR} \n"
 250       "LDR     R5, =0x376AC \n"
 251       "MOV     R6, R0 \n"
 252       "LDR     R0, [R5, #0x28] \n"
 253       "MOV     R4, #0 \n"
 254       "CMP     R0, #0 \n"
 255       "BNE     loc_FF968CDC \n"
 256       "MOV     R0, #0xC \n"
 257       "BL      sub_FF876C00 \n"
 258       "TST     R0, #1 \n"
 259       "MOVNE   R0, #1 \n"
 260       "LDMNEFD SP!, {R4-R6,PC} \n"
 261 "loc_FF968CDC:\n"
 262       "BL      sub_FF872C2C \n"
 263       "LDR     R0, [R5, #0x28] \n"
 264       "CMP     R0, #0 \n"
 265       "BNE     loc_FF968D2C \n"
 266       "MOV     R0, R6 \n"
 267       "BL      sub_FF968568 \n"
 268       "TST     R0, #1 \n"
 269       "LDMNEFD SP!, {R4-R6,PC} \n"
 270       "MOV     R0, R6 \n"
 271       "BL      sub_FF9688FC \n"
 272       "BL      sub_FF9692C0 \n"
 273 
 274 //This was not tested:
 275 //begin patch
 276       "BL      wait_until_remote_button_is_released\n"  
 277       "BL      capt_seq_hook_set_nr\n"      
 278 //end patch            
 279       "MOV     R0, #2 \n"
 280       "BL      sub_FF878360 \n"
 281       "LDR     R0, [R5, #0x8C] \n"
 282       "TST     R0, #0x10 \n"
 283       "BNE     loc_FF968D3C \n"
 284       "MOV     R0, R6 \n"
 285       "BL      sub_FFA87454 \n"  //original
 286 //      "BL      sub_FFA87454_my \n" //This function calls "SsStandardCaptureSeq.c"
 287       "MOV     R4, R0 \n"
 288       "B       loc_FF968D40 \n"
 289 "loc_FF968D2C:\n"
 290       "LDR     R0, =0x694C \n"
 291       "LDR     R0, [R0] \n"
 292       "CMP     R0, #0 \n"
 293       "BEQ     loc_FF968D40 \n"
 294 "loc_FF968D3C:\n"
 295       "MOV     R4, #0x1D \n"
 296 "loc_FF968D40:\n"
 297       "MOV     R0, R4 \n"
 298       "LDMFD   SP!, {R4-R6,PC} \n"
 299         );
 300 }
 301 
 302 //** sub_FFA87454_my  @ 0xFFA87454
 303 /*
 304 void __attribute__((naked,noinline)) sub_FFA87454_my() {
 305 asm volatile (
 306       "STMFD   SP!, {R3-R9,LR} \n"
 307       "MOV     R4, R0 \n"
 308       "LDR     R1, =0xB60C \n"
 309       "MOV     R2, #4 \n"
 310       "MOV     R0, #0x130 \n"
 311       "BL      _GetPropertyCase \n"
 312       "TST     R0, #1 \n"
 313       "MOVNE   R1, #0x230 \n"
 314       "LDRNE   R0, =0xFFA87680 \n" // "SsStandardCaptureSeq.c"
 315       "BLNE    _DebugAssert \n"
 316       "LDR     R6, =0xB604 \n"
 317       "LDR     R0, [R6, #8] \n"
 318       "AND     R0, R0, #0xFF00 \n"
 319       "CMP     R0, #0x600 \n"
 320       "LDRNE   R0, =0xFF968640 \n"
 321       "LDREQ   R0, =0xFFA871CC \n"
 322       "MOVNE   R1, R4 \n"
 323       "MOVEQ   R1, #0 \n"
 324       "BL      sub_FF8A6514 \n"
 325       "MOV     R0, R4 \n"
 326       "BL      sub_FF9685F8 \n"
 327       "MOV     R0, R4 \n"
 328       "BL      sub_FF9689CC \n"
 329       "MOV     R8, R0 \n"
 330       "LDR     R1, =0xB608 \n"
 331       "MOV     R2, #4 \n"
 332       "MOV     R0, #0x8A \n"
 333       "BL      _GetPropertyCase \n"
 334       "TST     R0, #1 \n"
 335       "LDRNE   R1, =0x23D \n"
 336       "LDRNE   R0, =0xFFA87680 \n" // "SsStandardCaptureSeq.c"
 337       "BLNE    _DebugAssert \n"
 338       "BL      sub_FF874DA0 \n"
 339       "BL      sub_FF968BD4 \n"
 340       "CMP     R8, #0xA \n"
 341       "MOV     R7, #0 \n"
 342       "MOV     R5, #1 \n"
 343       "ADDCC   PC, PC, R8, LSL #2 \n"
 344       "B       loc_FFA875B4 \n"
 345       "B       loc_FFA875B4 \n"
 346       "B       loc_FFA87518 \n"
 347       "B       loc_FFA87528 \n"
 348       "B       loc_FFA87544 \n"
 349       "B       loc_FFA87554 \n"
 350       "B       loc_FFA87580 \n"
 351       "B       loc_FFA875B4 \n"
 352       "B       loc_FFA875B4 \n"
 353       "B       loc_FFA875B4 \n"
 354       "B       loc_FFA87598 \n"
 355 "loc_FFA87518:\n"
 356       "MOV     R0, #1 \n"
 357       "BL      sub_FF8A6530 \n"
 358       "STRH    R7, [R4, #0x10] \n"
 359       "B       loc_FFA875A8 \n"
 360 "loc_FFA87528:\n"
 361       "MOV     R0, #1 \n"
 362       "BL      sub_FF8A6530 \n"
 363       "MOV     R0, R4 \n"
 364       "STRH    R5, [R4, #0x10] \n"
 365       "BL      sub_FFA872DC \n"
 366 "loc_FFA8753C:\n"
 367       "MOV     R5, R0 \n"
 368       "B       loc_FFA875C4 \n"
 369 "loc_FFA87544:\n"
 370       "MOV     R0, #1 \n"
 371       "BL      sub_FF8A6530 \n"
 372       "MOV     R0, #1 \n"
 373       "B       loc_FFA87560 \n"
 374 "loc_FFA87554:\n"
 375       "MOV     R0, #1 \n"
 376       "BL      sub_FF8A6530 \n"
 377       "MOV     R0, #2 \n"
 378 "loc_FFA87560:\n"
 379       "BL      sub_FF8A6694 \n"
 380       "MOV     R0, R4 \n"
 381       "STRH    R5, [R4, #0x10] \n"
 382       "BL      sub_FFA872DC \n"
 383       "MOV     R5, R0 \n"
 384       "MOV     R0, #0 \n"
 385       "BL      sub_FF8A6694 \n"
 386       "B       loc_FFA875C4 \n"
 387 "loc_FFA87580:\n"
 388       "MOV     R0, #1 \n"
 389       "BL      sub_FF8A6530 \n"
 390       "MOV     R0, R4 \n"
 391       "STRH    R7, [R4, #0x10] \n"
 392       "BL      sub_FFA873A4 \n"
 393       "B       loc_FFA8753C \n"
 394 "loc_FFA87598:\n"
 395       "MOV     R0, #0 \n"
 396       "BL      sub_FF8A6530 \n"
 397       "MOV     R0, #4 \n"
 398       "STRH    R0, [R4, #0x10] \n"
 399 "loc_FFA875A8:\n"
 400       "MOV     R0, R4 \n"
 401       "BL      sub_FFA8725C \n"
 402       "B       loc_FFA8753C \n"
 403 "loc_FFA875B4:\n"
 404       "LDR     R1, =0x286 \n"
 405       "LDR     R0, =0xFFA87680 \n" // "SsStandardCaptureSeq.c"
 406       "BL      _DebugAssert \n"
 407       "MOV     R5, #0x1D \n"
 408 "loc_FFA875C4:\n"
 409       "BL      sub_FF968C24 \n"
 410       "TST     R5, #1 \n"
 411       "MOVNE   R0, R5 \n"
 412       "BNE     loc_FFA8765C \n"
 413       "MOV     R0, R4 \n"
 414       "BL      sub_FF968AF8 \n"
 415       "MOV     R0, R4 \n"
 416       "BL      sub_FF968A94 \n"
 417       "LDR     R0, [R6] \n"
 418       "CMP     R0, #0 \n"
 419       "BNE     loc_FFA87604 \n"
 420       "LDRH    R0, [R4, #0x10] \n"
 421       "CMP     R0, #1 \n"
 422       "CMPNE   R0, #3 \n"
 423       "CMPNE   R0, #5 \n"
 424       "BEQ     loc_FFA87658 \n"
 425 "loc_FFA87604:\n"
 426       "BL      sub_FF9697C8 \n"
 427       "LDR     R5, =0x2A3 \n"
 428       "LDR     R2, =0x3A98 \n"
 429       "LDR     R3, =0xFFA87680 \n" // "SsStandardCaptureSeq.c"
 430       "MOV     R1, #0xC \n"
 431       "STR     R5, [SP] \n"
 432       "BL      sub_FF876E68 \n"
 433       "CMP     R0, #0 \n"
 434       "MOVNE   R1, R5 \n"
 435       "LDRNE   R0, =0xFFA87680 \n" // "SsStandardCaptureSeq.c"
 436       "BLNE    _DebugAssert \n"
 437       "LDR     R0, =0x376AC \n"
 438       "LDR     R1, [R0, #0x8C] \n"
 439       "TST     R1, #2 \n"
 440       "BNE     loc_FFA87658 \n"
 441       "LDRH    R0, [R0, #0x9A] \n"
 442       "CMP     R0, #3 \n"
 443       "LDRNE   R0, [R4, #8] \n"
 444       "CMPNE   R0, #1 \n"
 445       "MOVLS   R0, R4 \n"
 446       "BLLS    sub_FF9686C8 \n"
 447 "loc_FFA87658:\n"
 448       "MOV     R0, #0 \n"
 449 "loc_FFA8765C:\n"
 450       "LDMFD   SP!, {R3-R9,PC} \n"
 451         );
 452 }
 453 */
 454 
 455 //** exp_drv_task  @ 0xFF8B1A4C 
 456 
 457 void __attribute__((naked,noinline)) exp_drv_task() {
 458 asm volatile (
 459       "STMFD   SP!, {R4-R9,LR} \n"
 460       "SUB     SP, SP, #0x2C \n"
 461       "LDR     R6, =0x3E3C \n"
 462       "LDR     R7, =0xBB8 \n"
 463       "LDR     R4, =0x5465C \n"
 464       "MOV     R0, #0 \n"
 465       "ADD     R5, SP, #0x1C \n"
 466       "STR     R0, [SP, #0xC] \n"
 467 "loc_FF8B1A6C:\n"
 468       "LDR     R0, [R6, #0x20] \n"
 469       "MOV     R2, #0 \n"
 470       "ADD     R1, SP, #0x28 \n"
 471       "BL      sub_003F7218 \n"
 472       "LDR     R0, [SP, #0xC] \n"
 473       "CMP     R0, #1 \n"
 474       "BNE     loc_FF8B1AB8 \n"
 475       "LDR     R0, [SP, #0x28] \n"
 476       "LDR     R0, [R0] \n"
 477       "CMP     R0, #0x14 \n"
 478       "CMPNE   R0, #0x15 \n"
 479       "CMPNE   R0, #0x16 \n"
 480       "CMPNE   R0, #0x17 \n"
 481       "BEQ     loc_FF8B1C18 \n"
 482       "CMP     R0, #0x2A \n"
 483       "BEQ     loc_FF8B1BA0 \n"
 484       "ADD     R1, SP, #0xC \n"
 485       "MOV     R0, #0 \n"
 486       "BL      sub_FF8B19FC \n"
 487 "loc_FF8B1AB8:\n"
 488       "LDR     R0, [SP, #0x28] \n"
 489       "LDR     R1, [R0] \n"
 490       "CMP     R1, #0x30 \n"
 491       "BNE     loc_FF8B1AE4 \n"
 492       "BL      sub_FF8B2E2C \n"
 493       "LDR     R0, [R6, #0x1C] \n"
 494       "MOV     R1, #1 \n"
 495       "BL      sub_003FAC6C \n"
 496       "BL      _ExitTask \n"
 497       "ADD     SP, SP, #0x2C \n"
 498       "LDMFD   SP!, {R4-R9,PC} \n"
 499 "loc_FF8B1AE4:\n"
 500       "CMP     R1, #0x2F \n"
 501       "BNE     loc_FF8B1B00 \n"
 502       "LDR     R2, [R0, #0x8C]! \n"
 503       "LDR     R1, [R0, #4] \n"
 504       "MOV     R0, R1 \n"
 505       "BLX     R2 \n"
 506       "B       loc_FF8B20D4 \n"
 507 "loc_FF8B1B00:\n"
 508       "CMP     R1, #0x28 \n"
 509       "BNE     loc_FF8B1B50 \n"
 510       "LDR     R0, [R6, #0x1C] \n"
 511       "MOV     R1, #0x80 \n"
 512       "BL      sub_003FACA0 \n"
 513       "LDR     R0, =0xFF8AD360 \n"
 514       "MOV     R1, #0x80 \n"
 515       "BL      sub_FF959A4C \n"
 516       "LDR     R0, [R6, #0x1C] \n"
 517       "MOV     R2, R7 \n"
 518       "MOV     R1, #0x80 \n"
 519       "BL      sub_003FABAC \n"
 520       "TST     R0, #1 \n"
 521       "LDRNE   R1, =0x157A \n"
 522       "BNE     loc_FF8B1C0C \n"
 523 "loc_FF8B1B3C:\n"
 524       "LDR     R1, [SP, #0x28] \n"
 525       "LDR     R0, [R1, #0x90] \n"
 526       "LDR     R1, [R1, #0x8C] \n"
 527       "BLX     R1 \n"
 528       "B       loc_FF8B20D4 \n"
 529 "loc_FF8B1B50:\n"
 530       "CMP     R1, #0x29 \n"
 531       "BNE     loc_FF8B1B98 \n"
 532       "ADD     R1, SP, #0xC \n"
 533       "BL      sub_FF8B19FC \n"
 534       "LDR     R0, [R6, #0x1C] \n"
 535       "MOV     R1, #0x100 \n"
 536       "BL      sub_003FACA0 \n"
 537       "LDR     R0, =0xFF8AD370 \n"
 538       "MOV     R1, #0x100 \n"
 539       "BL      sub_FF959BEC \n"
 540       "LDR     R0, [R6, #0x1C] \n"
 541       "MOV     R2, R7 \n"
 542       "MOV     R1, #0x100 \n"
 543       "BL      sub_003FABAC \n"
 544       "TST     R0, #1 \n"
 545       "BEQ     loc_FF8B1B3C \n"
 546       "LDR     R1, =0x1584 \n"
 547       "B       loc_FF8B1C0C \n"
 548 "loc_FF8B1B98:\n"
 549       "CMP     R1, #0x2A \n"
 550       "BNE     loc_FF8B1BB0 \n"
 551 "loc_FF8B1BA0:\n"
 552       "LDR     R0, [SP, #0x28] \n"
 553       "ADD     R1, SP, #0xC \n"
 554       "BL      sub_FF8B19FC \n"
 555       "B       loc_FF8B1B3C \n"
 556 "loc_FF8B1BB0:\n"
 557       "CMP     R1, #0x2D \n"
 558       "BNE     loc_FF8B1BC8 \n"
 559       "BL      sub_FF89E640 \n"
 560       "BL      sub_FF89F328 \n"
 561       "BL      sub_FF89EE90 \n"
 562       "B       loc_FF8B1B3C \n"
 563 "loc_FF8B1BC8:\n"
 564       "CMP     R1, #0x2E \n"
 565       "BNE     loc_FF8B1C18 \n"
 566       "LDR     R0, [R6, #0x1C] \n"
 567       "MOV     R1, #4 \n"
 568       "BL      sub_003FACA0 \n"
 569       "LDR     R1, =0xFF8AD390 \n"
 570       "LDR     R0, =0xFFFFF400 \n"
 571       "MOV     R2, #4 \n"
 572       "BL      sub_FF89E090 \n"
 573       "BL      sub_FF89E320 \n"
 574       "LDR     R0, [R6, #0x1C] \n"
 575       "MOV     R2, R7 \n"
 576       "MOV     R1, #4 \n"
 577       "BL      sub_003FAAC8 \n"
 578       "TST     R0, #1 \n"
 579       "BEQ     loc_FF8B1B3C \n"
 580       "LDR     R1, =0x15AC \n"
 581 "loc_FF8B1C0C:\n"
 582       "LDR     R0, =0xFF8ADA84 \n"
 583       "BL      _DebugAssert \n"
 584       "B       loc_FF8B1B3C \n"
 585 "loc_FF8B1C18:\n"
 586       "LDR     R0, [SP, #0x28] \n"
 587       "MOV     R8, #1 \n"
 588       "LDR     R1, [R0] \n"
 589       "CMP     R1, #0x12 \n"
 590       "CMPNE   R1, #0x13 \n"
 591       "BNE     loc_FF8B1C80 \n"
 592       "LDR     R1, [R0, #0x7C] \n"
 593       "ADD     R1, R1, R1, LSL #1 \n"
 594       "ADD     R1, R0, R1, LSL #2 \n"
 595       "SUB     R1, R1, #8 \n"
 596       "LDMIA   R1, {R2,R3,R9} \n"
 597       "STMIA   R5, {R2,R3,R9} \n"
 598       "BL      sub_FF8AFF9C \n"
 599       "LDR     R0, [SP, #0x28] \n"
 600       "LDR     R1, [R0, #0x7C] \n"
 601       "LDR     R3, [R0, #0x8C] \n"
 602       "LDR     R2, [R0, #0x90] \n"
 603       "ADD     R0, R0, #4 \n"
 604       "BLX     R3 \n"
 605       "LDR     R0, [SP, #0x28] \n"
 606       "BL      sub_FF8B3230 \n"
 607       "LDR     R0, [SP, #0x28] \n"
 608       "LDR     R1, [R0, #0x7C] \n"
 609       "LDR     R2, [R0, #0x98] \n"
 610       "LDR     R3, [R0, #0x94] \n"
 611       "B       loc_FF8B1F98 \n"
 612 "loc_FF8B1C80:\n"
 613       "CMP     R1, #0x14 \n"
 614       "CMPNE   R1, #0x15 \n"
 615       "CMPNE   R1, #0x16 \n"
 616       "CMPNE   R1, #0x17 \n"
 617       "BNE     loc_FF8B1D38 \n"
 618       "ADD     R3, SP, #0xC \n"
 619       "MOV     R2, SP \n"
 620       "ADD     R1, SP, #0x1C \n"
 621       "BL      sub_FF8B01FC \n"
 622       "CMP     R0, #1 \n"
 623       "MOV     R9, R0 \n"
 624       "CMPNE   R9, #5 \n"
 625       "BNE     loc_FF8B1CD4 \n"
 626       "LDR     R0, [SP, #0x28] \n"
 627       "MOV     R2, R9 \n"
 628       "LDR     R1, [R0, #0x7C]! \n"
 629       "LDR     R12, [R0, #0x10]! \n"
 630       "LDR     R3, [R0, #4] \n"
 631       "MOV     R0, SP \n"
 632       "BLX     R12 \n"
 633       "B       loc_FF8B1D0C \n"
 634 "loc_FF8B1CD4:\n"
 635       "LDR     R0, [SP, #0x28] \n"
 636       "CMP     R9, #2 \n"
 637       "LDR     R3, [R0, #0x90] \n"
 638       "CMPNE   R9, #6 \n"
 639       "BNE     loc_FF8B1D20 \n"
 640       "LDR     R12, [R0, #0x8C] \n"
 641       "MOV     R2, R9 \n"
 642       "MOV     R1, #1 \n"
 643       "MOV     R0, SP \n"
 644       "BLX     R12 \n"
 645       "LDR     R0, [SP, #0x28] \n"
 646       "MOV     R2, SP \n"
 647       "ADD     R1, SP, #0x1C \n"
 648       "BL      sub_FF8B16EC \n"
 649 "loc_FF8B1D0C:\n"
 650       "LDR     R0, [SP, #0x28] \n"
 651       "LDR     R2, [SP, #0xC] \n"
 652       "MOV     R1, R9 \n"
 653       "BL      sub_FF8B193C \n"
 654       "B       loc_FF8B1FA0 \n"
 655 "loc_FF8B1D20:\n"
 656       "LDR     R1, [R0, #0x7C] \n"
 657       "LDR     R12, [R0, #0x8C] \n"
 658       "MOV     R2, R9 \n"
 659       "ADD     R0, R0, #4 \n"
 660       "BLX     R12 \n"
 661       "B       loc_FF8B1FA0 \n"
 662 "loc_FF8B1D38:\n"
 663       "CMP     R1, #0x24 \n"
 664       "CMPNE   R1, #0x25 \n"
 665       "BNE     loc_FF8B1D84 \n"
 666       "LDR     R1, [R0, #0x7C] \n"
 667       "ADD     R1, R1, R1, LSL #1 \n"
 668       "ADD     R1, R0, R1, LSL #2 \n"
 669       "SUB     R1, R1, #8 \n"
 670       "LDMIA   R1, {R2,R3,R9} \n"
 671       "STMIA   R5, {R2,R3,R9} \n"
 672       "BL      sub_FF8AEF88 \n"
 673       "LDR     R0, [SP, #0x28] \n"
 674       "LDR     R1, [R0, #0x7C] \n"
 675       "LDR     R3, [R0, #0x8C] \n"
 676       "LDR     R2, [R0, #0x90] \n"
 677       "ADD     R0, R0, #4 \n"
 678       "BLX     R3 \n"
 679       "LDR     R0, [SP, #0x28] \n"
 680       "BL      sub_FF8AF3C8 \n"
 681       "B       loc_FF8B1FA0 \n"
 682 "loc_FF8B1D84:\n"
 683       "ADD     R1, R0, #4 \n"
 684       "LDMIA   R1, {R2,R3,R9} \n"
 685       "STMIA   R5, {R2,R3,R9} \n"
 686       "LDR     R1, [R0] \n"
 687       "CMP     R1, #0x28 \n"
 688       "ADDCC   PC, PC, R1, LSL #2 \n"
 689       "B       loc_FF8B1F88 \n"
 690       "B       loc_FF8B1E40 \n"
 691       "B       loc_FF8B1E40 \n"
 692       "B       loc_FF8B1E48 \n"
 693       "B       loc_FF8B1E50 \n"
 694       "B       loc_FF8B1E50 \n"
 695       "B       loc_FF8B1E50 \n"
 696       "B       loc_FF8B1E40 \n"
 697       "B       loc_FF8B1E48 \n"
 698       "B       loc_FF8B1E50 \n"
 699       "B       loc_FF8B1E50 \n"
 700       "B       loc_FF8B1E68 \n"
 701       "B       loc_FF8B1E68 \n"
 702       "B       loc_FF8B1F74 \n"
 703       "B       loc_FF8B1F7C \n"
 704       "B       loc_FF8B1F7C \n"
 705       "B       loc_FF8B1F7C \n"
 706       "B       loc_FF8B1F7C \n"
 707       "B       loc_FF8B1F84 \n"
 708       "B       loc_FF8B1F88 \n"
 709       "B       loc_FF8B1F88 \n"
 710       "B       loc_FF8B1F88 \n"
 711       "B       loc_FF8B1F88 \n"
 712       "B       loc_FF8B1F88 \n"
 713       "B       loc_FF8B1F88 \n"
 714       "B       loc_FF8B1E58 \n"
 715       "B       loc_FF8B1E60 \n"
 716       "B       loc_FF8B1E60 \n"
 717       "B       loc_FF8B1E60 \n"
 718       "B       loc_FF8B1E74 \n"
 719       "B       loc_FF8B1E74 \n"
 720       "B       loc_FF8B1E7C \n"
 721       "B       loc_FF8B1EB4 \n"
 722       "B       loc_FF8B1EEC \n"
 723       "B       loc_FF8B1F24 \n"
 724       "B       loc_FF8B1F5C \n"
 725       "B       loc_FF8B1F5C \n"
 726       "B       loc_FF8B1F88 \n"
 727       "B       loc_FF8B1F88 \n"
 728       "B       loc_FF8B1F64 \n"
 729       "B       loc_FF8B1F6C \n"
 730 "loc_FF8B1E40:\n"
 731       "BL      sub_FF8AD908 \n"
 732       "B       loc_FF8B1F88 \n"
 733 "loc_FF8B1E48:\n"
 734       "BL      sub_FF8ADBAC \n"
 735       "B       loc_FF8B1F88 \n"
 736 "loc_FF8B1E50:\n"
 737       "BL      sub_FF8ADDD4 \n"
 738       "B       loc_FF8B1F88 \n"
 739 "loc_FF8B1E58:\n"
 740       "BL      sub_FF8AE0F8 \n"
 741       "B       loc_FF8B1F88 \n"
 742 "loc_FF8B1E60:\n"
 743       "BL      sub_FF8AE310 \n"
 744       "B       loc_FF8B1F88 \n"
 745 "loc_FF8B1E68:\n"
 746 //      "BL      sub_FF8AE6BC \n"  //original
 747       "BL      sub_FF8AE6BC_my \n" //patched
 748       "MOV     R8, #0 \n"
 749       "B       loc_FF8B1F88 \n"
 750 "loc_FF8B1E74:\n"
 751       "BL      sub_FF8AE7FC \n"
 752       "B       loc_FF8B1F88 \n"
 753 "loc_FF8B1E7C:\n"
 754       "LDRH    R1, [R0, #4] \n"
 755       "STRH    R1, [SP, #0x1C] \n"
 756       "LDRH    R1, [R4, #2] \n"
 757       "STRH    R1, [SP, #0x1E] \n"
 758       "LDRH    R1, [R4, #4] \n"
 759       "STRH    R1, [SP, #0x20] \n"
 760       "LDRH    R1, [R4, #6] \n"
 761       "STRH    R1, [SP, #0x22] \n"
 762       "LDRH    R1, [R0, #0xC] \n"
 763       "STRH    R1, [SP, #0x24] \n"
 764       "LDRH    R1, [R4, #0xA] \n"
 765       "STRH    R1, [SP, #0x26] \n"
 766       "BL      sub_FF8B2EC0 \n"
 767       "B       loc_FF8B1F88 \n"
 768 "loc_FF8B1EB4:\n"
 769       "LDRH    R1, [R0, #4] \n"
 770       "STRH    R1, [SP, #0x1C] \n"
 771       "LDRH    R1, [R4, #2] \n"
 772       "STRH    R1, [SP, #0x1E] \n"
 773       "LDRH    R1, [R4, #4] \n"
 774       "STRH    R1, [SP, #0x20] \n"
 775       "LDRH    R1, [R4, #6] \n"
 776       "STRH    R1, [SP, #0x22] \n"
 777       "LDRH    R1, [R4, #8] \n"
 778       "STRH    R1, [SP, #0x24] \n"
 779       "LDRH    R1, [R4, #0xA] \n"
 780       "STRH    R1, [SP, #0x26] \n"
 781       "BL      sub_FF8B3030 \n"
 782       "B       loc_FF8B1F88 \n"
 783 "loc_FF8B1EEC:\n"
 784       "LDRH    R1, [R4] \n"
 785       "STRH    R1, [SP, #0x1C] \n"
 786       "LDRH    R1, [R0, #6] \n"
 787       "STRH    R1, [SP, #0x1E] \n"
 788       "LDRH    R1, [R4, #4] \n"
 789       "STRH    R1, [SP, #0x20] \n"
 790       "LDRH    R1, [R4, #6] \n"
 791       "STRH    R1, [SP, #0x22] \n"
 792       "LDRH    R1, [R4, #8] \n"
 793       "STRH    R1, [SP, #0x24] \n"
 794       "LDRH    R1, [R4, #0xA] \n"
 795       "STRH    R1, [SP, #0x26] \n"
 796       "BL      sub_FF8B30E4 \n"
 797       "B       loc_FF8B1F88 \n"
 798 "loc_FF8B1F24:\n"
 799       "LDRH    R1, [R4] \n"
 800       "STRH    R1, [SP, #0x1C] \n"
 801       "LDRH    R1, [R4, #2] \n"
 802       "STRH    R1, [SP, #0x1E] \n"
 803       "LDRH    R1, [R4, #4] \n"
 804       "STRH    R1, [SP, #0x20] \n"
 805       "LDRH    R1, [R4, #6] \n"
 806       "STRH    R1, [SP, #0x22] \n"
 807       "LDRH    R1, [R0, #0xC] \n"
 808       "STRH    R1, [SP, #0x24] \n"
 809       "LDRH    R1, [R4, #0xA] \n"
 810       "STRH    R1, [SP, #0x26] \n"
 811       "BL      sub_FF8B318C \n"
 812       "B       loc_FF8B1F88 \n"
 813 "loc_FF8B1F5C:\n"
 814       "BL      sub_FF8AED3C \n"
 815       "B       loc_FF8B1F88 \n"
 816 "loc_FF8B1F64:\n"
 817       "BL      sub_FF8AF4CC \n"
 818       "B       loc_FF8B1F88 \n"
 819 "loc_FF8B1F6C:\n"
 820       "BL      sub_FF8AF7B0 \n"
 821       "B       loc_FF8B1F88 \n"
 822 "loc_FF8B1F74:\n"
 823       "BL      sub_FF8AFA70 \n"
 824       "B       loc_FF8B1F88 \n"
 825 "loc_FF8B1F7C:\n"
 826       "BL      sub_FF8AFC2C \n"
 827       "B       loc_FF8B1F88 \n"
 828 "loc_FF8B1F84:\n"
 829       "BL      sub_FF8AFD94 \n"
 830 "loc_FF8B1F88:\n"
 831       "LDR     R0, [SP, #0x28] \n"
 832       "LDR     R1, [R0, #0x7C] \n"
 833       "LDR     R2, [R0, #0x90] \n"
 834       "LDR     R3, [R0, #0x8C] \n"
 835 "loc_FF8B1F98:\n"
 836       "ADD     R0, R0, #4 \n"
 837       "BLX     R3 \n"
 838 "loc_FF8B1FA0:\n"
 839       "LDR     R0, [SP, #0x28] \n"
 840       "LDR     R0, [R0] \n"
 841       "CMP     R0, #0x10 \n"
 842       "BEQ     loc_FF8B1FD8 \n"
 843       "BGT     loc_FF8B1FC8 \n"
 844       "CMP     R0, #1 \n"
 845       "CMPNE   R0, #4 \n"
 846       "CMPNE   R0, #0xE \n"
 847       "BNE     loc_FF8B200C \n"
 848       "B       loc_FF8B1FD8 \n"
 849 "loc_FF8B1FC8:\n"
 850       "CMP     R0, #0x13 \n"
 851       "CMPNE   R0, #0x17 \n"
 852       "CMPNE   R0, #0x1A \n"
 853       "BNE     loc_FF8B200C \n"
 854 "loc_FF8B1FD8:\n"
 855       "LDRSH   R0, [R4] \n"
 856       "CMN     R0, #0xC00 \n"
 857       "LDRNESH R1, [R4, #8] \n"
 858       "CMNNE   R1, #0xC00 \n"
 859       "STRNEH  R0, [SP, #0x1C] \n"
 860       "STRNEH  R1, [SP, #0x24] \n"
 861       "BNE     loc_FF8B200C \n"
 862       "ADD     R0, SP, #0x10 \n"
 863       "BL      sub_FF8B343C \n"
 864       "LDRH    R0, [SP, #0x10] \n"
 865       "STRH    R0, [SP, #0x1C] \n"
 866       "LDRH    R0, [SP, #0x18] \n"
 867       "STRH    R0, [SP, #0x24] \n"
 868 "loc_FF8B200C:\n"
 869       "LDR     R0, [SP, #0x28] \n"
 870       "CMP     R8, #1 \n"
 871       "BNE     loc_FF8B205C \n"
 872       "LDR     R1, [R0, #0x7C] \n"
 873       "MOV     R2, #0xC \n"
 874       "ADD     R1, R1, R1, LSL #1 \n"
 875       "ADD     R0, R0, R1, LSL #2 \n"
 876       "SUB     R8, R0, #8 \n"
 877       "LDR     R0, =0x5465C \n"
 878       "ADD     R1, SP, #0x1C \n"
 879       "BL      sub_003FC17C \n"
 880       "LDR     R0, =0x54668 \n"
 881       "MOV     R2, #0xC \n"
 882       "ADD     R1, SP, #0x1C \n"
 883       "BL      sub_003FC17C \n"
 884       "LDR     R0, =0x54674 \n"
 885       "MOV     R2, #0xC \n"
 886       "MOV     R1, R8 \n"
 887       "BL      sub_003FC17C \n"
 888       "B       loc_FF8B20D4 \n"
 889 "loc_FF8B205C:\n"
 890       "LDR     R0, [R0] \n"
 891       "MOV     R3, #1 \n"
 892       "CMP     R0, #0xB \n"
 893       "BNE     loc_FF8B20A0 \n"
 894       "MOV     R2, #0 \n"
 895       "STRD    R2, [SP] \n"
 896       "MOV     R2, R3 \n"
 897       "MOV     R1, R3 \n"
 898       "MOV     R0, #0 \n"
 899       "BL      sub_FF8AD6E8 \n"
 900       "MOV     R3, #1 \n"
 901       "MOV     R2, #0 \n"
 902       "STRD    R2, [SP] \n"
 903       "MOV     R2, R3 \n"
 904       "MOV     R1, R3 \n"
 905       "MOV     R0, #0 \n"
 906       "B       loc_FF8B20D0 \n"
 907 "loc_FF8B20A0:\n"
 908       "MOV     R2, #1 \n"
 909       "STRD    R2, [SP] \n"
 910       "MOV     R3, R2 \n"
 911       "MOV     R1, R2 \n"
 912       "MOV     R0, R2 \n"
 913       "BL      sub_FF8AD6E8 \n"
 914       "MOV     R3, #1 \n"
 915       "MOV     R2, R3 \n"
 916       "MOV     R1, R3 \n"
 917       "MOV     R0, R3 \n"
 918       "STR     R3, [SP] \n"
 919       "STR     R3, [SP, #4] \n"
 920 "loc_FF8B20D0:\n"
 921       "BL      sub_FF8AD854 \n"
 922 "loc_FF8B20D4:\n"
 923       "LDR     R0, [SP, #0x28] \n"
 924       "BL      sub_FF8B2E2C \n"
 925       "B       loc_FF8B1A6C \n"
 926         );
 927 }
 928 
 929 //** sub_FF8AE6BC_my  @ 0xFF8AE6BC 
 930 
 931 void __attribute__((naked,noinline)) sub_FF8AE6BC_my() {
 932 asm volatile (
 933       "STMFD   SP!, {R4-R8,LR} \n"
 934       "LDR     R7, =0x3E3C \n"
 935       "MOV     R4, R0 \n"
 936       "LDR     R0, [R7, #0x1C] \n"
 937       "MOV     R1, #0x3E \n"
 938       "BL      sub_003FACA0 \n"
 939       "MOV     R2, #0 \n"
 940       "LDRSH   R0, [R4, #4] \n"
 941       "MOV     R1, R2 \n"
 942       "BL      sub_FF8AD3F0 \n"
 943       "MOV     R6, R0 \n"
 944       "LDRSH   R0, [R4, #6] \n"
 945       "BL      sub_FF8AD540 \n"
 946       "LDRSH   R0, [R4, #8] \n"
 947       "BL      sub_FF8AD598 \n"
 948       "LDRSH   R0, [R4, #0xA] \n"
 949       "BL      sub_FF8AD5F0 \n"
 950       "LDRSH   R0, [R4, #0xC] \n"
 951       "MOV     R1, #0 \n"
 952       "BL      sub_FF8AD648 \n"
 953       "MOV     R5, R0 \n"
 954       "LDR     R0, [R4] \n"
 955       "LDR     R8, =0x54674 \n"
 956       "CMP     R0, #0xB \n"
 957       "MOVEQ   R6, #0 \n"
 958       "MOVEQ   R5, R6 \n"
 959       "BEQ     loc_FF8AE750 \n"
 960       "CMP     R6, #1 \n"
 961       "BNE     loc_FF8AE750 \n"
 962       "LDRSH   R0, [R4, #4] \n"
 963       "LDR     R1, =0xFF8AD350 \n"
 964       "MOV     R2, #2 \n"
 965       "BL      sub_FF959AD0 \n"
 966       "STRH    R0, [R4, #4] \n"
 967       "MOV     R0, #0 \n"
 968       "STR     R0, [R7, #0x28] \n"
 969       "B       loc_FF8AE758 \n"
 970 "loc_FF8AE750:\n"
 971       "LDRH    R0, [R8] \n"
 972       "STRH    R0, [R4, #4] \n"
 973 "loc_FF8AE758:\n"
 974       "CMP     R5, #1 \n"
 975       "LDRNEH  R0, [R8, #8] \n"
 976       "BNE     loc_FF8AE774 \n"
 977       "LDRSH   R0, [R4, #0xC] \n"
 978       "LDR     R1, =0xFF8AD3D4 \n"
 979       "MOV     R2, #0x20 \n"
 980       "BL      sub_FF8B2E7C \n"
 981 "loc_FF8AE774:\n"
 982       "STRH    R0, [R4, #0xC] \n"
 983       "LDRSH   R0, [R4, #6] \n"
 984 //      "BL      sub_FF89E38C \n"  //original
 985       "BL      sub_FF89E38C_my \n" //patched
 986       "B       sub_FF8AE780 \n" // continue in firmware
 987         );
 988 }
 989 
 990 //** sub_FF89E38C_my  @ 0xFF89E38C 
 991 
 992 void __attribute__((naked,noinline)) sub_FF89E38C_my() {
 993 asm volatile (
 994       "STMFD   SP!, {R4-R6,LR} \n"
 995       "LDR     R5, =0x3AC8 \n"
 996       "MOV     R4, R0 \n"
 997       "LDR     R0, [R5, #4] \n"
 998       "CMP     R0, #1 \n"
 999       "LDRNE   R1, =0x14D \n"
1000       "LDRNE   R0, =0xFF89E1C4 \n"
1001       "BLNE    _DebugAssert \n"
1002       "CMN     R4, #0xC00 \n"
1003       "LDREQSH R4, [R5, #2] \n"
1004       "CMN     R4, #0xC00 \n"
1005       "LDREQ   R1, =0x153 \n"
1006       "LDREQ   R0, =0xFF89E1C4 \n"
1007       "STRH    R4, [R5, #2] \n"
1008       "BLEQ    _DebugAssert \n"
1009       "MOV     R0, R4 \n"
1010 //      "BL      _apex2us \n" //original apex2us function
1011       "BL      apex2us \n"    //apex2us wrapper
1012       "MOV     R4, R0 \n"
1013       "BL      sub_FF8EC460 \n"
1014       "MOV     R0, R4 \n"
1015       "BL      sub_FF8F4C68 \n"
1016       "TST     R0, #1 \n"
1017       "LDMEQFD SP!, {R4-R6,PC} \n"
1018       "LDMFD   SP!, {R4-R6,LR} \n"
1019       "MOV     R1, #0x158 \n"
1020       "LDR     R0, =0xFF89E1C4 \n"
1021       "B       _DebugAssert \n"
1022         );
1023 }

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