CHDK_DE Vorschauversion  Trunk Rev. 5426
 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 38 der Datei filewrite.c.

#define FWT_SEEKMASK   0x40

Definiert in Zeile 39 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)  )

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

!!

Definiert in Zeile 45 der Datei filewrite.c.

45  {
46 asm volatile (
47 " STMFD SP!, {R1-R7,LR} \n"
48 " LDR R5, =0xC724 \n"
49 " MOV R6, #0 \n"
50 
51 "loc_FF3392C0:\n"
52 " LDR R0, [R5, #0x10] \n"
53 " MOV R2, #0 \n"
54 " ADD R1, SP, #8 \n"
55 " BL sub_00677418 /*_ReceiveMessageQueue*/ \n"
56 " CMP R0, #0 \n"
57 " LDRNE R1, =0x3EF \n"
58 " LDRNE R0, =0xFF339480 /*'dwFWrite.c'*/ \n"
59 " BLNE _DebugAssert \n"
60 " LDR R0, [SP, #8] \n"
61 " LDR R1, [R0] \n"
62 " CMP R1, #0xD \n"
63 " ADDCC PC, PC, R1, LSL#2 \n"
64 " B loc_FF3392C0 \n"
65 " B loc_FF339448 \n"
66 " B loc_FF339448 \n"
67 " B loc_FF339448 \n"
68 " B loc_FF339448 \n"
69 " B loc_FF339448 \n"
70 " B loc_FF339448 \n"
71 " B loc_FF339448 \n"
72 " B loc_FF339450 \n"
73 " B loc_FF339328 \n"
74 " B loc_FF3393C4 \n"
75 " B loc_FF3393F4 \n"
76 " B loc_FF339390 \n"
77 " B loc_FF3393BC \n"
78 
79 "loc_FF339328:\n"
80 " MOV R4, R5 \n"
81 " STR R6, [SP] \n"
82 
83 "loc_FF339330:\n"
84 " LDR R0, [R4, #0x10] \n"
85 " MOV R1, SP \n"
86 " BL sub_0067765C /*_GetNumberOfPostedMessages*/ \n"
87 " LDR R0, [SP] \n"
88 " CMP R0, #0 \n"
89 " BEQ loc_FF33935C \n"
90 " LDR R0, [R4, #0x10] \n"
91 " MOV R2, #0 \n"
92 " ADD R1, SP, #4 \n"
93 " BL sub_00677418 /*_ReceiveMessageQueue*/ \n"
94 " B loc_FF339330 \n"
95 
96 "loc_FF33935C:\n"
97 " LDR R0, [R4, #4] \n"
98 " CMN R0, #1 \n"
99 " BEQ loc_FF339384 \n"
100 " BL fwt_close \n" // --> Patched. Old value = _Close.
101 " MVN R0, #0 \n"
102 " STR R0, [R4, #4] \n"
103 " LDR R0, =0x1A5400 \n"
104 " BL sub_FF0A6164 \n"
105 " MOV R1, #0 \n"
106 " BL sub_FF0A4088 \n"
107 
108 "loc_FF339384:\n"
109 " LDR R0, [R4, #0xC] \n"
110 " BL _GiveSemaphore \n"
111 " B loc_FF3392C0 \n"
112 
113 "loc_FF339390:\n"
114 " MOV R4, R0 \n"
115 " ADD R0, R0, #0x58 \n"
116 " BL sub_FF0A6164 \n"
117 " MOV R1, #0 \n"
118 " BL sub_FF0A3F4C \n"
119 " LDR R0, [R4, #0xC] \n"
120 " BL sub_FF0A2E28 \n"
121 " ADD R0, R4, #0x58 \n"
122 
123 //mod start
124 " LDR R3, =ignore_current_write\n" // !!
125 " LDR R3, [R3]\n"
126 " CMP R3, #0\n"
127 " BNE loc_A\n" // skip creating directory
128 //mod end
129 " BL sub_FF034868 \n"
130 " ADD R0, R4, #0x58 \n"
131 " B loc_FF339428 \n"
132 
133 "loc_FF3393BC:\n"
134 " BL sub_FF338FA0_my \n" // --> Patched. Old value = 0xFF338FA0. Open stage
135 " B loc_FF3392C0 \n"
136 
137 "loc_FF3393C4:\n"
138 " LDR R1, [R0, #4] \n"
139 " MOV R4, R0 \n"
140 " LDR R0, [R5, #4] \n"
141 " MOV R2, #0 \n"
142 " BL fwt_lseek \n" // --> Patched. Old value = _lseek.
143 " CMN R0, #1 \n"
144 " LDREQ R0, =0x9200013 \n"
145 " MOVEQ R1, R4 \n"
146 " STREQ R0, [R4, #0x10] \n"
147 " MOVEQ R0, #7 \n"
148 " BLEQ sub_FF338EE0 \n"
149 " B loc_FF3392C0 \n"
150 
151 "loc_FF3393F4:\n"
152 " MOV R4, R0 \n"
153 " LDRSB R0, [R0, #0x58] \n"
154 " CMP R0, #0 \n"
155 " BEQ loc_FF3392C0 \n"
156 " STRB R0, [SP, #4] \n"
157 " ADD R0, R4, #0x58 \n"
158 " STRB R6, [SP, #5] \n"
159 " BL sub_FF0A6164 \n"
160 " MOV R1, #0 \n"
161 " BL sub_FF0A3F4C \n"
162 
163 //mod start
164 " LDR R3, =ignore_current_write\n" // !!
165 " LDR R3, [R3]\n"
166 " CMP R3, #0\n"
167 " BNE loc_B\n" // skip flushing the cache
168 //mod end
169 
170 " ADD R0, SP, #4 \n"
171 " BL sub_FF0A2E40 \n"
172 "loc_B:\n"
173 " ADD R0, R4, #0x58 \n"
174 
175 "loc_FF339428:\n"
176 "loc_A:\n"
177 " BL sub_FF0A6164 \n"
178 " LDR R1, [R5, #0x18] \n"
179 " BL sub_FF0A4088 \n"
180 " LDR R1, [R5, #0x14] \n"
181 " CMP R1, #0 \n"
182 " LDRNE R0, [R4, #0x10] \n"
183 " BLXNE R1 \n"
184 " B loc_FF3392C0 \n"
185 
186 "loc_FF339448:\n"
187 " BL sub_FF339660_my \n" // --> Patched. Old value = 0xFF339660. Write stage
188 " B loc_FF3392C0 \n"
189 
190 "loc_FF339450:\n"
191 " BL sub_FF33912C_my \n" // --> Patched. Old value = 0xFF33912C. Close stage
192 " B loc_FF3392C0 \n"
193 );
194 }