root/platform/ixus1000_sd4500/sub/100f/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_FF986050_my

   1 #include "conf.h"
   2 #include "lolevel.h"
   3 #include "platform.h"
   4 #include "core.h"
   5 #include "dryos31.h"
   6 
   7 void change_video_tables(int a, int b){
   8 }
   9 
  10 
  11 void  set_quality(int *x){ // -17 highest; +12 lowest
  12  if (conf.video_mode) *x=12-((conf.video_quality-1)*(12+17)/(99-1));
  13 }
  14 
  15 // ASM1989, rereview 19.09.10 FF986664
  16 void __attribute__((naked,noinline)) movie_record_task(){
  17  asm volatile(
  18 "               STMFD   SP!, {R2-R10,LR}\n"
  19 "               LDR     R9, =0x2710\n"
  20 "               LDR     R7, =0xFF985800\n" //nullsub_357
  21 "               LDR     R4, =0x7898\n"
  22 "               MOV     R8, #1\n"
  23 
  24 //looks like it is the one to work with?
  25 //"             LDR     R6, =0xFF986050\n" //__MovieRecorder.c__0 ;     LOCATION: MovieRecorder.c:0
  26 "               LDR     R6, =sub_FF986050_my\n" //__MovieRecorder.c__0 ;        LOCATION: MovieRecorder.c:0
  27 
  28 "               MOV     R5, #0\n"
  29 "loc_FF986680:\n"
  30 "               LDR     R0, [R4,#0x24]\n"
  31 "               MOV     R2, #0\n"
  32 "               ADD     R1, SP, #0x4\n"
  33 "               BL      sub_FF83AE20\n"  //__KerQueue.c__0 ; LOCATION: KerQueue.c:0
  34 "               LDR     R0, [R4,#0x2C]\n"
  35 "               CMP     R0, #0\n"
  36 "               LDRNE   R0, [R4,#0xC]\n"
  37 "               CMPNE   R0, #2\n"
  38 "               LDRNE   R0, [R4,#0x44]\n"
  39 "               CMPNE   R0, #6\n"
  40 "               BNE     loc_FF9867A4\n"
  41 "               LDR     R0, [SP,#0x4]\n"
  42 "               LDR     R1, [R0]\n"
  43 "               SUB     R1, R1, #2\n"
  44 "               CMP     R1, #0xA\n"
  45 "               ADDLS   PC, PC, R1,LSL#2\n"
  46 "               B       loc_FF9867A4\n"
  47 "loc_FF9866C4:\n"
  48 "               B       loc_FF986754\n"
  49 "loc_FF9866C8:\n"
  50 "               B       loc_FF986778\n"
  51 "loc_FF9866CC:\n"
  52 "               B       loc_FF986788\n"
  53 "loc_FF9866D0:\n"
  54 "               B       loc_FF986790\n"
  55 "loc_FF9866D4:\n"
  56 "               B       loc_FF98675C\n"
  57 "loc_FF9866D8:\n"
  58 "               B       loc_FF986798\n"
  59 "loc_FF9866DC:\n"
  60 "               B       loc_FF986768\n"
  61 "loc_FF9866E0:\n"
  62 "               B       loc_FF9867A4\n"
  63 "loc_FF9866E4:\n"
  64 "               B       loc_FF9867A0\n"
  65 "loc_FF9866E8:\n"
  66 "               B       loc_FF986720\n"
  67 "loc_FF9866EC:\n"
  68 "               B       loc_FF9866F0\n"
  69 "loc_FF9866F0:\n"
  70 "               STR     R5, [R4,#0x40]\n"
  71 "               STR     R5, [R4,#0x30]\n"
  72 "               STR     R5, [R4,#0x34]\n"
  73 "               STRH    R5, [R4,#6]\n"
  74 "               STR     R6, [R4,#0xCC]\n"
  75 "               STR     R7, [R4,#0xB4]\n"
  76 "               LDR     R0, [R4,#0xC]\n"
  77 "               ADD     R0, R0, #1\n"
  78 "               STR     R0, [R4,#0xC]\n"
  79 "               MOV     R0, #6\n"
  80 "               STR     R0, [R4,#0x44]\n"
  81 "               B       loc_FF986740\n"
  82 "loc_FF986720:\n"
  83 "               STR     R5, [R4,#0x40]\n"
  84 "               STR     R5, [R4,#0x30]\n"
  85 "               STR     R6, [R4,#0xCC]\n"
  86 "               STR     R7, [R4,#0xB4]\n"
  87 "               LDR     R0, [R4,#0xC]\n"
  88 "               ADD     R0, R0, #1\n"
  89 "               STR     R0, [R4,#0xC]\n"
  90 "               STR     R8, [R4,#0x44]\n"
  91 "loc_FF986740:\n"
  92 "               LDR     R2, =0xFF984FDC\n"
  93 "               LDR     R1, =0xB0300\n"
  94 "               LDR     R0, =0xFF9850F0\n"
  95 "               BL      sub_FF853088\n"
  96 "               B       loc_FF9867A4\n"
  97 "loc_FF986754:\n"
  98   //     "BL      unlock_optical_zoom\n"                  -----------> inserted to unlock the zoom, dont need in sx210
  99 "               BL      sub_FF985D2C\n" //__MovieRecorder.c__0
 100 "               B       loc_FF9867A4\n"
 101 "loc_FF98675C:\n"
 102 "               LDR     R1, [R4,#0xCC]\n"
 103 "               BLX     R1\n"
 104 "               B       loc_FF9867A4\n"
 105 "loc_FF986768:\n"
 106 "               LDR     R1, [R0,#0x18]\n"
 107 "               LDR     R0, [R0,#4]\n"
 108 "               BL      sub_FFAD9B44\n" //__MovWriter.c__0 ;    LOCATION: MovWriter.c:0
 109 "               B       loc_FF9867A4\n"
 110 "loc_FF986778:\n"
 111 "               LDR     R0, [R4,#0x44]\n"
 112 "               CMP     R0, #5\n"
 113 "               STRNE   R8, [R4,#0x34]\n"
 114 "               B       loc_FF9867A4\n"
 115 "loc_FF986788:\n"
 116 "               BL      sub_FF9854AC\n"  //__MovieRecorder.c__1000
 117 "               B       loc_FF9867A4\n"
 118 "loc_FF986790:\n"
 119 "               BL      sub_FF98513C\n"  //__MovieRecorder.c__0
 120 "               B       loc_FF9867A4\n"
 121 "loc_FF986798:\n"
 122 "               BL      sub_FF984F68\n"  //__MovieRecorder.c__100
 123 "               B       loc_FF9867A4\n"
 124 "loc_FF9867A0:\n"
 125 "               BL      sub_FF986B98\n"  //__MovieRecorder.c__100
 126 "loc_FF9867A4:\n"
 127 "               LDR     R1, [SP,#0x4]\n"
 128 "               MOV     R3, #0x5F0\n"
 129 "               STR     R5, [R1]\n"
 130 "               STR     R3, [SP]\n"
 131 "               LDR     R0, [R4,#0x28]\n"
 132 "               LDR     R3, =0xFF984C34\n"  //aMovierecorder_c
 133 "               MOV     R2, R9\n"
 134 "               BL      sub_FF83B774\n"
 135 "               B       loc_FF986680\n"
 136 
 137  );
 138 }  //asm1989 14.11.10 done
 139 
 140 void __attribute__((naked,noinline)) sub_FF986050_my(){      // in sx200:sub_FF937C70_my
 141  asm volatile(
 142 "               STMFD   SP!, {R4-R11,LR}\n"
 143 
 144 
 145 "               SUB     SP, SP, #0x64\n"
 146 "               MOV     R8, #0\n"
 147 "               LDR     R7, =0x7898\n"
 148 "               STR     R8, [SP,#0x54]\n"  //[SP,#0x88+var_34]
 149 "               STR     R8, [SP,#0x4C]\n"       // [SP,#0x88+var_3C]
 150 "               STR     R8, [R7,#0xB8]\n"
 151 "               STR     R8, [R7,#0xBC]\n"
 152 "               STR     R8, [R7,#0xC0]\n"
 153 "               MOV     R4, R0\n"
 154 "               STR     R8, [R7,#0xC4]\n"
 155 "               LDR     R0, [R7,#0x44]\n"
 156 "               MOV     R9, #0\n"
 157 "               CMP     R0, #3\n"
 158 "               MOVEQ   R0, #4\n"
 159 "               STREQ   R0, [R7,#0x44]\n"
 160 "               LDR     R0, [R7,#0xB4]\n"
 161 "               MOV     R6, #0\n"
 162 "               MOV     R5, #1\n"
 163 "               BLX     R0\n"
 164 "               LDR     R0, [R7,#0x44]\n"
 165 
 166 "               CMP     R0, #6\n"
 167 "               BEQ     loc_FF9860C0\n"
 168 
 169 "               LDR     R1, [R7,#0xC]\n"
 170 "               CMP     R1, #2\n"
 171 "               BNE     loc_FF9860E8\n"
 172 "               CMP     R0, #5\n"
 173 "               BEQ     loc_FF9860F8\n"
 174 "loc_FF9860C0:\n"                               //Tested to be ok?
 175 "               MOV     R6, #1\n"
 176 "               ADD     R3, SP, #0x34\n"                //0x88+var_54]
 177 "               LDR     R2, =0xFF985F30\n"  //"         ADR     R2, sub_FF985F30\n"
 178 "               LDR     R1, =0xFF985F90\n"
 179 "               LDR     R0, =0xFF985FF0\n"
 180 "               BL      sub_FF853E48\n"
 181 "               LDR     R0, [R7,#0x44]\n"
 182 "               CMP     R0, #4\n"
 183 "               MOVNE   R5, #0\n"
 184 "               B       loc_FF986108\n"
 185 "loc_FF9860E8:\n"
 186 "               CMP     R0, #4\n"
 187 "               BEQ     loc_FF986108\n"
 188 "               CMP     R1, #2\n"
 189 "               BNE     loc_FF986100\n"
 190 "loc_FF9860F8:\n"
 191 "               MOV     R0, #0\n"
 192 "               BL      sub_FF853E54\n"
 193 "loc_FF986100:\n"
 194 "               ADD     SP, SP, #0x64\n"
 195 "               LDMFD   SP!, {R4-R11,PC}\n"
 196 "loc_FF986108:\n"
 197 "               LDRH    R0, [R7,#6]\n"
 198 "               CMP     R0, #1\n"
 199 //ASM_SAFE("BL blink\n")
 200 "               LDREQ   R1, =0x809\n"
 201 "               LDREQ   R0, =0xFF984C34\n" //aMovierecorder_c
 202 "               BLEQ    sub_FF81EB78\n" //DebugAssert
 203 "               LDRH    R0, [R7,#6]\n"
 204 "               CMP     R0, #3\n"
 205 "               BNE     loc_FF98613C\n"  //fails
 206 "               LDR     R0, [R7,#0x6C]\n"
 207 "               LDR     R1, [R7,#0xC8]\n"
 208 "               BL      sub_FFB89ABC\n"
 209 "               CMP     R1, #0\n"
 210 "               MOVNE   R5, #0\n"
 211 "loc_FF98613C:\n"
 212 "               LDR     R0, [R7,#0x44]\n"
 213 "               CMP     R0, #6\n"
 214 "               CMPNE   R0, #1\n"
 215 "               CMPNE   R0, #3\n"
 216 "               BNE     loc_FF986180\n" //fails
 217 "               CMP     R6, #1\n"
 218 "               CMPEQ   R5, #0\n"
 219 "               BNE     loc_FF986180\n"
 220 "               BL      sub_FF853E4C\n"
 221 "               LDR     R0, [R7,#0x18]\n"
 222 "               MOV     R1, #0x3E8\n"
 223 "               BL      sub_FF83B23C\n" //TakeSemaphore
 224 "               CMP     R0, #9\n"
 225 "               BNE     loc_FF986590\n"
 226 "               MOV     R0, #0x90000\n"
 227 "               BL      sub_FF89C95C\n" //HardwareDefect
 228 "               B       loc_FF986100\n"
 229 "loc_FF986180:\n"
 230 "               CMP     R5, #1\n"
 231 "               MOV     R10, #1\n"
 232 "               BNE     loc_FF9861A8\n"  //works
 233 "               ADD     R3, SP, #0x4C\n"
 234 "               ADD     R2, SP, #0x50\n"
 235 "               ADD     R1, SP, #0x54\n"
 236 "               ADD     R0, SP, #0x58\n"
 237 "               BL      sub_FFAD9C6C\n"  //__MovWriter.c__0 ;   LOCATION: MovWriter.c:0
 238 "               MOVS    R9, R0\n"
 239 "               BNE     loc_FF9861C4\n"
 240 "loc_FF9861A8:\n"
 241 "               LDR     R0, [R7,#0x34]\n"
 242 "               CMP     R0, #1\n"
 243 "               BNE     loc_FF986300\n"
 244 "               LDR     R0, [R7,#0x6C]\n"
 245 "               LDR     R1, [R7,#0x48]\n"
 246 "               CMP     R0, R1\n"
 247 "               BCC     loc_FF986300\n"
 248 "loc_FF9861C4:\n"
 249 "               MOV     R0, R9\n"
 250 "               BL      sub_FF9859B8\n"  // reaches here but looks like bitrate is too high??
 251 "               LDR     R0, [R7,#0xC]\n"
 252 "               CMP     R0, #2\n"
 253 // TIL HERE LOOKS LIKE WORKS
 254 //"B sub_FF9861D4\n"  // back to firmware for testing
 255 
 256 
 257 "               BNE     loc_FF986234\n"
 258 "               MOV     R1, #0\n"
 259 //fails somehow strange at some point
 260 "               LDR     R0, =0xFF985F24\n" //"          ADR     R0, =0xFF985F24\n"
 261 "               BL      sub_FFA8E1B4\n"
 262 //fails somehow strange at some point
 263 "               LDR     R2, [R7,#0x64]\n"
 264 "               ADD     R3, SP, #0x5C\n"
 265 "               STRD    R2, [SP,#0x28]\n"
 266 "               MOV     R2, #0x18\n"
 267 "               ADD     R1, SP, #0x34\n"
 268 "               ADD     R0, SP, #0x10\n"
 269 "               BL      sub_FFB8745C\n"
 270 "               LDR     R1, [R7,#0x84]\n"
 271 "               LDR     R2, [R7,#0x88]\n"
 272 //"             MVN     R3, #0xFFFFFFFE\n"  //"         MOVL    R3, 0xFFFFFFFE\n"
 273 "               MVN     R3, #1\n"
 274 
 275 "               ADD     R0, SP, #0x60\n"
 276 "               STMEA   SP, {R0-R3}\n"
 277 "               LDR     R0, =0xB0348\n"
 278 "               MOV     R3, #0\n"
 279 "               MOV     R2, #0\n"
 280 "               MOV     R1, #0x40\n"
 281 "               BL      sub_FFA8E10C\n"
 282 "               B       loc_FF986288\n"
 283 "loc_FF98622C:\n"
 284 "               MOV     R1, #1\n"
 285 "               B       loc_FF986514\n"
 286 "loc_FF986234:\n"
 287 "               BL      loc_FF986C68\n"
 288 "               LDR     R2, [R7,#0x64]\n"
 289 "               ADD     R3, SP, #0x5C\n"
 290 //"             MVN     R1, #0xFFFFFFFE\n"  // "                MOVL    R1, 0xFFFFFFFE\n"
 291 "               MVN     R1, #1\n"
 292 "               MOV     R0, #0\n"
 293 "               ADD     R5, SP, #0x1C\n"
 294 "               STMIA   R5, {R0-R3}\n"
 295 "               LDR     R3, [R4,#0x1C]\n"
 296 "               LDR     R1, [R7,#0x84]\n"
 297 "               LDR     R2, [R7,#0x88]\n"
 298 "               ADD     R4, SP, #0xC\n"
 299 "               ADD     R0, SP, #0x60\n"
 300 "               STMIA   R4, {R0-R3}\n"
 301 "               MOV     R3, #0\n"
 302 "               MOV     R1, #0x40\n"
 303 "               MOV     R2, #0\n"
 304 "               STMEA   SP, {R1-R3}\n"
 305 "               LDR     R3, =0xB0348\n"
 306 "               MOV     R1, #0\n"
 307 "               MOV     R0, #0\n"
 308 "               BL      sub_FFA8CBBC\n"
 309 
 310 "loc_FF986288:\n"
 311 "               LDR     R0, [R7,#0x18]\n"
 312 "               LDR     R1, [R7,#0x60]\n"
 313 "               BL      sub_FF83B23C\n" //TakeSemaphore
 314 "               CMP     R0, #9\n"
 315 "               BEQ     loc_FF98622C\n"
 316 "               LDR     R0, [SP,#0x5C]\n"
 317 "               CMP     R0, #0\n"
 318 "               BEQ     loc_FF9862B0\n"
 319 
 320 "loc_FF9862A8:\n"
 321 "               MOV     R1, #1\n"
 322 "               B       loc_FF98652C\n"
 323 
 324 "loc_FF9862B0:\n"
 325 "               LDR     R0, [R7,#0xC]\n"
 326 "               MOV     R4, #5\n"
 327 "               CMP     R0, #2\n"
 328 "               MOV     R0, #1\n"
 329 "               BNE     loc_FF9862EC\n"
 330 "               BL      sub_FFA8E174\n"
 331 "               BL      sub_FFA8E19C\n"
 332 "               MOV     R0, #0\n"
 333 "               BL      sub_FF853E54\n"
 334 "               BL      sub_FF853E64\n"
 335 "               STR     R4, [R7,#0x44]\n"
 336 "               BL      loc_FF986C68\n"
 337 "               BL      sub_FF853EC0\n"
 338 "               STR     R10, [R7,#0x44]\n"
 339 "               B       loc_FF9862F8\n"
 340 "loc_FF9862EC:\n"
 341 "               BL      sub_FFA8CC70\n"
 342 "               BL      sub_FFA8CCD0\n"
 343 "               STR     R4, [R7,#0x44]\n"
 344 "loc_FF9862F8:\n"
 345 "               STR     R8, [R7,#0x34]\n"
 346 "               B       loc_FF986100\n"
 347 "loc_FF986300:\n"
 348 "               CMP     R5, #1\n"
 349 "               BNE     loc_FF986588\n"
 350 "               STR     R10, [R7,#0x38]\n"
 351 "               LDR     R0, [R7,#0x6C]\n"
 352 "               LDR     R11, [R4,#0xC]\n"
 353 "               CMP     R0, #0\n"
 354 "               LDRNE   R9, [SP,#0x58]\n"
 355 "               LDRNE   R10, [SP,#0x54]\n"
 356 "               BNE     loc_FF98644C\n"
 357 "               LDR     R0, [R7,#0xC]\n"
 358 "               CMP     R0, #2\n"
 359 "               BNE     loc_FF9863A4\n"
 360 "               LDR     R0, =0xFF985F24\n"
 361 "               MOV     R1, #0\n"
 362 "               BL      sub_FFA8E1B4\n"
 363 "               LDR     R2, [R7,#0x64]\n"
 364 "               ADD     R3, SP, #0x5C\n"
 365 "               STRD    R2, [SP,#0x28]\n"
 366 "               MOV     R2, #0x18\n"
 367 "               ADD     R1, SP, #0x34\n"
 368 "               ADD     R0, SP, #0x10\n"
 369 "               BL      sub_FFB8745C\n"
 370 "               LDR     R1, [R7,#0x84]\n"
 371 "               LDR     R2, [R7,#0x88]\n"
 372 "               MVN     R3, #0\n"  // "         MOVL    R3, 0xFFFFFFFF\n"
 373 "               ADD     R0, SP, #0x60\n"
 374 "               STMEA   SP, {R0-R3}\n"
 375 "               LDR     R0, [SP,#0x58]\n"
 376 "               LDR     R1, [SP,#0x54]\n"
 377 "               LDR     R2, [SP,#0x50]\n"
 378 "               LDR     R3, [SP,#0x4C]\n"
 379 "               BL      sub_FFA8E10C\n"
 380 "               LDR     R0, [R7,#0x18]\n"
 381 "               LDR     R1, [R7,#0x60]\n"
 382 "               BL      sub_FF83B23C\n" //TakeSemaphore
 383 "               CMP     R0, #9\n"
 384 "               BEQ     loc_FF98622C\n"
 385 "               LDR     R0, =0xFF9858F4\n"
 386 "               MOV     R1, #0\n"
 387 "               BL      sub_FFA8E1B4\n"
 388 "               B       loc_FF98640C\n"
 389 "loc_FF9863A4:\n"
 390 "               LDR     R0, [R4,#0x20]\n"
 391 "               LDR     R2, [R7,#0x64]\n"
 392 "               ADD     R3, SP, #0x5C\n"
 393 "               MVN     R1, #0\n"  // "         MOVL    R1, 0xFFFFFFFF\n"
 394 "               ADD     R9, SP, #0x1C\n"
 395 "               STMIA   R9, {R0-R3}\n"
 396 "               LDR     R3, [R4,#0x1C]\n"
 397 "               LDR     R1, [R7,#0x84]\n"
 398 "               LDR     R2, [R7,#0x88]\n"
 399 "               ADD     R0, SP, #0x60\n"
 400 "               ADD     R9, SP, #0xC\n"
 401 "               STMIA   R9, {R0-R3}\n"
 402 "               LDR     R1, [SP,#0x50]\n"
 403 "               LDR     R2, [SP,#0x54]\n"
 404 "               LDR     R3, [SP,#0x4C]\n"
 405 "               STMFA   SP, {R1,R3}\n"
 406 "               STR     R2, [SP]\n"
 407 "               LDMIB   R4, {R0,R1}\n"
 408 "               LDR     R3, [SP,#0x58]\n"
 409 "               MOV     R2, R11\n"
 410 "               BL      sub_FFA8CBBC\n"
 411 "               LDR     R0, [R7,#0x18]\n"
 412 "               LDR     R1, [R7,#0x60]\n"
 413 "               BL      sub_FF83B23C\n" //TakeSemaphore
 414 "               CMP     R0, #9\n"
 415 "               BEQ     loc_FF98622C\n"
 416 "loc_FF98640C:\n"
 417 "               LDR     R0, [SP,#0x5C]\n"
 418 "               CMP     R0, #0\n"
 419 "               BNE     loc_FF9862A8\n"
 420 "               LDR     R0, [R7,#0xC]\n"
 421 "               CMP     R0, #2\n"
 422 "               MOV     R0, #1\n"
 423 "               BNE     loc_FF986430\n"
 424 "               BL      sub_FFA8E174\n"
 425 "               B       loc_FF986434\n"
 426 "loc_FF986430:\n"
 427 "               BL      sub_FFA8CC70\n"
 428 "loc_FF986434:\n"
 429 "               STR     R8, [R7,#0xC4]\n"
 430 "               LDR     R0, [SP,#0x60]\n"
 431 "               LDR     R1, [SP,#0x58]\n"
 432 "               ADD     R9, R1, R0\n"
 433 "               LDR     R1, [SP,#0x54]\n"
 434 "               SUB     R10, R1, R0\n"
 435 "loc_FF98644C:\n"
 436 "               LDR     R0, [R7,#0xC]\n"
 437 "               LDR     R2, [R7,#0x64]\n"
 438 "               CMP     R0, #2\n"
 439 "               ADD     R3, SP, #0x5C\n"
 440 "               BNE     loc_FF9864A4\n"
 441 "               STRD    R2, [SP,#0x28]\n"
 442 "               MOV     R2, #0x18\n"
 443 "               ADD     R1, SP, #0x34\n"
 444 "               ADD     R0, SP, #0x10\n"
 445 "               BL      sub_FFB8745C\n"
 446 "               LDR     R1, [R7,#0x84]\n"
 447 "               LDR     R2, [R7,#0x88]\n"
 448 "               LDR     R3, [R7,#0x68]\n"
 449 "               ADD     R0, SP, #0x60\n"
 450 "               STMEA   SP, {R0-R3}\n"
 451 "               LDR     R2, [SP,#0x50]\n"
 452 "               LDR     R3, [SP,#0x4C]\n"
 453 "               MOV     R1, R10\n"
 454 "               MOV     R0, R9\n"
 455 "               BL      sub_FFA8E10C\n"
 456 "               BL      sub_FF853E4C\n"
 457 "               B       loc_FF9864FC\n"
 458 "loc_FF9864A4:\n"
 459 "               LDR     R1, [R7,#0x68]\n"
 460 "               LDR     R0, [R4,#0x20]\n"
 461 "               STR     R1, [SP,#0x20]\n"
 462 "               STR     R0, [SP,#0x1C]\n"
 463 "               STR     R2, [SP,#0x24]\n"
 464 "               STR     R3, [SP,#0x28]\n"
 465 "               LDR     R3, [R4,#0x1C]\n"
 466 "               LDR     R1, [R7,#0x84]\n"
 467 "               LDR     R2, [R7,#0x88]\n"
 468 "               ADD     R0, SP, #0x60\n"
 469 "               STR     R2, [SP,#0x14]\n"
 470 "               LDR     R2, [SP,#0x50]\n"
 471 "               STR     R1, [SP,#0x10]\n"
 472 "               STR     R3, [SP,#0x18]\n"
 473 "               LDR     R3, [SP,#0x4C]\n"
 474 "               STR     R0, [SP,#0xC]\n"
 475 "               STMFA   SP, {R2,R3}\n"
 476 "               STR     R10, [SP]\n"
 477 "               LDMIB   R4, {R0,R1}\n"
 478 "               MOV     R3, R9\n"
 479 "               MOV     R2, R11\n"
 480 "               BL      sub_FFA8CBBC\n"
 481 "loc_FF9864FC:\n"
 482 "               LDR     R0, [R7,#0x18]\n"
 483 "               LDR     R1, [R7,#0x60]\n"
 484 "               BL      sub_FF83B23C\n" //TakeSemaphore
 485 "               CMP     R0, #9\n"
 486 "               BNE     loc_FF98651C\n"
 487 "               MOV     R1, #0\n"
 488 "loc_FF986514:\n"
 489 "               MOV     R0, #0x90000\n"
 490 "               B       loc_FF986530\n"
 491 "loc_FF98651C:\n"
 492 "               LDR     R0, [SP,#0x5C]\n"
 493 "               CMP     R0, #0\n"
 494 "               BEQ     loc_FF986538\n"
 495 "               MOV     R1, #0\n"
 496 "loc_FF98652C:\n"
 497 "               MOV     R0, #0xA0000\n"
 498 "loc_FF986530:\n"
 499 "               BL      sub_FF98593C\n"
 500 "               B       loc_FF986100\n"
 501 "loc_FF986538:\n"
 502 "               LDR     R0, [R7,#0xC]\n"
 503 "               CMP     R0, #2\n"
 504 "               MOV     R0, #0\n"
 505 "               BNE     loc_FF986550\n"
 506 "               BL      sub_FFA8E174\n"
 507 "               B       loc_FF986554\n"
 508 "loc_FF986550:\n"
 509 "               BL      sub_FFA8CC70\n"
 510 
 511 // I think the patch shoud be here
 512 
 513 "loc_FF986554:\n"
 514 "               LDR     R0, [SP,#0x58]\n"
 515 "               LDR     R1, [SP,#0x60]\n"
 516 "               BL      sub_FFAD9EA4\n"  //__MovWriter.c__0 ;   LOCATION: MovWriter.c:0
 517 "               LDR     R0, [R7,#0x68]\n"
 518 "               LDR     R3, =0x7920\n"          // ---> -
 519 "               ADD     R1, R0, #1\n"           //       |
 520 "               STR     R1, [R7,#0x68]\n"       //       |
 521 "               STR     R3, [SP]\n"                     //       |
 522 "               LDR     R0, [R7,#0x64]\n"       //       |
 523 "               SUB     R3, R3, #4\n"           // ---> -
 524 "               AND     R2, R0, #0xFF\n"        //       |
 525 "               LDR     R0, [SP,#0x60]\n"       //       |
 526 "               BL      sub_FFAD7A9C\n"         //       |
 527                                                                 //       |
 528  "LDR     R0, =0x7920-4\n"      // -<---     // +
 529  "BL      set_quality\n"                     // +
 530 
 531 "loc_FF986588:\n"
 532 "               CMP     R6, #1\n"
 533 "               BNE     loc_FF98659C\n"
 534 
 535 "loc_FF986590:\n"
 536 "               BL      sub_FF853E50\n"
 537 "               MOV     R0, #1\n"
 538 "               BL      sub_FF853E54\n"
 539 
 540 "loc_FF98659C:\n"
 541 "               CMP     R5, #1\n"
 542 "               LDRNEH  R0, [R7,#6]\n"
 543 "               CMPNE   R0, #3\n"
 544 "               BNE     loc_FF986100\n"
 545 "               LDR     R0, [R7,#0x6C]\n"
 546 "               ADD     R0, R0, #1\n"
 547 "               STR     R0, [R7,#0x6C]\n"
 548 "               LDRH    R1, [R7,#6]\n"
 549 "               CMP     R1, #3\n"
 550 "               LDRNE   R1, [R7,#0x54]\n"
 551 "               LDREQ   R1, =0x3E9\n"
 552 "               MUL     R0, R1, R0\n"
 553 "               LDREQ   R1, =0x1770\n"
 554 "               LDRNE   R1, [R7,#0x50]\n"
 555 "               BL      sub_FFB89ABC\n"
 556 "               MOV     R4, R0\n"
 557 "               BL      sub_FFADA558\n"
 558 "               LDR     R0, [R7,#0x8C]\n"
 559 "               CMP     R0, R4\n"
 560 "               BNE     loc_FF9865F8\n"
 561 "               LDR     R0, [R7,#0x3C]\n"
 562 "               CMP     R0, #1\n"
 563 "               BNE     loc_FF98660C\n"
 564 "loc_FF9865F8:\n"
 565 "               LDR     R1, [R7,#0x98]\n"
 566 "               MOV     R0, R4\n"
 567 "               BLX     R1\n"
 568 "               STR     R4, [R7,#0x8C]\n"
 569 "               STR     R8, [R7,#0x3C]\n"
 570 "loc_FF98660C:\n"
 571 "               STR     R8, [R7,#0x38]\n"
 572 "               B       loc_FF986100\n"
 573 
 574 //Other stuff??? was at the end
 575 "loc_FF986C68:\n"
 576 "LDR     R0, =0xB0330\n"
 577 "LDR     R0, [R0,#8]\n"
 578 "CMP     R0, #0\n"
 579 "BEQ     sub_FF984F68\n" //__MovieRecorder.c__100
 580 "BNE     sub_FF866E24\n"
 581 
 582 
 583 
 584  );
 585 }
 586 
 587 
 588 
 589 
 590 
 591 
 592 
 593 
 594 
 595 
 596 
 597 

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