This source file includes following definitions.
- change_video_tables
- movie_record_task
- sub_FF9445FC_my
- sub_FF945184_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[56]={
7 0x10000,0xC000,0x5800, 0x2000, 0x1C6A, 0x1550,0x9C5, 0x38D, 0x3C45, 0x2D34, 0x14B8, 0x788, 0x5F60, 0x4788,
8 0x20C9, 0xBE1, 0x8661, 0x64C9, 0x2E31, 0x10CB,0xB21A, 0x8594, 0x3D39, 0x1642, 0xE249, 0xA9B8, 0x4DC9, 0x1C48,
9 0x117D2,0xD1DF,0x6030, 0x22F9, 0x153D5,0xFEE1,0x74D1, 0x2A79, 0x195F8,0x1307C,0x8B8D, 0x32AA, 0x1E01C,0x16817,
10 0xA509, 0x3C01,0x2328E,0x1A5ED,0xC160, 0x4637,0x28C99,0x1E975,0xE054, 0x5190, 0x2F08B,0x2346B,0x102AF,0x5E0E
11 };
12
13 long def_table2[12]={0xE666,0xACCD,0x4F33,0x1CCD,-0x170A,-0x1148,-0x7EB,-0x2E1,-0x2BC6,-0x20D5,-0xF0C,-0x579};
14
15 long table1[56], table2[12];
16
17 void change_video_tables(int a, int b){
18 int i;
19 for (i=0;i<56;i++) table1[i]=(def_table1[i]*a)/b;
20 for (i=0;i<12;i++) table2[i]=(def_table2[i]*a)/b;
21 }
22
23 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};
24
25
26 void __attribute__((naked,noinline)) movie_record_task(){
27 asm volatile(
28 "STMFD SP!, {R4,LR}\n"
29 "SUB SP, SP, #4\n"
30 "MOV R4, SP\n"
31 "B loc_FF943EB8\n"
32 "loc_FF943E08:\n"
33 "LDR R3, =0x73850\n"
34 "LDR R2, [R3]\n"
35 "CMP R2, #0\n"
36 "BNE loc_FF943EA4\n"
37 "SUB R3, R12, #1\n"
38 "CMP R3, #0xA\n"
39 "LDRLS PC, [PC,R3,LSL#2]\n"
40 "B loc_FF943EA4\n"
41 ".long loc_FF943E54\n"
42 ".long loc_FF943E5C\n"
43 ".long loc_FF943E74\n"
44 ".long loc_FF943E7C\n"
45 ".long loc_FF943E84\n"
46 ".long loc_FF943E64\n"
47 ".long loc_FF943E8C\n"
48 ".long loc_FF943E6C\n"
49 ".long loc_FF943EA4\n"
50 ".long loc_FF943E9C\n"
51 ".long loc_FF943E94\n"
52
53 "loc_FF943E54:\n"
54 "BL sub_FF943F38\n"
55 "B loc_FF943EA0\n"
56 "loc_FF943E5C:\n"
57 "BL unlock_optical_zoom\n"
58 "BL sub_FF94416C\n"
59 "B loc_FF943EA0\n"
60 "loc_FF943E64:\n"
61 "BL sub_FF9445FC_my\n"
62 "B loc_FF943EA0\n"
63 "loc_FF943E6C:\n"
64 "BL sub_FF944A50\n"
65 "B loc_FF943EA0\n"
66 "loc_FF943E74:\n"
67 "BL sub_FF944874\n"
68 "B loc_FF943EA0\n"
69 "loc_FF943E7C:\n"
70 "BL sub_FF944C5C\n"
71 "B loc_FF943EA0\n"
72 "loc_FF943E84:\n"
73 "BL sub_FF944E20\n"
74 "B loc_FF943EA0\n"
75 "loc_FF943E8C:\n"
76 "BL sub_FF944B10\n"
77 "B loc_FF943EA0\n"
78 "loc_FF943E94:\n"
79 "BL sub_FF944BF0\n"
80 "B loc_FF943EA0\n"
81 "loc_FF943E9C:\n"
82 "BL sub_FF9448C4\n"
83 "loc_FF943EA0:\n"
84 "LDR R1, [SP]\n"
85 "loc_FF943EA4:\n"
86 "LDR R3, =0x73780\n"
87 "MOV R2, #0\n"
88 "STR R2, [R1]\n"
89 "LDR R0, [R3]\n"
90 "BL sub_FF8212BC\n"
91 "loc_FF943EB8:\n"
92 "LDR R3, =0x7377C\n"
93 "MOV R1, R4\n"
94 "LDR R0, [R3]\n"
95 "MOV R2, #0\n"
96 "BL sub_FF820EA4\n"
97 "LDR R0, [SP]\n"
98 "LDR R12, [R0]\n"
99 "CMP R12, #0xC\n"
100 "MOV R1, R0\n"
101 "BNE loc_FF943E08\n"
102 "LDR R3, =0x73774\n"
103 "LDR R0, [R3]\n"
104 "BL sub_FF821C78\n"
105 "BL sub_FF822634\n"
106 "ADD SP, SP, #4\n"
107 "LDMFD SP!, {R4,PC}\n"
108 );
109 }
110
111
112
113 void __attribute__((naked,noinline)) sub_FF9445FC_my(){
114 asm volatile(
115 "STMFD SP!, {R4-R11,LR}\n"
116 "LDR R5, =0x7386C\n"
117 "SUB SP, SP, #0x34\n"
118 "LDR R3, [R5]\n"
119 "CMP R3, #3\n"
120 "MOV R4, R0\n"
121 "MOVEQ R3, #4\n"
122 "STREQ R3, [R5]\n"
123 "LDR R3, =0x73914\n"
124 "MOV LR, PC\n"
125 "LDR PC, [R3]\n"
126 "LDR R2, [R5]\n"
127 "CMP R2, #4\n"
128 "BNE loc_FF9447A8\n"
129 "ADD R0, SP, #0x30\n"
130 "ADD R1, SP, #0x2C\n"
131 "ADD R2, SP, #0x28\n"
132 "ADD R3, SP, #0x24\n"
133 "BL sub_FF945DBC\n"
134 "CMP R0, #0\n"
135 "BNE loc_FF944678\n"
136 "LDR R3, =0x73858\n"
137 "LDR R2, [R3]\n"
138 "CMP R2, #1\n"
139 "BNE loc_FF94468C\n"
140 "LDR R2, =0x738A8\n"
141 "LDR R1, =0x73880\n"
142 "LDR R12, [R2]\n"
143 "LDR R3, [R1]\n"
144 "CMP R12, R3\n"
145 "BCC loc_FF94468C\n"
146 "loc_FF944678: \n"
147 "BL sub_FF9447EC\n"
148 "BL sub_FF944A20\n"
149 "MOV R3, #5\n"
150 "STR R3, [R5]\n"
151 "B loc_FF9447A8\n"
152 "loc_FF94468C: \n"
153 "LDR R12, =0x738B0\n"
154 "LDR R11, =0x738BC\n"
155 "LDMIB R4, {R0-R2}\n"
156 "LDR R10, [R12]\n"
157 "LDR R7, [R11]\n"
158 "LDR R4, [SP,#0x2C]\n"
159 "LDR R5, [SP,#0x28]\n"
160 "LDR R6, [SP,#0x24]\n"
161 "LDR R8, =0x7385C\n"
162 "LDR R3, [SP,#0x30]\n"
163 "ADD R12, SP, #0x20\n"
164 "ADD LR, SP, #0x1C\n"
165 "MOV R9, #1\n"
166 "STMEA SP, {R4-R6,R12}\n"
167 "STR R10, [SP,#0x10]\n"
168 "STR R7, [SP,#0x14]\n"
169 "STR LR, [SP,#0x18]\n"
170 "STR R9, [R8]\n"
171 "BL sub_FF8978D8\n"
172 "LDR R3, =0x73774\n"
173 "MOV R1, #0x3E8\n"
174 "LDR R0, [R3]\n"
175 "BL sub_FF821A90\n"
176 "CMP R0, #9\n"
177 "BNE loc_FF944700\n"
178 "BL sub_FF94657C\n"
179 "LDR R3, =0x7386C\n"
180 "LDR R0, =0xff9445E4\n"
181 "B loc_FF944718\n"
182 "loc_FF944700: \n"
183 "LDR R5, [SP,#0x1C]\n"
184 "CMP R5, #0\n"
185 "BEQ loc_FF944724\n"
186 "BL sub_FF94657C\n"
187 "LDR R3, =0x7386C\n"
188 "LDR R0, =0xff9445F0\n"
189 "loc_FF944718: \n"
190 "STR R9, [R3]\n"
191 "BL sub_FF958454\n"
192 "B loc_FF9447A8\n"
193 "loc_FF944724: \n"
194 "BL sub_FF897A4C\n"
195 "LDR R0, [SP,#0x30]\n"
196 "LDR R1, [SP,#0x20]\n"
197 "BL sub_FF9462A0\n"
198 "LDR R4, =0x738A8\n"
199 "LDR R3, [R4]\n"
200 "ADD R3, R3, #1\n"
201 "LDR R0, [SP,#0x20]\n"
202 "MOV R1, R11\n"
203 "STR R3, [R4]\n"
204 "MOV R2, R5\n"
205 "BL sub_FF945184_my\n"
206 "LDR R3, =0x73894\n"
207 "LDR R4, [R4]\n"
208 "LDR R1, [R3]\n"
209 "MOV R0, R4\n"
210 "BL sub_FFAC9710\n"
211 "CMP R0, #0\n"
212 "BEQ loc_FF944784\n"
213 "LDR R6, =0x73860\n"
214 "LDR R3, [R6]\n"
215 "CMP R3, #1\n"
216 "BNE loc_FF94479C\n"
217 "B loc_FF944788\n"
218 "loc_FF944784: \n"
219 "LDR R6, =0x73860\n"
220 "loc_FF944788: \n"
221 "MOV R0, R4\n"
222 "LDR R3, =0x738F0\n"
223 "MOV LR, PC\n"
224 "LDR PC, [R3]\n"
225 "STR R5, [R6]\n"
226 "loc_FF94479C: \n"
227 "LDR R2, =0x7385C\n"
228 "MOV R3, #0\n"
229 "STR R3, [R2]\n"
230 "loc_FF9447A8: \n"
231 "ADD SP, SP, #0x34\n"
232 "LDMFD SP!, {R4-R11,PC}\n"
233 );
234 }
235
236
237 void __attribute__((naked,noinline)) sub_FF945184_my(){
238
239 asm volatile(
240 "CMP R2, #1\n"
241 "STMFD SP!, {R4-R7,LR}\n"
242 "MOV R7, R0\n"
243 "MOV R6, R1\n"
244
245
246
247 "LDREQ R3, =CompressionRateTable\n"
248 "LDREQ R2, [R3,#0x18]\n"
249 "STREQ R2, [R6]\n"
250
251 "LDMEQFD SP!, {R4-R7,PC}\n"
252 "LDR R12, =0x73920\n"
253 "LDR R0, [R12]\n"
254 "LDR R3, =0x73928\n"
255 "CMP R0, #0\n"
256 "LDR R1, [R3]\n"
257 "BEQ loc_FF9451CC\n"
258 "LDR R2, =0x7392C\n"
259 "LDR R3, [R2]\n"
260 "CMP R3, #1\n"
261 "BNE loc_FF9451E0\n"
262 "B loc_FF9451D0\n"
263 "loc_FF9451CC: \n"
264 "LDR R2, =0x7392C\n"
265 "loc_FF9451D0: \n"
266 "MOV R3, #0\n"
267 "STR R3, [R2]\n"
268 "STR R7, [R12]\n"
269 "B loc_FF945294\n"
270 "loc_FF9451E0: \n"
271 "LDR R3, =0x73924\n"
272 "LDR R2, [R3]\n"
273 "LDR R5, =table1\n"
274 "MOV LR, R2,LSL#2\n"
275 "LDR R3, [R5,LR]\n"
276 "LDR R4, =table2\n"
277 "RSB R12, R3, R0\n"
278 "LDR R2, [R4,LR]\n"
279 "CMP R12, #0\n"
280 "RSB R0, R2, R0\n"
281 "BLE loc_FF945240\n"
282 "ADD R3, R5, #0x14\n"
283 "LDR R2, [R3,LR]\n"
284 "CMP R2, R12\n"
285 "ADDGE R1, R1, #1\n"
286 "BGE loc_FF945234\n"
287 "ADD R3, R5, #0x28\n"
288 "LDR R2, [R3,LR]\n"
289 "CMP R2, R12\n"
290 "ADDGE R1, R1, #2\n"
291 "ADDLT R1, R1, #3\n"
292 "loc_FF945234: \n"
293
294
295 "CMP R1, #0x1A\n"
296 "MOVGE R1, #0x1A\n"
297
298 "B loc_FF945270\n"
299 "loc_FF945240: \n"
300 "CMP R0, #0\n"
301 "BGE loc_FF945278\n"
302 "ADD R3, R4, #0x14\n"
303 "LDR R2, [R3,LR]\n"
304 "CMP R2, R0\n"
305 "SUBLE R1, R1, #1\n"
306 "BLE loc_FF945270\n"
307 "ADD R3, R4, #0x28\n"
308 "LDR R2, [R3,LR]\n"
309 "CMP R2, R0\n"
310 "SUBLE R1, R1, #2\n"
311 "SUBGT R1, R1, #3\n"
312 "loc_FF945270: \n"
313 "CMP R1, #0\n"
314 "MOVLT R1, #0\n"
315 "loc_FF945278: \n"
316 "LDR R0, =0x73928\n"
317 "LDR R3, [R0]\n"
318 "CMP R1, R3\n"
319 "LDRNE R2, =0x7392C\n"
320 "MOVNE R3, #1\n"
321 "STRNE R1, [R0]\n"
322 "STRNE R3, [R2]\n"
323 "loc_FF945294: \n"
324 "LDR R3, =0x73928\n"
325
326 "LDR R1, =video_mode\n"
327 "LDR R0, [R3]\n"
328 "LDR R2, =CompressionRateTable\n"
329 "LDR R12, [R1]\n"
330 "LDR LR, [R2,R0,LSL#2]\n"
331 "LDR R3, =0x73920\n"
332 "CMP R12, #1\n"
333 "STR R7, [R3]\n"
334 "STR LR, [R6]\n"
335
336
337 "LDREQ R3, =video_quality\n"
338 "LDREQ R3, [R3]\n"
339 "LDREQ R3, [R3]\n"
340
341 "STREQ R3, [R6]\n"
342 "LDMFD SP!, {R4-R7,PC}\n"
343
344
345 );
346 }
347