summaryrefslogtreecommitdiff
path: root/src/core/hle/service/fs.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2014-06-26 17:58:44 -0400
committerGravatar bunnei2014-06-27 16:58:30 -0400
commit48e39fc9928f3dabc1954c1acb650d2f57f6a491 (patch)
treecf3143a421d90c47cc1ca3e33c6acae844b57434 /src/core/hle/service/fs.cpp
parentKernel: Added stubbed code to support creation of kernel Archive objects. (diff)
downloadyuzu-48e39fc9928f3dabc1954c1acb650d2f57f6a491.tar.gz
yuzu-48e39fc9928f3dabc1954c1acb650d2f57f6a491.tar.xz
yuzu-48e39fc9928f3dabc1954c1acb650d2f57f6a491.zip
FS: Added stubbed code to intercept and decode file system service functions.
FS: Added to CMakeLists.txt
Diffstat (limited to 'src/core/hle/service/fs.cpp')
-rw-r--r--src/core/hle/service/fs.cpp121
1 files changed, 121 insertions, 0 deletions
diff --git a/src/core/hle/service/fs.cpp b/src/core/hle/service/fs.cpp
new file mode 100644
index 000000000..3a5afaa3c
--- /dev/null
+++ b/src/core/hle/service/fs.cpp
@@ -0,0 +1,121 @@
1// Copyright 2014 Citra Emulator Project
2// Licensed under GPLv2
3// Refer to the license.txt file included.
4
5
6#include "common/common.h"
7
8#include "core/hle/hle.h"
9#include "core/hle/service/fs.h"
10
11////////////////////////////////////////////////////////////////////////////////////////////////////
12// Namespace FS_User
13
14namespace FS_User {
15
16void Initialize(Service::Interface* self) {
17 u32* cmd_buff = Service::GetCommandBuffer();
18 DEBUG_LOG(KERNEL, "called");
19 cmd_buff[1] = 0; // No error
20}
21
22const Interface::FunctionInfo FunctionTable[] = {
23 {0x000100C6, nullptr, "Dummy1"},
24 {0x040100C4, nullptr, "Control"},
25 {0x08010002, Initialize, "Initialize"},
26 {0x080201C2, nullptr, "OpenFile"},
27 {0x08030204, nullptr, "OpenFileDirectly"},
28 {0x08040142, nullptr, "DeleteFile"},
29 {0x08050244, nullptr, "RenameFile"},
30 {0x08060142, nullptr, "DeleteDirectory"},
31 {0x08070142, nullptr, "DeleteDirectoryRecursively"},
32 {0x08080202, nullptr, "CreateFile"},
33 {0x08090182, nullptr, "CreateDirectory"},
34 {0x080A0244, nullptr, "RenameDirectory"},
35 {0x080B0102, nullptr, "OpenDirectory"},
36 {0x080C00C2, nullptr, "OpenArchive"},
37 {0x080D0144, nullptr, "ControlArchive"},
38 {0x080E0080, nullptr, "CloseArchive"},
39 {0x080F0180, nullptr, "FormatThisUserSaveData"},
40 {0x08100200, nullptr, "CreateSystemSaveData"},
41 {0x08110040, nullptr, "DeleteSystemSaveData"},
42 {0x08120080, nullptr, "GetFreeBytes"},
43 {0x08130000, nullptr, "GetCardType"},
44 {0x08140000, nullptr, "GetSdmcArchiveResource"},
45 {0x08150000, nullptr, "GetNandArchiveResource"},
46 {0x08160000, nullptr, "GetSdmcFatfsErro"},
47 {0x08170000, nullptr, "IsSdmcDetected"},
48 {0x08180000, nullptr, "IsSdmcWritable"},
49 {0x08190042, nullptr, "GetSdmcCid"},
50 {0x081A0042, nullptr, "GetNandCid"},
51 {0x081B0000, nullptr, "GetSdmcSpeedInfo"},
52 {0x081C0000, nullptr, "GetNandSpeedInfo"},
53 {0x081D0042, nullptr, "GetSdmcLog"},
54 {0x081E0042, nullptr, "GetNandLog"},
55 {0x081F0000, nullptr, "ClearSdmcLog"},
56 {0x08200000, nullptr, "ClearNandLog"},
57 {0x08210000, nullptr, "CardSlotIsInserted"},
58 {0x08220000, nullptr, "CardSlotPowerOn"},
59 {0x08230000, nullptr, "CardSlotPowerOff"},
60 {0x08240000, nullptr, "CardSlotGetCardIFPowerStatus"},
61 {0x08250040, nullptr, "CardNorDirectCommand"},
62 {0x08260080, nullptr, "CardNorDirectCommandWithAddress"},
63 {0x08270082, nullptr, "CardNorDirectRead"},
64 {0x082800C2, nullptr, "CardNorDirectReadWithAddress"},
65 {0x08290082, nullptr, "CardNorDirectWrite"},
66 {0x082A00C2, nullptr, "CardNorDirectWriteWithAddress"},
67 {0x082B00C2, nullptr, "CardNorDirectRead_4xIO"},
68 {0x082C0082, nullptr, "CardNorDirectCpuWriteWithoutVerify"},
69 {0x082D0040, nullptr, "CardNorDirectSectorEraseWithoutVerify"},
70 {0x082E0040, nullptr, "GetProductInfo"},
71 {0x082F0040, nullptr, "GetProgramLaunchInfo"},
72 {0x08300182, nullptr, "CreateExtSaveData"},
73 {0x08310180, nullptr, "CreateSharedExtSaveData"},
74 {0x08320102, nullptr, "ReadExtSaveDataIcon"},
75 {0x08330082, nullptr, "EnumerateExtSaveData"},
76 {0x08340082, nullptr, "EnumerateSharedExtSaveData"},
77 {0x08350080, nullptr, "DeleteExtSaveData"},
78 {0x08360080, nullptr, "DeleteSharedExtSaveData"},
79 {0x08370040, nullptr, "SetCardSpiBaudRate"},
80 {0x08380040, nullptr, "SetCardSpiBusMode"},
81 {0x08390000, nullptr, "SendInitializeInfoTo9"},
82 {0x083A0100, nullptr, "GetSpecialContentIndex"},
83 {0x083B00C2, nullptr, "GetLegacyRomHeader"},
84 {0x083C00C2, nullptr, "GetLegacyBannerData"},
85 {0x083D0100, nullptr, "CheckAuthorityToAccessExtSaveData"},
86 {0x083E00C2, nullptr, "QueryTotalQuotaSize"},
87 {0x083F00C0, nullptr, "GetExtDataBlockSize"},
88 {0x08400040, nullptr, "AbnegateAccessRight"},
89 {0x08410000, nullptr, "DeleteSdmcRoot"},
90 {0x08420040, nullptr, "DeleteAllExtSaveDataOnNand"},
91 {0x08430000, nullptr, "InitializeCtrFileSystem"},
92 {0x08440000, nullptr, "CreateSeed"},
93 {0x084500C2, nullptr, "GetFormatInfo"},
94 {0x08460102, nullptr, "GetLegacyRomHeader2"},
95 {0x08470180, nullptr, "FormatCtrCardUserSaveData"},
96 {0x08480042, nullptr, "GetSdmcCtrRootPath"},
97 {0x08490040, nullptr, "GetArchiveResource"},
98 {0x084A0002, nullptr, "ExportIntegrityVerificationSeed"},
99 {0x084B0002, nullptr, "ImportIntegrityVerificationSeed"},
100 {0x084C0242, nullptr, "FormatSaveData"},
101 {0x084D0102, nullptr, "GetLegacySubBannerData"},
102 {0x084E0342, nullptr, "UpdateSha256Context"},
103 {0x084F0102, nullptr, "ReadSpecialFile"},
104 {0x08500040, nullptr, "GetSpecialFileSize"},
105 {0x08580000, nullptr, "GetMovableSedHashedKeyYRandomData"},
106 {0x08610042, nullptr, "InitializeWithSdkVersion"},
107 {0x08620040, nullptr, "SetPriority"},
108 {0x08630000, nullptr, "GetPriority"},
109};
110
111////////////////////////////////////////////////////////////////////////////////////////////////////
112// Interface class
113
114Interface::Interface() {
115 Register(FunctionTable, ARRAY_SIZE(FunctionTable));
116}
117
118Interface::~Interface() {
119}
120
121} // namespace