This source file includes following definitions.
- change_video_tables
- movie_record_task
- sub_FFB8F0AC_my
- sub_FFAFE5AC_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_FFB8E9A8:\n"
25 "LDR R3, =0xBBB10\n"
26 "MOV R2, #0\n"
27 "LDR R0, [R3]\n"
28 "MOV R1, R5\n"
29 "BL sub_FFB1F028\n"
30 "LDR R3, =0xBBC30\n"
31 "LDR R2, [R3]\n"
32 "CMP R2, #0\n"
33 "BNE loc_FFB8EA54\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_FFB8EA58\n"
41 ".long loc_FFB8EA18\n"
42 ".long loc_FFB8EA30\n"
43 ".long loc_FFB8EA38\n"
44 ".long loc_FFB8EA40\n"
45 ".long loc_FFB8EA20\n"
46 ".long loc_FFB8EA48\n"
47 ".long loc_FFB8EA28\n"
48 ".long loc_FFB8EA58\n"
49 ".long loc_FFB8EA50\n"
50 ".long loc_FFB8EA10\n"
51 "loc_FFB8EA10:\n"
52 "BL sub_FFB8EAC4\n"
53 "B loc_FFB8EA54\n"
54 "loc_FFB8EA18:\n"
55 "BL unlock_optical_zoom\n"
56 "BL sub_FFB8ECCC\n"
57 "B loc_FFB8EA54\n"
58 "loc_FFB8EA20:\n"
59 "BL sub_FFB8F0AC_my\n"
60 "B loc_FFB8EA54\n"
61 "loc_FFB8EA28:\n"
62 "BL sub_FFB8F93C\n"
63 "B loc_FFB8EA54\n"
64 "loc_FFB8EA30:\n"
65 "BL sub_FFB8F3F0\n"
66 "B loc_FFB8EA54\n"
67 "loc_FFB8EA38:\n"
68 "BL sub_FFB8FAD8\n"
69 "B loc_FFB8EA54\n"
70 "loc_FFB8EA40:\n"
71 "BL sub_FFB8FCB8\n"
72 "B loc_FFB8EA54\n"
73 "loc_FFB8EA48:\n"
74 "BL sub_FFB8F9C4\n"
75 "B loc_FFB8EA54\n"
76 "loc_FFB8EA50:\n"
77 "BL sub_FFB8F440\n"
78 "loc_FFB8EA54:\n"
79 "LDR R1, [SP]\n"
80 "loc_FFB8EA58:\n"
81 "LDR R3, =0xBBB14\n"
82 "STR R4, [R1]\n"
83 "LDR R0, [R3]\n"
84 "MOV R2, R4\n"
85 "BL sub_FFB1F440\n"
86 "B loc_FFB8E9A8\n"
87 );
88 }
89
90 void __attribute__((naked,noinline)) sub_FFB8F0AC_my(){
91 asm volatile(
92 "STMFD SP!, {R4-R11,LR}\n"
93 "LDR R7, =0xBBC48\n"
94 "SUB SP, SP, #0x3C\n"
95 "LDR R3, [R7]\n"
96 "MOV R5, #0\n"
97 "CMP R3, #3\n"
98 "MOV R4, R0\n"
99 "STR R5, [SP,#0x34]\n"
100 "STR R5, [SP,#0x2C]\n"
101 "MOV R6, #1\n"
102 "MOVEQ R3, #4\n"
103 "STREQ R3, [R7]\n"
104 "LDR R3, =0xBBCF4\n"
105 "MOV LR, PC\n"
106 "LDR PC, [R3]\n"
107 "LDR R2, [R7]\n"
108 "CMP R2, #4\n"
109 "BNE loc_FFB8F308\n"
110 "LDR R3, =0xBBD36\n"
111 "LDRH R2, [R3]\n"
112 "CMP R2, #1\n"
113 "BNE loc_FFB8F13C\n"
114 "LDR R2, =0xBBC58\n"
115 "LDR R1, =0xBBD38\n"
116 "LDR R0, [R2]\n"
117 "LDRH R3, [R1]\n"
118 "MUL R12, R3, R0\n"
119 "LDR R2, =0x10624DD3\n"
120 "UMULL R3, R1, R2, R12\n"
121 "LDR R3, =0xBBC74\n"
122 "MOV R1, R1,LSR#6\n"
123 "LDR R0, [R3]\n"
124 "BL sub_FF91EA44\n"
125 "CMP R0, #0\n"
126 "MOVNE R6, #0\n"
127 "MOVEQ R6, #1\n"
128 "loc_FFB8F13C:\n"
129 "CMP R6, #1\n"
130 "BNE loc_FFB8F15C\n"
131 "ADD R0, SP, #0x38\n"
132 "ADD R1, SP, #0x34\n"
133 "ADD R2, SP, #0x30\n"
134 "ADD R3, SP, #0x2C\n"
135 "BL sub_FFB90874\n"
136 "MOV R5, R0\n"
137 "loc_FFB8F15C:\n"
138 "CMP R5, #0\n"
139 "BNE loc_FFB8F18C\n"
140 "LDR R3, =0xBBC38\n"
141 "LDR R2, [R3]\n"
142 "CMP R2, #1\n"
143 "BNE loc_FFB8F1A0\n"
144 "LDR R2, =0xBBC74\n"
145 "LDR R1, =0xBBC4C\n"
146 "LDR R0, [R2]\n"
147 "LDR R3, [R1]\n"
148 "CMP R0, R3\n"
149 "BCC loc_FFB8F1A0\n"
150 "loc_FFB8F18C:\n"
151 "MOV R0, R5\n"
152 "BL sub_FFB8F368\n"
153 "BL sub_FFB8F8FC\n"
154 "MOV R3, #5\n"
155 "B loc_FFB8F304\n"
156 "loc_FFB8F1A0:\n"
157 "LDR R9, [SP,#0x34]\n"
158 "CMP R9, #0\n"
159 "BEQ loc_FFB8F288\n"
160 "LDR R7, =0xBBC90\n"
161 "LDR R12, =0xBBC7C\n"
162 "LDMIB R4, {R0-R2}\n"
163 "LDR R10, [R4,#0x18]\n"
164 "LDR R6, [R7]\n"
165 "LDR R7, [R4,#0x14]\n"
166 "LDR R4, =0xBBC3C\n"
167 "LDR R8, [R12]\n"
168 "ADD R5, SP, #0x2C\n"
169 "LDMIA R5, {R5,LR}\n"
170 "MOV R11, #1\n"
171 "LDR R3, [SP,#0x38]\n"
172 "ADD R12, SP, #0x28\n"
173 "STR R11, [R4]\n"
174 "ADD R4, SP, #0x24\n"
175 "STMEA SP, {R9,LR}\n"
176 "STR R5, [SP,#0x8]\n"
177 "STR R12, [SP,#0xC]\n"
178 "STR R8, [SP,#0x10]\n"
179 "STR R6, [SP,#0x14]\n"
180 "STR R7, [SP,#0x18]\n"
181 "STR R10, [SP,#0x1C]\n"
182 "STR R4, [SP,#0x20]\n"
183 "BL sub_FFB93920\n"
184 "LDR R3, =0xBBB08\n"
185 "MOV R1, #0x3E8\n"
186 "LDR R0, [R3]\n"
187 "BL sub_FFB1FBF0\n"
188 "CMP R0, #9\n"
189 "BNE loc_FFB8F234\n"
190 "BL sub_FFB91104\n"
191 "LDR R3, =0xBBC48\n"
192 "LDR R0, =0xFFB8F094\n"
193 "B loc_FFB8F24C\n"
194 "loc_FFB8F234:\n"
195 "LDR R4, [SP,#0x24]\n"
196 "CMP R4, #0\n"
197 "BEQ loc_FFB8F258\n"
198 "BL sub_FFB91104\n"
199 "LDR R3, =0xBBC48\n"
200 "LDR R0, =0xFFB8F0A0\n"
201 "loc_FFB8F24C:\n"
202 "STR R11, [R3]\n"
203 "BL sub_FFB42BB8\n"
204 "B loc_FFB8F308\n"
205 "loc_FFB8F258:\n"
206 "BL sub_FFB93A9C\n"
207 "LDR R0, [SP,#0x38]\n"
208 "LDR R1, [SP,#0x28]\n"
209 "BL sub_FFB90D5C\n"
210 "LDR R12, =0xBBC70\n"
211 "LDR R3, [R12]\n"
212 "ADD R3, R3, #1\n"
213 "LDR R0, [SP,#0x28]\n"
214 "LDR R1, =0xBBC90\n"
215 "MOV R2, R4\n"
216 "STR R3, [R12]\n"
217 "BL sub_FFAFE5AC_my\n"
218 "loc_FFB8F288:\n"
219 "LDR R4, =0xBBC74\n"
220 "LDR R2, =0xBBC9C\n"
221 "LDR R3, [R4]\n"
222 "LDR R1, [R2]\n"
223 "LDR R12, =0xBBC98\n"
224 "ADD R3, R3, #1\n"
225 "MUL R0, R1, R3\n"
226 "LDR R1, [R12]\n"
227 "STR R3, [R4]\n"
228 "BL sub_FF91E9AC\n"
229 "LDR R6, =0xBBC94\n"
230 "MOV R4, R0\n"
231 "BL sub_FFB91140\n"
232 "LDR R3, [R6]\n"
233 "CMP R3, R4\n"
234 "BNE loc_FFB8F2DC\n"
235 "LDR R5, =0xBBC40\n"
236 "LDR R3, [R5]\n"
237 "CMP R3, #1\n"
238 "BNE loc_FFB8F2FC\n"
239 "B loc_FFB8F2E0\n"
240 "loc_FFB8F2DC:\n"
241 "LDR R5, =0xBBC40\n"
242 "loc_FFB8F2E0:\n"
243 "LDR R2, =0xBBCD8\n"
244 "MOV R0, R4\n"
245 "MOV LR, PC\n"
246 "LDR PC, [R2]\n"
247 "MOV R3, #0\n"
248 "STR R3, [R5]\n"
249 "STR R4, [R6]\n"
250 "loc_FFB8F2FC:\n"
251 "LDR R7, =0xBBC3C\n"
252 "MOV R3, #0\n"
253 "loc_FFB8F304:\n"
254 "STR R3, [R7]\n"
255 "loc_FFB8F308:\n"
256 "ADD SP, SP, #0x3C\n"
257 "LDMFD SP!, {R4-R11,PC}\n"
258
259 );
260 }
261
262 void __attribute__((naked,noinline)) sub_FFAFE5AC_my(){
263 asm volatile(
264 "STMFD SP!, {R4-R8,LR}\n"
265 "LDR R12, =0x975B4\n"
266 "LDR R4, [R12]\n"
267 "LDR R3, =0x975BC\n"
268 "CMP R4, #0\n"
269 "MOV R8, R1\n"
270 "MOV R7, R0\n"
271 "LDR R1, [R3]\n"
272 "BEQ loc_FFAFE5E4\n"
273 "LDR R2, =0x975C0\n"
274 "LDR R3, [R2]\n"
275 "CMP R3, #1\n"
276 "BNE loc_FFAFE5F8\n"
277 "B loc_FFAFE5E8\n"
278 "loc_FFAFE5E4:\n"
279 "LDR R2, =0x975C0\n"
280 "loc_FFAFE5E8:\n"
281 "MOV R3, #0\n"
282 "STR R3, [R2]\n"
283 "STR R7, [R12]\n"
284 "B loc_FFAFE6B0\n"
285 "loc_FFAFE5F8:\n"
286 "LDR R2, =0x975B8\n"
287 "LDR R3, [R2]\n"
288 "LDR R6, =table1\n"
289 "ADD R3, R3, R3,LSL#1\n"
290 "MOV LR, R3,LSL#2\n"
291 "LDR R2, [R6,LR]\n"
292 "LDR R5, =table2\n"
293 "RSB R12, R2, R4\n"
294 "LDR R3, [R5,LR]\n"
295 "CMP R12, #0\n"
296 "RSB R0, R3, R4\n"
297 "BLE loc_FFAFE65C\n"
298 "ADD R3, R6, #4\n"
299 "LDR R2, [R3,LR]\n"
300 "CMP R2, R12\n"
301 "ADDGE R1, R1, #1\n"
302 "BGE loc_FFAFE650\n"
303 "ADD R3, R6, #8\n"
304 "LDR R2, [R3,LR]\n"
305 "CMP R2, R12\n"
306 "ADDGE R1, R1, #2\n"
307 "ADDLT R1, R1, #3\n"
308 "loc_FFAFE650:\n"
309
310
311 "CMP R1, #0x1A\n"
312 "MOVGE R1, #0x1A\n"
313
314 "B loc_FFAFE694\n"
315 "loc_FFAFE65C:\n"
316 "CMP R0, #0\n"
317 "BGE loc_FFAFE694\n"
318 "ADD R3, R5, #4\n"
319 "LDR R2, [R3,LR]\n"
320 "CMP R2, R0\n"
321 "SUBLE R1, R1, #1\n"
322 "BLE loc_FFAFE68C\n"
323 "ADD R3, R5, #8\n"
324 "LDR R2, [R3,LR]\n"
325 "CMP R2, R0\n"
326 "SUBLE R1, R1, #2\n"
327 "SUBGT R1, R1, #3\n"
328 "loc_FFAFE68C:\n"
329 "CMP R1, #0\n"
330 "MOVLT R1, #0\n"
331 "loc_FFAFE694:\n"
332 "LDR R0, =0x975BC\n"
333 "LDR R3, [R0]\n"
334 "CMP R1, R3\n"
335 "LDRNE R2, =0x975C0\n"
336 "MOVNE R3, #1\n"
337 "STRNE R1, [R0]\n"
338 "STRNE R3, [R2]\n"
339 "loc_FFAFE6B0:\n"
340 "LDR R3, =0x975BC\n"
341 "LDR R2, =CompressionRateTable\n"
342 "LDR R1, [R3]\n"
343 "LDR R0, =0x975B4\n"
344 "LDR R3, [R2,R1,LSL#2]\n"
345
346 "LDR R1, =video_mode\n"
347 "LDR R1, [R1]\n"
348 "LDR R1, [R1]\n"
349 "CMP R1, #1\n"
350 "LDREQ R1, =video_quality\n"
351 "LDREQ R1, [R1]\n"
352 "LDREQ R3, [R1]\n"
353
354 "STR R7, [R0]\n"
355 "STR R3, [R8]\n"
356 "LDMFD SP!, {R4-R8,PC}\n"
357 );
358 }