CHDK_DE Vorschauversion  Trunk Rev. 5516
 Alle Datenstrukturen Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Makrodefinitionen
capt_seq.c-Dateireferenz
#include "lolevel.h"
#include "platform.h"
#include "core.h"
#include "../../../generic/capt_seq.c"
+ Include-Abhängigkeitsdiagramm für capt_seq.c:

gehe zum Quellcode dieser Datei

Makrodefinitionen

#define CAPTSEQ_DEBUG_LOG   1
 
#define USE_STUBS_NRFLAG   1
 
#define NR_AUTO   (-1)
 

Funktionen

void _LogCameraEvent (int id, const char *fmt,...)
 
char * hook_raw_image_addr (void)
 
void log_capt_seq (int m)
 
void log_capt_seq2 (int m)
 
void log_capt_seq_override (void)
 
int _captseq_raw_addr_init (int raw_index, char **ptr)
 
void captseq_raw_addr_init_my (int raw_index, char **ptr)
 
void clear_current_raw_addr (void)
 
void __attribute__ ((naked, noinline))
 *-------------------------------------------------------------------— Mehr ...
 
void log_nr_call (void)
 
void log_remote_hook (void)
 
void log_rh (void)
 

Variablen

char * current_raw_addr
 

Makro-Dokumentation

#define CAPTSEQ_DEBUG_LOG   1

Definiert in Zeile 6 der Datei capt_seq.c.

#define NR_AUTO   (-1)

Definiert in Zeile 10 der Datei capt_seq.c.

#define USE_STUBS_NRFLAG   1

Definiert in Zeile 9 der Datei capt_seq.c.

Dokumentation der Funktionen

void __attribute__ ( (naked, noinline)  )

*-------------------------------------------------------------------—

!!

IS_ERROR( hSoundHandle )

IS_ERROR( RetCode )

IS_ERROR( RetCode )

IS_ERROR( RetCode )

IS_ERROR( RetCode )

"MOV R3, #0\n" "STR R3, [R9]\n"

TODO! below is from sd400

"MOV R3, #0\n" "STR R3, [R9]\n"

TODO! below is from sd400

__MovieRecorder_c__100

__MovieRecorder_c__100

ASM1989 -> In sx200:FF857190 //"Mounter.c"

ASM1989 -> In sx200:FF81B284 // DebugAssert

Definiert in Zeile 58 der Datei capt_seq.c.

