root/platform/sx10/sub/103a/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF94CA04_my
  3. sub_FF868504_my
  4. exp_drv_task
  5. sub_FF8AB2E8_my
  6. sub_FF89D14C_my

   1 /*
   2  * capt_seq.c - auto-generated by CHDK code_gen.
   3  */
   4 #include "lolevel.h"
   5 #include "platform.h"
   6 #include "core.h"
   7 
   8 #define USE_STUBS_NRFLAG 1          // see stubs_entry.S
   9 
  10 #include "../../../generic/capt_seq.c"
  11 
  12 /*************************************************************/
  13 //** capt_seq_task @ 0xFF868C38 - 0xFF868F8C, length=214
  14 void __attribute__((naked,noinline)) capt_seq_task() {
  15 asm volatile (
  16 "    STMFD   SP!, {R3-R9,LR} \n"
  17 "    LDR     R6, =0x5584 \n"
  18 "    LDR     R4, =0x1BE24 \n"
  19 "    MOV     R9, #1 \n"
  20 "    MOV     R7, #0 \n"
  21 
  22 "loc_FF868C4C:\n"
  23 "    LDR     R0, [R6, #0x14] \n"
  24 "    MOV     R2, #0 \n"
  25 "    MOV     R1, SP \n"
  26 "    BL      sub_FF8274FC /*_ReceiveMessageQueue*/ \n"
  27 "    TST     R0, #1 \n"
  28 "    BEQ     loc_FF868C78 \n"
  29 "    LDR     R1, =0x539 \n"
  30 "    LDR     R0, =0xFF8683DC /*'SsShootTask.c'*/ \n"
  31 "    BL      _DebugAssert \n"
  32 "    BL      _ExitTask \n"
  33 "    LDMFD   SP!, {R3-R9,PC} \n"
  34 
  35 "loc_FF868C78:\n"
  36 "    LDR     R0, [SP] \n"
  37 "    LDR     R1, [R0] \n"
  38 "    CMP     R1, #0x24 \n"
  39 "    ADDLS   PC, PC, R1, LSL#2 \n"
  40 "    B       loc_FF868F54 \n"
  41 "    B       loc_FF868D20 \n"
  42 "    B       loc_FF868D8C \n"
  43 "    B       loc_FF868D94 \n"
  44 "    B       loc_FF868DB8 \n"
  45 "    B       loc_FF868DAC \n"
  46 "    B       loc_FF868DC0 \n"
  47 "    B       loc_FF868DC8 \n"
  48 "    B       loc_FF868DD0 \n"
  49 "    B       loc_FF868E28 \n"
  50 "    B       loc_FF868E50 \n"
  51 "    B       loc_FF868E34 \n"
  52 "    B       loc_FF868E40 \n"
  53 "    B       loc_FF868E48 \n"
  54 "    B       loc_FF868E58 \n"
  55 "    B       loc_FF868E60 \n"
  56 "    B       loc_FF868E68 \n"
  57 "    B       loc_FF868E70 \n"
  58 "    B       loc_FF868E78 \n"
  59 "    B       loc_FF868E80 \n"
  60 "    B       loc_FF868E88 \n"
  61 "    B       loc_FF868E90 \n"
  62 "    B       loc_FF868E98 \n"
  63 "    B       loc_FF868EA0 \n"
  64 "    B       loc_FF868EA8 \n"
  65 "    B       loc_FF868EB0 \n"
  66 "    B       loc_FF868EBC \n"
  67 "    B       loc_FF868EC4 \n"
  68 "    B       loc_FF868ED0 \n"
  69 "    B       loc_FF868ED8 \n"
  70 "    B       loc_FF868F08 \n"
  71 "    B       loc_FF868F10 \n"
  72 "    B       loc_FF868F18 \n"
  73 "    B       loc_FF868F20 \n"
  74 "    B       loc_FF868F28 \n"
  75 "    B       loc_FF868F30 \n"
  76 "    B       loc_FF868F3C \n"
  77 "    B       loc_FF868F60 \n"
  78 
  79 "loc_FF868D20:\n"
  80 "    BL      sub_FF869560 \n"
  81 
  82 // only do quick press hack if overrides are active
  83 "    BL      captseq_hack_override_active\n" // returns 1 if tv or sv override in effect
  84 "    STR     R0,[SP,#-4]!\n" // push return value
  85 "    BL      shooting_expo_param_override\n"      // added
  86 
  87 "    BL      sub_FF8665F0 \n"
  88 
  89 "    LDR     R0, [SP], #4\n" // pop override hack
  90 "    CMP     R0, #1\n"     // +
  91 "    MOVEQ   R0, #0\n"     // +
  92 "    STREQ   R0, [R4, #0x24]\n"  // fixes overrides behavior at short shutter press
  93 "    LDRNE   R0, [R4, #0x24]\n" // modified NE
  94 "    CMPNE   R0, #0\n"         // modified NE
  95 
  96 //"  LDR     R0, [R4, #0x24] \n"  // above patch makes these lines redundant
  97 //"  CMP     R0, #0 \n"
  98 "    BEQ     loc_FF868F60 \n"
  99 "    BL      sub_FF8680AC \n"
 100 "    MOV     R5, R0 \n"
 101 "    LDR     R0, [R4, #0x24] \n"
 102 "    CMP     R0, #0 \n"
 103 "    BEQ     loc_FF868D68 \n"
 104 "    MOV     R0, #0xC \n"
 105 "    BL      sub_FF86D1F0 \n"
 106 "    TST     R0, #1 \n"
 107 "    STRNE   R9, [R6, #4] \n"
 108 "    LDRNE   R0, [R5, #8] \n"
 109 "    ORRNE   R0, R0, #0x40000000 \n"
 110 "    STRNE   R0, [R5, #8] \n"
 111 "    BNE     loc_FF868F60 \n"
 112 
 113 "loc_FF868D68:\n"
 114 "    MOV     R0, R5 \n"
 115 "    BL      sub_FF94C32C \n"
 116 "    MOV     R0, R5 \n"
 117 "    BL      sub_FF86848C \n"
 118 "    MOV     R0, R5 \n"
 119 "    BL      sub_FF94CA04_my \n"  // --> Patched. Old value = 0xFF94CA04.
 120 "    TST     R0, #1 \n"
 121 "    STRNE   R9, [R6, #4] \n"
 122 "    B       loc_FF868F60 \n"
 123 
 124 "loc_FF868D8C:\n"
 125 "    BL      sub_FF868504_my \n"  // --> Patched. Old value = 0xFF868504.
 126 "    B       loc_FF868DB0 \n"
 127 
 128 "loc_FF868D94:\n"
 129 "    MOV     R0, #1 \n"
 130 "    BL      sub_FF8697D4 \n"
 131 "    LDR     R0, [R4, #0xC] \n"
 132 "    CMP     R0, #0 \n"
 133 "    BLNE    sub_FF86A2D8 \n"
 134 "    B       loc_FF868F60 \n"
 135 
 136 "loc_FF868DAC:\n"
 137 "    BL      sub_FF86922C \n"
 138 
 139 "loc_FF868DB0:\n"
 140 "    STR     R7, [R4, #0x24] \n"
 141 "    B       loc_FF868F60 \n"
 142 
 143 "loc_FF868DB8:\n"
 144 "    BL      sub_FF869540 \n"
 145 "    B       loc_FF868DB0 \n"
 146 
 147 "loc_FF868DC0:\n"
 148 "    BL      sub_FF869548 \n"
 149 "    B       loc_FF868F60 \n"
 150 
 151 "loc_FF868DC8:\n"
 152 "    BL      sub_FF8696C4 \n"
 153 "    B       loc_FF868E2C \n"
 154 
 155 "loc_FF868DD0:\n"
 156 "    LDR     R5, [R0, #0xC] \n"
 157 "    BL      sub_FF869550 \n"
 158 "    MOV     R0, R5 \n"
 159 "    BL      sub_FF94B310 \n"
 160 "    TST     R0, #1 \n"
 161 "    MOV     R8, R0 \n"
 162 "    BNE     loc_FF868E10 \n"
 163 "    BL      sub_FF879908 \n"
 164 "    STR     R0, [R5, #0x18] \n"
 165 "    MOV     R0, R5 \n"
 166 "    BL      sub_FF94C8C0 \n"
 167 "    MOV     R0, R5 \n"
 168 "    BL      sub_FF94CCCC \n"
 169 "    MOV     R8, R0 \n"
 170 "    LDR     R0, [R5, #0x18] \n"
 171 "    BL      sub_FF879B1C \n"
 172 
 173 "loc_FF868E10:\n"
 174 "    BL      sub_FF869540 \n"
 175 "    MOV     R2, R5 \n"
 176 "    MOV     R1, #9 \n"
 177 "    MOV     R0, R8 \n"
 178 "    BL      sub_FF866B7C \n"
 179 "    B       loc_FF868F60 \n"
 180 
 181 "loc_FF868E28:\n"
 182 "    BL      sub_FF869754 \n"
 183 
 184 "loc_FF868E2C:\n"
 185 "    BL      sub_FF8665F0 \n"
 186 "    B       loc_FF868F60 \n"
 187 
 188 "loc_FF868E34:\n"
 189 "    LDR     R0, [R4, #0x54] \n"
 190 "    BL      sub_FF869DEC \n"
 191 "    B       loc_FF868F60 \n"
 192 
 193 "loc_FF868E40:\n"
 194 "    BL      sub_FF86A098 \n"
 195 "    B       loc_FF868F60 \n"
 196 
 197 "loc_FF868E48:\n"
 198 "    BL      sub_FF86A128 \n"
 199 "    B       loc_FF868F60 \n"
 200 
 201 "loc_FF868E50:\n"
 202 "    BL      sub_FF869540 \n"
 203 "    B       loc_FF868F60 \n"
 204 
 205 "loc_FF868E58:\n"
 206 "    BL      sub_FF94B550 \n"
 207 "    B       loc_FF868F60 \n"
 208 
 209 "loc_FF868E60:\n"
 210 "    BL      sub_FF94B77C \n"
 211 "    B       loc_FF868F60 \n"
 212 
 213 "loc_FF868E68:\n"
 214 "    BL      sub_FF94B810 \n"
 215 "    B       loc_FF868F60 \n"
 216 
 217 "loc_FF868E70:\n"
 218 "    BL      sub_FF94B938 \n"
 219 "    B       loc_FF868F60 \n"
 220 
 221 "loc_FF868E78:\n"
 222 "    BL      sub_FF94B9EC \n"
 223 "    B       loc_FF868F60 \n"
 224 
 225 "loc_FF868E80:\n"
 226 "    BL      sub_FF94BE7C \n"
 227 "    B       loc_FF868F60 \n"
 228 
 229 "loc_FF868E88:\n"
 230 "    BL      sub_FF94BED4 \n"
 231 "    B       loc_FF868F60 \n"
 232 
 233 "loc_FF868E90:\n"
 234 "    MOV     R0, #0 \n"
 235 "    B       loc_FF868EB4 \n"
 236 
 237 "loc_FF868E98:\n"
 238 "    BL      sub_FF94C070 \n"
 239 "    B       loc_FF868F60 \n"
 240 
 241 "loc_FF868EA0:\n"
 242 "    BL      sub_FF94C100 \n"
 243 "    B       loc_FF868F60 \n"
 244 
 245 "loc_FF868EA8:\n"
 246 "    BL      sub_FF94C1C0 \n"
 247 "    B       loc_FF868F60 \n"
 248 
 249 "loc_FF868EB0:\n"
 250 "    MOV     R0, #1 \n"
 251 
 252 "loc_FF868EB4:\n"
 253 "    BL      sub_FF94BF48 \n"
 254 "    B       loc_FF868F60 \n"
 255 
 256 "loc_FF868EBC:\n"
 257 "    BL      sub_FF869A0C \n"
 258 "    B       loc_FF868F60 \n"
 259 
 260 "loc_FF868EC4:\n"
 261 "    BL      sub_FF869AAC \n"
 262 "    BL      sub_FF869088 \n"
 263 "    B       loc_FF868F60 \n"
 264 
 265 "loc_FF868ED0:\n"
 266 "    BL      sub_FF94BCA4 \n"
 267 "    B       loc_FF868F60 \n"
 268 
 269 "loc_FF868ED8:\n"
 270 "    MOV     R2, #2 \n"
 271 "    ADD     R1, R4, #0x74 \n"
 272 "    MOV     R0, #0x6F \n"
 273 "    BL      _GetPropertyCase \n"
 274 "    TST     R0, #1 \n"
 275 "    LDRNE   R1, =0x61C \n"
 276 "    LDRNE   R0, =0xFF8683DC /*'SsShootTask.c'*/ \n"
 277 "    BLNE    _DebugAssert \n"
 278 "    LDRH    R0, [R4, #0x74] \n"
 279 "    CMP     R0, #1 \n"
 280 "    BLEQ    sub_FF94BC98 \n"
 281 "    B       loc_FF868F60 \n"
 282 
 283 "loc_FF868F08:\n"
 284 "    BL      sub_FF94BDD0 \n"
 285 "    B       loc_FF868F60 \n"
 286 
 287 "loc_FF868F10:\n"
 288 "    BL      sub_FF86836C \n"
 289 "    B       loc_FF868F60 \n"
 290 
 291 "loc_FF868F18:\n"
 292 "    BL      sub_FF824960 \n"
 293 "    B       loc_FF868F60 \n"
 294 
 295 "loc_FF868F20:\n"
 296 "    BL      sub_FF86B930 \n"
 297 "    B       loc_FF868F60 \n"
 298 
 299 "loc_FF868F28:\n"
 300 "    BL      sub_FF86B998 \n"
 301 "    B       loc_FF868F60 \n"
 302 
 303 "loc_FF868F30:\n"
 304 "    BL      sub_FF86B9F4 \n"
 305 "    BL      sub_FF86B9B4 \n"
 306 "    B       loc_FF868F60 \n"
 307 
 308 "loc_FF868F3C:\n"
 309 "    MOV     R0, #1 \n"
 310 "    BL      sub_FF94D4D0 \n"
 311 "    LDRH    R0, [R4, #0xA0] \n"
 312 "    CMP     R0, #3 \n"
 313 "    BLNE    sub_FF86BBB0 \n"
 314 "    B       loc_FF868F60 \n"
 315 
 316 "loc_FF868F54:\n"
 317 "    LDR     R1, =0x65E \n"
 318 "    LDR     R0, =0xFF8683DC /*'SsShootTask.c'*/ \n"
 319 "    BL      _DebugAssert \n"
 320 
 321 "loc_FF868F60:\n"
 322 "    LDR     R0, [SP] \n"
 323 "    LDR     R1, [R0, #4] \n"
 324 "    LDR     R0, [R6, #0x10] \n"
 325 "    BL      sub_FF8714A4 /*_SetEventFlag*/ \n"
 326 "    LDR     R5, [SP] \n"
 327 "    LDR     R0, [R5, #8] \n"
 328 "    CMP     R0, #0 \n"
 329 "    LDREQ   R1, =0x11D \n"
 330 "    LDREQ   R0, =0xFF8683DC /*'SsShootTask.c'*/ \n"
 331 "    BLEQ    _DebugAssert \n"
 332 "    STR     R7, [R5, #8] \n"
 333 "    B       loc_FF868C4C \n"
 334 );
 335 }
 336 
 337 /*************************************************************/
 338 //** sub_FF94CA04_my @ 0xFF94CA04 - 0xFF94CA6C, length=27
 339 void __attribute__((naked,noinline)) sub_FF94CA04_my() {
 340 asm volatile (
 341 "    STMFD   SP!, {R1-R7,LR} \n"
 342 "    MOV     R4, R0 \n"
 343 "    BL      sub_FF94D640 \n"
 344 "    MVN     R1, #0 \n"
 345 "    BL      sub_FF8714D8 /*_ClearEventFlag*/ \n"
 346 "    MOV     R2, #4 \n"
 347 "    ADD     R1, SP, #4 \n"
 348 "    MOV     R0, #0x8A \n"
 349 "    BL      _GetPropertyCase \n"
 350 "    TST     R0, #1 \n"
 351 "    LDRNE   R1, =0x373 \n"
 352 "    LDRNE   R0, =0xFF94C9D0 /*'SsCaptureSeq.c'*/ \n"
 353 "    BLNE    _DebugAssert \n"
 354 "    LDR     R7, =0x1BEF8 \n"
 355 "    LDR     R6, =0x1BE24 \n"
 356 "    LDRSH   R1, [R7, #0xE] \n"
 357 "    LDR     R0, [R6, #0x9C] \n"
 358 "    BL      sub_FFA30600 \n"
 359 "    BL      _GetCCDTemperature \n"
 360 "    LDR     R3, =0x9B44 \n"
 361 "    STRH    R0, [R4, #0x94] \n"
 362 "    STR     R3, [SP] \n"
 363 "    MOV     R1, R0 \n"
 364 "    LDRH    R0, [R6, #0x70] \n"
 365 "    LDRSH   R2, [R7, #0xC] \n"
 366 "    SUB     R3, R3, #4 \n"
 367 "    BL      sub_FF94DC64 \n"
 368 "    BL      wait_until_remote_button_is_released\n" // added
 369 "    BL      capt_seq_hook_set_nr\n"                 // added
 370 "    LDR     PC, =0xFF94CA70 \n"  // Continue in firmware
 371 );
 372 }
 373 
 374 /*************************************************************/
 375 //** sub_FF868504_my @ 0xFF868504 - 0xFF868730, length=140
 376 void __attribute__((naked,noinline)) sub_FF868504_my() {
 377 asm volatile (
 378 "    STMFD   SP!, {R3-R9,LR} \n"
 379 "    LDR     R4, [R0, #0xC] \n"
 380 "    LDR     R5, =0x1BE24 \n"
 381 "    LDR     R0, [R4, #8] \n"
 382 "    LDR     R6, =0x820A \n"
 383 "    ORR     R0, R0, #1 \n"
 384 "    STR     R0, [R4, #8] \n"
 385 "    LDRH    R0, [R5] \n"
 386 "    LDR     R8, =0x5584 \n"
 387 "    MOV     R7, #0 \n"
 388 "    CMP     R0, R6 \n"
 389 "    BEQ     loc_FF8685A8 \n"
 390 "    LDRH    R0, [R5, #0xA6] \n"
 391 "    CMP     R0, #3 \n"
 392 "    BEQ     loc_FF868608 \n"
 393 "    LDR     R0, [R4, #0xC] \n"
 394 "    CMP     R0, #1 \n"
 395 "    BLS     loc_FF8685B4 \n"
 396 "    LDRH    R0, [R5, #0xA4] \n"
 397 "    CMP     R0, #0 \n"
 398 "    BNE     loc_FF868608 \n"
 399 "    LDRH    R0, [R5, #0xA0] \n"
 400 "    CMP     R0, #2 \n"
 401 "    BNE     loc_FF8685C0 \n"
 402 "    BL      sub_FF869B5C \n"
 403 "    LDRH    R0, [R5] \n"
 404 "    CMP     R0, R6 \n"
 405 "    BEQ     loc_FF8685A8 \n"
 406 "    LDRH    R0, [R5, #0xA6] \n"
 407 "    CMP     R0, #3 \n"
 408 "    BEQ     loc_FF868608 \n"
 409 "    LDR     R0, [R4, #0xC] \n"
 410 "    CMP     R0, #1 \n"
 411 "    BLS     loc_FF8685B4 \n"
 412 "    LDRH    R0, [R5, #0xA4] \n"
 413 "    CMP     R0, #0 \n"
 414 "    BNE     loc_FF868608 \n"
 415 "    LDRH    R0, [R5, #0xA0] \n"
 416 "    CMP     R0, #2 \n"
 417 "    BEQ     loc_FF8685EC \n"
 418 "    B       loc_FF8685C0 \n"
 419 
 420 "loc_FF8685A8:\n"
 421 "    LDRH    R0, [R5, #0xA6] \n"
 422 "    CMP     R0, #3 \n"
 423 "    BEQ     loc_FF868608 \n"
 424 
 425 "loc_FF8685B4:\n"
 426 "    LDRH    R0, [R5, #0xA4] \n"
 427 "    CMP     R0, #0 \n"
 428 "    BNE     loc_FF868608 \n"
 429 
 430 "loc_FF8685C0:\n"
 431 "    LDRH    R0, [R5, #0xA0] \n"
 432 "    CMP     R0, #1 \n"
 433 "    BNE     loc_FF868608 \n"
 434 "    LDRH    R0, [R5] \n"
 435 "    CMP     R0, R6 \n"
 436 "    LDRNE   R0, [R4, #0xC] \n"
 437 "    CMPNE   R0, #1 \n"
 438 "    BLS     loc_FF868608 \n"
 439 "    LDR     R0, [R4, #0x10] \n"
 440 "    CMP     R0, #1 \n"
 441 "    BNE     loc_FF868608 \n"
 442 
 443 "loc_FF8685EC:\n"
 444 "    LDR     R3, =0x24D \n"
 445 "    LDR     R2, =0xEA60 \n"
 446 "    STR     R3, [SP] \n"
 447 "    LDR     R0, [R8, #0x10] \n"
 448 "    LDR     R3, =0xFF8683DC /*'SsShootTask.c'*/ \n"
 449 "    MOV     R1, #0x40000000 \n"
 450 "    BL      sub_FF86D574 \n"
 451 
 452 "loc_FF868608:\n"
 453 "    BL      sub_FF86836C \n"
 454 "    LDR     R0, [R5, #0x24] \n"
 455 "    CMP     R0, #0 \n"
 456 "    MOVEQ   R0, #2 \n"
 457 "    BLEQ    sub_FF861ADC \n"
 458 "    BL      sub_FF869550 \n"
 459 "    LDR     R0, [R5, #0x24] \n"
 460 "    CMP     R0, #0 \n"
 461 "    BNE     loc_FF8686C0 \n"
 462 "    MOV     R0, #0 \n"
 463 "    BL      sub_FF94D4D0 \n"
 464 "    MOV     R0, R4 \n"
 465 "    BL      sub_FF94C32C \n"
 466 "    MOV     R0, R4 \n"
 467 "    BL      sub_FF869974 \n"
 468 "    MOV     R0, R4 \n"
 469 "    BL      sub_FF94AEB4 \n"
 470 "    CMP     R0, #0 \n"
 471 "    BEQ     loc_FF868678 \n"
 472 "    BL      sub_FF94D510 \n"
 473 "    MOV     R0, R4 \n"
 474 "    BL      sub_FF94B078 \n"
 475 "    TST     R0, #1 \n"
 476 "    MOVNE   R2, R4 \n"
 477 "    LDMNEFD SP!, {R3-R9,LR} \n"
 478 "    MOVNE   R1, #1 \n"
 479 "    BNE     sub_FF866B7C \n"
 480 "    B       loc_FF86869C \n"
 481 
 482 "loc_FF868678:\n"
 483 "    LDR     R0, [R5, #0xC] \n"
 484 "    CMP     R0, #0 \n"
 485 "    BEQ     loc_FF868690 \n"
 486 "    BL      sub_FF86A260 \n"
 487 "    BL      sub_FF900338 \n"
 488 "    BL      sub_FF863254 \n"
 489 
 490 "loc_FF868690:\n"
 491 "    MOV     R0, R4 \n"
 492 "    BL      sub_FF94AFAC \n"
 493 "    BL      sub_FF94D510 \n"
 494 
 495 "loc_FF86869C:\n"
 496 "    MOV     R0, R4 \n"
 497 "    BL      sub_FF86848C \n"
 498 "    MOV     R0, R4 \n"
 499 "    BL      sub_FF94C8C0 \n"
 500 "    BL      sub_FF94D360 \n"
 501 "    MOV     R0, R4 \n"
 502 "    BL      sub_FF94CA04_my \n"  // --> Patched. Old value = 0xFF94CA04.
 503 "    MOV     R7, R0 \n"
 504 "    B       loc_FF8686CC \n"
 505 
 506 "loc_FF8686C0:\n"
 507 "    LDR     R0, [R8, #4] \n"
 508 "    CMP     R0, #0 \n"
 509 "    MOVNE   R7, #0x1D \n"
 510 
 511 "loc_FF8686CC:\n"
 512 "    BL      sub_FF86B998 \n"
 513 "    BL      sub_FF86B9E0 \n"
 514 "    BL      sub_FF86BA20 \n"
 515 "    BL      capt_seq_hook_raw_here \n"         // added
 516 "    MOV     R2, R4 \n"
 517 "    MOV     R1, #1 \n"
 518 "    MOV     R0, R7 \n"
 519 "    BL      sub_FF866B7C \n"
 520 "    BL      sub_FF94CC5C \n"
 521 "    CMP     R0, #0 \n"
 522 "    LDRNE   R0, [R4, #8] \n"
 523 "    ORRNE   R0, R0, #0x2000 \n"
 524 "    STRNE   R0, [R4, #8] \n"
 525 "    LDR     R0, [R4, #0x1C] \n"
 526 "    CMP     R0, #0 \n"
 527 "    BLNE    sub_FF86326C \n"
 528 "    LDRH    R0, [R5, #0xA6] \n"
 529 "    CMP     R0, #3 \n"
 530 "    BEQ     loc_FF868730 \n"
 531 "    LDRH    R0, [R5, #0xA4] \n"
 532 "    CMP     R0, #0 \n"
 533 "    LDREQH  R0, [R5, #0xA0] \n"
 534 "    CMPEQ   R0, #2 \n"
 535 "    MOVEQ   R0, R4 \n"
 536 "    LDMEQFD SP!, {R3-R9,LR} \n"
 537 "    BEQ     sub_FF869BB0 \n"
 538 
 539 "loc_FF868730:\n"
 540 "    LDMFD   SP!, {R3-R9,PC} \n"
 541 );
 542 }
 543 
 544 /*************************************************************/
 545 //** exp_drv_task @ 0xFF8AD86C - 0xFF8ADE18, length=364
 546 void __attribute__((naked,noinline)) exp_drv_task() {
 547 asm volatile (
 548 "    STMFD   SP!, {R4-R8,LR} \n"
 549 "    SUB     SP, SP, #0x20 \n"
 550 "    LDR     R8, =0xBB8 \n"
 551 "    LDR     R7, =0x6EE4 \n"
 552 "    LDR     R5, =0x210F0 \n"
 553 "    MOV     R0, #0 \n"
 554 "    ADD     R6, SP, #0x10 \n"
 555 "    STR     R0, [SP, #0xC] \n"
 556 
 557 "loc_FF8AD88C:\n"
 558 "    LDR     R0, [R7, #0x20] \n"
 559 "    MOV     R2, #0 \n"
 560 "    ADD     R1, SP, #0x1C \n"
 561 "    BL      sub_FF8274FC /*_ReceiveMessageQueue*/ \n"
 562 "    LDR     R0, [SP, #0xC] \n"
 563 "    CMP     R0, #1 \n"
 564 "    BNE     loc_FF8AD8D4 \n"
 565 "    LDR     R0, [SP, #0x1C] \n"
 566 "    LDR     R0, [R0] \n"
 567 "    CMP     R0, #0x13 \n"
 568 "    CMPNE   R0, #0x14 \n"
 569 "    CMPNE   R0, #0x15 \n"
 570 "    BEQ     loc_FF8AD9F0 \n"
 571 "    CMP     R0, #0x27 \n"
 572 "    BEQ     loc_FF8AD9C8 \n"
 573 "    ADD     R1, SP, #0xC \n"
 574 "    MOV     R0, #0 \n"
 575 "    BL      sub_FF8AD7E0 \n"
 576 
 577 "loc_FF8AD8D4:\n"
 578 "    LDR     R0, [SP, #0x1C] \n"
 579 "    LDR     R1, [R0] \n"
 580 "    CMP     R1, #0x2C \n"
 581 "    BNE     loc_FF8AD904 \n"
 582 "    LDR     R0, [SP, #0x1C] \n"
 583 "    BL      sub_FF8AEABC \n"
 584 "    LDR     R0, [R7, #0x1C] \n"
 585 "    MOV     R1, #1 \n"
 586 "    BL      sub_FF8714A4 /*_SetEventFlag*/ \n"
 587 "    BL      _ExitTask \n"
 588 "    ADD     SP, SP, #0x20 \n"
 589 "    LDMFD   SP!, {R4-R8,PC} \n"
 590 
 591 "loc_FF8AD904:\n"
 592 "    CMP     R1, #0x2B \n"
 593 "    BNE     loc_FF8AD920 \n"
 594 "    LDR     R2, [R0, #0x88]! \n"
 595 "    LDR     R1, [R0, #4] \n"
 596 "    MOV     R0, R1 \n"
 597 "    BLX     R2 \n"
 598 "    B       loc_FF8ADE10 \n"
 599 
 600 "loc_FF8AD920:\n"
 601 "    CMP     R1, #0x25 \n"
 602 "    BNE     loc_FF8AD970 \n"
 603 "    LDR     R0, [R7, #0x1C] \n"
 604 "    MOV     R1, #0x80 \n"
 605 "    BL      sub_FF8714D8 /*_ClearEventFlag*/ \n"
 606 "    LDR     R0, =0xFF8AA2A4 \n"
 607 "    MOV     R1, #0x80 \n"
 608 "    BL      sub_FF93B0F8 \n"
 609 "    LDR     R0, [R7, #0x1C] \n"
 610 "    MOV     R2, R8 \n"
 611 "    MOV     R1, #0x80 \n"
 612 "    BL      sub_FF8713E4 /*_WaitForAllEventFlag*/ \n"
 613 "    TST     R0, #1 \n"
 614 "    LDRNE   R1, =0xD36 \n"
 615 "    BNE     loc_FF8AD9B4 \n"
 616 
 617 "loc_FF8AD95C:\n"
 618 "    LDR     R1, [SP, #0x1C] \n"
 619 "    LDR     R0, [R1, #0x8C] \n"
 620 "    LDR     R1, [R1, #0x88] \n"
 621 "    BLX     R1 \n"
 622 "    B       loc_FF8ADE10 \n"
 623 
 624 "loc_FF8AD970:\n"
 625 "    CMP     R1, #0x26 \n"
 626 "    BNE     loc_FF8AD9C0 \n"
 627 "    ADD     R1, SP, #0xC \n"
 628 "    BL      sub_FF8AD7E0 \n"
 629 "    LDR     R0, [R7, #0x1C] \n"
 630 "    MOV     R1, #0x100 \n"
 631 "    BL      sub_FF8714D8 /*_ClearEventFlag*/ \n"
 632 "    LDR     R0, =0xFF8AA2B4 \n"
 633 "    MOV     R1, #0x100 \n"
 634 "    BL      sub_FF93BA84 \n"
 635 "    LDR     R0, [R7, #0x1C] \n"
 636 "    MOV     R2, R8 \n"
 637 "    MOV     R1, #0x100 \n"
 638 "    BL      sub_FF8713E4 /*_WaitForAllEventFlag*/ \n"
 639 "    TST     R0, #1 \n"
 640 "    BEQ     loc_FF8AD95C \n"
 641 "    MOV     R1, #0xD40 \n"
 642 
 643 "loc_FF8AD9B4:\n"
 644 "    LDR     R0, =0xFF8AA9AC /*'ExpDrv.c'*/ \n"
 645 "    BL      _DebugAssert \n"
 646 "    B       loc_FF8AD95C \n"
 647 
 648 "loc_FF8AD9C0:\n"
 649 "    CMP     R1, #0x27 \n"
 650 "    BNE     loc_FF8AD9D8 \n"
 651 
 652 "loc_FF8AD9C8:\n"
 653 "    LDR     R0, [SP, #0x1C] \n"
 654 "    ADD     R1, SP, #0xC \n"
 655 "    BL      sub_FF8AD7E0 \n"
 656 "    B       loc_FF8AD95C \n"
 657 
 658 "loc_FF8AD9D8:\n"
 659 "    CMP     R1, #0x2A \n"
 660 "    BNE     loc_FF8AD9F0 \n"
 661 "    BL      sub_FF89D3DC \n"
 662 "    BL      sub_FF89E068 \n"
 663 "    BL      sub_FF89DBA0 \n"
 664 "    B       loc_FF8AD95C \n"
 665 
 666 "loc_FF8AD9F0:\n"
 667 "    LDR     R0, [SP, #0x1C] \n"
 668 "    MOV     R4, #1 \n"
 669 "    LDR     R1, [R0] \n"
 670 "    CMP     R1, #0x11 \n"
 671 "    CMPNE   R1, #0x12 \n"
 672 "    BNE     loc_FF8ADA60 \n"
 673 "    LDR     R1, [R0, #0x7C] \n"
 674 "    ADD     R1, R1, R1, LSL#1 \n"
 675 "    ADD     R1, R0, R1, LSL#2 \n"
 676 "    SUB     R1, R1, #8 \n"
 677 "    LDMIA   R1, {R2-R4} \n"
 678 "    STMIA   R6, {R2-R4} \n"
 679 "    BL      sub_FF8AC354 \n"
 680 "    LDR     R0, [SP, #0x1C] \n"
 681 "    LDR     R1, [R0, #0x7C] \n"
 682 "    LDR     R3, [R0, #0x88] \n"
 683 "    LDR     R2, [R0, #0x8C] \n"
 684 "    ADD     R0, R0, #4 \n"
 685 "    BLX     R3 \n"
 686 "    LDR     R0, [SP, #0x1C] \n"
 687 "    BL      sub_FF8AEE70 \n"
 688 "    LDR     R0, [SP, #0x1C] \n"
 689 "    LDR     R1, [R0, #0x7C] \n"
 690 "    LDR     R3, [R0, #0x90] \n"
 691 "    LDR     R2, [R0, #0x94] \n"
 692 "    ADD     R0, R0, #4 \n"
 693 "    BLX     R3 \n"
 694 "    B       loc_FF8ADD50 \n"
 695 
 696 "loc_FF8ADA60:\n"
 697 "    CMP     R1, #0x13 \n"
 698 "    CMPNE   R1, #0x14 \n"
 699 "    CMPNE   R1, #0x15 \n"
 700 "    BNE     loc_FF8ADB14 \n"
 701 "    ADD     R3, SP, #0xC \n"
 702 "    MOV     R2, SP \n"
 703 "    ADD     R1, SP, #0x10 \n"
 704 "    BL      sub_FF8AC59C \n"
 705 "    CMP     R0, #1 \n"
 706 "    MOV     R4, R0 \n"
 707 "    CMPNE   R4, #5 \n"
 708 "    BNE     loc_FF8ADAB0 \n"
 709 "    LDR     R0, [SP, #0x1C] \n"
 710 "    MOV     R2, R4 \n"
 711 "    LDR     R1, [R0, #0x7C]! \n"
 712 "    LDR     R12, [R0, #0xC]! \n"
 713 "    LDR     R3, [R0, #4] \n"
 714 "    MOV     R0, SP \n"
 715 "    BLX     R12 \n"
 716 "    B       loc_FF8ADAE8 \n"
 717 
 718 "loc_FF8ADAB0:\n"
 719 "    LDR     R0, [SP, #0x1C] \n"
 720 "    CMP     R4, #2 \n"
 721 "    LDR     R3, [R0, #0x8C] \n"
 722 "    CMPNE   R4, #6 \n"
 723 "    BNE     loc_FF8ADAFC \n"
 724 "    LDR     R12, [R0, #0x88] \n"
 725 "    MOV     R0, SP \n"
 726 "    MOV     R2, R4 \n"
 727 "    MOV     R1, #1 \n"
 728 "    BLX     R12 \n"
 729 "    LDR     R0, [SP, #0x1C] \n"
 730 "    MOV     R2, SP \n"
 731 "    ADD     R1, SP, #0x10 \n"
 732 "    BL      sub_FF8AD52C \n"
 733 
 734 "loc_FF8ADAE8:\n"
 735 "    LDR     R0, [SP, #0x1C] \n"
 736 "    LDR     R2, [SP, #0xC] \n"
 737 "    MOV     R1, R4 \n"
 738 "    BL      sub_FF8AD780 \n"
 739 "    B       loc_FF8ADD50 \n"
 740 
 741 "loc_FF8ADAFC:\n"
 742 "    LDR     R1, [R0, #0x7C] \n"
 743 "    LDR     R12, [R0, #0x88] \n"
 744 "    ADD     R0, R0, #4 \n"
 745 "    MOV     R2, R4 \n"
 746 "    BLX     R12 \n"
 747 "    B       loc_FF8ADD50 \n"
 748 
 749 "loc_FF8ADB14:\n"
 750 "    CMP     R1, #0x21 \n"
 751 "    CMPNE   R1, #0x22 \n"
 752 "    BNE     loc_FF8ADB60 \n"
 753 "    LDR     R1, [R0, #0x7C] \n"
 754 "    ADD     R1, R1, R1, LSL#1 \n"
 755 "    ADD     R1, R0, R1, LSL#2 \n"
 756 "    SUB     R1, R1, #8 \n"
 757 "    LDMIA   R1, {R2-R4} \n"
 758 "    STMIA   R6, {R2-R4} \n"
 759 "    BL      sub_FF8AB8D4 \n"
 760 "    LDR     R0, [SP, #0x1C] \n"
 761 "    LDR     R1, [R0, #0x7C] \n"
 762 "    LDR     R3, [R0, #0x88] \n"
 763 "    LDR     R2, [R0, #0x8C] \n"
 764 "    ADD     R0, R0, #4 \n"
 765 "    BLX     R3 \n"
 766 "    LDR     R0, [SP, #0x1C] \n"
 767 "    BL      sub_FF8ABBD0 \n"
 768 "    B       loc_FF8ADD50 \n"
 769 
 770 "loc_FF8ADB60:\n"
 771 "    ADD     R1, R0, #4 \n"
 772 "    LDMIA   R1, {R2,R3,R12} \n"
 773 "    STMIA   R6, {R2,R3,R12} \n"
 774 "    LDR     R1, [R0] \n"
 775 "    CMP     R1, #0x24 \n"
 776 "    ADDLS   PC, PC, R1, LSL#2 \n"
 777 "    B       loc_FF8ADD30 \n"
 778 "    B       loc_FF8ADC10 \n"
 779 "    B       loc_FF8ADC10 \n"
 780 "    B       loc_FF8ADC18 \n"
 781 "    B       loc_FF8ADC20 \n"
 782 "    B       loc_FF8ADC20 \n"
 783 "    B       loc_FF8ADC20 \n"
 784 "    B       loc_FF8ADC10 \n"
 785 "    B       loc_FF8ADC18 \n"
 786 "    B       loc_FF8ADC20 \n"
 787 "    B       loc_FF8ADC20 \n"
 788 "    B       loc_FF8ADC38 \n"
 789 "    B       loc_FF8ADC38 \n"
 790 "    B       loc_FF8ADD24 \n"
 791 "    B       loc_FF8ADD2C \n"
 792 "    B       loc_FF8ADD2C \n"
 793 "    B       loc_FF8ADD2C \n"
 794 "    B       loc_FF8ADD2C \n"
 795 "    B       loc_FF8ADD30 \n"
 796 "    B       loc_FF8ADD30 \n"
 797 "    B       loc_FF8ADD30 \n"
 798 "    B       loc_FF8ADD30 \n"
 799 "    B       loc_FF8ADD30 \n"
 800 "    B       loc_FF8ADC28 \n"
 801 "    B       loc_FF8ADC30 \n"
 802 "    B       loc_FF8ADC30 \n"
 803 "    B       loc_FF8ADC44 \n"
 804 "    B       loc_FF8ADC44 \n"
 805 "    B       loc_FF8ADC4C \n"
 806 "    B       loc_FF8ADC7C \n"
 807 "    B       loc_FF8ADCAC \n"
 808 "    B       loc_FF8ADCDC \n"
 809 "    B       loc_FF8ADD0C \n"
 810 "    B       loc_FF8ADD0C \n"
 811 "    B       loc_FF8ADD30 \n"
 812 "    B       loc_FF8ADD30 \n"
 813 "    B       loc_FF8ADD14 \n"
 814 "    B       loc_FF8ADD1C \n"
 815 
 816 "loc_FF8ADC10:\n"
 817 "    BL      sub_FF8AA798 \n"
 818 "    B       loc_FF8ADD30 \n"
 819 
 820 "loc_FF8ADC18:\n"
 821 "    BL      sub_FF8AAA20 \n"
 822 "    B       loc_FF8ADD30 \n"
 823 
 824 "loc_FF8ADC20:\n"
 825 "    BL      sub_FF8AAC24 \n"
 826 "    B       loc_FF8ADD30 \n"
 827 
 828 "loc_FF8ADC28:\n"
 829 "    BL      sub_FF8AAE8C \n"
 830 "    B       loc_FF8ADD30 \n"
 831 
 832 "loc_FF8ADC30:\n"
 833 "    BL      sub_FF8AB080 \n"
 834 "    B       loc_FF8ADD30 \n"
 835 
 836 "loc_FF8ADC38:\n"
 837 "    BL      sub_FF8AB2E8_my \n"  // --> Patched. Old value = 0xFF8AB2E8.
 838 "    MOV     R4, #0 \n"
 839 "    B       loc_FF8ADD30 \n"
 840 
 841 "loc_FF8ADC44:\n"
 842 "    BL      sub_FF8AB424 \n"
 843 "    B       loc_FF8ADD30 \n"
 844 
 845 "loc_FF8ADC4C:\n"
 846 "    LDRH    R1, [R0, #4] \n"
 847 "    STRH    R1, [SP, #0x10] \n"
 848 "    LDRH    R1, [R5, #2] \n"
 849 "    STRH    R1, [SP, #0x12] \n"
 850 "    LDRH    R1, [R5, #4] \n"
 851 "    STRH    R1, [SP, #0x14] \n"
 852 "    LDRH    R1, [R5, #6] \n"
 853 "    STRH    R1, [SP, #0x16] \n"
 854 "    LDRH    R1, [R0, #0xC] \n"
 855 "    STRH    R1, [SP, #0x18] \n"
 856 "    BL      sub_FF8AEB30 \n"
 857 "    B       loc_FF8ADD30 \n"
 858 
 859 "loc_FF8ADC7C:\n"
 860 "    LDRH    R1, [R0, #4] \n"
 861 "    STRH    R1, [SP, #0x10] \n"
 862 "    LDRH    R1, [R5, #2] \n"
 863 "    STRH    R1, [SP, #0x12] \n"
 864 "    LDRH    R1, [R5, #4] \n"
 865 "    STRH    R1, [SP, #0x14] \n"
 866 "    LDRH    R1, [R5, #6] \n"
 867 "    STRH    R1, [SP, #0x16] \n"
 868 "    LDRH    R1, [R5, #8] \n"
 869 "    STRH    R1, [SP, #0x18] \n"
 870 "    BL      sub_FF8AEC8C \n"
 871 "    B       loc_FF8ADD30 \n"
 872 
 873 "loc_FF8ADCAC:\n"
 874 "    LDRH    R1, [R5] \n"
 875 "    STRH    R1, [SP, #0x10] \n"
 876 "    LDRH    R1, [R0, #6] \n"
 877 "    STRH    R1, [SP, #0x12] \n"
 878 "    LDRH    R1, [R5, #4] \n"
 879 "    STRH    R1, [SP, #0x14] \n"
 880 "    LDRH    R1, [R5, #6] \n"
 881 "    STRH    R1, [SP, #0x16] \n"
 882 "    LDRH    R1, [R5, #8] \n"
 883 "    STRH    R1, [SP, #0x18] \n"
 884 "    BL      sub_FF8AED38 \n"
 885 "    B       loc_FF8ADD30 \n"
 886 
 887 "loc_FF8ADCDC:\n"
 888 "    LDRH    R1, [R5] \n"
 889 "    STRH    R1, [SP, #0x10] \n"
 890 "    LDRH    R1, [R5, #2] \n"
 891 "    STRH    R1, [SP, #0x12] \n"
 892 "    LDRH    R1, [R5, #4] \n"
 893 "    STRH    R1, [SP, #0x14] \n"
 894 "    LDRH    R1, [R5, #6] \n"
 895 "    STRH    R1, [SP, #0x16] \n"
 896 "    LDRH    R1, [R0, #0xC] \n"
 897 "    STRH    R1, [SP, #0x18] \n"
 898 "    BL      sub_FF8AEDD8 \n"
 899 "    B       loc_FF8ADD30 \n"
 900 
 901 "loc_FF8ADD0C:\n"
 902 "    BL      sub_FF8AB698 \n"
 903 "    B       loc_FF8ADD30 \n"
 904 
 905 "loc_FF8ADD14:\n"
 906 "    BL      sub_FF8ABCD4 \n"
 907 "    B       loc_FF8ADD30 \n"
 908 
 909 "loc_FF8ADD1C:\n"
 910 "    BL      sub_FF8ABF0C \n"
 911 "    B       loc_FF8ADD30 \n"
 912 
 913 "loc_FF8ADD24:\n"
 914 "    BL      sub_FF8AC084 \n"
 915 "    B       loc_FF8ADD30 \n"
 916 
 917 "loc_FF8ADD2C:\n"
 918 "    BL      sub_FF8AC21C \n"
 919 
 920 "loc_FF8ADD30:\n"
 921 "    LDR     R0, [SP, #0x1C] \n"
 922 "    LDR     R1, [R0, #0x7C] \n"
 923 "    LDR     R3, [R0, #0x88] \n"
 924 "    LDR     R2, [R0, #0x8C] \n"
 925 "    ADD     R0, R0, #4 \n"
 926 "    BLX     R3 \n"
 927 "    CMP     R4, #1 \n"
 928 "    BNE     loc_FF8ADD98 \n"
 929 
 930 "loc_FF8ADD50:\n"
 931 "    LDR     R0, [SP, #0x1C] \n"
 932 "    MOV     R2, #0xC \n"
 933 "    LDR     R1, [R0, #0x7C] \n"
 934 "    ADD     R1, R1, R1, LSL#1 \n"
 935 "    ADD     R0, R0, R1, LSL#2 \n"
 936 "    SUB     R4, R0, #8 \n"
 937 "    LDR     R0, =0x210F0 \n"
 938 "    ADD     R1, SP, #0x10 \n"
 939 "    BL      sub_FFB00174 \n"
 940 "    LDR     R0, =0x210FC \n"
 941 "    MOV     R2, #0xC \n"
 942 "    ADD     R1, SP, #0x10 \n"
 943 "    BL      sub_FFB00174 \n"
 944 "    LDR     R0, =0x21108 \n"
 945 "    MOV     R2, #0xC \n"
 946 "    MOV     R1, R4 \n"
 947 "    BL      sub_FFB00174 \n"
 948 "    B       loc_FF8ADE10 \n"
 949 
 950 "loc_FF8ADD98:\n"
 951 "    LDR     R0, [SP, #0x1C] \n"
 952 "    LDR     R0, [R0] \n"
 953 "    CMP     R0, #0xB \n"
 954 "    BNE     loc_FF8ADDE0 \n"
 955 "    MOV     R3, #0 \n"
 956 "    STR     R3, [SP] \n"
 957 "    MOV     R3, #1 \n"
 958 "    MOV     R2, #1 \n"
 959 "    MOV     R1, #1 \n"
 960 "    MOV     R0, #0 \n"
 961 "    BL      sub_FF8AA5A0 \n"
 962 "    MOV     R3, #0 \n"
 963 "    STR     R3, [SP] \n"
 964 "    MOV     R3, #1 \n"
 965 "    MOV     R2, #1 \n"
 966 "    MOV     R1, #1 \n"
 967 "    MOV     R0, #0 \n"
 968 "    B       loc_FF8ADE0C \n"
 969 
 970 "loc_FF8ADDE0:\n"
 971 "    MOV     R3, #1 \n"
 972 "    MOV     R2, #1 \n"
 973 "    MOV     R1, #1 \n"
 974 "    MOV     R0, #1 \n"
 975 "    STR     R3, [SP] \n"
 976 "    BL      sub_FF8AA5A0 \n"
 977 "    MOV     R3, #1 \n"
 978 "    MOV     R2, #1 \n"
 979 "    MOV     R1, #1 \n"
 980 "    MOV     R0, #1 \n"
 981 "    STR     R3, [SP] \n"
 982 
 983 "loc_FF8ADE0C:\n"
 984 "    BL      sub_FF8AA6E0 \n"
 985 
 986 "loc_FF8ADE10:\n"
 987 "    LDR     R0, [SP, #0x1C] \n"
 988 "    BL      sub_FF8AEABC \n"
 989 "    B       loc_FF8AD88C \n"
 990 );
 991 }
 992 
 993 /*************************************************************/
 994 //** sub_FF8AB2E8_my @ 0xFF8AB2E8 - 0xFF8AB3A4, length=48
 995 void __attribute__((naked,noinline)) sub_FF8AB2E8_my() {
 996 asm volatile (
 997 "    STMFD   SP!, {R4-R8,LR} \n"
 998 "    LDR     R7, =0x6EE4 \n"
 999 "    MOV     R4, R0 \n"
1000 "    LDR     R0, [R7, #0x1C] \n"
1001 "    MOV     R1, #0x3E \n"
1002 "    BL      sub_FF8714D8 /*_ClearEventFlag*/ \n"
1003 "    LDRSH   R0, [R4, #4] \n"
1004 "    MOV     R2, #0 \n"
1005 "    MOV     R1, #0 \n"
1006 "    BL      sub_FF8AA328 \n"
1007 "    MOV     R6, R0 \n"
1008 "    LDRSH   R0, [R4, #6] \n"
1009 "    BL      sub_FF8AA440 \n"
1010 "    LDRSH   R0, [R4, #8] \n"
1011 "    BL      sub_FF8AA498 \n"
1012 "    LDRSH   R0, [R4, #0xA] \n"
1013 "    BL      sub_FF8AA4F0 \n"
1014 "    LDRSH   R0, [R4, #0xC] \n"
1015 "    BL      sub_FF8AA548 \n"
1016 "    MOV     R5, R0 \n"
1017 "    LDR     R0, [R4] \n"
1018 "    LDR     R8, =0x21108 \n"
1019 "    CMP     R0, #0xB \n"
1020 "    MOVEQ   R6, #0 \n"
1021 "    MOVEQ   R5, #0 \n"
1022 "    BEQ     loc_FF8AB378 \n"
1023 "    CMP     R6, #1 \n"
1024 "    BNE     loc_FF8AB378 \n"
1025 "    LDRSH   R0, [R4, #4] \n"
1026 "    LDR     R1, =0xFF8AA294 \n"
1027 "    MOV     R2, #2 \n"
1028 "    BL      sub_FF93B440 \n"
1029 "    STRH    R0, [R4, #4] \n"
1030 "    MOV     R0, #0 \n"
1031 "    STR     R0, [R7, #0x28] \n"
1032 "    B       loc_FF8AB380 \n"
1033 
1034 "loc_FF8AB378:\n"
1035 "    LDRH    R0, [R8] \n"
1036 "    STRH    R0, [R4, #4] \n"
1037 
1038 "loc_FF8AB380:\n"
1039 "    CMP     R5, #1 \n"
1040 "    LDRNEH  R0, [R8, #8] \n"
1041 "    BNE     loc_FF8AB39C \n"
1042 "    LDRSH   R0, [R4, #0xC] \n"
1043 "    LDR     R1, =0xFF8AA318 \n"
1044 "    MOV     R2, #0x20 \n"
1045 "    BL      sub_FF8AEAEC \n"
1046 
1047 "loc_FF8AB39C:\n"
1048 "    STRH    R0, [R4, #0xC] \n"
1049 "    LDRSH   R0, [R4, #6] \n"
1050 "    BL      sub_FF89D14C_my \n"  // --> Patched. Old value = 0xFF89D14C.
1051 "    LDR     PC, =0xFF8AB3A8 \n"  // Continue in firmware
1052 );
1053 }
1054 
1055 /*************************************************************/
1056 //** sub_FF89D14C_my @ 0xFF89D14C - 0xFF89D1B4, length=27
1057 void __attribute__((naked,noinline)) sub_FF89D14C_my() {
1058 asm volatile (
1059 "    STMFD   SP!, {R4-R6,LR} \n"
1060 "    LDR     R5, =0x6C14 \n"
1061 "    MOV     R4, R0 \n"
1062 "    LDR     R0, [R5, #4] \n"
1063 "    CMP     R0, #1 \n"
1064 "    MOVNE   R1, #0x140 \n"
1065 "    LDRNE   R0, =0xFF89CF50 /*'Shutter.c'*/ \n"
1066 "    BLNE    _DebugAssert \n"
1067 "    CMN     R4, #0xC00 \n"
1068 "    LDREQSH R4, [R5, #2] \n"
1069 "    CMN     R4, #0xC00 \n"
1070 "    LDREQ   R1, =0x146 \n"
1071 "    LDREQ   R0, =0xFF89CF50 /*'Shutter.c'*/ \n"
1072 "    STRH    R4, [R5, #2] \n"
1073 "    BLEQ    _DebugAssert \n"
1074 "    MOV     R0, R4 \n"
1075 "    BL      apex2us \n"  // --> Patched. Old value = _apex2us.
1076 "    MOV     R4, R0 \n"
1077 //"  BL      _sub_FF8D15F0 \n"  // --> Nullsub call removed.
1078 "    MOV     R0, R4 \n"
1079 "    BL      sub_FF8D6320 \n"
1080 "    TST     R0, #1 \n"
1081 "    LDRNE   R1, =0x14B \n"
1082 "    LDMNEFD SP!, {R4-R6,LR} \n"
1083 "    LDRNE   R0, =0xFF89CF50 /*'Shutter.c'*/ \n"
1084 "    BNE     _DebugAssert \n"
1085 "    LDMFD   SP!, {R4-R6,PC} \n"
1086 );
1087 }

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