root/platform/n_facebook/sub/filewrite_hdr.c

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

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