2012-01-21 21:57:41 +01:00
|
|
|
#ifndef _DISC_H_
|
|
|
|
#define _DISC_H_
|
|
|
|
|
|
|
|
/* Disc header structure */
|
|
|
|
struct discHdr
|
|
|
|
{
|
|
|
|
/* Game ID */
|
|
|
|
u8 id[6];
|
|
|
|
|
|
|
|
/* Game version */
|
|
|
|
u16 version;
|
|
|
|
|
|
|
|
/* Audio streaming */
|
|
|
|
u8 streaming;
|
|
|
|
u8 bufsize;
|
|
|
|
|
|
|
|
/* Padding */
|
|
|
|
u64 chantitle; // Used for channels
|
|
|
|
|
|
|
|
/* Sorting */
|
|
|
|
u16 index;
|
|
|
|
u8 esrb;
|
|
|
|
u8 controllers;
|
|
|
|
u8 players;
|
|
|
|
u8 wifi;
|
|
|
|
|
|
|
|
/* Wii Magic word */
|
|
|
|
u32 magic;
|
|
|
|
|
|
|
|
/* GC Magic word */
|
|
|
|
u32 gc_magic;
|
|
|
|
|
|
|
|
/* Game title */
|
|
|
|
char title[64];
|
|
|
|
|
|
|
|
/* Encryption/Hashing */
|
|
|
|
u8 encryption;
|
|
|
|
u8 h3_verify;
|
|
|
|
|
|
|
|
/* Padding */
|
|
|
|
u32 casecolor;
|
|
|
|
u8 unused3[26];
|
|
|
|
} ATTRIBUTE_PACKED;
|
|
|
|
|
|
|
|
struct dir_discHdr
|
|
|
|
{
|
|
|
|
struct discHdr hdr;
|
|
|
|
char path[256];
|
|
|
|
wchar_t title[64];
|
|
|
|
} ATTRIBUTE_PACKED;
|
|
|
|
|
|
|
|
struct gc_discHdr
|
|
|
|
{
|
|
|
|
/* Game ID */
|
|
|
|
u8 id[6];
|
|
|
|
|
|
|
|
/* Game version */
|
|
|
|
u16 version;
|
|
|
|
|
|
|
|
/* Audio streaming */
|
|
|
|
u8 streaming;
|
|
|
|
u8 bufsize;
|
|
|
|
|
|
|
|
/* Padding */
|
|
|
|
u8 unused1[18];
|
|
|
|
|
|
|
|
/* Magic word */
|
|
|
|
u32 magic;
|
|
|
|
|
|
|
|
/* Game title */
|
2012-02-17 03:35:42 +01:00
|
|
|
char title[64];
|
|
|
|
|
|
|
|
/* Padding */
|
|
|
|
u8 unused2[64];
|
2012-01-21 21:57:41 +01:00
|
|
|
} ATTRIBUTE_PACKED;
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2012-05-12 18:03:14 +02:00
|
|
|
/* Prototypes */
|
|
|
|
s32 Disc_Init(void);
|
|
|
|
s32 Disc_Open(void);
|
|
|
|
s32 Disc_Wait(void);
|
|
|
|
s32 Disc_SetUSB(const u8 *);
|
|
|
|
s32 Disc_ReadHeader(void *);
|
|
|
|
s32 Disc_ReadGCHeader(void *);
|
|
|
|
s32 Disc_Type(bool);
|
|
|
|
s32 Disc_IsWii(void);
|
|
|
|
s32 Disc_IsGC(void);
|
2012-05-15 23:33:53 +02:00
|
|
|
s32 Disc_BootPartition();
|
|
|
|
s32 Disc_FindPartition(u64 *outbuf);
|
|
|
|
|
2012-05-16 17:27:14 +02:00
|
|
|
void RunApploader(u64 offset, u8 vidMode, bool vipatch, bool countryString, u8 patchVidMode, int aspectRatio);
|
2012-01-21 21:57:41 +01:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|