2012-06-16 19:03:23 +02:00
|
|
|
|
2012-01-21 21:57:41 +01:00
|
|
|
#ifndef _DISC_H_
|
|
|
|
#define _DISC_H_
|
|
|
|
|
2012-06-16 19:03:23 +02:00
|
|
|
#define WII_MAGIC 0x5D1C9EA3
|
|
|
|
#define GC_MAGIC 0xC2339F3D
|
|
|
|
|
2012-01-21 21:57:41 +01:00
|
|
|
/* 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 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;
|
|
|
|
|
2012-06-16 19:03:23 +02:00
|
|
|
struct dir_discHdr
|
|
|
|
{
|
|
|
|
char id[7]; //6+1 for null character
|
|
|
|
|
2017-05-15 19:50:24 +02:00
|
|
|
char path[256]; // full path including partion - path - rom.ext or game.iso or id6.wbfs
|
|
|
|
wchar_t title[64]; // wide character title used for displaying title in coverflow
|
2012-06-17 12:22:00 +02:00
|
|
|
u32 settings[2]; //chantitle, plugin magic, crc32, gamecube game on sd, etc
|
2012-06-16 19:03:23 +02:00
|
|
|
|
|
|
|
u8 type;
|
|
|
|
|
|
|
|
u32 casecolor;
|
|
|
|
u16 index;
|
2023-01-21 00:53:52 +01:00
|
|
|
u16 year;// year released
|
|
|
|
//u8 esrb;
|
|
|
|
//u8 controllers;
|
2012-06-16 19:03:23 +02:00
|
|
|
u8 players;
|
|
|
|
u8 wifi;
|
|
|
|
} ATTRIBUTE_PACKED;
|
|
|
|
|
2012-01-21 21:57:41 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2012-05-12 18:03:14 +02:00
|
|
|
/* Prototypes */
|
2012-07-12 02:34:32 +02:00
|
|
|
s32 Disc_Open(bool);
|
2012-05-12 18:03:14 +02:00
|
|
|
s32 Disc_Wait(void);
|
|
|
|
s32 Disc_ReadHeader(void *);
|
|
|
|
s32 Disc_ReadGCHeader(void *);
|
|
|
|
s32 Disc_Type(bool);
|
|
|
|
s32 Disc_IsWii(void);
|
|
|
|
s32 Disc_IsGC(void);
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2012-11-18 14:40:26 +01:00
|
|
|
/* Headers for general usage */
|
|
|
|
extern struct discHdr wii_hdr;
|
|
|
|
extern struct gc_discHdr gc_hdr;
|
|
|
|
|
2012-01-21 21:57:41 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|