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

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