root/platform/ixus120_sd940/sub/102c/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_FF93CFDC_my

   1 #include "conf.h"
   2 
   3 
   4 /*----------------------------------------------------------------------
   5         change_video_tables()
   6 -----------------------------------------------------------------------*/
   7 void change_video_tables(int a, int b)
   8 {
   9 }
  10 
  11 
  12 /*----------------------------------------------------------------------
  13         set_quality()
  14 -----------------------------------------------------------------------*/
  15 // from sx10, not sure if the values are right, seems to work
  16 void  set_quality(int *x){ // -17 highest; +12 lowest
  17         if (conf.video_mode)
  18                 *x=12-((conf.video_quality-1)*(12+17)/(99-1));
  19 }
  20 
  21 
  22 /*----------------------------------------------------------------------
  23         movie_record_task()
  24 -----------------------------------------------------------------------*/
  25 void __attribute__((naked,noinline)) movie_record_task()
  26 {       asm volatile(
  27 "               STMFD   SP!, {R2-R8,LR} \n"
  28 "               LDR     R7, =0x2710 \n"
  29 "               LDR     R4, =0x6228 \n"
  30 "               MOV     R6, #0 \n"
  31 "               MOV     R5, #1 \n"
  32 "loc_FF93D65C: \n"
  33 "               LDR     R0, [R4,#0x18] \n"
  34 "               MOV     R2, #0 \n"
  35 "               ADD     R1, SP, #0x04 \n"
  36 "               BL      sub_FF837DC8 \n"
  37 "               LDR     R0, [R4,#0x20] \n"
  38 "               CMP     R0, #0 \n"
  39 "               BNE     loc_FF93D72C \n"
  40 "               LDR     R0, [SP,#0x04] \n"
  41 "               LDR     R1, [R0] \n"
  42 "               SUB     R1, R1, #2 \n"
  43 "               CMP     R1, #9 \n"
  44 "               ADDLS   PC, PC, R1,LSL#2 \n"
  45 "               B       loc_FF93D72C \n"
  46 "loc_FF93D690: \n"
  47 "               B       loc_FF93D6E0 \n"
  48 "loc_FF93D694: \n"
  49 "               B       loc_FF93D700 \n"
  50 "loc_FF93D698: \n"
  51 "               B       loc_FF93D710 \n"
  52 "loc_FF93D69C: \n"
  53 "               B       loc_FF93D718 \n"
  54 "loc_FF93D6A0: \n"
  55 "               B       loc_FF93D6E8 \n"
  56 "loc_FF93D6A4: \n"
  57 "               B       loc_FF93D720 \n"
  58 "loc_FF93D6A8: \n"
  59 "               B       loc_FF93D6F0 \n"
  60 "loc_FF93D6AC: \n"
  61 "               B       loc_FF93D72C \n"
  62 "loc_FF93D6B0: \n"
  63 "               B       loc_FF93D728 \n"
  64 "loc_FF93D6B4: \n"
  65 "               B       loc_FF93D6B8 \n"
  66 
  67 "loc_FF93D6B8: \n"
  68 // jumptable FF93D688 entry 9
  69 "               LDR     R0, =0xFF93D35C \n"                             // nullsub_229
  70 "               STR     R6, [R4,#0x34] \n"
  71 "               STR     R0, [R4,#0x9C] \n"
  72 "               LDR     R2, =0xFF93C890 \n"
  73 "               LDR     R1, =0x67F58 \n"
  74 "               LDR     R0, =0xFF93C974 \n"
  75 "               STR     R6, [R4,#0x24] \n"
  76 "               BL      sub_FF8D9F28 \n"
  77 "               STR     R5, [R4,#0x38] \n"
  78 "               B       loc_FF93D72C \n"
  79 
  80 "loc_FF93D6E0: \n"   // jumptable FF93D688 entry 0
  81 "               BL     unlock_optical_zoom \n"          // patched
  82 "               BL      sub_FF93D464 \n"
  83 "               B       loc_FF93D72C \n"
  84 
  85 "loc_FF93D6E8: \n"  // jumptable FF93D688 entry 4
  86 //"             BL      sub_FF93CFDC \n"
  87 "               BL      sub_FF93CFDC_my \n"                             // patched
  88 "               B       loc_FF93D72C \n"
  89 
  90 "loc_FF93D6F0: \n"  // jumptable FF93D688 entry 6
  91 "               LDR     R1, [R0,#0x18] \n"
  92 "               LDR     R0, [R0,#4] \n"
  93 "               BL      sub_FFA63B44 \n"
  94 "               B       loc_FF93D72C \n"
  95 
  96 "loc_FF93D700: \n"  // jumptable FF93D688 entry 1
  97 "               LDR     R0, [R4,#0x38] \n"
  98 "               CMP     R0, #5 \n"
  99 "               STRNE   R5, [R4,#0x28] \n"
 100 "               B       loc_FF93D72C \n"
 101 
 102 "loc_FF93D710: \n" // jumptable FF93D688 entry 2
 103 "               BL      sub_FF93CCDC \n"
 104 "               B       loc_FF93D72C \n"
 105 
 106 "loc_FF93D718: \n"  // jumptable FF93D688 entry 3
 107 "               BL      sub_FF93C9C0 \n"
 108 "               B       loc_FF93D72C \n"
 109 
 110 "loc_FF93D720: \n"  // jumptable FF93D688 entry 5
 111 "               BL      sub_FF93C81C \n"
 112 "               B       loc_FF93D72C \n"
 113 
 114 "loc_FF93D728: \n"  // jumptable FF93D688 entry 8
 115 "               BL      sub_FF93D898 \n"
 116 
 117 "loc_FF93D72C: \n"  // jumptable FF93D688 default entry
 118 "               LDR     R1, [SP,#0x04] \n"
 119 "               MOV     R3, #0x460 \n"
 120 "               STR     R6, [R1] \n"
 121 "               STR     R3, [SP] \n"
 122 "               LDR     R0, [R4,#0x1C] \n"
 123 "               LDR     R3, =0xFF93C67C \n"                     // aMovierecorder_
 124 "               MOV     R2, R7 \n"
 125 "               BL      sub_FF83871C \n"
 126 "               B       loc_FF93D65C \n"
 127         );
 128 }
 129 
 130 
 131 /*----------------------------------------------------------------------
 132         sub_FF93CFDC_my()
 133 -----------------------------------------------------------------------*/
 134 void __attribute__((naked,noinline)) sub_FF93CFDC_my()
 135 {   asm volatile(
 136 "               STMFD   SP!, {R4-R8,LR} \n"
 137 "               SUB     SP, SP, #0x40 \n"
 138 "               MOV     R7, #0 \n"
 139 "               LDR     R6, =0x6228 \n"
 140 "               MOV     R4, R0 \n"
 141 "               STR     R7, [SP,#0x30] \n"
 142 "               STR     R7, [SP,#0x28] \n"
 143 "               LDR     R0, [R6,#0x38] \n"
 144 "               MOV     R8, #4 \n"
 145 "               CMP     R0, #3 \n"
 146 "               STREQ   R8, [R6,#0x38] \n"
 147 "               LDR     R0, [R6,#0x9C] \n"
 148 "               BLX     R0 \n"
 149 "               LDR     R0, [R6,#0x38] \n"
 150 "               CMP     R0, #4 \n"
 151 "               BNE     loc_FF93D14C \n"
 152 "               ADD     R3, SP, #0x28 \n"
 153 "               ADD     R2, SP, #0x2C \n"
 154 "               ADD     R1, SP, #0x30 \n"
 155 "               ADD     R0, SP, #0x34 \n"
 156 "               BL      sub_FFA63BE0 \n"
 157 "               CMP     R0, #0 \n"
 158 "               MOV     R5, #1 \n"
 159 "               BNE     loc_FF93D058 \n"
 160 "               LDR     R1, [R6,#0x28] \n"
 161 "               CMP     R1, #1 \n"
 162 "               BNE     loc_FF93D154 \n"
 163 "               LDR     R1, [R6,#0x4C] \n"
 164 "               LDR     R2, [R6,#0x3C] \n"
 165 "               CMP     R1, R2 \n"
 166 "               BCC     loc_FF93D154 \n"
 167 "loc_FF93D058: \n"
 168 "               CMP     R0, #0x80000001 \n"
 169 "               STREQ   R8, [R6,#0x50] \n"
 170 "               BEQ     loc_FF93D090 \n"
 171 "               CMP     R0, #0x80000003 \n"
 172 "               STREQ   R5, [R6,#0x50] \n"
 173 "               BEQ     loc_FF93D090 \n"
 174 "               CMP     R0, #0x80000005 \n"
 175 "               MOVEQ   R0, #2 \n"
 176 "               BEQ     loc_FF93D08C \n"
 177 "               CMP     R0, #0x80000007 \n"
 178 "               STRNE   R7, [R6,#0x50] \n"
 179 "               BNE     loc_FF93D090 \n"
 180 "               MOV     R0, #3 \n"
 181 "loc_FF93D08C: \n"
 182 "               STR     R0, [R6,#0x50] \n"
 183 "loc_FF93D090: \n"
 184 "               LDR     R0, =0x67F8C \n"
 185 "               LDR     R0, [R0,#8] \n"
 186 "               CMP     R0, #0 \n"
 187 "               BEQ     loc_FF93D0A8 \n"
 188 "               BL      sub_FF85A840 \n"
 189 "               B       loc_FF93D0AC \n"
 190 "loc_FF93D0A8: \n"
 191 "               BL      sub_FF93C81C \n"
 192 "loc_FF93D0AC: \n"
 193 "               LDR     R0, [R4,#0x1C] \n"
 194 "               ADD     R4, SP, #0x18 \n"
 195 "               ADD     R3, SP, #0x38 \n"
 196 "               MVN     R2, #1 \n"
 197 "               MOV     R1, #0 \n"
 198 "               STMIA   R4, {R0-R3} \n"
 199 "               LDR     R2, [R6,#0x64] \n"
 200 "               LDR     R3, [R6,#0x68] \n"
 201 "               ADD     R1, SP, #0x3c \n"
 202 "               ADD     R4, SP, #0x08 \n"
 203 "               MOV     R0, #0 \n"
 204 "               STMIA   R4, {R0-R3} \n"
 205 "               MOV     R3, #0 \n"
 206 "               MOV     R2, #0x40 \n"
 207 "               STRD    R2, [SP] \n"
 208 "               LDR     R3, =0x67FA4 \n"
 209 "               MOV     R2, #0 \n"
 210 "               MOV     R1, #0 \n"
 211 "               BL      sub_FFA28068 \n"
 212 "               LDR     R0, [R6,#0x10] \n"
 213 "               MOV     R1, #0x3E8 \n"
 214 "               BL      sub_FF8381E4 \n"                        // eventproc_export_TakeSemaphore
 215 "               CMP     R0, #9 \n"
 216 "               BNE     loc_FF93D11C \n"
 217 "loc_FF93D10C: \n"
 218 "               BL      sub_FFA640B4 \n"
 219 "               MOV     R0, #1 \n"
 220 "               STR     R5, [R6,#0x38] \n"
 221 "               B       loc_FF93D27C \n"
 222 "loc_FF93D11C: \n"
 223 "               LDR     R0, [SP,#0x38] \n"
 224 "               CMP     R0, #0 \n"
 225 "               BEQ     loc_FF93D138 \n"
 226 "loc_FF93D128: \n"
 227 "               BL      sub_FFA640B4 \n"
 228 "               MOV     R0, #1 \n"
 229 "               STR     R5, [R6,#0x38] \n"
 230 "               B       loc_FF93D2A8 \n"
 231 "loc_FF93D138: \n"
 232 "               MOV     R0, #1 \n"
 233 "               BL      sub_FFA28110 \n"
 234 "               BL      sub_FFA2814C \n"
 235 "               MOV     R0, #5 \n"
 236 "               STR     R0, [R6,#0x38] \n"
 237 "loc_FF93D14C: \n"
 238 "               ADD     SP, SP, #0x40 \n"
 239 "               LDMFD   SP!, {R4-R8,PC} \n"
 240 "loc_FF93D154: \n"
 241 "               LDR     R12, [SP,#0x30] \n"
 242 "               CMP     R12, #0 \n"
 243 "               BEQ     loc_FF93D304 \n"
 244 "               STR     R5, [R6,#0x2C] \n"
 245 "               LDR     R0, [R6,#0x4C] \n"
 246 "               LDR     R8, [R4,#0xC] \n"
 247 "               CMP     R0, #0 \n"
 248 "               LDRNE   LR, [SP,#0x34] \n"
 249 "               BNE     loc_FF93D200 \n"
 250 "               LDR     R0, [R4,#0x1C] \n"
 251 "               LDR     R1, [R4,#0x20] \n"
 252 "               ADD     R3, SP, #0x38 \n"
 253 "               MVN     R2, #0 \n"
 254 "               ADD     LR, SP, #0x18 \n"
 255 "               STMIA   LR, {R0-R3} \n"
 256 "               LDR     R0, [SP,#0x28] \n"
 257 "               LDR     R2, [R6,#0x64] \n"
 258 "               LDR     R3, [R6,#0x68] \n"
 259 "               ADD     R1, SP, #0x3c \n"
 260 "               ADD     LR, SP, #0x08 \n"
 261 "               STMIA   LR, {R0-R3} \n"
 262 "               LDR     R3, [SP,#0x2C] \n"
 263 "               STR     R12, [SP] \n"
 264 "               STR     R3, [SP,#0x04] \n"
 265 "               LDMIB   R4, {R0,R1} \n"
 266 "               LDR     R3, [SP,#0x34] \n"
 267 "               MOV     R2, R8 \n"
 268 "               BL      sub_FFA28068 \n"
 269 "               LDR     R0, [R6,#0x10] \n"
 270 "               MOV     R1, #0x3E8 \n"
 271 "               BL      sub_FF8381E4 \n"                        // eventproc_export_TakeSemaphore
 272 "               CMP     R0, #9 \n"
 273 "               BEQ     loc_FF93D10C \n"
 274 "               LDR     R0, [SP,#0x38] \n"
 275 "               CMP     R0, #0 \n"
 276 "               BNE     loc_FF93D128 \n"
 277 "               MOV     R0, #1 \n"
 278 "               BL      sub_FFA28110 \n"
 279 "               LDR     R0, [SP,#0x3C] \n"
 280 "               LDR     R1, [SP,#0x34] \n"
 281 "               ADD     LR, R1, R0 \n"
 282 "               LDR     R1, [SP,#0x30] \n"
 283 "               SUB     R12, R1, R0 \n"
 284 "loc_FF93D200: \n"
 285 "               LDR     R2, [R6,#0x48] \n"
 286 "               LDR     R0, [R4,#0x1C] \n"
 287 "               LDR     R1, [R4,#0x20] \n"
 288 "               ADD     R3, SP, #0x38 \n"
 289 "               STR     R0, [SP,#0x18] \n"
 290 "               STR     R1, [SP,#0x1C] \n"
 291 "               STR     R3, [SP,#0x24] \n"
 292 "               STR     R2, [SP,#0x20] \n"
 293 "               LDR     R2, [R6,#0x64] \n"
 294 "               LDR     R3, [R6,#0x68] \n"
 295 "               LDR     R0, [SP,#0x28] \n"
 296 "               STR     R3, [SP,#0x14] \n"
 297 "               LDR     R3, [SP,#0x2C] \n"
 298 "               ADD     R1, SP, #0x3C \n"
 299 "               STR     R2, [SP,#0x10] \n"
 300 "               STR     R3, [SP,#0x04] \n"
 301 "               STR     R1, [SP,#0x0C] \n"
 302 "               STR     R12, [SP] \n"
 303 "               STR     R0, [SP,#0x08] \n"
 304 "               LDMIB   R4, {R0,R1} \n"
 305 "               MOV     R3, LR \n"
 306 "               MOV     R2, R8 \n"
 307 "               BL      sub_FFA28068 \n"
 308 "               LDR     R0, [R6,#0x10] \n"
 309 "               MOV     R1, #0x3E8 \n"
 310 "               BL      sub_FF8381E4 \n"                        // eventproc_export_TakeSemaphore
 311 "               CMP     R0, #9 \n"
 312 "               BNE     loc_FF93D290 \n"
 313 "               BL      sub_FFA640B4 \n"
 314 "               MOV     R0, #0 \n"
 315 "               STR     R5, [R6,#0x38] \n"
 316 "loc_FF93D27C: \n"
 317 "               BL      sub_FFA28110 \n"
 318 "               MOV     R0, #0xC \n"
 319 "               BL      sub_FF87F3CC \n"
 320 "               MOV     R0, #0x90000 \n"
 321 "               B       loc_FF93D2B8 \n"
 322 "loc_FF93D290: \n"
 323 "               LDR     R0, [SP,#0x38] \n"
 324 "               CMP     R0, #0 \n"
 325 "               BEQ     loc_FF93D2CC \n"
 326 "               BL      sub_FFA640B4 \n"
 327 "               MOV     R0, #0 \n"
 328 "               STR     R5, [R6,#0x38] \n"
 329 " \n"
 330 "loc_FF93D2A8: \n"
 331 "               BL      sub_FFA28110 \n"
 332 "               MOV     R0, #0xC \n"
 333 "               BL      sub_FF87F3CC \n"
 334 "               MOV     R0, #0xA0000 \n"
 335 " \n"
 336 "loc_FF93D2B8: \n"
 337 "               BL      sub_FF88ACFC \n"                        // eventproc_export_HardwareDefect
 338 "               LDR     R1, [R6,#0x8C]! \n"
 339 "               LDR     R0, [R6,#0xC] \n"
 340 "               BLX     R1 \n"
 341 "               B       loc_FF93D14C \n"
 342 "loc_FF93D2CC: \n"
 343 "               MOV     R0, #0 \n"
 344 "               BL      sub_FFA28110 \n"
 345 "               LDR     R0, [SP,#0x34] \n"
 346 "               LDR     R1, [SP,#0x3C] \n"
 347 "               BL      sub_FFA63E0C \n"
 348 "               LDR     R0, [R6,#0x48] \n"
 349 "               LDR     R3, =0x6290 \n"                         // 6290
 350 "               ADD     R1, R0, #1 \n"
 351 "               STR     R1, [R6,#0x48] \n"
 352 "               STR     R3, [SP] \n"
 353 "               LDR     R0, [SP,#0x3C] \n"
 354 "               SUB     R3, R3, #4 \n"                          // 4
 355 "               MOV     R2, #0xF \n"
 356 "               BL      sub_FFA61F90 \n"
 357 
 358 "               LDR     R0, =0x6290-4 \n"                       // 6290 - 4
 359 "               BL      set_quality \n"                         // added
 360 
 361 "loc_FF93D304: \n"
 362 "               LDR     R0, [R6,#0x4C] \n"
 363 "               ADD     R0, R0, #1 \n"
 364 "               STR     R0, [R6,#0x4C] \n"
 365 "               LDR     R1, [R6,#0x74] \n"
 366 "               MUL     R0, R1, R0 \n"
 367 "               LDR     R1, [R6,#0x70] \n"
 368 "               BL      sub_FFB092E8 \n"
 369 "               MOV     R4, R0 \n"
 370 "               BL      sub_FFA640EC \n"
 371 "               LDR     R1, [R6,#0x6C] \n"
 372 "               CMP     R1, R4 \n"
 373 "               BNE     loc_FF93D340 \n"
 374 "               LDR     R0, [R6,#0x30] \n"
 375 "               CMP     R0, #1 \n"
 376 "               BNE     loc_FF93D354 \n"
 377 "loc_FF93D340: \n"
 378 "               LDR     R1, [R6,#0x80] \n"
 379 "               MOV     R0, R4 \n"
 380 "               BLX     R1 \n"
 381 "               STR     R4, [R6,#0x6C] \n"
 382 "               STR     R7, [R6,#0x30] \n"
 383 "loc_FF93D354: \n"
 384 "               STR     R7, [R6,#0x2C] \n"
 385 "               B       loc_FF93D14C \n"
 386         );
 387 }

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