forked from GiantPluto/Playstation-4-Save-Mounter
-
Notifications
You must be signed in to change notification settings - Fork 8
/
structs.cs
104 lines (98 loc) · 3.43 KB
/
structs.cs
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
96
97
98
99
100
101
102
103
104
using System.Runtime.InteropServices;
namespace PS4Saves
{
[StructLayout(LayoutKind.Explicit, Size = 80)]
public struct SceSaveDataMount
{
[FieldOffset(0x0)] public int userId;
[FieldOffset(0x8)] public ulong titleId;
[FieldOffset(0x10)] public ulong dirName;
[FieldOffset(0x18)] public ulong fingerprint;
[FieldOffset(0x20)] public ulong blocks;
[FieldOffset(0x28)] public uint mountMode;
}
[StructLayout(LayoutKind.Explicit, Size = 64)]
public struct SceSaveDataMount2
{
[FieldOffset(0x0)] public int userId;
[FieldOffset(0x8)] public ulong dirName;
[FieldOffset(0x10)] public ulong blocks;
[FieldOffset(0x18)] public uint mountMode;
}
[StructLayout(LayoutKind.Explicit, Size = 64)]
public struct SceSaveDataMountResult
{
[FieldOffset(0x0)] public SceSaveDataMountPoint mountPoint;
[FieldOffset(0x20)] public ulong requiredBlocks;
[FieldOffset(0x28)] public uint mountStatus;
}
[StructLayout(LayoutKind.Sequential, Size = 16)]
public struct SceSaveDataMountPoint
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
public string data;
}
[StructLayout(LayoutKind.Sequential, Size = 64)]
public struct SceSaveDataTransferringMount
{
public int userId;
public ulong titleId;
public ulong dirName;
public ulong fingerprint;
}
[StructLayout(LayoutKind.Sequential, Size = 16)]
public struct SceSaveDataTitleId
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string data;
}
[StructLayout(LayoutKind.Sequential, Size = 32)]
public struct SceSaveDataDirName
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
public string data;
}
[StructLayout(LayoutKind.Sequential, Size = 80)]
public struct SceSaveDataFingerprint
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 65)]
public string data;
}
[StructLayout(LayoutKind.Explicit, Size = 64)]
public struct SceSaveDataDirNameSearchCond
{
[FieldOffset(0x0)] public int userId;
[FieldOffset(0x8)] public ulong titleId;
[FieldOffset(0x10)] public ulong dirName;
[FieldOffset(0x18)] public uint key;
[FieldOffset(0x1C)] public uint order;
}
[StructLayout(LayoutKind.Explicit, Size = 56)]
public struct SceSaveDataDirNameSearchResult
{
[FieldOffset(0x0)] public uint hitNum;
[FieldOffset(0x8)] public ulong dirNames;
[FieldOffset(0x10)] public uint dirNamesNum;
[FieldOffset(0x14)] public uint setNum;
[FieldOffset(0x18)] public ulong param;
[FieldOffset(0x20)] public ulong infos;
}
[StructLayout(LayoutKind.Explicit, Size = 1328)]
public struct SceSaveDataParam
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
[FieldOffset(0x0)] public byte[] title;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
[FieldOffset(0x80)] public byte[] subTitle;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1024)]
[FieldOffset(0x100)] public byte[] detail;
[FieldOffset(0x500)] public uint userParam;
[FieldOffset(0x508)] public long mtime;
}
[StructLayout(LayoutKind.Sequential, Size = 48)]
public struct SceSaveDataSearchInfo
{
public ulong blocks;
public ulong freeBlocks;
}
}