This source file includes following definitions.
- change_video_tables
- movie_record_task
- sub_FFF27174_my
- sub_FFE9A7F8_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[9]={0x2000,0x38D,0x788,0x5800,0x9C5,0x14B8,0x10000,0x1C6A,0x3C45};
7 long def_table2[9]={0x1CCD,-0x2E1,-0x579,0x4F33,-0x7EB,-0xF0C,0xE666,-0x170A,-0x2BC6};
8
9 long table1[9], table2[9];
10
11 void change_video_tables(int a, int b){
12 int i;
13 for (i=0;i<9;i++) {table1[i]=(def_table1[i]*a)/b; table2[i]=(def_table2[i]*a)/b;}
14 }
15
16 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};
17
18 void __attribute__((naked,noinline)) movie_record_task(){
19 asm volatile(
20 "STMFD SP!, {R4,R5,LR}\n"
21 "SUB SP, SP, #4\n"
22 "MOV R5, SP\n"
23 "MOV R4, #0\n"
24 "loc_FFF26AD4:\n"
25 "LDR R3, =0xA2F90\n"
26 "MOV R2, #0\n"
27 "LDR R0, [R3]\n"
28 "MOV R1, R5\n"
29 "BL sub_FFEBD6E4\n"
30 "LDR R3, =0xA30B0\n"
31 "LDR R2, [R3]\n"
32 "CMP R2, #0\n"
33 "BNE loc_FFF26B80\n"
34 "LDR R1, [SP]\n"
35 "LDR R3, [R1]\n"
36 "SUB R3, R3, #2\n"
37 "MOV R0, R1\n"
38 "CMP R3, #9\n"
39 "LDRLS PC, [PC,R3,LSL#2]\n"
40 "B loc_FFF26B84\n"
41 ".long loc_FFF26B44\n"
42 ".long loc_FFF26B5C\n"
43 ".long loc_FFF26B64\n"
44 ".long loc_FFF26B6C\n"
45 ".long loc_FFF26B4C\n"
46 ".long loc_FFF26B74\n"
47 ".long loc_FFF26B54\n"
48 ".long loc_FFF26B84\n"
49 ".long loc_FFF26B7C\n"
50 ".long loc_FFF26B3C\n"
51 "loc_FFF26B3C:\n"
52
53 "BL sub_FFF26BF0\n"
54 "B loc_FFF26B80\n"
55 "loc_FFF26B44:\n"
56
57 "BL unlock_optical_zoom\n"
58 "BL sub_FFF26DF8\n"
59 "B loc_FFF26B80\n"
60 "loc_FFF26B4C:\n"
61
62 "BL sub_FFF27174_my\n"
63 "B loc_FFF26B80\n"
64 "loc_FFF26B54:\n"
65
66 "BL sub_FFF2799C\n"
67 "B loc_FFF26B80\n"
68 "loc_FFF26B5C:\n"
69
70 "BL sub_FFF27450\n"
71 "B loc_FFF26B80\n"
72 "loc_FFF26B64:\n"
73
74 "BL sub_FFF27B38\n"
75 "B loc_FFF26B80\n"
76 "loc_FFF26B6C:\n"
77
78 "BL sub_FFF27D18\n"
79 "B loc_FFF26B80\n"
80 "loc_FFF26B74:\n"
81
82 "BL sub_FFF27A24\n"
83 "B loc_FFF26B80\n"
84 "loc_FFF26B7C:\n"
85
86 "BL sub_FFF274A0\n"
87 "loc_FFF26B80:\n"
88
89 "LDR R1, [SP]\n"
90 "loc_FFF26B84:\n"
91
92 "LDR R3, =0xA2F94\n"
93 "STR R4, [R1]\n"
94 "LDR R0, [R3]\n"
95 "MOV R2, R4\n"
96 "BL sub_FFEBDAFC\n"
97 "B loc_FFF26AD4\n"
98 );
99 }
100
101 void __attribute__((naked,noinline)) sub_FFF27174_my(){
102 asm volatile(
103 "STMFD SP!, {R4-R11,LR}\n"
104 "LDR R5, =0xA30C8\n"
105 "SUB SP, SP, #0x3C\n"
106 "LDR R3, [R5]\n"
107 "MOV R2, #0\n"
108 "CMP R3, #3\n"
109 "STR R2, [SP,#0x2C]\n"
110 "MOV R4, R0\n"
111 "STR R2, [SP,#0x34]\n"
112 "MOVEQ R3, #4\n"
113 "STREQ R3, [R5]\n"
114 "LDR R3, =0xA3174\n"
115 "MOV LR, PC\n"
116 "LDR PC, [R3]\n"
117 "LDR R2, [R5]\n"
118 "CMP R2, #4\n"
119 "BNE loc_FFF27378\n"
120 "ADD R0, SP, #0x38\n"
121 "ADD R1, SP, #0x34\n"
122 "ADD R2, SP, #0x30\n"
123 "ADD R3, SP, #0x2C\n"
124 "BL sub_FFF28894\n"
125 "CMP R0, #0\n"
126 "BNE loc_FFF271FC\n"
127 "LDR R3, =0xA30B8\n"
128 "LDR R2, [R3]\n"
129 "CMP R2, #1\n"
130 "BNE loc_FFF27210\n"
131 "LDR R2, =0xA30F4\n"
132 "LDR R1, =0xA30CC\n"
133 "LDR R12, [R2]\n"
134 "LDR R3, [R1]\n"
135 "CMP R12, R3\n"
136 "BCC loc_FFF27210\n"
137 "loc_FFF271FC:\n"
138 "BL sub_FFF273C8\n"
139 "BL sub_FFF2795C\n"
140 "MOV R3, #5\n"
141 "STR R3, [R5]\n"
142 "B loc_FFF27378\n"
143 "loc_FFF27210:\n"
144
145 "LDR R9, [SP,#0x34]\n"
146 "CMP R9, #0\n"
147 "BEQ loc_FFF272F8\n"
148 "LDR R7, =0xA3110\n"
149 "LDR R12, =0xA30FC\n"
150 "LDMIB R4, {R0-R2}\n"
151 "LDR R10, [R4,#0x18]\n"
152 "LDR R6, [R7]\n"
153 "LDR R7, [R4,#0x14]\n"
154 "LDR R4, =0xA30BC\n"
155 "LDR R8, [R12]\n"
156 "ADD R5, SP, #0x2C\n"
157 "LDMIA R5, {R5,LR}\n"
158 "MOV R11, #1\n"
159 "LDR R3, [SP,#0x38]\n"
160 "ADD R12, SP, #0x28\n"
161 "STR R11, [R4]\n"
162 "ADD R4, SP, #0x24\n"
163 "STMEA SP, {R9,LR}\n"
164 "STR R5, [SP,#8]\n"
165 "STR R12, [SP,#0xC]\n"
166 "STR R8, [SP,#0x10]\n"
167 "STR R6, [SP,#0x14]\n"
168 "STR R7, [SP,#0x18]\n"
169 "STR R10, [SP,#0x1C]\n"
170 "STR R4, [SP,#0x20]\n"
171 "BL sub_FFF2B924\n"
172 "LDR R3, =0xA2F88\n"
173 "MOV R1, #0x3E8\n"
174 "LDR R0, [R3]\n"
175 "BL sub_FFEBE2AC\n"
176 "CMP R0, #9\n"
177 "BNE loc_FFF272A4\n"
178 "BL sub_FFF29124\n"
179 "LDR R3, =0xA30C8\n"
180 "LDR R0, =0xFFF2715C\n"
181 "B loc_FFF272BC\n"
182 "loc_FFF272A4:\n"
183 "LDR R4, [SP,#0x24]\n"
184 "CMP R4, #0\n"
185 "BEQ loc_FFF272C8\n"
186 "BL sub_FFF29124\n"
187 "LDR R3, =0xA30C8\n"
188 "LDR R0, =0xFFF27168\n"
189 "loc_FFF272BC:\n"
190 "STR R11, [R3]\n"
191 "BL sub_FFEE0FAC\n"
192 "B loc_FFF27378\n"
193 "loc_FFF272C8:\n"
194 "BL sub_FFF2BAA0\n"
195 "LDR R0, [SP,#0x38]\n"
196 "LDR R1, [SP,#0x28]\n"
197 "BL sub_FFF28D7C\n"
198 "LDR R12, =0xA30F0\n"
199 "LDR R3, [R12]\n"
200 "ADD R3, R3, #1\n"
201 "LDR R0, [SP,#0x28]\n"
202 "LDR R1, =0xA3110\n"
203 "MOV R2, R4\n"
204 "STR R3, [R12]\n"
205 "BL sub_FFE9A7F8_my\n"
206 "loc_FFF272F8:\n"
207 "LDR R4, =0xA30F4\n"
208 "LDR R2, =0xA311C\n"
209 "LDR R3, [R4]\n"
210 "LDR R1, [R2]\n"
211 "LDR R12, =0xA3118\n"
212 "ADD R3, R3, #1\n"
213 "MUL R0, R1, R3\n"
214 "LDR R1, [R12]\n"
215 "STR R3, [R4]\n"
216 "BL sub_FFCCDF80\n"
217 "LDR R6, =0xA3114\n"
218 "MOV R4, R0\n"
219 "BL sub_FFF29160\n"
220 "LDR R3, [R6]\n"
221 "CMP R3, R4\n"
222 "BNE loc_FFF2734C\n"
223 "LDR R5, =0xA30C0\n"
224 "LDR R3, [R5]\n"
225 "CMP R3, #1\n"
226 "BNE loc_FFF2736C\n"
227 "B loc_FFF27350\n"
228 "loc_FFF2734C:\n"
229 "LDR R5, =0xA30C0\n"
230 "loc_FFF27350:\n"
231 "LDR R2, =0xA3158\n"
232 "MOV R0, R4\n"
233 "MOV LR, PC\n"
234 "LDR PC, [R2]\n"
235 "MOV R3, #0\n"
236 "STR R3, [R5]\n"
237 "STR R4, [R6]\n"
238 "loc_FFF2736C:\n"
239 "LDR R7, =0xA30BC\n"
240 "MOV R3, #0\n"
241 "STR R3, [R7]\n"
242 "loc_FFF27378:\n"
243
244 "ADD SP, SP, #0x3C\n"
245 "LDMFD SP!, {R4-R11,PC}\n"
246
247 );
248 }
249
250
251 void __attribute__((naked,noinline)) sub_FFE9A7F8_my(){
252 asm volatile(
253 "STMFD SP!, {R4-R8,LR}\n"
254 "LDR R12, =0x7EC6C\n"
255 "LDR R4, [R12]\n"
256 "LDR R3, =0x7EC74\n"
257 "CMP R4, #0\n"
258 "MOV R8, R1\n"
259 "MOV R7, R0\n"
260 "LDR R1, [R3]\n"
261 "BEQ loc_FFE9A830\n"
262 "LDR R2, =0x7EC78\n"
263 "LDR R3, [R2]\n"
264 "CMP R3, #1\n"
265 "BNE loc_FFE9A844\n"
266 "B loc_FFE9A834\n"
267 "loc_FFE9A830:\n"
268 "LDR R2, =0x7EC78\n"
269 "loc_FFE9A834:\n"
270 "MOV R3, #0\n"
271 "STR R3, [R2]\n"
272 "STR R7, [R12]\n"
273 "B loc_FFE9A8FC\n"
274 "loc_FFE9A844:\n"
275 "LDR R2, =0x7EC70\n"
276 "LDR R3, [R2]\n"
277 "LDR R6, =table1\n"
278 "ADD R3, R3, R3,LSL#1\n"
279 "MOV LR, R3,LSL#2\n"
280 "LDR R2, [R6,LR]\n"
281 "LDR R5, =table2\n"
282 "RSB R12, R2, R4\n"
283 "LDR R3, [R5,LR]\n"
284 "CMP R12, #0\n"
285 "RSB R0, R3, R4\n"
286 "BLE loc_FFE9A8A8\n"
287 "ADD R3, R6, #4\n"
288 "LDR R2, [R3,LR]\n"
289 "CMP R2, R12\n"
290 "ADDGE R1, R1, #1\n"
291 "BGE loc_FFE9A89C\n"
292 "ADD R3, R6, #8\n"
293 "LDR R2, [R3,LR]\n"
294 "CMP R2, R12\n"
295 "ADDGE R1, R1, #2\n"
296 "ADDLT R1, R1, #3\n"
297 "loc_FFE9A89C:\n"
298
299
300 "CMP R1, #0x1A\n"
301 "MOVGE R1, #0x1A\n"
302
303 "B loc_FFE9A8E0\n"
304 "loc_FFE9A8A8:\n"
305 "CMP R0, #0\n"
306 "BGE loc_FFE9A8E0\n"
307 "ADD R3, R5, #4\n"
308 "LDR R2, [R3,LR]\n"
309 "CMP R2, R0\n"
310 "SUBLE R1, R1, #1\n"
311 "BLE loc_FFE9A8D8\n"
312 "ADD R3, R5, #8\n"
313 "LDR R2, [R3,LR]\n"
314 "CMP R2, R0\n"
315 "SUBLE R1, R1, #2\n"
316 "SUBGT R1, R1, #3\n"
317 "loc_FFE9A8D8:\n"
318 "CMP R1, #0\n"
319 "MOVLT R1, #0\n"
320 "loc_FFE9A8E0:\n"
321
322 "LDR R0, =0x7EC74\n"
323 "LDR R3, [R0]\n"
324 "CMP R1, R3\n"
325 "LDRNE R2, =0x7EC78\n"
326 "MOVNE R3, #1\n"
327 "STRNE R1, [R0]\n"
328 "STRNE R3, [R2]\n"
329 "loc_FFE9A8FC:\n"
330 "LDR R3, =0x7EC74\n"
331 "LDR R2, =CompressionRateTable\n"
332 "LDR R1, [R3]\n"
333 "LDR R0, =0x7EC6C\n"
334 "LDR R3, [R2,R1,LSL#2]\n"
335
336 "LDR R1, =video_mode\n"
337 "LDR R1, [R1]\n"
338 "LDR R1, [R1]\n"
339 "CMP R1, #1\n"
340 "LDREQ R1, =video_quality\n"
341 "LDREQ R1, [R1]\n"
342 "LDREQ R3, [R1]\n"
343
344 "STR R7, [R0]\n"
345 "STR R3, [R8]\n"
346 "BL mute_on_zoom\n"
347 "LDMFD SP!, {R4-R8,PC}\n"
348 );
349 }