This source file includes following definitions.
- change_video_tables
- movie_record_task
- sub_FF9517AC_my
- sub_FF9533BC_my
- sub_FF95240C_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_FF951170\n"
32 "loc_FF9510C0:\n"
33 "LDR R3, =0x6F940\n"
34 "LDR R2, [R3]\n"
35 "CMP R2, #0\n"
36 "BNE loc_FF95115C\n"
37 "SUB R3, R12, #1\n"
38 "CMP R3, #0xA\n"
39 "LDRLS PC, [PC,R3,LSL#2]\n"
40 "B loc_FF95115C\n"
41 ".long loc_FF95110C\n"
42 ".long loc_FF951114\n"
43 ".long loc_FF95112C\n"
44 ".long loc_FF951134\n"
45 ".long loc_FF95113C\n"
46 ".long loc_FF95111C\n"
47 ".long loc_FF951144\n"
48 ".long loc_FF951124\n"
49 ".long loc_FF95115C\n"
50 ".long loc_FF951154\n"
51 ".long loc_FF95114C\n"
52 "loc_FF95110C:\n"
53
54 "BL sub_FF9511F0\n"
55 "B loc_FF951158\n"
56 "loc_FF951114:\n"
57
58 "BL sub_FF951424\n"
59 "BL unlock_optical_zoom\n"
60 "B loc_FF951158\n"
61 "loc_FF95111C:\n"
62
63 "BL sub_FF9517AC_my\n"
64 "B loc_FF951158\n"
65 "loc_FF951124:\n"
66
67 "BL sub_FF951C44\n"
68 "B loc_FF951158\n"
69 "loc_FF95112C:\n"
70
71 "BL sub_FF951A14\n"
72 "B loc_FF951158\n"
73 "loc_FF951134:\n"
74
75 "BL sub_FF951E50\n"
76 "B loc_FF951158\n"
77 "loc_FF95113C:\n"
78
79 "BL sub_FF952014\n"
80 "B loc_FF951158\n"
81 "loc_FF951144:\n"
82
83 "BL sub_FF951D04\n"
84 "B loc_FF951158\n"
85 "loc_FF95114C:\n"
86
87 "BL sub_FF951DE4\n"
88 "B loc_FF951158\n"
89 "loc_FF951154:\n"
90
91 "BL sub_FF951A64\n"
92 "loc_FF951158:\n"
93
94 "LDR R1, [SP]\n"
95 "loc_FF95115C:\n"
96
97 "LDR R3, =0x6F870\n"
98 "MOV R2, #0\n"
99 "STR R2, [R1]\n"
100 "LDR R0, [R3]\n"
101 "BL sub_FF8211A4\n"
102 "loc_FF951170:\n"
103 "LDR R3, =0x6F86C\n"
104 "MOV R1, R4\n"
105 "LDR R0, [R3]\n"
106 "MOV R2, #0\n"
107 "BL sub_FF820D8C\n"
108 "LDR R0, [SP]\n"
109 "LDR R12, [R0]\n"
110 "CMP R12, #0xC\n"
111 "MOV R1, R0\n"
112 "BNE loc_FF9510C0\n"
113 "LDR R3, =0x6F864\n"
114 "LDR R0, [R3]\n"
115 "BL sub_FF821BAC\n"
116 "BL sub_FF8225B4\n"
117 "ADD SP, SP, #4\n"
118 "LDMFD SP!, {R4,PC}\n"
119
120 );
121 }
122
123
124 void __attribute__((naked,noinline)) sub_FF9517AC_my(){
125 asm volatile(
126 "STMFD SP!, {R4-R8,LR}\n"
127 "LDR R5, =0x6F95C\n"
128 "SUB SP, SP, #0x1C\n"
129 "LDR R3, [R5]\n"
130 "CMP R3, #3\n"
131 "MOV R4, R0\n"
132 "MOVEQ R3, #4\n"
133 "STREQ R3, [R5]\n"
134 "LDR R3, =0x6FA04\n"
135 "MOV LR, PC\n"
136 "LDR PC, [R3]\n"
137 "LDR R2, [R5]\n"
138 "CMP R2, #4\n"
139 "BNE loc_FF951944\n"
140 "ADD R0, SP, #0x18\n"
141 "BL sub_FF9533BC_my\n"
142 "CMP R0, #0\n"
143 "BNE loc_FF95181C\n"
144 "LDR R3, =0x6F948\n"
145 "LDR R2, [R3]\n"
146 "CMP R2, #1\n"
147 "BNE loc_FF951838\n"
148 "LDR R2, =0x6F998\n"
149 "LDR R1, =0x6F970\n"
150 "LDR R12, [R2]\n"
151 "LDR R3, [R1]\n"
152 "CMP R12, R3\n"
153 "BCC loc_FF951838\n"
154 "loc_FF95181C:\n"
155 "BL sub_FF95198C\n"
156 "LDR R3, =0x56BC\n"
157 "LDR R0, [R3]\n"
158 "BL sub_FF8302C4\n"
159 "MOV R3, #5\n"
160 "STR R3, [R5]\n"
161 "B loc_FF951944\n"
162 "loc_FF951838:\n"
163
164 "LDR R0, [R4,#4]\n"
165 "LDR R5, [R4,#0xC]\n"
166 "LDR R3, =0x6F9A0\n"
167 "LDR R4, [R4,#8]\n"
168 "LDR R8, =0x6F9AC\n"
169 "LDR R6, =0x6F94C\n"
170 "ADD R12, SP, #0x14\n"
171 "ADD LR, SP, #0x10\n"
172 "MOV R7, #1\n"
173 "LDR R2, [R3]\n"
174 "LDR R1, [SP,#0x18]\n"
175 "STMEA SP, {R4,R5,R12,LR}\n"
176 "LDR R3, [R8]\n"
177 "STR R7, [R6]\n"
178 "BL sub_FF8A2D4C\n"
179 "LDR R3, =0x6F864\n"
180 "MOV R1, #0x3E8\n"
181 "LDR R0, [R3]\n"
182 "BL sub_FF8219C4\n"
183 "CMP R0, #9\n"
184 "BNE loc_FF95189C\n"
185 "BL sub_FF953AB0\n"
186 "LDR R3, =0x6F95C\n"
187 "LDR R0, =0xFF951794\n"
188 "B loc_FF9518B4\n"
189 "loc_FF95189C:\n"
190 "LDR R5, [SP,#0x10]\n"
191 "CMP R5, #0\n"
192 "BEQ loc_FF9518C0\n"
193 "BL sub_FF953AB0\n"
194 "LDR R3, =0x6F95C\n"
195 "LDR R0, =0xFF9517A0\n"
196 "loc_FF9518B4:\n"
197 "STR R7, [R3]\n"
198 "BL sub_FF96B100\n"
199 "B loc_FF951944\n"
200 "loc_FF9518C0:\n"
201 "BL sub_FF8A2DF8\n"
202 "LDR R0, [SP,#0x18]\n"
203 "LDR R1, [SP,#0x14]\n"
204 "BL sub_FF9537DC\n"
205 "LDR R4, =0x6F998\n"
206 "LDR R3, [R4]\n"
207 "ADD R3, R3, #1\n"
208 "LDR R0, [SP,#0x14]\n"
209 "MOV R1, R8\n"
210 "STR R3, [R4]\n"
211 "MOV R2, R5\n"
212 "BL sub_FF95240C_my\n"
213 "LDR R3, =0x6F984\n"
214 "LDR R4, [R4]\n"
215 "LDR R1, [R3]\n"
216 "MOV R0, R4\n"
217 "BL sub_FFAB18F4\n"
218 "CMP R0, #0\n"
219 "BEQ loc_FF951920\n"
220 "LDR R6, =0x6F950\n"
221 "LDR R3, [R6]\n"
222 "CMP R3, #1\n"
223 "BNE loc_FF951938\n"
224 "B loc_FF951924\n"
225 "loc_FF951920:\n"
226 "LDR R6, =0x6F950\n"
227 "loc_FF951924:\n"
228 "MOV R0, R4\n"
229 "LDR R3, =0x6F9E0\n"
230 "MOV LR, PC\n"
231 "LDR PC, [R3]\n"
232 "STR R5, [R6]\n"
233 "loc_FF951938:\n"
234 "LDR R2, =0x6F94C\n"
235 "MOV R3, #0\n"
236 "STR R3, [R2]\n"
237 "loc_FF951944:\n"
238
239 "ADD SP, SP, #0x1C\n"
240 "LDMFD SP!, {R4-R8,PC}\n"
241
242 );
243 }
244
245 void __attribute__((naked,noinline)) sub_FF9533BC_my(){
246 asm volatile(
247 "STMFD SP!, {R4-R11,LR}\n"
248 "LDR R12, =0x6FCAC\n"
249 "LDR R3, =0x6FCC4\n"
250 "SUB SP, SP, #8\n"
251 "LDR R1, [R3]\n"
252 "LDR R2, [R12]\n"
253 "LDR R3, =0x6FD44\n"
254 "ADD R7, R2, #1\n"
255 "LDR R3, [R3]\n"
256 "CMP R7, R1\n"
257 "STR R7, [R12]\n"
258 "MOV R11, R0\n"
259 "STR R3, [SP,#4]\n"
260 "MOVHI R3, #0\n"
261 "STRHI R3, [R11]\n"
262 "MOVHI R0, #0x80000001\n"
263 "BHI loc_FF953790\n"
264 "LDR R3, =0x6FD28\n"
265 "LDR R4, [R3]\n"
266 "MOV R0, R7\n"
267 "MOV R1, R4\n"
268 "BL sub_FFAB18F4\n"
269 "CMP R0, #1\n"
270 "BNE loc_FF953624\n"
271 "LDR R3, =0x6FD48\n"
272 "LDR R1, =0x6FD54\n"
273 "LDR R0, =0x6FC98\n"
274 "LDR R10, [R3]\n"
275 "LDR R2, [R1]\n"
276 "LDR R5, [R0]\n"
277 "ADD R2, R10, R2\n"
278 "CMP R2, R5\n"
279 "BNE loc_FF953460\n"
280 "MOV R1, R4\n"
281 "MOV R0, R7\n"
282 "BL sub_FFAB1264\n"
283 "LDR R4, =0x6FCA0\n"
284 "ADD R0, R0, #1\n"
285 "AND R0, R0, #1\n"
286 "STR R10, [R4,R0,LSL#2]\n"
287 "B loc_FF95347C\n"
288 "loc_FF953460:\n"
289 "MOV R1, R4\n"
290 "MOV R0, R7\n"
291 "BL sub_FFAB1264\n"
292 "LDR R4, =0x6FCA0\n"
293 "ADD R0, R0, #1\n"
294 "AND R0, R0, #1\n"
295 "STR R5, [R4,R0,LSL#2]\n"
296 "loc_FF95347C:\n"
297 "LDR R2, =0x6FD28\n"
298 "LDR R3, =0x6FCAC\n"
299 "LDR R1, [R2]\n"
300 "LDR R0, [R3]\n"
301 "BL sub_FFAB1264\n"
302 "LDR R1, =0x6FC94\n"
303 "ADD R0, R0, #1\n"
304 "AND R0, R0, #1\n"
305 "LDR R12, [R4,R0,LSL#2]\n"
306 "LDR R2, [R1]\n"
307 "CMP R12, R2\n"
308 "BHI loc_FF9534C8\n"
309 "LDR R4, =0x6FCE4\n"
310 "LDR R3, [R4]\n"
311 "ADD R3, R12, R3\n"
312 "ADD R3, R3, #8\n"
313 "CMP R2, R3\n"
314 "BCS loc_FF9534CC\n"
315 "B loc_FF9536A0\n"
316 "loc_FF9534C8:\n"
317 "LDR R4, =0x6FCE4\n"
318 "loc_FF9534CC:\n"
319 "LDR R2, =0x6FD48\n"
320 "LDR R1, =0x6FD54\n"
321 "LDR R0, [R4]\n"
322 "LDR R3, [R1]\n"
323 "LDR LR, [R2]\n"
324 "ADD R0, R12, R0\n"
325 "ADD R2, LR, R3\n"
326 "ADD R1, R0, #8\n"
327 "CMP R1, R2\n"
328 "BLS loc_FF95351C\n"
329 "LDR R3, =0x6FC94\n"
330 "RSB R2, R2, R0\n"
331 "ADD R0, R2, #8\n"
332 "LDR R1, [R3]\n"
333 "ADD R2, LR, R0\n"
334 "CMP R1, R2\n"
335 "BCC loc_FF9536A0\n"
336 "LDR R3, =0x6FC98\n"
337 "STR R2, [R3]\n"
338 "B loc_FF953524\n"
339 "loc_FF95351C:\n"
340 "LDR R3, =0x6FC98\n"
341 "STR R1, [R3]\n"
342 "loc_FF953524:\n"
343 "LDR R3, [R4]\n"
344 "LDR R12, =0x6FCF8\n"
345 "ADD R3, R3, #0x18\n"
346 "LDR R2, [R12,#4]\n"
347 "MOV R0, R3\n"
348 "MOV R1, #0\n"
349 "CMP R1, R2\n"
350 "BHI loc_FF9536E0\n"
351 "BNE loc_FF953554\n"
352 "LDR R3, [R12]\n"
353 "CMP R0, R3\n"
354 "BHI loc_FF9536E0\n"
355 "loc_FF953554:\n"
356 "LDR R4, [R4]\n"
357 "LDR LR, =0x6FD00\n"
358 "STR R4, [SP]\n"
359 "LDR R12, =0x6FCF8\n"
360 "LDR R3, =0x6FCAC\n"
361 "LDMIA LR, {R7,R8}\n"
362 "LDMIA R12, {R5,R6}\n"
363 "LDR R10, [R3]\n"
364 "LDR R2, =0x6FD28\n"
365 "MOV R3, R4\n"
366 "MOV R4, #0\n"
367 "ADDS R7, R7, R3\n"
368 "ADC R8, R8, R4\n"
369 "LDR R9, [R2]\n"
370 "SUBS R5, R5, R3\n"
371 "SBC R6, R6, R4\n"
372 "MVN R2, #0\n"
373 "MVN R1, #0x17\n"
374 "ADDS R5, R5, R1\n"
375 "MOV R4, #0\n"
376 "MOV R3, #0x18\n"
377 "ADC R6, R6, R2\n"
378 "ADDS R7, R7, R3\n"
379 "ADC R8, R8, R4\n"
380 "STMIA R12, {R5,R6}\n"
381 "SUB R0, R10, #1\n"
382 "MOV R1, R9\n"
383 "STMIA LR, {R7,R8}\n"
384 "BL sub_FFAB1264\n"
385 "CMP R10, #1\n"
386 "MLA R0, R9, R0, R0\n"
387 "BEQ loc_FF953624\n"
388 "LDR R2, [SP,#4]\n"
389 "SUB R3, R0, #1\n"
390 "MOV R3, R3,LSL#4\n"
391 "ADD R5, R2, #0x14\n"
392 "ADD R4, R2, #0x10\n"
393 "LDR R1, [R5,R3]\n"
394 "LDR R2, [R4,R3]\n"
395 "MOV R3, R0,LSL#4\n"
396 "LDR R0, [SP,#4]\n"
397 "ADD R2, R2, R1\n"
398 "LDR LR, =0x62773130\n"
399 "ADD R1, R0, #8\n"
400 "ADD R12, R0, #0xC\n"
401 "ADD R2, R2, #8\n"
402 "MOV R0, #0\n"
403 "STR LR, [R1,R3]\n"
404 "STR R0, [R12,R3]\n"
405 "STR R2, [R4,R3]\n"
406 "LDR R1, [SP]\n"
407 "STR R1, [R5,R3]\n"
408 "loc_FF953624:\n"
409
410 "LDR R2, =0x6FC98\n"
411 "LDR R3, [R2]\n"
412 "ADD R1, R3, #8\n"
413 "STR R1, [R11]\n"
414 "LDR R0, =0x6FC94\n"
415 "LDR R2, [R0]\n"
416 "CMP R3, R2\n"
417 "BHI loc_FF95365C\n"
418 "LDR LR, =0x6FCF4\n"
419 "LDR R3, [LR]\n"
420 "ADD R3, R1, R3\n"
421 "CMP R2, R3\n"
422 "BCS loc_FF953660\n"
423 "B loc_FF9536A0\n"
424 "loc_FF95365C:\n"
425 "LDR LR, =0x6FCF4\n"
426 "loc_FF953660:\n"
427 "LDR R3, =0x6FD48\n"
428 "LDR R2, =0x6FD54\n"
429 "LDR R12, [R3]\n"
430 "LDR R0, [R2]\n"
431 "LDR R1, [R11]\n"
432 "LDR R3, [LR]\n"
433 "ADD R2, R1, R3\n"
434 "ADD R1, R12, R0\n"
435 "CMP R2, R1\n"
436 "BLS loc_FF9536B0\n"
437 "RSB R0, R1, R2\n"
438 "LDR R1, =0x6FC94\n"
439 "LDR R2, [R1]\n"
440 "ADD R3, R12, R0\n"
441 "CMP R2, R3\n"
442 "BCS loc_FF9536B0\n"
443 "loc_FF9536A0:\n"
444
445 "MOV R3, #0\n"
446 "STR R3, [R11]\n"
447 "MOV R0, #0x80000003\n"
448 "B loc_FF953790\n"
449 "loc_FF9536B0:\n"
450
451 "LDR R3, [LR]\n"
452 "LDR R12, =0x6FCF8\n"
453 "ADD R3, R3, #0x18\n"
454 "LDR R2, [R12,#4]\n"
455 "MOV R0, R3\n"
456 "MOV R1, #0\n"
457 "CMP R1, R2\n"
458 "BHI loc_FF9536E0\n"
459 "BNE loc_FF9536F0\n"
460 "LDR R3, [R12]\n"
461 "CMP R0, R3\n"
462 "BLS loc_FF9536F0\n"
463 "loc_FF9536E0:\n"
464
465 "MOV R3, #0\n"
466 "STR R3, [R11]\n"
467 "MOV R0, #0x80000005\n"
468 "B loc_FF953790\n"
469 "loc_FF9536F0:\n"
470
471 "LDR R1, =0x6FCDC\n"
472 "LDR R0, =0x6FD28\n"
473 "LDR R3, [R1]\n"
474 "LDR R2, [R0]\n"
475 "ADD R3, R3, R2,LSL#4\n"
476 "ADD R3, R3, R3,LSL#2\n"
477 "LDR R12, =0x6FCF8\n"
478 "MOV R3, R3,LSL#1\n"
479 "ADD R3, R3, #0xA0\n"
480 "LDR R2, [R12,#4]\n"
481 "MOV R0, R3\n"
482 "MOV R1, #0\n"
483 "CMP R1, R2\n"
484 "BHI loc_FF953738\n"
485 "BNE loc_FF95375C\n"
486 "LDR R3, [R12]\n"
487 "CMP R0, R3\n"
488 "BLS loc_FF95375C\n"
489 "loc_FF953738:\n"
490 "LDR R4, =0x6FD10\n"
491 "LDR R1, [R4]\n"
492 "CMP R1, #0\n"
493 "BNE loc_FF95375C\n"
494 "MOV R0, #0x3140\n"
495 "ADD R0, R0, #8\n"
496 "BL sub_FF96F030\n"
497 "MOV R3, #1\n"
498 "STR R3, [R4]\n"
499 "loc_FF95375C:\n"
500
501 "LDR R2, =0x6FD00\n"
502 "LDR R3, [R2,#4]\n"
503 "CMP R3, #0\n"
504 "BHI loc_FF95377C\n"
505 "BNE loc_FF95378C\n"
506 "LDR R3, [R2]\n"
507 "CMP R3, #0x40000000\n"
508
509
510 "B loc_FF95378C\n"
511
512 "loc_FF95377C:\n"
513 "MOV R3, #0\n"
514 "STR R3, [R11]\n"
515 "MOV R0, #0x80000007\n"
516 "B loc_FF953790\n"
517 "loc_FF95378C:\n"
518
519 "MOV R0, #0\n"
520 "loc_FF953790:\n"
521
522 "ADD SP, SP, #8\n"
523 "LDMFD SP!, {R4-R11,PC}\n"
524 );
525 }
526
527 void __attribute__((naked,noinline)) sub_FF95240C_my(){
528 asm volatile(
529 "CMP R2, #1\n"
530 "STMFD SP!, {R4-R7,LR}\n"
531 "MOV R7, R0\n"
532 "MOV R6, R1\n"
533 "LDREQ R3, =CompressionRateTable\n"
534 "LDREQ R2, [R3,#0x18]\n"
535 "STREQ R2, [R6]\n"
536 "LDMEQFD SP!, {R4-R7,PC}\n"
537 "LDR R12, =0x6FA10\n"
538 "LDR R0, [R12]\n"
539 "LDR R3, =0x6FA18\n"
540 "CMP R0, #0\n"
541 "LDR R1, [R3]\n"
542 "BEQ loc_FF952458\n"
543 "LDR R2, =0x6FA1C\n"
544 "LDR R3, [R2]\n"
545 "CMP R3, #1\n"
546 "BNE loc_FF95246C\n"
547 "B loc_FF95245C\n"
548 "loc_FF952458:\n"
549 "LDR R2, =0x6FA1C\n"
550 "loc_FF95245C:\n"
551 "MOV R3, #0\n"
552 "STR R3, [R2]\n"
553 "STR R7, [R12]\n"
554 "B loc_FF952520\n"
555 "loc_FF95246C:\n"
556 "LDR R3, =0x6FA14\n"
557 "LDR R2, [R3]\n"
558 "LDR R5, =table1\n"
559 "MOV LR, R2,LSL#2\n"
560 "LDR R3, [R5,LR]\n"
561 "LDR R4, =table2\n"
562 "RSB R12, R3, R0\n"
563 "LDR R2, [R4,LR]\n"
564 "CMP R12, #0\n"
565 "RSB R0, R2, R0\n"
566 "BLE loc_FF9524CC\n"
567 "ADD R3, R5, #0x10\n"
568 "LDR R2, [R3,LR]\n"
569 "CMP R2, R12\n"
570 "ADDGE R1, R1, #1\n"
571 "BGE loc_FF9524C0\n"
572 "ADD R3, R5, #0x20\n"
573 "LDR R2, [R3,LR]\n"
574 "CMP R2, R12\n"
575 "ADDGE R1, R1, #2\n"
576 "ADDLT R1, R1, #3\n"
577 "loc_FF9524C0:\n"
578
579
580 "CMP R1, #0x1A\n"
581 "MOVGE R1, #0x1A\n"
582
583 "B loc_FF952504\n"
584 "loc_FF9524CC:\n"
585 "CMP R0, #0\n"
586 "BGE loc_FF952504\n"
587 "ADD R3, R4, #0x10\n"
588 "LDR R2, [R3,LR]\n"
589 "CMP R2, R0\n"
590 "SUBLE R1, R1, #1\n"
591 "BLE loc_FF9524FC\n"
592 "ADD R3, R4, #0x20\n"
593 "LDR R2, [R3,LR]\n"
594 "CMP R2, R0\n"
595 "SUBLE R1, R1, #2\n"
596 "SUBGT R1, R1, #3\n"
597 "loc_FF9524FC:\n"
598 "CMP R1, #0\n"
599 "MOVLT R1, #0\n"
600 "loc_FF952504:\n"
601
602 "LDR R0, =0x6FA18\n"
603 "LDR R3, [R0]\n"
604 "CMP R1, R3\n"
605 "LDRNE R2, =0x6FA1C\n"
606 "MOVNE R3, #1\n"
607 "STRNE R1, [R0]\n"
608 "STRNE R3, [R2]\n"
609 "loc_FF952520:\n"
610 "LDR R3, =0x6FA18\n"
611
612 "LDR R1, =video_mode\n"
613 "LDR R0, [R3]\n"
614 "LDR R2, =CompressionRateTable\n"
615 "LDR R12, [R1]\n"
616 "LDR R12, [R12]\n"
617 "LDR LR, [R2,R0,LSL#2]\n"
618 "LDR R3, =0x6FA10\n"
619 "CMP R12, #1\n"
620 "STR R7, [R3]\n"
621 "STR LR, [R6]\n"
622
623
624 "LDREQ R3, =video_quality\n"
625 "LDREQ R3, [R3]\n"
626 "LDREQ R3, [R3]\n"
627
628 "STREQ R3, [R6]\n"
629 "LDMFD SP!, {R4-R7,PC}\n"
630 );
631 }