root/platform/a430/sub/100b/movie_rec.c

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

DEFINITIONS

This source file includes following definitions.
  1. change_video_tables
  2. movie_record_task
  3. sub_FFD1FD98_my
  4. sub_FFD2146C_my
  5. sub_FFD2085C_my

   1 #include "conf.h"
   2 
   3 int *video_quality = &conf.video_quality;
   4 int *video_mode    = &conf.video_mode;
   5 
   6 long def_table1[9]={0x2000,0x38D,0x788,0x5800,0x9C5,0x14B8,0x10000,0x1C6A,0x3C45};
   7 long def_table2[9]={0x1CCD,-0x2E1,-0x579,0x4F33,-0x7EB,-0xF0C,0xE666,-0x170A,-0x2BC6};
   8 
   9 long table1[9], table2[9];
  10 
  11 void change_video_tables(int a, int b){
  12  int i;
  13  for (i=0;i<9;i++) {table1[i]=(def_table1[i]*a)/b; table2[i]=(def_table2[i]*a)/b;}
  14 }
  15 
  16 long CompressionRateTable[]={0x60, 0x5D, 0x5A, 0x57, 0x54, 0x51, 0x4D, 0x48, 0x42, 0x3B, 0x32, 0x29, 0x22, 0x1D, 0x17, 0x14, 0x10, 0xE, 0xB, 9, 7, 6, 5, 4, 3, 2, 1};
  17 
  18 
  19 void __attribute__((naked,noinline)) movie_record_task(){ //FFD1F6BC done
  20 
  21  asm volatile(
  22                 "STMFD   SP!, {R4,LR}\n"    
  23                 "SUB     SP, SP, #4\n"      
  24                 "MOV     R4, SP\n"          
  25                 "B       loc_FFD1F770\n"    
  26 "loc_FFD1F6CC:\n"                           
  27                 "LDR     R3, =0x72548\n"    
  28                 "LDR     R2, [R3]\n"        
  29                 "CMP     R2, #0\n"          
  30                 "BNE     loc_FFD1F75C\n"    
  31                 "SUB     R3, R12, #2\n"     
  32                 "CMP     R3, #9\n"          
  33                 "LDRLS   PC, [PC,R3,LSL#2]\n" 
  34                 "B       loc_FFD1F75C\n"    
  35                 ".long loc_FFD1F71C\n"
  36                 ".long loc_FFD1F734\n"
  37                 ".long loc_FFD1F73C\n"
  38                 ".long loc_FFD1F744\n"
  39                 ".long loc_FFD1F724\n"
  40                 ".long loc_FFD1F74C\n"
  41                 ".long loc_FFD1F72C\n"
  42                 ".long loc_FFD1F75C\n"
  43                 ".long loc_FFD1F754\n"
  44                 ".long loc_FFD1F714\n"
  45 "loc_FFD1F714:\n"                           
  46                 "BL      sub_FFD1F80C\n"    
  47                 "B       loc_FFD1F758\n"    
  48 "loc_FFD1F71C:\n"
  49                 "BL      unlock_optical_zoom\n"                         
  50                 "BL      sub_FFD1F9C0\n"    
  51                 "B       loc_FFD1F758\n"    
  52 "loc_FFD1F724:\n"                           
  53                 "BL      sub_FFD1FD98_my\n"   //----------------> 
  54                 "B       loc_FFD1F758\n"    
  55 "loc_FFD1F72C:\n"                           
  56                 "BL      sub_FFD201CC\n"    
  57                 "B       loc_FFD1F758\n"    
  58 "loc_FFD1F734:\n"                           
  59                 "BL      sub_FFD20030\n"    
  60                 "B       loc_FFD1F758\n"    
  61 "loc_FFD1F73C:\n"                           
  62                 "BL      sub_FFD2033C\n"    
  63                 "B       loc_FFD1F758\n"    
  64 "loc_FFD1F744:\n"                           
  65                 "BL      sub_FFD20500\n"    
  66                 "B       loc_FFD1F758\n"    
  67 "loc_FFD1F74C:\n"                           
  68                 "BL      sub_FFD20254\n"    
  69                 "B       loc_FFD1F758\n"    
  70 "loc_FFD1F754:\n"                           
  71                 "BL      sub_FFD20080\n"    
  72 "loc_FFD1F758:\n"                           
  73                 "LDR     R1, [SP]\n"      
  74 "loc_FFD1F75C:\n"                           
  75                 "LDR     R3, =0x7247C\n"    
  76                 "MOV     R2, #0\n"          
  77                 "STR     R2, [R1]\n"        
  78                 "LDR     R0, [R3]\n"        
  79                 "BL      sub_FFC104DC\n" 
  80 "loc_FFD1F770:\n"                           
  81                 "LDR     R3, =0x72478\n"    
  82                 "MOV     R1, R4\n"          
  83                 "LDR     R0, [R3]\n"        
  84                 "MOV     R2, #0\n"          
  85                 "BL      sub_FFC100C4\n" 
  86                 "LDR     R0, [SP]\n"        
  87                 "LDR     R12, [R0]\n"       
  88                 "CMP     R12, #0xC\n"       
  89                 "MOV     R1, R0\n"          
  90                 "BNE     loc_FFD1F6CC\n"    
  91                 "LDR     R3, =0x72474\n"    
  92                 "LDR     R0, [R3]\n"        
  93                 "BL      sub_FFC10E58\n"   
  94                 "BL      sub_FFC11620\n"        
  95                 "ADD     SP, SP, #4\n"      
  96                 "LDMFD   SP!, {R4,PC}\n"    
  97 
  98  );
  99 }
 100 
 101 
 102 void __attribute__((naked,noinline)) sub_FFD1FD98_my(){
 103  asm volatile(
 104                 "STMFD   SP!, {R4-R11,LR}\n" 
 105                 "LDR     R5, =0x72564\n"    
 106                 "SUB     SP, SP, #0x34\n"   
 107                 "LDR     R3, [R5]\n"        
 108                 "CMP     R3, #3\n"          
 109                 "MOV     R4, R0\n"          
 110                 "MOVEQ   R3, #4\n"          
 111                 "STREQ   R3, [R5]\n"        
 112                 "LDR     R3, =0x72614\n"    
 113                 "MOV     LR, PC\n"          
 114                 "LDR     PC, [R3]\n"        
 115                 "LDR     R2, [R5]\n"        
 116                 "CMP     R2, #4\n"          
 117                 "BNE     loc_FFD1FF5C\n"    
 118                 "ADD     R0, SP, #0x30\n"   
 119                 "ADD     R1, SP, #0x2C\n"   
 120                 "ADD     R2, SP, #0x28\n"   
 121                 "ADD     R3, SP, #0x24\n"   
 122                 "BL      sub_FFD2146C_my\n"   //----------------> 
 123                 "CMP     R0, #0\n"          
 124                 "BNE     loc_FFD1FE14\n"    
 125                 "LDR     R3, =0x72550\n"    
 126                 "LDR     R2, [R3]\n"        
 127                 "CMP     R2, #1\n"          
 128                 "BNE     loc_FFD1FE28\n"    
 129                 "LDR     R2, =0x725A8\n"    
 130                 "LDR     R1, =0x7257C\n"    
 131                 "LDR     R12, [R2]\n"       
 132                 "LDR     R3, [R1]\n"        
 133                 "CMP     R12, R3\n"         
 134                 "BCC     loc_FFD1FE28\n"    
 135 
 136 "loc_FFD1FE14:\n"                           
 137                 "BL      sub_FFD1FFA8\n"    
 138                 "BL      sub_FFD201A8\n"    
 139                 "MOV     R3, #5\n"          
 140                 "STR     R3, [R5]\n"        
 141                 "B       loc_FFD1FF5C\n"    
 142 
 143 "loc_FFD1FE28:\n"                           
 144                                         
 145                 "LDR     R12, =0x725B0\n"   
 146                 "LDR     R11, =0x725BC\n"   
 147                 "LDMIB   R4, {R0-R2}\n"     
 148                 "LDR     R10, [R12]\n"      
 149                 "LDR     R7, [R11]\n"       
 150                 "LDR     R4, [SP,#0x2C]\n"  
 151                 "LDR     R5, [SP,#0x28]\n"  
 152                 "LDR     R6, [SP,#0x24]\n"  
 153                 "LDR     R8, =0x72554\n"    
 154                 "LDR     R3, [SP,#0x30]\n"  
 155                 "ADD     R12, SP, #0x20\n"  
 156                 "ADD     LR, SP, #0x1C\n"   
 157                 "MOV     R9, #1\n"          
 158                 "STMEA   SP, {R4-R6,R12}\n" 
 159                 "STR     R10, [SP,#0x10]\n" 
 160                 "STR     R7, [SP,#0x14]\n"  
 161                 "STR     LR, [SP,#0x18]\n"  
 162                 "STR     R9, [R8]\n"        
 163                 "BL      sub_FFC84260\n"    
 164                 "LDR     R3, =0x7246C\n"    
 165                 "MOV     R1, #0x3E8\n"      
 166                 "LDR     R0, [R3]\n"        
 167                 "BL      sub_FFC10C70\n"   
 168                 "CMP     R0, #9\n"          
 169                 "BNE     loc_FFD1FE9C\n"    
 170                 "BL      sub_FFD21C7C\n"    
 171                 "LDR     R3, =0x72564\n"    
 172                 "LDR     R0, =0xFFD1FD80\n" 
 173                 "B       loc_FFD1FEB4\n"    
 174 "loc_FFD1FE9C:\n"                           
 175                 "LDR     R5, [SP,#0x1C]\n"  
 176                 "CMP     R5, #0\n"          
 177                 "BEQ     loc_FFD1FEC0\n"    
 178                 "BL      sub_FFD21C7C\n"    
 179                 "LDR     R3, =0x72564\n"    
 180                 "LDR     R0, =0xFFD1FD8C\n" 
 181 
 182 "loc_FFD1FEB4:\n"                           
 183                 "STR     R9, [R3]\n"        
 184                 "BL      sub_FFD33FC4\n"    
 185                 "B       loc_FFD1FF5C\n"    
 186 
 187 "loc_FFD1FEC0:\n"                           
 188                 "BL      sub_FFC843CC\n"    
 189                 "LDR     R0, [SP,#0x30]\n"  
 190                 "LDR     R1, [SP,#0x20]\n"  
 191                 "BL      sub_FFD219A0\n"    
 192                 "LDR     R4, =0x725A8\n"    
 193                 "LDR     R3, [R4]\n"        
 194                 "ADD     R3, R3, #1\n"      
 195                 "LDR     R0, [SP,#0x20]\n"  
 196                 "MOV     R1, R11\n"         
 197                 "STR     R3, [R4]\n"        
 198                 "MOV     R2, R5\n"          
 199                 "BL     sub_FFD2085C_my\n"    //--------------->
 200                 "LDR     R3, =0x725C8\n"    
 201                 "LDR     R1, [R4]\n"        
 202                 "LDR     R2, [R3]\n"        
 203                 "LDR     R12, =0x725C4\n"   
 204                 "MUL     R0, R2, R1\n"      
 205                 "LDR     R1, [R12]\n"       
 206                 "BL      sub_FFEA5B40\n"       
 207                 "LDR     R7, =0x725C0\n"    
 208                 "LDR     R3, [R7]\n"        
 209                 "MOV     R4, R0\n"          
 210                 "CMP     R3, R4\n"          
 211                 "BNE     loc_FFD1FF34\n"    
 212                 "LDR     R6, =0x72558\n"    
 213                 "LDR     R3, [R6]\n"        
 214                 "CMP     R3, #1\n"          
 215                 "BNE     loc_FFD1FF50\n"    
 216                 "B       loc_FFD1FF38\n"    
 217 
 218 "loc_FFD1FF34:\n"                           
 219                 "LDR     R6, =0x72558\n"    
 220 
 221 "loc_FFD1FF38:\n"                           
 222                 "LDR     R3, =0x725F8\n"    
 223                 "MOV     R0, R4\n"          
 224                 "MOV     LR, PC\n"          
 225                 "LDR     PC, [R3]\n"        
 226                 "STR     R5, [R6]\n"        
 227                 "STR     R4, [R7]\n"        
 228 
 229 "loc_FFD1FF50:\n"                           
 230                 "LDR     R2, =0x72554\n"    
 231                 "MOV     R3, #0\n"          
 232                 "STR     R3, [R2]\n"        
 233 
 234 "loc_FFD1FF5C:\n"                           
 235                                         
 236                 "ADD     SP, SP, #0x34\n"   
 237                 "LDMFD   SP!, {R4-R11,PC}\n" 
 238 
 239                 "MOV     PC, LR\n"          
 240  );
 241 }
 242 
 243 void __attribute__((naked,noinline)) sub_FFD2146C_my(){ // done
 244  asm volatile(
 245                 "STMFD   SP!, {R4-R11,LR}\n" 
 246                 "LDR     R5, =0x728BC\n"    
 247                 "SUB     SP, SP, #0x14\n"   
 248                 "LDR     LR, [R5]\n"        
 249                 "LDR     R12, =0x728D4\n"   
 250                 "ADD     LR, LR, #1\n"      
 251                 "LDR     R4, [R12]\n"       
 252                 "STR     LR, [R5]\n"        
 253                 "LDR     R12, =0x72954\n"   
 254                 "STR     R0, [SP,#0x10]\n"  
 255                 "STR     R1, [SP,#0xC]\n"   
 256                 "STR     R2, [SP,#8]\n"     
 257                 "STR     R3, [SP,#4]\n"     
 258                 "CMP     LR, R4\n"          
 259                 "LDR     R11, [R12]\n"      
 260                 "MOVHI   R0, #0x80000001\n"  // remove frame
 261                 "BHI     loc_FFD21954\n"     // (time) limit
 262                 "LDR     R3, =0x72938\n"    
 263                 "MOV     R0, LR\n"          
 264                 "LDR     R1, [R3]\n"        
 265                 "BL      sub_FFEA61D0\n"       
 266                 "CMP     R0, #1\n"          
 267                 "BNE     loc_FFD2168C\n"    
 268                 "LDR     R0, =0x7295C\n"    
 269                 "LDR     R1, =0x728A8\n"    
 270                 "LDR     R3, [R0]\n"        
 271                 "LDR     R2, [R1]\n"        
 272                 "CMP     R3, R2\n"          
 273                 "LDREQ   R3, =0x72958\n"    
 274                 "LDREQ   R5, [R3]\n"        
 275                 "MOVNE   R5, R2\n"          
 276                 "LDR     R3, =0x728BC\n"    
 277                 "LDR     R2, =0x72938\n"    
 278                 "LDR     R0, [R3]\n"        
 279                 "LDR     R1, [R2]\n"        
 280                 "BL      sub_FFEA5B40\n"       
 281                 "LDR     R3, =0x728B0\n"    
 282                 "ADD     R0, R0, #1\n"      
 283                 "AND     R0, R0, #1\n"      
 284                 "STR     R5, [R3,R0,LSL#2]\n" 
 285                 "LDR     R3, =0x728A4\n"    
 286                 "LDR     R2, [R3]\n"        
 287                 "CMP     R5, R2\n"          
 288                 "BHI     loc_FFD2153C\n"    
 289                 "LDR     R4, =0x728F4\n"    
 290                 "LDR     R3, [R4]\n"        
 291                 "ADD     R3, R5, R3\n"      
 292                 "ADD     R3, R3, #8\n"      
 293                 "CMP     R2, R3\n"          
 294                 "BCS     loc_FFD21540\n"    
 295 
 296 "loc_FFD21534:\n"                            
 297                                         
 298                 "MOV     R0, #0x80000003\n" 
 299                 "B       loc_FFD21954\n"    
 300 
 301 
 302 "loc_FFD2153C:\n"                            
 303                 "LDR     R4, =0x728F4\n"    
 304 
 305 "loc_FFD21540:\n"                            
 306                 "LDR     R3, [R4]\n"        
 307                 "LDR     R2, =0x7295C\n"    
 308                 "ADD     R1, R5, R3\n"      
 309                 "LDR     R3, [R2]\n"        
 310                 "ADD     R2, R1, #8\n"      
 311                 "CMP     R2, R3\n"          
 312                 "BLS     loc_FFD2158C\n"    
 313                 "LDR     R2, =0x72958\n"    
 314                 "LDR     R0, =0x728A4\n"    
 315                 "RSB     R3, R3, R1\n"      
 316                 "LDR     R1, [R2]\n"        
 317                 "ADD     R3, R3, #8\n"      
 318                 "LDR     R2, [R0]\n"        
 319                 "ADD     R1, R1, R3\n"      
 320                 "CMP     R2, R1\n"          
 321                 "BCC     loc_FFD21534\n"    
 322                 "LDR     R3, =0x728A8\n"    
 323                 "STR     R1, [R3]\n"        
 324                 "B       loc_FFD21594\n"    
 325 
 326 
 327 "loc_FFD2158C:\n"                            
 328                 "LDR     R3, =0x728A8\n"    
 329                 "STR     R2, [R3]\n"        
 330 
 331 "loc_FFD21594:\n"                            
 332                 "LDR     R3, [R4]\n"        
 333                 "LDR     R12, =0x72908\n"   
 334                 "ADD     R3, R3, #0x18\n"   
 335                 "LDR     R2, [R12,#4]\n"    
 336                 "MOV     R0, R3\n"          
 337                 "MOV     R1, #0\n"          
 338                 "CMP     R1, R2\n"          
 339                 "BHI     loc_FFD217D8\n"    
 340                 "BNE     loc_FFD215C4\n"    
 341                 "LDR     R3, [R12]\n"       
 342                 "CMP     R0, R3\n"          
 343                 "BHI     loc_FFD217D8\n"    
 344 
 345 "loc_FFD215C4:\n"                            
 346                 "LDR     R4, [R4]\n"        
 347                 "LDR     LR, =0x72910\n"    
 348                 "STR     R4, [SP]\n"        
 349                 "LDR     R12, =0x72908\n"   
 350                 "LDR     R3, =0x728BC\n"    
 351                 "LDMIA   LR, {R7,R8}\n"     
 352                 "LDMIA   R12, {R5,R6}\n"    
 353                 "LDR     R10, [R3]\n"       
 354                 "LDR     R2, =0x72938\n"    
 355                 "MOV     R3, R4\n"          
 356                 "MOV     R4, #0\n"          
 357                 "ADDS    R7, R7, R3\n"      
 358                 "ADC     R8, R8, R4\n"      
 359                 "LDR     R9, [R2]\n"        
 360                 "SUBS    R5, R5, R3\n"      
 361                 "SBC     R6, R6, R4\n"      
 362                 "MVN     R2, #0\n"          //diff ? BB
 363                 "MVN     R1, #0x17\n"       //diff ? bb
 364                 "ADDS    R5, R5, R1\n"      
 365                 "MOV     R4, #0\n"          
 366                 "MOV     R3, #0x18\n"       
 367                 "ADC     R6, R6, R2\n"      
 368                 "ADDS    R7, R7, R3\n"      
 369                 "ADC     R8, R8, R4\n"      
 370                 "STMIA   R12, {R5,R6}\n"    
 371                 "SUB     R0, R10, #1\n"     
 372                 "MOV     R1, R9\n"          
 373                 "STMIA   LR, {R7,R8}\n"     
 374                 "BL      sub_FFEA5B40\n"       
 375                 "CMP     R10, #1\n"         
 376                 "MLA     R0, R9, R0, R0\n"  
 377                 "BEQ     loc_FFD2168C\n"    
 378                 "SUB     R3, R0, #1\n"      
 379                 "MOV     R3, R3,LSL#4\n"    
 380                 "ADD     R4, R11, #0x10\n"  
 381                 "ADD     R5, R11, #0x14\n"  
 382                 "LDR     R1, [R5,R3]\n"     
 383                 "LDR     R2, [R4,R3]\n"     
 384                 "LDR     LR, =0x62773130\n" 
 385                 "ADD     R2, R2, R1\n"      
 386                 "MOV     R3, R0,LSL#4\n"    
 387                 "ADD     R2, R2, #8\n"      
 388                 "MOV     R0, #0\n"          
 389                 "ADD     R12, R11, #0xC\n"  
 390                 "ADD     R1, R11, #8\n"     
 391                 "STR     LR, [R1,R3]\n"     
 392                 "STR     R0, [R12,R3]\n"    
 393                 "STR     R2, [R4,R3]\n"     
 394                 "LDR     R0, [SP]\n"        
 395                 "STR     R0, [R5,R3]\n"     
 396 
 397 "loc_FFD2168C:\n"                            
 398                                         
 399                 "LDR     R2, =0x728A8\n"    
 400                 "LDR     R3, =0x7295C\n"    
 401                 "LDR     R1, [R2]\n"        
 402                 "LDR     R0, [R3]\n"        
 403                 "ADD     R3, R1, #9\n"      
 404                 "CMP     R3, R0\n"          
 405                 "BLS     loc_FFD216C8\n"    
 406                 "LDR     R2, =0x72958\n"    
 407                 "LDR     R3, [R2]\n"        
 408                 "ADD     R3, R3, R1\n"      
 409                 "RSB     R3, R0, R3\n"      
 410                 "LDR     R0, [SP,#0x10]\n"  
 411                 "ADD     R3, R3, #8\n"      
 412                 "STR     R3, [R0]\n"        
 413                 "B       loc_FFD216D4\n"    
 414 
 415 
 416 "loc_FFD216C8:\n"                            
 417                 "ADD     R3, R1, #8\n"      
 418                 "LDR     R1, [SP,#0x10]\n"  
 419                 "STR     R3, [R1]\n"        
 420 
 421 "loc_FFD216D4:\n"                            
 422                 "LDR     R2, [SP,#0x10]\n"  
 423                 "LDR     R1, =0x72904\n"    
 424                 "LDR     R3, =0x7295C\n"    
 425                 "LDR     R12, [R2]\n"       
 426                 "LDR     R2, [R1]\n"        
 427                 "LDR     R0, [R3]\n"        
 428                 "ADD     R3, R12, R2\n"     
 429                 "CMP     R3, R0\n"          
 430                 "BLS     loc_FFD21728\n"    
 431                 "LDR     R2, [SP,#0xC]\n"   
 432                 "RSB     R0, R12, R0\n"     
 433                 "STR     R0, [R2]\n"        
 434                 "LDR     R2, =0x72958\n"    
 435                 "LDR     R3, [R1]\n"        
 436                 "LDR     R1, [R2]\n"        
 437                 "RSB     R3, R0, R3\n"      
 438                 "LDR     R0, [SP,#8]\n"     
 439                 "STR     R1, [R0]\n"        
 440                 "LDR     R1, [SP,#4]\n"     
 441                 "STR     R3, [R1]\n"        
 442                 "B       loc_FFD21744\n"    
 443 
 444 
 445 "loc_FFD21728:\n"                            
 446                 "LDR     R0, [SP,#0xC]\n"   
 447                 "STR     R2, [R0]\n"        
 448                 "LDR     R1, [SP,#4]\n"     
 449                 "MOV     R3, #0\n"          
 450                 "STR     R3, [R1]\n"        
 451                 "LDR     R2, [SP,#8]\n"     
 452                 "STR     R3, [R2]\n"        
 453 
 454 "loc_FFD21744:\n"                            
 455                 "LDR     R0, =0x728A8\n"    
 456                 "LDR     R1, =0x728A4\n"    
 457                 "LDR     R3, [R0]\n"        
 458                 "LDR     R2, [R1]\n"        
 459                 "CMP     R3, R2\n"          
 460                 "BHI     loc_FFD21770\n"    
 461                 "LDR     R0, [SP,#0xC]\n"   
 462                 "LDR     R3, [R0]\n"        
 463                 "ADD     R3, R12, R3\n"     
 464                 "CMP     R2, R3\n"          
 465                 "BCC     loc_FFD21534\n"    
 466 
 467 "loc_FFD21770:\n"                            
 468                 "LDR     R1, [SP,#8]\n"     
 469                 "LDR     R2, [R1]\n"        
 470                 "CMP     R2, #0\n"          
 471                 "BEQ     loc_FFD217A4\n"    
 472                 "LDR     R3, =0x728A4\n"    
 473                 "LDR     R1, [R3]\n"        
 474                 "CMP     R2, R1\n"          
 475                 "BHI     loc_FFD217A4\n"    
 476                 "LDR     R0, [SP,#4]\n"     
 477                 "LDR     R3, [R0]\n"        
 478                 "ADD     R3, R2, R3\n"      
 479                 "CMP     R1, R3\n"          
 480                 "BCC     loc_FFD21534\n"    
 481 
 482 "loc_FFD217A4:\n"                            
 483                                         
 484                 "LDR     R3, =0x72904\n"    
 485                 "LDR     R0, =0x72908\n"    
 486                 "LDR     R2, [R3]\n"        
 487                 "LDR     R3, [R0,#4]\n"     
 488                 "ADD     R2, R2, #0x18\n"   
 489                 "MOV     R1, R2\n"          
 490                 "MOV     R2, #0\n"          
 491                 "CMP     R2, R3\n"          
 492                 "BHI     loc_FFD217D8\n"    
 493                 "BNE     loc_FFD217E0\n"    
 494                 "LDR     R3, [R0]\n"        
 495                 "CMP     R1, R3\n"          
 496                 "BLS     loc_FFD217E0\n"    
 497 
 498 "loc_FFD217D8:\n"                            
 499                                         
 500                 "MOV     R0, #0x80000005\n" 
 501                 "B       loc_FFD21954\n"    
 502 
 503 
 504 "loc_FFD217E0:\n"                            
 505                                         
 506                 "LDR     R1, =0x728EC\n"    
 507                 "LDR     R0, =0x72938\n"    
 508                 "LDR     R3, [R1]\n"        
 509                 "LDR     R2, [R0]\n"        
 510                 "ADD     R3, R3, R2,LSL#4\n" 
 511                 "ADD     R3, R3, R3,LSL#2\n" 
 512                 "LDR     R12, =0x72908\n"   
 513                 "MOV     R3, R3,LSL#1\n"    
 514                 "ADD     R3, R3, #0xA0\n"   
 515                 "LDR     R2, [R12,#4]\n"    
 516                 "MOV     R0, R3\n"          
 517                 "MOV     R1, #0\n"          
 518                 "CMP     R1, R2\n"          
 519                 "BHI     loc_FFD21828\n"    
 520                 "BNE     loc_FFD2184C\n"    
 521                 "LDR     R3, [R12]\n"       
 522                 "CMP     R0, R3\n"          
 523                 "BLS     loc_FFD2184C\n"    
 524 
 525 "loc_FFD21828:\n"                            
 526                 "LDR     R4, =0x72920\n"    
 527                 "LDR     R1, [R4]\n"        
 528                 "CMP     R1, #0\n"          
 529                 "BNE     loc_FFD2184C\n"    
 530                 "MOV     R0, #0x3140\n"   //3148 fixup?   
 531                 "ADD     R0, R0, #8\n"      
 532                 "BL      sub_FFD38368\n"    
 533                 "MOV     R3, #1\n"          
 534                 "STR     R3, [R4]\n"        
 535 
 536 "loc_FFD2184C:\n"                            
 537                                         
 538                 "LDR     R1, =0x728EC\n"    
 539                 "LDR     R0, =0x72938\n"    
 540                 "LDR     R2, [R1]\n"        
 541                 "LDR     R3, [R0]\n"        
 542                 "LDR     R0, =0x72910\n"    
 543                 "ADD     R2, R2, R3,LSL#4\n" 
 544                 "MVN     R3, #0x9F\n"             // diff b
 545                 "ADD     R2, R2, R2,LSL#2\n" 
 546                 "ADD     R3, R3, #0x40000000\n" 
 547                 "SUB     R3, R3, R2,LSL#1\n" 
 548                 "LDR     R1, [R0,#4]\n"     
 549                 "MOV     R4, R3\n"          
 550                 "MOV     R5, #0\n"          
 551                 "CMP     R1, R5\n"          
 552                 "BHI     loc_FFD21898\n"    
 553                 "BNE     loc_FFD218BC\n"    
 554                 "LDR     R3, [R0]\n"        
 555                 "CMP     R3, R4\n"          
 556                 "BLS     loc_FFD218BC\n"    
 557 
 558 "loc_FFD21898:\n"                            
 559                 "LDR     R4, =0x72920\n"    
 560                 "LDR     R1, [R4]\n"        
 561                 "CMP     R1, #0\n"          
 562                 "BNE     loc_FFD218BC\n"    
 563                 "MOV     R0, #0x3140\n"   //3148 fixup?  
 564                 "ADD     R0, R0, #8\n"      //?+
 565                 "BL      sub_FFD38368\n"    
 566                 "MOV     R3, #1\n"          
 567                 "STR     R3, [R4]\n"        
 568 
 569 "loc_FFD218BC:\n"                            
 570                                         
 571                 "LDR     R3, =0x72938\n"    
 572                 "LDR     R0, =0x728D4\n"    
 573                 "LDR     R2, [R3]\n"        
 574                 "LDR     R12, =0x728BC\n"   
 575                 "LDR     R1, [R0]\n"        
 576                 "ADD     R3, R2, R2,LSL#2\n" 
 577                 "ADD     R2, R2, R3,LSL#1\n" 
 578                 "LDR     R0, [R12]\n"       
 579                 "RSB     R1, R2, R1\n"      
 580                 "CMP     R0, R1\n"          
 581                 "BLS     loc_FFD2190C\n"    
 582                 "LDR     R4, =0x72920\n"    
 583                 "LDR     R1, [R4]\n"        
 584                 "CMP     R1, #0\n"          
 585                 "BNE     loc_FFD2190C\n"    
 586                 "MOV     R0, #0x3140\n"     
 587                 "ADD     R0, R0, #8\n"      
 588                 "BL      sub_FFD38368\n"    
 589                 "MOV     R3, #1\n"          
 590                 "STR     R3, [R4]\n"        
 591 
 592 "loc_FFD2190C:\n"                            
 593                                         
 594                 "LDR     R3, =0x72910\n"    
 595                 "LDR     R12, =0x72904\n"   
 596                 "LDMIA   R3, {R1,R2}\n"     
 597                 "LDR     R0, [R12]\n"       
 598                 "MOV     R4, #0\n"          
 599                 "MOV     R3, #0x18\n"       
 600                 "ADDS    R1, R1, R0\n"      
 601                 "ADC     R2, R2, #0\n"      
 602                 "ADDS    R1, R1, R3\n"      
 603                 "ADC     R2, R2, R4\n"      
 604                 "CMP     R2, #0\n"          
 605                 "BHI     loc_FFD21948\n"    
 606                 "BNE     loc_FFD21950\n"    
 607                 "CMP     R1, #0x40000000\n" 
 608 //                "BLS     loc_FFD21950\n"    
 609                  "B       loc_FFD21950\n"    
 610 
 611 "loc_FFD21948:\n"                            
 612                 "MOV     R0, #0x80000007\n" 
 613                 "B       loc_FFD21954\n"    
 614 
 615 
 616 "loc_FFD21950:\n"                            
 617                                         
 618                 "MOV     R0, #0\n"          
 619 
 620 "loc_FFD21954:\n"                            
 621                                         
 622                 "ADD     SP, SP, #0x14\n"   
 623                 "LDMFD   SP!, {R4-R11,PC}\n" 
 624  );
 625 }
 626 
 627 
 628 
 629 
 630 
 631 void __attribute__((naked,noinline)) sub_FFD2085C_my(){ // done
 632  asm volatile(
 633                 "CMP     R2, #1\n"          
 634                 "STMFD   SP!, {R4-R7,LR}\n" 
 635                 "MOV     R7, R0\n"          
 636                 "MOV     R6, R1\n"          
 637                 "MOVEQ   R3, #0x79\n"       
 638                 "STREQ   R3, [R6]\n"        
 639                 "LDMEQFD SP!, {R4-R7,PC}\n" 
 640                 "LDR     R12, =0x72620\n"   
 641                 "LDR     R0, [R12]\n"       
 642                 "LDR     R3, =0x72628\n"    
 643                 "CMP     R0, #0\n"          
 644                 "LDR     R1, [R3]\n"        
 645                 "BEQ     loc_FFD208A4\n"    
 646                 "LDR     R2, =0x7262C\n"    
 647                 "LDR     R3, [R2]\n"        
 648                 "CMP     R3, #1\n"          
 649                 "BNE     loc_FFD208B8\n"    
 650                 "B       loc_FFD208A8\n"    
 651 
 652 
 653 "loc_FFD208A4:\n"                           
 654                 "LDR     R2, =0x7262C\n"    
 655 
 656 "loc_FFD208A8:\n"                           
 657                 "MOV     R3, #0\n"          
 658                 "STR     R3, [R2]\n"        
 659                 "STR     R7, [R12]\n"       
 660                 "B       loc_FFD20970\n"    
 661 
 662 
 663 "loc_FFD208B8:\n"                           
 664                 "LDR     R2, =0x72624\n"    
 665                 "LDR     R3, [R2]\n"        
 666                 "LDR     R5, =table1\n"        //+ 0xFFD52A9C a430???
 667                 "ADD     R3, R3, R3,LSL#1\n" 
 668                 "MOV     LR, R3,LSL#2\n"    
 669                 "LDR     R2, [R5,LR]\n"     
 670                 "LDR     R4, =table2\n"        //+ 0xFFD52AC0 a430???
 671                 "RSB     R12, R2, R0\n"     
 672                 "LDR     R3, [R4,LR]\n"     
 673                 "CMP     R12, #0\n"         
 674                 "RSB     R0, R3, R0\n"      
 675                 "BLE     loc_FFD2091C\n"    
 676                 "ADD     R3, R5, #4\n"      
 677                 "LDR     R2, [R3,LR]\n"     
 678                 "CMP     R2, R12\n"         
 679                 "ADDGE   R1, R1, #1\n"      
 680                 "BGE     loc_FFD20910\n"    
 681                 "ADD     R3, R5, #8\n"      
 682                 "LDR     R2, [R3,LR]\n"     
 683                 "CMP     R2, R12\n"         
 684                 "ADDGE   R1, R1, #2\n"      
 685                 "ADDLT   R1, R1, #3\n"      
 686 
 687 "loc_FFD20910:\n"                           
 688 //             "CMP     R1, #0xE\n"  //-      
 689 //             "MOVGE   R1, #0xE\n"  //-      
 690 
 691                 "CMP     R1, #0x1A\n"  //+      
 692                 "MOVGE   R1, #0x1A\n"  //+      
 693 
 694                 "B       loc_FFD20954\n"    
 695 
 696 
 697 "loc_FFD2091C:\n"                           
 698                 "CMP     R0, #0\n"          
 699                 "BGE     loc_FFD20954\n"    
 700                 "ADD     R3, R4, #4\n"      
 701                 "LDR     R2, [R3,LR]\n"     
 702                 "CMP     R2, R0\n"          
 703                 "SUBLE   R1, R1, #1\n"      
 704                 "BLE     loc_FFD2094C\n"    
 705                 "ADD     R3, R4, #8\n"      
 706                 "LDR     R2, [R3,LR]\n"     
 707                 "CMP     R2, R0\n"          
 708                 "SUBLE   R1, R1, #2\n"      
 709                 "SUBGT   R1, R1, #3\n"      
 710 
 711 "loc_FFD2094C:\n"                           
 712                 "CMP     R1, #0\n"          
 713                 "MOVLT   R1, #0\n"          
 714 
 715 "loc_FFD20954:\n"                           
 716                                         
 717                 "LDR     R0, =0x72628\n"    
 718                 "LDR     R3, [R0]\n"        
 719                 "CMP     R1, R3\n"          
 720                 "LDRNE   R2, =0x7262C\n"    
 721                 "MOVNE   R3, #1\n"          
 722                 "STRNE   R1, [R0]\n"        
 723                 "STRNE   R3, [R2]\n"        
 724 
 725 "loc_FFD20970:\n"                           
 726                 "LDR     R3, =0x72628\n"    
 727                 "LDR     R1, =video_mode\n"  //+
 728                 "LDR     R0, [R3]\n"        
 729                 "LDR     R2, =CompressionRateTable\n" //+ 0xFFD52A60
 730                 "LDR     R12, [R1]\n"                       
 731                 "LDR     R12, [R12]\n"    //+
 732                 "LDR     LR, [R2,R0,LSL#2]\n" 
 733                 "LDR     R3, =0x72620\n"    
 734                 "CMP     R12, #1\n"         
 735                 "STR     R7, [R3]\n"        
 736                 "STR     LR, [R6]\n"        
 737                 "LDREQ   R3, =video_quality\n"   //+     
 738                 "LDREQ   R3, [R3]\n"   //+     
 739                 "LDREQ   R3, [R3]\n"   //+     
 740                 "STREQ   R3, [R6]\n"        
 741                 "BL      mute_on_zoom\n"     // +
 742                 "LDMFD   SP!, {R4-R7,PC}\n" 
 743 
 744  );
 745 }
 746 
 747 
 748 
 749 
 750 

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