58  {
59  asm volatile (
60 // task_CaptSeq 0xfc0f2b07
61 " push {r3, r4, r5, r6, r7, lr}\n"
62 " ldr r4, =0x0003e6f8\n"
63 " movs r6, #0\n"
64 " ldr r5, =0x0000bfc8\n"
65 "loc_fc0f2b0e:\n"
66 " movs r2, #0\n"
67 " mov r1, sp\n"
68 " ldr r0, [r5, #8]\n"
69 " bl sub_fc344686\n" // ReceiveMessageQueue
70 " lsls r0, r0, #0x1f\n"
71 " beq loc_fc0f2b30\n"
72 " movw r2, #0x453\n"
73 " ldr r1, =0xfc0f2750\n" // *"SsShootTask.c"
74 " movs r0, #0\n"
75 " bl _DebugAssert\n"
76 " bl _ExitTask\n"
77 " pop {r3, r4, r5, r6, r7, pc}\n"
78 "loc_fc0f2b30:\n"
79 " ldr r0, [sp]\n"
80 " ldr r0, [r0]\n"
81 " cmp r0, #1\n"
82 " beq loc_fc0f2b4c\n"
83 " cmp r0, #0x2d\n"
84 " beq loc_fc0f2b4c\n"
85 " cmp r0, #0x2e\n"
86 " beq loc_fc0f2b4c\n"
87 " cmp r0, #0x21\n"
88 " beq loc_fc0f2b4c\n"
89 " cmp r0, #0x25\n"
90 " beq loc_fc0f2b4c\n"
91 " bl sub_fc18ef40\n"
92 "loc_fc0f2b4c:\n"
93 #ifdef CAPTSEQ_DEBUG_LOG
94 // debug message
95 "ldr r0, [sp]\n"
96 "ldr r0, [r0]\n"
97 "bl log_capt_seq\n"
98 #endif
99 " ldr r0, [sp]\n"
100 " ldr r1, [r0]\n"
101 " cmp r1, #0x37\n"
102 " bhs loc_fc0f2c36\n"
103 " tbb [pc, r1]\n" // (jumptable r1 55 elements)
104 "branchtable_fc0f2b58:\n"
105 " .byte((loc_fc0f2b90 - branchtable_fc0f2b58) / 2)\n" // (case 0)
106 " .byte((loc_fc0f2ba6 - branchtable_fc0f2b58) / 2)\n" // (case 1)
107 " .byte((loc_fc0f2bae - branchtable_fc0f2b58) / 2)\n" // (case 2)
108 " .byte((loc_fc0f2bbc - branchtable_fc0f2b58) / 2)\n" // (case 3)
109 " .byte((loc_fc0f2bb6 - branchtable_fc0f2b58) / 2)\n" // (case 4)
110 " .byte((loc_fc0f2bd4 - branchtable_fc0f2b58) / 2)\n" // (case 5)
111 " .byte((loc_fc0f2bda - branchtable_fc0f2b58) / 2)\n" // (case 6)
112 " .byte((loc_fc0f2be4 - branchtable_fc0f2b58) / 2)\n" // (case 7)
113 " .byte((loc_fc0f2bec - branchtable_fc0f2b58) / 2)\n" // (case 8)
114 " .byte((loc_fc0f2bfc - branchtable_fc0f2b58) / 2)\n" // (case 9)
115 " .byte((loc_fc0f2c04 - branchtable_fc0f2b58) / 2)\n" // (case 10)
116 " .byte((loc_fc0f2c0a - branchtable_fc0f2b58) / 2)\n" // (case 11)
117 " .byte((loc_fc0f2cfa - branchtable_fc0f2b58) / 2)\n" // (case 12)
118 " .byte((loc_fc0f2c12 - branchtable_fc0f2b58) / 2)\n" // (case 13)
119 " .byte((loc_fc0f2c18 - branchtable_fc0f2b58) / 2)\n" // (case 14)
120 " .byte((loc_fc0f2c1e - branchtable_fc0f2b58) / 2)\n" // (case 15)
121 " .byte((loc_fc0f2c24 - branchtable_fc0f2b58) / 2)\n" // (case 16)
122 " .byte((loc_fc0f2c2a - branchtable_fc0f2b58) / 2)\n" // (case 17)
123 " .byte((loc_fc0f2c30 - branchtable_fc0f2b58) / 2)\n" // (case 18)
124 " .byte((loc_fc0f2c38 - branchtable_fc0f2b58) / 2)\n" // (case 19)
125 " .byte((loc_fc0f2c3e - branchtable_fc0f2b58) / 2)\n" // (case 20)
126 " .byte((loc_fc0f2c44 - branchtable_fc0f2b58) / 2)\n" // (case 21)
127 " .byte((loc_fc0f2c48 - branchtable_fc0f2b58) / 2)\n" // (case 22)
128 " .byte((loc_fc0f2c4e - branchtable_fc0f2b58) / 2)\n" // (case 23)
129 " .byte((loc_fc0f2c54 - branchtable_fc0f2b58) / 2)\n" // (case 24)
130 " .byte((loc_fc0f2c5a - branchtable_fc0f2b58) / 2)\n" // (case 25)
131 " .byte((loc_fc0f2c5e - branchtable_fc0f2b58) / 2)\n" // (case 26)
132 " .byte((loc_fc0f2c62 - branchtable_fc0f2b58) / 2)\n" // (case 27)
133 " .byte((loc_fc0f2c6a - branchtable_fc0f2b58) / 2)\n" // (case 28)
134 " .byte((loc_fc0f2c72 - branchtable_fc0f2b58) / 2)\n" // (case 29)
135 " .byte((loc_fc0f2cfa - branchtable_fc0f2b58) / 2)\n" // (case 30)
136 " .byte((loc_fc0f2c7a - branchtable_fc0f2b58) / 2)\n" // (case 31)
137 " .byte((loc_fc0f2c80 - branchtable_fc0f2b58) / 2)\n" // (case 32)
138 " .byte((loc_fc0f2c84 - branchtable_fc0f2b58) / 2)\n" // (case 33)
139 " .byte((loc_fc0f2c8c - branchtable_fc0f2b58) / 2)\n" // (case 34)
140 " .byte((loc_fc0f2cfa - branchtable_fc0f2b58) / 2)\n" // (case 35)
141 " .byte((loc_fc0f2c92 - branchtable_fc0f2b58) / 2)\n" // (case 36)
142 " .byte((loc_fc0f2c98 - branchtable_fc0f2b58) / 2)\n" // (case 37)
143 " .byte((loc_fc0f2c9e - branchtable_fc0f2b58) / 2)\n" // (case 38)
144 " .byte((loc_fc0f2ca4 - branchtable_fc0f2b58) / 2)\n" // (case 39)
145 " .byte((loc_fc0f2caa - branchtable_fc0f2b58) / 2)\n" // (case 40)
146 " .byte((loc_fc0f2cb2 - branchtable_fc0f2b58) / 2)\n" // (case 41)
147 " .byte((loc_fc0f2cb8 - branchtable_fc0f2b58) / 2)\n" // (case 42)
148 " .byte((loc_fc0f2cfa - branchtable_fc0f2b58) / 2)\n" // (case 43)
149 " .byte((loc_fc0f2cdc - branchtable_fc0f2b58) / 2)\n" // (case 44)
150 " .byte((loc_fc0f2ce2 - branchtable_fc0f2b58) / 2)\n" // (case 45)
151 " .byte((loc_fc0f2cee - branchtable_fc0f2b58) / 2)\n" // (case 46)
152 " .byte((loc_fc0f2cfa - branchtable_fc0f2b58) / 2)\n" // (case 47)
153 " .byte((loc_fc0f2d08 - branchtable_fc0f2b58) / 2)\n" // (case 48)
154 " .byte((loc_fc0f2cfa - branchtable_fc0f2b58) / 2)\n" // (case 49)
155 " .byte((loc_fc0f2cfa - branchtable_fc0f2b58) / 2)\n" // (case 50)
156 " .byte((loc_fc0f2cfa - branchtable_fc0f2b58) / 2)\n" // (case 51)
157 " .byte((loc_fc0f2cfa - branchtable_fc0f2b58) / 2)\n" // (case 52)
158 " .byte((loc_fc0f2cfa - branchtable_fc0f2b58) / 2)\n" // (case 53)
159 " .byte((loc_fc0f2cf4 - branchtable_fc0f2b58) / 2)\n" // (case 54)
160 ".align 1\n"
161 "loc_fc0f2b90:\n"
162 " ldr r0, [r0, #0xc]\n"
163 " bl sub_fc0f31c0\n"
164 #ifdef CAPTSEQ_DEBUG_LOG
165 "bl log_capt_seq_override\n"
166 #endif
167 " BL clear_current_raw_addr\n" // +
168 " BL shooting_expo_param_override\n" // +
169 " bl sub_fc0f0526\n"
170 " ldr r0, [r4, #0x24]\n"
171 " cmp r0, #0\n"
172 " beq loc_fc0f2ba4\n"
173 //" bl sub_fc18e188\n"
174 " bl sub_fc18e188_my\n" // ->
175 "loc_fc0f2ba4:\n"
176 " b loc_fc0f2d08\n"
177 "loc_fc0f2ba6:\n" // case 1: normal shoot
178 " ldr r0, [r0, #0x10]\n"
179 //" bl sub_fc18e0fe\n"
180 " bl sub_fc18e0fe_my\n" // ->
181 " b loc_fc0f2d08\n"
182 "loc_fc0f2bae:\n"
183 " movs r0, #1\n"
184 " bl sub_fc0f358a\n"
185 " b loc_fc0f2d08\n"
186 "loc_fc0f2bb6:\n"
187 " bl sub_fc0f2e0a\n"
188 " b loc_fc0f2bc2\n"
189 "loc_fc0f2bbc:\n"
190 " ldr r0, [r0, #0xc]\n"
191 " bl sub_fc0f316e\n"
192 "loc_fc0f2bc2:\n"
193 " str r6, [r4, #0x24]\n"
194 " b loc_fc0f2d08\n"
195 ".ltorg\n"
196 // firmware had literal pool here
197 // 00 00
198 // 14 e9 03 00
199 // f8 e6 03 00
200 // c8 bf 00 00
201 "loc_fc0f2bd4:\n"
202 " bl sub_fc0f3176\n"
203 " b loc_fc0f2d08\n"
204 "loc_fc0f2bda:\n"
205 " bl sub_fc0f34aa\n"
206 " bl sub_fc0f0526\n"
207 " b loc_fc0f2d08\n"
208 "loc_fc0f2be4:\n"
209 " ldr r0, [r0, #0x10]\n"
210 " bl sub_fc18e21c\n"
211 " b loc_fc0f2d08\n"
212 "loc_fc0f2bec:\n"
213 " bl sub_fc0f350c\n"
214 " bl sub_fc0f0526\n"
215 " movs r0, #0\n"
216 " bl sub_fc27eab2\n"
217 " b loc_fc0f2d08\n"
218 "loc_fc0f2bfc:\n"
219 " ldr r0, [r4, #0x50]\n"
220 " bl sub_fc0f499c\n"
221 " b loc_fc0f2d08\n"
222 "loc_fc0f2c04:\n"
223 " bl sub_fc0f4c48\n"
224 " b loc_fc0f2d08\n"
225 "loc_fc0f2c0a:\n"
226 " ldr r0, [r0, #0xc]\n"
227 " bl sub_fc0f4c94\n"
228 " b loc_fc0f2d08\n"
229 "loc_fc0f2c12:\n"
230 " bl sub_fc0f4de8\n"
231 " b loc_fc0f2d08\n"
232 "loc_fc0f2c18:\n"
233 " bl sub_fc0f51b0\n"
234 " b loc_fc0f2d08\n"
235 "loc_fc0f2c1e:\n"
236 " bl sub_fc0f5246\n"
237 " b loc_fc0f2d08\n"
238 "loc_fc0f2c24:\n"
239 " bl sub_fc18cb4c\n"
240 " b loc_fc0f2d08\n"
241 "loc_fc0f2c2a:\n"
242 " bl sub_fc18ccb2\n"
243 " b loc_fc0f2d08\n"
244 "loc_fc0f2c30:\n"
245 " bl sub_fc18cd28\n"
246 " b loc_fc0f2d08\n"
247 "loc_fc0f2c36:\n"
248 " b loc_fc0f2cfa\n"
249 "loc_fc0f2c38:\n"
250 " bl sub_fc18cdb0\n"
251 " b loc_fc0f2d08\n"
252 "loc_fc0f2c3e:\n"
253 " bl sub_fc18ce56\n"
254 " b loc_fc0f2d08\n"
255 "loc_fc0f2c44:\n"
256 " movs r0, #0\n"
257 " b loc_fc0f2c64\n"
258 "loc_fc0f2c48:\n"
259 " bl sub_fc18d154\n"
260 " b loc_fc0f2d08\n"
261 "loc_fc0f2c4e:\n"
262 " bl sub_fc18d1a6\n"
263 " b loc_fc0f2d08\n"
264 "loc_fc0f2c54:\n"
265 " bl sub_fc18d1aa\n"
266 " b loc_fc0f2d08\n"
267 "loc_fc0f2c5a:\n"
268 " movs r0, #0\n"
269 " b loc_fc0f2c6c\n"
270 "loc_fc0f2c5e:\n"
271 " movs r0, #0\n"
272 " b loc_fc0f2c74\n"
273 "loc_fc0f2c62:\n"
274 " movs r0, #1\n"
275 "loc_fc0f2c64:\n"
276 " bl sub_fc18d040\n"
277 " b loc_fc0f2d08\n"
278 "loc_fc0f2c6a:\n"
279 " movs r0, #1\n"
280 "loc_fc0f2c6c:\n"
281 " bl sub_fc18d1bc\n"
282 " b loc_fc0f2d08\n"
283 "loc_fc0f2c72:\n"
284 " movs r0, #1\n"
285 "loc_fc0f2c74:\n"
286 " bl sub_fc18d25a\n"
287 " b loc_fc0f2d08\n"
288 "loc_fc0f2c7a:\n"
289 " bl sub_fc0f365c\n"
290 " b loc_fc0f2d08\n"
291 "loc_fc0f2c80:\n"
292 " movs r0, #0\n"
293 " b loc_fc0f2c86\n"
294 "loc_fc0f2c84:\n"
295 " ldr r0, [r0, #0xc]\n"
296 "loc_fc0f2c86:\n"
297 " bl sub_fc0f36d8\n"
298 " b loc_fc0f2d08\n"
299 "loc_fc0f2c8c:\n"
300 " bl sub_fc18cf70\n"
301 " b loc_fc0f2d08\n"
302 "loc_fc0f2c92:\n"
303 " bl sub_fc18cfd0\n"
304 " b loc_fc0f2d08\n"
305 "loc_fc0f2c98:\n"
306 " bl sub_fc18e91a\n"
307 " b loc_fc0f2d08\n"
308 "loc_fc0f2c9e:\n"
309 " bl sub_fc0f8196\n"
310 " b loc_fc0f2d08\n"
311 "loc_fc0f2ca4:\n"
312 " bl sub_fc0f8250\n"
313 " b loc_fc0f2d08\n"
314 "loc_fc0f2caa:\n"
315 " ldr r0, [r0, #0xc]\n"
316 " bl sub_fc18d334\n"
317 " b loc_fc0f2d08\n"
318 "loc_fc0f2cb2:\n"
319 " bl sub_fc18d39c\n"
320 " b loc_fc0f2d08\n"
321 "loc_fc0f2cb8:\n"
322 " bl sub_fc0fa154\n"
323 " ldrh.w r0, [r4, #0x1b8]\n"
324 " cmp r0, #4\n"
325 " beq loc_fc0f2cce\n"
326 " ldrh r0, [r4]\n"
327 " sub.w r1, r0, #0x4200\n"
328 " subs r1, #0x38\n"
329 " bne loc_fc0f2d08\n"
330 "loc_fc0f2cce:\n"
331 " bl sub_fc0f8250\n"
332 " bl sub_fc0f8796\n"
333 " bl sub_fc0f85f4\n"
334 " b loc_fc0f2d08\n"
335 "loc_fc0f2cdc:\n"
336 " movs r2, #0\n"
337 " movs r1, #0x12\n"
338 " b loc_fc0f2ce6\n"
339 "loc_fc0f2ce2:\n"
340 " movs r2, #0\n"
341 " movs r1, #0x10\n"
342 "loc_fc0f2ce6:\n"
343 " movs r0, #0\n"
344 " bl sub_fc0f110c\n"
345 " b loc_fc0f2d08\n"
346 "loc_fc0f2cee:\n"
347 " movs r2, #0\n"
348 " movs r1, #0x11\n"
349 " b loc_fc0f2ce6\n"
350 "loc_fc0f2cf4:\n"
351 " bl sub_fc0f48e8\n"
352 " b loc_fc0f2d08\n"
353 "loc_fc0f2cfa:\n"
354 " movw r2, #0x58f\n"
355 " ldr r1, =0xfc0f2750\n" // *"SsShootTask.c"
356 " movs r0, #0\n"
357 " bl _DebugAssert\n"
358 "loc_fc0f2d08:\n"
359 // debug after message handled
360 #ifdef CAPTSEQ_DEBUG_LOG
361 "ldr r0, [sp]\n"
362 "ldr r0, [r0]\n"
363 "bl log_capt_seq2\n"
364 #endif
365 " ldr r0, [sp]\n"
366 " ldr r1, [r0, #4]\n"
367 " ldr r0, [r5, #4]\n"
368 " bl _SetEventFlag\n"
369 " ldr r7, [sp]\n"
370 " ldr r0, [r7, #8]\n"
371 " cbnz r0, loc_fc0f2d26\n"
372 " movw r2, #0x102\n"
373 " ldr r1, =0xfc0f2750\n" // *"SsShootTask.c"
374 " movs r0, #0\n"
375 " bl _DebugAssert\n"
376 "loc_fc0f2d26:\n"
377 " str r6, [r7, #8]\n"
378 " b loc_fc0f2b0e\n"
379 ".ltorg\n"
380  );
381 }
int _captseq_raw_addr_init ( int  raw_index,
char **  ptr 
)
void _LogCameraEvent ( int  id,
const char *  fmt,
  ... 
)
void captseq_raw_addr_init_my ( int  raw_index,
char **  ptr 
)

