diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/CMakeLists.txt | 14 | ||||
| -rw-r--r-- | src/core/file_sys/archive_extsavedata.cpp | 4 | ||||
| -rw-r--r-- | src/core/file_sys/archive_extsavedata.h | 17 | ||||
| -rw-r--r-- | src/core/hle/service/am_sys.cpp | 24 | ||||
| -rw-r--r-- | src/core/hle/service/am_sys.h | 23 | ||||
| -rw-r--r-- | src/core/hle/service/boss_p.cpp | 24 | ||||
| -rw-r--r-- | src/core/hle/service/boss_p.h | 23 | ||||
| -rw-r--r-- | src/core/hle/service/cecd_s.cpp | 24 | ||||
| -rw-r--r-- | src/core/hle/service/cecd_s.h | 23 | ||||
| -rw-r--r-- | src/core/hle/service/frd_a.cpp | 24 | ||||
| -rw-r--r-- | src/core/hle/service/frd_a.h | 23 | ||||
| -rw-r--r-- | src/core/hle/service/fs/archive.cpp | 22 | ||||
| -rw-r--r-- | src/core/hle/service/fs/archive.h | 8 | ||||
| -rw-r--r-- | src/core/hle/service/fs/fs_user.cpp | 11 | ||||
| -rw-r--r-- | src/core/hle/service/gsp_lcd.cpp | 26 | ||||
| -rw-r--r-- | src/core/hle/service/gsp_lcd.h | 24 | ||||
| -rw-r--r-- | src/core/hle/service/news_s.cpp | 25 | ||||
| -rw-r--r-- | src/core/hle/service/news_s.h | 23 | ||||
| -rw-r--r-- | src/core/hle/service/ns_s.cpp | 27 | ||||
| -rw-r--r-- | src/core/hle/service/ns_s.h | 24 | ||||
| -rw-r--r-- | src/core/hle/service/service.cpp | 16 |
21 files changed, 426 insertions, 3 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 5578fa680..3e1578969 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -37,11 +37,14 @@ set(SRCS | |||
| 37 | hle/service/act_u.cpp | 37 | hle/service/act_u.cpp |
| 38 | hle/service/am_app.cpp | 38 | hle/service/am_app.cpp |
| 39 | hle/service/am_net.cpp | 39 | hle/service/am_net.cpp |
| 40 | hle/service/am_sys.cpp | ||
| 40 | hle/service/apt_a.cpp | 41 | hle/service/apt_a.cpp |
| 41 | hle/service/apt_s.cpp | 42 | hle/service/apt_s.cpp |
| 42 | hle/service/apt_u.cpp | 43 | hle/service/apt_u.cpp |
| 44 | hle/service/boss_p.cpp | ||
| 43 | hle/service/boss_u.cpp | 45 | hle/service/boss_u.cpp |
| 44 | hle/service/cam_u.cpp | 46 | hle/service/cam_u.cpp |
| 47 | hle/service/cecd_s.cpp | ||
| 45 | hle/service/cecd_u.cpp | 48 | hle/service/cecd_u.cpp |
| 46 | hle/service/cfg/cfg.cpp | 49 | hle/service/cfg/cfg.cpp |
| 47 | hle/service/cfg/cfg_i.cpp | 50 | hle/service/cfg/cfg_i.cpp |
| @@ -50,6 +53,7 @@ set(SRCS | |||
| 50 | hle/service/csnd_snd.cpp | 53 | hle/service/csnd_snd.cpp |
| 51 | hle/service/dsp_dsp.cpp | 54 | hle/service/dsp_dsp.cpp |
| 52 | hle/service/err_f.cpp | 55 | hle/service/err_f.cpp |
| 56 | hle/service/frd_a.cpp | ||
| 53 | hle/service/frd_u.cpp | 57 | hle/service/frd_u.cpp |
| 54 | hle/service/fs/archive.cpp | 58 | hle/service/fs/archive.cpp |
| 55 | hle/service/fs/fs_user.cpp | 59 | hle/service/fs/fs_user.cpp |
| @@ -57,14 +61,17 @@ set(SRCS | |||
| 57 | hle/service/hid/hid.cpp | 61 | hle/service/hid/hid.cpp |
| 58 | hle/service/hid/hid_user.cpp | 62 | hle/service/hid/hid_user.cpp |
| 59 | hle/service/hid/hid_spvr.cpp | 63 | hle/service/hid/hid_spvr.cpp |
| 64 | hle/service/gsp_lcd.cpp | ||
| 60 | hle/service/http_c.cpp | 65 | hle/service/http_c.cpp |
| 61 | hle/service/ir_rst.cpp | 66 | hle/service/ir_rst.cpp |
| 62 | hle/service/ir_u.cpp | 67 | hle/service/ir_u.cpp |
| 63 | hle/service/ldr_ro.cpp | 68 | hle/service/ldr_ro.cpp |
| 64 | hle/service/mic_u.cpp | 69 | hle/service/mic_u.cpp |
| 65 | hle/service/ndm_u.cpp | 70 | hle/service/ndm_u.cpp |
| 71 | hle/service/news_s.cpp | ||
| 66 | hle/service/news_u.cpp | 72 | hle/service/news_u.cpp |
| 67 | hle/service/nim_aoc.cpp | 73 | hle/service/nim_aoc.cpp |
| 74 | hle/service/ns_s.cpp | ||
| 68 | hle/service/nwm_uds.cpp | 75 | hle/service/nwm_uds.cpp |
| 69 | hle/service/pm_app.cpp | 76 | hle/service/pm_app.cpp |
| 70 | hle/service/ptm_play.cpp | 77 | hle/service/ptm_play.cpp |
| @@ -138,11 +145,14 @@ set(HEADERS | |||
| 138 | hle/service/act_u.h | 145 | hle/service/act_u.h |
| 139 | hle/service/am_app.h | 146 | hle/service/am_app.h |
| 140 | hle/service/am_net.h | 147 | hle/service/am_net.h |
| 148 | hle/service/am_sys.h | ||
| 141 | hle/service/apt_a.h | 149 | hle/service/apt_a.h |
| 142 | hle/service/apt_s.h | 150 | hle/service/apt_s.h |
| 143 | hle/service/apt_u.h | 151 | hle/service/apt_u.h |
| 152 | hle/service/boss_p.h | ||
| 144 | hle/service/boss_u.h | 153 | hle/service/boss_u.h |
| 145 | hle/service/cam_u.h | 154 | hle/service/cam_u.h |
| 155 | hle/service/cecd_s.h | ||
| 146 | hle/service/cecd_u.h | 156 | hle/service/cecd_u.h |
| 147 | hle/service/cfg/cfg.h | 157 | hle/service/cfg/cfg.h |
| 148 | hle/service/cfg/cfg_i.h | 158 | hle/service/cfg/cfg_i.h |
| @@ -151,6 +161,7 @@ set(HEADERS | |||
| 151 | hle/service/csnd_snd.h | 161 | hle/service/csnd_snd.h |
| 152 | hle/service/dsp_dsp.h | 162 | hle/service/dsp_dsp.h |
| 153 | hle/service/err_f.h | 163 | hle/service/err_f.h |
| 164 | hle/service/frd_a.h | ||
| 154 | hle/service/frd_u.h | 165 | hle/service/frd_u.h |
| 155 | hle/service/fs/archive.h | 166 | hle/service/fs/archive.h |
| 156 | hle/service/fs/fs_user.h | 167 | hle/service/fs/fs_user.h |
| @@ -158,14 +169,17 @@ set(HEADERS | |||
| 158 | hle/service/hid/hid.h | 169 | hle/service/hid/hid.h |
| 159 | hle/service/hid/hid_spvr.h | 170 | hle/service/hid/hid_spvr.h |
| 160 | hle/service/hid/hid_user.h | 171 | hle/service/hid/hid_user.h |
| 172 | hle/service/gsp_lcd.h | ||
| 161 | hle/service/http_c.h | 173 | hle/service/http_c.h |
| 162 | hle/service/ir_rst.h | 174 | hle/service/ir_rst.h |
| 163 | hle/service/ir_u.h | 175 | hle/service/ir_u.h |
| 164 | hle/service/ldr_ro.h | 176 | hle/service/ldr_ro.h |
| 165 | hle/service/mic_u.h | 177 | hle/service/mic_u.h |
| 166 | hle/service/ndm_u.h | 178 | hle/service/ndm_u.h |
| 179 | hle/service/news_s.h | ||
| 167 | hle/service/news_u.h | 180 | hle/service/news_u.h |
| 168 | hle/service/nim_aoc.h | 181 | hle/service/nim_aoc.h |
| 182 | hle/service/ns_s.h | ||
| 169 | hle/service/nwm_uds.h | 183 | hle/service/nwm_uds.h |
| 170 | hle/service/pm_app.h | 184 | hle/service/pm_app.h |
| 171 | hle/service/ptm_play.h | 185 | hle/service/ptm_play.h |
diff --git a/src/core/file_sys/archive_extsavedata.cpp b/src/core/file_sys/archive_extsavedata.cpp index 0805f42ae..33e4e76f8 100644 --- a/src/core/file_sys/archive_extsavedata.cpp +++ b/src/core/file_sys/archive_extsavedata.cpp | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | namespace FileSys { | 18 | namespace FileSys { |
| 19 | 19 | ||
| 20 | static std::string GetExtSaveDataPath(const std::string& mount_point, const Path& path) { | 20 | std::string GetExtSaveDataPath(const std::string& mount_point, const Path& path) { |
| 21 | std::vector<u8> vec_data = path.AsBinary(); | 21 | std::vector<u8> vec_data = path.AsBinary(); |
| 22 | const u32* data = reinterpret_cast<const u32*>(vec_data.data()); | 22 | const u32* data = reinterpret_cast<const u32*>(vec_data.data()); |
| 23 | u32 save_low = data[1]; | 23 | u32 save_low = data[1]; |
| @@ -25,7 +25,7 @@ static std::string GetExtSaveDataPath(const std::string& mount_point, const Path | |||
| 25 | return Common::StringFromFormat("%s%08X/%08X/", mount_point.c_str(), save_high, save_low); | 25 | return Common::StringFromFormat("%s%08X/%08X/", mount_point.c_str(), save_high, save_low); |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | static std::string GetExtDataContainerPath(const std::string& mount_point, bool shared) { | 28 | std::string GetExtDataContainerPath(const std::string& mount_point, bool shared) { |
| 29 | if (shared) | 29 | if (shared) |
| 30 | return Common::StringFromFormat("%sdata/%s/extdata/", mount_point.c_str(), SYSTEM_ID.c_str()); | 30 | return Common::StringFromFormat("%sdata/%s/extdata/", mount_point.c_str(), SYSTEM_ID.c_str()); |
| 31 | 31 | ||
diff --git a/src/core/file_sys/archive_extsavedata.h b/src/core/file_sys/archive_extsavedata.h index fb7f209d2..802a11b5f 100644 --- a/src/core/file_sys/archive_extsavedata.h +++ b/src/core/file_sys/archive_extsavedata.h | |||
| @@ -42,4 +42,21 @@ protected: | |||
| 42 | std::string concrete_mount_point; | 42 | std::string concrete_mount_point; |
| 43 | }; | 43 | }; |
| 44 | 44 | ||
| 45 | /** | ||
| 46 | * Constructs a path to the concrete ExtData archive in the host filesystem based on the | ||
| 47 | * input Path and base mount point. | ||
| 48 | * @param mount_point The base mount point of the ExtSaveData archives. | ||
| 49 | * @param path The path that identifies the requested concrete ExtSaveData archive. | ||
| 50 | * @returns The complete path to the specified extdata archive in the host filesystem | ||
| 51 | */ | ||
| 52 | std::string GetExtSaveDataPath(const std::string& mount_point, const Path& path); | ||
| 53 | |||
| 54 | /** | ||
| 55 | * Constructs a path to the base folder to hold concrete ExtSaveData archives in the host file system. | ||
| 56 | * @param mount_point The base folder where this folder resides, ie. SDMC or NAND. | ||
| 57 | * @param shared Whether this ExtSaveData container is for SharedExtSaveDatas or not. | ||
| 58 | * @returns The path to the base ExtSaveData archives' folder in the host file system | ||
| 59 | */ | ||
| 60 | std::string GetExtDataContainerPath(const std::string& mount_point, bool shared); | ||
| 61 | |||
| 45 | } // namespace FileSys | 62 | } // namespace FileSys |
diff --git a/src/core/hle/service/am_sys.cpp b/src/core/hle/service/am_sys.cpp new file mode 100644 index 000000000..b63c8c087 --- /dev/null +++ b/src/core/hle/service/am_sys.cpp | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | // Copyright 2015 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "common/log.h" | ||
| 6 | #include "core/hle/hle.h" | ||
| 7 | #include "core/hle/service/am_sys.h" | ||
| 8 | |||
| 9 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 10 | // Namespace AM_SYS | ||
| 11 | |||
| 12 | namespace AM_SYS { | ||
| 13 | |||
| 14 | // Empty arrays are illegal -- commented out until an entry is added. | ||
| 15 | //const Interface::FunctionInfo FunctionTable[] = { }; | ||
| 16 | |||
| 17 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 18 | // Interface class | ||
| 19 | |||
| 20 | Interface::Interface() { | ||
| 21 | //Register(FunctionTable, ARRAY_SIZE(FunctionTable)); | ||
| 22 | } | ||
| 23 | |||
| 24 | } // namespace | ||
diff --git a/src/core/hle/service/am_sys.h b/src/core/hle/service/am_sys.h new file mode 100644 index 000000000..bb6178a43 --- /dev/null +++ b/src/core/hle/service/am_sys.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | // Copyright 2015 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 10 | // Namespace AM_SYS | ||
| 11 | |||
| 12 | namespace AM_SYS { | ||
| 13 | |||
| 14 | class Interface : public Service::Interface { | ||
| 15 | public: | ||
| 16 | Interface(); | ||
| 17 | |||
| 18 | std::string GetPortName() const override { | ||
| 19 | return "am:sys"; | ||
| 20 | } | ||
| 21 | }; | ||
| 22 | |||
| 23 | } // namespace | ||
diff --git a/src/core/hle/service/boss_p.cpp b/src/core/hle/service/boss_p.cpp new file mode 100644 index 000000000..f245a38e9 --- /dev/null +++ b/src/core/hle/service/boss_p.cpp | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | // Copyright 2015 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "common/log.h" | ||
| 6 | #include "core/hle/hle.h" | ||
| 7 | #include "core/hle/service/boss_p.h" | ||
| 8 | |||
| 9 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 10 | // Namespace BOSS_P | ||
| 11 | |||
| 12 | namespace BOSS_P { | ||
| 13 | |||
| 14 | // Empty arrays are illegal -- commented out until an entry is added. | ||
| 15 | // const Interface::FunctionInfo FunctionTable[] = { }; | ||
| 16 | |||
| 17 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 18 | // Interface class | ||
| 19 | |||
| 20 | Interface::Interface() { | ||
| 21 | //Register(FunctionTable, ARRAY_SIZE(FunctionTable)); | ||
| 22 | } | ||
| 23 | |||
| 24 | } // namespace | ||
diff --git a/src/core/hle/service/boss_p.h b/src/core/hle/service/boss_p.h new file mode 100644 index 000000000..71f1e7464 --- /dev/null +++ b/src/core/hle/service/boss_p.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | // Copyright 2015 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 10 | // Namespace BOSS_P | ||
| 11 | |||
| 12 | namespace BOSS_P { | ||
| 13 | |||
| 14 | class Interface : public Service::Interface { | ||
| 15 | public: | ||
| 16 | Interface(); | ||
| 17 | |||
| 18 | std::string GetPortName() const override { | ||
| 19 | return "boss:P"; | ||
| 20 | } | ||
| 21 | }; | ||
| 22 | |||
| 23 | } // namespace | ||
diff --git a/src/core/hle/service/cecd_s.cpp b/src/core/hle/service/cecd_s.cpp new file mode 100644 index 000000000..9c4992f13 --- /dev/null +++ b/src/core/hle/service/cecd_s.cpp | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | // Copyright 2015 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "common/log.h" | ||
| 6 | #include "core/hle/hle.h" | ||
| 7 | #include "core/hle/service/cecd_s.h" | ||
| 8 | |||
| 9 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 10 | // Namespace CECD_S | ||
| 11 | |||
| 12 | namespace CECD_S { | ||
| 13 | |||
| 14 | // Empty arrays are illegal -- commented out until an entry is added. | ||
| 15 | //const Interface::FunctionInfo FunctionTable[] = { }; | ||
| 16 | |||
| 17 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 18 | // Interface class | ||
| 19 | |||
| 20 | Interface::Interface() { | ||
| 21 | //Register(FunctionTable, ARRAY_SIZE(FunctionTable)); | ||
| 22 | } | ||
| 23 | |||
| 24 | } // namespace | ||
diff --git a/src/core/hle/service/cecd_s.h b/src/core/hle/service/cecd_s.h new file mode 100644 index 000000000..d880d0391 --- /dev/null +++ b/src/core/hle/service/cecd_s.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | // Copyright 2015 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 10 | // Namespace CECD_S | ||
| 11 | |||
| 12 | namespace CECD_S { | ||
| 13 | |||
| 14 | class Interface : public Service::Interface { | ||
| 15 | public: | ||
| 16 | Interface(); | ||
| 17 | |||
| 18 | std::string GetPortName() const override { | ||
| 19 | return "cecd:s"; | ||
| 20 | } | ||
| 21 | }; | ||
| 22 | |||
| 23 | } // namespace | ||
diff --git a/src/core/hle/service/frd_a.cpp b/src/core/hle/service/frd_a.cpp new file mode 100644 index 000000000..53edc2cd8 --- /dev/null +++ b/src/core/hle/service/frd_a.cpp | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | // Copyright 2015 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "common/log.h" | ||
| 6 | #include "core/hle/hle.h" | ||
| 7 | #include "core/hle/service/frd_a.h" | ||
| 8 | |||
| 9 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 10 | // Namespace FRD_A | ||
| 11 | |||
| 12 | namespace FRD_A { | ||
| 13 | |||
| 14 | // Empty arrays are illegal -- commented out until an entry is added. | ||
| 15 | // const Interface::FunctionInfo FunctionTable[] = { }; | ||
| 16 | |||
| 17 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 18 | // Interface class | ||
| 19 | |||
| 20 | Interface::Interface() { | ||
| 21 | //Register(FunctionTable, ARRAY_SIZE(FunctionTable)); | ||
| 22 | } | ||
| 23 | |||
| 24 | } // namespace | ||
diff --git a/src/core/hle/service/frd_a.h b/src/core/hle/service/frd_a.h new file mode 100644 index 000000000..f068c6108 --- /dev/null +++ b/src/core/hle/service/frd_a.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | // Copyright 2015 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 10 | // Namespace FRD_A | ||
| 11 | |||
| 12 | namespace FRD_A { | ||
| 13 | |||
| 14 | class Interface : public Service::Interface { | ||
| 15 | public: | ||
| 16 | Interface(); | ||
| 17 | |||
| 18 | std::string GetPortName() const override { | ||
| 19 | return "frd:a"; | ||
| 20 | } | ||
| 21 | }; | ||
| 22 | |||
| 23 | } // namespace | ||
diff --git a/src/core/hle/service/fs/archive.cpp b/src/core/hle/service/fs/archive.cpp index 958dd9344..1bb4e4b23 100644 --- a/src/core/hle/service/fs/archive.cpp +++ b/src/core/hle/service/fs/archive.cpp | |||
| @@ -432,6 +432,28 @@ ResultCode FormatSaveData() { | |||
| 432 | return archive_itr->second->backend->Format(FileSys::Path()); | 432 | return archive_itr->second->backend->Format(FileSys::Path()); |
| 433 | } | 433 | } |
| 434 | 434 | ||
| 435 | ResultCode CreateExtSaveData(u32 high, u32 low) { | ||
| 436 | // Construct the binary path to the archive first | ||
| 437 | std::vector<u8> binary_path; | ||
| 438 | binary_path.reserve(12); | ||
| 439 | // The first word is all zero to specify a NAND archive | ||
| 440 | for (unsigned i = 0; i < 4; ++i) | ||
| 441 | binary_path.push_back(0); | ||
| 442 | // Next is the low word | ||
| 443 | for (unsigned i = 0; i < 4; ++i) | ||
| 444 | binary_path.push_back((low >> (8 * i)) & 0xFF); | ||
| 445 | // Next is the high word | ||
| 446 | for (unsigned i = 0; i < 4; ++i) | ||
| 447 | binary_path.push_back((high >> i) & 0xFF); | ||
| 448 | FileSys::Path path(binary_path); | ||
| 449 | std::string nand_directory = FileUtil::GetUserPath(D_NAND_IDX); | ||
| 450 | std::string base_path = FileSys::GetExtDataContainerPath(nand_directory, true); | ||
| 451 | std::string extsavedata_path = FileSys::GetExtSaveDataPath(base_path, path); | ||
| 452 | if (!FileUtil::CreateFullPath(extsavedata_path)) | ||
| 453 | return ResultCode(-1); // TODO(Subv): Find the right error code | ||
| 454 | return RESULT_SUCCESS; | ||
| 455 | } | ||
| 456 | |||
| 435 | /// Initialize archives | 457 | /// Initialize archives |
| 436 | void ArchiveInit() { | 458 | void ArchiveInit() { |
| 437 | next_handle = 1; | 459 | next_handle = 1; |
diff --git a/src/core/hle/service/fs/archive.h b/src/core/hle/service/fs/archive.h index 2cdfaa7e9..ba674d7f6 100644 --- a/src/core/hle/service/fs/archive.h +++ b/src/core/hle/service/fs/archive.h | |||
| @@ -131,6 +131,14 @@ ResultVal<Handle> OpenDirectoryFromArchive(ArchiveHandle archive_handle, const F | |||
| 131 | */ | 131 | */ |
| 132 | ResultCode FormatSaveData(); | 132 | ResultCode FormatSaveData(); |
| 133 | 133 | ||
| 134 | /** | ||
| 135 | * Creates a blank SharedExtSaveData archive for the specified extdata ID | ||
| 136 | * @param high The high word of the extdata id to create | ||
| 137 | * @param low The low word of the extdata id to create | ||
| 138 | * @return ResultCode 0 on success or the corresponding code on error | ||
| 139 | */ | ||
| 140 | ResultCode CreateExtSaveData(u32 high, u32 low); | ||
| 141 | |||
| 134 | /// Initialize archives | 142 | /// Initialize archives |
| 135 | void ArchiveInit(); | 143 | void ArchiveInit(); |
| 136 | 144 | ||
diff --git a/src/core/hle/service/fs/fs_user.cpp b/src/core/hle/service/fs/fs_user.cpp index 56f3117f4..c495b6f3c 100644 --- a/src/core/hle/service/fs/fs_user.cpp +++ b/src/core/hle/service/fs/fs_user.cpp | |||
| @@ -484,6 +484,15 @@ static void FormatThisUserSaveData(Service::Interface* self) { | |||
| 484 | cmd_buff[1] = FormatSaveData().raw; | 484 | cmd_buff[1] = FormatSaveData().raw; |
| 485 | } | 485 | } |
| 486 | 486 | ||
| 487 | static void CreateExtSaveData(Service::Interface* self) { | ||
| 488 | // TODO(Subv): Figure out the other parameters. | ||
| 489 | u32* cmd_buff = Kernel::GetCommandBuffer(); | ||
| 490 | u32 save_high = cmd_buff[1]; | ||
| 491 | u32 save_low = cmd_buff[2]; | ||
| 492 | // TODO(Subv): For now it is assumed that only SharedExtSaveData can be created like this | ||
| 493 | cmd_buff[1] = CreateExtSaveData(save_high, save_low).raw; | ||
| 494 | } | ||
| 495 | |||
| 487 | const FSUserInterface::FunctionInfo FunctionTable[] = { | 496 | const FSUserInterface::FunctionInfo FunctionTable[] = { |
| 488 | {0x000100C6, nullptr, "Dummy1"}, | 497 | {0x000100C6, nullptr, "Dummy1"}, |
| 489 | {0x040100C4, nullptr, "Control"}, | 498 | {0x040100C4, nullptr, "Control"}, |
| @@ -567,6 +576,8 @@ const FSUserInterface::FunctionInfo FunctionTable[] = { | |||
| 567 | {0x084E0342, nullptr, "UpdateSha256Context"}, | 576 | {0x084E0342, nullptr, "UpdateSha256Context"}, |
| 568 | {0x084F0102, nullptr, "ReadSpecialFile"}, | 577 | {0x084F0102, nullptr, "ReadSpecialFile"}, |
| 569 | {0x08500040, nullptr, "GetSpecialFileSize"}, | 578 | {0x08500040, nullptr, "GetSpecialFileSize"}, |
| 579 | {0x08510242, CreateExtSaveData, "CreateExtSaveData"}, | ||
| 580 | {0x08520100, nullptr, "DeleteExtSaveData"}, | ||
| 570 | {0x08580000, nullptr, "GetMovableSedHashedKeyYRandomData"}, | 581 | {0x08580000, nullptr, "GetMovableSedHashedKeyYRandomData"}, |
| 571 | {0x08610042, nullptr, "InitializeWithSdkVersion"}, | 582 | {0x08610042, nullptr, "InitializeWithSdkVersion"}, |
| 572 | {0x08620040, nullptr, "SetPriority"}, | 583 | {0x08620040, nullptr, "SetPriority"}, |
diff --git a/src/core/hle/service/gsp_lcd.cpp b/src/core/hle/service/gsp_lcd.cpp new file mode 100644 index 000000000..6213472ff --- /dev/null +++ b/src/core/hle/service/gsp_lcd.cpp | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | // Copyright 2015 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | |||
| 6 | #include "common/log.h" | ||
| 7 | #include "common/bit_field.h" | ||
| 8 | |||
| 9 | #include "core/hle/service/gsp_lcd.h" | ||
| 10 | |||
| 11 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 12 | // Namespace GSP_LCD | ||
| 13 | |||
| 14 | namespace GSP_LCD { | ||
| 15 | |||
| 16 | /*const Interface::FunctionInfo FunctionTable[] = { | ||
| 17 | };*/ | ||
| 18 | |||
| 19 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 20 | // Interface class | ||
| 21 | |||
| 22 | Interface::Interface() { | ||
| 23 | //Register(FunctionTable, ARRAY_SIZE(FunctionTable)); | ||
| 24 | } | ||
| 25 | |||
| 26 | } // namespace | ||
diff --git a/src/core/hle/service/gsp_lcd.h b/src/core/hle/service/gsp_lcd.h new file mode 100644 index 000000000..56b3cfe86 --- /dev/null +++ b/src/core/hle/service/gsp_lcd.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | // Copyright 2015 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 10 | // Namespace GSP_LCD | ||
| 11 | |||
| 12 | namespace GSP_LCD { | ||
| 13 | |||
| 14 | /// Interface to "gsp::Lcd" service | ||
| 15 | class Interface : public Service::Interface { | ||
| 16 | public: | ||
| 17 | Interface(); | ||
| 18 | |||
| 19 | std::string GetPortName() const override { | ||
| 20 | return "gsp::Lcd"; | ||
| 21 | } | ||
| 22 | }; | ||
| 23 | |||
| 24 | } // namespace | ||
diff --git a/src/core/hle/service/news_s.cpp b/src/core/hle/service/news_s.cpp new file mode 100644 index 000000000..1850f59bd --- /dev/null +++ b/src/core/hle/service/news_s.cpp | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | // Copyright 2015 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "common/log.h" | ||
| 6 | #include "core/hle/hle.h" | ||
| 7 | #include "core/hle/service/news_s.h" | ||
| 8 | |||
| 9 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 10 | // Namespace NEWS_S | ||
| 11 | |||
| 12 | namespace NEWS_S { | ||
| 13 | |||
| 14 | const Interface::FunctionInfo FunctionTable[] = { | ||
| 15 | {0x000100C6, nullptr, "AddNotification"}, | ||
| 16 | }; | ||
| 17 | |||
| 18 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 19 | // Interface class | ||
| 20 | |||
| 21 | Interface::Interface() { | ||
| 22 | Register(FunctionTable, ARRAY_SIZE(FunctionTable)); | ||
| 23 | } | ||
| 24 | |||
| 25 | } // namespace | ||
diff --git a/src/core/hle/service/news_s.h b/src/core/hle/service/news_s.h new file mode 100644 index 000000000..f8b4636d5 --- /dev/null +++ b/src/core/hle/service/news_s.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | // Copyright 2015 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 10 | // Namespace NEWS_S | ||
| 11 | |||
| 12 | namespace NEWS_S { | ||
| 13 | |||
| 14 | class Interface : public Service::Interface { | ||
| 15 | public: | ||
| 16 | Interface(); | ||
| 17 | |||
| 18 | std::string GetPortName() const override { | ||
| 19 | return "news:s"; | ||
| 20 | } | ||
| 21 | }; | ||
| 22 | |||
| 23 | } // namespace | ||
diff --git a/src/core/hle/service/ns_s.cpp b/src/core/hle/service/ns_s.cpp new file mode 100644 index 000000000..b9aca4257 --- /dev/null +++ b/src/core/hle/service/ns_s.cpp | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | // Copyright 2015 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 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/ns_s.h" | ||
| 10 | |||
| 11 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 12 | // Namespace NS_S | ||
| 13 | |||
| 14 | namespace NS_S { | ||
| 15 | |||
| 16 | const Interface::FunctionInfo FunctionTable[] = { | ||
| 17 | {0x000200C0, nullptr, "LaunchTitle"}, | ||
| 18 | }; | ||
| 19 | |||
| 20 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 21 | // Interface class | ||
| 22 | |||
| 23 | Interface::Interface() { | ||
| 24 | Register(FunctionTable, ARRAY_SIZE(FunctionTable)); | ||
| 25 | } | ||
| 26 | |||
| 27 | } // namespace | ||
diff --git a/src/core/hle/service/ns_s.h b/src/core/hle/service/ns_s.h new file mode 100644 index 000000000..8d8e849b8 --- /dev/null +++ b/src/core/hle/service/ns_s.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | // Copyright 2015 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 10 | // Namespace NS_S | ||
| 11 | |||
| 12 | namespace NS_S { | ||
| 13 | |||
| 14 | /// Interface to "NS:S" service | ||
| 15 | class Interface : public Service::Interface { | ||
| 16 | public: | ||
| 17 | Interface(); | ||
| 18 | |||
| 19 | std::string GetPortName() const override { | ||
| 20 | return "ns:s"; | ||
| 21 | } | ||
| 22 | }; | ||
| 23 | |||
| 24 | } // namespace | ||
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 444a4eab1..355196fd3 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -10,12 +10,15 @@ | |||
| 10 | #include "core/hle/service/act_u.h" | 10 | #include "core/hle/service/act_u.h" |
| 11 | #include "core/hle/service/am_app.h" | 11 | #include "core/hle/service/am_app.h" |
| 12 | #include "core/hle/service/am_net.h" | 12 | #include "core/hle/service/am_net.h" |
| 13 | #include "core/hle/service/am_sys.h" | ||
| 13 | #include "core/hle/service/apt_a.h" | 14 | #include "core/hle/service/apt_a.h" |
| 14 | #include "core/hle/service/apt_s.h" | 15 | #include "core/hle/service/apt_s.h" |
| 15 | #include "core/hle/service/apt_u.h" | 16 | #include "core/hle/service/apt_u.h" |
| 17 | #include "core/hle/service/boss_p.h" | ||
| 16 | #include "core/hle/service/boss_u.h" | 18 | #include "core/hle/service/boss_u.h" |
| 17 | #include "core/hle/service/cam_u.h" | 19 | #include "core/hle/service/cam_u.h" |
| 18 | #include "core/hle/service/cecd_u.h" | 20 | #include "core/hle/service/cecd_u.h" |
| 21 | #include "core/hle/service/cecd_s.h" | ||
| 19 | #include "core/hle/service/cfg/cfg_i.h" | 22 | #include "core/hle/service/cfg/cfg_i.h" |
| 20 | #include "core/hle/service/cfg/cfg_s.h" | 23 | #include "core/hle/service/cfg/cfg_s.h" |
| 21 | #include "core/hle/service/cfg/cfg_u.h" | 24 | #include "core/hle/service/cfg/cfg_u.h" |
| @@ -23,18 +26,22 @@ | |||
| 23 | #include "core/hle/service/dsp_dsp.h" | 26 | #include "core/hle/service/dsp_dsp.h" |
| 24 | #include "core/hle/service/err_f.h" | 27 | #include "core/hle/service/err_f.h" |
| 25 | #include "core/hle/service/fs/fs_user.h" | 28 | #include "core/hle/service/fs/fs_user.h" |
| 29 | #include "core/hle/service/frd_a.h" | ||
| 26 | #include "core/hle/service/frd_u.h" | 30 | #include "core/hle/service/frd_u.h" |
| 27 | #include "core/hle/service/gsp_gpu.h" | 31 | #include "core/hle/service/gsp_gpu.h" |
| 28 | #include "core/hle/service/hid/hid_spvr.h" | 32 | #include "core/hle/service/hid/hid_spvr.h" |
| 29 | #include "core/hle/service/hid/hid_user.h" | 33 | #include "core/hle/service/hid/hid_user.h" |
| 34 | #include "core/hle/service/gsp_lcd.h" | ||
| 30 | #include "core/hle/service/http_c.h" | 35 | #include "core/hle/service/http_c.h" |
| 31 | #include "core/hle/service/ir_rst.h" | 36 | #include "core/hle/service/ir_rst.h" |
| 32 | #include "core/hle/service/ir_u.h" | 37 | #include "core/hle/service/ir_u.h" |
| 33 | #include "core/hle/service/ldr_ro.h" | 38 | #include "core/hle/service/ldr_ro.h" |
| 34 | #include "core/hle/service/mic_u.h" | 39 | #include "core/hle/service/mic_u.h" |
| 35 | #include "core/hle/service/ndm_u.h" | 40 | #include "core/hle/service/ndm_u.h" |
| 41 | #include "core/hle/service/news_s.h" | ||
| 36 | #include "core/hle/service/news_u.h" | 42 | #include "core/hle/service/news_u.h" |
| 37 | #include "core/hle/service/nim_aoc.h" | 43 | #include "core/hle/service/nim_aoc.h" |
| 44 | #include "core/hle/service/ns_s.h" | ||
| 38 | #include "core/hle/service/nwm_uds.h" | 45 | #include "core/hle/service/nwm_uds.h" |
| 39 | #include "core/hle/service/pm_app.h" | 46 | #include "core/hle/service/pm_app.h" |
| 40 | #include "core/hle/service/ptm_play.h" | 47 | #include "core/hle/service/ptm_play.h" |
| @@ -90,11 +97,14 @@ void Init() { | |||
| 90 | g_manager->AddService(new ACT_U::Interface); | 97 | g_manager->AddService(new ACT_U::Interface); |
| 91 | g_manager->AddService(new AM_APP::Interface); | 98 | g_manager->AddService(new AM_APP::Interface); |
| 92 | g_manager->AddService(new AM_NET::Interface); | 99 | g_manager->AddService(new AM_NET::Interface); |
| 100 | g_manager->AddService(new AM_SYS::Interface); | ||
| 93 | g_manager->AddService(new APT_A::Interface); | 101 | g_manager->AddService(new APT_A::Interface); |
| 94 | g_manager->AddService(new APT_S::Interface); | 102 | g_manager->AddService(new APT_S::Interface); |
| 95 | g_manager->AddService(new APT_U::Interface); | 103 | g_manager->AddService(new APT_U::Interface); |
| 104 | g_manager->AddService(new BOSS_P::Interface); | ||
| 96 | g_manager->AddService(new BOSS_U::Interface); | 105 | g_manager->AddService(new BOSS_U::Interface); |
| 97 | g_manager->AddService(new CAM_U::Interface); | 106 | g_manager->AddService(new CAM_U::Interface); |
| 107 | g_manager->AddService(new CECD_S::Interface); | ||
| 98 | g_manager->AddService(new CECD_U::Interface); | 108 | g_manager->AddService(new CECD_U::Interface); |
| 99 | g_manager->AddService(new CFG_I::Interface); | 109 | g_manager->AddService(new CFG_I::Interface); |
| 100 | g_manager->AddService(new CFG_S::Interface); | 110 | g_manager->AddService(new CFG_S::Interface); |
| @@ -102,19 +112,23 @@ void Init() { | |||
| 102 | g_manager->AddService(new CSND_SND::Interface); | 112 | g_manager->AddService(new CSND_SND::Interface); |
| 103 | g_manager->AddService(new DSP_DSP::Interface); | 113 | g_manager->AddService(new DSP_DSP::Interface); |
| 104 | g_manager->AddService(new ERR_F::Interface); | 114 | g_manager->AddService(new ERR_F::Interface); |
| 115 | g_manager->AddService(new FRD_A::Interface); | ||
| 105 | g_manager->AddService(new FRD_U::Interface); | 116 | g_manager->AddService(new FRD_U::Interface); |
| 106 | g_manager->AddService(new FS::FSUserInterface); | 117 | g_manager->AddService(new FS::FSUserInterface); |
| 107 | g_manager->AddService(new GSP_GPU::Interface); | 118 | g_manager->AddService(new GSP_GPU::Interface); |
| 108 | g_manager->AddService(new HID_SPVR::Interface); | 119 | g_manager->AddService(new GSP_LCD::Interface); |
| 109 | g_manager->AddService(new HID_User::Interface); | 120 | g_manager->AddService(new HID_User::Interface); |
| 121 | g_manager->AddService(new HID_SPVR::Interface); | ||
| 110 | g_manager->AddService(new HTTP_C::Interface); | 122 | g_manager->AddService(new HTTP_C::Interface); |
| 111 | g_manager->AddService(new IR_RST::Interface); | 123 | g_manager->AddService(new IR_RST::Interface); |
| 112 | g_manager->AddService(new IR_U::Interface); | 124 | g_manager->AddService(new IR_U::Interface); |
| 113 | g_manager->AddService(new LDR_RO::Interface); | 125 | g_manager->AddService(new LDR_RO::Interface); |
| 114 | g_manager->AddService(new MIC_U::Interface); | 126 | g_manager->AddService(new MIC_U::Interface); |
| 115 | g_manager->AddService(new NDM_U::Interface); | 127 | g_manager->AddService(new NDM_U::Interface); |
| 128 | g_manager->AddService(new NEWS_S::Interface); | ||
| 116 | g_manager->AddService(new NEWS_U::Interface); | 129 | g_manager->AddService(new NEWS_U::Interface); |
| 117 | g_manager->AddService(new NIM_AOC::Interface); | 130 | g_manager->AddService(new NIM_AOC::Interface); |
| 131 | g_manager->AddService(new NS_S::Interface); | ||
| 118 | g_manager->AddService(new NWM_UDS::Interface); | 132 | g_manager->AddService(new NWM_UDS::Interface); |
| 119 | g_manager->AddService(new PM_APP::Interface); | 133 | g_manager->AddService(new PM_APP::Interface); |
| 120 | g_manager->AddService(new PTM_PLAY::Interface); | 134 | g_manager->AddService(new PTM_PLAY::Interface); |