root/platform/ixus140_elph130/sub/filewrite_hdr.c

/* [<][>][^][v][top][bottom][index][help] */
   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                               // Found in sub_FF339D5C (1.00a) --> "CMP     R0, #6" and
  11                               // corresponds to filewritetask() jump table entries 0-6
  12 /*
  13  * fwt_data_struct: defined here as it's camera dependent
  14  * unneeded members are designated with unkn
  15  * file_offset, full_size, seek_flag only needs to be defined for DryOS>=r50 generation cameras
  16  * pdc is always required
  17  * name is not currently used
  18  */
  19 typedef struct
  20 {
  21     int unkn1;
  22     int file_offset;
  23     int full_size;
  24     int unkn2, unkn3;
  25     cam_ptp_data_chunk pdc[MAX_CHUNKS_FOR_FWT];
  26     int seek_flag;      // offset from start 0x4c = 76 bytes = 19 words
  27     int unkn4, unkn5;
  28     char name[32];      // offset from start 0x58 = 88 bytes = 22 words
  29 } fwt_data_struct;
  30 // seek_flag is different:
  31 // seek state is activated (from state 0xc, open) when
  32 // (word at 0x4c) AND 0x40
  33 // OR
  34 // write offset is not 0
  35 #define FWT_MUSTSEEK    0x40   // value of the masked seek_flag indicating seek is required
  36 #define FWT_SEEKMASK    0x40   // masks out unneeded bits of seek_flag
  37 
  38 #include "../../../generic/filewrite.c"

/* [<][>][^][v][top][bottom][index][help] */