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 --- types.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 types.h (limited to 'types.h') diff --git a/types.h b/types.h new file mode 100644 index 0000000..d14f887 --- /dev/null +++ b/types.h @@ -0,0 +1,42 @@ +/** + * types.h + */ + +#ifndef __WII_TYPES_H__ +#define __WII_TYPES_H__ + +enum sig_type { + RSA_4096 = 0x00010000, + RSA_2048 = 0x00010001 +}; + +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +typedef unsigned long long u64; + +u16 be16(const u8 *p); +u32 be32(const u8 *p); +u64 be64(const u8 *p); +void wbe16(u8 *p, u16 x); +void wbe32(u8 *p, u32 x); +void wbe64(u8 *p, u64 x); + +#define round_up(x,n) (-(-(x) & -(n))) + +void hexdump(u8 *data, u32 len); + +/* Wii */ + +extern const u32 WII_BLOCK_SIZE; + +enum title_categories { + TITLE_CATEGORY_SYSTEM = 0x00001, + TITLE_CATEGORY_SAVEDATA = 0x10000, + TITLE_CATEGORY_CHANNEL = 0x10001, + TITLE_CATEGORY_SYSTEM_CHANNEL = 0x10002, + TITLE_CATEGORY_GAME_CHANNEL = 0x10004, + TITLE_CATEGORY_HIDDEN_CHANNEL = 0x10008 +}; + +#endif -- cgit v1.1-32-gdbae