root/platform/ixus125_elph110hs/sub/100e/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_FF1932CC_my
  5. sub_FF317390_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 @ 0xFF193D4C - 0xFF193EC4, length=95
  15 void __attribute__((naked,noinline)) movie_record_task() {
  16 asm volatile (
  17 "    STMFD   SP!, {R2-R10,LR} \n"
  18 "    LDR     R6, =0xFF1929D4 \n"
  19 "    LDR     R7, =0xFF193740 \n"
  20 "    LDR     R4, =0xA180 \n"
  21 "    LDR     R9, =0x69B \n"
  22 "    LDR     R10, =0x2710 \n"
  23 "    MOV     R8, #1 \n"
  24 "    MOV     R5, #0 \n"
  25 
  26 "loc_FF193D6C:\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_FF193EA8 \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_FF193EA8 \n"
  44 "    B       loc_FF193E48 \n"
  45 "    B       loc_FF193E6C \n"
  46 "    B       loc_FF193E7C \n"
  47 "    B       loc_FF193E84 \n"
  48 "    B       loc_FF193E8C \n"
  49 "    B       loc_FF193E94 \n"
  50 "    B       loc_FF193E50 \n"
  51 "    B       loc_FF193E9C \n"
  52 "    B       loc_FF193E5C \n"
  53 "    B       loc_FF193EA8 \n"
  54 "    B       loc_FF193EA4 \n"
  55 "    B       loc_FF193E14 \n"
  56 "    B       loc_FF193DE4 \n"
  57 
  58 "loc_FF193DE4:\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_FF193E34 \n"
  71 
  72 "loc_FF193E14:\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_FF193E34:\n"
  83 "    LDR     R2, =0xFF191EAC \n"
  84 "    LDR     R1, =0xBE25C \n"
  85 "    LDR     R0, =0xFF191FC0 \n"
  86 "    BL      sub_FF03C868 \n"
  87 "    B       loc_FF193EA8 \n"
  88 
  89 "loc_FF193E48:\n"
  90 );
  91 if (conf.ext_video_time == 1)
  92 {
  93 asm volatile (
  94 "    BL      sub_FF1932CC_my \n"  // --> Patched. Old value = 0xFF1932CC.
  95 );
  96 }
  97 else
  98 {
  99 asm volatile (
 100 "    BL      sub_FF1932CC \n"
 101 );
 102 }
 103 asm volatile (
 104 "    B       loc_FF193EA8 \n"
 105 
 106 "loc_FF193E50:\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_FF193EA8 \n"
 114 
 115 "loc_FF193E5C:\n"
 116 "    LDR     R1, [R0, #0x18] \n"
 117 "    LDR     R0, [R0, #4] \n"
 118 "    BL      sub_FF318C3C \n"
 119 "    B       loc_FF193EA8 \n"
 120 
 121 "loc_FF193E6C:\n"
 122 "    LDR     R0, [R4, #0x44] \n"
 123 "    CMP     R0, #5 \n"
 124 "    STRNE   R8, [R4, #0x34] \n"
 125 "    B       loc_FF193EA8 \n"
 126 
 127 "loc_FF193E7C:\n"
 128 "    BL      sub_FF19263C \n"
 129 "    B       loc_FF193EA8 \n"
 130 
 131 "loc_FF193E84:\n"
 132 "    BL      sub_FF192320 \n"
 133 "    B       loc_FF193EA8 \n"
 134 
 135 "loc_FF193E8C:\n"
 136 "    BL      sub_FF192024 \n"
 137 "    B       loc_FF193EA8 \n"
 138 
 139 "loc_FF193E94:\n"
 140 "    BL      sub_FF191BD4 \n"
 141 "    B       loc_FF193EA8 \n"
 142 
 143 "loc_FF193E9C:\n"
 144 "    BL      sub_FF191B54 \n"
 145 "    B       loc_FF193EA8 \n"
 146 
 147 "loc_FF193EA4:\n"
 148 "    BL      sub_FF194480 \n"
 149 
 150 "loc_FF193EA8:\n"
 151 "    LDR     R1, [SP, #4] \n"
 152 "    LDR     R3, =0xFF1917EC /*'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_FF193D6C \n"
 159 );
 160 }
 161 
 162 /*************************************************************/
 163 //** sub_FF1932CC_my @ 0xFF1932CC - 0xFF193604, length=207
 164 void __attribute__((naked,noinline)) sub_FF1932CC_my() {
 165 asm volatile (
 166 "    STMFD   SP!, {R0-R10,LR} \n"
 167 "    LDR     R6, =0xA180 \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_FF193314 \n"
 180 "    LDR     R1, [R6, #0x90] \n"
 181 "    CMP     R1, #0 \n"
 182 "    BNE     loc_FF193324 \n"
 183 "    B       loc_FF19331C \n"
 184 
 185 "loc_FF193314:\n"
 186 "    CMP     R1, #3 \n"
 187 "    BNE     loc_FF193324 \n"
 188 
 189 "loc_FF19331C:\n"
 190 "    STR     R2, [R6, #0x48] \n"
 191 "    B       loc_FF193330 \n"
 192 
 193 "loc_FF193324:\n"
 194 "    MOV     R1, #0x3E8 \n"
 195 "    BL      sub_00690934 /*__divmod_unsigned_int*/ \n"
 196 "    STR     R0, [R6, #0x48] \n"
 197 
 198 "loc_FF193330:\n"
 199 "    LDR     R5, =0xBE290 \n"
 200 "    MOV     R7, #2 \n"
 201 "    LDR     R0, [R5, #8] \n"
 202 "    CMP     R0, #0 \n"
 203 "    BEQ     loc_FF19339C \n"
 204 "    CMP     R4, #0x18 \n"
 205 "    MOV     R0, #4 \n"
 206 "    BEQ     loc_FF193388 \n"
 207 "    BGT     loc_FF193370 \n"
 208 "    CMP     R4, #0xA \n"
 209 "    CMPNE   R4, #0xF \n"
 210 "    STREQ   R7, [R5, #0x14] \n"
 211 "    BEQ     loc_FF19339C \n"
 212 "    CMP     R4, #0x14 \n"
 213 "    BNE     loc_FF193390 \n"
 214 "    B       loc_FF193388 \n"
 215 
 216 "loc_FF193370:\n"
 217 "    CMP     R4, #0x19 \n"
 218 "    CMPNE   R4, #0x1E \n"
 219 "    BEQ     loc_FF193388 \n"
 220 "    CMP     R4, #0x3C \n"
 221 "    BNE     loc_FF193390 \n"
 222 "    MOV     R0, #8 \n"
 223 
 224 "loc_FF193388:\n"
 225 "    STR     R0, [R5, #0x14] \n"
 226 "    B       loc_FF19339C \n"
 227 
 228 "loc_FF193390:\n"
 229 "    LDR     R0, =0xFF1917EC /*'MovieRecorder.c'*/ \n"
 230 "    MOV     R1, #0x790 \n"
 231 "    BL      _DebugAssert \n"
 232 
 233 "loc_FF19339C:\n"
 234 "    LDR     R0, [R6, #0x64] \n"
 235 "    CMP     R0, #1 \n"
 236 "    BNE     loc_FF1933B4 \n"
 237 "    BL      sub_FF2D0DA8 \n"
 238 "    LDR     R0, =0xBE2A8 \n"
 239 "    BL      sub_FF31508C \n"
 240 
 241 "loc_FF1933B4:\n"
 242 "    LDR     R2, =0xA182 \n"
 243 "    LDR     R0, [R6, #0xB4] \n"
 244 "    MOV     R3, #2 \n"
 245 "    MOV     R1, #0xAA \n"
 246 "    BL      sub_FF07B7B0 \n"
 247 "    LDR     R2, =0xA184 \n"
 248 "    LDR     R0, [R6, #0xB4] \n"
 249 "    MOV     R3, #2 \n"
 250 "    MOV     R1, #0xA9 \n"
 251 "    BL      sub_FF07B7B0 \n"
 252 "    LDR     R2, =0xA1D0 \n"
 253 "    LDR     R0, [R6, #0xB4] \n"
 254 "    MOV     R3, #4 \n"
 255 "    MOV     R1, #0xA2 \n"
 256 "    BL      sub_FF07B7B0 \n"
 257 "    LDR     R2, =0xA1D4 \n"
 258 "    LDR     R0, [R6, #0xB4] \n"
 259 "    MOV     R3, #4 \n"
 260 "    MOV     R1, #0xA3 \n"
 261 "    BL      sub_FF07B7B0 \n"
 262 "    LDR     R0, [R6, #0x90] \n"
 263 "    CMP     R0, #0 \n"
 264 "    LDRNE   R2, =0xA280 \n"
 265 "    MOVNE   R1, #0 \n"
 266 "    MOVNE   R0, #0xE \n"
 267 "    BLNE    sub_FF075B30 \n"
 268 "    LDR     R0, [R6, #0x4C] \n"
 269 "    LDR     R4, =0xA280 \n"
 270 "    LDR     R9, =0xBE278 \n"
 271 "    CMP     R0, #1 \n"
 272 "    CMPNE   R0, #2 \n"
 273 "    BNE     loc_FF1934E8 \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_FF1934E8 \n"
 279 "    LDR     R1, =0x499EBCAC \n"
 280 "    LDR     R0, =0x2520754 \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_FF1934B0 \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_FF2CAE0C \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_FF1934B0:\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_FF2CAE0C \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_FF1934E8:\n"
 323 "    LDR     R2, =0xBE290 \n"
 324 "    LDR     R3, =0xFF193298 \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_FF317390_my \n"  // --> Patched. Old value = 0xFF317390.
 332 "    LDRD    R0, [R6, #0xF8] \n"
 333 "    LDR     R2, [R6, #0xB4] \n"
 334 "    BL      sub_FF31796C \n"
 335 "    LDR     R3, =0xA208 \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_FF314BF4 \n"
 343 "    LDRH    R0, [R6, #6] \n"
 344 "    CMP     R0, #2 \n"
 345 "    LDREQ   R0, =0xFF192F6C \n"
 346 "    STREQ   R0, [R6, #0xF0] \n"
 347 "    LDR     R0, [R6, #0x90] \n"
 348 "    CMP     R0, #0 \n"
 349 "    LDREQ   R1, =0xFF192B3C \n"
 350 "    STREQ   R1, [R6, #0xF0] \n"
 351 "    LDR     R2, [R6, #0xC] \n"
 352 "    LDR     R1, =0xFF466C74 \n"
 353 "    CMP     R2, #2 \n"
 354 "    BNE     loc_FF19358C \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_FF2CFB3C \n"
 360 "    LDR     R0, =0xFF192AB0 \n"
 361 "    MOV     R1, #0 \n"
 362 "    BL      sub_FF2D00C0 \n"
 363 "    B       loc_FF1935C4 \n"
 364 
 365 "loc_FF19358C:\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_FF1935B4 \n"
 372 "    LDR     R1, [R6, #0x98] \n"
 373 "    BL      sub_FF2D01A0 \n"
 374 "    BL      sub_FF2D0224 \n"
 375 "    B       loc_FF1935C4 \n"
 376 
 377 "loc_FF1935B4:\n"
 378 "    BL      sub_FF2CDD28 \n"
 379 "    LDR     R0, =0xFF192AB0 \n"
 380 "    MOV     R1, #0 \n"
 381 "    BL      sub_FF2CE538 \n"
 382 
 383 "loc_FF1935C4:\n"
 384 "    LDR     R0, [R5, #8] \n"
 385 "    CMP     R0, #0 \n"
 386 "    BEQ     loc_FF1935F8 \n"
 387 "    ADD     R0, SP, #0xC \n"
 388 "    BL      sub_FF3189A4 \n"
 389 "    LDR     R1, [R5, #0xC] \n"
 390 "    LDR     R0, [SP, #0xC] \n"
 391 "    BL      sub_FF04C404 \n"
 392 "    ADD     R0, SP, #0xC \n"
 393 "    BL      sub_FF3189A4 \n"
 394 "    LDR     R1, [R5, #0xC] \n"
 395 "    LDR     R0, [SP, #0xC] \n"
 396 "    BL      sub_FF04C404 \n"
 397 
 398 "loc_FF1935F8:\n"
 399 "    LDR     R0, =0xFF192A68 \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_FF317390_my @ 0xFF317390 - 0xFF317910, length=353
 408 void __attribute__((naked,noinline)) sub_FF317390_my() {
 409 asm volatile (
 410 "    STMFD   SP!, {R0-R11,LR} \n"
 411 "    MOV     R9, R0 \n"
 412 "    LDR     R0, [R3, #0x10] \n"
 413 "    SUB     SP, SP, #0xC \n"
 414 "    CMP     R0, #0 \n"
 415 "    LDR     R7, [SP, #0x40] \n"
 416 "    LDREQ   R1, =0x36A \n"
 417 "    LDREQ   R0, =0xFF315680 /*'MovWriter.c'*/ \n"
 418 "    MOV     R6, #0 \n"
 419 "    MOV     R4, R3 \n"
 420 "    MOV     R5, R6 \n"
 421 "    BLEQ    _DebugAssert \n"
 422 "    LDR     R8, =0xF220 \n"
 423 "    CMP     R9, #0 \n"
 424 "    MOV     R11, #0 \n"
 425 "    STR     R9, [R8, #0x94] \n"
 426 "    MOVEQ   R0, #1 \n"
 427 "    STRNE   R11, [R8, #0xD8] \n"
 428 "    STREQ   R0, [R8, #0xD8] \n"
 429 "    LDR     R0, [R4] \n"
 430 "    LDR     R3, =0x61A8 \n"
 431 "    STR     R0, [R8, #0xE0] \n"
 432 "    LDR     R0, [R4, #4] \n"
 433 "    LDR     R1, =0x7530 \n"
 434 "    STR     R0, [R8, #0xE4] \n"
 435 "    LDR     R0, [R4, #0x10] \n"
 436 "    MOV     R2, #0x18 \n"
 437 "    STR     R0, [R8, #0xF0] \n"
 438 "    LDR     R9, [R4, #8] \n"
 439 "    LDR     R0, =0x3E9 \n"
 440 "    CMP     R9, #0xF \n"
 441 "    MOV     R12, #0x3E8 \n"
 442 "    MOV     R10, #0x1E \n"
 443 "    ADDCC   PC, PC, R9, LSL#2 \n"
 444 "    B       loc_FF3174E8 \n"
 445 "    B       loc_FF317470 \n"
 446 "    B       loc_FF317468 \n"
 447 "    B       loc_FF317458 \n"
 448 "    B       loc_FF3174C4 \n"
 449 "    B       loc_FF3174D4 \n"
 450 "    B       loc_FF3174E8 \n"
 451 "    B       loc_FF3174E8 \n"
 452 "    B       loc_FF3174E8 \n"
 453 "    B       loc_FF3174E8 \n"
 454 "    B       loc_FF317490 \n"
 455 "    B       loc_FF317488 \n"
 456 "    B       loc_FF317480 \n"
 457 "    B       loc_FF3174BC \n"
 458 "    B       loc_FF3174B4 \n"
 459 "    B       loc_FF3174A0 \n"
 460 
 461 "loc_FF317458:\n"
 462 "    LDR     R5, =0x5DC0 \n"
 463 "    STR     R2, [R8, #0xE8] \n"
 464 "    STR     R5, [R8, #0x13C] \n"
 465 "    B       loc_FF317478 \n"
 466 
 467 "loc_FF317468:\n"
 468 "    MOV     R5, R3 \n"
 469 "    B       loc_FF3174A4 \n"
 470 
 471 "loc_FF317470:\n"
 472 "    MOV     R5, R1 \n"
 473 "    B       loc_FF317494 \n"
 474 
 475 "loc_FF317478:\n"
 476 "    STR     R0, [R8, #0x140] \n"
 477 "    B       loc_FF3174F4 \n"
 478 
 479 "loc_FF317480:\n"
 480 "    LDR     R5, =0x5DC \n"
 481 "    B       loc_FF317494 \n"
 482 
 483 "loc_FF317488:\n"
 484 "    LDR     R5, =0xBB8 \n"
 485 "    B       loc_FF317494 \n"
 486 
 487 "loc_FF317490:\n"
 488 "    LDR     R5, =0x1770 \n"
 489 
 490 "loc_FF317494:\n"
 491 "    STR     R1, [R8, #0x13C] \n"
 492 "    STR     R10, [R8, #0xE8] \n"
 493 "    B       loc_FF317478 \n"
 494 
 495 "loc_FF3174A0:\n"
 496 "    LDR     R5, =0x4E2 \n"
 497 
 498 "loc_FF3174A4:\n"
 499 "    STR     R2, [R8, #0xE8] \n"
 500 "    STR     R3, [R8, #0x13C] \n"
 501 "    STR     R12, [R8, #0x140] \n"
 502 "    B       loc_FF3174F4 \n"
 503 
 504 "loc_FF3174B4:\n"
 505 "    LDR     R5, =0x9C4 \n"
 506 "    B       loc_FF3174A4 \n"
 507 
 508 "loc_FF3174BC:\n"
 509 "    LDR     R5, =0x1388 \n"
 510 "    B       loc_FF3174A4 \n"
 511 
 512 "loc_FF3174C4:\n"
 513 "    STR     R1, [R8, #0x13C] \n"
 514 "    LDR     R5, =0x57600000 \n"  // --> Patched. Old value = 0x3A980. 2hrs 240fps
 515 "    MOV     R1, #0xF0 \n"
 516 "    B       loc_FF3174E0 \n"
 517 
 518 "loc_FF3174D4:\n"
 519 "    LDR     R5, =0x28800000 \n"  // --> Patched. Old value = 0x1D4C0. 2hrs 120fps
 520 "    STR     R1, [R8, #0x13C] \n"
 521 "    MOV     R1, #0x78 \n"
 522 
 523 "loc_FF3174E0:\n"
 524 "    STR     R1, [R8, #0xE8] \n"
 525 "    B       loc_FF317478 \n"
 526 
 527 "loc_FF3174E8:\n"
 528 "    LDR     R0, =0xFF315680 /*'MovWriter.c'*/ \n"
 529 "    MOV     R1, #0x3C4 \n"
 530 "    BL      _DebugAssert \n"
 531 
 532 "loc_FF3174F4:\n"
 533 "    LDR     R0, [R8, #0xE8] \n"
 534 "    LDR     R1, =0x1C20 \n"  // --> Patched. Old value = 0xE0F. 2hrs
 535 "    MOV     R0, R0, LSR#1 \n"
 536 "    STR     R0, [R8, #0xEC] \n"
 537 "    LDR     R0, [R7] \n"
 538 "    STR     R0, [R8, #0xF4] \n"
 539 "    LDRH    R0, [R7, #0x10] \n"
 540 "    STR     R0, [R8, #0xF8] \n"
 541 "    LDR     R0, [R7, #4] \n"
 542 "    STRH    R0, [R8, #2] \n"
 543 "    LDR     R0, [R7, #8] \n"
 544 "    STRH    R0, [R8, #4] \n"
 545 "    LDR     R0, [R7, #0x14] \n"
 546 "    STR     R0, [R8, #0xFC] \n"
 547 "    LDR     R0, [SP, #0x44] \n"
 548 "    STR     R0, [R8, #0x138] \n"
 549 "    LDR     R0, [R8, #0xE0] \n"
 550 "    CMP     R0, #0x140 \n"
 551 "    MOVEQ   R0, #0x20000 \n"
 552 "    MOVEQ   R6, #1 \n"
 553 "    STREQ   R0, [R8, #0xB8] \n"
 554 "    BEQ     loc_FF31758C \n"
 555 "    CMP     R0, #0x280 \n"
 556 "    LDREQ   R0, =0x7A760 \n"
 557 "    MOVEQ   R6, #2 \n"
 558 "    STREQ   R0, [R8, #0xB8] \n"
 559 "    BEQ     loc_FF31758C \n"
 560 "    CMP     R0, #0x500 \n"
 561 "    LDREQ   R0, =0x11DA50 \n"
 562 "    LDR     R1, =0x1C20 \n"  // --> Patched. Old value = 0x257. 2hrs
 563 "    MOVEQ   R6, #4 \n"
 564 "    STREQ   R0, [R8, #0xB8] \n"
 565 "    BEQ     loc_FF31758C \n"
 566 "    CMP     R0, #0x780 \n"
 567 "    BNE     loc_FF317594 \n"
 568 //"  MOV     R0, #0x200000 \n"
 569 "    MOV     R0, #2097152 \n" // 10 mins
 570 "    MOV     R6, #5 \n"
 571 "    STR     R0, [R8, #0xB8] \n"
 572 
 573 "loc_FF31758C:\n"
 574 "    STR     R1, [R8, #0x54] \n"
 575 "    B       loc_FF3175A0 \n"
 576 
 577 "loc_FF317594:\n"
 578 "    LDR     R0, =0xFF315680 /*'MovWriter.c'*/ \n"
 579 "    MOV     R1, #0x3EC \n"
 580 "    BL      _DebugAssert \n"
 581 
 582 "loc_FF3175A0:\n"
 583 "    LDR     R0, [R8, #0x54] \n"
 584 "    LDR     R1, [R8, #0x140] \n"
 585 "    MUL     R0, R5, R0 \n"
 586 "    STR     R1, [SP, #8] \n"
 587 "    BL      sub_00690934 /*__divmod_unsigned_int*/ \n"
 588 "    MOV     R1, #5 \n"
 589 "    BL      sub_00690934 /*__divmod_unsigned_int*/ \n"
 590 "    ADD     R0, R0, #1 \n"
 591 "    ADD     R0, R0, R0, LSL#2 \n"
 592 "    STR     R0, [R8, #0x50] \n"
 593 "    LDR     R9, [R4, #8] \n"
 594 "    CMP     R9, #0xB \n"
 595 "    CMPNE   R9, #0xA \n"
 596 "    CMPNE   R9, #9 \n"
 597 "    BNE     loc_FF3175F0 \n"
 598 "    LDR     R1, [SP, #8] \n"
 599 "    MUL     R0, R1, R0 \n"
 600 "    MOV     R1, R5 \n"
 601 "    BL      sub_00690934 /*__divmod_unsigned_int*/ \n"
 602 "    STR     R0, [R8, #0x54] \n"
 603 
 604 "loc_FF3175F0:\n"
 605 "    CMP     R9, #3 \n"
 606 "    CMPNE   R9, #4 \n"
 607 "    BNE     loc_FF317628 \n"
 608 "    RSB     R0, R5, R5, LSL#4 \n"
 609 "    STR     R10, [R8, #0x54] \n"
 610 "    LDR     R1, [SP, #8] \n"
 611 "    MOV     R0, R0, LSL#1 \n"
 612 "    BL      sub_00690934 /*__divmod_unsigned_int*/ \n"
 613 "    LDR     R1, [R8, #0xF0] \n"
 614 "    MOV     R10, R1 \n"
 615 "    BL      sub_00690934 /*__divmod_unsigned_int*/ \n"
 616 "    ADD     R0, R0, #1 \n"
 617 "    MUL     R0, R10, R0 \n"
 618 "    STR     R0, [R8, #0x50] \n"
 619 
 620 "loc_FF317628:\n"
 621 "    ADD     R0, R5, R5, LSL#8 \n"
 622 "    LDR     R1, [SP, #8] \n"
 623 "    RSB     R0, R0, R0, LSL#3 \n"
 624 "    BL      sub_00690934 /*__divmod_unsigned_int*/ \n"
 625 "    STR     R0, [R8, #0x80] \n"
 626 "    LDR     R0, [R4, #0xC] \n"
 627 "    CMP     R0, #0 \n"
 628 "    MOVNE   R0, #1 \n"
 629 "    STR     R0, [SP, #4] \n"
 630 "    LDR     R5, [R7, #0xC] \n"
 631 "    MOV     R0, R5, LSR#1 \n"
 632 "    STR     R5, [R8, #0xA0] \n"
 633 "    STR     R0, [R8, #0xA4] \n"
 634 "    LDR     R0, [SP, #0x10] \n"
 635 "    ADD     R0, R0, #3 \n"
 636 "    BIC     R1, R0, #3 \n"
 637 "    STR     R1, [R8, #0x104] \n"
 638 "    LDR     R0, [R8, #0x50] \n"
 639 "    MOV     R0, R0, LSL#2 \n"
 640 "    ADD     R1, R1, R0 \n"
 641 "    STR     R1, [R8, #0x108] \n"
 642 "    LDRH    R7, [R8, #4] \n"
 643 "    LDR     R2, [SP, #0x14] \n"
 644 "    LDR     R3, [SP, #0x10] \n"
 645 "    CMP     R7, #0 \n"
 646 "    ADD     R10, R3, R2 \n"
 647 "    BEQ     loc_FF3178C4 \n"
 648 "    ADD     R9, R1, R0 \n"
 649 "    STR     R9, [R8, #0x10C] \n"
 650 "    LDR     R1, [R8, #0xEC] \n"
 651 "    BL      sub_00690934 /*__divmod_unsigned_int*/ \n"
 652 "    ADD     R0, R0, R9 \n"
 653 "    ADD     R0, R0, #0x1F \n"
 654 "    BIC     R0, R0, #0x1F \n"
 655 "    STR     R0, [R8, #0x110] \n"
 656 "    LDR     R1, [R8, #0xD8] \n"
 657 "    CMP     R1, #0 \n"
 658 "    STREQ   R11, [R8, #0x84] \n"
 659 "    LDREQ   R2, [R8, #0xB8] \n"
 660 "    ADDEQ   R0, R0, R2 \n"
 661 "    STREQ   R0, [R8, #0x114] \n"
 662 "    MOVEQ   R0, #2 \n"
 663 "    STREQ   R0, [R8, #0x40] \n"
 664 "    BEQ     loc_FF317778 \n"
 665 "    LDR     R2, [R8, #0xB8] \n"
 666 "    CMP     R7, #1 \n"
 667 "    ADD     R0, R0, R2 \n"
 668 "    STR     R0, [R8, #0x84] \n"
 669 "    ADD     R0, R0, #0x100000 \n"
 670 "    STR     R0, [R8, #0x114] \n"
 671 "    MOV     R2, #5 \n"
 672 "    STR     R2, [R8, #0x40] \n"
 673 "    ADDEQ   R2, R5, R5, LSL#1 \n"
 674 "    SUBEQ   R0, R10, R0 \n"
 675 "    MOVEQ   R2, R2, LSL#1 \n"
 676 "    BEQ     loc_FF317788 \n"
 677 
 678 "loc_FF317708:\n"
 679 //SKIP DATA
 680 
 681 "loc_FF317778:\n"
 682 "    LDR     R2, [R8, #0x40] \n"
 683 "    LDR     R0, [R8, #0x114] \n"
 684 "    MUL     R2, R5, R2 \n"
 685 "    SUB     R0, R10, R0 \n"
 686 
 687 "loc_FF317788:\n"
 688 "    SUB     R0, R0, R2 \n"
 689 "    MOV     R0, R0, LSR#15 \n"
 690 "    MOV     R0, R0, LSL#15 \n"
 691 "    STR     R0, [R8, #0x120] \n"
 692 "    LDR     R2, [R8, #0x114] \n"
 693 "    CMP     R1, #0 \n"
 694 "    ADD     R0, R0, R2 \n"
 695 "    STR     R0, [R8, #0x118] \n"
 696 "    BEQ     loc_FF3177BC \n"
 697 "    CMP     R7, #1 \n"
 698 "    BICEQ   R0, R0, #3 \n"
 699 "    STREQ   R0, [R8, #0x28] \n"
 700 "    ADDEQ   R0, R0, R5 \n"
 701 
 702 "loc_FF3177BC:\n"
 703 "    LDR     R1, =0xF220 \n"
 704 "    STR     R0, [R8, #0x11C] \n"
 705 "    LDR     R10, =0x15B7B8 \n"
 706 "    LDR     R8, [R1, #0x40] \n"
 707 "    LDR     R9, [R1, #0x11C] \n"
 708 "    MOV     R0, #0 \n"
 709 "    SUB     LR, R10, #0x28 \n"
 710 
 711 "loc_FF3177D8:\n"
 712 "    CMP     R0, R8 \n"
 713 "    MLACC   R1, R0, R5, R9 \n"
 714 "    LDR     R3, =0x15B768 \n"
 715 "    ADDCC   R1, R1, #3 \n"
 716 "    BICCC   R1, R1, #3 \n"
 717 "    STRCS   R11, [R10, R0, LSL#2] \n"
 718 "    STRCC   R1, [R10, R0, LSL#2] \n"
 719 "    MOV     R1, #0 \n"
 720 "    ADD     R3, R3, R0, LSL#3 \n"
 721 "    ADD     R12, LR, R0, LSL#3 \n"
 722 
 723 "loc_FF317800:\n"
 724 "    STR     R2, [R3, R1, LSL#2] \n"
 725 "    STR     R2, [R12, R1, LSL#2] \n"
 726 "    ADD     R1, R1, #1 \n"
 727 "    CMP     R1, #2 \n"
 728 "    BLT     loc_FF317800 \n"
 729 "    ADD     R0, R0, #1 \n"
 730 "    CMP     R0, #5 \n"
 731 "    BLT     loc_FF3177D8 \n"
 732 "    LDR     R5, =0xF220 \n"
 733 "    CMP     R7, #1 \n"
 734 "    STRNE   R11, [R5, #0xDC] \n"
 735 "    BNE     loc_FF317880 \n"
 736 "    LDRH    R0, [R5, #2] \n"
 737 "    CMP     R0, #0x10 \n"
 738 "    LDRNE   R1, =0x48D \n"
 739 "    LDRNE   R0, =0xFF315680 /*'MovWriter.c'*/ \n"
 740 "    BLNE    _DebugAssert \n"
 741 "    MOV     R0, #1 \n"
 742 "    STR     R0, [R5, #0xDC] \n"
 743 "    LDRH    R0, [R5, #4] \n"
 744 "    MVN     R1, #0x10000 \n"
 745 "    AND     R0, R1, R0, LSL#1 \n"
 746 "    STRH    R0, [R5, #4] \n"
 747 "    LDR     R0, [R5, #0xF8] \n"
 748 "    MOV     R0, R0, LSL#1 \n"
 749 "    STR     R0, [R5, #0xF8] \n"
 750 "    LDR     R0, [R5, #0xA0] \n"
 751 "    MOV     R0, R0, LSL#1 \n"
 752 "    STR     R0, [R5, #0xA0] \n"
 753 "    LDR     R0, [R5, #0xA4] \n"
 754 "    MOV     R0, R0, LSL#1 \n"
 755 "    STR     R0, [R5, #0xA4] \n"
 756 
 757 "loc_FF317880:\n"
 758 "    LDR     R0, [R5, #0xD8] \n"
 759 "    CMP     R0, #0 \n"
 760 "    BEQ     loc_FF31789C \n"
 761 "    LDR     R1, [R4, #8] \n"
 762 "    MOV     R0, R6 \n"
 763 "    BL      sub_FF0C9D94 \n"
 764 "    B       loc_FF3178B0 \n"
 765 
 766 "loc_FF31789C:\n"
 767 "    LDRH    R3, [R4, #0x14] \n"
 768 "    LDR     R2, [R4, #8] \n"
 769 "    LDR     R1, [SP, #4] \n"
 770 "    MOV     R0, R6 \n"
 771 "    BL      sub_FF0C9CC8 \n"
 772 
 773 "loc_FF3178B0:\n"
 774 "    LDR     R1, [R5, #0xA0] \n"
 775 "    ADD     R0, R0, R1 \n"
 776 "    STR     R0, [R5, #0x98] \n"
 777 
 778 "loc_FF3178BC:\n"
 779 "    ADD     SP, SP, #0x1C \n"
 780 "    LDMFD   SP!, {R4-R11,PC} \n"
 781 
 782 "loc_FF3178C4:\n"
 783 "    ADD     R0, R0, R1 \n"
 784 "    ADD     R0, R0, #0x1F \n"
 785 "    BIC     R0, R0, #0x1F \n"
 786 "    STR     R0, [R8, #0x110] \n"
 787 "    LDR     R1, [R8, #0xB8] \n"
 788 "    MOV     R2, R9 \n"
 789 "    ADD     R0, R0, R1 \n"
 790 "    SUB     R1, R10, R0 \n"
 791 "    MOV     R1, R1, LSR#15 \n"
 792 "    MOV     R1, R1, LSL#15 \n"
 793 "    STR     R0, [R8, #0x114] \n"
 794 "    ADD     R0, R0, R1 \n"
 795 "    STR     R1, [R8, #0x120] \n"
 796 "    STR     R0, [R8, #0x118] \n"
 797 "    LDRH    R3, [R4, #0x14] \n"
 798 "    LDR     R1, [SP, #4] \n"
 799 "    MOV     R0, R6 \n"
 800 "    BL      sub_FF0C9CC8 \n"
 801 "    STR     R0, [R8, #0x98] \n"
 802 "    B       loc_FF3178BC \n"
 803 );
 804 }

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