summaryrefslogtreecommitdiffstats
path: root/types.h
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2009-03-18 20:52:11 +0100
committerGravatar Martin Szulecki2009-03-18 20:52:11 +0100
commit9c1ded3b0ae8e540177ee0c0baa1f9c8fcf91989 (patch)
tree38aa36327c9e3c0fef1ef7ee77c707d987aff9d0 /types.h
downloadwiiwadtools-9c1ded3b0ae8e540177ee0c0baa1f9c8fcf91989.tar.gz
wiiwadtools-9c1ded3b0ae8e540177ee0c0baa1f9c8fcf91989.tar.bz2
Initial commit of sources
Diffstat (limited to 'types.h')
-rw-r--r--types.h42
1 files changed, 42 insertions, 0 deletions
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