2010-09-24 15:46:32 +02:00
|
|
|
#ifndef _IOSLOADER_H_
|
|
|
|
#define _IOSLOADER_H_
|
|
|
|
|
2010-11-07 13:16:34 +01:00
|
|
|
#include <gccore.h>
|
2010-09-24 15:46:32 +02:00
|
|
|
|
2011-06-04 18:29:08 +02:00
|
|
|
typedef struct _iosinfo_t
|
|
|
|
{
|
|
|
|
u32 magicword; //0x1ee7c105
|
|
|
|
u32 magicversion; // 1
|
|
|
|
u32 version; // Example: 5
|
|
|
|
u32 baseios; // Example: 56
|
|
|
|
char name[0x10]; // Example: d2x
|
|
|
|
char versionstring[0x10]; // Example: beta2
|
|
|
|
} __attribute__((packed)) iosinfo_t;
|
|
|
|
|
2010-09-24 15:46:32 +02:00
|
|
|
class IosLoader
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static s32 LoadAppCios();
|
2010-11-06 16:30:14 +01:00
|
|
|
static s32 LoadGameCios(s32 ios);
|
2010-09-24 15:46:32 +02:00
|
|
|
static s32 ReloadIosSafe(s32 ios);
|
2010-11-07 13:16:34 +01:00
|
|
|
static bool IsHermesIOS(s32 ios = IOS_GetVersion());
|
|
|
|
static bool IsWaninkokoIOS(s32 ios = IOS_GetVersion());
|
2011-06-04 18:29:08 +02:00
|
|
|
static bool IsD2X(s32 ios = IOS_GetVersion());
|
|
|
|
static iosinfo_t *GetIOSInfo(s32 ios);
|
2010-10-01 17:01:19 +02:00
|
|
|
private:
|
|
|
|
static void LoadIOSModules(s32 ios, s32 ios_rev);
|
2010-09-24 15:46:32 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|