Definiert in Zeile 45 der Datei capt_seq.c.

45  {
46  _captseq_raw_addr_init(raw_index,ptr);
47  current_raw_addr=*(ptr + 0x60/4); // @0xfc0f5fe8 [r4,#0x60]
48 #ifdef CAPTSEQ_DEBUG_LOG
49  _LogCameraEvent(0x60,"rawinit i:0x%x p:0x%x v:0x%x",raw_index,ptr,current_raw_addr);
50 #endif
51 }
void clear_current_raw_addr ( void  )

Definiert in Zeile 53 der Datei capt_seq.c.

53  {
55 }
char* hook_raw_image_addr ( void  )

Definiert in Zeile 3 der Datei lib.c.

4 {
5  // Found 0x11B96B80 at ROM:FFC377A0
6  // Found 0x107D58E0 at ROM:FFC756CC
7  // 0x51C0 + 0x18 found at ROM:FFC4C504
8  return (char*) (*(int*)(0x51C0+0x18) ? 0x11B96B80 : 0x107D58E0);
9 }
void log_capt_seq ( int  m)

Definiert in Zeile 16 der Datei capt_seq.c.

17 {
18  _LogCameraEvent(0x60,"cs m:%d rb:0x%08x i:%04d",
19  m,
22 }
void log_capt_seq2 ( int  m)

Definiert in Zeile 23 der Datei capt_seq.c.

24 {
25  _LogCameraEvent(0x60,"cs end m:%d rb:0x%08x i:%04d",
26  m,
29 }
void log_capt_seq_override ( void  )

Definiert in Zeile 30 der Datei capt_seq.c.

31 {
32  _LogCameraEvent(0x60,"cs override rb:0x%08x i:%04d",
35 }
void log_nr_call ( void  )

Definiert in Zeile 697 der Datei capt_seq.c.

697  {
698  _LogCameraEvent(0x60,"nr hook %d",_nrflag);
699 }
void log_remote_hook ( void  )

Definiert in Zeile 700 der Datei capt_seq.c.

700  {
701  _LogCameraEvent(0x60,"remote hook");
702 }
void log_rh ( void  )

Definiert in Zeile 703 der Datei capt_seq.c.

703  {
704  _LogCameraEvent(0x60,"raw hook rb:0x%08x rbc:0x%08x",hook_raw_image_addr(),current_raw_addr);
705 }

Variablen-Dokumentation

char* current_raw_addr

Definiert in Zeile 43 der Datei capt_seq.c.