2009-07-25 11:39:01 +02:00
|
|
|
/*-------------------------------------------------------------
|
|
|
|
from any title deleter and wad manager 1.4
|
2009-07-30 07:41:12 +02:00
|
|
|
title.h --
|
|
|
|
|
2009-07-25 11:39:01 +02:00
|
|
|
Copyright (C) 2008 tona and/or waninkoko
|
|
|
|
-------------------------------------------------------------*/
|
|
|
|
#include <gccore.h>
|
|
|
|
#include <ogcsys.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <fat.h>
|
|
|
|
#include <malloc.h>
|
|
|
|
|
|
|
|
// Turn upper and lower into a full title ID
|
|
|
|
#define TITLE_ID(x,y) (((u64)(x) << 32) | (y))
|
|
|
|
// Get upper or lower half of a title ID
|
|
|
|
#define TITLE_UPPER(x) ((u32)((x) >> 32))
|
|
|
|
// Turn upper and lower into a full title ID
|
|
|
|
#define TITLE_LOWER(x) ((u32)(x))
|
|
|
|
|
|
|
|
#define MAX_TITLES 100
|
|
|
|
|
2009-07-11 09:21:38 +02:00
|
|
|
#ifndef _TITLE_H_
|
2009-07-30 07:41:12 +02:00
|
|
|
#define _TITLE_H_
|
2009-07-11 09:21:38 +02:00
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
2009-07-11 09:21:38 +02:00
|
|
|
#endif
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Constants */
|
2009-07-11 09:21:38 +02:00
|
|
|
#define BLOCK_SIZE 1024
|
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
/* Prototypes */
|
|
|
|
s32 Title_GetList(u64 **, u32 *);
|
|
|
|
s32 Title_GetTicketViews(u64, tikview **, u32 *);
|
|
|
|
s32 Title_GetTMD(u64, signed_blob **, u32 *);
|
|
|
|
s32 Title_GetVersion(u64, u16 *);
|
|
|
|
s32 Title_GetSysVersion(u64, u64 *);
|
|
|
|
s32 Title_GetSize(u64, u32 *);
|
|
|
|
s32 Title_GetIOSVersions(u8 **, u32 *);
|
2009-07-25 11:39:01 +02:00
|
|
|
|
|
|
|
// Get the name of a title from its banner.bin in NAND
|
2009-07-30 07:41:12 +02:00
|
|
|
s32 getNameBN(char *name, u64 id);
|
2009-07-25 11:39:01 +02:00
|
|
|
|
|
|
|
// Get the name of a title from its 00000000.app in NAND
|
2009-07-30 07:41:12 +02:00
|
|
|
s32 getName00(char *name, u64 id, int lang = 2);
|
2009-07-25 11:39:01 +02:00
|
|
|
|
|
|
|
// Get string representation of lower title id
|
2009-07-30 07:41:12 +02:00
|
|
|
char *titleText(u32 kind, u32 title);
|
2009-07-25 11:39:01 +02:00
|
|
|
|
|
|
|
// Converts a 16 bit Wii string to a printable 8 bit string
|
2009-07-30 07:41:12 +02:00
|
|
|
s32 __convertWiiString(char *str, u8 *data, u32 cnt);
|
2009-07-25 11:39:01 +02:00
|
|
|
|
|
|
|
// Get the number of titles on the Wii of a given type
|
2009-07-30 07:41:12 +02:00
|
|
|
s32 getTitles_TypeCount(u32 type, u32 *count);
|
2009-07-25 11:39:01 +02:00
|
|
|
|
|
|
|
// Get the list of titles of this type
|
2009-07-30 07:41:12 +02:00
|
|
|
s32 getTitles_Type(u32 type, u32 *titles, u32 count);
|
2009-07-30 04:54:08 +02:00
|
|
|
|
|
|
|
//returns a name for a title
|
2009-07-30 07:41:12 +02:00
|
|
|
char *__getTitleName(u64 titleid, int language);
|
|
|
|
|
|
|
|
s32 Uninstall_FromTitle(const u64 tid);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|