root/platform/sx610hs/sub/100a/capt_seq.c

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

DEFINITIONS

This source file includes following definitions.
  1. capt_seq_task
  2. sub_FF21EFC4_my
  3. sub_FF21EDC4_my
  4. sub_FF3C416C_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_min.S
   9 #define NR_AUTO (0)        // have to explictly reset value back to 0 to enable auto
  10 #define PAUSE_FOR_FILE_COUNTER 350  // Enable delay in capt_seq_hook_raw_here to ensure file counter is updated
  11 
  12 #include "../../../generic/capt_seq.c"
  13 
  14 /*************************************************************/
  15 //** capt_seq_task @ 0xFF0998E8 - 0xFF099BD8, length=189
  16 void __attribute__((naked,noinline)) capt_seq_task() {
  17 asm volatile (
  18 "    STMFD   SP!, {R3-R7,LR} \n"
  19 "    LDR     R5, =0x26894 \n"
  20 "    LDR     R7, =0x3AD0 \n"
  21 "    MOV     R6, #0 \n"
  22 
  23 "loc_FF0998F8:\n"
  24 "    LDR     R0, [R7, #8] \n"
  25 "    MOV     R2, #0 \n"
  26 "    MOV     R1, SP \n"
  27 "    BL      sub_006B8490 /*_ReceiveMessageQueue*/ \n"
  28 "    TST     R0, #1 \n"
  29 "    BEQ     loc_FF099928 \n"
  30 "    LDR     R2, =0x455 \n"
  31 "    LDR     R1, =0xFF0991F0 /*'SsShootTask.c'*/ \n"
  32 "    MOV     R0, #0 \n"
  33 "    BL      _DebugAssert \n"
  34 "    BL      _ExitTask \n"
  35 "    LDMFD   SP!, {R3-R7,PC} \n"
  36 
  37 "loc_FF099928:\n"
  38 "    LDR     R0, [SP] \n"
  39 "    LDR     R0, [R0] \n"
  40 "    CMP     R0, #1 \n"
  41 "    CMPNE   R0, #0x25 \n"
  42 "    CMPNE   R0, #0x1C \n"
  43 "    BLNE    sub_FF2200A0 \n"
  44 "    LDR     R0, [SP] \n"
  45 "    LDR     R1, [R0] \n"
  46 "    CMP     R1, #0x27 \n"
  47 "    ADDCC   PC, PC, R1, LSL#2 \n"
  48 "    B       loc_FF099B9C \n"
  49 "    B       loc_FF0999F0 \n"
  50 "    B       loc_FF099A0C \n"
  51 "    B       loc_FF099A18 \n"
  52 "    B       loc_FF099A2C \n"
  53 "    B       loc_FF099A24 \n"
  54 "    B       loc_FF099A3C \n"
  55 "    B       loc_FF099A44 \n"
  56 "    B       loc_FF099A4C \n"
  57 "    B       loc_FF099A58 \n"
  58 "    B       loc_FF099A9C \n"
  59 "    B       loc_FF099A64 \n"
  60 "    B       loc_FF099A70 \n"
  61 "    B       loc_FF099A78 \n"
  62 "    B       loc_FF099A84 \n"
  63 "    B       loc_FF099A8C \n"
  64 "    B       loc_FF099A94 \n"
  65 "    B       loc_FF099AA8 \n"
  66 "    B       loc_FF099AB0 \n"
  67 "    B       loc_FF099AB8 \n"
  68 "    B       loc_FF099AC0 \n"
  69 "    B       loc_FF099AC8 \n"
  70 "    B       loc_FF099AD4 \n"
  71 "    B       loc_FF099ADC \n"
  72 "    B       loc_FF099AE4 \n"
  73 "    B       loc_FF099AEC \n"
  74 "    B       loc_FF099AF4 \n"
  75 "    B       loc_FF099AFC \n"
  76 "    B       loc_FF099B04 \n"
  77 "    B       loc_FF099B0C \n"
  78 "    B       loc_FF099B18 \n"
  79 "    B       loc_FF099B20 \n"
  80 "    B       loc_FF099B28 \n"
  81 "    B       loc_FF099B30 \n"
  82 "    B       loc_FF099B38 \n"
  83 "    B       loc_FF099B44 \n"
  84 "    B       loc_FF099B4C \n"
  85 "    B       loc_FF099B7C \n"
  86 "    B       loc_FF099B88 \n"
  87 "    B       loc_FF099BAC \n"
  88 
  89 "loc_FF0999F0:\n"
  90 "    LDR     R0, [R0, #0xC] \n"
  91 "    BL      sub_FF09A1D8 \n"
  92 "    BL      shooting_expo_param_override\n"    // added
  93 "    BL      sub_FF096C0C \n"
  94 //To do: Check if this is needed.
  95 //"    MOV     R0, #0\n"                          // added
  96 //"    STR     R0, [R5,#0x28]\n"                  // added, fixes overrides behavior at short shutter press (from S95)
  97 "    LDR     R0, [R5, #0x28] \n"
  98 "    CMP     R0, #0 \n"
  99 "    BLNE    sub_FF21EFC4_my \n"  // --> Patched. Old value = 0xFF21EFC4.
 100 "    B       loc_FF099BAC \n"
 101 
 102 "loc_FF099A0C:\n"
 103 "    LDR     R0, [R0, #0x10] \n"
 104 "    BL      sub_FF21EDC4_my \n"  // --> Patched. Old value = 0xFF21EDC4.
 105 "    B       loc_FF099BAC \n"
 106 
 107 "loc_FF099A18:\n"
 108 "    MOV     R0, #1 \n"
 109 "    BL      sub_FF09A538 \n"
 110 "    B       loc_FF099BAC \n"
 111 
 112 "loc_FF099A24:\n"
 113 "    BL      sub_FF099DA8 \n"
 114 "    B       loc_FF099A34 \n"
 115 
 116 "loc_FF099A2C:\n"
 117 "    LDR     R0, [R0, #0xC] \n"
 118 "    BL      sub_FF09A1AC \n"
 119 
 120 "loc_FF099A34:\n"
 121 "    STR     R6, [R5, #0x28] \n"
 122 "    B       loc_FF099BAC \n"
 123 
 124 "loc_FF099A3C:\n"
 125 "    BL      sub_FF09A1B8 \n"
 126 "    B       loc_FF099BAC \n"
 127 
 128 "loc_FF099A44:\n"
 129 "    BL      sub_FF09A400 \n"
 130 "    B       loc_FF099A5C \n"
 131 
 132 "loc_FF099A4C:\n"
 133 "    LDR     R0, [R0, #0x10] \n"
 134 "    BL      sub_FF21F0A0 \n"
 135 "    B       loc_FF099BAC \n"
 136 
 137 "loc_FF099A58:\n"
 138 "    BL      sub_FF09A488 \n"
 139 
 140 "loc_FF099A5C:\n"
 141 "    BL      sub_FF096C0C \n"
 142 "    B       loc_FF099BAC \n"
 143 
 144 "loc_FF099A64:\n"
 145 "    LDR     R0, [R5, #0x54] \n"
 146 "    BL      sub_FF09ACA8 \n"
 147 "    B       loc_FF099BAC \n"
 148 
 149 "loc_FF099A70:\n"
 150 "    BL      sub_FF09B004 \n"
 151 "    B       loc_FF099BAC \n"
 152 
 153 "loc_FF099A78:\n"
 154 "    LDR     R0, [R0, #0xC] \n"
 155 "    BL      sub_FF09B06C \n"
 156 "    B       loc_FF099BAC \n"
 157 
 158 "loc_FF099A84:\n"
 159 "    BL      sub_FF09B220 \n"
 160 "    B       loc_FF099BAC \n"
 161 
 162 "loc_FF099A8C:\n"
 163 "    BL      sub_FF09B738 \n"
 164 "    B       loc_FF099BAC \n"
 165 
 166 "loc_FF099A94:\n"
 167 "    BL      sub_FF09B820 \n"
 168 "    B       loc_FF099BAC \n"
 169 
 170 "loc_FF099A9C:\n"
 171 "    LDR     R0, [R0, #0xC] \n"
 172 "    BL      sub_FF09A1AC \n"
 173 "    B       loc_FF099BAC \n"
 174 
 175 "loc_FF099AA8:\n"
 176 "    BL      sub_FF21D374 \n"
 177 "    B       loc_FF099BAC \n"
 178 
 179 "loc_FF099AB0:\n"
 180 "    BL      sub_FF21D5D0 \n"
 181 "    B       loc_FF099BAC \n"
 182 
 183 "loc_FF099AB8:\n"
 184 "    BL      sub_FF21D694 \n"
 185 "    B       loc_FF099BAC \n"
 186 
 187 "loc_FF099AC0:\n"
 188 "    BL      sub_FF21D780 \n"
 189 "    B       loc_FF099BAC \n"
 190 
 191 "loc_FF099AC8:\n"
 192 "    MOV     R0, #0 \n"
 193 "    BL      sub_FF21DA68 \n"
 194 "    B       loc_FF099BAC \n"
 195 
 196 "loc_FF099AD4:\n"
 197 "    BL      sub_FF21DBE4 \n"
 198 "    B       loc_FF099BAC \n"
 199 
 200 "loc_FF099ADC:\n"
 201 "    BL      sub_FF0A2160 \n"
 202 "    B       loc_FF099BAC \n"
 203 
 204 "loc_FF099AE4:\n"
 205 "    BL      sub_FF0A216C \n"
 206 "    B       loc_FF099BAC \n"
 207 
 208 "loc_FF099AEC:\n"
 209 "    BL      sub_FF21DC88 \n"
 210 "    B       loc_FF099BAC \n"
 211 
 212 "loc_FF099AF4:\n"
 213 "    BL      sub_FF21DD38 \n"
 214 "    B       loc_FF099BAC \n"
 215 
 216 "loc_FF099AFC:\n"
 217 "    BL      sub_FF09A668 \n"
 218 "    B       loc_FF099BAC \n"
 219 
 220 "loc_FF099B04:\n"
 221 "    MOV     R0, #0 \n"
 222 "    B       loc_FF099B10 \n"
 223 
 224 "loc_FF099B0C:\n"
 225 "    LDR     R0, [R0, #0xC] \n"
 226 
 227 "loc_FF099B10:\n"
 228 "    BL      sub_FF09A6F8 \n"
 229 "    B       loc_FF099BAC \n"
 230 
 231 "loc_FF099B18:\n"
 232 "    BL      sub_FF21D934 \n"
 233 "    B       loc_FF099BAC \n"
 234 
 235 "loc_FF099B20:\n"
 236 "    BL      sub_FF21D9C8 \n"
 237 "    B       loc_FF099BAC \n"
 238 
 239 "loc_FF099B28:\n"
 240 "    BL      sub_FF09E3A0 \n"
 241 "    B       loc_FF099BAC \n"
 242 
 243 "loc_FF099B30:\n"
 244 "    BL      sub_FF09E4E8 \n"
 245 "    B       loc_FF099BAC \n"
 246 
 247 "loc_FF099B38:\n"
 248 "    LDR     R0, [R0, #0xC] \n"
 249 "    BL      sub_FF21DE5C \n"
 250 "    B       loc_FF099BAC \n"
 251 
 252 "loc_FF099B44:\n"
 253 "    BL      sub_FF21DEEC \n"
 254 "    B       loc_FF099BAC \n"
 255 
 256 "loc_FF099B4C:\n"
 257 "    BL      sub_FF0A0D44 \n"
 258 "    LDR     R0, =0x26994 \n"
 259 "    LDRH    R0, [R0, #0x9C] \n"
 260 "    CMP     R0, #4 \n"
 261 "    LDRNEH  R0, [R5] \n"
 262 "    SUBNE   R1, R0, #0x8200 \n"
 263 "    SUBNES  R1, R1, #0x36 \n"
 264 "    BNE     loc_FF099BAC \n"
 265 "    BL      sub_FF09E4E8 \n"
 266 "    BL      sub_FF09EBCC \n"
 267 "    BL      sub_FF09EA28 \n"
 268 "    B       loc_FF099BAC \n"
 269 
 270 "loc_FF099B7C:\n"
 271 "    MOV     R2, #0 \n"
 272 "    MOV     R1, #0x11 \n"
 273 "    B       loc_FF099B90 \n"
 274 
 275 "loc_FF099B88:\n"
 276 "    MOV     R2, #0 \n"
 277 "    MOV     R1, #0x10 \n"
 278 
 279 "loc_FF099B90:\n"
 280 "    MOV     R0, #0 \n"
 281 "    BL      sub_FF097828 \n"
 282 "    B       loc_FF099BAC \n"
 283 
 284 "loc_FF099B9C:\n"
 285 "    LDR     R2, =0x585 \n"
 286 "    LDR     R1, =0xFF0991F0 /*'SsShootTask.c'*/ \n"
 287 "    MOV     R0, #0 \n"
 288 "    BL      _DebugAssert \n"
 289 
 290 "loc_FF099BAC:\n"
 291 "    LDR     R0, [SP] \n"
 292 "    LDR     R1, [R0, #4] \n"
 293 "    LDR     R0, [R7, #4] \n"
 294 "    BL      sub_006B8224 /*_SetEventFlag*/ \n"
 295 "    LDR     R4, [SP] \n"
 296 "    LDR     R0, [R4, #8] \n"
 297 "    CMP     R0, #0 \n"
 298 "    LDREQ   R2, =0x12B \n"
 299 "    LDREQ   R1, =0xFF0991F0 /*'SsShootTask.c'*/ \n"
 300 "    BLEQ    _DebugAssert \n"
 301 "    STR     R6, [R4, #8] \n"
 302 "    B       loc_FF0998F8 \n"
 303 );
 304 }
 305 
 306 /*************************************************************/
 307 //** sub_FF21EFC4_my @ 0xFF21EFC4 - 0xFF21F09C, length=55
 308 void __attribute__((naked,noinline)) sub_FF21EFC4_my() {
 309 asm volatile (
 310 "    STMFD   SP!, {R3-R7,LR} \n"
 311 "    BL      sub_FF098DFC \n"
 312 "    MOV     R4, R0 \n"
 313 "    MOV     R0, #0xC \n"
 314 "    BL      sub_FF0A06A8 \n"
 315 "    LDR     R6, =0xAC08 \n"
 316 "    TST     R0, #1 \n"
 317 "    MOV     R5, #1 \n"
 318 "    BNE     loc_FF21F08C \n"
 319 "    MOV     R2, #2 \n"
 320 "    MOV     R1, SP \n"
 321 "    MOV     R0, #0x110 \n"
 322 "    BL      _GetPropertyCase \n"
 323 "    TST     R0, #1 \n"
 324 "    ADDNE   R2, R5, #0x17C \n"
 325 "    LDRNE   R1, =0xFF21F134 /*'SsCaptureCtrl.c'*/ \n"
 326 "    MOVNE   R0, #0 \n"
 327 "    BLNE    _DebugAssert \n"
 328 "    LDRSH   R0, [SP] \n"
 329 "    BL      sub_FF02AC30 \n"
 330 "    BL      sub_FF02AA4C \n"
 331 "    CMP     R0, #1 \n"
 332 "    BLS     loc_FF21F094 \n"
 333 "    MOV     R0, #0 \n"
 334 "    BL      sub_FF02ABA4 \n"
 335 "    BL      sub_FF09A1C4 \n"
 336 "    BL      sub_FF09BC74 \n"
 337 "    MOV     R1, R4 \n"
 338 "    BL      sub_FF09BCD0 \n"
 339 "    LDR     R0, =0x116 \n"
 340 "    MOV     R2, #4 \n"
 341 "    ADD     R1, R4, #0x30 \n"
 342 "    BL      _SetPropertyCase \n"
 343 "    MOV     R2, #4 \n"
 344 "    ADD     R1, R4, #0x34 \n"
 345 "    MOV     R0, #0x30 \n"
 346 "    BL      _SetPropertyCase \n"
 347 "    MOV     R2, #4 \n"
 348 "    ADD     R1, R4, #8 \n"
 349 "    MOV     R0, #0x44 \n"
 350 "    BL      _SetPropertyCase \n"
 351 "    BL      sub_FF21F8B8 \n"
 352 "    MVN     R1, #0x1000 \n"
 353 "    BL      sub_006B826C /*_ClearEventFlag*/ \n"
 354 "    MOV     R0, R4 \n"
 355 "    BL      sub_FF21E9D8 \n"
 356 "    MOV     R0, R4 \n"
 357 "    BL      sub_FF3C416C_my \n"  // --> Patched. Old value = 0xFF3C416C.
 358 "    TST     R0, #1 \n"
 359 "    BEQ     loc_FF21F090 \n"
 360 
 361 "loc_FF21F08C:\n"
 362 "    STR     R5, [R6] \n"
 363 
 364 "loc_FF21F090:\n"
 365 "    LDMFD   SP!, {R3-R7,PC} \n"
 366 
 367 "loc_FF21F094:\n"
 368 "    BL      sub_FF097534 \n"
 369 "    BL      sub_FF0A0710 \n"
 370 "    LDMFD   SP!, {R3-R7,PC} \n"
 371 );
 372 }
 373 
 374 /*************************************************************/
 375 //** sub_FF21EDC4_my @ 0xFF21EDC4 - 0xFF21EFC0, length=128
 376 void __attribute__((naked,noinline)) sub_FF21EDC4_my() {
 377 asm volatile (
 378 "    STMFD   SP!, {R3-R7,LR} \n"
 379 "    LDR     R7, =0x26894 \n"
 380 "    MOV     R5, R0 \n"
 381 "    LDR     R0, [R7, #0x28] \n"
 382 "    MOV     R4, #0 \n"
 383 "    CMP     R0, #0 \n"
 384 "    BEQ     loc_FF21EE10 \n"
 385 "    LDR     R0, =0xAC08 \n"
 386 "    MOV     R2, R5 \n"
 387 "    LDR     R0, [R0] \n"
 388 "    MOV     R1, #2 \n"
 389 "    CMP     R0, #0 \n"
 390 "    MOVNE   R4, #0x1D \n"
 391 "    MOV     R0, R4 \n"
 392 "    BL      sub_FF097828 \n"
 393 "    MOV     R1, R4 \n"
 394 "    MOV     R0, R5 \n"
 395 "    BL      sub_FF21FE28 \n"
 396 "    B       loc_FF21EFB8 \n"
 397 
 398 "loc_FF21EE10:\n"
 399 "    BL      sub_FF09BC74 \n"
 400 "    MOV     R1, R5 \n"
 401 "    BL      sub_FF09BCD0 \n"
 402 "    LDR     R0, =0x116 \n"
 403 "    MOV     R2, #4 \n"
 404 "    ADD     R1, R5, #0x30 \n"
 405 "    BL      _SetPropertyCase \n"
 406 "    MOV     R2, #4 \n"
 407 "    ADD     R1, R5, #0x34 \n"
 408 "    MOV     R0, #0x30 \n"
 409 "    BL      _SetPropertyCase \n"
 410 "    LDR     R0, [R7, #0x104] \n"
 411 "    LDR     R6, =0x26994 \n"
 412 "    CMP     R0, #0 \n"
 413 "    BNE     loc_FF21EE64 \n"
 414 "    LDRH    R0, [R6, #0x9A] \n"
 415 "    CMP     R0, #3 \n"
 416 "    LDRNE   R0, [R5, #8] \n"
 417 "    CMPNE   R0, #1 \n"
 418 "    BHI     loc_FF21EE88 \n"
 419 "    B       loc_FF21EE70 \n"
 420 
 421 "loc_FF21EE64:\n"
 422 "    LDR     R0, [R5, #0xC] \n"
 423 "    CMP     R0, #1 \n"
 424 "    BNE     loc_FF21EE88 \n"
 425 
 426 "loc_FF21EE70:\n"
 427 "    MOV     R0, #0xC \n"
 428 "    BL      sub_FF0A06A8 \n"
 429 "    TST     R0, #1 \n"
 430 "    BEQ     loc_FF21EE88 \n"
 431 "    BL      sub_FF097534 \n"
 432 "    MOV     R4, #1 \n"
 433 
 434 "loc_FF21EE88:\n"
 435 "    TST     R4, #1 \n"
 436 "    BNE     loc_FF21EF9C \n"
 437 "    LDR     R0, [R7, #0xE4] \n"
 438 "    CMP     R0, #0 \n"
 439 "    BEQ     loc_FF21EEC4 \n"
 440 "    LDRH    R0, [R6, #0x9A] \n"
 441 "    CMP     R0, #3 \n"
 442 "    LDRNE   R0, [R5, #8] \n"
 443 "    CMPNE   R0, #1 \n"
 444 "    BHI     loc_FF21EF1C \n"
 445 "    LDR     R0, [R7, #0x104] \n"
 446 "    CMP     R0, #0 \n"
 447 "    LDRNE   R0, [R5, #0xC] \n"
 448 "    CMPNE   R0, #1 \n"
 449 "    BHI     loc_FF21EF1C \n"
 450 
 451 "loc_FF21EEC4:\n"
 452 "    MOV     R2, #2 \n"
 453 "    MOV     R1, SP \n"
 454 "    MOV     R0, #0x110 \n"
 455 "    BL      _GetPropertyCase \n"
 456 "    TST     R0, #1 \n"
 457 "    MOVNE   R2, #0xCD \n"
 458 "    LDRNE   R1, =0xFF21F134 /*'SsCaptureCtrl.c'*/ \n"
 459 "    MOVNE   R0, #0 \n"
 460 "    BLNE    _DebugAssert \n"
 461 "    LDRSH   R0, [SP] \n"
 462 "    BL      sub_FF02AC30 \n"
 463 "    BL      sub_FF02AA4C \n"
 464 "    CMP     R0, #1 \n"
 465 "    BLS     loc_FF21EF08 \n"
 466 "    MOV     R0, #0 \n"
 467 "    BL      sub_FF02ABA4 \n"
 468 "    B       loc_FF21EF1C \n"
 469 
 470 "loc_FF21EF08:\n"
 471 "    BL      sub_FF097534 \n"
 472 "    BL      sub_FF0A0710 \n"
 473 "    MOV     R4, #1 \n"
 474 "    CMP     R4, #0 \n"
 475 "    BNE     loc_FF21EF9C \n"
 476 
 477 "loc_FF21EF1C:\n"
 478 "    MOV     R4, #0 \n"
 479 "    CMP     R4, #0 \n"
 480 "    BNE     loc_FF21EF9C \n"
 481 "    BL      sub_FF21F8B8 \n"
 482 "    MVN     R1, #0x1000 \n"
 483 "    BL      sub_006B826C /*_ClearEventFlag*/ \n"
 484 "    MOV     R0, R5 \n"
 485 "    BL      sub_FF3C3DF0 \n"
 486 "    TST     R0, #1 \n"
 487 "    MOV     R4, R0 \n"
 488 "    BNE     loc_FF21EF9C \n"
 489 "    BL      sub_FF09A1C4 \n"
 490 "    MOV     R0, R5 \n"
 491 "    BL      sub_FF21E9D8 \n"
 492 "    LDR     R0, [R7, #0x128] \n"
 493 "    CMP     R0, #0 \n"
 494 "    BNE     loc_FF21EF74 \n"
 495 "    LDRH    R0, [R6, #0x9A] \n"
 496 "    CMP     R0, #3 \n"
 497 "    LDRNE   R0, [R5, #8] \n"
 498 "    CMPNE   R0, #1 \n"
 499 "    BHI     loc_FF21EF7C \n"
 500 
 501 "loc_FF21EF74:\n"
 502 "    MOV     R0, #2 \n"
 503 "    BL      sub_FF0A22FC \n"
 504 
 505 "loc_FF21EF7C:\n"
 506 "    LDR     R0, [R7, #0xAC] \n"
 507 "    CMP     R0, #0 \n"
 508 "    MOV     R0, R5 \n"
 509 "    BEQ     loc_FF21EF94 \n"
 510 "    BL      sub_FF3C4614 \n"
 511 "    B       loc_FF21EFB8 \n"
 512 
 513 "loc_FF21EF94:\n"
 514 "    BL      sub_FF3C416C_my \n"  // --> Patched. Old value = 0xFF3C416C.
 515 "    B       loc_FF21EFB8 \n"
 516 
 517 "loc_FF21EF9C:\n"
 518 "    MOV     R2, R5 \n"
 519 "    MOV     R1, #2 \n"
 520 "    MOV     R0, R4 \n"
 521 "    BL      sub_FF097828 \n"
 522 "    MOV     R1, R4 \n"
 523 "    MOV     R0, R5 \n"
 524 "    BL      sub_FF22003C \n"
 525 
 526 "loc_FF21EFB8:\n"
 527 "    MOV     R0, #0 \n"
 528 "    STR     R0, [R7, #0x28] \n"
 529 "    LDMFD   SP!, {R3-R7,PC} \n"
 530 );
 531 }
 532 
 533 /*************************************************************/
 534 //** sub_FF3C416C_my @ 0xFF3C416C - 0xFF3C4498, length=204
 535 void __attribute__((naked,noinline)) sub_FF3C416C_my() {
 536 asm volatile (
 537 "    STMFD   SP!, {R1-R9,LR} \n"
 538 "    LDR     R7, =0x26894 \n"
 539 "    MOV     R4, R0 \n"
 540 "    LDR     R0, [R7, #0x164] \n"
 541 "    ADD     R5, R7, #0x100 \n"
 542 "    CMP     R0, #0 \n"
 543 "    LDRNEH  R0, [R5, #0x9A] \n"
 544 "    CMPNE   R0, #3 \n"
 545 "    LDRNE   R0, [R4, #8] \n"
 546 "    CMPNE   R0, #1 \n"
 547 "    BHI     loc_FF3C41A4 \n"
 548 "    MOV     R0, R4 \n"
 549 "    BL      sub_FF21E940 \n"
 550 "    BL      sub_FF21F71C \n"
 551 
 552 "loc_FF3C41A4:\n"
 553 "    LDR     R0, [R7, #0x190] \n"
 554 "    CMP     R0, #2 \n"
 555 "    BNE     loc_FF3C41C8 \n"
 556 "    LDRH    R0, [R5, #0x9A] \n"
 557 "    CMP     R0, #3 \n"
 558 "    LDRNE   R0, [R4, #8] \n"
 559 "    CMPNE   R0, #1 \n"
 560 "    MOVLS   R0, #4 \n"
 561 "    BLLS    sub_FF138C2C \n"
 562 
 563 "loc_FF3C41C8:\n"
 564 "    LDR     R0, =0x137 \n"
 565 "    MOV     R2, #4 \n"
 566 "    ADD     R1, SP, #8 \n"
 567 "    BL      _GetPropertyCase \n"
 568 "    TST     R0, #1 \n"
 569 "    MOVNE   R2, #0x150 \n"
 570 "    LDRNE   R1, =0xFF3C4450 /*'SsStandardCaptureSeq.c'*/ \n"
 571 "    MOVNE   R0, #0 \n"
 572 "    BLNE    _DebugAssert \n"
 573 "    LDR     R0, [SP, #8] \n"
 574 "    AND     R0, R0, #0xFF00 \n"
 575 "    CMP     R0, #0x600 \n"
 576 "    LDRNE   R0, =0xFF21E4DC \n"
 577 "    LDREQ   R0, =0xFF3C411C \n"
 578 "    MOVNE   R1, R4 \n"
 579 "    MOVEQ   R1, #0 \n"
 580 "    BL      sub_FF0E4774 \n"
 581 "    MOV     R2, #2 \n"
 582 "    ADD     R1, SP, #4 \n"
 583 "    ADD     R0, R2, #0x110 \n"
 584 "    BL      _GetPropertyCase \n"
 585 "    TST     R0, #1 \n"
 586 "    LDRNE   R2, =0x159 \n"
 587 "    LDRNE   R1, =0xFF3C4450 /*'SsStandardCaptureSeq.c'*/ \n"
 588 "    MOVNE   R0, #0 \n"
 589 "    BLNE    _DebugAssert \n"
 590 "    LDR     R0, [R7, #0x184] \n"
 591 "    CMP     R0, #0 \n"
 592 "    BLNE    sub_FF21E82C \n"
 593 "    MOV     R0, #0 \n"
 594 //"  BL      _sub_FF09D1CC \n"  // --> Nullsub call removed.
 595 "    BL      wait_until_remote_button_is_released\n" // added
 596 "    BL      capt_seq_hook_set_nr\n"                 // added
 597 "    MOV     R0, R4 \n"
 598 "    BL      sub_FF21EAFC \n"
 599 "    LDR     R1, =0x10C90 \n"
 600 "    MOV     R2, #4 \n"
 601 "    MOV     R0, #0x90 \n"
 602 "    BL      _GetPropertyCase \n"
 603 "    TST     R0, #1 \n"
 604 "    LDRNE   R2, =0x16E \n"
 605 "    LDRNE   R1, =0xFF3C4450 /*'SsStandardCaptureSeq.c'*/ \n"
 606 "    MOVNE   R0, #0 \n"
 607 "    BLNE    _DebugAssert \n"
 608 "    BL      sub_FF09D390 \n"
 609 "    BL      sub_FF08A460 \n"
 610 "    MOV     R1, #0 \n"
 611 "    MOV     R0, R4 \n"
 612 "    BL      sub_FF3C4120 \n"
 613 "    MOV     R6, R0 \n"
 614 "    LDR     R0, [SP, #8] \n"
 615 "    LDR     R8, =0x10C90 \n"
 616 "    AND     R0, R0, #0xFF00 \n"
 617 "    CMP     R0, #0x600 \n"
 618 "    LDRH    R0, [R4, #0x18] \n"
 619 "    LDRNE   R2, =0xFF21E804 \n"
 620 "    LDREQ   R2, =0xFF21E7E4 \n"
 621 "    CMP     R0, #0 \n"
 622 "    BEQ     loc_FF3C42BC \n"
 623 "    CMP     R0, #1 \n"
 624 "    BEQ     loc_FF3C42E0 \n"
 625 "    CMP     R0, #4 \n"
 626 "    BNE     loc_FF3C4354 \n"
 627 
 628 "loc_FF3C42BC:\n"
 629 "    STR     R6, [SP] \n"
 630 "    MOV     R3, R2 \n"
 631 "    LDR     R1, [R4, #0x34] \n"
 632 "    LDR     R2, [R8] \n"
 633 "    MOV     R0, R4 \n"
 634 "    BL      sub_FF21E1F0 \n"
 635 "    MOV     R5, R0 \n"
 636 "    BL      sub_FF0E09F0 \n"
 637 "    B       loc_FF3C4368 \n"
 638 
 639 "loc_FF3C42E0:\n"
 640 "    STR     R6, [SP] \n"
 641 "    MOV     R3, R2 \n"
 642 "    LDR     R1, [R4, #0x34] \n"
 643 "    LDR     R2, [R8] \n"
 644 "    MOV     R0, R4 \n"
 645 "    BL      sub_FF21E298 \n"
 646 "    MOV     R5, R0 \n"
 647 "    MOV     R1, #0 \n"
 648 "    MOV     R0, #0x45 \n"
 649 "    BL      sub_FF032E50 \n"
 650 "    TST     R5, #1 \n"
 651 "    BNE     loc_FF3C4368 \n"
 652 "    LDR     R0, =0xFF3C411C \n"
 653 "    MOV     R1, #0 \n"
 654 "    BL      sub_FF0E4774 \n"
 655 "    MOV     R1, #1 \n"
 656 "    MOV     R0, R4 \n"
 657 "    BL      sub_FF3C4120 \n"
 658 "    MOV     R6, R0 \n"
 659 "    LDR     R0, [R8] \n"
 660 "    BL      sub_FF21E8C4 \n"
 661 "    LDR     R1, [R4, #0x34] \n"
 662 "    LDR     R2, [R8] \n"
 663 "    MOV     R3, R6 \n"
 664 "    MOV     R0, R4 \n"
 665 "    BL      sub_FF21E34C \n"
 666 "    MOV     R5, R0 \n"
 667 "    BL      sub_FF21E178 \n"
 668 "    B       loc_FF3C4368 \n"
 669 
 670 "loc_FF3C4354:\n"
 671 "    LDR     R2, =0x1A7 \n"
 672 "    LDR     R1, =0xFF3C4450 /*'SsStandardCaptureSeq.c'*/ \n"
 673 "    MOV     R0, #0 \n"
 674 "    BL      _DebugAssert \n"
 675 "    MOV     R5, #0x1D \n"
 676 
 677 "loc_FF3C4368:\n"
 678 "    BL      sub_FF08A478 \n"
 679 "    LDR     R8, =0xFF3C411C \n"
 680 "    TST     R5, #1 \n"
 681 "    BNE     loc_FF3C43E8 \n"
 682 "    LDR     R0, [R7, #0x100] \n"
 683 "    CMP     R0, #0 \n"
 684 "    BNE     loc_FF3C43A0 \n"
 685 "    MOV     R0, R4 \n"
 686 "    BL      sub_FF2206AC \n"
 687 "    TST     R0, #1 \n"
 688 "    MOVNE   R2, #0x1C8 \n"
 689 "    LDRNE   R1, =0xFF3C4450 /*'SsStandardCaptureSeq.c'*/ \n"
 690 "    MOVNE   R0, #0 \n"
 691 "    BLNE    _DebugAssert \n"
 692 "    BL      capt_seq_hook_raw_here \n"         // added
 693 
 694 "loc_FF3C43A0:\n"
 695 "    MOV     R0, R4 \n"
 696 "    BL      sub_FF21EBCC \n"
 697 "    MOV     R0, R4 \n"
 698 "    BL      sub_FF21EB84 \n"
 699 "    CMP     R6, R8 \n"
 700 "    BEQ     loc_FF3C43E8 \n"
 701 "    BL      sub_FF21F8B8 \n"
 702 "    LDR     R9, =0x1D5 \n"
 703 "    LDR     R2, =0x3A98 \n"
 704 "    LDR     R3, =0xFF3C4450 /*'SsStandardCaptureSeq.c'*/ \n"
 705 "    MOV     R1, #4 \n"
 706 "    STR     R9, [SP] \n"
 707 "    BL      sub_FF0A094C \n"
 708 "    CMP     R0, #0 \n"
 709 "    MOVNE   R2, R9 \n"
 710 "    LDRNE   R1, =0xFF3C4450 /*'SsStandardCaptureSeq.c'*/ \n"
 711 "    MOVNE   R0, #0 \n"
 712 "    BLNE    _DebugAssert \n"
 713 
 714 "loc_FF3C43E8:\n"
 715 "    MOV     R2, R4 \n"
 716 "    MOV     R1, #2 \n"
 717 "    MOV     R0, R5 \n"
 718 "    BL      sub_FF097828 \n"
 719 "    LDR     R0, [R7, #0x28] \n"
 720 "    CMP     R0, #0 \n"
 721 "    BEQ     loc_FF3C441C \n"
 722 "    SUBS    R1, R6, R8 \n"
 723 "    MOVNE   R1, #1 \n"
 724 "    MOV     R2, R5 \n"
 725 "    MOV     R0, R4 \n"
 726 "    BL      sub_FF21FDC0 \n"
 727 "    B       loc_FF3C4430 \n"
 728 
 729 "loc_FF3C441C:\n"
 730 "    SUBS    R1, R6, R8 \n"
 731 "    MOVNE   R1, #1 \n"
 732 "    MOV     R2, R5 \n"
 733 "    MOV     R0, R4 \n"
 734 "    BL      sub_FF21FD54 \n"
 735 
 736 "loc_FF3C4430:\n"
 737 "    MOV     R0, R5 \n"
 738 "    LDMFD   SP!, {R1-R9,PC} \n"
 739 "    .ltorg\n"         // added
 740 );
 741 }

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