root/platform/sx260hs/sub/100b/movie_rec.c

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

DEFINITIONS

This source file includes following definitions.
  1. change_video_tables
  2. set_quality
  3. movie_record_task
  4. sub_FF1B7868_my
  5. sub_FF34D77C_my

   1 /*
   2  * movie_rec.c - auto-generated by CHDK code_gen.
   3  */
   4 #include "conf.h"
   5 
   6 void change_video_tables(int a, int b){
   7 }
   8 
   9 void  set_quality(int *x){ // -17 highest; +12 lowest
  10  if (conf.video_mode) *x=12-((conf.video_quality-1)*(12+17)/(99-1));
  11 }
  12 
  13 /*************************************************************/
  14 //** movie_record_task @ 0xFF1B82E8 - 0xFF1B8460, length=95
  15 void __attribute__((naked,noinline)) movie_record_task() {
  16 asm volatile (
  17 "    STMFD   SP!, {R2-R10,LR} \n"
  18 "    LDR     R6, =0xFF1B6F70 \n"
  19 "    LDR     R7, =0xFF1B7CDC \n"
  20 "    LDR     R4, =0xAB38 \n"
  21 "    LDR     R9, =0x69B \n"
  22 "    LDR     R10, =0x2710 \n"
  23 "    MOV     R8, #1 \n"
  24 "    MOV     R5, #0 \n"
  25 
  26 "loc_FF1B8308:\n"
  27 "    LDR     R0, [R4, #0x24] \n"
  28 "    MOV     R2, #0 \n"
  29 "    ADD     R1, SP, #4 \n"
  30 "    BL      sub_0068BBE4 /*_ReceiveMessageQueue*/ \n"
  31 "    LDR     R0, [R4, #0x2C] \n"
  32 "    CMP     R0, #0 \n"
  33 "    LDRNE   R0, [R4, #0xC] \n"
  34 "    CMPNE   R0, #2 \n"
  35 "    LDRNE   R0, [R4, #0x44] \n"
  36 "    CMPNE   R0, #6 \n"
  37 "    BNE     loc_FF1B8444 \n"
  38 "    LDR     R0, [SP, #4] \n"
  39 "    LDR     R1, [R0] \n"
  40 "    SUB     R1, R1, #2 \n"
  41 "    CMP     R1, #0xD \n"
  42 "    ADDCC   PC, PC, R1, LSL#2 \n"
  43 "    B       loc_FF1B8444 \n"
  44 "    B       loc_FF1B83E4 \n"
  45 "    B       loc_FF1B8408 \n"
  46 "    B       loc_FF1B8418 \n"
  47 "    B       loc_FF1B8420 \n"
  48 "    B       loc_FF1B8428 \n"
  49 "    B       loc_FF1B8430 \n"
  50 "    B       loc_FF1B83EC \n"
  51 "    B       loc_FF1B8438 \n"
  52 "    B       loc_FF1B83F8 \n"
  53 "    B       loc_FF1B8444 \n"
  54 "    B       loc_FF1B8440 \n"
  55 "    B       loc_FF1B83B0 \n"
  56 "    B       loc_FF1B8380 \n"
  57 
  58 "loc_FF1B8380:\n"
  59 "    STR     R5, [R4, #0x40] \n"
  60 "    STR     R5, [R4, #0x30] \n"
  61 "    STR     R5, [R4, #0x34] \n"
  62 "    STRH    R5, [R4, #6] \n"
  63 "    STR     R6, [R4, #0xD4] \n"
  64 "    STR     R7, [R4, #0xF0] \n"
  65 "    LDR     R0, [R4, #0xC] \n"
  66 "    ADD     R0, R0, #1 \n"
  67 "    STR     R0, [R4, #0xC] \n"
  68 "    MOV     R0, #6 \n"
  69 "    STR     R0, [R4, #0x44] \n"
  70 "    B       loc_FF1B83D0 \n"
  71 
  72 "loc_FF1B83B0:\n"
  73 "    STR     R5, [R4, #0x40] \n"
  74 "    STR     R5, [R4, #0x30] \n"
  75 "    STR     R6, [R4, #0xD4] \n"
  76 "    STR     R7, [R4, #0xF0] \n"
  77 "    LDR     R0, [R4, #0xC] \n"
  78 "    ADD     R0, R0, #1 \n"
  79 "    STR     R0, [R4, #0xC] \n"
  80 "    STR     R8, [R4, #0x44] \n"
  81 
  82 "loc_FF1B83D0:\n"
  83 "    LDR     R2, =0xFF1B6448 \n"
  84 "    LDR     R1, =0xD368C \n"
  85 "    LDR     R0, =0xFF1B655C \n"
  86 "    BL      sub_FF03EF7C \n"
  87 "    B       loc_FF1B8444 \n"
  88 
  89 "loc_FF1B83E4:\n"
  90 );
  91 if (conf.ext_video_time == 1)
  92 {
  93 asm volatile (
  94 "    BL      sub_FF1B7868_my \n"  // --> Patched. Old value = 0xFF1B7868.
  95 );
  96 }
  97 else
  98 {
  99 asm volatile (
 100 "    BL      sub_FF1B7868 \n"
 101 );
 102 }
 103 asm volatile (
 104 "    B       loc_FF1B8444 \n"
 105 
 106 "loc_FF1B83EC:\n"
 107 "    LDR     R1, [R4, #0xF0] \n"
 108 "    BLX     R1 \n"
 109 //begin patch
 110 "    LDR     R0, =video_compression_rate\n" //added
 111 "    BL      set_quality\n"                 //added
 112 //end patch
 113 "    B       loc_FF1B8444 \n"
 114 
 115 "loc_FF1B83F8:\n"
 116 "    LDR     R1, [R0, #0x18] \n"
 117 "    LDR     R0, [R0, #4] \n"
 118 "    BL      sub_FF34F018 \n"
 119 "    B       loc_FF1B8444 \n"
 120 
 121 "loc_FF1B8408:\n"
 122 "    LDR     R0, [R4, #0x44] \n"
 123 "    CMP     R0, #5 \n"
 124 "    STRNE   R8, [R4, #0x34] \n"
 125 "    B       loc_FF1B8444 \n"
 126 
 127 "loc_FF1B8418:\n"
 128 "    BL      sub_FF1B6BD8 \n"
 129 "    B       loc_FF1B8444 \n"
 130 
 131 "loc_FF1B8420:\n"
 132 "    BL      sub_FF1B68BC \n"
 133 "    B       loc_FF1B8444 \n"
 134 
 135 "loc_FF1B8428:\n"
 136 "    BL      sub_FF1B65C0 \n"
 137 "    B       loc_FF1B8444 \n"
 138 
 139 "loc_FF1B8430:\n"
 140 "    BL      sub_FF1B6170 \n"
 141 "    B       loc_FF1B8444 \n"
 142 
 143 "loc_FF1B8438:\n"
 144 "    BL      sub_FF1B60F0 \n"
 145 "    B       loc_FF1B8444 \n"
 146 
 147 "loc_FF1B8440:\n"
 148 "    BL      sub_FF1B8A1C \n"
 149 
 150 "loc_FF1B8444:\n"
 151 "    LDR     R1, [SP, #4] \n"
 152 "    LDR     R3, =0xFF1B5D88 /*'MovieRecorder.c'*/ \n"
 153 "    STR     R5, [R1] \n"
 154 "    STR     R9, [SP] \n"
 155 "    LDR     R0, [R4, #0x28] \n"
 156 "    MOV     R2, R10 \n"
 157 "    BL      sub_0068AF18 /*_PostMessageQueueStrictly*/ \n"
 158 "    B       loc_FF1B8308 \n"
 159 );
 160 }
 161 
 162 /*************************************************************/
 163 //** sub_FF1B7868_my @ 0xFF1B7868 - 0xFF1B7BA0, length=207
 164 void __attribute__((naked,noinline)) sub_FF1B7868_my() {
 165 asm volatile (
 166 "    STMFD   SP!, {R0-R10,LR} \n"
 167 "    LDR     R6, =0xAB38 \n"
 168 "    MOV     R0, #0 \n"
 169 "    STR     R0, [R6, #0x34] \n"
 170 "    STR     R0, [R6, #0x38] \n"
 171 "    MOV     R0, R6 \n"
 172 "    LDR     R4, [R0, #0x58] \n"
 173 "    LDRH    R1, [R6, #6] \n"
 174 "    MOV     R0, #0x3E8 \n"
 175 "    MUL     R0, R4, R0 \n"
 176 "    LDR     R8, =0xFFF00 \n"
 177 "    CMP     R1, #0 \n"
 178 "    MOV     R2, #1 \n"
 179 "    BNE     loc_FF1B78B0 \n"
 180 "    LDR     R1, [R6, #0x90] \n"
 181 "    CMP     R1, #0 \n"
 182 "    BNE     loc_FF1B78C0 \n"
 183 "    B       loc_FF1B78B8 \n"
 184 
 185 "loc_FF1B78B0:\n"
 186 "    CMP     R1, #3 \n"
 187 "    BNE     loc_FF1B78C0 \n"
 188 
 189 "loc_FF1B78B8:\n"
 190 "    STR     R2, [R6, #0x48] \n"
 191 "    B       loc_FF1B78CC \n"
 192 
 193 "loc_FF1B78C0:\n"
 194 "    MOV     R1, #0x3E8 \n"
 195 "    BL      sub_00690934 /*__divmod_unsigned_int*/ \n"
 196 "    STR     R0, [R6, #0x48] \n"
 197 
 198 "loc_FF1B78CC:\n"
 199 "    LDR     R5, =0xD36C0 \n"
 200 "    MOV     R7, #2 \n"
 201 "    LDR     R0, [R5, #8] \n"
 202 "    CMP     R0, #0 \n"
 203 "    BEQ     loc_FF1B7938 \n"
 204 "    CMP     R4, #0x18 \n"
 205 "    MOV     R0, #4 \n"
 206 "    BEQ     loc_FF1B7924 \n"
 207 "    BGT     loc_FF1B790C \n"
 208 "    CMP     R4, #0xA \n"
 209 "    CMPNE   R4, #0xF \n"
 210 "    STREQ   R7, [R5, #0x14] \n"
 211 "    BEQ     loc_FF1B7938 \n"
 212 "    CMP     R4, #0x14 \n"
 213 "    BNE     loc_FF1B792C \n"
 214 "    B       loc_FF1B7924 \n"
 215 
 216 "loc_FF1B790C:\n"
 217 "    CMP     R4, #0x19 \n"
 218 "    CMPNE   R4, #0x1E \n"
 219 "    BEQ     loc_FF1B7924 \n"
 220 "    CMP     R4, #0x3C \n"
 221 "    BNE     loc_FF1B792C \n"
 222 "    MOV     R0, #8 \n"
 223 
 224 "loc_FF1B7924:\n"
 225 "    STR     R0, [R5, #0x14] \n"
 226 "    B       loc_FF1B7938 \n"
 227 
 228 "loc_FF1B792C:\n"
 229 "    LDR     R0, =0xFF1B5D88 /*'MovieRecorder.c'*/ \n"
 230 "    MOV     R1, #0x790 \n"
 231 "    BL      _DebugAssert \n"
 232 
 233 "loc_FF1B7938:\n"
 234 "    LDR     R0, [R6, #0x64] \n"
 235 "    CMP     R0, #1 \n"
 236 "    BNE     loc_FF1B7950 \n"
 237 "    BL      sub_FF301D44 \n"
 238 "    LDR     R0, =0xD36D8 \n"
 239 "    BL      sub_FF34B18C \n"
 240 
 241 "loc_FF1B7950:\n"
 242 "    LDR     R2, =0xAB3A \n"
 243 "    LDR     R0, [R6, #0xB4] \n"
 244 "    MOV     R3, #2 \n"
 245 "    MOV     R1, #0xAA \n"
 246 "    BL      sub_FF080958 \n"
 247 "    LDR     R2, =0xAB3C \n"
 248 "    LDR     R0, [R6, #0xB4] \n"
 249 "    MOV     R3, #2 \n"
 250 "    MOV     R1, #0xA9 \n"
 251 "    BL      sub_FF080958 \n"
 252 "    LDR     R2, =0xAB88 \n"
 253 "    LDR     R0, [R6, #0xB4] \n"
 254 "    MOV     R3, #4 \n"
 255 "    MOV     R1, #0xA2 \n"
 256 "    BL      sub_FF080958 \n"
 257 "    LDR     R2, =0xAB8C \n"
 258 "    LDR     R0, [R6, #0xB4] \n"
 259 "    MOV     R3, #4 \n"
 260 "    MOV     R1, #0xA3 \n"
 261 "    BL      sub_FF080958 \n"
 262 "    LDR     R0, [R6, #0x90] \n"
 263 "    CMP     R0, #0 \n"
 264 "    LDRNE   R2, =0xAC38 \n"
 265 "    MOVNE   R1, #0 \n"
 266 "    MOVNE   R0, #0xE \n"
 267 "    BLNE    sub_FF07AC2C \n"
 268 "    LDR     R0, [R6, #0x4C] \n"
 269 "    LDR     R4, =0xAC38 \n"
 270 "    LDR     R9, =0xD36A8 \n"
 271 "    CMP     R0, #1 \n"
 272 "    CMPNE   R0, #2 \n"
 273 "    BNE     loc_FF1B7A84 \n"
 274 "    LDR     R0, [R6, #0x90] \n"
 275 "    CMP     R0, #0 \n"
 276 "    LDRNE   R0, =0x483FC000 \n"
 277 "    STRNE   R0, [R4] \n"
 278 "    BNE     loc_FF1B7A84 \n"
 279 "    LDR     R1, =0x484B4600 \n"
 280 "    LDR     R0, =0x3A57E00 \n"
 281 "    STR     R1, [R4] \n"
 282 "    STR     R0, [R4, #4] \n"
 283 "    LDMIA   R9, {R0,R2} \n"
 284 "    MUL     R0, R2, R0 \n"
 285 "    MOV     R3, R0, LSL#1 \n"
 286 "    CMP     R3, R8 \n"
 287 "    STR     R3, [R6, #0x9C] \n"
 288 "    MOVCC   R2, #0 \n"
 289 "    STR     R1, [R6, #0xA0] \n"
 290 "    BCC     loc_FF1B7A4C \n"
 291 "    MOV     R2, #0 \n"
 292 "    STMEA   SP, {R1,R2,R8} \n"
 293 "    MOV     R3, R2 \n"
 294 "    MOV     R2, #9 \n"
 295 "    MOV     R1, #5 \n"
 296 "    MOV     R0, #0x16 \n"
 297 "    BL      sub_FF2FBDA8 \n"
 298 "    LDR     R0, [R6, #0x9C] \n"
 299 "    MOV     R2, #0 \n"
 300 "    SUB     R3, R0, #0xF0000 \n"
 301 "    LDR     R0, [R6, #0xA0] \n"
 302 "    SUB     R3, R3, #0xFF00 \n"
 303 "    ADD     R1, R0, #0xF0000 \n"
 304 "    ADD     R1, R1, #0xFF00 \n"
 305 
 306 "loc_FF1B7A4C:\n"
 307 "    STMEA   SP, {R1-R3} \n"
 308 "    MOV     R3, #0 \n"
 309 "    MOV     R2, #9 \n"
 310 "    MOV     R1, #5 \n"
 311 "    MOV     R0, #0x16 \n"
 312 "    BL      sub_FF2FBDA8 \n"
 313 "    LDR     R1, [R4] \n"
 314 "    LDR     R0, [R6, #0x9C] \n"
 315 "    ADD     R1, R1, R0, LSL#1 \n"
 316 "    STR     R1, [R4] \n"
 317 "    LDR     R1, [R4, #4] \n"
 318 "    RSB     R0, R0, #0 \n"
 319 "    ADD     R0, R1, R0, LSL#1 \n"
 320 "    STR     R0, [R4, #4] \n"
 321 
 322 "loc_FF1B7A84:\n"
 323 "    LDR     R2, =0xD36C0 \n"
 324 "    LDR     R3, =0xFF1B7834 \n"
 325 "    LDR     R0, [R4, #4] \n"
 326 "    LDR     R1, [R4] \n"
 327 "    STRD    R2, [SP] \n"
 328 "    SUB     R3, R2, #0x18 \n"
 329 "    MOV     R2, R0 \n"
 330 "    LDR     R0, [R6, #0x90] \n"
 331 "    BL      sub_FF34D77C_my \n"  // --> Patched. Old value = 0xFF34D77C.
 332 "    LDRD    R0, [R6, #0xF8] \n"
 333 "    LDR     R2, [R6, #0xB4] \n"
 334 "    BL      sub_FF34DD4C \n"
 335 "    LDR     R3, =0xABC0 \n"
 336 "    STR     R3, [SP] \n"
 337 "    LDR     R0, [R6, #0x64] \n"
 338 "    LDR     R1, [R9, #8] \n"
 339 "    AND     R2, R0, #0xFF \n"
 340 "    LDR     R0, [R9] \n"
 341 "    SUB     R3, R3, #4 \n"
 342 "    BL      sub_FF34ACF4 \n"
 343 "    LDRH    R0, [R6, #6] \n"
 344 "    CMP     R0, #2 \n"
 345 "    LDREQ   R0, =0xFF1B7508 \n"
 346 "    STREQ   R0, [R6, #0xF0] \n"
 347 "    LDR     R0, [R6, #0x90] \n"
 348 "    CMP     R0, #0 \n"
 349 "    LDREQ   R1, =0xFF1B70D8 \n"
 350 "    STREQ   R1, [R6, #0xF0] \n"
 351 "    LDR     R2, [R6, #0xC] \n"
 352 "    LDR     R1, =0xFF57667C \n"
 353 "    CMP     R2, #2 \n"
 354 "    BNE     loc_FF1B7B28 \n"
 355 "    LDR     R0, [R6, #0x4C] \n"
 356 "    ADD     R0, R1, R0, LSL#3 \n"
 357 "    LDR     R1, [R9, #0xC] \n"
 358 "    LDR     R0, [R0, R1, LSL#2] \n"
 359 "    BL      sub_FF300AD8 \n"
 360 "    LDR     R0, =0xFF1B704C \n"
 361 "    MOV     R1, #0 \n"
 362 "    BL      sub_FF30105C \n"
 363 "    B       loc_FF1B7B60 \n"
 364 
 365 "loc_FF1B7B28:\n"
 366 "    CMP     R0, #0 \n"
 367 "    LDR     R0, [R6, #0x4C] \n"
 368 "    ADD     R0, R1, R0, LSL#3 \n"
 369 "    LDR     R1, [R9, #0xC] \n"
 370 "    LDR     R0, [R0, R1, LSL#2] \n"
 371 "    BNE     loc_FF1B7B50 \n"
 372 "    LDR     R1, [R6, #0x98] \n"
 373 "    BL      sub_FF30113C \n"
 374 "    BL      sub_FF3011C0 \n"
 375 "    B       loc_FF1B7B60 \n"
 376 
 377 "loc_FF1B7B50:\n"
 378 "    BL      sub_FF2FECC4 \n"
 379 "    LDR     R0, =0xFF1B704C \n"
 380 "    MOV     R1, #0 \n"
 381 "    BL      sub_FF2FF4D4 \n"
 382 
 383 "loc_FF1B7B60:\n"
 384 "    LDR     R0, [R5, #8] \n"
 385 "    CMP     R0, #0 \n"
 386 "    BEQ     loc_FF1B7B94 \n"
 387 "    ADD     R0, SP, #0xC \n"
 388 "    BL      sub_FF34ED80 \n"
 389 "    LDR     R1, [R5, #0xC] \n"
 390 "    LDR     R0, [SP, #0xC] \n"
 391 "    BL      sub_FF050DC0 \n"
 392 "    ADD     R0, SP, #0xC \n"
 393 "    BL      sub_FF34ED80 \n"
 394 "    LDR     R1, [R5, #0xC] \n"
 395 "    LDR     R0, [SP, #0xC] \n"
 396 "    BL      sub_FF050DC0 \n"
 397 
 398 "loc_FF1B7B94:\n"
 399 "    LDR     R0, =0xFF1B7004 \n"
 400 "    STR     R7, [R6, #0x44]! \n"
 401 "    STR     R0, [R6, #0x90] \n"
 402 "    LDMFD   SP!, {R0-R10,PC} \n"
 403 );
 404 }
 405 
 406 /*************************************************************/
 407 //** sub_FF34D77C_my @ 0xFF34D77C - 0xFF34DCF0, length=350
 408 void __attribute__((naked,noinline)) sub_FF34D77C_my() {
 409 asm volatile (
 410 "    STMFD   SP!, {R0-R11,LR} \n"
 411 "    MOV     R8, R0 \n"
 412 "    LDR     R0, [R3, #0x10] \n"
 413 "    SUB     SP, SP, #4 \n"
 414 "    CMP     R0, #0 \n"
 415 "    LDR     R7, [SP, #0x38] \n"
 416 "    LDREQ   R1, =0x36A \n"
 417 "    LDREQ   R0, =0xFF34B71C /*'MovWriter.c'*/ \n"
 418 "    MOV     R6, #0 \n"
 419 "    MOV     R4, R3 \n"
 420 "    MOV     R5, R6 \n"
 421 "    BLEQ    _DebugAssert \n"
 422 "    LDR     R11, =0xFE20 \n"
 423 "    CMP     R8, #0 \n"
 424 "    MOV     R10, #0 \n"
 425 "    STR     R8, [R11, #0x94] \n"
 426 "    MOVEQ   R0, #1 \n"
 427 "    STRNE   R10, [R11, #0xD8] \n"
 428 "    STREQ   R0, [R11, #0xD8] \n"
 429 "    LDR     R0, [R4] \n"
 430 "    LDR     R3, =0x61A8 \n"
 431 "    STR     R0, [R11, #0xE0] \n"
 432 "    LDR     R0, [R4, #4] \n"
 433 "    LDR     R1, =0x7530 \n"
 434 "    STR     R0, [R11, #0xE4] \n"
 435 "    LDR     R0, [R4, #0x10] \n"
 436 "    MOV     R2, #0x18 \n"
 437 "    STR     R0, [R11, #0xF0] \n"
 438 "    LDR     R8, [R4, #8] \n"
 439 "    LDR     R0, =0x3E9 \n"
 440 "    CMP     R8, #0xF \n"
 441 "    MOV     R12, #0x3E8 \n"
 442 "    MOV     R9, #0x1E \n"
 443 "    ADDCC   PC, PC, R8, LSL#2 \n"
 444 "    B       loc_FF34D8D4 \n"
 445 "    B       loc_FF34D85C \n"
 446 "    B       loc_FF34D854 \n"
 447 "    B       loc_FF34D844 \n"
 448 "    B       loc_FF34D8B0 \n"
 449 "    B       loc_FF34D8C0 \n"
 450 "    B       loc_FF34D8D4 \n"
 451 "    B       loc_FF34D8D4 \n"
 452 "    B       loc_FF34D8D4 \n"
 453 "    B       loc_FF34D8D4 \n"
 454 "    B       loc_FF34D87C \n"
 455 "    B       loc_FF34D874 \n"
 456 "    B       loc_FF34D86C \n"
 457 "    B       loc_FF34D8A8 \n"
 458 "    B       loc_FF34D8A0 \n"
 459 "    B       loc_FF34D88C \n"
 460 
 461 "loc_FF34D844:\n"
 462 "    LDR     R5, =0x5DC0 \n"
 463 "    STR     R2, [R11, #0xE8] \n"
 464 "    STR     R5, [R11, #0x13C] \n"
 465 "    B       loc_FF34D864 \n"
 466 
 467 "loc_FF34D854:\n"
 468 "    MOV     R5, R3 \n"
 469 "    B       loc_FF34D890 \n"
 470 
 471 "loc_FF34D85C:\n"
 472 "    MOV     R5, R1 \n"
 473 "    B       loc_FF34D880 \n"
 474 
 475 "loc_FF34D864:\n"
 476 "    STR     R0, [R11, #0x140] \n"
 477 "    B       loc_FF34D8E0 \n"
 478 
 479 "loc_FF34D86C:\n"
 480 "    LDR     R5, =0x5DC \n"
 481 "    B       loc_FF34D880 \n"
 482 
 483 "loc_FF34D874:\n"
 484 "    LDR     R5, =0xBB8 \n"
 485 "    B       loc_FF34D880 \n"
 486 
 487 "loc_FF34D87C:\n"
 488 "    LDR     R5, =0x1770 \n"
 489 
 490 "loc_FF34D880:\n"
 491 "    STR     R1, [R11, #0x13C] \n"
 492 "    STR     R9, [R11, #0xE8] \n"
 493 "    B       loc_FF34D864 \n"
 494 
 495 "loc_FF34D88C:\n"
 496 "    LDR     R5, =0x4E2 \n"
 497 
 498 "loc_FF34D890:\n"
 499 "    STR     R2, [R11, #0xE8] \n"
 500 "    STR     R3, [R11, #0x13C] \n"
 501 "    STR     R12, [R11, #0x140] \n"
 502 "    B       loc_FF34D8E0 \n"
 503 
 504 "loc_FF34D8A0:\n"
 505 "    LDR     R5, =0x9C4 \n"
 506 "    B       loc_FF34D890 \n"
 507 
 508 "loc_FF34D8A8:\n"
 509 "    LDR     R5, =0x1388 \n"
 510 "    B       loc_FF34D890 \n"
 511 
 512 "loc_FF34D8B0:\n"
 513 "    STR     R1, [R11, #0x13C] \n"
 514 "    LDR     R5, =0x57600000 \n"  // --> Patched. Old value = 0x3A980. 2hrs 240fps
 515 "    MOV     R1, #0xF0 \n"
 516 "    B       loc_FF34D8CC \n"
 517 
 518 "loc_FF34D8C0:\n"
 519 "    LDR     R5, =0x28800000 \n"  // --> Patched. Old value = 0x1D4C0. 2hrs 120fps
 520 "    STR     R1, [R11, #0x13C] \n"
 521 "    MOV     R1, #0x78 \n"
 522 
 523 "loc_FF34D8CC:\n"
 524 "    STR     R1, [R11, #0xE8] \n"
 525 "    B       loc_FF34D864 \n"
 526 
 527 "loc_FF34D8D4:\n"
 528 "    LDR     R0, =0xFF34B71C /*'MovWriter.c'*/ \n"
 529 "    MOV     R1, #0x3C4 \n"
 530 "    BL      _DebugAssert \n"
 531 
 532 "loc_FF34D8E0:\n"
 533 "    LDR     R0, [R11, #0xE8] \n"
 534 "    LDR     R1, =0x1C20 \n"  // --> Patched. Old value = 0xE0F. 2hrs
 535 "    MOV     R0, R0, LSR#1 \n"
 536 "    STR     R0, [R11, #0xEC] \n"
 537 "    LDR     R0, [R7] \n"
 538 "    STR     R0, [R11, #0xF4] \n"
 539 "    LDRH    R0, [R7, #0x10] \n"
 540 "    STR     R0, [R11, #0xF8] \n"
 541 "    LDR     R0, [R7, #4] \n"
 542 "    STRH    R0, [R11, #2] \n"
 543 "    LDR     R0, [R7, #8] \n"
 544 "    STRH    R0, [R11, #4] \n"
 545 "    LDR     R0, [R7, #0x14] \n"
 546 "    STR     R0, [R11, #0xFC] \n"
 547 "    LDR     R0, [SP, #0x3C] \n"
 548 "    STR     R0, [R11, #0x138] \n"
 549 "    LDR     R0, [R11, #0xE0] \n"
 550 "    CMP     R0, #0x140 \n"
 551 "    MOVEQ   R0, #0x20000 \n"
 552 "    MOVEQ   R6, #1 \n"
 553 "    STREQ   R0, [R11, #0xB8] \n"
 554 "    BEQ     loc_FF34D978 \n"
 555 "    CMP     R0, #0x280 \n"
 556 "    LDREQ   R0, =0x7A760 \n"
 557 "    MOVEQ   R6, #2 \n"
 558 "    STREQ   R0, [R11, #0xB8] \n"
 559 "    BEQ     loc_FF34D978 \n"
 560 "    CMP     R0, #0x500 \n"
 561 "    LDREQ   R0, =0x11DA50 \n"
 562 "    LDR     R1, =0x1C20 \n"  // --> Patched. Old value = 0x707. 2hrs
 563 "    MOVEQ   R6, #4 \n"
 564 "    STREQ   R0, [R11, #0xB8] \n"
 565 "    BEQ     loc_FF34D978 \n"
 566 "    CMP     R0, #0x780 \n"
 567 "    BNE     loc_FF34D980 \n"
 568 //"  MOV     R0, #0x200000 \n"
 569 "    MOV     R0, #2097152 \n" // 10 mins
 570 "    MOV     R6, #5 \n"
 571 "    STR     R0, [R11, #0xB8] \n"
 572 
 573 "loc_FF34D978:\n"
 574 "    STR     R1, [R11, #0x54] \n"
 575 "    B       loc_FF34D98C \n"
 576 
 577 "loc_FF34D980:\n"
 578 "    LDR     R0, =0xFF34B71C /*'MovWriter.c'*/ \n"
 579 "    MOV     R1, #0x3EC \n"
 580 "    BL      _DebugAssert \n"
 581 
 582 "loc_FF34D98C:\n"
 583 "    LDR     R8, [R4, #8] \n"
 584 "    CMP     R8, #0xB \n"
 585 "    CMPNE   R8, #0xA \n"
 586 "    CMPNE   R8, #9 \n"
 587 "    BNE     loc_FF34D9C0 \n"
 588 "    LDR     R0, [R11, #0xE0] \n"
 589 "    CMP     R0, #0x500 \n"
 590 "    BNE     loc_FF34D9C0 \n"
 591 "    LDR     R0, [R11, #0x54] \n"
 592 "    LDR     R1, [R11, #0x140] \n"
 593 "    MUL     R0, R5, R0 \n"
 594 "    BL      sub_00690934 /*__divmod_unsigned_int*/ \n"
 595 "    B       loc_FF34D9E0 \n"
 596 
 597 "loc_FF34D9C0:\n"
 598 "    LDR     R0, [R11, #0x54] \n"
 599 "    LDR     R1, [R11, #0x140] \n"
 600 "    MUL     R0, R5, R0 \n"
 601 "    BL      sub_00690934 /*__divmod_unsigned_int*/ \n"
 602 "    MOV     R1, #5 \n"
 603 "    BL      sub_00690934 /*__divmod_unsigned_int*/ \n"
 604 "    ADD     R0, R0, #1 \n"
 605 "    ADD     R0, R0, R0, LSL#2 \n"
 606 
 607 "loc_FF34D9E0:\n"
 608 "    CMP     R8, #0xB \n"
 609 "    CMPNE   R8, #0xA \n"
 610 "    CMPNE   R8, #9 \n"
 611 "    STR     R0, [R11, #0x50] \n"
 612 "    BNE     loc_FF34DA08 \n"
 613 "    LDR     R1, [R11, #0x140] \n"
 614 "    MUL     R0, R1, R0 \n"
 615 "    MOV     R1, R5 \n"
 616 "    BL      sub_00690934 /*__divmod_unsigned_int*/ \n"
 617 "    STR     R0, [R11, #0x54] \n"
 618 
 619 "loc_FF34DA08:\n"
 620 "    CMP     R8, #3 \n"
 621 "    CMPNE   R8, #4 \n"
 622 "    BNE     loc_FF34DA40 \n"
 623 "    RSB     R0, R5, R5, LSL#4 \n"
 624 "    STR     R9, [R11, #0x54] \n"
 625 "    LDR     R1, [R11, #0x140] \n"
 626 "    MOV     R0, R0, LSL#1 \n"
 627 "    BL      sub_00690934 /*__divmod_unsigned_int*/ \n"
 628 "    LDR     R1, [R11, #0xF0] \n"
 629 "    MOV     R9, R1 \n"
 630 "    BL      sub_00690934 /*__divmod_unsigned_int*/ \n"
 631 "    ADD     R0, R0, #1 \n"
 632 "    MUL     R0, R9, R0 \n"
 633 "    STR     R0, [R11, #0x50] \n"
 634 
 635 "loc_FF34DA40:\n"
 636 "    ADD     R0, R5, R5, LSL#8 \n"
 637 "    LDR     R1, [R11, #0x140] \n"
 638 "    RSB     R0, R0, R0, LSL#3 \n"
 639 "    BL      sub_00690934 /*__divmod_unsigned_int*/ \n"
 640 "    STR     R0, [R11, #0x80] \n"
 641 "    LDR     R0, [R4, #0xC] \n"
 642 "    CMP     R0, #0 \n"
 643 "    MOVNE   R0, #1 \n"
 644 "    STR     R0, [SP] \n"
 645 "    LDR     R5, [R7, #0xC] \n"
 646 "    MOV     R0, R5, LSR#1 \n"
 647 "    STR     R5, [R11, #0xA0] \n"
 648 "    STR     R0, [R11, #0xA4] \n"
 649 "    LDR     R0, [SP, #8] \n"
 650 "    ADD     R0, R0, #3 \n"
 651 "    BIC     R1, R0, #3 \n"
 652 "    STR     R1, [R11, #0x104] \n"
 653 "    LDR     R0, [R11, #0x50] \n"
 654 "    MOV     R0, R0, LSL#2 \n"
 655 "    ADD     R1, R1, R0 \n"
 656 "    STR     R1, [R11, #0x108] \n"
 657 "    LDRH    R7, [R11, #4] \n"
 658 "    LDR     R2, [SP, #0xC] \n"
 659 "    LDR     R3, [SP, #8] \n"
 660 "    CMP     R7, #0 \n"
 661 "    ADD     R9, R3, R2 \n"
 662 "    BEQ     loc_FF34DCA8 \n"
 663 "    ADD     R8, R1, R0 \n"
 664 "    STR     R8, [R11, #0x10C] \n"
 665 "    LDR     R1, [R11, #0xEC] \n"
 666 "    BL      sub_00690934 /*__divmod_unsigned_int*/ \n"
 667 "    ADD     R0, R0, R8 \n"
 668 "    ADD     R0, R0, #0x1F \n"
 669 "    BIC     R0, R0, #0x1F \n"
 670 "    STR     R0, [R11, #0x110] \n"
 671 "    LDR     R1, [R11, #0xD8] \n"
 672 "    CMP     R1, #0 \n"
 673 "    STREQ   R10, [R11, #0x84] \n"
 674 "    LDREQ   R2, [R11, #0xB8] \n"
 675 "    ADDEQ   R0, R0, R2 \n"
 676 "    STREQ   R0, [R11, #0x114] \n"
 677 "    MOVEQ   R0, #2 \n"
 678 "    STREQ   R0, [R11, #0x40] \n"
 679 "    BEQ     loc_FF34DB7C \n"
 680 "    LDR     R2, [R11, #0xB8] \n"
 681 "    CMP     R7, #1 \n"
 682 "    ADD     R0, R0, R2 \n"
 683 "    STR     R0, [R11, #0x84] \n"
 684 "    ADD     R0, R0, #0x100000 \n"
 685 "    MOV     R2, #5 \n"
 686 "    B       loc_FF34DB64 \n"
 687 
 688 "loc_FF34DB64:\n"
 689 "    STR     R0, [R11, #0x114] \n"
 690 "    STR     R2, [R11, #0x40] \n"
 691 "    ADDEQ   R2, R5, R5, LSL#1 \n"
 692 "    SUBEQ   R0, R9, R0 \n"
 693 "    MOVEQ   R2, R2, LSL#1 \n"
 694 "    BEQ     loc_FF34DB8C \n"
 695 
 696 "loc_FF34DB7C:\n"
 697 "    LDR     R2, [R11, #0x40] \n"
 698 "    LDR     R0, [R11, #0x114] \n"
 699 "    MUL     R2, R5, R2 \n"
 700 "    SUB     R0, R9, R0 \n"
 701 
 702 "loc_FF34DB8C:\n"
 703 "    SUB     R0, R0, R2 \n"
 704 "    MOV     R0, R0, LSR#15 \n"
 705 "    MOV     R0, R0, LSL#15 \n"
 706 "    STR     R0, [R11, #0x120] \n"
 707 "    LDR     R2, [R11, #0x114] \n"
 708 "    CMP     R1, #0 \n"
 709 "    ADD     R0, R0, R2 \n"
 710 "    STR     R0, [R11, #0x118] \n"
 711 "    BEQ     loc_FF34DBC0 \n"
 712 "    CMP     R7, #1 \n"
 713 "    BICEQ   R0, R0, #3 \n"
 714 "    STREQ   R0, [R11, #0x28] \n"
 715 "    ADDEQ   R0, R0, R5 \n"
 716 
 717 "loc_FF34DBC0:\n"
 718 "    STR     R0, [R11, #0x11C] \n"
 719 "    LDR     R10, =0x170BB4 \n"
 720 "    LDR     R8, [R11, #0x40] \n"
 721 "    LDR     R9, [R11, #0x11C] \n"
 722 "    MOV     R0, #0 \n"
 723 "    SUB     LR, R10, #0x28 \n"
 724 
 725 "loc_FF34DBD8:\n"
 726 "    CMP     R0, R8 \n"
 727 "    MLACC   R1, R0, R5, R9 \n"
 728 "    LDR     R3, =0x170B64 \n"
 729 "    ADDCC   R1, R1, #3 \n"
 730 "    MOVCS   R1, #0 \n"
 731 "    BICCC   R1, R1, #3 \n"
 732 "    STR     R1, [R10, R0, LSL#2] \n"
 733 "    MOV     R1, #0 \n"
 734 "    ADD     R3, R3, R0, LSL#3 \n"
 735 "    ADD     R12, LR, R0, LSL#3 \n"
 736 
 737 "loc_FF34DC00:\n"
 738 "    STR     R2, [R3, R1, LSL#2] \n"
 739 "    STR     R2, [R12, R1, LSL#2] \n"
 740 "    ADD     R1, R1, #1 \n"
 741 "    CMP     R1, #2 \n"
 742 "    BLT     loc_FF34DC00 \n"
 743 "    ADD     R0, R0, #1 \n"
 744 "    CMP     R0, #5 \n"
 745 "    BLT     loc_FF34DBD8 \n"
 746 "    CMP     R7, #1 \n"
 747 "    MOVNE   R0, #0 \n"
 748 "    STRNE   R0, [R11, #0xDC] \n"
 749 "    BNE     loc_FF34DC80 \n"
 750 "    LDRH    R0, [R11, #2] \n"
 751 "    CMP     R0, #0x10 \n"
 752 "    LDRNE   R1, =0x48D \n"
 753 "    LDRNE   R0, =0xFF34B71C /*'MovWriter.c'*/ \n"
 754 "    BLNE    _DebugAssert \n"
 755 "    MOV     R0, #1 \n"
 756 "    STR     R0, [R11, #0xDC] \n"
 757 "    LDRH    R0, [R11, #4] \n"
 758 "    MVN     R1, #0x10000 \n"
 759 "    AND     R0, R1, R0, LSL#1 \n"
 760 "    STRH    R0, [R11, #4] \n"
 761 "    LDR     R0, [R11, #0xF8] \n"
 762 "    MOV     R0, R0, LSL#1 \n"
 763 "    STR     R0, [R11, #0xF8] \n"
 764 "    LDR     R0, [R11, #0xA0] \n"
 765 "    MOV     R0, R0, LSL#1 \n"
 766 "    STR     R0, [R11, #0xA0] \n"
 767 "    LDR     R0, [R11, #0xA4] \n"
 768 "    MOV     R0, R0, LSL#1 \n"
 769 "    STR     R0, [R11, #0xA4] \n"
 770 
 771 "loc_FF34DC80:\n"
 772 "    LDRH    R3, [R4, #0x14] \n"
 773 "    LDR     R2, [R4, #8] \n"
 774 "    LDR     R1, [SP] \n"
 775 "    MOV     R0, R6 \n"
 776 "    BL      sub_FF0D34D8 \n"
 777 "    LDR     R1, [R11, #0xA0] \n"
 778 "    ADD     R0, R0, R1 \n"
 779 
 780 "loc_FF34DC9C:\n"
 781 "    STR     R0, [R11, #0x98] \n"
 782 "    ADD     SP, SP, #0x14 \n"
 783 "    LDMFD   SP!, {R4-R11,PC} \n"
 784 
 785 "loc_FF34DCA8:\n"
 786 "    ADD     R0, R0, R1 \n"
 787 "    ADD     R0, R0, #0x1F \n"
 788 "    BIC     R0, R0, #0x1F \n"
 789 "    STR     R0, [R11, #0x110] \n"
 790 "    LDR     R1, [R11, #0xB8] \n"
 791 "    MOV     R2, R8 \n"
 792 "    ADD     R0, R0, R1 \n"
 793 "    SUB     R1, R9, R0 \n"
 794 "    MOV     R1, R1, LSR#15 \n"
 795 "    MOV     R1, R1, LSL#15 \n"
 796 "    STR     R0, [R11, #0x114] \n"
 797 "    ADD     R0, R0, R1 \n"
 798 "    STR     R1, [R11, #0x120] \n"
 799 "    STR     R0, [R11, #0x118] \n"
 800 "    LDRH    R3, [R4, #0x14] \n"
 801 "    LDR     R1, [SP] \n"
 802 "    MOV     R0, R6 \n"
 803 "    BL      sub_FF0D34D8 \n"
 804 "    B       loc_FF34DC9C \n"
 805 );
 806 }

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