diff options
Diffstat (limited to 'src')
24 files changed, 693 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/hid_spvr.cpp b/src/core/hle/service/hid_spvr.cpp new file mode 100644 index 000000000..e14e93f4b --- /dev/null +++ b/src/core/hle/service/hid_spvr.cpp | |||
| @@ -0,0 +1,41 @@ | |||
| 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 | |||
| 7 | #include "core/arm/arm_interface.h" | ||
| 8 | #include "core/hle/hle.h" | ||
| 9 | #include "core/hle/service/hid_user.h" | ||
| 10 | #include "core/hle/service/hid_spvr.h" | ||
| 11 | |||
| 12 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 13 | // Namespace HID_SPVR | ||
| 14 | |||
| 15 | namespace HID_User { | ||
| 16 | extern void GetIPCHandles(Service::Interface* self); | ||
| 17 | } | ||
| 18 | |||
| 19 | namespace HID_SPVR { | ||
| 20 | |||
| 21 | const Interface::FunctionInfo FunctionTable[] = { | ||
| 22 | {0x000A0000, HID_User::GetIPCHandles, "GetIPCHandles"}, | ||
| 23 | {0x000B0000, nullptr, "StartAnalogStickCalibration"}, | ||
| 24 | {0x000E0000, nullptr, "GetAnalogStickCalibrateParam"}, | ||
| 25 | {0x00110000, nullptr, "EnableAccelerometer"}, | ||
| 26 | {0x00120000, nullptr, "DisableAccelerometer"}, | ||
| 27 | {0x00130000, nullptr, "EnableGyroscopeLow"}, | ||
| 28 | {0x00140000, nullptr, "DisableGyroscopeLow"}, | ||
| 29 | {0x00150000, nullptr, "GetGyroscopeLowRawToDpsCoefficient"}, | ||
| 30 | {0x00160000, nullptr, "GetGyroscopeLowCalibrateParam"}, | ||
| 31 | {0x00170000, nullptr, "GetSoundVolume"}, | ||
| 32 | }; | ||
| 33 | |||
| 34 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 35 | // Interface class | ||
| 36 | |||
| 37 | Interface::Interface() { | ||
| 38 | Register(FunctionTable, ARRAY_SIZE(FunctionTable)); | ||
| 39 | } | ||
| 40 | |||
| 41 | } // namespace | ||
diff --git a/src/core/hle/service/hid_spvr.h b/src/core/hle/service/hid_spvr.h new file mode 100644 index 000000000..be506358b --- /dev/null +++ b/src/core/hle/service/hid_spvr.h | |||
| @@ -0,0 +1,29 @@ | |||
| 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 HID_SPVR | ||
| 11 | |||
| 12 | // This service is used for interfacing to physical user controls. | ||
| 13 | // Uses include game pad controls, touchscreen, accelerometers, gyroscopes, and debug pad. | ||
| 14 | |||
| 15 | namespace HID_SPVR { | ||
| 16 | |||
| 17 | /** | ||
| 18 | * HID service interface. | ||
| 19 | */ | ||
| 20 | class Interface : public Service::Interface { | ||
| 21 | public: | ||
| 22 | Interface(); | ||
| 23 | |||
| 24 | std::string GetPortName() const override { | ||
| 25 | return "hid:SPVR"; | ||
| 26 | } | ||
| 27 | }; | ||
| 28 | |||
| 29 | } // namespace | ||
diff --git a/src/core/hle/service/hid_user.cpp b/src/core/hle/service/hid_user.cpp new file mode 100644 index 000000000..1fa12ddc9 --- /dev/null +++ b/src/core/hle/service/hid_user.cpp | |||
| @@ -0,0 +1,197 @@ | |||
| 1 | // Copyright 2014 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 | |||
| 7 | #include "core/arm/arm_interface.h" | ||
| 8 | #include "core/hle/hle.h" | ||
| 9 | #include "core/hle/kernel/event.h" | ||
| 10 | #include "core/hle/kernel/shared_memory.h" | ||
| 11 | #include "hid_user.h" | ||
| 12 | |||
| 13 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 14 | // Namespace HID_User | ||
| 15 | |||
| 16 | namespace HID_User { | ||
| 17 | |||
| 18 | // Handle to shared memory region designated to HID_User service | ||
| 19 | static Handle shared_mem = 0; | ||
| 20 | |||
| 21 | // Event handles | ||
| 22 | static Handle event_pad_or_touch_1 = 0; | ||
| 23 | static Handle event_pad_or_touch_2 = 0; | ||
| 24 | static Handle event_accelerometer = 0; | ||
| 25 | static Handle event_gyroscope = 0; | ||
| 26 | static Handle event_debug_pad = 0; | ||
| 27 | |||
| 28 | // Next Pad state update information | ||
| 29 | static PadState next_state = {{0}}; | ||
| 30 | static u32 next_index = 0; | ||
| 31 | static s16 next_circle_x = 0; | ||
| 32 | static s16 next_circle_y = 0; | ||
| 33 | |||
| 34 | /** | ||
| 35 | * Gets a pointer to the PadData structure inside HID shared memory | ||
| 36 | */ | ||
| 37 | static inline PadData* GetPadData() { | ||
| 38 | return reinterpret_cast<PadData*>(Kernel::GetSharedMemoryPointer(shared_mem, 0).ValueOr(nullptr)); | ||
| 39 | } | ||
| 40 | |||
| 41 | /** | ||
| 42 | * Circle Pad from keys. | ||
| 43 | * | ||
| 44 | * This is implemented as "pushed all the way to an edge (max) or centered (0)". | ||
| 45 | * | ||
| 46 | * Indicate the circle pad is pushed completely to the edge in 1 of 8 directions. | ||
| 47 | */ | ||
| 48 | static void UpdateNextCirclePadState() { | ||
| 49 | static const s16 max_value = 0x9C; | ||
| 50 | next_circle_x = next_state.circle_left ? -max_value : 0x0; | ||
| 51 | next_circle_x += next_state.circle_right ? max_value : 0x0; | ||
| 52 | next_circle_y = next_state.circle_down ? -max_value : 0x0; | ||
| 53 | next_circle_y += next_state.circle_up ? max_value : 0x0; | ||
| 54 | } | ||
| 55 | |||
| 56 | /** | ||
| 57 | * Sets a Pad state (button or button combo) as pressed | ||
| 58 | */ | ||
| 59 | void PadButtonPress(const PadState& pad_state) { | ||
| 60 | next_state.hex |= pad_state.hex; | ||
| 61 | UpdateNextCirclePadState(); | ||
| 62 | } | ||
| 63 | |||
| 64 | /** | ||
| 65 | * Sets a Pad state (button or button combo) as released | ||
| 66 | */ | ||
| 67 | void PadButtonRelease(const PadState& pad_state) { | ||
| 68 | next_state.hex &= ~pad_state.hex; | ||
| 69 | UpdateNextCirclePadState(); | ||
| 70 | } | ||
| 71 | |||
| 72 | /** | ||
| 73 | * Called after all Pad changes to be included in this update have been made, | ||
| 74 | * including both Pad key changes and analog circle Pad changes. | ||
| 75 | */ | ||
| 76 | void PadUpdateComplete() { | ||
| 77 | PadData* pad_data = GetPadData(); | ||
| 78 | |||
| 79 | if (pad_data == nullptr) { | ||
| 80 | return; | ||
| 81 | } | ||
| 82 | |||
| 83 | // Update PadData struct | ||
| 84 | pad_data->current_state.hex = next_state.hex; | ||
| 85 | pad_data->index = next_index; | ||
| 86 | next_index = (next_index + 1) % pad_data->entries.size(); | ||
| 87 | |||
| 88 | // Get the previous Pad state | ||
| 89 | u32 last_entry_index = (pad_data->index - 1) % pad_data->entries.size(); | ||
| 90 | PadState old_state = pad_data->entries[last_entry_index].current_state; | ||
| 91 | |||
| 92 | // Compute bitmask with 1s for bits different from the old state | ||
| 93 | PadState changed; | ||
| 94 | changed.hex = (next_state.hex ^ old_state.hex); | ||
| 95 | |||
| 96 | // Compute what was added | ||
| 97 | PadState additions; | ||
| 98 | additions.hex = changed.hex & next_state.hex; | ||
| 99 | |||
| 100 | // Compute what was removed | ||
| 101 | PadState removals; | ||
| 102 | removals.hex = changed.hex & old_state.hex; | ||
| 103 | |||
| 104 | // Get the current Pad entry | ||
| 105 | PadDataEntry* current_pad_entry = &pad_data->entries[pad_data->index]; | ||
| 106 | |||
| 107 | // Update entry properties | ||
| 108 | current_pad_entry->current_state.hex = next_state.hex; | ||
| 109 | current_pad_entry->delta_additions.hex = additions.hex; | ||
| 110 | current_pad_entry->delta_removals.hex = removals.hex; | ||
| 111 | |||
| 112 | // Set circle Pad | ||
| 113 | current_pad_entry->circle_pad_x = next_circle_x; | ||
| 114 | current_pad_entry->circle_pad_y = next_circle_y; | ||
| 115 | |||
| 116 | // If we just updated index 0, provide a new timestamp | ||
| 117 | if (pad_data->index == 0) { | ||
| 118 | pad_data->index_reset_ticks_previous = pad_data->index_reset_ticks; | ||
| 119 | pad_data->index_reset_ticks = (s64)Core::g_app_core->GetTicks(); | ||
| 120 | } | ||
| 121 | |||
| 122 | // Signal both handles when there's an update to Pad or touch | ||
| 123 | Kernel::SignalEvent(event_pad_or_touch_1); | ||
| 124 | Kernel::SignalEvent(event_pad_or_touch_2); | ||
| 125 | } | ||
| 126 | |||
| 127 | |||
| 128 | // TODO(peachum): | ||
| 129 | // Add a method for setting analog input from joystick device for the circle Pad. | ||
| 130 | // | ||
| 131 | // This method should: | ||
| 132 | // * Be called after both PadButton<Press, Release>(). | ||
| 133 | // * Be called before PadUpdateComplete() | ||
| 134 | // * Set current PadEntry.circle_pad_<axis> using analog data | ||
| 135 | // * Set PadData.raw_circle_pad_data | ||
| 136 | // * Set PadData.current_state.circle_right = 1 if current PadEntry.circle_pad_x >= 41 | ||
| 137 | // * Set PadData.current_state.circle_up = 1 if current PadEntry.circle_pad_y >= 41 | ||
| 138 | // * Set PadData.current_state.circle_left = 1 if current PadEntry.circle_pad_x <= -41 | ||
| 139 | // * Set PadData.current_state.circle_right = 1 if current PadEntry.circle_pad_y <= -41 | ||
| 140 | |||
| 141 | |||
| 142 | /** | ||
| 143 | * HID_User::GetIPCHandles service function | ||
| 144 | * Inputs: | ||
| 145 | * None | ||
| 146 | * Outputs: | ||
| 147 | * 1 : Result of function, 0 on success, otherwise error code | ||
| 148 | * 2 : Unused | ||
| 149 | * 3 : Handle to HID_User shared memory | ||
| 150 | * 4 : Event signaled by HID_User | ||
| 151 | * 5 : Event signaled by HID_User | ||
| 152 | * 6 : Event signaled by HID_User | ||
| 153 | * 7 : Gyroscope event | ||
| 154 | * 8 : Event signaled by HID_User | ||
| 155 | */ | ||
| 156 | void GetIPCHandles(Service::Interface* self) { | ||
| 157 | u32* cmd_buff = Kernel::GetCommandBuffer(); | ||
| 158 | |||
| 159 | cmd_buff[1] = 0; // No error | ||
| 160 | cmd_buff[3] = shared_mem; | ||
| 161 | cmd_buff[4] = event_pad_or_touch_1; | ||
| 162 | cmd_buff[5] = event_pad_or_touch_2; | ||
| 163 | cmd_buff[6] = event_accelerometer; | ||
| 164 | cmd_buff[7] = event_gyroscope; | ||
| 165 | cmd_buff[8] = event_debug_pad; | ||
| 166 | } | ||
| 167 | |||
| 168 | const Interface::FunctionInfo FunctionTable[] = { | ||
| 169 | {0x000A0000, GetIPCHandles, "GetIPCHandles"}, | ||
| 170 | {0x000B0000, nullptr, "StartAnalogStickCalibration"}, | ||
| 171 | {0x000E0000, nullptr, "GetAnalogStickCalibrateParam"}, | ||
| 172 | {0x00110000, nullptr, "EnableAccelerometer"}, | ||
| 173 | {0x00120000, nullptr, "DisableAccelerometer"}, | ||
| 174 | {0x00130000, nullptr, "EnableGyroscopeLow"}, | ||
| 175 | {0x00140000, nullptr, "DisableGyroscopeLow"}, | ||
| 176 | {0x00150000, nullptr, "GetGyroscopeLowRawToDpsCoefficient"}, | ||
| 177 | {0x00160000, nullptr, "GetGyroscopeLowCalibrateParam"}, | ||
| 178 | {0x00170000, nullptr, "GetSoundVolume"}, | ||
| 179 | }; | ||
| 180 | |||
| 181 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 182 | // Interface class | ||
| 183 | |||
| 184 | Interface::Interface() { | ||
| 185 | shared_mem = Kernel::CreateSharedMemory("HID_User:SharedMem"); // Create shared memory object | ||
| 186 | |||
| 187 | // Create event handles | ||
| 188 | event_pad_or_touch_1 = Kernel::CreateEvent(RESETTYPE_ONESHOT, "HID_User:EventPadOrTouch1"); | ||
| 189 | event_pad_or_touch_2 = Kernel::CreateEvent(RESETTYPE_ONESHOT, "HID_User:EventPadOrTouch2"); | ||
| 190 | event_accelerometer = Kernel::CreateEvent(RESETTYPE_ONESHOT, "HID_User:EventAccelerometer"); | ||
| 191 | event_gyroscope = Kernel::CreateEvent(RESETTYPE_ONESHOT, "HID_User:EventGyroscope"); | ||
| 192 | event_debug_pad = Kernel::CreateEvent(RESETTYPE_ONESHOT, "HID_User:EventDebugPad"); | ||
| 193 | |||
| 194 | Register(FunctionTable, ARRAY_SIZE(FunctionTable)); | ||
| 195 | } | ||
| 196 | |||
| 197 | } // 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); |