root/platform/ixus1000_sd4500/sub/102b/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_FF986044_my

   1 #include "conf.h"
   2 #include "lolevel.h"
   3 #include "platform.h"
   4 #include "core.h"
   5 #include "dryos31.h"
   6 
   7 //IXUS 1000 102B
   8 // mwvent82: taken from reference sub 100D and adjusted what needs to be adjusted
   9 //           most location labels are left as 100D with the 'real' 102B locations commented in some cases
  10 
  11 void change_video_tables(int a, int b){
  12 }
  13 
  14 
  15 void  set_quality(int *x){ // -17 highest; +12 lowest
  16  if (conf.video_mode) *x=12-((conf.video_quality-1)*(12+17)/(99-1));
  17 }
  18 
  19 // ASM1989, rereview 19.09.10 FF986650
  20 void __attribute__((naked,noinline)) movie_record_task(){
  21  asm volatile(
  22  // 102B : ROM:FF986714
  23 "               STMFD   SP!, {R2-R10,LR}\n"
  24 // "            LDR     R10, =0x5EE\n" // not in 100F nor 102B
  25 "               LDR     R9, =0x2710\n"
  26 "               LDR     R7, =0xFF9858B0\n" //nullsub_357
  27 "       LDR     R4, =0x7898\n" // not in 100D
  28 "       MOV     R8, #1\n"  // not in 100D
  29 
  30 //looks like it is the one to work with?
  31 //"             LDR     R6, =0xFF986044\n" //__MovieRecorder.c__0 ;     LOCATION: MovieRecorder.c:0
  32 "               LDR     R6, =sub_FF986044_my\n" //__MovieRecorder.c__0 ;        LOCATION: MovieRecorder.c:0 // sub_FF986100 in 102B
  33 
  34 // "            LDR     R4, =0x7898\n" // not in 102B
  35 // "            MOV     R8, #1\n"  //  not in 102B
  36 "               MOV     R5, #0\n"
  37 "loc_FF986670:\n" // 102B: loc_FF986730
  38 "               LDR     R0, [R4,#0x24]\n"
  39 "               MOV     R2, #0\n"
  40 "               ADD     R1, SP, #0x4\n"
  41 "               BL      sub_FF83AE20\n"  //__KerQueue.c__0 ; LOCATION: KerQueue.c:0
  42 "               LDR     R0, [R4,#0x2C]\n"
  43 "               CMP     R0, #0\n"
  44 "               LDRNE   R0, [R4,#0xC]\n"
  45 "               CMPNE   R0, #2\n"
  46 "               LDRNE   R0, [R4,#0x44]\n"
  47 "               CMPNE   R0, #6\n"
  48 "               BNE     loc_FF986794\n"
  49 "               LDR     R0, [SP,#0x4]\n"
  50 "               LDR     R1, [R0]\n"
  51 "               SUB     R1, R1, #2\n"
  52 "               CMP     R1, #0xA\n"
  53 "               ADDLS   PC, PC, R1,LSL#2\n"
  54 "               B       loc_FF986794\n"
  55 // havent bothered commenting all the 'real' locations below in the 102B fw and left as 100D
  56 "loc_FF9866B4:\n"
  57 "               B       loc_FF986744\n"
  58 "loc_FF9866B8:\n"
  59 "               B       loc_FF986768\n"
  60 "loc_FF9866BC:\n"
  61 "               B       loc_FF986778\n"
  62 "loc_FF9866C0:\n"
  63 "               B       loc_FF986780\n"
  64 "loc_FF9866C4:\n"
  65 "               B       loc_FF98674C\n"
  66 "loc_FF9866C8:\n"
  67 "               B       loc_FF986788\n"
  68 "loc_FF9866CC:\n"
  69 "               B       loc_FF986758\n"
  70 "loc_FF9866D0:\n"
  71 "               B       loc_FF986794\n"
  72 "loc_FF9866D4:\n"
  73 "               B       loc_FF986790\n"
  74 "loc_FF9866D8:\n"
  75 "               B       loc_FF986710\n"
  76 "loc_FF9866DC:\n"
  77 "               B       loc_FF9866E0\n"
  78 "loc_FF9866E0:\n"
  79 "               STR     R5, [R4,#0x40]\n"
  80 "               STR     R5, [R4,#0x30]\n"
  81 "               STR     R5, [R4,#0x34]\n"
  82 "               STRH    R5, [R4,#6]\n"
  83 "               STR     R6, [R4,#0xCC]\n"
  84 "               STR     R7, [R4,#0xB4]\n"
  85 "               LDR     R0, [R4,#0xC]\n"
  86 "               ADD     R0, R0, #1\n"
  87 "               STR     R0, [R4,#0xC]\n"
  88 "               MOV     R0, #6\n"
  89 "               STR     R0, [R4,#0x44]\n"
  90 "               B       loc_FF986730\n"
  91 "loc_FF986710:\n"
  92 "               STR     R5, [R4,#0x40]\n"
  93 "               STR     R5, [R4,#0x30]\n"
  94 "               STR     R6, [R4,#0xCC]\n"
  95 "               STR     R7, [R4,#0xB4]\n"
  96 "               LDR     R0, [R4,#0xC]\n"
  97 "               ADD     R0, R0, #1\n"
  98 "               STR     R0, [R4,#0xC]\n"
  99 "               STR     R8, [R4,#0x44]\n"
 100 "loc_FF986730:\n"
 101 "               LDR     R2, =0xFF98508C\n"
 102 "               LDR     R1, =0xB0300\n"
 103 "               LDR     R0, =0xFF9851A0\n"
 104 "               BL      sub_FF8530AC\n"
 105 "               B       loc_FF986794\n"
 106 "loc_FF986744:\n"
 107   //     "BL      unlock_optical_zoom\n"                  -----------> inserted to unlock the zoom, dont need in sx210
 108 "               BL      sub_FF985DDC\n" //__MovieRecorder.c__0
 109 "               B       loc_FF986794\n"
 110 "loc_FF98674C:\n"
 111 "               LDR     R1, [R4,#0xCC]\n"
 112 "               BLX     R1\n"
 113 "               B       loc_FF986794\n"
 114 "loc_FF986758:\n"
 115 "               LDR     R1, [R0,#0x18]\n"
 116 "               LDR     R0, [R0,#4]\n"
 117 "               BL      sub_FFAD9C30\n" //__MovWriter.c__0 ;    LOCATION: MovWriter.c:0
 118 "               B       loc_FF986794\n"
 119 "loc_FF986768:\n"
 120 "               LDR     R0, [R4,#0x44]\n"
 121 "               CMP     R0, #5\n"
 122 "               STRNE   R8, [R4,#0x34]\n"
 123 "               B       loc_FF986794\n"
 124 "loc_FF986778:\n"
 125 "               BL      sub_FF98555C\n"  //__MovieRecorder.c__1000
 126 "               B       loc_FF986794\n"
 127 "loc_FF986780:\n"
 128 "               BL      sub_FF9851EC\n"  //__MovieRecorder.c__0
 129 "               B       loc_FF986794\n"
 130 "loc_FF986788:\n"
 131 "               BL      sub_FF985018\n"  //__MovieRecorder.c__100
 132 "               B       loc_FF986794\n"
 133 "loc_FF986790:\n"
 134 "               BL      sub_FF986C48\n"  //__MovieRecorder.c__100
 135 "loc_FF986794:\n"
 136 "               LDR     R1, [SP,#0x4]\n"
 137 "               MOV     R3, #0x5F0\n"  //Not present in 100D
 138 "               STR     R5, [R1]\n"
 139 "               STR     R3, [SP]\n"
 140 "               LDR     R0, [R4,#0x28]\n"
 141 "       LDR     R3, =0xFF984CE4\n" // MovieRecorder.c Not present in 100D
 142 "               MOV     R2, R9\n"
 143 "               BL      sub_FF83B774\n"
 144 "               B       loc_FF986670\n"
 145 
 146  );
 147 }  //asm1989 14.11.10 done
 148 
 149 void __attribute__((naked,noinline)) sub_FF986044_my(){      // in sx200:sub_FF937C70_my in 102: FF986100
 150  asm volatile(
 151 "               STMFD   SP!, {R4-R11,LR}\n"
 152 "               SUB     SP, SP, #0x64\n"
 153 "               MOV     R8, #0\n"
 154 "               LDR     R7, =0x7898\n"
 155 "               STR     R8, [SP,#0x54]\n"
 156 "               STR     R8, [SP,#0x4C]\n"
 157 "               STR     R8, [R7,#0xB8]\n"
 158 "               STR     R8, [R7,#0xBC]\n"
 159 "               STR     R8, [R7,#0xC0]\n"
 160 "               MOV     R4, R0\n"
 161 "               STR     R8, [R7,#0xC4]\n"
 162 "               LDR     R0, [R7,#0x44]\n"
 163 "               MOV     R9, #0\n"
 164 "               CMP     R0, #3\n"
 165 "               MOVEQ   R0, #4\n"
 166 "               STREQ   R0, [R7,#0x44]\n"
 167 "               LDR     R0, [R7,#0xB4]\n"
 168 "               MOV     R6, #0\n"
 169 "               MOV     R5, #1\n"
 170 "               BLX     R0\n"
 171 "               LDR     R0, [R7,#0x44]\n"
 172 "               CMP     R0, #6\n"
 173 "               BEQ     loc_FF9860B4\n"
 174 //ASM_SAFE("BL blink\n")
 175 "               LDR     R1, [R7,#0xC]\n"
 176 "               CMP     R1, #2\n"
 177 "               BNE     loc_FF9860DC\n"
 178 "               CMP     R0, #5\n"
 179 "               BEQ     loc_FF9860EC\n"
 180 "loc_FF9860B4:\n"
 181 "               MOV     R6, #1\n"
 182 "               ADD     R3, SP, #0x34\n"
 183 "               LDR     R2, =0xFF985FE0\n"  //"         ADR     R2, sub_FF985F24\n"
 184 "               LDR     R1, =0xFF986040\n"
 185 "               LDR     R0, =0xFF9860A0\n"
 186 "               BL      sub_FF853E78\n"
 187 "               LDR     R0, [R7,#0x44]\n"
 188 "               CMP     R0, #4\n"
 189 "               MOVNE   R5, #0\n"
 190 "               B       loc_FF9860FC\n"
 191 "loc_FF9860DC:\n"
 192 "               CMP     R0, #4\n"
 193 "               BEQ     loc_FF9860FC\n"
 194 "               CMP     R1, #2\n"
 195 "               BNE     loc_FF9860F4\n"
 196 "loc_FF9860EC:\n"
 197 "               MOV     R0, #0\n"
 198 "               BL      sub_FF853E84\n"
 199 "loc_FF9860F4:\n"
 200 "               ADD     SP, SP, #0x64\n"
 201 "               LDMFD   SP!, {R4-R11,PC}\n"
 202 "loc_FF9860FC:\n"
 203 "               LDRH    R0, [R7,#6]\n"
 204 "               CMP     R0, #1\n"
 205 "               LDREQ   R1, =0x809\n"
 206 "               LDREQ   R0, =0xFF984CE4\n" //aMovierecorder_c
 207 "               BLEQ    sub_FF81EB78\n" //DebugAssert
 208 "               LDRH    R0, [R7,#6]\n"
 209 "               CMP     R0, #3\n"
 210 "               BNE     loc_FF986130\n"
 211 "               LDR     R0, [R7,#0x6C]\n"
 212 "               LDR     R1, [R7,#0xC8]\n"
 213 "               BL      sub_FFB89BB4\n"
 214 "               CMP     R1, #0\n"
 215 "               MOVNE   R5, #0\n"
 216 "loc_FF986130:\n"
 217 "               LDR     R0, [R7,#0x44]\n"
 218 "               CMP     R0, #6\n"
 219 "               CMPNE   R0, #1\n"
 220 "               CMPNE   R0, #3\n"
 221 "               BNE     loc_FF986174\n"
 222 "               CMP     R6, #1\n"
 223 "               CMPEQ   R5, #0\n"
 224 "               BNE     loc_FF986174\n"
 225 "               BL      sub_FF853E7C\n"
 226 "               LDR     R0, [R7,#0x18]\n"
 227 "               MOV     R1, #0x3E8\n"
 228 "               BL      sub_FF83B23C\n" //TakeSemaphore
 229 "               CMP     R0, #9\n"
 230 "               BNE     loc_FF986584\n"
 231 "               MOV     R0, #0x90000\n"
 232 "               BL      sub_FF89C988\n" //HardwareDefect
 233 "               B       loc_FF9860F4\n"
 234 "loc_FF986174:\n"
 235 "               CMP     R5, #1\n"
 236 "               MOV     R10, #1\n"
 237 "               BNE     loc_FF98619C\n"
 238 "               ADD     R3, SP, #0x4C\n"
 239 "               ADD     R2, SP, #0x50\n"
 240 "               ADD     R1, SP, #0x54\n"
 241 "               ADD     R0, SP, #0x58\n"
 242 "               BL      sub_FFAD9D58\n"  //__MovWriter.c__0 ;   LOCATION: MovWriter.c:0
 243 "               MOVS    R9, R0\n"
 244 "               BNE     loc_FF9861B8\n"
 245 "loc_FF98619C:\n"
 246 "               LDR     R0, [R7,#0x34]\n"
 247 "               CMP     R0, #1\n"
 248 "               BNE     loc_FF9862F4\n"
 249 "               LDR     R0, [R7,#0x6C]\n"
 250 "               LDR     R1, [R7,#0x48]\n"
 251 "               CMP     R0, R1\n"
 252 "               BCC     loc_FF9862F4\n"
 253 "loc_FF9861B8:\n"
 254 "               MOV     R0, R9\n"
 255 "               BL      sub_FF985A68\n"
 256 "               LDR     R0, [R7,#0xC]\n"
 257 "               CMP     R0, #2\n"
 258 "               BNE     loc_FF986228\n"
 259 "               MOV     R1, #0\n"
 260 "               LDR     R0, =0xFF985FD4\n" //"          ADR     R0, =0xFF985F18\n"
 261 "               BL      sub_FFA8E274\n"
 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_FFB87554\n"
 269 "               LDR     R1, [R7,#0x84]\n"
 270 "               LDR     R2, [R7,#0x88]\n"
 271 "               MOV     R3, #0xFFFFFFFE\n"
 272 "               ADD     R0, SP, #0x60\n"
 273 "               STMEA   SP, {R0-R3}\n"
 274 "               LDR     R0, =0xB0348\n"
 275 "               MOV     R3, #0\n"
 276 "               MOV     R2, #0\n"
 277 "               MOV     R1, #0x40\n"
 278 "               BL      sub_FFA8E1CC\n"
 279 "               B       loc_FF98627C\n"
 280 "loc_FF986220:\n"
 281 "               MOV     R1, #1\n"
 282 "               B       loc_FF986508\n"
 283 "loc_FF986228:\n"
 284 "               BL      loc_FF986C60\n"
 285 "               LDR     R2, [R7,#0x64]\n"
 286 "               ADD     R3, SP, #0x5C\n"
 287 "               MOV     R1, #0xFFFFFFFE\n" 
 288 "               MOV     R0, #0\n"
 289 "               ADD     R5, SP, #0x1C\n"
 290 "               STMIA   R5, {R0-R3}\n"
 291 "               LDR     R3, [R4,#0x1C]\n"
 292 "               LDR     R1, [R7,#0x84]\n"
 293 "               LDR     R2, [R7,#0x88]\n"
 294 "               ADD     R4, SP, #0xC\n"
 295 "               ADD     R0, SP, #0x60\n"
 296 "               STMIA   R4, {R0-R3}\n"
 297 "               MOV     R3, #0\n"
 298 "               MOV     R1, #0x40\n"
 299 "               MOV     R2, #0\n"
 300 "               STMEA   SP, {R1-R3}\n"
 301 "               LDR     R3, =0xB0348\n"
 302 "               MOV     R1, #0\n"
 303 "               MOV     R0, #0\n"
 304 "               BL      sub_FFA8CC7C\n"
 305 
 306 "loc_FF98627C:\n"
 307 "               LDR     R0, [R7,#0x18]\n"
 308 "               LDR     R1, [R7,#0x60]\n"
 309 "               BL      sub_FF83B23C\n" //TakeSemaphore
 310 "               CMP     R0, #9\n"
 311 "               BEQ     loc_FF986220\n"
 312 "               LDR     R0, [SP,#0x5C]\n"
 313 "               CMP     R0, #0\n"
 314 "               BEQ     loc_FF9862A4\n"
 315 
 316 "loc_FF98629C:\n"
 317 "               MOV     R1, #1\n"
 318 "               B       loc_FF986520\n"
 319 
 320 "loc_FF9862A4:\n"
 321 "               LDR     R0, [R7,#0xC]\n"
 322 "               MOV     R4, #5\n"
 323 "               CMP     R0, #2\n"
 324 "               MOV     R0, #1\n"
 325 "               BNE     loc_FF9862E0\n"
 326 "               BL      sub_FFA8E234\n"
 327 "               BL      sub_FFA8E25C\n"
 328 "               MOV     R0, #0\n"
 329 "               BL      sub_FF853E84\n"
 330 "               BL      sub_FF853E94\n"
 331 "               STR     R4, [R7,#0x44]\n"
 332 "               BL      loc_FF986C60\n"
 333 "               BL      sub_FF853EF0\n"
 334 "               STR     R10, [R7,#0x44]\n"
 335 "               B       loc_FF9862EC\n"
 336 "loc_FF9862E0:\n"
 337 "               BL      sub_FFA8CD30\n"
 338 "               BL      sub_FFA8CD90\n"
 339 "               STR     R4, [R7,#0x44]\n"
 340 "loc_FF9862EC:\n"
 341 "               STR     R8, [R7,#0x34]\n"
 342 "               B       loc_FF9860F4\n"
 343 "loc_FF9862F4:\n"
 344 "               CMP     R5, #1\n"
 345 "               BNE     loc_FF98657C\n"
 346 "               STR     R10, [R7,#0x38]\n"
 347 "               LDR     R0, [R7,#0x6C]\n"
 348 "               LDR     R11, [R4,#0xC]\n"
 349 "               CMP     R0, #0\n"
 350 "               LDRNE   R9, [SP,#0x58]\n"
 351 "               LDRNE   R10, [SP,#0x54]\n"
 352 "               BNE     loc_FF986440\n"
 353 "               LDR     R0, [R7,#0xC]\n"
 354 "               CMP     R0, #2\n"
 355 "               BNE     loc_FF986398\n"
 356 "               LDR     R0, =0xFF985FD4\n"
 357 "               MOV     R1, #0\n"
 358 "               BL      sub_FFA8E274\n"
 359 "               LDR     R2, [R7,#0x64]\n"
 360 "               ADD     R3, SP, #0x5C\n"
 361 "               STRD    R2, [SP,#0x28]\n"
 362 "               MOV     R2, #0x18\n"
 363 "               ADD     R1, SP, #0x34\n"
 364 "               ADD     R0, SP, #0x10\n"
 365 "               BL      sub_FFB87554\n"
 366 "               LDR     R1, [R7,#0x84]\n"
 367 "               LDR     R2, [R7,#0x88]\n"
 368 "               MOV     R3, #0xFFFFFFFF\n"
 369 "               ADD     R0, SP, #0x60\n"
 370 "               STMEA   SP, {R0-R3}\n"
 371 "               LDR     R0, [SP,#0x58]\n"
 372 "               LDR     R1, [SP,#0x54]\n"
 373 "               LDR     R2, [SP,#0x50]\n"
 374 "               LDR     R3, [SP,#0x4C]\n"
 375 "               BL      sub_FFA8E1CC\n"
 376 "               LDR     R0, [R7,#0x18]\n"
 377 "               LDR     R1, [R7,#0x60]\n"
 378 "               BL      sub_FF83B23C\n" //TakeSemaphore
 379 "               CMP     R0, #9\n"
 380 "               BEQ     loc_FF986220\n"
 381 "               LDR     R0, =0xFF9859A4\n"
 382 "               MOV     R1, #0\n"
 383 "               BL      sub_FFA8E274\n"
 384 "               B       loc_FF986400\n"
 385 "loc_FF986398:\n"
 386 "               LDR     R0, [R4,#0x20]\n"
 387 "               LDR     R2, [R7,#0x64]\n"
 388 "               ADD     R3, SP, #0x5C\n"
 389 "               MOV     R1, #0xFFFFFFFF\n"
 390 "               ADD     R9, SP, #0x1C\n"
 391 "               STMIA   R9, {R0-R3}\n"
 392 "               LDR     R3, [R4,#0x1C]\n"
 393 "               LDR     R1, [R7,#0x84]\n"
 394 "               LDR     R2, [R7,#0x88]\n"
 395 "               ADD     R0, SP, #0x60\n"
 396 "               ADD     R9, SP, #0xC\n"
 397 "               STMIA   R9, {R0-R3}\n"
 398 "               LDR     R1, [SP,#0x50]\n"
 399 "               LDR     R2, [SP,#0x54]\n"
 400 "               LDR     R3, [SP,#0x4C]\n"
 401 "               STMFA   SP, {R1,R3}\n"
 402 "               STR     R2, [SP]\n"
 403 "               LDMIB   R4, {R0,R1}\n"
 404 "               LDR     R3, [SP,#0x58]\n"
 405 "               MOV     R2, R11\n"
 406 "               BL      sub_FFA8CC7C\n"
 407 "               LDR     R0, [R7,#0x18]\n"
 408 "               LDR     R1, [R7,#0x60]\n"
 409 "               BL      sub_FF83B23C\n" //TakeSemaphore
 410 "               CMP     R0, #9\n"
 411 "               BEQ     loc_FF986220\n"
 412 "loc_FF986400:\n"
 413 "               LDR     R0, [SP,#0x5C]\n"
 414 "               CMP     R0, #0\n"
 415 "               BNE     loc_FF98629C\n"
 416 "               LDR     R0, [R7,#0xC]\n"
 417 "               CMP     R0, #2\n"
 418 "               MOV     R0, #1\n"
 419 "               BNE     loc_FF986424\n"
 420 "               BL      sub_FFA8E234\n"
 421 "               B       loc_FF986428\n"
 422 "loc_FF986424:\n"
 423 "               BL      sub_FFA8CC6C\n"
 424 "loc_FF986428:\n"
 425 "               STR     R8, [R7,#0xC4]\n"
 426 "               LDR     R0, [SP,#0x60]\n"
 427 "               LDR     R1, [SP,#0x58]\n"
 428 "               ADD     R9, R1, R0\n"
 429 "               LDR     R1, [SP,#0x54]\n"
 430 "               SUB     R10, R1, R0\n"
 431 "loc_FF986440:\n"
 432 "               LDR     R0, [R7,#0xC]\n"
 433 "               LDR     R2, [R7,#0x64]\n"
 434 "               CMP     R0, #2\n"
 435 "               ADD     R3, SP, #0x5C\n"
 436 "               BNE     loc_FF986498\n"
 437 "               STRD    R2, [SP,#0x28]\n"
 438 "               MOV     R2, #0x18\n"
 439 "               ADD     R1, SP, #0x34\n"
 440 "               ADD     R0, SP, #0x10\n"
 441 "               BL      sub_FFB87554\n"
 442 "               LDR     R1, [R7,#0x84]\n"
 443 "               LDR     R2, [R7,#0x88]\n"
 444 "               LDR     R3, [R7,#0x68]\n"
 445 "               ADD     R0, SP, #0x60\n"
 446 "               STMEA   SP, {R0-R3}\n"
 447 "               LDR     R2, [SP,#0x50]\n"
 448 "               LDR     R3, [SP,#0x4C]\n"
 449 "               MOV     R1, R10\n"
 450 "               MOV     R0, R9\n"
 451 "               BL      sub_FFA8E1CC\n"
 452 "               BL      sub_FF853E7C\n"
 453 "               B       loc_FF9864F0\n"
 454 "loc_FF986498:\n"
 455 "               LDR     R1, [R7,#0x68]\n"
 456 "               LDR     R0, [R4,#0x20]\n"
 457 "               STR     R1, [SP,#0x20]\n"
 458 "               STR     R0, [SP,#0x1C]\n"
 459 "               STR     R2, [SP,#0x24]\n"
 460 "               STR     R3, [SP,#0x28]\n"
 461 "               LDR     R3, [R4,#0x1C]\n"
 462 "               LDR     R1, [R7,#0x84]\n"
 463 "               LDR     R2, [R7,#0x88]\n"
 464 "               ADD     R0, SP, #0x60\n"
 465 "               STR     R2, [SP,#0x14]\n"
 466 "               LDR     R2, [SP,#0x50]\n"
 467 "               STR     R1, [SP,#0x10]\n"
 468 "               STR     R3, [SP,#0x18]\n"
 469 "               LDR     R3, [SP,#0x4C]\n"
 470 "               STR     R0, [SP,#0xC]\n"
 471 "               STMFA   SP, {R2,R3}\n"
 472 "               STR     R10, [SP]\n"
 473 "               LDMIB   R4, {R0,R1}\n"
 474 "               MOV     R3, R9\n"
 475 "               MOV     R2, R11\n"
 476 "               BL      sub_FFA8CC7C\n"
 477 "loc_FF9864F0:\n"
 478 "               LDR     R0, [R7,#0x18]\n"
 479 "               LDR     R1, [R7,#0x60]\n"
 480 "               BL      sub_FF83B23C\n" //TakeSemaphore
 481 "               CMP     R0, #9\n"
 482 "               BNE     loc_FF986510\n"
 483 "               MOV     R1, #0\n"
 484 "loc_FF986508:\n"
 485 "               MOV     R0, #0x90000\n"
 486 "               B       loc_FF986524\n"
 487 "loc_FF986510:\n"
 488 "               LDR     R0, [SP,#0x5C]\n"
 489 "               CMP     R0, #0\n"
 490 "               BEQ     loc_FF98652C\n"
 491 "               MOV     R1, #0\n"
 492 "loc_FF986520:\n"
 493 "               MOV     R0, #0xA0000\n"
 494 "loc_FF986524:\n"
 495 "               BL      sub_FF9859EC\n"
 496 "               B       loc_FF9860F4\n"
 497 "loc_FF98652C:\n"
 498 "               LDR     R0, [R7,#0xC]\n"
 499 "               CMP     R0, #2\n"
 500 "               MOV     R0, #0\n"
 501 "               BNE     loc_FF986544\n"
 502 "               BL      sub_FFA8E234\n"
 503 "               B       loc_FF986548\n"
 504 "loc_FF986544:\n"
 505 "               BL      sub_FFA8CD30\n"
 506 
 507 // I think the patch shoud be here
 508 
 509 "loc_FF986548:\n"
 510 "               LDR     R0, [SP,#0x58]\n"
 511 "               LDR     R1, [SP,#0x60]\n"
 512 "               BL      sub_FFAD9F90\n"  //__MovWriter.c__0 ;   LOCATION: MovWriter.c:0
 513 "               LDR     R0, [R7,#0x68]\n"
 514 "               LDR     R3, =0x7920\n"          // ---> -
 515 "               ADD     R1, R0, #1\n"           //       |
 516 "               STR     R1, [R7,#0x68]\n"       //       |
 517 "               STR     R3, [SP]\n"                     //       |
 518 "               LDR     R0, [R7,#0x64]\n"       //       |
 519 "               SUB     R3, R3, #4\n"           // ---> -
 520 "               AND     R2, R0, #0xFF\n"        //       |
 521 "               LDR     R0, [SP,#0x60]\n"       //       |
 522 "               BL      sub_FFAD7B88\n"         //       |
 523                                                                 //       |
 524  "LDR     R0, =0x7920-4\n"      // -<---     // +
 525  "BL      set_quality\n"                     // +
 526 
 527 "loc_FF98657C:\n"
 528 "               CMP     R6, #1\n"
 529 "               BNE     loc_FF986590\n"
 530 
 531 "loc_FF986584:\n"
 532 "               BL      sub_FF853E80\n"
 533 "               MOV     R0, #1\n"
 534 "               BL      sub_FF853E84\n"
 535 
 536 "loc_FF986590:\n"
 537 "               CMP     R5, #1\n"
 538 "               LDRNEH  R0, [R7,#6]\n"
 539 "               CMPNE   R0, #3\n"
 540 "               BNE     loc_FF9860F4\n"
 541 "               LDR     R0, [R7,#0x6C]\n"
 542 "               ADD     R0, R0, #1\n"
 543 "               STR     R0, [R7,#0x6C]\n"
 544 "               LDRH    R1, [R7,#6]\n"
 545 "               CMP     R1, #3\n"
 546 "               LDRNE   R1, [R7,#0x54]\n"
 547 "               LDREQ   R1, =0x3E9\n"
 548 "               MUL     R0, R1, R0\n"
 549 "               LDREQ   R1, =0x1770\n"
 550 "               LDRNE   R1, [R7,#0x50]\n"
 551 "               BL      sub_FFB89BB4\n"
 552 "               MOV     R4, R0\n"
 553 "               BL      sub_FFADA644\n"
 554 "               LDR     R0, [R7,#0x8C]\n"
 555 "               CMP     R0, R4\n"
 556 "               BNE     loc_FF9865EC\n"
 557 "               LDR     R0, [R7,#0x3C]\n"
 558 "               CMP     R0, #1\n"
 559 "               BNE     loc_FF986600\n"
 560 "loc_FF9865EC:\n"
 561 "               LDR     R1, [R7,#0x98]\n"
 562 "               MOV     R0, R4\n"
 563 "               BLX     R1\n"
 564 "               STR     R4, [R7,#0x8C]\n"
 565 "               STR     R8, [R7,#0x3C]\n"
 566 "loc_FF986600:\n"
 567 "               STR     R8, [R7,#0x38]\n"
 568 "               B       loc_FF9860F4\n"
 569 //Other stuff??? was at the end - conf also in 102B
 570 "loc_FF986C60:\n"
 571 "LDR     R0, =0xB0330\n"
 572 "LDR     R0, [R0,#8]\n"
 573 "CMP     R0, #0\n"
 574 "BEQ     sub_FF985018\n" //__MovieRecorder.c__100
 575 "BNE     sub_FF866E50\n"
 576 
 577  );
 578 }
 579 
 580 
 581 
 582 
 583 
 584 
 585 
 586 
 587 
 588 
 589 
 590 

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