blob: d07adad61e02bf115011bc383db71ab96a4e5e41 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/**
* types.h
*/
#ifndef __WII_TYPES_H__
#define __WII_TYPES_H__
#ifndef ATTRIBUTE_ALIGN
# define ATTRIBUTE_ALIGN(v) __attribute__((aligned(v)))
#endif
#ifndef ATTRIBUTE_PACKED
# define ATTRIBUTE_PACKED __attribute__((packed))
#endif
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
|