1 #include "lolevel.h" 2 #include "platform.h" 3 4 typedef struct { 5 unsigned int address; 6 unsigned int length; 7 } cam_ptp_data_chunk; //camera specific structure 8 9 #define MAX_CHUNKS_FOR_FWT 7 // filewritetask is prepared for this many chunks 10 /* 11 * fwt_data_struct: defined here as it's camera dependent 12 * unneeded members are designated with unkn 13 * pdc is required, everything after that is optional (DryOS < R50) 14 * file_offset, full_size, seek_flag only needs to be defined for DryOS>=r50 generation cameras 15 */ 16 typedef struct 17 { 18 int unkn1; 19 int file_offset; 20 int full_size; 21 int unkn2, unkn3; 22 cam_ptp_data_chunk pdc[MAX_CHUNKS_FOR_FWT]; 23 int seek_flag; // offset from start 0x4c = 76 bytes = 19 words 24 int unkn4, unkn5; 25 char name[32]; // offset from start 0x58 = 88 bytes = 22 words 26 } fwt_data_struct; 27 // seek_flag is different: 28 // seek state is activated (from state 0xc, open) when 29 // (word at 0x4c) AND 0x40 30 // OR 31 // write offset is not 0 32 #define FWT_MUSTSEEK 0x40 // value of the masked seek_flag indicating seek is required 33 #define FWT_SEEKMASK 0x40 // masks out unneeded bits of seek_flag 34 35 #include "../../../generic/filewrite.c"