This source file includes following definitions.
- filewritetask
- sub_FFC564A4_my
- sub_FFC56350_my
1 #include "lolevel.h"
2 #include "platform.h"
3
4 typedef struct {
5 unsigned int address;
6 unsigned int length;
7 } cam_ptp_data_chunk;
8
9 #define MAX_CHUNKS_FOR_FWT 3
10
11
12
13
14
15
16
17 typedef struct
18 {
19 int unkn1;
20 cam_ptp_data_chunk pdc[MAX_CHUNKS_FOR_FWT];
21 char name[32];
22 } fwt_data_struct;
23
24 #include "../../../generic/filewrite.c"
25
26 void __attribute__((naked,noinline)) filewritetask( ) {
27 asm volatile (
28 " STMFD SP!, {R4,LR}\n"
29 " LDR R4, =0x19924\n"
30 " SUB SP, SP, #4\n"
31 " B loc_FFC56590\n"
32 "loc_FFC5656C:\n"
33 " TST R3, #4\n"
34 " BEQ loc_FFC5658C\n"
35 " LDR R0, [R4]\n"
36 " BL sub_FFC0FB44\n"
37 " LDR R0, [R4]\n"
38 " MOV R1, #8\n"
39 " BL sub_FFC0F9A8\n"
40 " B loc_FFC56590\n"
41 "loc_FFC5658C:\n"
42 " BL sub_FFC564A4_my\n"
43 "loc_FFC56590:\n"
44 " MOV R1, #7\n"
45 " LDR R0, [R4]\n"
46 " MOV R2, #0\n"
47 " BL sub_FFC0F988\n"
48 " CMP R0, #0\n"
49 " MOV R1, SP\n"
50 " BEQ loc_FFC565C0\n"
51 " MOV R1, #0x2B0\n"
52 " LDR R0, =0xFFC563F8\n"
53 " ADD R1, R1, #1\n"
54 " BL sub_FFC03AE8\n"
55 " B loc_FFC565D8\n"
56 "loc_FFC565C0:\n"
57 " LDR R0, [R4]\n"
58 " BL sub_FFC0FB94\n"
59 " LDR R3, [SP]\n"
60 " TST R3, #2\n"
61 " MOV R1, #5\n"
62 " BEQ loc_FFC5656C\n"
63 "loc_FFC565D8:\n"
64 " LDR R3, =0x19928\n"
65 " LDR R0, [R3]\n"
66 " BL sub_FFC10E54\n"
67 " BL _ExitTask\n"
68 " ADD SP, SP, #4\n"
69 " LDMFD SP!, {R4,PC}\n"
70 );
71 }
72
73 void __attribute__((naked,noinline)) sub_FFC564A4_my( ) {
74 asm volatile (
75 " STMFD SP!, {R4,R5,LR}\n"
76 " LDR R2, =0x19908\n"
77 " LDRH R3, [R2]\n"
78 " SUB R3, R3, #1\n"
79 " CMP R3, #3\n"
80 " LDRLS PC, [PC,R3,LSL#2]\n"
81
82 " LDR PC, =0xFFC564F0\n"
83 " .long loc_FFC564D0\n"
84 " .long 0xFFC564E0\n"
85 " .long 0xFFC564E0\n"
86 " .long 0xFFC564E0\n"
87
88
89
90
91
92
93 "loc_FFC564D0:\n"
94 " LDR R0, =0x198C8\n"
95 " BL sub_FFC56350_my\n"
96 " MOV R4, R0\n"
97
98 " LDR PC,=0xFFC564F4\n"
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129 );
130 }
131
132 void __attribute__((naked,noinline)) sub_FFC56350_my( ) {
133 asm volatile (
134 " STMFD SP!, {R4-R6,LR}\n"
135 " MOV R4, R0\n"
136 " ADD R5, R4, #0x1C\n"
137 " MOV R0, R5\n"
138 " BL sub_FFC56028\n"
139 " LDR R0, [R4,#0x3C]\n"
140 " BL sub_FFC5F0CC\n"
141 " LDR R3, [R4]\n"
142 " MOV R1, #0x600\n"
143 " TST R3, #0x10000\n"
144 " ADD R1, R1, #1\n"
145 " MOV R2, #0x1B4\n"
146 " ORRNE R1, R1, #0x8000\n"
147 " LDR R3, [R4,#0x3C]\n"
148 " ADD R2, R2, #2\n"
149
150 "STMFD SP!, {R1-R12,LR}\n"
151 "MOV R0, R4\n"
152 "BL filewrite_main_hook\n"
153 "BL filewrite_file_complete\n"
154 "CMP R0, #0\n"
155 "LDRNE R0, =0xFFC01A04\n"
156 "LDMFD SP!, {R1-R12,LR}\n"
157 "MOVEQ R0, R5\n"
158
159
160 " LDR PC, =0xFFC56390\n"
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186 );
187 }
188