X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=disassembler%2Fmain.h;h=354d00196f574ad9916722eee162f21e7588b3c9;hb=1a0b297432349ca1ad02461f962dc805da1e6949;hp=d3ceb3741171953a8b3a3bdfec8dad70f4604571;hpb=2e928c1b94243e38477f113b92d78876a15439be;p=b43-tools.git diff --git a/disassembler/main.h b/disassembler/main.h index d3ceb37..354d001 100644 --- a/disassembler/main.h +++ b/disassembler/main.h @@ -3,6 +3,28 @@ #include +#include "util.h" + + +/* The header that fwcutter also puts in to every .fw file */ +struct fw_header { + /* Type of the firmware data */ + uint8_t type; + /* Version number of the firmware data format */ + uint8_t ver; + uint8_t __padding[2]; + /* Size of the data. For ucode and PCM this is in bytes. + * For IV this is in number-of-ivs. (big-endian!) */ + be32_t size; +} __attribute__ ((__packed__)); + +/* struct fw_header -> type */ +#define FW_TYPE_UCODE 'u' +#define FW_TYPE_PCM 'p' +#define FW_TYPE_IV 'i' +/* struct fw_header -> ver */ +#define FW_HDR_VER 0x01 + FILE *infile; FILE *outfile;