root/platform/sx1/sub/200h/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_FF867698_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(){   //ROM:FF867D90
  13  asm volatile(
  14                  "STMFD   SP!, {R2-R10,LR}\n"
  15                  "LDR     R8, =0x423\n"
  16                  "LDR     R7, =0x2710\n"
  17                  "LDR     R4, =0x5570\n"
  18                  "MOV     R6, #0\n"
  19                  "MOV     R5, #1\n"
  20                                  "ADD     R9, R8, #0x3B\n"
  21  "loc_FF867DAC:\n"
  22                  "LDR     R0, [R4,#0x18]\n"
  23                  "MOV     R2, #0\n"
  24                  "ADD     R1, SP, #4\n"
  25                  "BL      sub_FF82759C\n"
  26                  "LDR     R2, =0xFF866330\n"
  27                  "LDR     R0, [R4,#0xB4]\n"
  28                  "MOV     R3, R8\n"
  29                  "MOV     R1, R7\n"
  30                  "BL      sub_FF827E98\n"
  31                  "LDR     R0, [R4,#0x20]\n"
  32                  "CMP     R0, #0\n"
  33                  "BNE     loc_FF867EAC\n"
  34                  "LDR     R0, [SP,#4]\n"
  35                  "LDR     R1, [R0]\n"
  36                  "SUB     R1, R1, #2\n"
  37                  "CMP     R1, #0xB\n"
  38                  "ADDLS   PC, PC, R1,LSL#2\n"
  39                  "B       loc_FF867EAC\n"
  40  "loc_FF867DF4:\n"
  41                  "B       loc_FF867E54\n"
  42  "loc_FF867DF8:\n"
  43                  "B       loc_FF867E6C\n"
  44  "loc_FF867DFC:\n"
  45                  "B       loc_FF867E7C\n"
  46  "loc_FF867E00:\n"
  47                  "B       loc_FF867E84\n"
  48  "loc_FF867E04:\n"
  49                  "B       loc_FF867E5C\n"
  50  "loc_FF867E08:\n"
  51                  "B       loc_FF867E8C\n"
  52  "loc_FF867E0C:\n"
  53                  "B       loc_FF867E64\n"
  54  "loc_FF867E10:\n"
  55                  "B       loc_FF867EAC\n"
  56  "loc_FF867E14:\n"
  57                  "B       loc_FF867E9C\n"
  58  "loc_FF867E18:\n"
  59                  "B       loc_FF867EA4\n"
  60  "loc_FF867E1C:\n"
  61                  "B       loc_FF867E94\n"
  62  "loc_FF867E20:\n"
  63                  "B       loc_FF867E24\n"
  64  "loc_FF867E24:\n"
  65                  "LDR     R0, =0xFF867A40\n"
  66                  "STR     R6, [R4,#0x34]\n"
  67                  "STR     R0, [R4,#0x9C]\n"
  68                  "LDR     R0, =0xFF866864\n"
  69                  "LDR     R2, =0xFF866868\n"
  70                  "STR     R0, [R4,#0xA0]\n"
  71                  "LDR     R0, =0xFF866978\n"
  72                  "LDR     R1, =0x1CB38\n"
  73                  "STR     R6, [R4,#0x24]\n"
  74                  "BL      sub_FF83C8F4\n"
  75                  "STR     R5, [R4,#0x38]\n"
  76                  "B       loc_FF867EAC\n"
  77  "loc_FF867E54:\n"
  78                  "BL      sub_FF867B68\n"
  79                  "B       loc_FF867EAC\n"
  80  "loc_FF867E5C:\n"
  81                  "BL      sub_FF867698_my\n"  //--------------->
  82                  "B       loc_FF867EAC\n"
  83  "loc_FF867E64:\n"
  84                  "BL      sub_FF8680D8\n"
  85                  "B       loc_FF867EAC\n"
  86  "loc_FF867E6C:\n"
  87                  "LDR     R0, [R4,#0x38]\n"
  88                  "CMP     R0, #5\n"
  89                  "STRNE   R5, [R4,#0x28]\n"
  90                  "B       loc_FF867EAC\n"
  91  "loc_FF867E7C:\n"
  92                  "BL      sub_FF867350\n"
  93                  "B       loc_FF867EAC\n"
  94  "loc_FF867E84:\n"
  95                  "BL      sub_FF867008\n"
  96                  "B       loc_FF867EAC\n"
  97  "loc_FF867E8C:\n"
  98                  "BL      sub_FF8667F0\n"
  99                  "B       loc_FF867EAC\n"
 100  "loc_FF867E94:\n"
 101                  "BL      sub_FF868040\n"
 102                  "B       loc_FF867EAC\n"
 103  "loc_FF867E9C:\n"
 104                  "BL      sub_FF866ECC\n"
 105                  "B       loc_FF867EAC\n"
 106  "loc_FF867EA4:\n"
 107                  "BL      sub_FF866DB0\n"
 108                  "STR     R5, [R4,#0xDC]\n"
 109  "loc_FF867EAC:\n"
 110                  "LDR     R1, [SP,#4]\n"
 111                  "LDR     R3, =0xFF866330\n"
 112                  "STR     R6, [R1]\n"
 113                  "STR     R9, [SP]\n"
 114                  "LDR     R0, [R4,#0x1C]\n"
 115                  "MOV     R2, R7\n"
 116                  "BL      sub_FF827EF0\n"
 117                  "LDR     R0, [R4,#0xB4]\n"
 118                  "BL      sub_FF827A88\n"
 119                  "B       loc_FF867DAC\n"
 120  );
 121 }
 122 
 123 
 124 void __attribute__((naked,noinline)) sub_FF867698_my(){ 
 125  asm volatile(
 126                  "STMFD   SP!, {R4-R8,LR}\n"
 127                  "SUB     SP, SP, #0x48\n"
 128                  "MOV     R7, #0\n"
 129                  "LDR     R6, =0x5570\n"
 130                  "MOV     R4, R0\n"
 131                  "STR     R7, [SP,#0x38]\n"
 132                  "STR     R7, [SP,#0x30]\n"
 133                  "LDR     R0, [R6,#0x38]\n"
 134                  "CMP     R0, #3\n"
 135                  "MOVEQ   R0, #4\n"
 136                  "STREQ   R0, [R6,#0x38]\n"
 137                  "LDR     R0, [R6,#0x9C]\n"
 138                  "BLX     R0\n"
 139                  "LDR     R0, [R6,#0x38]\n"
 140                  "CMP     R0, #4\n"
 141                  "BNE     loc_FF86779C\n"
 142                  "ADD     R3, SP, #0x30\n"
 143                  "ADD     R2, SP, #0x34\n"
 144                  "ADD     R1, SP, #0x38\n"
 145                  "ADD     R0, SP, #0x3C\n"
 146                  "BL      sub_FF959B98\n"
 147                  "CMP     R0, #0\n"
 148                  "MOV     R5, #1\n"
 149                  "BNE     loc_FF867714\n"
 150                  "LDR     R1, [R6,#0x28]\n"
 151                  "CMP     R1, #1\n"
 152                  "BNE     loc_FF8677B0\n"
 153                  "LDR     R1, [R6,#0x4C]\n"
 154                  "LDR     R2, [R6,#0x3C]\n"
 155                  "CMP     R1, R2\n"
 156                  "BCC     loc_FF8677B0\n"
 157  "loc_FF867714:\n"
 158                  "BL      sub_FF8669B8\n"
 159                  "BL      sub_FF86802C\n"
 160                  "LDR     R0, [R4,#0x1C]\n"
 161                  "LDR     R1, [R4,#0x20]\n"
 162                  "ADD     R3, SP, #0x40\n"
 163                  "MVN     R2, #1\n"
 164                  "ADD     R7, SP, #0x18\n"
 165                  "STMIA   R7, {R0-R3}\n"
 166                  "LDR     R2, [R6,#0x64]\n"
 167                  "LDR     R3, [R6,#0x68]\n"
 168                  "MOV     R0, #0\n"
 169                  "ADD     R1, SP, #0x44\n"
 170                  "ADD     R7, SP, #8\n"
 171                  "STMIA   R7, {R0-R3}\n"
 172                  "MOV     R3, #0\n"
 173                  "MOV     R2, #0x40\n"
 174                  "STRD    R2, [SP]\n"
 175                  "LDMIB   R4, {R0,R1}\n"
 176                  "LDR     R3, =0x1CBC4\n"
 177                  "MOV     R2, R8\n"
 178                  "BL      sub_FF91071C\n"
 179                  "LDR     R0, [R6,#0x10]\n"
 180                  "MOV     R1, #0x3E8\n"
 181                  "BL      sub_FF8279B8\n"
 182                  "CMP     R0, #9\n"
 183                  "BEQ     loc_FF867834\n"
 184                  "LDR     R0, [SP,#0x40]\n"
 185                  "CMP     R0, #0\n"
 186                  "BNE     loc_FF867850\n"
 187                  "MOV     R0, #1\n"
 188                  "BL      sub_FF9107C4\n"
 189                  "BL      sub_FF910800\n"
 190                  "MOV     R0, #5\n"
 191                  "STR     R0, [R6,#0x38]\n"
 192  "loc_FF86779C:\n"
 193                  "ADD     SP, SP, #0x48\n"
 194                  "LDMFD   SP!, {R4-R8,PC}\n"
 195  "loc_FF8677A4:\n"
 196                  "BL      sub_FF88581C\n"
 197                  "MOV     R0, #1\n"
 198                  "B       loc_FF867900\n"
 199  "loc_FF8677B0:\n"
 200                  "LDR     R12, [SP,#0x38]\n"
 201                  "CMP     R12, #0\n"
 202                  "BEQ     loc_FF8679E8\n"
 203                  "STR     R5, [R6,#0x2C]\n"
 204                  "LDR     R0, [R6,#0x4C]\n"
 205                  "LDR     R8, [R4,#0xC]\n"
 206                  "CMP     R0, #0\n"
 207                  "LDRNE   LR, [SP,#0x3C]\n"
 208                  "BNE     loc_FF86787C\n"
 209                  "LDR     R0, [R4,#0x1C]\n"
 210                  "LDR     R1, [R4,#0x20]\n"
 211                  "ADD     R3, SP, #0x40\n"
 212                  "MVN     R2, #0\n"
 213                  "ADD     LR, SP, #0x18\n"
 214                  "STMIA   LR, {R0-R3}\n"
 215                  "LDR     R0, [SP,#0x30]\n"
 216                  "LDR     R2, [R6,#0x64]\n"
 217                  "LDR     R3, [R6,#0x68]\n"
 218                  "ADD     R1, SP, #0x44\n"
 219                  "ADD     LR, SP, #8\n"
 220                  "STMIA   LR, {R0-R3}\n"
 221                  "LDR     R3, [SP,#0x34]\n"
 222                  "STR     R12, [SP]\n"
 223                  "STR     R3, [SP,#4]\n"
 224                  "LDMIB   R4, {R0,R1}\n"
 225                  "LDR     R3, [SP,#0x3C]\n"
 226                  "MOV     R2, R8\n"
 227                  "BL      sub_FF91071C\n"
 228                  "LDR     R0, [R6,#0x10]\n"
 229                  "MOV     R1, #0x3E8\n"
 230                  "BL      sub_FF8279B8\n"
 231                  "CMP     R0, #9\n"
 232                  "BNE     loc_FF867844\n"
 233  "loc_FF867834:\n"
 234                  "BL      sub_FF95A064\n"
 235                  "MOV     R0, #0x90000\n"
 236                  "STR     R5, [R6,#0x38]\n"
 237                  "B       loc_FF8677A4\n"
 238  "loc_FF867844:\n"
 239                  "LDR     R0, [SP,#0x40]\n"
 240                  "CMP     R0, #0\n"
 241                  "BEQ     loc_FF867860\n"
 242  "loc_FF867850:\n"
 243                  "BL      sub_FF95A064\n"
 244                  "MOV     R0, #0xA0000\n"
 245                  "STR     R5, [R6,#0x38]\n"
 246                  "B       loc_FF8677A4\n"
 247  "loc_FF867860:\n"
 248                  "MOV     R0, #1\n"
 249                  "BL      sub_FF9107C4\n"
 250                  "LDR     R0, [SP,#0x44]\n"
 251                  "LDR     R1, [SP,#0x3C]\n"
 252                  "ADD     LR, R1, R0\n"
 253                  "LDR     R1, [SP,#0x38]\n"
 254                  "SUB     R12, R1, R0\n"
 255  "loc_FF86787C:\n"
 256                  "LDR     R2, [R6,#0x48]\n"
 257                  "LDR     R0, [R4,#0x1C]\n"
 258                  "LDR     R1, [R4,#0x20]\n"
 259                  "ADD     R3, SP, #0x40\n"
 260                  "STR     R1, [SP,#0x1C]\n"
 261                  "STR     R0, [SP,#0x18]\n"
 262                  "STR     R3, [SP,#0x24]\n"
 263                  "STR     R2, [SP,#0x20]\n"
 264                  "LDR     R2, [R6,#0x64]\n"
 265                  "LDR     R3, [R6,#0x68]\n"
 266                  "ADD     R1, SP, #0x44\n"
 267                  "STR     R1, [SP,#0xC]\n"
 268                  "STR     R3, [SP,#0x14]\n"
 269                  "LDR     R3, [SP,#0x34]\n"
 270                  "LDR     R0, [SP,#0x30]\n"
 271                  "STR     R2, [SP,#0x10]\n"
 272                  "STR     R3, [SP,#4]\n"
 273                  "STR     R12, [SP]\n"
 274                  "STR     R0, [SP,#8]\n"
 275                  "LDMIB   R4, {R0,R1}\n"
 276                  "MOV     R3, LR\n"
 277                  "MOV     R2, R8\n"
 278                  "BL      sub_FF91071C\n"
 279                  "LDR     R0, [R6,#0x10]\n"
 280                  "MOV     R1, #0x3E8\n"
 281                  "BL      sub_FF8279B8\n"
 282                  "CMP     R0, #9\n"
 283                  "BNE     loc_FF867908\n"
 284                  "BL      sub_FF95A064\n"
 285                  "MOV     R0, #0x90000\n"
 286                  "STR     R5, [R6,#0x38]\n"
 287                  "BL      sub_FF88581C\n"
 288                  "MOV     R0, #0\n"
 289  "loc_FF867900:\n"
 290                  "BL      sub_FF9107C4\n"
 291                  "B       loc_FF86779C\n"
 292  "loc_FF867908:\n"
 293                  "LDR     R0, [SP,#0x40]\n"
 294                  "CMP     R0, #0\n"
 295                  "BEQ     loc_FF867928\n"
 296                  "BL      sub_FF95A064\n"
 297                  "MOV     R0, #0xA0000\n"
 298                  "STR     R5, [R6,#0x38]\n"
 299                  "BL      sub_FF88581C\n"
 300                  "B       loc_FF86779C\n"
 301  "loc_FF867928:\n"
 302                  "MOV     R0, #0\n"
 303                  "BL      sub_FF9107C4\n"
 304                  "LDR     R0, [R6,#0xDC]\n"
 305                  "CMP     R0, #1\n"
 306                  "BNE     loc_FF8679B8\n"
 307                  "LDR     R0, [R6,#0x48]\n"
 308                  "MOV     R1, #0xF\n"
 309                  "BL      sub_FFB28F84\n"
 310                  "MOVS    R4, R1\n"
 311                  "STREQ   R7, [R6,#0xDC]\n"
 312                  "BEQ     loc_FF8679B8\n"
 313                  "LDR     R5, [SP,#0x3C]\n"
 314                  "MOV     R2, #4\n"
 315                  "ADD     R0, SP, #0x2C\n"
 316                  "ADD     R1, R5, #4\n"
 317                  "BL      sub_FFB26A64\n"
 318                  "LDR     R0, [SP,#0x2C]\n"
 319                  "MOV     R1, R0,LSR#24\n"
 320                  "AND     R2, R0, #0xFF0000\n"
 321                  "ORR     R1, R1, R2,LSR#8\n"
 322                  "AND     R2, R0, #0xFF00\n"
 323                  "ORR     R1, R1, R2,LSL#8\n"
 324                  "ORR     R0, R1, R0,LSL#24\n"
 325                  "BIC     R0, R0, #0x1E000\n"
 326                  "ORR     R0, R0, R4,LSL#13\n"
 327                  "MOV     R1, R0,LSR#24\n"
 328                  "AND     R2, R0, #0xFF0000\n"
 329                  "ORR     R1, R1, R2,LSR#8\n"
 330                  "AND     R2, R0, #0xFF00\n"
 331                  "ORR     R1, R1, R2,LSL#8\n"
 332                  "ORR     R0, R1, R0,LSL#24\n"
 333                  "STR     R0, [SP,#0x2C]\n"
 334                  "ADD     R0, R5, #4\n"
 335                  "ADD     R1, SP, #0x2C\n"
 336                  "MOV     R2, #4\n"
 337                  "BL      sub_FFB26A64\n"
 338  "loc_FF8679B8:\n"
 339                  "LDR     R0, [SP,#0x3C]\n"
 340                  "LDR     R1, [SP,#0x44]\n"
 341                  "BL      sub_FF959DC0\n"
 342                  "LDR     R0, [R6,#0x48]\n"
 343                  "LDR     R3, =0x55D8\n"    // ->----
 344                  "ADD     R1, R0, #1\n"     //       |
 345                  "STR     R1, [R6,#0x48]\n" //       |
 346                  "STR     R3, [SP]\n"       //       |
 347                  "LDR     R0, [SP,#0x44]\n" //       |
 348                  "SUB     R3, R3, #4\n"     // ->----|
 349                  "MOV     R2, #0xF\n"       //       |
 350                  "BL      sub_FF957E98\n"   //       |
 351                                             //       |
 352                  "LDR     R0, =0x55D8-4\n"  // -<----     // +
 353                  "BL      set_quality\n"                  // +
 354 
 355 
 356  "loc_FF8679E8:\n"
 357                  "LDR     R0, [R6,#0x4C]\n"
 358                  "ADD     R0, R0, #1\n"
 359                  "STR     R0, [R6,#0x4C]\n"
 360                  "LDR     R1, [R6,#0x74]\n"
 361                  "MUL     R0, R1, R0\n"
 362                  "LDR     R1, [R6,#0x70]\n"
 363                  "BL      sub_FFB28F84\n"
 364                  "MOV     R4, R0\n"
 365                  "BL      sub_FF95A09C\n"
 366                  "LDR     R1, [R6,#0x6C]\n"
 367                  "CMP     R1, R4\n"
 368                  "BNE     loc_FF867A24\n"
 369                  "LDR     R0, [R6,#0x30]\n"
 370                  "CMP     R0, #1\n"
 371                  "BNE     loc_FF867A38\n"
 372  "loc_FF867A24:\n"
 373                  "LDR     R1, [R6,#0x80]\n"
 374                  "MOV     R0, R4\n"
 375                  "BLX     R1\n"
 376                  "STR     R4, [R6,#0x6C]\n"
 377                  "STR     R7, [R6,#0x30]\n"
 378  "loc_FF867A38:\n"
 379                  "STR     R7, [R6,#0x2C]\n"
 380                  "B       loc_FF86779C\n"
 381 
 382  );
 383 }
 384 

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