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
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
/* Disc header structure */
|
|
|
|
struct discHdr
|
|
|
|
{
|
|
|
|
/* Game ID */
|
|
|
|
u8 id[6];
|
|
|
|
|
2012-12-09 21:31:55 +01:00
|
|
|
/* Game Disc number */
|
|
|
|
u8 disc_no;
|
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
/* Game version */
|
2012-12-09 21:31:55 +01:00
|
|
|
u8 disc_ver;
|
2011-07-26 00:28:22 +02:00
|
|
|
|
|
|
|
/* Audio streaming */
|
|
|
|
u8 streaming;
|
|
|
|
u8 bufsize;
|
|
|
|
|
|
|
|
/* Padding */
|
|
|
|
u8 is_ciso;
|
2011-11-12 19:14:09 +01:00
|
|
|
|
2011-12-22 23:44:48 +01:00
|
|
|
/* Unused, on channel list mode this is the full 64 bit tid */
|
2011-11-13 10:09:27 +01:00
|
|
|
u64 tid;
|
|
|
|
|
2011-12-22 23:44:48 +01:00
|
|
|
/* Unused, using in loader internally to detect title type */
|
|
|
|
u8 type;
|
|
|
|
|
2011-11-13 10:09:27 +01:00
|
|
|
/* rest of unused */
|
2011-12-22 23:44:48 +01:00
|
|
|
u8 unused[4];
|
2011-07-26 00:28:22 +02:00
|
|
|
|
|
|
|
/* Magic word */
|
|
|
|
u32 magic;
|
|
|
|
|
|
|
|
/* Padding */
|
2012-02-09 22:18:16 +01:00
|
|
|
u32 gc_magic;
|
2011-07-26 00:28:22 +02:00
|
|
|
|
|
|
|
/* 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);
|
|
|
|
s32 Disc_SetUSB(const u8 *);
|
|
|
|
s32 Disc_ReadHeader(void *);
|
|
|
|
s32 Disc_IsWii(void);
|
|
|
|
s32 Disc_FindPartition(u64 *outbuf);
|
2012-02-09 22:18:16 +01:00
|
|
|
s32 Disc_Mount(struct discHdr *header);
|
2011-07-26 00:28:22 +02:00
|
|
|
void PatchCountryStrings(void *Address, int Size);
|
2012-08-24 18:55:49 +02:00
|
|
|
void Disc_SelectVMode(u8 videoselected, bool devolution, u32 *dml_VideoMode);
|
2012-02-09 22:18:16 +01:00
|
|
|
void Disc_SetVMode(void);
|
2011-09-03 11:39:26 +02:00
|
|
|
s32 Disc_JumpToEntrypoint(s32 hooktype, u32 dolparameter);
|
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
|