This source file includes following definitions.
- change_video_tables
- movie_record_task
- sub_FF9478C4_my
- sub_FF94962C_my
- sub_FF948510_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_FF947284\n"
32 "loc_FF9471D4:\n"
33 "LDR R3, =0x6F668\n"
34 "LDR R2, [R3]\n"
35 "CMP R2, #0\n"
36 "BNE loc_FF947270\n"
37 "SUB R3, R12, #1\n"
38 "CMP R3, #0xA\n"
39 "LDRLS PC, [PC,R3,LSL#2]\n"
40 "B loc_FF947270\n"
41 ".long loc_FF947220\n"
42 ".long loc_FF947228\n"
43 ".long loc_FF947240\n"
44 ".long loc_FF947248\n"
45 ".long loc_FF947250\n"
46 ".long loc_FF947230\n"
47 ".long loc_FF947258\n"
48 ".long loc_FF947238\n"
49 ".long loc_FF947270\n"
50 ".long loc_FF947268\n"
51 ".long loc_FF947260\n"
52 "loc_FF947220:\n"
53 "BL sub_FF947304\n"
54 "B loc_FF94726C\n"
55 "loc_FF947228:\n"
56 "BL unlock_optical_zoom\n"
57 "BL sub_FF947538\n"
58 "B loc_FF94726C\n"
59 "loc_FF947230:\n"
60 "BL sub_FF9478C4_my\n"
61 "B loc_FF94726C\n"
62 "loc_FF947238:\n"
63 "BL sub_FF947D48\n"
64 "B loc_FF94726C\n"
65 "loc_FF947240:\n"
66 "BL sub_FF947B2C\n"
67 "BL sub_FF94F044\n"
68 "B loc_FF94726C\n"
69 "loc_FF947248:\n"
70 "BL sub_FF947F54\n"
71 "B loc_FF94726C\n"
72 "loc_FF947250:\n"
73 "BL sub_FF948118\n"
74 "B loc_FF94726C\n"
75 "loc_FF947258:\n"
76 "BL sub_FF947E08\n"
77 "B loc_FF94726C\n"
78 "loc_FF947260:\n"
79 "BL sub_FF947EE8\n"
80 "B loc_FF94726C\n"
81 "loc_FF947268:\n"
82 "BL sub_FF947B7C\n"
83 "loc_FF94726C:\n"
84 "LDR R1, [SP]\n"
85 "loc_FF947270:\n"
86 "LDR R3, =0x6F598\n"
87 "MOV R2, #0\n"
88 "STR R2, [R1]\n"
89 "LDR R0, [R3]\n"
90 "BL sub_FF8209C0\n"
91 "loc_FF947284:\n"
92 "LDR R3, =0x6F594\n"
93 "MOV R1, R4\n"
94 "LDR R0, [R3]\n"
95 "MOV R2, #0\n"
96 "BL sub_FF8205A8\n"
97 "LDR R0, [SP]\n"
98 "LDR R12, [R0]\n"
99 "CMP R12, #0xC\n"
100 "MOV R1, R0\n"
101 "BNE loc_FF9471D4\n"
102 "LDR R3, =0x6F58C\n"
103 "LDR R0, [R3]\n"
104 "BL sub_FF8213C8\n"
105 "BL sub_FF821DD0\n"
106 "ADD SP, SP, #4\n"
107 "LDMFD SP!, {R4,PC}\n"
108 );
109 }
110
111
112 void __attribute__((naked,noinline)) sub_FF9478C4_my(){
113 asm volatile(
114 "STMFD SP!, {R4-R8,LR}\n"
115 "LDR R5, =0x6F684\n"
116 "SUB SP, SP, #0x1C\n"
117 "LDR R3, [R5]\n"
118 "CMP R3, #3\n"
119 "MOV R4, R0\n"
120 "MOVEQ R3, #4\n"
121 "STREQ R3, [R5]\n"
122 "LDR R3, =0x6F72C\n"
123 "MOV LR, PC\n"
124 "LDR PC, [R3]\n"
125 "LDR R2, [R5]\n"
126 "CMP R2, #4\n"
127 "BNE loc_FF947A5C\n"
128 "ADD R0, SP, #0x18\n"
129 "BL sub_FF94962C_my\n"
130 "CMP R0, #0\n"
131 "BNE loc_FF947934\n"
132 "LDR R3, =0x6F670\n"
133 "LDR R2, [R3]\n"
134 "CMP R2, #1\n"
135 "BNE loc_FF947950\n"
136 "LDR R2, =0x6F6C0\n"
137 "LDR R1, =0x6F698\n"
138 "LDR R12, [R2]\n"
139 "LDR R3, [R1]\n"
140 "CMP R12, R3\n"
141 "BCC loc_FF947950\n"
142 "loc_FF947934:\n"
143 "BL sub_FF947AA4\n"
144 "LDR R3, =0x5348\n"
145 "LDR R0, [R3]\n"
146 "BL sub_FFA49260\n"
147 "MOV R3, #5\n"
148 "STR R3, [R5]\n"
149 "B loc_FF947A5C\n"
150 "loc_FF947950:\n"
151 "LDR R0, [R4,#4]\n"
152 "LDR R5, [R4,#0xC]\n"
153 "LDR R3, =0x6F6C8\n"
154 "LDR R4, [R4,#8]\n"
155 "LDR R8, =0x6F6D4\n"
156 "LDR R6, =0x6F674\n"
157 "ADD R12, SP, #0x14\n"
158 "ADD LR, SP, #0x10\n"
159 "MOV R7, #1\n"
160 "LDR R2, [R3]\n"
161 "LDR R1, [SP,#0x18]\n"
162 "STMEA SP, {R4,R5,R12,LR}\n"
163 "LDR R3, [R8]\n"
164 "STR R7, [R6]\n"
165 "BL sub_FF898CA0\n"
166 "LDR R3, =0x6F58C\n"
167 "MOV R1, #0x3E8\n"
168 "LDR R0, [R3]\n"
169 "BL sub_FF8211E0\n"
170 "CMP R0, #9\n"
171 "BNE loc_FF9479B4\n"
172 "BL sub_FF949D44\n"
173 "LDR R3, =0x6F684\n"
174 "LDR R0, =0xFF9478AC\n"
175 "B loc_FF9479CC\n"
176 "loc_FF9479B4:\n"
177 "LDR R5, [SP,#0x10]\n"
178 "CMP R5, #0\n"
179 "BEQ loc_FF9479D8\n"
180 "BL sub_FF949D44\n"
181 "LDR R3, =0x6F684\n"
182 "LDR R0, =0xFF9478B8\n"
183 "loc_FF9479CC:\n"
184 "STR R7, [R3]\n"
185 "BL sub_FF960F94\n"
186 "B loc_FF947A5C\n"
187 "loc_FF9479D8:\n"
188 "BL sub_FF898D4C\n"
189 "LDR R0, [SP,#0x18]\n"
190 "LDR R1, [SP,#0x14]\n"
191 "BL sub_FF949A4C\n"
192 "LDR R4, =0x6F6C0\n"
193 "LDR R3, [R4]\n"
194 "ADD R3, R3, #1\n"
195 "LDR R0, [SP,#0x14]\n"
196 "MOV R1, R8\n"
197 "STR R3, [R4]\n"
198 "MOV R2, R5\n"
199 "BL sub_FF948510_my\n"
200 "LDR R3, =0x6F6AC\n"
201 "LDR R4, [R4]\n"
202 "LDR R1, [R3]\n"
203 "MOV R0, R4\n"
204 "BL sub_FFAAF980\n"
205 "CMP R0, #0\n"
206 "BEQ loc_FF947A38\n"
207 "LDR R6, =0x6F678\n"
208 "LDR R3, [R6]\n"
209 "CMP R3, #1\n"
210 "BNE loc_FF947A50\n"
211 "B loc_FF947A3C\n"
212 "loc_FF947A38:\n"
213 "LDR R6, =0x6F678\n"
214 "loc_FF947A3C:\n"
215 "MOV R0, R4\n"
216 "LDR R3, =0x6F708\n"
217 "MOV LR, PC\n"
218 "LDR PC, [R3]\n"
219 "STR R5, [R6]\n"
220 "loc_FF947A50:\n"
221 "LDR R2, =0x6F674\n"
222 "MOV R3, #0\n"
223 "STR R3, [R2]\n"
224 "loc_FF947A5C:\n"
225 "ADD SP, SP, #0x1C\n"
226 "LDMFD SP!, {R4-R8,PC}\n"
227
228 );
229 }
230
231 void __attribute__((naked,noinline)) sub_FF94962C_my(){
232 asm volatile(
233 "STMFD SP!, {R4-R11,LR}\n"
234 "LDR R12, =0x6F9D4\n"
235 "LDR R3, =0x6F9EC\n"
236 "SUB SP, SP, #8\n"
237 "LDR R1, [R3]\n"
238 "LDR R2, [R12]\n"
239 "LDR R3, =0x6FA6C\n"
240 "ADD R7, R2, #1\n"
241 "LDR R3, [R3]\n"
242 "CMP R7, R1\n"
243 "STR R7, [R12]\n"
244 "MOV R11, R0\n"
245 "STR R3, [SP,#4]\n"
246 "MOVHI R3, #0\n"
247 "STRHI R3, [R11]\n"
248 "MOVHI R0, #0x80000001\n"
249 "BHI loc_FF949A00\n"
250 "LDR R3, =0x6FA50\n"
251 "LDR R4, [R3]\n"
252 "MOV R0, R7\n"
253 "MOV R1, R4\n"
254 "BL sub_FFAAF980\n"
255 "CMP R0, #1\n"
256 "BNE loc_FF949894\n"
257 "LDR R3, =0x6FA70\n"
258 "LDR R1, =0x6FA7C\n"
259 "LDR R0, =0x6F9C0\n"
260 "LDR R10, [R3]\n"
261 "LDR R2, [R1]\n"
262 "LDR R5, [R0]\n"
263 "ADD R2, R10, R2\n"
264 "CMP R2, R5\n"
265 "BNE loc_FF9496D0\n"
266 "MOV R1, R4\n"
267 "MOV R0, R7\n"
268 "BL sub_FFAAF2F0\n"
269 "LDR R4, =0x6F9C8\n"
270 "ADD R0, R0, #1\n"
271 "AND R0, R0, #1\n"
272 "STR R10, [R4,R0,LSL#2]\n"
273 "B loc_FF9496EC\n"
274 "loc_FF9496D0:\n"
275 "MOV R1, R4\n"
276 "MOV R0, R7\n"
277 "BL sub_FFAAF2F0\n"
278 "LDR R4, =0x6F9C8\n"
279 "ADD R0, R0, #1\n"
280 "AND R0, R0, #1\n"
281 "STR R5, [R4,R0,LSL#2]\n"
282 "loc_FF9496EC:\n"
283 "LDR R2, =0x6FA50\n"
284 "LDR R3, =0x6F9D4\n"
285 "LDR R1, [R2]\n"
286 "LDR R0, [R3]\n"
287 "BL sub_FFAAF2F0\n"
288 "LDR R1, =0x6F9BC\n"
289 "ADD R0, R0, #1\n"
290 "AND R0, R0, #1\n"
291 "LDR R12, [R4,R0,LSL#2]\n"
292 "LDR R2, [R1]\n"
293 "CMP R12, R2\n"
294 "BHI loc_FF949738\n"
295 "LDR R4, =0x6FA0C\n"
296 "LDR R3, [R4]\n"
297 "ADD R3, R12, R3\n"
298 "ADD R3, R3, #8\n"
299 "CMP R2, R3\n"
300 "BCS loc_FF94973C\n"
301 "B loc_FF949910\n"
302 "loc_FF949738:\n"
303 "LDR R4, =0x6FA0C\n"
304 "loc_FF94973C:\n"
305 "LDR R2, =0x6FA70\n"
306 "LDR R1, =0x6FA7C\n"
307 "LDR R0, [R4]\n"
308 "LDR R3, [R1]\n"
309 "LDR LR, [R2]\n"
310 "ADD R0, R12, R0\n"
311 "ADD R2, LR, R3\n"
312 "ADD R1, R0, #8\n"
313 "CMP R1, R2\n"
314 "BLS loc_FF94978C\n"
315 "LDR R3, =0x6F9BC\n"
316 "RSB R2, R2, R0\n"
317 "ADD R0, R2, #8\n"
318 "LDR R1, [R3]\n"
319 "ADD R2, LR, R0\n"
320 "CMP R1, R2\n"
321 "BCC loc_FF949910\n"
322 "LDR R3, =0x6F9C0\n"
323 "STR R2, [R3]\n"
324 "B loc_FF949794\n"
325 "loc_FF94978C:\n"
326 "LDR R3, =0x6F9C0\n"
327 "STR R1, [R3]\n"
328 "loc_FF949794:\n"
329 "LDR R3, [R4]\n"
330 "LDR R12, =0x6FA20\n"
331 "ADD R3, R3, #0x18\n"
332 "LDR R2, [R12,#4]\n"
333 "MOV R0, R3\n"
334 "MOV R1, #0\n"
335 "CMP R1, R2\n"
336 "BHI loc_FF949950\n"
337 "BNE loc_FF9497C4\n"
338 "LDR R3, [R12]\n"
339 "CMP R0, R3\n"
340 "BHI loc_FF949950\n"
341 "loc_FF9497C4:\n"
342 "LDR R4, [R4]\n"
343 "LDR LR, =0x6FA28\n"
344 "STR R4, [SP]\n"
345 "LDR R12, =0x6FA20\n"
346 "LDR R3, =0x6F9D4\n"
347 "LDMIA LR, {R7,R8}\n"
348 "LDMIA R12, {R5,R6}\n"
349 "LDR R10, [R3]\n"
350 "LDR R2, =0x6FA50\n"
351 "MOV R3, R4\n"
352 "MOV R4, #0\n"
353 "ADDS R7, R7, R3\n"
354 "ADC R8, R8, R4\n"
355 "LDR R9, [R2]\n"
356 "SUBS R5, R5, R3\n"
357 "SBC R6, R6, R4\n"
358 "MVN R2, #0\n"
359 "MVN R1, #0x17\n"
360 "ADDS R5, R5, R1\n"
361 "MOV R4, #0\n"
362 "MOV R3, #0x18\n"
363 "ADC R6, R6, R2\n"
364 "ADDS R7, R7, R3\n"
365 "ADC R8, R8, R4\n"
366 "STMIA R12, {R5,R6}\n"
367 "SUB R0, R10, #1\n"
368 "MOV R1, R9\n"
369 "STMIA LR, {R7,R8}\n"
370 "BL sub_FFAAF2F0\n"
371 "CMP R10, #1\n"
372 "MLA R0, R9, R0, R0\n"
373 "BEQ loc_FF949894\n"
374 "LDR R2, [SP,#4]\n"
375 "SUB R3, R0, #1\n"
376 "MOV R3, R3,LSL#4\n"
377 "ADD R5, R2, #0x14\n"
378 "ADD R4, R2, #0x10\n"
379 "LDR R1, [R5,R3]\n"
380 "LDR R2, [R4,R3]\n"
381 "MOV R3, R0,LSL#4\n"
382 "LDR R0, [SP,#4]\n"
383 "ADD R2, R2, R1\n"
384 "LDR LR, =0x62773130\n"
385 "ADD R1, R0, #8\n"
386 "ADD R12, R0, #0xC\n"
387 "ADD R2, R2, #8\n"
388 "MOV R0, #0\n"
389 "STR LR, [R1,R3]\n"
390 "STR R0, [R12,R3]\n"
391 "STR R2, [R4,R3]\n"
392 "LDR R1, [SP]\n"
393 "STR R1, [R5,R3]\n"
394 "loc_FF949894:\n"
395 "LDR R2, =0x6F9C0\n"
396 "LDR R3, [R2]\n"
397 "ADD R1, R3, #8\n"
398 "STR R1, [R11]\n"
399 "LDR R0, =0x6F9BC\n"
400 "LDR R2, [R0]\n"
401 "CMP R3, R2\n"
402 "BHI loc_FF9498CC\n"
403 "LDR LR, =0x6FA1C\n"
404 "LDR R3, [LR]\n"
405 "ADD R3, R1, R3\n"
406 "CMP R2, R3\n"
407 "BCS loc_FF9498D0\n"
408 "B loc_FF949910\n"
409 "loc_FF9498CC:\n"
410 "LDR LR, =0x6FA1C\n"
411 "loc_FF9498D0:\n"
412 "LDR R3, =0x6FA70\n"
413 "LDR R2, =0x6FA7C\n"
414 "LDR R12, [R3]\n"
415 "LDR R0, [R2]\n"
416 "LDR R1, [R11]\n"
417 "LDR R3, [LR]\n"
418 "ADD R2, R1, R3\n"
419 "ADD R1, R12, R0\n"
420 "CMP R2, R1\n"
421 "BLS loc_FF949920\n"
422 "RSB R0, R1, R2\n"
423 "LDR R1, =0x6F9BC\n"
424 "LDR R2, [R1]\n"
425 "ADD R3, R12, R0\n"
426 "CMP R2, R3\n"
427 "BCS loc_FF949920\n"
428 "loc_FF949910:\n"
429 "MOV R3, #0\n"
430 "STR R3, [R11]\n"
431 "MOV R0, #0x80000003\n"
432 "B loc_FF949A00\n"
433 "loc_FF949920:\n"
434 "LDR R3, [LR]\n"
435 "LDR R12, =0x6FA20\n"
436 "ADD R3, R3, #0x18\n"
437 "LDR R2, [R12,#4]\n"
438 "MOV R0, R3\n"
439 "MOV R1, #0\n"
440 "CMP R1, R2\n"
441 "BHI loc_FF949950\n"
442 "BNE loc_FF949960\n"
443 "LDR R3, [R12]\n"
444 "CMP R0, R3\n"
445 "BLS loc_FF949960\n"
446 "loc_FF949950:\n"
447 "MOV R3, #0\n"
448 "STR R3, [R11]\n"
449 "MOV R0, #0x80000005\n"
450 "B loc_FF949A00\n"
451 "loc_FF949960:\n"
452 "LDR R1, =0x6FA04\n"
453 "LDR R0, =0x6FA50\n"
454 "LDR R3, [R1]\n"
455 "LDR R2, [R0]\n"
456 "ADD R3, R3, R2,LSL#4\n"
457 "ADD R3, R3, R3,LSL#2\n"
458 "LDR R12, =0x6FA20\n"
459 "MOV R3, R3,LSL#1\n"
460 "ADD R3, R3, #0xA0\n"
461 "LDR R2, [R12,#4]\n"
462 "MOV R0, R3\n"
463 "MOV R1, #0\n"
464 "CMP R1, R2\n"
465 "BHI loc_FF9499A8\n"
466 "BNE loc_FF9499CC\n"
467 "LDR R3, [R12]\n"
468 "CMP R0, R3\n"
469 "BLS loc_FF9499CC\n"
470 "loc_FF9499A8:\n"
471 "LDR R4, =0x6FA38\n"
472 "LDR R1, [R4]\n"
473 "CMP R1, #0\n"
474 "BNE loc_FF9499CC\n"
475 "MOV R0, #0x3140\n"
476 "ADD R0, R0, #8\n"
477 "BL sub_FF964DEC\n"
478 "MOV R3, #1\n"
479 "STR R3, [R4]\n"
480 "loc_FF9499CC:\n"
481 "LDR R2, =0x6FA28\n"
482 "LDR R3, [R2,#4]\n"
483 "CMP R3, #0\n"
484 "BHI loc_FF9499EC\n"
485 "BNE loc_FF9499FC\n"
486 "LDR R3, [R2]\n"
487 "CMP R3, #0x40000000\n"
488
489
490 "B loc_FF9499FC\n"
491
492 "loc_FF9499EC:\n"
493 "MOV R3, #0\n"
494 "STR R3, [R11]\n"
495 "MOV R0, #0x80000007\n"
496 "B loc_FF949A00\n"
497 "loc_FF9499FC:\n"
498 "MOV R0, #0\n"
499 "loc_FF949A00:\n"
500 "ADD SP, SP, #8\n"
501 "LDMFD SP!, {R4-R11,PC}\n"
502
503 );
504 }
505
506 void __attribute__((naked,noinline)) sub_FF948510_my(){
507 asm volatile(
508 "CMP R2, #1\n"
509 "STMFD SP!, {R4-R7,LR}\n"
510 "MOV R7, R0\n"
511 "MOV R6, R1\n"
512 "LDREQ R3, =CompressionRateTable\n"
513 "LDREQ R2, [R3,#0x18]\n"
514 "STREQ R2, [R6]\n"
515 "LDMEQFD SP!, {R4-R7,PC}\n"
516 "LDR R12, =0x6F738\n"
517 "LDR R0, [R12]\n"
518 "LDR R3, =0x6F740\n"
519 "CMP R0, #0\n"
520 "LDR R1, [R3]\n"
521 "BEQ loc_FF94855C\n"
522 "LDR R2, =0x6F744\n"
523 "LDR R3, [R2]\n"
524 "CMP R3, #1\n"
525 "BNE loc_FF948570\n"
526 "B loc_FF948560\n"
527 "loc_FF94855C:\n"
528 "LDR R2, =0x6F744\n"
529 "loc_FF948560:\n"
530 "MOV R3, #0\n"
531 "STR R3, [R2]\n"
532 "STR R7, [R12]\n"
533 "B loc_FF948624\n"
534 "loc_FF948570:\n"
535 "LDR R3, =0x6F73C\n"
536 "LDR R2, [R3]\n"
537 "LDR R5, =table1\n"
538 "MOV LR, R2,LSL#2\n"
539 "LDR R3, [R5,LR]\n"
540 "LDR R4, =table2\n"
541 "RSB R12, R3, R0\n"
542 "LDR R2, [R4,LR]\n"
543 "CMP R12, #0\n"
544 "RSB R0, R2, R0\n"
545 "BLE loc_FF9485D0\n"
546 "ADD R3, R5, #0x10\n"
547 "LDR R2, [R3,LR]\n"
548 "CMP R2, R12\n"
549 "ADDGE R1, R1, #1\n"
550 "BGE loc_FF9485C4\n"
551 "ADD R3, R5, #0x20\n"
552 "LDR R2, [R3,LR]\n"
553 "CMP R2, R12\n"
554 "ADDGE R1, R1, #2\n"
555 "ADDLT R1, R1, #3\n"
556 "loc_FF9485C4:\n"
557
558
559 "CMP R1, #0x1A\n"
560 "MOVGE R1, #0x1A\n"
561
562 "B loc_FF948608\n"
563 "loc_FF9485D0:\n"
564 "CMP R0, #0\n"
565 "BGE loc_FF948608\n"
566 "ADD R3, R4, #0x10\n"
567 "LDR R2, [R3,LR]\n"
568 "CMP R2, R0\n"
569 "SUBLE R1, R1, #1\n"
570 "BLE loc_FF948600\n"
571 "ADD R3, R4, #0x20\n"
572 "LDR R2, [R3,LR]\n"
573 "CMP R2, R0\n"
574 "SUBLE R1, R1, #2\n"
575 "SUBGT R1, R1, #3\n"
576 "loc_FF948600:\n"
577 "CMP R1, #0\n"
578 "MOVLT R1, #0\n"
579 "loc_FF948608:\n"
580 "LDR R0, =0x6F740\n"
581 "LDR R3, [R0]\n"
582 "CMP R1, R3\n"
583 "LDRNE R2, =0x6F744\n"
584 "MOVNE R3, #1\n"
585 "STRNE R1, [R0]\n"
586 "STRNE R3, [R2]\n"
587 "loc_FF948624:\n"
588 "LDR R3, =0x6F740\n"
589
590 "LDR R1, =video_mode\n"
591 "LDR R0, [R3]\n"
592 "LDR R2, =CompressionRateTable\n"
593 "LDR R12, [R1]\n"
594 "LDR R12, [R12]\n"
595 "LDR LR, [R2,R0,LSL#2]\n"
596 "LDR R3, =0x6F738\n"
597 "CMP R12, #1\n"
598 "STR R7, [R3]\n"
599 "STR LR, [R6]\n"
600
601
602 "LDREQ R3, =video_quality\n"
603 "LDREQ R3, [R3]\n"
604 "LDREQ R3, [R3]\n"
605
606 "STREQ R3, [R6]\n"
607 "LDMFD SP!, {R4-R7,PC}\n"
608 );
609 }