root/platform/sx10/sub/101b/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_FF863E8C_my

   1 #include "conf.h"
   2 
   3 void change_video_tables(int a, int b){
   4 }
   5 
   6 
   7 void  set_quality(int *x){ // -17 highest; +12 lowest
   8  if (conf.video_mode) *x=12-((conf.video_quality-1)*(12+17)/(99-1));
   9 }
  10 
  11 
  12 void __attribute__((naked,noinline)) movie_record_task(){ 
  13  asm volatile(
  14                  "STMFD   SP!, {R2-R8,LR}\n"
  15                  "LDR     R8, =0x3F5\n"
  16                  "LDR     R7, =0x2710\n"
  17                  "LDR     R4, =0x53F8\n"
  18                  "MOV     R6, #0\n"
  19                  "MOV     R5, #1\n"
  20  "loc_FF8645A4:\n"
  21                  "LDR     R0, [R4,#0x18]\n"
  22                  "MOV     R2, #0\n"
  23                  "ADD     R1, SP, #4\n"
  24                  "BL      sub_FF8274FC\n"
  25                  "LDR     R2, =0xFF862E3C\n"
  26                  "LDR     R0, [R4,#0xB0]\n"
  27                  "MOV     R3, R8\n"
  28                  "MOV     R1, R7\n"
  29                  "BL      sub_FF827DF8\n"
  30                  "LDR     R0, [R4,#0x20]\n"
  31                  "CMP     R0, #0\n"
  32                  "BNE     loc_FF8646A4\n"
  33                  "LDR     R0, [SP,#4]\n"
  34                  "LDR     R1, [R0]\n"
  35                  "SUB     R1, R1, #2\n"
  36                  "CMP     R1, #0xB\n"
  37                  "ADDLS   PC, PC, R1,LSL#2\n"
  38                  "B       loc_FF8646A4\n"
  39  "loc_FF8645EC:\n"
  40                  "B       loc_FF86464C\n"
  41  "loc_FF8645F0:\n"
  42                  "B       loc_FF864664\n"
  43  "loc_FF8645F4:\n"
  44                  "B       loc_FF864674\n"
  45  "loc_FF8645F8:\n"
  46                  "B       loc_FF86467C\n"
  47  "loc_FF8645FC:\n"
  48                  "B       loc_FF864654\n"
  49  "loc_FF864600:\n"
  50                  "B       loc_FF864684\n"
  51  "loc_FF864604:\n"
  52                  "B       loc_FF86465C\n"
  53  "loc_FF864608:\n"
  54                  "B       loc_FF8646A4\n"
  55  "loc_FF86460C:\n"
  56                  "B       loc_FF864694\n"
  57  "loc_FF864610:\n"
  58                  "B       loc_FF86469C\n"
  59  "loc_FF864614:\n"
  60                  "B       loc_FF86468C\n"
  61  "loc_FF864618:\n"
  62                  "B       loc_FF86461C\n"
  63  "loc_FF86461C:\n"
  64 //                 "LDR     R0, =0xFF864234\n"
  65                  "LDR     R0, =0xFF8642D8\n"
  66                  "STR     R6, [R4,#0x34]\n"
  67                  "STR     R0, [R4,#0x9C]\n"
  68                  "LDR     R0, =0xFF863350\n"
  69                  "LDR     R2, =0xFF863354\n"
  70                  "STR     R0, [R4,#0xA0]\n"
  71                  "LDR     R0, =0xFF863464\n"
  72                  "LDR     R1, =0x1BA0C\n"
  73                  "STR     R6, [R4,#0x24]\n"
  74                  "BL      sub_FF83C1F4\n"
  75                  "STR     R5, [R4,#0x38]\n"
  76                  "B       loc_FF8646A4\n"
  77  "loc_FF86464C:\n"
  78 //                 "BL      sub_FF86435C\n"
  79                  "BL      sub_FF864400\n"
  80                  "B       loc_FF8646A4\n"
  81  "loc_FF864654:\n"
  82                  "BL      sub_FF863E8C_my\n"  //--------------->
  83                  "B       loc_FF8646A4\n"
  84  "loc_FF86465C:\n"
  85                  "BL      sub_FF864AC4\n"       // +A0
  86                  "B       loc_FF8646A4\n"
  87  "loc_FF864664:\n"
  88                  "LDR     R0, [R4,#0x38]\n"
  89                  "CMP     R0, #5\n"
  90                  "STRNE   R5, [R4,#0x28]\n"
  91                  "B       loc_FF8646A4\n"
  92  "loc_FF864674:\n"
  93 //                 "BL      sub_FF863BD4\n"
  94                  "BL      sub_FF863C78\n"
  95                  "B       loc_FF8646A4\n"
  96  "loc_FF86467C:\n"
  97                  "BL      sub_FF863968\n"       // +A0
  98                  "B       loc_FF8646A4\n"
  99  "loc_FF864684:\n"
 100                  "BL      sub_FF8632DC\n"
 101                  "B       loc_FF8646A4\n"
 102  "loc_FF86468C:\n"
 103 //                 "BL      sub_FF864988\n"
 104                  "BL      sub_FF8649E0\n"
 105                  "B       loc_FF8646A4\n"
 106  "loc_FF864694:\n"
 107 //                 "BL      sub_FF86483C\n"
 108                  "BL      sub_FF8648E0\n"
 109                  "B       loc_FF8646A4\n"
 110  "loc_FF86469C:\n"
 111 //                 "BL      sub_FF8637B8\n"
 112                  "BL      sub_FF863858\n"
 113                  "STR     R5, [R4,#0xD8]\n"
 114  "loc_FF8646A4:\n"
 115                  "LDR     R1, [SP,#4]\n"
 116                  "MOV     R3, #0x430\n"
 117                  "STR     R6, [R1]\n"
 118                  "STR     R3, [SP]\n"
 119                  "LDR     R3, =0xFF862E3C\n"
 120                  "MOV     R2, R7\n"
 121                  "LDR     R0, [R4,#0x1C]\n"
 122                  "BL      sub_FF827E50\n"
 123                  "LDR     R0, [R4,#0xB0]\n"
 124                  "BL      sub_FF8279E8\n"
 125                  "B       loc_FF8645A4\n"
 126  );
 127 }
 128 
 129 
 130 void __attribute__((naked,noinline)) sub_FF863E8C_my(){ 
 131  asm volatile(
 132                  "STMFD   SP!, {R4-R8,LR}\n"
 133                  "SUB     SP, SP, #0x48\n"
 134                  "MOV     R7, #0\n"
 135                  "LDR     R6, =0x53F8\n"
 136                  "MOV     R4, R0\n"
 137                  "STR     R7, [SP,#0x38]\n"
 138                  "STR     R7, [SP,#0x30]\n"
 139                  "LDR     R0, [R6,#0x38]\n"
 140                  "CMP     R0, #3\n"
 141                  "MOVEQ   R0, #4\n"
 142                  "STREQ   R0, [R6,#0x38]\n"
 143                  "LDR     R0, [R6,#0x9C]\n"
 144                  "BLX     R0\n"
 145                  "LDR     R0, [R6,#0x38]\n"
 146                  "CMP     R0, #4\n"
 147                  "BNE     loc_FF863F90\n"
 148                  "ADD     R3, SP, #0x30\n"
 149                  "ADD     R2, SP, #0x34\n"
 150                  "ADD     R1, SP, #0x38\n"
 151                  "ADD     R0, SP, #0x3C\n"
 152                  "BL      sub_FF946364\n"       // +A0
 153                  "CMP     R0, #0\n"
 154                  "MOV     R5, #1\n"
 155                  "BNE     loc_FF863F08\n"
 156                  "LDR     R1, [R6,#0x28]\n"
 157                  "CMP     R1, #1\n"
 158                  "BNE     loc_FF863FA4\n"
 159                  "LDR     R1, [R6,#0x4C]\n"
 160                  "LDR     R2, [R6,#0x3C]\n"
 161                  "CMP     R1, R2\n"
 162                  "BCC     loc_FF863FA4\n"
 163  "loc_FF863F08:\n"
 164                  "BL      sub_FF8634A4\n"
 165 //                 "BL      sub_FF864828\n"
 166                  "BL      sub_FF8648CC\n"
 167                  "LDR     R0, [R4,#0x14]\n"
 168                  "LDR     R1, [R4,#0x18]\n"
 169                  "ADD     R3, SP, #0x40\n"
 170                  "MVN     R2, #1\n"
 171                  "ADD     R7, SP, #0x18\n"
 172                  "STMIA   R7, {R0-R3}\n"
 173                  "LDR     R2, [R6,#0x64]\n"
 174                  "LDR     R3, [R6,#0x68]\n"
 175                  "MOV     R0, #0\n"
 176                  "ADD     R1, SP, #0x44\n"
 177                  "ADD     R7, SP, #8\n"
 178                  "STMIA   R7, {R0-R3}\n"
 179                  "MOV     R3, #0\n"
 180                  "MOV     R2, #0x40\n"
 181                  "STRD    R2, [SP]\n"
 182                  "LDMIB   R4, {R0,R1}\n"
 183                  "LDR     R3, =0x1BA98\n"
 184                  "MOV     R2, R8\n"
 185                  "BL      sub_FF8FF658\n"       // +A0
 186                  "LDR     R0, [R6,#0x10]\n"
 187                  "MOV     R1, #0x3E8\n"
 188                  "BL      sub_FF827918\n"
 189                  "CMP     R0, #9\n"
 190                  "BEQ     loc_FF864028\n"
 191                  "LDR     R0, [SP,#0x40]\n"
 192                  "CMP     R0, #0\n"
 193                  "BNE     loc_FF864044\n"
 194                  "MOV     R0, #1\n"
 195                  "BL      sub_FF8FF700\n"       // +A0
 196                  "BL      sub_FF8FF73C\n"       // +A0
 197                  "MOV     R0, #5\n"
 198                  "STR     R0, [R6,#0x38]\n"
 199  "loc_FF863F90:\n"
 200                  "ADD     SP, SP, #0x48\n"
 201                  "LDMFD   SP!, {R4-R8,PC}\n"
 202  "loc_FF863F98:\n"
 203                  "BL      sub_FF8812AC\n"       // +A0
 204                  "MOV     R0, #1\n"
 205                  "B       loc_FF8640F4\n"
 206  "loc_FF863FA4:\n"
 207                  "LDR     R12, [SP,#0x38]\n"
 208                  "CMP     R12, #0\n"
 209                  "BEQ     loc_FF8641DC\n"
 210                  "STR     R5, [R6,#0x2C]\n"
 211                  "LDR     R0, [R6,#0x4C]\n"
 212                  "LDR     R8, [R4,#0xC]\n"
 213                  "CMP     R0, #0\n"
 214                  "LDRNE   LR, [SP,#0x3C]\n"
 215                  "BNE     loc_FF864070\n"
 216                  "LDR     R0, [R4,#0x14]\n"
 217                  "LDR     R1, [R4,#0x18]\n"
 218                  "ADD     R3, SP, #0x40\n"
 219                  "MVN     R2, #0\n"
 220                  "ADD     LR, SP, #0x18\n"
 221                  "STMIA   LR, {R0-R3}\n"
 222                  "LDR     R0, [SP,#0x30]\n"
 223                  "LDR     R2, [R6,#0x64]\n"
 224                  "LDR     R3, [R6,#0x68]\n"
 225                  "ADD     R1, SP, #0x44\n"
 226                  "ADD     LR, SP, #8\n"
 227                  "STMIA   LR, {R0-R3}\n"
 228                  "LDR     R3, [SP,#0x34]\n"
 229                  "STR     R12, [SP]\n"
 230                  "STR     R3, [SP,#4]\n"
 231                  "LDMIB   R4, {R0,R1}\n"
 232                  "LDR     R3, [SP,#0x3C]\n"
 233                  "MOV     R2, R8\n"
 234                  "BL      sub_FF8FF658\n"       // +A0
 235                  "LDR     R0, [R6,#0x10]\n"
 236                  "MOV     R1, #0x3E8\n"
 237                  "BL      sub_FF827918\n"
 238                  "CMP     R0, #9\n"
 239                  "BNE     loc_FF864038\n"
 240  "loc_FF864028:\n"
 241                  "BL      sub_FF946830\n"       // +A0
 242                  "MOV     R0, #0x90000\n"
 243                  "STR     R5, [R6,#0x38]\n"
 244                  "B       loc_FF863F98\n"
 245  "loc_FF864038:\n"
 246                  "LDR     R0, [SP,#0x40]\n"
 247                  "CMP     R0, #0\n"
 248                  "BEQ     loc_FF864054\n"
 249  "loc_FF864044:\n"
 250                  "BL      sub_FF946830\n"       // +A0
 251                  "MOV     R0, #0xA0000\n"
 252                  "STR     R5, [R6,#0x38]\n"
 253                  "B       loc_FF863F98\n"
 254  "loc_FF864054:\n"
 255                  "MOV     R0, #1\n"
 256                  "BL      sub_FF8FF700\n"       // +A0
 257                  "LDR     R0, [SP,#0x44]\n"
 258                  "LDR     R1, [SP,#0x3C]\n"
 259                  "ADD     LR, R1, R0\n"
 260                  "LDR     R1, [SP,#0x38]\n"
 261                  "SUB     R12, R1, R0\n"
 262  "loc_FF864070:\n"
 263                  "LDR     R2, [R6,#0x48]\n"
 264                  "LDR     R0, [R4,#0x14]\n"
 265                  "LDR     R1, [R4,#0x18]\n"
 266                  "ADD     R3, SP, #0x40\n"
 267                  "STR     R1, [SP,#0x1C]\n"
 268                  "STR     R0, [SP,#0x18]\n"
 269                  "STR     R3, [SP,#0x24]\n"
 270                  "STR     R2, [SP,#0x20]\n"
 271                  "LDR     R2, [R6,#0x64]\n"
 272                  "LDR     R3, [R6,#0x68]\n"
 273                  "ADD     R1, SP, #0x44\n"
 274                  "STR     R1, [SP,#0xC]\n"
 275                  "STR     R3, [SP,#0x14]\n"
 276                  "LDR     R3, [SP,#0x34]\n"
 277                  "LDR     R0, [SP,#0x30]\n"
 278                  "STR     R2, [SP,#0x10]\n"
 279                  "STR     R3, [SP,#4]\n"
 280                  "STR     R12, [SP]\n"
 281                  "STR     R0, [SP,#8]\n"
 282                  "LDMIB   R4, {R0,R1}\n"
 283                  "MOV     R3, LR\n"
 284                  "MOV     R2, R8\n"
 285                  "BL      sub_FF8FF658\n"       // +A0
 286                  "LDR     R0, [R6,#0x10]\n"
 287                  "MOV     R1, #0x3E8\n"
 288                  "BL      sub_FF827918\n"
 289                  "CMP     R0, #9\n"
 290                  "BNE     loc_FF8640FC\n"
 291                  "BL      sub_FF946830\n"       // +A0
 292                  "MOV     R0, #0x90000\n"
 293                  "STR     R5, [R6,#0x38]\n"
 294                  "BL      sub_FF8812AC\n"       // +A0
 295                  "MOV     R0, #0\n"
 296  "loc_FF8640F4:\n"
 297                  "BL      sub_FF8FF700\n"       // +A0
 298                  "B       loc_FF863F90\n"
 299  "loc_FF8640FC:\n"
 300                  "LDR     R0, [SP,#0x40]\n"
 301                  "CMP     R0, #0\n"
 302                  "BEQ     loc_FF86411C\n"
 303                  "BL      sub_FF946830\n"       // +A0
 304                  "MOV     R0, #0xA0000\n"
 305                  "STR     R5, [R6,#0x38]\n"
 306                  "BL      sub_FF8812AC\n"       // +A0
 307                  "B       loc_FF863F90\n"
 308  "loc_FF86411C:\n"
 309                  "MOV     R0, #0\n"
 310                  "BL      sub_FF8FF700\n"       // +A0
 311                  "LDR     R0, [R6,#0xD8]\n"
 312                  "CMP     R0, #1\n"
 313                  "BNE     loc_FF8641AC\n"
 314                  "LDR     R0, [R6,#0x48]\n"
 315                  "MOV     R1, #0xF\n"
 316 //                 "BL      sub_FFB02524\n"
 317                  "BL      sub_FFB02650\n"
 318                  "MOVS    R4, R1\n"
 319                  "STREQ   R7, [R6,#0xD8]\n"
 320                  "BEQ     loc_FF8641AC\n"
 321                  "LDR     R5, [SP,#0x3C]\n"
 322                  "MOV     R2, #4\n"
 323                  "ADD     R0, SP, #0x2C\n"
 324                  "ADD     R1, R5, #4\n"
 325 //                 "BL      sub_FFB00004\n"
 326                  "BL      sub_FFB00130\n"
 327                  "LDR     R0, [SP,#0x2C]\n"
 328                  "MOV     R1, R0,LSR#24\n"
 329                  "AND     R2, R0, #0xFF0000\n"
 330                  "ORR     R1, R1, R2,LSR#8\n"
 331                  "AND     R2, R0, #0xFF00\n"
 332                  "ORR     R1, R1, R2,LSL#8\n"
 333                  "ORR     R0, R1, R0,LSL#24\n"
 334                  "BIC     R0, R0, #0x1E000\n"
 335                  "ORR     R0, R0, R4,LSL#13\n"
 336                  "MOV     R1, R0,LSR#24\n"
 337                  "AND     R2, R0, #0xFF0000\n"
 338                  "ORR     R1, R1, R2,LSR#8\n"
 339                  "AND     R2, R0, #0xFF00\n"
 340                  "ORR     R1, R1, R2,LSL#8\n"
 341                  "ORR     R0, R1, R0,LSL#24\n"
 342                  "STR     R0, [SP,#0x2C]\n"
 343                  "ADD     R0, R5, #4\n"
 344                  "ADD     R1, SP, #0x2C\n"
 345                  "MOV     R2, #4\n"
 346 //                 "BL      sub_FFB00004\n"
 347                  "BL      sub_FFB00130\n"
 348  "loc_FF8641AC:\n"
 349                  "LDR     R0, [SP,#0x3C]\n"
 350                  "LDR     R1, [SP,#0x44]\n"
 351                  "BL      sub_FF94658C\n"       // +A0
 352                  "LDR     R0, [R6,#0x48]\n"
 353                  "LDR     R3, =0x5460\n"    // ->----
 354                  "ADD     R1, R0, #1\n"     //       |
 355                  "STR     R1, [R6,#0x48]\n" //       |
 356                  "STR     R3, [SP]\n"       //       |
 357                  "LDR     R0, [SP,#0x44]\n" //       |
 358                  "SUB     R3, R3, #4\n"     // ->----|
 359                  "MOV     R2, #0xF\n"       //       |
 360                  "BL      sub_FF944788\n"   //       |  // +A0
 361                                             //       |
 362                  "LDR     R0, =0x5460-4\n"  // -<----     // +
 363                  "BL      set_quality\n"                  // +
 364 
 365 
 366  "loc_FF8641DC:\n"
 367                  "LDR     R0, [R6,#0x4C]\n"
 368                  "ADD     R0, R0, #1\n"
 369                  "STR     R0, [R6,#0x4C]\n"
 370                  "LDR     R1, [R6,#0x74]\n"
 371                  "MUL     R0, R1, R0\n"
 372                  "LDR     R1, [R6,#0x70]\n"
 373 //                 "BL      sub_FFB02524\n"
 374                  "BL      sub_FFB02650\n"
 375                  "MOV     R4, R0\n"
 376                  "BL      sub_FF946868\n"       // +A0
 377                  "LDR     R1, [R6,#0x6C]\n"
 378                  "CMP     R1, R4\n"
 379                  "BNE     loc_FF864218\n"
 380                  "LDR     R0, [R6,#0x30]\n"
 381                  "CMP     R0, #1\n"
 382                  "BNE     loc_FF86422C\n"
 383  "loc_FF864218:\n"
 384                  "LDR     R1, [R6,#0x80]\n"
 385                  "MOV     R0, R4\n"
 386                  "BLX     R1\n"
 387                  "STR     R4, [R6,#0x6C]\n"
 388                  "STR     R7, [R6,#0x30]\n"
 389  "loc_FF86422C:\n"
 390                  "STR     R7, [R6,#0x2C]\n"
 391                  "B       loc_FF863F90\n"
 392 
 393  );
 394 }
 395 

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