Line 1: |
Line 1: |
| [[Category:Software]] | | [[Category:Software]] |
| | | |
− | /**************************************************************/
| + | == Nintendo Wii Title-Metadata (tmd) file structure == |
− | //
| + | |
− | // Nintendo Wii Virtual Console tmd-file structure
| + | A "title" is a standalone entity -- a game, a channel, etc. Titles can be made up of multiple "contents". (Don't ask me I just work here.) |
− | //
| |
− | // v.0.1 | |
− | //
| |
− | // by Lockhool for #wiidev at efnet
| |
− | // 14.12.2007 | |
− | /**************************************************************/
| |
| | | |
| // Common labels used in this file: | | // Common labels used in this file: |
Line 21: |
Line 15: |
| // # in front of a comment signifies entires that are | | // # in front of a comment signifies entires that are |
| // the same in each tmd-files the author checked | | // the same in each tmd-files the author checked |
− | //
| |
− | // ! Remember the Wii has a LITTLE-ENDIAN processor. When !
| |
− | // ! working with ints or shorts on none-LE machines !
| |
− | // ! (e.g. PPC Mac) you need to swap the byteorder. !
| |
| | | |
| typedef unsigned char u8; | | typedef unsigned char u8; |
| typedef unsigned short u16; | | typedef unsigned short u16; |
− | typedef unsigned int u32; | + | typedef unsigned int u32; |
| + | typedef unsigned long u64; |
| | | |
− | typedef struct{ | + | typedef struct { |
− | u32 file [0x1]; // name of the file to download | + | u32 cid; // content id |
− | u16 num [0x1]; // # number of the file | + | u16 index; // # number of the file |
− | u8 undef0 [0x1]; // might be 0x00 or 0x80 | + | u16 type; |
− | u8 undef1 [0x1]; // # 0x01 | + | u64 size; |
− | u8 zeros0 [0x4]; // # 0 | + | u8 hash [20]; // SHA1 hash content |
− | u32 length [0x1]; // non-padded filelength
| + | } content_record; // size: 0x30 bytes |
− | u8 hash [0x14]; // ? maybe SHA1-hash
| |
− | }VC_TMD_FILE; // size: 0x30 bytes | |
| | | |
| typedef struct{ | | typedef struct{ |