CHDK_DE Vorschauversion  Trunk Rev. 5273
 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
 
#define FWT_MUSTSEEK   0x40
 
#define FWT_SEEKMASK   0x40
 

Funktionen

void __attribute__ ((naked, noinline))
 *-------------------------------------------------------------------— Mehr ...
 

Makro-Dokumentation

#define FWT_MUSTSEEK   0x40

Definiert in Zeile 35 der Datei filewrite.c.

#define FWT_SEEKMASK   0x40

Definiert in Zeile 36 der Datei filewrite.c.

#define MAX_CHUNKS_FOR_JPEG   7

Definiert in Zeile 12 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

Definiert in Zeile 42 der Datei filewrite.c.

42  {
43 asm volatile (
44 " STMFD SP!, {R1-R7,LR} \n"
45 " LDR R5, =0x124E0 \n"
46 " MOV R6, #0 \n"
47 
48 "loc_F840E760:\n"
49 " LDR R0, [R5, #0x10] \n"
50 " MOV R2, #0 \n"
51 " ADD R1, SP, #8 \n"
52 " BL sub_0068F164 /*_ReceiveMessageQueue*/ \n"
53 " CMP R0, #0 \n"
54 " MOVNE R1, #0x3EC \n"
55 " LDRNE R0, =0xF840E920 /*'dwFWrite.c'*/ \n"
56 " BLNE _DebugAssert \n"
57 " LDR R0, [SP, #8] \n"
58 " LDR R1, [R0] \n"
59 " CMP R1, #0xD \n"
60 " ADDCC PC, PC, R1, LSL#2 \n"
61 " B loc_F840E760 \n"
62 " B loc_F840E8E8 \n"
63 " B loc_F840E8E8 \n"
64 " B loc_F840E8E8 \n"
65 " B loc_F840E8E8 \n"
66 " B loc_F840E8E8 \n"
67 " B loc_F840E8E8 \n"
68 " B loc_F840E8E8 \n"
69 " B loc_F840E8F0 \n"
70 " B loc_F840E7C8 \n"
71 " B loc_F840E864 \n"
72 " B loc_F840E894 \n"
73 " B loc_F840E830 \n"
74 " B loc_F840E85C \n"
75 
76 "loc_F840E7C8:\n"
77 " MOV R4, R5 \n"
78 " STR R6, [SP] \n"
79 
80 "loc_F840E7D0:\n"
81 " LDR R0, [R4, #0x10] \n"
82 " MOV R1, SP \n"
83 " BL sub_0068F3A8 /*_GetNumberOfPostedMessages*/ \n"
84 " LDR R0, [SP] \n"
85 " CMP R0, #0 \n"
86 " BEQ loc_F840E7FC \n"
87 " LDR R0, [R4, #0x10] \n"
88 " MOV R2, #0 \n"
89 " ADD R1, SP, #4 \n"
90 " BL sub_0068F164 /*_ReceiveMessageQueue*/ \n"
91 " B loc_F840E7D0 \n"
92 
93 "loc_F840E7FC:\n"
94 " LDR R0, [R4, #4] \n"
95 " CMN R0, #1 \n"
96 " BEQ loc_F840E824 \n"
97 " BL fwt_close \n" // --> Patched. Old value = _Close.
98 " MVN R0, #0 \n"
99 " STR R0, [R4, #4] \n"
100 " LDR R0, =0x228608 \n"
101 " BL sub_F80939E4 \n"
102 " MOV R1, #0 \n"
103 " BL sub_F8091C34 \n"
104 
105 "loc_F840E824:\n"
106 " LDR R0, [R4, #0xC] \n"
107 " BL _GiveSemaphore \n"
108 " B loc_F840E760 \n"
109 
110 "loc_F840E830:\n"
111 " MOV R4, R0 \n"
112 " ADD R0, R0, #0x58 \n"
113 " BL sub_F80939E4 \n"
114 " MOV R1, #0 \n"
115 " BL sub_F8091AF8 \n"
116 " LDR R0, [R4, #0xC] \n"
117 " BL sub_F8000370 \n"
118 " ADD R0, R4, #0x58 \n"
119 //mod start
120 " LDR R3, =ignore_current_write\n" // !!
121 " LDR R3, [R3]\n"
122 " CMP R3, #0\n"
123 " BNE loc_A\n" // skip creating directory
124 //mod end
125 " BL sub_F8024984 \n"
126 " ADD R0, R4, #0x58 \n"
127 " B loc_F840E8C8 \n"
128 
129 "loc_F840E85C:\n"
130 " BL sub_F840E440_my \n" // --> Patched. Old value = 0xF840E440. Open stage
131 " B loc_F840E760 \n"
132 
133 "loc_F840E864:\n"
134 " LDR R1, [R0, #4] \n"
135 " MOV R4, R0 \n"
136 " LDR R0, [R5, #4] \n"
137 " MOV R2, #0 \n"
138 " BL fwt_lseek \n" // --> Patched. Old value = _lseek.
139 " CMN R0, #1 \n"
140 " LDREQ R0, =0x9200013 \n"
141 " MOVEQ R1, R4 \n"
142 " STREQ R0, [R4, #0x10] \n"
143 " MOVEQ R0, #7 \n"
144 " BLEQ sub_F840E380 \n"
145 " B loc_F840E760 \n"
146 
147 "loc_F840E894:\n"
148 " MOV R4, R0 \n"
149 " LDRSB R0, [R0, #0x58] \n"
150 " CMP R0, #0 \n"
151 " BEQ loc_F840E760 \n"
152 " STRB R0, [SP, #4] \n"
153 " ADD R0, R4, #0x58 \n"
154 " STRB R6, [SP, #5] \n"
155 " BL sub_F80939E4 \n"
156 " MOV R1, #0 \n"
157 " BL sub_F8091AF8 \n"
158 //mod start
159 " LDR R3, =ignore_current_write\n" // !!
160 " LDR R3, [R3]\n"
161 " CMP R3, #0\n"
162 " BNE loc_B\n" // skip flushing the cache
163 //mod end
164 " ADD R0, SP, #4 \n"
165 " BL sub_F80909FC \n"
166 "loc_B:\n"
167 " ADD R0, R4, #0x58 \n"
168 
169 "loc_F840E8C8:\n"
170 "loc_A:\n"
171 " BL sub_F80939E4 \n"
172 " LDR R1, [R5, #0x18] \n"
173 " BL sub_F8091C34 \n"
174 " LDR R1, [R5, #0x14] \n"
175 " CMP R1, #0 \n"
176 " LDRNE R0, [R4, #0x10] \n"
177 " BLXNE R1 \n"
178 " B loc_F840E760 \n"
179 
180 "loc_F840E8E8:\n"
181 " BL sub_F840EAFC_my \n" // --> Patched. Old value = 0xF840EAFC. Write stage
182 " B loc_F840E760 \n"
183 
184 "loc_F840E8F0:\n"
185 " BL sub_F840E5CC_my \n" // --> Patched. Old value = 0xF840E5CC. Close stage
186 " B loc_F840E760 \n"
187 );
188 }