WiiFlow_Lite/source/loader/disc.h

115 lines
1.7 KiB
C
Raw Normal View History

2012-01-21 21:57:41 +01:00
#ifndef _DISC_H_
#define _DISC_H_
#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 */
char title[64];
/* Padding */
u8 unused2[64];
2012-01-21 21:57:41 +01:00
} ATTRIBUTE_PACKED;
struct dir_discHdr
{
char id[7]; //6+1 for null character
neek2o changes: - re made it possible to use SD emunands with sNeek2o r96. - added vwii r96 beta 9.6 support. wiiflow lite will now look for vwiikernal.bin and emunands must be in a subfolder of vwiinands on USB only. - when exiting a emunand game using neek2o if on wii it will use the back2nand channel to return you to wii system menu or if on wiiu it will return you to wiiu system channel because returning to the vwii system menu isn't possible. - when using wiiflow lite and exit to neek2o it will just launch neek2o system menu. from there you can launch wiiflow or wiiflow lite (if installed on emunand) to use cheats on a emunand game. otherwise cheats do not work when using neek2o to launch a game. banner changes: - now when moving from banner to banner the background music will not play and you will not see coverflow (for a second) when using full screen banners. - now on game selected categories menu the banner will change when you change games using '+' or '-' buttons - added custom banners for plugin games. no longer using trialer thp videos as banners for plugin games. put your custom banners in the custom banner folder plus the plugin cover folder and name them the same as the rom with extension plus .bnr just like how you do for the covers. to make a plugin game banner i suggest downloading one of abdallahterro's custom gamecube dios mios booter channels and use customizemii to change the images (and sound if you want). make sure the images match exactly the size of the one's already there. when changes are done extract the banner and rename it and put it in the proper folder as previously mentioned. other changes: - trailer videos still work even for plugin games. again for plugins rename the thp and ogg file to match the rom plus extension and .thp or .ogg. on game selected screen press '-' to start or quit a trailer video if one is available. pressing 'B' or 'Home' will quit the video and return you to the main screen. - when flipping a cover none of the buttons are available and the mini banner is not shown until you press 'B' to de flip the cover to normal front view. - fixed game info menu - in case a custom channel is selected and is not included in gametdb it will display a message 'no game info' instead of random stuff from the last game viewed. tested on wiiflow lite forwarder channel. - now stopping sounds and music early when exiting wiiflow to prevent music from stuttering when exiting. - other minor coding changes.
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
u32 settings[2]; //chantitle, plugin magic, crc32, gamecube game on sd, etc
u8 type;
u32 casecolor;
u16 index;
u8 esrb;
u8 controllers;
u8 players;
u8 wifi;
} ATTRIBUTE_PACKED;
2012-01-21 21:57:41 +01:00
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* Prototypes */
s32 Disc_Open(bool);
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
/* 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