2017-10-16 11:55:29 +02:00
|
|
|
#ifndef _SYS_H_
|
|
|
|
#define _SYS_H_
|
|
|
|
|
2024-04-27 19:17:23 +02:00
|
|
|
/* /shared1/content.map entry */
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
char filename[8];
|
|
|
|
sha1 hash;
|
|
|
|
} ATTRIBUTE_PACKED SharedContent;
|
|
|
|
|
|
|
|
/* "cIOS build tag" */
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
CIOS_INFO_MAGIC = 0x1EE7C105,
|
|
|
|
CIOS_INFO_VERSION = 1
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
u32 hdr_magic; // 0x1EE7C105
|
|
|
|
u32 hdr_version; // 1
|
|
|
|
u32 cios_version; // Eg. 11
|
|
|
|
u32 ios_base; // Eg. 60
|
|
|
|
|
|
|
|
char name[16];
|
|
|
|
char cios_version_str[16];
|
|
|
|
|
|
|
|
char _padding[16];
|
|
|
|
} cIOSInfo;
|
|
|
|
// _Static_assert(sizeof(cIOSInfo) == 0x40, "Incorrect cIOSInfo struct size, do i really need to pack this..?");
|
|
|
|
|
2024-05-03 03:28:53 +02:00
|
|
|
#define IS_WIIU (*(vu16*)0xCD8005A0 == 0xCAFE)
|
2024-04-27 19:17:23 +02:00
|
|
|
|
2022-04-19 12:39:21 +02:00
|
|
|
extern u32 boot2version;
|
2024-04-27 19:17:23 +02:00
|
|
|
|
2017-10-16 11:55:29 +02:00
|
|
|
/* Prototypes */
|
|
|
|
bool isIOSstub(u8 ios_number);
|
2024-03-01 15:31:12 +01:00
|
|
|
bool tmdIsStubIOS(tmd*);
|
2017-10-16 11:55:29 +02:00
|
|
|
bool loadIOS(int ios);
|
2024-04-27 19:17:23 +02:00
|
|
|
bool ES_CheckHasKoreanKey(void);
|
2017-10-16 11:55:29 +02:00
|
|
|
void Sys_Init(void);
|
|
|
|
void Sys_Reboot(void);
|
|
|
|
void Sys_Shutdown(void);
|
|
|
|
s32 Sys_GetCerts(signed_blob **, u32 *);
|
2024-04-27 19:17:23 +02:00
|
|
|
bool Sys_GetcIOSInfo(int IOS, cIOSInfo*);
|
|
|
|
s32 Sys_GetSharedContents(SharedContent** out, u32* count);
|
|
|
|
bool Sys_SharedContentPresent(tmd_content* content, SharedContent shared[], u32 count);
|
2023-02-19 21:21:09 +01:00
|
|
|
void SetPRButtons(bool enabled);
|
2017-10-16 11:55:29 +02:00
|
|
|
|
|
|
|
#endif
|