CHDK_DE Vorschauversion  Trunk Rev. 5766
 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 0xfc0f2b2f
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_fc0f2b36:\n"
66 " movs r2, #0\n"
67 " mov r1, sp\n"
68 " ldr r0, [r5, #8]\n"
69 " bl sub_fc3446ae\n" // ReceiveMessageQueue
70 " lsls r0, r0, #0x1f\n"
71 " beq loc_fc0f2b58\n"
72 " movw r2, #0x453\n"
73 " ldr r1, =0xfc0f2778\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_fc0f2b58:\n"
79 " ldr r0, [sp]\n"
80 " ldr r0, [r0]\n"
81 " cmp r0, #1\n"
82 " beq loc_fc0f2b74\n"
83 " cmp r0, #0x2d\n"
84 " beq loc_fc0f2b74\n"
85 " cmp r0, #0x2e\n"
86 " beq loc_fc0f2b74\n"
87 " cmp r0, #0x21\n"
88 " beq loc_fc0f2b74\n"
89 " cmp r0, #0x25\n"
90 " beq loc_fc0f2b74\n"
91 " bl sub_fc18ef68\n"
92 "loc_fc0f2b74:\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_fc0f2c5e\n"
103 " tbb [pc, r1]\n" // (jumptable r1 55 elements)
104 "branchtable_fc0f2b80:\n"
105 " .byte((loc_fc0f2bb8 - branchtable_fc0f2b80) / 2)\n" // (case 0)
106 " .byte((loc_fc0f2bce - branchtable_fc0f2b80) / 2)\n" // (case 1)
107 " .byte((loc_fc0f2bd6 - branchtable_fc0f2b80) / 2)\n" // (case 2)
108 " .byte((loc_fc0f2be4 - branchtable_fc0f2b80) / 2)\n" // (case 3)
109 " .byte((loc_fc0f2bde - branchtable_fc0f2b80) / 2)\n" // (case 4)
110 " .byte((loc_fc0f2bfc - branchtable_fc0f2b80) / 2)\n" // (case 5)
111 " .byte((loc_fc0f2c02 - branchtable_fc0f2b80) / 2)\n" // (case 6)
112 " .byte((loc_fc0f2c0c - branchtable_fc0f2b80) / 2)\n" // (case 7)
113 " .byte((loc_fc0f2c14 - branchtable_fc0f2b80) / 2)\n" // (case 8)
114 " .byte((loc_fc0f2c24 - branchtable_fc0f2b80) / 2)\n" // (case 9)
115 " .byte((loc_fc0f2c2c - branchtable_fc0f2b80) / 2)\n" // (case 10)
116 " .byte((loc_fc0f2c32 - branchtable_fc0f2b80) / 2)\n" // (case 11)
117 " .byte((loc_fc0f2d22 - branchtable_fc0f2b80) / 2)\n" // (case 12)
118 " .byte((loc_fc0f2c3a - branchtable_fc0f2b80) / 2)\n" // (case 13)
119 " .byte((loc_fc0f2c40 - branchtable_fc0f2b80) / 2)\n" // (case 14)
120 " .byte((loc_fc0f2c46 - branchtable_fc0f2b80) / 2)\n" // (case 15)
121 " .byte((loc_fc0f2c4c - branchtable_fc0f2b80) / 2)\n" // (case 16)
122 " .byte((loc_fc0f2c52 - branchtable_fc0f2b80) / 2)\n" // (case 17)
123 " .byte((loc_fc0f2c58 - branchtable_fc0f2b80) / 2)\n" // (case 18)
124 " .byte((loc_fc0f2c60 - branchtable_fc0f2b80) / 2)\n" // (case 19)
125 " .byte((loc_fc0f2c66 - branchtable_fc0f2b80) / 2)\n" // (case 20)
126 " .byte((loc_fc0f2c6c - branchtable_fc0f2b80) / 2)\n" // (case 21)
127 " .byte((loc_fc0f2c70 - branchtable_fc0f2b80) / 2)\n" // (case 22)
128 " .byte((loc_fc0f2c76 - branchtable_fc0f2b80) / 2)\n" // (case 23)
129 " .byte((loc_fc0f2c7c - branchtable_fc0f2b80) / 2)\n" // (case 24)
130 " .byte((loc_fc0f2c82 - branchtable_fc0f2b80) / 2)\n" // (case 25)
131 " .byte((loc_fc0f2c86 - branchtable_fc0f2b80) / 2)\n" // (case 26)
132 " .byte((loc_fc0f2c8a - branchtable_fc0f2b80) / 2)\n" // (case 27)
133 " .byte((loc_fc0f2c92 - branchtable_fc0f2b80) / 2)\n" // (case 28)
134 " .byte((loc_fc0f2c9a - branchtable_fc0f2b80) / 2)\n" // (case 29)
135 " .byte((loc_fc0f2d22 - branchtable_fc0f2b80) / 2)\n" // (case 30)
136 " .byte((loc_fc0f2ca2 - branchtable_fc0f2b80) / 2)\n" // (case 31)
137 " .byte((loc_fc0f2ca8 - branchtable_fc0f2b80) / 2)\n" // (case 32)
138 " .byte((loc_fc0f2cac - branchtable_fc0f2b80) / 2)\n" // (case 33)
139 " .byte((loc_fc0f2cb4 - branchtable_fc0f2b80) / 2)\n" // (case 34)
140 " .byte((loc_fc0f2d22 - branchtable_fc0f2b80) / 2)\n" // (case 35)
141 " .byte((loc_fc0f2cba - branchtable_fc0f2b80) / 2)\n" // (case 36)
142 " .byte((loc_fc0f2cc0 - branchtable_fc0f2b80) / 2)\n" // (case 37)
143 " .byte((loc_fc0f2cc6 - branchtable_fc0f2b80) / 2)\n" // (case 38)
144 " .byte((loc_fc0f2ccc - branchtable_fc0f2b80) / 2)\n" // (case 39)
145 " .byte((loc_fc0f2cd2 - branchtable_fc0f2b80) / 2)\n" // (case 40)
146 " .byte((loc_fc0f2cda - branchtable_fc0f2b80) / 2)\n" // (case 41)
147 " .byte((loc_fc0f2ce0 - branchtable_fc0f2b80) / 2)\n" // (case 42)
148 " .byte((loc_fc0f2d22 - branchtable_fc0f2b80) / 2)\n" // (case 43)
149 " .byte((loc_fc0f2d04 - branchtable_fc0f2b80) / 2)\n" // (case 44)
150 " .byte((loc_fc0f2d0a - branchtable_fc0f2b80) / 2)\n" // (case 45)
151 " .byte((loc_fc0f2d16 - branchtable_fc0f2b80) / 2)\n" // (case 46)
152 " .byte((loc_fc0f2d22 - branchtable_fc0f2b80) / 2)\n" // (case 47)
153 " .byte((loc_fc0f2d30 - branchtable_fc0f2b80) / 2)\n" // (case 48)
154 " .byte((loc_fc0f2d22 - branchtable_fc0f2b80) / 2)\n" // (case 49)
155 " .byte((loc_fc0f2d22 - branchtable_fc0f2b80) / 2)\n" // (case 50)
156 " .byte((loc_fc0f2d22 - branchtable_fc0f2b80) / 2)\n" // (case 51)
157 " .byte((loc_fc0f2d22 - branchtable_fc0f2b80) / 2)\n" // (case 52)
158 " .byte((loc_fc0f2d22 - branchtable_fc0f2b80) / 2)\n" // (case 53)
159 " .byte((loc_fc0f2d1c - branchtable_fc0f2b80) / 2)\n" // (case 54)
160 ".align 1\n"
161 "loc_fc0f2bb8:\n" // case 0: preshoot, quick press shoot
162 " ldr r0, [r0, #0xc]\n"
163 " bl sub_fc0f31e8\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_fc0f054e\n"
170 " ldr r0, [r4, #0x24]\n"
171 " cmp r0, #0\n"
172 " beq loc_fc0f2bcc\n"
173 //" bl sub_fc18e1b0\n"
174 " bl sub_fc18e1b0_my\n" // ->
175 "loc_fc0f2bcc:\n"
176 " b loc_fc0f2d30\n"
177 "loc_fc0f2bce:\n" // case 1: normal shoot
178 " ldr r0, [r0, #0x10]\n"
179 //" bl sub_fc18e126\n"
180 " bl sub_fc18e126_my\n" // ->
181 " b loc_fc0f2d30\n"
182 "loc_fc0f2bd6:\n"
183 " movs r0, #1\n"
184 " bl sub_fc0f35b2\n"
185 " b loc_fc0f2d30\n"
186 "loc_fc0f2bde:\n"
187 " bl sub_fc0f2e32\n"
188 " b loc_fc0f2bea\n"
189 "loc_fc0f2be4:\n"
190 " ldr r0, [r0, #0xc]\n"
191 " bl sub_fc0f3196\n"
192 "loc_fc0f2bea:\n"
193 " str r6, [r4, #0x24]\n"
194 " b loc_fc0f2d30\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_fc0f2bfc:\n"
202 " bl sub_fc0f319e\n"
203 " b loc_fc0f2d30\n"
204 "loc_fc0f2c02:\n"
205 " bl sub_fc0f34d2\n"
206 " bl sub_fc0f054e\n"
207 " b loc_fc0f2d30\n"
208 "loc_fc0f2c0c:\n"
209 " ldr r0, [r0, #0x10]\n"
210 " bl sub_fc18e244\n"
211 " b loc_fc0f2d30\n"
212 "loc_fc0f2c14:\n"
213 " bl sub_fc0f3534\n"
214 " bl sub_fc0f054e\n"
215 " movs r0, #0\n"
216 " bl sub_fc27eada\n"
217 " b loc_fc0f2d30\n"
218 "loc_fc0f2c24:\n"
219 " ldr r0, [r4, #0x50]\n"
220 " bl sub_fc0f49c4\n"
221 " b loc_fc0f2d30\n"
222 "loc_fc0f2c2c:\n"
223 " bl sub_fc0f4c70\n"
224 " b loc_fc0f2d30\n"
225 "loc_fc0f2c32:\n"
226 " ldr r0, [r0, #0xc]\n"
227 " bl sub_fc0f4cbc\n"
228 " b loc_fc0f2d30\n"
229 "loc_fc0f2c3a:\n"
230 " bl sub_fc0f4e10\n"
231 " b loc_fc0f2d30\n"
232 "loc_fc0f2c40:\n"
233 " bl sub_fc0f51d8\n"
234 " b loc_fc0f2d30\n"
235 "loc_fc0f2c46:\n"
236 " bl sub_fc0f526e\n"
237 " b loc_fc0f2d30\n"
238 "loc_fc0f2c4c:\n"
239 " bl sub_fc18cb74\n"
240 " b loc_fc0f2d30\n"
241 "loc_fc0f2c52:\n"
242 " bl sub_fc18ccda\n"
243 " b loc_fc0f2d30\n"
244 "loc_fc0f2c58:\n"
245 " bl sub_fc18cd50\n"
246 " b loc_fc0f2d30\n"
247 "loc_fc0f2c5e:\n"
248 " b loc_fc0f2d22\n"
249 "loc_fc0f2c60:\n"
250 " bl sub_fc18cdd8\n"
251 " b loc_fc0f2d30\n"
252 "loc_fc0f2c66:\n"
253 " bl sub_fc18ce7e\n"
254 " b loc_fc0f2d30\n"
255 "loc_fc0f2c6c:\n"
256 " movs r0, #0\n"
257 " b loc_fc0f2c8c\n"
258 "loc_fc0f2c70:\n"
259 " bl sub_fc18d17c\n"
260 " b loc_fc0f2d30\n"
261 "loc_fc0f2c76:\n"
262 " bl sub_fc18d1ce\n"
263 " b loc_fc0f2d30\n"
264 "loc_fc0f2c7c:\n"
265 " bl sub_fc18d1d2\n"
266 " b loc_fc0f2d30\n"
267 "loc_fc0f2c82:\n"
268 " movs r0, #0\n"
269 " b loc_fc0f2c94\n"
270 "loc_fc0f2c86:\n"
271 " movs r0, #0\n"
272 " b loc_fc0f2c9c\n"
273 "loc_fc0f2c8a:\n"
274 " movs r0, #1\n"
275 "loc_fc0f2c8c:\n"
276 " bl sub_fc18d068\n"
277 " b loc_fc0f2d30\n"
278 "loc_fc0f2c92:\n"
279 " movs r0, #1\n"
280 "loc_fc0f2c94:\n"
281 " bl sub_fc18d1e4\n"
282 " b loc_fc0f2d30\n"
283 "loc_fc0f2c9a:\n"
284 " movs r0, #1\n"
285 "loc_fc0f2c9c:\n"
286 " bl sub_fc18d282\n"
287 " b loc_fc0f2d30\n"
288 "loc_fc0f2ca2:\n"
289 " bl sub_fc0f3684\n"
290 " b loc_fc0f2d30\n"
291 "loc_fc0f2ca8:\n"
292 " movs r0, #0\n"
293 " b loc_fc0f2cae\n"
294 "loc_fc0f2cac:\n"
295 " ldr r0, [r0, #0xc]\n"
296 "loc_fc0f2cae:\n"
297 " bl sub_fc0f3700\n"
298 " b loc_fc0f2d30\n"
299 "loc_fc0f2cb4:\n"
300 " bl sub_fc18cf98\n"
301 " b loc_fc0f2d30\n"
302 "loc_fc0f2cba:\n"
303 " bl sub_fc18cff8\n"
304 " b loc_fc0f2d30\n"
305 "loc_fc0f2cc0:\n"
306 " bl sub_fc18e942\n"
307 " b loc_fc0f2d30\n"
308 "loc_fc0f2cc6:\n"
309 " bl sub_fc0f81be\n"
310 " b loc_fc0f2d30\n"
311 "loc_fc0f2ccc:\n"
312 " bl sub_fc0f8278\n"
313 " b loc_fc0f2d30\n"
314 "loc_fc0f2cd2:\n"
315 " ldr r0, [r0, #0xc]\n"
316 " bl sub_fc18d35c\n"
317 " b loc_fc0f2d30\n"
318 "loc_fc0f2cda:\n"
319 " bl sub_fc18d3c4\n"
320 " b loc_fc0f2d30\n"
321 "loc_fc0f2ce0:\n"
322 " bl sub_fc0fa17c\n"
323 " ldrh.w r0, [r4, #0x1b8]\n"
324 " cmp r0, #4\n"
325 " beq loc_fc0f2cf6\n"
326 " ldrh r0, [r4]\n"
327 " sub.w r1, r0, #0x4200\n"
328 " subs r1, #0x38\n"
329 " bne loc_fc0f2d30\n"
330 "loc_fc0f2cf6:\n"
331 " bl sub_fc0f8278\n"
332 " bl sub_fc0f87be\n"
333 " bl sub_fc0f861c\n"
334 " b loc_fc0f2d30\n"
335 "loc_fc0f2d04:\n"
336 " movs r2, #0\n"
337 " movs r1, #0x12\n"
338 " b loc_fc0f2d0e\n"
339 "loc_fc0f2d0a:\n"
340 " movs r2, #0\n"
341 " movs r1, #0x10\n"
342 "loc_fc0f2d0e:\n"
343 " movs r0, #0\n"
344 " bl sub_fc0f1134\n"
345 " b loc_fc0f2d30\n"
346 "loc_fc0f2d16:\n"
347 " movs r2, #0\n"
348 " movs r1, #0x11\n"
349 " b loc_fc0f2d0e\n"
350 "loc_fc0f2d1c:\n"
351 " bl sub_fc0f4910\n"
352 " b loc_fc0f2d30\n"
353 "loc_fc0f2d22:\n"
354 " movw r2, #0x58f\n"
355 " ldr r1, =0xfc0f2778\n" // *"SsShootTask.c"
356 " movs r0, #0\n"
357 " bl _DebugAssert\n"
358 "loc_fc0f2d30:\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_fc0f2d4e\n"
372 " movw r2, #0x102\n"
373 " ldr r1, =0xfc0f2778\n" // *"SsShootTask.c"
374 " movs r0, #0\n"
375 " bl _DebugAssert\n"
376 "loc_fc0f2d4e:\n"
377 " str r6, [r7, #8]\n"
378 " b loc_fc0f2b36\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); // @0xfc0f6010 [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.