root/platform/sx20/sub/100f/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_FF878924_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 
  13 void __attribute__((naked,noinline)) movie_record_task(){ 
  14  asm volatile(
  15                "STMFD  SP!, {R2-R8,LR}\n"
  16                "LDR    R8, =0x425\n"
  17                "LDR    R7, =0x2710\n"
  18                "LDR    R4, =0x2BF8\n"
  19                "MOV    R6, #0\n"
  20                "MOV    R5, #1\n"
  21 "loc_FF87904C:\n" //                           ; CODE XREF: task_MovieRecord+140\031j\n"
  22                "LDR    R0, [R4,#0x18]\n"
  23                "MOV    R2, #0\n"
  24                "ADD    R1, SP, #0x4\n"
  25                "BL     sub_FF838318\n"
  26                "LDR    R2, =0xFF877608\n"
  27                "LDR    R0, [R4,#0xB4]\n"
  28                "MOV    R3, R8\n"
  29                "MOV    R1, R7\n"
  30                "BL     sub_FF838C14\n"
  31                "LDR    R0, [R4,#0x20]\n"
  32                "CMP    R0, #0\n"
  33                "BNE    loc_FF87914C\n"
  34                "LDR    R0, [SP,#0x4]\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_FF87914C\n"
  40 "loc_FF879094: B       loc_FF8790F4\n"
  41 "loc_FF879098: B       loc_FF87910C\n"
  42 "loc_FF87909C: B       loc_FF87911C\n"
  43 "loc_FF8790A0: B       loc_FF879124\n"
  44 "loc_FF8790A4: B       loc_FF8790FC\n"
  45 "loc_FF8790A8: B       loc_FF87912C\n"
  46 "loc_FF8790AC: B       loc_FF879104\n"
  47 "loc_FF8790B0: B       loc_FF87914C\n"
  48 "loc_FF8790B4: B       loc_FF87913C\n"
  49 "loc_FF8790B8: B       loc_FF879144\n"
  50 "loc_FF8790BC: B       loc_FF879134\n"
  51 "loc_FF8790C0: B       loc_FF8790C4\n"
  52 "loc_FF8790C4:\n" //                           ; CODE XREF: task_MovieRecord+58\030j\n"
  53                "LDR    R0, =0xFF878CE0\n"
  54                "STR    R6, [R4,#0x34]\n"
  55                "STR    R0, [R4,#0x9C]\n"
  56                "LDR    R0, =0xFF877B20\n"
  57                "LDR    R2, =0xFF877B24\n"
  58                "STR    R0, [R4,#0xA0]\n"
  59                "LDR    R0, =0xFF877C34\n"
  60                "LDR    R1, =0x385DC\n"
  61                "STR    R6, [R4,#0x24]\n"
  62                "BL     sub_FF84EE4C\n"
  63                "STR    R5, [R4,#0x38]\n"
  64                "B      loc_FF87914C\n" 
  65 
  66 "loc_FF8790F4:\n" //                           ; CODE XREF: task_MovieRecord+58\030j\n"
  67 //             "BL      unlock_optical_zoom\n" //  + 
  68                "BL     sub_FF878E08\n"
  69                "B      loc_FF87914C\n"
  70 "loc_FF8790FC:\n" //                           ; CODE XREF: task_MovieRecord+58\030j\n"
  71                "BL     sub_FF878924\n"
  72 //             "BL     sub_FF878924_my\n"      // DONE, but E10
  73                "B      loc_FF87914C\n"
  74 "loc_FF879104:\n" //                           ; CODE XREF: task_MovieRecord+58\030j\n"
  75                "BL     sub_FF87937C\n"
  76                "B      loc_FF87914C\n"
  77 "loc_FF87910C:\n" //                           ; CODE XREF: task_MovieRecord+58\030j\n"
  78                "LDR    R0, [R4,#0x38]\n"
  79                "CMP    R0, #5\n"
  80                "STRNE  R5, [R4,#0x28]\n"
  81                "B      loc_FF87914C\n"
  82 "loc_FF87911C:\n" //                           ; CODE XREF: task_MovieRecord+58\030j\n"
  83                "BL     sub_FF878624\n"
  84                "B      loc_FF87914C\n"
  85 "loc_FF879124:\n" //                           ; CODE XREF: task_MovieRecord+58\030j\n"
  86                "BL     sub_FF8782D4\n"
  87                "B      loc_FF87914C\n"
  88 "loc_FF87912C:\n" //                           ; CODE XREF: task_MovieRecord+58\030j\n"
  89                "BL     sub_FF877AAC\n"
  90                "B      loc_FF87914C\n"
  91 "loc_FF879134:\n" //                           ; CODE XREF: task_MovieRecord+58\030j\n"
  92                "BL     sub_FF8792E4\n"
  93                "B      loc_FF87914C\n"
  94 "loc_FF87913C:\n" //                           ; CODE XREF: task_MovieRecord+58\030j\n"
  95                "BL     sub_FF878198\n"
  96                "B      loc_FF87914C\n"
  97 "loc_FF879144:\n" //                           ; CODE XREF: task_MovieRecord+58\030j\n"
  98                "BL     sub_FF87807C\n"
  99                "STR    R5, [R4,#0xDC]\n"
 100 "loc_FF87914C:\n" //                           ; CODE XREF: task_MovieRecord+44\030j\n"
 101                "LDR    R1, [SP,#0x4]\n"
 102                "MOV    R3, #0x460\n"
 103                "STR    R6, [R1]\n"
 104                "STR    R3, [SP]\n"
 105                "LDR    R0, [R4,#0x1C]\n"
 106                "LDR    R3, =0xFF877608\n"
 107                "MOV    R2, R7\n"
 108                "BL     sub_FF838C6C\n"
 109                "LDR    R0, [R4,#0xB4]\n"
 110                "BL     sub_FF838804\n"
 111                "B      loc_FF87904C\n"
 112  );
 113 }
 114 
 115 
 116 void __attribute__((naked,noinline)) sub_FF878924_my(){ 
 117  asm volatile(
 118                "STMFD  SP!, {R4-R8,LR}\n"
 119                "SUB    SP, SP, #0x48\n"
 120                "MOV    R7, #0\n"
 121                "LDR    R6, =0x2BF8\n"
 122                "MOV    R4, R0\n"
 123                "STR    R7, [SP,#0x38]\n"
 124                "STR    R7, [SP,#0x30]\n"
 125                "LDR    R0, [R6,#0x38]\n"
 126                "CMP    R0, #3\n"
 127                "MOVEQ  R0, #4\n"
 128                "STREQ  R0, [R6,#0x38]\n"
 129                "LDR    R0, [R6,#0x9C]\n"
 130                "BLX    R0\n"
 131                "LDR    R0, [R6,#0x38]\n"
 132                "CMP    R0, #4\n"
 133                "BNE    loc_FF878A48\n"
 134                "ADD    R3, SP, #0x30\n"
 135                "ADD    R2, SP, #0x34\n"
 136                "ADD    R1, SP, #0x38\n"
 137                "ADD    R0, SP, #0x3C\n"
 138                "BL     sub_FF95BAEC\n"
 139                "CMP    R0, #0\n"
 140                "MOV    R5, #1\n"
 141                "BNE    loc_FF8789A0\n"
 142                "LDR    R1, [R6,#0x28]\n"
 143                "CMP    R1, #1\n"
 144                "BNE    loc_FF878A50\n"
 145                "LDR    R1, [R6,#0x4C]\n"
 146                "LDR    R2, [R6,#0x3C]\n"
 147                "CMP    R1, R2\n"
 148                "BCC    loc_FF878A50\n"
 149 "loc_FF8789A0:\n" //                           ; CODE XREF: sub_FF878924+5C\030j\n"
 150                "BL     sub_FF877C74\n"
 151                "BL     sub_FF8792D0\n"
 152                "LDR    R0, [R4,#0x1C]\n"
 153                "ADD    R4, SP, #0x18\n"
 154                "ADD    R3, SP, #0x40\n"
 155 //             "MOVL   R2, 0xFFFFFFFE\n"
 156                "MVN     R2, #1\n"
 157                "MOV    R1, #0\n"
 158                "STMIA  R4, {R0-R3}\n"
 159                "LDR    R2, [R6,#0x64]\n"
 160                "LDR    R3, [R6,#0x68]\n"
 161                "ADD    R1, SP, #0x44\n"
 162                "ADD    R4, SP, #0x8\n"
 163                "MOV    R0, #0\n"
 164                "STMIA  R4, {R0-R3}\n"
 165                "MOV    R3, #0\n"
 166                "MOV    R2, #0x40\n"
 167                "STRD   R2, [SP]\n"
 168                "LDR    R3, =0x38668\n"
 169                "MOV    R2, #0\n"
 170                "MOV    R1, #0\n"
 171                "BL     sub_FF9188E4\n"
 172                "LDR    R0, [R6,#0x10]\n"
 173                "MOV    R1, #0x3E8\n"
 174                "BL     sub_FF838734\n"
 175                "CMP    R0, #9\n"
 176                "BNE    loc_FF878A18\n"
 177 "loc_FF878A08:\n" //                           ; CODE XREF: sub_FF878924+1AC\031j\n"
 178                "BL     sub_FF95BFC0\n"
 179                "MOV    R0, #1\n"
 180                "STR    R5, [R6,#0x38]\n"
 181                "B      loc_FF878B78\n" 
 182 "loc_FF878A18:\n" //                           ; CODE XREF: sub_FF878924+E0\030j\n"
 183                "LDR    R0, [SP,#0x40]\n"
 184                "CMP    R0, #0\n"
 185                "BEQ    loc_FF878A34\n"
 186 "loc_FF878A24:\n" //                           ; CODE XREF: sub_FF878924+1B8\031j\n"
 187                "BL     sub_FF95BFC0\n"
 188                "MOV    R0, #1\n"
 189                "STR    R5, [R6,#0x38]\n"
 190                "B      loc_FF878BA4\n"
 191 "loc_FF878A34:\n" //                           ; CODE XREF: sub_FF878924+FC\030j\n"
 192                "MOV    R0, #1\n"
 193                "BL     sub_FF91898C\n"
 194                "BL     sub_FF9189C8\n"
 195                "MOV    R0, #5\n"
 196                "STR    R0, [R6,#0x38]\n"
 197 "loc_FF878A48:\n" //                           ; CODE XREF: sub_FF878924+3C\030j\n"
 198                "ADD    SP, SP, #0x48\n"
 199                "LDMFD  SP!, {R4-R8,PC}\n"
 200 "loc_FF878A50:\n" //                           ; CODE XREF: sub_FF878924+68\030j\n"
 201                "LDR    R12, [SP,#0x38]\n"
 202                "CMP    R12, #0\n"
 203                "BEQ    loc_FF878C88\n"
 204                "STR    R5, [R6,#0x2C]\n"
 205                "LDR    R0, [R6,#0x4C]\n"
 206                "LDR    R8, [R4,#0xC]\n"
 207                "CMP    R0, #0\n"
 208                "LDRNE  LR, [SP,#0x3C]\n"
 209                "BNE    loc_FF878AFC\n"
 210                "LDR    R0, [R4,#0x1C]\n"
 211                "LDR    R1, [R4,#0x20]\n"
 212                "ADD    R3, SP, #0x40\n"
 213 //             "MOVL   R2, 0xFFFFFFFF\n"
 214                "MVN     R2, #0\n"
 215                "ADD    LR, SP, #0x18\n"
 216                "STMIA  LR, {R0-R3}\n"
 217                "LDR    R0, [SP,#0x30]\n"
 218                "LDR    R2, [R6,#0x64]\n"
 219                "LDR    R3, [R6,#0x68]\n"
 220                "ADD    R1, SP, #0x44\n"
 221                "ADD    LR, SP, #0x8\n"
 222                "STMIA  LR, {R0-R3}\n"
 223                "LDR    R3, [SP,#0x34]\n"
 224                "STR    R12, [SP]\n"
 225                "STR    R3, [SP,#0x4]\n"
 226                "LDMIB  R4, {R0,R1}\n"
 227                "LDR    R3, [SP,#0x3C]\n"
 228                "MOV    R2, R8\n"
 229                "BL     sub_FF9188E4\n"
 230                "LDR    R0, [R6,#0x10]\n"
 231                "MOV    R1, #0x3E8\n"
 232                "BL     sub_FF838734\n"
 233                "CMP    R0, #9\n"
 234                "BEQ    loc_FF878A08\n"
 235                "LDR    R0, [SP,#0x4]\n"
 236                "CMP    R0, #0\n"
 237                "BNE    loc_FF878A24\n"
 238                "MOV    R0, #1\n"
 239                "BL     sub_FF91898C\n"
 240                "LDR    R0, [SP,#0x44]\n"
 241                "LDR    R1, [SP,#0x3C]\n"
 242                "ADD    LR, R1, R0\n"
 243                "LDR    R1, [SP,#0x38]\n"
 244                "SUB    R12, R1, R0\n"
 245 "loc_FF878AFC:\n" //                           ; CODE XREF: sub_FF878924+14C\030j\n"
 246                "LDR    R2, [R6,#0x48]\n"
 247                "LDR    R0, [R4,#0x1C]\n"
 248                "LDR    R1, [R4,#0x20]\n"
 249                "ADD    R3, SP, #0x4\n"
 250                "STR    R1, [SP,#0x1C]\n"
 251                "STR    R0, [SP,#0x18]\n"
 252                "STR    R3, [SP,#0x24]\n"
 253                "STR    R2, [SP,#0x20]\n"
 254                "LDR    R2, [R6,#0x64]\n"
 255                "LDR    R3, [R6,#0x68]\n"
 256                "ADD    R1, SP, #0x44\n"
 257                "STR    R1, [SP,#0xC]\n"
 258                "STR    R3, [SP,#0x14]\n"
 259                "LDR    R3, [SP,#0x34]\n"
 260                "LDR    R0, [SP,#0x30]\n"
 261                "STR    R2, [SP,#0x10]\n"
 262                "STR    R3, [SP,#0x4]\n"
 263                "STR    R12, [SP]\n"
 264                "STR    R0, [SP,#0x8]\n"
 265                "LDMIB  R4, {R0,R1}\n"
 266                "MOV    R3, LR\n"
 267                "MOV    R2, R8\n"
 268                "BL     sub_FF9188E4\n"
 269                "LDR    R0, [R6,#0x10]\n"
 270                "MOV    R1, #0x3E8\n"
 271                "BL     sub_FF838734\n"
 272                "CMP    R0, #9\n"
 273                "BNE    loc_FF878B8C\n"
 274                "BL     sub_FF95BFC0\n"
 275                "MOV    R0, #0\n"
 276                "STR    R5, [R6,#0x38]\n"
 277 "loc_FF878B78:\n" //                           ; CODE XREF: sub_FF878924+F0\030j\n"
 278                "BL     sub_FF91898C\n"
 279                "MOV    R0, #0xC\n"
 280                "BL     sub_FF889D1C\n"
 281                "MOV    R0, #0x90000\n"
 282                "B      loc_FF878BB4\n"
 283 "loc_FF878B8C:\n" //                           ; CODE XREF: sub_FF878924+244\030j\n"
 284                "LDR    R0, [SP,#0x40]\n"
 285                "CMP    R0, #0\n"
 286                "BEQ    loc_FF878BC8\n"
 287                "BL     sub_FF95BFC0\n"
 288                "MOV    R0, #0\n"
 289                "STR    R5, [R6,#0x38]\n"
 290 "loc_FF878BA4:\n" //                           ; CODE XREF: sub_FF878924+10C\030j\n"
 291                "BL     sub_FF91898C\n"
 292                "MOV    R0, #0xC\n"
 293                "BL     sub_FF889D1C\n"
 294                "MOV    R0, #0xA0000\n"
 295 "loc_FF878BB4:\n" //                           ; CODE XREF: sub_FF878924+264\030j\n"
 296                "BL     sub_FF897148\n"
 297                "LDR    R1, [R6,#0x8C]!\n"
 298                "LDR    R0, [R6,#0xC]\n"
 299                "BLX    R1\n"
 300                "B      loc_FF878A48\n"
 301 "loc_FF878BC8:\n" //                           ; CODE XREF: sub_FF878924+270\030j\n"
 302                "MOV    R0, #0\n"
 303                "BL     sub_FF91898C\n"
 304                "LDR    R0, [R6,#0xDC]\n"
 305                "CMP    R0, #1\n"
 306                "BNE    loc_FF878C58\n"
 307                "LDR    R0, [R6,#0x48]\n"
 308                "MOV    R1, #0xF\n"
 309                "BL     sub_FFB38284\n"
 310                "MOVS   R4, R1\n"
 311                "STREQ  R7, [R6,#0xDC]\n"
 312                "BEQ    loc_FF878C58\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_FFB36628\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_FFB36628\n"
 338 "loc_FF878C58:\n" //                           ; CODE XREF: sub_FF878924+2B4\030j\n"
 339                "LDR    R0, [SP,#0x3C]\n"
 340                "LDR    R1, [SP,#0x44]\n"
 341                "BL     sub_FF95BD18\n"
 342                "LDR    R0, [R6,#0x48]\n"
 343                "LDR    R3, =0x2C60\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_FF959D9C\n"
 351 
 352                 "LDR     R0, =0x2C60-4\n" // <----   -4 //+
 353                 "BL      set_quality\n"                 //+
 354                
 355 "loc_FF878C88:\n" //                           ; CODE XREF: sub_FF878924+134\030j\n"
 356                "LDR    R0, [R6,#0x4C]\n"
 357                "ADD    R0, R0, #1\n"
 358                "STR    R0, [R6,#0x4C]\n"
 359                "LDR    R1, [R6,#0x74]\n"
 360                "MUL    R0, R1, R0\n"
 361                "LDR    R1, [R6,#0x70]\n"
 362                "BL     sub_FFB38284\n"
 363                "MOV    R4, R0\n"
 364                "BL     sub_FF95BFF8\n"
 365                "LDR    R1, [R6,#0x6C]\n"
 366                "CMP    R1, R4\n"
 367                "BNE    loc_FF878CC4\n"
 368                "LDR    R0, [R6,#0x30]\n"
 369                "CMP    R0, #1\n"
 370                "BNE    loc_FF878CD8\n"
 371 "loc_FF878CC4:\n" //                           ; CODE XREF: sub_FF878924+390\030j\n"
 372                "LDR    R1, [R6,#0x80]\n"
 373                "MOV    R0, R4\n"
 374                "BLX    R1\n"
 375                "STR    R4, [R6,#0x6C]\n"
 376                "STR    R7, [R6,#0x30]\n"
 377 "loc_FF878CD8:\n" //                           ; CODE XREF: sub_FF878924+39C\030j\n"
 378                "STR    R7, [R6,#0x2C]\n"
 379                "B      loc_FF878A48\n"
 380  );
 381 }
 382 
 383 
 384 

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