uilogic.h
2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#ifndef __uilogic_h__
#define __uilogic_h__
#define BB_SYSAPP_SERIAL_HEAP_SIZE (16*1024*8)
#define BB_SYSAPP_RDBUF_SIZE (16*1024)
#define MAX_CONT_PAK 12
#define MAX_GPAK_DATA_SIZE (128*1024)
#define MAX_CPAK_DATA_SIZE (32*1024)
#define MAX_FS_GPAK_SIZE (1024*1024)
#define MAX_GPAK_CNT 12
extern int gPersonalizeCnt;
extern int gPersonalizeTotal;
typedef struct {
u32 cid;
int dirty;
} SaGpak;
typedef struct {
u8 data[MAX_GPAK_DATA_SIZE]; // do not move: this has to be aligned to 16 byte
u32 cid;
BbEccSig sig;
u32 size;
} SaGpakCopy;
typedef struct {
u32 cid;
u32 cont_id;
int dirty;
} SaCpak;
extern SaCpak gCpakList[MAX_CONT_PAK];
typedef struct {
u8 data[MAX_CPAK_DATA_SIZE]; // do not move: this has to be aligned to 16byte
u32 cid;
BbEccSig sig;
} SaCpakCopy;
extern int uiBbidCheck(void);
extern int uiParseTickets(void);
extern int uiGetTicketIdx(u32 cid);
extern int uiGetTicketRow(u32 cid);
extern int uiPreLaunchGame();
extern int uiPersonalizeGame();
extern int uiLaunchGame();
extern int uiCheckBirthday();
extern int uiGpakFull(void);
extern int uiGetGpaks(SaGpak* pGpaks); //return # of gpaks on card
extern int uiDeleteGpak(u32 cid);
extern int uiGetGpakCopy(u32 cid, SaGpakCopy* pGpak);
extern int uiGpakSrcCardOkay();
extern int uiGpakDstCardOkay(SaGpakCopy* pGpak);
extern int uiCopyGpak(SaGpakCopy* pGpak);
extern int uiGetCpakCnt(u32 cid); //return # of cpaks supported by cid
extern int uiGetCpak(u32 cid, SaCpak* pCpaks); //return # of cells found for cid
extern void uiCpakRead(SaCpak* pCpaks);
extern int uiGetCpakBindings(u32 cid, u32 bindings[4]);
extern int uiSaveCpakBindings(SaCpak* pCpaks); // save cell bindings
extern int uiEmptyCpak(int idx);
extern int uiGetCpakCopy(int i, SaCpakCopy* pCpak);
extern int uiCpakSrcCardOkay();
extern int uiCpakDstCardOkay(SaCpakCopy* pCpak);
extern int uiCopyCpak(int i, SaCpakCopy* pCpak);
/*
extern int uiCopyFromCpak(int i, u8* pData, int *sign);
extern int uiCopyToCpak(int i, u32 cid, u8* pData, int sign);
*/
extern int uiInitContVal(u8* contVal, const u8* lower, const u8* upper);
extern int uiSaveContSettings(u8* contVal);
extern int uiCheckExpiration(u16 tid);
extern int uiUpdateTimer(u16 tid, int reset_gtime);
extern void uiResetGtime();
#endif