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 46 der Datei filewrite.c.

46  {
47 asm volatile (
48 " STMFD SP!, {R1-R7,LR} \n"
49 " LDR R5, =0xB460 \n"
50 " MOV R6, #0 \n"
51 
52 "loc_FFAA2560:\n"
53 " LDR R0, [R5, #0x10] \n"
54 " MOV R2, #0 \n"
55 " ADD R1, SP, #8 \n"
56 " BL sub_006B8458 /*_ReceiveMessageQueue*/ \n"
57 " CMP R0, #0 \n"
58 " LDRNE R2, =0x3F5 \n"
59 " LDRNE R1, =0xFFAA2720 /*'dwFWrite.c'*/ \n"
60 " MOVNE R0, #0 \n"
61 " BLNE _DebugAssert \n"
62 " LDR R0, [SP, #8] \n"
63 " LDR R1, [R0] \n"
64 " CMP R1, #0xD \n"
65 " ADDCC PC, PC, R1, LSL#2 \n"
66 " B loc_FFAA2560 \n"
67 " B loc_FFAA26EC \n"
68 " B loc_FFAA26EC \n"
69 " B loc_FFAA26EC \n"
70 " B loc_FFAA26EC \n"
71 " B loc_FFAA26EC \n"
72 " B loc_FFAA26EC \n"
73 " B loc_FFAA26EC \n"
74 " B loc_FFAA26F4 \n"
75 " B loc_FFAA25CC \n"
76 " B loc_FFAA2668 \n"
77 " B loc_FFAA2698 \n"
78 " B loc_FFAA2634 \n"
79 " B loc_FFAA2660 \n"
80 
81 "loc_FFAA25CC:\n"
82 " MOV R4, R5 \n"
83 " STR R6, [SP] \n"
84 
85 "loc_FFAA25D4:\n"
86 " LDR R0, [R4, #0x10] \n"
87 " MOV R1, SP \n"
88 " BL sub_006B86D4 /*_GetNumberOfPostedMessages*/ \n"
89 " LDR R0, [SP] \n"
90 " CMP R0, #0 \n"
91 " BEQ loc_FFAA2600 \n"
92 " LDR R0, [R4, #0x10] \n"
93 " MOV R2, #0 \n"
94 " ADD R1, SP, #4 \n"
95 " BL sub_006B8458 /*_ReceiveMessageQueue*/ \n"
96 " B loc_FFAA25D4 \n"
97 
98 "loc_FFAA2600:\n"
99 " LDR R0, [R4, #4] \n"
100 " CMN R0, #1 \n"
101 " BEQ loc_FFAA2628 \n"
102 " BL fwt_close \n" // --> Patched. Old value = _Close.
103 " MVN R0, #0 \n"
104 " STR R0, [R4, #4] \n"
105 " LDR R0, =0xFC318 \n"
106 " BL sub_FF830358 \n"
107 " MOV R1, #0 \n"
108 " BL sub_FF82E1CC \n"
109 
110 "loc_FFAA2628:\n"
111 " LDR R0, [R4, #0xC] \n"
112 " BL _GiveSemaphore \n"
113 " B loc_FFAA2560 \n"
114 
115 "loc_FFAA2634:\n"
116 " MOV R4, R0 \n"
117 " ADD R0, R0, #0x58 \n"
118 " BL sub_FF830358 \n"
119 " MOV R1, #0 \n"
120 " BL sub_FF82E08C \n"
121 " LDR R0, [R4, #0xC] \n"
122 " BL sub_FF82D128 \n"
123 
124 //mod start
125 " LDR R3, =ignore_current_write\n" // !!
126 " LDR R3, [R3]\n"
127 " CMP R3, #0\n"
128 " BNE loc_A\n" // skip creating directory
129 //mod end
130 " ADD R0, R4, #0x58 \n"
131 " BL sub_FF8277FC \n"
132 "loc_A:\n"
133 " ADD R0, R4, #0x58 \n"
134 " B loc_FFAA26CC \n"
135 
136 "loc_FFAA2660:\n"
137 " BL sub_FFAA2234_my \n" // --> Patched. Old value = 0xFFAA2234. Open stage
138 " B loc_FFAA2560 \n"
139 
140 "loc_FFAA2668:\n"
141 " LDR R1, [R0, #4] \n"
142 " MOV R4, R0 \n"
143 " LDR R0, [R5, #4] \n"
144 " MOV R2, #0 \n"
145 " BL fwt_lseek \n" // --> Patched. Old value = _lseek.
146 " CMN R0, #1 \n"
147 " LDREQ R0, =0x9200013 \n"
148 " MOVEQ R1, R4 \n"
149 " STREQ R0, [R4, #0x10] \n"
150 " MOVEQ R0, #7 \n"
151 " BLEQ sub_FFAA2174 \n"
152 " B loc_FFAA2560 \n"
153 
154 "loc_FFAA2698:\n"
155 " MOV R4, R0 \n"
156 " LDRSB R0, [R0, #0x58] \n"
157 " CMP R0, #0 \n"
158 " BEQ loc_FFAA2560 \n"
159 " STRB R0, [SP, #4] \n"
160 " ADD R0, R4, #0x58 \n"
161 " STRB R6, [SP, #5] \n"
162 " BL sub_FF830358 \n"
163 " MOV R1, #0 \n"
164 " BL sub_FF82E08C \n"
165 
166 //mod start
167 " LDR R3, =ignore_current_write\n" // !!
168 " LDR R3, [R3]\n"
169 " CMP R3, #0\n"
170 " BNE loc_B\n" // skip flushing the cache
171 //mod end
172 
173 " ADD R0, SP, #4 \n"
174 " BL sub_FF82D140 \n"
175 "loc_B:\n"
176 " ADD R0, R4, #0x58 \n"
177 
178 "loc_FFAA26CC:\n"
179 " BL sub_FF830358 \n"
180 " LDR R1, [R5, #0x1C] \n"
181 " BL sub_FF82E1CC \n"
182 " LDR R1, [R5, #0x14] \n"
183 " CMP R1, #0 \n"
184 " LDRNE R0, [R4, #0x10] \n"
185 " BLXNE R1 \n"
186 " B loc_FFAA2560 \n"
187 
188 "loc_FFAA26EC:\n"
189 " BL sub_FFAA2914_my \n" // --> Patched. Old value = 0xFFAA2914. Write stage
190 " B loc_FFAA2560 \n"
191 
192 "loc_FFAA26F4:\n"
193 " BL sub_FFAA23CC_my \n" // --> Patched. Old value = 0xFFAA23CC. Close stage
194 " B loc_FFAA2560 \n"
195 );
196 }