root/platform/a1200/sub/100c/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. exp_drv_task
  3. sub_FF8B819C_my
  4. sub_FF8A8EA8_my

   1 #include "lolevel.h"
   2 #include "platform.h"
   3 #include "core.h"
   4 #include "conf.h"
   5 
   6 static long *nrflag = (long*)(0x69bc+0x08);         // Found @ ff96b860 & ff96b8ac
   7 #define NR_AUTO (0)                 // have to explictly reset value back to 0 to enable auto
   8 #define PAUSE_FOR_FILE_COUNTER 150          // Enable delay in capt_seq_hook_raw_here to ensure file counter is updated
   9 
  10 #include "../../../generic/capt_seq.c"
  11 
  12 void __attribute__((naked,noinline)) capt_seq_task(  ) {
  13     // FF877DAC
  14 asm volatile (
  15       "    STMFD   SP!, {R3-R7,LR} \n"
  16       "    LDR     R5, =0x39C84 \n"
  17       "    LDR     R6, =0x2AF0 \n"
  18 "loc_FF877DBC:\n"
  19       "    MOV     R2, #0 \n"
  20       "    LDR     R0, [R6, #4] \n"
  21       "    MOV     R1, SP \n"
  22       "    BL      sub_FF8397A4 \n"
  23       "    TST     R0, #1 \n"
  24       "    BEQ     loc_FF877DE8 \n"
  25       "    LDR     R1, =0x476 \n"
  26       "    LDR     R0, =0xFF877950 \n"
  27       "    BL      sub_FF81EC88 \n"
  28       "    BL      sub_FF81EC40 \n"
  29       "    LDMFD   SP!, {R3-R7,PC} \n"
  30 "loc_FF877DE8:\n"
  31       "    LDR     R0, [SP] \n"
  32       "    LDR     R1, [R0] \n"
  33       "    CMP     R1, #0x20 \n"
  34       "    ADDCC   PC, PC, R1, LSL #2 \n"
  35       "    B       loc_FF877FEC \n"
  36       "    B       loc_FF877E7C \n"
  37       "    B       loc_FF877E84 \n"
  38       "    B       loc_FF877EB0 \n"
  39       "    B       loc_FF877EC4 \n"
  40       "    B       loc_FF877EBC \n"
  41       "    B       loc_FF877ECC \n"
  42       "    B       loc_FF877ED4 \n"
  43       "    B       loc_FF877EE0 \n"
  44       "    B       loc_FF877EFC \n"
  45       "    B       loc_FF877EC4 \n"
  46       "    B       loc_FF877F04 \n"
  47       "    B       loc_FF877F10 \n"
  48       "    B       loc_FF877F18 \n"
  49       "    B       loc_FF877F20 \n"
  50       "    B       loc_FF877F28 \n"
  51       "    B       loc_FF877F30 \n"
  52       "    B       loc_FF877F38 \n"
  53       "    B       loc_FF877F40 \n"
  54       "    B       loc_FF877F4C \n"
  55       "    B       loc_FF877F54 \n"
  56       "    B       loc_FF877F5C \n"
  57       "    B       loc_FF877F64 \n"
  58       "    B       loc_FF877F6C \n"
  59       "    B       loc_FF877F78 \n"
  60       "    B       loc_FF877F80 \n"
  61       "    B       loc_FF877F88 \n"
  62       "    B       loc_FF877F90 \n"
  63       "    B       loc_FF877F98 \n"
  64       "    B       loc_FF877FA0 \n"
  65       "    B       loc_FF877FA8 \n"
  66       "    B       loc_FF877FB4 \n"
  67       "    B       loc_FF877FF8 \n"
  68 "loc_FF877E7C:\n"
  69       "    BL       shooting_expo_iso_override\n"       // +
  70       "    BL      sub_FF87856C \n"
  71       "    BL      shooting_expo_param_override\n"      // +
  72       "    B       loc_FF877ED8 \n"
  73 "loc_FF877E84:\n"
  74       "    BL      wait_until_remote_button_is_released\n"  // +++ as in a800
  75       "    BL      capt_seq_hook_set_nr\n"                  // +++ as in a800
  76       "    LDR     R7, [R0, #0xC] \n"
  77       "    MOV     R0, R7 \n"
  78       "    BL      sub_FF969238 \n"
  79       "    BL      capt_seq_hook_raw_here\n"               // as in a800
  80       "    MOV     R4, R0 \n"
  81       "    MOV     R2, R7 \n"
  82       "    MOV     R1, #1 \n"
  83       "    BL      sub_FF87611C \n"
  84       "    TST     R4, #1 \n"
  85       "    MOVEQ   R0, R7 \n"
  86       "    BLEQ    sub_FF968D70 \n"
  87       "    B       loc_FF877FF8 \n"
  88 "loc_FF877EB0:\n"
  89       "    MOV     R0, #1 \n"
  90       "    BL      sub_FF878800 \n"
  91       "    B       loc_FF877FF8 \n"
  92 "loc_FF877EBC:\n"
  93       "    BL      sub_FF878208 \n"
  94       "    B       loc_FF877FF8 \n"
  95 "loc_FF877EC4:\n"
  96       "    BL      sub_FF87854C \n"
  97       "    B       loc_FF877FF8 \n"
  98 "loc_FF877ECC:\n"
  99       "    BL      sub_FF878554 \n"
 100       "    B       loc_FF877FF8 \n"
 101 "loc_FF877ED4:\n"
 102       "    BL      sub_FF878714 \n"
 103 "loc_FF877ED8:\n"
 104       "    BL      sub_FF875BA8 \n"
 105       "    B       loc_FF877FF8 \n"
 106 "loc_FF877EE0:\n"
 107       "    LDR     R4, [R0, #0xC] \n"
 108       "    MOV     R0, R4 \n"
 109       "    BL      sub_FF9692E0 \n"
 110       "    MOV     R2, R4 \n"
 111       "    MOV     R1, #9 \n"
 112       "    BL      sub_FF87611C \n"
 113       "    B       loc_FF877FF8 \n"
 114 "loc_FF877EFC:\n"
 115       "    BL      sub_FF878778 \n"
 116       "    B       loc_FF877ED8 \n"
 117 "loc_FF877F04:\n"
 118       "    LDR     R0, [R5, #0x50] \n"
 119       "    BL      sub_FF878C4C \n"
 120       "    B       loc_FF877FF8 \n"
 121 "loc_FF877F10:\n"
 122       "    BL      sub_FF878F98 \n"
 123       "    B       loc_FF877FF8 \n"
 124 "loc_FF877F18:\n"
 125       "    BL      sub_FF878FFC \n"
 126       "    B       loc_FF877FF8 \n"
 127 "loc_FF877F20:\n"
 128       "    BL      sub_FF968178 \n"
 129       "    B       loc_FF877FF8 \n"
 130 "loc_FF877F28:\n"
 131       "    BL      sub_FF968384 \n"
 132       "    B       loc_FF877FF8 \n"
 133 "loc_FF877F30:\n"
 134       "    BL      sub_FF968428 \n"
 135       "    B       loc_FF877FF8 \n"
 136 "loc_FF877F38:\n"
 137       "    BL      sub_FF9684F8 \n"
 138       "    B       loc_FF877FF8 \n"
 139 "loc_FF877F40:\n"
 140       "    MOV     R0, #0 \n"
 141       "    BL      sub_FF968700 \n"
 142       "    B       loc_FF877FF8 \n"
 143 "loc_FF877F4C:\n"
 144       "    BL      sub_FF968878 \n"
 145       "    B       loc_FF877FF8 \n"
 146 "loc_FF877F54:\n"
 147       "    BL      sub_FF96891C \n"
 148       "    B       loc_FF877FF8 \n"
 149 "loc_FF877F5C:\n"
 150       "    BL      sub_FF9689FC \n"
 151       "    B       loc_FF877FF8 \n"
 152 "loc_FF877F64:\n"
 153       "    BL      sub_FF878974 \n"
 154       "    B       loc_FF877FF8 \n"
 155 "loc_FF877F6C:\n"
 156       "    BL      sub_FF8789A0 \n"
 157       "    BL      sub_FF83780C \n"
 158       "    B       loc_FF877FF8 \n"
 159 "loc_FF877F78:\n"
 160       "    BL      sub_FF9685BC \n"
 161       "    B       loc_FF877FF8 \n"
 162 "loc_FF877F80:\n"
 163       "    BL      sub_FF9685FC \n"
 164       "    B       loc_FF877FF8 \n"
 165 "loc_FF877F88:\n"
 166       "    BL      sub_FF87B25C \n"
 167       "    B       loc_FF877FF8 \n"
 168 "loc_FF877F90:\n"
 169       "    BL      sub_FF87B2CC \n"
 170       "    B       loc_FF877FF8 \n"
 171 "loc_FF877F98:\n"
 172       "    BL      sub_FF968B34 \n"
 173       "    B       loc_FF877FF8 \n"
 174 "loc_FF877FA0:\n"
 175       "    BL      sub_FF968B98 \n"
 176       "    B       loc_FF877FF8 \n"
 177 "loc_FF877FA8:\n"
 178       "    BL      sub_FF87B328 \n"
 179       "    BL      sub_FF87B2E8 \n"
 180       "    B       loc_FF877FF8 \n"
 181 "loc_FF877FB4:\n"
 182       "    MOV     R0, #1 \n"
 183       "    BL      sub_FF969A54 \n"
 184       "    MOV     R0, #1 \n"
 185       "    BL      sub_FF969B7C \n"
 186       "    LDRH    R0, [R5, #0x90] \n"
 187       "    CMP     R0, #4 \n"
 188       "    LDRNEH  R0, [R5] \n"
 189       "    SUBNE   R1, R0, #0x4200 \n"
 190       "    SUBNES  R1, R1, #0x2A \n"
 191       "    BNE     loc_FF877FF8 \n"
 192       "    BL      sub_FF87B2CC \n"
 193       "    BL      sub_FF87B8CC \n"
 194       "    BL      sub_FF87B74C \n"
 195       "    B       loc_FF877FF8 \n"
 196 "loc_FF877FEC:\n"
 197       "    LDR     R1, =0x5D7 \n"
 198       "    LDR     R0, =0xFF877950 \n"
 199       "    BL      sub_FF81EC88 \n"
 200 "loc_FF877FF8:\n"
 201       "    LDR     R0, [SP] \n"
 202       "    LDR     R1, [R0, #4] \n"
 203       "    LDR     R0, [R6] \n"
 204       "    BL      sub_FF881D64 \n"
 205       "    LDR     R4, [SP] \n"
 206       "    LDR     R0, [R4, #8] \n"
 207       "    CMP     R0, #0 \n"
 208       "    LDREQ   R0, =0xFF877950 \n"
 209       "    MOVEQ   R1, #0x118 \n"
 210       "    BLEQ    sub_FF81EC88 \n"
 211       "    MOV     R0, #0 \n"
 212       "    STR     R0, [R4, #8] \n"
 213       "    B       loc_FF877DBC \n"
 214     );
 215 }
 216 
 217 void __attribute__((naked,noinline)) exp_drv_task(  ) {
 218     // FF8BB350
 219 asm volatile (
 220       "    STMFD   SP!, {R4-R9,LR} \n"
 221       "    SUB     SP, SP, #0x24 \n"
 222       "    LDR     R6, =0x3E00 \n"
 223       "    LDR     R7, =0xBB8 \n"
 224       "    LDR     R4, =0x55174 \n"
 225       "    MOV     R0, #0 \n"
 226       "    ADD     R5, SP, #0x14 \n"
 227       "    STR     R0, [SP, #0x10] \n"
 228 "loc_FF8BB370:\n"
 229       "    LDR     R0, [R6, #0x20] \n"
 230       "    MOV     R2, #0 \n"
 231       "    ADD     R1, SP, #0x20 \n"
 232       "    BL      sub_FF8397A4 \n"
 233       "    LDR     R0, [SP, #0x10] \n"
 234       "    CMP     R0, #1 \n"
 235       "    BNE     loc_FF8BB3BC \n"
 236       "    LDR     R0, [SP, #0x20] \n"
 237       "    LDR     R0, [R0] \n"
 238       "    CMP     R0, #0x14 \n"
 239       "    CMPNE   R0, #0x15 \n"
 240       "    CMPNE   R0, #0x16 \n"
 241       "    CMPNE   R0, #0x17 \n"
 242       "    BEQ     loc_FF8BB51C \n"
 243       "    CMP     R0, #0x29 \n"
 244       "    BEQ     loc_FF8BB4A4 \n"
 245       "    ADD     R1, SP, #0x10 \n"
 246       "    MOV     R0, #0 \n"
 247       "    BL      sub_FF8BB300 \n"
 248 "loc_FF8BB3BC:\n"
 249       "    LDR     R0, [SP, #0x20] \n"
 250       "    LDR     R1, [R0] \n"
 251       "    CMP     R1, #0x2F \n"
 252       "    BNE     loc_FF8BB3E8 \n"
 253       "    BL      sub_FF8BC7FC \n"
 254       "    LDR     R0, [R6, #0x1C] \n"
 255       "    MOV     R1, #1 \n"
 256       "    BL      sub_FF881D64 \n"
 257       "    BL      sub_FF81EC40 \n"
 258       "    ADD     SP, SP, #0x24 \n"
 259       "    LDMFD   SP!, {R4-R9,PC} \n"
 260 "loc_FF8BB3E8:\n"
 261       "    CMP     R1, #0x2E \n"
 262       "    BNE     loc_FF8BB404 \n"
 263       "    LDR     R2, [R0, #0x8C]! \n"
 264       "    LDR     R1, [R0, #4] \n"
 265       "    MOV     R0, R1 \n"
 266       "    BLX     R2 \n"
 267       "    B       loc_FF8BBA18 \n"
 268 "loc_FF8BB404:\n"
 269       "    CMP     R1, #0x27 \n"
 270       "    BNE     loc_FF8BB454 \n"
 271       "    LDR     R0, [R6, #0x1C] \n"
 272       "    MOV     R1, #0x80 \n"
 273       "    BL      sub_FF881D98 \n"
 274       "    LDR     R0, =0xFF8B6EBC \n"
 275       "    MOV     R1, #0x80 \n"
 276       "    BL      sub_FF95F1C8 \n"
 277       "    LDR     R0, [R6, #0x1C] \n"
 278       "    MOV     R2, R7 \n"
 279       "    MOV     R1, #0x80 \n"
 280       "    BL      sub_FF881CA4 \n"
 281       "    TST     R0, #1 \n"
 282       "    LDRNE   R1, =0x1751 \n"
 283       "    BNE     loc_FF8BB510 \n"
 284 "loc_FF8BB440:\n"
 285       "    LDR     R1, [SP, #0x20] \n"
 286       "    LDR     R0, [R1, #0x90] \n"
 287       "    LDR     R1, [R1, #0x8C] \n"
 288       "    BLX     R1 \n"
 289       "    B       loc_FF8BBA18 \n"
 290 "loc_FF8BB454:\n"
 291       "    CMP     R1, #0x28 \n"
 292       "    BNE     loc_FF8BB49C \n"
 293       "    ADD     R1, SP, #0x10 \n"
 294       "    BL      sub_FF8BB300 \n"
 295       "    LDR     R0, [R6, #0x1C] \n"
 296       "    MOV     R1, #0x100 \n"
 297       "    BL      sub_FF881D98 \n"
 298       "    LDR     R0, =0xFF8B6ECC \n"
 299       "    MOV     R1, #0x100 \n"
 300       "    BL      sub_FF95F458 \n"
 301       "    LDR     R0, [R6, #0x1C] \n"
 302       "    MOV     R2, R7 \n"
 303       "    MOV     R1, #0x100 \n"
 304       "    BL      sub_FF881CA4 \n"
 305       "    TST     R0, #1 \n"
 306       "    BEQ     loc_FF8BB440 \n"
 307       "    LDR     R1, =0x175B \n"
 308       "    B       loc_FF8BB510 \n"
 309 "loc_FF8BB49C:\n"
 310       "    CMP     R1, #0x29 \n"
 311       "    BNE     loc_FF8BB4B4 \n"
 312 "loc_FF8BB4A4:\n"
 313       "    LDR     R0, [SP, #0x20] \n"
 314       "    ADD     R1, SP, #0x10 \n"
 315       "    BL      sub_FF8BB300 \n"
 316       "    B       loc_FF8BB440 \n"
 317 "loc_FF8BB4B4:\n"
 318       "    CMP     R1, #0x2C \n"
 319       "    BNE     loc_FF8BB4CC \n"
 320       "    BL      sub_FF8A9138 \n"
 321       "    BL      sub_FF8A9DA8 \n"
 322       "    BL      sub_FF8A9920 \n"
 323       "    B       loc_FF8BB440 \n"
 324 "loc_FF8BB4CC:\n"
 325       "    CMP     R1, #0x2D \n"
 326       "    BNE     loc_FF8BB51C \n"
 327       "    LDR     R0, [R6, #0x1C] \n"
 328       "    MOV     R1, #4 \n"
 329       "    BL      sub_FF881D98 \n"
 330       "    LDR     R1, =0xFF8B6EEC \n"
 331       "    LDR     R0, =0xFFFFF400 \n"
 332       "    MOV     R2, #4 \n"
 333       "    BL      sub_FF8A8BAC \n"
 334       "    BL      sub_FF8A8E3C \n"
 335       "    LDR     R0, [R6, #0x1C] \n"
 336       "    MOV     R2, R7 \n"
 337       "    MOV     R1, #4 \n"
 338       "    BL      sub_FF881BC0 \n"
 339       "    TST     R0, #1 \n"
 340       "    BEQ     loc_FF8BB440 \n"
 341       "    LDR     R1, =0x1783 \n"
 342 "loc_FF8BB510:\n"
 343       "    LDR     R0, =0xFF8B75E0 \n"
 344       "    BL      sub_FF81EC88 \n"
 345       "    B       loc_FF8BB440 \n"
 346 "loc_FF8BB51C:\n"
 347       "    LDR     R0, [SP, #0x20] \n"
 348       "    MOV     R8, #1 \n"
 349       "    LDR     R1, [R0] \n"
 350       "    CMP     R1, #0x12 \n"
 351       "    CMPNE   R1, #0x13 \n"
 352       "    BNE     loc_FF8BB5F0 \n"
 353       "    LDR     R1, [R0, #0x7C] \n"
 354       "    ADD     R1, R1, R1, LSL #1 \n"
 355       "    ADD     R1, R0, R1, LSL #2 \n"
 356       "    SUB     R1, R1, #8 \n"
 357       "    LDMIA   R1, {R2,R3,R9} \n"
 358       "    STMIA   R5, {R2,R3,R9} \n"
 359       "    BL      sub_FF8B9968 \n"
 360       "    LDR     R0, [SP, #0x20] \n"
 361       "    LDR     R1, [R0, #0x7C] \n"
 362       "    LDR     R3, [R0, #0x8C] \n"
 363       "    LDR     R2, [R0, #0x90] \n"
 364 
 365       "    ADD     R0, R0, #4 \n"
 366       "    BLX     R3 \n"
 367       "    LDR     R0, [SP, #0x20] \n"
 368       "    BL      sub_FF8BCB98 \n"
 369       "    LDR     R0, [SP, #0x20] \n"
 370       "    LDR     R1, [R0, #0x7C] \n"
 371       "    LDR     R2, [R0, #0x98] \n"
 372       "    LDR     R3, [R0, #0x94] \n"
 373       "    B       loc_FF8BB904 \n"
 374 "loc_FF8BB5F0:\n"
 375       "    CMP     R1, #0x14 \n"
 376       "    CMPNE   R1, #0x15 \n"
 377       "    CMPNE   R1, #0x16 \n"
 378       "    CMPNE   R1, #0x17 \n"
 379       "    BNE     loc_FF8BB6A8 \n"
 380       "    ADD     R3, SP, #0x10 \n"
 381       "    ADD     R2, SP, #4 \n"
 382       "    ADD     R1, SP, #0x14 \n"
 383       "    BL      sub_FF8B9BD0 \n"
 384       "    CMP     R0, #1 \n"
 385       "    MOV     R9, R0 \n"
 386       "    CMPNE   R9, #5 \n"
 387       "    BNE     loc_FF8BB644 \n"
 388       "    LDR     R0, [SP, #0x20] \n"
 389       "    MOV     R2, R9 \n"
 390       "    LDR     R1, [R0, #0x7C]! \n"
 391       "    LDR     R12, [R0, #0x10]! \n"
 392       "    LDR     R3, [R0, #4] \n"
 393       "    ADD     R0, SP, #4 \n"
 394       "    BLX     R12 \n"
 395       "    B       loc_FF8BB67C \n"
 396 "loc_FF8BB644:\n"
 397       "    LDR     R0, [SP, #0x20] \n"
 398       "    CMP     R9, #2 \n"
 399       "    LDR     R3, [R0, #0x90] \n"
 400       "    CMPNE   R9, #6 \n"
 401       "    BNE     loc_FF8BB690 \n"
 402       "    LDR     R12, [R0, #0x8C] \n"
 403       "    MOV     R2, R9 \n"
 404       "    MOV     R1, #1 \n"
 405       "    ADD     R0, SP, #4 \n"
 406       "    BLX     R12 \n"
 407       "    LDR     R0, [SP, #0x20] \n"
 408       "    ADD     R2, SP, #4 \n"
 409       "    ADD     R1, SP, #0x14 \n"
 410       "    BL      sub_FF8BB04C \n"
 411 "loc_FF8BB67C:\n"
 412       "    LDR     R0, [SP, #0x20] \n"
 413       "    LDR     R2, [SP, #0x10] \n"
 414       "    MOV     R1, R9 \n"
 415       "    BL      sub_FF8BB2A0 \n"
 416       "    B       loc_FF8BB90C \n"
 417 "loc_FF8BB690:\n"
 418       "    LDR     R1, [R0, #0x7C] \n"
 419       "    LDR     R12, [R0, #0x8C] \n"
 420       "    MOV     R2, R9 \n"
 421       "    ADD     R0, R0, #4 \n"
 422       "    BLX     R12 \n"
 423       "    B       loc_FF8BB90C \n"
 424 "loc_FF8BB6A8:\n"
 425       "    CMP     R1, #0x23 \n"
 426       "    CMPNE   R1, #0x24 \n"
 427       "    BNE     loc_FF8BB6F4 \n"
 428       "    LDR     R1, [R0, #0x7C] \n"
 429       "    ADD     R1, R1, R1, LSL #1 \n"
 430       "    ADD     R1, R0, R1, LSL #2 \n"
 431       "    SUB     R1, R1, #8 \n"
 432       "    LDMIA   R1, {R2,R3,R9} \n"
 433       "    STMIA   R5, {R2,R3,R9} \n"
 434       "    BL      sub_FF8B89E0 \n"
 435       "    LDR     R0, [SP, #0x20] \n"
 436       "    LDR     R1, [R0, #0x7C] \n"
 437       "    LDR     R3, [R0, #0x8C] \n"
 438       "    LDR     R2, [R0, #0x90] \n"
 439       "    ADD     R0, R0, #4 \n"
 440       "    BLX     R3 \n"
 441       "    LDR     R0, [SP, #0x20] \n"
 442       "    BL      sub_FF8B8E1C \n"
 443       "    B       loc_FF8BB90C \n"
 444 "loc_FF8BB6F4:\n"
 445       "    ADD     R1, R0, #4 \n"
 446       "    LDMIA   R1, {R2,R3,R9} \n"
 447       "    STMIA   R5, {R2,R3,R9} \n"
 448       "    LDR     R1, [R0] \n"
 449       "    CMP     R1, #0x27 \n"
 450       "    ADDCC   PC, PC, R1, LSL #2 \n"
 451       "    B       loc_FF8BB8F4 \n"
 452       "    B       loc_FF8BB7AC \n"
 453       "    B       loc_FF8BB7AC \n"
 454       "    B       loc_FF8BB7B4 \n"
 455       "    B       loc_FF8BB7BC \n"
 456       "    B       loc_FF8BB7BC \n"
 457       "    B       loc_FF8BB7BC \n"
 458       "    B       loc_FF8BB7AC \n"
 459       "    B       loc_FF8BB7B4 \n"
 460       "    B       loc_FF8BB7BC \n"
 461       "    B       loc_FF8BB7BC \n"
 462       "    B       loc_FF8BB7D4 \n"
 463       "    B       loc_FF8BB7D4 \n"
 464       "    B       loc_FF8BB8E0 \n"
 465       "    B       loc_FF8BB8E8 \n"
 466       "    B       loc_FF8BB8E8 \n"
 467       "    B       loc_FF8BB8E8 \n"
 468       "    B       loc_FF8BB8E8 \n"
 469       "    B       loc_FF8BB8F0 \n"
 470       "    B       loc_FF8BB8F4 \n"
 471       "    B       loc_FF8BB8F4 \n"
 472       "    B       loc_FF8BB8F4 \n"
 473       "    B       loc_FF8BB8F4 \n"
 474       "    B       loc_FF8BB8F4 \n"
 475       "    B       loc_FF8BB8F4 \n"
 476       "    B       loc_FF8BB7C4 \n"
 477       "    B       loc_FF8BB7CC \n"
 478       "    B       loc_FF8BB7CC \n"
 479       "    B       loc_FF8BB7E0 \n"
 480       "    B       loc_FF8BB7E0 \n"
 481       "    B       loc_FF8BB7E8 \n"
 482       "    B       loc_FF8BB820 \n"
 483       "    B       loc_FF8BB858 \n"
 484       "    B       loc_FF8BB890 \n"
 485       "    B       loc_FF8BB8C8 \n"
 486       "    B       loc_FF8BB8C8 \n"
 487       "    B       loc_FF8BB8F4 \n"
 488       "    B       loc_FF8BB8F4 \n"
 489       "    B       loc_FF8BB8D0 \n"
 490       "    B       loc_FF8BB8D8 \n"
 491 "loc_FF8BB7AC:\n"
 492       "    BL      sub_FF8B7464 \n"
 493       "    B       loc_FF8BB8F4 \n"
 494 "loc_FF8BB7B4:\n"
 495       "    BL      sub_FF8B7704 \n"
 496       "    B       loc_FF8BB8F4 \n"
 497 "loc_FF8BB7BC:\n"
 498       "    BL      sub_FF8B792C \n"
 499       "    B       loc_FF8BB8F4 \n"
 500 "loc_FF8BB7C4:\n"
 501       "    BL      sub_FF8B7C04 \n"
 502       "    B       loc_FF8BB8F4 \n"
 503 "loc_FF8BB7CC:\n"
 504       "    BL      sub_FF8B7E1C \n"
 505       "    B       loc_FF8BB8F4 \n"
 506 "loc_FF8BB7D4:\n"
 507       "    BL      sub_FF8B819C_my \n"   //<<<<< patched
 508       "    MOV     R8, #0 \n"
 509       "    B       loc_FF8BB8F4 \n"
 510 "loc_FF8BB7E0:\n"
 511       "    BL      sub_FF8B82E4 \n"
 512       "    B       loc_FF8BB8F4 \n"
 513 "loc_FF8BB7E8:\n"
 514       "    LDRH    R1, [R0, #4] \n"
 515       "    STRH    R1, [SP, #0x14] \n"
 516       "    LDRH    R1, [R4, #2] \n"
 517       "    STRH    R1, [SP, #0x16] \n"
 518       "    LDRH    R1, [R4, #4] \n"
 519       "    STRH    R1, [SP, #0x18] \n"
 520       "    LDRH    R1, [R4, #6] \n"
 521       "    STRH    R1, [SP, #0x1A] \n"
 522       "    LDRH    R1, [R0, #0xC] \n"
 523       "    STRH    R1, [SP, #0x1C] \n"
 524       "    LDRH    R1, [R4, #0xA] \n"
 525       "    STRH    R1, [SP, #0x1E] \n"
 526       "    BL      sub_FF8BC890 \n"
 527       "    B       loc_FF8BB8F4 \n"
 528 "loc_FF8BB820:\n"
 529       "    LDRH    R1, [R0, #4] \n"
 530       "    STRH    R1, [SP, #0x14] \n"
 531       "    LDRH    R1, [R4, #2] \n"
 532       "    STRH    R1, [SP, #0x16] \n"
 533       "    LDRH    R1, [R4, #4] \n"
 534       "    STRH    R1, [SP, #0x18] \n"
 535       "    LDRH    R1, [R4, #6] \n"
 536       "    STRH    R1, [SP, #0x1A] \n"
 537       "    LDRH    R1, [R4, #8] \n"
 538       "    STRH    R1, [SP, #0x1C] \n"
 539       "    LDRH    R1, [R4, #0xA] \n"
 540       "    STRH    R1, [SP, #0x1E] \n"
 541       "    BL      sub_FF8BC998 \n"
 542       "    B       loc_FF8BB8F4 \n"
 543 "loc_FF8BB858:\n"
 544       "    LDRH    R1, [R4] \n"
 545       "    STRH    R1, [SP, #0x14] \n"
 546       "    LDRH    R1, [R0, #6] \n"
 547       "    STRH    R1, [SP, #0x16] \n"
 548       "    LDRH    R1, [R4, #4] \n"
 549       "    STRH    R1, [SP, #0x18] \n"
 550       "    LDRH    R1, [R4, #6] \n"
 551       "    STRH    R1, [SP, #0x1A] \n"
 552       "    LDRH    R1, [R4, #8] \n"
 553       "    STRH    R1, [SP, #0x1C] \n"
 554       "    LDRH    R1, [R4, #0xA] \n"
 555       "    STRH    R1, [SP, #0x1E] \n"
 556       "    BL      sub_FF8BCA4C \n"
 557       "    B       loc_FF8BB8F4 \n"
 558 "loc_FF8BB890:\n"
 559       "    LDRH    R1, [R4] \n"
 560       "    STRH    R1, [SP, #0x14] \n"
 561       "    LDRH    R1, [R4, #2] \n"
 562       "    STRH    R1, [SP, #0x16] \n"
 563       "    LDRH    R1, [R4, #4] \n"
 564       "    STRH    R1, [SP, #0x18] \n"
 565       "    LDRH    R1, [R4, #6] \n"
 566       "    STRH    R1, [SP, #0x1A] \n"
 567       "    LDRH    R1, [R0, #0xC] \n"
 568       "    STRH    R1, [SP, #0x1C] \n"
 569       "    LDRH    R1, [R4, #0xA] \n"
 570       "    STRH    R1, [SP, #0x1E] \n"
 571       "    BL      sub_FF8BCAF4 \n"
 572       "    B       loc_FF8BB8F4 \n"
 573 "loc_FF8BB8C8:\n"
 574       "    BL      sub_FF8B87D4 \n"
 575       "    B       loc_FF8BB8F4 \n"
 576 "loc_FF8BB8D0:\n"
 577       "    BL      sub_FF8B8F20 \n"
 578       "    B       loc_FF8BB8F4 \n"
 579 "loc_FF8BB8D8:\n"
 580       "    BL      sub_FF8B91C8 \n"
 581       "    B       loc_FF8BB8F4 \n"
 582 "loc_FF8BB8E0:\n"
 583       "    BL      sub_FF8B93A8 \n"
 584       "    B       loc_FF8BB8F4 \n"
 585 "loc_FF8BB8E8:\n"
 586       "    BL      sub_FF8B95F0 \n"
 587       "    B       loc_FF8BB8F4 \n"
 588 "loc_FF8BB8F0:\n"
 589       "    BL      sub_FF8B9760 \n"
 590 "loc_FF8BB8F4:\n"
 591       "    LDR     R0, [SP, #0x20] \n"
 592       "    LDR     R1, [R0, #0x7C] \n"
 593       "    LDR     R2, [R0, #0x90] \n"
 594       "    LDR     R3, [R0, #0x8C] \n"
 595 "loc_FF8BB904:\n"
 596       "    ADD     R0, R0, #4 \n"
 597       "    BLX     R3 \n"
 598 "loc_FF8BB90C:\n"
 599       "    LDR     R1, [SP, #0x20] \n"
 600       "    LDR     R0, [R1] \n"
 601       "    CMP     R0, #0x10 \n"
 602       "    BEQ     loc_FF8BB944 \n"
 603       "    BGT     loc_FF8BB934 \n"
 604       "    CMP     R0, #1 \n"
 605       "    CMPNE   R0, #4 \n"
 606       "    CMPNE   R0, #0xE \n"
 607       "    BNE     loc_FF8BB954 \n"
 608       "    B       loc_FF8BB944 \n"
 609 "loc_FF8BB934:\n"
 610       "    CMP     R0, #0x13 \n"
 611       "    CMPNE   R0, #0x17 \n"
 612       "    CMPNE   R0, #0x1A \n"
 613       "    BNE     loc_FF8BB954 \n"
 614 "loc_FF8BB944:\n"
 615       "    LDRH    R0, [R4] \n"
 616       "    STRH    R0, [SP, #0x14] \n"
 617       "    LDRH    R0, [R4, #8] \n"
 618       "    STRH    R0, [SP, #0x1C] \n"
 619 "loc_FF8BB954:\n"
 620       "    CMP     R8, #1 \n"
 621       "    BNE     loc_FF8BB9A0 \n"
 622       "    LDR     R0, [R1, #0x7C] \n"
 623       "    MOV     R2, #0xC \n"
 624       "    ADD     R0, R0, R0, LSL #1 \n"
 625       "    ADD     R0, R1, R0, LSL #2 \n"
 626       "    SUB     R8, R0, #8 \n"
 627       "    LDR     R0, =0x55174 \n"
 628       "    ADD     R1, SP, #0x14 \n"
 629       "    BL      sub_FFB525CC \n"     // 1.00c
 630       "    LDR     R0, =0x55180 \n"
 631       "    MOV     R2, #0xC \n"
 632       "    ADD     R1, SP, #0x14 \n"
 633       "    BL      sub_FFB525CC \n"     // 1.00c
 634       "    LDR     R0, =0x5518C \n"
 635       "    MOV     R2, #0xC \n"
 636       "    MOV     R1, R8 \n"
 637       "    BL      sub_FFB525CC \n"     // 1.00c
 638       "    B       loc_FF8BBA18 \n"
 639 "loc_FF8BB9A0:\n"
 640       "    LDR     R0, [R1] \n"
 641       "    MOV     R3, #1 \n"
 642       "    CMP     R0, #0xB \n"
 643       "    BNE     loc_FF8BB9E4 \n"
 644       "    MOV     R2, #0 \n"
 645       "    STRD    R2, [SP] \n"
 646       "    MOV     R2, R3 \n"
 647       "    MOV     R1, R3 \n"
 648       "    MOV     R0, #0 \n"
 649       "    BL      sub_FF8B7244 \n"
 650       "    MOV     R3, #1 \n"
 651       "    MOV     R2, #0 \n"
 652       "    STRD    R2, [SP] \n"
 653       "    MOV     R2, R3 \n"
 654       "    MOV     R1, R3 \n"
 655       "    MOV     R0, #0 \n"
 656       "    B       loc_FF8BBA14 \n"
 657 "loc_FF8BB9E4:\n"
 658       "    MOV     R2, #1 \n"
 659       "    STRD    R2, [SP] \n"
 660       "    MOV     R3, R2 \n"
 661       "    MOV     R1, R2 \n"
 662       "    MOV     R0, R2 \n"
 663       "    BL      sub_FF8B7244 \n"
 664       "    MOV     R3, #1 \n"
 665       "    MOV     R2, R3 \n"
 666       "    MOV     R1, R3 \n"
 667       "    MOV     R0, R3 \n"
 668       "    STR     R3, [SP] \n"
 669       "    STR     R3, [SP, #4] \n"
 670 "loc_FF8BBA14:\n"
 671       "    BL      sub_FF8B73B0 \n"
 672 "loc_FF8BBA18:\n"
 673       "    LDR     R0, [SP, #0x20] \n"
 674       "    BL      sub_FF8BC7FC \n"
 675       "    B       loc_FF8BB370 \n"
 676     );
 677 }
 678 
 679 void __attribute__((naked,noinline)) sub_FF8B819C_my(  ) {
 680    // FF8B819C
 681 asm volatile (
 682       "    STMFD   SP!, {R4-R8,LR} \n"
 683       "    LDR     R7, =0x3E00 \n"
 684       "    MOV     R4, R0 \n"
 685       "    LDR     R0, [R7, #0x1C] \n"
 686       "    MOV     R1, #0x3E \n"
 687       "    BL      sub_FF881D98 \n"
 688       "    MOV     R2, #0 \n"
 689       "    LDRSH   R0, [R4, #4] \n"
 690       "    MOV     R1, R2 \n"
 691       "    BL      sub_FF8B6F4C \n"
 692       "    MOV     R5, R0 \n"
 693       "    LDRSH   R0, [R4, #6] \n"
 694       "    BL      sub_FF8B709C \n"
 695       "    LDRSH   R0, [R4, #8] \n"
 696       "    BL      sub_FF8B70F4 \n"
 697       "    LDRSH   R0, [R4, #0xA] \n"
 698       "    BL      sub_FF8B714C \n"
 699       "    LDRSH   R0, [R4, #0xC] \n"
 700       "    MOV     R1, #0 \n"
 701       "    BL      sub_FF8B71A4 \n"
 702       "    MOV     R6, R0 \n"
 703       "    LDRSH   R0, [R4, #0xE] \n"
 704       "    BL      sub_FF8BC82C \n"
 705       "    LDR     R0, [R4] \n"
 706       "    LDR     R8, =0x5518C \n"
 707       "    CMP     R0, #0xB \n"
 708       "    MOVEQ   R5, #0 \n"
 709       "    MOVEQ   R6, R5 \n"
 710       "    BEQ     loc_FF8B8238 \n"
 711       "    CMP     R5, #1 \n"
 712       "    BNE     loc_FF8B8238 \n"
 713       "    LDRSH   R0, [R4, #4] \n"
 714       "    LDR     R1, =0xFF8B6EAC \n"
 715       "    MOV     R2, #2 \n"
 716       "    BL      sub_FF95F31C \n"
 717       "    STRH    R0, [R4, #4] \n"
 718       "    MOV     R0, #0 \n"
 719       "    STR     R0, [R7, #0x28] \n"
 720       "    B       loc_FF8B8240 \n"
 721 "loc_FF8B8238:\n"
 722       "    LDRH    R0, [R8] \n"
 723       "    STRH    R0, [R4, #4] \n"
 724 "loc_FF8B8240:\n"
 725       "    CMP     R6, #1 \n"
 726       "    LDRNEH  R0, [R8, #8] \n"
 727       "    BNE     loc_FF8B825C \n"
 728       "    LDRSH   R0, [R4, #0xC] \n"
 729       "    LDR     R1, =0xFF8B6F30 \n"
 730       "    MOV     R2, #0x20 \n"
 731       "    BL      sub_FF8BC84C \n"
 732 "loc_FF8B825C:\n"
 733       "    STRH    R0, [R4, #0xC] \n"
 734       "    LDRSH   R0, [R4, #6] \n"
 735       "    BL      sub_FF8A8EA8_my \n"      //<<<<<< patched
 736       "    B       sub_FF8B8268 \n"         // return to RAM
 737 
 738     );
 739 }
 740 
 741 void __attribute__((naked,noinline)) sub_FF8A8EA8_my(  ) {
 742     // FF8A8EA8
 743 asm volatile (
 744       "    STMFD   SP!, {R4-R6,LR} \n"
 745       "    LDR     R5, =0x3AC4 \n"
 746       "    MOV     R4, R0 \n"
 747       "    LDR     R0, [R5, #4] \n"
 748       "    CMP     R0, #1 \n"
 749       "    LDRNE   R1, =0x146 \n"
 750       "    LDRNE   R0, =0xFF8A8CE0 \n"
 751       "    BLNE    sub_FF81EC88 \n"
 752       "    CMN     R4, #0xC00 \n"
 753       "    LDREQSH R4, [R5, #2] \n"
 754       "    CMN     R4, #0xC00 \n"
 755       "    MOVEQ   R1, #0x14C \n"
 756       "    LDREQ   R0, =0xFF8A8CE0 \n"
 757       "    STRH    R4, [R5, #2] \n"
 758       "    BLEQ    sub_FF81EC88 \n"
 759       "    MOV     R0, R4 \n"
 760     //"    BL      sub_FFA05DF0 \n"   // deleted
 761       "    BL      apex2us\n"        // >>>>>>>> patched
 762       "    B       sub_FF8A8EEC \n"
 763     );
 764 }

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