-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopstation.h
executable file
·95 lines (80 loc) · 1.53 KB
/
popstation.h
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
inline void WriteInteger(wxFFile& out, unsigned int num, int count)
{
for ( int i = 0; i < count; i++)
out.Write(&num,4);
}
inline void WriteChar(wxFFile& out, unsigned char num, int count)
{
for ( int i = 0; i < count; i++)
out.Write(&num,1);
}
inline void WriteRandom(wxFFile& out, int count)
{
for (int i = 0; i < count; i++)
{
unsigned int num = rand();
out.Write(&num,4);
}
}
struct SFOHeader
{
unsigned int signature;
unsigned int version;
unsigned int fields_table_offs;
unsigned int values_table_offs;
int nitems;
};
struct SFODir
{
unsigned short field_offs;
unsigned char unk;
unsigned char type; // 0x2 -> string, 0x4 -> number
unsigned int length;
unsigned int size;
unsigned short val_offs;
unsigned short unk4;
};
struct IsoIndex
{
unsigned int offset;
unsigned int length;
unsigned int dummy[6];
};
struct PatchData{
char newData;
int dataPosition;
} ;
struct MultiDiscInfo{
int fileCount;
wxArrayString srcISO;
wxArrayString gameTitle;
wxArrayString gameID;
int compLevel[5];
} ;
struct ConvertIsoInfo{
wxString base;
wxString data_psp;
wxString srcISO;
wxString dstPBP;
wxString pic0;
wxString pic1;
wxString icon0;
wxString icon1;
wxString snd0;
wxString boot;
bool srcIsPbp;
bool isMultiDisc;
wxString gameTitle;
wxString saveTitle;
wxString gameID;
wxString saveID;
int compLevel;
int tocSize;
void* tocData;
MultiDiscInfo multiDiscInfo;
int patchCount;
PatchData *patchData;
} ;
int convertIso();
int convertIsoMD();
void popstationConvert(ConvertIsoInfo info);