forked from Ithamar/awutils
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathimagewty.h
More file actions
54 lines (46 loc) · 1.49 KB
/
imagewty.h
File metadata and controls
54 lines (46 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef IMAGEWTY_H
#define IMAGEWTY_H
#include <stdint.h>
#define IMAGEWTY_MAGIC "IMAGEWTY"
#define IMAGEWTY_MAGIC_LEN 8
#define IMAGEWTY_VERSION 0x100234
#define IMAGEWTY_FILEHDR_LEN 1024
struct imagewty_header {
char magic[IMAGEWTY_MAGIC_LEN];
uint32_t val256;
uint32_t header_size; /* Image header size (sizeof(struct imagewty_header)) */
uint32_t unknown;
uint32_t version; /* format version (IMAGEWTY_VERSION) */
uint32_t size; /* total size of file headers? */
uint32_t filehdr_len; /* size of image (seems too large!) */
uint32_t pid; /* USB peripheral ID (from image.cfg) */
uint32_t vid; /* USB vendor ID (from image.cfg) */
uint32_t hardware_id; /* Hardware ID (from image.cfg) */
uint32_t firmware_id; /* Firmware ID (from image.cfg) */
uint32_t val1; /* */
uint32_t val1024; /* */
uint32_t num_files; /* Total number of files embedded */
uint32_t val1024_2; /* */
uint32_t val0; /* */
uint32_t val0_2; /* */
uint32_t val0_3; /* */
uint32_t val0_4; /* */
/* 0x0050 */
};
#define IMAGEWTY_FHDR_MAINTYPE_LEN 8
#define IMAGEWTY_FHDR_SUBTYPE_LEN 16
#define IMAGEWTY_FHDR_FILENAME_LEN 256
struct imagewty_file_header {
uint32_t filename_len;
uint32_t total_header_size;
const char maintype[IMAGEWTY_FHDR_MAINTYPE_LEN];
const char subtype[IMAGEWTY_FHDR_SUBTYPE_LEN];
uint32_t unknown_3;
uint32_t stored_length;
uint32_t original_length;
uint32_t offset;
uint32_t unknown;
const char filename[IMAGEWTY_FHDR_FILENAME_LEN];
/* 0x300 */
};
#endif /* IMAGEWTY_H */