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