This source file includes following definitions.
- change_video_tables
- movie_record_task
- sub_FF954B84_my
- sub_FF956258_my
- sub_FF955648_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
19 void __attribute__((naked,noinline)) movie_record_task(){
20 asm volatile(
21 "STMFD SP!, {R4,LR}\n"
22 "SUB SP, SP, #4\n"
23 "MOV R4, SP\n"
24 "B loc_FF954564\n"
25 "loc_FF9544C0:\n"
26 "LDR R3, =0x6EC88\n"
27 "LDR R2, [R3]\n"
28 "CMP R2, #0\n"
29 "BNE loc_FF954550\n"
30 "SUB R3, R12, #2\n"
31 "CMP R3, #9\n"
32 "LDRLS PC, [PC,R3,LSL#2]\n"
33 "B loc_FF954550\n"
34 ".long loc_FF954510\n"
35 ".long loc_FF954528\n"
36 ".long loc_FF954530\n"
37 ".long loc_FF954538\n"
38 ".long loc_FF954518\n"
39 ".long loc_FF954540\n"
40 ".long loc_FF954520\n"
41 ".long loc_FF954550\n"
42 ".long loc_FF954548\n"
43 ".long loc_FF954508\n"
44 "loc_FF954508:\n"
45 "BL sub_FF9545FC\n"
46 "B loc_FF95454C\n"
47 "loc_FF954510:\n"
48 "BL unlock_optical_zoom\n"
49 "BL sub_FF9547B0\n"
50 "B loc_FF95454C\n"
51 "loc_FF954518:\n"
52 "BL sub_FF954B84_my\n"
53 "B loc_FF95454C\n"
54 "loc_FF954520:\n"
55 "BL sub_FF954FB8\n"
56 "B loc_FF95454C\n"
57 "loc_FF954528:\n"
58 "BL sub_FF954E1C\n"
59 "B loc_FF95454C\n"
60 "loc_FF954530:\n"
61 "BL sub_FF955128\n"
62 "B loc_FF95454C\n"
63 "loc_FF954538:\n"
64 "BL sub_FF9552EC\n"
65 "B loc_FF95454C\n"
66 "loc_FF954540:\n"
67 "BL sub_FF955040\n"
68 "B loc_FF95454C\n"
69 "loc_FF954548:\n"
70 "BL sub_FF954E6C\n"
71 "loc_FF95454C:\n"
72 "LDR R1, [SP]\n"
73 "loc_FF954550:\n"
74 "LDR R3, =0x6EBBC\n"
75 "MOV R2, #0\n"
76 "STR R2, [R1]\n"
77 "LDR R0, [R3]\n"
78 "BL sub_FF82089C\n"
79 "loc_FF954564:\n"
80 "LDR R3, =0x6EBB8\n"
81 "MOV R1, R4\n"
82 "LDR R0, [R3]\n"
83 "MOV R2, #0\n"
84 "BL sub_FF820484\n"
85 "LDR R0, [SP]\n"
86 "LDR R12, [R0]\n"
87 "CMP R12, #0xC\n"
88 "MOV R1, R0\n"
89 "BNE loc_FF9544C0\n"
90 "LDR R3, =0x6EBB4\n"
91 "LDR R0, [R3]\n"
92 "BL sub_FF821218\n"
93 "BL sub_FF8219E0\n"
94 "ADD SP, SP, #4\n"
95 "LDMFD SP!, {R4,PC}\n"
96 );
97 }
98
99
100 void __attribute__((naked,noinline)) sub_FF954B84_my(){
101 asm volatile(
102 "STMFD SP!, {R4-R11,LR}\n"
103 "LDR R5, =0x6ECA4\n"
104 "SUB SP, SP, #0x34\n"
105 "LDR R3, [R5]\n"
106 "CMP R3, #3\n"
107 "MOV R4, R0\n"
108 "MOVEQ R3, #4\n"
109 "STREQ R3, [R5]\n"
110 "LDR R3, =0x6ED54\n"
111 "MOV LR, PC\n"
112 "LDR PC, [R3]\n"
113 "LDR R2, [R5]\n"
114 "CMP R2, #4\n"
115 "BNE loc_FF954D48\n"
116 "ADD R0, SP, #0x30\n"
117 "ADD R1, SP, #0x2C\n"
118 "ADD R2, SP, #0x28\n"
119 "ADD R3, SP, #0x24\n"
120 "BL sub_FF956258_my\n"
121 "CMP R0, #0\n"
122 "BNE loc_FF954C00\n"
123 "LDR R3, =0x6EC90\n"
124 "LDR R2, [R3]\n"
125 "CMP R2, #1\n"
126 "BNE loc_FF954C14\n"
127 "LDR R2, =0x6ECE8\n"
128 "LDR R1, =0x6ECBC\n"
129 "LDR R12, [R2]\n"
130 "LDR R3, [R1]\n"
131 "CMP R12, R3\n"
132 "BCC loc_FF954C14\n"
133 "loc_FF954C00:\n"
134 "BL sub_FF954D94\n"
135 "BL sub_FF954F94\n"
136 "MOV R3, #5\n"
137 "STR R3, [R5]\n"
138 "B loc_FF954D48\n"
139 "loc_FF954C14:\n"
140 "LDR R12, =0x6ECF0\n"
141 "LDR R11, =0x6ECFC\n"
142 "LDMIB R4, {R0-R2}\n"
143 "LDR R10, [R12]\n"
144 "LDR R7, [R11]\n"
145 "LDR R4, [SP,#0x2C]\n"
146 "LDR R5, [SP,#0x28]\n"
147 "LDR R6, [SP,#0x24]\n"
148 "LDR R8, =0x6EC94\n"
149 "LDR R3, [SP,#0x30]\n"
150 "ADD R12, SP, #0x20\n"
151 "ADD LR, SP, #0x1C\n"
152 "MOV R9, #1\n"
153 "STMEA SP, {R4-R6,R12}\n"
154 "STR R10, [SP,#0x10]\n"
155 "STR R7, [SP,#0x14]\n"
156 "STR LR, [SP,#0x18]\n"
157 "STR R9, [R8]\n"
158 "BL sub_FF89650C\n"
159 "LDR R3, =0x6EBAC\n"
160 "MOV R1, #0x3E8\n"
161 "LDR R0, [R3]\n"
162 "BL sub_FF821030\n"
163 "CMP R0, #9\n"
164 "BNE loc_FF954C88\n"
165 "BL sub_FF956A68\n"
166 "LDR R3, =0x6ECA4\n"
167 "LDR R0, =0xFF954B6C\n"
168 "B loc_FF954CA0\n"
169 "loc_FF954C88:\n"
170 "LDR R5, [SP,#0x1C]\n"
171 "CMP R5, #0\n"
172 "BEQ loc_FF954CAC\n"
173 "BL sub_FF956A68\n"
174 "LDR R3, =0x6ECA4\n"
175 "LDR R0, =0xFF954B78\n"
176 "loc_FF954CA0:\n"
177 "STR R9, [R3]\n"
178 "BL sub_FF969B80\n"
179 "B loc_FF954D48\n"
180 "loc_FF954CAC:\n"
181 "BL sub_FF896678\n"
182 "LDR R0, [SP,#0x30]\n"
183 "LDR R1, [SP,#0x20]\n"
184 "BL sub_FF95678C\n"
185 "LDR R4, =0x6ECE8\n"
186 "LDR R3, [R4]\n"
187 "ADD R3, R3, #1\n"
188 "LDR R0, [SP,#0x20]\n"
189 "MOV R1, R11\n"
190 "STR R3, [R4]\n"
191 "MOV R2, R5\n"
192 "BL sub_FF955648_my\n"
193 "LDR R3, =0x6ED08\n"
194 "LDR R1, [R4]\n"
195 "LDR R2, [R3]\n"
196 "LDR R12, =0x6ED04\n"
197 "MUL R0, R2, R1\n"
198 "LDR R1, [R12]\n"
199 "BL sub_FFB02D34\n"
200 "LDR R7, =0x6ED00\n"
201 "LDR R3, [R7]\n"
202 "MOV R4, R0\n"
203 "CMP R3, R4\n"
204 "BNE loc_FF954D20\n"
205 "LDR R6, =0x6EC98\n"
206 "LDR R3, [R6]\n"
207 "CMP R3, #1\n"
208 "BNE loc_FF954D3C\n"
209 "B loc_FF954D24\n"
210 "loc_FF954D20:\n"
211 "LDR R6, =0x6EC98\n"
212 "loc_FF954D24:\n"
213 "LDR R3, =0x6ED38\n"
214 "MOV R0, R4\n"
215 "MOV LR, PC\n"
216 "LDR PC, [R3]\n"
217 "STR R5, [R6]\n"
218 "STR R4, [R7]\n"
219 "loc_FF954D3C:\n"
220 "LDR R2, =0x6EC94\n"
221 "MOV R3, #0\n"
222 "STR R3, [R2]\n"
223 "loc_FF954D48:\n"
224 "ADD SP, SP, #0x34\n"
225 "LDMFD SP!, {R4-R11,PC}\n"
226 );
227 }
228
229
230 void __attribute__((naked,noinline)) sub_FF956258_my(){
231 asm volatile(
232 "STMFD SP!, {R4-R11,LR}\n"
233 "LDR R5, =0x6EFFC\n"
234 "SUB SP, SP, #0x14\n"
235 "LDR LR, [R5]\n"
236 "LDR R12, =0x6F014\n"
237 "ADD LR, LR, #1\n"
238 "LDR R4, [R12]\n"
239 "STR LR, [R5]\n"
240 "LDR R12, =0x6F094\n"
241 "STR R0, [SP,#0x10]\n"
242 "STR R1, [SP,#0xC]\n"
243 "STR R2, [SP,#8]\n"
244 "STR R3, [SP,#4]\n"
245 "CMP LR, R4\n"
246 "LDR R11, [R12]\n"
247 "MOVHI R0, #0x80000001\n"
248 "BHI loc_FF956740\n"
249 "LDR R3, =0x6F078\n"
250 "MOV R0, LR\n"
251 "LDR R1, [R3]\n"
252 "BL sub_FFB033C4\n"
253 "CMP R0, #1\n"
254 "BNE loc_FF956478\n"
255 "LDR R0, =0x6F09C\n"
256 "LDR R1, =0x6EFE8\n"
257 "LDR R3, [R0]\n"
258 "LDR R2, [R1]\n"
259 "CMP R3, R2\n"
260 "LDREQ R3, =0x6F098\n"
261 "LDREQ R5, [R3]\n"
262 "MOVNE R5, R2\n"
263 "LDR R3, =0x6EFFC\n"
264 "LDR R2, =0x6F078\n"
265 "LDR R0, [R3]\n"
266 "LDR R1, [R2]\n"
267 "BL sub_FFB02D34\n"
268 "LDR R3, =0x6EFF0\n"
269 "ADD R0, R0, #1\n"
270 "AND R0, R0, #1\n"
271 "STR R5, [R3,R0,LSL#2]\n"
272 "LDR R3, =0x6EFE4\n"
273 "LDR R2, [R3]\n"
274 "CMP R5, R2\n"
275 "BHI loc_FF956328\n"
276 "LDR R4, =0x6F034\n"
277 "LDR R3, [R4]\n"
278 "ADD R3, R5, R3\n"
279 "ADD R3, R3, #8\n"
280 "CMP R2, R3\n"
281 "BCS loc_FF95632C\n"
282 "loc_FF956320:\n"
283 "MOV R0, #0x80000003\n"
284 "B loc_FF956740\n"
285 "loc_FF956328:\n"
286 "LDR R4, =0x6F034\n"
287 "loc_FF95632C:\n"
288 "LDR R3, [R4]\n"
289 "LDR R2, =0x6F09C\n"
290 "ADD R1, R5, R3\n"
291 "LDR R3, [R2]\n"
292 "ADD R2, R1, #8\n"
293 "CMP R2, R3\n"
294 "BLS loc_FF956378\n"
295 "LDR R2, =0x6F098\n"
296 "LDR R0, =0x6EFE4\n"
297 "RSB R3, R3, R1\n"
298 "LDR R1, [R2]\n"
299 "ADD R3, R3, #8\n"
300 "LDR R2, [R0]\n"
301 "ADD R1, R1, R3\n"
302 "CMP R2, R1\n"
303 "BCC loc_FF956320\n"
304 "LDR R3, =0x6EFE8\n"
305 "STR R1, [R3]\n"
306 "B loc_FF956380\n"
307 "loc_FF956378:\n"
308 "LDR R3, =0x6EFE8\n"
309 "STR R2, [R3]\n"
310 "loc_FF956380:\n"
311 "LDR R3, [R4]\n"
312 "LDR R12, =0x6F048\n"
313 "ADD R3, R3, #0x18\n"
314 "LDR R2, [R12,#4]\n"
315 "MOV R0, R3\n"
316 "MOV R1, #0\n"
317 "CMP R1, R2\n"
318 "BHI loc_FF9565C4\n"
319 "BNE loc_FF9563B0\n"
320 "LDR R3, [R12]\n"
321 "CMP R0, R3\n"
322 "BHI loc_FF9565C4\n"
323 "loc_FF9563B0:\n"
324 "LDR R4, [R4]\n"
325 "LDR LR, =0x6F050\n"
326 "STR R4, [SP]\n"
327 "LDR R12, =0x6F048\n"
328 "LDR R3, =0x6EFFC\n"
329 "LDMIA LR, {R7,R8}\n"
330 "LDMIA R12, {R5,R6}\n"
331 "LDR R10, [R3]\n"
332 "LDR R2, =0x6F078\n"
333 "MOV R3, R4\n"
334 "MOV R4, #0\n"
335 "ADDS R7, R7, R3\n"
336 "ADC R8, R8, R4\n"
337 "LDR R9, [R2]\n"
338 "SUBS R5, R5, R3\n"
339 "SBC R6, R6, R4\n"
340 "MVN R2, #0\n"
341 "MVN R1, #0x17\n"
342 "ADDS R5, R5, R1\n"
343 "MOV R4, #0\n"
344 "MOV R3, #0x18\n"
345 "ADC R6, R6, R2\n"
346 "ADDS R7, R7, R3\n"
347 "ADC R8, R8, R4\n"
348 "STMIA R12, {R5,R6}\n"
349 "SUB R0, R10, #1\n"
350 "MOV R1, R9\n"
351 "STMIA LR, {R7,R8}\n"
352 "BL sub_FFB02D34\n"
353 "CMP R10, #1\n"
354 "MLA R0, R9, R0, R0\n"
355 "BEQ loc_FF956478\n"
356 "SUB R3, R0, #1\n"
357 "MOV R3, R3,LSL#4\n"
358 "ADD R4, R11, #0x10\n"
359 "ADD R5, R11, #0x14\n"
360 "LDR R1, [R5,R3]\n"
361 "LDR R2, [R4,R3]\n"
362 "LDR LR, =0x62773130\n"
363 "ADD R2, R2, R1\n"
364 "MOV R3, R0,LSL#4\n"
365 "ADD R2, R2, #8\n"
366 "MOV R0, #0\n"
367 "ADD R12, R11, #0xC\n"
368 "ADD R1, R11, #8\n"
369 "STR LR, [R1,R3]\n"
370 "STR R0, [R12,R3]\n"
371 "STR R2, [R4,R3]\n"
372 "LDR R0, [SP]\n"
373 "STR R0, [R5,R3]\n"
374 "loc_FF956478:\n"
375 "LDR R2, =0x6EFE8\n"
376 "LDR R3, =0x6F09C\n"
377 "LDR R1, [R2]\n"
378 "LDR R0, [R3]\n"
379 "ADD R3, R1, #9\n"
380 "CMP R3, R0\n"
381 "BLS loc_FF9564B4\n"
382 "LDR R2, =0x6F098\n"
383 "LDR R3, [R2]\n"
384 "ADD R3, R3, R1\n"
385 "RSB R3, R0, R3\n"
386 "LDR R0, [SP,#0x10]\n"
387 "ADD R3, R3, #8\n"
388 "STR R3, [R0]\n"
389 "B loc_FF9564C0\n"
390 "loc_FF9564B4:\n"
391 "ADD R3, R1, #8\n"
392 "LDR R1, [SP,#0x10]\n"
393 "STR R3, [R1]\n"
394 "loc_FF9564C0:\n"
395 "LDR R2, [SP,#0x10]\n"
396 "LDR R1, =0x6F044\n"
397 "LDR R3, =0x6F09C\n"
398 "LDR R12, [R2]\n"
399 "LDR R2, [R1]\n"
400 "LDR R0, [R3]\n"
401 "ADD R3, R12, R2\n"
402 "CMP R3, R0\n"
403 "BLS loc_FF956514\n"
404 "LDR R2, [SP,#0xC]\n"
405 "RSB R0, R12, R0\n"
406 "STR R0, [R2]\n"
407 "LDR R2, =0x6F098\n"
408 "LDR R3, [R1]\n"
409 "LDR R1, [R2]\n"
410 "RSB R3, R0, R3\n"
411 "LDR R0, [SP,#8]\n"
412 "STR R1, [R0]\n"
413 "LDR R1, [SP,#4]\n"
414 "STR R3, [R1]\n"
415 "B loc_FF956530\n"
416 "loc_FF956514:\n"
417 "LDR R0, [SP,#0xC]\n"
418 "STR R2, [R0]\n"
419 "LDR R1, [SP,#4]\n"
420 "MOV R3, #0\n"
421 "STR R3, [R1]\n"
422 "LDR R2, [SP,#8]\n"
423 "STR R3, [R2]\n"
424 "loc_FF956530:\n"
425 "LDR R0, =0x6EFE8\n"
426 "LDR R1, =0x6EFE4\n"
427 "LDR R3, [R0]\n"
428 "LDR R2, [R1]\n"
429 "CMP R3, R2\n"
430 "BHI loc_FF95655C\n"
431 "LDR R0, [SP,#0xC]\n"
432 "LDR R3, [R0]\n"
433 "ADD R3, R12, R3\n"
434 "CMP R2, R3\n"
435 "BCC loc_FF956320\n"
436 "loc_FF95655C:\n"
437 "LDR R1, [SP,#8]\n"
438 "LDR R2, [R1]\n"
439 "CMP R2, #0\n"
440 "BEQ loc_FF956590\n"
441 "LDR R3, =0x6EFE4\n"
442 "LDR R1, [R3]\n"
443 "CMP R2, R1\n"
444 "BHI loc_FF956590\n"
445 "LDR R0, [SP,#4]\n"
446 "LDR R3, [R0]\n"
447 "ADD R3, R2, R3\n"
448 "CMP R1, R3\n"
449 "BCC loc_FF956320\n"
450 "loc_FF956590:\n"
451 "LDR R3, =0x6F044\n"
452 "LDR R0, =0x6F048\n"
453 "LDR R2, [R3]\n"
454 "LDR R3, [R0,#4]\n"
455 "ADD R2, R2, #0x18\n"
456 "MOV R1, R2\n"
457 "MOV R2, #0\n"
458 "CMP R2, R3\n"
459 "BHI loc_FF9565C4\n"
460 "BNE loc_FF9565CC\n"
461 "LDR R3, [R0]\n"
462 "CMP R1, R3\n"
463 "BLS loc_FF9565CC\n"
464 "loc_FF9565C4:\n"
465 "MOV R0, #0x80000005\n"
466 "B loc_FF956740\n"
467 "loc_FF9565CC:\n"
468 "LDR R1, =0x6F02C\n"
469 "LDR R0, =0x6F078\n"
470 "LDR R3, [R1]\n"
471 "LDR R2, [R0]\n"
472 "ADD R3, R3, R2,LSL#4\n"
473 "ADD R3, R3, R3,LSL#2\n"
474 "LDR R12, =0x6F048\n"
475 "MOV R3, R3,LSL#1\n"
476 "ADD R3, R3, #0xA0\n"
477 "LDR R2, [R12,#4]\n"
478 "MOV R0, R3\n"
479 "MOV R1, #0\n"
480 "CMP R1, R2\n"
481 "BHI loc_FF956614\n"
482 "BNE loc_FF956638\n"
483 "LDR R3, [R12]\n"
484 "CMP R0, R3\n"
485 "BLS loc_FF956638\n"
486 "loc_FF956614:\n"
487 "LDR R4, =0x6F060\n"
488 "LDR R1, [R4]\n"
489 "CMP R1, #0\n"
490 "BNE loc_FF956638\n"
491 "MOV R0, #0x3140\n"
492 "ADD R0, R0, #8\n"
493 "BL sub_FF96E0B0\n"
494 "MOV R3, #1\n"
495 "STR R3, [R4]\n"
496 "loc_FF956638:\n"
497 "LDR R1, =0x6F02C\n"
498 "LDR R0, =0x6F078\n"
499 "LDR R2, [R1]\n"
500 "LDR R3, [R0]\n"
501 "LDR R0, =0x6F050\n"
502 "ADD R2, R2, R3,LSL#4\n"
503 "MVN R3, #0x9F\n"
504 "ADD R2, R2, R2,LSL#2\n"
505 "ADD R3, R3, #0x40000000\n"
506 "SUB R3, R3, R2,LSL#1\n"
507 "LDR R1, [R0,#4]\n"
508 "MOV R4, R3\n"
509 "MOV R5, #0\n"
510 "CMP R1, R5\n"
511 "BHI loc_FF956684\n"
512 "BNE loc_FF9566A8\n"
513 "LDR R3, [R0]\n"
514 "CMP R3, R4\n"
515 "BLS loc_FF9566A8\n"
516 "loc_FF956684:\n"
517 "LDR R4, =0x6F060\n"
518 "LDR R1, [R4]\n"
519 "CMP R1, #0\n"
520 "BNE loc_FF9566A8\n"
521 "MOV R0, #0x3140\n"
522 "ADD R0, R0, #8\n"
523 "BL sub_FF96E0B0\n"
524 "MOV R3, #1\n"
525 "STR R3, [R4]\n"
526 "loc_FF9566A8:\n"
527 "LDR R3, =0x6F078\n"
528 "LDR R0, =0x6F014\n"
529 "LDR R2, [R3]\n"
530 "LDR R12, =0x6EFFC\n"
531 "LDR R1, [R0]\n"
532 "ADD R3, R2, R2,LSL#2\n"
533 "ADD R2, R2, R3,LSL#1\n"
534 "LDR R0, [R12]\n"
535 "RSB R1, R2, R1\n"
536 "CMP R0, R1\n"
537 "BLS loc_FF9566F8\n"
538 "LDR R4, =0x6F060\n"
539 "LDR R1, [R4]\n"
540 "CMP R1, #0\n"
541 "BNE loc_FF9566F8\n"
542 "MOV R0, #0x3140\n"
543 "ADD R0, R0, #8\n"
544 "BL sub_FF96E0B0\n"
545 "MOV R3, #1\n"
546 "STR R3, [R4]\n"
547 "loc_FF9566F8:\n"
548 "LDR R3, =0x6F050\n"
549 "LDR R12, =0x6F044\n"
550 "LDMIA R3, {R1,R2}\n"
551 "LDR R0, [R12]\n"
552 "MOV R4, #0\n"
553 "MOV R3, #0x18\n"
554 "ADDS R1, R1, R0\n"
555 "ADC R2, R2, #0\n"
556 "ADDS R1, R1, R3\n"
557 "ADC R2, R2, R4\n"
558 "CMP R2, #0\n"
559 "BHI loc_FF956734\n"
560 "BNE loc_FF95673C\n"
561 "CMP R1, #0x40000000\n"
562
563
564 "B loc_FF95673C\n"
565
566 "loc_FF956734:\n"
567 "MOV R0, #0x80000007\n"
568 "B loc_FF956740\n"
569 "loc_FF95673C:\n"
570 "MOV R0, #0\n"
571 "loc_FF956740:\n"
572 "ADD SP, SP, #0x14\n"
573 "LDMFD SP!, {R4-R11,PC}\n"
574 );
575 }
576
577
578
579 void __attribute__((naked,noinline)) sub_FF955648_my(){
580 asm volatile(
581 "CMP R2, #1\n"
582 "STMFD SP!, {R4-R7,LR}\n"
583 "MOV R7, R0\n"
584 "MOV R6, R1\n"
585 "MOVEQ R3, #0x79\n"
586 "STREQ R3, [R6]\n"
587 "LDMEQFD SP!, {R4-R7,PC}\n"
588 "LDR R12, =0x6ED60\n"
589 "LDR R0, [R12]\n"
590 "LDR R3, =0x6ED68\n"
591 "CMP R0, #0\n"
592 "LDR R1, [R3]\n"
593 "BEQ loc_FF955690\n"
594 "LDR R2, =0x6ED6C\n"
595 "LDR R3, [R2]\n"
596 "CMP R3, #1\n"
597 "BNE loc_FF9556A4\n"
598 "B loc_FF955694\n"
599 "loc_FF955690:\n"
600 "LDR R2, =0x6ED6C\n"
601 "loc_FF955694:\n"
602 "MOV R3, #0\n"
603 "STR R3, [R2]\n"
604 "STR R7, [R12]\n"
605 "B loc_FF95575C\n"
606 "loc_FF9556A4:\n"
607 "LDR R2, =0x6ED64\n"
608 "LDR R3, [R2]\n"
609 "LDR R5, =table1\n"
610 "ADD R3, R3, R3,LSL#1\n"
611 "MOV LR, R3,LSL#2\n"
612 "LDR R2, [R5,LR]\n"
613 "LDR R4, =table2\n"
614 "RSB R12, R2, R0\n"
615 "LDR R3, [R4,LR]\n"
616 "CMP R12, #0\n"
617 "RSB R0, R3, R0\n"
618 "BLE loc_FF955708\n"
619 "ADD R3, R5, #4\n"
620 "LDR R2, [R3,LR]\n"
621 "CMP R2, R12\n"
622 "ADDGE R1, R1, #1\n"
623 "BGE loc_FF9556FC\n"
624 "ADD R3, R5, #8\n"
625 "LDR R2, [R3,LR]\n"
626 "CMP R2, R12\n"
627 "ADDGE R1, R1, #2\n"
628 "ADDLT R1, R1, #3\n"
629 "loc_FF9556FC:\n"
630
631
632
633 "CMP R1, #0x1A\n"
634 "MOVGE R1, #0x1A\n"
635
636 "B loc_FF955740\n"
637 "loc_FF955708:\n"
638 "CMP R0, #0\n"
639 "BGE loc_FF955740\n"
640 "ADD R3, R4, #4\n"
641 "LDR R2, [R3,LR]\n"
642 "CMP R2, R0\n"
643 "SUBLE R1, R1, #1\n"
644 "BLE loc_FF955738\n"
645 "ADD R3, R4, #8\n"
646 "LDR R2, [R3,LR]\n"
647 "CMP R2, R0\n"
648 "SUBLE R1, R1, #2\n"
649 "SUBGT R1, R1, #3\n"
650 "loc_FF955738:\n"
651 "CMP R1, #0\n"
652 "MOVLT R1, #0\n"
653 "loc_FF955740:\n"
654 "LDR R0, =0x6ED68\n"
655 "LDR R3, [R0]\n"
656 "CMP R1, R3\n"
657 "LDRNE R2, =0x6ED6C\n"
658 "MOVNE R3, #1\n"
659 "STRNE R1, [R0]\n"
660 "STRNE R3, [R2]\n"
661 "loc_FF95575C:\n"
662 "LDR R3, =0x6ED68\n"
663
664 "LDR R1, =video_mode\n"
665 "LDR R0, [R3]\n"
666 "LDR R2, =CompressionRateTable\n"
667 "LDR R12, [R1]\n"
668 "LDR R12, [R12]\n"
669 "LDR LR, [R2,R0,LSL#2]\n"
670 "LDR R3, =0x6ED60\n"
671 "CMP R12, #1\n"
672 "STR R7, [R3]\n"
673 "STR LR, [R6]\n"
674
675
676 "LDREQ R3, =video_quality\n"
677 "LDREQ R3, [R3]\n"
678 "LDREQ R3, [R3]\n"
679
680 "STREQ R3, [R6]\n"
681 "LDMFD SP!, {R4-R7,PC}\n"
682 );
683 }
684