This source file includes following definitions.
- change_video_tables
- movie_record_task
- sub_FFBADB60_my
- sub_FFB1CF90_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[112]={
7 0x2000,0x38D,0x788,0xBE1,0x10CB,0x1642,0x1C48,0x22F9,0x2A79,0x32AA,0x3C01,0x4637,0x5190,0x5E0E,0x5800,0x9C5,
8 0x14B8,0x20C9,0x2E31,0x3D39,0x4DC9,0x6030,0x74D1,0x8B8D,0xA509,0xC160,0xE054,0x102AF,0x10000,0x1C6A,0x3C45,
9 0x5F60,0x8661,0xB21A,0xE249,0x117D2,0x153D5,0x195F8,0x1E01C,0x2328E,0x28C99,0x2F08B,0x20000,0x387A,0x7813,
10 0xBEC0,0x10CC2,0x16434,0x1C492,0x22FA4,0x2A7AA,0x32BF0,0x3C038,0x4651C,0x51932,0x5E116,0x25800,0x422F,0x8CB6,
11 0xDF89,0x13AF3,0x1A16D,0x2125B,0x28FD4,0x31C7B,0x3B77D,0x46542,0x5267D,0x5F987,0x6E3C6,0x8000,0xE35,0x1E23,0x2FB0,
12 0x4331,0x590D,0x7125,0x8BE9,0xA9EB,0xCAFC,0xF00E,0x11947,0x1464D,0x17846,0x10000,0x1C6A,0x3C45,0x5F60,0x8661,
13 0xB21A,0xE249,0x117D2,0x153D5,0x195F8,0x1E01C,0x2328E,0x28C99,0x2F08B,0x12C00,0x2118,0x465B,0x6FC5,0x9D7A,0xD0B7,
14 0x1092E,0x147EA,0x18E3E,0x1DBBF,0x232A1,0x2933F,0x2FCC4,0x371E3};
15
16
17
18
19 long def_table2[24]={0x1CCD, -0x2E1, -0x579, 0x4F33, -0x7EB, -0xF0C, 0xE666, -0x170A, -0x2BC6, 0x1CC39, -0x2F5B,
20 -0x59F0, 0x21B53, -0x377F, -0x6965, 0x7333, -0xB85, -0x15E3, 0xE666, -0x170A, -0x2BC6, 0x10DAA, -0x1BC0, -0x34B3 };
21
22 long table1[112], table2[24];
23
24 void change_video_tables(int a, int b){
25 int i;
26 for (i=0;i<112;i++) table1[i]=(def_table1[i]*a)/b;
27 for (i=0;i<24;i++) table2[i]=(def_table2[i]*a)/b;
28 }
29
30 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};
31
32
33 void __attribute__((naked,noinline)) movie_record_task(){
34 asm volatile(
35 "STMFD SP!, {R4,R5,LR}\n"
36 "SUB SP, SP, #4\n"
37 "MOV R5, SP\n"
38 "MOV R4, #0\n"
39 "loc_FFBAD37C:\n"
40 "LDR R3, =0xB3E30\n"
41 "MOV R2, #0\n"
42 "LDR R0, [R3]\n"
43 "MOV R1, R5\n"
44 "BL sub_FFB40944\n"
45 "LDR R3, =0xB4060\n"
46 "MOV R1, #0\n"
47 "LDR R0, [R3]\n"
48 "BL sub_FFB4150C\n"
49 "LDR R3, =0xB3F50\n"
50 "LDR R2, [R3]\n"
51 "CMP R2, #0\n"
52 "BNE loc_FFBAD438\n"
53 "LDR R1, [SP]\n"
54 "LDR R3, [R1]\n"
55 "SUB R3, R3, #2\n"
56 "MOV R0, R1\n"
57 "CMP R3, #9\n"
58 "LDRLS PC, [PC,R3,LSL#2]\n"
59 "B loc_FFBAD43C\n"
60 ".long loc_FFBAD3FC\n"
61 ".long loc_FFBAD414\n"
62 ".long loc_FFBAD41C\n"
63 ".long loc_FFBAD424\n"
64 ".long loc_FFBAD404\n"
65 ".long loc_FFBAD42C\n"
66 ".long loc_FFBAD40C\n"
67 ".long loc_FFBAD43C\n"
68 ".long loc_FFBAD434\n"
69 ".long loc_FFBAD3F4\n"
70 "loc_FFBAD3F4:\n"
71 "BL sub_FFBAD4D0\n"
72 "B loc_FFBAD438\n"
73 "loc_FFBAD3FC:\n"
74 "BL sub_FFBAD734\n"
75 "B loc_FFBAD438\n"
76 "loc_FFBAD404:\n"
77 "BL sub_FFBADB60_my\n"
78 "B loc_FFBAD438\n"
79 "loc_FFBAD40C:\n"
80 "BL sub_FFBAE3D8\n"
81 "B loc_FFBAD438\n"
82 "loc_FFBAD414:\n"
83 "BL sub_FFBADE8C\n"
84 "B loc_FFBAD438\n"
85 "loc_FFBAD41C:\n"
86 "BL sub_FFBAE67C\n"
87 "B loc_FFBAD438\n"
88 "loc_FFBAD424:\n"
89 "BL sub_FFBAE92C\n"
90 "B loc_FFBAD438\n"
91 "loc_FFBAD42C:\n"
92 "BL sub_FFBAE568\n"
93 "B loc_FFBAD438\n"
94 "loc_FFBAD434:\n"
95 "BL sub_FFBADEDC\n"
96 "loc_FFBAD438:\n"
97 "LDR R1, [SP]\n"
98 "loc_FFBAD43C:\n"
99 "LDR R3, [R1]\n"
100 "CMP R3, #9\n"
101 "BNE loc_FFBAD454\n"
102 "MOV R0, R1\n"
103 "BL sub_FFBAEB80\n"
104 "LDR R1, [SP]\n"
105 "loc_FFBAD454:\n"
106 "LDR R3, =0xB3E34\n"
107 "STR R4, [R1]\n"
108 "LDR R0, [R3]\n"
109 "MOV R2, R4\n"
110 "BL sub_FFB40D5C\n"
111 "LDR R3, =0xB4060\n"
112 "LDR R0, [R3]\n"
113 "BL sub_FFB41714\n"
114 "B loc_FFBAD37C\n"
115 );
116 }
117
118
119 void __attribute__((naked,noinline)) sub_FFBADB60_my(){
120 asm volatile(
121 "STMFD SP!, {R4-R11,LR}\n"
122 "LDR R5, =0xB3F68\n"
123 "SUB SP, SP, #0x3C\n"
124 "LDR R3, [R5]\n"
125 "MOV R2, #0\n"
126 "CMP R3, #3\n"
127 "STR R2, [SP,#0x2C]\n"
128 "MOV R4, R0\n"
129 "STR R2, [SP,#0x34]\n"
130 "MOVEQ R3, #4\n"
131 "STREQ R3, [R5]\n"
132 "LDR R3, =0xB4014\n"
133 "MOV LR, PC\n"
134 "LDR PC, [R3]\n"
135 "LDR R2, [R5]\n"
136 "CMP R2, #4\n"
137 "BNE loc_FFBADDB0\n"
138 "ADD R0, SP, #0x38\n"
139 "ADD R1, SP, #0x34\n"
140 "ADD R2, SP, #0x30\n"
141 "ADD R3, SP, #0x2C\n"
142 "BL sub_FFBAFD54\n"
143 "CMP R0, #0\n"
144 "BNE loc_FFBADBE8\n"
145 "LDR R3, =0xB3F58\n"
146 "LDR R2, [R3]\n"
147 "CMP R2, #1\n"
148 "BNE loc_FFBADBFC\n"
149 "LDR R2, =0xB3F94\n"
150 "LDR R1, =0xB3F6C\n"
151 "LDR R12, [R2]\n"
152 "LDR R3, [R1]\n"
153 "CMP R12, R3\n"
154 "BCC loc_FFBADBFC\n"
155 "loc_FFBADBE8:\n"
156 "BL sub_FFBADE04\n"
157 "BL sub_FFBAE398\n"
158 "MOV R3, #5\n"
159 "STR R3, [R5]\n"
160 "B loc_FFBADDB0\n"
161 "loc_FFBADBFC:\n"
162 "LDR R11, [SP,#0x34]\n"
163 "CMP R11, #0\n"
164 "BEQ loc_FFBADD30\n"
165 "LDR R3, =0xB3F74\n"
166 "LDR R2, [R3]\n"
167 "CMP R2, #4\n"
168 "LDR R2, =0xB3F5C\n"
169 "MOV R3, #1\n"
170 "STR R3, [R2]\n"
171 "BNE loc_FFBADC48\n"
172 "LDR R1, [R4,#0xC]\n"
173 "LDR R12, [R4,#8]\n"
174 "MOV R2, R1,LSR#3\n"
175 "MUL R0, R2, R12\n"
176 "LDR R3, [R4,#4]\n"
177 "ADD R3, R3, R0,LSL#1\n"
178 "STR R3, [R4,#4]\n"
179 "SUB R9, R1, R1,LSR#2\n"
180 "B loc_FFBADC50\n"
181 "loc_FFBADC48:\n"
182 "LDR R9, [R4,#0xC]\n"
183 "LDR R12, [R4,#8]\n"
184 "loc_FFBADC50:\n"
185 "LDR R2, =0xB3F9C\n"
186 "LDR R8, [R2]\n"
187 "LDR R2, =0xB3FB0\n"
188 "LDR R10, [R4,#0x18]\n"
189 "LDR R6, [R2]\n"
190 "LDR R7, [R4,#0x14]\n"
191 "ADD R5, SP, #0x2C\n"
192 "LDMIA R5, {R5,LR}\n"
193 "LDR R0, [R4,#4]\n"
194 "LDR R3, [SP,#0x38]\n"
195 "MOV R1, R12\n"
196 "ADD R4, SP, #0x24\n"
197 "ADD R12, SP, #0x28\n"
198 "MOV R2, R9\n"
199 "STMEA SP, {R11,LR}\n"
200 "STR R5, [SP,#8]\n"
201 "STR R12, [SP,#0xC]\n"
202 "STR R8, [SP,#0x10]\n"
203 "STR R6, [SP,#0x14]\n"
204 "STR R7, [SP,#0x18]\n"
205 "STR R10, [SP,#0x1C]\n"
206 "STR R4, [SP,#0x20]\n"
207 "BL sub_FFBBBFF4\n"
208 "LDR R3, =0xB3E28\n"
209 "MOV R1, #0x3E8\n"
210 "LDR R0, [R3]\n"
211 "BL sub_FFB4150C\n"
212 "CMP R0, #9\n"
213 "BNE loc_FFBADCD8\n"
214 "BL sub_FFBB0618\n"
215 "LDR R2, =0xB3F68\n"
216 "MOV R3, #1\n"
217 "LDR R0, =0xFFBADB48\n"
218 "B loc_FFBADCF4\n"
219 "loc_FFBADCD8:\n"
220 "LDR R4, [SP,#0x24]\n"
221 "CMP R4, #0\n"
222 "BEQ loc_FFBADD00\n"
223 "BL sub_FFBB0618\n"
224 "LDR R2, =0xB3F68\n"
225 "MOV R3, #1\n"
226 "LDR R0, =0xFFBADB54\n"
227 "loc_FFBADCF4:\n"
228 "STR R3, [R2]\n"
229 "BL sub_FFB63C94\n"
230 "B loc_FFBADDB0\n"
231 "loc_FFBADD00:\n"
232 "BL sub_FFBBC170\n"
233 "LDR R0, [SP,#0x38]\n"
234 "LDR R1, [SP,#0x28]\n"
235 "BL sub_FFBB025C\n"
236 "LDR R12, =0xB3F90\n"
237 "LDR R3, [R12]\n"
238 "ADD R3, R3, #1\n"
239 "LDR R0, [SP,#0x28]\n"
240 "LDR R1, =0xB3FB0\n"
241 "MOV R2, R4\n"
242 "STR R3, [R12]\n"
243 "BL sub_FFB1CF90_my\n"
244 "loc_FFBADD30:\n"
245 "LDR R4, =0xB3F94\n"
246 "LDR R2, =0xB3FBC\n"
247 "LDR R3, [R4]\n"
248 "LDR R1, [R2]\n"
249 "LDR R12, =0xB3FB8\n"
250 "ADD R3, R3, #1\n"
251 "MUL R0, R1, R3\n"
252 "LDR R1, [R12]\n"
253 "STR R3, [R4]\n"
254 "BL sub_FF91F884\n"
255 "LDR R6, =0xB3FB4\n"
256 "MOV R4, R0\n"
257 "BL sub_FFBB0654\n"
258 "LDR R3, [R6]\n"
259 "CMP R3, R4\n"
260 "BNE loc_FFBADD84\n"
261 "LDR R5, =0xB3F60\n"
262 "LDR R3, [R5]\n"
263 "CMP R3, #1\n"
264 "BNE loc_FFBADDA4\n"
265 "B loc_FFBADD88\n"
266 "loc_FFBADD84:\n"
267 "LDR R5, =0xB3F60\n"
268 "loc_FFBADD88:\n"
269 "LDR R2, =0xB3FF8\n"
270 "MOV R0, R4\n"
271 "MOV LR, PC\n"
272 "LDR PC, [R2]\n"
273 "MOV R3, #0\n"
274 "STR R3, [R5]\n"
275 "STR R4, [R6]\n"
276 "loc_FFBADDA4:\n"
277 "LDR R2, =0xB3F5C\n"
278 "MOV R3, #0\n"
279 "STR R3, [R2]\n"
280 "loc_FFBADDB0:\n"
281 "ADD SP, SP, #0x3C\n"
282 "LDMFD SP!, {R4-R11,PC}\n"
283 );
284 }
285
286
287 void __attribute__((naked,noinline)) sub_FFB1CF90_my(){
288 asm volatile(
289 "STMFD SP!, {R4-R8,R10,LR}\n"
290 "LDR R12, =0x91C5C\n"
291 "LDR R5, [R12]\n"
292 "LDR R3, =0x91C64\n"
293 "CMP R5, #0\n"
294 "MOV R8, R0\n"
295 "MOV R10, R1\n"
296 "LDR R0, [R3]\n"
297 "BEQ loc_FFB1CFC8\n"
298 "LDR R2, =0x91C68\n"
299 "LDR R3, [R2]\n"
300 "CMP R3, #1\n"
301 "BNE loc_FFB1CFDC\n"
302 "B loc_FFB1CFCC\n"
303 "loc_FFB1CFC8:\n"
304 "LDR R2, =0x91C68\n"
305 "loc_FFB1CFCC:\n"
306 "MOV R3, #0\n"
307 "STR R3, [R2]\n"
308 "STR R8, [R12]\n"
309 "B loc_FFB1D09C\n"
310 "loc_FFB1CFDC:\n"
311 "LDR R3, =0x91C60\n"
312 "LDR R2, [R3]\n"
313 "LDR R7, =table1\n"
314 "RSB R3, R2, R2,LSL#3\n"
315 "MOV R4, R3,LSL#3\n"
316 "LDR R1, [R7,R4]\n"
317 "ADD R2, R2, R2,LSL#1\n"
318 "LDR R6, =table2\n"
319 "MOV LR, R2,LSL#2\n"
320 "RSB R12, R1, R5\n"
321 "LDR R3, [R6,LR]\n"
322 "CMP R12, #0\n"
323 "RSB R1, R3, R5\n"
324 "BLE loc_FFB1D048\n"
325 "ADD R3, R7, #4\n"
326 "LDR R2, [R3,R4]\n"
327 "CMP R2, R12\n"
328 "ADDGE R0, R0, #1\n"
329 "BGE loc_FFB1D03C\n"
330 "ADD R3, R7, #8\n"
331 "LDR R2, [R3,R4]\n"
332 "CMP R2, R12\n"
333 "ADDGE R0, R0, #2\n"
334 "ADDLT R0, R0, #3\n"
335 "loc_FFB1D03C:\n"
336
337
338 "CMP R0, #0x1A\n"
339 "MOVGE R0, #0x1A\n"
340 "B loc_FFB1D080\n"
341 "loc_FFB1D048:\n"
342 "CMP R1, #0\n"
343 "BGE loc_FFB1D080\n"
344 "ADD R3, R6, #4\n"
345 "LDR R2, [R3,LR]\n"
346 "CMP R2, R1\n"
347 "SUBLE R0, R0, #1\n"
348 "BLE loc_FFB1D078\n"
349 "ADD R3, R6, #8\n"
350 "LDR R2, [R3,LR]\n"
351 "CMP R2, R1\n"
352 "SUBLE R0, R0, #2\n"
353 "SUBGT R0, R0, #3\n"
354 "loc_FFB1D078:\n"
355 "CMP R0, #0\n"
356 "MOVLT R0, #0\n"
357 "loc_FFB1D080:\n"
358 "LDR R1, =0x91C64\n"
359 "LDR R3, [R1]\n"
360 "CMP R0, R3\n"
361 "LDRNE R2, =0x91C68\n"
362 "MOVNE R3, #1\n"
363 "STRNE R0, [R1]\n"
364 "STRNE R3, [R2]\n"
365 "loc_FFB1D09C:\n"
366 "LDR R3, =0x91C64\n"
367 "LDR R2, =CompressionRateTable\n"
368 "LDR R1, [R3]\n"
369 "LDR R0, =0x91C5C\n"
370 "LDR R3, [R2,R1,LSL#2]\n"
371
372 "LDR R1, =video_mode\n"
373 "LDR R1, [R1]\n"
374 "LDR R1, [R1]\n"
375 "CMP R1, #1\n"
376 "LDREQ R1, =video_quality\n"
377 "LDREQ R1, [R1]\n"
378 "LDREQ R3, [R1]\n"
379
380 "STR R8, [R0]\n"
381 "STR R3, [R10]\n"
382 "LDMFD SP!, {R4-R8,R10,PC}\n"
383 );
384 }