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

gehe zum Quellcode dieser Datei

Datenstrukturen

struct  cam_ptp_data_chunk
 
struct  fwt_data_struct
 

Makrodefinitionen

#define MAX_CHUNKS_FOR_JPEG   7
 

Funktionen

void _LogCameraEvent (int id, const char *fmt,...)
 
void log_fwt_msg (fwt_data_struct *fwd)
 
void log_fwt_start (void)
 
void __attribute__ ((naked, noinline))
 *-------------------------------------------------------------------— Mehr ...
 

Makro-Dokumentation

#define MAX_CHUNKS_FOR_JPEG   7

Definiert in Zeile 11 der Datei filewrite.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 106 der Datei filewrite.c.

106  {
107 asm volatile (
108 // task_FileWrite 0xfc065dc7
109 " push {r3, r4, r5, r6, r7, lr}\n"
110 " ldr r6, =0x09200001\n"
111 " movw r7, #0x428\n"
112 " ldr r5, =0x00024cb8\n"
113 " adds r6, #0x12\n"
114 "loc_fc065dd2:\n"
115 " mov r1, sp\n"
116 " movs r2, #0\n"
117 " ldr r0, [r5, #0x10]\n"
118 " blx sub_fc2cf35c\n" // j_ReceiveMessageQueue
119 " cbz r0, loc_fc065de8\n"
120 " movs r0, #0\n"
121 " mov r2, r7\n"
122 " ldr r1, =0xfc065efc\n" // *"dwFWrite.c"
123 " blx sub_fc2cf41c\n" // j_DebugAssert
124 "loc_fc065de8:\n"
125 " ldr r0, [sp]\n"
126 "bl log_fwt_msg\n"
127 " ldr r0, [sp]\n"
128 " ldr r1, [r0]\n"
129 " cmp r1, #0xd\n"
130 " bhs loc_fc065dd2\n"
131 " tbb [pc, r1]\n" // (jumptable r1 13 elements)
132 "branchtable_fc065df4:\n"
133 " .byte((loc_fc065e36 - branchtable_fc065df4) / 2)\n" // (case 0)
134 " .byte((loc_fc065e36 - branchtable_fc065df4) / 2)\n" // (case 1)
135 " .byte((loc_fc065e36 - branchtable_fc065df4) / 2)\n" // (case 2)
136 " .byte((loc_fc065e36 - branchtable_fc065df4) / 2)\n" // (case 3)
137 " .byte((loc_fc065e36 - branchtable_fc065df4) / 2)\n" // (case 4)
138 " .byte((loc_fc065e36 - branchtable_fc065df4) / 2)\n" // (case 5)
139 " .byte((loc_fc065e36 - branchtable_fc065df4) / 2)\n" // (case 6)
140 " .byte((loc_fc065e3c - branchtable_fc065df4) / 2)\n" // (case 7)
141 " .byte((loc_fc065e02 - branchtable_fc065df4) / 2)\n" // (case 8)
142 " .byte((loc_fc065e14 - branchtable_fc065df4) / 2)\n" // (case 9)
143 " .byte((loc_fc065e30 - branchtable_fc065df4) / 2)\n" // (case 10)
144 " .byte((loc_fc065e08 - branchtable_fc065df4) / 2)\n" // (case 11)
145 " .byte((loc_fc065e0e - branchtable_fc065df4) / 2)\n" // (case 12)
146 ".align 1\n"
147 "loc_fc065e02:\n" // case 8 - calls close, not seen in normal shooting
148 " bl sub_fc065fb6\n"
149 " b loc_fc065dd2\n"
150 "loc_fc065e08:\n" // case 11 - create dir, TODO not patched
151 " bl sub_fc066002\n"
152 " b loc_fc065dd2\n"
153 "loc_fc065e0e:\n" // case 12 - patch for open, main hook
154 " bl sub_fc065b7c_my\n"
155 " b loc_fc065dd2\n"
156 "loc_fc065e14:\n" // case 9 - not seen in normal shooting
157 " ldr r1, [r0, #4]\n"
158 " movs r2, #0\n"
159 " mov r4, r0\n"
160 " ldr r0, [r5, #4]\n"
161 " bl _lseek\n" // -> fwt_lseek ?
162 " adds r0, r0, #1\n"
163 " bne loc_fc065dd2\n"
164 " movs r0, #7\n"
165 " mov r1, r4\n"
166 " str r6, [r4, #0x14]\n"
167 " bl sub_fc065b04\n"
168 " b loc_fc065dd2\n"
169 "loc_fc065e30:\n" // case 10 - cache flush, patch for ignore write
170 " bl sub_fc066056\n"
171 " b loc_fc065dd2\n"
172 "loc_fc065e36:\n" // case 0-6 - write stage
173 " bl sub_fc0660ae_my\n"
174 " b loc_fc065dd2\n"
175 "loc_fc065e3c:\n" // case 7 - close stage
176 " bl sub_fc065ca2_my\n"
177 " b loc_fc065dd2\n"
178 ".ltorg\n"
179  );
180 }
void _LogCameraEvent ( int  id,
const char *  fmt,
  ... 
)
void log_fwt_msg ( fwt_data_struct fwd)

Definiert in Zeile 89 der Datei filewrite.c.

90 {
91  int m=fwd->unkn1;
92  _LogCameraEvent(0x60,"fw m:%d o:0x%08x fs:0x%08x sf:0x%x",m,fwd->file_offset,fwd->maybe_full_size,fwd->maybe_seek_flag);
93  _LogCameraEvent(0x60,"fw %s",fwd->name);
94  if(m >= 0 && m <=6) {
95  _LogCameraEvent(0x60,"fw chunk adr:0x%08x l:0x%08x",fwd->pdc[m].address,fwd->pdc[m].length);
96  }
97  _LogCameraEvent(0x60,"fw u %08x %08x %08x %08x %08x %08x",fwd->unkn2,fwd->unkn3,fwd->unkn4,fwd->unkn5,fwd->unkn6);
98 }
void log_fwt_start ( void  )

Definiert in Zeile 100 der Datei filewrite.c.

101 {
102  _LogCameraEvent(0x60,"fw start");
103 }