This source file includes following definitions.
- change_video_tables
- set_quality
- movie_record_task
- sub_FF878924_my
1 #include "conf.h"
2
3 void change_video_tables(__attribute__ ((unused))int a, __attribute__ ((unused))int b) {}
4
5
6 void set_quality(int *x){
7 if (conf.video_mode) *x=12-((conf.video_quality-1)*(12+17)/(99-1));
8 }
9
10 void __attribute__((naked,noinline)) movie_record_task(){
11
12 asm volatile(
13 "STMFD SP!, {R2-R8,LR}\n"
14 "LDR R8, =0x425\n"
15 "LDR R7, =0x2710\n"
16 "LDR R4, =0x2BF8\n"
17 "MOV R6, #0\n"
18 "MOV R5, #1\n"
19 "loc_FF87904C:\n"
20 "LDR R0, [R4,#0x18]\n"
21 "MOV R2, #0\n"
22 "ADD R1, SP, #4\n"
23 "BL sub_FF838318\n"
24 "LDR R2, =0xFF877608\n"
25 "LDR R0, [R4,#0xB4]\n"
26 "MOV R3, R8\n"
27 "MOV R1, R7\n"
28 "BL sub_FF838C14\n"
29 "LDR R0, [R4,#0x20]\n"
30 "CMP R0, #0\n"
31 "BNE loc_FF87914C\n"
32 "LDR R0, [SP,#4]\n"
33 "LDR R1, [R0]\n"
34 "SUB R1, R1, #2\n"
35 "CMP R1, #0xB\n"
36 "ADDLS PC, PC, R1,LSL#2\n"
37 "B loc_FF87914C\n"
38 "loc_FF879094: B loc_FF8790F4\n"
39 "loc_FF879098: B loc_FF87910C\n"
40 "loc_FF87909C: B loc_FF87911C\n"
41 "loc_FF8790A0: B loc_FF879124\n"
42 "loc_FF8790A4: B loc_FF8790FC\n"
43 "loc_FF8790A8: B loc_FF87912C\n"
44 "loc_FF8790AC: B loc_FF879104\n"
45 "loc_FF8790B0: B loc_FF87914C\n"
46 "loc_FF8790B4: B loc_FF87913C\n"
47 "loc_FF8790B8: B loc_FF879144\n"
48 "loc_FF8790BC: B loc_FF879134\n"
49 "loc_FF8790C0: B loc_FF8790C4\n"
50 "loc_FF8790C4:\n"
51 "LDR R0, =0xFF878CE0\n"
52 "STR R6, [R4,#0x34]\n"
53 "STR R0, [R4,#0x9C]\n"
54 "LDR R0, =0xFF877B20\n"
55 "LDR R2, =0xFF877B24\n"
56 "STR R0, [R4,#0xA0]\n"
57 "LDR R0, =0xFF877C34\n"
58 "LDR R1, =0x385FC\n"
59 "STR R6, [R4,#0x24]\n"
60 "BL sub_FF84EE4C\n"
61 "STR R5, [R4,#0x38]\n"
62 "B loc_FF87914C\n"
63
64 "loc_FF8790F4:\n"
65
66 "BL sub_FF878E08\n"
67 "B loc_FF87914C\n"
68 "loc_FF8790FC:\n"
69
70 "BL sub_FF878924_my\n"
71 "B loc_FF87914C\n"
72 "loc_FF879104:\n"
73 "BL sub_FF87937C\n"
74 "B loc_FF87914C\n"
75 "loc_FF87910C:\n"
76 "LDR R0, [R4,#0x38]\n"
77 "CMP R0, #5\n"
78 "STRNE R5, [R4,#0x28]\n"
79 "B loc_FF87914C\n"
80 "loc_FF87911C:\n"
81 "BL sub_FF878624\n"
82 "B loc_FF87914C\n"
83 "loc_FF879124:\n"
84 "BL sub_FF8782D4\n"
85 "B loc_FF87914C\n"
86 "loc_FF87912C:\n"
87 "BL sub_FF877AAC\n"
88 "B loc_FF87914C\n"
89 "loc_FF879134:\n"
90 "BL sub_FF8792E4\n"
91 "B loc_FF87914C\n"
92 "loc_FF87913C:\n"
93 "BL sub_FF878198\n"
94 "B loc_FF87914C\n"
95 "loc_FF879144:\n"
96 "BL sub_FF87807C\n"
97 "STR R5, [R4,#0xDC]\n"
98 "loc_FF87914C:\n"
99 "LDR R1, [SP,#4]\n"
100 "MOV R3, #0x460\n"
101 "STR R6, [R1]\n"
102 "STR R3, [SP]\n"
103 "LDR R0, [R4,#0x1C]\n"
104 "LDR R3, =0xFF877608\n"
105 "MOV R2, R7\n"
106 "BL sub_FF838C6C\n"
107 "LDR R0, [R4,#0xB4]\n"
108 "BL sub_FF838804\n"
109 "B loc_FF87904C\n"
110 );
111 }
112
113
114
115 void __attribute__((naked,noinline)) sub_FF878924_my(){
116 asm volatile(
117 "STMFD SP!, {R4-R8,LR}\n"
118 "SUB SP, SP, #0x48\n"
119 "MOV R7, #0\n"
120 "LDR R6, =0x2BF8\n"
121 "MOV R4, R0\n"
122 "STR R7, [SP,#0x38]\n"
123 "STR R7, [SP,#0x30]\n"
124 "LDR R0, [R6,#0x38]\n"
125 "CMP R0, #3\n"
126 "MOVEQ R0, #4\n"
127 "STREQ R0, [R6,#0x38]\n"
128 "LDR R0, [R6,#0x9C]\n"
129 "BLX R0\n"
130 "LDR R0, [R6,#0x38]\n"
131 "CMP R0, #4\n"
132 "BNE loc_FF878A48\n"
133 "ADD R3, SP, #0x30\n"
134 "ADD R2, SP, #0x34\n"
135 "ADD R1, SP, #0x38\n"
136 "ADD R0, SP, #0x3C\n"
137 "BL sub_FF95BAC0\n"
138 "CMP R0, #0\n"
139 "MOV R5, #1\n"
140 "BNE loc_FF8789A0\n"
141 "LDR R1, [R6,#0x28]\n"
142 "CMP R1, #1\n"
143 "BNE loc_FF878A50\n"
144 "LDR R1, [R6,#0x4C]\n"
145 "LDR R2, [R6,#0x3C]\n"
146 "CMP R1, R2\n"
147 "BCC loc_FF878A50\n"
148 "loc_FF8789A0:\n"
149 "BL sub_FF877C74\n"
150 "BL sub_FF8792D0\n"
151 "LDR R0, [R4,#0x1C]\n"
152 "ADD R4, SP, #0x18\n"
153 "ADD R3, SP, #0x40\n"
154
155 "MVN R2, #1\n"
156 "MOV R1, #0\n"
157 "STMIA R4, {R0-R3}\n"
158 "LDR R2, [R6,#0x64]\n"
159 "LDR R3, [R6,#0x68]\n"
160 "ADD R1, SP, #0x44\n"
161 "ADD R4, SP, #8\n"
162 "MOV R0, #0\n"
163 "STMIA R4, {R0-R3}\n"
164 "MOV R3, #0\n"
165 "MOV R2, #0x40\n"
166 "STRD R2, [SP]\n"
167 "LDR R3, =0x38668\n"
168 "MOV R2, #0\n"
169 "MOV R1, #0\n"
170 "BL sub_FF9188B8\n"
171 "LDR R0, [R6,#0x10]\n"
172 "MOV R1, #0x3E8\n"
173 "BL sub_FF838734\n"
174 "CMP R0, #9\n"
175 "BNE loc_FF878A18\n"
176 "loc_FF878A08:\n"
177 "BL sub_FF95BF94\n"
178 "MOV R0, #1\n"
179 "STR R5, [R6,#0x38]\n"
180 "B loc_FF878B78\n"
181 "loc_FF878A18:\n"
182 "LDR R0, [SP,#0x40]\n"
183 "CMP R0, #0\n"
184 "BEQ loc_FF878A34\n"
185 "loc_FF878A24:\n"
186 "BL sub_FF95BF94\n"
187 "MOV R0, #1\n"
188 "STR R5, [R6,#0x38]\n"
189 "B loc_FF878BA4\n"
190 "loc_FF878A34:\n"
191 "MOV R0, #1\n"
192 "BL sub_FF918960\n"
193 "BL sub_FF91899C\n"
194 "MOV R0, #5\n"
195 "STR R0, [R6,#0x38]\n"
196 "loc_FF878A48:\n"
197 "ADD SP, SP, #0x48\n"
198 "LDMFD SP!, {R4-R8,PC}\n"
199 "loc_FF878A50:\n"
200 "LDR R12, [SP,#0x38]\n"
201 "CMP R12, #0\n"
202 "BEQ loc_FF878C88\n"
203 "STR R5, [R6,#0x2C]\n"
204 "LDR R0, [R6,#0x4C]\n"
205 "LDR R8, [R4,#0xC]\n"
206 "CMP R0, #0\n"
207 "LDRNE LR, [SP,#0x3C]\n"
208 "BNE loc_FF878AFC\n"
209 "LDR R0, [R4,#0x1C]\n"
210 "LDR R1, [R4,#0x20]\n"
211 "ADD R3, SP, #0x40\n"
212
213 "MVN R2, #0\n"
214 "ADD LR, SP, #0x18\n"
215 "STMIA LR, {R0-R3}\n"
216 "LDR R0, [SP,#0x30]\n"
217 "LDR R2, [R6,#0x64]\n"
218 "LDR R3, [R6,#0x68]\n"
219 "ADD R1, SP, #0x44\n"
220 "ADD LR, SP, #8\n"
221 "STMIA LR, {R0-R3}\n"
222 "LDR R3, [SP,#0x34]\n"
223 "STR R12, [SP]\n"
224 "STR R3, [SP,#4]\n"
225 "LDMIB R4, {R0,R1}\n"
226 "LDR R3, [SP,#0x3C]\n"
227 "MOV R2, R8\n"
228 "BL sub_FF9188B8\n"
229 "LDR R0, [R6,#0x10]\n"
230 "MOV R1, #0x3E8\n"
231 "BL sub_FF838734\n"
232 "CMP R0, #9\n"
233 "BEQ loc_FF878A08\n"
234 "LDR R0, [SP,#0x40]\n"
235 "CMP R0, #0\n"
236 "BNE loc_FF878A24\n"
237 "MOV R0, #1\n"
238 "BL sub_FF918960\n"
239 "LDR R0, [SP,#0x44]\n"
240 "LDR R1, [SP,#0x3C]\n"
241 "ADD LR, R1, R0\n"
242 "LDR R1, [SP,#0x38]\n"
243 "SUB R12, R1, R0\n"
244 "loc_FF878AFC:\n"
245 "LDR R2, [R6,#0x48]\n"
246 "LDR R0, [R4,#0x1C]\n"
247 "LDR R1, [R4,#0x20]\n"
248 "ADD R3, SP, #0x40\n"
249 "STR R1, [SP,#0x1C]\n"
250 "STR R0, [SP,#0x18]\n"
251 "STR R3, [SP,#0x24]\n"
252 "STR R2, [SP,#0x20]\n"
253 "LDR R2, [R6,#0x64]\n"
254 "LDR R3, [R6,#0x68]\n"
255 "ADD R1, SP, #0x44\n"
256 "STR R1, [SP,#0xC]\n"
257 "STR R3, [SP,#0x14]\n"
258 "LDR R3, [SP,#0x34]\n"
259 "LDR R0, [SP,#0x30]\n"
260 "STR R2, [SP,#0x10]\n"
261 "STR R3, [SP,#0x4]\n"
262 "STR R12, [SP]\n"
263 "STR R0, [SP,#0x8]\n"
264 "LDMIB R4, {R0,R1}\n"
265 "MOV R3, LR\n"
266 "MOV R2, R8\n"
267 "BL sub_FF9188B8\n"
268 "LDR R0, [R6,#0x10]\n"
269 "MOV R1, #0x3E8\n"
270 "BL sub_FF838734\n"
271 "CMP R0, #9\n"
272 "BNE loc_FF878B8C\n"
273 "BL sub_FF95BF94\n"
274 "MOV R0, #0\n"
275 "STR R5, [R6,#0x38]\n"
276 "loc_FF878B78:\n"
277 "BL sub_FF918960\n"
278 "MOV R0, #0xC\n"
279 "BL sub_FF889D1C\n"
280 "MOV R0, #0x90000\n"
281 "B loc_FF878BB4\n"
282 "loc_FF878B8C:\n"
283 "LDR R0, [SP,#0x40]\n"
284 "CMP R0, #0\n"
285 "BEQ loc_FF878BC8\n"
286 "BL sub_FF95BF94\n"
287 "MOV R0, #0\n"
288 "STR R5, [R6,#0x38]\n"
289 "loc_FF878BA4:\n"
290 "BL sub_FF918960\n"
291 "MOV R0, #0xC\n"
292 "BL sub_FF889D1C\n"
293 "MOV R0, #0xA0000\n"
294 "loc_FF878BB4:\n"
295 "BL sub_FF897148\n"
296 "LDR R1, [R6,#0x8C]!\n"
297 "LDR R0, [R6,#0xC]\n"
298 "BLX R1\n"
299 "B loc_FF878A48\n"
300 "loc_FF878BC8:\n"
301 "MOV R0, #0\n"
302 "BL sub_FF918960\n"
303 "LDR R0, [R6,#0xDC]\n"
304 "CMP R0, #1\n"
305 "BNE loc_FF878C58\n"
306 "LDR R0, [R6,#0x48]\n"
307 "MOV R1, #0xF\n"
308 "BL sub_FFB38310\n"
309 "MOVS R4, R1\n"
310 "STREQ R7, [R6,#0xDC]\n"
311 "BEQ loc_FF878C58\n"
312 "LDR R5, [SP,#0x3C]\n"
313 "MOV R2, #4\n"
314 "ADD R0, SP, #0x2C\n"
315 "ADD R1, R5, #4\n"
316 "BL sub_FFB36624\n"
317 "LDR R0, [SP,#0x2C]\n"
318 "MOV R1, R0,LSR#24\n"
319 "AND R2, R0, #0xFF0000\n"
320 "ORR R1, R1, R2,LSR#8\n"
321 "AND R2, R0, #0xFF00\n"
322 "ORR R1, R1, R2,LSL#8\n"
323 "ORR R0, R1, R0,LSL#24\n"
324 "BIC R0, R0, #0x1E000\n"
325 "ORR R0, R0, R4,LSL#13\n"
326 "MOV R1, R0,LSR#24\n"
327 "AND R2, R0, #0xFF0000\n"
328 "ORR R1, R1, R2,LSR#8\n"
329 "AND R2, R0, #0xFF00\n"
330 "ORR R1, R1, R2,LSL#8\n"
331 "ORR R0, R1, R0,LSL#24\n"
332 "STR R0, [SP,#0x2C]\n"
333 "ADD R0, R5, #4\n"
334 "ADD R1, SP, #0x2C\n"
335 "MOV R2, #4\n"
336 "BL sub_FFB366B4\n"
337 "loc_FF878C58:\n"
338 "LDR R0, [SP,#0x3C]\n"
339 "LDR R1, [SP,#0x44]\n"
340 "BL sub_FF95BCEC\n"
341 "LDR R0, [R6,#0x48]\n"
342 "LDR R3, =0x2C60\n"
343 "ADD R1, R0, #1\n"
344 "STR R1, [R6,#0x48]\n"
345 "STR R3, [SP]\n"
346 "LDR R0, [SP,#0x44]\n"
347 "SUB R3, R3, #4\n"
348 "MOV R2, #0xF\n"
349 "BL sub_FF959D70\n"
350
351 "LDR R0, =0x2C60-4\n"
352 "BL set_quality\n"
353
354 "loc_FF878C88:\n"
355 "LDR R0, [R6,#0x4C]\n"
356 "ADD R0, R0, #1\n"
357 "STR R0, [R6,#0x4C]\n"
358 "LDR R1, [R6,#0x74]\n"
359 "MUL R0, R1, R0\n"
360 "LDR R1, [R6,#0x70]\n"
361 "BL sub_FFB38310\n"
362 "MOV R4, R0\n"
363 "BL sub_FF95BFCC\n"
364 "LDR R1, [R6,#0x6C]\n"
365 "CMP R1, R4\n"
366 "BNE loc_FF878CC4\n"
367 "LDR R0, [R6,#0x30]\n"
368 "CMP R0, #1\n"
369 "BNE loc_FF878CD8\n"
370 "loc_FF878CC4:\n"
371 "LDR R1, [R6,#0x80]\n"
372 "MOV R0, R4\n"
373 "BLX R1\n"
374 "STR R4, [R6,#0x6C]\n"
375 "STR R7, [R6,#0x30]\n"
376 "loc_FF878CD8:\n"
377 "STR R7, [R6,#0x2C]\n"
378 "B loc_FF878A48\n"
379 );
380 }
381