2010-02-27 19:18:01 +01:00
|
|
|
#ifndef _DISC_H_
|
|
|
|
#define _DISC_H_
|
|
|
|
|
2009-09-27 20:19:53 +02:00
|
|
|
#include <gccore.h> /* for define ATTRIBUTE_PACKED */
|
|
|
|
|
2010-02-27 19:18:01 +01:00
|
|
|
#ifdef __cplusplus
|
2010-09-19 01:16:05 +02:00
|
|
|
extern "C"
|
|
|
|
{
|
2010-02-27 19:18:01 +01:00
|
|
|
#endif
|
2010-09-18 13:46:25 +02:00
|
|
|
|
2010-09-19 01:16:05 +02:00
|
|
|
/* Disc header structure */
|
|
|
|
struct discHdr
|
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
/* Game ID */
|
|
|
|
u8 id[6];
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
/* Game version */
|
|
|
|
u16 version;
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
/* Audio streaming */
|
|
|
|
u8 streaming;
|
|
|
|
u8 bufsize;
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
/* Padding */
|
|
|
|
u8 is_ciso;
|
|
|
|
u8 unused1[13];
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
/* Magic word */
|
|
|
|
u32 magic;
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
/* Padding */
|
|
|
|
u8 unused2[4];
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
/* Game title */
|
|
|
|
char title[64];
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
/* Encryption/Hashing */
|
|
|
|
u8 encryption;
|
|
|
|
u8 h3_verify;
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
/* Padding */
|
|
|
|
u8 unused3[30];
|
|
|
|
}ATTRIBUTE_PACKED;
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
/* Prototypes */
|
2010-09-24 02:48:03 +02:00
|
|
|
s32 Disc_Init(void);
|
|
|
|
s32 Disc_Open(void);
|
|
|
|
s32 Disc_Wait(void);
|
|
|
|
void __Disc_SetLowMem(void);
|
|
|
|
s32 Disc_SetUSB(const u8 *);
|
|
|
|
s32 Disc_ReadHeader(void *);
|
|
|
|
s32 Disc_IsWii(void);
|
2010-09-24 23:22:01 +02:00
|
|
|
s32 Disc_BootPartition(u64, char *, u8, u8, u8, u8, u8, u8, u32, u32 returnTo, u8 fix002);
|
|
|
|
s32 Disc_WiiBoot(char *, u8, u8, u8, u8, u8, u8, u32, u32 returnTo, u8 fix002);
|
2010-09-24 02:48:03 +02:00
|
|
|
s32 __Disc_FindPartition(u64 *outbuf);
|
|
|
|
void PatchCountryStrings(void *Address, int Size);
|
|
|
|
s32 __Disc_FindPartition(u64 *outbuf);
|
2009-07-30 07:41:12 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
2009-05-03 20:53:31 +02:00
|
|
|
#endif
|
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
#endif
|