This source file includes following definitions.
- change_video_tables
- movie_record_task
- sub_FF936B64_my
- sub_FF9384F0_my
- sub_FF9374C0_my
1
2
3
4
5
6
7
8
9 #include "conf.h"
10
11 int *video_quality = &conf.video_quality;
12 int *video_mode = &conf.video_mode;
13
14 long def_table1[56]={
15 0x10000,0xC000,0x5800, 0x2000, 0x1C6A, 0x1550,0x9C5, 0x38D, 0x3C45, 0x2D34, 0x14B8, 0x788, 0x5F60, 0x4788,
16 0x20C9, 0xBE1, 0x8661, 0x64C9, 0x2E31, 0x10CB,0xB21A, 0x8594, 0x3D39, 0x1642, 0xE249, 0xA9B8, 0x4DC9, 0x1C48,
17 0x117D2,0xD1DF,0x6030, 0x22F9, 0x153D5,0xFEE1,0x74D1, 0x2A79, 0x195F8,0x1307C,0x8B8D, 0x32AA, 0x1E01C,0x16817,
18 0xA509, 0x3C01,0x2328E,0x1A5ED,0xC160, 0x4637,0x28C99,0x1E975,0xE054, 0x5190, 0x2F08B,0x2346B,0x102AF,0x5E0E
19 };
20
21 long def_table2[12]={0xE666,0xACCD,0x4F33,0x1CCD,-0x170A,-0x1148,-0x7EB,-0x2E1,-0x2BC6,-0x20D5,-0xF0C,-0x579};
22
23 long table1[56], table2[12];
24
25 void change_video_tables(int a, int b){
26 int i;
27 for (i=0;i<56;i++) table1[i]=(def_table1[i]*a)/b;
28 for (i=0;i<12;i++) table2[i]=(def_table2[i]*a)/b;
29 }
30
31 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};
32
33
34 void __attribute__((naked,noinline)) movie_record_task(){
35 asm volatile(
36 "STMFD SP!, {R4,LR}\n"
37 "SUB SP, SP, #4\n"
38 "MOV R4, SP\n"
39 "B loc_FF936520\n"
40 "loc_FF936488:\n"
41 "LDR R3, =0x670F0\n"
42 "LDR R2, [R3]\n"
43 "CMP R2, #0\n"
44 "BNE loc_FF93650C\n"
45 "LDR R3, [R0]\n"
46 "SUB R3, R3, #1\n"
47 "CMP R3, #7\n"
48 "LDRLS PC, [PC,R3,LSL#2]\n"
49 "B loc_FF93650C\n"
50 ".long loc_FF9364CC\n"
51 ".long loc_FF9364D4\n"
52 ".long loc_FF9364EC\n"
53 ".long loc_FF9364DC\n"
54 ".long loc_FF9364F4\n"
55 ".long loc_FF9364E4\n"
56 ".long loc_FF936504\n"
57 ".long loc_FF9364FC\n"
58
59 "loc_FF9364CC:\n"
60 "BL sub_FF93659C\n"
61 "B loc_FF936508\n"
62 "loc_FF9364D4:\n"
63
64
65 "BL sub_FF9367B4\n"
66 "B loc_FF936508\n"
67 "loc_FF9364DC:\n"
68 "BL sub_FF936B64_my\n"
69 "B loc_FF936508\n"
70 "loc_FF9364E4:\n"
71 "BL sub_FF936F10\n"
72 "B loc_FF936508\n"
73 "loc_FF9364EC:\n"
74 "BL sub_FF936DB8\n"
75 "B loc_FF936508\n"
76 "loc_FF9364F4:\n"
77 "BL sub_FF936FC8\n"
78 "B loc_FF936508\n"
79 "loc_FF9364FC:\n"
80 "BL sub_FF937064\n"
81 "B loc_FF936508\n"
82 "loc_FF936504:\n"
83 "BL sub_FF936E08\n"
84 "loc_FF936508:\n"
85 "LDR R1, [SP]\n"
86 "loc_FF93650C:\n"
87 "LDR R3, =0x67074\n"
88 "MOV R2, #0\n"
89 "STR R2, [R1]\n"
90 "LDR R0, [R3]\n"
91 "BL sub_FF822738\n"
92 "loc_FF936520:\n"
93 "LDR R3, =0x67070\n"
94 "MOV R1, R4\n"
95 "LDR R0, [R3]\n"
96 "MOV R2, #0\n"
97 "BL sub_FF822320\n"
98 "LDR R0, [SP]\n"
99 "CMP R0, #0\n"
100 "MOV R1, R0\n"
101 "BNE loc_FF936488\n"
102 "LDR R3, =0x6706C\n"
103 "LDR R0, [R3]\n"
104 "BL sub_FF823144\n"
105 "BL sub_FF823B44\n"
106 "ADD SP, SP, #4\n"
107 "LDMFD SP!, {R4,PC}\n"
108 );
109 }
110
111
112 void __attribute__((naked,noinline)) sub_FF936B64_my(){
113 asm volatile(
114 "STMFD SP!, {R4-R7,LR}\n"
115 "LDR R4, =0x67108\n"
116 "SUB SP, SP, #0x10\n"
117 "LDR R3, [R4]\n"
118 "CMP R3, #3\n"
119 "MOV R5, R0\n"
120 "MOVEQ R3, #4\n"
121 "STREQ R3, [R4]\n"
122 "LDR R3, =0x67188\n"
123 "MOV LR, PC\n"
124 "LDR PC, [R3]\n"
125 "LDR R2, [R4]\n"
126 "CMP R2, #4\n"
127 "BNE loc_FF936CC8\n"
128 "ADD R0, SP, #0xC\n"
129 "BL sub_FF9384F0\n"
130 "CMP R0, #0\n"
131 "BNE loc_FF936BD4\n"
132 "LDR R3, =0x670F8\n"
133 "LDR R2, [R3]\n"
134 "CMP R2, #1\n"
135 "BNE loc_FF936BF0\n"
136 "LDR R2, =0x67130\n"
137 "LDR R1, =0x6710C\n"
138 "LDR R12, [R2]\n"
139 "LDR R3, [R1]\n"
140 "CMP R12, R3\n"
141 "BCC loc_FF936BF0\n"
142 "loc_FF936BD4:\n"
143 "BL sub_FF936D08\n"
144 "LDR R3, =0x67184\n"
145 "LDR R0, [R3]\n"
146 "BL sub_FFA449B4\n"
147 "MOV R3, #5\n"
148 "STR R3, [R4]\n"
149 "B loc_FF936CC8\n"
150 "loc_FF936BF0:\n"
151 "LDR R6, =0x67138\n"
152 "LDR R7, =0x670FC\n"
153 "LDR R0, [R5,#0x4]\n"
154 "LDR R1, [SP,#0xC]\n"
155 "ADD R12, SP, #0x4\n"
156 "ADD R3, SP, #0x8\n"
157 "LDR R2, [R6]\n"
158 "MOV R4, #1\n"
159 "STR R12, [SP]\n"
160 "STR R4, [R7]\n"
161 "BL sub_FF8A03D8\n"
162 "LDR R3, =0x6706C\n"
163 "MOV R1, #0x3E8\n"
164 "LDR R0, [R3]\n"
165 "BL sub_FF822F5C\n"
166 "CMP R0, #9\n"
167 "BNE loc_FF936C44\n"
168 "BL sub_FF938B2C\n"
169 "LDR R3, =0x67108\n"
170 "LDR R0, =0xFF936B4C\n"
171 "B loc_FF936C5C\n"
172 "loc_FF936C44:\n"
173 "LDR R5, [SP,#4]\n"
174 "CMP R5, #0\n"
175 "BEQ loc_FF936C68\n"
176 "BL sub_FF938B2C\n"
177 "LDR R3, =0x67108\n"
178 "LDR R0, =0xFF936B58\n"
179 "loc_FF936C5C:\n"
180 "STR R4, [R3]\n"
181 "BL sub_FF94FA2C\n"
182 "B loc_FF936CC8\n"
183 "loc_FF936C68:\n"
184 "BL sub_FF8A0434\n"
185 "LDR R0, [SP,#0xC]\n"
186 "LDR R1, [SP,#0x8]\n"
187 "BL sub_FF9388B4\n"
188 "LDR R4, =0x67130\n"
189 "LDR R3, [R4]\n"
190 "ADD R3, R3, #1\n"
191 "LDR R0, [SP,#0x8]\n"
192 "MOV R1, R6\n"
193 "STR R3, [R4]\n"
194 "MOV R2, R5\n"
195 "BL sub_FF9374C0\n"
196 "LDR R3, =0x67118\n"
197 "LDR R4, [R4]\n"
198 "LDR R1, [R3]\n"
199 "MOV R0, R4\n"
200 "BL sub_FFAB83DC\n"
201 "CMP R0, #0\n"
202 "BNE loc_FF936CC4\n"
203 "MOV R0, R4\n"
204 "LDR R3, =0x67160\n"
205 "MOV LR, PC\n"
206 "LDR PC, [R3]\n"
207 "loc_FF936CC4:\n"
208 "STR R5, [R7]\n"
209 "loc_FF936CC8:\n"
210 "ADD SP, SP, #0x10\n"
211 "LDMFD SP!, {R4-R7,PC}\n"
212
213 );
214 }
215
216 void __attribute__((naked,noinline)) sub_FF9384F0_my(){
217 asm volatile(
218 "STMFD SP!, {R4-R11,LR}\n"
219 "LDR R12, =0x67434\n"
220 "LDR R3, =0x6744C\n"
221 "SUB SP, SP, #4\n"
222 "LDR R2, [R12]\n"
223 "LDR R1, [R3]\n"
224 "ADD R7, R2, #1\n"
225 "LDR R3, =0x674C4\n"
226 "CMP R7, R1\n"
227 "STR R7, [R12]\n"
228 "MOV R9, R0\n"
229 "LDR R11, [R3]\n"
230 "MOVHI R3, #0\n"
231 "STRHI R3, [R9]\n"
232 "MOVHI R0, #0x80000001\n"
233 "BHI loc_FF938828\n"
234 "LDR R3, =0x674A8\n"
235 "LDR R4, [R3]\n"
236 "MOV R0, R7\n"
237 "MOV R1, R4\n"
238 "BL sub_FFAB83DC\n"
239 "CMP R0, #1\n"
240 "BNE loc_FF9386EC\n"
241 "LDR R1, =0x674D4\n"
242 "LDR R3, =0x674C8\n"
243 "LDR R2, [R1]\n"
244 "LDR R1, =0x67420\n"
245 "LDR R8, [R3]\n"
246 "LDR R5, [R1]\n"
247 "ADD R2, R8, R2\n"
248 "CMP R2, R5\n"
249 "BNE loc_FF938590\n"
250 "MOV R1, R4\n"
251 "MOV R0, R7\n"
252 "BL sub_FFAB7D4C\n"
253 "LDR R4, =0x67428\n"
254 "ADD R0, R0, #1\n"
255 "AND R0, R0, #1\n"
256 "STR R8, [R4,R0,LSL#2]\n"
257 "B loc_FF9385AC\n"
258 "loc_FF938590:\n"
259 "MOV R1, R4\n"
260 "MOV R0, R7\n"
261 "BL sub_FFAB7D4C\n"
262 "LDR R4, =0x67428\n"
263 "ADD R0, R0, #1\n"
264 "AND R0, R0, #1\n"
265 "STR R5, [R4,R0,LSL#2]\n"
266 "loc_FF9385AC:\n"
267 "LDR R3, =0x67434\n"
268 "LDR R2, =0x674A8\n"
269 "LDR R0, [R3]\n"
270 "LDR R1, [R2]\n"
271 "BL sub_FFAB7D4C\n"
272 "LDR R3, =0x67468\n"
273 "ADD R0, R0, #1\n"
274 "AND R0, R0, #1\n"
275 "LDR R1, =0x674C8\n"
276 "LDR R12, =0x674D4\n"
277 "LDR LR, [R4,R0,LSL#2]\n"
278 "LDR R2, [R3]\n"
279 "LDR R0, [R1]\n"
280 "LDR R3, [R12]\n"
281 "ADD R1, LR, R2\n"
282 "ADD R2, R1, #8\n"
283 "ADD LR, R0, R3\n"
284 "CMP R2, LR\n"
285 "BLS loc_FF938610\n"
286 "ADD R3, R0, R1\n"
287 "RSB R3, LR, R3\n"
288 "LDR R2, =0x67420\n"
289 "ADD R3, R3, #8\n"
290 "STR R3, [R2]\n"
291 "B loc_FF938618\n"
292 "loc_FF938610:\n"
293 "LDR R3, =0x67420\n"
294 "STR R2, [R3]\n"
295 "loc_FF938618:\n"
296 "LDR R3, =0x67468\n"
297 "LDR R0, =0x67480\n"
298 "LDR R2, [R3]\n"
299 "LDR R3, [R0,#4]\n"
300 "ADD R2, R2, #0x18\n"
301 "MOV R1, R2\n"
302 "MOV R2, #0\n"
303 "CMP R2, R3\n"
304 "BHI loc_FF9387A8\n"
305 "BNE loc_FF93864C\n"
306 "LDR R3, [R0]\n"
307 "CMP R1, R3\n"
308 "BHI loc_FF9387A8\n"
309 "loc_FF93864C:\n"
310 "LDR R3, =0x67468\n"
311 "LDR R10, =0x67480\n"
312 "LDR R3, [R3]\n"
313 "LDMIA R10, {R1,R2}\n"
314 "STR R3, [SP]\n"
315 "LDR R0, =0x67434\n"
316 "LDR R12, =0x674A8\n"
317 "SUBS R5, R1, R3\n"
318 "SBC R6, R2, #0\n"
319 "LDR R8, [R12]\n"
320 "MVN R4, #0\n"
321 "MVN R3, #0x17\n"
322 "LDR R7, [R0]\n"
323 "ADDS R5, R5, R3\n"
324 "ADC R6, R6, R4\n"
325 "SUB R0, R7, #1\n"
326 "MOV R1, R8\n"
327 "STMIA R10, {R5,R6}\n"
328 "BL sub_FFAB7D4C\n"
329 "CMP R7, #1\n"
330 "MLA R0, R8, R0, R0\n"
331 "BEQ loc_FF9386EC\n"
332 "SUB R3, R0, #1\n"
333 "MOV R3, R3,LSL#4\n"
334 "ADD R4, R11, #0x10\n"
335 "ADD R5, R11, #0x14\n"
336 "LDR R1, [R5,R3]\n"
337 "LDR R2, [R4,R3]\n"
338 "LDR LR, =0x62773130\n"
339 "ADD R2, R2, R1\n"
340 "MOV R3, R0,LSL#4\n"
341 "ADD R2, R2, #8\n"
342 "ADD R12, R11, #0xC\n"
343 "ADD R1, R11, #8\n"
344 "MOV R0, #0\n"
345 "STR LR, [R1,R3]\n"
346 "STR R0, [R12,R3]\n"
347 "STR R2, [R4,R3]\n"
348 "LDR R2, [SP]\n"
349 "STR R2, [R5,R3]\n"
350 "loc_FF9386EC:\n"
351 "LDR R1, =0x67420\n"
352 "LDR R3, =0x6741C\n"
353 "LDR R2, [R1]\n"
354 "LDR R1, [R3]\n"
355 "ADD R2, R2, #8\n"
356 "CMP R2, R1\n"
357 "STR R2, [R9]\n"
358 "BHI loc_FF938724\n"
359 "LDR LR, =0x67478\n"
360 "LDR R3, [LR]\n"
361 "ADD R3, R2, R3\n"
362 "CMP R1, R3\n"
363 "BHI loc_FF938728\n"
364 "B loc_FF938768\n"
365 "loc_FF938724:\n"
366 "LDR LR, =0x67478\n"
367 "loc_FF938728:\n"
368 "LDR R3, =0x674C8\n"
369 "LDR R2, =0x674D4\n"
370 "LDR R12, [R3]\n"
371 "LDR R0, [R2]\n"
372 "LDR R1, [R9]\n"
373 "LDR R3, [LR]\n"
374 "ADD R2, R1, R3\n"
375 "ADD R1, R12, R0\n"
376 "CMP R2, R1\n"
377 "BLS loc_FF938778\n"
378 "LDR R3, =0x6741C\n"
379 "RSB R2, R1, R2\n"
380 "LDR R1, [R3]\n"
381 "ADD R2, R12, R2\n"
382 "CMP R1, R2\n"
383 "BHI loc_FF938778\n"
384 "loc_FF938768:\n"
385 "MOV R3, #0\n"
386 "STR R3, [R9]\n"
387 "MOV R0, #0x80000003\n"
388 "B loc_FF938828\n"
389 "loc_FF938778:\n"
390 "LDR R3, [LR]\n"
391 "LDR R12, =0x67480\n"
392 "ADD R3, R3, #0x18\n"
393 "LDR R2, [R12,#4]\n"
394 "MOV R0, R3\n"
395 "MOV R1, #0\n"
396 "CMP R1, R2\n"
397 "BHI loc_FF9387A8\n"
398 "BNE loc_FF9387B8\n"
399 "LDR R3, [R12]\n"
400 "CMP R0, R3\n"
401 "BLS loc_FF9387B8\n"
402 "loc_FF9387A8:\n"
403 "MOV R3, #0\n"
404 "STR R3, [R9]\n"
405 "MOV R0, #0x80000005\n"
406 "B loc_FF938828\n"
407 "loc_FF9387B8:\n"
408 "LDR R1, =0x67460\n"
409 "LDR R0, =0x674A8\n"
410 "LDR R3, [R1]\n"
411 "LDR R2, [R0]\n"
412 "ADD R3, R3, R2,LSL#4\n"
413 "ADD R3, R3, R3,LSL#2\n"
414 "LDR R12, =0x67480\n"
415 "MOV R3, R3,LSL#1\n"
416 "ADD R3, R3, #0xA0\n"
417 "LDR R2, [R12,#4]\n"
418 "MOV R0, R3\n"
419 "MOV R1, #0\n"
420 "CMP R1, R2\n"
421 "BHI loc_FF938800\n"
422 "BNE loc_FF938824\n"
423 "LDR R3, [R12]\n"
424 "CMP R0, R3\n"
425 "BLS loc_FF938824\n"
426 "loc_FF938800:\n"
427 "LDR R4, =0x67490\n"
428 "LDR R1, [R4]\n"
429 "CMP R1, #0\n"
430 "BNE loc_FF938824\n"
431
432
433 "MOV R0, #0x3140\n"
434 "ADD R0, R0, #8\n"
435
436 "BL sub_FF953AD8\n"
437 "MOV R3, #1\n"
438 "STR R3, [R4]\n"
439
440
441
442
443
444
445 "loc_FF938824:\n"
446 "MOV R0, #0\n"
447 "loc_FF938828:\n"
448 "ADD SP, SP, #4\n"
449 "LDMFD SP!, {R4-R11,PC}\n"
450 );
451 }
452
453 void __attribute__((naked,noinline)) sub_FF9374C0_my(){
454 asm volatile(
455 "NOP\n"
456 );
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561 }