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

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