root/platform/s2is/sub/100f/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_FF9546EC_my
  4. sub_FF956A58_my
  5. sub_FF95593C_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[56]={
   7 0x10000,0xC000,0x5800, 0x2000, 0x1C6A, 0x1550,0x9C5,  0x38D,  0x3C45, 0x2D34, 0x14B8, 0x788,  0x5F60, 0x4788,
   8 0x20C9, 0xBE1, 0x8661, 0x64C9, 0x2E31, 0x10CB,0xB21A, 0x8594, 0x3D39, 0x1642, 0xE249, 0xA9B8, 0x4DC9, 0x1C48,
   9 0x117D2,0xD1DF,0x6030, 0x22F9, 0x153D5,0xFEE1,0x74D1, 0x2A79, 0x195F8,0x1307C,0x8B8D, 0x32AA, 0x1E01C,0x16817,
  10 0xA509, 0x3C01,0x2328E,0x1A5ED,0xC160, 0x4637,0x28C99,0x1E975,0xE054, 0x5190, 0x2F08B,0x2346B,0x102AF,0x5E0E
  11 };
  12 
  13 long def_table2[12]={0xE666,0xACCD,0x4F33,0x1CCD,-0x170A,-0x1148,-0x7EB,-0x2E1,-0x2BC6,-0x20D5,-0xF0C,-0x579};
  14 
  15 long table1[56], table2[12];
  16 
  17 void change_video_tables(int a, int b){
  18  int i;
  19  for (i=0;i<56;i++) table1[i]=(def_table1[i]*a)/b;
  20  for (i=0;i<12;i++) table2[i]=(def_table2[i]*a)/b;
  21 }
  22 
  23 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};
  24 
  25 
  26 void __attribute__((naked,noinline)) movie_record_task(){
  27  asm volatile(
  28                 "STMFD   SP!, {R4,LR}\n"              
  29                 "SUB     SP, SP, #4\n"                
  30                 "MOV     R4, SP\n"                    
  31                 "B       loc_FF953F50\n"              
  32 "loc_FF953E7C:\n"                                     
  33                 "LDR     R3, =0x5C940\n"              
  34                 "LDR     R2, [R3]\n"                  
  35                 "CMP     R2, #0\n"                    
  36                 "BNE     loc_FF953F18\n"              
  37                 "SUB     R3, R12, #1\n"               
  38                 "CMP     R3, #0xA\n"                  
  39                 "LDRLS   PC, [PC,R3,LSL#2]\n"         
  40                 "B       loc_FF953F18\n"              
  41                 ".long loc_FF953EC8\n"
  42                 ".long loc_FF953ED0\n"
  43                 ".long loc_FF953EE8\n"
  44                 ".long loc_FF953EF0\n"
  45                 ".long loc_FF953EF8\n"
  46                 ".long loc_FF953ED8\n"
  47                 ".long loc_FF953F00\n"
  48                 ".long loc_FF953EE0\n"
  49                 ".long loc_FF953F18\n"
  50                 ".long loc_FF953F10\n"
  51                 ".long loc_FF953F08\n"
  52 "loc_FF953EC8:\n"                                     
  53                                                   
  54                 "BL      sub_FF953FE4\n"              
  55                 "B       loc_FF953F14\n"              
  56 "loc_FF953ED0:\n"                                     
  57                                                   
  58                 "BL      sub_FF954238\n" 
  59                 "B       loc_FF953F14\n"              
  60 "loc_FF953ED8:\n"                                     
  61                                                   
  62                 "BL      sub_FF9546EC_my\n"   //----------------->           
  63                 "B       loc_FF953F14\n"              
  64 "loc_FF953EE0:\n"                                     
  65                                                   
  66                 "BL      sub_FF954B84\n"              
  67                 "B       loc_FF953F14\n"              
  68 "loc_FF953EE8:\n"                                     
  69                                                   
  70                 "BL      sub_FF954954\n"              
  71                 "B       loc_FF953F14\n"              
  72 "loc_FF953EF0:\n"                                     
  73                                                   
  74                 "BL      sub_FF954E9C\n"              
  75                 "B       loc_FF953F14\n"              
  76 "loc_FF953EF8:\n"                                     
  77                                                   
  78                 "BL      sub_FF955060\n"              
  79                 "B       loc_FF953F14\n"              
  80 "loc_FF953F00:\n"                                     
  81                                                   
  82                 "BL      sub_FF954D50\n"              
  83                 "B       loc_FF953F14\n"              
  84 "loc_FF953F08:\n"                                     
  85                                                   
  86                 "BL      sub_FF954E30\n"              
  87                 "B       loc_FF953F14\n"              
  88 "loc_FF953F10:\n"                                     
  89                                                   
  90                 "BL      sub_FF9549A4\n"              
  91 "loc_FF953F14:\n"                                     
  92                                                   
  93                 "LDR     R1, [SP]\n"                  
  94 "loc_FF953F18:\n"                                     
  95                                                   
  96                 "LDR     R3, [R1]\n"                  
  97                 "CMP     R3, #9\n"                    
  98                 "BNE     loc_FF953F30\n"              
  99                 "MOV     R0, R1\n"                    
 100                 "BL      sub_FF9551F0\n"  //  maybe            
 101                 "LDR     R1, [SP]\n"                  
 102 "loc_FF953F30:\n"                                     
 103                 "LDR     R3, =0x5C870\n"              
 104                 "MOV     R2, #0\n"                    
 105                 "LDR     R0, [R3]\n"                  
 106                 "STR     R2, [R1]\n"                  
 107                 "BL      sub_FF82134C\n"          
 108                 "LDR     R3, =0x5CA10\n"              
 109                 "LDR     R0, [R3]\n"                  
 110                 "BL      sub_FF821D54\n"             
 111 "loc_FF953F50:\n"                                     
 112                 "LDR     R3, =0x5C86C\n"              
 113                 "MOV     R1, R4\n"                    
 114                 "LDR     R0, [R3]\n"                  
 115                 "MOV     R2, #0\n"                    
 116                 "BL      sub_FF820F34\n"       
 117                 "LDR     R3, =0x5CA10\n"              
 118                 "MOV     R1, #0\n"                    
 119                 "LDR     R0, [R3]\n"                  
 120                 "BL      sub_FF821B6C\n"             
 121                 "LDR     R0, [SP]\n"                  
 122                 "LDR     R12, [R0]\n"                 
 123                 "CMP     R12, #0xC\n"                 
 124                 "MOV     R1, R0\n"                    
 125                 "BNE     loc_FF953E7C\n"              
 126                 "LDR     R3, =0x5C864\n"              
 127                 "LDR     R0, [R3]\n"                  
 128                 "BL      sub_FF821D54\n"             
 129                 "BL      sub_FF82275C\n"                  
 130                 "ADD     SP, SP, #4\n"                
 131                 "LDMFD   SP!, {R4,PC}\n"              
 132 
 133  );
 134 }
 135 
 136 
 137 void __attribute__((naked,noinline)) sub_FF9546EC_my(){
 138  asm volatile(
 139                 "STMFD   SP!, {R4-R8,LR}\n"           
 140                 "LDR     R5, =0x5C95C\n"              
 141                 "SUB     SP, SP, #0x1C\n"             
 142                 "LDR     R3, [R5]\n"                  
 143                 "CMP     R3, #3\n"                    
 144                 "MOV     R4, R0\n"                    
 145                 "MOVEQ   R3, #4\n"                    
 146                 "STREQ   R3, [R5]\n"                  
 147                 "LDR     R3, =0x5CA04\n"              
 148                 "MOV     LR, PC\n"                    
 149                 "LDR     PC, [R3]\n"                  
 150                 "LDR     R2, [R5]\n"                  
 151                 "CMP     R2, #4\n"                    
 152                 "BNE     loc_FF954884\n"              
 153                 "ADD     R0, SP, #0x18\n"             
 154                 "BL      sub_FF956A58_my\n"   //---------------->          
 155                 "CMP     R0, #0\n"                    
 156                 "BNE     loc_FF95475C\n"              
 157                 "LDR     R3, =0x5C948\n"              
 158                 "LDR     R2, [R3]\n"                  
 159                 "CMP     R2, #1\n"                    
 160                 "BNE     loc_FF954778\n"              
 161                 "LDR     R2, =0x5C998\n"              
 162                 "LDR     R1, =0x5C970\n"              
 163                 "LDR     R12, [R2]\n"                 
 164                 "LDR     R3, [R1]\n"                  
 165                 "CMP     R12, R3\n"                   
 166                 "BCC     loc_FF954778\n"              
 167 "loc_FF95475C:\n"                                     
 168                 "BL      sub_FF9548CC\n"              
 169                 "LDR     R3, =0x5654\n"               
 170                 "LDR     R0, [R3]\n"                  
 171                 "BL      sub_FF8319D0\n"              
 172                 "MOV     R3, #5\n"                    
 173                 "STR     R3, [R5]\n"                  
 174                 "B       loc_FF954884\n"              
 175 "loc_FF954778:\n"                                     
 176                                                   
 177                 "LDR     R0, [R4,#4]\n"               
 178                 "LDR     R5, [R4,#0xC]\n"             
 179                 "LDR     R3, =0x5C9A0\n"              
 180                 "LDR     R4, [R4,#8]\n"               
 181                 "LDR     R8, =0x5C9AC\n"              
 182                 "LDR     R6, =0x5C94C\n"              
 183                 "ADD     R12, SP, #0x14\n"            
 184                 "ADD     LR, SP, #0x10\n"             
 185                 "MOV     R7, #1\n"                    
 186                 "LDR     R2, [R3]\n"                  
 187                 "LDR     R1, [SP,#0x18]\n"            
 188                 "STMEA   SP, {R4,R5,R12,LR}\n"        
 189                 "LDR     R3, [R8]\n"                  
 190                 "STR     R7, [R6]\n"                  
 191                 "BL      sub_FF8A5368\n"              
 192                 "LDR     R3, =0x5C864\n"              
 193                 "MOV     R1, #0x3E8\n"                
 194                 "LDR     R0, [R3]\n"                  
 195                 "BL      sub_FF821B6C\n"             
 196                 "CMP     R0, #9\n"                    
 197                 "BNE     loc_FF9547DC\n"              
 198                 "BL      sub_FF957194\n"              
 199                 "LDR     R3, =0x5C95C\n"              
 200                 "LDR     R0, =0xFF9546D4\n"       
 201                 "B       loc_FF9547F4\n"              
 202 "loc_FF9547DC:\n"                                     
 203                 "LDR     R5, [SP,#0x10]\n"            
 204                 "CMP     R5, #0\n"                    
 205                 "BEQ     loc_FF954800\n"              
 206                 "BL      sub_FF957194\n"              
 207                 "LDR     R3, =0x5C95C\n"              
 208                 "LDR     R0, =0xFF9546E0\n"       
 209 "loc_FF9547F4:\n"                                     
 210                 "STR     R7, [R3]\n"                  
 211                 "BL      sub_FF97C2B4\n"              
 212                 "B       loc_FF954884\n"              
 213 "loc_FF954800:\n"                                     
 214                 "BL      sub_FF8A5414\n"              
 215                 "LDR     R0, [SP,#0x18]\n"            
 216                 "LDR     R1, [SP,#0x14]\n"            
 217                 "BL      sub_FF956EAC\n"              
 218                 "LDR     R4, =0x5C998\n"              
 219                 "LDR     R3, [R4]\n"                  
 220                 "ADD     R3, R3, #1\n"                
 221                 "LDR     R0, [SP,#0x14]\n"            
 222                 "MOV     R1, R8\n"                    
 223                 "STR     R3, [R4]\n"                  
 224                 "MOV     R2, R5\n"                    
 225                 "BL      sub_FF95593C_my\n"   //-------------------->           
 226                 "LDR     R3, =0x5C984\n"              
 227                 "LDR     R4, [R4]\n"                  
 228                 "LDR     R1, [R3]\n"                  
 229                 "MOV     R0, R4\n"                    
 230                 "BL      sub_FFAEA294\n"                 
 231                 "CMP     R0, #0\n"                    
 232                 "BEQ     loc_FF954860\n"              
 233                 "LDR     R6, =0x5C950\n"              
 234                 "LDR     R3, [R6]\n"                  
 235                 "CMP     R3, #1\n"                    
 236                 "BNE     loc_FF954878\n"              
 237                 "B       loc_FF954864\n"              
 238 "loc_FF954860:\n"                                     
 239                 "LDR     R6, =0x5C950\n"              
 240 "loc_FF954864:\n"                                     
 241                 "MOV     R0, R4\n"                    
 242                 "LDR     R3, =0x5C9E0\n"              
 243                 "MOV     LR, PC\n"                    
 244                 "LDR     PC, [R3]\n"                  
 245                 "STR     R5, [R6]\n"                  
 246 "loc_FF954878:\n"                                     
 247                 "LDR     R2, =0x5C94C\n"              
 248                 "MOV     R3, #0\n"                    
 249                 "STR     R3, [R2]\n"                  
 250 "loc_FF954884:\n"                                     
 251                                                   
 252                 "ADD     SP, SP, #0x1C\n"             
 253                 "LDMFD   SP!, {R4-R8,PC}\n"
 254  );
 255 }
 256 
 257 
 258 void __attribute__((naked,noinline)) sub_FF956A58_my(){
 259  asm volatile(
 260                 "STMFD   SP!, {R4-R11,LR}\n"          
 261                 "LDR     R12, =0x5CD00\n"             
 262                 "LDR     R3, =0x5CD18\n"              
 263                 "SUB     SP, SP, #8\n"                
 264                 "LDR     R1, [R3]\n"                  
 265                 "LDR     R2, [R12]\n"                 
 266                 "LDR     R3, =0x5CD9C\n"              
 267                 "ADD     R7, R2, #1\n"                
 268                 "LDR     R3, [R3]\n"                  
 269                 "CMP     R7, R1\n"                    
 270                 "STR     R7, [R12]\n"                 
 271                 "MOV     R11, R0\n"                   
 272                 "STR     R3, [SP,#4]\n"               
 273                 "MOVHI   R3, #0\n"                    
 274                 "STRHI   R3, [R11]\n"                 
 275                 "MOVHI   R0, #0x80000001\n"           
 276                 "BHI     loc_FF956E5C\n"              
 277                 "LDR     R3, =0x5CD80\n"              
 278                 "LDR     R4, [R3]\n"                  
 279                 "MOV     R0, R7\n"                    
 280                 "MOV     R1, R4\n"                    
 281                 "BL      sub_FFAEA294\n"                 
 282                 "CMP     R0, #1\n"                    
 283                 "BNE     loc_FF956CF0\n"              
 284                 "LDR     R3, =0x5CDA0\n"              
 285                 "LDR     R1, =0x5CDAC\n"              
 286                 "LDR     R0, =0x5CCE8\n"              
 287                 "LDR     R10, [R3]\n"                 
 288                 "LDR     R2, [R1]\n"                  
 289                 "LDR     R5, [R0]\n"                  
 290                 "ADD     R2, R10, R2\n"               
 291                 "CMP     R2, R5\n"                    
 292                 "BNE     loc_FF956B0C\n"              
 293                 "MOV     R1, R4\n"                    
 294                 "MOV     R0, R7\n"                    
 295                 "BL      sub_FFAE9C04\n"                 
 296                 "LDR     R2, =0xAAAAAAAB\n"           
 297                 "ADD     R0, R0, #1\n"                
 298                 "UMULL   R1, R3, R2, R0\n"            
 299                 "MOV     R3, R3,LSR#1\n"              
 300                 "ADD     R3, R3, R3,LSL#1\n"          
 301                 "LDR     R4, =0x5CCF0\n"              
 302                 "RSB     R0, R3, R0\n"                
 303                 "STR     R10, [R4,R0,LSL#2]\n"        
 304                 "B       loc_FF956B38\n"              
 305 "loc_FF956B0C:\n"                                     
 306                 "MOV     R1, R4\n"                    
 307                 "MOV     R0, R7\n"                    
 308                 "BL      sub_FFAE9C04\n"                 
 309                 "LDR     R2, =0xAAAAAAAB\n"           
 310                 "ADD     R0, R0, #1\n"                
 311                 "UMULL   R1, R3, R2, R0\n"            
 312                 "MOV     R3, R3,LSR#1\n"              
 313                 "ADD     R3, R3, R3,LSL#1\n"          
 314                 "LDR     R4, =0x5CCF0\n"              
 315                 "RSB     R0, R3, R0\n"                
 316                 "STR     R5, [R4,R0,LSL#2]\n"         
 317 "loc_FF956B38:\n"                                     
 318                 "LDR     R3, =0x5CD00\n"              
 319                 "LDR     R2, =0x5CD80\n"              
 320                 "LDR     R0, [R3]\n"                  
 321                 "LDR     R1, [R2]\n"                  
 322                 "BL      sub_FFAE9C04\n"                 
 323                 "LDR     R2, =0xAAAAAAAB\n"           
 324                 "ADD     R0, R0, #1\n"                
 325                 "UMULL   R1, R3, R2, R0\n"            
 326                 "MOV     R3, R3,LSR#1\n"              
 327                 "ADD     R3, R3, R3,LSL#1\n"          
 328                 "RSB     R0, R3, R0\n"                
 329                 "LDR     R3, =0x5CCE4\n"              
 330                 "LDR     R12, [R4,R0,LSL#2]\n"        
 331                 "LDR     R2, [R3]\n"                  
 332                 "CMP     R12, R2\n"                   
 333                 "BHI     loc_FF956B94\n"              
 334                 "LDR     R4, =0x5CD38\n"              
 335                 "LDR     R3, [R4]\n"                  
 336                 "ADD     R3, R12, R3\n"               
 337                 "ADD     R3, R3, #8\n"                
 338                 "CMP     R2, R3\n"                    
 339                 "BCS     loc_FF956B98\n"              
 340                 "B       loc_FF956D6C\n"              
 341 "loc_FF956B94:\n"                                     
 342                 "LDR     R4, =0x5CD38\n"              
 343 "loc_FF956B98:\n"                                     
 344                 "LDR     R2, =0x5CDA0\n"              
 345                 "LDR     R1, =0x5CDAC\n"              
 346                 "LDR     R0, [R4]\n"                  
 347                 "LDR     R3, [R1]\n"                  
 348                 "LDR     LR, [R2]\n"                  
 349                 "ADD     R0, R12, R0\n"               
 350                 "ADD     R2, LR, R3\n"                
 351                 "ADD     R1, R0, #8\n"                
 352                 "CMP     R1, R2\n"                    
 353                 "BLS     loc_FF956BE8\n"              
 354                 "LDR     R3, =0x5CCE4\n"              
 355                 "RSB     R2, R2, R0\n"                
 356                 "ADD     R0, R2, #8\n"                
 357                 "LDR     R1, [R3]\n"                  
 358                 "ADD     R2, LR, R0\n"                
 359                 "CMP     R1, R2\n"                    
 360                 "BCC     loc_FF956D6C\n"              
 361                 "LDR     R3, =0x5CCE8\n"              
 362                 "STR     R2, [R3]\n"                  
 363                 "B       loc_FF956BF0\n"              
 364 "loc_FF956BE8:\n"                                     
 365                 "LDR     R3, =0x5CCE8\n"              
 366                 "STR     R1, [R3]\n"                  
 367 "loc_FF956BF0:\n"                                     
 368                 "LDR     R3, [R4]\n"                  
 369                 "LDR     R12, =0x5CD50\n"             
 370                 "ADD     R3, R3, #0x18\n"             
 371                 "LDR     R2, [R12,#4]\n"              
 372                 "MOV     R0, R3\n"                    
 373                 "MOV     R1, #0\n"                    
 374                 "CMP     R1, R2\n"                    
 375                 "BHI     loc_FF956DAC\n"              
 376                 "BNE     loc_FF956C20\n"              
 377                 "LDR     R3, [R12]\n"                 
 378                 "CMP     R0, R3\n"                    
 379                 "BHI     loc_FF956DAC\n"              
 380 "loc_FF956C20:\n"                                     
 381                 "LDR     R4, [R4]\n"                  
 382                 "LDR     LR, =0x5CD58\n"              
 383                 "STR     R4, [SP]\n"                  
 384                 "LDR     R12, =0x5CD50\n"             
 385                 "LDR     R3, =0x5CD00\n"              
 386                 "LDMIA   LR, {R7,R8}\n"               
 387                 "LDMIA   R12, {R5,R6}\n"              
 388                 "LDR     R10, [R3]\n"                 
 389                 "LDR     R2, =0x5CD80\n"              
 390                 "MOV     R3, R4\n"                    
 391                 "MOV     R4, #0\n"                    
 392                 "ADDS    R7, R7, R3\n"                
 393                 "ADC     R8, R8, R4\n"                
 394                 "LDR     R9, [R2]\n"                  
 395                 "SUBS    R5, R5, R3\n"                
 396                 "SBC     R6, R6, R4\n"                
 397                 "MVN     R2, #0\n"                    
 398                 "MVN     R1, #0x17\n"                 
 399                 "ADDS    R5, R5, R1\n"                
 400                 "MOV     R4, #0\n"                    
 401                 "MOV     R3, #0x18\n"                 
 402                 "ADC     R6, R6, R2\n"                
 403                 "ADDS    R7, R7, R3\n"                
 404                 "ADC     R8, R8, R4\n"                
 405                 "STMIA   R12, {R5,R6}\n"              
 406                 "SUB     R0, R10, #1\n"               
 407                 "MOV     R1, R9\n"                    
 408                 "STMIA   LR, {R7,R8}\n"               
 409                 "BL      sub_FFAE9C04\n"                 
 410                 "CMP     R10, #1\n"                   
 411                 "MLA     R0, R9, R0, R0\n"            
 412                 "BEQ     loc_FF956CF0\n"              
 413                 "LDR     R1, [SP,#4]\n"               
 414                 "SUB     R3, R0, #1\n"                
 415                 "MOV     R3, R3,LSL#4\n"              
 416                 "ADD     R4, R1, #0x10\n"             
 417                 "ADD     R5, R1, #0x14\n"             
 418                 "LDR     R1, [R5,R3]\n"               
 419                 "LDR     R2, [R4,R3]\n"               
 420                 "MOV     R3, R0,LSL#4\n"              
 421                 "LDR     R0, [SP,#4]\n"               
 422                 "ADD     R2, R2, R1\n"                
 423                 "LDR     LR, =0x62773130\n"           
 424                 "ADD     R1, R0, #8\n"                
 425                 "ADD     R12, R0, #0xC\n"             
 426                 "ADD     R2, R2, #8\n"                
 427                 "MOV     R0, #0\n"                    
 428                 "STR     LR, [R1,R3]\n"               
 429                 "STR     R0, [R12,R3]\n"              
 430                 "STR     R2, [R4,R3]\n"               
 431                 "LDR     R1, [SP]\n"                  
 432                 "STR     R1, [R5,R3]\n"               
 433 "loc_FF956CF0:\n"                                     
 434                                                   
 435                 "LDR     R2, =0x5CCE8\n"              
 436                 "LDR     R3, [R2]\n"                  
 437                 "ADD     R1, R3, #8\n"                
 438                 "STR     R1, [R11]\n"                 
 439                 "LDR     R0, =0x5CCE4\n"              
 440                 "LDR     R2, [R0]\n"                  
 441                 "CMP     R3, R2\n"                    
 442                 "BHI     loc_FF956D28\n"              
 443                 "LDR     LR, =0x5CD48\n"              
 444                 "LDR     R3, [LR]\n"                  
 445                 "ADD     R3, R1, R3\n"                
 446                 "CMP     R2, R3\n"                    
 447                 "BCS     loc_FF956D2C\n"              
 448                 "B       loc_FF956D6C\n"              
 449 "loc_FF956D28:\n"                                     
 450                 "LDR     LR, =0x5CD48\n"              
 451 "loc_FF956D2C:\n"                                     
 452                 "LDR     R3, =0x5CDA0\n"              
 453                 "LDR     R2, =0x5CDAC\n"              
 454                 "LDR     R12, [R3]\n"                 
 455                 "LDR     R0, [R2]\n"                  
 456                 "LDR     R1, [R11]\n"                 
 457                 "LDR     R3, [LR]\n"                  
 458                 "ADD     R2, R1, R3\n"                
 459                 "ADD     R1, R12, R0\n"               
 460                 "CMP     R2, R1\n"                    
 461                 "BLS     loc_FF956D7C\n"              
 462                 "RSB     R0, R1, R2\n"                
 463                 "LDR     R1, =0x5CCE4\n"              
 464                 "LDR     R2, [R1]\n"                  
 465                 "ADD     R3, R12, R0\n"               
 466                 "CMP     R2, R3\n"                    
 467                 "BCS     loc_FF956D7C\n"              
 468 "loc_FF956D6C:\n"                                     
 469                                                   
 470                 "MOV     R3, #0\n"                    
 471                 "STR     R3, [R11]\n"                 
 472                 "MOV     R0, #0x80000003\n"           
 473                 "B       loc_FF956E5C\n"              
 474 "loc_FF956D7C:\n"                                     
 475                                                   
 476                 "LDR     R3, [LR]\n"                  
 477                 "LDR     R12, =0x5CD50\n"             
 478                 "ADD     R3, R3, #0x18\n"             
 479                 "LDR     R2, [R12,#4]\n"              
 480                 "MOV     R0, R3\n"                    
 481                 "MOV     R1, #0\n"                    
 482                 "CMP     R1, R2\n"                    
 483                 "BHI     loc_FF956DAC\n"              
 484                 "BNE     loc_FF956DBC\n"              
 485                 "LDR     R3, [R12]\n"                 
 486                 "CMP     R0, R3\n"                    
 487                 "BLS     loc_FF956DBC\n"              
 488 "loc_FF956DAC:\n"                                     
 489                                                   
 490                 "MOV     R3, #0\n"                    
 491                 "STR     R3, [R11]\n"                 
 492                 "MOV     R0, #0x80000005\n"           
 493                 "B       loc_FF956E5C\n"              
 494 "loc_FF956DBC:\n"                                     
 495                                                   
 496                 "LDR     R1, =0x5CD30\n"              
 497                 "LDR     R0, =0x5CD80\n"              
 498                 "LDR     R3, [R1]\n"                  
 499                 "LDR     R2, [R0]\n"                  
 500                 "ADD     R3, R3, R2,LSL#4\n"          
 501                 "ADD     R3, R3, R3,LSL#2\n"          
 502                 "LDR     R12, =0x5CD50\n"             
 503                 "MOV     R3, R3,LSL#1\n"              
 504                 "ADD     R3, R3, #0xA0\n"             
 505                 "LDR     R2, [R12,#4]\n"              
 506                 "MOV     R0, R3\n"                    
 507                 "MOV     R1, #0\n"                    
 508                 "CMP     R1, R2\n"                    
 509                 "BHI     loc_FF956E04\n"              
 510                 "BNE     loc_FF956E28\n"              
 511                 "LDR     R3, [R12]\n"                 
 512                 "CMP     R0, R3\n"                    
 513                 "BLS     loc_FF956E28\n"              
 514 "loc_FF956E04:\n"                                     
 515                 "LDR     R4, =0x5CD68\n"              
 516                 "LDR     R1, [R4]\n"                  
 517                 "CMP     R1, #0\n"                    
 518                 "BNE     loc_FF956E28\n"              
 519                 "MOV     R0, #0x3140\n"               
 520                 "ADD     R0, R0, #8\n"                
 521                 "BL      sub_FF9801E4\n"              
 522                 "MOV     R3, #1\n"                    
 523                 "STR     R3, [R4]\n"                  
 524 "loc_FF956E28:\n"                                     
 525                                                   
 526                 "LDR     R2, =0x5CD58\n"              
 527                 "LDR     R3, [R2,#4]\n"               
 528                 "CMP     R3, #0\n"                    
 529                 "BHI     loc_FF956E48\n"              
 530                 "BNE     loc_FF956E58\n"              
 531                 "LDR     R3, [R2]\n"                  
 532                 "CMP     R3, #0x40000000\n"           
 533             //  "BLS     loc_FF956E58\n"     // -
 534 
 535                 "B       loc_FF956E58\n"     // +
 536 
 537 "loc_FF956E48:\n"                                     
 538                 "MOV     R3, #0\n"                    
 539                 "STR     R3, [R11]\n"                 
 540                 "MOV     R0, #0x80000007\n"           
 541                 "B       loc_FF956E5C\n"              
 542 "loc_FF956E58:\n"                                     
 543                                                   
 544                 "MOV     R0, #0\n"                    
 545 "loc_FF956E5C:\n"                                     
 546                                                   
 547                 "ADD     SP, SP, #8\n"                
 548                 "LDMFD   SP!, {R4-R11,PC}\n"          
 549  );
 550 }
 551 
 552 
 553 void __attribute__((naked,noinline)) sub_FF95593C_my(){
 554  asm volatile(
 555                 "CMP     R2, #1\n"                    
 556                 "STMFD   SP!, {R4-R7,LR}\n"           
 557                 "MOV     R7, R0\n"                    
 558                 "MOV     R6, R1\n"                    
 559                 "LDREQ   R3, =CompressionRateTable\n" 
 560                 "LDREQ   R2, [R3]\n"                  
 561                 "STREQ   R2, [R6]\n"                  
 562                 "LDMEQFD SP!, {R4-R7,PC}\n"           
 563                 "LDR     R12, =0x5CA60\n"             
 564                 "LDR     R0, [R12]\n"                 
 565                 "LDR     R3, =0x5CA68\n"              
 566                 "CMP     R0, #0\n"                    
 567                 "LDR     R1, [R3]\n"                  
 568                 "BEQ     loc_FF955988\n"              
 569                 "LDR     R2, =0x5CA6C\n"              
 570                 "LDR     R3, [R2]\n"                  
 571                 "CMP     R3, #1\n"                    
 572                 "BNE     loc_FF95599C\n"              
 573                 "B       loc_FF95598C\n"              
 574 "loc_FF955988:\n"                                     
 575                 "LDR     R2, =0x5CA6C\n"              
 576 "loc_FF95598C:\n"                                     
 577                 "MOV     R3, #0\n"                    
 578                 "STR     R3, [R2]\n"                  
 579                 "STR     R7, [R12]\n"                 
 580                 "B       loc_FF955A50\n"              
 581 "loc_FF95599C:\n"                                     
 582                 "LDR     R3, =0x5CA64\n"              
 583                 "LDR     R2, [R3]\n"                  
 584                 "LDR     R5, =table1\n"   // + 0xFF955710      
 585                 "MOV     LR, R2,LSL#2\n"              
 586                 "LDR     R3, [R5,LR]\n"               
 587                 "LDR     R4, =table2\n"   // + 0xFF9557F0      
 588                 "RSB     R12, R3, R0\n"               
 589                 "LDR     R2, [R4,LR]\n"               
 590                 "CMP     R12, #0\n"                   
 591                 "RSB     R0, R2, R0\n"                
 592                 "BLE     loc_FF9559FC\n"              
 593                 "ADD     R3, R5, #0x10\n"             
 594                 "LDR     R2, [R3,LR]\n"               
 595                 "CMP     R2, R12\n"                   
 596                 "ADDGE   R1, R1, #1\n"                
 597                 "BGE     loc_FF9559F0\n"              
 598                 "ADD     R3, R5, #0x20\n"             
 599                 "LDR     R2, [R3,LR]\n"               
 600                 "CMP     R2, R12\n"                   
 601                 "ADDGE   R1, R1, #2\n"                
 602                 "ADDLT   R1, R1, #3\n"                
 603 "loc_FF9559F0:\n"                                     
 604            //   "CMP     R1, #0xE\n"    // -            
 605            //   "MOVGE   R1, #0xE\n"    // -            
 606                 "CMP     R1, #0x1A\n"   // +            
 607                 "MOVGE   R1, #0x1A\n"   // +            
 608 
 609                 "B       loc_FF955A34\n"              
 610 "loc_FF9559FC:\n"                                     
 611                 "CMP     R0, #0\n"                    
 612                 "BGE     loc_FF955A34\n"              
 613                 "ADD     R3, R4, #0x10\n"             
 614                 "LDR     R2, [R3,LR]\n"               
 615                 "CMP     R2, R0\n"                    
 616                 "SUBLE   R1, R1, #1\n"                
 617                 "BLE     loc_FF955A2C\n"              
 618                 "ADD     R3, R4, #0x20\n"             
 619                 "LDR     R2, [R3,LR]\n"               
 620                 "CMP     R2, R0\n"                    
 621                 "SUBLE   R1, R1, #2\n"                
 622                 "SUBGT   R1, R1, #3\n"                
 623 "loc_FF955A2C:\n"                                     
 624                 "CMP     R1, #0\n"                    
 625                 "MOVLT   R1, #0\n"                    
 626 "loc_FF955A34:\n"                                     
 627                                                   
 628                 "LDR     R0, =0x5CA68\n"              
 629                 "LDR     R3, [R0]\n"                  
 630                 "CMP     R1, R3\n"                    
 631                 "LDRNE   R2, =0x5CA6C\n"              
 632                 "MOVNE   R3, #1\n"                    
 633                 "STRNE   R1, [R0]\n"                  
 634                 "STRNE   R3, [R2]\n"                  
 635 "loc_FF955A50:\n"                                     
 636                 "LDR     R3, =0x5CA68\n"              
 637              // "LDR     R1, =0x5658\n"    //
 638                 "LDR     R1, =video_mode\n" //+        
 639                 "LDR     R0, [R3]\n"                  
 640                 "LDR     R2, =CompressionRateTable\n" 
 641                 "LDR     R12, [R1]\n"
 642                 "LDR     R12, [R12]\n" //+                
 643                 "LDR     LR, [R2,R0,LSL#2]\n"         
 644                 "LDR     R3, =0x5CA60\n"              
 645                 "CMP     R12, #1\n"                   
 646                 "STR     R7, [R3]\n"                  
 647                 "STR     LR, [R6]\n"                  
 648 //              "MOVEQ   R3, #0xB\n"         // -
 649 
 650                 "LDREQ   R3, =video_quality\n"          // +
 651                 "LDREQ   R3, [R3]\n"                    // +
 652                 "LDREQ   R3, [R3]\n"                    // +
 653 
 654                 "STREQ   R3, [R6]\n"                  
 655                 "LDMFD   SP!, {R4-R7,PC}\n"           
 656  );
 657 }
 658 

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