root/platform/ixus220_elph300hs/sub/101c/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_FF985498_my
  5. sub_FFAE6A58_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 @ 0xFF985E5C - 0xFF985FD4, length=95
  15 void __attribute__((naked,noinline)) movie_record_task() {
  16 asm volatile (
  17 "    STMFD   SP!, {R2-R10,LR} \n"
  18 "    LDR     R6, =0xFF984BCC \n"
  19 "    LDR     R7, =0xFF9858B4 \n"
  20 "    LDR     R4, =0x6D88 \n"
  21 "    LDR     R9, =0x67F \n"
  22 "    LDR     R10, =0x2710 \n"
  23 "    MOV     R8, #1 \n"
  24 "    MOV     R5, #0 \n"
  25 
  26 "loc_FF985E7C:\n"
  27 "    LDR     R0, [R4, #0x24] \n"
  28 "    MOV     R2, #0 \n"
  29 "    ADD     R1, SP, #4 \n"
  30 "    BL      sub_FF83B5B4 /*_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_FF985FB8 \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_FF985FB8 \n"
  44 "    B       loc_FF985F58 \n"
  45 "    B       loc_FF985F7C \n"
  46 "    B       loc_FF985F8C \n"
  47 "    B       loc_FF985F94 \n"
  48 "    B       loc_FF985F9C \n"
  49 "    B       loc_FF985FA4 \n"
  50 "    B       loc_FF985F60 \n"
  51 "    B       loc_FF985FAC \n"
  52 "    B       loc_FF985F6C \n"
  53 "    B       loc_FF985FB8 \n"
  54 "    B       loc_FF985FB4 \n"
  55 "    B       loc_FF985F24 \n"
  56 "    B       loc_FF985EF4 \n"
  57 
  58 "loc_FF985EF4:\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, #0xD8] \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_FF985F44 \n"
  71 
  72 "loc_FF985F24:\n"
  73 "    STR     R5, [R4, #0x40] \n"
  74 "    STR     R5, [R4, #0x30] \n"
  75 "    STR     R6, [R4, #0xD8] \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_FF985F44:\n"
  83 "    LDR     R2, =0xFF984214 \n"
  84 "    LDR     R1, =0xB2228 \n"
  85 "    LDR     R0, =0xFF984328 \n"
  86 "    BL      sub_FF855290 \n"
  87 "    B       loc_FF985FB8 \n"
  88 
  89 "loc_FF985F58:\n"
  90 );
  91 if (conf.ext_video_time == 1)
  92 {
  93 asm volatile (
  94 "    BL      sub_FF985498_my \n"  // --> Patched. Old value = 0xFF985498.
  95 );
  96 }
  97 else
  98 {
  99 asm volatile (
 100 "    BL      sub_FF985498 \n"
 101 );
 102 }
 103 asm volatile (
 104 "    B       loc_FF985FB8 \n"
 105 
 106 "loc_FF985F60:\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_FF985FB8 \n"
 114 
 115 "loc_FF985F6C:\n"
 116 "    LDR     R1, [R0, #0x18] \n"
 117 "    LDR     R0, [R0, #4] \n"
 118 "    BL      sub_FFAE80F4 \n"
 119 "    B       loc_FF985FB8 \n"
 120 
 121 "loc_FF985F7C:\n"
 122 "    LDR     R0, [R4, #0x44] \n"
 123 "    CMP     R0, #5 \n"
 124 "    STRNE   R8, [R4, #0x34] \n"
 125 "    B       loc_FF985FB8 \n"
 126 
 127 "loc_FF985F8C:\n"
 128 "    BL      sub_FF9848A8 \n"
 129 "    B       loc_FF985FB8 \n"
 130 
 131 "loc_FF985F94:\n"
 132 "    BL      sub_FF9845C8 \n"
 133 "    B       loc_FF985FB8 \n"
 134 
 135 "loc_FF985F9C:\n"
 136 "    BL      sub_FF984380 \n"
 137 "    B       loc_FF985FB8 \n"
 138 
 139 "loc_FF985FA4:\n"
 140 "    BL      sub_FF983FA8 \n"
 141 "    B       loc_FF985FB8 \n"
 142 
 143 "loc_FF985FAC:\n"
 144 "    BL      sub_FF983F28 \n"
 145 "    B       loc_FF985FB8 \n"
 146 
 147 "loc_FF985FB4:\n"
 148 "    BL      sub_FF986508 \n"
 149 
 150 "loc_FF985FB8:\n"
 151 "    LDR     R1, [SP, #4] \n"
 152 "    LDR     R3, =0xFF983CA4 /*'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_FF83BF2C /*_PostMessageQueueStrictly*/ \n"
 158 "    B       loc_FF985E7C \n"
 159 );
 160 }
 161 
 162 /*************************************************************/
 163 //** sub_FF985498_my @ 0xFF985498 - 0xFF985778, length=185
 164 void __attribute__((naked,noinline)) sub_FF985498_my() {
 165 asm volatile (
 166 "    STMFD   SP!, {R0-R8,LR} \n"
 167 "    LDR     R6, =0x6D88 \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     R0, [R0, #0x5C] \n"
 173 "    LDRH    R1, [R6, #6] \n"
 174 "    MOV     R3, #0x3E8 \n"
 175 "    MUL     R0, R3, R0 \n"
 176 "    CMP     R1, #0 \n"
 177 "    MOV     R2, #1 \n"
 178 "    BNE     loc_FF9854DC \n"
 179 "    LDR     R1, [R6, #0x90] \n"
 180 "    CMP     R1, #0 \n"
 181 "    BNE     loc_FF9854EC \n"
 182 "    B       loc_FF9854E4 \n"
 183 
 184 "loc_FF9854DC:\n"
 185 "    CMP     R1, #3 \n"
 186 "    BNE     loc_FF9854EC \n"
 187 
 188 "loc_FF9854E4:\n"
 189 "    STR     R2, [R6, #0x48] \n"
 190 "    B       loc_FF9854F8 \n"
 191 
 192 "loc_FF9854EC:\n"
 193 "    MOV     R1, #0x3E8 \n"
 194 "    BL      sub_FFB9C890 /*__divmod_unsigned_int*/ \n"
 195 "    STR     R0, [R6, #0x48] \n"
 196 
 197 "loc_FF9854F8:\n"
 198 "    LDR     R4, =0xB225C \n"
 199 "    MOV     R7, #2 \n"
 200 "    LDR     R0, [R4, #8] \n"
 201 "    CMP     R0, #0 \n"
 202 "    BEQ     loc_FF985560 \n"
 203 "    LDR     R0, [R6, #0x58] \n"
 204 "    MOV     R1, #4 \n"
 205 "    CMP     R0, #0x18 \n"
 206 "    BEQ     loc_FF9856F4 \n"
 207 "    BGT     loc_FF98553C \n"
 208 "    CMP     R0, #0xA \n"
 209 "    CMPNE   R0, #0xF \n"
 210 "    STREQ   R7, [R4, #0x14] \n"
 211 "    BEQ     loc_FF985560 \n"
 212 "    CMP     R0, #0x14 \n"
 213 "    BNE     loc_FF985554 \n"
 214 "    B       loc_FF9856F4 \n"
 215 
 216 "loc_FF98553C:\n"
 217 "    CMP     R0, #0x1E \n"
 218 "    BEQ     loc_FF9856F4 \n"
 219 "    CMP     R0, #0x3C \n"
 220 "    MOVEQ   R0, #8 \n"
 221 "    STREQ   R0, [R4, #0x14] \n"
 222 "    BEQ     loc_FF985560 \n"
 223 
 224 "loc_FF985554:\n"
 225 "    LDR     R1, =0x777 \n"
 226 "    LDR     R0, =0xFF983CA4 /*'MovieRecorder.c'*/ \n"
 227 "    BL      _DebugAssert \n"
 228 
 229 "loc_FF985560:\n"
 230 "    LDR     R2, =0x6D8A \n"
 231 "    LDR     R0, [R6, #0xB8] \n"
 232 "    MOV     R3, #2 \n"
 233 "    MOV     R1, #0xAA \n"
 234 "    BL      sub_FF896298 \n"
 235 "    LDR     R2, =0x6D8C \n"
 236 "    LDR     R0, [R6, #0xB8] \n"
 237 "    MOV     R3, #2 \n"
 238 "    MOV     R1, #0xA9 \n"
 239 "    BL      sub_FF896298 \n"
 240 "    LDR     R2, =0x6DD8 \n"
 241 "    LDR     R0, [R6, #0xB8] \n"
 242 "    MOV     R3, #4 \n"
 243 "    MOV     R1, #0xA2 \n"
 244 "    BL      sub_FF896298 \n"
 245 "    LDR     R2, =0x6DDC \n"
 246 "    LDR     R0, [R6, #0xB8] \n"
 247 "    MOV     R3, #4 \n"
 248 "    MOV     R1, #0xA3 \n"
 249 "    BL      sub_FF896298 \n"
 250 "    LDR     R0, [R6, #0x90] \n"
 251 "    CMP     R0, #0 \n"
 252 "    LDRNE   R2, =0x6E88 \n"
 253 "    MOVNE   R1, #0 \n"
 254 "    MOVNE   R0, #0xD \n"
 255 "    BLNE    sub_FF8907A4 \n"
 256 "    LDR     R0, [R6, #0x4C] \n"
 257 "    LDR     R5, =0x6E88 \n"
 258 "    LDR     R8, =0xB2244 \n"
 259 "    CMP     R0, #2 \n"
 260 "    CMPNE   R0, #3 \n"
 261 "    BNE     loc_FF98565C \n"
 262 "    LDR     R0, [R6, #0x90] \n"
 263 "    CMP     R0, #0 \n"
 264 "    LDRNE   R0, =0x443FC000 \n"
 265 "    STRNE   R0, [R5] \n"
 266 "    BNE     loc_FF98565C \n"
 267 "    LDR     R0, =0x460B8600 \n"
 268 "    LDR     R1, =0x10959E0 \n"
 269 "    STR     R0, [R5] \n"
 270 "    STR     R1, [R5, #4] \n"
 271 "    LDMIA   R8, {R1,R2} \n"
 272 "    STR     R0, [R6, #0xA0] \n"
 273 "    MUL     R1, R2, R1 \n"
 274 "    MOV     R2, #0 \n"
 275 "    MOV     R3, R1, LSL#1 \n"
 276 "    ADD     R1, R0, R3 \n"
 277 "    STR     R3, [R6, #0x9C] \n"
 278 "    STR     R1, [R6, #0xA4] \n"
 279 "    STMEA   SP, {R1-R3} \n"
 280 "    MOV     R3, R2 \n"
 281 "    MOV     R2, #9 \n"
 282 "    MOV     R1, #5 \n"
 283 "    MOV     R0, #0x10 \n"
 284 "    BL      sub_FFA9A59C \n"
 285 "    LDR     R1, [R5] \n"
 286 "    LDR     R0, [R6, #0x9C] \n"
 287 "    ADD     R1, R1, R0, LSL#1 \n"
 288 "    STR     R1, [R5] \n"
 289 "    LDR     R1, [R5, #4] \n"
 290 "    RSB     R0, R0, #0 \n"
 291 "    ADD     R0, R1, R0, LSL#1 \n"
 292 "    STR     R0, [R5, #4] \n"
 293 
 294 "loc_FF98565C:\n"
 295 "    LDR     R3, =0xFF985464 \n"
 296 "    LDMIA   R5, {R0,R1} \n"
 297 "    STR     R3, [SP] \n"
 298 "    LDR     R3, =0xB225C \n"
 299 "    SUB     R2, R3, #0x18 \n"
 300 "    BL      sub_FFAE6A58_my \n"  // --> Patched. Old value = 0xFFAE6A58.
 301 "    LDR     R3, [R6, #0xB8] \n"
 302 "    STR     R3, [SP] \n"
 303 "    LDR     R0, [R6, #0x90] \n"
 304 "    LDRD    R2, [R6, #0xF8] \n"
 305 "    BL      sub_FFAE6E6C \n"
 306 "    LDR     R0, [R6, #0x64] \n"
 307 "    LDR     R3, =0x6E10 \n"
 308 "    AND     R1, R0, #0xFF \n"
 309 "    LDR     R0, [R8] \n"
 310 "    SUB     R2, R3, #4 \n"
 311 "    BL      sub_FFAE4BD4 \n"
 312 "    LDRH    R0, [R6, #6] \n"
 313 "    CMP     R0, #2 \n"
 314 "    LDREQ   R0, =0xFF985138 \n"
 315 "    STREQ   R0, [R6, #0xF0] \n"
 316 "    LDR     R0, [R6, #0x90] \n"
 317 "    CMP     R0, #0 \n"
 318 "    LDREQ   R1, =0xFF984D7C \n"
 319 "    STREQ   R1, [R6, #0xF0] \n"
 320 "    LDR     R2, [R6, #0xC] \n"
 321 "    LDR     R1, =0xFFBE0364 \n"
 322 "    CMP     R2, #2 \n"
 323 "    BNE     loc_FF9856FC \n"
 324 "    LDR     R0, [R6, #0x4C] \n"
 325 "    ADD     R0, R1, R0, LSL#3 \n"
 326 "    LDR     R1, [R8, #0xC] \n"
 327 "    LDR     R0, [R0, R1, LSL#2] \n"
 328 "    BL      sub_FFAA0638 \n"
 329 "    LDR     R0, =0xFF984CA8 \n"
 330 "    MOV     R1, #0 \n"
 331 "    BL      sub_FFAA0B4C \n"
 332 "    B       loc_FF985738 \n"
 333 
 334 "loc_FF9856F4:\n"
 335 "    STR     R1, [R4, #0x14] \n"
 336 "    B       loc_FF985560 \n"
 337 
 338 "loc_FF9856FC:\n"
 339 "    CMP     R0, #0 \n"
 340 "    BNE     loc_FF985718 \n"
 341 "    LDR     R1, [R6, #0x98] \n"
 342 "    MOV     R0, #5 \n"
 343 "    BL      sub_FFAA0B60 \n"
 344 "    BL      sub_FFAA0BF0 \n"
 345 "    B       loc_FF985738 \n"
 346 
 347 "loc_FF985718:\n"
 348 "    LDR     R0, [R6, #0x4C] \n"
 349 "    ADD     R0, R1, R0, LSL#3 \n"
 350 "    LDR     R1, [R8, #0xC] \n"
 351 "    LDR     R0, [R0, R1, LSL#2] \n"
 352 "    BL      sub_FFA9EDC8 \n"
 353 "    LDR     R0, =0xFF984CA8 \n"
 354 "    MOV     R1, #0 \n"
 355 "    BL      sub_FFA9F514 \n"
 356 
 357 "loc_FF985738:\n"
 358 "    LDR     R0, [R4, #8] \n"
 359 "    CMP     R0, #0 \n"
 360 "    BEQ     loc_FF98576C \n"
 361 "    ADD     R0, SP, #0xC \n"
 362 "    BL      sub_FFAE7F70 \n"
 363 "    LDR     R1, [R4, #0xC] \n"
 364 "    LDR     R0, [SP, #0xC] \n"
 365 "    BL      sub_FF8678CC \n"
 366 "    ADD     R0, SP, #0xC \n"
 367 "    BL      sub_FFAE7F70 \n"
 368 "    LDR     R1, [R4, #0xC] \n"
 369 "    LDR     R0, [SP, #0xC] \n"
 370 "    BL      sub_FF8678CC \n"
 371 
 372 "loc_FF98576C:\n"
 373 "    LDR     R0, =0xFF984C60 \n"
 374 "    STR     R7, [R6, #0x44]! \n"
 375 "    STR     R0, [R6, #0x94] \n"
 376 "    LDMFD   SP!, {R0-R8,PC} \n"
 377 );
 378 }
 379 
 380 /*************************************************************/
 381 //** sub_FFAE6A58_my @ 0xFFAE6A58 - 0xFFAE6E10, length=239
 382 void __attribute__((naked,noinline)) sub_FFAE6A58_my() {
 383 asm volatile (
 384 "    STMFD   SP!, {R0-R12,LR} \n"
 385 "    MOV     R9, R0 \n"
 386 "    LDR     R0, [R2, #0x10] \n"
 387 "    LDR     R8, [SP, #0x38] \n"
 388 "    CMP     R0, #0 \n"
 389 "    LDREQ   R1, =0x32A \n"
 390 "    LDREQ   R0, =0xFFAE5A34 /*'MovWriter.c'*/ \n"
 391 "    MOV     R5, #0 \n"
 392 "    MOV     R4, R2 \n"
 393 "    MOV     R10, R3 \n"
 394 "    MOV     R7, R5 \n"
 395 "    BLEQ    _DebugAssert \n"
 396 "    LDR     R6, =0xC718 \n"
 397 "    LDR     R0, [R4] \n"
 398 "    MOV     R11, #0x1E \n"
 399 "    STR     R0, [R6, #0xD0] \n"
 400 "    LDR     R0, [R4, #4] \n"
 401 "    STR     R0, [R6, #0xD4] \n"
 402 "    LDR     R0, [R4, #0x10] \n"
 403 "    STR     R0, [R6, #0xE0] \n"
 404 "    LDR     R1, [R4, #8] \n"
 405 "    LDR     R0, =0x7530 \n"
 406 "    CMP     R1, #0xB \n"
 407 "    ADDCC   PC, PC, R1, LSL#2 \n"
 408 "    B       loc_FFAE6B44 \n"
 409 "    B       loc_FFAE6AF8 \n"
 410 "    B       loc_FFAE6AE8 \n"
 411 "    B       loc_FFAE6B20 \n"
 412 "    B       loc_FFAE6B34 \n"
 413 "    B       loc_FFAE6B44 \n"
 414 "    B       loc_FFAE6B44 \n"
 415 "    B       loc_FFAE6B44 \n"
 416 "    B       loc_FFAE6B44 \n"
 417 "    B       loc_FFAE6B18 \n"
 418 "    B       loc_FFAE6B10 \n"
 419 "    B       loc_FFAE6B00 \n"
 420 
 421 "loc_FFAE6AE8:\n"
 422 "    LDR     R7, =0x5DC0 \n"
 423 "    MOV     R0, #0x18 \n"
 424 "    STR     R7, [R6, #0x12C] \n"
 425 "    B       loc_FFAE6B2C \n"
 426 
 427 "loc_FFAE6AF8:\n"
 428 "    MOV     R7, R0 \n"
 429 "    B       loc_FFAE6B04 \n"
 430 
 431 "loc_FFAE6B00:\n"
 432 "    LDR     R7, =0x5DC \n"
 433 
 434 "loc_FFAE6B04:\n"
 435 "    STR     R0, [R6, #0x12C] \n"
 436 "    STR     R11, [R6, #0xD8] \n"
 437 "    B       loc_FFAE6B50 \n"
 438 
 439 "loc_FFAE6B10:\n"
 440 "    LDR     R7, =0xBB8 \n"
 441 "    B       loc_FFAE6B04 \n"
 442 
 443 "loc_FFAE6B18:\n"
 444 "    LDR     R7, =0x1770 \n"
 445 "    B       loc_FFAE6B04 \n"
 446 
 447 "loc_FFAE6B20:\n"
 448 "    LDR     R7, =0x57600000 \n"  // --> Patched. Old value = 0x3A980. 2hrs 240fps
 449 "    STR     R0, [R6, #0x12C] \n"
 450 "    MOV     R0, #0xF0 \n"
 451 
 452 "loc_FFAE6B2C:\n"
 453 "    STR     R0, [R6, #0xD8] \n"
 454 "    B       loc_FFAE6B50 \n"
 455 
 456 "loc_FFAE6B34:\n"
 457 "    STR     R0, [R6, #0x12C] \n"
 458 "    LDR     R7, =0x28800000 \n"  // --> Patched. Old value = 0x1D4C0. 2hrs 120fps
 459 "    MOV     R0, #0x78 \n"
 460 "    B       loc_FFAE6B2C \n"
 461 
 462 "loc_FFAE6B44:\n"
 463 "    LDR     R1, =0x35B \n"
 464 "    LDR     R0, =0xFFAE5A34 /*'MovWriter.c'*/ \n"
 465 "    BL      _DebugAssert \n"
 466 
 467 "loc_FFAE6B50:\n"
 468 "    LDR     R0, [R6, #0xD8] \n"
 469 "    LDR     R1, =0x1C20 \n"  // --> Patched. Old value = 0xE0F. 2hrs
 470 "    MOV     R0, R0, LSR#1 \n"
 471 "    STR     R0, [R6, #0xDC] \n"
 472 "    LDR     R0, [R10] \n"
 473 "    STR     R0, [R6, #0xE4] \n"
 474 "    LDRH    R0, [R10, #0x10] \n"
 475 "    STR     R0, [R6, #0xE8] \n"
 476 "    LDR     R0, [R10, #4] \n"
 477 "    STRH    R0, [R6, #2] \n"
 478 "    LDR     R0, [R10, #8] \n"
 479 "    STRH    R0, [R6, #4] \n"
 480 "    LDR     R0, [R10, #0x14] \n"
 481 "    STR     R0, [R6, #0xEC] \n"
 482 "    STR     R8, [R6, #0x128] \n"
 483 "    LDR     R0, [R6, #0xD0] \n"
 484 "    CMP     R0, #0x140 \n"
 485 "    MOVEQ   R0, #0x20000 \n"
 486 "    MOVEQ   R5, #1 \n"
 487 "    STREQ   R0, [R6, #0xAC] \n"
 488 "    BEQ     loc_FFAE6BE4 \n"
 489 "    CMP     R0, #0x280 \n"
 490 "    LDREQ   R0, =0x7A760 \n"
 491 "    MOVEQ   R5, #2 \n"
 492 "    STREQ   R0, [R6, #0xAC] \n"
 493 "    BEQ     loc_FFAE6BE4 \n"
 494 "    CMP     R0, #0x500 \n"
 495 "    LDREQ   R0, =0x11DA50 \n"
 496 "    LDR     R1, =0x1C20 \n"  // --> Patched. Old value = 0x257. 2hrs
 497 "    MOVEQ   R5, #4 \n"
 498 "    STREQ   R0, [R6, #0xAC] \n"
 499 "    BEQ     loc_FFAE6BE4 \n"
 500 "    CMP     R0, #0x780 \n"
 501 "    BNE     loc_FFAE6BEC \n"
 502 "    MOV     R0, #0x200000 \n"
 503 "    MOV     R5, #5 \n"
 504 "    STR     R0, [R6, #0xAC] \n"
 505 
 506 "loc_FFAE6BE4:\n"
 507 "    STR     R1, [R6, #0x4C] \n"
 508 "    B       loc_FFAE6BF8 \n"
 509 
 510 "loc_FFAE6BEC:\n"
 511 "    LDR     R1, =0x383 \n"
 512 "    LDR     R0, =0xFFAE5A34 /*'MovWriter.c'*/ \n"
 513 "    BL      _DebugAssert \n"
 514 
 515 "loc_FFAE6BF8:\n"
 516 "    LDR     R0, [R6, #0x4C] \n"
 517 "    LDR     R1, =0x138D \n"
 518 "    MUL     R0, R7, R0 \n"
 519 "    BL      sub_FFB9C890 /*__divmod_unsigned_int*/ \n"
 520 "    ADD     R0, R0, #1 \n"
 521 "    ADD     R0, R0, R0, LSL#2 \n"
 522 "    STR     R0, [R6, #0x48] \n"
 523 "    LDR     R8, [R4, #8] \n"
 524 "    CMP     R8, #2 \n"
 525 "    CMPNE   R8, #3 \n"
 526 "    BNE     loc_FFAE6C50 \n"
 527 "    RSB     R0, R7, R7, LSL#4 \n"
 528 "    LDR     R1, =0x3E9 \n"
 529 "    MOV     R0, R0, LSL#1 \n"
 530 "    STR     R11, [R6, #0x4C] \n"
 531 "    BL      sub_FFB9C890 /*__divmod_unsigned_int*/ \n"
 532 "    LDR     R1, [R6, #0xE0] \n"
 533 "    MOV     R7, R1 \n"
 534 "    BL      sub_FFB9C890 /*__divmod_unsigned_int*/ \n"
 535 "    ADD     R0, R0, #1 \n"
 536 "    MUL     R0, R7, R0 \n"
 537 "    STR     R0, [R6, #0x48] \n"
 538 
 539 "loc_FFAE6C50:\n"
 540 "    LDR     R0, [R4, #0xC] \n"
 541 "    LDR     R7, [R10, #0xC] \n"
 542 "    MOVS    R1, R0 \n"
 543 "    MOV     R0, R7, LSR#1 \n"
 544 "    STR     R7, [R6, #0x94] \n"
 545 "    STR     R0, [R6, #0x98] \n"
 546 "    ADD     R0, R9, #3 \n"
 547 "    BIC     R0, R0, #3 \n"
 548 "    STR     R0, [R6, #0xF4] \n"
 549 "    LDR     R2, [R6, #0x48] \n"
 550 "    MOVNE   R1, #1 \n"
 551 "    MOV     R2, R2, LSL#2 \n"
 552 "    ADD     R3, R0, R2 \n"
 553 "    STR     R3, [R6, #0xF8] \n"
 554 "    LDRH    R12, [R6, #4] \n"
 555 "    LDR     R0, [SP, #4] \n"
 556 "    ADD     R2, R2, R3 \n"
 557 "    CMP     R12, #0 \n"
 558 "    ADD     R0, R0, R9 \n"
 559 "    BEQ     loc_FFAE6DCC \n"
 560 "    STR     R2, [R6, #0xFC] \n"
 561 "    LDR     R3, [R6, #0x4C] \n"
 562 "    LDR     R9, =0x1090D8 \n"
 563 "    ADD     R2, R2, R3, LSL#3 \n"
 564 "    ADD     R2, R2, #0x1F \n"
 565 "    BIC     R2, R2, #0x1F \n"
 566 "    STR     R2, [R6, #0x100] \n"
 567 "    LDR     R3, [R6, #0xAC] \n"
 568 "    LDR     R11, =0xC898 \n"
 569 "    ADD     R2, R2, R3 \n"
 570 "    ADD     R3, R2, #0x100000 \n"
 571 "    STR     R2, [R6, #0x78] \n"
 572 "    SUB     R0, R0, R3 \n"
 573 "    RSB     R2, R7, #0 \n"
 574 "    ADD     R0, R0, R2, LSL#1 \n"
 575 "    MOV     R0, R0, LSR#15 \n"
 576 "    MOV     R0, R0, LSL#15 \n"
 577 "    STR     R3, [R6, #0x104] \n"
 578 "    ADD     R8, R3, R0 \n"
 579 "    STR     R0, [R6, #0x110] \n"
 580 "    STR     R8, [R6, #0x108] \n"
 581 "    MOV     R2, #0 \n"
 582 "    ADD     R10, R9, #0x10 \n"
 583 "    STR     R8, [R6, #0x10C] \n"
 584 
 585 "loc_FFAE6D00:\n"
 586 "    MLA     R0, R2, R7, R8 \n"
 587 "    ADD     R12, R9, R2, LSL#3 \n"
 588 "    ADD     R0, R0, #3 \n"
 589 "    BIC     R0, R0, #3 \n"
 590 "    STR     R0, [R11, R2, LSL#2] \n"
 591 "    MOV     R0, #0 \n"
 592 "    ADD     R6, R10, R2, LSL#3 \n"
 593 
 594 "loc_FFAE6D1C:\n"
 595 "    STR     R3, [R12, R0, LSL#2] \n"
 596 "    STR     R3, [R6, R0, LSL#2] \n"
 597 "    ADD     R0, R0, #1 \n"
 598 "    CMP     R0, #2 \n"
 599 "    BLT     loc_FFAE6D1C \n"
 600 "    ADD     R2, R2, #1 \n"
 601 "    CMP     R2, #2 \n"
 602 "    BLT     loc_FFAE6D00 \n"
 603 "    LDRH    R3, [R4, #0x14] \n"
 604 "    LDR     R2, [R4, #8] \n"
 605 "    MOV     R0, R5 \n"
 606 "    BL      sub_FF8E06B4 \n"
 607 "    LDR     R1, =0xC718 \n"
 608 "    LDR     R2, [R1, #0x94] \n"
 609 "    ADD     R0, R0, R2 \n"
 610 "    STR     R0, [R1, #0x8C] \n"
 611 "    LDMFD   SP!, {R0-R12,PC} \n"
 612 
 613 "loc_FFAE6DCC:\n"
 614 "    ADD     R2, R2, #0x1F \n"
 615 "    BIC     R2, R2, #0x1F \n"
 616 "    STR     R2, [R6, #0x100] \n"
 617 "    LDR     R3, [R6, #0xAC] \n"
 618 "    ADD     R2, R2, R3 \n"
 619 "    SUB     R0, R0, R2 \n"
 620 "    MOV     R0, R0, LSR#15 \n"
 621 "    MOV     R0, R0, LSL#15 \n"
 622 "    STR     R2, [R6, #0x104] \n"
 623 "    STR     R0, [R6, #0x110] \n"
 624 "    ADD     R0, R0, R2 \n"
 625 "    STR     R0, [R6, #0x108] \n"
 626 "    LDRH    R3, [R4, #0x14] \n"
 627 "    MOV     R2, R8 \n"
 628 "    MOV     R0, R5 \n"
 629 "    BL      sub_FF8E06B4 \n"
 630 "    STR     R0, [R6, #0x8C] \n"
 631 "    LDMFD   SP!, {R0-R12,PC} \n"
 632 );
 633 }

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