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