From 9c1ded3b0ae8e540177ee0c0baa1f9c8fcf91989 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Wed, 18 Mar 2009 20:52:11 +0100 Subject: Initial commit of sources --- TODO | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 TODO (limited to 'TODO') diff --git a/TODO b/TODO new file mode 100644 index 0000000..35441e7 --- /dev/null +++ b/TODO @@ -0,0 +1,77 @@ +- Improve error checking and be strict on parsing errors +OK - Do not show extended information on WADs we can not parse like system IOS WADs +- Rewrite patcher to use Wii related structures to change data +- Allow unpacking and packing WAD files +- New API: + +--- + +wad_header +cert_chain +tik_header +tmd_header +tmd_content_records +content0 +build_info +imet +u8 +content1 +content2 +... +footer + +--- + +typedef struct { + build_info bi; + imet imet; + u8_archive *u8_archive; +} app_file; + +typedef struct { + tmd_header header; + tmd_content_record *content_record[]; +} tmd_file; + +typdef struct { + wad_header header; + char cert_chain; + tik tik; + tmd_file tmd_file; + char *content; + char *footer; +} wad_file; + +void wad_header_read(FILE *f, wad_header *header); +void wad_header_write(FILE *f, wad_header *header); + u32 wad_header_get_section_offset(wad_header *header, u8 section); +void wad_seek_to_section(FILE *f, u8 section); + +void cert_chain_read(FILE *f, char *cert_chain, u32 size); +void cert_chain_write(FILE *f, char *cert_chain, u32 size); + +void ticket_read(FILE *f, wii_tik *ticket); +void ticket_write(FILE *f, wii_tik *ticket); + +void tmd_read(FILE *f, char *tmd, u32 size); +void tmd_write(FILE *f, char *tmd, u32 size); +void tmd_free(char *tmd); + u32 tmd_content_records_calculate_content_block_size(tmd_content_record *records, u16 num_records); + +void content_read(FILE *f, char *content, u32 size); +void content_write(FILE *f, char *content, u32 size); +void content_free(char *content); + +void content_decrypt(char *content, tmd_content_record *record, tik *tik); +void content_encrypt(char *content, tmd_content_record *record, tik *tik); + +void footer_read(FILE *f, char *footer, u32 size); +void footer_write(FILE *f, char *footer, u32 size); +void footer_free(char *footer); + +void build_info_read(FILE *f, build_info *bi); +void build_info_write(FILE *f, build_info *bi); + +void imet_read(FILE *f, imet *imet); +void imet_write(FILE *f, imet *imet); + -- cgit v1.1-32-gdbae