CHDK_DE Vorschauversion  Trunk Rev. 5272
 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))
 

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, =0xA814 \n"
49 " MOV R6, #0 \n"
50 
51 "loc_FFA73EF8:\n"
52 " LDR R0, [R5, #0x10] \n"
53 " MOV R2, #0 \n"
54 " ADD R1, SP, #8 \n"
55 " BL sub_003F7418 /*_ReceiveMessageQueue*/ \n"
56 " CMP R0, #0 \n"
57 " LDRNE R1, =0x3EF \n"
58 " LDRNE R0, =0xFFA740B8 /*'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_FFA73EF8 \n"
65 " B loc_FFA74080 \n"
66 " B loc_FFA74080 \n"
67 " B loc_FFA74080 \n"
68 " B loc_FFA74080 \n"
69 " B loc_FFA74080 \n"
70 " B loc_FFA74080 \n"
71 " B loc_FFA74080 \n"
72 " B loc_FFA74088 \n"
73 " B loc_FFA73F60 \n"
74 " B loc_FFA73FFC \n"
75 " B loc_FFA7402C \n"
76 " B loc_FFA73FC8 \n"
77 " B loc_FFA73FF4 \n"
78 
79 "loc_FFA73F60:\n"
80 " MOV R4, R5 \n"
81 " STR R6, [SP] \n"
82 
83 "loc_FFA73F68:\n"
84 " LDR R0, [R4, #0x10] \n"
85 " MOV R1, SP \n"
86 " BL sub_003F765C /*_GetNumberOfPostedMessages*/ \n"
87 " LDR R0, [SP] \n"
88 " CMP R0, #0 \n"
89 " BEQ loc_FFA73F94 \n"
90 " LDR R0, [R4, #0x10] \n"
91 " MOV R2, #0 \n"
92 " ADD R1, SP, #4 \n"
93 " BL sub_003F7418 /*_ReceiveMessageQueue*/ \n"
94 " B loc_FFA73F68 \n"
95 
96 "loc_FFA73F94:\n"
97 " LDR R0, [R4, #4] \n"
98 " CMN R0, #1 \n"
99 " BEQ loc_FFA73FBC \n"
100 " BL fwt_close \n" // --> Patched. Old value = _Close.
101 " MVN R0, #0 \n"
102 " STR R0, [R4, #4] \n"
103 " LDR R0, =0xEC3E0 \n"
104 " BL sub_FF875978 \n"
105 " MOV R1, #0 \n"
106 " BL sub_FF873868 \n"
107 
108 "loc_FFA73FBC:\n"
109 " LDR R0, [R4, #0xC] \n"
110 " BL _GiveSemaphore \n"
111 " B loc_FFA73EF8 \n"
112 
113 "loc_FFA73FC8:\n"
114 " MOV R4, R0 \n"
115 " ADD R0, R0, #0x58 \n"
116 " BL sub_FF875978 \n"
117 " MOV R1, #0 \n"
118 " BL sub_FF87372C \n"
119 " LDR R0, [R4, #0xC] \n"
120 " BL sub_FF8727E4 \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_FF82DAF8 \n"
130 " ADD R0, R4, #0x58 \n"
131 " B loc_FFA74060 \n"
132 
133 "loc_FFA73FF4:\n"
134 " BL sub_FFA73BD8_my \n" // --> Patched. Old value = 0xFFA73BD8. Open stage
135 " B loc_FFA73EF8 \n"
136 
137 "loc_FFA73FFC:\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_FFA73B18 \n"
149 " B loc_FFA73EF8 \n"
150 
151 "loc_FFA7402C:\n"
152 " MOV R4, R0 \n"
153 " LDRSB R0, [R0, #0x58] \n"
154 " CMP R0, #0 \n"
155 " BEQ loc_FFA73EF8 \n"
156 " STRB R0, [SP, #4] \n"
157 " ADD R0, R4, #0x58 \n"
158 " STRB R6, [SP, #5] \n"
159 " BL sub_FF875978 \n"
160 " MOV R1, #0 \n"
161 " BL sub_FF87372C \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_FF8727FC \n"
172 "loc_B:\n"
173 " ADD R0, R4, #0x58 \n"
174 
175 "loc_FFA74060:\n"
176 "loc_A:\n"
177 " BL sub_FF875978 \n"
178 " LDR R1, [R5, #0x18] \n"
179 " BL sub_FF873868 \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_FFA73EF8 \n"
185 
186 "loc_FFA74080:\n"
187 " BL sub_FFA74298_my \n" // --> Patched. Old value = 0xFFA74298. Write stage
188 " B loc_FFA73EF8 \n"
189 
190 "loc_FFA74088:\n"
191 " BL sub_FFA73D64_my \n" // --> Patched. Old value = 0xFFA73D64. Close stage
192 " B loc_FFA73EF8 \n"
193 );
194 }