This source file includes following definitions.
- change_video_tables
- set_quality
- movie_record_task
- sub_FF986044_my
1 #include "conf.h"
2 #include "lolevel.h"
3 #include "platform.h"
4 #include "core.h"
5 #include "dryos31.h"
6
7 void change_video_tables(__attribute__ ((unused))int a, __attribute__ ((unused))int b) {}
8
9
10 void set_quality(int *x){
11 if (conf.video_mode) *x=12-((conf.video_quality-1)*(12+17)/(99-1));
12 }
13
14
15 void __attribute__((naked,noinline)) movie_record_task(){
16 asm volatile(
17 " STMFD SP!, {R2-R10,LR}\n"
18 " LDR R10, =0x5EE\n"
19 " LDR R9, =0x2710\n"
20 " LDR R7, =0xFF98580C\n"
21
22
23
24
25 " LDR R6, =sub_FF986044_my\n"
26
27 " LDR R4, =0x7898\n"
28 " MOV R8, #1\n"
29 " MOV R5, #0\n"
30 "loc_FF986670:\n"
31 " LDR R0, [R4,#0x24]\n"
32 " MOV R2, #0\n"
33 " ADD R1, SP, #0x4\n"
34 " BL sub_FF83AE20\n"
35 " LDR R0, [R4,#0x2C]\n"
36 " CMP R0, #0\n"
37 " LDRNE R0, [R4,#0xC]\n"
38 " CMPNE R0, #2\n"
39 " LDRNE R0, [R4,#0x44]\n"
40 " CMPNE R0, #6\n"
41 " BNE loc_FF986794\n"
42 " LDR R0, [SP,#0x4]\n"
43 " LDR R1, [R0]\n"
44 " SUB R1, R1, #2\n"
45 " CMP R1, #0xA\n"
46 " ADDLS PC, PC, R1,LSL#2\n"
47 " B loc_FF986794\n"
48 "loc_FF9866B4:\n"
49 " B loc_FF986744\n"
50 "loc_FF9866B8:\n"
51 " B loc_FF986768\n"
52 "loc_FF9866BC:\n"
53 " B loc_FF986778\n"
54 "loc_FF9866C0:\n"
55 " B loc_FF986780\n"
56 "loc_FF9866C4:\n"
57 " B loc_FF98674C\n"
58 "loc_FF9866C8:\n"
59 " B loc_FF986788\n"
60 "loc_FF9866CC:\n"
61 " B loc_FF986758\n"
62 "loc_FF9866D0:\n"
63 " B loc_FF986794\n"
64 "loc_FF9866D4:\n"
65 " B loc_FF986790\n"
66 "loc_FF9866D8:\n"
67 " B loc_FF986710\n"
68 "loc_FF9866DC:\n"
69 " B loc_FF9866E0\n"
70 "loc_FF9866E0:\n"
71 " STR R5, [R4,#0x40]\n"
72 " STR R5, [R4,#0x30]\n"
73 " STR R5, [R4,#0x34]\n"
74 " STRH R5, [R4,#6]\n"
75 " STR R6, [R4,#0xCC]\n"
76 " STR R7, [R4,#0xB4]\n"
77 " LDR R0, [R4,#0xC]\n"
78 " ADD R0, R0, #1\n"
79 " STR R0, [R4,#0xC]\n"
80 " MOV R0, #6\n"
81 " STR R0, [R4,#0x44]\n"
82 " B loc_FF986730\n"
83 "loc_FF986710:\n"
84 " STR R5, [R4,#0x40]\n"
85 " STR R5, [R4,#0x30]\n"
86 " STR R6, [R4,#0xCC]\n"
87 " STR R7, [R4,#0xB4]\n"
88 " LDR R0, [R4,#0xC]\n"
89 " ADD R0, R0, #1\n"
90 " STR R0, [R4,#0xC]\n"
91 " STR R8, [R4,#0x44]\n"
92 "loc_FF986730:\n"
93 " LDR R2, =0xFF984FE0\n"
94 " LDR R1, =0xB0300\n"
95 " LDR R0, =0xFF9850F4\n"
96 " BL sub_FF853088\n"
97 " B loc_FF986794\n"
98 "loc_FF986744:\n"
99
100 " BL sub_FF985D20\n"
101 " B loc_FF986794\n"
102 "loc_FF98674C:\n"
103 " LDR R1, [R4,#0xCC]\n"
104 " BLX R1\n"
105 " B loc_FF986794\n"
106 "loc_FF986758:\n"
107 " LDR R1, [R0,#0x18]\n"
108 " LDR R0, [R0,#4]\n"
109 " BL sub_FFAD9B40\n"
110 " B loc_FF986794\n"
111 "loc_FF986768:\n"
112 " LDR R0, [R4,#0x44]\n"
113 " CMP R0, #5\n"
114 " STRNE R8, [R4,#0x34]\n"
115 " B loc_FF986794\n"
116 "loc_FF986778:\n"
117 " BL sub_FF9854B8\n"
118 " B loc_FF986794\n"
119 "loc_FF986780:\n"
120 " BL sub_FF985140\n"
121 " B loc_FF986794\n"
122 "loc_FF986788:\n"
123 " BL sub_FF984F6C\n"
124 " B loc_FF986794\n"
125 "loc_FF986790:\n"
126 " BL sub_FF986B90\n"
127 "loc_FF986794:\n"
128 " LDR R1, [SP,#0x4]\n"
129 " LDR R3, =0xFF984C34\n"
130
131 " STR R5, [R1]\n"
132 " STR R3, [SP]\n"
133 " LDR R0, [R4,#0x28]\n"
134 " MOV R2, R9\n"
135 " BL sub_FF83B774\n"
136 " B loc_FF986670\n"
137
138 );
139 }
140
141 void __attribute__((naked,noinline)) sub_FF986044_my(){
142 asm volatile(
143 " STMFD SP!, {R4-R11,LR}\n"
144 " SUB SP, SP, #0x64\n"
145 " MOV R8, #0\n"
146 " LDR R7, =0x7898\n"
147 " STR R8, [SP,#0x54]\n"
148 " STR R8, [SP,#0x4C]\n"
149 " STR R8, [R7,#0xB8]\n"
150 " STR R8, [R7,#0xBC]\n"
151 " STR R8, [R7,#0xC0]\n"
152 " MOV R4, R0\n"
153 " STR R8, [R7,#0xC4]\n"
154 " LDR R0, [R7,#0x44]\n"
155 " MOV R9, #0\n"
156 " CMP R0, #3\n"
157 " MOVEQ R0, #4\n"
158 " STREQ R0, [R7,#0x44]\n"
159 " LDR R0, [R7,#0xB4]\n"
160 " MOV R6, #0\n"
161 " MOV R5, #1\n"
162 " BLX R0\n"
163 " LDR R0, [R7,#0x44]\n"
164 " CMP R0, #6\n"
165 " BEQ loc_FF9860B4\n"
166
167 " LDR R1, [R7,#0xC]\n"
168 " CMP R1, #2\n"
169 " BNE loc_FF9860DC\n"
170 " CMP R0, #5\n"
171 " BEQ loc_FF9860EC\n"
172 "loc_FF9860B4:\n"
173 " MOV R6, #1\n"
174 " ADD R3, SP, #0x34\n"
175 " LDR R2, =0xFF985F24\n"
176 " LDR R1, =0xFF985F84\n"
177 " LDR R0, =0xFF985FE4\n"
178 " BL sub_FF853E48\n"
179 " LDR R0, [R7,#0x44]\n"
180 " CMP R0, #4\n"
181 " MOVNE R5, #0\n"
182 " B loc_FF9860FC\n"
183 "loc_FF9860DC:\n"
184 " CMP R0, #4\n"
185 " BEQ loc_FF9860FC\n"
186 " CMP R1, #2\n"
187 " BNE loc_FF9860F4\n"
188 "loc_FF9860EC:\n"
189 " MOV R0, #0\n"
190 " BL sub_FF853E54\n"
191 "loc_FF9860F4:\n"
192 " ADD SP, SP, #0x64\n"
193 " LDMFD SP!, {R4-R11,PC}\n"
194 "loc_FF9860FC:\n"
195 " LDRH R0, [R7,#6]\n"
196 " CMP R0, #1\n"
197 " LDREQ R1, =0x807\n"
198 " LDREQ R0, =0xFF984C34\n"
199 " BLEQ sub_FF81EB78\n"
200 " LDRH R0, [R7,#6]\n"
201 " CMP R0, #3\n"
202 " BNE loc_FF986130\n"
203 " LDR R0, [R7,#0x6C]\n"
204 " LDR R1, [R7,#0xC8]\n"
205 " BL sub_FFB89AB8\n"
206 " CMP R1, #0\n"
207 " MOVNE R5, #0\n"
208 "loc_FF986130:\n"
209 " LDR R0, [R7,#0x44]\n"
210 " CMP R0, #6\n"
211 " CMPNE R0, #1\n"
212 " CMPNE R0, #3\n"
213 " BNE loc_FF986174\n"
214 " CMP R6, #1\n"
215 " CMPEQ R5, #0\n"
216 " BNE loc_FF986174\n"
217 " BL sub_FF853E4C\n"
218 " LDR R0, [R7,#0x18]\n"
219 " MOV R1, #0x3E8\n"
220 " BL sub_FF83B23C\n"
221 " CMP R0, #9\n"
222 " BNE loc_FF986584\n"
223 " MOV R0, #0x90000\n"
224 " BL sub_FF89C95C\n"
225 " B loc_FF9860F4\n"
226 "loc_FF986174:\n"
227 " CMP R5, #1\n"
228 " MOV R10, #1\n"
229 " BNE loc_FF98619C\n"
230 " ADD R3, SP, #0x4C\n"
231 " ADD R2, SP, #0x50\n"
232 " ADD R1, SP, #0x54\n"
233 " ADD R0, SP, #0x58\n"
234 " BL sub_FFAD9C68\n"
235 " MOVS R9, R0\n"
236 " BNE loc_FF9861B8\n"
237 "loc_FF98619C:\n"
238 " LDR R0, [R7,#0x34]\n"
239 " CMP R0, #1\n"
240 " BNE loc_FF9862F4\n"
241 " LDR R0, [R7,#0x6C]\n"
242 " LDR R1, [R7,#0x48]\n"
243 " CMP R0, R1\n"
244 " BCC loc_FF9862F4\n"
245 "loc_FF9861B8:\n"
246 " MOV R0, R9\n"
247 " BL sub_FF9859AC\n"
248 " LDR R0, [R7,#0xC]\n"
249 " CMP R0, #2\n"
250
251
252
253
254 " BNE loc_FF986228\n"
255 " MOV R1, #0\n"
256 " LDR R0, =0xFF985F18\n"
257 " BL sub_FFA8E1B0\n"
258 " LDR R2, [R7,#0x64]\n"
259 " ADD R3, SP, #0x5C\n"
260 " STRD R2, [SP,#0x28]\n"
261 " MOV R2, #0x18\n"
262 " ADD R1, SP, #0x34\n"
263 " ADD R0, SP, #0x10\n"
264 " BL sub_FFB87458\n"
265 " LDR R1, [R7,#0x84]\n"
266 " LDR R2, [R7,#0x88]\n"
267
268 " MVN R3, #01\n"
269 " ADD R0, SP, #0x60\n"
270 " STMEA SP, {R0-R3}\n"
271 " LDR R0, =0xB0348\n"
272 " MOV R3, #0\n"
273 " MOV R2, #0\n"
274 " MOV R1, #0x40\n"
275 " BL sub_FFA8E108\n"
276 " B loc_FF98627C\n"
277 "loc_FF986220:\n"
278 " MOV R1, #1\n"
279 " B loc_FF986508\n"
280 "loc_FF986228:\n"
281 " BL loc_FF986C60\n"
282 " LDR R2, [R7,#0x64]\n"
283 " ADD R3, SP, #0x5C\n"
284
285 " MVN R1, #01\n"
286 " MOV R0, #0\n"
287 " ADD R5, SP, #0x1C\n"
288 " STMIA R5, {R0-R3}\n"
289 " LDR R3, [R4,#0x1C]\n"
290 " LDR R1, [R7,#0x84]\n"
291 " LDR R2, [R7,#0x88]\n"
292 " ADD R4, SP, #0xC\n"
293 " ADD R0, SP, #0x60\n"
294 " STMIA R4, {R0-R3}\n"
295 " MOV R3, #0\n"
296 " MOV R1, #0x40\n"
297 " MOV R2, #0\n"
298 " STMEA SP, {R1-R3}\n"
299 " LDR R3, =0xB0348\n"
300 " MOV R1, #0\n"
301 " MOV R0, #0\n"
302 " BL sub_FFA8CBB8\n"
303
304 "loc_FF98627C:\n"
305 " LDR R0, [R7,#0x18]\n"
306 " LDR R1, [R7,#0x60]\n"
307 " BL sub_FF83B23C\n"
308 " CMP R0, #9\n"
309 " BEQ loc_FF986220\n"
310 " LDR R0, [SP,#0x5C]\n"
311 " CMP R0, #0\n"
312 " BEQ loc_FF9862A4\n"
313
314 "loc_FF98629C:\n"
315 " MOV R1, #1\n"
316 " B loc_FF986520\n"
317
318 "loc_FF9862A4:\n"
319 " LDR R0, [R7,#0xC]\n"
320 " MOV R4, #5\n"
321 " CMP R0, #2\n"
322 " MOV R0, #1\n"
323 " BNE loc_FF9862E0\n"
324 " BL sub_FFA8E170\n"
325 " BL sub_FFA8E198\n"
326 " MOV R0, #0\n"
327 " BL sub_FF853E54\n"
328 " BL sub_FF853E64\n"
329 " STR R4, [R7,#0x44]\n"
330 " BL loc_FF986C60\n"
331 " BL sub_FF853EC0\n"
332 " STR R10, [R7,#0x44]\n"
333 " B loc_FF9862EC\n"
334 "loc_FF9862E0:\n"
335 " BL sub_FFA8CC6C\n"
336 " BL sub_FFA8CCCC\n"
337 " STR R4, [R7,#0x44]\n"
338 "loc_FF9862EC:\n"
339 " STR R8, [R7,#0x34]\n"
340 " B loc_FF9860F4\n"
341 "loc_FF9862F4:\n"
342 " CMP R5, #1\n"
343 " BNE loc_FF98657C\n"
344 " STR R10, [R7,#0x38]\n"
345 " LDR R0, [R7,#0x6C]\n"
346 " LDR R11, [R4,#0xC]\n"
347 " CMP R0, #0\n"
348 " LDRNE R9, [SP,#0x58]\n"
349 " LDRNE R10, [SP,#0x54]\n"
350 " BNE loc_FF986440\n"
351 " LDR R0, [R7,#0xC]\n"
352 " CMP R0, #2\n"
353 " BNE loc_FF986398\n"
354 " LDR R0, =0xFF985F18\n"
355 " MOV R1, #0\n"
356 " BL sub_FFA8E1B0\n"
357 " LDR R2, [R7,#0x64]\n"
358 " ADD R3, SP, #0x5C\n"
359 " STRD R2, [SP,#0x28]\n"
360 " MOV R2, #0x18\n"
361 " ADD R1, SP, #0x34\n"
362 " ADD R0, SP, #0x10\n"
363 " BL sub_FFB87458\n"
364 " LDR R1, [R7,#0x84]\n"
365 " LDR R2, [R7,#0x88]\n"
366 " MVN R3, #0\n"
367 " ADD R0, SP, #0x60\n"
368 " STMEA SP, {R0-R3}\n"
369 " LDR R0, [SP,#0x58]\n"
370 " LDR R1, [SP,#0x54]\n"
371 " LDR R2, [SP,#0x50]\n"
372 " LDR R3, [SP,#0x4C]\n"
373 " BL sub_FFA8E10C\n"
374 " LDR R0, [R7,#0x18]\n"
375 " LDR R1, [R7,#0x60]\n"
376 " BL sub_FF83B23C\n"
377 " CMP R0, #9\n"
378 " BEQ loc_FF986220\n"
379 " LDR R0, =0xFF9858E8\n"
380 " MOV R1, #0\n"
381 " BL sub_FFA8E1B0\n"
382 " B loc_FF986400\n"
383 "loc_FF986398:\n"
384 " LDR R0, [R4,#0x20]\n"
385 " LDR R2, [R7,#0x64]\n"
386 " ADD R3, SP, #0x5C\n"
387 " MVN R1, #0\n"
388 " ADD R9, SP, #0x1C\n"
389 " STMIA R9, {R0-R3}\n"
390 " LDR R3, [R4,#0x1C]\n"
391 " LDR R1, [R7,#0x84]\n"
392 " LDR R2, [R7,#0x88]\n"
393 " ADD R0, SP, #0x60\n"
394 " ADD R9, SP, #0xC\n"
395 " STMIA R9, {R0-R3}\n"
396 " LDR R1, [SP,#0x50]\n"
397 " LDR R2, [SP,#0x54]\n"
398 " LDR R3, [SP,#0x4C]\n"
399 " STMFA SP, {R1,R3}\n"
400 " STR R2, [SP]\n"
401 " LDMIB R4, {R0,R1}\n"
402 " LDR R3, [SP,#0x58]\n"
403 " MOV R2, R11\n"
404 " BL sub_FFA8CBB8\n"
405 " LDR R0, [R7,#0x18]\n"
406 " LDR R1, [R7,#0x60]\n"
407 " BL sub_FF83B23C\n"
408 " CMP R0, #9\n"
409 " BEQ loc_FF986220\n"
410 "loc_FF986400:\n"
411 " LDR R0, [SP,#0x5C]\n"
412 " CMP R0, #0\n"
413 " BNE loc_FF98629C\n"
414 " LDR R0, [R7,#0xC]\n"
415 " CMP R0, #2\n"
416 " MOV R0, #1\n"
417 " BNE loc_FF986424\n"
418 " BL sub_FFA8E170\n"
419 " B loc_FF986428\n"
420 "loc_FF986424:\n"
421 " BL sub_FFA8CC6C\n"
422 "loc_FF986428:\n"
423 " STR R8, [R7,#0xC4]\n"
424 " LDR R0, [SP,#0x60]\n"
425 " LDR R1, [SP,#0x58]\n"
426 " ADD R9, R1, R0\n"
427 " LDR R1, [SP,#0x54]\n"
428 " SUB R10, R1, R0\n"
429 "loc_FF986440:\n"
430 " LDR R0, [R7,#0xC]\n"
431 " LDR R2, [R7,#0x64]\n"
432 " CMP R0, #2\n"
433 " ADD R3, SP, #0x5C\n"
434 " BNE loc_FF986498\n"
435 " STRD R2, [SP,#0x28]\n"
436 " MOV R2, #0x18\n"
437 " ADD R1, SP, #0x34\n"
438 " ADD R0, SP, #0x10\n"
439 " BL sub_FFB87458\n"
440 " LDR R1, [R7,#0x84]\n"
441 " LDR R2, [R7,#0x88]\n"
442 " LDR R3, [R7,#0x68]\n"
443 " ADD R0, SP, #0x60\n"
444 " STMEA SP, {R0-R3}\n"
445 " LDR R2, [SP,#0x50]\n"
446 " LDR R3, [SP,#0x4C]\n"
447 " MOV R1, R10\n"
448 " MOV R0, R9\n"
449 " BL sub_FFA8E108\n"
450 " BL sub_FF853E4C\n"
451 " B loc_FF9864F0\n"
452 "loc_FF986498:\n"
453 " LDR R1, [R7,#0x68]\n"
454 " LDR R0, [R4,#0x20]\n"
455 " STR R1, [SP,#0x20]\n"
456 " STR R0, [SP,#0x1C]\n"
457 " STR R2, [SP,#0x24]\n"
458 " STR R3, [SP,#0x28]\n"
459 " LDR R3, [R4,#0x1C]\n"
460 " LDR R1, [R7,#0x84]\n"
461 " LDR R2, [R7,#0x88]\n"
462 " ADD R0, SP, #0x60\n"
463 " STR R2, [SP,#0x14]\n"
464 " LDR R2, [SP,#0x50]\n"
465 " STR R1, [SP,#0x10]\n"
466 " STR R3, [SP,#0x18]\n"
467 " LDR R3, [SP,#0x4C]\n"
468 " STR R0, [SP,#0xC]\n"
469 " STMFA SP, {R2,R3}\n"
470 " STR R10, [SP]\n"
471 " LDMIB R4, {R0,R1}\n"
472 " MOV R3, R9\n"
473 " MOV R2, R11\n"
474 " BL sub_FFA8CBB8\n"
475 "loc_FF9864F0:\n"
476 " LDR R0, [R7,#0x18]\n"
477 " LDR R1, [R7,#0x60]\n"
478 " BL sub_FF83B23C\n"
479 " CMP R0, #9\n"
480 " BNE loc_FF986510\n"
481 " MOV R1, #0\n"
482 "loc_FF986508:\n"
483 " MOV R0, #0x90000\n"
484 " B loc_FF986524\n"
485 "loc_FF986510:\n"
486 " LDR R0, [SP,#0x5C]\n"
487 " CMP R0, #0\n"
488 " BEQ loc_FF98652C\n"
489 " MOV R1, #0\n"
490 "loc_FF986520:\n"
491 " MOV R0, #0xA0000\n"
492 "loc_FF986524:\n"
493 " BL sub_FF985930\n"
494 " B loc_FF9860F4\n"
495 "loc_FF98652C:\n"
496 " LDR R0, [R7,#0xC]\n"
497 " CMP R0, #2\n"
498 " MOV R0, #0\n"
499 " BNE loc_FF986544\n"
500 " BL sub_FFA8E170\n"
501 " B loc_FF986548\n"
502 "loc_FF986544:\n"
503 " BL sub_FFA8CC6C\n"
504
505
506
507 "loc_FF986548:\n"
508 " LDR R0, [SP,#0x58]\n"
509 " LDR R1, [SP,#0x60]\n"
510 " BL sub_FFAD9EA0\n"
511 " LDR R0, [R7,#0x68]\n"
512 " LDR R3, =0x7920\n"
513 " ADD R1, R0, #1\n"
514 " STR R1, [R7,#0x68]\n"
515 " STR R3, [SP]\n"
516 " LDR R0, [R7,#0x64]\n"
517 " SUB R3, R3, #4\n"
518 " AND R2, R0, #0xFF\n"
519 " LDR R0, [SP,#0x60]\n"
520 " BL sub_FFAD7A98\n"
521
522 "LDR R0, =0x7920-4\n"
523 "BL set_quality\n"
524
525 "loc_FF98657C:\n"
526 " CMP R6, #1\n"
527 " BNE loc_FF986590\n"
528
529 "loc_FF986584:\n"
530 " BL sub_FF853E50\n"
531 " MOV R0, #1\n"
532 " BL sub_FF853E54\n"
533
534 "loc_FF986590:\n"
535 " CMP R5, #1\n"
536 " LDRNEH R0, [R7,#6]\n"
537 " CMPNE R0, #3\n"
538 " BNE loc_FF9860F4\n"
539 " LDR R0, [R7,#0x6C]\n"
540 " ADD R0, R0, #1\n"
541 " STR R0, [R7,#0x6C]\n"
542 " LDRH R1, [R7,#6]\n"
543 " CMP R1, #3\n"
544 " LDRNE R1, [R7,#0x54]\n"
545 " LDREQ R1, =0x3E9\n"
546 " MUL R0, R1, R0\n"
547 " LDREQ R1, =0x1770\n"
548 " LDRNE R1, [R7,#0x50]\n"
549 " BL sub_FFB89AB8\n"
550 " MOV R4, R0\n"
551 " BL sub_FFADA554\n"
552 " LDR R0, [R7,#0x8C]\n"
553 " CMP R0, R4\n"
554 " BNE loc_FF9865EC\n"
555 " LDR R0, [R7,#0x3C]\n"
556 " CMP R0, #1\n"
557 " BNE loc_FF986600\n"
558 "loc_FF9865EC:\n"
559 " LDR R1, [R7,#0x98]\n"
560 " MOV R0, R4\n"
561 " BLX R1\n"
562 " STR R4, [R7,#0x8C]\n"
563 " STR R8, [R7,#0x3C]\n"
564 "loc_FF986600:\n"
565 " STR R8, [R7,#0x38]\n"
566 " B loc_FF9860F4\n"
567
568
569 "loc_FF986C60:\n"
570 "LDR R0, =0xB0330\n"
571 "LDR R0, [R0,#8]\n"
572 "CMP R0, #0\n"
573 "BEQ sub_FF984F6C\n"
574 "BNE sub_FF866E24\n"
575
576
577
578 );
579 }
580
581
582
583
584
585
586
587
588
589
590
591