root/platform/a3000/sub/100c/movie_rec.c

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

DEFINITIONS

This source file includes following definitions.
  1. set_quality
  2. movie_record_task
  3. sub_FFD133D8_my
  4. change_video_tables

   1 #include "conf.h"
   2 
   3 int *video_quality = &conf.video_quality;
   4 int *video_mode    = &conf.video_mode;
   5 
   6 void  set_quality(int *x){ // -17 highest; +12 lowest
   7  if (conf.video_mode) *x=12-((conf.video_quality-1)*(12+17)/(99-1));
   8 }
   9 
  10 
  11 void __attribute__((naked,noinline)) movie_record_task(){ 
  12  asm volatile(
  13         "STMFD   SP!, {R2-R8,LR}\n"
  14         "LDR     R8, =0x346\n"
  15         "LDR     R7, =0x2710\n"
  16         "LDR     R4, =0x56C0\n"
  17         "MOV     R6, #0\n"
  18         "MOV     R5, #1\n"
  19 "loc_FFD138E4:\n"
  20         "LDR     R0, [R4,#0x18]\n"
  21         "MOV     R2, #0\n"
  22         "ADD     R1, SP, #4\n"
  23         "BL      sub_FFC28E74    \n"
  24         "LDR     R0, [R4,#0x20]\n"
  25         "CMP     R0, #0\n"
  26         "BNE     loc_FFD139B4\n"
  27         "LDR     R0, [SP,#4]\n"
  28         "LDR     R1, [R0]\n"
  29         "SUB     R1, R1, #2\n"
  30         "CMP     R1, #9\n"
  31         "ADDLS   PC, PC, R1,LSL#2\n"
  32         "B       loc_FFD139B4\n"
  33 "loc_FFD13918:\n"
  34         "B       loc_FFD13968\n"
  35 "loc_FFD1391C:\n"
  36         "B       loc_FFD13988\n"
  37 "loc_FFD13920:\n"
  38         "B       loc_FFD13998\n"
  39 "loc_FFD13924:\n"
  40         "B       loc_FFD139A0\n"
  41 "loc_FFD13928:\n"
  42         "B       loc_FFD13970\n"
  43 "loc_FFD1392C:\n"
  44         "B       loc_FFD139A8\n"
  45 "loc_FFD13930:\n"
  46         "B       loc_FFD13978\n"
  47 "loc_FFD13934:\n"
  48         "B       loc_FFD139B4\n"
  49 "loc_FFD13938:\n"
  50         "B       loc_FFD139B0\n"
  51 "loc_FFD1393C:\n"
  52         "B       loc_FFD13940\n"
  53 "loc_FFD13940:\n"
  54         "LDR     R0, =0xFFD135D8\n"
  55         "STR     R6, [R4,#0x34]\n"
  56         "STR     R0, [R4,#0xA8]\n"
  57         "LDR     R0, =0xFFD13068\n"
  58         "LDR     R2, =0xFFD12F84\n"
  59         "LDR     R1, =0x6F460\n"
  60         "STR     R6, [R4,#0x24]\n"
  61         "BL      sub_FFCBA128\n"
  62         "STR     R5, [R4,#0x38]\n"
  63         "B       loc_FFD139B4\n"
  64 "loc_FFD13968:\n"
  65                                 "BL      unlock_optical_zoom\n" //+-----> inserted to unlock the zoom
  66         "BL      sub_FFD136D0\n"
  67         "B       loc_FFD139B4\n"
  68 "loc_FFD13970:\n"
  69         //"BL      sub_FFD133D8\n"
  70         "BL      sub_FFD133D8_my\n" // ---------------->
  71         "B       loc_FFD139B4\n"
  72 "loc_FFD13978:\n"
  73         "LDR     R1, [R0,#0x10]\n"
  74         "LDR     R0, [R0,#4]\n"
  75         "BL      sub_FFE034E8    \n"
  76         "B       loc_FFD139B4\n"
  77 "loc_FFD13988:\n"
  78         "LDR     R0, [R4,#0x38]\n"
  79         "CMP     R0, #5\n"
  80         "STRNE   R5, [R4,#0x28]\n"
  81         "B       loc_FFD139B4\n"
  82 "loc_FFD13998:\n"
  83         "BL      sub_FFD131F0\n"
  84         "B       loc_FFD139B4\n"
  85 "loc_FFD139A0:\n"
  86         "BL      sub_FFD130B4\n"
  87         "B       loc_FFD139B4\n"
  88 "loc_FFD139A8:\n"
  89         "BL      sub_FFD12F10\n"
  90         "B       loc_FFD139B4\n"
  91 "loc_FFD139B0:\n"
  92         "BL      sub_FFD13B1C\n"
  93 "loc_FFD139B4:\n"
  94         "LDR     R1, [SP,#4]\n"
  95         "LDR     R3, =0xFFD12DA0\n"
  96         "STR     R6, [R1]\n"
  97         "STR     R8, [SP]\n"
  98         "LDR     R0, [R4,#0x1C]\n"
  99         "MOV     R2, R7\n"
 100         "BL      sub_FFC0F528\n"
 101         "B       loc_FFD138E4\n"
 102 
 103  );
 104 } 
 105 
 106 void __attribute__((naked,noinline)) sub_FFD133D8_my(){ 
 107  asm volatile(
 108         "STMFD   SP!, {R4-R8,LR}\n"
 109         "SUB     SP, SP, #0x40\n"
 110         "MOV     R6, #0\n"
 111         "LDR     R5, =0x56C0\n"
 112         "MOV     R4, R0\n"
 113         "STR     R6, [SP,#0x30]\n"
 114         "STR     R6, [SP,#0x28]\n"
 115         "LDR     R0, [R5,#0x38]\n"
 116         "MOV     R8, #4\n"
 117         "CMP     R0, #3\n"
 118         "STREQ   R8, [R5,#0x38]\n"
 119         "LDR     R0, [R5,#0xA8]\n"
 120         "BLX     R0\n"
 121         "LDR     R0, [R5,#0x38]\n"
 122         "CMP     R0, #4\n"
 123         "BNE     loc_FFD134B0\n"
 124         "ADD     R3, SP, #0x28\n"
 125         "ADD     R2, SP, #0x2C\n"
 126         "ADD     R1, SP, #0x30\n"
 127         "ADD     R0, SP, #0x34\n"
 128         "BL      sub_FFE0367C\n"
 129         "CMP     R0, #0\n"
 130         "MOV     R7, #1\n"
 131         "BNE     loc_FFD13454\n"
 132         "LDR     R1, [R5,#0x28]\n"
 133         "CMP     R1, #1\n"
 134         "BNE     loc_FFD134B8\n"
 135         "LDR     R1, [R5,#0x60]\n"
 136         "LDR     R2, [R5,#0x3C]\n"
 137         "CMP     R1, R2\n"
 138         "BCC     loc_FFD134B8\n"
 139 "loc_FFD13454:\n"
 140         "CMP     R0, #0x80000001\n"
 141         "STREQ   R8, [R5,#0x64]\n"
 142         "BEQ     loc_FFD1348C\n"
 143         "CMP     R0, #0x80000003\n"
 144         "STREQ   R7, [R5,#0x64]\n"
 145         "BEQ     loc_FFD1348C\n"
 146         "CMP     R0, #0x80000005\n"
 147         "MOVEQ   R0, #2\n"
 148         "BEQ     loc_FFD13488\n"
 149         "CMP     R0, #0x80000007\n"
 150         "STRNE   R6, [R5,#0x64]\n"
 151         "BNE     loc_FFD1348C\n"
 152         "MOV     R0, #3\n"
 153 "loc_FFD13488:\n"
 154         "STR     R0, [R5,#0x64]\n"
 155 "loc_FFD1348C:\n"
 156         "LDR     R0, =0x6F490\n"
 157         "LDR     R0, [R0,#8]\n"
 158         "CMP     R0, #0\n"
 159         "BEQ     loc_FFD134A4\n"
 160         "BL      sub_FFC45588\n"
 161         "B       loc_FFD134A8\n"
 162 "loc_FFD134A4:\n"
 163         "BL      sub_FFD12F10    \n"
 164 "loc_FFD134A8:\n"
 165         "MOV     R0, #5\n"
 166         "STR     R0, [R5,#0x38]\n"
 167 "loc_FFD134B0:\n"
 168         "ADD     SP, SP, #0x40\n"
 169         "LDMFD   SP!, {R4-R8,PC}\n"
 170 "loc_FFD134B8:\n"
 171         "LDR     LR, [SP,#0x30]\n"
 172         "CMP     LR, #0\n"
 173         "BEQ     loc_FFD13580\n"
 174         "STR     R7, [R5,#0x2C]\n"
 175         "LDR     R0, [R5,#0x7C]\n"
 176         "LDR     R1, [R4,#0x14]\n"
 177         "LDR     R2, [R4,#0x18]\n"
 178         "LDR     R12, [R4,#0xC]\n"
 179         "ADD     R3, SP, #0x38\n"
 180         "ADD     R8, SP, #0x14\n"
 181         "STMIA   R8, {R0-R3}\n"
 182         "LDR     R3, [R5,#0x68]\n"
 183         "ADD     R2, SP, #0x3C\n"
 184         "ADD     R8, SP, #8\n"
 185         "LDRD    R0, [SP,#0x28]\n"
 186         "STMIA   R8, {R0,R2,R3}\n"
 187         "STR     R1, [SP,#4]\n"
 188         "STR     LR, [SP]\n"
 189         "LDMIB   R4, {R0,R1}\n"
 190         "LDR     R3, [SP,#0x34]\n"
 191         "MOV     R2, R12\n"
 192         "BL      sub_FFDD8320\n"
 193         "LDR     R0, [R5,#0x10]\n"
 194         "LDR     R1, [R5,#0x58]\n"
 195         "BL      sub_FFC0EF9C    \n"
 196         "CMP     R0, #9\n"
 197         "BNE     loc_FFD13534\n"
 198         "BL      sub_FFE03C68\n"
 199         "MOV     R0, #0x90000\n"
 200         "STR     R7, [R5,#0x38]\n"
 201         "B       loc_FFD1354C\n"
 202 "loc_FFD13534:\n"
 203         "LDR     R0, [SP,#0x38]\n"
 204         "CMP     R0, #0\n"
 205         "BEQ     loc_FFD13554\n"
 206         "BL      sub_FFE03C68\n"
 207         "MOV     R0, #0xA0000\n"
 208         "STR     R7, [R5,#0x38]\n"
 209 "loc_FFD1354C:\n"
 210         "BL      sub_FFC70210\n"
 211         "B       loc_FFD134B0\n"
 212 "loc_FFD13554:\n"
 213         "BL      sub_FFDD83E4\n"
 214         "LDR     R0, [SP,#0x34]\n"
 215         "LDR     R1, [SP,#0x3C]\n"
 216         "BL      sub_FFE03A10    \n"
 217         "LDR     R0, [R5,#0x5C]\n"
 218         "LDR     R1, =0x573C\n"
 219         "ADD     R0, R0, #1\n"
 220         "STR     R0, [R5,#0x5C]\n"
 221         "LDR     R0, [SP,#0x3C]\n"
 222         "MOV     R2, #0\n"
 223         "BL      sub_FFE01834\n"
 224                 "LDR     R0, =0x573C\n"     // +
 225         "BL      set_quality\n"     // +        
 226 "loc_FFD13580:\n"
 227         "LDR     R0, [R5,#0x60]\n"
 228         "ADD     R0, R0, #1\n"
 229         "STR     R0, [R5,#0x60]\n"
 230         "LDR     R1, [R5,#0x4C]\n"
 231         "MUL     R0, R1, R0\n"
 232         "LDR     R1, [R5,#0x48]\n"
 233         "BL      sub_FFE8F0E8\n"
 234         "MOV     R4, R0\n"
 235         "BL      sub_FFE03CA0\n"
 236         "LDR     R1, [R5,#0x80]\n"
 237         "CMP     R1, R4\n"
 238         "BNE     loc_FFD135BC\n"
 239         "LDR     R0, [R5,#0x30]\n"
 240         "CMP     R0, #1\n"
 241         "BNE     loc_FFD135D0\n"
 242 "loc_FFD135BC:\n"
 243         "LDR     R1, [R5,#0x8C]\n"
 244         "MOV     R0, R4\n"
 245         "BLX     R1\n"
 246         "STR     R4, [R5,#0x80]\n"
 247         "STR     R6, [R5,#0x30]\n"
 248 "loc_FFD135D0:\n"
 249         "STR     R6, [R5,#0x2C]\n"
 250         "B       loc_FFD134B0\n"
 251 
 252         );
 253 };
 254 
 255 void change_video_tables(int a, int b){
 256 } 
 257 
 258 

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